WordPress Online Booking and Scheduling Plugin – Bookly - Version 20.4

Version Description

Download this release

Release Info

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

Code changes from version 20.3.3 to 20.4

Files changed (75) hide show
  1. backend/Backend.php +49 -30
  2. backend/components/ace/resources/js/mode-bookly.js +17 -8
  3. backend/components/dialogs/appointment/delete/Ajax.php +4 -2
  4. backend/components/dialogs/appointment/edit/Ajax.php +1 -1
  5. backend/components/dialogs/appointment/edit/resources/js/appointment.js +1 -1
  6. backend/components/dialogs/payment/Dialog.php +1 -0
  7. backend/components/dialogs/payment/resources/js/payment-details-dialog.js +1 -1
  8. backend/components/dialogs/service/order/resources/js/service-order-dialog.js +2 -2
  9. backend/components/dialogs/staff/edit/Ajax.php +3 -1
  10. backend/components/dialogs/staff/edit/Dialog.php +19 -20
  11. backend/components/dialogs/staff/edit/proxy/CustomerGroups.php +15 -0
  12. backend/components/dialogs/staff/edit/proxy/Pro.php +1 -0
  13. backend/components/dialogs/staff/edit/resources/js/staff-details.js +19 -7
  14. backend/components/dialogs/staff/edit/resources/js/staff-edit-dialog.js +4 -4
  15. backend/components/elementor/base/Widget.php +50 -0
  16. backend/components/elementor/resources/css/elementor.css +42 -0
  17. backend/components/elementor/widgets/bookly_form/Widget.php +277 -0
  18. backend/components/gutenberg/bookly_form/Block.php +1 -0
  19. backend/components/gutenberg/bookly_form/resources/js/booking-form-block.js +1 -1
  20. backend/components/notices/Limitation.php +10 -2
  21. backend/components/notices/templates/limitation.php +0 -3
  22. backend/components/notices/templates/limitation_service.php +4 -0
  23. backend/components/notices/templates/limitation_staff.php +4 -0
  24. backend/components/settings/Selects.php +60 -0
  25. backend/components/settings/proxy/Pro.php +1 -0
  26. backend/components/tiny_mce/Tools.php +5 -6
  27. backend/components/tiny_mce/templates/bookly_popup.php +1 -1
  28. backend/modules/appearance/Ajax.php +5 -0
  29. backend/modules/appearance/Page.php +0 -1
  30. backend/modules/appearance/proxy/Pro.php +1 -0
  31. backend/modules/appearance/proxy/SpecialHours.php +16 -0
  32. backend/modules/appearance/resources/js/appearance.js +55 -9
  33. backend/modules/appearance/templates/_6_details.php +10 -0
  34. backend/modules/appearance/templates/_7_payment.php +60 -60
  35. backend/modules/appearance/templates/_8_complete.php +6 -1
  36. backend/modules/appearance/templates/index.php +7 -0
  37. backend/modules/calendar/Ajax.php +14 -15
  38. backend/modules/calendar/Page.php +110 -152
  39. backend/modules/calendar/proxy/Shared.php +1 -1
  40. backend/modules/calendar/resources/js/calendar-common.js +17 -7
  41. backend/modules/calendar/resources/js/calendar.js +9 -6
  42. backend/modules/cloud_billing/resources/js/cloud-billing.js +1 -1
  43. backend/modules/cloud_sms/Page.php +19 -20
  44. backend/modules/cloud_sms/resources/js/sms.js +39 -38
  45. backend/modules/debug/Ajax.php +6 -0
  46. backend/modules/debug/lib/QueryBuilder.php +6 -0
  47. backend/modules/services/Ajax.php +3 -3
  48. backend/modules/services/proxy/Shared.php +2 -1
  49. backend/modules/settings/Ajax.php +10 -6
  50. backend/modules/settings/Page.php +16 -29
  51. backend/modules/settings/resources/js/settings.js +89 -75
  52. backend/modules/settings/templates/_appointmentsForm.php +1 -3
  53. backend/modules/settings/templates/_calendarForm.php +1 -0
  54. backend/modules/settings/templates/_companyForm.php +3 -0
  55. backend/modules/settings/templates/_logsForm.php +8 -3
  56. backend/modules/setup/Ajax.php +119 -0
  57. backend/modules/setup/Page.php +106 -0
  58. backend/modules/setup/proxy/Pro.php +16 -0
  59. backend/modules/setup/resources/css/setup.css +75 -0
  60. backend/modules/setup/resources/js/setup.js +1 -0
  61. backend/modules/setup/templates/index.php +7 -0
  62. backend/modules/staff/Ajax.php +1 -1
  63. backend/modules/staff/resources/js/staff-list.js +1 -1
  64. backend/resources/images/bookly_28.png +0 -0
  65. backend/resources/js/alert.js +1 -1
  66. frontend/modules/booking/Ajax.php +162 -79
  67. frontend/modules/booking/ShortCode.php +31 -29
  68. frontend/modules/booking/proxy/Pro.php +2 -0
  69. frontend/modules/booking/proxy/Shared.php +2 -0
  70. frontend/modules/booking/templates/6_details.php +14 -0
  71. frontend/modules/booking/templates/7_payment.php +2 -2
  72. frontend/modules/booking/templates/8_complete.php +9 -2
  73. frontend/resources/css/bookly-main.css +24 -7
  74. frontend/resources/js/bookly.js +352 -322
  75. frontend/resources/js/bookly.min.js +0 -1
backend/Backend.php CHANGED
@@ -5,6 +5,7 @@ use Bookly\Lib;
5
 
6
  /**
7
  * Class Backend
 
8
  * @package Bookly\Backend
9
  */
10
  abstract class Backend
@@ -19,22 +20,24 @@ abstract class Backend
19
  add_action( 'admin_menu', array( __CLASS__, 'addAdminMenu' ) );
20
 
21
  add_action( 'all_admin_notices', function () use ( $bookly_page ) {
22
- if ( $bookly_page ) {
23
- // Subscribe notice.
24
- Components\Notices\Subscribe::render();
25
- // Subscribe notice.
26
- Components\Notices\LiteRebranding::render();
27
- // NPS notice.
28
- Components\Notices\Nps::render();
29
- // Collect stats notice.
30
- Components\Notices\CollectStats::render();
31
- // Show Powered by Bookly notice.
32
- Components\Notices\PoweredBy::render();
33
- // Show SMS promotion notice.
34
- Components\Notices\SmsPromotion::render();
 
 
 
 
35
  }
36
- // Let add-ons render admin notices.
37
- Lib\Proxy\Shared::renderAdminNotices( $bookly_page );
38
  }, 10, 0 );
39
 
40
  // for Site Health
@@ -49,6 +52,20 @@ abstract class Backend
49
  if ( $bookly_page && strpos( $_SERVER['HTTP_USER_AGENT'], 'Trident/7.0' ) !== false ) {
50
  Lib\Utils\Common::disableEmoji();
51
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  }
53
 
54
  /**
@@ -65,8 +82,7 @@ abstract class Backend
65
  $dynamic_position = '80.0000001' . mt_rand( 1, 1000 ); // position always is under `Settings`
66
  $badge_number = Modules\News\Page::getNewsCount() +
67
  Modules\Shop\Page::getNotSeenCount() +
68
- Lib\Cloud\SMS::getUndeliveredSmsCount()
69
- ;
70
 
71
  if ( $badge_number ) {
72
  add_menu_page( 'Bookly', sprintf( 'Bookly <span class="update-plugins count-%d"><span class="update-count">%d</span></span>', $badge_number, $badge_number ), 'read', 'bookly-menu', '',
@@ -75,22 +91,25 @@ abstract class Backend
75
  add_menu_page( 'Bookly', 'Bookly', 'read', 'bookly-menu', '',
76
  plugins_url( 'resources/images/menu.png', __FILE__ ), $dynamic_position );
77
  }
78
- if ( Lib\Proxy\Pro::graceExpired() ) {
 
 
 
79
  Lib\Proxy\Pro::addLicenseBooklyMenuItem();
80
  } else {
81
  // Translated submenu pages.
82
- $dashboard = __( 'Dashboard', 'bookly' );
83
- $calendar = __( 'Calendar', 'bookly' );
84
- $appointments = __( 'Appointments', 'bookly' );
85
- $staff_members = __( 'Staff Members', 'bookly' );
86
- $services = __( 'Services', 'bookly' );
87
- $notifications = __( 'Email Notifications', 'bookly' );
88
- $customers = __( 'Customers', 'bookly' );
89
- $payments = __( 'Payments', 'bookly' );
90
- $appearance = __( 'Appearance', 'bookly' );
91
- $settings = __( 'Settings', 'bookly' );
92
- $products = __( 'Products', 'bookly' );
93
- $billing = __( 'Billing', 'bookly' );
94
 
95
  add_submenu_page( 'bookly-menu', $dashboard, $dashboard, $required_capability,
96
  Modules\Dashboard\Page::pageSlug(), function () { Modules\Dashboard\Page::render(); } );
5
 
6
  /**
7
  * Class Backend
8
+ *
9
  * @package Bookly\Backend
10
  */
11
  abstract class Backend
20
  add_action( 'admin_menu', array( __CLASS__, 'addAdminMenu' ) );
21
 
22
  add_action( 'all_admin_notices', function () use ( $bookly_page ) {
23
+ if ( ! Lib\Config::setupMode() ) {
24
+ if ( $bookly_page ) {
25
+ // Subscribe notice.
26
+ Components\Notices\Subscribe::render();
27
+ // Subscribe notice.
28
+ Components\Notices\LiteRebranding::render();
29
+ // NPS notice.
30
+ Components\Notices\Nps::render();
31
+ // Collect stats notice.
32
+ Components\Notices\CollectStats::render();
33
+ // Show Powered by Bookly notice.
34
+ Components\Notices\PoweredBy::render();
35
+ // Show SMS promotion notice.
36
+ Components\Notices\SmsPromotion::render();
37
+ }
38
+ // Let add-ons render admin notices.
39
+ Lib\Proxy\Shared::renderAdminNotices( $bookly_page );
40
  }
 
 
41
  }, 10, 0 );
42
 
43
  // for Site Health
52
  if ( $bookly_page && strpos( $_SERVER['HTTP_USER_AGENT'], 'Trident/7.0' ) !== false ) {
53
  Lib\Utils\Common::disableEmoji();
54
  }
55
+
56
+ // Elementor hooks
57
+ add_action( 'elementor/elements/categories_registered', function ( $elements_manager ) {
58
+ /** @var \Elementor\Elements_Manager $elements_manager */
59
+ $elements_manager->add_category( 'bookly', array( 'title' => 'Bookly' ) );
60
+ } );
61
+ add_action( 'elementor/editor/before_enqueue_scripts', function () {
62
+ wp_register_style(
63
+ 'bookly-elementor',
64
+ plugins_url( '/backend/components/elementor/resources/css/elementor.css', __DIR__ ),
65
+ array(),
66
+ Lib\Plugin::getVersion()
67
+ );
68
+ } );
69
  }
70
 
71
  /**
82
  $dynamic_position = '80.0000001' . mt_rand( 1, 1000 ); // position always is under `Settings`
83
  $badge_number = Modules\News\Page::getNewsCount() +
84
  Modules\Shop\Page::getNotSeenCount() +
85
+ Lib\Cloud\SMS::getUndeliveredSmsCount();
 
86
 
87
  if ( $badge_number ) {
88
  add_menu_page( 'Bookly', sprintf( 'Bookly <span class="update-plugins count-%d"><span class="update-count">%d</span></span>', $badge_number, $badge_number ), 'read', 'bookly-menu', '',
91
  add_menu_page( 'Bookly', 'Bookly', 'read', 'bookly-menu', '',
92
  plugins_url( 'resources/images/menu.png', __FILE__ ), $dynamic_position );
93
  }
94
+ if ( Lib\Config::setupMode() ) {
95
+ $setup = __( 'Initial setup', 'bookly' );
96
+ add_submenu_page( 'bookly-menu', $setup, $setup, $required_capability, Modules\Setup\Page::pageSlug(), function () { Modules\Setup\Page::render(); } );
97
+ } elseif ( Lib\Proxy\Pro::graceExpired() ) {
98
  Lib\Proxy\Pro::addLicenseBooklyMenuItem();
99
  } else {
100
  // Translated submenu pages.
101
+ $dashboard = __( 'Dashboard', 'bookly' );
102
+ $calendar = __( 'Calendar', 'bookly' );
103
+ $appointments = __( 'Appointments', 'bookly' );
104
+ $staff_members = __( 'Staff Members', 'bookly' );
105
+ $services = __( 'Services', 'bookly' );
106
+ $notifications = __( 'Email Notifications', 'bookly' );
107
+ $customers = __( 'Customers', 'bookly' );
108
+ $payments = __( 'Payments', 'bookly' );
109
+ $appearance = __( 'Appearance', 'bookly' );
110
+ $settings = __( 'Settings', 'bookly' );
111
+ $products = __( 'Products', 'bookly' );
112
+ $billing = __( 'Billing', 'bookly' );
113
 
114
  add_submenu_page( 'bookly-menu', $dashboard, $dashboard, $required_capability,
115
  Modules\Dashboard\Page::pageSlug(), function () { Modules\Dashboard\Page::render(); } );
backend/components/ace/resources/js/mode-bookly.js CHANGED
@@ -143,7 +143,7 @@ define('ace/mode/bookly_completer', function(require, exports, module) {
143
  caption: '{' + name + '.' + code + '}',
144
  value: '{' + name + '.' + code + '}',
145
  score: 500,
146
- docHTML: loop_codes[code]['description']
147
  });
148
  } else if (top) {
149
  // Add top level loops to completions
@@ -152,14 +152,14 @@ define('ace/mode/bookly_completer', function(require, exports, module) {
152
  value: '{#each ' + name + '.' + code + ' as ' + loop_codes[code]['loop']['item'] + '}{/each}',
153
  snippet: '{#each ' + name + '.' + code + ' as ' + loop_codes[code]['loop']['item'] + '}$0{/each}',
154
  score: 400,
155
- docHTML: loop_codes[code]['description'][0]
156
  });
157
  completions.push({
158
  caption: '{#each ' + name + '.' + code + ' as ' + loop_codes[code]['loop']['item'] + ' delimited by ", "}{/each}',
159
  value: '{#each ' + name + '.' + code + ' as ' + loop_codes[code]['loop']['item'] + ' delimited by ", "}{/each}',
160
  snippet: '{#each ' + name + '.' + code + ' as ' + loop_codes[code]['loop']['item'] + ' delimited by ", "}$0{/each}',
161
  score: 300,
162
- docHTML: loop_codes[code]['description'][1]
163
  });
164
  }
165
  if (loop_codes[code].hasOwnProperty('if') && loop_codes[code]['if']) {
@@ -168,7 +168,7 @@ define('ace/mode/bookly_completer', function(require, exports, module) {
168
  value: '{#if ' + name + '.' + code + '}{/if}',
169
  snippet: '{#if ' + name + '.' + code + '}$0{/if}',
170
  score: 200,
171
- docHTML: loop_codes[code]['description']
172
  });
173
  }
174
  });
@@ -186,14 +186,14 @@ define('ace/mode/bookly_completer', function(require, exports, module) {
186
  value: '{#each ' + code + ' as ' + codes[code]['loop']['item'] + '}{/each}',
187
  snippet: '{#each ' + code + ' as ' + codes[code]['loop']['item'] + '}$0{/each}',
188
  score: 400,
189
- docHTML: codes[code]['description'][0]
190
  });
191
  completions.push({
192
  caption: '{#each ' + code + ' as ' + codes[code]['loop']['item'] + ' delimited by ", "}{/each}',
193
  value: '{#each ' + code + ' as ' + codes[code]['loop']['item'] + ' delimited by ", "}{/each}',
194
  snippet: '{#each ' + code + ' as ' + codes[code]['loop']['item'] + ' delimited by ", "}$0{/each}',
195
  score: 300,
196
- docHTML: codes[code]['description'][1]
197
  });
198
  }
199
  } else if(!codes[code].hasOwnProperty('code') || codes[code]['code']) {
@@ -201,7 +201,7 @@ define('ace/mode/bookly_completer', function(require, exports, module) {
201
  caption: '{' + code + '}',
202
  value: '{' + code + '}',
203
  score: 500,
204
- docHTML: codes[code]['description']
205
  });
206
  }
207
  if (codes[code].hasOwnProperty('if') && codes[code]['if']) {
@@ -210,12 +210,21 @@ define('ace/mode/bookly_completer', function(require, exports, module) {
210
  value: '{#if ' + code + '}{/if}',
211
  snippet: '{#if ' + code + '}$0{/if}',
212
  score: 100,
213
- docHTML: codes[code]['description']
214
  });
215
  }
216
  });
217
  }
218
  callback(null, completions);
 
 
 
 
 
 
 
 
 
219
  }
220
  }
221
  }
143
  caption: '{' + name + '.' + code + '}',
144
  value: '{' + name + '.' + code + '}',
145
  score: 500,
146
+ docHTML: escapeHtml(loop_codes[code]['description'])
147
  });
148
  } else if (top) {
149
  // Add top level loops to completions
152
  value: '{#each ' + name + '.' + code + ' as ' + loop_codes[code]['loop']['item'] + '}{/each}',
153
  snippet: '{#each ' + name + '.' + code + ' as ' + loop_codes[code]['loop']['item'] + '}$0{/each}',
154
  score: 400,
155
+ docHTML: escapeHtml(loop_codes[code]['description'][0])
156
  });
157
  completions.push({
158
  caption: '{#each ' + name + '.' + code + ' as ' + loop_codes[code]['loop']['item'] + ' delimited by ", "}{/each}',
159
  value: '{#each ' + name + '.' + code + ' as ' + loop_codes[code]['loop']['item'] + ' delimited by ", "}{/each}',
160
  snippet: '{#each ' + name + '.' + code + ' as ' + loop_codes[code]['loop']['item'] + ' delimited by ", "}$0{/each}',
161
  score: 300,
162
+ docHTML: escapeHtml(loop_codes[code]['description'][1])
163
  });
164
  }
165
  if (loop_codes[code].hasOwnProperty('if') && loop_codes[code]['if']) {
168
  value: '{#if ' + name + '.' + code + '}{/if}',
169
  snippet: '{#if ' + name + '.' + code + '}$0{/if}',
170
  score: 200,
171
+ docHTML: escapeHtml(loop_codes[code]['description'])
172
  });
173
  }
174
  });
186
  value: '{#each ' + code + ' as ' + codes[code]['loop']['item'] + '}{/each}',
187
  snippet: '{#each ' + code + ' as ' + codes[code]['loop']['item'] + '}$0{/each}',
188
  score: 400,
189
+ docHTML: escapeHtml(codes[code]['description'][0])
190
  });
191
  completions.push({
192
  caption: '{#each ' + code + ' as ' + codes[code]['loop']['item'] + ' delimited by ", "}{/each}',
193
  value: '{#each ' + code + ' as ' + codes[code]['loop']['item'] + ' delimited by ", "}{/each}',
194
  snippet: '{#each ' + code + ' as ' + codes[code]['loop']['item'] + ' delimited by ", "}$0{/each}',
195
  score: 300,
196
+ docHTML: escapeHtml(codes[code]['description'][1])
197
  });
198
  }
199
  } else if(!codes[code].hasOwnProperty('code') || codes[code]['code']) {
201
  caption: '{' + code + '}',
202
  value: '{' + code + '}',
203
  score: 500,
204
+ docHTML: escapeHtml(codes[code]['description'])
205
  });
206
  }
207
  if (codes[code].hasOwnProperty('if') && codes[code]['if']) {
210
  value: '{#if ' + code + '}{/if}',
211
  snippet: '{#if ' + code + '}$0{/if}',
212
  score: 100,
213
+ docHTML: escapeHtml(codes[code]['description'])
214
  });
215
  }
216
  });
217
  }
218
  callback(null, completions);
219
+
220
+ function escapeHtml(description) {
221
+ return description
222
+ .replace(/&/g, "&amp;")
223
+ .replace(/</g, "&lt;")
224
+ .replace(/>/g, "&gt;")
225
+ .replace(/"/g, "&quot;")
226
+ .replace(/'/g, "&#039;");
227
+ }
228
  }
229
  }
230
  }
backend/components/dialogs/appointment/delete/Ajax.php CHANGED
@@ -58,8 +58,10 @@ class Ajax extends Lib\Base\Ajax
58
  }
59
 
60
  $appointment = Lib\Entities\Appointment::find( $appointment_id );
61
- Lib\Utils\Log::deleteEntity( $appointment, __METHOD__ );
62
- $appointment->delete();
 
 
63
 
64
  wp_send_json_success( compact( 'queue' ) );
65
  }
58
  }
59
 
60
  $appointment = Lib\Entities\Appointment::find( $appointment_id );
61
+ if ( $appointment ) {
62
+ Lib\Utils\Log::deleteEntity( $appointment, __METHOD__ );
63
+ $appointment->delete();
64
+ }
65
 
66
  wp_send_json_success( compact( 'queue' ) );
67
  }
backend/components/dialogs/appointment/edit/Ajax.php CHANGED
@@ -502,7 +502,7 @@ class Ajax extends Lib\Base\Ajax
502
  // Create new series.
503
  $series = new Lib\Entities\Series();
504
  $series
505
- ->setRepeat( $repeat )
506
  ->setToken( Common::generateToken( get_class( $series ), 'token' ) )
507
  ->save();
508
 
502
  // Create new series.
503
  $series = new Lib\Entities\Series();
504
  $series
505
+ ->setRepeat( self::parameter( 'repeat' ) )
506
  ->setToken( Common::generateToken( get_class( $series ), 'token' ) )
507
  ->save();
508
 
backend/components/dialogs/appointment/edit/resources/js/appointment.js CHANGED
@@ -1 +1 @@
1
- var BooklyAppointmentDialog=function(t,n,e,r,o){"use strict";function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var u=i(n),a=i(e),c=i(r),f=i(o),l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(t){var n={exports:{}};return t(n,n.exports),n.exports}var d,p=function(t){return t&&t.Math==Math&&t},v=p("object"==typeof globalThis&&globalThis)||p("object"==typeof window&&window)||p("object"==typeof self&&self)||p("object"==typeof l&&l)||function(){return this}()||Function("return this")(),h=function(t){try{return!!t()}catch(t){return!0}},m=!h((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),y={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,_={f:g&&!y.call({1:2},1)?function(t){var n=g(this,t);return!!n&&n.enumerable}:y},$=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}},b={}.toString,w=function(t){return b.call(t).slice(8,-1)},x="".split,k=h((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==w(t)?x.call(t,""):Object(t)}:Object,O=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},S=function(t){return k(O(t))},E=function(t){return"object"==typeof t?null!==t:"function"==typeof t},A=function(t,n){if(!E(t))return t;var e,r;if(n&&"function"==typeof(e=t.toString)&&!E(r=e.call(t)))return r;if("function"==typeof(e=t.valueOf)&&!E(r=e.call(t)))return r;if(!n&&"function"==typeof(e=t.toString)&&!E(r=e.call(t)))return r;throw TypeError("Can't convert object to primitive value")},j={}.hasOwnProperty,T=function(t,n){return j.call(t,n)},P=v.document,R=E(P)&&E(P.createElement),B=function(t){return R?P.createElement(t):{}},I=!m&&!h((function(){return 7!=Object.defineProperty(B("div"),"a",{get:function(){return 7}}).a})),D=Object.getOwnPropertyDescriptor,M={f:m?D:function(t,n){if(t=S(t),n=A(n,!0),I)try{return D(t,n)}catch(t){}if(T(t,n))return $(!_.f.call(t,n),t[n])}},C=/#|\.prototype\./,N=function(t,n){var e=F[L(t)];return e==q||e!=z&&("function"==typeof n?h(n):!!n)},L=N.normalize=function(t){return String(t).replace(C,".").toLowerCase()},F=N.data={},z=N.NATIVE="N",q=N.POLYFILL="P",Y=N,H={},U=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},G=function(t,n,e){if(U(t),void 0===n)return t;switch(e){case 0:return function(){return t.call(n)};case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)}}return function(){return t.apply(n,arguments)}},W=function(t){if(!E(t))throw TypeError(String(t)+" is not an object");return t},J=Object.defineProperty,V={f:m?J:function(t,n,e){if(W(t),n=A(n,!0),W(e),I)try{return J(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported");return"value"in e&&(t[n]=e.value),t}},Q=m?function(t,n,e){return V.f(t,n,$(1,e))}:function(t,n,e){return t[n]=e,t},K=M.f,X=function(t){var n=function(n,e,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,e)}return new t(n,e,r)}return t.apply(this,arguments)};return n.prototype=t.prototype,n},Z=function(t,n){var e,r,o,i,u,a,c,f,l=t.target,s=t.global,d=t.stat,p=t.proto,h=s?v:d?v[l]:(v[l]||{}).prototype,m=s?H:H[l]||(H[l]={}),y=m.prototype;for(o in n)e=!Y(s?o:l+(d?".":"#")+o,t.forced)&&h&&T(h,o),u=m[o],e&&(a=t.noTargetGet?(f=K(h,o))&&f.value:h[o]),i=e&&a?a:n[o],e&&typeof u==typeof i||(c=t.bind&&e?G(i,v):t.wrap&&e?X(i):p&&"function"==typeof i?G(Function.call,i):i,(t.sham||i&&i.sham||u&&u.sham)&&Q(c,"sham",!0),m[o]=c,p&&(T(H,r=l+"Prototype")||Q(H,r,{}),H[r][o]=i,t.real&&y&&!y[o]&&Q(y,o,i)))},tt=function(t){return"function"==typeof t?t:void 0},nt=function(t,n){return arguments.length<2?tt(H[t])||tt(v[t]):H[t]&&H[t][n]||v[t]&&v[t][n]},et=Math.ceil,rt=Math.floor,ot=function(t){return isNaN(t=+t)?0:(t>0?rt:et)(t)},it=Math.min,ut=function(t){return t>0?it(ot(t),9007199254740991):0},at=Math.max,ct=Math.min,ft=function(t,n){var e=ot(t);return e<0?at(e+n,0):ct(e,n)},lt=function(t){return function(n,e,r){var o,i=S(n),u=ut(i.length),a=ft(r,u);if(t&&e!=e){for(;u>a;)if((o=i[a++])!=o)return!0}else for(;u>a;a++)if((t||a in i)&&i[a]===e)return t||a||0;return!t&&-1}},st={includes:lt(!0),indexOf:lt(!1)},dt={},pt=st.indexOf,vt=function(t,n){var e,r=S(t),o=0,i=[];for(e in r)!T(dt,e)&&T(r,e)&&i.push(e);for(;n.length>o;)T(r,e=n[o++])&&(~pt(i,e)||i.push(e));return i},ht=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],mt=Object.keys||function(t){return vt(t,ht)},yt=m?Object.defineProperties:function(t,n){W(t);for(var e,r=mt(n),o=r.length,i=0;o>i;)V.f(t,e=r[i++],n[e]);return t},gt=nt("document","documentElement"),_t=!0,$t="__core-js_shared__",bt=v[$t]||function(t,n){try{Q(v,t,n)}catch(e){v[t]=n}return n}($t,{}),wt=s((function(t){(t.exports=function(t,n){return bt[t]||(bt[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.8.3",mode:"pure",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),xt=0,kt=Math.random(),Ot=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++xt+kt).toString(36)},St=wt("keys"),Et=function(t){return St[t]||(St[t]=Ot(t))},At=Et("IE_PROTO"),jt=function(){},Tt=function(t){return"<script>"+t+"</"+"script>"},Pt=function(){try{d=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,n;Pt=d?function(t){t.write(Tt("")),t.close();var n=t.parentWindow.Object;return t=null,n}(d):((n=B("iframe")).style.display="none",gt.appendChild(n),n.src=String("javascript:"),(t=n.contentWindow.document).open(),t.write(Tt("document.F=Object")),t.close(),t.F);for(var e=ht.length;e--;)delete Pt.prototype[ht[e]];return Pt()};dt[At]=!0;var Rt=Object.create||function(t,n){var e;return null!==t?(jt.prototype=W(t),e=new jt,jt.prototype=null,e[At]=t):e=Pt(),void 0===n?e:yt(e,n)},Bt=[].slice,It={},Dt=function(t,n,e){if(!(n in It)){for(var r=[],o=0;o<n;o++)r[o]="a["+o+"]";It[n]=Function("C,a","return new C("+r.join(",")+")")}return It[n](t,e)},Mt=Function.bind||function(t){var n=U(this),e=Bt.call(arguments,1),r=function(){var o=e.concat(Bt.call(arguments));return this instanceof r?Dt(n,o.length,o):n.apply(t,o)};return E(n.prototype)&&(r.prototype=n.prototype),r},Ct=nt("Reflect","construct"),Nt=h((function(){function t(){}return!(Ct((function(){}),[],t)instanceof t)})),Lt=!h((function(){Ct((function(){}))})),Ft=Nt||Lt;Z({target:"Reflect",stat:!0,forced:Ft,sham:Ft},{construct:function(t,n){U(t),W(n);var e=arguments.length<3?t:U(arguments[2]);if(Lt&&!Nt)return Ct(t,n,e);if(t==e){switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3])}var r=[null];return r.push.apply(r,n),new(Mt.apply(t,r))}var o=e.prototype,i=Rt(E(o)?o:Object.prototype),u=Function.apply.call(t,i,n);return E(u)?u:i}});var zt=H.Reflect.construct;function qt(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}Z({target:"Object",stat:!0,forced:!m,sham:!m},{defineProperty:V.f});var Yt=s((function(t){var n=H.Object,e=t.exports=function(t,e,r){return n.defineProperty(t,e,r)};n.defineProperty.sham&&(e.sham=!0)})),Ht=Yt;function Ut(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Ht(t,r.key,r)}}function Gt(t,n,e){return n&&Ut(t.prototype,n),e&&Ut(t,e),t}function Wt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}Z({target:"Object",stat:!0,sham:!m},{create:Rt});var Jt=H.Object,Vt=function(t,n){return Jt.create(t,n)},Qt=Vt,Kt=Object.setPrototypeOf||("__proto__"in{}?function(){var t,n=!1,e={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(e,[]),n=e instanceof Array}catch(t){}return function(e,r){return W(e),function(t){if(!E(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(r),n?t.call(e,r):e.__proto__=r,e}}():void 0);Z({target:"Object",stat:!0},{setPrototypeOf:Kt});var Xt=H.Object.setPrototypeOf,Zt=Xt;function tn(t,n){return(tn=Zt||function(t,n){return t.__proto__=n,t})(t,n)}function nn(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Qt(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&tn(t,n)}var en,rn,on=Array.isArray||function(t){return"Array"==w(t)},un=function(t){return Object(O(t))},an=function(t,n,e){var r=A(n);r in t?V.f(t,r,$(0,e)):t[r]=e},cn=!!Object.getOwnPropertySymbols&&!h((function(){return!String(Symbol())})),fn=cn&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ln=wt("wks"),sn=v.Symbol,dn=fn?sn:sn&&sn.withoutSetter||Ot,pn=function(t){return T(ln,t)||(cn&&T(sn,t)?ln[t]=sn[t]:ln[t]=dn("Symbol."+t)),ln[t]},vn=pn("species"),hn=function(t,n){var e;return on(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!on(e.prototype)?E(e)&&null===(e=e[vn])&&(e=void 0):e=void 0),new(void 0===e?Array:e)(0===n?0:n)},mn=nt("navigator","userAgent")||"",yn=v.process,gn=yn&&yn.versions,_n=gn&&gn.v8;_n?rn=(en=_n.split("."))[0]+en[1]:mn&&(!(en=mn.match(/Edge\/(\d+)/))||en[1]>=74)&&(en=mn.match(/Chrome\/(\d+)/))&&(rn=en[1]);var $n=rn&&+rn,bn=pn("species"),wn=function(t){return $n>=51||!h((function(){var n=[];return(n.constructor={})[bn]=function(){return{foo:1}},1!==n[t](Boolean).foo}))},xn=pn("isConcatSpreadable"),kn=9007199254740991,On="Maximum allowed index exceeded",Sn=$n>=51||!h((function(){var t=[];return t[xn]=!1,t.concat()[0]!==t})),En=wn("concat"),An=function(t){if(!E(t))return!1;var n=t[xn];return void 0!==n?!!n:on(t)};Z({target:"Array",proto:!0,forced:!Sn||!En},{concat:function(t){var n,e,r,o,i,u=un(this),a=hn(u,0),c=0;for(n=-1,r=arguments.length;n<r;n++)if(An(i=-1===n?u:arguments[n])){if(c+(o=ut(i.length))>kn)throw TypeError(On);for(e=0;e<o;e++,c++)e in i&&an(a,c,i[e])}else{if(c>=kn)throw TypeError(On);an(a,c++,i)}return a.length=c,a}});var jn=ht.concat("length","prototype"),Tn={f:Object.getOwnPropertyNames||function(t){return vt(t,jn)}},Pn=Tn.f,Rn={}.toString,Bn="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],In={f:function(t){return Bn&&"[object Window]"==Rn.call(t)?function(t){try{return Pn(t)}catch(t){return Bn.slice()}}(t):Pn(S(t))}},Dn={f:Object.getOwnPropertySymbols},Mn=function(t,n,e,r){r&&r.enumerable?t[n]=e:Q(t,n,e)},Cn={f:pn},Nn=V.f,Ln=function(t){var n=H.Symbol||(H.Symbol={});T(n,t)||Nn(n,t,{value:Cn.f(t)})},Fn={};Fn[pn("toStringTag")]="z";var zn="[object z]"===String(Fn),qn=pn("toStringTag"),Yn="Arguments"==w(function(){return arguments}()),Hn=zn?w:function(t){var n,e,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,n){try{return t[n]}catch(t){}}(n=Object(t),qn))?e:Yn?w(n):"Object"==(r=w(n))&&"function"==typeof n.callee?"Arguments":r},Un=zn?{}.toString:function(){return"[object "+Hn(this)+"]"},Gn=V.f,Wn=pn("toStringTag"),Jn=function(t,n,e,r){if(t){var o=e?t:t.prototype;T(o,Wn)||Gn(o,Wn,{configurable:!0,value:n}),r&&!zn&&Q(o,"toString",Un)}},Vn=Function.toString;"function"!=typeof bt.inspectSource&&(bt.inspectSource=function(t){return Vn.call(t)});var Qn,Kn,Xn,Zn=bt.inspectSource,te=v.WeakMap,ne="function"==typeof te&&/native code/.test(Zn(te)),ee=v.WeakMap;if(ne){var re=bt.state||(bt.state=new ee),oe=re.get,ie=re.has,ue=re.set;Qn=function(t,n){return n.facade=t,ue.call(re,t,n),n},Kn=function(t){return oe.call(re,t)||{}},Xn=function(t){return ie.call(re,t)}}else{var ae=Et("state");dt[ae]=!0,Qn=function(t,n){return n.facade=t,Q(t,ae,n),n},Kn=function(t){return T(t,ae)?t[ae]:{}},Xn=function(t){return T(t,ae)}}var ce={set:Qn,get:Kn,has:Xn,enforce:function(t){return Xn(t)?Kn(t):Qn(t,{})},getterFor:function(t){return function(n){var e;if(!E(n)||(e=Kn(n)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return e}}},fe=[].push,le=function(t){var n=1==t,e=2==t,r=3==t,o=4==t,i=6==t,u=7==t,a=5==t||i;return function(c,f,l,s){for(var d,p,v=un(c),h=k(v),m=G(f,l,3),y=ut(h.length),g=0,_=s||hn,$=n?_(c,y):e||u?_(c,0):void 0;y>g;g++)if((a||g in h)&&(p=m(d=h[g],g,v),t))if(n)$[g]=p;else if(p)switch(t){case 3:return!0;case 5:return d;case 6:return g;case 2:fe.call($,d)}else switch(t){case 4:return!1;case 7:fe.call($,d)}return i?-1:r||o?o:$}},se={forEach:le(0),map:le(1),filter:le(2),some:le(3),every:le(4),find:le(5),findIndex:le(6),filterOut:le(7)},de=se.forEach,pe=Et("hidden"),ve="Symbol",he=pn("toPrimitive"),me=ce.set,ye=ce.getterFor(ve),ge=Object.prototype,_e=v.Symbol,$e=nt("JSON","stringify"),be=M.f,we=V.f,xe=In.f,ke=_.f,Oe=wt("symbols"),Se=wt("op-symbols"),Ee=wt("string-to-symbol-registry"),Ae=wt("symbol-to-string-registry"),je=wt("wks"),Te=v.QObject,Pe=!Te||!Te.prototype||!Te.prototype.findChild,Re=m&&h((function(){return 7!=Rt(we({},"a",{get:function(){return we(this,"a",{value:7}).a}})).a}))?function(t,n,e){var r=be(ge,n);r&&delete ge[n],we(t,n,e),r&&t!==ge&&we(ge,n,r)}:we,Be=function(t,n){var e=Oe[t]=Rt(_e.prototype);return me(e,{type:ve,tag:t,description:n}),m||(e.description=n),e},Ie=fn?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof _e},De=function(t,n,e){t===ge&&De(Se,n,e),W(t);var r=A(n,!0);return W(e),T(Oe,r)?(e.enumerable?(T(t,pe)&&t[pe][r]&&(t[pe][r]=!1),e=Rt(e,{enumerable:$(0,!1)})):(T(t,pe)||we(t,pe,$(1,{})),t[pe][r]=!0),Re(t,r,e)):we(t,r,e)},Me=function(t,n){W(t);var e=S(n),r=mt(e).concat(Fe(e));return de(r,(function(n){m&&!Ce.call(e,n)||De(t,n,e[n])})),t},Ce=function(t){var n=A(t,!0),e=ke.call(this,n);return!(this===ge&&T(Oe,n)&&!T(Se,n))&&(!(e||!T(this,n)||!T(Oe,n)||T(this,pe)&&this[pe][n])||e)},Ne=function(t,n){var e=S(t),r=A(n,!0);if(e!==ge||!T(Oe,r)||T(Se,r)){var o=be(e,r);return!o||!T(Oe,r)||T(e,pe)&&e[pe][r]||(o.enumerable=!0),o}},Le=function(t){var n=xe(S(t)),e=[];return de(n,(function(t){T(Oe,t)||T(dt,t)||e.push(t)})),e},Fe=function(t){var n=t===ge,e=xe(n?Se:S(t)),r=[];return de(e,(function(t){!T(Oe,t)||n&&!T(ge,t)||r.push(Oe[t])})),r};if(cn||(Mn((_e=function(){if(this instanceof _e)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,n=Ot(t),e=function(t){this===ge&&e.call(Se,t),T(this,pe)&&T(this[pe],n)&&(this[pe][n]=!1),Re(this,n,$(1,t))};return m&&Pe&&Re(ge,n,{configurable:!0,set:e}),Be(n,t)}).prototype,"toString",(function(){return ye(this).tag})),Mn(_e,"withoutSetter",(function(t){return Be(Ot(t),t)})),_.f=Ce,V.f=De,M.f=Ne,Tn.f=In.f=Le,Dn.f=Fe,Cn.f=function(t){return Be(pn(t),t)},m&&we(_e.prototype,"description",{configurable:!0,get:function(){return ye(this).description}})),Z({global:!0,wrap:!0,forced:!cn,sham:!cn},{Symbol:_e}),de(mt(je),(function(t){Ln(t)})),Z({target:ve,stat:!0,forced:!cn},{for:function(t){var n=String(t);if(T(Ee,n))return Ee[n];var e=_e(n);return Ee[n]=e,Ae[e]=n,e},keyFor:function(t){if(!Ie(t))throw TypeError(t+" is not a symbol");if(T(Ae,t))return Ae[t]},useSetter:function(){Pe=!0},useSimple:function(){Pe=!1}}),Z({target:"Object",stat:!0,forced:!cn,sham:!m},{create:function(t,n){return void 0===n?Rt(t):Me(Rt(t),n)},defineProperty:De,defineProperties:Me,getOwnPropertyDescriptor:Ne}),Z({target:"Object",stat:!0,forced:!cn},{getOwnPropertyNames:Le,getOwnPropertySymbols:Fe}),Z({target:"Object",stat:!0,forced:h((function(){Dn.f(1)}))},{getOwnPropertySymbols:function(t){return Dn.f(un(t))}}),$e){var ze=!cn||h((function(){var t=_e();return"[null]"!=$e([t])||"{}"!=$e({a:t})||"{}"!=$e(Object(t))}));Z({target:"JSON",stat:!0,forced:ze},{stringify:function(t,n,e){for(var r,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(r=n,(E(n)||void 0!==t)&&!Ie(t))return on(n)||(n=function(t,n){if("function"==typeof r&&(n=r.call(this,t,n)),!Ie(n))return n}),o[1]=n,$e.apply(null,o)}})}_e.prototype[he]||Q(_e.prototype,he,_e.prototype.valueOf),Jn(_e,ve),dt[pe]=!0,Ln("asyncIterator"),Ln("hasInstance"),Ln("isConcatSpreadable"),Ln("iterator"),Ln("match"),Ln("matchAll"),Ln("replace"),Ln("search"),Ln("species"),Ln("split"),Ln("toPrimitive"),Ln("toStringTag"),Ln("unscopables"),Jn(v.JSON,"JSON",!0);var qe=H.Symbol;Ln("asyncDispose"),Ln("dispose"),Ln("observable"),Ln("patternMatch"),Ln("replaceAll");var Ye,He,Ue,Ge=qe,We=function(t){return function(n,e){var r,o,i=String(O(n)),u=ot(e),a=i.length;return u<0||u>=a?t?"":void 0:(r=i.charCodeAt(u))<55296||r>56319||u+1===a||(o=i.charCodeAt(u+1))<56320||o>57343?t?i.charAt(u):r:t?i.slice(u,u+2):o-56320+(r-55296<<10)+65536}},Je={codeAt:We(!1),charAt:We(!0)},Ve=!h((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Qe=Et("IE_PROTO"),Ke=Object.prototype,Xe=Ve?Object.getPrototypeOf:function(t){return t=un(t),T(t,Qe)?t[Qe]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Ke:null},Ze=pn("iterator"),tr=!1;[].keys&&("next"in(Ue=[].keys())?(He=Xe(Xe(Ue)))!==Object.prototype&&(Ye=He):tr=!0);var nr=null==Ye||h((function(){var t={};return Ye[Ze].call(t)!==t}));nr&&(Ye={}),nr&&!T(Ye,Ze)&&Q(Ye,Ze,(function(){return this}));var er={IteratorPrototype:Ye,BUGGY_SAFARI_ITERATORS:tr},rr={},or=er.IteratorPrototype,ir=function(){return this},ur=er.IteratorPrototype,ar=er.BUGGY_SAFARI_ITERATORS,cr=pn("iterator"),fr="keys",lr="values",sr="entries",dr=function(){return this},pr=function(t,n,e,r,o,i,u){!function(t,n,e){var r=n+" Iterator";t.prototype=Rt(or,{next:$(1,e)}),Jn(t,r,!1,!0),rr[r]=ir}(e,n,r);var a,c,f,l=function(t){if(t===o&&h)return h;if(!ar&&t in p)return p[t];switch(t){case fr:case lr:case sr:return function(){return new e(this,t)}}return function(){return new e(this)}},s=n+" Iterator",d=!1,p=t.prototype,v=p[cr]||p["@@iterator"]||o&&p[o],h=!ar&&v||l(o),m="Array"==n&&p.entries||v;if(m&&(a=Xe(m.call(new t)),ur!==Object.prototype&&a.next&&(Jn(a,s,!0,!0),rr[s]=dr)),o==lr&&v&&v.name!==lr&&(d=!0,h=function(){return v.call(this)}),u&&p[cr]!==h&&Q(p,cr,h),rr[n]=h,o)if(c={values:l(lr),keys:i?h:l(fr),entries:l(sr)},u)for(f in c)(ar||d||!(f in p))&&Mn(p,f,c[f]);else Z({target:n,proto:!0,forced:ar||d},c);return c},vr=Je.charAt,hr="String Iterator",mr=ce.set,yr=ce.getterFor(hr);pr(String,"String",(function(t){mr(this,{type:hr,string:String(t),index:0})}),(function(){var t,n=yr(this),e=n.string,r=n.index;return r>=e.length?{value:void 0,done:!0}:(t=vr(e,r),n.index+=t.length,{value:t,done:!1})}));var gr="Array Iterator",_r=ce.set,$r=ce.getterFor(gr);pr(Array,"Array",(function(t,n){_r(this,{type:gr,target:S(t),index:0,kind:n})}),(function(){var t=$r(this),n=t.target,e=t.kind,r=t.index++;return!n||r>=n.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==e?{value:r,done:!1}:"values"==e?{value:n[r],done:!1}:{value:[r,n[r]],done:!1}}),"values"),rr.Arguments=rr.Array;var br=pn("toStringTag");for(var wr in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var xr=v[wr],kr=xr&&xr.prototype;kr&&Hn(kr)!==br&&Q(kr,br,wr),rr[wr]=rr.Array}var Or=Cn.f("iterator");function Sr(t){return(Sr="function"==typeof Ge&&"symbol"==typeof Or?function(t){return typeof t}:function(t){return t&&"function"==typeof Ge&&t.constructor===Ge&&t!==Ge.prototype?"symbol":typeof t})(t)}function Er(t,n){return!n||"object"!==Sr(n)&&"function"!=typeof n?Wt(t):n}var Ar=h((function(){Xe(1)}));Z({target:"Object",stat:!0,forced:Ar,sham:!Ve},{getPrototypeOf:function(t){return Xe(un(t))}});var jr=H.Object.getPrototypeOf,Tr=jr;function Pr(t){return(Pr=Zt?Tr:function(t){return t.__proto__||Tr(t)})(t)}var Rr=pn("iterator"),Br=Array.prototype,Ir=function(t){return void 0!==t&&(rr.Array===t||Br[Rr]===t)},Dr=pn("iterator"),Mr=function(t){if(null!=t)return t[Dr]||t["@@iterator"]||rr[Hn(t)]},Cr=function(t){var n=t.return;if(void 0!==n)return W(n.call(t)).value},Nr=function(t,n){this.stopped=t,this.result=n},Lr=function(t,n,e){var r,o,i,u,a,c,f,l=e&&e.that,s=!(!e||!e.AS_ENTRIES),d=!(!e||!e.IS_ITERATOR),p=!(!e||!e.INTERRUPTED),v=G(n,l,1+s+p),h=function(t){return r&&Cr(r),new Nr(!0,t)},m=function(t){return s?(W(t),p?v(t[0],t[1],h):v(t[0],t[1])):p?v(t,h):v(t)};if(d)r=t;else{if("function"!=typeof(o=Mr(t)))throw TypeError("Target is not iterable");if(Ir(o)){for(i=0,u=ut(t.length);u>i;i++)if((a=m(t[i]))&&a instanceof Nr)return a;return new Nr(!1)}r=o.call(t)}for(c=r.next;!(f=c.call(r)).done;){try{a=m(f.value)}catch(t){throw Cr(r),t}if("object"==typeof a&&a&&a instanceof Nr)return a}return new Nr(!1)},Fr=function(t,n){var e=this;if(!(e instanceof Fr))return new Fr(t,n);Kt&&(e=Kt(new Error(void 0),Xe(e))),void 0!==n&&Q(e,"message",String(n));var r=[];return Lr(t,r.push,{that:r}),Q(e,"errors",r),e};Fr.prototype=Rt(Error.prototype,{constructor:$(5,Fr),message:$(5,""),name:$(5,"AggregateError")}),Z({global:!0},{AggregateError:Fr});var zr=v.Promise,qr=function(t,n,e){for(var r in n)e&&e.unsafe&&t[r]?t[r]=n[r]:Mn(t,r,n[r],e);return t},Yr=pn("species"),Hr=function(t){var n=nt(t),e=V.f;m&&n&&!n[Yr]&&e(n,Yr,{configurable:!0,get:function(){return this}})},Ur=function(t,n,e){if(!(t instanceof n))throw TypeError("Incorrect "+(e?e+" ":"")+"invocation");return t},Gr=pn("iterator"),Wr=!1;try{var Jr=0,Vr={next:function(){return{done:!!Jr++}},return:function(){Wr=!0}};Vr[Gr]=function(){return this},Array.from(Vr,(function(){throw 2}))}catch(t){}var Qr,Kr,Xr,Zr=function(t,n){if(!n&&!Wr)return!1;var e=!1;try{var r={};r[Gr]=function(){return{next:function(){return{done:e=!0}}}},t(r)}catch(t){}return e},to=pn("species"),no=function(t,n){var e,r=W(t).constructor;return void 0===r||null==(e=W(r)[to])?n:U(e)},eo=/(iphone|ipod|ipad).*applewebkit/i.test(mn),ro="process"==w(v.process),oo=v.location,io=v.setImmediate,uo=v.clearImmediate,ao=v.process,co=v.MessageChannel,fo=v.Dispatch,lo=0,so={},po="onreadystatechange",vo=function(t){if(so.hasOwnProperty(t)){var n=so[t];delete so[t],n()}},ho=function(t){return function(){vo(t)}},mo=function(t){vo(t.data)},yo=function(t){v.postMessage(t+"",oo.protocol+"//"+oo.host)};io&&uo||(io=function(t){for(var n=[],e=1;arguments.length>e;)n.push(arguments[e++]);return so[++lo]=function(){("function"==typeof t?t:Function(t)).apply(void 0,n)},Qr(lo),lo},uo=function(t){delete so[t]},ro?Qr=function(t){ao.nextTick(ho(t))}:fo&&fo.now?Qr=function(t){fo.now(ho(t))}:co&&!eo?(Xr=(Kr=new co).port2,Kr.port1.onmessage=mo,Qr=G(Xr.postMessage,Xr,1)):v.addEventListener&&"function"==typeof postMessage&&!v.importScripts&&oo&&"file:"!==oo.protocol&&!h(yo)?(Qr=yo,v.addEventListener("message",mo,!1)):Qr=po in B("script")?function(t){gt.appendChild(B("script")).onreadystatechange=function(){gt.removeChild(this),vo(t)}}:function(t){setTimeout(ho(t),0)});var go,_o,$o,bo,wo,xo,ko,Oo,So={set:io,clear:uo},Eo=/web0s(?!.*chrome)/i.test(mn),Ao=M.f,jo=So.set,To=v.MutationObserver||v.WebKitMutationObserver,Po=v.document,Ro=v.process,Bo=v.Promise,Io=Ao(v,"queueMicrotask"),Do=Io&&Io.value;Do||(go=function(){var t,n;for(ro&&(t=Ro.domain)&&t.exit();_o;){n=_o.fn,_o=_o.next;try{n()}catch(t){throw _o?bo():$o=void 0,t}}$o=void 0,t&&t.enter()},eo||ro||Eo||!To||!Po?Bo&&Bo.resolve?(ko=Bo.resolve(void 0),Oo=ko.then,bo=function(){Oo.call(ko,go)}):bo=ro?function(){Ro.nextTick(go)}:function(){jo.call(v,go)}:(wo=!0,xo=Po.createTextNode(""),new To(go).observe(xo,{characterData:!0}),bo=function(){xo.data=wo=!wo}));var Mo=Do||function(t){var n={fn:t,next:void 0};$o&&($o.next=n),_o||(_o=n,bo()),$o=n},Co=function(t){var n,e;this.promise=new t((function(t,r){if(void 0!==n||void 0!==e)throw TypeError("Bad Promise constructor");n=t,e=r})),this.resolve=U(n),this.reject=U(e)},No={f:function(t){return new Co(t)}},Lo=function(t,n){if(W(t),E(n)&&n.constructor===t)return n;var e=No.f(t);return(0,e.resolve)(n),e.promise},Fo=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},zo=So.set,qo=pn("species"),Yo="Promise",Ho=ce.get,Uo=ce.set,Go=ce.getterFor(Yo),Wo=zr,Jo=v.TypeError,Vo=v.document,Qo=v.process;nt("fetch");var Ko,Xo,Zo,ti=No.f,ni=ti,ei=!!(Vo&&Vo.createEvent&&v.dispatchEvent),ri="function"==typeof PromiseRejectionEvent,oi="unhandledrejection",ii=Y(Yo,(function(){if(!(Zn(Wo)!==String(Wo))){if(66===$n)return!0;if(!ro&&!ri)return!0}if(!Wo.prototype.finally)return!0;if($n>=51&&/native code/.test(Wo))return!1;var t=Wo.resolve(1),n=function(t){t((function(){}),(function(){}))};return(t.constructor={})[qo]=n,!(t.then((function(){}))instanceof n)})),ui=ii||!Zr((function(t){Wo.all(t).catch((function(){}))})),ai=function(t){var n;return!(!E(t)||"function"!=typeof(n=t.then))&&n},ci=function(t,n){if(!t.notified){t.notified=!0;var e=t.reactions;Mo((function(){for(var r=t.value,o=1==t.state,i=0;e.length>i;){var u,a,c,f=e[i++],l=o?f.ok:f.fail,s=f.resolve,d=f.reject,p=f.domain;try{l?(o||(2===t.rejection&&di(t),t.rejection=1),!0===l?u=r:(p&&p.enter(),u=l(r),p&&(p.exit(),c=!0)),u===f.promise?d(Jo("Promise-chain cycle")):(a=ai(u))?a.call(u,s,d):s(u)):d(r)}catch(t){p&&!c&&p.exit(),d(t)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&li(t)}))}},fi=function(t,n,e){var r,o;ei?((r=Vo.createEvent("Event")).promise=n,r.reason=e,r.initEvent(t,!1,!0),v.dispatchEvent(r)):r={promise:n,reason:e},!ri&&(o=v["on"+t])?o(r):t===oi&&function(t,n){var e=v.console;e&&e.error&&(1===arguments.length?e.error(t):e.error(t,n))}("Unhandled promise rejection",e)},li=function(t){zo.call(v,(function(){var n,e=t.facade,r=t.value;if(si(t)&&(n=Fo((function(){ro?Qo.emit("unhandledRejection",r,e):fi(oi,e,r)})),t.rejection=ro||si(t)?2:1,n.error))throw n.value}))},si=function(t){return 1!==t.rejection&&!t.parent},di=function(t){zo.call(v,(function(){var n=t.facade;ro?Qo.emit("rejectionHandled",n):fi("rejectionhandled",n,t.value)}))},pi=function(t,n,e){return function(r){t(n,r,e)}},vi=function(t,n,e){t.done||(t.done=!0,e&&(t=e),t.value=n,t.state=2,ci(t,!0))},hi=function(t,n,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===n)throw Jo("Promise can't be resolved itself");var r=ai(n);r?Mo((function(){var e={done:!1};try{r.call(n,pi(hi,e,t),pi(vi,e,t))}catch(n){vi(e,n,t)}})):(t.value=n,t.state=1,ci(t,!1))}catch(n){vi({done:!1},n,t)}}};ii&&(Wo=function(t){Ur(this,Wo,Yo),U(t),Ko.call(this);var n=Ho(this);try{t(pi(hi,n),pi(vi,n))}catch(t){vi(n,t)}},(Ko=function(t){Uo(this,{type:Yo,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=qr(Wo.prototype,{then:function(t,n){var e=Go(this),r=ti(no(this,Wo));return r.ok="function"!=typeof t||t,r.fail="function"==typeof n&&n,r.domain=ro?Qo.domain:void 0,e.parent=!0,e.reactions.push(r),0!=e.state&&ci(e,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),Xo=function(){var t=new Ko,n=Ho(t);this.promise=t,this.resolve=pi(hi,n),this.reject=pi(vi,n)},No.f=ti=function(t){return t===Wo||t===Zo?new Xo(t):ni(t)}),Z({global:!0,wrap:!0,forced:ii},{Promise:Wo}),Jn(Wo,Yo,!1,!0),Hr(Yo),Zo=nt(Yo),Z({target:Yo,stat:!0,forced:ii},{reject:function(t){var n=ti(this);return n.reject.call(void 0,t),n.promise}}),Z({target:Yo,stat:!0,forced:_t},{resolve:function(t){return Lo(this===Zo?Wo:this,t)}}),Z({target:Yo,stat:!0,forced:ui},{all:function(t){var n=this,e=ti(n),r=e.resolve,o=e.reject,i=Fo((function(){var e=U(n.resolve),i=[],u=0,a=1;Lr(t,(function(t){var c=u++,f=!1;i.push(void 0),a++,e.call(n,t).then((function(t){f||(f=!0,i[c]=t,--a||r(i))}),o)})),--a||r(i)}));return i.error&&o(i.value),e.promise},race:function(t){var n=this,e=ti(n),r=e.reject,o=Fo((function(){var o=U(n.resolve);Lr(t,(function(t){o.call(n,t).then(e.resolve,r)}))}));return o.error&&r(o.value),e.promise}}),Z({target:"Promise",stat:!0},{allSettled:function(t){var n=this,e=No.f(n),r=e.resolve,o=e.reject,i=Fo((function(){var e=U(n.resolve),o=[],i=0,u=1;Lr(t,(function(t){var a=i++,c=!1;o.push(void 0),u++,e.call(n,t).then((function(t){c||(c=!0,o[a]={status:"fulfilled",value:t},--u||r(o))}),(function(t){c||(c=!0,o[a]={status:"rejected",reason:t},--u||r(o))}))})),--u||r(o)}));return i.error&&o(i.value),e.promise}});var mi="No one promise resolved";Z({target:"Promise",stat:!0},{any:function(t){var n=this,e=No.f(n),r=e.resolve,o=e.reject,i=Fo((function(){var e=U(n.resolve),i=[],u=0,a=1,c=!1;Lr(t,(function(t){var f=u++,l=!1;i.push(void 0),a++,e.call(n,t).then((function(t){l||c||(c=!0,r(t))}),(function(t){l||c||(l=!0,i[f]=t,--a||o(new(nt("AggregateError"))(i,mi)))}))})),--a||o(new(nt("AggregateError"))(i,mi))}));return i.error&&o(i.value),e.promise}});var yi=!!zr&&h((function(){zr.prototype.finally.call({then:function(){}},(function(){}))}));Z({target:"Promise",proto:!0,real:!0,forced:yi},{finally:function(t){var n=no(this,nt("Promise")),e="function"==typeof t;return this.then(e?function(e){return Lo(n,t()).then((function(){return e}))}:t,e?function(e){return Lo(n,t()).then((function(){throw e}))}:t)}});var gi=H.Promise;Z({target:"Promise",stat:!0},{try:function(t){var n=No.f(this),e=Fo(t);return(e.error?n.reject:n.resolve)(e.value),n.promise}});var _i=gi;function $i(t,n,e,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void e(t)}a.done?n(c):_i.resolve(c).then(r,o)}Z({target:"Array",stat:!0},{isArray:on});var bi=H.Array.isArray,wi=bi;var xi=pn("iterator"),ki=function(t){var n=Object(t);return void 0!==n[xi]||"@@iterator"in n||rr.hasOwnProperty(Hn(n))},Oi=function(t){var n=Mr(t);if("function"!=typeof n)throw TypeError(String(t)+" is not iterable");return W(n.call(t))},Si=Oi;var Ei=Object.defineProperty,Ai={},ji=function(t){throw t},Ti=function(t,n){if(T(Ai,t))return Ai[t];n||(n={});var e=[][t],r=!!T(n,"ACCESSORS")&&n.ACCESSORS,o=T(n,0)?n[0]:ji,i=T(n,1)?n[1]:void 0;return Ai[t]=!!e&&!h((function(){if(r&&!m)return!0;var t={length:-1};r?Ei(t,1,{enumerable:!0,get:ji}):t[1]=1,e.call(t,o,i)}))},Pi=wn("slice"),Ri=Ti("slice",{ACCESSORS:!0,0:0,1:2}),Bi=pn("species"),Ii=[].slice,Di=Math.max;Z({target:"Array",proto:!0,forced:!Pi||!Ri},{slice:function(t,n){var e,r,o,i=S(this),u=ut(i.length),a=ft(t,u),c=ft(void 0===n?u:n,u);if(on(i)&&("function"!=typeof(e=i.constructor)||e!==Array&&!on(e.prototype)?E(e)&&null===(e=e[Bi])&&(e=void 0):e=void 0,e===Array||void 0===e))return Ii.call(i,a,c);for(r=new(void 0===e?Array:e)(Di(c-a,0)),o=0;a<c;a++,o++)a in i&&an(r,o,i[a]);return r.length=o,r}});var Mi=function(t){return H[t+"Prototype"]},Ci=Mi("Array").slice,Ni=Array.prototype,Li=function(t){var n=t.slice;return t===Ni||t instanceof Array&&n===Ni.slice?Ci:n},Fi=Li,zi=function(t,n,e,r){try{return r?n(W(e)[0],e[1]):n(e)}catch(n){throw Cr(t),n}},qi=!Zr((function(t){Array.from(t)}));Z({target:"Array",stat:!0,forced:qi},{from:function(t){var n,e,r,o,i,u,a=un(t),c="function"==typeof this?this:Array,f=arguments.length,l=f>1?arguments[1]:void 0,s=void 0!==l,d=Mr(a),p=0;if(s&&(l=G(l,f>2?arguments[2]:void 0,2)),null==d||c==Array&&Ir(d))for(e=new c(n=ut(a.length));n>p;p++)u=s?l(a[p],p):a[p],an(e,p,u);else for(i=(o=d.call(a)).next,e=new c;!(r=i.call(o)).done;p++)u=s?zi(o,l,[r.value,p],!0):r.value,an(e,p,u);return e.length=p,e}});var Yi=H.Array.from,Hi=Yi;function Ui(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function Gi(t,n){var e;if(t){if("string"==typeof t)return Ui(t,n);var r=Fi(e=Object.prototype.toString.call(t)).call(e,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Hi(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ui(t,n):void 0}}function Wi(t,n){return function(t){if(wi(t))return t}(t)||function(t,n){if(void 0!==Ge&&ki(Object(t))){var e=[],r=!0,o=!1,i=void 0;try{for(var u,a=Si(t);!(r=(u=a.next()).done)&&(e.push(u.value),!n||e.length!==n);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return e}}(t,n)||Gi(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ji=qe,Vi=Yt,Qi=Vt,Ki=jr,Xi=function(t,n){var e=[][t];return!!e&&h((function(){e.call(null,n||function(){throw 1},1)}))},Zi=se.forEach,tu=Xi("forEach"),nu=Ti("forEach"),eu=tu&&nu?[].forEach:function(t){return Zi(this,t,arguments.length>1?arguments[1]:void 0)};Z({target:"Array",proto:!0,forced:[].forEach!=eu},{forEach:eu});var ru=Mi("Array").forEach,ou=Array.prototype,iu={DOMTokenList:!0,NodeList:!0},uu=function(t){var n=t.forEach;return t===ou||t instanceof Array&&n===ou.forEach||iu.hasOwnProperty(Hn(t))?ru:n},au=Xt,cu=gi,fu=[].reverse,lu=[1,2];Z({target:"Array",proto:!0,forced:String(lu)===String(lu.reverse())},{reverse:function(){return on(this)&&(this.length=this.length),fu.call(this)}});var su=Mi("Array").reverse,du=Array.prototype,pu=function(t){var n=t.reverse;return t===du||t instanceof Array&&n===du.reverse?su:n},vu=Li,hu=s((function(t){var n=function(t){var n,e=Object.prototype,r=e.hasOwnProperty,o="function"==typeof Ji?Ji:{},i=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function c(t,n,e){return Vi(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[n]}try{c({},"")}catch(t){c=function(t,n,e){return t[n]=e}}function f(t,n,e,r){var o=n&&n.prototype instanceof m?n:m,i=Qi(o.prototype),u=new E(r||[]);return i._invoke=function(t,n,e){var r=s;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===v){if("throw"===o)throw i;return j()}for(e.method=o,e.arg=i;;){var u=e.delegate;if(u){var a=k(u,e);if(a){if(a===h)continue;return a}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(r===s)throw r=v,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);r=p;var c=l(t,n,e);if("normal"===c.type){if(r=e.done?v:d,c.arg===h)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(r=v,e.method="throw",e.arg=c.arg)}}}(t,e,u),i}function l(t,n,e){try{return{type:"normal",arg:t.call(n,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var s="suspendedStart",d="suspendedYield",p="executing",v="completed",h={};function m(){}function y(){}function g(){}var _={};_[i]=function(){return this};var $=Ki&&Ki(Ki(A([])));$&&$!==e&&r.call($,i)&&(_=$);var b=g.prototype=m.prototype=Qi(_);function w(t){var n;uu(n=["next","throw","return"]).call(n,(function(n){c(t,n,(function(t){return this._invoke(n,t)}))}))}function x(t,n){function e(o,i,u,a){var c=l(t[o],t,i);if("throw"!==c.type){var f=c.arg,s=f.value;return s&&"object"===Sr(s)&&r.call(s,"__await")?n.resolve(s.__await).then((function(t){e("next",t,u,a)}),(function(t){e("throw",t,u,a)})):n.resolve(s).then((function(t){f.value=t,u(f)}),(function(t){return e("throw",t,u,a)}))}a(c.arg)}var o;this._invoke=function(t,r){function i(){return new n((function(n,o){e(t,r,n,o)}))}return o=o?o.then(i,i):i()}}function k(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,k(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=l(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function O(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function S(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function E(t){this.tryEntries=[{tryLoc:"root"}],uu(t).call(t,O,this),this.reset(!0)}function A(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,u=function e(){for(;++o<t.length;)if(r.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=n,e.done=!0,e};return u.next=u}}return{next:j}}function j(){return{value:n,done:!0}}return y.prototype=b.constructor=g,g.constructor=y,y.displayName=c(g,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===y||"GeneratorFunction"===(n.displayName||n.name))},t.mark=function(t){return au?au(t,g):(t.__proto__=g,c(t,a,"GeneratorFunction")),t.prototype=Qi(b),t},t.awrap=function(t){return{__await:t}},w(x.prototype),x.prototype[u]=function(){return this},t.AsyncIterator=x,t.async=function(n,e,r,o,i){void 0===i&&(i=cu);var u=new x(f(n,e,r,o),i);return t.isGeneratorFunction(e)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},w(b),c(b,a,"Generator"),b[i]=function(){return this},b.toString=function(){return"[object Generator]"},t.keys=function(t){var n=[];for(var e in t)n.push(e);return pu(n).call(n),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=A,E.prototype={constructor:E,reset:function(t){var e;if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,uu(e=this.tryEntries).call(e,S),!t)for(var o in this)"t"===o.charAt(0)&&r.call(this,o)&&!isNaN(+vu(o).call(o,1))&&(this[o]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(r,o){return a.type="throw",a.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var u=this.tryEntries[i],a=u.completion;if("root"===u.tryLoc)return o("end");if(u.tryLoc<=this.prev){var c=r.call(u,"catchLoc"),f=r.call(u,"finallyLoc");if(c&&f){if(this.prev<u.catchLoc)return o(u.catchLoc,!0);if(this.prev<u.finallyLoc)return o(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return o(u.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return o(u.finallyLoc)}}}},abrupt:function(t,n){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=n&&n<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=t,u.arg=n,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(u)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),h},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),S(e),h}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var r=e.completion;if("throw"===r.type){var o=r.arg;S(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),h}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}})),mu=Mr,yu=bi;Z({target:"Reflect",stat:!0},{get:function t(n,e){var r,o,i=arguments.length<3?n:arguments[2];return W(n)===i?n[e]:(r=M.f(n,e))?T(r,"value")?r.value:void 0===r.get?void 0:r.get.call(i):E(o=Xe(n))?t(o,e,i):void 0}}),H.Reflect.get;var gu=M.f,_u=h((function(){gu(1)}));Z({target:"Object",stat:!0,forced:!m||_u,sham:!m},{getOwnPropertyDescriptor:function(t,n){return gu(S(t),n)}});var $u=s((function(t){var n=H.Object,e=t.exports=function(t,e){return n.getOwnPropertyDescriptor(t,e)};n.getOwnPropertyDescriptor.sham&&(e.sham=!0)})),bu=!h((function(){return Object.isExtensible(Object.preventExtensions({}))})),wu=s((function(t){var n=V.f,e=Ot("meta"),r=0,o=Object.isExtensible||function(){return!0},i=function(t){n(t,e,{value:{objectID:"O"+ ++r,weakData:{}}})},u=t.exports={REQUIRED:!1,fastKey:function(t,n){if(!E(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!T(t,e)){if(!o(t))return"F";if(!n)return"E";i(t)}return t[e].objectID},getWeakData:function(t,n){if(!T(t,e)){if(!o(t))return!0;if(!n)return!1;i(t)}return t[e].weakData},onFreeze:function(t){return bu&&u.REQUIRED&&o(t)&&!T(t,e)&&i(t),t}};dt[e]=!0})),xu=V.f,ku=se.forEach,Ou=ce.set,Su=ce.getterFor,Eu=function(t,n,e){var r,o=-1!==t.indexOf("Map"),i=-1!==t.indexOf("Weak"),u=o?"set":"add",a=v[t],c=a&&a.prototype,f={};if(m&&"function"==typeof a&&(i||c.forEach&&!h((function(){(new a).entries().next()})))){r=n((function(n,e){Ou(Ur(n,r,t),{type:t,collection:new a}),null!=e&&Lr(e,n[u],{that:n,AS_ENTRIES:o})}));var l=Su(t);ku(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var n="add"==t||"set"==t;!(t in c)||i&&"clear"==t||Q(r.prototype,t,(function(e,r){var o=l(this).collection;if(!n&&i&&!E(e))return"get"==t&&void 0;var u=o[t](0===e?0:e,r);return n?this:u}))})),i||xu(r.prototype,"size",{configurable:!0,get:function(){return l(this).collection.size}})}else r=e.getConstructor(n,t,o,u),wu.REQUIRED=!0;return Jn(r,t,!1,!0),f[t]=r,Z({global:!0,forced:!0},f),i||e.setStrong(r,t,o),r},Au=V.f,ju=wu.fastKey,Tu=ce.set,Pu=ce.getterFor,Ru={getConstructor:function(t,n,e,r){var o=t((function(t,i){Ur(t,o,n),Tu(t,{type:n,index:Rt(null),first:void 0,last:void 0,size:0}),m||(t.size=0),null!=i&&Lr(i,t[r],{that:t,AS_ENTRIES:e})})),i=Pu(n),u=function(t,n,e){var r,o,u=i(t),c=a(t,n);return c?c.value=e:(u.last=c={index:o=ju(n,!0),key:n,value:e,previous:r=u.last,next:void 0,removed:!1},u.first||(u.first=c),r&&(r.next=c),m?u.size++:t.size++,"F"!==o&&(u.index[o]=c)),t},a=function(t,n){var e,r=i(t),o=ju(n);if("F"!==o)return r.index[o];for(e=r.first;e;e=e.next)if(e.key==n)return e};return qr(o.prototype,{clear:function(){for(var t=i(this),n=t.index,e=t.first;e;)e.removed=!0,e.previous&&(e.previous=e.previous.next=void 0),delete n[e.index],e=e.next;t.first=t.last=void 0,m?t.size=0:this.size=0},delete:function(t){var n=this,e=i(n),r=a(n,t);if(r){var o=r.next,u=r.previous;delete e.index[r.index],r.removed=!0,u&&(u.next=o),o&&(o.previous=u),e.first==r&&(e.first=o),e.last==r&&(e.last=u),m?e.size--:n.size--}return!!r},forEach:function(t){for(var n,e=i(this),r=G(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.next:e.first;)for(r(n.value,n.key,this);n&&n.removed;)n=n.previous},has:function(t){return!!a(this,t)}}),qr(o.prototype,e?{get:function(t){var n=a(this,t);return n&&n.value},set:function(t,n){return u(this,0===t?0:t,n)}}:{add:function(t){return u(this,t=0===t?0:t,t)}}),m&&Au(o.prototype,"size",{get:function(){return i(this).size}}),o},setStrong:function(t,n,e){var r=n+" Iterator",o=Pu(n),i=Pu(r);pr(t,n,(function(t,n){Tu(this,{type:r,target:t,state:o(t),kind:n,last:void 0})}),(function(){for(var t=i(this),n=t.kind,e=t.last;e&&e.removed;)e=e.previous;return t.target&&(t.last=e=e?e.next:t.state.first)?"keys"==n?{value:e.key,done:!1}:"values"==n?{value:e.value,done:!1}:{value:[e.key,e.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),e?"entries":"values",!e,!0),Hr(n)}};Eu("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),Ru);var Bu=H.Map;Z({target:"Map",stat:!0},{from:function(t){var n,e,r,o,i=arguments.length,u=i>1?arguments[1]:void 0;return U(this),(n=void 0!==u)&&U(u),null==t?new this:(e=[],n?(r=0,o=G(u,i>2?arguments[2]:void 0,2),Lr(t,(function(t){e.push(o(t,r++))}))):Lr(t,e.push,{that:e}),new this(e))}});Z({target:"Map",stat:!0},{of:function(){for(var t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return new this(n)}});var Iu=function(){for(var t,n=W(this),e=U(n.delete),r=!0,o=0,i=arguments.length;o<i;o++)t=e.call(n,arguments[o]),r=r&&t;return!!r};Z({target:"Map",proto:!0,real:!0,forced:_t},{deleteAll:function(){return Iu.apply(this,arguments)}});Z({target:"Map",proto:!0,real:!0,forced:_t},{emplace:function(t,n){var e=W(this),r=e.has(t)&&"update"in n?n.update(e.get(t),t,e):n.insert(t,e);return e.set(t,r),r}});var Du=Oi;Z({target:"Map",proto:!0,real:!0,forced:_t},{every:function(t){var n=W(this),e=Du(n),r=G(t,arguments.length>1?arguments[1]:void 0,3);return!Lr(e,(function(t,e,o){if(!r(e,t,n))return o()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}}),Z({target:"Map",proto:!0,real:!0,forced:_t},{filter:function(t){var n=W(this),e=Du(n),r=G(t,arguments.length>1?arguments[1]:void 0,3),o=new(no(n,nt("Map"))),i=U(o.set);return Lr(e,(function(t,e){r(e,t,n)&&i.call(o,t,e)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}}),Z({target:"Map",proto:!0,real:!0,forced:_t},{find:function(t){var n=W(this),e=Du(n),r=G(t,arguments.length>1?arguments[1]:void 0,3);return Lr(e,(function(t,e,o){if(r(e,t,n))return o(e)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),Z({target:"Map",proto:!0,real:!0,forced:_t},{findKey:function(t){var n=W(this),e=Du(n),r=G(t,arguments.length>1?arguments[1]:void 0,3);return Lr(e,(function(t,e,o){if(r(e,t,n))return o(t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),Z({target:"Map",stat:!0},{groupBy:function(t,n){var e=new this;U(n);var r=U(e.has),o=U(e.get),i=U(e.set);return Lr(t,(function(t){var u=n(t);r.call(e,u)?o.call(e,u).push(t):i.call(e,u,[t])})),e}});Z({target:"Map",proto:!0,real:!0,forced:_t},{includes:function(t){return Lr(Du(W(this)),(function(n,e,r){if((o=e)===(i=t)||o!=o&&i!=i)return r();var o,i}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}}),Z({target:"Map",stat:!0},{keyBy:function(t,n){var e=new this;U(n);var r=U(e.set);return Lr(t,(function(t){r.call(e,n(t),t)})),e}}),Z({target:"Map",proto:!0,real:!0,forced:_t},{keyOf:function(t){return Lr(Du(W(this)),(function(n,e,r){if(e===t)return r(n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),Z({target:"Map",proto:!0,real:!0,forced:_t},{mapKeys:function(t){var n=W(this),e=Du(n),r=G(t,arguments.length>1?arguments[1]:void 0,3),o=new(no(n,nt("Map"))),i=U(o.set);return Lr(e,(function(t,e){i.call(o,r(e,t,n),e)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}}),Z({target:"Map",proto:!0,real:!0,forced:_t},{mapValues:function(t){var n=W(this),e=Du(n),r=G(t,arguments.length>1?arguments[1]:void 0,3),o=new(no(n,nt("Map"))),i=U(o.set);return Lr(e,(function(t,e){i.call(o,t,r(e,t,n))}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}}),Z({target:"Map",proto:!0,real:!0,forced:_t},{merge:function(t){for(var n=W(this),e=U(n.set),r=0;r<arguments.length;)Lr(arguments[r++],e,{that:n,AS_ENTRIES:!0});return n}}),Z({target:"Map",proto:!0,real:!0,forced:_t},{reduce:function(t){var n=W(this),e=Du(n),r=arguments.length<2,o=r?void 0:arguments[1];if(U(t),Lr(e,(function(e,i){r?(r=!1,o=i):o=t(o,i,e,n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),r)throw TypeError("Reduce of empty map with no initial value");return o}}),Z({target:"Map",proto:!0,real:!0,forced:_t},{some:function(t){var n=W(this),e=Du(n),r=G(t,arguments.length>1?arguments[1]:void 0,3);return Lr(e,(function(t,e,o){if(r(e,t,n))return o()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}}),Z({target:"Map",proto:!0,real:!0,forced:_t},{update:function(t,n){var e=W(this),r=arguments.length;U(n);var o=e.has(t);if(!o&&r<3)throw TypeError("Updating absent value");var i=o?e.get(t):U(r>2?arguments[2]:void 0)(t,e);return e.set(t,n(i,t,e)),e}});var Mu=function(t,n){var e,r=W(this),o=arguments.length>2?arguments[2]:void 0;if("function"!=typeof n&&"function"!=typeof o)throw TypeError("At least one callback required");return r.has(t)?(e=r.get(t),"function"==typeof n&&(e=n(e),r.set(t,e))):"function"==typeof o&&(e=o(),r.set(t,e)),e};Z({target:"Map",proto:!0,real:!0,forced:_t},{upsert:Mu}),Z({target:"Map",proto:!0,real:!0,forced:_t},{updateOrInsert:Mu});var Cu=st.indexOf,Nu=[].indexOf,Lu=!!Nu&&1/[1].indexOf(1,-0)<0,Fu=Xi("indexOf"),zu=Ti("indexOf",{ACCESSORS:!0,1:0});Z({target:"Array",proto:!0,forced:Lu||!Fu||!zu},{indexOf:function(t){return Lu?Nu.apply(this,arguments)||0:Cu(this,t,arguments.length>1?arguments[1]:void 0)}});var qu=Mi("Array").indexOf,Yu=Array.prototype,Hu=function(t){var n=t.indexOf;return t===Yu||t instanceof Array&&n===Yu.indexOf?qu:n},Uu=Hu;function Gu(t){return function(t){if(wi(t))return Ui(t)}(t)||function(t){if(void 0!==Ge&&ki(Object(t)))return Hi(t)}(t)||Gi(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}Z({target:"Function",proto:!0},{bind:Mt}),Mi("Function").bind;var Wu=h((function(){mt(1)}));Z({target:"Object",stat:!0,forced:Wu},{keys:function(t){return mt(un(t))}});var Ju=H.Object.keys,Vu=Ju;Eu("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),Ru);var Qu=H.Set,Ku=Mi("Array").concat,Xu=Array.prototype,Zu=function(t){var n=t.concat;return t===Xu||t instanceof Array&&n===Xu.concat?Ku:n};Z({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}});var ta=H.Date.now,na=Hu,ea=nt("Reflect","ownKeys")||function(t){var n=Tn.f(W(t)),e=Dn.f;return e?n.concat(e(t)):n};Z({target:"Object",stat:!0,sham:!m},{getOwnPropertyDescriptors:function(t){for(var n,e,r=S(t),o=M.f,i=ea(r),u={},a=0;i.length>a;)void 0!==(e=o(r,n=i[a++]))&&an(u,n,e);return u}});var ra=H.Object.getOwnPropertyDescriptors,oa=Yi,ia=wn("splice"),ua=Ti("splice",{ACCESSORS:!0,0:0,1:2}),aa=Math.max,ca=Math.min,fa=9007199254740991,la="Maximum allowed length exceeded";Z({target:"Array",proto:!0,forced:!ia||!ua},{splice:function(t,n){var e,r,o,i,u,a,c=un(this),f=ut(c.length),l=ft(t,f),s=arguments.length;if(0===s?e=r=0:1===s?(e=0,r=f-l):(e=s-2,r=ca(aa(ot(n),0),f-l)),f+e-r>fa)throw TypeError(la);for(o=hn(c,r),i=0;i<r;i++)(u=l+i)in c&&an(o,i,c[u]);if(o.length=r,e<r){for(i=l;i<f-r;i++)a=i+e,(u=i+r)in c?c[a]=c[u]:delete c[a];for(i=f;i>f-r+e;i--)delete c[i-1]}else if(e>r)for(i=f-r;i>l;i--)a=i+e-1,(u=i+r-1)in c?c[a]=c[u]:delete c[a];for(i=0;i<e;i++)c[i+l]=arguments[i+2];return c.length=f-r+e,o}});var sa=Mi("Array").splice,da=Array.prototype,pa=function(t){var n=t.splice;return t===da||t instanceof Array&&n===da.splice?sa:n},va=se.map,ha=wn("map"),ma=Ti("map");Z({target:"Array",proto:!0,forced:!ha||!ma},{map:function(t){return va(this,t,arguments.length>1?arguments[1]:void 0)}});var ya=Mi("Array").map,ga=Array.prototype,_a=function(t){var n=t.map;return t===ga||t instanceof Array&&n===ga.map?ya:n},$a=se.filter,ba=wn("filter"),wa=Ti("filter");Z({target:"Array",proto:!0,forced:!ba||!wa},{filter:function(t){return $a(this,t,arguments.length>1?arguments[1]:void 0)}});var xa=Mi("Array").filter,ka=Array.prototype,Oa=function(t){var n=t.filter;return t===ka||t instanceof Array&&n===ka.filter?xa:n},Sa=Bu,Ea=Object.assign,Aa=Object.defineProperty,ja=!Ea||h((function(){if(m&&1!==Ea({b:1},Ea(Aa({},"a",{enumerable:!0,get:function(){Aa(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},n={},e=Symbol(),r="abcdefghijklmnopqrst";return t[e]=7,r.split("").forEach((function(t){n[t]=t})),7!=Ea({},t)[e]||mt(Ea({},n)).join("")!=r}))?function(t,n){for(var e=un(t),r=arguments.length,o=1,i=Dn.f,u=_.f;r>o;)for(var a,c=k(arguments[o++]),f=i?mt(c).concat(i(c)):mt(c),l=f.length,s=0;l>s;)a=f[s++],m&&!u.call(c,a)||(e[a]=c[a]);return e}:Ea;Z({target:"Object",stat:!0,forced:Object.assign!==ja},{assign:ja}),H.Object.assign;var Ta=nt("JSON","stringify"),Pa=/[\uD800-\uDFFF]/g,Ra=/^[\uD800-\uDBFF]$/,Ba=/^[\uDC00-\uDFFF]$/,Ia=function(t,n,e){var r=e.charAt(n-1),o=e.charAt(n+1);return Ra.test(t)&&!Ba.test(o)||Ba.test(t)&&!Ra.test(r)?"\\u"+t.charCodeAt(0).toString(16):t},Da=h((function(){return'"\\udf06\\ud834"'!==Ta("\udf06\ud834")||'"\\udead"'!==Ta("\udead")}));Ta&&Z({target:"JSON",stat:!0,forced:Da},{stringify:function(t,n,e){var r=Ta.apply(null,arguments);return"string"==typeof r?r.replace(Pa,Ia):r}}),H.JSON||(H.JSON={stringify:JSON.stringify});var Ma=function(t,n,e){return H.JSON.stringify.apply(null,arguments)};Z({target:"Array",proto:!0},{fill:function(t){for(var n=un(this),e=ut(n.length),r=arguments.length,o=ft(r>1?arguments[1]:void 0,e),i=r>2?arguments[2]:void 0,u=void 0===i?e:ft(i,e);u>o;)n[o++]=t;return n}});var Ca=Mi("Array").fill,Na=Array.prototype,La=function(t){var n=t.fill;return t===Na||t instanceof Array&&n===Na.fill?Ca:n};function Fa(){}var za=function(t){return t};function qa(t,n){for(var e in n)t[e]=n[e];return t}function Ya(t){return t()}function Ha(){return Qi(null)}function Ua(t){uu(t).call(t,Ya)}function Ga(t){return"function"==typeof t}function Wa(t,n){return t!=t?n==n:t!==n||t&&"object"===Sr(t)||"function"==typeof t}function Ja(t){if(null==t)return Fa;for(var n=arguments.length,e=new Array(n>1?n-1:0),r=1;r<n;r++)e[r-1]=arguments[r];var o=t.subscribe.apply(t,e);return o.unsubscribe?function(){return o.unsubscribe()}:o}function Va(t,n,e){t.$$.on_destroy.push(Ja(n,e))}function Qa(t,n,e,r){if(t){var o=Ka(t,n,e,r);return t[0](o)}}function Ka(t,n,e,r){var o;return t[1]&&r?qa(vu(o=e.ctx).call(o),t[1](r(n))):e.ctx}function Xa(t,n,e,r,o,i,u){var a=function(t,n,e,r){if(t[2]&&r){var o=t[2](r(e));if(void 0===n.dirty)return o;if("object"===Sr(o)){for(var i=[],u=Math.max(n.dirty.length,o.length),a=0;a<u;a+=1)i[a]=n.dirty[a]|o[a];return i}return n.dirty|o}return n.dirty}(n,r,o,i);if(a){var c=Ka(n,e,r,u);t.p(c,a)}}function Za(t,n){var e={};for(var r in n=new Qu(n),t)n.has(r)||"$"===r[0]||(e[r]=t[r]);return e}function tc(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;return t.set(e),n}function nc(t){return t&&Ga(t.destroy)?t.destroy:Fa}var ec="undefined"!=typeof window,rc=ec?function(){return window.performance.now()}:function(){return ta()},oc=ec?function(t){return requestAnimationFrame(t)}:Fa,ic=new Qu;function uc(t){uu(ic).call(ic,(function(n){n.c(t)||(ic.delete(n),n.f())})),0!==ic.size&&oc(uc)}function ac(t,n){t.appendChild(n)}function cc(t,n,e){t.insertBefore(n,e||null)}function fc(t){t.parentNode.removeChild(t)}function lc(t,n){for(var e=0;e<t.length;e+=1)t[e]&&t[e].d(n)}function sc(t){return document.createElement(t)}function dc(t){return document.createTextNode(t)}function pc(){return dc(" ")}function vc(){return dc("")}function hc(t,n,e,r){return t.addEventListener(n,e,r),function(){return t.removeEventListener(n,e,r)}}function mc(t){return function(n){return n.preventDefault(),t.call(this,n)}}function yc(t,n,e){null==e?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function gc(t,n){var e=ra(t.__proto__);for(var r in n)null==n[r]?t.removeAttribute(r):"style"===r?t.style.cssText=n[r]:"__value"===r?t.value=t[r]=n[r]:e[r]&&e[r].set?t[r]=n[r]:yc(t,r,n[r])}function _c(t,n,e){for(var r=new Qu,o=0;o<t.length;o+=1)t[o].checked&&r.add(t[o].__value);return e||r.delete(n),oa(r)}function $c(t){return""===t?null:+t}function bc(t){return oa(t.childNodes)}function wc(t,n){n=""+n,t.wholeText!==n&&(t.data=n)}function xc(t,n){t.value=null==n?"":n}function kc(t,n,e,r){t.style.setProperty(n,e,r?"important":"")}function Oc(t,n){for(var e=0;e<t.options.length;e+=1){var r=t.options[e];if(r.__value===n)return void(r.selected=!0)}}function Sc(t){var n=t.querySelector(":checked")||t.options[0];return n&&n.__value}function Ec(t,n,e){t.classList[e?"add":"remove"](n)}function Ac(t,n){var e=document.createEvent("CustomEvent");return e.initCustomEvent(t,!1,!1,n),e}var jc,Tc=new Qu,Pc=0;function Rc(t){for(var n=5381,e=t.length;e--;)n=(n<<5)-n^t.charCodeAt(e);return n>>>0}function Bc(t,n,e,r,o,i,u){for(var a,c,f,l,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,d=16.666/r,p="{\n",v=0;v<=1;v+=d){var h=n+(e-n)*i(v);p+=100*v+"%{".concat(u(h,1-h),"}\n")}var m=p+"100% {".concat(u(e,1-e),"}\n}"),y=Zu(a="__svelte_".concat(Rc(m),"_")).call(a,s),g=t.ownerDocument;Tc.add(g);var _,$=g.__svelte_stylesheet||(g.__svelte_stylesheet=g.head.appendChild(sc("style")).sheet),b=g.__svelte_rules||(g.__svelte_rules={});b[y]||(b[y]=!0,$.insertRule(Zu(_="@keyframes ".concat(y," ")).call(_,m),$.cssRules.length));var w=t.style.animation||"";return t.style.animation=Zu(c=Zu(f=Zu(l="".concat(w?"".concat(w,", "):"")).call(l,y," ")).call(f,r,"ms linear ")).call(c,o,"ms 1 both"),Pc+=1,y}function Ic(t,n){var e=(t.style.animation||"").split(", "),r=Oa(e).call(e,n?function(t){return na(t).call(t,n)<0}:function(t){return-1===na(t).call(t,"__svelte")}),o=e.length-r.length;o&&(t.style.animation=r.join(", "),(Pc-=o)||oc((function(){Pc||(uu(Tc).call(Tc,(function(t){for(var n=t.__svelte_stylesheet,e=n.cssRules.length;e--;)n.deleteRule(e);t.__svelte_rules={}})),Tc.clear())})))}function Dc(t){jc=t}function Mc(){if(!jc)throw new Error("Function called outside component initialization");return jc}function Cc(t){Mc().$$.on_mount.push(t)}var Nc=[],Lc=[],Fc=[],zc=[],qc=cu.resolve(),Yc=!1;function Hc(){Yc||(Yc=!0,qc.then(Kc))}function Uc(){return Hc(),qc}function Gc(t){Fc.push(t)}function Wc(t){zc.push(t)}var Jc,Vc=!1,Qc=new Qu;function Kc(){if(!Vc){Vc=!0;do{for(var t=0;t<Nc.length;t+=1){var n=Nc[t];Dc(n),Xc(n.$$)}for(Dc(null),Nc.length=0;Lc.length;)Lc.pop()();for(var e=0;e<Fc.length;e+=1){var r=Fc[e];Qc.has(r)||(Qc.add(r),r())}Fc.length=0}while(Nc.length);for(;zc.length;)zc.pop()();Yc=!1,Vc=!1,Qc.clear()}}function Xc(t){if(null!==t.fragment){var n;t.update(),Ua(t.before_update);var e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),uu(n=t.after_update).call(n,Gc)}}function Zc(t,n,e){var r;t.dispatchEvent(Ac(Zu(r="".concat(n?"intro":"outro")).call(r,e)))}var tf,nf=new Qu;function ef(){tf={r:0,c:[],p:tf}}function rf(){tf.r||Ua(tf.c),tf=tf.p}function of(t,n){t&&t.i&&(nf.delete(t),t.i(n))}function uf(t,n,e,r){if(t&&t.o){if(nf.has(t))return;nf.add(t),tf.c.push((function(){nf.delete(t),r&&(e&&t.d(1),r())})),t.o(n)}}var af={duration:0};function cf(t,n,e,r){var o=n(t,e),i=r?0:1,u=null,a=null,c=null;function f(){c&&Ic(t,c)}function l(t,n){var e=t.b-i;return n*=Math.abs(e),{a:i,b:t.b,d:e,duration:n,start:t.start,end:t.start+n,group:t.group}}function s(n){var e=o||af,r=e.delay,s=void 0===r?0:r,d=e.duration,p=void 0===d?300:d,v=e.easing,h=void 0===v?za:v,m=e.tick,y=void 0===m?Fa:m,g=e.css,_={start:rc()+s,b:n};n||(_.group=tf,tf.r+=1),u||a?a=_:(g&&(f(),c=Bc(t,i,n,p,s,h,g)),n&&y(0,1),u=l(_,p),Gc((function(){return Zc(t,n,"start")})),function(t){var n;0===ic.size&&oc(uc),new cu((function(e){ic.add(n={c:t,f:e})}))}((function(n){if(a&&n>a.start&&(u=l(a,p),a=null,Zc(t,u.b,"start"),g&&(f(),c=Bc(t,i,u.b,u.duration,0,h,o.css))),u)if(n>=u.end)y(i=u.b,1-i),Zc(t,u.b,"end"),a||(u.b?f():--u.group.r||Ua(u.group.c)),u=null;else if(n>=u.start){var e=n-u.start;i=u.a+u.d*h(e/u.duration),y(i,1-i)}return!(!u&&!a)})))}return{run:function(t){Ga(o)?(Jc||(Jc=cu.resolve()).then((function(){Jc=null})),Jc).then((function(){o=o(),s(t)})):s(t)},end:function(){f(),u=a=null}}}function ff(t,n,e){var r=t.$$.props[n];void 0!==r&&(t.$$.bound[r]=e,e(t.$$.ctx[r]))}function lf(t){t&&t.c()}function sf(t,n,e,r){var o=t.$$,i=o.fragment,u=o.on_mount,a=o.on_destroy,c=o.after_update;i&&i.m(n,e),r||Gc((function(){var n,e=Oa(n=_a(u).call(u,Ya)).call(n,Ga);a?a.push.apply(a,Gu(e)):Ua(e),t.$$.on_mount=[]})),uu(c).call(c,Gc)}function df(t,n){var e=t.$$;null!==e.fragment&&(Ua(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function pf(t,n){var e;-1===t.$$.dirty[0]&&(Nc.push(t),Hc(),La(e=t.$$.dirty).call(e,0));t.$$.dirty[n/31|0]|=1<<n%31}function vf(t,n,e,r,o,i){var u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[-1],a=jc;Dc(t);var c=t.$$={fragment:null,ctx:null,props:i,update:Fa,not_equal:o,bound:Ha(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Sa(a?a.$$.context:[]),callbacks:Ha(),dirty:u,skip_bound:!1},f=!1;if(c.ctx=e?e(t,n.props||{},(function(n,e){var r=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:e;return c.ctx&&o(c.ctx[n],c.ctx[n]=r)&&(!c.skip_bound&&c.bound[n]&&c.bound[n](r),f&&pf(t,n)),e})):[],c.update(),f=!0,Ua(c.before_update),c.fragment=!!r&&r(c.ctx),n.target){if(n.hydrate){var l=bc(n.target);c.fragment&&c.fragment.l(l),uu(l).call(l,fc)}else c.fragment&&c.fragment.c();n.intro&&of(t.$$.fragment),sf(t,n.target,n.anchor,n.customElement),Kc()}Dc(a)}new Qu(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]);var hf=function(){function t(){qt(this,t)}return Gt(t,[{key:"$destroy",value:function(){df(this,1),this.$destroy=Fa}},{key:"$on",value:function(t,n){var e=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return e.push(n),function(){var t=na(e).call(e,n);-1!==t&&pa(e).call(e,t,1)}}},{key:"$set",value:function(t){this.$$set&&0!==Vu(t).length&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}]),t}(),mf=H.Object.getOwnPropertySymbols,yf=mf,gf=$u;Z({target:"Object",stat:!0,forced:!m,sham:!m},{defineProperties:yt});var _f=s((function(t){var n=H.Object,e=t.exports=function(t,e){return n.defineProperties(t,e)};n.defineProperties.sham&&(e.sham=!0)}));function $f(t,n,e){return n in t?Ht(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var bf=[];function wf(t){var n,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fa,r=[];function o(e){if(Wa(t,e)&&(t=e,n)){for(var o=!bf.length,i=0;i<r.length;i+=1){var u=r[i];u[1](),bf.push(u,t)}if(o){for(var a=0;a<bf.length;a+=2)bf[a][0](bf[a+1]);bf.length=0}}}function i(n){o(n(t))}function u(i){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fa,a=[i,u];return r.push(a),1===r.length&&(n=e(o)||Fa),i(t),function(){var t=na(r).call(r,a);-1!==t&&pa(r).call(r,t,1),0===r.length&&(n(),n=null)}}return{set:o,update:i,subscribe:u}}function xf(t,n,e){var r=!yu(t),o=r?[t]:t,i=n.length<2;return{subscribe:wf(e,(function(t){var e=!1,u=[],a=0,c=Fa,f=function(){if(!a){c();var e=n(r?u[0]:u,t);i?t(e):c=Ga(e)?e:Fa}},l=_a(o).call(o,(function(t,n){return Ja(t,(function(t){u[n]=t,a&=~(1<<n),e&&f()}),(function(){a|=1<<n}))}));return e=!0,f(),function(){Ua(l),c()}})).subscribe}}function kf(t,n){var e=Vu(t);if(yf){var r=yf(t);n&&(r=Oa(r).call(r,(function(n){return gf(t,n).enumerable}))),e.push.apply(e,r)}return e}function Of(t){for(var n=1;n<arguments.length;n++){var e,r=null!=arguments[n]?arguments[n]:{};if(n%2)uu(e=kf(Object(r),!0)).call(e,(function(n){$f(t,n,r[n])}));else if(ra)_f(t,ra(r));else{var o;uu(o=kf(Object(r))).call(o,(function(n){Vi(t,n,gf(r,n))}))}}return t}function Sf(t,n,e){var r=e,o=!1,i=n.length<2,u=xf(t,(function(t,e){return o=!0,i?(r=n(t,e),e(r)):n(t,(function(t){r=t,e(t)})),function(){o=!1}}),e);return Of(Of({},u),{},{get:function(){return o?r:function(t){var n;return Ja(t,(function(t){return n=t}))(),n}(u)}})}var Ef=mf,Af=Ju;function jf(t,n){if(null==t)return{};var e,r,o=function(t,n){if(null==t)return{};var e,r,o={},i=Af(t);for(r=0;r<i.length;r++)e=i[r],Uu(n).call(n,e)>=0||(o[e]=t[e]);return o}(t,n);if(Ef){var i=Ef(t);for(r=0;r<i.length;r++)e=i[r],Uu(n).call(n,e)>=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(o[e]=t[e])}return o}function Tf(t,n){var e=Vu(t);if(yf){var r=yf(t);n&&(r=Oa(r).call(r,(function(n){return gf(t,n).enumerable}))),e.push.apply(e,r)}return e}function Pf(t,n){var e=t,r=wf(t,n),o=r.set;return function(t){for(var n=1;n<arguments.length;n++){var e,r=null!=arguments[n]?arguments[n]:{};if(n%2)uu(e=Tf(Object(r),!0)).call(e,(function(n){$f(t,n,r[n])}));else if(ra)_f(t,ra(r));else{var o;uu(o=Tf(Object(r))).call(o,(function(n){Vi(t,n,gf(r,n))}))}}return t}({set:function(t){e=t,o(t)},get:function(){return e}},jf(r,["set"]))}var Rf=Pf({staff:[],start_time:[],end_time:[],time_interval:900,customers:[],customers_loaded:void 0,week_days:[],customer_gr_def_app_status:[],extras_consider_duration:void 0,extras_multiply_nop:void 0}),Bf=[].slice,If=/MSIE .\./.test(mn),Df=function(t){return function(n,e){var r=arguments.length>2,o=r?Bf.call(arguments,2):void 0;return t(r?function(){("function"==typeof n?n:Function(n)).apply(this,o)}:n,e)}};Z({global:!0,bind:!0,forced:If},{setTimeout:Df(v.setTimeout),setInterval:Df(v.setInterval)});var Mf=H.setTimeout,Cf=se.every,Nf=Xi("every"),Lf=Ti("every");Z({target:"Array",proto:!0,forced:!Nf||!Lf},{every:function(t){return Cf(this,t,arguments.length>1?arguments[1]:void 0)}});var Ff=Mi("Array").every,zf=Array.prototype,qf=function(t){var n=t.every;return t===zf||t instanceof Array&&n===zf.every?Ff:n},Yf="\t\n\v\f\r                 \u2028\u2029\ufeff",Hf="["+Yf+"]",Uf=RegExp("^"+Hf+Hf+"*"),Gf=RegExp(Hf+Hf+"*$"),Wf=function(t){return function(n){var e=String(O(n));return 1&t&&(e=e.replace(Uf,"")),2&t&&(e=e.replace(Gf,"")),e}},Jf={start:Wf(1),end:Wf(2),trim:Wf(3)},Vf=Jf.trim,Qf=v.parseInt,Kf=/^[+-]?0[Xx]/,Xf=8!==Qf(Yf+"08")||22!==Qf(Yf+"0x16")?function(t,n){var e=Vf(String(t));return Qf(e,n>>>0||(Kf.test(e)?16:10))}:Qf;Z({global:!0,forced:parseInt!=Xf},{parseInt:Xf});var Zf=H.parseInt,tl=[],nl=tl.sort,el=h((function(){tl.sort(void 0)})),rl=h((function(){tl.sort(null)})),ol=Xi("sort");Z({target:"Array",proto:!0,forced:el||!rl||!ol},{sort:function(t){return void 0===t?nl.call(un(this)):nl.call(un(this),U(t))}});var il=Mi("Array").sort,ul=Array.prototype,al=function(t){var n=t.sort;return t===ul||t instanceof Array&&n===ul.sort?il:n},cl=se.find,fl="find",ll=!0,sl=Ti(fl);fl in[]&&Array(1).find((function(){ll=!1})),Z({target:"Array",proto:!0,forced:ll||!sl},{find:function(t){return cl(this,t,arguments.length>1?arguments[1]:void 0)}});var dl=Mi("Array").find,pl=Array.prototype,vl=function(t){var n=t.find;return t===pl||t instanceof Array&&n===pl.find?dl:n},hl=st.includes,ml=Ti("indexOf",{ACCESSORS:!0,1:0});Z({target:"Array",proto:!0,forced:!ml},{includes:function(t){return hl(this,t,arguments.length>1?arguments[1]:void 0)}});var yl=Mi("Array").includes,gl=pn("match"),_l=function(t){if(function(t){var n;return E(t)&&(void 0!==(n=t[gl])?!!n:"RegExp"==w(t))}(t))throw TypeError("The method doesn't accept regular expressions");return t},$l=pn("match");Z({target:"String",proto:!0,forced:!function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[$l]=!1,"/./"[t](n)}catch(t){}}return!1}("includes")},{includes:function(t){return!!~String(O(this)).indexOf(_l(t),arguments.length>1?arguments[1]:void 0)}});var bl=Mi("String").includes,wl=Array.prototype,xl=String.prototype,kl=function(t){var n=t.includes;return t===wl||t instanceof Array&&n===wl.includes?yl:"string"==typeof t||t===xl||t instanceof String&&n===xl.includes?bl:n};function Ol(t,n){return vl(n).call(n,(function(n){return n.id===t}))||null}function Sl(t){for(var n,e=arguments.length,r=new Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];return u.default.extend.apply(u.default,Zu(n=[{},t]).call(n,r))}function El(t){for(var n,e=arguments.length,r=new Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];return u.default.extend.apply(u.default,Zu(n=[!0,{},t]).call(n,r))}function Al(t){var n;return kl(n=BooklyL10nGlobal.addons).call(n,t)}var jl=BooklyL10nGlobal.csrf_token;function Tl(t,n){var e;if(void 0===Ji||null==mu(t)){if(yu(t)||(e=function(t,n){var e;if(!t)return;if("string"==typeof t)return Pl(t,n);var r=vu(e=Object.prototype.toString.call(t)).call(e,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return oa(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Pl(t,n)}(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,a=!1;return{s:function(){e=Si(t)},n:function(){var t=e.next();return u=t.done,t},e:function(t){a=!0,i=t},f:function(){try{u||null==e.return||e.return()}finally{if(a)throw i}}}}function Pl(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var Rl=c.default;function Bl(t,n){var e,r={items:[],groups:[]},o=Tl(t);try{var i=function(){var t=e.value;if(t[n]){var o,i=vl(o=r.groups).call(o,(function(e){return e.label===t[n]}));i||(i={label:t[n],items:[]},r.groups.push(i)),i.items.push(t)}else r.items.push(t)};for(o.s();!(e=o.n()).done;)i()}catch(t){o.e(t)}finally{o.f()}return r}function Il(t,n){var e=Vu(t);if(yf){var r=yf(t);n&&(r=Oa(r).call(r,(function(n){return gf(t,n).enumerable}))),e.push.apply(e,r)}return e}function Dl(t){for(var n=1;n<arguments.length;n++){var e,r=null!=arguments[n]?arguments[n]:{};if(n%2)uu(e=Il(Object(r),!0)).call(e,(function(n){$f(t,n,r[n])}));else if(ra)_f(t,ra(r));else{var o;uu(o=Il(Object(r))).call(o,(function(n){Vi(t,n,gf(r,n))}))}}return t}function Ml(t,n){var e=El({value:t}),r=Pf(t,n);return Dl(Dl({},r),{},{reset:function(){return r.set(El(e).value)}})}var Cl=Ml(null),Nl=Ml(null),Ll=Ml(""),Fl=Ml(0),zl=Ml({url:null,copied:!1}),ql=Ml(null),Yl=Ml(!1),Hl=Ml(null),Ul=Ml(null),Gl=Ml(null),Wl=Ml(null),Jl=Ml(null),Vl=Ml(!1),Ql=Ml(!1),Kl=Ml(!1),Xl=Ml(null),Zl=Ml({until:null,type:"daily",monthly:{on:"day",day:null,weekday:null},daily:{every:1},weekly:{on:[]}}),ts=Ml([]),ns=Ml(""),es=Pf(null),rs=Ml({customers_appointments_limit:!1,date_interval_not_available:!1,date_interval_warning:!1,interval_not_in_service_schedule:!1,interval_not_in_staff_schedule:!1,overflow_capacity:!1,service_required:!1,provider_required:!1,staff_reaches_working_time_limit:!1,custom_service_name_required:!1,no_timeslots_available:!1}),os=Ml("main"),is=Pf(!1);function us(t,n){var e;if(void 0===Ji||null==mu(t)){if(yu(t)||(e=function(t,n){var e;if(!t)return;if("string"==typeof t)return as(t,n);var r=vu(e=Object.prototype.toString.call(t)).call(e,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return oa(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return as(t,n)}(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,a=!1;return{s:function(){e=Si(t)},n:function(){var t=e.next();return u=t.done,t},e:function(t){a=!0,i=t},f:function(){try{u||null==e.return||e.return()}finally{if(a)throw i}}}}function as(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function cs(t){var n=Rf.get();t.custom_fields=[],t.extras=[],t.extras_consider_duration=n.extras_consider_duration,t.extras_multiply_nop=n.extras_multiply_nop,t.number_of_persons=Nl.get()?Math.max($s.get().min-ls(ts.get()),1):1,t.notes=null,t.collaborative_token=null,t.collaborative_service=null,t.compound_token=null,t.compound_service=null,t.payment_action=null,t.payment_id=null,t.payment_type=null,t.payment_title=null,t.payment_price=null,t.payment_tax=null,t.package_id=null,t.series_id=null,t.ca_id=null,t.status=n.customer_gr_def_app_status[t.group_id||0]}function fs(t){var n,e=0,r=us(t);try{for(r.s();!(n=r.n()).done;){e+=n.value.number_of_persons}}catch(t){r.e(t)}finally{r.f()}return e}function ls(t,n){var e,r=0,o=us(t);try{for(o.s();!(e=o.n()).done;){var i,u=e.value;n&&u.id===n.id||kl(i=Rl.freeStatuses).call(i,u.status)||(r+=u.number_of_persons)}}catch(t){o.e(t)}finally{o.f()}return r}function ss(t){var n,e=[];return uu(n=ts.get()).call(n,(function(n){var r={id:n.id,ca_id:n.ca_id,custom_fields:n.custom_fields,extras:n.extras,extras_multiply_nop:n.extras_multiply_nop,extras_consider_duration:n.extras_consider_duration,number_of_persons:n.number_of_persons,timezone:n.timezone,status:n.status};t||(r.series_id=n.series_id,r.notes=n.notes,r.payment_id=n.payment_id,r.payment_action=n.payment_action||"",r.payment_price=n.payment_price,r.payment_tax=n.payment_tax),e.push(r)})),Ma(e)}function ds(t){var n=t.full_name;return""===t.email&&""===t.phone||(n+=" (",""!==t.email&&(n+=t.email,""!==t.phone&&(n+=", ")),""!==t.phone&&(n+=t.phone),n+=")"),n}var ps=Ml(null),vs=Ml({id:null,startDate:null,startTime:null,endTime:null}),hs=Pf((function(){}));function ms(t,n){var e;if(void 0===Ji||null==mu(t)){if(yu(t)||(e=function(t,n){var e;if(!t)return;if("string"==typeof t)return ys(t,n);var r=vu(e=Object.prototype.toString.call(t)).call(e,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return oa(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ys(t,n)}(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,a=!1;return{s:function(){e=Si(t)},n:function(){var t=e.next();return u=t.done,t},e:function(t){a=!0,i=t},f:function(){try{u||null==e.return||e.return()}finally{if(a)throw i}}}}function ys(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var gs=null,_s=null,$s=Sf([Cl,Nl,ql],(function(t){var n=Wi(t,3),e=n[0],r=n[1],o=n[2],i={min:1,max:1};if(e&&r)for(var u=0,a=o?[o.id,0]:[0];u<a.length;u++){var c=a[u];if(c in r.locations){i.min=r.locations[c].capacity_min,i.max=r.locations[c].capacity_max;break}}return i})),bs=Sf([Rf,vs,Nl,Cl,ts,ql,Hl],(function(t,n){var e=Wi(t,7),r=e[0],o=e[1],i=e[2],a=e[3],c=e[4],f=e[5],l=e[6];if(!Rl.appropriate_slots||i&&null===i.id){var s,d;Vl.set(!1);var p=i&&i.hasOwnProperty("custom_time_slots")?vu(s=i.custom_time_slots.start_time).call(s):vu(d=r.start_time).call(d);o.startTime&&qf(p).call(p,(function(t){return t.value!==o.startTime.value}))&&(p.push(o.startTime),xs(p)),n(p)}else i&&l&&a?(null!==_s&&(clearTimeout(_s),_s=null),_s=Mf((function(){null!==gs&&(gs.abort(),gs=null),Vl.set(!0);var t={action:"bookly_get_day_schedule",csrf_token:jl,appointment_id:vs.get().id,staff_id:a.id,location_id:f?f.id:null,service_id:i.id,date:l.format("DD-MM-YYYY"),nop:Math.max(ls(c),$s.get().min)};gs=u.default.post(ajaxurl,t,(function(t){var e=rs.get();t.data.start&&t.data.start.length>0?(e.no_timeslots_available=!1,Vl.set(!1),i.custom_time_slots=[],i.custom_time_slots.end_time=t.data.end,n(t.data.start)):e.no_timeslots_available=!0,rs.set(e)}),"json")}),10)):(Vl.set(!0),n([]))})),ws=Sf([Rf,Ul,vs,Nl,bs],(function(t){var n=Wi(t,5),e=n[0],r=n[1],o=n[2],i=n[3],u=n[4],c=[];if(r&&u)if(i&&i.units_max>1)for(var f=a.default(r,"HH:mm"),l=i.units_min;l<=i.units_max;++l){var s,d=f.clone().add(l*i.duration,"seconds"),p=Math.floor(d.diff(a.default("00:00","HH:mm"))/3600/1e3),v=ms(e.end_time);try{for(v.s();!(s=v.n()).done;){var h=s.value;h.value===(p<10?"0"+p:p)+":"+d.format("mm")&&(h.title=h.title_time+" ("+l+")",c.push(h))}}catch(t){v.e(t)}finally{v.f()}}else{var m,y=r.split(":"),g=24+Zf(y[0])+":"+y[1],_=ms(i&&i.hasOwnProperty("custom_time_slots")?i.custom_time_slots.end_time:e.end_time);try{for(_.s();!(m=_.n()).done;){var $=m.value;if($.value>g)break;$.value>r&&($.title=$.title_time,c.push($))}}catch(t){_.e(t)}finally{_.f()}o.endTime&&o.endTime.value>r&&qf(c).call(c,(function(t){return t.value!==o.endTime.value}))&&(c.push(o.endTime),xs(c))}return c}));function xs(t){al(t).call(t,(function(t,n){return t.value<n.value?-1:t.value>n.value?1:0}))}function ks(t,n){if(!n)return null;var e=vl(n).call(n,(function(n){return e=n.value,r=t,o=e.split(":"),i=r.split(":"),Zf(60*o[0]+o[1])>=Zf(60*i[0]+i[1]);var e,r,o,i}));return e||n[n.length-1]}bs.subscribe((function(t){Ul.get()&&t.length&&(Gl.set(ks(Ul.get(),t)),Ul.set(Gl.get().value))})),ws.subscribe((function(t){Wl.get()&&t.length&&(Jl.set(ks(Wl.get(),t)),Wl.set(Jl.get().value))}));var Os=Ml([]),Ss=Ml([]),Es=Ml(null),As=Ml([]),js=Ml("current"),Ts=Ml({all:[],changed_status:[]}),Ps=Ml("changed_status"),Rs=Ml([]);function Bs(){var t=Nl.get(),n=t?t.duration*t.units_min:Rf.get().time_interval;(n<86400||t&&t.units_max>1)&&(Wl.set(moment(Ul.get(),"HH:mm").add(n,"seconds").format("HH:mm")),ws.get()&&Jl.set(ks(Wl.get(),ws.get())))}function Is(){return Cs("start")}function Ds(){return Is().format("YYYY-MM-DD HH:mm:00")}function Ms(){return Cs("end").format("YYYY-MM-DD HH:mm:00")}function Cs(t){if(Hl.get()){var n=Hl.get().clone(),e=Nl.get(),r=Ul.get(),o=Wl.get(),i=[0,0];if("end"===t)if(e&&e.duration>=86400){var u;if(o){var a=r.split(":"),c=o.split(":"),f=Math.max(e.duration,60*(60*c[0]+Zf(c[1])-60*a[0]-Zf(a[1])));u=Zf(f/86400)}else u=e&&e.units_max>1?Zf(e.duration*e.units_min/86400):Zf(e.duration/86400);n.add(u,"days")}else i=o.split(":");else e&&e.duration<86400&&(i=r.split(":"));return n.hours(i[0]),n.minutes(i[1]),n}}function Ns(t){var n=moment(t),e=n.format("d"),r=n.format("M"),o=n.format("DD");return Rl.datePicker.dayNamesShort[e]+", "+Rl.datePicker.monthNamesShort[r-1]+" "+o}function Ls(t,n){for(var e=0;e<n.length;++e)if(t===n[e].value)return n[e].title}function Fs(){var t,n=As.get();return n.items&&qf(t=n.items).call(t,(function(t){return t.deleted}))}var zs=se.some,qs=Xi("some"),Ys=Ti("some");Z({target:"Array",proto:!0,forced:!qs||!Ys},{some:function(t){return zs(this,t,arguments.length>1?arguments[1]:void 0)}});var Hs=Mi("Array").some,Us=Array.prototype,Gs=function(t){var n=t.some;return t===Us||t instanceof Array&&n===Us.some?Hs:n},Ws=["sun","mon","tue","wed","thu","fri","sat"];function Js(t,n,e){var r,o=Vs(t);switch(n.type){case"daily":var i;if(t.diff(e,"days")%qf(n.daily)==0)if(qf(n.daily)>6||Gs(i=Rf.get().week_days).call(i,(function(t){return t===o})))return!0;break;case"weekly":case"biweekly":if(("weekly"===n.type||t.diff(e.clone().startOf("isoWeek"),"weeks")%2==0)&&Gs(r=n.weekly.on).call(r,(function(t){return t===o})))return!0;break;case"monthly":switch(n.monthly.on){case"day":if(t.date()===n.monthly.day)return!0;break;case"last":if(o===n.monthly.weekday&&t.clone().endOf("month").diff(t,"days")<7)return!0;break;default:var u=t.diff(t.clone().startOf("month"),"days"),a=["first","second","third","fourth"],c=na(a).call(a,n.monthly.on);if(o===n.monthly.weekday&&u>=7*c&&u<7*(c+1))return!0}}return!1}function Vs(t){return Ws[t.format("d")]}var Qs=!1;function Ks(){return Qs?u.default.Deferred((function(t){return t.resolve()})):u.default.get(ajaxurl,{action:"bookly_get_data_for_appointment_form",csrf_token:jl}).done((function(t){if(Qs=!0,Rl.service_main){var n,e=[];uu(n=t.staff).call(n,(function(t){var n;uu(n=t.services).call(n,(function(t){void 0===vl(e).call(e,(function(n){return n.id===t.id}))&&e.push(t)}))})),t.services=e}Rf.set(t)}))}function Xs(){Cl.reset(),ps.reset(),Nl.reset(),Ll.reset(),Fl.reset(),zl.reset(),ql.reset(),Yl.reset(),Hl.reset(),Ul.reset(),Gl.reset(),Wl.reset(),Jl.reset(),ts.reset(),js.reset(),ns.reset(),vs.reset(),os.reset(),Zs(),Ql.reset(),Xl.reset(),Zl.reset(),Kl.reset(),Ts.reset(),Ps.reset(),Rs.reset(),Os.reset(),Ss.reset(),Es.reset(),As.reset(),js.reset()}function Zs(){rs.reset()}var td=null,nd=null;xf([Nl,Cl,ql,Yl,Ul,Wl,Hl,ts,Vl],(function(t,n){var e=Wi(t,9),r=e[0],o=e[1],i=e[2],a=e[3],c=e[4],f=e[5];e[6],e[7];var l=e[8];null!==nd&&(clearTimeout(nd),nd=null),nd=Mf((function(){if(null!==td&&(td.abort(),td=null),o&&r&&c&&f&&!l){var t={action:"bookly_check_appointment_errors",csrf_token:jl,appointment_id:vs.get().id,customers:ss(!0),staff_id:o.id,location_id:i?i.id:null};r.id?t.service_id=r.id:t.service_id="",a||(t.start_date=Ds(),t.end_date=Ms()),td=u.default.post(ajaxurl,t,n,"json")}else n(null)}),10)}),null).subscribe((function(t){null===t?Zs():rs.update((function(n){var e;return uu(e=Vu(t)).call(e,(function(e){return n[e]=t[e]})),n}))}));function ed(t){var n,e=[];uu(n=As.get()).call(n,(function(n){t.slots===n.slots||n.deleted||e.push(n.slots)})),rd(t.date,e).done((function(t){Os.set(t.data.length?t.data[0].options:[])}))}function rd(t,n){var e={action:"bookly_recurring_appointments_get_schedule",csrf_token:jl,staff_id:Cl.get().id,service_id:Nl.get().id,location_id:ql.get()?ql.get().id:null,exclude:n,nop:fs(ts.get())};if(t)e.repeat="daily",e.datetime=t,e.until=t,e.params={every:1},e.with_options=1;else{var r=Zl.get();e.repeat=r.type,e.datetime=Ds(),e.until=r.until.format("YYYY-MM-DD"),e.params=r["biweekly"===r.type?"weekly":r.type],e.with_options=0}return jQuery.post(ajaxurl,e)}function od(){for(var t=Ts.get(),n=Ps.get(),e=Rs.get(),r=[],o=[],i=function(){var i,c=a[u];uu(i=t[c]).call(i,(function(t,i){n===c&&kl(e).call(e,i)&&r.push(t),t.attachments&&o.push.apply(o,Gu(t.attachments))}))},u=0,a=Vu(t);u<a.length;u++)i();return{selected:r,attachments:o}}function id(t,n){var e;if(void 0===Ji||null==mu(t)){if(yu(t)||(e=function(t,n){var e;if(!t)return;if("string"==typeof t)return ud(t,n);var r=vu(e=Object.prototype.toString.call(t)).call(e,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return oa(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ud(t,n)}(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,a=!1;return{s:function(){e=Si(t)},n:function(){var t=e.next();return u=t.done,t},e:function(t){a=!0,i=t},f:function(){try{u||null==e.return||e.return()}finally{if(a)throw i}}}}function ud(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function ad(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}var cd=function(t){return{}},fd=function(t){return{}};function ld(t){var n,e,r,o,i,u,a,c,f,l,s,d,p,v,h=t[6].default,m=Qa(h,t,t[5],null),y=t[6].footer,g=Qa(y,t,t[5],fd);return{c:function(){n=sc("div"),e=sc("div"),r=sc("div"),o=sc("div"),i=sc("h5"),u=dc(t[1]),a=pc(),(c=sc("button")).innerHTML='<span aria-hidden="true">×</span>',f=pc(),l=sc("div"),m&&m.c(),s=pc(),d=sc("div"),g&&g.c(),yc(i,"class","modal-title"),yc(c,"type","button"),yc(c,"class","close"),yc(c,"data-dismiss","bookly-modal"),yc(c,"aria-label","Close"),yc(o,"class","modal-header"),yc(l,"class","modal-body"),yc(d,"class","modal-footer"),yc(r,"class","modal-content"),yc(e,"class",p="modal-dialog modal-"+t[0]),yc(n,"class","bookly-modal bookly-fade"),yc(n,"tabindex","-1"),yc(n,"role","dialog")},m:function(p,h){cc(p,n,h),ac(n,e),ac(e,r),ac(r,o),ac(o,i),ac(i,u),ac(o,a),ac(o,c),ac(r,f),ac(r,l),m&&m.m(l,null),ac(r,s),ac(r,d),g&&g.m(d,null),t[7](n),v=!0},p:function(t,n){var r=Wi(n,1)[0];(!v||2&r)&&wc(u,t[1]),m&&m.p&&32&r&&Xa(m,h,t,t[5],r,null,null),g&&g.p&&32&r&&Xa(g,y,t,t[5],r,cd,fd),(!v||1&r&&p!==(p="modal-dialog modal-"+t[0]))&&yc(e,"class",p)},i:function(t){v||(of(m,t),of(g,t),v=!0)},o:function(t){uf(m,t),uf(g,t),v=!1},d:function(e){e&&fc(n),m&&m.d(e),g&&g.d(e),t[7](null)}}}function sd(t,n,e){var r,o,i=n.$$slots,a=void 0===i?{}:i,c=n.$$scope,f=(r=Mc(),function(t,n){var e=r.$$.callbacks[t];if(e){var o,i=Ac(t,n);uu(o=vu(e).call(e)).call(o,(function(t){t.call(r,i)}))}}),l=n.size,s=void 0===l?"lg":l,d=n.title,p=void 0===d?"":d;return Cc((function(){return u.default(o).booklyModal().on("hidden.bs.modal",(function(){return f("hidden")}))})),t.$$set=function(t){"size"in t&&e(0,s=t.size),"title"in t&&e(1,p=t.title),"$$scope"in t&&e(5,c=t.$$scope)},[s,p,o,function(){u.default(o).booklyModal("show")},function(){u.default(o).booklyModal("hide")},c,a,function(t){Lc[t?"unshift":"push"]((function(){e(2,o=t)}))}]}var dd=function(t){nn(e,t);var n=ad(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,sd,ld,Wa,{size:0,title:1,show:3,hide:4}),r}return Gt(e,[{key:"show",get:function(){return this.$$.ctx[3]}},{key:"hide",get:function(){return this.$$.ctx[4]}}]),e}(hf),pd=Jf.trim,vd=v.parseFloat,hd=1/vd(Yf+"-0")!=-1/0?function(t){var n=pd(String(t)),e=vd(n);return 0===e&&"-"==n.charAt(0)?-0:e}:vd;Z({global:!0,forced:parseFloat!=hd},{parseFloat:hd});var md=H.parseFloat;function yd(t){var n=t-1;return n*n*n+1}function gd(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=n.delay,r=void 0===e?0:e,o=n.duration,i=void 0===o?400:o,u=n.easing,a=void 0===u?yd:u,c=getComputedStyle(t),f=+c.opacity,l=md(c.height),s=md(c.paddingTop),d=md(c.paddingBottom),p=md(c.marginTop),v=md(c.marginBottom),h=md(c.borderTopWidth),m=md(c.borderBottomWidth);return{delay:r,duration:i,easing:a,css:function(t){return"overflow: hidden;"+"opacity: ".concat(Math.min(20*t,1)*f,";")+"height: ".concat(t*l,"px;")+"padding-top: ".concat(t*s,"px;")+"padding-bottom: ".concat(t*d,"px;")+"margin-top: ".concat(t*p,"px;")+"margin-bottom: ".concat(t*v,"px;")+"border-top-width: ".concat(t*h,"px;")+"border-bottom-width: ".concat(t*m,"px;")}}}function _d(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function $d(t){var n,e,r,o,i,u,a,c=t[4].default,f=Qa(c,t,t[3],null);return{c:function(){n=sc("div"),e=sc("i"),o=pc(),f&&f.c(),yc(e,"class",r="fas pl-1 "+("danger"===t[1]?"fa-times":"fa-exclamation-triangle")),yc(n,"class",i="alert alert-"+t[1]+" form-group "+t[2]+" p-1")},m:function(t,r){cc(t,n,r),ac(n,e),ac(n,o),f&&f.m(n,null),a=!0},p:function(t,o){(!a||2&o&&r!==(r="fas pl-1 "+("danger"===t[1]?"fa-times":"fa-exclamation-triangle")))&&yc(e,"class",r),f&&f.p&&8&o&&Xa(f,c,t,t[3],o,null,null),(!a||6&o&&i!==(i="alert alert-"+t[1]+" form-group "+t[2]+" p-1"))&&yc(n,"class",i)},i:function(t){a||(of(f,t),Gc((function(){u||(u=cf(n,gd,{},!0)),u.run(1)})),a=!0)},o:function(t){uf(f,t),u||(u=cf(n,gd,{},!1)),u.run(0),a=!1},d:function(t){t&&fc(n),f&&f.d(t),t&&u&&u.end()}}}function bd(t){var n,e,r=t[0]&&$d(t);return{c:function(){r&&r.c(),n=vc()},m:function(t,o){r&&r.m(t,o),cc(t,n,o),e=!0},p:function(t,e){var o=Wi(e,1)[0];t[0]?r?(r.p(t,o),1&o&&of(r,1)):((r=$d(t)).c(),of(r,1),r.m(n.parentNode,n)):r&&(ef(),uf(r,1,1,(function(){r=null})),rf())},i:function(t){e||(of(r),e=!0)},o:function(t){uf(r),e=!1},d:function(t){r&&r.d(t),t&&fc(n)}}}function wd(t,n,e){var r=n.$$slots,o=void 0===r?{}:r,i=n.$$scope,u=n.show,a=void 0===u||u,c=n.type,f=void 0===c?"warning":c,l=n.class,s=void 0===l?"":l;return t.$$set=function(t){"show"in t&&e(0,a=t.show),"type"in t&&e(1,f=t.type),"class"in t&&e(2,s=t.class),"$$scope"in t&&e(3,i=t.$$scope)},[a,f,s,i,o]}var xd=function(t){nn(e,t);var n=_d(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,wd,bd,Wa,{show:0,type:1,class:2}),r}return e}(hf);function kd(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Od(t,n,e){var r=vu(t).call(t);return r[10]=n[e],r}function Sd(t,n,e){var r=vu(t).call(t);return r[13]=n[e],r}function Ed(t,n,e){var r=vu(t).call(t);return r[13]=n[e],r}function Ad(t){var n;return{c:function(){(n=sc("option")).__value=null,n.value=n.__value},m:function(t,e){cc(t,n,e)},d:function(t){t&&fc(n)}}}function jd(t){var n,e,r,o=t[4](t[13],t[2])+"";return{c:function(){n=sc("option"),e=dc(o),n.__value=r=t[13],n.value=n.__value},m:function(t,r){cc(t,n,r),ac(n,e)},p:function(t,i){6&i&&o!==(o=t[4](t[13],t[2])+"")&&wc(e,o),2&i&&r!==(r=t[13])&&(n.__value=r,n.value=n.__value)},d:function(t){t&&fc(n)}}}function Td(t){var n,e,r,o=t[4](t[13],t[2])+"";return{c:function(){n=sc("option"),e=dc(o),n.__value=r=t[13],n.value=n.__value},m:function(t,r){cc(t,n,r),ac(n,e)},p:function(t,i){6&i&&o!==(o=t[4](t[13],t[2])+"")&&wc(e,o),2&i&&r!==(r=t[13])&&(n.__value=r,n.value=n.__value)},d:function(t){t&&fc(n)}}}function Pd(t){for(var n,e,r=t[10].items,o=[],i=0;i<r.length;i+=1)o[i]=Td(Sd(t,r,i));return{c:function(){n=sc("optgroup");for(var r=0;r<o.length;r+=1)o[r].c();yc(n,"label",e=t[10].label)},m:function(t,e){cc(t,n,e);for(var r=0;r<o.length;r+=1)o[r].m(n,null)},p:function(t,i){if(22&i){var u;for(r=t[10].items,u=0;u<r.length;u+=1){var a=Sd(t,r,u);o[u]?o[u].p(a,i):(o[u]=Td(a),o[u].c(),o[u].m(n,null))}for(;u<o.length;u+=1)o[u].d(1);o.length=r.length}2&i&&e!==(e=t[10].label)&&yc(n,"label",e)},d:function(t){t&&fc(n),lc(o,t)}}}function Rd(t){var n,e=Rl.l10n.notices.provider_required+"";return{c:function(){n=dc(e)},m:function(t,e){cc(t,n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Bd(t){for(var n,e,r,o,i,u,a,c,f,l,s=null===t[0]&&Ad(),d=t[1].items,p=[],v=0;v<d.length;v+=1)p[v]=jd(Ed(t,d,v));for(var h=t[1].groups,m=[],y=0;y<h.length;y+=1)m[y]=Pd(Od(t,h,y));return a=new xd({props:{show:t[3].provider_required,type:"danger",class:"mt-2",$$slots:{default:[Rd]},$$scope:{ctx:t}}}),{c:function(){(n=sc("label")).textContent="".concat(Rl.l10n.provider),e=pc(),r=sc("select"),s&&s.c(),o=vc();for(var c=0;c<p.length;c+=1)p[c].c();i=vc();for(var f=0;f<m.length;f+=1)m[f].c();u=pc(),lf(a.$$.fragment),yc(n,"for","bookly-provider"),yc(r,"id","bookly-provider"),yc(r,"class","form-control custom-select"),void 0===t[0]&&Gc((function(){return t[9].call(r)}))},m:function(d,v){cc(d,n,v),cc(d,e,v),cc(d,r,v),s&&s.m(r,null),ac(r,o);for(var h=0;h<p.length;h+=1)p[h].m(r,null);ac(r,i);for(var y=0;y<m.length;y+=1)m[y].m(r,null);Oc(r,t[0]),cc(d,u,v),sf(a,d,v),c=!0,f||(l=[hc(r,"change",t[9]),hc(r,"change",t[5])],f=!0)},p:function(t,n){var e=Wi(n,1)[0];if(null===t[0]?s||((s=Ad()).c(),s.m(r,o)):s&&(s.d(1),s=null),22&e){var u;for(d=t[1].items,u=0;u<d.length;u+=1){var c=Ed(t,d,u);p[u]?p[u].p(c,e):(p[u]=jd(c),p[u].c(),p[u].m(r,i))}for(;u<p.length;u+=1)p[u].d(1);p.length=d.length}if(22&e){var f;for(h=t[1].groups,f=0;f<h.length;f+=1){var l=Od(t,h,f);m[f]?m[f].p(l,e):(m[f]=Pd(l),m[f].c(),m[f].m(r,null))}for(;f<m.length;f+=1)m[f].d(1);m.length=h.length}3&e&&Oc(r,t[0]);var v={};8&e&&(v.show=t[3].provider_required),262144&e&&(v.$$scope={dirty:e,ctx:t}),a.$set(v)},i:function(t){c||(of(a.$$.fragment,t),c=!0)},o:function(t){uf(a.$$.fragment,t),c=!1},d:function(t){t&&fc(n),t&&fc(e),t&&fc(r),s&&s.d(),lc(p,t),lc(m,t),t&&fc(u),df(a,t),f=!1,Ua(l)}}}function Id(t,n,e){var r,o,i,u,a,c,f;function l(){!function(){var t=Cl.get();1===t.locations.length&&ql.set(t.locations[0])}()}return Va(t,Rf,(function(t){return e(7,r=t)})),Va(t,Cl,(function(t){return e(0,o=t)})),Va(t,Nl,(function(t){return e(8,i=t)})),Va(t,ps,(function(t){return e(2,u=t)})),Va(t,rs,(function(t){return e(3,a=t)})),t.$$.update=function(){if(449&t.$$.dirty)if(Rl.service_main)if(i){var n=function(t,n){return Oa(t).call(t,(function(t){var e;return vl(e=t.services).call(e,(function(t){return t.id===n}))}))}(r.staff,i.id);e(1,c=Bl(n,"category")),f!==i.id&&(null===o&&n.length<=2&&(tc(Cl,o=n[0],o),l()),e(6,f=i.id))}else e(1,c=Bl([],"category")),tc(Nl,i=null,i);else e(1,c=Bl(function(t,n){return Oa(t).call(t,(function(t){return!t.archived||t===n}))}(r.staff,o),"category"))},[o,c,u,a,function(t,n){return t.full_name+(t===n?" (".concat(Rl.l10n.staff_any,")"):"")},l,f,r,i,function(){o=Sc(this),Cl.set(o),e(1,c),e(7,r),e(0,o),e(8,i),e(6,f)}]}var Dd=function(t){nn(e,t);var n=kd(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Id,Bd,Wa,{}),r}return e}(hf);function Md(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Cd(t,n,e){var r=vu(t).call(t);return r[9]=n[e],r}function Nd(t,n,e){var r=vu(t).call(t);return r[12]=n[e],r}function Ld(t,n,e){var r=vu(t).call(t);return r[12]=n[e],r}function Fd(t){var n,e,r,o=t[12].name+"";return{c:function(){n=sc("option"),e=dc(o),n.__value=r=t[12],n.value=n.__value},m:function(t,r){cc(t,n,r),ac(n,e)},p:function(t,i){2&i&&o!==(o=t[12].name+"")&&wc(e,o),2&i&&r!==(r=t[12])&&(n.__value=r,n.value=n.__value)},d:function(t){t&&fc(n)}}}function zd(t){var n,e,r,o=t[12].name+"";return{c:function(){n=sc("option"),e=dc(o),n.__value=r=t[12],n.value=n.__value},m:function(t,r){cc(t,n,r),ac(n,e)},p:function(t,i){2&i&&o!==(o=t[12].name+"")&&wc(e,o),2&i&&r!==(r=t[12])&&(n.__value=r,n.value=n.__value)},d:function(t){t&&fc(n)}}}function qd(t){for(var n,e,r=t[9].items,o=[],i=0;i<r.length;i+=1)o[i]=zd(Nd(t,r,i));return{c:function(){n=sc("optgroup");for(var r=0;r<o.length;r+=1)o[r].c();yc(n,"label",e=t[9].label)},m:function(t,e){cc(t,n,e);for(var r=0;r<o.length;r+=1)o[r].m(n,null)},p:function(t,i){if(2&i){var u;for(r=t[9].items,u=0;u<r.length;u+=1){var a=Nd(t,r,u);o[u]?o[u].p(a,i):(o[u]=zd(a),o[u].c(),o[u].m(n,null))}for(;u<o.length;u+=1)o[u].d(1);o.length=r.length}2&i&&e!==(e=t[9].label)&&yc(n,"label",e)},d:function(t){t&&fc(n),lc(o,t)}}}function Yd(t){var n,e=Rl.l10n.notices.service_required+"";return{c:function(){n=dc(e)},m:function(t,e){cc(t,n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Hd(t){for(var n,e,r,o,i,u,a,c,f,l,s=t[1].items,d=[],p=0;p<s.length;p+=1)d[p]=Fd(Ld(t,s,p));for(var v=t[1].groups,h=[],m=0;m<v.length;m+=1)h[m]=qd(Cd(t,v,m));return a=new xd({props:{show:t[2].service_required,type:"danger",class:"mt-2",$$slots:{default:[Yd]},$$scope:{ctx:t}}}),{c:function(){(n=sc("label")).textContent="".concat(Rl.l10n.service),e=pc(),r=sc("select"),(o=sc("option")).textContent="".concat(Rl.l10n.select_a_service);for(var c=0;c<d.length;c+=1)d[c].c();i=vc();for(var f=0;f<h.length;f+=1)h[f].c();u=pc(),lf(a.$$.fragment),yc(n,"for","bookly-service"),o.__value=null,o.value=o.__value,yc(r,"id","bookly-service"),yc(r,"class","form-control custom-select"),void 0===t[0]&&Gc((function(){return t[7].call(r)}))},m:function(s,p){cc(s,n,p),cc(s,e,p),cc(s,r,p),ac(r,o);for(var v=0;v<d.length;v+=1)d[v].m(r,null);ac(r,i);for(var m=0;m<h.length;m+=1)h[m].m(r,null);Oc(r,t[0]),cc(s,u,p),sf(a,s,p),c=!0,f||(l=[hc(r,"change",t[7]),hc(r,"change",t[3])],f=!0)},p:function(t,n){var e=Wi(n,1)[0];if(2&e){var o;for(s=t[1].items,o=0;o<s.length;o+=1){var u=Ld(t,s,o);d[o]?d[o].p(u,e):(d[o]=Fd(u),d[o].c(),d[o].m(r,i))}for(;o<d.length;o+=1)d[o].d(1);d.length=s.length}if(2&e){var c;for(v=t[1].groups,c=0;c<v.length;c+=1){var f=Cd(t,v,c);h[c]?h[c].p(f,e):(h[c]=qd(f),h[c].c(),h[c].m(r,null))}for(;c<h.length;c+=1)h[c].d(1);h.length=v.length}3&e&&Oc(r,t[0]);var l={};4&e&&(l.show=t[2].service_required),131072&e&&(l.$$scope={dirty:e,ctx:t}),a.$set(l)},i:function(t){c||(of(a.$$.fragment,t),c=!0)},o:function(t){uf(a.$$.fragment,t),c=!1},d:function(t){t&&fc(n),t&&fc(e),t&&fc(r),lc(d,t),lc(h,t),t&&fc(u),df(a,t),f=!1,Ua(l)}}}function Ud(t,n,e){var r,o,i,u,a,c,f;function l(){u&&Bs()}return Va(t,Rf,(function(t){return e(5,r=t)})),Va(t,Cl,(function(t){return e(6,o=t)})),Va(t,Nl,(function(t){return e(0,i=t)})),Va(t,Ul,(function(t){return e(8,u=t)})),Va(t,rs,(function(t){return e(2,a=t)})),t.$$.update=function(){113&t.$$.dirty&&(Rl.service_main?e(1,c=Bl(r.services,"category")):o?(e(1,c=Bl(o.services,"category")),f!==o.id&&(i&&tc(Nl,i=Ol(i.id,o.services),i),null===i&&o.services.length<=2&&(tc(Nl,i=o.services[o.services.length-1],i),l()),e(4,f=o.id))):(e(1,c=Bl([],"category")),tc(Nl,i=null,i)))},[i,c,a,l,f,r,o,function(){i=Sc(this),Nl.set(i),e(1,c),e(5,r),e(6,o),e(4,f),e(0,i)}]}var Gd=function(t){nn(e,t);var n=Md(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Ud,Hd,Wa,{}),r}return e}(hf);function Wd(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Jd(t){var n,e=Rl.l10n.notices.custom_service_name_required+"";return{c:function(){n=dc(e)},m:function(t,e){cc(t,n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Vd(t){var n,e,r,o,i,u,a,c,f,l,s,d,p,v;return u=new xd({props:{show:t[1].custom_service_name_required,type:"danger",$$slots:{default:[Jd]},$$scope:{ctx:t}}}),{c:function(){n=sc("div"),(e=sc("label")).textContent="".concat(Rl.l10n.custom_service_name),r=pc(),o=sc("input"),i=pc(),lf(u.$$.fragment),a=pc(),c=sc("div"),(f=sc("label")).textContent="".concat(Rl.l10n.custom_service_price),l=pc(),s=sc("input"),yc(e,"for","bookly-custom-service-name"),yc(o,"id","bookly-custom-service-name"),yc(o,"class","form-control"),yc(o,"type","text"),yc(n,"class","form-group"),yc(f,"for","bookly-custom-service-price"),yc(s,"id","bookly-custom-service-price"),yc(s,"class","form-control"),yc(s,"type","number"),yc(s,"min","0"),yc(s,"step","1"),yc(c,"class","form-group")},m:function(h,m){cc(h,n,m),ac(n,e),ac(n,r),ac(n,o),xc(o,t[0]),ac(n,i),sf(u,n,null),cc(h,a,m),cc(h,c,m),ac(c,f),ac(c,l),ac(c,s),xc(s,t[2]),d=!0,p||(v=[hc(o,"input",t[3]),hc(s,"input",t[4])],p=!0)},p:function(t,n){var e=Wi(n,1)[0];1&e&&o.value!==t[0]&&xc(o,t[0]);var r={};2&e&&(r.show=t[1].custom_service_name_required),32&e&&(r.$$scope={dirty:e,ctx:t}),u.$set(r),4&e&&$c(s.value)!==t[2]&&xc(s,t[2])},i:function(t){d||(of(u.$$.fragment,t),d=!0)},o:function(t){uf(u.$$.fragment,t),d=!1},d:function(t){t&&fc(n),df(u),t&&fc(a),t&&fc(c),p=!1,Ua(v)}}}function Qd(t,n,e){var r,o,i;return Va(t,Ll,(function(t){return e(0,r=t)})),Va(t,rs,(function(t){return e(1,o=t)})),Va(t,Fl,(function(t){return e(2,i=t)})),[r,o,i,function(){r=this.value,Ll.set(r)},function(){i=$c(this.value),Fl.set(i)}]}var Kd=function(t){nn(e,t);var n=Wd(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Qd,Vd,Wa,{}),r}return e}(hf);function Xd(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Zd(t,n,e){var r=vu(t).call(t);return r[5]=n[e],r}function tp(t){var n,e,r,o=t[5].name+"";return{c:function(){n=sc("option"),e=dc(o),n.__value=r=t[5],n.value=n.__value},m:function(t,r){cc(t,n,r),ac(n,e)},p:function(t,i){1&i&&o!==(o=t[5].name+"")&&wc(e,o),1&i&&r!==(r=t[5])&&(n.__value=r,n.value=n.__value)},d:function(t){t&&fc(n)}}}function np(t){for(var n,e,r,o,i,u,a=t[0],c=[],f=0;f<a.length;f+=1)c[f]=tp(Zd(t,a,f));return{c:function(){(n=sc("label")).textContent="".concat(Rl.l10n.location),e=pc(),r=sc("select"),o=sc("option");for(var i=0;i<c.length;i+=1)c[i].c();yc(n,"for","bookly-location"),o.__value=null,o.value=o.__value,yc(r,"id","bookly-location"),yc(r,"class","form-control custom-select"),void 0===t[1]&&Gc((function(){return t[3].call(r)}))},m:function(a,f){cc(a,n,f),cc(a,e,f),cc(a,r,f),ac(r,o);for(var l=0;l<c.length;l+=1)c[l].m(r,null);Oc(r,t[1]),i||(u=hc(r,"change",t[3]),i=!0)},p:function(t,n){var e=Wi(n,1)[0];if(1&e){var o;for(a=t[0],o=0;o<a.length;o+=1){var i=Zd(t,a,o);c[o]?c[o].p(i,e):(c[o]=tp(i),c[o].c(),c[o].m(r,null))}for(;o<c.length;o+=1)c[o].d(1);c.length=a.length}3&e&&Oc(r,t[1])},i:Fa,o:Fa,d:function(t){t&&fc(n),t&&fc(e),t&&fc(r),lc(c,t),i=!1,u()}}}function ep(t,n,e){var r,o,i;return Va(t,Cl,(function(t){return e(2,r=t)})),Va(t,ql,(function(t){return e(1,o=t)})),t.$$.update=function(){4&t.$$.dirty&&e(0,i=r?r.locations:[]),1&t.$$.dirty&&(i&&0!==i.length||tc(ql,o=null,o))},[i,o,r,function(){o=Sc(this),ql.set(o),e(0,i),e(2,r)}]}var rp=function(t){nn(e,t);var n=Xd(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,ep,np,Wa,{}),r}return e}(hf);function op(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function ip(t){var n,e,r;return{c:function(){(n=sc("label")).textContent="".concat(Rl.l10n.date),e=pc(),r=sc("input"),yc(n,"for","bookly-date"),yc(r,"type","text"),yc(r,"id","bookly-date"),yc(r,"class","form-control"),yc(r,"autocomplete","off")},m:function(o,i){cc(o,n,i),cc(o,e,i),cc(o,r,i),t[3](r)},p:Fa,i:Fa,o:Fa,d:function(o){o&&fc(n),o&&fc(e),o&&fc(r),t[3](null)}}}function up(t,n,e){var r,o,i;return Va(t,Hl,(function(t){return e(2,r=t)})),Cc((function(){return e(1,i=u.default(o).daterangepicker({parentEl:"#bookly-appointment-dialog > div",singleDatePicker:!0,showDropdowns:!0,locale:Rl.datePicker},(function(t){return tc(Hl,r=t,r)})).data("daterangepicker"))})),t.$$.update=function(){6&t.$$.dirty&&r&&i&&(i.setStartDate(r),i.setEndDate(r))},[o,i,r,function(t){Lc[t?"unshift":"push"]((function(){e(0,o=t)}))}]}var ap=function(t){nn(e,t);var n=op(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,up,ip,Wa,{}),r}return e}(hf);function cp(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function fp(t,n,e){var r=vu(t).call(t);return r[12]=n[e],r}function lp(t,n,e){var r=vu(t).call(t);return r[15]=n[e],r}function sp(t){for(var n,e=t[4],r=[],o=0;o<e.length;o+=1)r[o]=dp(lp(t,e,o));return{c:function(){for(var t=0;t<r.length;t+=1)r[t].c();n=vc()},m:function(t,e){for(var o=0;o<r.length;o+=1)r[o].m(t,e);cc(t,n,e)},p:function(t,o){if(16&o){var i;for(e=t[4],i=0;i<e.length;i+=1){var u=lp(t,e,i);r[i]?r[i].p(u,o):(r[i]=dp(u),r[i].c(),r[i].m(n.parentNode,n))}for(;i<r.length;i+=1)r[i].d(1);r.length=e.length}},d:function(t){lc(r,t),t&&fc(n)}}}function dp(t){var n,e,r,o,i=t[15].title+"";return{c:function(){n=sc("option"),e=dc(i),n.__value=r=t[15],n.value=n.__value,n.disabled=o=t[15].disabled},m:function(t,r){cc(t,n,r),ac(n,e)},p:function(t,u){16&u&&i!==(i=t[15].title+"")&&wc(e,i),16&u&&r!==(r=t[15])&&(n.__value=r,n.value=n.__value),16&u&&o!==(o=t[15].disabled)&&(n.disabled=o)},d:function(t){t&&fc(n)}}}function pp(t){for(var n,e=t[5],r=[],o=0;o<e.length;o+=1)r[o]=vp(fp(t,e,o));return{c:function(){for(var t=0;t<r.length;t+=1)r[t].c();n=vc()},m:function(t,e){for(var o=0;o<r.length;o+=1)r[o].m(t,e);cc(t,n,e)},p:function(t,o){if(32&o){var i;for(e=t[5],i=0;i<e.length;i+=1){var u=fp(t,e,i);r[i]?r[i].p(u,o):(r[i]=vp(u),r[i].c(),r[i].m(n.parentNode,n))}for(;i<r.length;i+=1)r[i].d(1);r.length=e.length}},d:function(t){lc(r,t),t&&fc(n)}}}function vp(t){var n,e,r,o=t[12].title+"";return{c:function(){n=sc("option"),e=dc(o),n.__value=r=t[12],n.value=n.__value},m:function(t,r){cc(t,n,r),ac(n,e)},p:function(t,i){32&i&&o!==(o=t[12].title+"")&&wc(e,o),32&i&&r!==(r=t[12])&&(n.__value=r,n.value=n.__value)},d:function(t){t&&fc(n)}}}function hp(t){var n,e,r,o,i,u,a,c,f,l,s,d,p,v=!!t[4]&&!t[3]&&sp(t),h=!!t[5]&&!t[3]&&pp(t);return{c:function(){(n=sc("label")).textContent="".concat(Rl.l10n.period),e=pc(),r=sc("div"),o=sc("div"),i=sc("select"),v&&v.c(),u=pc(),(a=sc("div")).textContent="".concat(Rl.l10n.to),c=pc(),f=sc("div"),l=sc("select"),h&&h.c(),yc(n,"for","bookly-period"),yc(i,"id","bookly-period"),yc(i,"class","form-control custom-select"),i.disabled=t[3],void 0===t[0]&&Gc((function(){return t[8].call(i)})),yc(o,"class","col"),yc(a,"class","col-auto"),yc(l,"class","form-control custom-select"),l.disabled=s=Rl.appropriate_slots&&(!t[1]||1===t[1].units_max),void 0===t[2]&&Gc((function(){return t[9].call(l)})),yc(f,"class","col"),yc(r,"class","form-row align-items-center")},m:function(s,m){cc(s,n,m),cc(s,e,m),cc(s,r,m),ac(r,o),ac(o,i),v&&v.m(i,null),Oc(i,t[0]),ac(r,u),ac(r,a),ac(r,c),ac(r,f),ac(f,l),h&&h.m(l,null),Oc(l,t[2]),d||(p=[hc(i,"change",t[8]),hc(i,"change",t[6]),hc(l,"change",t[9]),hc(l,"change",t[7])],d=!0)},p:function(t,n){var e=Wi(n,1)[0];t[4]&&!t[3]?v?v.p(t,e):((v=sp(t)).c(),v.m(i,null)):v&&(v.d(1),v=null),8&e&&(i.disabled=t[3]),17&e&&Oc(i,t[0]),t[5]&&!t[3]?h?h.p(t,e):((h=pp(t)).c(),h.m(l,null)):h&&(h.d(1),h=null),2&e&&s!==(s=Rl.appropriate_slots&&(!t[1]||1===t[1].units_max))&&(l.disabled=s),36&e&&Oc(l,t[2])},i:Fa,o:Fa,d:function(t){t&&fc(n),t&&fc(e),t&&fc(r),v&&v.d(),h&&h.d(),d=!1,Ua(p)}}}function mp(t,n,e){var r,o,i,u,a,c,f,l;return Va(t,Ul,(function(t){return e(10,r=t)})),Va(t,Gl,(function(t){return e(0,o=t)})),Va(t,Nl,(function(t){return e(1,i=t)})),Va(t,Wl,(function(t){return e(11,u=t)})),Va(t,Jl,(function(t){return e(2,a=t)})),Va(t,Vl,(function(t){return e(3,c=t)})),Va(t,bs,(function(t){return e(4,f=t)})),Va(t,ws,(function(t){return e(5,l=t)})),[o,i,a,c,f,l,function(){tc(Ul,r=o.value,r),i&&Bs()},function(){tc(Wl,u=a.value,u)},function(){o=Sc(this),Gl.set(o)},function(){a=Sc(this),Jl.set(a)}]}var yp=function(t){nn(e,t);var n=cp(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,mp,hp,Wa,{}),r}return e}(hf);function gp(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function _p(t){var n,e,r,o,i,u;return{c:function(){n=sc("div"),e=sc("input"),r=pc(),(o=sc("label")).textContent="".concat(Rl.l10n.recurring.repeat_this_appointment),yc(e,"type","checkbox"),yc(e,"id","bookly-repeat-enabled"),yc(e,"class","custom-control-input"),yc(o,"for","bookly-repeat-enabled"),yc(o,"class","custom-control-label"),yc(n,"class","custom-control custom-checkbox")},m:function(a,c){cc(a,n,c),ac(n,e),e.checked=t[0],ac(n,r),ac(n,o),i||(u=hc(e,"change",t[1]),i=!0)},p:function(t,n){1&Wi(n,1)[0]&&(e.checked=t[0])},i:Fa,o:Fa,d:function(t){t&&fc(n),i=!1,u()}}}function $p(t,n,e){var r;return Va(t,Ql,(function(t){return e(0,r=t)})),[r,function(){r=this.checked,Ql.set(r)}]}var bp=function(t){nn(e,t);var n=gp(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,$p,_p,Wa,{}),r}return e}(hf);Z({target:"String",proto:!0},{repeat:"".repeat||function(t){var n=String(O(this)),e="",r=ot(t);if(r<0||r==1/0)throw RangeError("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(n+=n))1&r&&(e+=n);return e}});var wp=Mi("String").repeat,xp=String.prototype,kp=function(t){var n=t.repeat;return"string"==typeof t||t===xp||t instanceof String&&n===xp.repeat?wp:n};function Op(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Sp(t,n,e){var r=vu(t).call(t);return r[2]=n[e],r}function Ep(t){var n,e,r=t[2].title+"";return{c:function(){n=sc("option"),e=dc(r),n.__value=t[2].id,n.value=n.__value},m:function(t,r){cc(t,n,r),ac(n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Ap(t){for(var n,e,r,o,i,u,a,c=Rl.recurring.types,f=[],l=0;l<c.length;l+=1)f[l]=Ep(Sp(t,c,l));return{c:function(){n=sc("div"),(e=sc("div")).textContent="".concat(kp(Rl.l10n.recurring)),r=pc(),o=sc("div"),i=sc("select");for(var u=0;u<f.length;u+=1)f[u].c();yc(e,"class","col-sm-2 col-form-label"),yc(i,"id","bookly-recurring-type"),yc(i,"class","form-control custom-select"),void 0===t[0].type&&Gc((function(){return t[1].call(i)})),yc(o,"class","col-sm-4"),yc(n,"class","form-group form-row")},m:function(c,l){cc(c,n,l),ac(n,e),ac(n,r),ac(n,o),ac(o,i);for(var s=0;s<f.length;s+=1)f[s].m(i,null);Oc(i,t[0].type),u||(a=hc(i,"change",t[1]),u=!0)},p:function(t,n){var e=Wi(n,1)[0];if(0&e){var r;for(c=Rl.recurring.types,r=0;r<c.length;r+=1){var o=Sp(t,c,r);f[r]?f[r].p(o,e):(f[r]=Ep(o),f[r].c(),f[r].m(i,null))}for(;r<f.length;r+=1)f[r].d(1);f.length=c.length}1&e&&Oc(i,t[0].type)},i:Fa,o:Fa,d:function(t){t&&fc(n),lc(f,t),u=!1,a()}}}function jp(t,n,e){var r;return Va(t,Zl,(function(t){return e(0,r=t)})),[r,function(){r.type=Sc(this),Zl.set(r)}]}var Tp=function(t){nn(e,t);var n=Op(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,jp,Ap,Wa,{}),r}return e}(hf);function Pp(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Rp(t){var n,e,r,o,i,u,a,c,f,l,s;return{c:function(){n=sc("div"),(e=sc("div")).textContent="".concat(qf(Rl.l10n.recurring)),r=pc(),o=sc("div"),i=sc("div"),u=sc("input"),a=pc(),c=sc("div"),(f=sc("span")).textContent="".concat(Rl.l10n.recurring.days),yc(e,"class","col-sm-2 col-form-label"),yc(u,"type","number"),yc(u,"step","1"),yc(u,"min","1"),yc(u,"class","form-control"),yc(f,"class","input-group-text"),yc(c,"class","input-group-append"),yc(i,"class","input-group"),yc(o,"class","col-sm-4"),yc(n,"class","form-group form-row")},m:function(d,p){cc(d,n,p),ac(n,e),ac(n,r),ac(n,o),ac(o,i),ac(i,u),xc(u,qf(t[0].daily)),ac(i,a),ac(i,c),ac(c,f),l||(s=hc(u,"input",t[1]),l=!0)},p:function(t,n){1&Wi(n,1)[0]&&$c(u.value)!==qf(t[0].daily)&&xc(u,qf(t[0].daily))},i:Fa,o:Fa,d:function(t){t&&fc(n),l=!1,s()}}}function Bp(t,n,e){var r;return Va(t,Zl,(function(t){return e(0,r=t)})),[r,function(){r.daily.every=$c(this.value),Zl.set(r)}]}var Ip=function(t){nn(e,t);var n=Pp(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Bp,Rp,Wa,{}),r}return e}(hf);function Dp(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Mp(t,n,e){var r=vu(t).call(t);return r[6]=n[e],r}function Cp(t){var n,e,r,o,i,u,a,c,f=t[6].title+"";return{c:function(){n=sc("div"),e=sc("input"),r=pc(),o=sc("label"),i=dc(f),u=pc(),yc(e,"type","checkbox"),yc(e,"id","bookly-week-"+t[6].id),e.__value=t[6].id,e.value=e.__value,yc(e,"class","custom-control-input"),t[3][0].push(e),yc(o,"for","bookly-week-"+t[6].id),yc(o,"class","custom-control-label"),yc(n,"class","custom-control custom-checkbox d-inline mr-3")},m:function(f,l){var s;cc(f,n,l),ac(n,e),e.checked=~na(s=t[0].weekly.on).call(s,e.__value),ac(n,r),ac(n,o),ac(o,i),ac(n,u),a||(c=hc(e,"change",t[2]),a=!0)},p:function(t,n){var r;1&n&&(e.checked=~na(r=t[0].weekly.on).call(r,e.__value))},d:function(r){var o,i;r&&fc(n),pa(o=t[3][0]).call(o,na(i=t[3][0]).call(i,e),1),a=!1,c()}}}function Np(t){for(var n,e,r,o,i=Rl.recurring.days,u=[],a=0;a<i.length;a+=1)u[a]=Cp(Mp(t,i,a));return{c:function(){n=sc("div"),(e=sc("div")).textContent="".concat(Rl.l10n.recurring.on),r=pc(),o=sc("div");for(var i=0;i<u.length;i+=1)u[i].c();yc(e,"class","col-sm-2 col-form-label"),yc(o,"id","bookly-repeat-on"),yc(o,"class","col-sm-10 mt-1"),Ec(o,"text-danger",!t[0].weekly.on.length),yc(n,"class","form-group form-row")},m:function(t,i){cc(t,n,i),ac(n,e),ac(n,r),ac(n,o);for(var a=0;a<u.length;a+=1)u[a].m(o,null)},p:function(t,n){var e=Wi(n,1)[0];if(1&e){var r;for(i=Rl.recurring.days,r=0;r<i.length;r+=1){var a=Mp(t,i,r);u[r]?u[r].p(a,e):(u[r]=Cp(a),u[r].c(),u[r].m(o,null))}for(;r<u.length;r+=1)u[r].d(1);u.length=i.length}1&e&&Ec(o,"text-danger",!t[0].weekly.on.length)},i:Fa,o:Fa,d:function(t){t&&fc(n),lc(u,t)}}}function Lp(t,n,e){var r,o;Va(t,Hl,(function(t){return e(1,r=t)})),Va(t,Zl,(function(t){return e(0,o=t)}));var i=!1;var u=[[]];return t.$$.update=function(){2&t.$$.dirty&&r&&0===o.weekly.on.length&&(i||(tc(Zl,o.weekly.on=[Vs(r)],o),i=!0))},[o,r,function(){o.weekly.on=_c(u[0],this.__value,this.checked),Zl.set(o)},u]}var Fp=function(t){nn(e,t);var n=Dp(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Lp,Np,Wa,{}),r}return e}(hf);function zp(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function qp(t,n,e){var r=vu(t).call(t);return r[6]=n[e],r}function Yp(t,n,e){var r=vu(t).call(t);return r[4]=n[e],r[6]=e,r}function Hp(t,n,e){var r=vu(t).call(t);return r[9]=n[e],r}function Up(t){var n,e,r=t[9].title+"";return{c:function(){n=sc("option"),e=dc(r),n.__value=t[9].id,n.value=n.__value},m:function(t,r){cc(t,n,r),ac(n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Gp(t){for(var n,e,r,o,i=Rl.recurring.days,u=[],a=0;a<i.length;a+=1)u[a]=Jp(qp(t,i,a));return{c:function(){n=sc("div"),e=sc("select");for(var r=0;r<u.length;r+=1)u[r].c();yc(e,"class","form-control custom-select"),void 0===t[0].monthly.weekday&&Gc((function(){return t[3].call(e)})),yc(n,"class","col-sm-2")},m:function(i,a){cc(i,n,a),ac(n,e);for(var c=0;c<u.length;c+=1)u[c].m(e,null);Oc(e,t[0].monthly.weekday),r||(o=hc(e,"change",t[3]),r=!0)},p:function(t,n){if(0&n){var r;for(i=Rl.recurring.days,r=0;r<i.length;r+=1){var o=qp(t,i,r);u[r]?u[r].p(o,n):(u[r]=Jp(o),u[r].c(),u[r].m(e,null))}for(;r<u.length;r+=1)u[r].d(1);u.length=i.length}1&n&&Oc(e,t[0].monthly.weekday)},d:function(t){t&&fc(n),lc(u,t),r=!1,o()}}}function Wp(t){for(var n,e,r,o,i=Array(31),u=[],a=0;a<i.length;a+=1)u[a]=Vp(Yp(t,i,a));return{c:function(){n=sc("div"),e=sc("select");for(var r=0;r<u.length;r+=1)u[r].c();yc(e,"class","form-control custom-select"),void 0===t[0].monthly.day&&Gc((function(){return t[2].call(e)})),yc(n,"class","col-sm-2 mr-4")},m:function(i,a){cc(i,n,a),ac(n,e);for(var c=0;c<u.length;c+=1)u[c].m(e,null);Oc(e,t[0].monthly.day),r||(o=hc(e,"change",t[2]),r=!0)},p:function(t,n){1&n&&Oc(e,t[0].monthly.day)},d:function(t){t&&fc(n),lc(u,t),r=!1,o()}}}function Jp(t){var n,e,r=t[6].title+"";return{c:function(){n=sc("option"),e=dc(r),n.__value=t[6].id,n.value=n.__value},m:function(t,r){cc(t,n,r),ac(n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Vp(t){var n,e,r=t[6]+1+"";return{c:function(){n=sc("option"),e=dc(r),n.__value=t[6]+1,n.value=n.__value},m:function(t,r){cc(t,n,r),ac(n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Qp(t){for(var n,e,r,o,i,u,a,c,f=Rl.recurring.monthly_items,l=[],s=0;s<f.length;s+=1)l[s]=Up(Hp(t,f,s));function d(t,n){return"day"===t[0].monthly.on?Wp:Gp}var p=d(t),v=p(t);return{c:function(){n=sc("div"),(e=sc("div")).textContent="".concat(Rl.l10n.recurring.on),r=pc(),o=sc("div"),i=sc("select");for(var a=0;a<l.length;a+=1)l[a].c();u=pc(),v.c(),yc(e,"class","col-sm-2 col-form-label"),yc(i,"class","form-control custom-select"),void 0===t[0].monthly.on&&Gc((function(){return t[1].call(i)})),yc(o,"class","col-sm-4"),yc(n,"class","form-group form-row")},m:function(f,s){cc(f,n,s),ac(n,e),ac(n,r),ac(n,o),ac(o,i);for(var d=0;d<l.length;d+=1)l[d].m(i,null);Oc(i,t[0].monthly.on),ac(n,u),v.m(n,null),a||(c=hc(i,"change",t[1]),a=!0)},p:function(t,e){var r=Wi(e,1)[0];if(0&r){var o;for(f=Rl.recurring.monthly_items,o=0;o<f.length;o+=1){var u=Hp(t,f,o);l[o]?l[o].p(u,r):(l[o]=Up(u),l[o].c(),l[o].m(i,null))}for(;o<l.length;o+=1)l[o].d(1);l.length=f.length}1&r&&Oc(i,t[0].monthly.on),p===(p=d(t))&&v?v.p(t,r):(v.d(1),(v=p(t))&&(v.c(),v.m(n,null)))},i:Fa,o:Fa,d:function(t){t&&fc(n),lc(l,t),v.d(),a=!1,c()}}}function Kp(t,n,e){var r;return Va(t,Zl,(function(t){return e(0,r=t)})),[r,function(){r.monthly.on=Sc(this),Zl.set(r)},function(){r.monthly.day=Sc(this),Zl.set(r)},function(){r.monthly.weekday=Sc(this),Zl.set(r)}]}var Xp=function(t){nn(e,t);var n=zp(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Kp,Qp,Wa,{}),r}return e}(hf);function Zp(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function tv(t){var n,e,r,o,i,u,a,c,f,l,s,d,p,v;return{c:function(){n=sc("div"),(e=sc("div")).textContent="".concat(Rl.l10n.recurring.until),r=pc(),o=sc("div"),i=sc("input"),u=pc(),(a=sc("div")).textContent="".concat(Rl.l10n.recurring.or),c=pc(),f=sc("div"),l=sc("input"),s=pc(),(d=sc("div")).textContent="".concat(Rl.l10n.recurring.times),yc(e,"class","col-sm-2 col-form-label"),yc(i,"type","text"),yc(i,"class","form-control"),yc(i,"autocomplete","off"),yc(o,"class","col col-sm-4"),yc(a,"class","col-auto"),yc(l,"class","form-control"),yc(l,"type","number"),yc(l,"min","1"),yc(f,"class","col-3 col-sm-2"),yc(d,"class","col-auto"),yc(n,"class","form-group form-row align-items-center")},m:function(h,m){cc(h,n,m),ac(n,e),ac(n,r),ac(n,o),ac(o,i),t[6](i),ac(n,u),ac(n,a),ac(n,c),ac(n,f),ac(f,l),xc(l,t[1]),ac(n,s),ac(n,d),p||(v=[hc(l,"input",t[7]),hc(l,"input",t[2])],p=!0)},p:function(t,n){2&Wi(n,1)[0]&&$c(l.value)!==t[1]&&xc(l,t[1])},i:Fa,o:Fa,d:function(e){e&&fc(n),t[6](null),p=!1,Ua(v)}}}function nv(t,n,e){var r,o,i,a,c,f;return Va(t,Zl,(function(t){return e(5,r=t)})),Va(t,Hl,(function(t){return e(8,o=t)})),Va(t,Xl,(function(t){return e(1,i=t)})),Cc((function(){null===r.until&&tc(Zl,r.until=o?o.clone().add(1,"month"):moment().add(1,"month"),r),tc(Zl,r.monthly.day=o.date(),r),tc(Zl,r.monthly.weekday=Vs(Is()),r),e(3,c=u.default(a).daterangepicker({parentEl:"#bookly-appointment-dialog > div",singleDatePicker:!0,showDropdowns:!0,locale:Rl.datePicker},(function(t){return tc(Zl,r.until=t,r)})).data("daterangepicker"))})),t.$$.update=function(){32&t.$$.dirty&&e(4,f=r.until),24&t.$$.dirty&&f&&c&&(c.setStartDate(f),c.setEndDate(f))},[a,i,function(){var t=0,n=o.clone().add(5,"years"),e=o.clone();do{Js(e,r,o)&&t++,e.add(1,"days")}while(t<i&&e.isBefore(n));tc(Zl,r.until=e.subtract(1,"days"),r)},c,f,r,function(t){Lc[t?"unshift":"push"]((function(){e(0,a=t)}))},function(){i=$c(this.value),Xl.set(i)}]}var ev=function(t){nn(e,t);var n=Zp(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,nv,tv,Wa,{}),r}return e}(hf);function rv(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function ov(t){var n,e,r,o,i,u,a,c,f,l,s;r=new Tp({});var d=[av,uv,iv],p=[];function v(t,n){return"daily"===t[0].type?0:"weekly"===t[0].type||"biweekly"===t[0].type?1:2}return i=v(t),u=p[i]=d[i](t),c=new ev({}),l=new xd({props:{type:"danger",show:t[1],class:"mt-n2",$$slots:{default:[cv]},$$scope:{ctx:t}}}),{c:function(){n=sc("div"),e=sc("div"),lf(r.$$.fragment),o=pc(),u.c(),a=pc(),lf(c.$$.fragment),f=pc(),lf(l.$$.fragment),yc(e,"class","mt-3"),yc(n,"class","border-left ml-4 pl-3")},m:function(t,u){cc(t,n,u),ac(n,e),sf(r,e,null),ac(e,o),p[i].m(e,null),ac(e,a),sf(c,e,null),ac(e,f),sf(l,e,null),s=!0},p:function(t,n){var r=i;(i=v(t))!==r&&(ef(),uf(p[r],1,1,(function(){p[r]=null})),rf(),(u=p[i])||(u=p[i]=d[i](t)).c(),of(u,1),u.m(e,a));var o={};2&n&&(o.show=t[1]),32&n&&(o.$$scope={dirty:n,ctx:t}),l.$set(o)},i:function(t){s||(of(r.$$.fragment,t),of(u),of(c.$$.fragment,t),of(l.$$.fragment,t),s=!0)},o:function(t){uf(r.$$.fragment,t),uf(u),uf(c.$$.fragment,t),uf(l.$$.fragment,t),s=!1},d:function(t){t&&fc(n),df(r),p[i].d(),df(c),df(l)}}}function iv(t){var n,e;return n=new Xp({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function uv(t){var n,e;return n=new Fp({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function av(t){var n,e;return n=new Ip({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function cv(t){var n,e=Rl.l10n.notices.until_cant_be_earlier+"";return{c:function(){n=dc(e)},m:function(t,e){cc(t,n,e)},p:Fa,d:function(t){t&&fc(n)}}}function fv(t){var n,e,r,o;n=new bp({});var i=t[2]&&ov(t);return{c:function(){lf(n.$$.fragment),e=pc(),i&&i.c(),r=vc()},m:function(t,u){sf(n,t,u),cc(t,e,u),i&&i.m(t,u),cc(t,r,u),o=!0},p:function(t,n){var e=Wi(n,1)[0];t[2]?i?(i.p(t,e),4&e&&of(i,1)):((i=ov(t)).c(),of(i,1),i.m(r.parentNode,r)):i&&(ef(),uf(i,1,1,(function(){i=null})),rf())},i:function(t){o||(of(n.$$.fragment,t),of(i),o=!0)},o:function(t){uf(n.$$.fragment,t),uf(i),o=!1},d:function(t){df(n,t),t&&fc(e),i&&i.d(t),t&&fc(r)}}}function lv(t,n,e){var r,o,i,u,a;return Va(t,Zl,(function(t){return e(0,r=t)})),Va(t,Hl,(function(t){return e(3,o=t)})),Va(t,Xl,(function(t){return e(4,i=t)})),Va(t,Kl,(function(t){return e(1,u=t)})),Va(t,Ql,(function(t){return e(2,a=t)})),t.$$.update=function(){if(9&t.$$.dirty&&r.until&&o){var n=0,e=r.until.clone().add(1,"days"),a=o.clone();do{Js(a,r,o)&&n++,a.add(1,"days")}while(a.isBefore(e));tc(Xl,i=n,i),tc(Kl,u=r.until.isBefore(o),u)}},[r,u,a,o]}var sv=function(t){nn(e,t);var n=rv(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,lv,fv,Wa,{}),r}return e}(hf);function dv(t){var n=Ol(t,Rl.statuses);return n?n.title:t}function pv(t){var n=Ol(t,Rl.statuses);return n?n.icon:"far fa-question-circle"}function vv(t,n){var e=n,r=u.default(t);return r.booklyPopover({trigger:"hover",container:r.closest("li"),content:function(){return e},html:!0,placement:"top",template:'<div class="bookly-popover"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),{update:function(t){e=t},destroy:function(){r.booklyPopover("dispose")}}}function hv(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function mv(t,n,e){var r=vu(t).call(t);return r[19]=n[e],r}function yv(t,n,e){var r=vu(t).call(t);return r[22]=n[e],r[23]=n,r[24]=e,r}function gv(t,n,e){var r=vu(t).call(t);return r[25]=n[e],r}function _v(t){var n,e,r,o,i,u,a=ls(t[2])+"",c=t[1].max+"";return{c:function(){n=sc("span"),e=dc("("),r=dc(a),o=dc("/"),i=dc(c),u=dc(")"),yc(n,"title",Rl.l10n.selected_maximum)},m:function(t,a){cc(t,n,a),ac(n,e),ac(n,r),ac(n,o),ac(n,i),ac(n,u)},p:function(t,n){4&n&&a!==(a=ls(t[2])+"")&&wc(r,a),2&n&&c!==(c=t[1].max+"")&&wc(i,c)},d:function(t){t&&fc(n)}}}function $v(t){var n,e,r,o;return{c:function(){n=sc("span"),yc(e=sc("i"),"class","fas fa-fw"),Ec(e,"fa-angle-down",!t[0]),Ec(e,"fa-angle-up",t[0]),yc(n,"role","button")},m:function(i,u){cc(i,n,u),ac(n,e),r||(o=hc(n,"click",t[13]),r=!0)},p:function(t,n){1&n&&Ec(e,"fa-angle-down",!t[0]),1&n&&Ec(e,"fa-angle-up",t[0])},d:function(t){t&&fc(n),r=!1,o()}}}function bv(t){var n,e;return n=new xd({props:{type:"success",$$slots:{default:[wv]},$$scope:{ctx:t}}}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},p:function(t,e){var r={};268435458&e&&(r.$$scope={dirty:e,ctx:t}),n.$set(r)},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function wv(t){var n,e,r,o=Rl.l10n.minimum_capacity+"",i=t[1].min+"";return{c:function(){n=dc(o),e=dc(": "),r=dc(i)},m:function(t,o){cc(t,n,o),cc(t,e,o),cc(t,r,o)},p:function(t,n){2&n&&i!==(i=t[1].min+"")&&wc(r,i)},d:function(t){t&&fc(n),t&&fc(e),t&&fc(r)}}}function xv(t){var n,e,r,o;return{c:function(){(n=sc("button")).innerHTML='<i class="fas fa-fw fa-list"></i>',yc(n,"type","button"),yc(n,"class","btn btn-default px-2 py-1")},m:function(i,u){var a;(cc(i,n,u),r)||(o=[hc(n,"click",(function(){Ga(t[9](t[22]))&&t[9](t[22]).apply(this,arguments)})),nc(e=vv.call(null,n,Zu(a="".concat(Rl.l10n.part_of_collaborative_services,": ")).call(a,t[22].collaborative_service)))],r=!0)},p:function(n,r){var o;t=n,e&&Ga(e.update)&&4&r&&e.update.call(null,Zu(o="".concat(Rl.l10n.part_of_collaborative_services,": ")).call(o,t[22].collaborative_service))},d:function(t){t&&fc(n),r=!1,Ua(o)}}}function kv(t){var n,e,r,o;return{c:function(){(n=sc("button")).innerHTML='<i class="fas fa-fw fa-list"></i>',yc(n,"type","button"),yc(n,"class","btn btn-default px-2 py-1")},m:function(i,u){var a;(cc(i,n,u),r)||(o=[hc(n,"click",(function(){Ga(t[10](t[22]))&&t[10](t[22]).apply(this,arguments)})),nc(e=vv.call(null,n,Zu(a="".concat(Rl.l10n.part_of_compound_services,": ")).call(a,t[22].compound_service)))],r=!0)},p:function(n,r){var o;t=n,e&&Ga(e.update)&&4&r&&e.update.call(null,Zu(o="".concat(Rl.l10n.part_of_compound_services,": ")).call(o,t[22].compound_service))},d:function(t){t&&fc(n),r=!1,Ua(o)}}}function Ov(t){var n,e,r,o,i,u,a=t[25].title+"";function c(){return t[14](t[22],t[25],t[23],t[24])}return{c:function(){n=sc("a"),e=sc("span"),r=dc(a),o=pc(),yc(e,"class","fa-fw mr-2 "+t[25].icon),yc(n,"href",""),yc(n,"class","dropdown-item pl-3")},m:function(t,a){cc(t,n,a),ac(n,e),ac(n,r),ac(n,o),i||(u=hc(n,"click",mc(c)),i=!0)},p:function(n,e){t=n},d:function(t){t&&fc(n),i=!1,u()}}}function Sv(t){var n,e,r,o,i;return{c:function(){n=sc("button"),yc(e=sc("span"),"class","fas fa-fw"),Ec(e,"fa-search-dollar",Al("pro")&&!t[22].payment_type),Ec(e,"fa-dollar-sign","full"===t[22].payment_type),Ec(e,"fa-hand-holding-usd","partial"===t[22].payment_type),yc(n,"type","button"),yc(n,"class","btn btn-default px-2 py-1")},m:function(u,a){var c;(cc(u,n,a),ac(n,e),o)||(i=[hc(n,"click",(function(){Ga(t[7](t[22]))&&t[7](t[22]).apply(this,arguments)})),nc(r=vv.call(null,n,t[22].payment_type?Zu(c="".concat(Rl.l10n.payment,": ")).call(c,t[22].payment_title):Rl.l10n.attach_payment))],o=!0)},p:function(n,o){var i;t=n,4&o&&Ec(e,"fa-search-dollar",Al("pro")&&!t[22].payment_type),4&o&&Ec(e,"fa-dollar-sign","full"===t[22].payment_type),4&o&&Ec(e,"fa-hand-holding-usd","partial"===t[22].payment_type),r&&Ga(r.update)&&4&o&&r.update.call(null,t[22].payment_type?Zu(i="".concat(Rl.l10n.payment,": ")).call(i,t[22].payment_title):Rl.l10n.attach_payment)},d:function(t){t&&fc(n),o=!1,Ua(i)}}}function Ev(t){var n,e,r;return{c:function(){(n=sc("button")).innerHTML='<span class="far fa-fw fa-calendar-alt"></span>',yc(n,"type","button"),yc(n,"class","btn btn-default px-2 py-1")},m:function(o,i){cc(o,n,i),e||(r=[hc(n,"click",(function(){Ga(t[8](t[22]))&&t[8](t[22]).apply(this,arguments)})),nc(vv.call(null,n,Rl.l10n.package_schedule))],e=!0)},p:function(n,e){t=n},d:function(t){t&&fc(n),e=!1,Ua(r)}}}function Av(t){var n,e,r;return{c:function(){(n=sc("button")).innerHTML='<span class="fas fa-fw fa-link"></span>',yc(n,"type","button"),yc(n,"class","btn btn-default px-2 py-1")},m:function(o,i){cc(o,n,i),e||(r=[hc(n,"click",(function(){Ga(t[11](t[22]))&&t[11](t[22]).apply(this,arguments)})),nc(vv.call(null,n,Rl.l10n.view_series))],e=!0)},p:function(n,e){t=n},d:function(t){t&&fc(n),e=!1,Ua(r)}}}function jv(t){for(var n,e,r,o,i,u,a,c,f,l,s,d,p,v,h,m,y,g,_,$,b,w,x,k,O,S,E,A,j=t[22].name+"",T=Al("collaborative-services")&&t[22].collaborative_token,P=Al("compound-services")&&t[22].compound_token,R=t[22].payment_id||Al("pro"),B=t[22].number_of_persons+"",I=Al("packages")&&t[22].package_id,D=Al("recurring-appointments")&&t[22].series_id,M=T&&xv(t),C=P&&kv(t),N=Rl.statuses,L=[],F=0;F<N.length;F+=1)L[F]=Ov(gv(t,N,F));var z=R&&Sv(t),q=I&&Ev(t),Y=D&&Av(t);return{c:function(){n=sc("li"),e=sc("div"),r=sc("a"),o=dc(j),i=pc(),u=sc("div"),M&&M.c(),a=pc(),C&&C.c(),c=pc(),f=sc("div"),l=sc("button"),s=sc("span"),v=pc(),h=sc("div");for(var p=0;p<L.length;p+=1)L[p].c();m=pc(),z&&z.c(),y=pc(),g=sc("button"),_=sc("i"),$=dc("×"),b=dc(B),w=pc(),q&&q.c(),x=pc(),Y&&Y.c(),k=pc(),O=sc("a"),S=pc(),yc(r,"title",Rl.l10n.edit_booking_details),yc(r,"href",""),yc(e,"class","col mt-1"),yc(s,"class",d="fa-fw "+pv(t[22].status)),yc(l,"type","button"),yc(l,"class","btn btn-default px-2 py-1 dropdown-toggle"),yc(l,"data-toggle","dropdown"),yc(h,"class","dropdown-menu"),yc(f,"class","dropdown d-inline-block"),yc(_,"class","far fa-fw fa-user"),yc(g,"class","btn btn-default px-2 py-1"),kc(g,"opacity","1"),yc(O,"href","#"),yc(O,"class","far fa-fw fa-trash-alt text-danger"),yc(u,"class","ml-auto"),yc(n,"class","row mb-1"),Ec(n,"d-none",t[24]>4&&!t[0])},m:function(d,j){cc(d,n,j),ac(n,e),ac(e,r),ac(r,o),ac(n,i),ac(n,u),M&&M.m(u,null),ac(u,a),C&&C.m(u,null),ac(u,c),ac(u,f),ac(f,l),ac(l,s),ac(f,v),ac(f,h);for(var T=0;T<L.length;T+=1)L[T].m(h,null);var P;(ac(u,m),z&&z.m(u,null),ac(u,y),ac(u,g),ac(g,_),ac(g,$),ac(g,b),ac(u,w),q&&q.m(u,null),ac(u,x),Y&&Y.m(u,null),ac(u,k),ac(u,O),ac(n,S),E)||(A=[hc(r,"click",mc((function(){Ga(t[5](t[22]))&&t[5](t[22]).apply(this,arguments)}))),nc(p=vv.call(null,l,Zu(P="".concat(Rl.l10n.status,": ")).call(P,dv(t[22].status)))),hc(g,"click",(function(){Ga(t[6](t[22].id))&&t[6](t[22].id).apply(this,arguments)})),hc(O,"click",mc((function(){Ga(t[12](t[22]))&&t[12](t[22]).apply(this,arguments)}))),nc(vv.call(null,O,Rl.l10n.remove_customer))],E=!0)},p:function(e,r){var i;if(t=e,4&r&&j!==(j=t[22].name+"")&&wc(o,j),4&r&&(T=Al("collaborative-services")&&t[22].collaborative_token),T?M?M.p(t,r):((M=xv(t)).c(),M.m(u,a)):M&&(M.d(1),M=null),4&r&&(P=Al("compound-services")&&t[22].compound_token),P?C?C.p(t,r):((C=kv(t)).c(),C.m(u,c)):C&&(C.d(1),C=null),4&r&&d!==(d="fa-fw "+pv(t[22].status))&&yc(s,"class",d),p&&Ga(p.update)&&4&r&&p.update.call(null,Zu(i="".concat(Rl.l10n.status,": ")).call(i,dv(t[22].status))),4&r){var f;for(N=Rl.statuses,f=0;f<N.length;f+=1){var l=gv(t,N,f);L[f]?L[f].p(l,r):(L[f]=Ov(l),L[f].c(),L[f].m(h,null))}for(;f<L.length;f+=1)L[f].d(1);L.length=N.length}4&r&&(R=t[22].payment_id||Al("pro")),R?z?z.p(t,r):((z=Sv(t)).c(),z.m(u,y)):z&&(z.d(1),z=null),4&r&&B!==(B=t[22].number_of_persons+"")&&wc(b,B),4&r&&(I=Al("packages")&&t[22].package_id),I?q?q.p(t,r):((q=Ev(t)).c(),q.m(u,x)):q&&(q.d(1),q=null),4&r&&(D=Al("recurring-appointments")&&t[22].series_id),D?Y?Y.p(t,r):((Y=Av(t)).c(),Y.m(u,k)):Y&&(Y.d(1),Y=null),1&r&&Ec(n,"d-none",t[24]>4&&!t[0])},d:function(t){t&&fc(n),M&&M.d(),C&&C.d(),lc(L,t),z&&z.d(),q&&q.d(),Y&&Y.d(),E=!1,Ua(A)}}}function Tv(t){var n,e,r;return{c:function(){(n=sc("span")).textContent="...",yc(n,"class","btn btn-default"),kc(n,"width","100%"),kc(n,"line-height","0"),kc(n,"padding-top","0"),kc(n,"padding-bottom","8px"),kc(n,"margin-bottom","10px"),yc(n,"role","button")},m:function(o,i){cc(o,n,i),e||(r=hc(n,"click",t[15]),e=!0)},p:Fa,d:function(t){t&&fc(n),e=!1,r()}}}function Pv(t){var n,e=Rl.l10n.notices.overflow_capacity.replace("%d",t[4].overflow_capacity)+"";return{c:function(){n=dc(e)},m:function(t,e){cc(t,n,e)},p:function(t,r){16&r&&e!==(e=Rl.l10n.notices.overflow_capacity.replace("%d",t[4].overflow_capacity)+"")&&wc(n,e)},d:function(t){t&&fc(n)}}}function Rv(t){for(var n,e,r=t[4].customers_appointments_limit,o=[],i=0;i<r.length;i+=1)o[i]=Iv(mv(t,r,i));var u=function(t){return uf(o[t],1,1,(function(){o[t]=null}))};return{c:function(){for(var t=0;t<o.length;t+=1)o[t].c();n=vc()},m:function(t,r){for(var i=0;i<o.length;i+=1)o[i].m(t,r);cc(t,n,r),e=!0},p:function(t,e){if(16&e){var i;for(r=t[4].customers_appointments_limit,i=0;i<r.length;i+=1){var a=mv(t,r,i);o[i]?(o[i].p(a,e),of(o[i],1)):(o[i]=Iv(a),o[i].c(),of(o[i],1),o[i].m(n.parentNode,n))}for(ef(),i=r.length;i<o.length;i+=1)u(i);rf()}},i:function(t){if(!e){for(var n=0;n<r.length;n+=1)of(o[n]);e=!0}},o:function(t){o=Oa(o).call(o,Boolean);for(var n=0;n<o.length;n+=1)uf(o[n]);e=!1},d:function(t){lc(o,t),t&&fc(n)}}}function Bv(t){var n,e=t[19]+"";return{c:function(){n=dc(e)},m:function(t,e){cc(t,n,e)},p:function(t,r){16&r&&e!==(e=t[19]+"")&&wc(n,e)},d:function(t){t&&fc(n)}}}function Iv(t){var n,e;return n=new xd({props:{$$slots:{default:[Bv]},$$scope:{ctx:t}}}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},p:function(t,e){var r={};268435472&e&&(r.$$scope={dirty:e,ctx:t}),n.$set(r)},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Dv(t){for(var n,e,r,o,i,u,a,c,f,l,s,d,p,v=Rl.l10n.customers+"",h=t[1].min>1&&t[1].min>ls(t[2]),m=t[3]&&_v(t),y=t[2].length>5&&$v(t),g=h&&bv(t),_=t[2],$=[],b=0;b<_.length;b+=1)$[b]=jv(yv(t,_,b));var w=t[2].length>5&&!t[0]&&Tv(t);l=new xd({props:{show:t[4].overflow_capacity>0,type:"danger",$$slots:{default:[Pv]},$$scope:{ctx:t}}});var x=t[4].customers_appointments_limit&&Rv(t);return{c:function(){n=sc("label"),e=dc(v),r=pc(),m&&m.c(),o=pc(),y&&y.c(),i=pc(),g&&g.c(),u=pc(),a=sc("ul");for(var p=0;p<$.length;p+=1)$[p].c();c=pc(),w&&w.c(),f=pc(),lf(l.$$.fragment),s=pc(),x&&x.c(),d=vc(),yc(a,"class","list-unstyled pl-0 bookly-hide-empty mr-3"),Ec(a,"my-0",!t[2].length)},m:function(t,v){cc(t,n,v),ac(n,e),ac(n,r),m&&m.m(n,null),cc(t,o,v),y&&y.m(t,v),cc(t,i,v),g&&g.m(t,v),cc(t,u,v),cc(t,a,v);for(var h=0;h<$.length;h+=1)$[h].m(a,null);cc(t,c,v),w&&w.m(t,v),cc(t,f,v),sf(l,t,v),cc(t,s,v),x&&x.m(t,v),cc(t,d,v),p=!0},p:function(t,e){var r=Wi(e,1)[0];if(t[3]?m?m.p(t,r):((m=_v(t)).c(),m.m(n,null)):m&&(m.d(1),m=null),t[2].length>5?y?y.p(t,r):((y=$v(t)).c(),y.m(i.parentNode,i)):y&&(y.d(1),y=null),6&r&&(h=t[1].min>1&&t[1].min>ls(t[2])),h?g?(g.p(t,r),6&r&&of(g,1)):((g=bv(t)).c(),of(g,1),g.m(u.parentNode,u)):g&&(ef(),uf(g,1,1,(function(){g=null})),rf()),8165&r){var o;for(_=t[2],o=0;o<_.length;o+=1){var c=yv(t,_,o);$[o]?$[o].p(c,r):($[o]=jv(c),$[o].c(),$[o].m(a,null))}for(;o<$.length;o+=1)$[o].d(1);$.length=_.length}4&r&&Ec(a,"my-0",!t[2].length),t[2].length>5&&!t[0]?w?w.p(t,r):((w=Tv(t)).c(),w.m(f.parentNode,f)):w&&(w.d(1),w=null);var s={};16&r&&(s.show=t[4].overflow_capacity>0),268435472&r&&(s.$$scope={dirty:r,ctx:t}),l.$set(s),t[4].customers_appointments_limit?x?(x.p(t,r),16&r&&of(x,1)):((x=Rv(t)).c(),of(x,1),x.m(d.parentNode,d)):x&&(ef(),uf(x,1,1,(function(){x=null})),rf())},i:function(t){p||(of(g),of(l.$$.fragment,t),of(x),p=!0)},o:function(t){uf(g),uf(l.$$.fragment,t),uf(x),p=!1},d:function(t){t&&fc(n),m&&m.d(),t&&fc(o),y&&y.d(t),t&&fc(i),g&&g.d(t),t&&fc(u),t&&fc(a),lc($,t),t&&fc(c),w&&w.d(t),t&&fc(f),df(l,t),t&&fc(s),x&&x.d(t),t&&fc(d)}}}function Mv(t,n,e){var r,o,i,a,c,f,l;Va(t,$s,(function(t){return e(1,r=t)})),Va(t,ts,(function(t){return e(2,o=t)})),Va(t,Rf,(function(t){return e(16,i=t)})),Va(t,is,(function(t){return e(17,a=t)})),Va(t,hs,(function(t){return e(18,c=t)})),Va(t,Nl,(function(t){return e(3,f=t)})),Va(t,rs,(function(t){return e(4,l=t)}));var s=!1;function d(t){tc(ts,o=Oa(o).call(o,(function(n){return n!==t})),o)}return[s,r,o,f,l,function(t){BooklyCustomerDetailsDialog.showDialog({customer:t,service:Nl.get(),capacity:Math.max(1,r.max-ls(o,t)),done:function(){return ts.set(o)}})},function(t){BooklyCustomerDialog.showDialog({action:"load",customerId:t,onDone:function(t){var n=ds(t);Oa(o).call(o,(function(e){e.id===t.id&&(e.name=n,e.group_id=t.group_id)}));var e=Ol(t.id,i.customers);e&&(e.name=n,e.group_id=t.group_id),Rf.set(i),ts.set(o),tc(is,a=!0,a)}})},function(t){!t.payment_id||t.payment_action?BooklyAttachPaymentDialog.showDialog({customer:t,done:function(){return ts.set(o)}}):BooklyPaymentDetailsDialog.showDialog({customer:t,done:function(){return ts.set(o)}})},function(t){u.default(document.body).trigger("bookly_packages.schedule_dialog",[t.package_id,function(n){kl(n).call(n,Number(t.ca_id))&&d(t),c("refresh")}])},function(t){var n=u.default(".bookly-js-staff-pills li > a.active"),e=n.length?function(){return n.trigger("click")}:function(){return u.default("#bookly-appointments-list").DataTable().ajax.reload()};BooklyCollaborativeDialog.showDialog({collaborative_token:t.collaborative_token,done:e})},function(t){var n=u.default(".bookly-js-staff-pills li > a.active"),e=n.length?function(){return n.trigger("click")}:function(){return u.default("#bookly-appointments-list").DataTable().ajax.reload()};BooklyCompoundDialog.showDialog({compound_token:t.compound_token,done:e})},function(t){var n=u.default(".bookly-js-staff-pills li > a.active"),e=n.length?function(){return n.trigger("click")}:function(){return u.default("#bookly-appointments-list").DataTable().ajax.reload()};BooklySeriesDialog.showDialog({series_id:t.series_id,done:e})},d,function(){return e(0,s=!s)},function(t,n,e,r){return tc(ts,e[r].status=n.id,o)},function(){return e(0,s=!s)}]}var Cv=function(t){nn(e,t);var n=hv(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Mv,Dv,Wa,{}),r}return e}(hf);function Nv(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Lv(t,n){var e;if(void 0===Ji||null==mu(t)){if(yu(t)||(e=function(t,n){var e;if(!t)return;if("string"==typeof t)return Fv(t,n);var r=vu(e=Object.prototype.toString.call(t)).call(e,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return oa(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Fv(t,n)}(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,a=!1;return{s:function(){e=Si(t)},n:function(){var t=e.next();return u=t.done,t},e:function(t){a=!0,i=t},f:function(){try{u||null==e.return||e.return()}finally{if(a)throw i}}}}function Fv(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function zv(t,n,e){var r=vu(t).call(t);return r[12]=n[e],r}function qv(t){var n,e,r,o=t[12].name+"";return{c:function(){n=sc("option"),e=dc(o),n.__value=r=t[12].id,n.value=n.__value},m:function(t,r){cc(t,n,r),ac(n,e)},p:function(t,i){2&i&&o!==(o=t[12].name+"")&&wc(e,o),2&i&&r!==(r=t[12].id)&&(n.__value=r,n.value=n.__value)},d:function(t){t&&fc(n)}}}function Yv(t){for(var n,e,r,o,i,u,a,c,f,l,s=Rl.l10n.new_customer+"",d=t[1].customers,p=[],v=0;v<d.length;v+=1)p[v]=qv(zv(t,d,v));return{c:function(){n=sc("div"),e=sc("select");for(var f=0;f<p.length;f+=1)p[f].c();r=pc(),o=sc("div"),i=sc("button"),u=sc("i"),a=pc(),c=dc(s),yc(e,"class","form-control"),yc(e,"data-placeholder",Rl.l10n.search_customers),e.multiple=!0,yc(u,"class","fas fa-fw fa-plus"),yc(i,"class","btn btn-success"),yc(i,"type","button"),yc(o,"class","input-group-append"),yc(n,"class","input-group"),Ec(n,"d-none",t[2])},m:function(s,d){cc(s,n,d),ac(n,e);for(var v=0;v<p.length;v+=1)p[v].m(e,null);t[8](e),ac(n,r),ac(n,o),ac(o,i),ac(i,u),ac(i,a),ac(i,c),f||(l=hc(i,"click",t[3]),f=!0)},p:function(t,r){var o=Wi(r,1)[0];if(2&o){var i;for(d=t[1].customers,i=0;i<d.length;i+=1){var u=zv(t,d,i);p[i]?p[i].p(u,o):(p[i]=qv(u),p[i].c(),p[i].m(e,null))}for(;i<p.length;i+=1)p[i].d(1);p.length=d.length}4&o&&Ec(n,"d-none",t[2])},i:Fa,o:Fa,d:function(e){e&&fc(n),lc(p,e),t[8](null),f=!1,l()}}}function Hv(t,n,e){var r,o,i,a,c,f,l,s,d;function p(){!function(t,n){u.default(t).select2({theme:"bootstrap4",dropdownParent:"#bookly-appointment-dialog",allowClear:!1,language:{noResults:function(){return Rl.l10n.no_result_found}}}).off().on("select2:select select2:unselect",(function(t){return n(Zf(t.params.data.id))}))}(f,(function(t){var n,e=Sl(Ol(t,r.customers));cs(e),tc(ts,o=Zu(n=[]).call(n,Gu(o),[e]),o)}))}function v(){!function(t,n,e){u.default(t).select2({theme:"bootstrap4",dropdownParent:"#bookly-appointment-dialog",allowClear:!1,language:{noResults:function(){return Rl.l10n.no_result_found},searching:function(){return Rl.l10n.searching}},ajax:{url:ajaxurl,dataType:"json",delay:250,data:function(t){return{action:"bookly_get_customers_list",filter:t.term,page:t.page||1,timezone:!0,csrf_token:jl}},processResults:function(t){var n;return e(t),{results:_a(n=t.results).call(n,(function(t){return{id:t.id,text:t.name}})),pagination:t.pagination}}}}).off().on("select2:selecting",(function(e){e.preventDefault(),n(e.params.args.data.id),u.default(t).select2("close")}))}(f,(function(t){var n,e=Sl(Ol(t,r.customers));cs(e),tc(ts,o=Zu(n=[]).call(n,Gu(o),[e]),o)}),(function(t){var n,e=Lv(t.results);try{for(e.s();!(n=e.n()).done;){var o,i=n.value;if(!Ol(i.id,r.customers))tc(Rf,r.customers=Zu(o=[]).call(o,Gu(r.customers),[i]),r)}}catch(t){e.e(t)}finally{e.f()}}))}return Va(t,Rf,(function(t){return e(1,r=t)})),Va(t,ts,(function(t){return e(5,o=t)})),Va(t,is,(function(t){return e(9,i=t)})),Va(t,Nl,(function(t){return e(6,a=t)})),Va(t,$s,(function(t){return e(7,c=t)})),d=function(){if(f&&i){var t=u.default(f).data("select2");if(t){var n=t.options.options;u.default(f).select2("destroy"),u.default(f).select2(n)}tc(is,i=!1,i)}},Mc().$$.after_update.push(d),t.$$.update=function(){2&t.$$.dirty&&e(4,l=r.customers_loaded?"normal":!1===r.customers_loaded?"remote":void 0),17&t.$$.dirty&&f&&("normal"===l?p():"remote"===l&&v()),224&t.$$.dirty&&e(2,s=!Al("waiting-list")&&a&&ls(o)>=c.max)},[f,r,s,function(){BooklyCustomerDialog.showDialog({action:"create",onDone:function(t){var n=ds(t);r.customers.push({name:n,group_id:t.group_id,id:t.id,number_of_persons:1,timezone:null});var e={id:t.id,name:n,group_id:t.group_id,number_of_persons:1,timezone:null};cs(e),o.push(e),ts.set(o),Rf.set(r)}})},l,o,a,c,function(t){Lc[t?"unshift":"push"]((function(){e(0,f=t)}))}]}var Uv=function(t){nn(e,t);var n=Nv(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Hv,Yv,Wa,{}),r}return e}(hf);function Gv(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Wv(t){var n,e=Rl.l10n.notices.date_interval_warning+"";return{c:function(){n=dc(e)},m:function(t,e){cc(t,n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Jv(t){var n,e=Rl.l10n.notices.interval_not_in_staff_schedule+"";return{c:function(){n=dc(e)},m:function(t,e){cc(t,n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Vv(t){var n,e=Rl.l10n.notices.interval_not_in_service_schedule+"";return{c:function(){n=dc(e)},m:function(t,e){cc(t,n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Qv(t){var n,e=Rl.l10n.notices.date_interval_not_available+"";return{c:function(){n=dc(e)},m:function(t,e){cc(t,n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Kv(t){var n,e=Rl.l10n.notices.staff_reaches_working_time_limit+"";return{c:function(){n=dc(e)},m:function(t,e){cc(t,n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Xv(t){var n,e=Rl.l10n.notices.no_timeslots_available+"";return{c:function(){n=dc(e)},m:function(t,e){cc(t,n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Zv(t){var n,e,r,o,i,u,a,c,f,l,s,d;return n=new xd({props:{show:t[0].date_interval_warning,class:"mt-n2",$$slots:{default:[Wv]},$$scope:{ctx:t}}}),r=new xd({props:{show:t[0].interval_not_in_staff_schedule,class:"mt-n2",$$slots:{default:[Jv]},$$scope:{ctx:t}}}),i=new xd({props:{show:t[0].interval_not_in_service_schedule,class:"mt-n2",$$slots:{default:[Vv]},$$scope:{ctx:t}}}),a=new xd({props:{show:t[0].date_interval_not_available,class:"mt-n2",$$slots:{default:[Qv]},$$scope:{ctx:t}}}),f=new xd({props:{show:t[0].staff_reaches_working_time_limit,class:"mt-n2",$$slots:{default:[Kv]},$$scope:{ctx:t}}}),s=new xd({props:{show:t[0].no_timeslots_available,class:"mt-n2",$$slots:{default:[Xv]},$$scope:{ctx:t}}}),{c:function(){lf(n.$$.fragment),e=pc(),lf(r.$$.fragment),o=pc(),lf(i.$$.fragment),u=pc(),lf(a.$$.fragment),c=pc(),lf(f.$$.fragment),l=pc(),lf(s.$$.fragment)},m:function(t,p){sf(n,t,p),cc(t,e,p),sf(r,t,p),cc(t,o,p),sf(i,t,p),cc(t,u,p),sf(a,t,p),cc(t,c,p),sf(f,t,p),cc(t,l,p),sf(s,t,p),d=!0},p:function(t,e){var o=Wi(e,1)[0],u={};1&o&&(u.show=t[0].date_interval_warning),2&o&&(u.$$scope={dirty:o,ctx:t}),n.$set(u);var c={};1&o&&(c.show=t[0].interval_not_in_staff_schedule),2&o&&(c.$$scope={dirty:o,ctx:t}),r.$set(c);var l={};1&o&&(l.show=t[0].interval_not_in_service_schedule),2&o&&(l.$$scope={dirty:o,ctx:t}),i.$set(l);var d={};1&o&&(d.show=t[0].date_interval_not_available),2&o&&(d.$$scope={dirty:o,ctx:t}),a.$set(d);var p={};1&o&&(p.show=t[0].staff_reaches_working_time_limit),2&o&&(p.$$scope={dirty:o,ctx:t}),f.$set(p);var v={};1&o&&(v.show=t[0].no_timeslots_available),2&o&&(v.$$scope={dirty:o,ctx:t}),s.$set(v)},i:function(t){d||(of(n.$$.fragment,t),of(r.$$.fragment,t),of(i.$$.fragment,t),of(a.$$.fragment,t),of(f.$$.fragment,t),of(s.$$.fragment,t),d=!0)},o:function(t){uf(n.$$.fragment,t),uf(r.$$.fragment,t),uf(i.$$.fragment,t),uf(a.$$.fragment,t),uf(f.$$.fragment,t),uf(s.$$.fragment,t),d=!1},d:function(t){df(n,t),t&&fc(e),df(r,t),t&&fc(o),df(i,t),t&&fc(u),df(a,t),t&&fc(c),df(f,t),t&&fc(l),df(s,t)}}}function th(t,n,e){var r;return Va(t,rs,(function(t){return e(0,r=t)})),[r]}var nh=function(t){nn(e,t);var n=Gv(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,th,Zv,Wa,{}),r}return e}(hf);function eh(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function rh(t){var n,e,r,o,i,u;return{c:function(){n=sc("div"),e=sc("input"),r=pc(),(o=sc("label")).textContent="".concat(Rl.l10n.skip_date),yc(e,"type","checkbox"),yc(e,"id","bookly-skip-date"),yc(e,"class","custom-control-input"),yc(o,"for","bookly-skip-date"),yc(o,"class","custom-control-label"),yc(n,"class","custom-control custom-checkbox mb-2")},m:function(a,c){cc(a,n,c),ac(n,e),e.checked=t[0],ac(n,r),ac(n,o),i||(u=hc(e,"change",t[1]),i=!0)},p:function(t,n){1&Wi(n,1)[0]&&(e.checked=t[0])},i:Fa,o:Fa,d:function(t){t&&fc(n),i=!1,u()}}}function oh(t,n,e){var r;return Va(t,Yl,(function(t){return e(0,r=t)})),[r,function(){r=this.checked,Yl.set(r)}]}var ih=function(t){nn(e,t);var n=eh(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,oh,rh,Wa,{}),r}return e}(hf);function uh(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function ah(t){var n,e,r,o;function i(t,n){return t[1]&&t[1].url?fh:ch}var u=i(t),a=u(t);return{c:function(){n=sc("div"),(e=sc("label")).textContent="".concat(Rl.l10n.online_meeting),r=pc(),o=sc("div"),a.c(),yc(n,"class","form-group")},m:function(i,u){cc(i,n,u),ac(n,e),ac(n,r),ac(n,o),a.m(o,null),t[4](n)},p:function(t,n){u===(u=i(t))&&a?a.p(t,n):(a.d(1),(a=u(t))&&(a.c(),a.m(o,null)))},d:function(e){e&&fc(n),a.d(),t[4](null)}}}function ch(t){var n;return{c:function(){(n=sc("small")).textContent="".concat(Rl.l10n.meeting_create),yc(n,"class","text-muted")},m:function(t,e){cc(t,n,e)},p:Fa,d:function(t){t&&fc(n)}}}function fh(t){var n,e,r,o,i,u,a,c,f,l=t[1].url+"";function s(t,n){return t[1].copied?sh:lh}var d=s(t),p=d(t);return{c:function(){n=sc("div"),e=sc("a"),r=dc(l),i=pc(),u=sc("i"),a=pc(),p.c(),c=pc(),(f=sc("small")).textContent="".concat(Rl.l10n.meeting_code),yc(e,"href",o=t[1].url),yc(e,"target","_blank"),yc(u,"class","fas fa-external-link-alt fa-fw fa-sm text-muted ml-1"),yc(n,"class","btn btn-default disabled d-flex align-items-center"),kc(n,"opacity","1"),kc(n,"cursor","default"),yc(f,"class","text-muted")},m:function(t,o){cc(t,n,o),ac(n,e),ac(e,r),ac(n,i),ac(n,u),ac(n,a),p.m(n,null),cc(t,c,o),cc(t,f,o)},p:function(t,i){2&i&&l!==(l=t[1].url+"")&&wc(r,l),2&i&&o!==(o=t[1].url)&&yc(e,"href",o),d===(d=s(t))&&p?p.p(t,i):(p.d(1),(p=d(t))&&(p.c(),p.m(n,null)))},d:function(t){t&&fc(n),p.d(),t&&fc(c),t&&fc(f)}}}function lh(t){var n,e,r;return{c:function(){yc(n=sc("a"),"class","far fa-copy fa-fw text-secondary text-decoration-none ml-auto"),yc(n,"href",""),yc(n,"title",Rl.l10n.copy_to_clipboard)},m:function(o,i){cc(o,n,i),e||(r=hc(n,"click",mc(t[3])),e=!0)},p:Fa,d:function(t){t&&fc(n),e=!1,r()}}}function sh(t){var n;return{c:function(){(n=sc("small")).textContent="".concat(Rl.l10n.copied),yc(n,"class","text-muted ml-auto")},m:function(t,e){cc(t,n,e)},p:Fa,d:function(t){t&&fc(n)}}}function dh(t){var n,e=(t[1]&&t[1].url||t[2]&&t[2].id&&"off"!==t[2].online_meetings)&&ah(t);return{c:function(){e&&e.c(),n=vc()},m:function(t,r){e&&e.m(t,r),cc(t,n,r)},p:function(t,r){var o=Wi(r,1)[0];t[1]&&t[1].url||t[2]&&t[2].id&&"off"!==t[2].online_meetings?e?e.p(t,o):((e=ah(t)).c(),e.m(n.parentNode,n)):e&&(e.d(1),e=null)},i:Fa,o:Fa,d:function(t){e&&e.d(t),t&&fc(n)}}}function ph(t,n,e){var r,o,i;return Va(t,zl,(function(t){return e(1,r=t)})),Va(t,Nl,(function(t){return e(2,o=t)})),[i,r,o,function(){var t=document.createElement("textarea");t.textContent=r.url,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",i.appendChild(t),t.select(),t.setSelectionRange(0,99999),document.execCommand("copy"),i.removeChild(t),tc(zl,r.copied=!0,r),Mf((function(){tc(zl,r.copied=!1,r)}),1e3)},function(t){Lc[t?"unshift":"push"]((function(){e(0,i=t)}))}]}var vh=function(t){nn(e,t);var n=uh(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,ph,dh,Wa,{}),r}return e}(hf);function hh(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function mh(t){var n,e,r,o,i;return{c:function(){(n=sc("label")).textContent="".concat(Rl.l10n.internal_note),e=pc(),r=sc("textarea"),yc(n,"for","bookly-internal-note"),yc(r,"class","form-control"),yc(r,"id","bookly-internal-note")},m:function(u,a){cc(u,n,a),cc(u,e,a),cc(u,r,a),xc(r,t[0]),o||(i=hc(r,"input",t[1]),o=!0)},p:function(t,n){1&Wi(n,1)[0]&&xc(r,t[0])},i:Fa,o:Fa,d:function(t){t&&fc(n),t&&fc(e),t&&fc(r),o=!1,i()}}}function yh(t,n,e){var r;return Va(t,ns,(function(t){return e(0,r=t)})),[r,function(){r=this.value,ns.set(r)}]}var gh=function(t){nn(e,t);var n=hh(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,yh,mh,Wa,{}),r}return e}(hf);function _h(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function $h(t){var n,e,r,o,i,u;return{c:function(){n=sc("div"),e=sc("input"),r=pc(),(o=sc("label")).textContent="".concat(Rl.l10n.send_notifications),yc(e,"type","checkbox"),yc(e,"id","bookly-send-notifications"),yc(e,"class","custom-control-input"),yc(o,"for","bookly-send-notifications"),yc(o,"class","custom-control-label"),yc(n,"class","custom-control custom-checkbox mb-2")},m:function(a,c){cc(a,n,c),ac(n,e),e.checked=t[0],ac(n,r),ac(n,o),i||(u=hc(e,"change",t[1]),i=!0)},p:function(t,n){1&Wi(n,1)[0]&&(e.checked=t[0])},i:Fa,o:Fa,d:function(t){t&&fc(n),i=!1,u()}}}function bh(t,n,e){var r;return Va(t,es,(function(t){return e(0,r=t)})),null===r&&tc(es,r="1"===Rl.send_notifications,r),[r,function(){r=this.checked,es.set(r)}]}var wh=function(t){nn(e,t);var n=_h(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,bh,$h,Wa,{}),r}return e}(hf);function xh(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function kh(t){var n,e,r,o,i,u,a=Al("locations"),c=Al("tasks"),f=t[0]&&null===t[0].id&&Oh();e=new vh({});var l=a&&function(t){var n,e,r;return e=new rp({}),{c:function(){n=sc("div"),lf(e.$$.fragment),yc(n,"class","form-group")},m:function(t,o){cc(t,n,o),sf(e,n,null),r=!0},i:function(t){r||(of(e.$$.fragment,t),r=!0)},o:function(t){uf(e.$$.fragment,t),r=!1},d:function(t){t&&fc(n),df(e)}}}(),s=c&&function(t){var n,e;return n=new ih({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}();return{c:function(){f&&f.c(),n=pc(),lf(e.$$.fragment),r=pc(),l&&l.c(),o=pc(),s&&s.c(),i=vc()},m:function(t,a){f&&f.m(t,a),cc(t,n,a),sf(e,t,a),cc(t,r,a),l&&l.m(t,a),cc(t,o,a),s&&s.m(t,a),cc(t,i,a),u=!0},p:function(t,e){t[0]&&null===t[0].id?f?1&e&&of(f,1):((f=Oh()).c(),of(f,1),f.m(n.parentNode,n)):f&&(ef(),uf(f,1,1,(function(){f=null})),rf())},i:function(t){u||(of(f),of(e.$$.fragment,t),of(l),of(s),u=!0)},o:function(t){uf(f),uf(e.$$.fragment,t),uf(l),uf(s),u=!1},d:function(t){f&&f.d(t),t&&fc(n),df(e,t),t&&fc(r),l&&l.d(t),t&&fc(o),s&&s.d(t),t&&fc(i)}}}function Oh(t){var n,e;return n=new Kd({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Sh(t){var n,e,r,o,i,u,a,c;r=new ap({});var f=(!t[0]||!1==(t[0].duration>=86400&&1===t[0].units_max))&&Eh();return a=new nh({}),{c:function(){n=sc("div"),e=sc("div"),lf(r.$$.fragment),o=pc(),i=sc("div"),f&&f.c(),u=pc(),lf(a.$$.fragment),yc(e,"class","col-sm-4 form-group"),yc(i,"class","col-sm-8 form-group"),yc(n,"class","form-row")},m:function(t,l){cc(t,n,l),ac(n,e),sf(r,e,null),ac(n,o),ac(n,i),f&&f.m(i,null),cc(t,u,l),sf(a,t,l),c=!0},p:function(t,n){t[0]&&!1!=(t[0].duration>=86400&&1===t[0].units_max)?f&&(ef(),uf(f,1,1,(function(){f=null})),rf()):f?1&n&&of(f,1):((f=Eh()).c(),of(f,1),f.m(i,null))},i:function(t){c||(of(r.$$.fragment,t),of(f),of(a.$$.fragment,t),c=!0)},o:function(t){uf(r.$$.fragment,t),uf(f),uf(a.$$.fragment,t),c=!1},d:function(t){t&&fc(n),df(r),f&&f.d(),t&&fc(u),df(a,t)}}}function Eh(t){var n,e;return n=new yp({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Ah(t){var n,e,r;return e=new sv({}),{c:function(){n=sc("div"),lf(e.$$.fragment),yc(n,"class","mb-2")},m:function(t,o){cc(t,n,o),sf(e,n,null),r=!0},i:function(t){r||(of(e.$$.fragment,t),r=!0)},o:function(t){uf(e.$$.fragment,t),r=!1},d:function(t){t&&fc(n),df(e)}}}function jh(t){var n,e,r,o,i,u,a,c,f,l,s,d,p,v,h,m,y,g,_=Al("pro"),$=Al("recurring-appointments")&&null===t[2].id&&!t[1],b=Rl.service_main&&function(t){var n,e,r;return e=new Gd({}),{c:function(){n=sc("div"),lf(e.$$.fragment),yc(n,"class","form-group")},m:function(t,o){cc(t,n,o),sf(e,n,null),r=!0},i:function(t){r||(of(e.$$.fragment,t),r=!0)},o:function(t){uf(e.$$.fragment,t),r=!1},d:function(t){t&&fc(n),df(e)}}}();r=new Dd({});var w=!Rl.service_main&&function(t){var n,e,r;return e=new Gd({}),{c:function(){n=sc("div"),lf(e.$$.fragment),yc(n,"class","form-group")},m:function(t,o){cc(t,n,o),sf(e,n,null),r=!0},i:function(t){r||(of(e.$$.fragment,t),r=!0)},o:function(t){uf(e.$$.fragment,t),r=!1},d:function(t){t&&fc(n),df(e)}}}(),x=_&&kh(t),k=!t[1]&&Sh(t),O=$&&Ah();return l=new Cv({}),d=new Uv({}),h=new gh({}),y=new wh({}),{c:function(){b&&b.c(),n=pc(),e=sc("div"),lf(r.$$.fragment),o=pc(),w&&w.c(),i=pc(),x&&x.c(),u=pc(),k&&k.c(),a=pc(),O&&O.c(),c=pc(),f=sc("div"),lf(l.$$.fragment),s=pc(),lf(d.$$.fragment),p=pc(),v=sc("div"),lf(h.$$.fragment),m=pc(),lf(y.$$.fragment),yc(e,"class","form-group"),yc(f,"class","form-group"),yc(v,"class","form-group")},m:function(t,_){b&&b.m(t,_),cc(t,n,_),cc(t,e,_),sf(r,e,null),cc(t,o,_),w&&w.m(t,_),cc(t,i,_),x&&x.m(t,_),cc(t,u,_),k&&k.m(t,_),cc(t,a,_),O&&O.m(t,_),cc(t,c,_),cc(t,f,_),sf(l,f,null),ac(f,s),sf(d,f,null),cc(t,p,_),cc(t,v,_),sf(h,v,null),cc(t,m,_),sf(y,t,_),g=!0},p:function(t,n){var e=Wi(n,1)[0];_&&x.p(t,e),t[1]?k&&(ef(),uf(k,1,1,(function(){k=null})),rf()):k?(k.p(t,e),2&e&&of(k,1)):((k=Sh(t)).c(),of(k,1),k.m(a.parentNode,a)),6&e&&($=Al("recurring-appointments")&&null===t[2].id&&!t[1]),$?O?6&e&&of(O,1):((O=Ah()).c(),of(O,1),O.m(c.parentNode,c)):O&&(ef(),uf(O,1,1,(function(){O=null})),rf())},i:function(t){g||(of(b),of(r.$$.fragment,t),of(w),of(x),of(k),of(O),of(l.$$.fragment,t),of(d.$$.fragment,t),of(h.$$.fragment,t),of(y.$$.fragment,t),g=!0)},o:function(t){uf(b),uf(r.$$.fragment,t),uf(w),uf(x),uf(k),uf(O),uf(l.$$.fragment,t),uf(d.$$.fragment,t),uf(h.$$.fragment,t),uf(y.$$.fragment,t),g=!1},d:function(t){b&&b.d(t),t&&fc(n),t&&fc(e),df(r),t&&fc(o),w&&w.d(t),t&&fc(i),x&&x.d(t),t&&fc(u),k&&k.d(t),t&&fc(a),O&&O.d(t),t&&fc(c),t&&fc(f),df(l),df(d),t&&fc(p),t&&fc(v),df(h),t&&fc(m),df(y,t)}}}function Th(t,n,e){var r,o,i;return Va(t,Nl,(function(t){return e(0,r=t)})),Va(t,Yl,(function(t){return e(1,o=t)})),Va(t,vs,(function(t){return e(2,i=t)})),[r,o,i]}var Ph=function(t){nn(e,t);var n=xh(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Th,jh,Wa,{}),r}return e}(hf),Rh=Pf(0),Bh=Sf([As,Rh],(function(t){var n=Wi(t,2),e=n[0],r=n[1];return e?vu(e).call(e,10*r,10*(r+1)):[]})),Ih=Sf([As],(function(t){var n=Wi(t,1)[0];return n?Math.ceil(n.length/10):0}));function Dh(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Mh(t){var n;return{c:function(){yc(n=sc("input"),"autocomplete","off"),yc(n,"class","form-control"),yc(n,"type","text")},m:function(e,r){cc(e,n,r),t[4](n)},p:Fa,i:Fa,o:Fa,d:function(e){e&&fc(n),t[4](null)}}}function Ch(t,n,e){var r,o,i,a=n.item;return i=moment(a.date),Cc((function(){return e(2,o=u.default(r).daterangepicker({parentEl:"#bookly-appointment-dialog > div",singleDatePicker:!0,showDropdowns:!0,locale:Rl.datePicker},(function(t){e(1,a.date=t.format("YYYY-MM-DD"),a),ed(a)})))})),t.$$set=function(t){"item"in t&&e(1,a=t.item)},t.$$.update=function(){12&t.$$.dirty&&i&&o&&(o.data("daterangepicker").setStartDate(i),o.data("daterangepicker").setEndDate(i))},[r,a,o,i,function(t){Lc[t?"unshift":"push"]((function(){e(0,r=t)}))}]}var Nh=function(t){nn(e,t);var n=Dh(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Ch,Mh,Wa,{item:1}),r}return e}(hf);function Lh(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Fh(t,n,e){var r=vu(t).call(t);return r[4]=n[e],r}function zh(t){var n,e,r,o,i=t[4].title+"";return{c:function(){n=sc("option"),e=dc(i),n.__value=r=t[4].value,n.value=n.__value,n.disabled=o=t[4].disabled},m:function(t,r){cc(t,n,r),ac(n,e)},p:function(t,u){2&u&&i!==(i=t[4].title+"")&&wc(e,i),2&u&&r!==(r=t[4].value)&&(n.__value=r,n.value=n.__value),2&u&&o!==(o=t[4].disabled)&&(n.disabled=o)},d:function(t){t&&fc(n)}}}function qh(t){for(var n,e,r,o=t[1],i=[],u=0;u<o.length;u+=1)i[u]=zh(Fh(t,o,u));return{c:function(){n=sc("select");for(var e=0;e<i.length;e+=1)i[e].c();yc(n,"class","form-control custom-select"),void 0===t[0].slots&&Gc((function(){return t[3].call(n)}))},m:function(o,u){cc(o,n,u);for(var a=0;a<i.length;a+=1)i[a].m(n,null);Oc(n,t[0].slots),e||(r=[hc(n,"change",t[3]),hc(n,"change",(function(){Ga(t[2](t[0]))&&t[2](t[0]).apply(this,arguments)}))],e=!0)},p:function(e,r){var u=Wi(r,1)[0];if(t=e,2&u){var a;for(o=t[1],a=0;a<o.length;a+=1){var c=Fh(t,o,a);i[a]?i[a].p(c,u):(i[a]=zh(c),i[a].c(),i[a].m(n,null))}for(;a<i.length;a+=1)i[a].d(1);i.length=o.length}3&u&&Oc(n,t[0].slots)},i:Fa,o:Fa,d:function(t){t&&fc(n),lc(i,t),e=!1,Ua(r)}}}function Yh(t,n,e){var r;Va(t,Os,(function(t){return e(1,r=t)}));var o=n.item;return t.$$set=function(t){"item"in t&&e(0,o=t.item)},[o,r,function(){e(0,o.options=Oa(r).call(r,(function(t){return t.value===o.slots})),o)},function(){o.slots=Sc(this),e(0,o)}]}var Hh=function(t){nn(e,t);var n=Lh(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Yh,qh,Wa,{item:0}),r}return e}(hf);function Uh(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Gh(t){var n,e,r,o;function i(n){t[2](n)}var u={};return void 0!==t[0]&&(u.item=t[0]),e=new Nh({props:u}),Lc.push((function(){return ff(e,"item",i)})),{c:function(){n=sc("div"),lf(e.$$.fragment),yc(n,"class","col-sm-4")},m:function(t,r){cc(t,n,r),sf(e,n,null),o=!0},p:function(t,n){var o={};!r&&1&n&&(r=!0,o.item=t[0],Wc((function(){return r=!1}))),e.$set(o)},i:function(t){o||(of(e.$$.fragment,t),o=!0)},o:function(t){uf(e.$$.fragment,t),o=!1},d:function(t){t&&fc(n),df(e)}}}function Wh(t){var n,e,r,o;function i(n){t[3](n)}var u={};return void 0!==t[0]&&(u.item=t[0]),e=new Hh({props:u}),Lc.push((function(){return ff(e,"item",i)})),{c:function(){n=sc("div"),lf(e.$$.fragment),yc(n,"class","col-sm-3")},m:function(t,r){cc(t,n,r),sf(e,n,null),o=!0},p:function(t,n){var o={};!r&&1&n&&(r=!0,o.item=t[0],Wc((function(){return r=!1}))),e.$set(o)},i:function(t){o||(of(e.$$.fragment,t),o=!0)},o:function(t){uf(e.$$.fragment,t),o=!1},d:function(t){t&&fc(n),df(e)}}}function Jh(t){var n,e,r,o,i,u,a,c,f,l,s,d,p=Ns(t[0].date)+"",v=Ls(t[0].slots,t[0].options)+"",h=t[0].all_day_service_time+"",m=t[1]===t[0].index&&Gh(t),y=t[1]===t[0].index&&Wh(t);return{c:function(){n=sc("div"),e=dc(p),r=pc(),m&&m.c(),o=pc(),i=sc("div"),u=dc(v),a=pc(),c=sc("div"),f=dc(h),l=pc(),y&&y.c(),s=vc(),yc(n,"class","col-sm-3"),Ec(n,"d-none",t[0].deleted||t[1]===t[0].index),yc(i,"class","col-sm-2"),Ec(i,"d-none",t[0].all_day_service_time||t[0].deleted||t[1]===t[0].index),yc(c,"class","col-sm-2"),Ec(c,"d-none",!t[0].all_day_service_time)},m:function(t,p){cc(t,n,p),ac(n,e),cc(t,r,p),m&&m.m(t,p),cc(t,o,p),cc(t,i,p),ac(i,u),cc(t,a,p),cc(t,c,p),ac(c,f),cc(t,l,p),y&&y.m(t,p),cc(t,s,p),d=!0},p:function(t,r){var a=Wi(r,1)[0];(!d||1&a)&&p!==(p=Ns(t[0].date)+"")&&wc(e,p),3&a&&Ec(n,"d-none",t[0].deleted||t[1]===t[0].index),t[1]===t[0].index?m?(m.p(t,a),3&a&&of(m,1)):((m=Gh(t)).c(),of(m,1),m.m(o.parentNode,o)):m&&(ef(),uf(m,1,1,(function(){m=null})),rf()),(!d||1&a)&&v!==(v=Ls(t[0].slots,t[0].options)+"")&&wc(u,v),3&a&&Ec(i,"d-none",t[0].all_day_service_time||t[0].deleted||t[1]===t[0].index),(!d||1&a)&&h!==(h=t[0].all_day_service_time+"")&&wc(f,h),1&a&&Ec(c,"d-none",!t[0].all_day_service_time),t[1]===t[0].index?y?(y.p(t,a),3&a&&of(y,1)):((y=Wh(t)).c(),of(y,1),y.m(s.parentNode,s)):y&&(ef(),uf(y,1,1,(function(){y=null})),rf())},i:function(t){d||(of(m),of(y),d=!0)},o:function(t){uf(m),uf(y),d=!1},d:function(t){t&&fc(n),t&&fc(r),m&&m.d(t),t&&fc(o),t&&fc(i),t&&fc(a),t&&fc(c),t&&fc(l),y&&y.d(t),t&&fc(s)}}}function Vh(t,n,e){var r;Va(t,Es,(function(t){return e(1,r=t)}));var o=n.item;return t.$$set=function(t){"item"in t&&e(0,o=t.item)},[o,r,function(t){e(0,o=t)},function(t){e(0,o=t)}]}var Qh=function(t){nn(e,t);var n=Uh(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Vh,Jh,Wa,{item:0}),r}return e}(hf);function Kh(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Xh(t){var n,e,r;return{c:function(){yc(n=sc("a"),"href",""),yc(n,"class","fas fa-fw fa-check text-decoration-none"),yc(n,"title",Rl.l10n.recurring.apply),Ec(n,"d-none",t[1]!==t[0].index)},m:function(o,i){cc(o,n,i),e||(r=hc(n,"click",mc(t[2])),e=!0)},p:function(t,e){3&Wi(e,1)[0]&&Ec(n,"d-none",t[1]!==t[0].index)},i:Fa,o:Fa,d:function(t){t&&fc(n),e=!1,r()}}}function Zh(t,n,e){var r;Va(t,Es,(function(t){return e(1,r=t)}));var o=n.item;return t.$$set=function(t){"item"in t&&e(0,o=t.item)},[o,r,function(){return tc(Es,r=0,r)}]}var tm=function(t){nn(e,t);var n=Kh(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Zh,Xh,Wa,{item:0}),r}return e}(hf);function nm(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function em(t){var n,e,r;return{c:function(){yc(n=sc("a"),"href",""),yc(n,"class","far fa-fw fa-trash-alt text-danger"),yc(n,"title",Rl.l10n.recurring.delete)},m:function(o,i){cc(o,n,i),e||(r=hc(n,"click",mc(t[1])),e=!0)},p:Fa,i:Fa,o:Fa,d:function(t){t&&fc(n),e=!1,r()}}}function rm(t,n,e){var r=n.item;return t.$$set=function(t){"item"in t&&e(0,r=t.item)},[r,function(){return e(0,r.deleted=!0,r)}]}var om=function(t){nn(e,t);var n=nm(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,rm,em,Wa,{item:0}),r}return e}(hf);function im(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function um(t){var n,e,r;return{c:function(){yc(n=sc("a"),"href",""),yc(n,"class","far fa-fw fa-edit text-decoration-none"),yc(n,"title",Rl.l10n.recurring.edit)},m:function(o,i){cc(o,n,i),e||(r=hc(n,"click",mc(t[2])),e=!0)},p:Fa,i:Fa,o:Fa,d:function(t){t&&fc(n),e=!1,r()}}}function am(t,n,e){var r;Va(t,Es,(function(t){return e(1,r=t)}));var o=n.item;return t.$$set=function(t){"item"in t&&e(0,o=t.item)},[o,r,function(){ed(o),tc(Es,r=o.index,r)}]}var cm=function(t){nn(e,t);var n=im(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,am,um,Wa,{item:0}),r}return e}(hf);function fm(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function lm(t){var n,e,r,o;return{c:function(){n=sc("a"),yc(e=sc("span"),"class","fas fa-fw fa-undo"),yc(n,"href",""),yc(n,"class","text-muted"),yc(n,"title",Rl.l10n.recurring.restore)},m:function(i,u){cc(i,n,u),ac(n,e),r||(o=hc(n,"click",mc(t[1])),r=!0)},p:Fa,i:Fa,o:Fa,d:function(t){t&&fc(n),r=!1,o()}}}function sm(t,n,e){var r=n.item;return t.$$set=function(t){"item"in t&&e(0,r=t.item)},[r,function(){return e(0,r.deleted=!1,r)}]}var dm=function(t){nn(e,t);var n=fm(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,sm,lm,Wa,{item:0}),r}return e}(hf);function pm(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function vm(t){var n,e,r,o,i,u,a,c,f,l,s,d,p,v,h,m,y,g,_,$,b,w,x,k,O,S,E,A,j,T,P=t[0].index+"",R=Rl.l10n.recurring.another_time+"";function B(n){t[2](n)}var I={};function D(n){t[3](n)}void 0!==t[0]&&(I.item=t[0]),l=new dm({props:I}),Lc.push((function(){return ff(l,"item",B)})),p=new Qh({props:{item:t[0]}});var M={};function C(n){t[4](n)}void 0!==t[0]&&(M.item=t[0]),b=new cm({props:M}),Lc.push((function(){return ff(b,"item",D)}));var N={};function L(n){t[5](n)}void 0!==t[0]&&(N.item=t[0]),k=new om({props:N}),Lc.push((function(){return ff(k,"item",C)}));var F={};return void 0!==t[0]&&(F.item=t[0]),A=new tm({props:F}),Lc.push((function(){return ff(A,"item",L)})),{c:function(){n=sc("li"),e=sc("div"),r=sc("div"),o=sc("b"),i=dc(P),u=pc(),(a=sc("div")).textContent="".concat(Rl.l10n.recurring.deleted),c=pc(),f=sc("div"),lf(l.$$.fragment),d=pc(),lf(p.$$.fragment),v=pc(),h=sc("div"),m=sc("span"),y=sc("span"),g=dc(R),_=pc(),$=sc("div"),lf(b.$$.fragment),x=pc(),lf(k.$$.fragment),S=pc(),E=sc("div"),lf(A.$$.fragment),yc(r,"class","col-sm-1"),yc(a,"class","col-sm-10 text-muted"),Ec(a,"d-none",!t[0].deleted),yc(f,"class","col-sm-1 text-right"),Ec(f,"d-none",!0!==t[0].deleted),yc(y,"class","fas fa-fw fa-exclamation-triangle text-warning mr-1"),Ec(m,"d-none",!t[0].another_time),yc(h,"class","col-sm-4"),Ec(h,"d-none",t[0].deleted||t[1]===t[0].index),yc($,"class","col-sm-2 text-right"),Ec($,"d-none",t[0].deleted||t[1]===t[0].index),yc(E,"class","col-sm-4 text-right"),Ec(E,"d-none",t[1]!==t[0].index),yc(e,"class","row"),yc(n,"class","list-group-item")},m:function(t,s){cc(t,n,s),ac(n,e),ac(e,r),ac(r,o),ac(o,i),ac(e,u),ac(e,a),ac(e,c),ac(e,f),sf(l,f,null),ac(e,d),sf(p,e,null),ac(e,v),ac(e,h),ac(h,m),ac(m,y),ac(m,g),ac(e,_),ac(e,$),sf(b,$,null),ac($,x),sf(k,$,null),ac(e,S),ac(e,E),sf(A,E,null),T=!0},p:function(t,n){var e=Wi(n,1)[0];(!T||1&e)&&P!==(P=t[0].index+"")&&wc(i,P),1&e&&Ec(a,"d-none",!t[0].deleted);var r={};!s&&1&e&&(s=!0,r.item=t[0],Wc((function(){return s=!1}))),l.$set(r),1&e&&Ec(f,"d-none",!0!==t[0].deleted);var o={};1&e&&(o.item=t[0]),p.$set(o),1&e&&Ec(m,"d-none",!t[0].another_time),3&e&&Ec(h,"d-none",t[0].deleted||t[1]===t[0].index);var u={};!w&&1&e&&(w=!0,u.item=t[0],Wc((function(){return w=!1}))),b.$set(u);var c={};!O&&1&e&&(O=!0,c.item=t[0],Wc((function(){return O=!1}))),k.$set(c),3&e&&Ec($,"d-none",t[0].deleted||t[1]===t[0].index);var d={};!j&&1&e&&(j=!0,d.item=t[0],Wc((function(){return j=!1}))),A.$set(d),3&e&&Ec(E,"d-none",t[1]!==t[0].index)},i:function(t){T||(of(l.$$.fragment,t),of(p.$$.fragment,t),of(b.$$.fragment,t),of(k.$$.fragment,t),of(A.$$.fragment,t),T=!0)},o:function(t){uf(l.$$.fragment,t),uf(p.$$.fragment,t),uf(b.$$.fragment,t),uf(k.$$.fragment,t),uf(A.$$.fragment,t),T=!1},d:function(t){t&&fc(n),df(l),df(p),df(b),df(k),df(A)}}}function hm(t,n,e){var r;Va(t,Es,(function(t){return e(1,r=t)}));var o=n.item;return t.$$set=function(t){"item"in t&&e(0,o=t.item)},[o,r,function(t){e(0,o=t)},function(t){e(0,o=t)},function(t){e(0,o=t)},function(t){e(0,o=t)}]}var mm=function(t){nn(e,t);var n=pm(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,hm,vm,Wa,{item:0}),r}return e}(hf);function ym(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function gm(t,n,e){var r=vu(t).call(t);return r[5]=n[e],r[7]=e,r}function _m(t){var n,e,r,o,i,u=t[7]+1+"";function a(){return t[3](t[7])}return{c:function(){n=sc("li"),e=sc("a"),r=dc(u),yc(e,"href",""),yc(e,"class","page-link"),yc(n,"class","page-item"),Ec(n,"active",t[7]===t[1])},m:function(t,u){cc(t,n,u),ac(n,e),ac(e,r),o||(i=hc(e,"click",mc(a)),o=!0)},p:function(e,r){t=e,2&r&&Ec(n,"active",t[7]===t[1])},d:function(t){t&&fc(n),o=!1,i()}}}function $m(t){for(var n,e,r,o,i,u,a,c,f,l,s=Array(t[0]),d=[],p=0;p<s.length;p+=1)d[p]=_m(gm(t,s,p));return{c:function(){n=sc("nav"),e=sc("ul"),r=sc("li"),(o=sc("a")).innerHTML="<span>«</span>",i=pc();for(var f=0;f<d.length;f+=1)d[f].c();u=pc(),a=sc("li"),(c=sc("a")).innerHTML="<span>»</span>",yc(o,"href",""),yc(o,"class","page-link"),yc(r,"class","page-item"),Ec(r,"disabled",0===t[1]),yc(c,"href",""),yc(c,"class","page-link"),yc(a,"class","page-item"),Ec(a,"disabled",t[1]===t[0]-1),yc(e,"class","pagination"),Ec(n,"d-none",t[0]<=1)},m:function(s,p){cc(s,n,p),ac(n,e),ac(e,r),ac(r,o),ac(e,i);for(var v=0;v<d.length;v+=1)d[v].m(e,null);ac(e,u),ac(e,a),ac(a,c),f||(l=[hc(o,"click",mc(t[2])),hc(c,"click",mc(t[4]))],f=!0)},p:function(t,o){var i=Wi(o,1)[0];if(2&i&&Ec(r,"disabled",0===t[1]),3&i){var c;for(s=Array(t[0]),c=0;c<s.length;c+=1){var f=gm(t,s,c);d[c]?d[c].p(f,i):(d[c]=_m(f),d[c].c(),d[c].m(e,u))}for(;c<d.length;c+=1)d[c].d(1);d.length=s.length}3&i&&Ec(a,"disabled",t[1]===t[0]-1),1&i&&Ec(n,"d-none",t[0]<=1)},i:Fa,o:Fa,d:function(t){t&&fc(n),lc(d,t),f=!1,Ua(l)}}}function bm(t,n,e){var r,o;Va(t,Ih,(function(t){return e(0,r=t)})),Va(t,Rh,(function(t){return e(1,o=t)}));return[r,o,function(){return tc(Rh,--o,o)},function(t){return tc(Rh,o=t,o)},function(){return tc(Rh,++o,o)}]}var wm=function(t){nn(e,t);var n=ym(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,bm,$m,Wa,{}),r}return e}(hf);function xm(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function km(t,n,e){var r=vu(t).call(t);return r[1]=n[e],r}function Om(t){var n,e;return n=new mm({props:{item:t[1]}}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},p:function(t,e){var r={};1&e&&(r.item=t[1]),n.$set(r)},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Sm(t){for(var n,e,r,o,i=t[0],u=[],a=0;a<i.length;a+=1)u[a]=Om(km(t,i,a));var c=function(t){return uf(u[t],1,1,(function(){u[t]=null}))};return r=new wm({}),{c:function(){n=sc("ul");for(var t=0;t<u.length;t+=1)u[t].c();e=pc(),lf(r.$$.fragment),yc(n,"id","bookly-schedule-items"),yc(n,"class","list-group mb-3")},m:function(t,i){cc(t,n,i);for(var a=0;a<u.length;a+=1)u[a].m(n,null);cc(t,e,i),sf(r,t,i),o=!0},p:function(t,e){var r=Wi(e,1)[0];if(1&r){var o;for(i=t[0],o=0;o<i.length;o+=1){var a=km(t,i,o);u[o]?(u[o].p(a,r),of(u[o],1)):(u[o]=Om(a),u[o].c(),of(u[o],1),u[o].m(n,null))}for(ef(),o=i.length;o<u.length;o+=1)c(o);rf()}},i:function(t){if(!o){for(var n=0;n<i.length;n+=1)of(u[n]);of(r.$$.fragment,t),o=!0}},o:function(t){u=Oa(u).call(u,Boolean);for(var n=0;n<u.length;n+=1)uf(u[n]);uf(r.$$.fragment,t),o=!1},d:function(t){t&&fc(n),lc(u,t),t&&fc(e),df(r,t)}}}function Em(t,n,e){var r;return Va(t,Bh,(function(t){return e(0,r=t)})),[r]}var Am=function(t){nn(e,t);var n=xm(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Em,Sm,Wa,{}),r}return e}(hf);function jm(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Tm(t){var n,e,r,o=t[4].default,i=Qa(o,t,t[3],null);return{c:function(){n=sc("div"),i&&i.c(),yc(n,"class",e="alert-"+t[1]+" "+t[2])},m:function(t,e){cc(t,n,e),i&&i.m(n,null),r=!0},p:function(t,u){i&&i.p&&8&u&&Xa(i,o,t,t[3],u,null,null),(!r||6&u&&e!==(e="alert-"+t[1]+" "+t[2]))&&yc(n,"class",e)},i:function(t){r||(of(i,t),r=!0)},o:function(t){uf(i,t),r=!1},d:function(t){t&&fc(n),i&&i.d(t)}}}function Pm(t){var n,e,r=t[0]&&Tm(t);return{c:function(){r&&r.c(),n=vc()},m:function(t,o){r&&r.m(t,o),cc(t,n,o),e=!0},p:function(t,e){var o=Wi(e,1)[0];t[0]?r?(r.p(t,o),1&o&&of(r,1)):((r=Tm(t)).c(),of(r,1),r.m(n.parentNode,n)):r&&(ef(),uf(r,1,1,(function(){r=null})),rf())},i:function(t){e||(of(r),e=!0)},o:function(t){uf(r),e=!1},d:function(t){r&&r.d(t),t&&fc(n)}}}function Rm(t,n,e){var r=n.$$slots,o=void 0===r?{}:r,i=n.$$scope,u=n.show,a=void 0===u||u,c=n.type,f=void 0===c?"info":c,l=n.class,s=void 0===l?"alert":l;return t.$$set=function(t){"show"in t&&e(0,a=t.show),"type"in t&&e(1,f=t.type),"class"in t&&e(2,s=t.class),"$$scope"in t&&e(3,i=t.$$scope)},[a,f,s,i,o]}var Bm=function(t){nn(e,t);var n=jm(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Rm,Pm,Wa,{show:0,type:1,class:2}),r}return e}(hf);function Im(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Dm(t){var n,e,r,o,i,u;return n=new Bm({props:{type:"danger",show:t[1].length,$$slots:{default:[Cm]},$$scope:{ctx:t}}}),r=new Am({}),i=new Bm({props:{type:"danger",show:t[2]>1&&t[1].length,$$slots:{default:[Nm]},$$scope:{ctx:t}}}),{c:function(){lf(n.$$.fragment),e=pc(),lf(r.$$.fragment),o=pc(),lf(i.$$.fragment)},m:function(t,a){sf(n,t,a),cc(t,e,a),sf(r,t,a),cc(t,o,a),sf(i,t,a),u=!0},p:function(t,e){var r={};2&e&&(r.show=t[1].length),16&e&&(r.$$scope={dirty:e,ctx:t}),n.$set(r);var o={};6&e&&(o.show=t[2]>1&&t[1].length),18&e&&(o.$$scope={dirty:e,ctx:t}),i.$set(o)},i:function(t){u||(of(n.$$.fragment,t),of(r.$$.fragment,t),of(i.$$.fragment,t),u=!0)},o:function(t){uf(n.$$.fragment,t),uf(r.$$.fragment,t),uf(i.$$.fragment,t),u=!1},d:function(t){df(n,t),t&&fc(e),df(r,t),t&&fc(o),df(i,t)}}}function Mm(t){var n;return{c:function(){yc(n=sc("div"),"class","bookly-loading")},m:function(t,e){cc(t,n,e)},p:Fa,i:Fa,o:Fa,d:function(t){t&&fc(n)}}}function Cm(t){var n,e,r,o=Rl.l10n.recurring.some_slots_are_busy+"";return{c:function(){n=sc("span"),e=pc(),r=dc(o),yc(n,"class","fas fa-info-circle text-primary fa-lg")},m:function(t,o){cc(t,n,o),cc(t,e,o),cc(t,r,o)},p:Fa,d:function(t){t&&fc(n),t&&fc(e),t&&fc(r)}}}function Nm(t){var n,e,r,o,i,u=Rl.l10n.recurring.another_time_on_pages+"",a=t[1].join(", ")+"";return{c:function(){n=sc("span"),e=pc(),r=dc(u),o=pc(),i=dc(a),yc(n,"class","fas fa-fw fa-exclamation-triangle text-warning fa-lg mr-2")},m:function(t,u){cc(t,n,u),cc(t,e,u),cc(t,r,u),cc(t,o,u),cc(t,i,u)},p:function(t,n){2&n&&a!==(a=t[1].join(", ")+"")&&wc(i,a)},d:function(t){t&&fc(n),t&&fc(e),t&&fc(r),t&&fc(o),t&&fc(i)}}}function Lm(t){var n,e,r,o,i=[Mm,Dm],u=[];function a(t,n){return t[0]?0:1}return e=a(t),r=u[e]=i[e](t),{c:function(){n=sc("div"),r.c()},m:function(t,r){cc(t,n,r),u[e].m(n,null),o=!0},p:function(t,o){var c=Wi(o,1)[0],f=e;(e=a(t))===f?u[e].p(t,c):(ef(),uf(u[f],1,1,(function(){u[f]=null})),rf(),(r=u[e])?r.p(t,c):(r=u[e]=i[e](t)).c(),of(r,1),r.m(n,null))},i:function(t){o||(of(r),o=!0)},o:function(t){uf(r),o=!1},d:function(t){t&&fc(n),u[e].d()}}}function Fm(t,n,e){var r,o,i;Va(t,os,(function(t){return e(3,r=t)})),Va(t,Ss,(function(t){return e(1,o=t)})),Va(t,Ih,(function(t){return e(2,i=t)}));var u=!0;return t.$$.update=function(){8&t.$$.dirty&&"schedule"===r&&(e(0,u=!0),(Es.reset(),rd().done((function(t){var n;As.set(t.data);var e=[];uu(n=t.data).call(n,(function(t){if(t.another_time){var n=Zf((t.index-1)/10)+1;na(e).call(e,n)<0&&e.push(n)}})),Ss.set(e)}))).always((function(){return e(0,u=!1)})))},[u,o,i,r]}var zm=function(t){nn(e,t);var n=Im(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Fm,Lm,Wa,{}),r}return e}(hf);function qm(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Ym(t){for(var n,e,r,o,i,u,a,c,f=t[3]?"…":"",l=t[9].default,s=Qa(l,t,t[8],null),d=[{type:t[0]},{class:i="btn ladda-button "+t[1]},{"data-spinner-size":"40"},{"data-style":"zoom-in"},t[5]],p={},v=0;v<d.length;v+=1)p=qa(p,d[v]);return{c:function(){n=sc("button"),e=sc("span"),s&&s.c(),r=dc(t[2]),o=dc(f),yc(e,"class","ladda-label"),gc(n,p)},m:function(i,f){cc(i,n,f),ac(n,e),s&&s.m(e,null),ac(e,r),ac(e,o),t[11](n),u=!0,a||(c=hc(n,"click",t[10]),a=!0)},p:function(t,e){var a=Wi(e,1)[0];s&&s.p&&256&a&&Xa(s,l,t,t[8],a,null,null),(!u||4&a)&&wc(r,t[2]),(!u||8&a)&&f!==(f=t[3]?"…":"")&&wc(o,f),gc(n,p=function(t,n){for(var e={},r={},o={$$scope:1},i=t.length;i--;){var u=t[i],a=n[i];if(a){for(var c in u)c in a||(r[c]=1);for(var f in a)o[f]||(e[f]=a[f],o[f]=1);t[i]=a}else for(var l in u)o[l]=1}for(var s in r)s in e||(e[s]=void 0);return e}(d,[(!u||1&a)&&{type:t[0]},(!u||2&a&&i!==(i="btn ladda-button "+t[1]))&&{class:i},{"data-spinner-size":"40"},{"data-style":"zoom-in"},32&a&&t[5]]))},i:function(t){u||(of(s,t),u=!0)},o:function(t){uf(s,t),u=!1},d:function(e){e&&fc(n),s&&s.d(e),t[11](null),a=!1,c()}}}function Hm(t,n,e){var r,o,i,u=["type","class","caption","loading","ellipsis"],a=Za(n,u),c=n,l=c.$$slots,s=void 0===l?{}:l,d=c.$$scope,p=n.type,v=void 0===p?"button":p,h=n.class,m=void 0===h?"btn-default":h,y=n.caption,g=void 0===y?"":y,_=n.loading,$=void 0!==_&&_,b=n.ellipsis,w=void 0!==b&&b;return Cc((function(){return e(7,o=f.default.create(r))})),i=function(){return o&&o.remove()},Mc().$$.on_destroy.push(i),t.$$set=function(t){n=qa(qa({},n),function(t){var n={};for(var e in t)"$"!==e[0]&&(n[e]=t[e]);return n}(t)),e(5,a=Za(n,u)),"type"in t&&e(0,v=t.type),"class"in t&&e(1,m=t.class),"caption"in t&&e(2,g=t.caption),"loading"in t&&e(6,$=t.loading),"ellipsis"in t&&e(3,w=t.ellipsis),"$$scope"in t&&e(8,d=t.$$scope)},t.$$.update=function(){192&t.$$.dirty&&o&&($?o.start():o.stop())},[v,m,g,w,r,a,$,o,d,s,function(n){!function(t,n){var e,r=t.$$.callbacks[n.type];r&&uu(e=vu(r).call(r)).call(e,(function(t){return t(n)}))}(t,n)},function(t){Lc[t?"unshift":"push"]((function(){e(4,r=t)}))}]}var Um=function(t){nn(e,t);var n=qm(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Hm,Ym,Wa,{type:0,class:1,caption:2,loading:6,ellipsis:3}),r}return e}(hf);function Gm(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Wm(t){var n,e;return(n=new Um({props:{class:"btn-success",disabled:!t[3]||!t[4].length||t[5]||"weekly"===t[6].type&&!t[6].weekly.on.length,caption:Rl.l10n.recurring.next}})).$on("click",t[9]),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},p:function(t,e){var r={};120&e&&(r.disabled=!t[3]||!t[4].length||t[5]||"weekly"===t[6].type&&!t[6].weekly.on.length),n.$set(r)},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Jm(t){var n,e;return(n=new Um({props:{class:"btn-default",caption:Rl.l10n.recurring.back}})).$on("click",t[8]),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},p:Fa,i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Vm(t){var n,e,r,o,i=[Jm,Wm],u=[];function a(t,n){return"schedule"===t[0]?0:"main"===t[0]&&t[1]&&!t[2]?1:-1}return~(n=a(t))&&(e=u[n]=i[n](t)),{c:function(){e&&e.c(),r=vc()},m:function(t,e){~n&&u[n].m(t,e),cc(t,r,e),o=!0},p:function(t,o){var c=Wi(o,1)[0],f=n;(n=a(t))===f?~n&&u[n].p(t,c):(e&&(ef(),uf(u[f],1,1,(function(){u[f]=null})),rf()),~n?((e=u[n])?e.p(t,c):(e=u[n]=i[n](t)).c(),of(e,1),e.m(r.parentNode,r)):e=null)},i:function(t){o||(of(e),o=!0)},o:function(t){uf(e),o=!1},d:function(t){~n&&u[n].d(t),t&&fc(r)}}}function Qm(t,n,e){var r,o,i,u,a,c,f,l;Va(t,os,(function(t){return e(0,r=t)})),Va(t,Ql,(function(t){return e(1,o=t)})),Va(t,Yl,(function(t){return e(2,i=t)})),Va(t,Nl,(function(t){return e(3,u=t)})),Va(t,ts,(function(t){return e(4,a=t)})),Va(t,Kl,(function(t){return e(5,c=t)})),Va(t,Zl,(function(t){return e(6,f=t)})),Va(t,Rh,(function(t){return e(7,l=t)}));return[r,o,i,u,a,c,f,l,function(){return tc(os,r="main",r)},function(){tc(os,r="schedule",r),tc(Rh,l=0,l)}]}var Km=function(t){nn(e,t);var n=Gm(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Qm,Vm,Wa,{}),r}return e}(hf);function Xm(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Zm(t){var n,e,r,o,i,u,a,c,f,l,s,d,p,v,h,m,y,g,_;return{c:function(){n=sc("div"),(e=sc("label")).textContent="".concat(Rl.l10n.recurring.reschedule_info),r=pc(),o=sc("div"),i=sc("input"),u=pc(),(a=sc("label")).textContent="".concat(Rl.l10n.recurring.only_this_appointment),c=pc(),f=sc("div"),l=sc("input"),s=pc(),(d=sc("label")).textContent="".concat(Rl.l10n.recurring.this_and_next_appointments),p=pc(),v=sc("div"),h=sc("input"),m=pc(),(y=sc("label")).textContent="".concat(Rl.l10n.recurring.all_appointments),yc(i,"id","bookly-reschedule-type-current"),yc(i,"class","custom-control-input"),yc(i,"type","radio"),i.__value="current",i.value=i.__value,t[2][0].push(i),yc(a,"for","bookly-reschedule-type-current"),yc(a,"class","custom-control-label"),yc(o,"class","custom-control custom-radio"),yc(l,"id","bookly-reschedule-type-next"),yc(l,"class","custom-control-input"),yc(l,"type","radio"),l.__value="next",l.value=l.__value,t[2][0].push(l),yc(d,"for","bookly-reschedule-type-next"),yc(d,"class","custom-control-label"),yc(f,"class","custom-control custom-radio"),yc(h,"id","bookly-reschedule-type-all"),yc(h,"class","custom-control-input"),yc(h,"type","radio"),h.__value="all",h.value=h.__value,t[2][0].push(h),yc(y,"for","bookly-reschedule-type-all"),yc(y,"class","custom-control-label"),yc(v,"class","custom-control custom-radio"),yc(n,"class","form-group")},m:function($,b){cc($,n,b),ac(n,e),ac(n,r),ac(n,o),ac(o,i),i.checked=i.__value===t[0],ac(o,u),ac(o,a),ac(n,c),ac(n,f),ac(f,l),l.checked=l.__value===t[0],ac(f,s),ac(f,d),ac(n,p),ac(n,v),ac(v,h),h.checked=h.__value===t[0],ac(v,m),ac(v,y),g||(_=[hc(i,"change",t[1]),hc(l,"change",t[3]),hc(h,"change",t[4])],g=!0)},p:function(t,n){var e=Wi(n,1)[0];1&e&&(i.checked=i.__value===t[0]),1&e&&(l.checked=l.__value===t[0]),1&e&&(h.checked=h.__value===t[0])},i:Fa,o:Fa,d:function(e){var r,o,u,a,c,f;e&&fc(n),pa(r=t[2][0]).call(r,na(o=t[2][0]).call(o,i),1),pa(u=t[2][0]).call(u,na(a=t[2][0]).call(a,l),1),pa(c=t[2][0]).call(c,na(f=t[2][0]).call(f,h),1),g=!1,Ua(_)}}}function ty(t,n,e){var r;Va(t,js,(function(t){return e(0,r=t)}));return[r,function(){r=this.__value,js.set(r)},[[]],function(){r=this.__value,js.set(r)},function(){r=this.__value,js.set(r)}]}var ny=function(t){nn(e,t);var n=Xm(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,ty,Zm,Wa,{}),r}return e}(hf);function ey(t,n){var e=n.get(t);if(!e)throw new TypeError("attempted to get private field on non-instance");return e.get?e.get.call(t):e.value}var ry=wu.getWeakData,oy=ce.set,iy=ce.getterFor,uy=se.find,ay=se.findIndex,cy=0,fy=function(t){return t.frozen||(t.frozen=new ly)},ly=function(){this.entries=[]},sy=function(t,n){return uy(t.entries,(function(t){return t[0]===n}))};ly.prototype={get:function(t){var n=sy(this,t);if(n)return n[1]},has:function(t){return!!sy(this,t)},set:function(t,n){var e=sy(this,t);e?e[1]=n:this.entries.push([t,n])},delete:function(t){var n=ay(this.entries,(function(n){return n[0]===t}));return~n&&this.entries.splice(n,1),!!~n}};var dy={getConstructor:function(t,n,e,r){var o=t((function(t,i){Ur(t,o,n),oy(t,{type:n,id:cy++,frozen:void 0}),null!=i&&Lr(i,t[r],{that:t,AS_ENTRIES:e})})),i=iy(n),u=function(t,n,e){var r=i(t),o=ry(W(n),!0);return!0===o?fy(r).set(n,e):o[r.id]=e,t};return qr(o.prototype,{delete:function(t){var n=i(this);if(!E(t))return!1;var e=ry(t);return!0===e?fy(n).delete(t):e&&T(e,n.id)&&delete e[n.id]},has:function(t){var n=i(this);if(!E(t))return!1;var e=ry(t);return!0===e?fy(n).has(t):e&&T(e,n.id)}}),qr(o.prototype,e?{get:function(t){var n=i(this);if(E(t)){var e=ry(t);return!0===e?fy(n).get(t):e?e[n.id]:void 0}},set:function(t,n){return u(this,t,n)}}:{add:function(t){return u(this,t,!0)}}),o}};s((function(t){var n,e=ce.enforce,r=!v.ActiveXObject&&"ActiveXObject"in v,o=Object.isExtensible,i=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},u=t.exports=Eu("WeakMap",i,dy);if(ne&&r){n=dy.getConstructor(i,"WeakMap",!0),wu.REQUIRED=!0;var a=u.prototype,c=a.delete,f=a.has,l=a.get,s=a.set;qr(a,{delete:function(t){if(E(t)&&!o(t)){var r=e(this);return r.frozen||(r.frozen=new n),c.call(this,t)||r.frozen.delete(t)}return c.call(this,t)},has:function(t){if(E(t)&&!o(t)){var r=e(this);return r.frozen||(r.frozen=new n),f.call(this,t)||r.frozen.has(t)}return f.call(this,t)},get:function(t){if(E(t)&&!o(t)){var r=e(this);return r.frozen||(r.frozen=new n),f.call(this,t)?l.call(this,t):r.frozen.get(t)}return l.call(this,t)},set:function(t,r){if(E(t)&&!o(t)){var i=e(this);i.frozen||(i.frozen=new n),f.call(this,t)?s.call(this,t,r):i.frozen.set(t,r)}else s.call(this,t,r);return this}})}}));var py=new(0,H.WeakMap),vy=function(){function t(n){qt(this,t),py.set(this,{writable:!0,value:void 0}),function(t,n,e){var r=n.get(t);if(!r)throw new TypeError("attempted to set private field on non-instance");if(r.set)r.set.call(t,e);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=e}}(this,py,n)}return Gt(t,[{key:"price",value:function(t){var n=ey(this,py).format_price.format;return t=md(t),n=(n=n.replace("{sign}",t<0?"-":"")).replace("{price}",this._formatNumber(Math.abs(t),ey(this,py).format_price.decimals,ey(this,py).format_price.decimal_separator,ey(this,py).format_price.thousands_separator))}},{key:"date",value:function(t){switch(Sr(t)){case"string":return a.default(t).format(ey(this,py).moment_format_date)}}},{key:"time",value:function(t){switch(Sr(t)){case"string":return a.default(t).format(ey(this,py).moment_format_time);case"object":return t.format(ey(this,py).moment_format_time)}}},{key:"_formatNumber",value:function(t,n,e,r){var o;t=Math.abs(Number(t)||0).toFixed(n),n=isNaN(n=Math.abs(n))?2:n,e=void 0===e?".":e,r=void 0===r?",":r;var i=t<0?"-":"",u=String(Zf(t)),a=u.length>3?u.length%3:0;return i+(a?u.substr(0,a)+r:"")+u.substr(a).replace(/(\d{3})(?=\d)/g,"$1"+r)+(n?e+vu(o=Math.abs(t-u).toFixed(n)).call(o,2):"")}}]),t}();function hy(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function my(t){var n,e,r,o,i=Rl.l10n.recurring.number_of_days_to_shift_appointments+"";return{c:function(){n=sc("div"),e=dc(i),r=dc(": "),o=dc(t[0])},m:function(t,i){cc(t,n,i),ac(n,e),ac(n,r),ac(n,o)},p:function(t,n){1&n&&wc(o,t[0])},d:function(t){t&&fc(n)}}}function yy(t){var n,e,r=0!==t[0]&&my(t);return{c:function(){var o;r&&r.c(),n=pc(),(e=sc("div")).textContent=Zu(o="".concat(Rl.l10n.recurring.appointments_will_be_scheduled_at,": ")).call(o,t[2].time(Is()))},m:function(t,o){r&&r.m(t,o),cc(t,n,o),cc(t,e,o)},p:function(t,e){0!==t[0]?r?r.p(t,e):((r=my(t)).c(),r.m(n.parentNode,n)):r&&(r.d(1),r=null)},d:function(t){r&&r.d(t),t&&fc(n),t&&fc(e)}}}function gy(t){var n,e,r,o;return n=new ny({}),r=new Bm({props:{type:"success",show:"current"!==t[1],$$slots:{default:[yy]},$$scope:{ctx:t}}}),{c:function(){lf(n.$$.fragment),e=pc(),lf(r.$$.fragment)},m:function(t,i){sf(n,t,i),cc(t,e,i),sf(r,t,i),o=!0},p:function(t,n){var e=Wi(n,1)[0],o={};2&e&&(o.show="current"!==t[1]),33&e&&(o.$$scope={dirty:e,ctx:t}),r.$set(o)},i:function(t){o||(of(n.$$.fragment,t),of(r.$$.fragment,t),o=!0)},o:function(t){uf(n.$$.fragment,t),uf(r.$$.fragment,t),o=!1},d:function(t){df(n,t),t&&fc(e),df(r,t)}}}function _y(t,n,e){var r,o,i;Va(t,Hl,(function(t){return e(3,r=t)})),Va(t,vs,(function(t){return e(4,o=t)})),Va(t,js,(function(t){return e(1,i=t)}));var u=new vy(Rl),a=0;return t.$$.update=function(){24&t.$$.dirty&&e(0,a=r?Is().startOf("day").diff(o.startDate.startOf("day"),"days"):0)},[a,i,u,r,o]}var $y=function(t){nn(e,t);var n=hy(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,_y,gy,Wa,{}),r}return e}(hf);function by(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function wy(t){var n,e,r,o,i,u,a,c,f,l,s,d,p,v,h,m;return{c:function(){n=sc("div"),(e=sc("label")).textContent="".concat(Rl.l10n.send_notifications),r=pc(),o=sc("div"),i=sc("input"),u=pc(),(a=sc("label")).textContent="".concat(Rl.l10n.send_if_new_or_status_changed),c=pc(),f=sc("div"),l=sc("input"),s=pc(),(d=sc("label")).textContent="".concat(Rl.l10n.send_as_for_new),p=pc(),(v=sc("small")).textContent="".concat(Rl.l10n.chose_queue_type_info),yc(i,"id","bookly-queue-type-changed-status"),yc(i,"class","custom-control-input"),yc(i,"type","radio"),i.__value="changed_status",i.value=i.__value,t[2][0].push(i),yc(a,"for","bookly-queue-type-changed-status"),yc(a,"class","custom-control-label"),yc(o,"class","custom-control custom-radio"),yc(l,"id","bookly-queue-type-all"),yc(l,"class","custom-control-input"),yc(l,"type","radio"),l.__value="all",l.value=l.__value,t[2][0].push(l),yc(d,"for","bookly-queue-type-all"),yc(d,"class","custom-control-label"),yc(f,"class","custom-control custom-radio"),yc(v,"class","help-block"),yc(n,"class","form-group")},m:function(y,g){cc(y,n,g),ac(n,e),ac(n,r),ac(n,o),ac(o,i),i.checked=i.__value===t[0],ac(o,u),ac(o,a),ac(n,c),ac(n,f),ac(f,l),l.checked=l.__value===t[0],ac(f,s),ac(f,d),ac(n,p),ac(n,v),h||(m=[hc(i,"change",t[1]),hc(l,"change",t[3])],h=!0)},p:function(t,n){var e=Wi(n,1)[0];1&e&&(i.checked=i.__value===t[0]),1&e&&(l.checked=l.__value===t[0])},i:Fa,o:Fa,d:function(e){var r,o,u,a;e&&fc(n),pa(r=t[2][0]).call(r,na(o=t[2][0]).call(o,i),1),pa(u=t[2][0]).call(u,na(a=t[2][0]).call(a,l),1),h=!1,Ua(m)}}}function xy(t,n,e){var r;Va(t,Ps,(function(t){return e(0,r=t)}));return[r,function(){r=this.__value,Ps.set(r)},[[]],function(){r=this.__value,Ps.set(r)}]}var ky=function(t){nn(e,t);var n=by(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,xy,wy,Wa,{}),r}return e}(hf);function Oy(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Sy(t,n,e){var r=vu(t).call(t);return r[6]=n[e],r[8]=e,r}function Ey(t){var n,e,r,o,i,u,a,c,f,l,s,d,p,v,h,m,y,g,_=t[6].data.name+"",$=t[6].address+"",b=t[6].name+"";return{c:function(){n=sc("div"),e=sc("input"),r=pc(),o=sc("label"),i=sc("i"),a=pc(),c=sc("b"),f=dc(_),l=dc(" ("),s=dc($),d=dc(")"),p=sc("br"),v=pc(),h=dc(b),m=pc(),yc(e,"class","custom-control-input"),yc(e,"id","bookly-notification-"+t[8]),yc(e,"type","checkbox"),e.__value=t[8],e.value=e.__value,t[5][0].push(e),yc(i,"class",u="fa-fw "+("sms"===t[6].gateway?"fas fa-sms":"far fa-envelope")),yc(o,"class","custom-control-label"),yc(o,"for","bookly-notification-"+t[8]),yc(n,"class","custom-control custom-checkbox")},m:function(u,_){var $;cc(u,n,_),ac(n,e),e.checked=~na($=t[1]).call($,e.__value),ac(n,r),ac(n,o),ac(o,i),ac(o,a),ac(o,c),ac(c,f),ac(o,l),ac(o,s),ac(o,d),ac(o,p),ac(o,v),ac(o,h),ac(n,m),y||(g=hc(e,"change",t[4]),y=!0)},p:function(t,n){var r;2&n&&(e.checked=~na(r=t[1]).call(r,e.__value));1&n&&u!==(u="fa-fw "+("sms"===t[6].gateway?"fas fa-sms":"far fa-envelope"))&&yc(i,"class",u),1&n&&_!==(_=t[6].data.name+"")&&wc(f,_),1&n&&$!==($=t[6].address+"")&&wc(s,$),1&n&&b!==(b=t[6].name+"")&&wc(h,b)},d:function(r){var o,i;r&&fc(n),pa(o=t[5][0]).call(o,na(i=t[5][0]).call(i,e),1),y=!1,g()}}}function Ay(t){for(var n,e=t[0],r=[],o=0;o<e.length;o+=1)r[o]=Ey(Sy(t,e,o));return{c:function(){n=sc("div");for(var t=0;t<r.length;t+=1)r[t].c();yc(n,"class","form-group")},m:function(t,e){cc(t,n,e);for(var o=0;o<r.length;o+=1)r[o].m(n,null)},p:function(t,o){var i=Wi(o,1)[0];if(3&i){var u;for(e=t[0],u=0;u<e.length;u+=1){var a=Sy(t,e,u);r[u]?r[u].p(a,i):(r[u]=Ey(a),r[u].c(),r[u].m(n,null))}for(;u<r.length;u+=1)r[u].d(1);r.length=e.length}},i:Fa,o:Fa,d:function(t){t&&fc(n),lc(r,t)}}}function jy(t,n,e){var r,o,i;Va(t,Ps,(function(t){return e(2,r=t)})),Va(t,Ts,(function(t){return e(3,o=t)})),Va(t,Rs,(function(t){return e(1,i=t)}));var u=n.notifications,a=void 0===u?[]:u,c=[[]];return t.$$set=function(t){"notifications"in t&&e(0,a=t.notifications)},t.$$.update=function(){var n;(8&t.$$.dirty&&tc(Ps,r=o&&o.changed_status.length?"changed_status":"all",r),13&t.$$.dirty)&&(o?(e(0,a=o[r]),tc(Rs,i=_a(n=Vu(a)).call(n,(function(t){return Zf(t)})),i)):(e(0,a=[]),tc(Rs,i=[],i)))},[a,i,r,o,function(){i=_c(c[0],this.__value,this.checked),Rs.set(i)},c]}var Ty=function(t){nn(e,t);var n=Oy(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,jy,Ay,Wa,{notifications:0}),r}return e}(hf);function Py(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Ry(t){var n,e;return n=new ky({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function By(t){var n,e,r,o=t[0].changed_status.length&&t[0].all.length&&Ry();return e=new Ty({}),{c:function(){o&&o.c(),n=pc(),lf(e.$$.fragment)},m:function(t,i){o&&o.m(t,i),cc(t,n,i),sf(e,t,i),r=!0},p:function(t,e){var r=Wi(e,1)[0];t[0].changed_status.length&&t[0].all.length?o?1&r&&of(o,1):((o=Ry()).c(),of(o,1),o.m(n.parentNode,n)):o&&(ef(),uf(o,1,1,(function(){o=null})),rf())},i:function(t){r||(of(o),of(e.$$.fragment,t),r=!0)},o:function(t){uf(o),uf(e.$$.fragment,t),r=!1},d:function(t){o&&o.d(t),t&&fc(n),df(e,t)}}}function Iy(t,n,e){var r;return Va(t,Ts,(function(t){return e(0,r=t)})),[r]}var Dy=function(t){nn(e,t);var n=Py(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Iy,By,Wa,{}),r}return e}(hf);function My(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Cy(t){var n,e;return(n=new Um({props:{loading:t[0],class:"btn-success",caption:Rl.l10n.send}})).$on("click",t[2]),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},p:function(t,e){var r={};1&e&&(r.loading=t[0]),n.$set(r)},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Ny(t){var n,e,r="queue"===t[1]&&Cy(t);return{c:function(){r&&r.c(),n=vc()},m:function(t,o){r&&r.m(t,o),cc(t,n,o),e=!0},p:function(t,e){var o=Wi(e,1)[0];"queue"===t[1]?r?(r.p(t,o),2&o&&of(r,1)):((r=Cy(t)).c(),of(r,1),r.m(n.parentNode,n)):r&&(ef(),uf(r,1,1,(function(){r=null})),rf())},i:function(t){e||(of(r),e=!0)},o:function(t){uf(r),e=!1},d:function(t){r&&r.d(t),t&&fc(n)}}}function Ly(t,n,e){var r;Va(t,os,(function(t){return e(1,r=t)}));var o,i=(o="cxt",Mc().$$.context.get(o)),a=!1;return[a,r,function(){var t=od();t.selected.length>0?(e(0,a=!0),u.default.post(ajaxurl,{action:"bookly_send_queue",csrf_token:jl,queue:t.selected,attachments:t.attachments},(function(t){t.success&&(i.modal.hide(),tc(os,r="main",r))}),"json").always((function(){return e(0,a=!1)}))):(i.modal.hide(),tc(os,r="main",r))}]}var Fy=function(t){nn(e,t);var n=My(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Ly,Ny,Wa,{}),r}return e}(hf);function zy(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function qy(t){var n,e;return n=new Dy({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Yy(t){var n,e;return n=new $y({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Hy(t){var n,e;return n=new zm({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Uy(t){var n,e;return n=new Ph({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Gy(t){var n;return{c:function(){yc(n=sc("div"),"class","bookly-loading")},m:function(t,e){cc(t,n,e)},i:Fa,o:Fa,d:function(t){t&&fc(n)}}}function Wy(t){var n,e,r,o,i,u,a=[Gy,Uy,Hy,Yy,qy],c=[];function f(t,r){return t[2]?0:"main"===t[5]?1:(32&r&&(n=!(!Al("recurring-appointments")||"schedule"!==t[5])),n?2:(32&r&&(e=!(!Al("recurring-appointments")||"reschedule"!==t[5])),e?3:"queue"===t[5]?4:-1))}return~(r=f(t,-1))&&(o=c[r]=a[r](t)),{c:function(){o&&o.c(),i=vc()},m:function(t,n){~r&&c[r].m(t,n),cc(t,i,n),u=!0},p:function(t,n){var e=r;(r=f(t,n))!==e&&(o&&(ef(),uf(c[e],1,1,(function(){c[e]=null})),rf()),~r?((o=c[r])||(o=c[r]=a[r](t)).c(),of(o,1),o.m(i.parentNode,i)):o=null)},i:function(t){u||(of(o),u=!0)},o:function(t){uf(o),u=!1},d:function(t){~r&&c[r].d(t),t&&fc(i)}}}function Jy(t){var n,e;return n=new Fy({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Vy(t){var n,e;return(n=new Um({props:{class:"btn-success",loading:t[3],disabled:!t[7]&&Ql&&Fs()||!t[4]&&!t[7]||t[8],className:"btn-success",caption:Rl.l10n.save}})).$on("click",t[9]),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},p:function(t,e){var r={};8&e&&(r.loading=t[3]),400&e&&(r.disabled=!t[7]&&Ql&&Fs()||!t[4]&&!t[7]||t[8]),n.$set(r)},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Qy(t){var n,e,r,o,i,u,a=Al("recurring-appointments")&&function(t){var n,e;return n=new Km({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}(),c="queue"===t[5]&&Jy(),f=!("queue"===t[5]||t[6]&&!t[7]&&"main"===t[5])&&Vy(t);return(i=new Um({props:{caption:Rl.l10n.cancel}})).$on("click",(function(){Ga(t[0].modal.hide())&&t[0].modal.hide().apply(this,arguments)})),{c:function(){n=sc("div"),a&&a.c(),e=pc(),c&&c.c(),r=pc(),f&&f.c(),o=pc(),lf(i.$$.fragment),yc(n,"slot","footer")},m:function(t,l){cc(t,n,l),a&&a.m(n,null),ac(n,e),c&&c.m(n,null),ac(n,r),f&&f.m(n,null),ac(n,o),sf(i,n,null),u=!0},p:function(e,i){"queue"===(t=e)[5]?c?32&i&&of(c,1):((c=Jy()).c(),of(c,1),c.m(n,r)):c&&(ef(),uf(c,1,1,(function(){c=null})),rf()),"queue"===t[5]||t[6]&&!t[7]&&"main"===t[5]?f&&(ef(),uf(f,1,1,(function(){f=null})),rf()):f?(f.p(t,i),224&i&&of(f,1)):((f=Vy(t)).c(),of(f,1),f.m(n,o))},i:function(t){u||(of(a),of(c),of(f),of(i.$$.fragment,t),u=!0)},o:function(t){uf(a),uf(c),uf(f),uf(i.$$.fragment,t),u=!1},d:function(t){t&&fc(n),a&&a.d(),c&&c.d(),f&&f.d(),df(i)}}}function Ky(t){var n,e,r={title:t[1],$$slots:{footer:[Qy],default:[Wy]},$$scope:{ctx:t}};return n=new dd({props:r}),t[13](n),n.$on("hidden",t[10]),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},p:function(t,e){var r=Wi(e,1)[0],o={};2&r&&(o.title=t[1]),2097661&r&&(o.$$scope={dirty:r,ctx:t}),n.$set(o)},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(e){t[13](null),df(n,e)}}}function Xy(t,n,e){var r,o,i,a,c,f,l,s,d,p,v,h;Va(t,hs,(function(t){return e(14,r=t)})),Va(t,Cl,(function(t){return e(15,o=t)})),Va(t,Rf,(function(t){return e(16,i=t)})),Va(t,Hl,(function(t){return e(4,a=t)})),Va(t,Ul,(function(t){return e(17,c=t)})),Va(t,Gl,(function(t){return e(18,f=t)})),Va(t,bs,(function(t){return e(19,l=t)})),Va(t,os,(function(t){return e(5,s=t)})),Va(t,js,(function(t){return e(20,d=t)})),Va(t,Ql,(function(t){return e(6,p=t)})),Va(t,Yl,(function(t){return e(7,v=t)})),Va(t,Vl,(function(t){return e(8,h=t)}));var m,y,g={modal:null},_="",$=!0,b=!1;return m="cxt",y=g,Mc().$$.context.set(m,y),[g,_,$,b,a,s,p,v,h,function(){!function(){var t=os.get();Rf.get();var n=vs.get(),e=Ds();if("reschedule"!==t&&n.startDate&&e!==n.startDate.format("YYYY-MM-DD HH:mm:00")){var r,o=id(ts.get());try{for(o.s();!(r=o.n()).done;)if(r.value.series_id)return!0}catch(t){o.e(t)}finally{o.f()}}return!1}()?(e(3,b=!0),function(){var t,n,e={action:"bookly_save_appointment_form",csrf_token:jl,id:vs.get().id,staff_id:Cl.get()?Cl.get().id:null,location_id:ql.get()?ql.get().id:null,skip_date:Yl.get()?1:0,repeat:Ma(Ql.get()?{enabled:1,repeat:Zl.get()}:{enabled:0}),schedule:(n=[],uu(t=As.get()).call(t,(function(t){t.deleted||n.push(t.slots)})),n),customers:ss(),notification:es.get()?1:0,internal_note:ns.get(),reschedule_type:js.get(),created_from:"undefined"!=typeof BooklySCCalendarL10n?"staff-cabinet":"backend"};return Yl.get()||(e.start_date=Ds(),e.end_date=Ms()),null===Nl.get()||(Nl.get().id?e.service_id=Nl.get().id:(e.service_id="",e.custom_service_name=Ll.get(),e.custom_service_price=Fl.get())),u.default.post(ajaxurl,e,(function(t){t.success?Ts.set(t.queue):rs.update((function(n){var e;return uu(e=Vu(t.errors)).call(e,(function(e){return n[e]=t.errors[e]})),n})),t.alert_errors&&booklyAlert({error:t.alert_errors})}),"json")}().then((function(t){t.success&&(t.queue.all.length||t.queue.changed_status.length?tc(os,s="queue",s):g.modal.hide(),r("current"!==d?"refresh":t.data))})).always((function(){return e(3,b=!1)}))):tc(os,s="reschedule",s)},function(){!function(){if("queue"===os.get()){var t=od().attachments;if(t.length>0)jQuery.post(ajaxurl,{action:"bookly_clear_attachments",csrf_token:jl,attachments:t},"json")}}(),Xs()},function(t,n){e(2,$=!0),Xs(),tc(hs,r=n,r),e(1,_=Rl.l10n.edit_appointment),Ks().then((function(){return function(t){return u.default.get(ajaxurl,{action:"bookly_get_data_for_appointment",id:t,csrf_token:jl}).done((function(n){if(n.success){var e,r=n.data,o=Rf.get(),i=r.start_date&&moment(r.start_date),a=r.start_date&&moment(r.end_date),c=Ol(r.staff_id,o.staff);Cl.set(c),ps.set(r.staff_any?c:null),Nl.set(Ol(0===r.service_id?null:r.service_id,c.services)),ql.set(0!==r.location_id?Ol(r.location_id,c.locations):null),Yl.set(!r.start_date),vs.set({id:t,startDate:i&&i.clone(),startTime:r.start_time,endTime:r.end_time}),Ll.set(r.custom_service_name),Fl.set(r.custom_service_price),ns.set(r.internal_note),null!==i?(Hl.set(i.clone()),Ul.set(i.format("HH:mm")),i.format("YYYY-MM-DD")===a.format("YYYY-MM-DD")?Wl.set(a.format("HH:mm")):Wl.set(24*a.clone().startOf("day").diff(i.clone().startOf("day"),"days")+a.hour()+a.format(":mm"))):(Hl.set(moment()),Ul.set(moment().format("HH:mm")),Bs()),o.customers_loaded||(o.customers=r.customers_data||[],Rf.set(o)),ts.set(_a(e=r.customers).call(e,(function(t){var n=Sl(Ol(t.id,o.customers));return cs(n),u.default.extend(n,t),n}))),zl.set({url:"zoom"===n.data.online_meeting_provider?"https://zoom.us/j/"+n.data.online_meeting_id:"google_meet"===n.data.online_meeting_provider?n.data.online_meeting_id:null,copied:!1})}}))}(t)})).always((function(){return e(2,$=!1)})),g.modal.show()},function(t,n,s){e(2,$=!0),Xs(),tc(hs,r=s,r),e(1,_=Rl.l10n.new_appointment),Ks().then((function(){return u.default.Deferred(function(){var e,r=(e=hu.mark((function e(r){return hu.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return tc(Cl,o=null===t?null:Ol(t,i.staff),o),tc(Hl,a=n,a),e.next=4,Uc();case 4:return tc(Ul,c=a.format("HH:mm"),c),tc(Gl,f=ks(c,l),f),e.next=8,Uc();case 8:Bs(),r.resolve();case 10:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new _i((function(r,o){var i=e.apply(t,n);function u(t){$i(i,r,o,u,a,"next",t)}function a(t){$i(i,r,o,u,a,"throw",t)}u(void 0)}))});return function(t){return r.apply(this,arguments)}}())})).always((function(){return e(2,$=!1)})),g.modal.show()},function(t){Lc[t?"unshift":"push"]((function(){g.modal=t,e(0,g)}))}]}var Zy,tg=function(t){nn(e,t);var n=zy(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Xy,Ky,Wa,{edit:11,create:12}),r}return Gt(e,[{key:"edit",get:function(){return this.$$.ctx[11]}},{key:"create",get:function(){return this.$$.ctx[12]}}]),e}(hf);return t.showDialog=function(t,n,e,r){Zy||(Zy=new tg({target:document.getElementById("bookly-appointment-dialog"),props:{}})),t?Zy.edit(t,r):Zy.create(n,e,r)},Object.defineProperty(t,"__esModule",{value:!0}),t}({},jQuery,moment,BooklyL10nAppDialog,Ladda);
1
+ var BooklyAppointmentDialog=function(t,n,e,r,o){"use strict";function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var u=i(n),a=i(e),c=i(r),f=i(o),l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(t){var n={exports:{}};return t(n,n.exports),n.exports}var d,p=function(t){return t&&t.Math==Math&&t},v=p("object"==typeof globalThis&&globalThis)||p("object"==typeof window&&window)||p("object"==typeof self&&self)||p("object"==typeof l&&l)||function(){return this}()||Function("return this")(),h=function(t){try{return!!t()}catch(t){return!0}},m=!h((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),y={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,_={f:g&&!y.call({1:2},1)?function(t){var n=g(this,t);return!!n&&n.enumerable}:y},$=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}},b={}.toString,w=function(t){return b.call(t).slice(8,-1)},x="".split,k=h((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==w(t)?x.call(t,""):Object(t)}:Object,O=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},S=function(t){return k(O(t))},E=function(t){return"object"==typeof t?null!==t:"function"==typeof t},A=function(t,n){if(!E(t))return t;var e,r;if(n&&"function"==typeof(e=t.toString)&&!E(r=e.call(t)))return r;if("function"==typeof(e=t.valueOf)&&!E(r=e.call(t)))return r;if(!n&&"function"==typeof(e=t.toString)&&!E(r=e.call(t)))return r;throw TypeError("Can't convert object to primitive value")},j={}.hasOwnProperty,T=function(t,n){return j.call(t,n)},P=v.document,R=E(P)&&E(P.createElement),B=function(t){return R?P.createElement(t):{}},I=!m&&!h((function(){return 7!=Object.defineProperty(B("div"),"a",{get:function(){return 7}}).a})),D=Object.getOwnPropertyDescriptor,M={f:m?D:function(t,n){if(t=S(t),n=A(n,!0),I)try{return D(t,n)}catch(t){}if(T(t,n))return $(!_.f.call(t,n),t[n])}},C=/#|\.prototype\./,N=function(t,n){var e=F[L(t)];return e==q||e!=z&&("function"==typeof n?h(n):!!n)},L=N.normalize=function(t){return String(t).replace(C,".").toLowerCase()},F=N.data={},z=N.NATIVE="N",q=N.POLYFILL="P",Y=N,H={},U=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},G=function(t,n,e){if(U(t),void 0===n)return t;switch(e){case 0:return function(){return t.call(n)};case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)}}return function(){return t.apply(n,arguments)}},W=function(t){if(!E(t))throw TypeError(String(t)+" is not an object");return t},J=Object.defineProperty,V={f:m?J:function(t,n,e){if(W(t),n=A(n,!0),W(e),I)try{return J(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported");return"value"in e&&(t[n]=e.value),t}},Q=m?function(t,n,e){return V.f(t,n,$(1,e))}:function(t,n,e){return t[n]=e,t},K=M.f,X=function(t){var n=function(n,e,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,e)}return new t(n,e,r)}return t.apply(this,arguments)};return n.prototype=t.prototype,n},Z=function(t,n){var e,r,o,i,u,a,c,f,l=t.target,s=t.global,d=t.stat,p=t.proto,h=s?v:d?v[l]:(v[l]||{}).prototype,m=s?H:H[l]||(H[l]={}),y=m.prototype;for(o in n)e=!Y(s?o:l+(d?".":"#")+o,t.forced)&&h&&T(h,o),u=m[o],e&&(a=t.noTargetGet?(f=K(h,o))&&f.value:h[o]),i=e&&a?a:n[o],e&&typeof u==typeof i||(c=t.bind&&e?G(i,v):t.wrap&&e?X(i):p&&"function"==typeof i?G(Function.call,i):i,(t.sham||i&&i.sham||u&&u.sham)&&Q(c,"sham",!0),m[o]=c,p&&(T(H,r=l+"Prototype")||Q(H,r,{}),H[r][o]=i,t.real&&y&&!y[o]&&Q(y,o,i)))},tt=function(t){return"function"==typeof t?t:void 0},nt=function(t,n){return arguments.length<2?tt(H[t])||tt(v[t]):H[t]&&H[t][n]||v[t]&&v[t][n]},et=Math.ceil,rt=Math.floor,ot=function(t){return isNaN(t=+t)?0:(t>0?rt:et)(t)},it=Math.min,ut=function(t){return t>0?it(ot(t),9007199254740991):0},at=Math.max,ct=Math.min,ft=function(t,n){var e=ot(t);return e<0?at(e+n,0):ct(e,n)},lt=function(t){return function(n,e,r){var o,i=S(n),u=ut(i.length),a=ft(r,u);if(t&&e!=e){for(;u>a;)if((o=i[a++])!=o)return!0}else for(;u>a;a++)if((t||a in i)&&i[a]===e)return t||a||0;return!t&&-1}},st={includes:lt(!0),indexOf:lt(!1)},dt={},pt=st.indexOf,vt=function(t,n){var e,r=S(t),o=0,i=[];for(e in r)!T(dt,e)&&T(r,e)&&i.push(e);for(;n.length>o;)T(r,e=n[o++])&&(~pt(i,e)||i.push(e));return i},ht=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],mt=Object.keys||function(t){return vt(t,ht)},yt=m?Object.defineProperties:function(t,n){W(t);for(var e,r=mt(n),o=r.length,i=0;o>i;)V.f(t,e=r[i++],n[e]);return t},gt=nt("document","documentElement"),_t=!0,$t="__core-js_shared__",bt=v[$t]||function(t,n){try{Q(v,t,n)}catch(e){v[t]=n}return n}($t,{}),wt=s((function(t){(t.exports=function(t,n){return bt[t]||(bt[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.8.3",mode:"pure",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),xt=0,kt=Math.random(),Ot=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++xt+kt).toString(36)},St=wt("keys"),Et=function(t){return St[t]||(St[t]=Ot(t))},At=Et("IE_PROTO"),jt=function(){},Tt=function(t){return"<script>"+t+"</"+"script>"},Pt=function(){try{d=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,n;Pt=d?function(t){t.write(Tt("")),t.close();var n=t.parentWindow.Object;return t=null,n}(d):((n=B("iframe")).style.display="none",gt.appendChild(n),n.src=String("javascript:"),(t=n.contentWindow.document).open(),t.write(Tt("document.F=Object")),t.close(),t.F);for(var e=ht.length;e--;)delete Pt.prototype[ht[e]];return Pt()};dt[At]=!0;var Rt=Object.create||function(t,n){var e;return null!==t?(jt.prototype=W(t),e=new jt,jt.prototype=null,e[At]=t):e=Pt(),void 0===n?e:yt(e,n)},Bt=[].slice,It={},Dt=function(t,n,e){if(!(n in It)){for(var r=[],o=0;o<n;o++)r[o]="a["+o+"]";It[n]=Function("C,a","return new C("+r.join(",")+")")}return It[n](t,e)},Mt=Function.bind||function(t){var n=U(this),e=Bt.call(arguments,1),r=function(){var o=e.concat(Bt.call(arguments));return this instanceof r?Dt(n,o.length,o):n.apply(t,o)};return E(n.prototype)&&(r.prototype=n.prototype),r},Ct=nt("Reflect","construct"),Nt=h((function(){function t(){}return!(Ct((function(){}),[],t)instanceof t)})),Lt=!h((function(){Ct((function(){}))})),Ft=Nt||Lt;Z({target:"Reflect",stat:!0,forced:Ft,sham:Ft},{construct:function(t,n){U(t),W(n);var e=arguments.length<3?t:U(arguments[2]);if(Lt&&!Nt)return Ct(t,n,e);if(t==e){switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3])}var r=[null];return r.push.apply(r,n),new(Mt.apply(t,r))}var o=e.prototype,i=Rt(E(o)?o:Object.prototype),u=Function.apply.call(t,i,n);return E(u)?u:i}});var zt=H.Reflect.construct;function qt(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}Z({target:"Object",stat:!0,forced:!m,sham:!m},{defineProperty:V.f});var Yt=s((function(t){var n=H.Object,e=t.exports=function(t,e,r){return n.defineProperty(t,e,r)};n.defineProperty.sham&&(e.sham=!0)})),Ht=Yt;function Ut(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Ht(t,r.key,r)}}function Gt(t,n,e){return n&&Ut(t.prototype,n),e&&Ut(t,e),t}function Wt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}Z({target:"Object",stat:!0,sham:!m},{create:Rt});var Jt=H.Object,Vt=function(t,n){return Jt.create(t,n)},Qt=Vt,Kt=Object.setPrototypeOf||("__proto__"in{}?function(){var t,n=!1,e={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(e,[]),n=e instanceof Array}catch(t){}return function(e,r){return W(e),function(t){if(!E(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(r),n?t.call(e,r):e.__proto__=r,e}}():void 0);Z({target:"Object",stat:!0},{setPrototypeOf:Kt});var Xt=H.Object.setPrototypeOf,Zt=Xt;function tn(t,n){return(tn=Zt||function(t,n){return t.__proto__=n,t})(t,n)}function nn(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Qt(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&tn(t,n)}var en,rn,on=Array.isArray||function(t){return"Array"==w(t)},un=function(t){return Object(O(t))},an=function(t,n,e){var r=A(n);r in t?V.f(t,r,$(0,e)):t[r]=e},cn=!!Object.getOwnPropertySymbols&&!h((function(){return!String(Symbol())})),fn=cn&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ln=wt("wks"),sn=v.Symbol,dn=fn?sn:sn&&sn.withoutSetter||Ot,pn=function(t){return T(ln,t)||(cn&&T(sn,t)?ln[t]=sn[t]:ln[t]=dn("Symbol."+t)),ln[t]},vn=pn("species"),hn=function(t,n){var e;return on(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!on(e.prototype)?E(e)&&null===(e=e[vn])&&(e=void 0):e=void 0),new(void 0===e?Array:e)(0===n?0:n)},mn=nt("navigator","userAgent")||"",yn=v.process,gn=yn&&yn.versions,_n=gn&&gn.v8;_n?rn=(en=_n.split("."))[0]+en[1]:mn&&(!(en=mn.match(/Edge\/(\d+)/))||en[1]>=74)&&(en=mn.match(/Chrome\/(\d+)/))&&(rn=en[1]);var $n=rn&&+rn,bn=pn("species"),wn=function(t){return $n>=51||!h((function(){var n=[];return(n.constructor={})[bn]=function(){return{foo:1}},1!==n[t](Boolean).foo}))},xn=pn("isConcatSpreadable"),kn=9007199254740991,On="Maximum allowed index exceeded",Sn=$n>=51||!h((function(){var t=[];return t[xn]=!1,t.concat()[0]!==t})),En=wn("concat"),An=function(t){if(!E(t))return!1;var n=t[xn];return void 0!==n?!!n:on(t)};Z({target:"Array",proto:!0,forced:!Sn||!En},{concat:function(t){var n,e,r,o,i,u=un(this),a=hn(u,0),c=0;for(n=-1,r=arguments.length;n<r;n++)if(An(i=-1===n?u:arguments[n])){if(c+(o=ut(i.length))>kn)throw TypeError(On);for(e=0;e<o;e++,c++)e in i&&an(a,c,i[e])}else{if(c>=kn)throw TypeError(On);an(a,c++,i)}return a.length=c,a}});var jn=ht.concat("length","prototype"),Tn={f:Object.getOwnPropertyNames||function(t){return vt(t,jn)}},Pn=Tn.f,Rn={}.toString,Bn="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],In={f:function(t){return Bn&&"[object Window]"==Rn.call(t)?function(t){try{return Pn(t)}catch(t){return Bn.slice()}}(t):Pn(S(t))}},Dn={f:Object.getOwnPropertySymbols},Mn=function(t,n,e,r){r&&r.enumerable?t[n]=e:Q(t,n,e)},Cn={f:pn},Nn=V.f,Ln=function(t){var n=H.Symbol||(H.Symbol={});T(n,t)||Nn(n,t,{value:Cn.f(t)})},Fn={};Fn[pn("toStringTag")]="z";var zn="[object z]"===String(Fn),qn=pn("toStringTag"),Yn="Arguments"==w(function(){return arguments}()),Hn=zn?w:function(t){var n,e,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,n){try{return t[n]}catch(t){}}(n=Object(t),qn))?e:Yn?w(n):"Object"==(r=w(n))&&"function"==typeof n.callee?"Arguments":r},Un=zn?{}.toString:function(){return"[object "+Hn(this)+"]"},Gn=V.f,Wn=pn("toStringTag"),Jn=function(t,n,e,r){if(t){var o=e?t:t.prototype;T(o,Wn)||Gn(o,Wn,{configurable:!0,value:n}),r&&!zn&&Q(o,"toString",Un)}},Vn=Function.toString;"function"!=typeof bt.inspectSource&&(bt.inspectSource=function(t){return Vn.call(t)});var Qn,Kn,Xn,Zn=bt.inspectSource,te=v.WeakMap,ne="function"==typeof te&&/native code/.test(Zn(te)),ee=v.WeakMap;if(ne){var re=bt.state||(bt.state=new ee),oe=re.get,ie=re.has,ue=re.set;Qn=function(t,n){return n.facade=t,ue.call(re,t,n),n},Kn=function(t){return oe.call(re,t)||{}},Xn=function(t){return ie.call(re,t)}}else{var ae=Et("state");dt[ae]=!0,Qn=function(t,n){return n.facade=t,Q(t,ae,n),n},Kn=function(t){return T(t,ae)?t[ae]:{}},Xn=function(t){return T(t,ae)}}var ce={set:Qn,get:Kn,has:Xn,enforce:function(t){return Xn(t)?Kn(t):Qn(t,{})},getterFor:function(t){return function(n){var e;if(!E(n)||(e=Kn(n)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return e}}},fe=[].push,le=function(t){var n=1==t,e=2==t,r=3==t,o=4==t,i=6==t,u=7==t,a=5==t||i;return function(c,f,l,s){for(var d,p,v=un(c),h=k(v),m=G(f,l,3),y=ut(h.length),g=0,_=s||hn,$=n?_(c,y):e||u?_(c,0):void 0;y>g;g++)if((a||g in h)&&(p=m(d=h[g],g,v),t))if(n)$[g]=p;else if(p)switch(t){case 3:return!0;case 5:return d;case 6:return g;case 2:fe.call($,d)}else switch(t){case 4:return!1;case 7:fe.call($,d)}return i?-1:r||o?o:$}},se={forEach:le(0),map:le(1),filter:le(2),some:le(3),every:le(4),find:le(5),findIndex:le(6),filterOut:le(7)},de=se.forEach,pe=Et("hidden"),ve="Symbol",he=pn("toPrimitive"),me=ce.set,ye=ce.getterFor(ve),ge=Object.prototype,_e=v.Symbol,$e=nt("JSON","stringify"),be=M.f,we=V.f,xe=In.f,ke=_.f,Oe=wt("symbols"),Se=wt("op-symbols"),Ee=wt("string-to-symbol-registry"),Ae=wt("symbol-to-string-registry"),je=wt("wks"),Te=v.QObject,Pe=!Te||!Te.prototype||!Te.prototype.findChild,Re=m&&h((function(){return 7!=Rt(we({},"a",{get:function(){return we(this,"a",{value:7}).a}})).a}))?function(t,n,e){var r=be(ge,n);r&&delete ge[n],we(t,n,e),r&&t!==ge&&we(ge,n,r)}:we,Be=function(t,n){var e=Oe[t]=Rt(_e.prototype);return me(e,{type:ve,tag:t,description:n}),m||(e.description=n),e},Ie=fn?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof _e},De=function(t,n,e){t===ge&&De(Se,n,e),W(t);var r=A(n,!0);return W(e),T(Oe,r)?(e.enumerable?(T(t,pe)&&t[pe][r]&&(t[pe][r]=!1),e=Rt(e,{enumerable:$(0,!1)})):(T(t,pe)||we(t,pe,$(1,{})),t[pe][r]=!0),Re(t,r,e)):we(t,r,e)},Me=function(t,n){W(t);var e=S(n),r=mt(e).concat(Fe(e));return de(r,(function(n){m&&!Ce.call(e,n)||De(t,n,e[n])})),t},Ce=function(t){var n=A(t,!0),e=ke.call(this,n);return!(this===ge&&T(Oe,n)&&!T(Se,n))&&(!(e||!T(this,n)||!T(Oe,n)||T(this,pe)&&this[pe][n])||e)},Ne=function(t,n){var e=S(t),r=A(n,!0);if(e!==ge||!T(Oe,r)||T(Se,r)){var o=be(e,r);return!o||!T(Oe,r)||T(e,pe)&&e[pe][r]||(o.enumerable=!0),o}},Le=function(t){var n=xe(S(t)),e=[];return de(n,(function(t){T(Oe,t)||T(dt,t)||e.push(t)})),e},Fe=function(t){var n=t===ge,e=xe(n?Se:S(t)),r=[];return de(e,(function(t){!T(Oe,t)||n&&!T(ge,t)||r.push(Oe[t])})),r};if(cn||(Mn((_e=function(){if(this instanceof _e)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,n=Ot(t),e=function(t){this===ge&&e.call(Se,t),T(this,pe)&&T(this[pe],n)&&(this[pe][n]=!1),Re(this,n,$(1,t))};return m&&Pe&&Re(ge,n,{configurable:!0,set:e}),Be(n,t)}).prototype,"toString",(function(){return ye(this).tag})),Mn(_e,"withoutSetter",(function(t){return Be(Ot(t),t)})),_.f=Ce,V.f=De,M.f=Ne,Tn.f=In.f=Le,Dn.f=Fe,Cn.f=function(t){return Be(pn(t),t)},m&&we(_e.prototype,"description",{configurable:!0,get:function(){return ye(this).description}})),Z({global:!0,wrap:!0,forced:!cn,sham:!cn},{Symbol:_e}),de(mt(je),(function(t){Ln(t)})),Z({target:ve,stat:!0,forced:!cn},{for:function(t){var n=String(t);if(T(Ee,n))return Ee[n];var e=_e(n);return Ee[n]=e,Ae[e]=n,e},keyFor:function(t){if(!Ie(t))throw TypeError(t+" is not a symbol");if(T(Ae,t))return Ae[t]},useSetter:function(){Pe=!0},useSimple:function(){Pe=!1}}),Z({target:"Object",stat:!0,forced:!cn,sham:!m},{create:function(t,n){return void 0===n?Rt(t):Me(Rt(t),n)},defineProperty:De,defineProperties:Me,getOwnPropertyDescriptor:Ne}),Z({target:"Object",stat:!0,forced:!cn},{getOwnPropertyNames:Le,getOwnPropertySymbols:Fe}),Z({target:"Object",stat:!0,forced:h((function(){Dn.f(1)}))},{getOwnPropertySymbols:function(t){return Dn.f(un(t))}}),$e){var ze=!cn||h((function(){var t=_e();return"[null]"!=$e([t])||"{}"!=$e({a:t})||"{}"!=$e(Object(t))}));Z({target:"JSON",stat:!0,forced:ze},{stringify:function(t,n,e){for(var r,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(r=n,(E(n)||void 0!==t)&&!Ie(t))return on(n)||(n=function(t,n){if("function"==typeof r&&(n=r.call(this,t,n)),!Ie(n))return n}),o[1]=n,$e.apply(null,o)}})}_e.prototype[he]||Q(_e.prototype,he,_e.prototype.valueOf),Jn(_e,ve),dt[pe]=!0,Ln("asyncIterator"),Ln("hasInstance"),Ln("isConcatSpreadable"),Ln("iterator"),Ln("match"),Ln("matchAll"),Ln("replace"),Ln("search"),Ln("species"),Ln("split"),Ln("toPrimitive"),Ln("toStringTag"),Ln("unscopables"),Jn(v.JSON,"JSON",!0);var qe=H.Symbol;Ln("asyncDispose"),Ln("dispose"),Ln("observable"),Ln("patternMatch"),Ln("replaceAll");var Ye,He,Ue,Ge=qe,We=function(t){return function(n,e){var r,o,i=String(O(n)),u=ot(e),a=i.length;return u<0||u>=a?t?"":void 0:(r=i.charCodeAt(u))<55296||r>56319||u+1===a||(o=i.charCodeAt(u+1))<56320||o>57343?t?i.charAt(u):r:t?i.slice(u,u+2):o-56320+(r-55296<<10)+65536}},Je={codeAt:We(!1),charAt:We(!0)},Ve=!h((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Qe=Et("IE_PROTO"),Ke=Object.prototype,Xe=Ve?Object.getPrototypeOf:function(t){return t=un(t),T(t,Qe)?t[Qe]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Ke:null},Ze=pn("iterator"),tr=!1;[].keys&&("next"in(Ue=[].keys())?(He=Xe(Xe(Ue)))!==Object.prototype&&(Ye=He):tr=!0);var nr=null==Ye||h((function(){var t={};return Ye[Ze].call(t)!==t}));nr&&(Ye={}),nr&&!T(Ye,Ze)&&Q(Ye,Ze,(function(){return this}));var er={IteratorPrototype:Ye,BUGGY_SAFARI_ITERATORS:tr},rr={},or=er.IteratorPrototype,ir=function(){return this},ur=er.IteratorPrototype,ar=er.BUGGY_SAFARI_ITERATORS,cr=pn("iterator"),fr="keys",lr="values",sr="entries",dr=function(){return this},pr=function(t,n,e,r,o,i,u){!function(t,n,e){var r=n+" Iterator";t.prototype=Rt(or,{next:$(1,e)}),Jn(t,r,!1,!0),rr[r]=ir}(e,n,r);var a,c,f,l=function(t){if(t===o&&h)return h;if(!ar&&t in p)return p[t];switch(t){case fr:case lr:case sr:return function(){return new e(this,t)}}return function(){return new e(this)}},s=n+" Iterator",d=!1,p=t.prototype,v=p[cr]||p["@@iterator"]||o&&p[o],h=!ar&&v||l(o),m="Array"==n&&p.entries||v;if(m&&(a=Xe(m.call(new t)),ur!==Object.prototype&&a.next&&(Jn(a,s,!0,!0),rr[s]=dr)),o==lr&&v&&v.name!==lr&&(d=!0,h=function(){return v.call(this)}),u&&p[cr]!==h&&Q(p,cr,h),rr[n]=h,o)if(c={values:l(lr),keys:i?h:l(fr),entries:l(sr)},u)for(f in c)(ar||d||!(f in p))&&Mn(p,f,c[f]);else Z({target:n,proto:!0,forced:ar||d},c);return c},vr=Je.charAt,hr="String Iterator",mr=ce.set,yr=ce.getterFor(hr);pr(String,"String",(function(t){mr(this,{type:hr,string:String(t),index:0})}),(function(){var t,n=yr(this),e=n.string,r=n.index;return r>=e.length?{value:void 0,done:!0}:(t=vr(e,r),n.index+=t.length,{value:t,done:!1})}));var gr="Array Iterator",_r=ce.set,$r=ce.getterFor(gr);pr(Array,"Array",(function(t,n){_r(this,{type:gr,target:S(t),index:0,kind:n})}),(function(){var t=$r(this),n=t.target,e=t.kind,r=t.index++;return!n||r>=n.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==e?{value:r,done:!1}:"values"==e?{value:n[r],done:!1}:{value:[r,n[r]],done:!1}}),"values"),rr.Arguments=rr.Array;var br=pn("toStringTag");for(var wr in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var xr=v[wr],kr=xr&&xr.prototype;kr&&Hn(kr)!==br&&Q(kr,br,wr),rr[wr]=rr.Array}var Or=Cn.f("iterator");function Sr(t){return(Sr="function"==typeof Ge&&"symbol"==typeof Or?function(t){return typeof t}:function(t){return t&&"function"==typeof Ge&&t.constructor===Ge&&t!==Ge.prototype?"symbol":typeof t})(t)}function Er(t,n){return!n||"object"!==Sr(n)&&"function"!=typeof n?Wt(t):n}var Ar=h((function(){Xe(1)}));Z({target:"Object",stat:!0,forced:Ar,sham:!Ve},{getPrototypeOf:function(t){return Xe(un(t))}});var jr=H.Object.getPrototypeOf,Tr=jr;function Pr(t){return(Pr=Zt?Tr:function(t){return t.__proto__||Tr(t)})(t)}var Rr=pn("iterator"),Br=Array.prototype,Ir=function(t){return void 0!==t&&(rr.Array===t||Br[Rr]===t)},Dr=pn("iterator"),Mr=function(t){if(null!=t)return t[Dr]||t["@@iterator"]||rr[Hn(t)]},Cr=function(t){var n=t.return;if(void 0!==n)return W(n.call(t)).value},Nr=function(t,n){this.stopped=t,this.result=n},Lr=function(t,n,e){var r,o,i,u,a,c,f,l=e&&e.that,s=!(!e||!e.AS_ENTRIES),d=!(!e||!e.IS_ITERATOR),p=!(!e||!e.INTERRUPTED),v=G(n,l,1+s+p),h=function(t){return r&&Cr(r),new Nr(!0,t)},m=function(t){return s?(W(t),p?v(t[0],t[1],h):v(t[0],t[1])):p?v(t,h):v(t)};if(d)r=t;else{if("function"!=typeof(o=Mr(t)))throw TypeError("Target is not iterable");if(Ir(o)){for(i=0,u=ut(t.length);u>i;i++)if((a=m(t[i]))&&a instanceof Nr)return a;return new Nr(!1)}r=o.call(t)}for(c=r.next;!(f=c.call(r)).done;){try{a=m(f.value)}catch(t){throw Cr(r),t}if("object"==typeof a&&a&&a instanceof Nr)return a}return new Nr(!1)},Fr=function(t,n){var e=this;if(!(e instanceof Fr))return new Fr(t,n);Kt&&(e=Kt(new Error(void 0),Xe(e))),void 0!==n&&Q(e,"message",String(n));var r=[];return Lr(t,r.push,{that:r}),Q(e,"errors",r),e};Fr.prototype=Rt(Error.prototype,{constructor:$(5,Fr),message:$(5,""),name:$(5,"AggregateError")}),Z({global:!0},{AggregateError:Fr});var zr=v.Promise,qr=function(t,n,e){for(var r in n)e&&e.unsafe&&t[r]?t[r]=n[r]:Mn(t,r,n[r],e);return t},Yr=pn("species"),Hr=function(t){var n=nt(t),e=V.f;m&&n&&!n[Yr]&&e(n,Yr,{configurable:!0,get:function(){return this}})},Ur=function(t,n,e){if(!(t instanceof n))throw TypeError("Incorrect "+(e?e+" ":"")+"invocation");return t},Gr=pn("iterator"),Wr=!1;try{var Jr=0,Vr={next:function(){return{done:!!Jr++}},return:function(){Wr=!0}};Vr[Gr]=function(){return this},Array.from(Vr,(function(){throw 2}))}catch(t){}var Qr,Kr,Xr,Zr=function(t,n){if(!n&&!Wr)return!1;var e=!1;try{var r={};r[Gr]=function(){return{next:function(){return{done:e=!0}}}},t(r)}catch(t){}return e},to=pn("species"),no=function(t,n){var e,r=W(t).constructor;return void 0===r||null==(e=W(r)[to])?n:U(e)},eo=/(iphone|ipod|ipad).*applewebkit/i.test(mn),ro="process"==w(v.process),oo=v.location,io=v.setImmediate,uo=v.clearImmediate,ao=v.process,co=v.MessageChannel,fo=v.Dispatch,lo=0,so={},po="onreadystatechange",vo=function(t){if(so.hasOwnProperty(t)){var n=so[t];delete so[t],n()}},ho=function(t){return function(){vo(t)}},mo=function(t){vo(t.data)},yo=function(t){v.postMessage(t+"",oo.protocol+"//"+oo.host)};io&&uo||(io=function(t){for(var n=[],e=1;arguments.length>e;)n.push(arguments[e++]);return so[++lo]=function(){("function"==typeof t?t:Function(t)).apply(void 0,n)},Qr(lo),lo},uo=function(t){delete so[t]},ro?Qr=function(t){ao.nextTick(ho(t))}:fo&&fo.now?Qr=function(t){fo.now(ho(t))}:co&&!eo?(Xr=(Kr=new co).port2,Kr.port1.onmessage=mo,Qr=G(Xr.postMessage,Xr,1)):v.addEventListener&&"function"==typeof postMessage&&!v.importScripts&&oo&&"file:"!==oo.protocol&&!h(yo)?(Qr=yo,v.addEventListener("message",mo,!1)):Qr=po in B("script")?function(t){gt.appendChild(B("script")).onreadystatechange=function(){gt.removeChild(this),vo(t)}}:function(t){setTimeout(ho(t),0)});var go,_o,$o,bo,wo,xo,ko,Oo,So={set:io,clear:uo},Eo=/web0s(?!.*chrome)/i.test(mn),Ao=M.f,jo=So.set,To=v.MutationObserver||v.WebKitMutationObserver,Po=v.document,Ro=v.process,Bo=v.Promise,Io=Ao(v,"queueMicrotask"),Do=Io&&Io.value;Do||(go=function(){var t,n;for(ro&&(t=Ro.domain)&&t.exit();_o;){n=_o.fn,_o=_o.next;try{n()}catch(t){throw _o?bo():$o=void 0,t}}$o=void 0,t&&t.enter()},eo||ro||Eo||!To||!Po?Bo&&Bo.resolve?(ko=Bo.resolve(void 0),Oo=ko.then,bo=function(){Oo.call(ko,go)}):bo=ro?function(){Ro.nextTick(go)}:function(){jo.call(v,go)}:(wo=!0,xo=Po.createTextNode(""),new To(go).observe(xo,{characterData:!0}),bo=function(){xo.data=wo=!wo}));var Mo=Do||function(t){var n={fn:t,next:void 0};$o&&($o.next=n),_o||(_o=n,bo()),$o=n},Co=function(t){var n,e;this.promise=new t((function(t,r){if(void 0!==n||void 0!==e)throw TypeError("Bad Promise constructor");n=t,e=r})),this.resolve=U(n),this.reject=U(e)},No={f:function(t){return new Co(t)}},Lo=function(t,n){if(W(t),E(n)&&n.constructor===t)return n;var e=No.f(t);return(0,e.resolve)(n),e.promise},Fo=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},zo=So.set,qo=pn("species"),Yo="Promise",Ho=ce.get,Uo=ce.set,Go=ce.getterFor(Yo),Wo=zr,Jo=v.TypeError,Vo=v.document,Qo=v.process;nt("fetch");var Ko,Xo,Zo,ti=No.f,ni=ti,ei=!!(Vo&&Vo.createEvent&&v.dispatchEvent),ri="function"==typeof PromiseRejectionEvent,oi="unhandledrejection",ii=Y(Yo,(function(){if(!(Zn(Wo)!==String(Wo))){if(66===$n)return!0;if(!ro&&!ri)return!0}if(!Wo.prototype.finally)return!0;if($n>=51&&/native code/.test(Wo))return!1;var t=Wo.resolve(1),n=function(t){t((function(){}),(function(){}))};return(t.constructor={})[qo]=n,!(t.then((function(){}))instanceof n)})),ui=ii||!Zr((function(t){Wo.all(t).catch((function(){}))})),ai=function(t){var n;return!(!E(t)||"function"!=typeof(n=t.then))&&n},ci=function(t,n){if(!t.notified){t.notified=!0;var e=t.reactions;Mo((function(){for(var r=t.value,o=1==t.state,i=0;e.length>i;){var u,a,c,f=e[i++],l=o?f.ok:f.fail,s=f.resolve,d=f.reject,p=f.domain;try{l?(o||(2===t.rejection&&di(t),t.rejection=1),!0===l?u=r:(p&&p.enter(),u=l(r),p&&(p.exit(),c=!0)),u===f.promise?d(Jo("Promise-chain cycle")):(a=ai(u))?a.call(u,s,d):s(u)):d(r)}catch(t){p&&!c&&p.exit(),d(t)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&li(t)}))}},fi=function(t,n,e){var r,o;ei?((r=Vo.createEvent("Event")).promise=n,r.reason=e,r.initEvent(t,!1,!0),v.dispatchEvent(r)):r={promise:n,reason:e},!ri&&(o=v["on"+t])?o(r):t===oi&&function(t,n){var e=v.console;e&&e.error&&(1===arguments.length?e.error(t):e.error(t,n))}("Unhandled promise rejection",e)},li=function(t){zo.call(v,(function(){var n,e=t.facade,r=t.value;if(si(t)&&(n=Fo((function(){ro?Qo.emit("unhandledRejection",r,e):fi(oi,e,r)})),t.rejection=ro||si(t)?2:1,n.error))throw n.value}))},si=function(t){return 1!==t.rejection&&!t.parent},di=function(t){zo.call(v,(function(){var n=t.facade;ro?Qo.emit("rejectionHandled",n):fi("rejectionhandled",n,t.value)}))},pi=function(t,n,e){return function(r){t(n,r,e)}},vi=function(t,n,e){t.done||(t.done=!0,e&&(t=e),t.value=n,t.state=2,ci(t,!0))},hi=function(t,n,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===n)throw Jo("Promise can't be resolved itself");var r=ai(n);r?Mo((function(){var e={done:!1};try{r.call(n,pi(hi,e,t),pi(vi,e,t))}catch(n){vi(e,n,t)}})):(t.value=n,t.state=1,ci(t,!1))}catch(n){vi({done:!1},n,t)}}};ii&&(Wo=function(t){Ur(this,Wo,Yo),U(t),Ko.call(this);var n=Ho(this);try{t(pi(hi,n),pi(vi,n))}catch(t){vi(n,t)}},(Ko=function(t){Uo(this,{type:Yo,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=qr(Wo.prototype,{then:function(t,n){var e=Go(this),r=ti(no(this,Wo));return r.ok="function"!=typeof t||t,r.fail="function"==typeof n&&n,r.domain=ro?Qo.domain:void 0,e.parent=!0,e.reactions.push(r),0!=e.state&&ci(e,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),Xo=function(){var t=new Ko,n=Ho(t);this.promise=t,this.resolve=pi(hi,n),this.reject=pi(vi,n)},No.f=ti=function(t){return t===Wo||t===Zo?new Xo(t):ni(t)}),Z({global:!0,wrap:!0,forced:ii},{Promise:Wo}),Jn(Wo,Yo,!1,!0),Hr(Yo),Zo=nt(Yo),Z({target:Yo,stat:!0,forced:ii},{reject:function(t){var n=ti(this);return n.reject.call(void 0,t),n.promise}}),Z({target:Yo,stat:!0,forced:_t},{resolve:function(t){return Lo(this===Zo?Wo:this,t)}}),Z({target:Yo,stat:!0,forced:ui},{all:function(t){var n=this,e=ti(n),r=e.resolve,o=e.reject,i=Fo((function(){var e=U(n.resolve),i=[],u=0,a=1;Lr(t,(function(t){var c=u++,f=!1;i.push(void 0),a++,e.call(n,t).then((function(t){f||(f=!0,i[c]=t,--a||r(i))}),o)})),--a||r(i)}));return i.error&&o(i.value),e.promise},race:function(t){var n=this,e=ti(n),r=e.reject,o=Fo((function(){var o=U(n.resolve);Lr(t,(function(t){o.call(n,t).then(e.resolve,r)}))}));return o.error&&r(o.value),e.promise}}),Z({target:"Promise",stat:!0},{allSettled:function(t){var n=this,e=No.f(n),r=e.resolve,o=e.reject,i=Fo((function(){var e=U(n.resolve),o=[],i=0,u=1;Lr(t,(function(t){var a=i++,c=!1;o.push(void 0),u++,e.call(n,t).then((function(t){c||(c=!0,o[a]={status:"fulfilled",value:t},--u||r(o))}),(function(t){c||(c=!0,o[a]={status:"rejected",reason:t},--u||r(o))}))})),--u||r(o)}));return i.error&&o(i.value),e.promise}});var mi="No one promise resolved";Z({target:"Promise",stat:!0},{any:function(t){var n=this,e=No.f(n),r=e.resolve,o=e.reject,i=Fo((function(){var e=U(n.resolve),i=[],u=0,a=1,c=!1;Lr(t,(function(t){var f=u++,l=!1;i.push(void 0),a++,e.call(n,t).then((function(t){l||c||(c=!0,r(t))}),(function(t){l||c||(l=!0,i[f]=t,--a||o(new(nt("AggregateError"))(i,mi)))}))})),--a||o(new(nt("AggregateError"))(i,mi))}));return i.error&&o(i.value),e.promise}});var yi=!!zr&&h((function(){zr.prototype.finally.call({then:function(){}},(function(){}))}));Z({target:"Promise",proto:!0,real:!0,forced:yi},{finally:function(t){var n=no(this,nt("Promise")),e="function"==typeof t;return this.then(e?function(e){return Lo(n,t()).then((function(){return e}))}:t,e?function(e){return Lo(n,t()).then((function(){throw e}))}:t)}});var gi=H.Promise;Z({target:"Promise",stat:!0},{try:function(t){var n=No.f(this),e=Fo(t);return(e.error?n.reject:n.resolve)(e.value),n.promise}});var _i=gi;function $i(t,n,e,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void e(t)}a.done?n(c):_i.resolve(c).then(r,o)}Z({target:"Array",stat:!0},{isArray:on});var bi=H.Array.isArray,wi=bi;var xi=pn("iterator"),ki=function(t){var n=Object(t);return void 0!==n[xi]||"@@iterator"in n||rr.hasOwnProperty(Hn(n))},Oi=function(t){var n=Mr(t);if("function"!=typeof n)throw TypeError(String(t)+" is not iterable");return W(n.call(t))},Si=Oi;var Ei=Object.defineProperty,Ai={},ji=function(t){throw t},Ti=function(t,n){if(T(Ai,t))return Ai[t];n||(n={});var e=[][t],r=!!T(n,"ACCESSORS")&&n.ACCESSORS,o=T(n,0)?n[0]:ji,i=T(n,1)?n[1]:void 0;return Ai[t]=!!e&&!h((function(){if(r&&!m)return!0;var t={length:-1};r?Ei(t,1,{enumerable:!0,get:ji}):t[1]=1,e.call(t,o,i)}))},Pi=wn("slice"),Ri=Ti("slice",{ACCESSORS:!0,0:0,1:2}),Bi=pn("species"),Ii=[].slice,Di=Math.max;Z({target:"Array",proto:!0,forced:!Pi||!Ri},{slice:function(t,n){var e,r,o,i=S(this),u=ut(i.length),a=ft(t,u),c=ft(void 0===n?u:n,u);if(on(i)&&("function"!=typeof(e=i.constructor)||e!==Array&&!on(e.prototype)?E(e)&&null===(e=e[Bi])&&(e=void 0):e=void 0,e===Array||void 0===e))return Ii.call(i,a,c);for(r=new(void 0===e?Array:e)(Di(c-a,0)),o=0;a<c;a++,o++)a in i&&an(r,o,i[a]);return r.length=o,r}});var Mi=function(t){return H[t+"Prototype"]},Ci=Mi("Array").slice,Ni=Array.prototype,Li=function(t){var n=t.slice;return t===Ni||t instanceof Array&&n===Ni.slice?Ci:n},Fi=Li,zi=function(t,n,e,r){try{return r?n(W(e)[0],e[1]):n(e)}catch(n){throw Cr(t),n}},qi=!Zr((function(t){Array.from(t)}));Z({target:"Array",stat:!0,forced:qi},{from:function(t){var n,e,r,o,i,u,a=un(t),c="function"==typeof this?this:Array,f=arguments.length,l=f>1?arguments[1]:void 0,s=void 0!==l,d=Mr(a),p=0;if(s&&(l=G(l,f>2?arguments[2]:void 0,2)),null==d||c==Array&&Ir(d))for(e=new c(n=ut(a.length));n>p;p++)u=s?l(a[p],p):a[p],an(e,p,u);else for(i=(o=d.call(a)).next,e=new c;!(r=i.call(o)).done;p++)u=s?zi(o,l,[r.value,p],!0):r.value,an(e,p,u);return e.length=p,e}});var Yi=H.Array.from,Hi=Yi;function Ui(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function Gi(t,n){var e;if(t){if("string"==typeof t)return Ui(t,n);var r=Fi(e=Object.prototype.toString.call(t)).call(e,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Hi(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ui(t,n):void 0}}function Wi(t,n){return function(t){if(wi(t))return t}(t)||function(t,n){if(void 0!==Ge&&ki(Object(t))){var e=[],r=!0,o=!1,i=void 0;try{for(var u,a=Si(t);!(r=(u=a.next()).done)&&(e.push(u.value),!n||e.length!==n);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return e}}(t,n)||Gi(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ji=qe,Vi=Yt,Qi=Vt,Ki=jr,Xi=function(t,n){var e=[][t];return!!e&&h((function(){e.call(null,n||function(){throw 1},1)}))},Zi=se.forEach,tu=Xi("forEach"),nu=Ti("forEach"),eu=tu&&nu?[].forEach:function(t){return Zi(this,t,arguments.length>1?arguments[1]:void 0)};Z({target:"Array",proto:!0,forced:[].forEach!=eu},{forEach:eu});var ru=Mi("Array").forEach,ou=Array.prototype,iu={DOMTokenList:!0,NodeList:!0},uu=function(t){var n=t.forEach;return t===ou||t instanceof Array&&n===ou.forEach||iu.hasOwnProperty(Hn(t))?ru:n},au=Xt,cu=gi,fu=[].reverse,lu=[1,2];Z({target:"Array",proto:!0,forced:String(lu)===String(lu.reverse())},{reverse:function(){return on(this)&&(this.length=this.length),fu.call(this)}});var su=Mi("Array").reverse,du=Array.prototype,pu=function(t){var n=t.reverse;return t===du||t instanceof Array&&n===du.reverse?su:n},vu=Li,hu=s((function(t){var n=function(t){var n,e=Object.prototype,r=e.hasOwnProperty,o="function"==typeof Ji?Ji:{},i=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function c(t,n,e){return Vi(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[n]}try{c({},"")}catch(t){c=function(t,n,e){return t[n]=e}}function f(t,n,e,r){var o=n&&n.prototype instanceof m?n:m,i=Qi(o.prototype),u=new E(r||[]);return i._invoke=function(t,n,e){var r=s;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===v){if("throw"===o)throw i;return j()}for(e.method=o,e.arg=i;;){var u=e.delegate;if(u){var a=k(u,e);if(a){if(a===h)continue;return a}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(r===s)throw r=v,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);r=p;var c=l(t,n,e);if("normal"===c.type){if(r=e.done?v:d,c.arg===h)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(r=v,e.method="throw",e.arg=c.arg)}}}(t,e,u),i}function l(t,n,e){try{return{type:"normal",arg:t.call(n,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var s="suspendedStart",d="suspendedYield",p="executing",v="completed",h={};function m(){}function y(){}function g(){}var _={};_[i]=function(){return this};var $=Ki&&Ki(Ki(A([])));$&&$!==e&&r.call($,i)&&(_=$);var b=g.prototype=m.prototype=Qi(_);function w(t){var n;uu(n=["next","throw","return"]).call(n,(function(n){c(t,n,(function(t){return this._invoke(n,t)}))}))}function x(t,n){function e(o,i,u,a){var c=l(t[o],t,i);if("throw"!==c.type){var f=c.arg,s=f.value;return s&&"object"===Sr(s)&&r.call(s,"__await")?n.resolve(s.__await).then((function(t){e("next",t,u,a)}),(function(t){e("throw",t,u,a)})):n.resolve(s).then((function(t){f.value=t,u(f)}),(function(t){return e("throw",t,u,a)}))}a(c.arg)}var o;this._invoke=function(t,r){function i(){return new n((function(n,o){e(t,r,n,o)}))}return o=o?o.then(i,i):i()}}function k(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,k(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=l(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function O(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function S(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function E(t){this.tryEntries=[{tryLoc:"root"}],uu(t).call(t,O,this),this.reset(!0)}function A(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,u=function e(){for(;++o<t.length;)if(r.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=n,e.done=!0,e};return u.next=u}}return{next:j}}function j(){return{value:n,done:!0}}return y.prototype=b.constructor=g,g.constructor=y,y.displayName=c(g,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===y||"GeneratorFunction"===(n.displayName||n.name))},t.mark=function(t){return au?au(t,g):(t.__proto__=g,c(t,a,"GeneratorFunction")),t.prototype=Qi(b),t},t.awrap=function(t){return{__await:t}},w(x.prototype),x.prototype[u]=function(){return this},t.AsyncIterator=x,t.async=function(n,e,r,o,i){void 0===i&&(i=cu);var u=new x(f(n,e,r,o),i);return t.isGeneratorFunction(e)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},w(b),c(b,a,"Generator"),b[i]=function(){return this},b.toString=function(){return"[object Generator]"},t.keys=function(t){var n=[];for(var e in t)n.push(e);return pu(n).call(n),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=A,E.prototype={constructor:E,reset:function(t){var e;if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,uu(e=this.tryEntries).call(e,S),!t)for(var o in this)"t"===o.charAt(0)&&r.call(this,o)&&!isNaN(+vu(o).call(o,1))&&(this[o]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(r,o){return a.type="throw",a.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var u=this.tryEntries[i],a=u.completion;if("root"===u.tryLoc)return o("end");if(u.tryLoc<=this.prev){var c=r.call(u,"catchLoc"),f=r.call(u,"finallyLoc");if(c&&f){if(this.prev<u.catchLoc)return o(u.catchLoc,!0);if(this.prev<u.finallyLoc)return o(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return o(u.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return o(u.finallyLoc)}}}},abrupt:function(t,n){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=n&&n<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=t,u.arg=n,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(u)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),h},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),S(e),h}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var r=e.completion;if("throw"===r.type){var o=r.arg;S(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),h}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}})),mu=Mr,yu=bi;Z({target:"Reflect",stat:!0},{get:function t(n,e){var r,o,i=arguments.length<3?n:arguments[2];return W(n)===i?n[e]:(r=M.f(n,e))?T(r,"value")?r.value:void 0===r.get?void 0:r.get.call(i):E(o=Xe(n))?t(o,e,i):void 0}}),H.Reflect.get;var gu=M.f,_u=h((function(){gu(1)}));Z({target:"Object",stat:!0,forced:!m||_u,sham:!m},{getOwnPropertyDescriptor:function(t,n){return gu(S(t),n)}});var $u=s((function(t){var n=H.Object,e=t.exports=function(t,e){return n.getOwnPropertyDescriptor(t,e)};n.getOwnPropertyDescriptor.sham&&(e.sham=!0)})),bu=!h((function(){return Object.isExtensible(Object.preventExtensions({}))})),wu=s((function(t){var n=V.f,e=Ot("meta"),r=0,o=Object.isExtensible||function(){return!0},i=function(t){n(t,e,{value:{objectID:"O"+ ++r,weakData:{}}})},u=t.exports={REQUIRED:!1,fastKey:function(t,n){if(!E(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!T(t,e)){if(!o(t))return"F";if(!n)return"E";i(t)}return t[e].objectID},getWeakData:function(t,n){if(!T(t,e)){if(!o(t))return!0;if(!n)return!1;i(t)}return t[e].weakData},onFreeze:function(t){return bu&&u.REQUIRED&&o(t)&&!T(t,e)&&i(t),t}};dt[e]=!0})),xu=V.f,ku=se.forEach,Ou=ce.set,Su=ce.getterFor,Eu=function(t,n,e){var r,o=-1!==t.indexOf("Map"),i=-1!==t.indexOf("Weak"),u=o?"set":"add",a=v[t],c=a&&a.prototype,f={};if(m&&"function"==typeof a&&(i||c.forEach&&!h((function(){(new a).entries().next()})))){r=n((function(n,e){Ou(Ur(n,r,t),{type:t,collection:new a}),null!=e&&Lr(e,n[u],{that:n,AS_ENTRIES:o})}));var l=Su(t);ku(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var n="add"==t||"set"==t;!(t in c)||i&&"clear"==t||Q(r.prototype,t,(function(e,r){var o=l(this).collection;if(!n&&i&&!E(e))return"get"==t&&void 0;var u=o[t](0===e?0:e,r);return n?this:u}))})),i||xu(r.prototype,"size",{configurable:!0,get:function(){return l(this).collection.size}})}else r=e.getConstructor(n,t,o,u),wu.REQUIRED=!0;return Jn(r,t,!1,!0),f[t]=r,Z({global:!0,forced:!0},f),i||e.setStrong(r,t,o),r},Au=V.f,ju=wu.fastKey,Tu=ce.set,Pu=ce.getterFor,Ru={getConstructor:function(t,n,e,r){var o=t((function(t,i){Ur(t,o,n),Tu(t,{type:n,index:Rt(null),first:void 0,last:void 0,size:0}),m||(t.size=0),null!=i&&Lr(i,t[r],{that:t,AS_ENTRIES:e})})),i=Pu(n),u=function(t,n,e){var r,o,u=i(t),c=a(t,n);return c?c.value=e:(u.last=c={index:o=ju(n,!0),key:n,value:e,previous:r=u.last,next:void 0,removed:!1},u.first||(u.first=c),r&&(r.next=c),m?u.size++:t.size++,"F"!==o&&(u.index[o]=c)),t},a=function(t,n){var e,r=i(t),o=ju(n);if("F"!==o)return r.index[o];for(e=r.first;e;e=e.next)if(e.key==n)return e};return qr(o.prototype,{clear:function(){for(var t=i(this),n=t.index,e=t.first;e;)e.removed=!0,e.previous&&(e.previous=e.previous.next=void 0),delete n[e.index],e=e.next;t.first=t.last=void 0,m?t.size=0:this.size=0},delete:function(t){var n=this,e=i(n),r=a(n,t);if(r){var o=r.next,u=r.previous;delete e.index[r.index],r.removed=!0,u&&(u.next=o),o&&(o.previous=u),e.first==r&&(e.first=o),e.last==r&&(e.last=u),m?e.size--:n.size--}return!!r},forEach:function(t){for(var n,e=i(this),r=G(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.next:e.first;)for(r(n.value,n.key,this);n&&n.removed;)n=n.previous},has:function(t){return!!a(this,t)}}),qr(o.prototype,e?{get:function(t){var n=a(this,t);return n&&n.value},set:function(t,n){return u(this,0===t?0:t,n)}}:{add:function(t){return u(this,t=0===t?0:t,t)}}),m&&Au(o.prototype,"size",{get:function(){return i(this).size}}),o},setStrong:function(t,n,e){var r=n+" Iterator",o=Pu(n),i=Pu(r);pr(t,n,(function(t,n){Tu(this,{type:r,target:t,state:o(t),kind:n,last:void 0})}),(function(){for(var t=i(this),n=t.kind,e=t.last;e&&e.removed;)e=e.previous;return t.target&&(t.last=e=e?e.next:t.state.first)?"keys"==n?{value:e.key,done:!1}:"values"==n?{value:e.value,done:!1}:{value:[e.key,e.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),e?"entries":"values",!e,!0),Hr(n)}};Eu("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),Ru);var Bu=H.Map;Z({target:"Map",stat:!0},{from:function(t){var n,e,r,o,i=arguments.length,u=i>1?arguments[1]:void 0;return U(this),(n=void 0!==u)&&U(u),null==t?new this:(e=[],n?(r=0,o=G(u,i>2?arguments[2]:void 0,2),Lr(t,(function(t){e.push(o(t,r++))}))):Lr(t,e.push,{that:e}),new this(e))}});Z({target:"Map",stat:!0},{of:function(){for(var t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return new this(n)}});var Iu=function(){for(var t,n=W(this),e=U(n.delete),r=!0,o=0,i=arguments.length;o<i;o++)t=e.call(n,arguments[o]),r=r&&t;return!!r};Z({target:"Map",proto:!0,real:!0,forced:_t},{deleteAll:function(){return Iu.apply(this,arguments)}});Z({target:"Map",proto:!0,real:!0,forced:_t},{emplace:function(t,n){var e=W(this),r=e.has(t)&&"update"in n?n.update(e.get(t),t,e):n.insert(t,e);return e.set(t,r),r}});var Du=Oi;Z({target:"Map",proto:!0,real:!0,forced:_t},{every:function(t){var n=W(this),e=Du(n),r=G(t,arguments.length>1?arguments[1]:void 0,3);return!Lr(e,(function(t,e,o){if(!r(e,t,n))return o()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}}),Z({target:"Map",proto:!0,real:!0,forced:_t},{filter:function(t){var n=W(this),e=Du(n),r=G(t,arguments.length>1?arguments[1]:void 0,3),o=new(no(n,nt("Map"))),i=U(o.set);return Lr(e,(function(t,e){r(e,t,n)&&i.call(o,t,e)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}}),Z({target:"Map",proto:!0,real:!0,forced:_t},{find:function(t){var n=W(this),e=Du(n),r=G(t,arguments.length>1?arguments[1]:void 0,3);return Lr(e,(function(t,e,o){if(r(e,t,n))return o(e)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),Z({target:"Map",proto:!0,real:!0,forced:_t},{findKey:function(t){var n=W(this),e=Du(n),r=G(t,arguments.length>1?arguments[1]:void 0,3);return Lr(e,(function(t,e,o){if(r(e,t,n))return o(t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),Z({target:"Map",stat:!0},{groupBy:function(t,n){var e=new this;U(n);var r=U(e.has),o=U(e.get),i=U(e.set);return Lr(t,(function(t){var u=n(t);r.call(e,u)?o.call(e,u).push(t):i.call(e,u,[t])})),e}});Z({target:"Map",proto:!0,real:!0,forced:_t},{includes:function(t){return Lr(Du(W(this)),(function(n,e,r){if((o=e)===(i=t)||o!=o&&i!=i)return r();var o,i}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}}),Z({target:"Map",stat:!0},{keyBy:function(t,n){var e=new this;U(n);var r=U(e.set);return Lr(t,(function(t){r.call(e,n(t),t)})),e}}),Z({target:"Map",proto:!0,real:!0,forced:_t},{keyOf:function(t){return Lr(Du(W(this)),(function(n,e,r){if(e===t)return r(n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),Z({target:"Map",proto:!0,real:!0,forced:_t},{mapKeys:function(t){var n=W(this),e=Du(n),r=G(t,arguments.length>1?arguments[1]:void 0,3),o=new(no(n,nt("Map"))),i=U(o.set);return Lr(e,(function(t,e){i.call(o,r(e,t,n),e)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}}),Z({target:"Map",proto:!0,real:!0,forced:_t},{mapValues:function(t){var n=W(this),e=Du(n),r=G(t,arguments.length>1?arguments[1]:void 0,3),o=new(no(n,nt("Map"))),i=U(o.set);return Lr(e,(function(t,e){i.call(o,t,r(e,t,n))}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}}),Z({target:"Map",proto:!0,real:!0,forced:_t},{merge:function(t){for(var n=W(this),e=U(n.set),r=0;r<arguments.length;)Lr(arguments[r++],e,{that:n,AS_ENTRIES:!0});return n}}),Z({target:"Map",proto:!0,real:!0,forced:_t},{reduce:function(t){var n=W(this),e=Du(n),r=arguments.length<2,o=r?void 0:arguments[1];if(U(t),Lr(e,(function(e,i){r?(r=!1,o=i):o=t(o,i,e,n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),r)throw TypeError("Reduce of empty map with no initial value");return o}}),Z({target:"Map",proto:!0,real:!0,forced:_t},{some:function(t){var n=W(this),e=Du(n),r=G(t,arguments.length>1?arguments[1]:void 0,3);return Lr(e,(function(t,e,o){if(r(e,t,n))return o()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}}),Z({target:"Map",proto:!0,real:!0,forced:_t},{update:function(t,n){var e=W(this),r=arguments.length;U(n);var o=e.has(t);if(!o&&r<3)throw TypeError("Updating absent value");var i=o?e.get(t):U(r>2?arguments[2]:void 0)(t,e);return e.set(t,n(i,t,e)),e}});var Mu=function(t,n){var e,r=W(this),o=arguments.length>2?arguments[2]:void 0;if("function"!=typeof n&&"function"!=typeof o)throw TypeError("At least one callback required");return r.has(t)?(e=r.get(t),"function"==typeof n&&(e=n(e),r.set(t,e))):"function"==typeof o&&(e=o(),r.set(t,e)),e};Z({target:"Map",proto:!0,real:!0,forced:_t},{upsert:Mu}),Z({target:"Map",proto:!0,real:!0,forced:_t},{updateOrInsert:Mu});var Cu=st.indexOf,Nu=[].indexOf,Lu=!!Nu&&1/[1].indexOf(1,-0)<0,Fu=Xi("indexOf"),zu=Ti("indexOf",{ACCESSORS:!0,1:0});Z({target:"Array",proto:!0,forced:Lu||!Fu||!zu},{indexOf:function(t){return Lu?Nu.apply(this,arguments)||0:Cu(this,t,arguments.length>1?arguments[1]:void 0)}});var qu=Mi("Array").indexOf,Yu=Array.prototype,Hu=function(t){var n=t.indexOf;return t===Yu||t instanceof Array&&n===Yu.indexOf?qu:n},Uu=Hu;function Gu(t){return function(t){if(wi(t))return Ui(t)}(t)||function(t){if(void 0!==Ge&&ki(Object(t)))return Hi(t)}(t)||Gi(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}Z({target:"Function",proto:!0},{bind:Mt}),Mi("Function").bind;var Wu=h((function(){mt(1)}));Z({target:"Object",stat:!0,forced:Wu},{keys:function(t){return mt(un(t))}});var Ju=H.Object.keys,Vu=Ju;Eu("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),Ru);var Qu=H.Set,Ku=Mi("Array").concat,Xu=Array.prototype,Zu=function(t){var n=t.concat;return t===Xu||t instanceof Array&&n===Xu.concat?Ku:n};Z({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}});var ta=H.Date.now,na=Hu,ea=nt("Reflect","ownKeys")||function(t){var n=Tn.f(W(t)),e=Dn.f;return e?n.concat(e(t)):n};Z({target:"Object",stat:!0,sham:!m},{getOwnPropertyDescriptors:function(t){for(var n,e,r=S(t),o=M.f,i=ea(r),u={},a=0;i.length>a;)void 0!==(e=o(r,n=i[a++]))&&an(u,n,e);return u}});var ra=H.Object.getOwnPropertyDescriptors,oa=Yi,ia=wn("splice"),ua=Ti("splice",{ACCESSORS:!0,0:0,1:2}),aa=Math.max,ca=Math.min,fa=9007199254740991,la="Maximum allowed length exceeded";Z({target:"Array",proto:!0,forced:!ia||!ua},{splice:function(t,n){var e,r,o,i,u,a,c=un(this),f=ut(c.length),l=ft(t,f),s=arguments.length;if(0===s?e=r=0:1===s?(e=0,r=f-l):(e=s-2,r=ca(aa(ot(n),0),f-l)),f+e-r>fa)throw TypeError(la);for(o=hn(c,r),i=0;i<r;i++)(u=l+i)in c&&an(o,i,c[u]);if(o.length=r,e<r){for(i=l;i<f-r;i++)a=i+e,(u=i+r)in c?c[a]=c[u]:delete c[a];for(i=f;i>f-r+e;i--)delete c[i-1]}else if(e>r)for(i=f-r;i>l;i--)a=i+e-1,(u=i+r-1)in c?c[a]=c[u]:delete c[a];for(i=0;i<e;i++)c[i+l]=arguments[i+2];return c.length=f-r+e,o}});var sa=Mi("Array").splice,da=Array.prototype,pa=function(t){var n=t.splice;return t===da||t instanceof Array&&n===da.splice?sa:n},va=se.map,ha=wn("map"),ma=Ti("map");Z({target:"Array",proto:!0,forced:!ha||!ma},{map:function(t){return va(this,t,arguments.length>1?arguments[1]:void 0)}});var ya=Mi("Array").map,ga=Array.prototype,_a=function(t){var n=t.map;return t===ga||t instanceof Array&&n===ga.map?ya:n},$a=se.filter,ba=wn("filter"),wa=Ti("filter");Z({target:"Array",proto:!0,forced:!ba||!wa},{filter:function(t){return $a(this,t,arguments.length>1?arguments[1]:void 0)}});var xa=Mi("Array").filter,ka=Array.prototype,Oa=function(t){var n=t.filter;return t===ka||t instanceof Array&&n===ka.filter?xa:n},Sa=Bu,Ea=Object.assign,Aa=Object.defineProperty,ja=!Ea||h((function(){if(m&&1!==Ea({b:1},Ea(Aa({},"a",{enumerable:!0,get:function(){Aa(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},n={},e=Symbol(),r="abcdefghijklmnopqrst";return t[e]=7,r.split("").forEach((function(t){n[t]=t})),7!=Ea({},t)[e]||mt(Ea({},n)).join("")!=r}))?function(t,n){for(var e=un(t),r=arguments.length,o=1,i=Dn.f,u=_.f;r>o;)for(var a,c=k(arguments[o++]),f=i?mt(c).concat(i(c)):mt(c),l=f.length,s=0;l>s;)a=f[s++],m&&!u.call(c,a)||(e[a]=c[a]);return e}:Ea;Z({target:"Object",stat:!0,forced:Object.assign!==ja},{assign:ja}),H.Object.assign;var Ta=nt("JSON","stringify"),Pa=/[\uD800-\uDFFF]/g,Ra=/^[\uD800-\uDBFF]$/,Ba=/^[\uDC00-\uDFFF]$/,Ia=function(t,n,e){var r=e.charAt(n-1),o=e.charAt(n+1);return Ra.test(t)&&!Ba.test(o)||Ba.test(t)&&!Ra.test(r)?"\\u"+t.charCodeAt(0).toString(16):t},Da=h((function(){return'"\\udf06\\ud834"'!==Ta("\udf06\ud834")||'"\\udead"'!==Ta("\udead")}));Ta&&Z({target:"JSON",stat:!0,forced:Da},{stringify:function(t,n,e){var r=Ta.apply(null,arguments);return"string"==typeof r?r.replace(Pa,Ia):r}}),H.JSON||(H.JSON={stringify:JSON.stringify});var Ma=function(t,n,e){return H.JSON.stringify.apply(null,arguments)};Z({target:"Array",proto:!0},{fill:function(t){for(var n=un(this),e=ut(n.length),r=arguments.length,o=ft(r>1?arguments[1]:void 0,e),i=r>2?arguments[2]:void 0,u=void 0===i?e:ft(i,e);u>o;)n[o++]=t;return n}});var Ca=Mi("Array").fill,Na=Array.prototype,La=function(t){var n=t.fill;return t===Na||t instanceof Array&&n===Na.fill?Ca:n};function Fa(){}var za=function(t){return t};function qa(t,n){for(var e in n)t[e]=n[e];return t}function Ya(t){return t()}function Ha(){return Qi(null)}function Ua(t){uu(t).call(t,Ya)}function Ga(t){return"function"==typeof t}function Wa(t,n){return t!=t?n==n:t!==n||t&&"object"===Sr(t)||"function"==typeof t}function Ja(t){if(null==t)return Fa;for(var n=arguments.length,e=new Array(n>1?n-1:0),r=1;r<n;r++)e[r-1]=arguments[r];var o=t.subscribe.apply(t,e);return o.unsubscribe?function(){return o.unsubscribe()}:o}function Va(t,n,e){t.$$.on_destroy.push(Ja(n,e))}function Qa(t,n,e,r){if(t){var o=Ka(t,n,e,r);return t[0](o)}}function Ka(t,n,e,r){var o;return t[1]&&r?qa(vu(o=e.ctx).call(o),t[1](r(n))):e.ctx}function Xa(t,n,e,r,o,i,u){var a=function(t,n,e,r){if(t[2]&&r){var o=t[2](r(e));if(void 0===n.dirty)return o;if("object"===Sr(o)){for(var i=[],u=Math.max(n.dirty.length,o.length),a=0;a<u;a+=1)i[a]=n.dirty[a]|o[a];return i}return n.dirty|o}return n.dirty}(n,r,o,i);if(a){var c=Ka(n,e,r,u);t.p(c,a)}}function Za(t,n){var e={};for(var r in n=new Qu(n),t)n.has(r)||"$"===r[0]||(e[r]=t[r]);return e}function tc(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;return t.set(e),n}function nc(t){return t&&Ga(t.destroy)?t.destroy:Fa}var ec="undefined"!=typeof window,rc=ec?function(){return window.performance.now()}:function(){return ta()},oc=ec?function(t){return requestAnimationFrame(t)}:Fa,ic=new Qu;function uc(t){uu(ic).call(ic,(function(n){n.c(t)||(ic.delete(n),n.f())})),0!==ic.size&&oc(uc)}function ac(t,n){t.appendChild(n)}function cc(t,n,e){t.insertBefore(n,e||null)}function fc(t){t.parentNode.removeChild(t)}function lc(t,n){for(var e=0;e<t.length;e+=1)t[e]&&t[e].d(n)}function sc(t){return document.createElement(t)}function dc(t){return document.createTextNode(t)}function pc(){return dc(" ")}function vc(){return dc("")}function hc(t,n,e,r){return t.addEventListener(n,e,r),function(){return t.removeEventListener(n,e,r)}}function mc(t){return function(n){return n.preventDefault(),t.call(this,n)}}function yc(t,n,e){null==e?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function gc(t,n){var e=ra(t.__proto__);for(var r in n)null==n[r]?t.removeAttribute(r):"style"===r?t.style.cssText=n[r]:"__value"===r?t.value=t[r]=n[r]:e[r]&&e[r].set?t[r]=n[r]:yc(t,r,n[r])}function _c(t,n,e){for(var r=new Qu,o=0;o<t.length;o+=1)t[o].checked&&r.add(t[o].__value);return e||r.delete(n),oa(r)}function $c(t){return""===t?null:+t}function bc(t){return oa(t.childNodes)}function wc(t,n){n=""+n,t.wholeText!==n&&(t.data=n)}function xc(t,n){t.value=null==n?"":n}function kc(t,n,e,r){t.style.setProperty(n,e,r?"important":"")}function Oc(t,n){for(var e=0;e<t.options.length;e+=1){var r=t.options[e];if(r.__value===n)return void(r.selected=!0)}}function Sc(t){var n=t.querySelector(":checked")||t.options[0];return n&&n.__value}function Ec(t,n,e){t.classList[e?"add":"remove"](n)}function Ac(t,n){var e=document.createEvent("CustomEvent");return e.initCustomEvent(t,!1,!1,n),e}var jc,Tc=new Qu,Pc=0;function Rc(t){for(var n=5381,e=t.length;e--;)n=(n<<5)-n^t.charCodeAt(e);return n>>>0}function Bc(t,n,e,r,o,i,u){for(var a,c,f,l,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,d=16.666/r,p="{\n",v=0;v<=1;v+=d){var h=n+(e-n)*i(v);p+=100*v+"%{".concat(u(h,1-h),"}\n")}var m=p+"100% {".concat(u(e,1-e),"}\n}"),y=Zu(a="__svelte_".concat(Rc(m),"_")).call(a,s),g=t.ownerDocument;Tc.add(g);var _,$=g.__svelte_stylesheet||(g.__svelte_stylesheet=g.head.appendChild(sc("style")).sheet),b=g.__svelte_rules||(g.__svelte_rules={});b[y]||(b[y]=!0,$.insertRule(Zu(_="@keyframes ".concat(y," ")).call(_,m),$.cssRules.length));var w=t.style.animation||"";return t.style.animation=Zu(c=Zu(f=Zu(l="".concat(w?"".concat(w,", "):"")).call(l,y," ")).call(f,r,"ms linear ")).call(c,o,"ms 1 both"),Pc+=1,y}function Ic(t,n){var e=(t.style.animation||"").split(", "),r=Oa(e).call(e,n?function(t){return na(t).call(t,n)<0}:function(t){return-1===na(t).call(t,"__svelte")}),o=e.length-r.length;o&&(t.style.animation=r.join(", "),(Pc-=o)||oc((function(){Pc||(uu(Tc).call(Tc,(function(t){for(var n=t.__svelte_stylesheet,e=n.cssRules.length;e--;)n.deleteRule(e);t.__svelte_rules={}})),Tc.clear())})))}function Dc(t){jc=t}function Mc(){if(!jc)throw new Error("Function called outside component initialization");return jc}function Cc(t){Mc().$$.on_mount.push(t)}var Nc=[],Lc=[],Fc=[],zc=[],qc=cu.resolve(),Yc=!1;function Hc(){Yc||(Yc=!0,qc.then(Kc))}function Uc(){return Hc(),qc}function Gc(t){Fc.push(t)}function Wc(t){zc.push(t)}var Jc,Vc=!1,Qc=new Qu;function Kc(){if(!Vc){Vc=!0;do{for(var t=0;t<Nc.length;t+=1){var n=Nc[t];Dc(n),Xc(n.$$)}for(Dc(null),Nc.length=0;Lc.length;)Lc.pop()();for(var e=0;e<Fc.length;e+=1){var r=Fc[e];Qc.has(r)||(Qc.add(r),r())}Fc.length=0}while(Nc.length);for(;zc.length;)zc.pop()();Yc=!1,Vc=!1,Qc.clear()}}function Xc(t){if(null!==t.fragment){var n;t.update(),Ua(t.before_update);var e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),uu(n=t.after_update).call(n,Gc)}}function Zc(t,n,e){var r;t.dispatchEvent(Ac(Zu(r="".concat(n?"intro":"outro")).call(r,e)))}var tf,nf=new Qu;function ef(){tf={r:0,c:[],p:tf}}function rf(){tf.r||Ua(tf.c),tf=tf.p}function of(t,n){t&&t.i&&(nf.delete(t),t.i(n))}function uf(t,n,e,r){if(t&&t.o){if(nf.has(t))return;nf.add(t),tf.c.push((function(){nf.delete(t),r&&(e&&t.d(1),r())})),t.o(n)}}var af={duration:0};function cf(t,n,e,r){var o=n(t,e),i=r?0:1,u=null,a=null,c=null;function f(){c&&Ic(t,c)}function l(t,n){var e=t.b-i;return n*=Math.abs(e),{a:i,b:t.b,d:e,duration:n,start:t.start,end:t.start+n,group:t.group}}function s(n){var e=o||af,r=e.delay,s=void 0===r?0:r,d=e.duration,p=void 0===d?300:d,v=e.easing,h=void 0===v?za:v,m=e.tick,y=void 0===m?Fa:m,g=e.css,_={start:rc()+s,b:n};n||(_.group=tf,tf.r+=1),u||a?a=_:(g&&(f(),c=Bc(t,i,n,p,s,h,g)),n&&y(0,1),u=l(_,p),Gc((function(){return Zc(t,n,"start")})),function(t){var n;0===ic.size&&oc(uc),new cu((function(e){ic.add(n={c:t,f:e})}))}((function(n){if(a&&n>a.start&&(u=l(a,p),a=null,Zc(t,u.b,"start"),g&&(f(),c=Bc(t,i,u.b,u.duration,0,h,o.css))),u)if(n>=u.end)y(i=u.b,1-i),Zc(t,u.b,"end"),a||(u.b?f():--u.group.r||Ua(u.group.c)),u=null;else if(n>=u.start){var e=n-u.start;i=u.a+u.d*h(e/u.duration),y(i,1-i)}return!(!u&&!a)})))}return{run:function(t){Ga(o)?(Jc||(Jc=cu.resolve()).then((function(){Jc=null})),Jc).then((function(){o=o(),s(t)})):s(t)},end:function(){f(),u=a=null}}}function ff(t,n,e){var r=t.$$.props[n];void 0!==r&&(t.$$.bound[r]=e,e(t.$$.ctx[r]))}function lf(t){t&&t.c()}function sf(t,n,e,r){var o=t.$$,i=o.fragment,u=o.on_mount,a=o.on_destroy,c=o.after_update;i&&i.m(n,e),r||Gc((function(){var n,e=Oa(n=_a(u).call(u,Ya)).call(n,Ga);a?a.push.apply(a,Gu(e)):Ua(e),t.$$.on_mount=[]})),uu(c).call(c,Gc)}function df(t,n){var e=t.$$;null!==e.fragment&&(Ua(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function pf(t,n){var e;-1===t.$$.dirty[0]&&(Nc.push(t),Hc(),La(e=t.$$.dirty).call(e,0));t.$$.dirty[n/31|0]|=1<<n%31}function vf(t,n,e,r,o,i){var u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[-1],a=jc;Dc(t);var c=t.$$={fragment:null,ctx:null,props:i,update:Fa,not_equal:o,bound:Ha(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Sa(a?a.$$.context:[]),callbacks:Ha(),dirty:u,skip_bound:!1},f=!1;if(c.ctx=e?e(t,n.props||{},(function(n,e){var r=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:e;return c.ctx&&o(c.ctx[n],c.ctx[n]=r)&&(!c.skip_bound&&c.bound[n]&&c.bound[n](r),f&&pf(t,n)),e})):[],c.update(),f=!0,Ua(c.before_update),c.fragment=!!r&&r(c.ctx),n.target){if(n.hydrate){var l=bc(n.target);c.fragment&&c.fragment.l(l),uu(l).call(l,fc)}else c.fragment&&c.fragment.c();n.intro&&of(t.$$.fragment),sf(t,n.target,n.anchor,n.customElement),Kc()}Dc(a)}new Qu(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]);var hf=function(){function t(){qt(this,t)}return Gt(t,[{key:"$destroy",value:function(){df(this,1),this.$destroy=Fa}},{key:"$on",value:function(t,n){var e=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return e.push(n),function(){var t=na(e).call(e,n);-1!==t&&pa(e).call(e,t,1)}}},{key:"$set",value:function(t){this.$$set&&0!==Vu(t).length&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}]),t}(),mf=H.Object.getOwnPropertySymbols,yf=mf,gf=$u;Z({target:"Object",stat:!0,forced:!m,sham:!m},{defineProperties:yt});var _f=s((function(t){var n=H.Object,e=t.exports=function(t,e){return n.defineProperties(t,e)};n.defineProperties.sham&&(e.sham=!0)}));function $f(t,n,e){return n in t?Ht(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var bf=[];function wf(t){var n,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fa,r=[];function o(e){if(Wa(t,e)&&(t=e,n)){for(var o=!bf.length,i=0;i<r.length;i+=1){var u=r[i];u[1](),bf.push(u,t)}if(o){for(var a=0;a<bf.length;a+=2)bf[a][0](bf[a+1]);bf.length=0}}}function i(n){o(n(t))}function u(i){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fa,a=[i,u];return r.push(a),1===r.length&&(n=e(o)||Fa),i(t),function(){var t=na(r).call(r,a);-1!==t&&pa(r).call(r,t,1),0===r.length&&(n(),n=null)}}return{set:o,update:i,subscribe:u}}function xf(t,n,e){var r=!yu(t),o=r?[t]:t,i=n.length<2;return{subscribe:wf(e,(function(t){var e=!1,u=[],a=0,c=Fa,f=function(){if(!a){c();var e=n(r?u[0]:u,t);i?t(e):c=Ga(e)?e:Fa}},l=_a(o).call(o,(function(t,n){return Ja(t,(function(t){u[n]=t,a&=~(1<<n),e&&f()}),(function(){a|=1<<n}))}));return e=!0,f(),function(){Ua(l),c()}})).subscribe}}function kf(t,n){var e=Vu(t);if(yf){var r=yf(t);n&&(r=Oa(r).call(r,(function(n){return gf(t,n).enumerable}))),e.push.apply(e,r)}return e}function Of(t){for(var n=1;n<arguments.length;n++){var e,r=null!=arguments[n]?arguments[n]:{};if(n%2)uu(e=kf(Object(r),!0)).call(e,(function(n){$f(t,n,r[n])}));else if(ra)_f(t,ra(r));else{var o;uu(o=kf(Object(r))).call(o,(function(n){Vi(t,n,gf(r,n))}))}}return t}function Sf(t,n,e){var r=e,o=!1,i=n.length<2,u=xf(t,(function(t,e){return o=!0,i?(r=n(t,e),e(r)):n(t,(function(t){r=t,e(t)})),function(){o=!1}}),e);return Of(Of({},u),{},{get:function(){return o?r:function(t){var n;return Ja(t,(function(t){return n=t}))(),n}(u)}})}var Ef=mf,Af=Ju;function jf(t,n){if(null==t)return{};var e,r,o=function(t,n){if(null==t)return{};var e,r,o={},i=Af(t);for(r=0;r<i.length;r++)e=i[r],Uu(n).call(n,e)>=0||(o[e]=t[e]);return o}(t,n);if(Ef){var i=Ef(t);for(r=0;r<i.length;r++)e=i[r],Uu(n).call(n,e)>=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(o[e]=t[e])}return o}function Tf(t,n){var e=Vu(t);if(yf){var r=yf(t);n&&(r=Oa(r).call(r,(function(n){return gf(t,n).enumerable}))),e.push.apply(e,r)}return e}function Pf(t,n){var e=t,r=wf(t,n),o=r.set;return function(t){for(var n=1;n<arguments.length;n++){var e,r=null!=arguments[n]?arguments[n]:{};if(n%2)uu(e=Tf(Object(r),!0)).call(e,(function(n){$f(t,n,r[n])}));else if(ra)_f(t,ra(r));else{var o;uu(o=Tf(Object(r))).call(o,(function(n){Vi(t,n,gf(r,n))}))}}return t}({set:function(t){e=t,o(t)},get:function(){return e}},jf(r,["set"]))}var Rf=Pf({staff:[],start_time:[],end_time:[],time_interval:900,customers:[],customers_loaded:void 0,week_days:[],customer_gr_def_app_status:[],extras_consider_duration:void 0,extras_multiply_nop:void 0}),Bf=[].slice,If=/MSIE .\./.test(mn),Df=function(t){return function(n,e){var r=arguments.length>2,o=r?Bf.call(arguments,2):void 0;return t(r?function(){("function"==typeof n?n:Function(n)).apply(this,o)}:n,e)}};Z({global:!0,bind:!0,forced:If},{setTimeout:Df(v.setTimeout),setInterval:Df(v.setInterval)});var Mf=H.setTimeout,Cf=se.every,Nf=Xi("every"),Lf=Ti("every");Z({target:"Array",proto:!0,forced:!Nf||!Lf},{every:function(t){return Cf(this,t,arguments.length>1?arguments[1]:void 0)}});var Ff=Mi("Array").every,zf=Array.prototype,qf=function(t){var n=t.every;return t===zf||t instanceof Array&&n===zf.every?Ff:n},Yf="\t\n\v\f\r                 \u2028\u2029\ufeff",Hf="["+Yf+"]",Uf=RegExp("^"+Hf+Hf+"*"),Gf=RegExp(Hf+Hf+"*$"),Wf=function(t){return function(n){var e=String(O(n));return 1&t&&(e=e.replace(Uf,"")),2&t&&(e=e.replace(Gf,"")),e}},Jf={start:Wf(1),end:Wf(2),trim:Wf(3)},Vf=Jf.trim,Qf=v.parseInt,Kf=/^[+-]?0[Xx]/,Xf=8!==Qf(Yf+"08")||22!==Qf(Yf+"0x16")?function(t,n){var e=Vf(String(t));return Qf(e,n>>>0||(Kf.test(e)?16:10))}:Qf;Z({global:!0,forced:parseInt!=Xf},{parseInt:Xf});var Zf=H.parseInt,tl=[],nl=tl.sort,el=h((function(){tl.sort(void 0)})),rl=h((function(){tl.sort(null)})),ol=Xi("sort");Z({target:"Array",proto:!0,forced:el||!rl||!ol},{sort:function(t){return void 0===t?nl.call(un(this)):nl.call(un(this),U(t))}});var il=Mi("Array").sort,ul=Array.prototype,al=function(t){var n=t.sort;return t===ul||t instanceof Array&&n===ul.sort?il:n},cl=se.find,fl="find",ll=!0,sl=Ti(fl);fl in[]&&Array(1).find((function(){ll=!1})),Z({target:"Array",proto:!0,forced:ll||!sl},{find:function(t){return cl(this,t,arguments.length>1?arguments[1]:void 0)}});var dl=Mi("Array").find,pl=Array.prototype,vl=function(t){var n=t.find;return t===pl||t instanceof Array&&n===pl.find?dl:n},hl=st.includes,ml=Ti("indexOf",{ACCESSORS:!0,1:0});Z({target:"Array",proto:!0,forced:!ml},{includes:function(t){return hl(this,t,arguments.length>1?arguments[1]:void 0)}});var yl=Mi("Array").includes,gl=pn("match"),_l=function(t){if(function(t){var n;return E(t)&&(void 0!==(n=t[gl])?!!n:"RegExp"==w(t))}(t))throw TypeError("The method doesn't accept regular expressions");return t},$l=pn("match");Z({target:"String",proto:!0,forced:!function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[$l]=!1,"/./"[t](n)}catch(t){}}return!1}("includes")},{includes:function(t){return!!~String(O(this)).indexOf(_l(t),arguments.length>1?arguments[1]:void 0)}});var bl=Mi("String").includes,wl=Array.prototype,xl=String.prototype,kl=function(t){var n=t.includes;return t===wl||t instanceof Array&&n===wl.includes?yl:"string"==typeof t||t===xl||t instanceof String&&n===xl.includes?bl:n};function Ol(t,n){return vl(n).call(n,(function(n){return n.id===t}))||null}function Sl(t){for(var n,e=arguments.length,r=new Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];return u.default.extend.apply(u.default,Zu(n=[{},t]).call(n,r))}function El(t){for(var n,e=arguments.length,r=new Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];return u.default.extend.apply(u.default,Zu(n=[!0,{},t]).call(n,r))}function Al(t){var n;return kl(n=BooklyL10nGlobal.addons).call(n,t)}var jl=BooklyL10nGlobal.csrf_token;function Tl(t,n){var e;if(void 0===Ji||null==mu(t)){if(yu(t)||(e=function(t,n){var e;if(!t)return;if("string"==typeof t)return Pl(t,n);var r=vu(e=Object.prototype.toString.call(t)).call(e,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return oa(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Pl(t,n)}(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,a=!1;return{s:function(){e=Si(t)},n:function(){var t=e.next();return u=t.done,t},e:function(t){a=!0,i=t},f:function(){try{u||null==e.return||e.return()}finally{if(a)throw i}}}}function Pl(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var Rl=c.default;function Bl(t,n){var e,r={items:[],groups:[]},o=Tl(t);try{var i=function(){var t=e.value;if(t[n]){var o,i=vl(o=r.groups).call(o,(function(e){return e.label===t[n]}));i||(i={label:t[n],items:[]},r.groups.push(i)),i.items.push(t)}else r.items.push(t)};for(o.s();!(e=o.n()).done;)i()}catch(t){o.e(t)}finally{o.f()}return r}function Il(t,n){var e=Vu(t);if(yf){var r=yf(t);n&&(r=Oa(r).call(r,(function(n){return gf(t,n).enumerable}))),e.push.apply(e,r)}return e}function Dl(t){for(var n=1;n<arguments.length;n++){var e,r=null!=arguments[n]?arguments[n]:{};if(n%2)uu(e=Il(Object(r),!0)).call(e,(function(n){$f(t,n,r[n])}));else if(ra)_f(t,ra(r));else{var o;uu(o=Il(Object(r))).call(o,(function(n){Vi(t,n,gf(r,n))}))}}return t}function Ml(t,n){var e=El({value:t}),r=Pf(t,n);return Dl(Dl({},r),{},{reset:function(){return r.set(El(e).value)}})}var Cl=Ml(null),Nl=Ml(null),Ll=Ml(""),Fl=Ml(0),zl=Ml({url:null,copied:!1}),ql=Ml(null),Yl=Ml(!1),Hl=Ml(null),Ul=Ml(null),Gl=Ml(null),Wl=Ml(null),Jl=Ml(null),Vl=Ml(!1),Ql=Ml(!1),Kl=Ml(!1),Xl=Ml(null),Zl=Ml({until:null,type:"daily",monthly:{on:"day",day:null,weekday:null},daily:{every:1},weekly:{on:[]}}),ts=Ml([]),ns=Ml(""),es=Pf(null),rs=Ml({customers_appointments_limit:!1,date_interval_not_available:!1,date_interval_warning:!1,interval_not_in_service_schedule:!1,interval_not_in_staff_schedule:!1,overflow_capacity:!1,service_required:!1,provider_required:!1,staff_reaches_working_time_limit:!1,custom_service_name_required:!1,no_timeslots_available:!1}),os=Ml("main"),is=Pf(!1);function us(t,n){var e;if(void 0===Ji||null==mu(t)){if(yu(t)||(e=function(t,n){var e;if(!t)return;if("string"==typeof t)return as(t,n);var r=vu(e=Object.prototype.toString.call(t)).call(e,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return oa(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return as(t,n)}(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,a=!1;return{s:function(){e=Si(t)},n:function(){var t=e.next();return u=t.done,t},e:function(t){a=!0,i=t},f:function(){try{u||null==e.return||e.return()}finally{if(a)throw i}}}}function as(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function cs(t){var n=Rf.get();t.custom_fields=[],t.extras=[],t.extras_consider_duration=n.extras_consider_duration,t.extras_multiply_nop=n.extras_multiply_nop,t.number_of_persons=Nl.get()?Math.max($s.get().min-ls(ts.get()),1):1,t.notes=null,t.collaborative_token=null,t.collaborative_service=null,t.compound_token=null,t.compound_service=null,t.payment_action=null,t.payment_id=null,t.payment_type=null,t.payment_title=null,t.payment_price=null,t.payment_tax=null,t.package_id=null,t.series_id=null,t.ca_id=null,t.status=n.customer_gr_def_app_status[t.group_id||0]}function fs(t){var n,e=0,r=us(t);try{for(r.s();!(n=r.n()).done;){e+=n.value.number_of_persons}}catch(t){r.e(t)}finally{r.f()}return e}function ls(t,n){var e,r=0,o=us(t);try{for(o.s();!(e=o.n()).done;){var i,u=e.value;n&&u.id===n.id||kl(i=Rl.freeStatuses).call(i,u.status)||(r+=u.number_of_persons)}}catch(t){o.e(t)}finally{o.f()}return r}function ss(t){var n,e=[];return uu(n=ts.get()).call(n,(function(n){var r={id:n.id,ca_id:n.ca_id,custom_fields:n.custom_fields,extras:n.extras,extras_multiply_nop:n.extras_multiply_nop,extras_consider_duration:n.extras_consider_duration,number_of_persons:n.number_of_persons,timezone:n.timezone,status:n.status};t||(r.series_id=n.series_id,r.notes=n.notes,r.payment_id=n.payment_id,r.payment_action=n.payment_action||"",r.payment_price=n.payment_price,r.payment_tax=n.payment_tax),e.push(r)})),Ma(e)}function ds(t){var n=t.full_name;return""===t.email&&""===t.phone||(n+=" (",""!==t.email&&(n+=t.email,""!==t.phone&&(n+=", ")),""!==t.phone&&(n+=t.phone),n+=")"),n}var ps=Ml(null),vs=Ml({id:null,startDate:null,startTime:null,endTime:null}),hs=Pf((function(){}));function ms(t,n){var e;if(void 0===Ji||null==mu(t)){if(yu(t)||(e=function(t,n){var e;if(!t)return;if("string"==typeof t)return ys(t,n);var r=vu(e=Object.prototype.toString.call(t)).call(e,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return oa(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ys(t,n)}(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,a=!1;return{s:function(){e=Si(t)},n:function(){var t=e.next();return u=t.done,t},e:function(t){a=!0,i=t},f:function(){try{u||null==e.return||e.return()}finally{if(a)throw i}}}}function ys(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var gs=null,_s=null,$s=Sf([Cl,Nl,ql],(function(t){var n=Wi(t,3),e=n[0],r=n[1],o=n[2],i={min:1,max:1};if(e&&r)if(null===r.id)i.max=r.locations[0].capacity_max;else{var u=o?[o.id,0]:[0],a=Ol(r.id,e.services);if(a){var c,f=ms(u);try{for(f.s();!(c=f.n()).done;){var l=c.value;if(l in a.locations){i.min=a.locations[l].capacity_min,i.max=a.locations[l].capacity_max;break}}}catch(t){f.e(t)}finally{f.f()}}}return i})),bs=Sf([Rf,vs,Nl,Cl,ts,ql,Hl],(function(t,n){var e=Wi(t,7),r=e[0],o=e[1],i=e[2],a=e[3],c=e[4],f=e[5],l=e[6];if(!Rl.appropriate_slots||i&&null===i.id){var s,d;Vl.set(!1);var p=i&&i.hasOwnProperty("custom_time_slots")?vu(s=i.custom_time_slots.start_time).call(s):vu(d=r.start_time).call(d);o.startTime&&qf(p).call(p,(function(t){return t.value!==o.startTime.value}))&&(p.push(o.startTime),xs(p)),n(p)}else i&&l&&a?(null!==_s&&(clearTimeout(_s),_s=null),_s=Mf((function(){null!==gs&&(gs.abort(),gs=null),Vl.set(!0);var t={action:"bookly_get_day_schedule",csrf_token:jl,appointment_id:vs.get().id,staff_id:a.id,location_id:f?f.id:null,service_id:i.id,date:l.format("DD-MM-YYYY"),nop:Math.max(ls(c),$s.get().min)};gs=u.default.post(ajaxurl,t,(function(t){var e=rs.get();t.data.start&&t.data.start.length>0?(e.no_timeslots_available=!1,Vl.set(!1),i.custom_time_slots=[],i.custom_time_slots.end_time=t.data.end,n(t.data.start)):e.no_timeslots_available=!0,rs.set(e)}),"json")}),10)):(Vl.set(!0),n([]))})),ws=Sf([Rf,Ul,vs,Nl,bs],(function(t){var n=Wi(t,5),e=n[0],r=n[1],o=n[2],i=n[3],u=n[4],c=[];if(r&&u)if(i&&i.units_max>1)for(var f=a.default(r,"HH:mm"),l=i.units_min;l<=i.units_max;++l){var s,d=f.clone().add(l*i.duration,"seconds"),p=Math.floor(d.diff(a.default("00:00","HH:mm"))/3600/1e3),v=ms(e.end_time);try{for(v.s();!(s=v.n()).done;){var h=s.value;h.value===(p<10?"0"+p:p)+":"+d.format("mm")&&(h.title=h.title_time+" ("+l+")",c.push(h))}}catch(t){v.e(t)}finally{v.f()}}else{var m,y=r.split(":"),g=24+Zf(y[0])+":"+y[1],_=ms(i&&i.hasOwnProperty("custom_time_slots")?i.custom_time_slots.end_time:e.end_time);try{for(_.s();!(m=_.n()).done;){var $=m.value;if($.value>g)break;$.value>r&&($.title=$.title_time,c.push($))}}catch(t){_.e(t)}finally{_.f()}o.endTime&&o.endTime.value>r&&qf(c).call(c,(function(t){return t.value!==o.endTime.value}))&&(c.push(o.endTime),xs(c))}return c}));function xs(t){al(t).call(t,(function(t,n){return t.value<n.value?-1:t.value>n.value?1:0}))}function ks(t,n){if(!n)return null;var e=vl(n).call(n,(function(n){return e=n.value,r=t,o=e.split(":"),i=r.split(":"),Zf(60*o[0]+o[1])>=Zf(60*i[0]+i[1]);var e,r,o,i}));return e||n[n.length-1]}bs.subscribe((function(t){Ul.get()&&t.length&&(Gl.set(ks(Ul.get(),t)),Ul.set(Gl.get().value))})),ws.subscribe((function(t){Wl.get()&&t.length&&(Jl.set(ks(Wl.get(),t)),Wl.set(Jl.get().value))}));var Os=Ml([]),Ss=Ml([]),Es=Ml(null),As=Ml([]),js=Ml("current"),Ts=Ml({all:[],changed_status:[]}),Ps=Ml("changed_status"),Rs=Ml([]);function Bs(){var t=Nl.get(),n=t?t.duration*t.units_min:Rf.get().time_interval;(n<86400||t&&t.units_max>1)&&(Wl.set(moment(Ul.get(),"HH:mm").add(n,"seconds").format("HH:mm")),ws.get()&&Jl.set(ks(Wl.get(),ws.get())))}function Is(){return Cs("start")}function Ds(){return Is().format("YYYY-MM-DD HH:mm:00")}function Ms(){return Cs("end").format("YYYY-MM-DD HH:mm:00")}function Cs(t){if(Hl.get()){var n=Hl.get().clone(),e=Nl.get(),r=Ul.get(),o=Wl.get(),i=[0,0];if("end"===t)if(e&&e.duration>=86400){var u;if(o){var a=r.split(":"),c=o.split(":"),f=Math.max(e.duration,60*(60*c[0]+Zf(c[1])-60*a[0]-Zf(a[1])));u=Zf(f/86400)}else u=e&&e.units_max>1?Zf(e.duration*e.units_min/86400):Zf(e.duration/86400);n.add(u,"days")}else i=o.split(":");else e&&e.duration<86400&&(i=r.split(":"));return n.hours(i[0]),n.minutes(i[1]),n}}function Ns(t){var n=moment(t),e=n.format("d"),r=n.format("M"),o=n.format("DD");return Rl.datePicker.dayNamesShort[e]+", "+Rl.datePicker.monthNamesShort[r-1]+" "+o}function Ls(t,n){for(var e=0;e<n.length;++e)if(t===n[e].value)return n[e].title}function Fs(){var t,n=As.get();return n.items&&qf(t=n.items).call(t,(function(t){return t.deleted}))}var zs=se.some,qs=Xi("some"),Ys=Ti("some");Z({target:"Array",proto:!0,forced:!qs||!Ys},{some:function(t){return zs(this,t,arguments.length>1?arguments[1]:void 0)}});var Hs=Mi("Array").some,Us=Array.prototype,Gs=function(t){var n=t.some;return t===Us||t instanceof Array&&n===Us.some?Hs:n},Ws=["sun","mon","tue","wed","thu","fri","sat"];function Js(t,n,e){var r,o=Vs(t);switch(n.type){case"daily":var i;if(t.diff(e,"days")%qf(n.daily)==0)if(qf(n.daily)>6||Gs(i=Rf.get().week_days).call(i,(function(t){return t===o})))return!0;break;case"weekly":case"biweekly":if(("weekly"===n.type||t.diff(e.clone().startOf("isoWeek"),"weeks")%2==0)&&Gs(r=n.weekly.on).call(r,(function(t){return t===o})))return!0;break;case"monthly":switch(n.monthly.on){case"day":if(t.date()===n.monthly.day)return!0;break;case"last":if(o===n.monthly.weekday&&t.clone().endOf("month").diff(t,"days")<7)return!0;break;default:var u=t.diff(t.clone().startOf("month"),"days"),a=["first","second","third","fourth"],c=na(a).call(a,n.monthly.on);if(o===n.monthly.weekday&&u>=7*c&&u<7*(c+1))return!0}}return!1}function Vs(t){return Ws[t.format("d")]}var Qs=!1;function Ks(){return Qs?u.default.Deferred((function(t){return t.resolve()})):u.default.get(ajaxurl,{action:"bookly_get_data_for_appointment_form",csrf_token:jl}).done((function(t){if(Qs=!0,Rl.service_main){var n,e=[];uu(n=t.staff).call(n,(function(t){var n;uu(n=t.services).call(n,(function(t){void 0===vl(e).call(e,(function(n){return n.id===t.id}))&&e.push(t)}))})),t.services=e}Rf.set(t)}))}function Xs(){Cl.reset(),ps.reset(),Nl.reset(),Ll.reset(),Fl.reset(),zl.reset(),ql.reset(),Yl.reset(),Hl.reset(),Ul.reset(),Gl.reset(),Wl.reset(),Jl.reset(),ts.reset(),js.reset(),ns.reset(),vs.reset(),os.reset(),Zs(),Ql.reset(),Xl.reset(),Zl.reset(),Kl.reset(),Ts.reset(),Ps.reset(),Rs.reset(),Os.reset(),Ss.reset(),Es.reset(),As.reset(),js.reset()}function Zs(){rs.reset()}var td=null,nd=null;xf([Nl,Cl,ql,Yl,Ul,Wl,Hl,ts,Vl],(function(t,n){var e=Wi(t,9),r=e[0],o=e[1],i=e[2],a=e[3],c=e[4],f=e[5];e[6],e[7];var l=e[8];null!==nd&&(clearTimeout(nd),nd=null),nd=Mf((function(){if(null!==td&&(td.abort(),td=null),o&&r&&c&&f&&!l){var t={action:"bookly_check_appointment_errors",csrf_token:jl,appointment_id:vs.get().id,customers:ss(!0),staff_id:o.id,location_id:i?i.id:null};r.id?t.service_id=r.id:t.service_id="",a||(t.start_date=Ds(),t.end_date=Ms()),td=u.default.post(ajaxurl,t,n,"json")}else n(null)}),10)}),null).subscribe((function(t){null===t?Zs():rs.update((function(n){var e;return uu(e=Vu(t)).call(e,(function(e){return n[e]=t[e]})),n}))}));function ed(t){var n,e=[];uu(n=As.get()).call(n,(function(n){t.slots===n.slots||n.deleted||e.push(n.slots)})),rd(t.date,e).done((function(t){Os.set(t.data.length?t.data[0].options:[])}))}function rd(t,n){var e={action:"bookly_recurring_appointments_get_schedule",csrf_token:jl,staff_id:Cl.get().id,service_id:Nl.get().id,location_id:ql.get()?ql.get().id:null,exclude:n,nop:fs(ts.get())};if(t)e.repeat="daily",e.datetime=t,e.until=t,e.params={every:1},e.with_options=1;else{var r=Zl.get();e.repeat=r.type,e.datetime=Ds(),e.until=r.until.format("YYYY-MM-DD"),e.params=r["biweekly"===r.type?"weekly":r.type],e.with_options=0}return jQuery.post(ajaxurl,e)}function od(){for(var t=Ts.get(),n=Ps.get(),e=Rs.get(),r=[],o=[],i=function(){var i,c=a[u];uu(i=t[c]).call(i,(function(t,i){n===c&&kl(e).call(e,i)&&r.push(t),t.attachments&&o.push.apply(o,Gu(t.attachments))}))},u=0,a=Vu(t);u<a.length;u++)i();return{selected:r,attachments:o}}function id(t,n){var e;if(void 0===Ji||null==mu(t)){if(yu(t)||(e=function(t,n){var e;if(!t)return;if("string"==typeof t)return ud(t,n);var r=vu(e=Object.prototype.toString.call(t)).call(e,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return oa(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ud(t,n)}(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,a=!1;return{s:function(){e=Si(t)},n:function(){var t=e.next();return u=t.done,t},e:function(t){a=!0,i=t},f:function(){try{u||null==e.return||e.return()}finally{if(a)throw i}}}}function ud(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function ad(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}var cd=function(t){return{}},fd=function(t){return{}};function ld(t){var n,e,r,o,i,u,a,c,f,l,s,d,p,v,h=t[6].default,m=Qa(h,t,t[5],null),y=t[6].footer,g=Qa(y,t,t[5],fd);return{c:function(){n=sc("div"),e=sc("div"),r=sc("div"),o=sc("div"),i=sc("h5"),u=dc(t[1]),a=pc(),(c=sc("button")).innerHTML='<span aria-hidden="true">×</span>',f=pc(),l=sc("div"),m&&m.c(),s=pc(),d=sc("div"),g&&g.c(),yc(i,"class","modal-title"),yc(c,"type","button"),yc(c,"class","close"),yc(c,"data-dismiss","bookly-modal"),yc(c,"aria-label","Close"),yc(o,"class","modal-header"),yc(l,"class","modal-body"),yc(d,"class","modal-footer"),yc(r,"class","modal-content"),yc(e,"class",p="modal-dialog modal-"+t[0]),yc(n,"class","bookly-modal bookly-fade"),yc(n,"tabindex","-1"),yc(n,"role","dialog")},m:function(p,h){cc(p,n,h),ac(n,e),ac(e,r),ac(r,o),ac(o,i),ac(i,u),ac(o,a),ac(o,c),ac(r,f),ac(r,l),m&&m.m(l,null),ac(r,s),ac(r,d),g&&g.m(d,null),t[7](n),v=!0},p:function(t,n){var r=Wi(n,1)[0];(!v||2&r)&&wc(u,t[1]),m&&m.p&&32&r&&Xa(m,h,t,t[5],r,null,null),g&&g.p&&32&r&&Xa(g,y,t,t[5],r,cd,fd),(!v||1&r&&p!==(p="modal-dialog modal-"+t[0]))&&yc(e,"class",p)},i:function(t){v||(of(m,t),of(g,t),v=!0)},o:function(t){uf(m,t),uf(g,t),v=!1},d:function(e){e&&fc(n),m&&m.d(e),g&&g.d(e),t[7](null)}}}function sd(t,n,e){var r,o,i=n.$$slots,a=void 0===i?{}:i,c=n.$$scope,f=(r=Mc(),function(t,n){var e=r.$$.callbacks[t];if(e){var o,i=Ac(t,n);uu(o=vu(e).call(e)).call(o,(function(t){t.call(r,i)}))}}),l=n.size,s=void 0===l?"lg":l,d=n.title,p=void 0===d?"":d;return Cc((function(){return u.default(o).booklyModal().on("hidden.bs.modal",(function(){return f("hidden")}))})),t.$$set=function(t){"size"in t&&e(0,s=t.size),"title"in t&&e(1,p=t.title),"$$scope"in t&&e(5,c=t.$$scope)},[s,p,o,function(){u.default(o).booklyModal("show")},function(){u.default(o).booklyModal("hide")},c,a,function(t){Lc[t?"unshift":"push"]((function(){e(2,o=t)}))}]}var dd=function(t){nn(e,t);var n=ad(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,sd,ld,Wa,{size:0,title:1,show:3,hide:4}),r}return Gt(e,[{key:"show",get:function(){return this.$$.ctx[3]}},{key:"hide",get:function(){return this.$$.ctx[4]}}]),e}(hf),pd=Jf.trim,vd=v.parseFloat,hd=1/vd(Yf+"-0")!=-1/0?function(t){var n=pd(String(t)),e=vd(n);return 0===e&&"-"==n.charAt(0)?-0:e}:vd;Z({global:!0,forced:parseFloat!=hd},{parseFloat:hd});var md=H.parseFloat;function yd(t){var n=t-1;return n*n*n+1}function gd(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=n.delay,r=void 0===e?0:e,o=n.duration,i=void 0===o?400:o,u=n.easing,a=void 0===u?yd:u,c=getComputedStyle(t),f=+c.opacity,l=md(c.height),s=md(c.paddingTop),d=md(c.paddingBottom),p=md(c.marginTop),v=md(c.marginBottom),h=md(c.borderTopWidth),m=md(c.borderBottomWidth);return{delay:r,duration:i,easing:a,css:function(t){return"overflow: hidden;"+"opacity: ".concat(Math.min(20*t,1)*f,";")+"height: ".concat(t*l,"px;")+"padding-top: ".concat(t*s,"px;")+"padding-bottom: ".concat(t*d,"px;")+"margin-top: ".concat(t*p,"px;")+"margin-bottom: ".concat(t*v,"px;")+"border-top-width: ".concat(t*h,"px;")+"border-bottom-width: ".concat(t*m,"px;")}}}function _d(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function $d(t){var n,e,r,o,i,u,a,c=t[4].default,f=Qa(c,t,t[3],null);return{c:function(){n=sc("div"),e=sc("i"),o=pc(),f&&f.c(),yc(e,"class",r="fas pl-1 "+("danger"===t[1]?"fa-times":"fa-exclamation-triangle")),yc(n,"class",i="alert alert-"+t[1]+" form-group "+t[2]+" p-1")},m:function(t,r){cc(t,n,r),ac(n,e),ac(n,o),f&&f.m(n,null),a=!0},p:function(t,o){(!a||2&o&&r!==(r="fas pl-1 "+("danger"===t[1]?"fa-times":"fa-exclamation-triangle")))&&yc(e,"class",r),f&&f.p&&8&o&&Xa(f,c,t,t[3],o,null,null),(!a||6&o&&i!==(i="alert alert-"+t[1]+" form-group "+t[2]+" p-1"))&&yc(n,"class",i)},i:function(t){a||(of(f,t),Gc((function(){u||(u=cf(n,gd,{},!0)),u.run(1)})),a=!0)},o:function(t){uf(f,t),u||(u=cf(n,gd,{},!1)),u.run(0),a=!1},d:function(t){t&&fc(n),f&&f.d(t),t&&u&&u.end()}}}function bd(t){var n,e,r=t[0]&&$d(t);return{c:function(){r&&r.c(),n=vc()},m:function(t,o){r&&r.m(t,o),cc(t,n,o),e=!0},p:function(t,e){var o=Wi(e,1)[0];t[0]?r?(r.p(t,o),1&o&&of(r,1)):((r=$d(t)).c(),of(r,1),r.m(n.parentNode,n)):r&&(ef(),uf(r,1,1,(function(){r=null})),rf())},i:function(t){e||(of(r),e=!0)},o:function(t){uf(r),e=!1},d:function(t){r&&r.d(t),t&&fc(n)}}}function wd(t,n,e){var r=n.$$slots,o=void 0===r?{}:r,i=n.$$scope,u=n.show,a=void 0===u||u,c=n.type,f=void 0===c?"warning":c,l=n.class,s=void 0===l?"":l;return t.$$set=function(t){"show"in t&&e(0,a=t.show),"type"in t&&e(1,f=t.type),"class"in t&&e(2,s=t.class),"$$scope"in t&&e(3,i=t.$$scope)},[a,f,s,i,o]}var xd=function(t){nn(e,t);var n=_d(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,wd,bd,Wa,{show:0,type:1,class:2}),r}return e}(hf);function kd(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Od(t,n,e){var r=vu(t).call(t);return r[10]=n[e],r}function Sd(t,n,e){var r=vu(t).call(t);return r[13]=n[e],r}function Ed(t,n,e){var r=vu(t).call(t);return r[13]=n[e],r}function Ad(t){var n;return{c:function(){(n=sc("option")).__value=null,n.value=n.__value},m:function(t,e){cc(t,n,e)},d:function(t){t&&fc(n)}}}function jd(t){var n,e,r,o=t[4](t[13],t[2])+"";return{c:function(){n=sc("option"),e=dc(o),n.__value=r=t[13],n.value=n.__value},m:function(t,r){cc(t,n,r),ac(n,e)},p:function(t,i){6&i&&o!==(o=t[4](t[13],t[2])+"")&&wc(e,o),2&i&&r!==(r=t[13])&&(n.__value=r,n.value=n.__value)},d:function(t){t&&fc(n)}}}function Td(t){var n,e,r,o=t[4](t[13],t[2])+"";return{c:function(){n=sc("option"),e=dc(o),n.__value=r=t[13],n.value=n.__value},m:function(t,r){cc(t,n,r),ac(n,e)},p:function(t,i){6&i&&o!==(o=t[4](t[13],t[2])+"")&&wc(e,o),2&i&&r!==(r=t[13])&&(n.__value=r,n.value=n.__value)},d:function(t){t&&fc(n)}}}function Pd(t){for(var n,e,r=t[10].items,o=[],i=0;i<r.length;i+=1)o[i]=Td(Sd(t,r,i));return{c:function(){n=sc("optgroup");for(var r=0;r<o.length;r+=1)o[r].c();yc(n,"label",e=t[10].label)},m:function(t,e){cc(t,n,e);for(var r=0;r<o.length;r+=1)o[r].m(n,null)},p:function(t,i){if(22&i){var u;for(r=t[10].items,u=0;u<r.length;u+=1){var a=Sd(t,r,u);o[u]?o[u].p(a,i):(o[u]=Td(a),o[u].c(),o[u].m(n,null))}for(;u<o.length;u+=1)o[u].d(1);o.length=r.length}2&i&&e!==(e=t[10].label)&&yc(n,"label",e)},d:function(t){t&&fc(n),lc(o,t)}}}function Rd(t){var n,e=Rl.l10n.notices.provider_required+"";return{c:function(){n=dc(e)},m:function(t,e){cc(t,n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Bd(t){for(var n,e,r,o,i,u,a,c,f,l,s=null===t[0]&&Ad(),d=t[1].items,p=[],v=0;v<d.length;v+=1)p[v]=jd(Ed(t,d,v));for(var h=t[1].groups,m=[],y=0;y<h.length;y+=1)m[y]=Pd(Od(t,h,y));return a=new xd({props:{show:t[3].provider_required,type:"danger",class:"mt-2",$$slots:{default:[Rd]},$$scope:{ctx:t}}}),{c:function(){(n=sc("label")).textContent="".concat(Rl.l10n.provider),e=pc(),r=sc("select"),s&&s.c(),o=vc();for(var c=0;c<p.length;c+=1)p[c].c();i=vc();for(var f=0;f<m.length;f+=1)m[f].c();u=pc(),lf(a.$$.fragment),yc(n,"for","bookly-provider"),yc(r,"id","bookly-provider"),yc(r,"class","form-control custom-select"),void 0===t[0]&&Gc((function(){return t[9].call(r)}))},m:function(d,v){cc(d,n,v),cc(d,e,v),cc(d,r,v),s&&s.m(r,null),ac(r,o);for(var h=0;h<p.length;h+=1)p[h].m(r,null);ac(r,i);for(var y=0;y<m.length;y+=1)m[y].m(r,null);Oc(r,t[0]),cc(d,u,v),sf(a,d,v),c=!0,f||(l=[hc(r,"change",t[9]),hc(r,"change",t[5])],f=!0)},p:function(t,n){var e=Wi(n,1)[0];if(null===t[0]?s||((s=Ad()).c(),s.m(r,o)):s&&(s.d(1),s=null),22&e){var u;for(d=t[1].items,u=0;u<d.length;u+=1){var c=Ed(t,d,u);p[u]?p[u].p(c,e):(p[u]=jd(c),p[u].c(),p[u].m(r,i))}for(;u<p.length;u+=1)p[u].d(1);p.length=d.length}if(22&e){var f;for(h=t[1].groups,f=0;f<h.length;f+=1){var l=Od(t,h,f);m[f]?m[f].p(l,e):(m[f]=Pd(l),m[f].c(),m[f].m(r,null))}for(;f<m.length;f+=1)m[f].d(1);m.length=h.length}3&e&&Oc(r,t[0]);var v={};8&e&&(v.show=t[3].provider_required),262144&e&&(v.$$scope={dirty:e,ctx:t}),a.$set(v)},i:function(t){c||(of(a.$$.fragment,t),c=!0)},o:function(t){uf(a.$$.fragment,t),c=!1},d:function(t){t&&fc(n),t&&fc(e),t&&fc(r),s&&s.d(),lc(p,t),lc(m,t),t&&fc(u),df(a,t),f=!1,Ua(l)}}}function Id(t,n,e){var r,o,i,u,a,c,f;function l(){!function(){var t=Cl.get();1===t.locations.length&&ql.set(t.locations[0])}()}return Va(t,Rf,(function(t){return e(7,r=t)})),Va(t,Cl,(function(t){return e(0,o=t)})),Va(t,Nl,(function(t){return e(8,i=t)})),Va(t,ps,(function(t){return e(2,u=t)})),Va(t,rs,(function(t){return e(3,a=t)})),t.$$.update=function(){if(449&t.$$.dirty)if(Rl.service_main)if(i){var n=function(t,n){return Oa(t).call(t,(function(t){var e;return vl(e=t.services).call(e,(function(t){return t.id===n}))}))}(r.staff,i.id);o&&!Ol(o.id,n)&&tc(Cl,o=null,o),e(1,c=Bl(n,"category")),f!==i.id&&(null===o&&n.length<=2&&(tc(Cl,o=n[0],o),l()),e(6,f=i.id))}else e(1,c=Bl([],"category")),tc(Nl,i=null,i);else e(1,c=Bl(function(t,n){return Oa(t).call(t,(function(t){return!t.archived||t===n}))}(r.staff,o),"category"))},[o,c,u,a,function(t,n){return t.full_name+(t===n?" (".concat(Rl.l10n.staff_any,")"):"")},l,f,r,i,function(){o=Sc(this),Cl.set(o),e(1,c),e(7,r),e(0,o),e(8,i),e(6,f)}]}var Dd=function(t){nn(e,t);var n=kd(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Id,Bd,Wa,{}),r}return e}(hf);function Md(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Cd(t,n,e){var r=vu(t).call(t);return r[9]=n[e],r}function Nd(t,n,e){var r=vu(t).call(t);return r[12]=n[e],r}function Ld(t,n,e){var r=vu(t).call(t);return r[12]=n[e],r}function Fd(t){var n,e,r,o=t[12].name+"";return{c:function(){n=sc("option"),e=dc(o),n.__value=r=t[12],n.value=n.__value},m:function(t,r){cc(t,n,r),ac(n,e)},p:function(t,i){2&i&&o!==(o=t[12].name+"")&&wc(e,o),2&i&&r!==(r=t[12])&&(n.__value=r,n.value=n.__value)},d:function(t){t&&fc(n)}}}function zd(t){var n,e,r,o=t[12].name+"";return{c:function(){n=sc("option"),e=dc(o),n.__value=r=t[12],n.value=n.__value},m:function(t,r){cc(t,n,r),ac(n,e)},p:function(t,i){2&i&&o!==(o=t[12].name+"")&&wc(e,o),2&i&&r!==(r=t[12])&&(n.__value=r,n.value=n.__value)},d:function(t){t&&fc(n)}}}function qd(t){for(var n,e,r=t[9].items,o=[],i=0;i<r.length;i+=1)o[i]=zd(Nd(t,r,i));return{c:function(){n=sc("optgroup");for(var r=0;r<o.length;r+=1)o[r].c();yc(n,"label",e=t[9].label)},m:function(t,e){cc(t,n,e);for(var r=0;r<o.length;r+=1)o[r].m(n,null)},p:function(t,i){if(2&i){var u;for(r=t[9].items,u=0;u<r.length;u+=1){var a=Nd(t,r,u);o[u]?o[u].p(a,i):(o[u]=zd(a),o[u].c(),o[u].m(n,null))}for(;u<o.length;u+=1)o[u].d(1);o.length=r.length}2&i&&e!==(e=t[9].label)&&yc(n,"label",e)},d:function(t){t&&fc(n),lc(o,t)}}}function Yd(t){var n,e=Rl.l10n.notices.service_required+"";return{c:function(){n=dc(e)},m:function(t,e){cc(t,n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Hd(t){for(var n,e,r,o,i,u,a,c,f,l,s=t[1].items,d=[],p=0;p<s.length;p+=1)d[p]=Fd(Ld(t,s,p));for(var v=t[1].groups,h=[],m=0;m<v.length;m+=1)h[m]=qd(Cd(t,v,m));return a=new xd({props:{show:t[2].service_required,type:"danger",class:"mt-2",$$slots:{default:[Yd]},$$scope:{ctx:t}}}),{c:function(){(n=sc("label")).textContent="".concat(Rl.l10n.service),e=pc(),r=sc("select"),(o=sc("option")).textContent="".concat(Rl.l10n.select_a_service);for(var c=0;c<d.length;c+=1)d[c].c();i=vc();for(var f=0;f<h.length;f+=1)h[f].c();u=pc(),lf(a.$$.fragment),yc(n,"for","bookly-service"),o.__value=null,o.value=o.__value,yc(r,"id","bookly-service"),yc(r,"class","form-control custom-select"),void 0===t[0]&&Gc((function(){return t[7].call(r)}))},m:function(s,p){cc(s,n,p),cc(s,e,p),cc(s,r,p),ac(r,o);for(var v=0;v<d.length;v+=1)d[v].m(r,null);ac(r,i);for(var m=0;m<h.length;m+=1)h[m].m(r,null);Oc(r,t[0]),cc(s,u,p),sf(a,s,p),c=!0,f||(l=[hc(r,"change",t[7]),hc(r,"change",t[3])],f=!0)},p:function(t,n){var e=Wi(n,1)[0];if(2&e){var o;for(s=t[1].items,o=0;o<s.length;o+=1){var u=Ld(t,s,o);d[o]?d[o].p(u,e):(d[o]=Fd(u),d[o].c(),d[o].m(r,i))}for(;o<d.length;o+=1)d[o].d(1);d.length=s.length}if(2&e){var c;for(v=t[1].groups,c=0;c<v.length;c+=1){var f=Cd(t,v,c);h[c]?h[c].p(f,e):(h[c]=qd(f),h[c].c(),h[c].m(r,null))}for(;c<h.length;c+=1)h[c].d(1);h.length=v.length}3&e&&Oc(r,t[0]);var l={};4&e&&(l.show=t[2].service_required),131072&e&&(l.$$scope={dirty:e,ctx:t}),a.$set(l)},i:function(t){c||(of(a.$$.fragment,t),c=!0)},o:function(t){uf(a.$$.fragment,t),c=!1},d:function(t){t&&fc(n),t&&fc(e),t&&fc(r),lc(d,t),lc(h,t),t&&fc(u),df(a,t),f=!1,Ua(l)}}}function Ud(t,n,e){var r,o,i,u,a,c,f;function l(){u&&Bs()}return Va(t,Rf,(function(t){return e(5,r=t)})),Va(t,Cl,(function(t){return e(6,o=t)})),Va(t,Nl,(function(t){return e(0,i=t)})),Va(t,Ul,(function(t){return e(8,u=t)})),Va(t,rs,(function(t){return e(2,a=t)})),t.$$.update=function(){113&t.$$.dirty&&(Rl.service_main?e(1,c=Bl(r.services,"category")):o?(e(1,c=Bl(o.services,"category")),f!==o.id&&(i&&tc(Nl,i=Ol(i.id,o.services),i),null===i&&o.services.length<=2&&(tc(Nl,i=o.services[o.services.length-1],i),l()),e(4,f=o.id))):(e(1,c=Bl([],"category")),tc(Nl,i=null,i)))},[i,c,a,l,f,r,o,function(){i=Sc(this),Nl.set(i),e(1,c),e(5,r),e(6,o),e(4,f),e(0,i)}]}var Gd=function(t){nn(e,t);var n=Md(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Ud,Hd,Wa,{}),r}return e}(hf);function Wd(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Jd(t){var n,e=Rl.l10n.notices.custom_service_name_required+"";return{c:function(){n=dc(e)},m:function(t,e){cc(t,n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Vd(t){var n,e,r,o,i,u,a,c,f,l,s,d,p,v;return u=new xd({props:{show:t[1].custom_service_name_required,type:"danger",$$slots:{default:[Jd]},$$scope:{ctx:t}}}),{c:function(){n=sc("div"),(e=sc("label")).textContent="".concat(Rl.l10n.custom_service_name),r=pc(),o=sc("input"),i=pc(),lf(u.$$.fragment),a=pc(),c=sc("div"),(f=sc("label")).textContent="".concat(Rl.l10n.custom_service_price),l=pc(),s=sc("input"),yc(e,"for","bookly-custom-service-name"),yc(o,"id","bookly-custom-service-name"),yc(o,"class","form-control"),yc(o,"type","text"),yc(n,"class","form-group"),yc(f,"for","bookly-custom-service-price"),yc(s,"id","bookly-custom-service-price"),yc(s,"class","form-control"),yc(s,"type","number"),yc(s,"min","0"),yc(s,"step","1"),yc(c,"class","form-group")},m:function(h,m){cc(h,n,m),ac(n,e),ac(n,r),ac(n,o),xc(o,t[0]),ac(n,i),sf(u,n,null),cc(h,a,m),cc(h,c,m),ac(c,f),ac(c,l),ac(c,s),xc(s,t[2]),d=!0,p||(v=[hc(o,"input",t[3]),hc(s,"input",t[4])],p=!0)},p:function(t,n){var e=Wi(n,1)[0];1&e&&o.value!==t[0]&&xc(o,t[0]);var r={};2&e&&(r.show=t[1].custom_service_name_required),32&e&&(r.$$scope={dirty:e,ctx:t}),u.$set(r),4&e&&$c(s.value)!==t[2]&&xc(s,t[2])},i:function(t){d||(of(u.$$.fragment,t),d=!0)},o:function(t){uf(u.$$.fragment,t),d=!1},d:function(t){t&&fc(n),df(u),t&&fc(a),t&&fc(c),p=!1,Ua(v)}}}function Qd(t,n,e){var r,o,i;return Va(t,Ll,(function(t){return e(0,r=t)})),Va(t,rs,(function(t){return e(1,o=t)})),Va(t,Fl,(function(t){return e(2,i=t)})),[r,o,i,function(){r=this.value,Ll.set(r)},function(){i=$c(this.value),Fl.set(i)}]}var Kd=function(t){nn(e,t);var n=Wd(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Qd,Vd,Wa,{}),r}return e}(hf);function Xd(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Zd(t,n,e){var r=vu(t).call(t);return r[5]=n[e],r}function tp(t){var n,e,r,o=t[5].name+"";return{c:function(){n=sc("option"),e=dc(o),n.__value=r=t[5],n.value=n.__value},m:function(t,r){cc(t,n,r),ac(n,e)},p:function(t,i){1&i&&o!==(o=t[5].name+"")&&wc(e,o),1&i&&r!==(r=t[5])&&(n.__value=r,n.value=n.__value)},d:function(t){t&&fc(n)}}}function np(t){for(var n,e,r,o,i,u,a=t[0],c=[],f=0;f<a.length;f+=1)c[f]=tp(Zd(t,a,f));return{c:function(){(n=sc("label")).textContent="".concat(Rl.l10n.location),e=pc(),r=sc("select"),o=sc("option");for(var i=0;i<c.length;i+=1)c[i].c();yc(n,"for","bookly-location"),o.__value=null,o.value=o.__value,yc(r,"id","bookly-location"),yc(r,"class","form-control custom-select"),void 0===t[1]&&Gc((function(){return t[3].call(r)}))},m:function(a,f){cc(a,n,f),cc(a,e,f),cc(a,r,f),ac(r,o);for(var l=0;l<c.length;l+=1)c[l].m(r,null);Oc(r,t[1]),i||(u=hc(r,"change",t[3]),i=!0)},p:function(t,n){var e=Wi(n,1)[0];if(1&e){var o;for(a=t[0],o=0;o<a.length;o+=1){var i=Zd(t,a,o);c[o]?c[o].p(i,e):(c[o]=tp(i),c[o].c(),c[o].m(r,null))}for(;o<c.length;o+=1)c[o].d(1);c.length=a.length}3&e&&Oc(r,t[1])},i:Fa,o:Fa,d:function(t){t&&fc(n),t&&fc(e),t&&fc(r),lc(c,t),i=!1,u()}}}function ep(t,n,e){var r,o,i;return Va(t,Cl,(function(t){return e(2,r=t)})),Va(t,ql,(function(t){return e(1,o=t)})),t.$$.update=function(){4&t.$$.dirty&&e(0,i=r?r.locations:[]),1&t.$$.dirty&&(i&&0!==i.length||tc(ql,o=null,o))},[i,o,r,function(){o=Sc(this),ql.set(o),e(0,i),e(2,r)}]}var rp=function(t){nn(e,t);var n=Xd(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,ep,np,Wa,{}),r}return e}(hf);function op(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function ip(t){var n,e,r;return{c:function(){(n=sc("label")).textContent="".concat(Rl.l10n.date),e=pc(),r=sc("input"),yc(n,"for","bookly-date"),yc(r,"type","text"),yc(r,"id","bookly-date"),yc(r,"class","form-control"),yc(r,"autocomplete","off")},m:function(o,i){cc(o,n,i),cc(o,e,i),cc(o,r,i),t[3](r)},p:Fa,i:Fa,o:Fa,d:function(o){o&&fc(n),o&&fc(e),o&&fc(r),t[3](null)}}}function up(t,n,e){var r,o,i;return Va(t,Hl,(function(t){return e(2,r=t)})),Cc((function(){return e(1,i=u.default(o).daterangepicker({parentEl:"#bookly-appointment-dialog > div",singleDatePicker:!0,showDropdowns:!0,locale:Rl.datePicker},(function(t){return tc(Hl,r=t,r)})).data("daterangepicker"))})),t.$$.update=function(){6&t.$$.dirty&&r&&i&&(i.setStartDate(r),i.setEndDate(r))},[o,i,r,function(t){Lc[t?"unshift":"push"]((function(){e(0,o=t)}))}]}var ap=function(t){nn(e,t);var n=op(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,up,ip,Wa,{}),r}return e}(hf);function cp(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function fp(t,n,e){var r=vu(t).call(t);return r[12]=n[e],r}function lp(t,n,e){var r=vu(t).call(t);return r[15]=n[e],r}function sp(t){for(var n,e=t[4],r=[],o=0;o<e.length;o+=1)r[o]=dp(lp(t,e,o));return{c:function(){for(var t=0;t<r.length;t+=1)r[t].c();n=vc()},m:function(t,e){for(var o=0;o<r.length;o+=1)r[o].m(t,e);cc(t,n,e)},p:function(t,o){if(16&o){var i;for(e=t[4],i=0;i<e.length;i+=1){var u=lp(t,e,i);r[i]?r[i].p(u,o):(r[i]=dp(u),r[i].c(),r[i].m(n.parentNode,n))}for(;i<r.length;i+=1)r[i].d(1);r.length=e.length}},d:function(t){lc(r,t),t&&fc(n)}}}function dp(t){var n,e,r,o,i=t[15].title+"";return{c:function(){n=sc("option"),e=dc(i),n.__value=r=t[15],n.value=n.__value,n.disabled=o=t[15].disabled},m:function(t,r){cc(t,n,r),ac(n,e)},p:function(t,u){16&u&&i!==(i=t[15].title+"")&&wc(e,i),16&u&&r!==(r=t[15])&&(n.__value=r,n.value=n.__value),16&u&&o!==(o=t[15].disabled)&&(n.disabled=o)},d:function(t){t&&fc(n)}}}function pp(t){for(var n,e=t[5],r=[],o=0;o<e.length;o+=1)r[o]=vp(fp(t,e,o));return{c:function(){for(var t=0;t<r.length;t+=1)r[t].c();n=vc()},m:function(t,e){for(var o=0;o<r.length;o+=1)r[o].m(t,e);cc(t,n,e)},p:function(t,o){if(32&o){var i;for(e=t[5],i=0;i<e.length;i+=1){var u=fp(t,e,i);r[i]?r[i].p(u,o):(r[i]=vp(u),r[i].c(),r[i].m(n.parentNode,n))}for(;i<r.length;i+=1)r[i].d(1);r.length=e.length}},d:function(t){lc(r,t),t&&fc(n)}}}function vp(t){var n,e,r,o=t[12].title+"";return{c:function(){n=sc("option"),e=dc(o),n.__value=r=t[12],n.value=n.__value},m:function(t,r){cc(t,n,r),ac(n,e)},p:function(t,i){32&i&&o!==(o=t[12].title+"")&&wc(e,o),32&i&&r!==(r=t[12])&&(n.__value=r,n.value=n.__value)},d:function(t){t&&fc(n)}}}function hp(t){var n,e,r,o,i,u,a,c,f,l,s,d,p,v=!!t[4]&&!t[3]&&sp(t),h=!!t[5]&&!t[3]&&pp(t);return{c:function(){(n=sc("label")).textContent="".concat(Rl.l10n.period),e=pc(),r=sc("div"),o=sc("div"),i=sc("select"),v&&v.c(),u=pc(),(a=sc("div")).textContent="".concat(Rl.l10n.to),c=pc(),f=sc("div"),l=sc("select"),h&&h.c(),yc(n,"for","bookly-period"),yc(i,"id","bookly-period"),yc(i,"class","form-control custom-select"),i.disabled=t[3],void 0===t[0]&&Gc((function(){return t[8].call(i)})),yc(o,"class","col"),yc(a,"class","col-auto"),yc(l,"class","form-control custom-select"),l.disabled=s=Rl.appropriate_slots&&(!t[1]||1===t[1].units_max),void 0===t[2]&&Gc((function(){return t[9].call(l)})),yc(f,"class","col"),yc(r,"class","form-row align-items-center")},m:function(s,m){cc(s,n,m),cc(s,e,m),cc(s,r,m),ac(r,o),ac(o,i),v&&v.m(i,null),Oc(i,t[0]),ac(r,u),ac(r,a),ac(r,c),ac(r,f),ac(f,l),h&&h.m(l,null),Oc(l,t[2]),d||(p=[hc(i,"change",t[8]),hc(i,"change",t[6]),hc(l,"change",t[9]),hc(l,"change",t[7])],d=!0)},p:function(t,n){var e=Wi(n,1)[0];t[4]&&!t[3]?v?v.p(t,e):((v=sp(t)).c(),v.m(i,null)):v&&(v.d(1),v=null),8&e&&(i.disabled=t[3]),17&e&&Oc(i,t[0]),t[5]&&!t[3]?h?h.p(t,e):((h=pp(t)).c(),h.m(l,null)):h&&(h.d(1),h=null),2&e&&s!==(s=Rl.appropriate_slots&&(!t[1]||1===t[1].units_max))&&(l.disabled=s),36&e&&Oc(l,t[2])},i:Fa,o:Fa,d:function(t){t&&fc(n),t&&fc(e),t&&fc(r),v&&v.d(),h&&h.d(),d=!1,Ua(p)}}}function mp(t,n,e){var r,o,i,u,a,c,f,l;return Va(t,Ul,(function(t){return e(10,r=t)})),Va(t,Gl,(function(t){return e(0,o=t)})),Va(t,Nl,(function(t){return e(1,i=t)})),Va(t,Wl,(function(t){return e(11,u=t)})),Va(t,Jl,(function(t){return e(2,a=t)})),Va(t,Vl,(function(t){return e(3,c=t)})),Va(t,bs,(function(t){return e(4,f=t)})),Va(t,ws,(function(t){return e(5,l=t)})),[o,i,a,c,f,l,function(){tc(Ul,r=o.value,r),i&&Bs()},function(){tc(Wl,u=a.value,u)},function(){o=Sc(this),Gl.set(o)},function(){a=Sc(this),Jl.set(a)}]}var yp=function(t){nn(e,t);var n=cp(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,mp,hp,Wa,{}),r}return e}(hf);function gp(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function _p(t){var n,e,r,o,i,u;return{c:function(){n=sc("div"),e=sc("input"),r=pc(),(o=sc("label")).textContent="".concat(Rl.l10n.recurring.repeat_this_appointment),yc(e,"type","checkbox"),yc(e,"id","bookly-repeat-enabled"),yc(e,"class","custom-control-input"),yc(o,"for","bookly-repeat-enabled"),yc(o,"class","custom-control-label"),yc(n,"class","custom-control custom-checkbox")},m:function(a,c){cc(a,n,c),ac(n,e),e.checked=t[0],ac(n,r),ac(n,o),i||(u=hc(e,"change",t[1]),i=!0)},p:function(t,n){1&Wi(n,1)[0]&&(e.checked=t[0])},i:Fa,o:Fa,d:function(t){t&&fc(n),i=!1,u()}}}function $p(t,n,e){var r;return Va(t,Ql,(function(t){return e(0,r=t)})),[r,function(){r=this.checked,Ql.set(r)}]}var bp=function(t){nn(e,t);var n=gp(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,$p,_p,Wa,{}),r}return e}(hf);Z({target:"String",proto:!0},{repeat:"".repeat||function(t){var n=String(O(this)),e="",r=ot(t);if(r<0||r==1/0)throw RangeError("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(n+=n))1&r&&(e+=n);return e}});var wp=Mi("String").repeat,xp=String.prototype,kp=function(t){var n=t.repeat;return"string"==typeof t||t===xp||t instanceof String&&n===xp.repeat?wp:n};function Op(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Sp(t,n,e){var r=vu(t).call(t);return r[2]=n[e],r}function Ep(t){var n,e,r=t[2].title+"";return{c:function(){n=sc("option"),e=dc(r),n.__value=t[2].id,n.value=n.__value},m:function(t,r){cc(t,n,r),ac(n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Ap(t){for(var n,e,r,o,i,u,a,c=Rl.recurring.types,f=[],l=0;l<c.length;l+=1)f[l]=Ep(Sp(t,c,l));return{c:function(){n=sc("div"),(e=sc("div")).textContent="".concat(kp(Rl.l10n.recurring)),r=pc(),o=sc("div"),i=sc("select");for(var u=0;u<f.length;u+=1)f[u].c();yc(e,"class","col-sm-2 col-form-label"),yc(i,"id","bookly-recurring-type"),yc(i,"class","form-control custom-select"),void 0===t[0].type&&Gc((function(){return t[1].call(i)})),yc(o,"class","col-sm-4"),yc(n,"class","form-group form-row")},m:function(c,l){cc(c,n,l),ac(n,e),ac(n,r),ac(n,o),ac(o,i);for(var s=0;s<f.length;s+=1)f[s].m(i,null);Oc(i,t[0].type),u||(a=hc(i,"change",t[1]),u=!0)},p:function(t,n){var e=Wi(n,1)[0];if(0&e){var r;for(c=Rl.recurring.types,r=0;r<c.length;r+=1){var o=Sp(t,c,r);f[r]?f[r].p(o,e):(f[r]=Ep(o),f[r].c(),f[r].m(i,null))}for(;r<f.length;r+=1)f[r].d(1);f.length=c.length}1&e&&Oc(i,t[0].type)},i:Fa,o:Fa,d:function(t){t&&fc(n),lc(f,t),u=!1,a()}}}function jp(t,n,e){var r;return Va(t,Zl,(function(t){return e(0,r=t)})),[r,function(){r.type=Sc(this),Zl.set(r)}]}var Tp=function(t){nn(e,t);var n=Op(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,jp,Ap,Wa,{}),r}return e}(hf);function Pp(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Rp(t){var n,e,r,o,i,u,a,c,f,l,s;return{c:function(){n=sc("div"),(e=sc("div")).textContent="".concat(qf(Rl.l10n.recurring)),r=pc(),o=sc("div"),i=sc("div"),u=sc("input"),a=pc(),c=sc("div"),(f=sc("span")).textContent="".concat(Rl.l10n.recurring.days),yc(e,"class","col-sm-2 col-form-label"),yc(u,"type","number"),yc(u,"step","1"),yc(u,"min","1"),yc(u,"class","form-control"),yc(f,"class","input-group-text"),yc(c,"class","input-group-append"),yc(i,"class","input-group"),yc(o,"class","col-sm-4"),yc(n,"class","form-group form-row")},m:function(d,p){cc(d,n,p),ac(n,e),ac(n,r),ac(n,o),ac(o,i),ac(i,u),xc(u,qf(t[0].daily)),ac(i,a),ac(i,c),ac(c,f),l||(s=hc(u,"input",t[1]),l=!0)},p:function(t,n){1&Wi(n,1)[0]&&$c(u.value)!==qf(t[0].daily)&&xc(u,qf(t[0].daily))},i:Fa,o:Fa,d:function(t){t&&fc(n),l=!1,s()}}}function Bp(t,n,e){var r;return Va(t,Zl,(function(t){return e(0,r=t)})),[r,function(){r.daily.every=$c(this.value),Zl.set(r)}]}var Ip=function(t){nn(e,t);var n=Pp(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Bp,Rp,Wa,{}),r}return e}(hf);function Dp(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Mp(t,n,e){var r=vu(t).call(t);return r[6]=n[e],r}function Cp(t){var n,e,r,o,i,u,a,c,f=t[6].title+"";return{c:function(){n=sc("div"),e=sc("input"),r=pc(),o=sc("label"),i=dc(f),u=pc(),yc(e,"type","checkbox"),yc(e,"id","bookly-week-"+t[6].id),e.__value=t[6].id,e.value=e.__value,yc(e,"class","custom-control-input"),t[3][0].push(e),yc(o,"for","bookly-week-"+t[6].id),yc(o,"class","custom-control-label"),yc(n,"class","custom-control custom-checkbox d-inline mr-3")},m:function(f,l){var s;cc(f,n,l),ac(n,e),e.checked=~na(s=t[0].weekly.on).call(s,e.__value),ac(n,r),ac(n,o),ac(o,i),ac(n,u),a||(c=hc(e,"change",t[2]),a=!0)},p:function(t,n){var r;1&n&&(e.checked=~na(r=t[0].weekly.on).call(r,e.__value))},d:function(r){var o,i;r&&fc(n),pa(o=t[3][0]).call(o,na(i=t[3][0]).call(i,e),1),a=!1,c()}}}function Np(t){for(var n,e,r,o,i=Rl.recurring.days,u=[],a=0;a<i.length;a+=1)u[a]=Cp(Mp(t,i,a));return{c:function(){n=sc("div"),(e=sc("div")).textContent="".concat(Rl.l10n.recurring.on),r=pc(),o=sc("div");for(var i=0;i<u.length;i+=1)u[i].c();yc(e,"class","col-sm-2 col-form-label"),yc(o,"id","bookly-repeat-on"),yc(o,"class","col-sm-10 mt-1"),Ec(o,"text-danger",!t[0].weekly.on.length),yc(n,"class","form-group form-row")},m:function(t,i){cc(t,n,i),ac(n,e),ac(n,r),ac(n,o);for(var a=0;a<u.length;a+=1)u[a].m(o,null)},p:function(t,n){var e=Wi(n,1)[0];if(1&e){var r;for(i=Rl.recurring.days,r=0;r<i.length;r+=1){var a=Mp(t,i,r);u[r]?u[r].p(a,e):(u[r]=Cp(a),u[r].c(),u[r].m(o,null))}for(;r<u.length;r+=1)u[r].d(1);u.length=i.length}1&e&&Ec(o,"text-danger",!t[0].weekly.on.length)},i:Fa,o:Fa,d:function(t){t&&fc(n),lc(u,t)}}}function Lp(t,n,e){var r,o;Va(t,Hl,(function(t){return e(1,r=t)})),Va(t,Zl,(function(t){return e(0,o=t)}));var i=!1;var u=[[]];return t.$$.update=function(){2&t.$$.dirty&&r&&0===o.weekly.on.length&&(i||(tc(Zl,o.weekly.on=[Vs(r)],o),i=!0))},[o,r,function(){o.weekly.on=_c(u[0],this.__value,this.checked),Zl.set(o)},u]}var Fp=function(t){nn(e,t);var n=Dp(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Lp,Np,Wa,{}),r}return e}(hf);function zp(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function qp(t,n,e){var r=vu(t).call(t);return r[6]=n[e],r}function Yp(t,n,e){var r=vu(t).call(t);return r[4]=n[e],r[6]=e,r}function Hp(t,n,e){var r=vu(t).call(t);return r[9]=n[e],r}function Up(t){var n,e,r=t[9].title+"";return{c:function(){n=sc("option"),e=dc(r),n.__value=t[9].id,n.value=n.__value},m:function(t,r){cc(t,n,r),ac(n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Gp(t){for(var n,e,r,o,i=Rl.recurring.days,u=[],a=0;a<i.length;a+=1)u[a]=Jp(qp(t,i,a));return{c:function(){n=sc("div"),e=sc("select");for(var r=0;r<u.length;r+=1)u[r].c();yc(e,"class","form-control custom-select"),void 0===t[0].monthly.weekday&&Gc((function(){return t[3].call(e)})),yc(n,"class","col-sm-2")},m:function(i,a){cc(i,n,a),ac(n,e);for(var c=0;c<u.length;c+=1)u[c].m(e,null);Oc(e,t[0].monthly.weekday),r||(o=hc(e,"change",t[3]),r=!0)},p:function(t,n){if(0&n){var r;for(i=Rl.recurring.days,r=0;r<i.length;r+=1){var o=qp(t,i,r);u[r]?u[r].p(o,n):(u[r]=Jp(o),u[r].c(),u[r].m(e,null))}for(;r<u.length;r+=1)u[r].d(1);u.length=i.length}1&n&&Oc(e,t[0].monthly.weekday)},d:function(t){t&&fc(n),lc(u,t),r=!1,o()}}}function Wp(t){for(var n,e,r,o,i=Array(31),u=[],a=0;a<i.length;a+=1)u[a]=Vp(Yp(t,i,a));return{c:function(){n=sc("div"),e=sc("select");for(var r=0;r<u.length;r+=1)u[r].c();yc(e,"class","form-control custom-select"),void 0===t[0].monthly.day&&Gc((function(){return t[2].call(e)})),yc(n,"class","col-sm-2 mr-4")},m:function(i,a){cc(i,n,a),ac(n,e);for(var c=0;c<u.length;c+=1)u[c].m(e,null);Oc(e,t[0].monthly.day),r||(o=hc(e,"change",t[2]),r=!0)},p:function(t,n){1&n&&Oc(e,t[0].monthly.day)},d:function(t){t&&fc(n),lc(u,t),r=!1,o()}}}function Jp(t){var n,e,r=t[6].title+"";return{c:function(){n=sc("option"),e=dc(r),n.__value=t[6].id,n.value=n.__value},m:function(t,r){cc(t,n,r),ac(n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Vp(t){var n,e,r=t[6]+1+"";return{c:function(){n=sc("option"),e=dc(r),n.__value=t[6]+1,n.value=n.__value},m:function(t,r){cc(t,n,r),ac(n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Qp(t){for(var n,e,r,o,i,u,a,c,f=Rl.recurring.monthly_items,l=[],s=0;s<f.length;s+=1)l[s]=Up(Hp(t,f,s));function d(t,n){return"day"===t[0].monthly.on?Wp:Gp}var p=d(t),v=p(t);return{c:function(){n=sc("div"),(e=sc("div")).textContent="".concat(Rl.l10n.recurring.on),r=pc(),o=sc("div"),i=sc("select");for(var a=0;a<l.length;a+=1)l[a].c();u=pc(),v.c(),yc(e,"class","col-sm-2 col-form-label"),yc(i,"class","form-control custom-select"),void 0===t[0].monthly.on&&Gc((function(){return t[1].call(i)})),yc(o,"class","col-sm-4"),yc(n,"class","form-group form-row")},m:function(f,s){cc(f,n,s),ac(n,e),ac(n,r),ac(n,o),ac(o,i);for(var d=0;d<l.length;d+=1)l[d].m(i,null);Oc(i,t[0].monthly.on),ac(n,u),v.m(n,null),a||(c=hc(i,"change",t[1]),a=!0)},p:function(t,e){var r=Wi(e,1)[0];if(0&r){var o;for(f=Rl.recurring.monthly_items,o=0;o<f.length;o+=1){var u=Hp(t,f,o);l[o]?l[o].p(u,r):(l[o]=Up(u),l[o].c(),l[o].m(i,null))}for(;o<l.length;o+=1)l[o].d(1);l.length=f.length}1&r&&Oc(i,t[0].monthly.on),p===(p=d(t))&&v?v.p(t,r):(v.d(1),(v=p(t))&&(v.c(),v.m(n,null)))},i:Fa,o:Fa,d:function(t){t&&fc(n),lc(l,t),v.d(),a=!1,c()}}}function Kp(t,n,e){var r;return Va(t,Zl,(function(t){return e(0,r=t)})),[r,function(){r.monthly.on=Sc(this),Zl.set(r)},function(){r.monthly.day=Sc(this),Zl.set(r)},function(){r.monthly.weekday=Sc(this),Zl.set(r)}]}var Xp=function(t){nn(e,t);var n=zp(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Kp,Qp,Wa,{}),r}return e}(hf);function Zp(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function tv(t){var n,e,r,o,i,u,a,c,f,l,s,d,p,v;return{c:function(){n=sc("div"),(e=sc("div")).textContent="".concat(Rl.l10n.recurring.until),r=pc(),o=sc("div"),i=sc("input"),u=pc(),(a=sc("div")).textContent="".concat(Rl.l10n.recurring.or),c=pc(),f=sc("div"),l=sc("input"),s=pc(),(d=sc("div")).textContent="".concat(Rl.l10n.recurring.times),yc(e,"class","col-sm-2 col-form-label"),yc(i,"type","text"),yc(i,"class","form-control"),yc(i,"autocomplete","off"),yc(o,"class","col col-sm-4"),yc(a,"class","col-auto"),yc(l,"class","form-control"),yc(l,"type","number"),yc(l,"min","1"),yc(f,"class","col-3 col-sm-2"),yc(d,"class","col-auto"),yc(n,"class","form-group form-row align-items-center")},m:function(h,m){cc(h,n,m),ac(n,e),ac(n,r),ac(n,o),ac(o,i),t[6](i),ac(n,u),ac(n,a),ac(n,c),ac(n,f),ac(f,l),xc(l,t[1]),ac(n,s),ac(n,d),p||(v=[hc(l,"input",t[7]),hc(l,"input",t[2])],p=!0)},p:function(t,n){2&Wi(n,1)[0]&&$c(l.value)!==t[1]&&xc(l,t[1])},i:Fa,o:Fa,d:function(e){e&&fc(n),t[6](null),p=!1,Ua(v)}}}function nv(t,n,e){var r,o,i,a,c,f;return Va(t,Zl,(function(t){return e(5,r=t)})),Va(t,Hl,(function(t){return e(8,o=t)})),Va(t,Xl,(function(t){return e(1,i=t)})),Cc((function(){null===r.until&&tc(Zl,r.until=o?o.clone().add(1,"month"):moment().add(1,"month"),r),tc(Zl,r.monthly.day=o.date(),r),tc(Zl,r.monthly.weekday=Vs(Is()),r),e(3,c=u.default(a).daterangepicker({parentEl:"#bookly-appointment-dialog > div",singleDatePicker:!0,showDropdowns:!0,locale:Rl.datePicker},(function(t){return tc(Zl,r.until=t,r)})).data("daterangepicker"))})),t.$$.update=function(){32&t.$$.dirty&&e(4,f=r.until),24&t.$$.dirty&&f&&c&&(c.setStartDate(f),c.setEndDate(f))},[a,i,function(){var t=0,n=o.clone().add(5,"years"),e=o.clone();do{Js(e,r,o)&&t++,e.add(1,"days")}while(t<i&&e.isBefore(n));tc(Zl,r.until=e.subtract(1,"days"),r)},c,f,r,function(t){Lc[t?"unshift":"push"]((function(){e(0,a=t)}))},function(){i=$c(this.value),Xl.set(i)}]}var ev=function(t){nn(e,t);var n=Zp(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,nv,tv,Wa,{}),r}return e}(hf);function rv(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function ov(t){var n,e,r,o,i,u,a,c,f,l,s;r=new Tp({});var d=[av,uv,iv],p=[];function v(t,n){return"daily"===t[0].type?0:"weekly"===t[0].type||"biweekly"===t[0].type?1:2}return i=v(t),u=p[i]=d[i](t),c=new ev({}),l=new xd({props:{type:"danger",show:t[1],class:"mt-n2",$$slots:{default:[cv]},$$scope:{ctx:t}}}),{c:function(){n=sc("div"),e=sc("div"),lf(r.$$.fragment),o=pc(),u.c(),a=pc(),lf(c.$$.fragment),f=pc(),lf(l.$$.fragment),yc(e,"class","mt-3"),yc(n,"class","border-left ml-4 pl-3")},m:function(t,u){cc(t,n,u),ac(n,e),sf(r,e,null),ac(e,o),p[i].m(e,null),ac(e,a),sf(c,e,null),ac(e,f),sf(l,e,null),s=!0},p:function(t,n){var r=i;(i=v(t))!==r&&(ef(),uf(p[r],1,1,(function(){p[r]=null})),rf(),(u=p[i])||(u=p[i]=d[i](t)).c(),of(u,1),u.m(e,a));var o={};2&n&&(o.show=t[1]),32&n&&(o.$$scope={dirty:n,ctx:t}),l.$set(o)},i:function(t){s||(of(r.$$.fragment,t),of(u),of(c.$$.fragment,t),of(l.$$.fragment,t),s=!0)},o:function(t){uf(r.$$.fragment,t),uf(u),uf(c.$$.fragment,t),uf(l.$$.fragment,t),s=!1},d:function(t){t&&fc(n),df(r),p[i].d(),df(c),df(l)}}}function iv(t){var n,e;return n=new Xp({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function uv(t){var n,e;return n=new Fp({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function av(t){var n,e;return n=new Ip({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function cv(t){var n,e=Rl.l10n.notices.until_cant_be_earlier+"";return{c:function(){n=dc(e)},m:function(t,e){cc(t,n,e)},p:Fa,d:function(t){t&&fc(n)}}}function fv(t){var n,e,r,o;n=new bp({});var i=t[2]&&ov(t);return{c:function(){lf(n.$$.fragment),e=pc(),i&&i.c(),r=vc()},m:function(t,u){sf(n,t,u),cc(t,e,u),i&&i.m(t,u),cc(t,r,u),o=!0},p:function(t,n){var e=Wi(n,1)[0];t[2]?i?(i.p(t,e),4&e&&of(i,1)):((i=ov(t)).c(),of(i,1),i.m(r.parentNode,r)):i&&(ef(),uf(i,1,1,(function(){i=null})),rf())},i:function(t){o||(of(n.$$.fragment,t),of(i),o=!0)},o:function(t){uf(n.$$.fragment,t),uf(i),o=!1},d:function(t){df(n,t),t&&fc(e),i&&i.d(t),t&&fc(r)}}}function lv(t,n,e){var r,o,i,u,a;return Va(t,Zl,(function(t){return e(0,r=t)})),Va(t,Hl,(function(t){return e(3,o=t)})),Va(t,Xl,(function(t){return e(4,i=t)})),Va(t,Kl,(function(t){return e(1,u=t)})),Va(t,Ql,(function(t){return e(2,a=t)})),t.$$.update=function(){if(9&t.$$.dirty&&r.until&&o){var n=0,e=r.until.clone().add(1,"days"),a=o.clone();do{Js(a,r,o)&&n++,a.add(1,"days")}while(a.isBefore(e));tc(Xl,i=n,i),tc(Kl,u=r.until.isBefore(o),u)}},[r,u,a,o]}var sv=function(t){nn(e,t);var n=rv(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,lv,fv,Wa,{}),r}return e}(hf);function dv(t){var n=Ol(t,Rl.statuses);return n?n.title:t}function pv(t){var n=Ol(t,Rl.statuses);return n?n.icon:"far fa-question-circle"}function vv(t,n){var e=n,r=u.default(t);return r.booklyPopover({trigger:"hover",container:r.closest("li"),content:function(){return e},html:!0,placement:"top",template:'<div class="bookly-popover"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),{update:function(t){e=t},destroy:function(){r.booklyPopover("dispose")}}}function hv(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function mv(t,n,e){var r=vu(t).call(t);return r[19]=n[e],r}function yv(t,n,e){var r=vu(t).call(t);return r[22]=n[e],r[23]=n,r[24]=e,r}function gv(t,n,e){var r=vu(t).call(t);return r[25]=n[e],r}function _v(t){var n,e,r,o,i,u,a=ls(t[2])+"",c=t[1].max+"";return{c:function(){n=sc("span"),e=dc("("),r=dc(a),o=dc("/"),i=dc(c),u=dc(")"),yc(n,"title",Rl.l10n.selected_maximum)},m:function(t,a){cc(t,n,a),ac(n,e),ac(n,r),ac(n,o),ac(n,i),ac(n,u)},p:function(t,n){4&n&&a!==(a=ls(t[2])+"")&&wc(r,a),2&n&&c!==(c=t[1].max+"")&&wc(i,c)},d:function(t){t&&fc(n)}}}function $v(t){var n,e,r,o;return{c:function(){n=sc("span"),yc(e=sc("i"),"class","fas fa-fw"),Ec(e,"fa-angle-down",!t[0]),Ec(e,"fa-angle-up",t[0]),yc(n,"role","button")},m:function(i,u){cc(i,n,u),ac(n,e),r||(o=hc(n,"click",t[13]),r=!0)},p:function(t,n){1&n&&Ec(e,"fa-angle-down",!t[0]),1&n&&Ec(e,"fa-angle-up",t[0])},d:function(t){t&&fc(n),r=!1,o()}}}function bv(t){var n,e;return n=new xd({props:{type:"success",$$slots:{default:[wv]},$$scope:{ctx:t}}}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},p:function(t,e){var r={};268435458&e&&(r.$$scope={dirty:e,ctx:t}),n.$set(r)},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function wv(t){var n,e,r,o=Rl.l10n.minimum_capacity+"",i=t[1].min+"";return{c:function(){n=dc(o),e=dc(": "),r=dc(i)},m:function(t,o){cc(t,n,o),cc(t,e,o),cc(t,r,o)},p:function(t,n){2&n&&i!==(i=t[1].min+"")&&wc(r,i)},d:function(t){t&&fc(n),t&&fc(e),t&&fc(r)}}}function xv(t){var n,e,r,o;return{c:function(){(n=sc("button")).innerHTML='<i class="fas fa-fw fa-list"></i>',yc(n,"type","button"),yc(n,"class","btn btn-default px-2 py-1")},m:function(i,u){var a;(cc(i,n,u),r)||(o=[hc(n,"click",(function(){Ga(t[9](t[22]))&&t[9](t[22]).apply(this,arguments)})),nc(e=vv.call(null,n,Zu(a="".concat(Rl.l10n.part_of_collaborative_services,": ")).call(a,t[22].collaborative_service)))],r=!0)},p:function(n,r){var o;t=n,e&&Ga(e.update)&&4&r&&e.update.call(null,Zu(o="".concat(Rl.l10n.part_of_collaborative_services,": ")).call(o,t[22].collaborative_service))},d:function(t){t&&fc(n),r=!1,Ua(o)}}}function kv(t){var n,e,r,o;return{c:function(){(n=sc("button")).innerHTML='<i class="fas fa-fw fa-list"></i>',yc(n,"type","button"),yc(n,"class","btn btn-default px-2 py-1")},m:function(i,u){var a;(cc(i,n,u),r)||(o=[hc(n,"click",(function(){Ga(t[10](t[22]))&&t[10](t[22]).apply(this,arguments)})),nc(e=vv.call(null,n,Zu(a="".concat(Rl.l10n.part_of_compound_services,": ")).call(a,t[22].compound_service)))],r=!0)},p:function(n,r){var o;t=n,e&&Ga(e.update)&&4&r&&e.update.call(null,Zu(o="".concat(Rl.l10n.part_of_compound_services,": ")).call(o,t[22].compound_service))},d:function(t){t&&fc(n),r=!1,Ua(o)}}}function Ov(t){var n,e,r,o,i,u,a=t[25].title+"";function c(){return t[14](t[22],t[25],t[23],t[24])}return{c:function(){n=sc("a"),e=sc("span"),r=dc(a),o=pc(),yc(e,"class","fa-fw mr-2 "+t[25].icon),yc(n,"href",""),yc(n,"class","dropdown-item pl-3")},m:function(t,a){cc(t,n,a),ac(n,e),ac(n,r),ac(n,o),i||(u=hc(n,"click",mc(c)),i=!0)},p:function(n,e){t=n},d:function(t){t&&fc(n),i=!1,u()}}}function Sv(t){var n,e,r,o,i;return{c:function(){n=sc("button"),yc(e=sc("span"),"class","fas fa-fw"),Ec(e,"fa-search-dollar",Al("pro")&&!t[22].payment_type),Ec(e,"fa-dollar-sign","full"===t[22].payment_type),Ec(e,"fa-hand-holding-usd","partial"===t[22].payment_type),yc(n,"type","button"),yc(n,"class","btn btn-default px-2 py-1")},m:function(u,a){var c;(cc(u,n,a),ac(n,e),o)||(i=[hc(n,"click",(function(){Ga(t[7](t[22]))&&t[7](t[22]).apply(this,arguments)})),nc(r=vv.call(null,n,t[22].payment_type?Zu(c="".concat(Rl.l10n.payment,": ")).call(c,t[22].payment_title):Rl.l10n.attach_payment))],o=!0)},p:function(n,o){var i;t=n,4&o&&Ec(e,"fa-search-dollar",Al("pro")&&!t[22].payment_type),4&o&&Ec(e,"fa-dollar-sign","full"===t[22].payment_type),4&o&&Ec(e,"fa-hand-holding-usd","partial"===t[22].payment_type),r&&Ga(r.update)&&4&o&&r.update.call(null,t[22].payment_type?Zu(i="".concat(Rl.l10n.payment,": ")).call(i,t[22].payment_title):Rl.l10n.attach_payment)},d:function(t){t&&fc(n),o=!1,Ua(i)}}}function Ev(t){var n,e,r;return{c:function(){(n=sc("button")).innerHTML='<span class="far fa-fw fa-calendar-alt"></span>',yc(n,"type","button"),yc(n,"class","btn btn-default px-2 py-1")},m:function(o,i){cc(o,n,i),e||(r=[hc(n,"click",(function(){Ga(t[8](t[22]))&&t[8](t[22]).apply(this,arguments)})),nc(vv.call(null,n,Rl.l10n.package_schedule))],e=!0)},p:function(n,e){t=n},d:function(t){t&&fc(n),e=!1,Ua(r)}}}function Av(t){var n,e,r;return{c:function(){(n=sc("button")).innerHTML='<span class="fas fa-fw fa-link"></span>',yc(n,"type","button"),yc(n,"class","btn btn-default px-2 py-1")},m:function(o,i){cc(o,n,i),e||(r=[hc(n,"click",(function(){Ga(t[11](t[22]))&&t[11](t[22]).apply(this,arguments)})),nc(vv.call(null,n,Rl.l10n.view_series))],e=!0)},p:function(n,e){t=n},d:function(t){t&&fc(n),e=!1,Ua(r)}}}function jv(t){for(var n,e,r,o,i,u,a,c,f,l,s,d,p,v,h,m,y,g,_,$,b,w,x,k,O,S,E,A,j=t[22].name+"",T=Al("collaborative-services")&&t[22].collaborative_token,P=Al("compound-services")&&t[22].compound_token,R=t[22].payment_id||Al("pro"),B=t[22].number_of_persons+"",I=Al("packages")&&t[22].package_id,D=Al("recurring-appointments")&&t[22].series_id,M=T&&xv(t),C=P&&kv(t),N=Rl.statuses,L=[],F=0;F<N.length;F+=1)L[F]=Ov(gv(t,N,F));var z=R&&Sv(t),q=I&&Ev(t),Y=D&&Av(t);return{c:function(){n=sc("li"),e=sc("div"),r=sc("a"),o=dc(j),i=pc(),u=sc("div"),M&&M.c(),a=pc(),C&&C.c(),c=pc(),f=sc("div"),l=sc("button"),s=sc("span"),v=pc(),h=sc("div");for(var p=0;p<L.length;p+=1)L[p].c();m=pc(),z&&z.c(),y=pc(),g=sc("button"),_=sc("i"),$=dc("×"),b=dc(B),w=pc(),q&&q.c(),x=pc(),Y&&Y.c(),k=pc(),O=sc("a"),S=pc(),yc(r,"title",Rl.l10n.edit_booking_details),yc(r,"href",""),yc(e,"class","col mt-1"),yc(s,"class",d="fa-fw "+pv(t[22].status)),yc(l,"type","button"),yc(l,"class","btn btn-default px-2 py-1 dropdown-toggle"),yc(l,"data-toggle","dropdown"),yc(h,"class","dropdown-menu"),yc(f,"class","dropdown d-inline-block"),yc(_,"class","far fa-fw fa-user"),yc(g,"class","btn btn-default px-2 py-1"),kc(g,"opacity","1"),yc(O,"href","#"),yc(O,"class","far fa-fw fa-trash-alt text-danger"),yc(u,"class","ml-auto"),yc(n,"class","row mb-1"),Ec(n,"d-none",t[24]>4&&!t[0])},m:function(d,j){cc(d,n,j),ac(n,e),ac(e,r),ac(r,o),ac(n,i),ac(n,u),M&&M.m(u,null),ac(u,a),C&&C.m(u,null),ac(u,c),ac(u,f),ac(f,l),ac(l,s),ac(f,v),ac(f,h);for(var T=0;T<L.length;T+=1)L[T].m(h,null);var P;(ac(u,m),z&&z.m(u,null),ac(u,y),ac(u,g),ac(g,_),ac(g,$),ac(g,b),ac(u,w),q&&q.m(u,null),ac(u,x),Y&&Y.m(u,null),ac(u,k),ac(u,O),ac(n,S),E)||(A=[hc(r,"click",mc((function(){Ga(t[5](t[22]))&&t[5](t[22]).apply(this,arguments)}))),nc(p=vv.call(null,l,Zu(P="".concat(Rl.l10n.status,": ")).call(P,dv(t[22].status)))),hc(g,"click",(function(){Ga(t[6](t[22].id))&&t[6](t[22].id).apply(this,arguments)})),hc(O,"click",mc((function(){Ga(t[12](t[22]))&&t[12](t[22]).apply(this,arguments)}))),nc(vv.call(null,O,Rl.l10n.remove_customer))],E=!0)},p:function(e,r){var i;if(t=e,4&r&&j!==(j=t[22].name+"")&&wc(o,j),4&r&&(T=Al("collaborative-services")&&t[22].collaborative_token),T?M?M.p(t,r):((M=xv(t)).c(),M.m(u,a)):M&&(M.d(1),M=null),4&r&&(P=Al("compound-services")&&t[22].compound_token),P?C?C.p(t,r):((C=kv(t)).c(),C.m(u,c)):C&&(C.d(1),C=null),4&r&&d!==(d="fa-fw "+pv(t[22].status))&&yc(s,"class",d),p&&Ga(p.update)&&4&r&&p.update.call(null,Zu(i="".concat(Rl.l10n.status,": ")).call(i,dv(t[22].status))),4&r){var f;for(N=Rl.statuses,f=0;f<N.length;f+=1){var l=gv(t,N,f);L[f]?L[f].p(l,r):(L[f]=Ov(l),L[f].c(),L[f].m(h,null))}for(;f<L.length;f+=1)L[f].d(1);L.length=N.length}4&r&&(R=t[22].payment_id||Al("pro")),R?z?z.p(t,r):((z=Sv(t)).c(),z.m(u,y)):z&&(z.d(1),z=null),4&r&&B!==(B=t[22].number_of_persons+"")&&wc(b,B),4&r&&(I=Al("packages")&&t[22].package_id),I?q?q.p(t,r):((q=Ev(t)).c(),q.m(u,x)):q&&(q.d(1),q=null),4&r&&(D=Al("recurring-appointments")&&t[22].series_id),D?Y?Y.p(t,r):((Y=Av(t)).c(),Y.m(u,k)):Y&&(Y.d(1),Y=null),1&r&&Ec(n,"d-none",t[24]>4&&!t[0])},d:function(t){t&&fc(n),M&&M.d(),C&&C.d(),lc(L,t),z&&z.d(),q&&q.d(),Y&&Y.d(),E=!1,Ua(A)}}}function Tv(t){var n,e,r;return{c:function(){(n=sc("span")).textContent="...",yc(n,"class","btn btn-default"),kc(n,"width","100%"),kc(n,"line-height","0"),kc(n,"padding-top","0"),kc(n,"padding-bottom","8px"),kc(n,"margin-bottom","10px"),yc(n,"role","button")},m:function(o,i){cc(o,n,i),e||(r=hc(n,"click",t[15]),e=!0)},p:Fa,d:function(t){t&&fc(n),e=!1,r()}}}function Pv(t){var n,e=Rl.l10n.notices.overflow_capacity.replace("%d",t[4].overflow_capacity)+"";return{c:function(){n=dc(e)},m:function(t,e){cc(t,n,e)},p:function(t,r){16&r&&e!==(e=Rl.l10n.notices.overflow_capacity.replace("%d",t[4].overflow_capacity)+"")&&wc(n,e)},d:function(t){t&&fc(n)}}}function Rv(t){for(var n,e,r=t[4].customers_appointments_limit,o=[],i=0;i<r.length;i+=1)o[i]=Iv(mv(t,r,i));var u=function(t){return uf(o[t],1,1,(function(){o[t]=null}))};return{c:function(){for(var t=0;t<o.length;t+=1)o[t].c();n=vc()},m:function(t,r){for(var i=0;i<o.length;i+=1)o[i].m(t,r);cc(t,n,r),e=!0},p:function(t,e){if(16&e){var i;for(r=t[4].customers_appointments_limit,i=0;i<r.length;i+=1){var a=mv(t,r,i);o[i]?(o[i].p(a,e),of(o[i],1)):(o[i]=Iv(a),o[i].c(),of(o[i],1),o[i].m(n.parentNode,n))}for(ef(),i=r.length;i<o.length;i+=1)u(i);rf()}},i:function(t){if(!e){for(var n=0;n<r.length;n+=1)of(o[n]);e=!0}},o:function(t){o=Oa(o).call(o,Boolean);for(var n=0;n<o.length;n+=1)uf(o[n]);e=!1},d:function(t){lc(o,t),t&&fc(n)}}}function Bv(t){var n,e=t[19]+"";return{c:function(){n=dc(e)},m:function(t,e){cc(t,n,e)},p:function(t,r){16&r&&e!==(e=t[19]+"")&&wc(n,e)},d:function(t){t&&fc(n)}}}function Iv(t){var n,e;return n=new xd({props:{$$slots:{default:[Bv]},$$scope:{ctx:t}}}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},p:function(t,e){var r={};268435472&e&&(r.$$scope={dirty:e,ctx:t}),n.$set(r)},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Dv(t){for(var n,e,r,o,i,u,a,c,f,l,s,d,p,v=Rl.l10n.customers+"",h=t[1].min>1&&t[1].min>ls(t[2]),m=t[3]&&_v(t),y=t[2].length>5&&$v(t),g=h&&bv(t),_=t[2],$=[],b=0;b<_.length;b+=1)$[b]=jv(yv(t,_,b));var w=t[2].length>5&&!t[0]&&Tv(t);l=new xd({props:{show:t[4].overflow_capacity>0,type:"danger",$$slots:{default:[Pv]},$$scope:{ctx:t}}});var x=t[4].customers_appointments_limit&&Rv(t);return{c:function(){n=sc("label"),e=dc(v),r=pc(),m&&m.c(),o=pc(),y&&y.c(),i=pc(),g&&g.c(),u=pc(),a=sc("ul");for(var p=0;p<$.length;p+=1)$[p].c();c=pc(),w&&w.c(),f=pc(),lf(l.$$.fragment),s=pc(),x&&x.c(),d=vc(),yc(a,"class","list-unstyled pl-0 bookly-hide-empty mr-3"),Ec(a,"my-0",!t[2].length)},m:function(t,v){cc(t,n,v),ac(n,e),ac(n,r),m&&m.m(n,null),cc(t,o,v),y&&y.m(t,v),cc(t,i,v),g&&g.m(t,v),cc(t,u,v),cc(t,a,v);for(var h=0;h<$.length;h+=1)$[h].m(a,null);cc(t,c,v),w&&w.m(t,v),cc(t,f,v),sf(l,t,v),cc(t,s,v),x&&x.m(t,v),cc(t,d,v),p=!0},p:function(t,e){var r=Wi(e,1)[0];if(t[3]?m?m.p(t,r):((m=_v(t)).c(),m.m(n,null)):m&&(m.d(1),m=null),t[2].length>5?y?y.p(t,r):((y=$v(t)).c(),y.m(i.parentNode,i)):y&&(y.d(1),y=null),6&r&&(h=t[1].min>1&&t[1].min>ls(t[2])),h?g?(g.p(t,r),6&r&&of(g,1)):((g=bv(t)).c(),of(g,1),g.m(u.parentNode,u)):g&&(ef(),uf(g,1,1,(function(){g=null})),rf()),8165&r){var o;for(_=t[2],o=0;o<_.length;o+=1){var c=yv(t,_,o);$[o]?$[o].p(c,r):($[o]=jv(c),$[o].c(),$[o].m(a,null))}for(;o<$.length;o+=1)$[o].d(1);$.length=_.length}4&r&&Ec(a,"my-0",!t[2].length),t[2].length>5&&!t[0]?w?w.p(t,r):((w=Tv(t)).c(),w.m(f.parentNode,f)):w&&(w.d(1),w=null);var s={};16&r&&(s.show=t[4].overflow_capacity>0),268435472&r&&(s.$$scope={dirty:r,ctx:t}),l.$set(s),t[4].customers_appointments_limit?x?(x.p(t,r),16&r&&of(x,1)):((x=Rv(t)).c(),of(x,1),x.m(d.parentNode,d)):x&&(ef(),uf(x,1,1,(function(){x=null})),rf())},i:function(t){p||(of(g),of(l.$$.fragment,t),of(x),p=!0)},o:function(t){uf(g),uf(l.$$.fragment,t),uf(x),p=!1},d:function(t){t&&fc(n),m&&m.d(),t&&fc(o),y&&y.d(t),t&&fc(i),g&&g.d(t),t&&fc(u),t&&fc(a),lc($,t),t&&fc(c),w&&w.d(t),t&&fc(f),df(l,t),t&&fc(s),x&&x.d(t),t&&fc(d)}}}function Mv(t,n,e){var r,o,i,a,c,f,l;Va(t,$s,(function(t){return e(1,r=t)})),Va(t,ts,(function(t){return e(2,o=t)})),Va(t,Rf,(function(t){return e(16,i=t)})),Va(t,is,(function(t){return e(17,a=t)})),Va(t,hs,(function(t){return e(18,c=t)})),Va(t,Nl,(function(t){return e(3,f=t)})),Va(t,rs,(function(t){return e(4,l=t)}));var s=!1;function d(t){tc(ts,o=Oa(o).call(o,(function(n){return n!==t})),o)}return[s,r,o,f,l,function(t){BooklyCustomerDetailsDialog.showDialog({customer:t,service:Nl.get(),capacity:Math.max(1,r.max-ls(o,t)),done:function(){return ts.set(o)}})},function(t){BooklyCustomerDialog.showDialog({action:"load",customerId:t,onDone:function(t){var n=ds(t);Oa(o).call(o,(function(e){e.id===t.id&&(e.name=n,e.group_id=t.group_id)}));var e=Ol(t.id,i.customers);e&&(e.name=n,e.group_id=t.group_id),Rf.set(i),ts.set(o),tc(is,a=!0,a)}})},function(t){!t.payment_id||t.payment_action?BooklyAttachPaymentDialog.showDialog({customer:t,done:function(){return ts.set(o)}}):BooklyPaymentDetailsDialog.showDialog({customer:t,done:function(){return ts.set(o)}})},function(t){u.default(document.body).trigger("bookly_packages.schedule_dialog",[t.package_id,function(n){kl(n).call(n,Number(t.ca_id))&&d(t),c("refresh")}])},function(t){var n=u.default(".bookly-js-staff-pills li > a.active"),e=n.length?function(){return n.trigger("click")}:function(){return u.default("#bookly-appointments-list").DataTable().ajax.reload()};BooklyCollaborativeDialog.showDialog({collaborative_token:t.collaborative_token,done:e})},function(t){var n=u.default(".bookly-js-staff-pills li > a.active"),e=n.length?function(){return n.trigger("click")}:function(){return u.default("#bookly-appointments-list").DataTable().ajax.reload()};BooklyCompoundDialog.showDialog({compound_token:t.compound_token,done:e})},function(t){var n=u.default(".bookly-js-staff-pills li > a.active"),e=n.length?function(){return n.trigger("click")}:function(){return u.default("#bookly-appointments-list").DataTable().ajax.reload()};BooklySeriesDialog.showDialog({series_id:t.series_id,done:e})},d,function(){return e(0,s=!s)},function(t,n,e,r){return tc(ts,e[r].status=n.id,o)},function(){return e(0,s=!s)}]}var Cv=function(t){nn(e,t);var n=hv(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Mv,Dv,Wa,{}),r}return e}(hf);function Nv(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Lv(t,n){var e;if(void 0===Ji||null==mu(t)){if(yu(t)||(e=function(t,n){var e;if(!t)return;if("string"==typeof t)return Fv(t,n);var r=vu(e=Object.prototype.toString.call(t)).call(e,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return oa(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Fv(t,n)}(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,a=!1;return{s:function(){e=Si(t)},n:function(){var t=e.next();return u=t.done,t},e:function(t){a=!0,i=t},f:function(){try{u||null==e.return||e.return()}finally{if(a)throw i}}}}function Fv(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function zv(t,n,e){var r=vu(t).call(t);return r[12]=n[e],r}function qv(t){var n,e,r,o=t[12].name+"";return{c:function(){n=sc("option"),e=dc(o),n.__value=r=t[12].id,n.value=n.__value},m:function(t,r){cc(t,n,r),ac(n,e)},p:function(t,i){2&i&&o!==(o=t[12].name+"")&&wc(e,o),2&i&&r!==(r=t[12].id)&&(n.__value=r,n.value=n.__value)},d:function(t){t&&fc(n)}}}function Yv(t){for(var n,e,r,o,i,u,a,c,f,l,s=Rl.l10n.new_customer+"",d=t[1].customers,p=[],v=0;v<d.length;v+=1)p[v]=qv(zv(t,d,v));return{c:function(){n=sc("div"),e=sc("select");for(var f=0;f<p.length;f+=1)p[f].c();r=pc(),o=sc("div"),i=sc("button"),u=sc("i"),a=pc(),c=dc(s),yc(e,"class","form-control"),yc(e,"data-placeholder",Rl.l10n.search_customers),e.multiple=!0,yc(u,"class","fas fa-fw fa-plus"),yc(i,"class","btn btn-success"),yc(i,"type","button"),yc(o,"class","input-group-append"),yc(n,"class","input-group"),Ec(n,"d-none",t[2])},m:function(s,d){cc(s,n,d),ac(n,e);for(var v=0;v<p.length;v+=1)p[v].m(e,null);t[8](e),ac(n,r),ac(n,o),ac(o,i),ac(i,u),ac(i,a),ac(i,c),f||(l=hc(i,"click",t[3]),f=!0)},p:function(t,r){var o=Wi(r,1)[0];if(2&o){var i;for(d=t[1].customers,i=0;i<d.length;i+=1){var u=zv(t,d,i);p[i]?p[i].p(u,o):(p[i]=qv(u),p[i].c(),p[i].m(e,null))}for(;i<p.length;i+=1)p[i].d(1);p.length=d.length}4&o&&Ec(n,"d-none",t[2])},i:Fa,o:Fa,d:function(e){e&&fc(n),lc(p,e),t[8](null),f=!1,l()}}}function Hv(t,n,e){var r,o,i,a,c,f,l,s,d;function p(){!function(t,n){u.default(t).select2({theme:"bootstrap4",dropdownParent:"#bookly-appointment-dialog",allowClear:!1,language:{noResults:function(){return Rl.l10n.no_result_found}}}).off().on("select2:select select2:unselect",(function(t){return n(Zf(t.params.data.id))}))}(f,(function(t){var n,e=Sl(Ol(t,r.customers));cs(e),tc(ts,o=Zu(n=[]).call(n,Gu(o),[e]),o)}))}function v(){!function(t,n,e){u.default(t).select2({theme:"bootstrap4",dropdownParent:"#bookly-appointment-dialog",allowClear:!1,language:{noResults:function(){return Rl.l10n.no_result_found},searching:function(){return Rl.l10n.searching}},ajax:{url:ajaxurl,dataType:"json",delay:250,data:function(t){return{action:"bookly_get_customers_list",filter:t.term,page:t.page||1,timezone:!0,csrf_token:jl}},processResults:function(t){var n;return e(t),{results:_a(n=t.results).call(n,(function(t){return{id:t.id,text:t.name}})),pagination:t.pagination}}}}).off().on("select2:selecting",(function(e){e.preventDefault(),n(e.params.args.data.id),u.default(t).select2("close")}))}(f,(function(t){var n,e=Sl(Ol(t,r.customers));cs(e),tc(ts,o=Zu(n=[]).call(n,Gu(o),[e]),o)}),(function(t){var n,e=Lv(t.results);try{for(e.s();!(n=e.n()).done;){var o,i=n.value;if(!Ol(i.id,r.customers))tc(Rf,r.customers=Zu(o=[]).call(o,Gu(r.customers),[i]),r)}}catch(t){e.e(t)}finally{e.f()}}))}return Va(t,Rf,(function(t){return e(1,r=t)})),Va(t,ts,(function(t){return e(5,o=t)})),Va(t,is,(function(t){return e(9,i=t)})),Va(t,Nl,(function(t){return e(6,a=t)})),Va(t,$s,(function(t){return e(7,c=t)})),d=function(){if(f&&i){var t=u.default(f).data("select2");if(t){var n=t.options.options;u.default(f).select2("destroy"),u.default(f).select2(n)}tc(is,i=!1,i)}},Mc().$$.after_update.push(d),t.$$.update=function(){2&t.$$.dirty&&e(4,l=r.customers_loaded?"normal":!1===r.customers_loaded?"remote":void 0),17&t.$$.dirty&&f&&("normal"===l?p():"remote"===l&&v()),224&t.$$.dirty&&e(2,s=!Al("waiting-list")&&a&&ls(o)>=c.max)},[f,r,s,function(){BooklyCustomerDialog.showDialog({action:"create",onDone:function(t){var n=ds(t);r.customers.push({name:n,group_id:t.group_id,id:t.id,number_of_persons:1,timezone:null});var e={id:t.id,name:n,group_id:t.group_id,number_of_persons:1,timezone:null};cs(e),o.push(e),ts.set(o),Rf.set(r)}})},l,o,a,c,function(t){Lc[t?"unshift":"push"]((function(){e(0,f=t)}))}]}var Uv=function(t){nn(e,t);var n=Nv(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Hv,Yv,Wa,{}),r}return e}(hf);function Gv(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Wv(t){var n,e=Rl.l10n.notices.date_interval_warning+"";return{c:function(){n=dc(e)},m:function(t,e){cc(t,n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Jv(t){var n,e=Rl.l10n.notices.interval_not_in_staff_schedule+"";return{c:function(){n=dc(e)},m:function(t,e){cc(t,n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Vv(t){var n,e=Rl.l10n.notices.interval_not_in_service_schedule+"";return{c:function(){n=dc(e)},m:function(t,e){cc(t,n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Qv(t){var n,e=Rl.l10n.notices.date_interval_not_available+"";return{c:function(){n=dc(e)},m:function(t,e){cc(t,n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Kv(t){var n,e=Rl.l10n.notices.staff_reaches_working_time_limit+"";return{c:function(){n=dc(e)},m:function(t,e){cc(t,n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Xv(t){var n,e=Rl.l10n.notices.no_timeslots_available+"";return{c:function(){n=dc(e)},m:function(t,e){cc(t,n,e)},p:Fa,d:function(t){t&&fc(n)}}}function Zv(t){var n,e,r,o,i,u,a,c,f,l,s,d;return n=new xd({props:{show:t[0].date_interval_warning,class:"mt-n2",$$slots:{default:[Wv]},$$scope:{ctx:t}}}),r=new xd({props:{show:t[0].interval_not_in_staff_schedule,class:"mt-n2",$$slots:{default:[Jv]},$$scope:{ctx:t}}}),i=new xd({props:{show:t[0].interval_not_in_service_schedule,class:"mt-n2",$$slots:{default:[Vv]},$$scope:{ctx:t}}}),a=new xd({props:{show:t[0].date_interval_not_available,class:"mt-n2",$$slots:{default:[Qv]},$$scope:{ctx:t}}}),f=new xd({props:{show:t[0].staff_reaches_working_time_limit,class:"mt-n2",$$slots:{default:[Kv]},$$scope:{ctx:t}}}),s=new xd({props:{show:t[0].no_timeslots_available,class:"mt-n2",$$slots:{default:[Xv]},$$scope:{ctx:t}}}),{c:function(){lf(n.$$.fragment),e=pc(),lf(r.$$.fragment),o=pc(),lf(i.$$.fragment),u=pc(),lf(a.$$.fragment),c=pc(),lf(f.$$.fragment),l=pc(),lf(s.$$.fragment)},m:function(t,p){sf(n,t,p),cc(t,e,p),sf(r,t,p),cc(t,o,p),sf(i,t,p),cc(t,u,p),sf(a,t,p),cc(t,c,p),sf(f,t,p),cc(t,l,p),sf(s,t,p),d=!0},p:function(t,e){var o=Wi(e,1)[0],u={};1&o&&(u.show=t[0].date_interval_warning),2&o&&(u.$$scope={dirty:o,ctx:t}),n.$set(u);var c={};1&o&&(c.show=t[0].interval_not_in_staff_schedule),2&o&&(c.$$scope={dirty:o,ctx:t}),r.$set(c);var l={};1&o&&(l.show=t[0].interval_not_in_service_schedule),2&o&&(l.$$scope={dirty:o,ctx:t}),i.$set(l);var d={};1&o&&(d.show=t[0].date_interval_not_available),2&o&&(d.$$scope={dirty:o,ctx:t}),a.$set(d);var p={};1&o&&(p.show=t[0].staff_reaches_working_time_limit),2&o&&(p.$$scope={dirty:o,ctx:t}),f.$set(p);var v={};1&o&&(v.show=t[0].no_timeslots_available),2&o&&(v.$$scope={dirty:o,ctx:t}),s.$set(v)},i:function(t){d||(of(n.$$.fragment,t),of(r.$$.fragment,t),of(i.$$.fragment,t),of(a.$$.fragment,t),of(f.$$.fragment,t),of(s.$$.fragment,t),d=!0)},o:function(t){uf(n.$$.fragment,t),uf(r.$$.fragment,t),uf(i.$$.fragment,t),uf(a.$$.fragment,t),uf(f.$$.fragment,t),uf(s.$$.fragment,t),d=!1},d:function(t){df(n,t),t&&fc(e),df(r,t),t&&fc(o),df(i,t),t&&fc(u),df(a,t),t&&fc(c),df(f,t),t&&fc(l),df(s,t)}}}function th(t,n,e){var r;return Va(t,rs,(function(t){return e(0,r=t)})),[r]}var nh=function(t){nn(e,t);var n=Gv(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,th,Zv,Wa,{}),r}return e}(hf);function eh(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function rh(t){var n,e,r,o,i,u;return{c:function(){n=sc("div"),e=sc("input"),r=pc(),(o=sc("label")).textContent="".concat(Rl.l10n.skip_date),yc(e,"type","checkbox"),yc(e,"id","bookly-skip-date"),yc(e,"class","custom-control-input"),yc(o,"for","bookly-skip-date"),yc(o,"class","custom-control-label"),yc(n,"class","custom-control custom-checkbox mb-2")},m:function(a,c){cc(a,n,c),ac(n,e),e.checked=t[0],ac(n,r),ac(n,o),i||(u=hc(e,"change",t[1]),i=!0)},p:function(t,n){1&Wi(n,1)[0]&&(e.checked=t[0])},i:Fa,o:Fa,d:function(t){t&&fc(n),i=!1,u()}}}function oh(t,n,e){var r;return Va(t,Yl,(function(t){return e(0,r=t)})),[r,function(){r=this.checked,Yl.set(r)}]}var ih=function(t){nn(e,t);var n=eh(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,oh,rh,Wa,{}),r}return e}(hf);function uh(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function ah(t){var n,e,r,o;function i(t,n){return t[1]&&t[1].url?fh:ch}var u=i(t),a=u(t);return{c:function(){n=sc("div"),(e=sc("label")).textContent="".concat(Rl.l10n.online_meeting),r=pc(),o=sc("div"),a.c(),yc(n,"class","form-group")},m:function(i,u){cc(i,n,u),ac(n,e),ac(n,r),ac(n,o),a.m(o,null),t[4](n)},p:function(t,n){u===(u=i(t))&&a?a.p(t,n):(a.d(1),(a=u(t))&&(a.c(),a.m(o,null)))},d:function(e){e&&fc(n),a.d(),t[4](null)}}}function ch(t){var n;return{c:function(){(n=sc("small")).textContent="".concat(Rl.l10n.meeting_create),yc(n,"class","text-muted")},m:function(t,e){cc(t,n,e)},p:Fa,d:function(t){t&&fc(n)}}}function fh(t){var n,e,r,o,i,u,a,c,f,l=t[1].url+"";function s(t,n){return t[1].copied?sh:lh}var d=s(t),p=d(t);return{c:function(){n=sc("div"),e=sc("a"),r=dc(l),i=pc(),u=sc("i"),a=pc(),p.c(),c=pc(),(f=sc("small")).textContent="".concat(Rl.l10n.meeting_code),yc(e,"href",o=t[1].url),yc(e,"target","_blank"),yc(u,"class","fas fa-external-link-alt fa-fw fa-sm text-muted ml-1"),yc(n,"class","btn btn-default disabled d-flex align-items-center"),kc(n,"opacity","1"),kc(n,"cursor","default"),yc(f,"class","text-muted")},m:function(t,o){cc(t,n,o),ac(n,e),ac(e,r),ac(n,i),ac(n,u),ac(n,a),p.m(n,null),cc(t,c,o),cc(t,f,o)},p:function(t,i){2&i&&l!==(l=t[1].url+"")&&wc(r,l),2&i&&o!==(o=t[1].url)&&yc(e,"href",o),d===(d=s(t))&&p?p.p(t,i):(p.d(1),(p=d(t))&&(p.c(),p.m(n,null)))},d:function(t){t&&fc(n),p.d(),t&&fc(c),t&&fc(f)}}}function lh(t){var n,e,r;return{c:function(){yc(n=sc("a"),"class","far fa-copy fa-fw text-secondary text-decoration-none ml-auto"),yc(n,"href",""),yc(n,"title",Rl.l10n.copy_to_clipboard)},m:function(o,i){cc(o,n,i),e||(r=hc(n,"click",mc(t[3])),e=!0)},p:Fa,d:function(t){t&&fc(n),e=!1,r()}}}function sh(t){var n;return{c:function(){(n=sc("small")).textContent="".concat(Rl.l10n.copied),yc(n,"class","text-muted ml-auto")},m:function(t,e){cc(t,n,e)},p:Fa,d:function(t){t&&fc(n)}}}function dh(t){var n,e=(t[1]&&t[1].url||t[2]&&t[2].id&&"off"!==t[2].online_meetings)&&ah(t);return{c:function(){e&&e.c(),n=vc()},m:function(t,r){e&&e.m(t,r),cc(t,n,r)},p:function(t,r){var o=Wi(r,1)[0];t[1]&&t[1].url||t[2]&&t[2].id&&"off"!==t[2].online_meetings?e?e.p(t,o):((e=ah(t)).c(),e.m(n.parentNode,n)):e&&(e.d(1),e=null)},i:Fa,o:Fa,d:function(t){e&&e.d(t),t&&fc(n)}}}function ph(t,n,e){var r,o,i;return Va(t,zl,(function(t){return e(1,r=t)})),Va(t,Nl,(function(t){return e(2,o=t)})),[i,r,o,function(){var t=document.createElement("textarea");t.textContent=r.url,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",i.appendChild(t),t.select(),t.setSelectionRange(0,99999),document.execCommand("copy"),i.removeChild(t),tc(zl,r.copied=!0,r),Mf((function(){tc(zl,r.copied=!1,r)}),1e3)},function(t){Lc[t?"unshift":"push"]((function(){e(0,i=t)}))}]}var vh=function(t){nn(e,t);var n=uh(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,ph,dh,Wa,{}),r}return e}(hf);function hh(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function mh(t){var n,e,r,o,i;return{c:function(){(n=sc("label")).textContent="".concat(Rl.l10n.internal_note),e=pc(),r=sc("textarea"),yc(n,"for","bookly-internal-note"),yc(r,"class","form-control"),yc(r,"id","bookly-internal-note")},m:function(u,a){cc(u,n,a),cc(u,e,a),cc(u,r,a),xc(r,t[0]),o||(i=hc(r,"input",t[1]),o=!0)},p:function(t,n){1&Wi(n,1)[0]&&xc(r,t[0])},i:Fa,o:Fa,d:function(t){t&&fc(n),t&&fc(e),t&&fc(r),o=!1,i()}}}function yh(t,n,e){var r;return Va(t,ns,(function(t){return e(0,r=t)})),[r,function(){r=this.value,ns.set(r)}]}var gh=function(t){nn(e,t);var n=hh(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,yh,mh,Wa,{}),r}return e}(hf);function _h(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function $h(t){var n,e,r,o,i,u;return{c:function(){n=sc("div"),e=sc("input"),r=pc(),(o=sc("label")).textContent="".concat(Rl.l10n.send_notifications),yc(e,"type","checkbox"),yc(e,"id","bookly-send-notifications"),yc(e,"class","custom-control-input"),yc(o,"for","bookly-send-notifications"),yc(o,"class","custom-control-label"),yc(n,"class","custom-control custom-checkbox mb-2")},m:function(a,c){cc(a,n,c),ac(n,e),e.checked=t[0],ac(n,r),ac(n,o),i||(u=hc(e,"change",t[1]),i=!0)},p:function(t,n){1&Wi(n,1)[0]&&(e.checked=t[0])},i:Fa,o:Fa,d:function(t){t&&fc(n),i=!1,u()}}}function bh(t,n,e){var r;return Va(t,es,(function(t){return e(0,r=t)})),null===r&&tc(es,r="1"===Rl.send_notifications,r),[r,function(){r=this.checked,es.set(r)}]}var wh=function(t){nn(e,t);var n=_h(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,bh,$h,Wa,{}),r}return e}(hf);function xh(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function kh(t){var n,e,r,o,i,u,a=Al("locations"),c=Al("tasks"),f=t[0]&&null===t[0].id&&Oh();e=new vh({});var l=a&&function(t){var n,e,r;return e=new rp({}),{c:function(){n=sc("div"),lf(e.$$.fragment),yc(n,"class","form-group")},m:function(t,o){cc(t,n,o),sf(e,n,null),r=!0},i:function(t){r||(of(e.$$.fragment,t),r=!0)},o:function(t){uf(e.$$.fragment,t),r=!1},d:function(t){t&&fc(n),df(e)}}}(),s=c&&function(t){var n,e;return n=new ih({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}();return{c:function(){f&&f.c(),n=pc(),lf(e.$$.fragment),r=pc(),l&&l.c(),o=pc(),s&&s.c(),i=vc()},m:function(t,a){f&&f.m(t,a),cc(t,n,a),sf(e,t,a),cc(t,r,a),l&&l.m(t,a),cc(t,o,a),s&&s.m(t,a),cc(t,i,a),u=!0},p:function(t,e){t[0]&&null===t[0].id?f?1&e&&of(f,1):((f=Oh()).c(),of(f,1),f.m(n.parentNode,n)):f&&(ef(),uf(f,1,1,(function(){f=null})),rf())},i:function(t){u||(of(f),of(e.$$.fragment,t),of(l),of(s),u=!0)},o:function(t){uf(f),uf(e.$$.fragment,t),uf(l),uf(s),u=!1},d:function(t){f&&f.d(t),t&&fc(n),df(e,t),t&&fc(r),l&&l.d(t),t&&fc(o),s&&s.d(t),t&&fc(i)}}}function Oh(t){var n,e;return n=new Kd({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Sh(t){var n,e,r,o,i,u,a,c;r=new ap({});var f=(!t[0]||!1==(t[0].duration>=86400&&1===t[0].units_max))&&Eh();return a=new nh({}),{c:function(){n=sc("div"),e=sc("div"),lf(r.$$.fragment),o=pc(),i=sc("div"),f&&f.c(),u=pc(),lf(a.$$.fragment),yc(e,"class","col-sm-4 form-group"),yc(i,"class","col-sm-8 form-group"),yc(n,"class","form-row")},m:function(t,l){cc(t,n,l),ac(n,e),sf(r,e,null),ac(n,o),ac(n,i),f&&f.m(i,null),cc(t,u,l),sf(a,t,l),c=!0},p:function(t,n){t[0]&&!1!=(t[0].duration>=86400&&1===t[0].units_max)?f&&(ef(),uf(f,1,1,(function(){f=null})),rf()):f?1&n&&of(f,1):((f=Eh()).c(),of(f,1),f.m(i,null))},i:function(t){c||(of(r.$$.fragment,t),of(f),of(a.$$.fragment,t),c=!0)},o:function(t){uf(r.$$.fragment,t),uf(f),uf(a.$$.fragment,t),c=!1},d:function(t){t&&fc(n),df(r),f&&f.d(),t&&fc(u),df(a,t)}}}function Eh(t){var n,e;return n=new yp({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Ah(t){var n,e,r;return e=new sv({}),{c:function(){n=sc("div"),lf(e.$$.fragment),yc(n,"class","mb-2")},m:function(t,o){cc(t,n,o),sf(e,n,null),r=!0},i:function(t){r||(of(e.$$.fragment,t),r=!0)},o:function(t){uf(e.$$.fragment,t),r=!1},d:function(t){t&&fc(n),df(e)}}}function jh(t){var n,e,r,o,i,u,a,c,f,l,s,d,p,v,h,m,y,g,_=Al("pro"),$=Al("recurring-appointments")&&null===t[2].id&&!t[1],b=Rl.service_main&&function(t){var n,e,r;return e=new Gd({}),{c:function(){n=sc("div"),lf(e.$$.fragment),yc(n,"class","form-group")},m:function(t,o){cc(t,n,o),sf(e,n,null),r=!0},i:function(t){r||(of(e.$$.fragment,t),r=!0)},o:function(t){uf(e.$$.fragment,t),r=!1},d:function(t){t&&fc(n),df(e)}}}();r=new Dd({});var w=!Rl.service_main&&function(t){var n,e,r;return e=new Gd({}),{c:function(){n=sc("div"),lf(e.$$.fragment),yc(n,"class","form-group")},m:function(t,o){cc(t,n,o),sf(e,n,null),r=!0},i:function(t){r||(of(e.$$.fragment,t),r=!0)},o:function(t){uf(e.$$.fragment,t),r=!1},d:function(t){t&&fc(n),df(e)}}}(),x=_&&kh(t),k=!t[1]&&Sh(t),O=$&&Ah();return l=new Cv({}),d=new Uv({}),h=new gh({}),y=new wh({}),{c:function(){b&&b.c(),n=pc(),e=sc("div"),lf(r.$$.fragment),o=pc(),w&&w.c(),i=pc(),x&&x.c(),u=pc(),k&&k.c(),a=pc(),O&&O.c(),c=pc(),f=sc("div"),lf(l.$$.fragment),s=pc(),lf(d.$$.fragment),p=pc(),v=sc("div"),lf(h.$$.fragment),m=pc(),lf(y.$$.fragment),yc(e,"class","form-group"),yc(f,"class","form-group"),yc(v,"class","form-group")},m:function(t,_){b&&b.m(t,_),cc(t,n,_),cc(t,e,_),sf(r,e,null),cc(t,o,_),w&&w.m(t,_),cc(t,i,_),x&&x.m(t,_),cc(t,u,_),k&&k.m(t,_),cc(t,a,_),O&&O.m(t,_),cc(t,c,_),cc(t,f,_),sf(l,f,null),ac(f,s),sf(d,f,null),cc(t,p,_),cc(t,v,_),sf(h,v,null),cc(t,m,_),sf(y,t,_),g=!0},p:function(t,n){var e=Wi(n,1)[0];_&&x.p(t,e),t[1]?k&&(ef(),uf(k,1,1,(function(){k=null})),rf()):k?(k.p(t,e),2&e&&of(k,1)):((k=Sh(t)).c(),of(k,1),k.m(a.parentNode,a)),6&e&&($=Al("recurring-appointments")&&null===t[2].id&&!t[1]),$?O?6&e&&of(O,1):((O=Ah()).c(),of(O,1),O.m(c.parentNode,c)):O&&(ef(),uf(O,1,1,(function(){O=null})),rf())},i:function(t){g||(of(b),of(r.$$.fragment,t),of(w),of(x),of(k),of(O),of(l.$$.fragment,t),of(d.$$.fragment,t),of(h.$$.fragment,t),of(y.$$.fragment,t),g=!0)},o:function(t){uf(b),uf(r.$$.fragment,t),uf(w),uf(x),uf(k),uf(O),uf(l.$$.fragment,t),uf(d.$$.fragment,t),uf(h.$$.fragment,t),uf(y.$$.fragment,t),g=!1},d:function(t){b&&b.d(t),t&&fc(n),t&&fc(e),df(r),t&&fc(o),w&&w.d(t),t&&fc(i),x&&x.d(t),t&&fc(u),k&&k.d(t),t&&fc(a),O&&O.d(t),t&&fc(c),t&&fc(f),df(l),df(d),t&&fc(p),t&&fc(v),df(h),t&&fc(m),df(y,t)}}}function Th(t,n,e){var r,o,i;return Va(t,Nl,(function(t){return e(0,r=t)})),Va(t,Yl,(function(t){return e(1,o=t)})),Va(t,vs,(function(t){return e(2,i=t)})),[r,o,i]}var Ph=function(t){nn(e,t);var n=xh(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Th,jh,Wa,{}),r}return e}(hf),Rh=Pf(0),Bh=Sf([As,Rh],(function(t){var n=Wi(t,2),e=n[0],r=n[1];return e?vu(e).call(e,10*r,10*(r+1)):[]})),Ih=Sf([As],(function(t){var n=Wi(t,1)[0];return n?Math.ceil(n.length/10):0}));function Dh(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Mh(t){var n;return{c:function(){yc(n=sc("input"),"autocomplete","off"),yc(n,"class","form-control"),yc(n,"type","text")},m:function(e,r){cc(e,n,r),t[4](n)},p:Fa,i:Fa,o:Fa,d:function(e){e&&fc(n),t[4](null)}}}function Ch(t,n,e){var r,o,i,a=n.item;return i=moment(a.date),Cc((function(){return e(2,o=u.default(r).daterangepicker({parentEl:"#bookly-appointment-dialog > div",singleDatePicker:!0,showDropdowns:!0,locale:Rl.datePicker},(function(t){e(1,a.date=t.format("YYYY-MM-DD"),a),ed(a)})))})),t.$$set=function(t){"item"in t&&e(1,a=t.item)},t.$$.update=function(){12&t.$$.dirty&&i&&o&&(o.data("daterangepicker").setStartDate(i),o.data("daterangepicker").setEndDate(i))},[r,a,o,i,function(t){Lc[t?"unshift":"push"]((function(){e(0,r=t)}))}]}var Nh=function(t){nn(e,t);var n=Dh(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Ch,Mh,Wa,{item:1}),r}return e}(hf);function Lh(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Fh(t,n,e){var r=vu(t).call(t);return r[4]=n[e],r}function zh(t){var n,e,r,o,i=t[4].title+"";return{c:function(){n=sc("option"),e=dc(i),n.__value=r=t[4].value,n.value=n.__value,n.disabled=o=t[4].disabled},m:function(t,r){cc(t,n,r),ac(n,e)},p:function(t,u){2&u&&i!==(i=t[4].title+"")&&wc(e,i),2&u&&r!==(r=t[4].value)&&(n.__value=r,n.value=n.__value),2&u&&o!==(o=t[4].disabled)&&(n.disabled=o)},d:function(t){t&&fc(n)}}}function qh(t){for(var n,e,r,o=t[1],i=[],u=0;u<o.length;u+=1)i[u]=zh(Fh(t,o,u));return{c:function(){n=sc("select");for(var e=0;e<i.length;e+=1)i[e].c();yc(n,"class","form-control custom-select"),void 0===t[0].slots&&Gc((function(){return t[3].call(n)}))},m:function(o,u){cc(o,n,u);for(var a=0;a<i.length;a+=1)i[a].m(n,null);Oc(n,t[0].slots),e||(r=[hc(n,"change",t[3]),hc(n,"change",(function(){Ga(t[2](t[0]))&&t[2](t[0]).apply(this,arguments)}))],e=!0)},p:function(e,r){var u=Wi(r,1)[0];if(t=e,2&u){var a;for(o=t[1],a=0;a<o.length;a+=1){var c=Fh(t,o,a);i[a]?i[a].p(c,u):(i[a]=zh(c),i[a].c(),i[a].m(n,null))}for(;a<i.length;a+=1)i[a].d(1);i.length=o.length}3&u&&Oc(n,t[0].slots)},i:Fa,o:Fa,d:function(t){t&&fc(n),lc(i,t),e=!1,Ua(r)}}}function Yh(t,n,e){var r;Va(t,Os,(function(t){return e(1,r=t)}));var o=n.item;return t.$$set=function(t){"item"in t&&e(0,o=t.item)},[o,r,function(){e(0,o.options=Oa(r).call(r,(function(t){return t.value===o.slots})),o)},function(){o.slots=Sc(this),e(0,o)}]}var Hh=function(t){nn(e,t);var n=Lh(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Yh,qh,Wa,{item:0}),r}return e}(hf);function Uh(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Gh(t){var n,e,r,o;function i(n){t[2](n)}var u={};return void 0!==t[0]&&(u.item=t[0]),e=new Nh({props:u}),Lc.push((function(){return ff(e,"item",i)})),{c:function(){n=sc("div"),lf(e.$$.fragment),yc(n,"class","col-sm-4")},m:function(t,r){cc(t,n,r),sf(e,n,null),o=!0},p:function(t,n){var o={};!r&&1&n&&(r=!0,o.item=t[0],Wc((function(){return r=!1}))),e.$set(o)},i:function(t){o||(of(e.$$.fragment,t),o=!0)},o:function(t){uf(e.$$.fragment,t),o=!1},d:function(t){t&&fc(n),df(e)}}}function Wh(t){var n,e,r,o;function i(n){t[3](n)}var u={};return void 0!==t[0]&&(u.item=t[0]),e=new Hh({props:u}),Lc.push((function(){return ff(e,"item",i)})),{c:function(){n=sc("div"),lf(e.$$.fragment),yc(n,"class","col-sm-3")},m:function(t,r){cc(t,n,r),sf(e,n,null),o=!0},p:function(t,n){var o={};!r&&1&n&&(r=!0,o.item=t[0],Wc((function(){return r=!1}))),e.$set(o)},i:function(t){o||(of(e.$$.fragment,t),o=!0)},o:function(t){uf(e.$$.fragment,t),o=!1},d:function(t){t&&fc(n),df(e)}}}function Jh(t){var n,e,r,o,i,u,a,c,f,l,s,d,p=Ns(t[0].date)+"",v=Ls(t[0].slots,t[0].options)+"",h=t[0].all_day_service_time+"",m=t[1]===t[0].index&&Gh(t),y=t[1]===t[0].index&&Wh(t);return{c:function(){n=sc("div"),e=dc(p),r=pc(),m&&m.c(),o=pc(),i=sc("div"),u=dc(v),a=pc(),c=sc("div"),f=dc(h),l=pc(),y&&y.c(),s=vc(),yc(n,"class","col-sm-3"),Ec(n,"d-none",t[0].deleted||t[1]===t[0].index),yc(i,"class","col-sm-2"),Ec(i,"d-none",t[0].all_day_service_time||t[0].deleted||t[1]===t[0].index),yc(c,"class","col-sm-2"),Ec(c,"d-none",!t[0].all_day_service_time)},m:function(t,p){cc(t,n,p),ac(n,e),cc(t,r,p),m&&m.m(t,p),cc(t,o,p),cc(t,i,p),ac(i,u),cc(t,a,p),cc(t,c,p),ac(c,f),cc(t,l,p),y&&y.m(t,p),cc(t,s,p),d=!0},p:function(t,r){var a=Wi(r,1)[0];(!d||1&a)&&p!==(p=Ns(t[0].date)+"")&&wc(e,p),3&a&&Ec(n,"d-none",t[0].deleted||t[1]===t[0].index),t[1]===t[0].index?m?(m.p(t,a),3&a&&of(m,1)):((m=Gh(t)).c(),of(m,1),m.m(o.parentNode,o)):m&&(ef(),uf(m,1,1,(function(){m=null})),rf()),(!d||1&a)&&v!==(v=Ls(t[0].slots,t[0].options)+"")&&wc(u,v),3&a&&Ec(i,"d-none",t[0].all_day_service_time||t[0].deleted||t[1]===t[0].index),(!d||1&a)&&h!==(h=t[0].all_day_service_time+"")&&wc(f,h),1&a&&Ec(c,"d-none",!t[0].all_day_service_time),t[1]===t[0].index?y?(y.p(t,a),3&a&&of(y,1)):((y=Wh(t)).c(),of(y,1),y.m(s.parentNode,s)):y&&(ef(),uf(y,1,1,(function(){y=null})),rf())},i:function(t){d||(of(m),of(y),d=!0)},o:function(t){uf(m),uf(y),d=!1},d:function(t){t&&fc(n),t&&fc(r),m&&m.d(t),t&&fc(o),t&&fc(i),t&&fc(a),t&&fc(c),t&&fc(l),y&&y.d(t),t&&fc(s)}}}function Vh(t,n,e){var r;Va(t,Es,(function(t){return e(1,r=t)}));var o=n.item;return t.$$set=function(t){"item"in t&&e(0,o=t.item)},[o,r,function(t){e(0,o=t)},function(t){e(0,o=t)}]}var Qh=function(t){nn(e,t);var n=Uh(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Vh,Jh,Wa,{item:0}),r}return e}(hf);function Kh(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Xh(t){var n,e,r;return{c:function(){yc(n=sc("a"),"href",""),yc(n,"class","fas fa-fw fa-check text-decoration-none"),yc(n,"title",Rl.l10n.recurring.apply),Ec(n,"d-none",t[1]!==t[0].index)},m:function(o,i){cc(o,n,i),e||(r=hc(n,"click",mc(t[2])),e=!0)},p:function(t,e){3&Wi(e,1)[0]&&Ec(n,"d-none",t[1]!==t[0].index)},i:Fa,o:Fa,d:function(t){t&&fc(n),e=!1,r()}}}function Zh(t,n,e){var r;Va(t,Es,(function(t){return e(1,r=t)}));var o=n.item;return t.$$set=function(t){"item"in t&&e(0,o=t.item)},[o,r,function(){return tc(Es,r=0,r)}]}var tm=function(t){nn(e,t);var n=Kh(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Zh,Xh,Wa,{item:0}),r}return e}(hf);function nm(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function em(t){var n,e,r;return{c:function(){yc(n=sc("a"),"href",""),yc(n,"class","far fa-fw fa-trash-alt text-danger"),yc(n,"title",Rl.l10n.recurring.delete)},m:function(o,i){cc(o,n,i),e||(r=hc(n,"click",mc(t[1])),e=!0)},p:Fa,i:Fa,o:Fa,d:function(t){t&&fc(n),e=!1,r()}}}function rm(t,n,e){var r=n.item;return t.$$set=function(t){"item"in t&&e(0,r=t.item)},[r,function(){return e(0,r.deleted=!0,r)}]}var om=function(t){nn(e,t);var n=nm(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,rm,em,Wa,{item:0}),r}return e}(hf);function im(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function um(t){var n,e,r;return{c:function(){yc(n=sc("a"),"href",""),yc(n,"class","far fa-fw fa-edit text-decoration-none"),yc(n,"title",Rl.l10n.recurring.edit)},m:function(o,i){cc(o,n,i),e||(r=hc(n,"click",mc(t[2])),e=!0)},p:Fa,i:Fa,o:Fa,d:function(t){t&&fc(n),e=!1,r()}}}function am(t,n,e){var r;Va(t,Es,(function(t){return e(1,r=t)}));var o=n.item;return t.$$set=function(t){"item"in t&&e(0,o=t.item)},[o,r,function(){ed(o),tc(Es,r=o.index,r)}]}var cm=function(t){nn(e,t);var n=im(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,am,um,Wa,{item:0}),r}return e}(hf);function fm(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function lm(t){var n,e,r,o;return{c:function(){n=sc("a"),yc(e=sc("span"),"class","fas fa-fw fa-undo"),yc(n,"href",""),yc(n,"class","text-muted"),yc(n,"title",Rl.l10n.recurring.restore)},m:function(i,u){cc(i,n,u),ac(n,e),r||(o=hc(n,"click",mc(t[1])),r=!0)},p:Fa,i:Fa,o:Fa,d:function(t){t&&fc(n),r=!1,o()}}}function sm(t,n,e){var r=n.item;return t.$$set=function(t){"item"in t&&e(0,r=t.item)},[r,function(){return e(0,r.deleted=!1,r)}]}var dm=function(t){nn(e,t);var n=fm(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,sm,lm,Wa,{item:0}),r}return e}(hf);function pm(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function vm(t){var n,e,r,o,i,u,a,c,f,l,s,d,p,v,h,m,y,g,_,$,b,w,x,k,O,S,E,A,j,T,P=t[0].index+"",R=Rl.l10n.recurring.another_time+"";function B(n){t[2](n)}var I={};function D(n){t[3](n)}void 0!==t[0]&&(I.item=t[0]),l=new dm({props:I}),Lc.push((function(){return ff(l,"item",B)})),p=new Qh({props:{item:t[0]}});var M={};function C(n){t[4](n)}void 0!==t[0]&&(M.item=t[0]),b=new cm({props:M}),Lc.push((function(){return ff(b,"item",D)}));var N={};function L(n){t[5](n)}void 0!==t[0]&&(N.item=t[0]),k=new om({props:N}),Lc.push((function(){return ff(k,"item",C)}));var F={};return void 0!==t[0]&&(F.item=t[0]),A=new tm({props:F}),Lc.push((function(){return ff(A,"item",L)})),{c:function(){n=sc("li"),e=sc("div"),r=sc("div"),o=sc("b"),i=dc(P),u=pc(),(a=sc("div")).textContent="".concat(Rl.l10n.recurring.deleted),c=pc(),f=sc("div"),lf(l.$$.fragment),d=pc(),lf(p.$$.fragment),v=pc(),h=sc("div"),m=sc("span"),y=sc("span"),g=dc(R),_=pc(),$=sc("div"),lf(b.$$.fragment),x=pc(),lf(k.$$.fragment),S=pc(),E=sc("div"),lf(A.$$.fragment),yc(r,"class","col-sm-1"),yc(a,"class","col-sm-10 text-muted"),Ec(a,"d-none",!t[0].deleted),yc(f,"class","col-sm-1 text-right"),Ec(f,"d-none",!0!==t[0].deleted),yc(y,"class","fas fa-fw fa-exclamation-triangle text-warning mr-1"),Ec(m,"d-none",!t[0].another_time),yc(h,"class","col-sm-4"),Ec(h,"d-none",t[0].deleted||t[1]===t[0].index),yc($,"class","col-sm-2 text-right"),Ec($,"d-none",t[0].deleted||t[1]===t[0].index),yc(E,"class","col-sm-4 text-right"),Ec(E,"d-none",t[1]!==t[0].index),yc(e,"class","row"),yc(n,"class","list-group-item")},m:function(t,s){cc(t,n,s),ac(n,e),ac(e,r),ac(r,o),ac(o,i),ac(e,u),ac(e,a),ac(e,c),ac(e,f),sf(l,f,null),ac(e,d),sf(p,e,null),ac(e,v),ac(e,h),ac(h,m),ac(m,y),ac(m,g),ac(e,_),ac(e,$),sf(b,$,null),ac($,x),sf(k,$,null),ac(e,S),ac(e,E),sf(A,E,null),T=!0},p:function(t,n){var e=Wi(n,1)[0];(!T||1&e)&&P!==(P=t[0].index+"")&&wc(i,P),1&e&&Ec(a,"d-none",!t[0].deleted);var r={};!s&&1&e&&(s=!0,r.item=t[0],Wc((function(){return s=!1}))),l.$set(r),1&e&&Ec(f,"d-none",!0!==t[0].deleted);var o={};1&e&&(o.item=t[0]),p.$set(o),1&e&&Ec(m,"d-none",!t[0].another_time),3&e&&Ec(h,"d-none",t[0].deleted||t[1]===t[0].index);var u={};!w&&1&e&&(w=!0,u.item=t[0],Wc((function(){return w=!1}))),b.$set(u);var c={};!O&&1&e&&(O=!0,c.item=t[0],Wc((function(){return O=!1}))),k.$set(c),3&e&&Ec($,"d-none",t[0].deleted||t[1]===t[0].index);var d={};!j&&1&e&&(j=!0,d.item=t[0],Wc((function(){return j=!1}))),A.$set(d),3&e&&Ec(E,"d-none",t[1]!==t[0].index)},i:function(t){T||(of(l.$$.fragment,t),of(p.$$.fragment,t),of(b.$$.fragment,t),of(k.$$.fragment,t),of(A.$$.fragment,t),T=!0)},o:function(t){uf(l.$$.fragment,t),uf(p.$$.fragment,t),uf(b.$$.fragment,t),uf(k.$$.fragment,t),uf(A.$$.fragment,t),T=!1},d:function(t){t&&fc(n),df(l),df(p),df(b),df(k),df(A)}}}function hm(t,n,e){var r;Va(t,Es,(function(t){return e(1,r=t)}));var o=n.item;return t.$$set=function(t){"item"in t&&e(0,o=t.item)},[o,r,function(t){e(0,o=t)},function(t){e(0,o=t)},function(t){e(0,o=t)},function(t){e(0,o=t)}]}var mm=function(t){nn(e,t);var n=pm(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,hm,vm,Wa,{item:0}),r}return e}(hf);function ym(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function gm(t,n,e){var r=vu(t).call(t);return r[5]=n[e],r[7]=e,r}function _m(t){var n,e,r,o,i,u=t[7]+1+"";function a(){return t[3](t[7])}return{c:function(){n=sc("li"),e=sc("a"),r=dc(u),yc(e,"href",""),yc(e,"class","page-link"),yc(n,"class","page-item"),Ec(n,"active",t[7]===t[1])},m:function(t,u){cc(t,n,u),ac(n,e),ac(e,r),o||(i=hc(e,"click",mc(a)),o=!0)},p:function(e,r){t=e,2&r&&Ec(n,"active",t[7]===t[1])},d:function(t){t&&fc(n),o=!1,i()}}}function $m(t){for(var n,e,r,o,i,u,a,c,f,l,s=Array(t[0]),d=[],p=0;p<s.length;p+=1)d[p]=_m(gm(t,s,p));return{c:function(){n=sc("nav"),e=sc("ul"),r=sc("li"),(o=sc("a")).innerHTML="<span>«</span>",i=pc();for(var f=0;f<d.length;f+=1)d[f].c();u=pc(),a=sc("li"),(c=sc("a")).innerHTML="<span>»</span>",yc(o,"href",""),yc(o,"class","page-link"),yc(r,"class","page-item"),Ec(r,"disabled",0===t[1]),yc(c,"href",""),yc(c,"class","page-link"),yc(a,"class","page-item"),Ec(a,"disabled",t[1]===t[0]-1),yc(e,"class","pagination"),Ec(n,"d-none",t[0]<=1)},m:function(s,p){cc(s,n,p),ac(n,e),ac(e,r),ac(r,o),ac(e,i);for(var v=0;v<d.length;v+=1)d[v].m(e,null);ac(e,u),ac(e,a),ac(a,c),f||(l=[hc(o,"click",mc(t[2])),hc(c,"click",mc(t[4]))],f=!0)},p:function(t,o){var i=Wi(o,1)[0];if(2&i&&Ec(r,"disabled",0===t[1]),3&i){var c;for(s=Array(t[0]),c=0;c<s.length;c+=1){var f=gm(t,s,c);d[c]?d[c].p(f,i):(d[c]=_m(f),d[c].c(),d[c].m(e,u))}for(;c<d.length;c+=1)d[c].d(1);d.length=s.length}3&i&&Ec(a,"disabled",t[1]===t[0]-1),1&i&&Ec(n,"d-none",t[0]<=1)},i:Fa,o:Fa,d:function(t){t&&fc(n),lc(d,t),f=!1,Ua(l)}}}function bm(t,n,e){var r,o;Va(t,Ih,(function(t){return e(0,r=t)})),Va(t,Rh,(function(t){return e(1,o=t)}));return[r,o,function(){return tc(Rh,--o,o)},function(t){return tc(Rh,o=t,o)},function(){return tc(Rh,++o,o)}]}var wm=function(t){nn(e,t);var n=ym(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,bm,$m,Wa,{}),r}return e}(hf);function xm(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function km(t,n,e){var r=vu(t).call(t);return r[1]=n[e],r}function Om(t){var n,e;return n=new mm({props:{item:t[1]}}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},p:function(t,e){var r={};1&e&&(r.item=t[1]),n.$set(r)},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Sm(t){for(var n,e,r,o,i=t[0],u=[],a=0;a<i.length;a+=1)u[a]=Om(km(t,i,a));var c=function(t){return uf(u[t],1,1,(function(){u[t]=null}))};return r=new wm({}),{c:function(){n=sc("ul");for(var t=0;t<u.length;t+=1)u[t].c();e=pc(),lf(r.$$.fragment),yc(n,"id","bookly-schedule-items"),yc(n,"class","list-group mb-3")},m:function(t,i){cc(t,n,i);for(var a=0;a<u.length;a+=1)u[a].m(n,null);cc(t,e,i),sf(r,t,i),o=!0},p:function(t,e){var r=Wi(e,1)[0];if(1&r){var o;for(i=t[0],o=0;o<i.length;o+=1){var a=km(t,i,o);u[o]?(u[o].p(a,r),of(u[o],1)):(u[o]=Om(a),u[o].c(),of(u[o],1),u[o].m(n,null))}for(ef(),o=i.length;o<u.length;o+=1)c(o);rf()}},i:function(t){if(!o){for(var n=0;n<i.length;n+=1)of(u[n]);of(r.$$.fragment,t),o=!0}},o:function(t){u=Oa(u).call(u,Boolean);for(var n=0;n<u.length;n+=1)uf(u[n]);uf(r.$$.fragment,t),o=!1},d:function(t){t&&fc(n),lc(u,t),t&&fc(e),df(r,t)}}}function Em(t,n,e){var r;return Va(t,Bh,(function(t){return e(0,r=t)})),[r]}var Am=function(t){nn(e,t);var n=xm(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Em,Sm,Wa,{}),r}return e}(hf);function jm(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Tm(t){var n,e,r,o=t[4].default,i=Qa(o,t,t[3],null);return{c:function(){n=sc("div"),i&&i.c(),yc(n,"class",e="alert-"+t[1]+" "+t[2])},m:function(t,e){cc(t,n,e),i&&i.m(n,null),r=!0},p:function(t,u){i&&i.p&&8&u&&Xa(i,o,t,t[3],u,null,null),(!r||6&u&&e!==(e="alert-"+t[1]+" "+t[2]))&&yc(n,"class",e)},i:function(t){r||(of(i,t),r=!0)},o:function(t){uf(i,t),r=!1},d:function(t){t&&fc(n),i&&i.d(t)}}}function Pm(t){var n,e,r=t[0]&&Tm(t);return{c:function(){r&&r.c(),n=vc()},m:function(t,o){r&&r.m(t,o),cc(t,n,o),e=!0},p:function(t,e){var o=Wi(e,1)[0];t[0]?r?(r.p(t,o),1&o&&of(r,1)):((r=Tm(t)).c(),of(r,1),r.m(n.parentNode,n)):r&&(ef(),uf(r,1,1,(function(){r=null})),rf())},i:function(t){e||(of(r),e=!0)},o:function(t){uf(r),e=!1},d:function(t){r&&r.d(t),t&&fc(n)}}}function Rm(t,n,e){var r=n.$$slots,o=void 0===r?{}:r,i=n.$$scope,u=n.show,a=void 0===u||u,c=n.type,f=void 0===c?"info":c,l=n.class,s=void 0===l?"alert":l;return t.$$set=function(t){"show"in t&&e(0,a=t.show),"type"in t&&e(1,f=t.type),"class"in t&&e(2,s=t.class),"$$scope"in t&&e(3,i=t.$$scope)},[a,f,s,i,o]}var Bm=function(t){nn(e,t);var n=jm(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Rm,Pm,Wa,{show:0,type:1,class:2}),r}return e}(hf);function Im(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Dm(t){var n,e,r,o,i,u;return n=new Bm({props:{type:"danger",show:t[1].length,$$slots:{default:[Cm]},$$scope:{ctx:t}}}),r=new Am({}),i=new Bm({props:{type:"danger",show:t[2]>1&&t[1].length,$$slots:{default:[Nm]},$$scope:{ctx:t}}}),{c:function(){lf(n.$$.fragment),e=pc(),lf(r.$$.fragment),o=pc(),lf(i.$$.fragment)},m:function(t,a){sf(n,t,a),cc(t,e,a),sf(r,t,a),cc(t,o,a),sf(i,t,a),u=!0},p:function(t,e){var r={};2&e&&(r.show=t[1].length),16&e&&(r.$$scope={dirty:e,ctx:t}),n.$set(r);var o={};6&e&&(o.show=t[2]>1&&t[1].length),18&e&&(o.$$scope={dirty:e,ctx:t}),i.$set(o)},i:function(t){u||(of(n.$$.fragment,t),of(r.$$.fragment,t),of(i.$$.fragment,t),u=!0)},o:function(t){uf(n.$$.fragment,t),uf(r.$$.fragment,t),uf(i.$$.fragment,t),u=!1},d:function(t){df(n,t),t&&fc(e),df(r,t),t&&fc(o),df(i,t)}}}function Mm(t){var n;return{c:function(){yc(n=sc("div"),"class","bookly-loading")},m:function(t,e){cc(t,n,e)},p:Fa,i:Fa,o:Fa,d:function(t){t&&fc(n)}}}function Cm(t){var n,e,r,o=Rl.l10n.recurring.some_slots_are_busy+"";return{c:function(){n=sc("span"),e=pc(),r=dc(o),yc(n,"class","fas fa-info-circle text-primary fa-lg")},m:function(t,o){cc(t,n,o),cc(t,e,o),cc(t,r,o)},p:Fa,d:function(t){t&&fc(n),t&&fc(e),t&&fc(r)}}}function Nm(t){var n,e,r,o,i,u=Rl.l10n.recurring.another_time_on_pages+"",a=t[1].join(", ")+"";return{c:function(){n=sc("span"),e=pc(),r=dc(u),o=pc(),i=dc(a),yc(n,"class","fas fa-fw fa-exclamation-triangle text-warning fa-lg mr-2")},m:function(t,u){cc(t,n,u),cc(t,e,u),cc(t,r,u),cc(t,o,u),cc(t,i,u)},p:function(t,n){2&n&&a!==(a=t[1].join(", ")+"")&&wc(i,a)},d:function(t){t&&fc(n),t&&fc(e),t&&fc(r),t&&fc(o),t&&fc(i)}}}function Lm(t){var n,e,r,o,i=[Mm,Dm],u=[];function a(t,n){return t[0]?0:1}return e=a(t),r=u[e]=i[e](t),{c:function(){n=sc("div"),r.c()},m:function(t,r){cc(t,n,r),u[e].m(n,null),o=!0},p:function(t,o){var c=Wi(o,1)[0],f=e;(e=a(t))===f?u[e].p(t,c):(ef(),uf(u[f],1,1,(function(){u[f]=null})),rf(),(r=u[e])?r.p(t,c):(r=u[e]=i[e](t)).c(),of(r,1),r.m(n,null))},i:function(t){o||(of(r),o=!0)},o:function(t){uf(r),o=!1},d:function(t){t&&fc(n),u[e].d()}}}function Fm(t,n,e){var r,o,i;Va(t,os,(function(t){return e(3,r=t)})),Va(t,Ss,(function(t){return e(1,o=t)})),Va(t,Ih,(function(t){return e(2,i=t)}));var u=!0;return t.$$.update=function(){8&t.$$.dirty&&"schedule"===r&&(e(0,u=!0),(Es.reset(),rd().done((function(t){var n;As.set(t.data);var e=[];uu(n=t.data).call(n,(function(t){if(t.another_time){var n=Zf((t.index-1)/10)+1;na(e).call(e,n)<0&&e.push(n)}})),Ss.set(e)}))).always((function(){return e(0,u=!1)})))},[u,o,i,r]}var zm=function(t){nn(e,t);var n=Im(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Fm,Lm,Wa,{}),r}return e}(hf);function qm(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Ym(t){for(var n,e,r,o,i,u,a,c,f=t[3]?"…":"",l=t[9].default,s=Qa(l,t,t[8],null),d=[{type:t[0]},{class:i="btn ladda-button "+t[1]},{"data-spinner-size":"40"},{"data-style":"zoom-in"},t[5]],p={},v=0;v<d.length;v+=1)p=qa(p,d[v]);return{c:function(){n=sc("button"),e=sc("span"),s&&s.c(),r=dc(t[2]),o=dc(f),yc(e,"class","ladda-label"),gc(n,p)},m:function(i,f){cc(i,n,f),ac(n,e),s&&s.m(e,null),ac(e,r),ac(e,o),t[11](n),u=!0,a||(c=hc(n,"click",t[10]),a=!0)},p:function(t,e){var a=Wi(e,1)[0];s&&s.p&&256&a&&Xa(s,l,t,t[8],a,null,null),(!u||4&a)&&wc(r,t[2]),(!u||8&a)&&f!==(f=t[3]?"…":"")&&wc(o,f),gc(n,p=function(t,n){for(var e={},r={},o={$$scope:1},i=t.length;i--;){var u=t[i],a=n[i];if(a){for(var c in u)c in a||(r[c]=1);for(var f in a)o[f]||(e[f]=a[f],o[f]=1);t[i]=a}else for(var l in u)o[l]=1}for(var s in r)s in e||(e[s]=void 0);return e}(d,[(!u||1&a)&&{type:t[0]},(!u||2&a&&i!==(i="btn ladda-button "+t[1]))&&{class:i},{"data-spinner-size":"40"},{"data-style":"zoom-in"},32&a&&t[5]]))},i:function(t){u||(of(s,t),u=!0)},o:function(t){uf(s,t),u=!1},d:function(e){e&&fc(n),s&&s.d(e),t[11](null),a=!1,c()}}}function Hm(t,n,e){var r,o,i,u=["type","class","caption","loading","ellipsis"],a=Za(n,u),c=n,l=c.$$slots,s=void 0===l?{}:l,d=c.$$scope,p=n.type,v=void 0===p?"button":p,h=n.class,m=void 0===h?"btn-default":h,y=n.caption,g=void 0===y?"":y,_=n.loading,$=void 0!==_&&_,b=n.ellipsis,w=void 0!==b&&b;return Cc((function(){return e(7,o=f.default.create(r))})),i=function(){return o&&o.remove()},Mc().$$.on_destroy.push(i),t.$$set=function(t){n=qa(qa({},n),function(t){var n={};for(var e in t)"$"!==e[0]&&(n[e]=t[e]);return n}(t)),e(5,a=Za(n,u)),"type"in t&&e(0,v=t.type),"class"in t&&e(1,m=t.class),"caption"in t&&e(2,g=t.caption),"loading"in t&&e(6,$=t.loading),"ellipsis"in t&&e(3,w=t.ellipsis),"$$scope"in t&&e(8,d=t.$$scope)},t.$$.update=function(){192&t.$$.dirty&&o&&($?o.start():o.stop())},[v,m,g,w,r,a,$,o,d,s,function(n){!function(t,n){var e,r=t.$$.callbacks[n.type];r&&uu(e=vu(r).call(r)).call(e,(function(t){return t(n)}))}(t,n)},function(t){Lc[t?"unshift":"push"]((function(){e(4,r=t)}))}]}var Um=function(t){nn(e,t);var n=qm(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Hm,Ym,Wa,{type:0,class:1,caption:2,loading:6,ellipsis:3}),r}return e}(hf);function Gm(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Wm(t){var n,e;return(n=new Um({props:{class:"btn-success",disabled:!t[3]||!t[4].length||t[5]||"weekly"===t[6].type&&!t[6].weekly.on.length,caption:Rl.l10n.recurring.next}})).$on("click",t[9]),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},p:function(t,e){var r={};120&e&&(r.disabled=!t[3]||!t[4].length||t[5]||"weekly"===t[6].type&&!t[6].weekly.on.length),n.$set(r)},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Jm(t){var n,e;return(n=new Um({props:{class:"btn-default",caption:Rl.l10n.recurring.back}})).$on("click",t[8]),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},p:Fa,i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Vm(t){var n,e,r,o,i=[Jm,Wm],u=[];function a(t,n){return"schedule"===t[0]?0:"main"===t[0]&&t[1]&&!t[2]?1:-1}return~(n=a(t))&&(e=u[n]=i[n](t)),{c:function(){e&&e.c(),r=vc()},m:function(t,e){~n&&u[n].m(t,e),cc(t,r,e),o=!0},p:function(t,o){var c=Wi(o,1)[0],f=n;(n=a(t))===f?~n&&u[n].p(t,c):(e&&(ef(),uf(u[f],1,1,(function(){u[f]=null})),rf()),~n?((e=u[n])?e.p(t,c):(e=u[n]=i[n](t)).c(),of(e,1),e.m(r.parentNode,r)):e=null)},i:function(t){o||(of(e),o=!0)},o:function(t){uf(e),o=!1},d:function(t){~n&&u[n].d(t),t&&fc(r)}}}function Qm(t,n,e){var r,o,i,u,a,c,f,l;Va(t,os,(function(t){return e(0,r=t)})),Va(t,Ql,(function(t){return e(1,o=t)})),Va(t,Yl,(function(t){return e(2,i=t)})),Va(t,Nl,(function(t){return e(3,u=t)})),Va(t,ts,(function(t){return e(4,a=t)})),Va(t,Kl,(function(t){return e(5,c=t)})),Va(t,Zl,(function(t){return e(6,f=t)})),Va(t,Rh,(function(t){return e(7,l=t)}));return[r,o,i,u,a,c,f,l,function(){return tc(os,r="main",r)},function(){tc(os,r="schedule",r),tc(Rh,l=0,l)}]}var Km=function(t){nn(e,t);var n=Gm(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Qm,Vm,Wa,{}),r}return e}(hf);function Xm(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Zm(t){var n,e,r,o,i,u,a,c,f,l,s,d,p,v,h,m,y,g,_;return{c:function(){n=sc("div"),(e=sc("label")).textContent="".concat(Rl.l10n.recurring.reschedule_info),r=pc(),o=sc("div"),i=sc("input"),u=pc(),(a=sc("label")).textContent="".concat(Rl.l10n.recurring.only_this_appointment),c=pc(),f=sc("div"),l=sc("input"),s=pc(),(d=sc("label")).textContent="".concat(Rl.l10n.recurring.this_and_next_appointments),p=pc(),v=sc("div"),h=sc("input"),m=pc(),(y=sc("label")).textContent="".concat(Rl.l10n.recurring.all_appointments),yc(i,"id","bookly-reschedule-type-current"),yc(i,"class","custom-control-input"),yc(i,"type","radio"),i.__value="current",i.value=i.__value,t[2][0].push(i),yc(a,"for","bookly-reschedule-type-current"),yc(a,"class","custom-control-label"),yc(o,"class","custom-control custom-radio"),yc(l,"id","bookly-reschedule-type-next"),yc(l,"class","custom-control-input"),yc(l,"type","radio"),l.__value="next",l.value=l.__value,t[2][0].push(l),yc(d,"for","bookly-reschedule-type-next"),yc(d,"class","custom-control-label"),yc(f,"class","custom-control custom-radio"),yc(h,"id","bookly-reschedule-type-all"),yc(h,"class","custom-control-input"),yc(h,"type","radio"),h.__value="all",h.value=h.__value,t[2][0].push(h),yc(y,"for","bookly-reschedule-type-all"),yc(y,"class","custom-control-label"),yc(v,"class","custom-control custom-radio"),yc(n,"class","form-group")},m:function($,b){cc($,n,b),ac(n,e),ac(n,r),ac(n,o),ac(o,i),i.checked=i.__value===t[0],ac(o,u),ac(o,a),ac(n,c),ac(n,f),ac(f,l),l.checked=l.__value===t[0],ac(f,s),ac(f,d),ac(n,p),ac(n,v),ac(v,h),h.checked=h.__value===t[0],ac(v,m),ac(v,y),g||(_=[hc(i,"change",t[1]),hc(l,"change",t[3]),hc(h,"change",t[4])],g=!0)},p:function(t,n){var e=Wi(n,1)[0];1&e&&(i.checked=i.__value===t[0]),1&e&&(l.checked=l.__value===t[0]),1&e&&(h.checked=h.__value===t[0])},i:Fa,o:Fa,d:function(e){var r,o,u,a,c,f;e&&fc(n),pa(r=t[2][0]).call(r,na(o=t[2][0]).call(o,i),1),pa(u=t[2][0]).call(u,na(a=t[2][0]).call(a,l),1),pa(c=t[2][0]).call(c,na(f=t[2][0]).call(f,h),1),g=!1,Ua(_)}}}function ty(t,n,e){var r;Va(t,js,(function(t){return e(0,r=t)}));return[r,function(){r=this.__value,js.set(r)},[[]],function(){r=this.__value,js.set(r)},function(){r=this.__value,js.set(r)}]}var ny=function(t){nn(e,t);var n=Xm(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,ty,Zm,Wa,{}),r}return e}(hf);function ey(t,n){var e=n.get(t);if(!e)throw new TypeError("attempted to get private field on non-instance");return e.get?e.get.call(t):e.value}var ry=wu.getWeakData,oy=ce.set,iy=ce.getterFor,uy=se.find,ay=se.findIndex,cy=0,fy=function(t){return t.frozen||(t.frozen=new ly)},ly=function(){this.entries=[]},sy=function(t,n){return uy(t.entries,(function(t){return t[0]===n}))};ly.prototype={get:function(t){var n=sy(this,t);if(n)return n[1]},has:function(t){return!!sy(this,t)},set:function(t,n){var e=sy(this,t);e?e[1]=n:this.entries.push([t,n])},delete:function(t){var n=ay(this.entries,(function(n){return n[0]===t}));return~n&&this.entries.splice(n,1),!!~n}};var dy={getConstructor:function(t,n,e,r){var o=t((function(t,i){Ur(t,o,n),oy(t,{type:n,id:cy++,frozen:void 0}),null!=i&&Lr(i,t[r],{that:t,AS_ENTRIES:e})})),i=iy(n),u=function(t,n,e){var r=i(t),o=ry(W(n),!0);return!0===o?fy(r).set(n,e):o[r.id]=e,t};return qr(o.prototype,{delete:function(t){var n=i(this);if(!E(t))return!1;var e=ry(t);return!0===e?fy(n).delete(t):e&&T(e,n.id)&&delete e[n.id]},has:function(t){var n=i(this);if(!E(t))return!1;var e=ry(t);return!0===e?fy(n).has(t):e&&T(e,n.id)}}),qr(o.prototype,e?{get:function(t){var n=i(this);if(E(t)){var e=ry(t);return!0===e?fy(n).get(t):e?e[n.id]:void 0}},set:function(t,n){return u(this,t,n)}}:{add:function(t){return u(this,t,!0)}}),o}};s((function(t){var n,e=ce.enforce,r=!v.ActiveXObject&&"ActiveXObject"in v,o=Object.isExtensible,i=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},u=t.exports=Eu("WeakMap",i,dy);if(ne&&r){n=dy.getConstructor(i,"WeakMap",!0),wu.REQUIRED=!0;var a=u.prototype,c=a.delete,f=a.has,l=a.get,s=a.set;qr(a,{delete:function(t){if(E(t)&&!o(t)){var r=e(this);return r.frozen||(r.frozen=new n),c.call(this,t)||r.frozen.delete(t)}return c.call(this,t)},has:function(t){if(E(t)&&!o(t)){var r=e(this);return r.frozen||(r.frozen=new n),f.call(this,t)||r.frozen.has(t)}return f.call(this,t)},get:function(t){if(E(t)&&!o(t)){var r=e(this);return r.frozen||(r.frozen=new n),f.call(this,t)?l.call(this,t):r.frozen.get(t)}return l.call(this,t)},set:function(t,r){if(E(t)&&!o(t)){var i=e(this);i.frozen||(i.frozen=new n),f.call(this,t)?s.call(this,t,r):i.frozen.set(t,r)}else s.call(this,t,r);return this}})}}));var py=new(0,H.WeakMap),vy=function(){function t(n){qt(this,t),py.set(this,{writable:!0,value:void 0}),function(t,n,e){var r=n.get(t);if(!r)throw new TypeError("attempted to set private field on non-instance");if(r.set)r.set.call(t,e);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=e}}(this,py,n)}return Gt(t,[{key:"price",value:function(t){var n=ey(this,py).format_price.format;return t=md(t),n=(n=n.replace("{sign}",t<0?"-":"")).replace("{price}",this._formatNumber(Math.abs(t),ey(this,py).format_price.decimals,ey(this,py).format_price.decimal_separator,ey(this,py).format_price.thousands_separator))}},{key:"date",value:function(t){switch(Sr(t)){case"string":return a.default(t).format(ey(this,py).moment_format_date)}}},{key:"time",value:function(t){switch(Sr(t)){case"string":return a.default(t).format(ey(this,py).moment_format_time);case"object":return t.format(ey(this,py).moment_format_time)}}},{key:"_formatNumber",value:function(t,n,e,r){var o;t=Math.abs(Number(t)||0).toFixed(n),n=isNaN(n=Math.abs(n))?2:n,e=void 0===e?".":e,r=void 0===r?",":r;var i=t<0?"-":"",u=String(Zf(t)),a=u.length>3?u.length%3:0;return i+(a?u.substr(0,a)+r:"")+u.substr(a).replace(/(\d{3})(?=\d)/g,"$1"+r)+(n?e+vu(o=Math.abs(t-u).toFixed(n)).call(o,2):"")}}]),t}();function hy(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function my(t){var n,e,r,o,i=Rl.l10n.recurring.number_of_days_to_shift_appointments+"";return{c:function(){n=sc("div"),e=dc(i),r=dc(": "),o=dc(t[0])},m:function(t,i){cc(t,n,i),ac(n,e),ac(n,r),ac(n,o)},p:function(t,n){1&n&&wc(o,t[0])},d:function(t){t&&fc(n)}}}function yy(t){var n,e,r=0!==t[0]&&my(t);return{c:function(){var o;r&&r.c(),n=pc(),(e=sc("div")).textContent=Zu(o="".concat(Rl.l10n.recurring.appointments_will_be_scheduled_at,": ")).call(o,t[2].time(Is()))},m:function(t,o){r&&r.m(t,o),cc(t,n,o),cc(t,e,o)},p:function(t,e){0!==t[0]?r?r.p(t,e):((r=my(t)).c(),r.m(n.parentNode,n)):r&&(r.d(1),r=null)},d:function(t){r&&r.d(t),t&&fc(n),t&&fc(e)}}}function gy(t){var n,e,r,o;return n=new ny({}),r=new Bm({props:{type:"success",show:"current"!==t[1],$$slots:{default:[yy]},$$scope:{ctx:t}}}),{c:function(){lf(n.$$.fragment),e=pc(),lf(r.$$.fragment)},m:function(t,i){sf(n,t,i),cc(t,e,i),sf(r,t,i),o=!0},p:function(t,n){var e=Wi(n,1)[0],o={};2&e&&(o.show="current"!==t[1]),33&e&&(o.$$scope={dirty:e,ctx:t}),r.$set(o)},i:function(t){o||(of(n.$$.fragment,t),of(r.$$.fragment,t),o=!0)},o:function(t){uf(n.$$.fragment,t),uf(r.$$.fragment,t),o=!1},d:function(t){df(n,t),t&&fc(e),df(r,t)}}}function _y(t,n,e){var r,o,i;Va(t,Hl,(function(t){return e(3,r=t)})),Va(t,vs,(function(t){return e(4,o=t)})),Va(t,js,(function(t){return e(1,i=t)}));var u=new vy(Rl),a=0;return t.$$.update=function(){24&t.$$.dirty&&e(0,a=r?Is().startOf("day").diff(o.startDate.startOf("day"),"days"):0)},[a,i,u,r,o]}var $y=function(t){nn(e,t);var n=hy(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,_y,gy,Wa,{}),r}return e}(hf);function by(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function wy(t){var n,e,r,o,i,u,a,c,f,l,s,d,p,v,h,m;return{c:function(){n=sc("div"),(e=sc("label")).textContent="".concat(Rl.l10n.send_notifications),r=pc(),o=sc("div"),i=sc("input"),u=pc(),(a=sc("label")).textContent="".concat(Rl.l10n.send_if_new_or_status_changed),c=pc(),f=sc("div"),l=sc("input"),s=pc(),(d=sc("label")).textContent="".concat(Rl.l10n.send_as_for_new),p=pc(),(v=sc("small")).textContent="".concat(Rl.l10n.chose_queue_type_info),yc(i,"id","bookly-queue-type-changed-status"),yc(i,"class","custom-control-input"),yc(i,"type","radio"),i.__value="changed_status",i.value=i.__value,t[2][0].push(i),yc(a,"for","bookly-queue-type-changed-status"),yc(a,"class","custom-control-label"),yc(o,"class","custom-control custom-radio"),yc(l,"id","bookly-queue-type-all"),yc(l,"class","custom-control-input"),yc(l,"type","radio"),l.__value="all",l.value=l.__value,t[2][0].push(l),yc(d,"for","bookly-queue-type-all"),yc(d,"class","custom-control-label"),yc(f,"class","custom-control custom-radio"),yc(v,"class","help-block"),yc(n,"class","form-group")},m:function(y,g){cc(y,n,g),ac(n,e),ac(n,r),ac(n,o),ac(o,i),i.checked=i.__value===t[0],ac(o,u),ac(o,a),ac(n,c),ac(n,f),ac(f,l),l.checked=l.__value===t[0],ac(f,s),ac(f,d),ac(n,p),ac(n,v),h||(m=[hc(i,"change",t[1]),hc(l,"change",t[3])],h=!0)},p:function(t,n){var e=Wi(n,1)[0];1&e&&(i.checked=i.__value===t[0]),1&e&&(l.checked=l.__value===t[0])},i:Fa,o:Fa,d:function(e){var r,o,u,a;e&&fc(n),pa(r=t[2][0]).call(r,na(o=t[2][0]).call(o,i),1),pa(u=t[2][0]).call(u,na(a=t[2][0]).call(a,l),1),h=!1,Ua(m)}}}function xy(t,n,e){var r;Va(t,Ps,(function(t){return e(0,r=t)}));return[r,function(){r=this.__value,Ps.set(r)},[[]],function(){r=this.__value,Ps.set(r)}]}var ky=function(t){nn(e,t);var n=by(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,xy,wy,Wa,{}),r}return e}(hf);function Oy(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Sy(t,n,e){var r=vu(t).call(t);return r[6]=n[e],r[8]=e,r}function Ey(t){var n,e,r,o,i,u,a,c,f,l,s,d,p,v,h,m,y,g,_=t[6].data.name+"",$=t[6].address+"",b=t[6].name+"";return{c:function(){n=sc("div"),e=sc("input"),r=pc(),o=sc("label"),i=sc("i"),a=pc(),c=sc("b"),f=dc(_),l=dc(" ("),s=dc($),d=dc(")"),p=sc("br"),v=pc(),h=dc(b),m=pc(),yc(e,"class","custom-control-input"),yc(e,"id","bookly-notification-"+t[8]),yc(e,"type","checkbox"),e.__value=t[8],e.value=e.__value,t[5][0].push(e),yc(i,"class",u="fa-fw "+("sms"===t[6].gateway?"fas fa-sms":"far fa-envelope")),yc(o,"class","custom-control-label"),yc(o,"for","bookly-notification-"+t[8]),yc(n,"class","custom-control custom-checkbox")},m:function(u,_){var $;cc(u,n,_),ac(n,e),e.checked=~na($=t[1]).call($,e.__value),ac(n,r),ac(n,o),ac(o,i),ac(o,a),ac(o,c),ac(c,f),ac(o,l),ac(o,s),ac(o,d),ac(o,p),ac(o,v),ac(o,h),ac(n,m),y||(g=hc(e,"change",t[4]),y=!0)},p:function(t,n){var r;2&n&&(e.checked=~na(r=t[1]).call(r,e.__value));1&n&&u!==(u="fa-fw "+("sms"===t[6].gateway?"fas fa-sms":"far fa-envelope"))&&yc(i,"class",u),1&n&&_!==(_=t[6].data.name+"")&&wc(f,_),1&n&&$!==($=t[6].address+"")&&wc(s,$),1&n&&b!==(b=t[6].name+"")&&wc(h,b)},d:function(r){var o,i;r&&fc(n),pa(o=t[5][0]).call(o,na(i=t[5][0]).call(i,e),1),y=!1,g()}}}function Ay(t){for(var n,e=t[0],r=[],o=0;o<e.length;o+=1)r[o]=Ey(Sy(t,e,o));return{c:function(){n=sc("div");for(var t=0;t<r.length;t+=1)r[t].c();yc(n,"class","form-group")},m:function(t,e){cc(t,n,e);for(var o=0;o<r.length;o+=1)r[o].m(n,null)},p:function(t,o){var i=Wi(o,1)[0];if(3&i){var u;for(e=t[0],u=0;u<e.length;u+=1){var a=Sy(t,e,u);r[u]?r[u].p(a,i):(r[u]=Ey(a),r[u].c(),r[u].m(n,null))}for(;u<r.length;u+=1)r[u].d(1);r.length=e.length}},i:Fa,o:Fa,d:function(t){t&&fc(n),lc(r,t)}}}function jy(t,n,e){var r,o,i;Va(t,Ps,(function(t){return e(2,r=t)})),Va(t,Ts,(function(t){return e(3,o=t)})),Va(t,Rs,(function(t){return e(1,i=t)}));var u=n.notifications,a=void 0===u?[]:u,c=[[]];return t.$$set=function(t){"notifications"in t&&e(0,a=t.notifications)},t.$$.update=function(){var n;(8&t.$$.dirty&&tc(Ps,r=o&&o.changed_status.length?"changed_status":"all",r),13&t.$$.dirty)&&(o?(e(0,a=o[r]),tc(Rs,i=_a(n=Vu(a)).call(n,(function(t){return Zf(t)})),i)):(e(0,a=[]),tc(Rs,i=[],i)))},[a,i,r,o,function(){i=_c(c[0],this.__value,this.checked),Rs.set(i)},c]}var Ty=function(t){nn(e,t);var n=Oy(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,jy,Ay,Wa,{notifications:0}),r}return e}(hf);function Py(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Ry(t){var n,e;return n=new ky({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function By(t){var n,e,r,o=t[0].changed_status.length&&t[0].all.length&&Ry();return e=new Ty({}),{c:function(){o&&o.c(),n=pc(),lf(e.$$.fragment)},m:function(t,i){o&&o.m(t,i),cc(t,n,i),sf(e,t,i),r=!0},p:function(t,e){var r=Wi(e,1)[0];t[0].changed_status.length&&t[0].all.length?o?1&r&&of(o,1):((o=Ry()).c(),of(o,1),o.m(n.parentNode,n)):o&&(ef(),uf(o,1,1,(function(){o=null})),rf())},i:function(t){r||(of(o),of(e.$$.fragment,t),r=!0)},o:function(t){uf(o),uf(e.$$.fragment,t),r=!1},d:function(t){o&&o.d(t),t&&fc(n),df(e,t)}}}function Iy(t,n,e){var r;return Va(t,Ts,(function(t){return e(0,r=t)})),[r]}var Dy=function(t){nn(e,t);var n=Py(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Iy,By,Wa,{}),r}return e}(hf);function My(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function Cy(t){var n,e;return(n=new Um({props:{loading:t[0],class:"btn-success",caption:Rl.l10n.send}})).$on("click",t[2]),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},p:function(t,e){var r={};1&e&&(r.loading=t[0]),n.$set(r)},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Ny(t){var n,e,r="queue"===t[1]&&Cy(t);return{c:function(){r&&r.c(),n=vc()},m:function(t,o){r&&r.m(t,o),cc(t,n,o),e=!0},p:function(t,e){var o=Wi(e,1)[0];"queue"===t[1]?r?(r.p(t,o),2&o&&of(r,1)):((r=Cy(t)).c(),of(r,1),r.m(n.parentNode,n)):r&&(ef(),uf(r,1,1,(function(){r=null})),rf())},i:function(t){e||(of(r),e=!0)},o:function(t){uf(r),e=!1},d:function(t){r&&r.d(t),t&&fc(n)}}}function Ly(t,n,e){var r;Va(t,os,(function(t){return e(1,r=t)}));var o,i=(o="cxt",Mc().$$.context.get(o)),a=!1;return[a,r,function(){var t=od();t.selected.length>0?(e(0,a=!0),u.default.post(ajaxurl,{action:"bookly_send_queue",csrf_token:jl,queue:t.selected,attachments:t.attachments},(function(t){t.success&&(i.modal.hide(),tc(os,r="main",r))}),"json").always((function(){return e(0,a=!1)}))):(i.modal.hide(),tc(os,r="main",r))}]}var Fy=function(t){nn(e,t);var n=My(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Ly,Ny,Wa,{}),r}return e}(hf);function zy(t){var n=function(){if("undefined"==typeof Reflect||!zt)return!1;if(zt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(zt(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=Pr(t);if(n){var o=Pr(this).constructor;e=zt(r,arguments,o)}else e=r.apply(this,arguments);return Er(this,e)}}function qy(t){var n,e;return n=new Dy({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Yy(t){var n,e;return n=new $y({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Hy(t){var n,e;return n=new zm({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Uy(t){var n,e;return n=new Ph({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Gy(t){var n;return{c:function(){yc(n=sc("div"),"class","bookly-loading")},m:function(t,e){cc(t,n,e)},i:Fa,o:Fa,d:function(t){t&&fc(n)}}}function Wy(t){var n,e,r,o,i,u,a=[Gy,Uy,Hy,Yy,qy],c=[];function f(t,r){return t[2]?0:"main"===t[5]?1:(32&r&&(n=!(!Al("recurring-appointments")||"schedule"!==t[5])),n?2:(32&r&&(e=!(!Al("recurring-appointments")||"reschedule"!==t[5])),e?3:"queue"===t[5]?4:-1))}return~(r=f(t,-1))&&(o=c[r]=a[r](t)),{c:function(){o&&o.c(),i=vc()},m:function(t,n){~r&&c[r].m(t,n),cc(t,i,n),u=!0},p:function(t,n){var e=r;(r=f(t,n))!==e&&(o&&(ef(),uf(c[e],1,1,(function(){c[e]=null})),rf()),~r?((o=c[r])||(o=c[r]=a[r](t)).c(),of(o,1),o.m(i.parentNode,i)):o=null)},i:function(t){u||(of(o),u=!0)},o:function(t){uf(o),u=!1},d:function(t){~r&&c[r].d(t),t&&fc(i)}}}function Jy(t){var n,e;return n=new Fy({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Vy(t){var n,e;return(n=new Um({props:{class:"btn-success",loading:t[3],disabled:!t[7]&&Ql&&Fs()||!t[4]&&!t[7]||t[8],className:"btn-success",caption:Rl.l10n.save}})).$on("click",t[9]),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},p:function(t,e){var r={};8&e&&(r.loading=t[3]),400&e&&(r.disabled=!t[7]&&Ql&&Fs()||!t[4]&&!t[7]||t[8]),n.$set(r)},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}function Qy(t){var n,e,r,o,i,u,a=Al("recurring-appointments")&&function(t){var n,e;return n=new Km({}),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(t){df(n,t)}}}(),c="queue"===t[5]&&Jy(),f=!("queue"===t[5]||t[6]&&!t[7]&&"main"===t[5])&&Vy(t);return(i=new Um({props:{caption:Rl.l10n.cancel}})).$on("click",(function(){Ga(t[0].modal.hide())&&t[0].modal.hide().apply(this,arguments)})),{c:function(){n=sc("div"),a&&a.c(),e=pc(),c&&c.c(),r=pc(),f&&f.c(),o=pc(),lf(i.$$.fragment),yc(n,"slot","footer")},m:function(t,l){cc(t,n,l),a&&a.m(n,null),ac(n,e),c&&c.m(n,null),ac(n,r),f&&f.m(n,null),ac(n,o),sf(i,n,null),u=!0},p:function(e,i){"queue"===(t=e)[5]?c?32&i&&of(c,1):((c=Jy()).c(),of(c,1),c.m(n,r)):c&&(ef(),uf(c,1,1,(function(){c=null})),rf()),"queue"===t[5]||t[6]&&!t[7]&&"main"===t[5]?f&&(ef(),uf(f,1,1,(function(){f=null})),rf()):f?(f.p(t,i),224&i&&of(f,1)):((f=Vy(t)).c(),of(f,1),f.m(n,o))},i:function(t){u||(of(a),of(c),of(f),of(i.$$.fragment,t),u=!0)},o:function(t){uf(a),uf(c),uf(f),uf(i.$$.fragment,t),u=!1},d:function(t){t&&fc(n),a&&a.d(),c&&c.d(),f&&f.d(),df(i)}}}function Ky(t){var n,e,r={title:t[1],$$slots:{footer:[Qy],default:[Wy]},$$scope:{ctx:t}};return n=new dd({props:r}),t[13](n),n.$on("hidden",t[10]),{c:function(){lf(n.$$.fragment)},m:function(t,r){sf(n,t,r),e=!0},p:function(t,e){var r=Wi(e,1)[0],o={};2&r&&(o.title=t[1]),2097661&r&&(o.$$scope={dirty:r,ctx:t}),n.$set(o)},i:function(t){e||(of(n.$$.fragment,t),e=!0)},o:function(t){uf(n.$$.fragment,t),e=!1},d:function(e){t[13](null),df(n,e)}}}function Xy(t,n,e){var r,o,i,a,c,f,l,s,d,p,v,h;Va(t,hs,(function(t){return e(14,r=t)})),Va(t,Cl,(function(t){return e(15,o=t)})),Va(t,Rf,(function(t){return e(16,i=t)})),Va(t,Hl,(function(t){return e(4,a=t)})),Va(t,Ul,(function(t){return e(17,c=t)})),Va(t,Gl,(function(t){return e(18,f=t)})),Va(t,bs,(function(t){return e(19,l=t)})),Va(t,os,(function(t){return e(5,s=t)})),Va(t,js,(function(t){return e(20,d=t)})),Va(t,Ql,(function(t){return e(6,p=t)})),Va(t,Yl,(function(t){return e(7,v=t)})),Va(t,Vl,(function(t){return e(8,h=t)}));var m,y,g={modal:null},_="",$=!0,b=!1;return m="cxt",y=g,Mc().$$.context.set(m,y),[g,_,$,b,a,s,p,v,h,function(){!function(){var t=os.get();Rf.get();var n=vs.get(),e=Ds();if("reschedule"!==t&&n.startDate&&e!==n.startDate.format("YYYY-MM-DD HH:mm:00")){var r,o=id(ts.get());try{for(o.s();!(r=o.n()).done;)if(r.value.series_id)return!0}catch(t){o.e(t)}finally{o.f()}}return!1}()?(e(3,b=!0),function(){var t,n,e={action:"bookly_save_appointment_form",csrf_token:jl,id:vs.get().id,staff_id:Cl.get()?Cl.get().id:null,location_id:ql.get()?ql.get().id:null,skip_date:Yl.get()?1:0,repeat:Ma(Ql.get()?{enabled:1,repeat:Zl.get()}:{enabled:0}),schedule:(n=[],uu(t=As.get()).call(t,(function(t){t.deleted||n.push(t.slots)})),n),customers:ss(),notification:es.get()?1:0,internal_note:ns.get(),reschedule_type:js.get(),created_from:"undefined"!=typeof BooklySCCalendarL10n?"staff-cabinet":"backend"};return Yl.get()||(e.start_date=Ds(),e.end_date=Ms()),null===Nl.get()||(Nl.get().id?e.service_id=Nl.get().id:(e.service_id="",e.custom_service_name=Ll.get(),e.custom_service_price=Fl.get())),u.default.post(ajaxurl,e,(function(t){t.success?Ts.set(t.queue):rs.update((function(n){var e;return uu(e=Vu(t.errors)).call(e,(function(e){return n[e]=t.errors[e]})),n})),t.alert_errors&&booklyAlert({error:t.alert_errors})}),"json")}().then((function(t){t.success&&(t.queue.all.length||t.queue.changed_status.length?tc(os,s="queue",s):g.modal.hide(),r("current"!==d?"refresh":t.data))})).always((function(){return e(3,b=!1)}))):tc(os,s="reschedule",s)},function(){!function(){if("queue"===os.get()){var t=od().attachments;if(t.length>0)jQuery.post(ajaxurl,{action:"bookly_clear_attachments",csrf_token:jl,attachments:t},"json")}}(),Xs()},function(t,n){e(2,$=!0),Xs(),tc(hs,r=n,r),e(1,_=Rl.l10n.edit_appointment),Ks().then((function(){return function(t){return u.default.get(ajaxurl,{action:"bookly_get_data_for_appointment",id:t,csrf_token:jl}).done((function(n){if(n.success){var e,r=n.data,o=Rf.get(),i=r.start_date&&moment(r.start_date),a=r.start_date&&moment(r.end_date),c=Ol(r.staff_id,o.staff);Cl.set(c),ps.set(r.staff_any?c:null),Nl.set(Ol(0===r.service_id?null:r.service_id,c.services)),ql.set(0!==r.location_id?Ol(r.location_id,c.locations):null),Yl.set(!r.start_date),vs.set({id:t,startDate:i&&i.clone(),startTime:r.start_time,endTime:r.end_time}),Ll.set(r.custom_service_name),Fl.set(r.custom_service_price),ns.set(r.internal_note),null!==i?(Hl.set(i.clone()),Ul.set(i.format("HH:mm")),i.format("YYYY-MM-DD")===a.format("YYYY-MM-DD")?Wl.set(a.format("HH:mm")):Wl.set(24*a.clone().startOf("day").diff(i.clone().startOf("day"),"days")+a.hour()+a.format(":mm"))):(Hl.set(moment()),Ul.set(moment().format("HH:mm")),Bs()),o.customers_loaded||(o.customers=r.customers_data||[],Rf.set(o)),ts.set(_a(e=r.customers).call(e,(function(t){var n=Sl(Ol(t.id,o.customers));return cs(n),u.default.extend(n,t),n}))),zl.set({url:"zoom"===n.data.online_meeting_provider?"https://zoom.us/j/"+n.data.online_meeting_id:"google_meet"===n.data.online_meeting_provider?n.data.online_meeting_id:null,copied:!1})}}))}(t)})).always((function(){return e(2,$=!1)})),g.modal.show()},function(t,n,s){e(2,$=!0),Xs(),tc(hs,r=s,r),e(1,_=Rl.l10n.new_appointment),Ks().then((function(){return u.default.Deferred(function(){var e,r=(e=hu.mark((function e(r){return hu.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return tc(Cl,o=null===t?null:Ol(t,i.staff),o),tc(Hl,a=n,a),e.next=4,Uc();case 4:return tc(Ul,c=a.format("HH:mm"),c),tc(Gl,f=ks(c,l),f),e.next=8,Uc();case 8:Bs(),r.resolve();case 10:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new _i((function(r,o){var i=e.apply(t,n);function u(t){$i(i,r,o,u,a,"next",t)}function a(t){$i(i,r,o,u,a,"throw",t)}u(void 0)}))});return function(t){return r.apply(this,arguments)}}())})).always((function(){return e(2,$=!1)})),g.modal.show()},function(t){Lc[t?"unshift":"push"]((function(){g.modal=t,e(0,g)}))}]}var Zy,tg=function(t){nn(e,t);var n=zy(e);function e(t){var r;return qt(this,e),vf(Wt(r=n.call(this)),t,Xy,Ky,Wa,{edit:11,create:12}),r}return Gt(e,[{key:"edit",get:function(){return this.$$.ctx[11]}},{key:"create",get:function(){return this.$$.ctx[12]}}]),e}(hf);return t.showDialog=function(t,n,e,r){Zy||(Zy=new tg({target:document.getElementById("bookly-appointment-dialog"),props:{}})),t?Zy.edit(t,r):Zy.create(n,e,r)},Object.defineProperty(t,"__esModule",{value:!0}),t}({},jQuery,moment,BooklyL10nAppDialog,Ladda);
backend/components/dialogs/payment/Dialog.php CHANGED
@@ -73,6 +73,7 @@ class Dialog extends Lib\Base\Component
73
  'tax' => __( 'Tax', 'bookly' ),
74
  'total' => __( 'Total', 'bookly' ),
75
  'type' => __( 'Type', 'bookly' ),
 
76
  ),
77
  ) );
78
 
73
  'tax' => __( 'Tax', 'bookly' ),
74
  'total' => __( 'Total', 'bookly' ),
75
  'type' => __( 'Type', 'bookly' ),
76
+ 'wc_order_id' => __( 'order ID', 'bookly' ),
77
  ),
78
  ) );
79
 
backend/components/dialogs/payment/resources/js/payment-details-dialog.js CHANGED
@@ -1 +1 @@
1
- var BooklyPaymentDetailsDialog=function(t,n,r,e,o){"use strict";function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var u=i(n),c=i(r),a=i(e),f=i(o);function l(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(t){var n={exports:{}};return t(n,n.exports),n.exports}var d=function(t){return t&&t.Math==Math&&t},v=d("object"==typeof globalThis&&globalThis)||d("object"==typeof window&&window)||d("object"==typeof self&&self)||d("object"==typeof s&&s)||function(){return this}()||Function("return this")(),h=function(t){try{return!!t()}catch(t){return!0}},m=!h((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),y={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,b={f:g&&!y.call({1:2},1)?function(t){var n=g(this,t);return!!n&&n.enumerable}:y},w=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}},x={}.toString,$=function(t){return x.call(t).slice(8,-1)},_="".split,O=h((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==$(t)?_.call(t,""):Object(t)}:Object,S=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},E=function(t){return O(S(t))},j=function(t){return"object"==typeof t?null!==t:"function"==typeof t},A=function(t,n){if(!j(t))return t;var r,e;if(n&&"function"==typeof(r=t.toString)&&!j(e=r.call(t)))return e;if("function"==typeof(r=t.valueOf)&&!j(e=r.call(t)))return e;if(!n&&"function"==typeof(r=t.toString)&&!j(e=r.call(t)))return e;throw TypeError("Can't convert object to primitive value")},T={}.hasOwnProperty,k=function(t,n){return T.call(t,n)},R=v.document,P=j(R)&&j(R.createElement),I=function(t){return P?R.createElement(t):{}},M=!m&&!h((function(){return 7!=Object.defineProperty(I("div"),"a",{get:function(){return 7}}).a})),N=Object.getOwnPropertyDescriptor,C={f:m?N:function(t,n){if(t=E(t),n=A(n,!0),M)try{return N(t,n)}catch(t){}if(k(t,n))return w(!b.f.call(t,n),t[n])}},D=/#|\.prototype\./,B=function(t,n){var r=L[F(t)];return r==U||r!=z&&("function"==typeof n?h(n):!!n)},F=B.normalize=function(t){return String(t).replace(D,".").toLowerCase()},L=B.data={},z=B.NATIVE="N",U=B.POLYFILL="P",q=B,G={},W=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},J=function(t,n,r){if(W(t),void 0===n)return t;switch(r){case 0:return function(){return t.call(n)};case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,o){return t.call(n,r,e,o)}}return function(){return t.apply(n,arguments)}},V=function(t){if(!j(t))throw TypeError(String(t)+" is not an object");return t},H=Object.defineProperty,K={f:m?H:function(t,n,r){if(V(t),n=A(n,!0),V(r),M)try{return H(t,n,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[n]=r.value),t}},Q=m?function(t,n,r){return K.f(t,n,w(1,r))}:function(t,n,r){return t[n]=r,t},X=C.f,Y=function(t){var n=function(n,r,e){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,e)}return t.apply(this,arguments)};return n.prototype=t.prototype,n},Z=function(t,n){var r,e,o,i,u,c,a,f,l=t.target,s=t.global,p=t.stat,d=t.proto,h=s?v:p?v[l]:(v[l]||{}).prototype,m=s?G:G[l]||(G[l]={}),y=m.prototype;for(o in n)r=!q(s?o:l+(p?".":"#")+o,t.forced)&&h&&k(h,o),u=m[o],r&&(c=t.noTargetGet?(f=X(h,o))&&f.value:h[o]),i=r&&c?c:n[o],r&&typeof u==typeof i||(a=t.bind&&r?J(i,v):t.wrap&&r?Y(i):d&&"function"==typeof i?J(Function.call,i):i,(t.sham||i&&i.sham||u&&u.sham)&&Q(a,"sham",!0),m[o]=a,d&&(k(G,e=l+"Prototype")||Q(G,e,{}),G[e][o]=i,t.real&&y&&!y[o]&&Q(y,o,i)))};Z({target:"Object",stat:!0,forced:!m,sham:!m},{defineProperty:K.f});var tt=p((function(t){var n=G.Object,r=t.exports=function(t,r,e){return n.defineProperty(t,r,e)};n.defineProperty.sham&&(r.sham=!0)})),nt=tt;function rt(t,n){for(var r=0;r<n.length;r++){var e=n[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),nt(t,e.key,e)}}function et(t,n,r){return n&&rt(t.prototype,n),r&&rt(t,r),t}function ot(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var it,ut=Math.ceil,ct=Math.floor,at=function(t){return isNaN(t=+t)?0:(t>0?ct:ut)(t)},ft=Math.min,lt=function(t){return t>0?ft(at(t),9007199254740991):0},st=Math.max,pt=Math.min,dt=function(t,n){var r=at(t);return r<0?st(r+n,0):pt(r,n)},vt=function(t){return function(n,r,e){var o,i=E(n),u=lt(i.length),c=dt(e,u);if(t&&r!=r){for(;u>c;)if((o=i[c++])!=o)return!0}else for(;u>c;c++)if((t||c in i)&&i[c]===r)return t||c||0;return!t&&-1}},ht={includes:vt(!0),indexOf:vt(!1)},mt={},yt=ht.indexOf,gt=function(t,n){var r,e=E(t),o=0,i=[];for(r in e)!k(mt,r)&&k(e,r)&&i.push(r);for(;n.length>o;)k(e,r=n[o++])&&(~yt(i,r)||i.push(r));return i},bt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],wt=Object.keys||function(t){return gt(t,bt)},xt=m?Object.defineProperties:function(t,n){V(t);for(var r,e=wt(n),o=e.length,i=0;o>i;)K.f(t,r=e[i++],n[r]);return t},$t=function(t){return"function"==typeof t?t:void 0},_t=function(t,n){return arguments.length<2?$t(G[t])||$t(v[t]):G[t]&&G[t][n]||v[t]&&v[t][n]},Ot=_t("document","documentElement"),St=!0,Et="__core-js_shared__",jt=v[Et]||function(t,n){try{Q(v,t,n)}catch(r){v[t]=n}return n}(Et,{}),At=p((function(t){(t.exports=function(t,n){return jt[t]||(jt[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.8.3",mode:"pure",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),Tt=0,kt=Math.random(),Rt=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++Tt+kt).toString(36)},Pt=At("keys"),It=function(t){return Pt[t]||(Pt[t]=Rt(t))},Mt=It("IE_PROTO"),Nt=function(){},Ct=function(t){return"<script>"+t+"</"+"script>"},Dt=function(){try{it=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,n;Dt=it?function(t){t.write(Ct("")),t.close();var n=t.parentWindow.Object;return t=null,n}(it):((n=I("iframe")).style.display="none",Ot.appendChild(n),n.src=String("javascript:"),(t=n.contentWindow.document).open(),t.write(Ct("document.F=Object")),t.close(),t.F);for(var r=bt.length;r--;)delete Dt.prototype[bt[r]];return Dt()};mt[Mt]=!0;var Bt=Object.create||function(t,n){var r;return null!==t?(Nt.prototype=V(t),r=new Nt,Nt.prototype=null,r[Mt]=t):r=Dt(),void 0===n?r:xt(r,n)};Z({target:"Object",stat:!0,sham:!m},{create:Bt});var Ft=G.Object,Lt=function(t,n){return Ft.create(t,n)},zt=Lt,Ut=Object.setPrototypeOf||("__proto__"in{}?function(){var t,n=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),n=r instanceof Array}catch(t){}return function(r,e){return V(r),function(t){if(!j(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(e),n?t.call(r,e):r.__proto__=e,r}}():void 0);Z({target:"Object",stat:!0},{setPrototypeOf:Ut});var qt=G.Object.setPrototypeOf;function Gt(t,n){return(Gt=qt||function(t,n){return t.__proto__=n,t})(t,n)}function Wt(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=zt(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&Gt(t,n)}var Jt,Vt,Ht=Array.isArray||function(t){return"Array"==$(t)},Kt=function(t){return Object(S(t))},Qt=function(t,n,r){var e=A(n);e in t?K.f(t,e,w(0,r)):t[e]=r},Xt=!!Object.getOwnPropertySymbols&&!h((function(){return!String(Symbol())})),Yt=Xt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Zt=At("wks"),tn=v.Symbol,nn=Yt?tn:tn&&tn.withoutSetter||Rt,rn=function(t){return k(Zt,t)||(Xt&&k(tn,t)?Zt[t]=tn[t]:Zt[t]=nn("Symbol."+t)),Zt[t]},en=rn("species"),on=function(t,n){var r;return Ht(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!Ht(r.prototype)?j(r)&&null===(r=r[en])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===n?0:n)},un=_t("navigator","userAgent")||"",cn=v.process,an=cn&&cn.versions,fn=an&&an.v8;fn?Vt=(Jt=fn.split("."))[0]+Jt[1]:un&&(!(Jt=un.match(/Edge\/(\d+)/))||Jt[1]>=74)&&(Jt=un.match(/Chrome\/(\d+)/))&&(Vt=Jt[1]);var ln=Vt&&+Vt,sn=rn("species"),pn=function(t){return ln>=51||!h((function(){var n=[];return(n.constructor={})[sn]=function(){return{foo:1}},1!==n[t](Boolean).foo}))},dn=rn("isConcatSpreadable"),vn=9007199254740991,hn="Maximum allowed index exceeded",mn=ln>=51||!h((function(){var t=[];return t[dn]=!1,t.concat()[0]!==t})),yn=pn("concat"),gn=function(t){if(!j(t))return!1;var n=t[dn];return void 0!==n?!!n:Ht(t)};Z({target:"Array",proto:!0,forced:!mn||!yn},{concat:function(t){var n,r,e,o,i,u=Kt(this),c=on(u,0),a=0;for(n=-1,e=arguments.length;n<e;n++)if(gn(i=-1===n?u:arguments[n])){if(a+(o=lt(i.length))>vn)throw TypeError(hn);for(r=0;r<o;r++,a++)r in i&&Qt(c,a,i[r])}else{if(a>=vn)throw TypeError(hn);Qt(c,a++,i)}return c.length=a,c}});var bn=bt.concat("length","prototype"),wn={f:Object.getOwnPropertyNames||function(t){return gt(t,bn)}},xn=wn.f,$n={}.toString,_n="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],On={f:function(t){return _n&&"[object Window]"==$n.call(t)?function(t){try{return xn(t)}catch(t){return _n.slice()}}(t):xn(E(t))}},Sn={f:Object.getOwnPropertySymbols},En=function(t,n,r,e){e&&e.enumerable?t[n]=r:Q(t,n,r)},jn={f:rn},An=K.f,Tn=function(t){var n=G.Symbol||(G.Symbol={});k(n,t)||An(n,t,{value:jn.f(t)})},kn={};kn[rn("toStringTag")]="z";var Rn="[object z]"===String(kn),Pn=rn("toStringTag"),In="Arguments"==$(function(){return arguments}()),Mn=Rn?$:function(t){var n,r,e;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,n){try{return t[n]}catch(t){}}(n=Object(t),Pn))?r:In?$(n):"Object"==(e=$(n))&&"function"==typeof n.callee?"Arguments":e},Nn=Rn?{}.toString:function(){return"[object "+Mn(this)+"]"},Cn=K.f,Dn=rn("toStringTag"),Bn=function(t,n,r,e){if(t){var o=r?t:t.prototype;k(o,Dn)||Cn(o,Dn,{configurable:!0,value:n}),e&&!Rn&&Q(o,"toString",Nn)}},Fn=Function.toString;"function"!=typeof jt.inspectSource&&(jt.inspectSource=function(t){return Fn.call(t)});var Ln,zn,Un,qn=jt.inspectSource,Gn=v.WeakMap,Wn="function"==typeof Gn&&/native code/.test(qn(Gn)),Jn=v.WeakMap;if(Wn){var Vn=jt.state||(jt.state=new Jn),Hn=Vn.get,Kn=Vn.has,Qn=Vn.set;Ln=function(t,n){return n.facade=t,Qn.call(Vn,t,n),n},zn=function(t){return Hn.call(Vn,t)||{}},Un=function(t){return Kn.call(Vn,t)}}else{var Xn=It("state");mt[Xn]=!0,Ln=function(t,n){return n.facade=t,Q(t,Xn,n),n},zn=function(t){return k(t,Xn)?t[Xn]:{}},Un=function(t){return k(t,Xn)}}var Yn={set:Ln,get:zn,has:Un,enforce:function(t){return Un(t)?zn(t):Ln(t,{})},getterFor:function(t){return function(n){var r;if(!j(n)||(r=zn(n)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},Zn=[].push,tr=function(t){var n=1==t,r=2==t,e=3==t,o=4==t,i=6==t,u=7==t,c=5==t||i;return function(a,f,l,s){for(var p,d,v=Kt(a),h=O(v),m=J(f,l,3),y=lt(h.length),g=0,b=s||on,w=n?b(a,y):r||u?b(a,0):void 0;y>g;g++)if((c||g in h)&&(d=m(p=h[g],g,v),t))if(n)w[g]=d;else if(d)switch(t){case 3:return!0;case 5:return p;case 6:return g;case 2:Zn.call(w,p)}else switch(t){case 4:return!1;case 7:Zn.call(w,p)}return i?-1:e||o?o:w}},nr={forEach:tr(0),map:tr(1),filter:tr(2),some:tr(3),every:tr(4),find:tr(5),findIndex:tr(6),filterOut:tr(7)},rr=nr.forEach,er=It("hidden"),or="Symbol",ir=rn("toPrimitive"),ur=Yn.set,cr=Yn.getterFor(or),ar=Object.prototype,fr=v.Symbol,lr=_t("JSON","stringify"),sr=C.f,pr=K.f,dr=On.f,vr=b.f,hr=At("symbols"),mr=At("op-symbols"),yr=At("string-to-symbol-registry"),gr=At("symbol-to-string-registry"),br=At("wks"),wr=v.QObject,xr=!wr||!wr.prototype||!wr.prototype.findChild,$r=m&&h((function(){return 7!=Bt(pr({},"a",{get:function(){return pr(this,"a",{value:7}).a}})).a}))?function(t,n,r){var e=sr(ar,n);e&&delete ar[n],pr(t,n,r),e&&t!==ar&&pr(ar,n,e)}:pr,_r=function(t,n){var r=hr[t]=Bt(fr.prototype);return ur(r,{type:or,tag:t,description:n}),m||(r.description=n),r},Or=Yt?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof fr},Sr=function(t,n,r){t===ar&&Sr(mr,n,r),V(t);var e=A(n,!0);return V(r),k(hr,e)?(r.enumerable?(k(t,er)&&t[er][e]&&(t[er][e]=!1),r=Bt(r,{enumerable:w(0,!1)})):(k(t,er)||pr(t,er,w(1,{})),t[er][e]=!0),$r(t,e,r)):pr(t,e,r)},Er=function(t,n){V(t);var r=E(n),e=wt(r).concat(kr(r));return rr(e,(function(n){m&&!jr.call(r,n)||Sr(t,n,r[n])})),t},jr=function(t){var n=A(t,!0),r=vr.call(this,n);return!(this===ar&&k(hr,n)&&!k(mr,n))&&(!(r||!k(this,n)||!k(hr,n)||k(this,er)&&this[er][n])||r)},Ar=function(t,n){var r=E(t),e=A(n,!0);if(r!==ar||!k(hr,e)||k(mr,e)){var o=sr(r,e);return!o||!k(hr,e)||k(r,er)&&r[er][e]||(o.enumerable=!0),o}},Tr=function(t){var n=dr(E(t)),r=[];return rr(n,(function(t){k(hr,t)||k(mt,t)||r.push(t)})),r},kr=function(t){var n=t===ar,r=dr(n?mr:E(t)),e=[];return rr(r,(function(t){!k(hr,t)||n&&!k(ar,t)||e.push(hr[t])})),e};if(Xt||(En((fr=function(){if(this instanceof fr)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,n=Rt(t),r=function(t){this===ar&&r.call(mr,t),k(this,er)&&k(this[er],n)&&(this[er][n]=!1),$r(this,n,w(1,t))};return m&&xr&&$r(ar,n,{configurable:!0,set:r}),_r(n,t)}).prototype,"toString",(function(){return cr(this).tag})),En(fr,"withoutSetter",(function(t){return _r(Rt(t),t)})),b.f=jr,K.f=Sr,C.f=Ar,wn.f=On.f=Tr,Sn.f=kr,jn.f=function(t){return _r(rn(t),t)},m&&pr(fr.prototype,"description",{configurable:!0,get:function(){return cr(this).description}})),Z({global:!0,wrap:!0,forced:!Xt,sham:!Xt},{Symbol:fr}),rr(wt(br),(function(t){Tn(t)})),Z({target:or,stat:!0,forced:!Xt},{for:function(t){var n=String(t);if(k(yr,n))return yr[n];var r=fr(n);return yr[n]=r,gr[r]=n,r},keyFor:function(t){if(!Or(t))throw TypeError(t+" is not a symbol");if(k(gr,t))return gr[t]},useSetter:function(){xr=!0},useSimple:function(){xr=!1}}),Z({target:"Object",stat:!0,forced:!Xt,sham:!m},{create:function(t,n){return void 0===n?Bt(t):Er(Bt(t),n)},defineProperty:Sr,defineProperties:Er,getOwnPropertyDescriptor:Ar}),Z({target:"Object",stat:!0,forced:!Xt},{getOwnPropertyNames:Tr,getOwnPropertySymbols:kr}),Z({target:"Object",stat:!0,forced:h((function(){Sn.f(1)}))},{getOwnPropertySymbols:function(t){return Sn.f(Kt(t))}}),lr){var Rr=!Xt||h((function(){var t=fr();return"[null]"!=lr([t])||"{}"!=lr({a:t})||"{}"!=lr(Object(t))}));Z({target:"JSON",stat:!0,forced:Rr},{stringify:function(t,n,r){for(var e,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(e=n,(j(n)||void 0!==t)&&!Or(t))return Ht(n)||(n=function(t,n){if("function"==typeof e&&(n=e.call(this,t,n)),!Or(n))return n}),o[1]=n,lr.apply(null,o)}})}fr.prototype[ir]||Q(fr.prototype,ir,fr.prototype.valueOf),Bn(fr,or),mt[er]=!0,Tn("asyncIterator"),Tn("hasInstance"),Tn("isConcatSpreadable"),Tn("iterator"),Tn("match"),Tn("matchAll"),Tn("replace"),Tn("search"),Tn("species"),Tn("split"),Tn("toPrimitive"),Tn("toStringTag"),Tn("unscopables"),Bn(v.JSON,"JSON",!0);var Pr=G.Symbol;Tn("asyncDispose"),Tn("dispose"),Tn("observable"),Tn("patternMatch"),Tn("replaceAll");var Ir,Mr,Nr,Cr=Pr,Dr=function(t){return function(n,r){var e,o,i=String(S(n)),u=at(r),c=i.length;return u<0||u>=c?t?"":void 0:(e=i.charCodeAt(u))<55296||e>56319||u+1===c||(o=i.charCodeAt(u+1))<56320||o>57343?t?i.charAt(u):e:t?i.slice(u,u+2):o-56320+(e-55296<<10)+65536}},Br={codeAt:Dr(!1),charAt:Dr(!0)},Fr=!h((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Lr=It("IE_PROTO"),zr=Object.prototype,Ur=Fr?Object.getPrototypeOf:function(t){return t=Kt(t),k(t,Lr)?t[Lr]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?zr:null},qr=rn("iterator"),Gr=!1;[].keys&&("next"in(Nr=[].keys())?(Mr=Ur(Ur(Nr)))!==Object.prototype&&(Ir=Mr):Gr=!0);var Wr=null==Ir||h((function(){var t={};return Ir[qr].call(t)!==t}));Wr&&(Ir={}),Wr&&!k(Ir,qr)&&Q(Ir,qr,(function(){return this}));var Jr={IteratorPrototype:Ir,BUGGY_SAFARI_ITERATORS:Gr},Vr={},Hr=Jr.IteratorPrototype,Kr=function(){return this},Qr=Jr.IteratorPrototype,Xr=Jr.BUGGY_SAFARI_ITERATORS,Yr=rn("iterator"),Zr="keys",te="values",ne="entries",re=function(){return this},ee=function(t,n,r,e,o,i,u){!function(t,n,r){var e=n+" Iterator";t.prototype=Bt(Hr,{next:w(1,r)}),Bn(t,e,!1,!0),Vr[e]=Kr}(r,n,e);var c,a,f,l=function(t){if(t===o&&h)return h;if(!Xr&&t in d)return d[t];switch(t){case Zr:case te:case ne:return function(){return new r(this,t)}}return function(){return new r(this)}},s=n+" Iterator",p=!1,d=t.prototype,v=d[Yr]||d["@@iterator"]||o&&d[o],h=!Xr&&v||l(o),m="Array"==n&&d.entries||v;if(m&&(c=Ur(m.call(new t)),Qr!==Object.prototype&&c.next&&(Bn(c,s,!0,!0),Vr[s]=re)),o==te&&v&&v.name!==te&&(p=!0,h=function(){return v.call(this)}),u&&d[Yr]!==h&&Q(d,Yr,h),Vr[n]=h,o)if(a={values:l(te),keys:i?h:l(Zr),entries:l(ne)},u)for(f in a)(Xr||p||!(f in d))&&En(d,f,a[f]);else Z({target:n,proto:!0,forced:Xr||p},a);return a},oe=Br.charAt,ie="String Iterator",ue=Yn.set,ce=Yn.getterFor(ie);ee(String,"String",(function(t){ue(this,{type:ie,string:String(t),index:0})}),(function(){var t,n=ce(this),r=n.string,e=n.index;return e>=r.length?{value:void 0,done:!0}:(t=oe(r,e),n.index+=t.length,{value:t,done:!1})}));var ae="Array Iterator",fe=Yn.set,le=Yn.getterFor(ae);ee(Array,"Array",(function(t,n){fe(this,{type:ae,target:E(t),index:0,kind:n})}),(function(){var t=le(this),n=t.target,r=t.kind,e=t.index++;return!n||e>=n.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:e,done:!1}:"values"==r?{value:n[e],done:!1}:{value:[e,n[e]],done:!1}}),"values"),Vr.Arguments=Vr.Array;var se=rn("toStringTag");for(var pe in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var de=v[pe],ve=de&&de.prototype;ve&&Mn(ve)!==se&&Q(ve,se,pe),Vr[pe]=Vr.Array}var he=jn.f("iterator");function me(t){return(me="function"==typeof Cr&&"symbol"==typeof he?function(t){return typeof t}:function(t){return t&&"function"==typeof Cr&&t.constructor===Cr&&t!==Cr.prototype?"symbol":typeof t})(t)}function ye(t,n){return!n||"object"!==me(n)&&"function"!=typeof n?ot(t):n}var ge=h((function(){Ur(1)}));Z({target:"Object",stat:!0,forced:ge,sham:!Fr},{getPrototypeOf:function(t){return Ur(Kt(t))}});var be=G.Object.getPrototypeOf;function we(t){return(we=qt?be:function(t){return t.__proto__||be(t)})(t)}Z({target:"Array",stat:!0},{isArray:Ht});var xe=G.Array.isArray;var $e=rn("iterator"),_e=function(t){var n=Object(t);return void 0!==n[$e]||"@@iterator"in n||Vr.hasOwnProperty(Mn(n))},Oe=rn("iterator"),Se=function(t){if(null!=t)return t[Oe]||t["@@iterator"]||Vr[Mn(t)]},Ee=function(t){var n=Se(t);if("function"!=typeof n)throw TypeError(String(t)+" is not iterable");return V(n.call(t))},je=Ee;var Ae=Object.defineProperty,Te={},ke=function(t){throw t},Re=function(t,n){if(k(Te,t))return Te[t];n||(n={});var r=[][t],e=!!k(n,"ACCESSORS")&&n.ACCESSORS,o=k(n,0)?n[0]:ke,i=k(n,1)?n[1]:void 0;return Te[t]=!!r&&!h((function(){if(e&&!m)return!0;var t={length:-1};e?Ae(t,1,{enumerable:!0,get:ke}):t[1]=1,r.call(t,o,i)}))},Pe=pn("slice"),Ie=Re("slice",{ACCESSORS:!0,0:0,1:2}),Me=rn("species"),Ne=[].slice,Ce=Math.max;Z({target:"Array",proto:!0,forced:!Pe||!Ie},{slice:function(t,n){var r,e,o,i=E(this),u=lt(i.length),c=dt(t,u),a=dt(void 0===n?u:n,u);if(Ht(i)&&("function"!=typeof(r=i.constructor)||r!==Array&&!Ht(r.prototype)?j(r)&&null===(r=r[Me])&&(r=void 0):r=void 0,r===Array||void 0===r))return Ne.call(i,c,a);for(e=new(void 0===r?Array:r)(Ce(a-c,0)),o=0;c<a;c++,o++)c in i&&Qt(e,o,i[c]);return e.length=o,e}});var De=function(t){return G[t+"Prototype"]},Be=De("Array").slice,Fe=Array.prototype,Le=function(t){var n=t.slice;return t===Fe||t instanceof Array&&n===Fe.slice?Be:n},ze=Le,Ue=function(t){var n=t.return;if(void 0!==n)return V(n.call(t)).value},qe=function(t,n,r,e){try{return e?n(V(r)[0],r[1]):n(r)}catch(n){throw Ue(t),n}},Ge=rn("iterator"),We=Array.prototype,Je=function(t){return void 0!==t&&(Vr.Array===t||We[Ge]===t)},Ve=rn("iterator"),He=!1;try{var Ke=0,Qe={next:function(){return{done:!!Ke++}},return:function(){He=!0}};Qe[Ve]=function(){return this},Array.from(Qe,(function(){throw 2}))}catch(t){}var Xe=function(t,n){if(!n&&!He)return!1;var r=!1;try{var e={};e[Ve]=function(){return{next:function(){return{done:r=!0}}}},t(e)}catch(t){}return r},Ye=!Xe((function(t){Array.from(t)}));Z({target:"Array",stat:!0,forced:Ye},{from:function(t){var n,r,e,o,i,u,c=Kt(t),a="function"==typeof this?this:Array,f=arguments.length,l=f>1?arguments[1]:void 0,s=void 0!==l,p=Se(c),d=0;if(s&&(l=J(l,f>2?arguments[2]:void 0,2)),null==p||a==Array&&Je(p))for(r=new a(n=lt(c.length));n>d;d++)u=s?l(c[d],d):c[d],Qt(r,d,u);else for(i=(o=p.call(c)).next,r=new a;!(e=i.call(o)).done;d++)u=s?qe(o,l,[e.value,d],!0):e.value,Qt(r,d,u);return r.length=d,r}});var Ze=G.Array.from,to=Ze;function no(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}function ro(t,n){var r;if(t){if("string"==typeof t)return no(t,n);var e=ze(r=Object.prototype.toString.call(t)).call(r,8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?to(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?no(t,n):void 0}}function eo(t,n){return function(t){if(xe(t))return t}(t)||function(t,n){if(void 0!==Cr&&_e(Object(t))){var r=[],e=!0,o=!1,i=void 0;try{for(var u,c=je(t);!(e=(u=c.next()).done)&&(r.push(u.value),!n||r.length!==n);e=!0);}catch(t){o=!0,i=t}finally{try{e||null==c.return||c.return()}finally{if(o)throw i}}return r}}(t,n)||ro(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var oo=Le,io=nr.filter,uo=pn("filter"),co=Re("filter");Z({target:"Array",proto:!0,forced:!uo||!co},{filter:function(t){return io(this,t,arguments.length>1?arguments[1]:void 0)}});var ao=De("Array").filter,fo=Array.prototype,lo=function(t){var n=t.filter;return t===fo||t instanceof Array&&n===fo.filter?ao:n},so=[].slice,po={},vo=function(t,n,r){if(!(n in po)){for(var e=[],o=0;o<n;o++)e[o]="a["+o+"]";po[n]=Function("C,a","return new C("+e.join(",")+")")}return po[n](t,r)},ho=Function.bind||function(t){var n=W(this),r=so.call(arguments,1),e=function(){var o=r.concat(so.call(arguments));return this instanceof e?vo(n,o.length,o):n.apply(t,o)};return j(n.prototype)&&(e.prototype=n.prototype),e},mo=_t("Reflect","construct"),yo=h((function(){function t(){}return!(mo((function(){}),[],t)instanceof t)})),go=!h((function(){mo((function(){}))})),bo=yo||go;Z({target:"Reflect",stat:!0,forced:bo,sham:bo},{construct:function(t,n){W(t),V(n);var r=arguments.length<3?t:W(arguments[2]);if(go&&!yo)return mo(t,n,r);if(t==r){switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3])}var e=[null];return e.push.apply(e,n),new(ho.apply(t,e))}var o=r.prototype,i=Bt(j(o)?o:Object.prototype),u=Function.apply.call(t,i,n);return j(u)?u:i}});var wo=G.Reflect.construct;Z({target:"Reflect",stat:!0},{get:function t(n,r){var e,o,i=arguments.length<3?n:arguments[2];return V(n)===i?n[r]:(e=C.f(n,r))?k(e,"value")?e.value:void 0===e.get?void 0:e.get.call(i):j(o=Ur(n))?t(o,r,i):void 0}}),G.Reflect.get;var xo=C.f,$o=h((function(){xo(1)}));Z({target:"Object",stat:!0,forced:!m||$o,sham:!m},{getOwnPropertyDescriptor:function(t,n){return xo(E(t),n)}});var _o=p((function(t){var n=G.Object,r=t.exports=function(t,r){return n.getOwnPropertyDescriptor(t,r)};n.getOwnPropertyDescriptor.sham&&(r.sham=!0)})),Oo=!h((function(){return Object.isExtensible(Object.preventExtensions({}))})),So=p((function(t){var n=K.f,r=Rt("meta"),e=0,o=Object.isExtensible||function(){return!0},i=function(t){n(t,r,{value:{objectID:"O"+ ++e,weakData:{}}})},u=t.exports={REQUIRED:!1,fastKey:function(t,n){if(!j(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!k(t,r)){if(!o(t))return"F";if(!n)return"E";i(t)}return t[r].objectID},getWeakData:function(t,n){if(!k(t,r)){if(!o(t))return!0;if(!n)return!1;i(t)}return t[r].weakData},onFreeze:function(t){return Oo&&u.REQUIRED&&o(t)&&!k(t,r)&&i(t),t}};mt[r]=!0})),Eo=function(t,n){this.stopped=t,this.result=n},jo=function(t,n,r){var e,o,i,u,c,a,f,l=r&&r.that,s=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_ITERATOR),d=!(!r||!r.INTERRUPTED),v=J(n,l,1+s+d),h=function(t){return e&&Ue(e),new Eo(!0,t)},m=function(t){return s?(V(t),d?v(t[0],t[1],h):v(t[0],t[1])):d?v(t,h):v(t)};if(p)e=t;else{if("function"!=typeof(o=Se(t)))throw TypeError("Target is not iterable");if(Je(o)){for(i=0,u=lt(t.length);u>i;i++)if((c=m(t[i]))&&c instanceof Eo)return c;return new Eo(!1)}e=o.call(t)}for(a=e.next;!(f=a.call(e)).done;){try{c=m(f.value)}catch(t){throw Ue(e),t}if("object"==typeof c&&c&&c instanceof Eo)return c}return new Eo(!1)},Ao=function(t,n,r){if(!(t instanceof n))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t},To=K.f,ko=nr.forEach,Ro=Yn.set,Po=Yn.getterFor,Io=function(t,n,r){var e,o=-1!==t.indexOf("Map"),i=-1!==t.indexOf("Weak"),u=o?"set":"add",c=v[t],a=c&&c.prototype,f={};if(m&&"function"==typeof c&&(i||a.forEach&&!h((function(){(new c).entries().next()})))){e=n((function(n,r){Ro(Ao(n,e,t),{type:t,collection:new c}),null!=r&&jo(r,n[u],{that:n,AS_ENTRIES:o})}));var l=Po(t);ko(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var n="add"==t||"set"==t;!(t in a)||i&&"clear"==t||Q(e.prototype,t,(function(r,e){var o=l(this).collection;if(!n&&i&&!j(r))return"get"==t&&void 0;var u=o[t](0===r?0:r,e);return n?this:u}))})),i||To(e.prototype,"size",{configurable:!0,get:function(){return l(this).collection.size}})}else e=r.getConstructor(n,t,o,u),So.REQUIRED=!0;return Bn(e,t,!1,!0),f[t]=e,Z({global:!0,forced:!0},f),i||r.setStrong(e,t,o),e},Mo=function(t,n,r){for(var e in n)r&&r.unsafe&&t[e]?t[e]=n[e]:En(t,e,n[e],r);return t},No=rn("species"),Co=function(t){var n=_t(t),r=K.f;m&&n&&!n[No]&&r(n,No,{configurable:!0,get:function(){return this}})},Do=K.f,Bo=So.fastKey,Fo=Yn.set,Lo=Yn.getterFor,zo={getConstructor:function(t,n,r,e){var o=t((function(t,i){Ao(t,o,n),Fo(t,{type:n,index:Bt(null),first:void 0,last:void 0,size:0}),m||(t.size=0),null!=i&&jo(i,t[e],{that:t,AS_ENTRIES:r})})),i=Lo(n),u=function(t,n,r){var e,o,u=i(t),a=c(t,n);return a?a.value=r:(u.last=a={index:o=Bo(n,!0),key:n,value:r,previous:e=u.last,next:void 0,removed:!1},u.first||(u.first=a),e&&(e.next=a),m?u.size++:t.size++,"F"!==o&&(u.index[o]=a)),t},c=function(t,n){var r,e=i(t),o=Bo(n);if("F"!==o)return e.index[o];for(r=e.first;r;r=r.next)if(r.key==n)return r};return Mo(o.prototype,{clear:function(){for(var t=i(this),n=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete n[r.index],r=r.next;t.first=t.last=void 0,m?t.size=0:this.size=0},delete:function(t){var n=this,r=i(n),e=c(n,t);if(e){var o=e.next,u=e.previous;delete r.index[e.index],e.removed=!0,u&&(u.next=o),o&&(o.previous=u),r.first==e&&(r.first=o),r.last==e&&(r.last=u),m?r.size--:n.size--}return!!e},forEach:function(t){for(var n,r=i(this),e=J(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.next:r.first;)for(e(n.value,n.key,this);n&&n.removed;)n=n.previous},has:function(t){return!!c(this,t)}}),Mo(o.prototype,r?{get:function(t){var n=c(this,t);return n&&n.value},set:function(t,n){return u(this,0===t?0:t,n)}}:{add:function(t){return u(this,t=0===t?0:t,t)}}),m&&Do(o.prototype,"size",{get:function(){return i(this).size}}),o},setStrong:function(t,n,r){var e=n+" Iterator",o=Lo(n),i=Lo(e);ee(t,n,(function(t,n){Fo(this,{type:e,target:t,state:o(t),kind:n,last:void 0})}),(function(){for(var t=i(this),n=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?"keys"==n?{value:r.key,done:!1}:"values"==n?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),Co(n)}};Io("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),zo);var Uo=G.Map;Z({target:"Map",stat:!0},{from:function(t){var n,r,e,o,i=arguments.length,u=i>1?arguments[1]:void 0;return W(this),(n=void 0!==u)&&W(u),null==t?new this:(r=[],n?(e=0,o=J(u,i>2?arguments[2]:void 0,2),jo(t,(function(t){r.push(o(t,e++))}))):jo(t,r.push,{that:r}),new this(r))}});Z({target:"Map",stat:!0},{of:function(){for(var t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return new this(n)}});var qo=function(){for(var t,n=V(this),r=W(n.delete),e=!0,o=0,i=arguments.length;o<i;o++)t=r.call(n,arguments[o]),e=e&&t;return!!e};Z({target:"Map",proto:!0,real:!0,forced:St},{deleteAll:function(){return qo.apply(this,arguments)}});Z({target:"Map",proto:!0,real:!0,forced:St},{emplace:function(t,n){var r=V(this),e=r.has(t)&&"update"in n?n.update(r.get(t),t,r):n.insert(t,r);return r.set(t,e),e}});var Go=Ee;Z({target:"Map",proto:!0,real:!0,forced:St},{every:function(t){var n=V(this),r=Go(n),e=J(t,arguments.length>1?arguments[1]:void 0,3);return!jo(r,(function(t,r,o){if(!e(r,t,n))return o()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var Wo=rn("species"),Jo=function(t,n){var r,e=V(t).constructor;return void 0===e||null==(r=V(e)[Wo])?n:W(r)};Z({target:"Map",proto:!0,real:!0,forced:St},{filter:function(t){var n=V(this),r=Go(n),e=J(t,arguments.length>1?arguments[1]:void 0,3),o=new(Jo(n,_t("Map"))),i=W(o.set);return jo(r,(function(t,r){e(r,t,n)&&i.call(o,t,r)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}}),Z({target:"Map",proto:!0,real:!0,forced:St},{find:function(t){var n=V(this),r=Go(n),e=J(t,arguments.length>1?arguments[1]:void 0,3);return jo(r,(function(t,r,o){if(e(r,t,n))return o(r)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),Z({target:"Map",proto:!0,real:!0,forced:St},{findKey:function(t){var n=V(this),r=Go(n),e=J(t,arguments.length>1?arguments[1]:void 0,3);return jo(r,(function(t,r,o){if(e(r,t,n))return o(t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),Z({target:"Map",stat:!0},{groupBy:function(t,n){var r=new this;W(n);var e=W(r.has),o=W(r.get),i=W(r.set);return jo(t,(function(t){var u=n(t);e.call(r,u)?o.call(r,u).push(t):i.call(r,u,[t])})),r}});Z({target:"Map",proto:!0,real:!0,forced:St},{includes:function(t){return jo(Go(V(this)),(function(n,r,e){if((o=r)===(i=t)||o!=o&&i!=i)return e();var o,i}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}}),Z({target:"Map",stat:!0},{keyBy:function(t,n){var r=new this;W(n);var e=W(r.set);return jo(t,(function(t){e.call(r,n(t),t)})),r}}),Z({target:"Map",proto:!0,real:!0,forced:St},{keyOf:function(t){return jo(Go(V(this)),(function(n,r,e){if(r===t)return e(n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),Z({target:"Map",proto:!0,real:!0,forced:St},{mapKeys:function(t){var n=V(this),r=Go(n),e=J(t,arguments.length>1?arguments[1]:void 0,3),o=new(Jo(n,_t("Map"))),i=W(o.set);return jo(r,(function(t,r){i.call(o,e(r,t,n),r)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}}),Z({target:"Map",proto:!0,real:!0,forced:St},{mapValues:function(t){var n=V(this),r=Go(n),e=J(t,arguments.length>1?arguments[1]:void 0,3),o=new(Jo(n,_t("Map"))),i=W(o.set);return jo(r,(function(t,r){i.call(o,t,e(r,t,n))}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}}),Z({target:"Map",proto:!0,real:!0,forced:St},{merge:function(t){for(var n=V(this),r=W(n.set),e=0;e<arguments.length;)jo(arguments[e++],r,{that:n,AS_ENTRIES:!0});return n}}),Z({target:"Map",proto:!0,real:!0,forced:St},{reduce:function(t){var n=V(this),r=Go(n),e=arguments.length<2,o=e?void 0:arguments[1];if(W(t),jo(r,(function(r,i){e?(e=!1,o=i):o=t(o,i,r,n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),e)throw TypeError("Reduce of empty map with no initial value");return o}}),Z({target:"Map",proto:!0,real:!0,forced:St},{some:function(t){var n=V(this),r=Go(n),e=J(t,arguments.length>1?arguments[1]:void 0,3);return jo(r,(function(t,r,o){if(e(r,t,n))return o()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}}),Z({target:"Map",proto:!0,real:!0,forced:St},{update:function(t,n){var r=V(this),e=arguments.length;W(n);var o=r.has(t);if(!o&&e<3)throw TypeError("Updating absent value");var i=o?r.get(t):W(e>2?arguments[2]:void 0)(t,r);return r.set(t,n(i,t,r)),r}});var Vo=function(t,n){var r,e=V(this),o=arguments.length>2?arguments[2]:void 0;if("function"!=typeof n&&"function"!=typeof o)throw TypeError("At least one callback required");return e.has(t)?(r=e.get(t),"function"==typeof n&&(r=n(r),e.set(t,r))):"function"==typeof o&&(r=o(),e.set(t,r)),r};Z({target:"Map",proto:!0,real:!0,forced:St},{upsert:Vo}),Z({target:"Map",proto:!0,real:!0,forced:St},{updateOrInsert:Vo});var Ho=function(t,n){var r=[][t];return!!r&&h((function(){r.call(null,n||function(){throw 1},1)}))},Ko=ht.indexOf,Qo=[].indexOf,Xo=!!Qo&&1/[1].indexOf(1,-0)<0,Yo=Ho("indexOf"),Zo=Re("indexOf",{ACCESSORS:!0,1:0});Z({target:"Array",proto:!0,forced:Xo||!Yo||!Zo},{indexOf:function(t){return Xo?Qo.apply(this,arguments)||0:Ko(this,t,arguments.length>1?arguments[1]:void 0)}});var ti=De("Array").indexOf,ni=Array.prototype,ri=function(t){var n=t.indexOf;return t===ni||t instanceof Array&&n===ni.indexOf?ti:n},ei=ri;function oi(t){return function(t){if(xe(t))return no(t)}(t)||function(t){if(void 0!==Cr&&_e(Object(t)))return to(t)}(t)||ro(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}Z({target:"Function",proto:!0},{bind:ho}),De("Function").bind;var ii=Lt,ui=nr.forEach,ci=Ho("forEach"),ai=Re("forEach"),fi=ci&&ai?[].forEach:function(t){return ui(this,t,arguments.length>1?arguments[1]:void 0)};Z({target:"Array",proto:!0,forced:[].forEach!=fi},{forEach:fi});var li=De("Array").forEach,si=Array.prototype,pi={DOMTokenList:!0,NodeList:!0},di=function(t){var n=t.forEach;return t===si||t instanceof Array&&n===si.forEach||pi.hasOwnProperty(Mn(t))?li:n},vi=h((function(){wt(1)}));Z({target:"Object",stat:!0,forced:vi},{keys:function(t){return wt(Kt(t))}});var hi=G.Object.keys,mi=hi;Io("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),zo);var yi=G.Set,gi=De("Array").concat,bi=Array.prototype,wi=function(t){var n=t.concat;return t===bi||t instanceof Array&&n===bi.concat?gi:n};Z({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}}),G.Date.now;var xi=function(t,n){var r=this;if(!(r instanceof xi))return new xi(t,n);Ut&&(r=Ut(new Error(void 0),Ur(r))),void 0!==n&&Q(r,"message",String(n));var e=[];return jo(t,e.push,{that:e}),Q(r,"errors",e),r};xi.prototype=Bt(Error.prototype,{constructor:w(5,xi),message:w(5,""),name:w(5,"AggregateError")}),Z({global:!0},{AggregateError:xi});var $i,_i,Oi,Si=v.Promise,Ei=/(iphone|ipod|ipad).*applewebkit/i.test(un),ji="process"==$(v.process),Ai=v.location,Ti=v.setImmediate,ki=v.clearImmediate,Ri=v.process,Pi=v.MessageChannel,Ii=v.Dispatch,Mi=0,Ni={},Ci="onreadystatechange",Di=function(t){if(Ni.hasOwnProperty(t)){var n=Ni[t];delete Ni[t],n()}},Bi=function(t){return function(){Di(t)}},Fi=function(t){Di(t.data)},Li=function(t){v.postMessage(t+"",Ai.protocol+"//"+Ai.host)};Ti&&ki||(Ti=function(t){for(var n=[],r=1;arguments.length>r;)n.push(arguments[r++]);return Ni[++Mi]=function(){("function"==typeof t?t:Function(t)).apply(void 0,n)},$i(Mi),Mi},ki=function(t){delete Ni[t]},ji?$i=function(t){Ri.nextTick(Bi(t))}:Ii&&Ii.now?$i=function(t){Ii.now(Bi(t))}:Pi&&!Ei?(Oi=(_i=new Pi).port2,_i.port1.onmessage=Fi,$i=J(Oi.postMessage,Oi,1)):v.addEventListener&&"function"==typeof postMessage&&!v.importScripts&&Ai&&"file:"!==Ai.protocol&&!h(Li)?($i=Li,v.addEventListener("message",Fi,!1)):$i=Ci in I("script")?function(t){Ot.appendChild(I("script")).onreadystatechange=function(){Ot.removeChild(this),Di(t)}}:function(t){setTimeout(Bi(t),0)});var zi,Ui,qi,Gi,Wi,Ji,Vi,Hi,Ki={set:Ti,clear:ki},Qi=/web0s(?!.*chrome)/i.test(un),Xi=C.f,Yi=Ki.set,Zi=v.MutationObserver||v.WebKitMutationObserver,tu=v.document,nu=v.process,ru=v.Promise,eu=Xi(v,"queueMicrotask"),ou=eu&&eu.value;ou||(zi=function(){var t,n;for(ji&&(t=nu.domain)&&t.exit();Ui;){n=Ui.fn,Ui=Ui.next;try{n()}catch(t){throw Ui?Gi():qi=void 0,t}}qi=void 0,t&&t.enter()},Ei||ji||Qi||!Zi||!tu?ru&&ru.resolve?(Vi=ru.resolve(void 0),Hi=Vi.then,Gi=function(){Hi.call(Vi,zi)}):Gi=ji?function(){nu.nextTick(zi)}:function(){Yi.call(v,zi)}:(Wi=!0,Ji=tu.createTextNode(""),new Zi(zi).observe(Ji,{characterData:!0}),Gi=function(){Ji.data=Wi=!Wi}));var iu=ou||function(t){var n={fn:t,next:void 0};qi&&(qi.next=n),Ui||(Ui=n,Gi()),qi=n},uu=function(t){var n,r;this.promise=new t((function(t,e){if(void 0!==n||void 0!==r)throw TypeError("Bad Promise constructor");n=t,r=e})),this.resolve=W(n),this.reject=W(r)},cu={f:function(t){return new uu(t)}},au=function(t,n){if(V(t),j(n)&&n.constructor===t)return n;var r=cu.f(t);return(0,r.resolve)(n),r.promise},fu=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},lu=Ki.set,su=rn("species"),pu="Promise",du=Yn.get,vu=Yn.set,hu=Yn.getterFor(pu),mu=Si,yu=v.TypeError,gu=v.document,bu=v.process;_t("fetch");var wu,xu,$u,_u=cu.f,Ou=_u,Su=!!(gu&&gu.createEvent&&v.dispatchEvent),Eu="function"==typeof PromiseRejectionEvent,ju="unhandledrejection",Au=q(pu,(function(){if(!(qn(mu)!==String(mu))){if(66===ln)return!0;if(!ji&&!Eu)return!0}if(!mu.prototype.finally)return!0;if(ln>=51&&/native code/.test(mu))return!1;var t=mu.resolve(1),n=function(t){t((function(){}),(function(){}))};return(t.constructor={})[su]=n,!(t.then((function(){}))instanceof n)})),Tu=Au||!Xe((function(t){mu.all(t).catch((function(){}))})),ku=function(t){var n;return!(!j(t)||"function"!=typeof(n=t.then))&&n},Ru=function(t,n){if(!t.notified){t.notified=!0;var r=t.reactions;iu((function(){for(var e=t.value,o=1==t.state,i=0;r.length>i;){var u,c,a,f=r[i++],l=o?f.ok:f.fail,s=f.resolve,p=f.reject,d=f.domain;try{l?(o||(2===t.rejection&&Nu(t),t.rejection=1),!0===l?u=e:(d&&d.enter(),u=l(e),d&&(d.exit(),a=!0)),u===f.promise?p(yu("Promise-chain cycle")):(c=ku(u))?c.call(u,s,p):s(u)):p(e)}catch(t){d&&!a&&d.exit(),p(t)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&Iu(t)}))}},Pu=function(t,n,r){var e,o;Su?((e=gu.createEvent("Event")).promise=n,e.reason=r,e.initEvent(t,!1,!0),v.dispatchEvent(e)):e={promise:n,reason:r},!Eu&&(o=v["on"+t])?o(e):t===ju&&function(t,n){var r=v.console;r&&r.error&&(1===arguments.length?r.error(t):r.error(t,n))}("Unhandled promise rejection",r)},Iu=function(t){lu.call(v,(function(){var n,r=t.facade,e=t.value;if(Mu(t)&&(n=fu((function(){ji?bu.emit("unhandledRejection",e,r):Pu(ju,r,e)})),t.rejection=ji||Mu(t)?2:1,n.error))throw n.value}))},Mu=function(t){return 1!==t.rejection&&!t.parent},Nu=function(t){lu.call(v,(function(){var n=t.facade;ji?bu.emit("rejectionHandled",n):Pu("rejectionhandled",n,t.value)}))},Cu=function(t,n,r){return function(e){t(n,e,r)}},Du=function(t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,Ru(t,!0))},Bu=function(t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===n)throw yu("Promise can't be resolved itself");var e=ku(n);e?iu((function(){var r={done:!1};try{e.call(n,Cu(Bu,r,t),Cu(Du,r,t))}catch(n){Du(r,n,t)}})):(t.value=n,t.state=1,Ru(t,!1))}catch(n){Du({done:!1},n,t)}}};Au&&(mu=function(t){Ao(this,mu,pu),W(t),wu.call(this);var n=du(this);try{t(Cu(Bu,n),Cu(Du,n))}catch(t){Du(n,t)}},(wu=function(t){vu(this,{type:pu,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=Mo(mu.prototype,{then:function(t,n){var r=hu(this),e=_u(Jo(this,mu));return e.ok="function"!=typeof t||t,e.fail="function"==typeof n&&n,e.domain=ji?bu.domain:void 0,r.parent=!0,r.reactions.push(e),0!=r.state&&Ru(r,!1),e.promise},catch:function(t){return this.then(void 0,t)}}),xu=function(){var t=new wu,n=du(t);this.promise=t,this.resolve=Cu(Bu,n),this.reject=Cu(Du,n)},cu.f=_u=function(t){return t===mu||t===$u?new xu(t):Ou(t)}),Z({global:!0,wrap:!0,forced:Au},{Promise:mu}),Bn(mu,pu,!1,!0),Co(pu),$u=_t(pu),Z({target:pu,stat:!0,forced:Au},{reject:function(t){var n=_u(this);return n.reject.call(void 0,t),n.promise}}),Z({target:pu,stat:!0,forced:St},{resolve:function(t){return au(this===$u?mu:this,t)}}),Z({target:pu,stat:!0,forced:Tu},{all:function(t){var n=this,r=_u(n),e=r.resolve,o=r.reject,i=fu((function(){var r=W(n.resolve),i=[],u=0,c=1;jo(t,(function(t){var a=u++,f=!1;i.push(void 0),c++,r.call(n,t).then((function(t){f||(f=!0,i[a]=t,--c||e(i))}),o)})),--c||e(i)}));return i.error&&o(i.value),r.promise},race:function(t){var n=this,r=_u(n),e=r.reject,o=fu((function(){var o=W(n.resolve);jo(t,(function(t){o.call(n,t).then(r.resolve,e)}))}));return o.error&&e(o.value),r.promise}}),Z({target:"Promise",stat:!0},{allSettled:function(t){var n=this,r=cu.f(n),e=r.resolve,o=r.reject,i=fu((function(){var r=W(n.resolve),o=[],i=0,u=1;jo(t,(function(t){var c=i++,a=!1;o.push(void 0),u++,r.call(n,t).then((function(t){a||(a=!0,o[c]={status:"fulfilled",value:t},--u||e(o))}),(function(t){a||(a=!0,o[c]={status:"rejected",reason:t},--u||e(o))}))})),--u||e(o)}));return i.error&&o(i.value),r.promise}});var Fu="No one promise resolved";Z({target:"Promise",stat:!0},{any:function(t){var n=this,r=cu.f(n),e=r.resolve,o=r.reject,i=fu((function(){var r=W(n.resolve),i=[],u=0,c=1,a=!1;jo(t,(function(t){var f=u++,l=!1;i.push(void 0),c++,r.call(n,t).then((function(t){l||a||(a=!0,e(t))}),(function(t){l||a||(l=!0,i[f]=t,--c||o(new(_t("AggregateError"))(i,Fu)))}))})),--c||o(new(_t("AggregateError"))(i,Fu))}));return i.error&&o(i.value),r.promise}});var Lu=!!Si&&h((function(){Si.prototype.finally.call({then:function(){}},(function(){}))}));Z({target:"Promise",proto:!0,real:!0,forced:Lu},{finally:function(t){var n=Jo(this,_t("Promise")),r="function"==typeof t;return this.then(r?function(r){return au(n,t()).then((function(){return r}))}:t,r?function(r){return au(n,t()).then((function(){throw r}))}:t)}});var zu=G.Promise,Uu=ri,qu=_t("Reflect","ownKeys")||function(t){var n=wn.f(V(t)),r=Sn.f;return r?n.concat(r(t)):n};Z({target:"Object",stat:!0,sham:!m},{getOwnPropertyDescriptors:function(t){for(var n,r,e=E(t),o=C.f,i=qu(e),u={},c=0;i.length>c;)void 0!==(r=o(e,n=i[c++]))&&Qt(u,n,r);return u}});var Gu=G.Object.getOwnPropertyDescriptors,Wu=Ze,Ju=pn("splice"),Vu=Re("splice",{ACCESSORS:!0,0:0,1:2}),Hu=Math.max,Ku=Math.min,Qu=9007199254740991,Xu="Maximum allowed length exceeded";Z({target:"Array",proto:!0,forced:!Ju||!Vu},{splice:function(t,n){var r,e,o,i,u,c,a=Kt(this),f=lt(a.length),l=dt(t,f),s=arguments.length;if(0===s?r=e=0:1===s?(r=0,e=f-l):(r=s-2,e=Ku(Hu(at(n),0),f-l)),f+r-e>Qu)throw TypeError(Xu);for(o=on(a,e),i=0;i<e;i++)(u=l+i)in a&&Qt(o,i,a[u]);if(o.length=e,r<e){for(i=l;i<f-e;i++)c=i+r,(u=i+e)in a?a[c]=a[u]:delete a[c];for(i=f;i>f-e+r;i--)delete a[i-1]}else if(r>e)for(i=f-e;i>l;i--)c=i+r-1,(u=i+e-1)in a?a[c]=a[u]:delete a[c];for(i=0;i<r;i++)a[i+l]=arguments[i+2];return a.length=f-e+r,o}});var Yu=De("Array").splice,Zu=Array.prototype,tc=function(t){var n=t.splice;return t===Zu||t instanceof Array&&n===Zu.splice?Yu:n},nc=nr.map,rc=pn("map"),ec=Re("map");Z({target:"Array",proto:!0,forced:!rc||!ec},{map:function(t){return nc(this,t,arguments.length>1?arguments[1]:void 0)}});var oc=De("Array").map,ic=Array.prototype,uc=function(t){var n=t.map;return t===ic||t instanceof Array&&n===ic.map?oc:n},cc=Uo,ac=Object.assign,fc=Object.defineProperty,lc=!ac||h((function(){if(m&&1!==ac({b:1},ac(fc({},"a",{enumerable:!0,get:function(){fc(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},n={},r=Symbol(),e="abcdefghijklmnopqrst";return t[r]=7,e.split("").forEach((function(t){n[t]=t})),7!=ac({},t)[r]||wt(ac({},n)).join("")!=e}))?function(t,n){for(var r=Kt(t),e=arguments.length,o=1,i=Sn.f,u=b.f;e>o;)for(var c,a=O(arguments[o++]),f=i?wt(a).concat(i(a)):wt(a),l=f.length,s=0;l>s;)c=f[s++],m&&!u.call(a,c)||(r[c]=a[c]);return r}:ac;Z({target:"Object",stat:!0,forced:Object.assign!==lc},{assign:lc}),G.Object.assign;var sc=_t("JSON","stringify"),pc=/[\uD800-\uDFFF]/g,dc=/^[\uD800-\uDBFF]$/,vc=/^[\uDC00-\uDFFF]$/,hc=function(t,n,r){var e=r.charAt(n-1),o=r.charAt(n+1);return dc.test(t)&&!vc.test(o)||vc.test(t)&&!dc.test(e)?"\\u"+t.charCodeAt(0).toString(16):t},mc=h((function(){return'"\\udf06\\ud834"'!==sc("\udf06\ud834")||'"\\udead"'!==sc("\udead")}));sc&&Z({target:"JSON",stat:!0,forced:mc},{stringify:function(t,n,r){var e=sc.apply(null,arguments);return"string"==typeof e?e.replace(pc,hc):e}}),G.JSON||(G.JSON={stringify:JSON.stringify});Z({target:"Array",proto:!0},{fill:function(t){for(var n=Kt(this),r=lt(n.length),e=arguments.length,o=dt(e>1?arguments[1]:void 0,r),i=e>2?arguments[2]:void 0,u=void 0===i?r:dt(i,r);u>o;)n[o++]=t;return n}});var yc,gc=De("Array").fill,bc=Array.prototype,wc=function(t){var n=t.fill;return t===bc||t instanceof Array&&n===bc.fill?gc:n};function xc(){}function $c(t,n){for(var r in n)t[r]=n[r];return t}function _c(t){return t()}function Oc(){return ii(null)}function Sc(t){di(t).call(t,_c)}function Ec(t){return"function"==typeof t}function jc(t,n){return t!=t?n==n:t!==n||t&&"object"===me(t)||"function"==typeof t}function Ac(t,n,r){t.$$.on_destroy.push(function(t){if(null==t)return xc;for(var n=arguments.length,r=new Array(n>1?n-1:0),e=1;e<n;e++)r[e-1]=arguments[e];var o=t.subscribe.apply(t,r);return o.unsubscribe?function(){return o.unsubscribe()}:o}(n,r))}function Tc(t,n,r,e){if(t){var o=kc(t,n,r,e);return t[0](o)}}function kc(t,n,r,e){var o;return t[1]&&e?$c(oo(o=r.ctx).call(o),t[1](e(n))):r.ctx}function Rc(t,n,r,e,o,i,u){var c=function(t,n,r,e){if(t[2]&&e){var o=t[2](e(r));if(void 0===n.dirty)return o;if("object"===me(o)){for(var i=[],u=Math.max(n.dirty.length,o.length),c=0;c<u;c+=1)i[c]=n.dirty[c]|o[c];return i}return n.dirty|o}return n.dirty}(n,e,o,i);if(c){var a=kc(n,r,e,u);t.p(a,c)}}function Pc(t,n){var r={};for(var e in n=new yi(n),t)n.has(e)||"$"===e[0]||(r[e]=t[e]);return r}function Ic(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;return t.set(r),n}function Mc(t,n){t.appendChild(n)}function Nc(t,n,r){t.insertBefore(n,r||null)}function Cc(t){t.parentNode.removeChild(t)}function Dc(t,n){for(var r=0;r<t.length;r+=1)t[r]&&t[r].d(n)}function Bc(t){return document.createElement(t)}function Fc(t){return document.createTextNode(t)}function Lc(){return Fc(" ")}function zc(){return Fc("")}function Uc(t,n,r,e){return t.addEventListener(n,r,e),function(){return t.removeEventListener(n,r,e)}}function qc(t,n,r){null==r?t.removeAttribute(n):t.getAttribute(n)!==r&&t.setAttribute(n,r)}function Gc(t,n){var r=Gu(t.__proto__);for(var e in n)null==n[e]?t.removeAttribute(e):"style"===e?t.style.cssText=n[e]:"__value"===e?t.value=t[e]=n[e]:r[e]&&r[e].set?t[e]=n[e]:qc(t,e,n[e])}function Wc(t){return""===t?null:+t}function Jc(t){return Wu(t.childNodes)}function Vc(t,n){n=""+n,t.wholeText!==n&&(t.data=n)}function Hc(t,n){t.value=null==n?"":n}function Kc(t,n,r,e){t.style.setProperty(n,r,e?"important":"")}function Qc(t,n,r){t.classList[r?"add":"remove"](n)}function Xc(t){yc=t}function Yc(){if(!yc)throw new Error("Function called outside component initialization");return yc}function Zc(t){Yc().$$.on_mount.push(t)}function ta(){var t=Yc();return function(n,r){var e=t.$$.callbacks[n];if(e){var o,i=function(t,n){var r=document.createEvent("CustomEvent");return r.initCustomEvent(t,!1,!1,n),r}(n,r);di(o=oo(e).call(e)).call(o,(function(n){n.call(t,i)}))}}}new yi,new yi;var na=[],ra=[],ea=[],oa=[],ia=zu.resolve(),ua=!1;function ca(t){ea.push(t)}var aa=!1,fa=new yi;function la(){if(!aa){aa=!0;do{for(var t=0;t<na.length;t+=1){var n=na[t];Xc(n),sa(n.$$)}for(Xc(null),na.length=0;ra.length;)ra.pop()();for(var r=0;r<ea.length;r+=1){var e=ea[r];fa.has(e)||(fa.add(e),e())}ea.length=0}while(na.length);for(;oa.length;)oa.pop()();ua=!1,aa=!1,fa.clear()}}function sa(t){if(null!==t.fragment){var n;t.update(),Sc(t.before_update);var r=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,r),di(n=t.after_update).call(n,ca)}}var pa,da=new yi;function va(){pa={r:0,c:[],p:pa}}function ha(){pa.r||Sc(pa.c),pa=pa.p}function ma(t,n){t&&t.i&&(da.delete(t),t.i(n))}function ya(t,n,r,e){if(t&&t.o){if(da.has(t))return;da.add(t),pa.c.push((function(){da.delete(t),e&&(r&&t.d(1),e())})),t.o(n)}}function ga(t){t&&t.c()}function ba(t,n,r,e){var o=t.$$,i=o.fragment,u=o.on_mount,c=o.on_destroy,a=o.after_update;i&&i.m(n,r),e||ca((function(){var n,r=lo(n=uc(u).call(u,_c)).call(n,Ec);c?c.push.apply(c,oi(r)):Sc(r),t.$$.on_mount=[]})),di(a).call(a,ca)}function wa(t,n){var r=t.$$;null!==r.fragment&&(Sc(r.on_destroy),r.fragment&&r.fragment.d(n),r.on_destroy=r.fragment=null,r.ctx=[])}function xa(t,n){var r;-1===t.$$.dirty[0]&&(na.push(t),ua||(ua=!0,ia.then(la)),wc(r=t.$$.dirty).call(r,0));t.$$.dirty[n/31|0]|=1<<n%31}function $a(t,n,r,e,o,i){var u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[-1],c=yc;Xc(t);var a=t.$$={fragment:null,ctx:null,props:i,update:xc,not_equal:o,bound:Oc(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new cc(c?c.$$.context:[]),callbacks:Oc(),dirty:u,skip_bound:!1},f=!1;if(a.ctx=r?r(t,n.props||{},(function(n,r){var e=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:r;return a.ctx&&o(a.ctx[n],a.ctx[n]=e)&&(!a.skip_bound&&a.bound[n]&&a.bound[n](e),f&&xa(t,n)),r})):[],a.update(),f=!0,Sc(a.before_update),a.fragment=!!e&&e(a.ctx),n.target){if(n.hydrate){var l=Jc(n.target);a.fragment&&a.fragment.l(l),di(l).call(l,Cc)}else a.fragment&&a.fragment.c();n.intro&&ma(t.$$.fragment),ba(t,n.target,n.anchor,n.customElement),la()}Xc(c)}new yi(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]);var _a=function(){function t(){l(this,t)}return et(t,[{key:"$destroy",value:function(){wa(this,1),this.$destroy=xc}},{key:"$on",value:function(t,n){var r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),function(){var t=Uu(r).call(r,n);-1!==t&&tc(r).call(r,t,1)}}},{key:"$set",value:function(t){this.$$set&&0!==mi(t).length&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}]),t}();function Oa(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}var Sa=function(t){return{}},Ea=function(t){return{}};function ja(t){var n,r,e,o,i,u,c,a,f,l,s,p,d,v,h=t[6].default,m=Tc(h,t,t[5],null),y=t[6].footer,g=Tc(y,t,t[5],Ea);return{c:function(){n=Bc("div"),r=Bc("div"),e=Bc("div"),o=Bc("div"),i=Bc("h5"),u=Fc(t[1]),c=Lc(),(a=Bc("button")).innerHTML='<span aria-hidden="true">×</span>',f=Lc(),l=Bc("div"),m&&m.c(),s=Lc(),p=Bc("div"),g&&g.c(),qc(i,"class","modal-title"),qc(a,"type","button"),qc(a,"class","close"),qc(a,"data-dismiss","bookly-modal"),qc(a,"aria-label","Close"),qc(o,"class","modal-header"),qc(l,"class","modal-body"),qc(p,"class","modal-footer"),qc(e,"class","modal-content"),qc(r,"class",d="modal-dialog modal-"+t[0]),qc(n,"class","bookly-modal bookly-fade"),qc(n,"tabindex","-1"),qc(n,"role","dialog")},m:function(d,h){Nc(d,n,h),Mc(n,r),Mc(r,e),Mc(e,o),Mc(o,i),Mc(i,u),Mc(o,c),Mc(o,a),Mc(e,f),Mc(e,l),m&&m.m(l,null),Mc(e,s),Mc(e,p),g&&g.m(p,null),t[7](n),v=!0},p:function(t,n){var e=eo(n,1)[0];(!v||2&e)&&Vc(u,t[1]),m&&m.p&&32&e&&Rc(m,h,t,t[5],e,null,null),g&&g.p&&32&e&&Rc(g,y,t,t[5],e,Sa,Ea),(!v||1&e&&d!==(d="modal-dialog modal-"+t[0]))&&qc(r,"class",d)},i:function(t){v||(ma(m,t),ma(g,t),v=!0)},o:function(t){ya(m,t),ya(g,t),v=!1},d:function(r){r&&Cc(n),m&&m.d(r),g&&g.d(r),t[7](null)}}}function Aa(t,n,r){var e,o=n.$$slots,i=void 0===o?{}:o,c=n.$$scope,a=ta(),f=n.size,l=void 0===f?"lg":f,s=n.title,p=void 0===s?"":s;return Zc((function(){return u.default(e).booklyModal().on("hidden.bs.modal",(function(){return a("hidden")}))})),t.$$set=function(t){"size"in t&&r(0,l=t.size),"title"in t&&r(1,p=t.title),"$$scope"in t&&r(5,c=t.$$scope)},[l,p,e,function(){u.default(e).booklyModal("show")},function(){u.default(e).booklyModal("hide")},c,i,function(t){ra[t?"unshift":"push"]((function(){r(2,e=t)}))}]}var Ta=function(t){Wt(r,t);var n=Oa(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,Aa,ja,jc,{size:0,title:1,show:3,hide:4}),e}return et(r,[{key:"show",get:function(){return this.$$.ctx[3]}},{key:"hide",get:function(){return this.$$.ctx[4]}}]),r}(_a);function ka(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function Ra(t){for(var n,r,e,o,i,u,c,a,f=t[3]?"…":"",l=t[9].default,s=Tc(l,t,t[8],null),p=[{type:t[0]},{class:i="btn ladda-button "+t[1]},{"data-spinner-size":"40"},{"data-style":"zoom-in"},t[5]],d={},v=0;v<p.length;v+=1)d=$c(d,p[v]);return{c:function(){n=Bc("button"),r=Bc("span"),s&&s.c(),e=Fc(t[2]),o=Fc(f),qc(r,"class","ladda-label"),Gc(n,d)},m:function(i,f){Nc(i,n,f),Mc(n,r),s&&s.m(r,null),Mc(r,e),Mc(r,o),t[11](n),u=!0,c||(a=Uc(n,"click",t[10]),c=!0)},p:function(t,r){var c=eo(r,1)[0];s&&s.p&&256&c&&Rc(s,l,t,t[8],c,null,null),(!u||4&c)&&Vc(e,t[2]),(!u||8&c)&&f!==(f=t[3]?"…":"")&&Vc(o,f),Gc(n,d=function(t,n){for(var r={},e={},o={$$scope:1},i=t.length;i--;){var u=t[i],c=n[i];if(c){for(var a in u)a in c||(e[a]=1);for(var f in c)o[f]||(r[f]=c[f],o[f]=1);t[i]=c}else for(var l in u)o[l]=1}for(var s in e)s in r||(r[s]=void 0);return r}(p,[(!u||1&c)&&{type:t[0]},(!u||2&c&&i!==(i="btn ladda-button "+t[1]))&&{class:i},{"data-spinner-size":"40"},{"data-style":"zoom-in"},32&c&&t[5]]))},i:function(t){u||(ma(s,t),u=!0)},o:function(t){ya(s,t),u=!1},d:function(r){r&&Cc(n),s&&s.d(r),t[11](null),c=!1,a()}}}function Pa(t,n,r){var e,o,i,u=["type","class","caption","loading","ellipsis"],a=Pc(n,u),f=n,l=f.$$slots,s=void 0===l?{}:l,p=f.$$scope,d=n.type,v=void 0===d?"button":d,h=n.class,m=void 0===h?"btn-default":h,y=n.caption,g=void 0===y?"":y,b=n.loading,w=void 0!==b&&b,x=n.ellipsis,$=void 0!==x&&x;return Zc((function(){return r(7,o=c.default.create(e))})),i=function(){return o&&o.remove()},Yc().$$.on_destroy.push(i),t.$$set=function(t){n=$c($c({},n),function(t){var n={};for(var r in t)"$"!==r[0]&&(n[r]=t[r]);return n}(t)),r(5,a=Pc(n,u)),"type"in t&&r(0,v=t.type),"class"in t&&r(1,m=t.class),"caption"in t&&r(2,g=t.caption),"loading"in t&&r(6,w=t.loading),"ellipsis"in t&&r(3,$=t.ellipsis),"$$scope"in t&&r(8,p=t.$$scope)},t.$$.update=function(){192&t.$$.dirty&&o&&(w?o.start():o.stop())},[v,m,g,$,e,a,w,o,p,s,function(n){!function(t,n){var r,e=t.$$.callbacks[n.type];e&&di(r=oo(e).call(e)).call(r,(function(t){return t(n)}))}(t,n)},function(t){ra[t?"unshift":"push"]((function(){r(4,e=t)}))}]}var Ia=function(t){Wt(r,t);var n=ka(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,Pa,Ra,jc,{type:0,class:1,caption:2,loading:6,ellipsis:3}),e}return r}(_a),Ma="\t\n\v\f\r                 \u2028\u2029\ufeff",Na="["+Ma+"]",Ca=RegExp("^"+Na+Na+"*"),Da=RegExp(Na+Na+"*$"),Ba=function(t){return function(n){var r=String(S(n));return 1&t&&(r=r.replace(Ca,"")),2&t&&(r=r.replace(Da,"")),r}},Fa={start:Ba(1),end:Ba(2),trim:Ba(3)},La=Fa.trim,za=v.parseInt,Ua=/^[+-]?0[Xx]/,qa=8!==za(Ma+"08")||22!==za(Ma+"0x16")?function(t,n){var r=La(String(t));return za(r,n>>>0||(Ua.test(r)?16:10))}:za;Z({global:!0,forced:parseInt!=qa},{parseInt:qa});var Ga=G.parseInt,Wa=Fa.trim,Ja=v.parseFloat,Va=1/Ja(Ma+"-0")!=-1/0?function(t){var n=Wa(String(t)),r=Ja(n);return 0===r&&"-"==n.charAt(0)?-0:r}:Ja;Z({global:!0,forced:parseFloat!=Va},{parseFloat:Va});var Ha=G.parseFloat,Ka=G.Object.getOwnPropertySymbols,Qa=Ka,Xa=_o;Z({target:"Object",stat:!0,forced:!m,sham:!m},{defineProperties:xt});var Ya=p((function(t){var n=G.Object,r=t.exports=function(t,r){return n.defineProperties(t,r)};n.defineProperties.sham&&(r.sham=!0)})),Za=tt;function tf(t,n,r){return n in t?nt(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}var nf=[];var rf=Ka,ef=hi;function of(t,n){if(null==t)return{};var r,e,o=function(t,n){if(null==t)return{};var r,e,o={},i=ef(t);for(e=0;e<i.length;e++)r=i[e],ei(n).call(n,r)>=0||(o[r]=t[r]);return o}(t,n);if(rf){var i=rf(t);for(e=0;e<i.length;e++)r=i[e],ei(n).call(n,r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function uf(t,n){var r=mi(t);if(Qa){var e=Qa(t);n&&(e=lo(e).call(e,(function(n){return Xa(t,n).enumerable}))),r.push.apply(r,e)}return r}function cf(t,n){var r=t,e=function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xc,e=[];function o(r){if(jc(t,r)&&(t=r,n)){for(var o=!nf.length,i=0;i<e.length;i+=1){var u=e[i];u[1](),nf.push(u,t)}if(o){for(var c=0;c<nf.length;c+=2)nf[c][0](nf[c+1]);nf.length=0}}}function i(n){o(n(t))}function u(i){var u=[i,arguments.length>1&&void 0!==arguments[1]?arguments[1]:xc];return e.push(u),1===e.length&&(n=r(o)||xc),i(t),function(){var t=Uu(e).call(e,u);-1!==t&&tc(e).call(e,t,1),0===e.length&&(n(),n=null)}}return{set:o,update:i,subscribe:u}}(t,n),o=e.set;return function(t){for(var n=1;n<arguments.length;n++){var r,e=null!=arguments[n]?arguments[n]:{};if(n%2)di(r=uf(Object(e),!0)).call(r,(function(n){tf(t,n,e[n])}));else if(Gu)Ya(t,Gu(e));else{var o;di(o=uf(Object(e))).call(o,(function(n){Za(t,n,Xa(e,n))}))}}return t}({set:function(t){r=t,o(t)},get:function(){return r}},of(e,["set"]))}var af=nr.find,ff="find",lf=!0,sf=Re(ff);ff in[]&&Array(1).find((function(){lf=!1})),Z({target:"Array",proto:!0,forced:lf||!sf},{find:function(t){return af(this,t,arguments.length>1?arguments[1]:void 0)}}),De("Array").find;var pf=ht.includes,df=Re("indexOf",{ACCESSORS:!0,1:0});Z({target:"Array",proto:!0,forced:!df},{includes:function(t){return pf(this,t,arguments.length>1?arguments[1]:void 0)}});var vf=De("Array").includes,hf=rn("match"),mf=function(t){if(function(t){var n;return j(t)&&(void 0!==(n=t[hf])?!!n:"RegExp"==$(t))}(t))throw TypeError("The method doesn't accept regular expressions");return t},yf=rn("match");Z({target:"String",proto:!0,forced:!function(t){var n=/./;try{"/./"[t](n)}catch(r){try{return n[yf]=!1,"/./"[t](n)}catch(t){}}return!1}("includes")},{includes:function(t){return!!~String(S(this)).indexOf(mf(t),arguments.length>1?arguments[1]:void 0)}});var gf=De("String").includes,bf=Array.prototype,wf=String.prototype,xf=function(t){var n=t.includes;return t===bf||t instanceof Array&&n===bf.includes?vf:"string"==typeof t||t===wf||t instanceof String&&n===wf.includes?gf:n};function $f(t){for(var n,r=arguments.length,e=new Array(r>1?r-1:0),o=1;o<r;o++)e[o-1]=arguments[o];return u.default.extend.apply(u.default,wi(n=[!0,{},t]).call(n,e))}function _f(t){var n;return xf(n=BooklyL10nGlobal.addons).call(n,t)}var Of=BooklyL10nGlobal.csrf_token;function Sf(t,n){var r=mi(t);if(Qa){var e=Qa(t);n&&(e=lo(e).call(e,(function(n){return Xa(t,n).enumerable}))),r.push.apply(r,e)}return r}function Ef(t){for(var n=1;n<arguments.length;n++){var r,e=null!=arguments[n]?arguments[n]:{};if(n%2)di(r=Sf(Object(e),!0)).call(r,(function(n){tf(t,n,e[n])}));else if(Gu)Ya(t,Gu(e));else{var o;di(o=Sf(Object(e))).call(o,(function(n){Za(t,n,Xa(e,n))}))}}return t}function jf(t,n){var r=$f({value:t}),e=cf(t,n);return Ef(Ef({},e),{},{reset:function(){return e.set($f(r).value)}})}var Af=cf(),Tf=jf({payment:{},adjustments:[],show:{}}),kf=jf(!1),Rf=jf(""),Pf=jf(),If=jf();function Mf(t,n){var r=n.get(t);if(!r)throw new TypeError("attempted to get private field on non-instance");return r.get?r.get.call(t):r.value}var Nf=So.getWeakData,Cf=Yn.set,Df=Yn.getterFor,Bf=nr.find,Ff=nr.findIndex,Lf=0,zf=function(t){return t.frozen||(t.frozen=new Uf)},Uf=function(){this.entries=[]},qf=function(t,n){return Bf(t.entries,(function(t){return t[0]===n}))};Uf.prototype={get:function(t){var n=qf(this,t);if(n)return n[1]},has:function(t){return!!qf(this,t)},set:function(t,n){var r=qf(this,t);r?r[1]=n:this.entries.push([t,n])},delete:function(t){var n=Ff(this.entries,(function(n){return n[0]===t}));return~n&&this.entries.splice(n,1),!!~n}};var Gf={getConstructor:function(t,n,r,e){var o=t((function(t,i){Ao(t,o,n),Cf(t,{type:n,id:Lf++,frozen:void 0}),null!=i&&jo(i,t[e],{that:t,AS_ENTRIES:r})})),i=Df(n),u=function(t,n,r){var e=i(t),o=Nf(V(n),!0);return!0===o?zf(e).set(n,r):o[e.id]=r,t};return Mo(o.prototype,{delete:function(t){var n=i(this);if(!j(t))return!1;var r=Nf(t);return!0===r?zf(n).delete(t):r&&k(r,n.id)&&delete r[n.id]},has:function(t){var n=i(this);if(!j(t))return!1;var r=Nf(t);return!0===r?zf(n).has(t):r&&k(r,n.id)}}),Mo(o.prototype,r?{get:function(t){var n=i(this);if(j(t)){var r=Nf(t);return!0===r?zf(n).get(t):r?r[n.id]:void 0}},set:function(t,n){return u(this,t,n)}}:{add:function(t){return u(this,t,!0)}}),o}};p((function(t){var n,r=Yn.enforce,e=!v.ActiveXObject&&"ActiveXObject"in v,o=Object.isExtensible,i=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},u=t.exports=Io("WeakMap",i,Gf);if(Wn&&e){n=Gf.getConstructor(i,"WeakMap",!0),So.REQUIRED=!0;var c=u.prototype,a=c.delete,f=c.has,l=c.get,s=c.set;Mo(c,{delete:function(t){if(j(t)&&!o(t)){var e=r(this);return e.frozen||(e.frozen=new n),a.call(this,t)||e.frozen.delete(t)}return a.call(this,t)},has:function(t){if(j(t)&&!o(t)){var e=r(this);return e.frozen||(e.frozen=new n),f.call(this,t)||e.frozen.has(t)}return f.call(this,t)},get:function(t){if(j(t)&&!o(t)){var e=r(this);return e.frozen||(e.frozen=new n),f.call(this,t)?l.call(this,t):e.frozen.get(t)}return l.call(this,t)},set:function(t,e){if(j(t)&&!o(t)){var i=r(this);i.frozen||(i.frozen=new n),f.call(this,t)?s.call(this,t,e):i.frozen.set(t,e)}else s.call(this,t,e);return this}})}}));var Wf=new(0,G.WeakMap),Jf=function(){function t(n){l(this,t),Wf.set(this,{writable:!0,value:void 0}),function(t,n,r){var e=n.get(t);if(!e)throw new TypeError("attempted to set private field on non-instance");if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}(this,Wf,n)}return et(t,[{key:"price",value:function(t){var n=Mf(this,Wf).format_price.format;return t=Ha(t),n=(n=n.replace("{sign}",t<0?"-":"")).replace("{price}",this._formatNumber(Math.abs(t),Mf(this,Wf).format_price.decimals,Mf(this,Wf).format_price.decimal_separator,Mf(this,Wf).format_price.thousands_separator))}},{key:"date",value:function(t){switch(me(t)){case"string":return f.default(t).format(Mf(this,Wf).moment_format_date)}}},{key:"time",value:function(t){switch(me(t)){case"string":return f.default(t).format(Mf(this,Wf).moment_format_time);case"object":return t.format(Mf(this,Wf).moment_format_time)}}},{key:"_formatNumber",value:function(t,n,r,e){var o;t=Math.abs(Number(t)||0).toFixed(n),n=isNaN(n=Math.abs(n))?2:n,r=void 0===r?".":r,e=void 0===e?",":e;var i=t<0?"-":"",u=String(Ga(t)),c=u.length>3?u.length%3:0;return i+(c?u.substr(0,c)+e:"")+u.substr(c).replace(/(\d{3})(?=\d)/g,"$1"+e)+(n?r+oo(o=Math.abs(t-u).toFixed(n)).call(o,2):"")}}]),t}(),Vf=a.default,Hf=new Jf(Vf);function Kf(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function Qf(t,n,r){var e=oo(t).call(t);return e[3]=n[r],e}function Xf(t,n,r){var e=oo(t).call(t);return e[6]=n[r],e}function Yf(t,n,r){var e=oo(t).call(t);return e[3]=n[r],e}function Zf(t,n,r){var e=oo(t).call(t);return e[6]=n[r],e}function tl(t,n,r){var e=oo(t).call(t);return e[3]=n[r],e}function nl(t){var n,r;return{c:function(){n=Fc(t[1]),r=Fc(" × ")},m:function(t,e){Nc(t,n,e),Nc(t,r,e)},p:function(t,r){2&r&&Vc(n,t[1])},d:function(t){t&&Cc(n),t&&Cc(r)}}}function rl(t){for(var n,r=t[0].extras,e=[],o=0;o<r.length;o+=1)e[o]=il(tl(t,r,o));return{c:function(){n=Bc("ul");for(var t=0;t<e.length;t+=1)e[t].c();qc(n,"class","pl-3 m-0")},m:function(t,r){Nc(t,n,r);for(var o=0;o<e.length;o+=1)e[o].m(n,null)},p:function(t,o){if(7&o){var i;for(r=t[0].extras,i=0;i<r.length;i+=1){var u=tl(t,r,i);e[i]?e[i].p(u,o):(e[i]=il(u),e[i].c(),e[i].m(n,null))}for(;i<e.length;i+=1)e[i].d(1);e.length=r.length}},d:function(t){t&&Cc(n),Dc(e,t)}}}function el(t){var n,r;return{c:function(){n=Fc(t[1]),r=Fc(" × ")},m:function(t,e){Nc(t,n,e),Nc(t,r,e)},p:function(t,r){2&r&&Vc(n,t[1])},d:function(t){t&&Cc(n),t&&Cc(r)}}}function ol(t){var n,r,e=t[3].quantity+"";return{c:function(){n=Fc(e),r=Fc(" × ")},m:function(t,e){Nc(t,n,e),Nc(t,r,e)},p:function(t,r){1&r&&e!==(e=t[3].quantity+"")&&Vc(n,e)},d:function(t){t&&Cc(n),t&&Cc(r)}}}function il(t){var n,r,e,o=Ga(t[3].quantity)>1,i=t[3].title+"",u=t[2].payment.extras_multiply_nop&&t[1]>1&&el(t),c=o&&ol(t);return{c:function(){n=Bc("li"),u&&u.c(),r=zc(),c&&c.c(),e=Fc(i)},m:function(t,o){Nc(t,n,o),u&&u.m(n,null),Mc(n,r),c&&c.m(n,null),Mc(n,e)},p:function(t,a){t[2].payment.extras_multiply_nop&&t[1]>1?u?u.p(t,a):((u=el(t)).c(),u.m(n,r)):u&&(u.d(1),u=null),1&a&&(o=Ga(t[3].quantity)>1),o?c?c.p(t,a):((c=ol(t)).c(),c.m(n,e)):c&&(c.d(1),c=null),1&a&&i!==(i=t[3].title+"")&&Vc(e,i)},d:function(t){t&&Cc(n),u&&u.d(),c&&c.d()}}}function ul(t){for(var n,r,e,o,i,u=Vf.l10n.discount+"",c=t[0].discounts,a=[],f=0;f<c.length;f+=1)a[f]=cl(Zf(t,c,f));return{c:function(){n=Bc("ul"),r=Bc("li"),e=Fc(u),o=Bc("br"),i=Lc();for(var t=0;t<a.length;t+=1)a[t].c();qc(n,"class","pl-3 m-0")},m:function(t,u){Nc(t,n,u),Mc(n,r),Mc(r,e),Mc(r,o),Mc(r,i);for(var c=0;c<a.length;c+=1)a[c].m(r,null)},p:function(t,n){if(1&n){var e;for(c=t[0].discounts,e=0;e<c.length;e+=1){var o=Zf(t,c,e);a[e]?a[e].p(o,n):(a[e]=cl(o),a[e].c(),a[e].m(r,null))}for(;e<a.length;e+=1)a[e].d(1);a.length=c.length}},d:function(t){t&&Cc(n),Dc(a,t)}}}function cl(t){var n,r,e=t[6].title+"";return{c:function(){n=Fc(e),r=Bc("br")},m:function(t,e){Nc(t,n,e),Nc(t,r,e)},p:function(t,r){1&r&&e!==(e=t[6].title+"")&&Vc(n,e)},d:function(t){t&&Cc(n),t&&Cc(r)}}}function al(t){var n,r=Vf.l10n.na+"";return{c:function(){n=Fc(r)},m:function(t,r){Nc(t,n,r)},p:xc,d:function(t){t&&Cc(n)}}}function fl(t){var n,r,e,o=Hf.date(t[0].appointment_date)+"",i=Hf.time(t[0].appointment_date)+"";return{c:function(){n=Fc(o),r=Lc(),e=Fc(i)},m:function(t,o){Nc(t,n,o),Nc(t,r,o),Nc(t,e,o)},p:function(t,r){1&r&&o!==(o=Hf.date(t[0].appointment_date)+"")&&Vc(n,o),1&r&&i!==(i=Hf.time(t[0].appointment_date)+"")&&Vc(e,i)},d:function(t){t&&Cc(n),t&&Cc(r),t&&Cc(e)}}}function ll(t){var n,r,e=t[0].deposit_format+"";return{c:function(){n=Bc("td"),r=Fc(e),qc(n,"class","text-right")},m:function(t,e){Nc(t,n,e),Mc(n,r)},p:function(t,n){1&n&&e!==(e=t[0].deposit_format+"")&&Vc(r,e)},d:function(t){t&&Cc(n)}}}function sl(t){var n,r,e,o,i=Hf.price(t[0].service_price)+"",u=t[1]>1&&dl(t),c=t[0].extras&&vl(t),a=t[0].discounts&&gl(t);return{c:function(){u&&u.c(),n=Fc(i),r=Lc(),e=Bc("ul"),c&&c.c(),o=Lc(),a&&a.c(),qc(e,"class","pl-3 m-0 list-unstyled")},m:function(t,i){u&&u.m(t,i),Nc(t,n,i),Nc(t,r,i),Nc(t,e,i),c&&c.m(e,null),Mc(e,o),a&&a.m(e,null)},p:function(t,r){t[1]>1?u?u.p(t,r):((u=dl(t)).c(),u.m(n.parentNode,n)):u&&(u.d(1),u=null),1&r&&i!==(i=Hf.price(t[0].service_price)+"")&&Vc(n,i),t[0].extras?c?c.p(t,r):((c=vl(t)).c(),c.m(e,o)):c&&(c.d(1),c=null),t[0].discounts?a?a.p(t,r):((a=gl(t)).c(),a.m(e,null)):a&&(a.d(1),a=null)},d:function(t){u&&u.d(t),t&&Cc(n),t&&Cc(r),t&&Cc(e),c&&c.d(),a&&a.d()}}}function pl(t){var n,r=Hf.price(t[0].service_price)+"";return{c:function(){n=Fc(r)},m:function(t,r){Nc(t,n,r)},p:function(t,e){1&e&&r!==(r=Hf.price(t[0].service_price)+"")&&Vc(n,r)},d:function(t){t&&Cc(n)}}}function dl(t){var n,r;return{c:function(){n=Fc(t[1]),r=Fc(" × ")},m:function(t,e){Nc(t,n,e),Nc(t,r,e)},p:function(t,r){2&r&&Vc(n,t[1])},d:function(t){t&&Cc(n),t&&Cc(r)}}}function vl(t){for(var n,r=t[0].extras,e=[],o=0;o<r.length;o+=1)e[o]=yl(Yf(t,r,o));return{c:function(){for(var t=0;t<e.length;t+=1)e[t].c();n=zc()},m:function(t,r){for(var o=0;o<e.length;o+=1)e[o].m(t,r);Nc(t,n,r)},p:function(t,o){if(7&o){var i;for(r=t[0].extras,i=0;i<r.length;i+=1){var u=Yf(t,r,i);e[i]?e[i].p(u,o):(e[i]=yl(u),e[i].c(),e[i].m(n.parentNode,n))}for(;i<e.length;i+=1)e[i].d(1);e.length=r.length}},d:function(t){Dc(e,t),t&&Cc(n)}}}function hl(t){var n,r;return{c:function(){n=Fc(t[1]),r=Fc(" × ")},m:function(t,e){Nc(t,n,e),Nc(t,r,e)},p:function(t,r){2&r&&Vc(n,t[1])},d:function(t){t&&Cc(n),t&&Cc(r)}}}function ml(t){var n,r,e=t[3].quantity+"";return{c:function(){n=Fc(e),r=Fc(" × ")},m:function(t,e){Nc(t,n,e),Nc(t,r,e)},p:function(t,r){1&r&&e!==(e=t[3].quantity+"")&&Vc(n,e)},d:function(t){t&&Cc(n),t&&Cc(r)}}}function yl(t){var n,r,e,o=Ga(t[3].quantity)>1,i=Hf.price(t[3].price)+"",u=t[2].payment.extras_multiply_nop&&t[1]>1&&hl(t),c=o&&ml(t);return{c:function(){n=Bc("li"),u&&u.c(),r=zc(),c&&c.c(),e=Fc(i)},m:function(t,o){Nc(t,n,o),u&&u.m(n,null),Mc(n,r),c&&c.m(n,null),Mc(n,e)},p:function(t,a){t[2].payment.extras_multiply_nop&&t[1]>1?u?u.p(t,a):((u=hl(t)).c(),u.m(n,r)):u&&(u.d(1),u=null),1&a&&(o=Ga(t[3].quantity)>1),o?c?c.p(t,a):((c=ml(t)).c(),c.m(n,e)):c&&(c.d(1),c=null),1&a&&i!==(i=Hf.price(t[3].price)+"")&&Vc(e,i)},d:function(t){t&&Cc(n),u&&u.d(),c&&c.d()}}}function gl(t){for(var n,r=t[0].discounts,e=[],o=0;o<r.length;o+=1)e[o]=xl(Xf(t,r,o));return{c:function(){for(var t=0;t<e.length;t+=1)e[t].c();n=zc()},m:function(t,r){for(var o=0;o<e.length;o+=1)e[o].m(t,r);Nc(t,n,r)},p:function(t,o){if(1&o){var i;for(r=t[0].discounts,i=0;i<r.length;i+=1){var u=Xf(t,r,i);e[i]?e[i].p(u,o):(e[i]=xl(u),e[i].c(),e[i].m(n.parentNode,n))}for(;i<e.length;i+=1)e[i].d(1);e.length=r.length}},d:function(t){Dc(e,t),t&&Cc(n)}}}function bl(t){var n,r,e,o=t[6].discount+"";return{c:function(){n=Bc("li"),r=Fc(o),e=Fc("%")},m:function(t,o){Nc(t,n,o),Mc(n,r),Mc(n,e)},p:function(t,n){1&n&&o!==(o=t[6].discount+"")&&Vc(r,o)},d:function(t){t&&Cc(n)}}}function wl(t){var n,r,e=Hf.price(t[6].deduction)+"";return{c:function(){n=Bc("li"),r=Fc(e)},m:function(t,e){Nc(t,n,e),Mc(n,r)},p:function(t,n){1&n&&e!==(e=Hf.price(t[6].deduction)+"")&&Vc(r,e)},d:function(t){t&&Cc(n)}}}function xl(t){var n,r,e=Ha(t[6].discount),o=Ha(t[6].deduction),i=e&&bl(t),u=o&&wl(t);return{c:function(){i&&i.c(),n=Lc(),u&&u.c(),r=zc()},m:function(t,e){i&&i.m(t,e),Nc(t,n,e),u&&u.m(t,e),Nc(t,r,e)},p:function(t,c){1&c&&(e=Ha(t[6].discount)),e?i?i.p(t,c):((i=bl(t)).c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null),1&c&&(o=Ha(t[6].deduction)),o?u?u.p(t,c):((u=wl(t)).c(),u.m(r.parentNode,r)):u&&(u.d(1),u=null)},d:function(t){i&&i.d(t),t&&Cc(n),u&&u.d(t),t&&Cc(r)}}}function $l(t){var n,r,e,o=Hf.tax(t[0].service_tax)+"",i=t[0].extras&&_l(t);return{c:function(){n=Bc("td"),r=Fc(o),e=Lc(),i&&i.c(),qc(n,"class","text-right")},m:function(t,o){Nc(t,n,o),Mc(n,r),Mc(n,e),i&&i.m(n,null)},p:function(t,e){1&e&&o!==(o=Hf.tax(t[0].service_tax)+"")&&Vc(r,o),t[0].extras?i?i.p(t,e):((i=_l(t)).c(),i.m(n,null)):i&&(i.d(1),i=null)},d:function(t){t&&Cc(n),i&&i.d()}}}function _l(t){for(var n,r=t[0].extras,e=[],o=0;o<r.length;o+=1)e[o]=Ol(Qf(t,r,o));return{c:function(){n=Bc("ul");for(var t=0;t<e.length;t+=1)e[t].c();qc(n,"class","pl-3 m-0 list-unstyled")},m:function(t,r){Nc(t,n,r);for(var o=0;o<e.length;o+=1)e[o].m(n,null)},p:function(t,o){if(1&o){var i;for(r=t[0].extras,i=0;i<r.length;i+=1){var u=Qf(t,r,i);e[i]?e[i].p(u,o):(e[i]=Ol(u),e[i].c(),e[i].m(n,null))}for(;i<e.length;i+=1)e[i].d(1);e.length=r.length}},d:function(t){t&&Cc(n),Dc(e,t)}}}function Ol(t){var n,r,e=Hf.tax(t[3].tax)+"";return{c:function(){n=Bc("li"),r=Fc(e)},m:function(t,e){Nc(t,n,e),Mc(n,r)},p:function(t,n){1&n&&e!==(e=Hf.tax(t[3].tax)+"")&&Vc(r,e)},d:function(t){t&&Cc(n)}}}function Sl(t){var n,r,e,o,i,u,c,a,f,l,s,p,d,v,h=t[0].service_name+"",m=t[0].staff_name+"",y=t[1]>1&&nl(t),g=t[0].extras&&rl(t),b=t[0].discounts&&t[0].discounts.length>0&&ul(t);function w(t,n){return t[0].appointment_date?fl:al}var x=w(t),$=x(t),_=t[2].show.deposit&&ll(t);function O(t,n){return t[2].payment.from_backend?pl:sl}var S=O(t),E=S(t),j=t[2].show.taxes&&$l(t);return{c:function(){n=Bc("tr"),r=Bc("td"),y&&y.c(),e=Fc(h),o=Lc(),g&&g.c(),i=Lc(),b&&b.c(),u=Lc(),c=Bc("td"),$.c(),a=Lc(),f=Bc("td"),l=Fc(m),s=Lc(),_&&_.c(),p=Lc(),d=Bc("td"),E.c(),v=Lc(),j&&j.c(),qc(d,"class","text-right")},m:function(t,h){Nc(t,n,h),Mc(n,r),y&&y.m(r,null),Mc(r,e),Mc(r,o),g&&g.m(r,null),Mc(r,i),b&&b.m(r,null),Mc(n,u),Mc(n,c),$.m(c,null),Mc(n,a),Mc(n,f),Mc(f,l),Mc(n,s),_&&_.m(n,null),Mc(n,p),Mc(n,d),E.m(d,null),Mc(n,v),j&&j.m(n,null)},p:function(t,o){var u=eo(o,1)[0];t[1]>1?y?y.p(t,u):((y=nl(t)).c(),y.m(r,e)):y&&(y.d(1),y=null),1&u&&h!==(h=t[0].service_name+"")&&Vc(e,h),t[0].extras?g?g.p(t,u):((g=rl(t)).c(),g.m(r,i)):g&&(g.d(1),g=null),t[0].discounts&&t[0].discounts.length>0?b?b.p(t,u):((b=ul(t)).c(),b.m(r,null)):b&&(b.d(1),b=null),x===(x=w(t))&&$?$.p(t,u):($.d(1),($=x(t))&&($.c(),$.m(c,null))),1&u&&m!==(m=t[0].staff_name+"")&&Vc(l,m),t[2].show.deposit?_?_.p(t,u):((_=ll(t)).c(),_.m(n,p)):_&&(_.d(1),_=null),S===(S=O(t))&&E?E.p(t,u):(E.d(1),(E=S(t))&&(E.c(),E.m(d,null))),t[2].show.taxes?j?j.p(t,u):((j=$l(t)).c(),j.m(n,null)):j&&(j.d(1),j=null)},i:xc,o:xc,d:function(t){t&&Cc(n),y&&y.d(),g&&g.d(),b&&b.d(),$.d(),_&&_.d(),E.d(),j&&j.d()}}}function El(t,n,r){var e;Ac(t,Tf,(function(t){return r(2,e=t)}));var o,i=n.item;return t.$$set=function(t){"item"in t&&r(0,i=t.item)},t.$$.update=function(){1&t.$$.dirty&&r(1,o=i.number_of_persons)},[i,o,e]}Hf.tax=function(t){return null!==t?"included"===Tf.get().payment.tax_in_price?"("+Hf.price(t)+")":Hf.price(t):"-"};var jl=function(t){Wt(r,t);var n=Kf(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,El,Sl,jc,{item:0}),e}return r}(_a);function Al(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function Tl(t){var n,r,e=Hf.price(t[0].payment.subtotal.deposit)+"";return{c:function(){n=Bc("th"),r=Fc(e),qc(n,"class","text-right")},m:function(t,e){Nc(t,n,e),Mc(n,r)},p:function(t,n){1&n&&e!==(e=Hf.price(t[0].payment.subtotal.deposit)+"")&&Vc(r,e)},d:function(t){t&&Cc(n)}}}function kl(t){var n;return{c:function(){n=Bc("th")},m:function(t,r){Nc(t,n,r)},d:function(t){t&&Cc(n)}}}function Rl(t){var n,r,e,o,i,u,c,a,f,l=Hf.price(t[0].payment.subtotal.price)+"",s=t[0].show.deposit&&Tl(t),p=t[0].show.taxes&&kl();return{c:function(){n=Bc("tr"),r=Bc("th"),e=Lc(),(o=Bc("th")).textContent="".concat(Vf.l10n.subtotal),i=Lc(),s&&s.c(),u=Lc(),c=Bc("th"),a=Fc(l),f=Lc(),p&&p.c(),Kc(r,"border-left-color","white"),Kc(r,"border-bottom-color","white"),qc(o,"colspan","2"),qc(c,"class","text-right")},m:function(t,l){Nc(t,n,l),Mc(n,r),Mc(n,e),Mc(n,o),Mc(n,i),s&&s.m(n,null),Mc(n,u),Mc(n,c),Mc(c,a),Mc(n,f),p&&p.m(n,null)},p:function(t,r){var e=eo(r,1)[0];t[0].show.deposit?s?s.p(t,e):((s=Tl(t)).c(),s.m(n,u)):s&&(s.d(1),s=null),1&e&&l!==(l=Hf.price(t[0].payment.subtotal.price)+"")&&Vc(a,l),t[0].show.taxes?p||((p=kl()).c(),p.m(n,null)):p&&(p.d(1),p=null)},i:xc,o:xc,d:function(t){t&&Cc(n),s&&s.d(),p&&p.d()}}}function Pl(t,n,r){var e;return Ac(t,Tf,(function(t){return r(0,e=t)})),[e]}var Il=function(t){Wt(r,t);var n=Al(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,Pl,Rl,jc,{}),e}return r}(_a);function Ml(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function Nl(t){var n,r,e,o,i,u=t[0].payment.coupon.code+"";return{c:function(){n=Bc("div"),r=Bc("small"),e=Fc("("),o=Fc(u),i=Fc(")")},m:function(t,u){Nc(t,n,u),Mc(n,r),Mc(r,e),Mc(r,o),Mc(r,i)},p:function(t,n){1&n&&u!==(u=t[0].payment.coupon.code+"")&&Vc(o,u)},d:function(t){t&&Cc(n)}}}function Cl(t){var n,r=Hf.price(0)+"";return{c:function(){n=Fc(r)},m:function(t,r){Nc(t,n,r)},p:xc,d:function(t){t&&Cc(n)}}}function Dl(t){var n,r,e=Ha(t[0].payment.coupon.discount),o=Ha(t[0].payment.coupon.deduction),i=e&&Bl(t),u=o&&Fl(t);return{c:function(){i&&i.c(),n=Lc(),u&&u.c(),r=zc()},m:function(t,e){i&&i.m(t,e),Nc(t,n,e),u&&u.m(t,e),Nc(t,r,e)},p:function(t,c){1&c&&(e=Ha(t[0].payment.coupon.discount)),e?i?i.p(t,c):((i=Bl(t)).c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null),1&c&&(o=Ha(t[0].payment.coupon.deduction)),o?u?u.p(t,c):((u=Fl(t)).c(),u.m(r.parentNode,r)):u&&(u.d(1),u=null)},d:function(t){i&&i.d(t),t&&Cc(n),u&&u.d(t),t&&Cc(r)}}}function Bl(t){var n,r,e,o=t[0].payment.coupon.discount+"";return{c:function(){n=Bc("div"),r=Fc(o),e=Fc("%")},m:function(t,o){Nc(t,n,o),Mc(n,r),Mc(n,e)},p:function(t,n){1&n&&o!==(o=t[0].payment.coupon.discount+"")&&Vc(r,o)},d:function(t){t&&Cc(n)}}}function Fl(t){var n,r,e=Hf.price(t[0].payment.coupon.deduction)+"";return{c:function(){n=Bc("div"),r=Fc(e)},m:function(t,e){Nc(t,n,e),Mc(n,r)},p:function(t,n){1&n&&e!==(e=Hf.price(t[0].payment.coupon.deduction)+"")&&Vc(r,e)},d:function(t){t&&Cc(n)}}}function Ll(t){var n;return{c:function(){n=Bc("th")},m:function(t,r){Nc(t,n,r)},d:function(t){t&&Cc(n)}}}function zl(t){var n,r,e,o,i,u,c,a,f,l,s=Vf.l10n.coupon_discount+"",p=t[0].payment.coupon&&Nl(t);function d(t,n){return t[0].payment.coupon?Dl:Cl}var v=d(t),h=v(t),m=t[0].show.taxes&&Ll();return{c:function(){n=Bc("tr"),r=Bc("th"),e=Lc(),o=Bc("th"),i=Fc(s),u=Lc(),p&&p.c(),a=Lc(),f=Bc("th"),h.c(),l=Lc(),m&&m.c(),Kc(r,"border-left-color","white"),Kc(r,"border-bottom-color","white"),qc(o,"colspan",c=2+t[0].show.deposit),qc(f,"class","text-right")},m:function(t,c){Nc(t,n,c),Mc(n,r),Mc(n,e),Mc(n,o),Mc(o,i),Mc(o,u),p&&p.m(o,null),Mc(n,a),Mc(n,f),h.m(f,null),Mc(n,l),m&&m.m(n,null)},p:function(t,r){var e=eo(r,1)[0];t[0].payment.coupon?p?p.p(t,e):((p=Nl(t)).c(),p.m(o,null)):p&&(p.d(1),p=null),1&e&&c!==(c=2+t[0].show.deposit)&&qc(o,"colspan",c),v===(v=d(t))&&h?h.p(t,e):(h.d(1),(h=v(t))&&(h.c(),h.m(f,null))),t[0].show.taxes?m||((m=Ll()).c(),m.m(n,null)):m&&(m.d(1),m=null)},i:xc,o:xc,d:function(t){t&&Cc(n),p&&p.d(),h.d(),m&&m.d()}}}function Ul(t,n,r){var e;return Ac(t,Tf,(function(t){return r(0,e=t)})),[e]}var ql=function(t){Wt(r,t);var n=Ml(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,Ul,zl,jc,{}),e}return r}(_a);function Gl(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function Wl(t){var n,r=Hf.price(0)+"";return{c:function(){n=Fc(r)},m:function(t,r){Nc(t,n,r)},p:xc,d:function(t){t&&Cc(n)}}}function Jl(t){var n,r=t[0].payment.group_discount+"";return{c:function(){n=Fc(r)},m:function(t,r){Nc(t,n,r)},p:function(t,e){1&e&&r!==(r=t[0].payment.group_discount+"")&&Vc(n,r)},d:function(t){t&&Cc(n)}}}function Vl(t){var n;return{c:function(){n=Bc("th")},m:function(t,r){Nc(t,n,r)},d:function(t){t&&Cc(n)}}}function Hl(t){var n,r,e,o,i,u,c,a,f,l=Vf.l10n.group_discount+"";function s(t,n){return t[0].payment.group_discount?Jl:Wl}var p=s(t),d=p(t),v=t[0].show.taxes&&Vl();return{c:function(){n=Bc("tr"),r=Bc("th"),e=Lc(),o=Bc("th"),i=Fc(l),c=Lc(),a=Bc("th"),d.c(),f=Lc(),v&&v.c(),Kc(r,"border-left-color","#fff"),Kc(r,"border-bottom-color","#fff"),qc(o,"colspan",u=2+t[0].show.deposit),qc(a,"class","text-right")},m:function(t,u){Nc(t,n,u),Mc(n,r),Mc(n,e),Mc(n,o),Mc(o,i),Mc(n,c),Mc(n,a),d.m(a,null),Mc(n,f),v&&v.m(n,null)},p:function(t,r){var e=eo(r,1)[0];1&e&&u!==(u=2+t[0].show.deposit)&&qc(o,"colspan",u),p===(p=s(t))&&d?d.p(t,e):(d.d(1),(d=p(t))&&(d.c(),d.m(a,null))),t[0].show.taxes?v||((v=Vl()).c(),v.m(n,null)):v&&(v.d(1),v=null)},i:xc,o:xc,d:function(t){t&&Cc(n),d.d(),v&&v.d()}}}function Kl(t,n,r){var e;return Ac(t,Tf,(function(t){return r(0,e=t)})),[e]}var Ql=function(t){Wt(r,t);var n=Gl(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,Kl,Hl,jc,{}),e}return r}(_a);function Xl(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function Yl(t,n,r){var e=oo(t).call(t);return e[1]=n[r],e}function Zl(t,n,r){var e=oo(t).call(t);return e[1]=n[r],e}function ts(t){var n,r,e,o=t[1].title+"";return{c:function(){n=Bc("small"),r=Fc(o),e=Bc("br")},m:function(t,o){Nc(t,n,o),Mc(n,r),Nc(t,e,o)},p:function(t,n){1&n&&o!==(o=t[1].title+"")&&Vc(r,o)},d:function(t){t&&Cc(n),t&&Cc(e)}}}function ns(t){var n,r,e,o=t[1].discount+"";return{c:function(){n=Fc(o),r=Fc("%"),e=Bc("br")},m:function(t,o){Nc(t,n,o),Nc(t,r,o),Nc(t,e,o)},p:function(t,r){1&r&&o!==(o=t[1].discount+"")&&Vc(n,o)},d:function(t){t&&Cc(n),t&&Cc(r),t&&Cc(e)}}}function rs(t){var n,r,e=Hf.price(t[1].deduction)+"";return{c:function(){n=Fc(e),r=Bc("br")},m:function(t,e){Nc(t,n,e),Nc(t,r,e)},p:function(t,r){1&r&&e!==(e=Hf.price(t[1].deduction)+"")&&Vc(n,e)},d:function(t){t&&Cc(n),t&&Cc(r)}}}function es(t){var n,r,e=Ha(t[1].discount),o=Ha(t[1].deduction),i=e&&ns(t),u=o&&rs(t);return{c:function(){i&&i.c(),n=Lc(),u&&u.c(),r=zc()},m:function(t,e){i&&i.m(t,e),Nc(t,n,e),u&&u.m(t,e),Nc(t,r,e)},p:function(t,c){1&c&&(e=Ha(t[1].discount)),e?i?i.p(t,c):((i=ns(t)).c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null),1&c&&(o=Ha(t[1].deduction)),o?u?u.p(t,c):((u=rs(t)).c(),u.m(r.parentNode,r)):u&&(u.d(1),u=null)},d:function(t){i&&i.d(t),t&&Cc(n),u&&u.d(t),t&&Cc(r)}}}function os(t){var n;return{c:function(){n=Bc("th")},m:function(t,r){Nc(t,n,r)},d:function(t){t&&Cc(n)}}}function is(t){for(var n,r,e,o,i,u,c,a,f,l,s,p=Vf.l10n.discount+"",d=t[0].payment.discounts,v=[],h=0;h<d.length;h+=1)v[h]=ts(Zl(t,d,h));for(var m=t[0].payment.discounts,y=[],g=0;g<m.length;g+=1)y[g]=es(Yl(t,m,g));var b=t[0].show.taxes&&os();return{c:function(){n=Bc("tr"),r=Bc("th"),e=Lc(),o=Bc("th"),i=Fc(p),u=Bc("br"),c=Lc();for(var d=0;d<v.length;d+=1)v[d].c();f=Lc(),l=Bc("th");for(var h=0;h<y.length;h+=1)y[h].c();s=Lc(),b&&b.c(),Kc(r,"border-left-color","#fff"),Kc(r,"border-bottom-color","#fff"),qc(o,"colspan",a=2+t[0].show.deposit),qc(l,"class","text-right")},m:function(t,a){Nc(t,n,a),Mc(n,r),Mc(n,e),Mc(n,o),Mc(o,i),Mc(o,u),Mc(o,c);for(var p=0;p<v.length;p+=1)v[p].m(o,null);Mc(n,f),Mc(n,l);for(var d=0;d<y.length;d+=1)y[d].m(l,null);Mc(n,s),b&&b.m(n,null)},p:function(t,r){var e=eo(r,1)[0];if(1&e){var i;for(d=t[0].payment.discounts,i=0;i<d.length;i+=1){var u=Zl(t,d,i);v[i]?v[i].p(u,e):(v[i]=ts(u),v[i].c(),v[i].m(o,null))}for(;i<v.length;i+=1)v[i].d(1);v.length=d.length}if(1&e&&a!==(a=2+t[0].show.deposit)&&qc(o,"colspan",a),1&e){var c;for(m=t[0].payment.discounts,c=0;c<m.length;c+=1){var f=Yl(t,m,c);y[c]?y[c].p(f,e):(y[c]=es(f),y[c].c(),y[c].m(l,null))}for(;c<y.length;c+=1)y[c].d(1);y.length=m.length}t[0].show.taxes?b||((b=os()).c(),b.m(n,null)):b&&(b.d(1),b=null)},i:xc,o:xc,d:function(t){t&&Cc(n),Dc(v,t),Dc(y,t),b&&b.d()}}}function us(t,n,r){var e;return Ac(t,Tf,(function(t){return r(0,e=t)})),[e]}var cs=function(t){Wt(r,t);var n=Xl(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,us,is,jc,{}),e}return r}(_a);function as(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function fs(t,n,r){var e=oo(t).call(t);return e[1]=n[r],e}function ls(t){var n,r,e=Hf.price(t[1].tax)+"";return{c:function(){n=Bc("th"),r=Fc(e),qc(n,"class","text-right")},m:function(t,e){Nc(t,n,e),Mc(n,r)},p:function(t,n){1&n&&e!==(e=Hf.price(t[1].tax)+"")&&Vc(r,e)},d:function(t){t&&Cc(n)}}}function ss(t){var n,r,e,o,i,u,c,a,f,l,s,p=t[1].reason+"",d=Hf.price(t[1].amount)+"",v=t[0].show.taxes&&ls(t);return{c:function(){n=Bc("tr"),r=Bc("th"),e=Lc(),o=Bc("th"),i=Fc(p),c=Lc(),a=Bc("th"),f=Fc(d),l=Lc(),v&&v.c(),s=Lc(),Kc(r,"border-left-color","#fff"),Kc(r,"border-bottom-color","#fff"),qc(o,"colspan",u=2+t[0].show.deposit),qc(a,"class","text-right")},m:function(t,u){Nc(t,n,u),Mc(n,r),Mc(n,e),Mc(n,o),Mc(o,i),Mc(n,c),Mc(n,a),Mc(a,f),Mc(n,l),v&&v.m(n,null),Mc(n,s)},p:function(t,r){1&r&&p!==(p=t[1].reason+"")&&Vc(i,p),1&r&&u!==(u=2+t[0].show.deposit)&&qc(o,"colspan",u),1&r&&d!==(d=Hf.price(t[1].amount)+"")&&Vc(f,d),t[0].show.taxes?v?v.p(t,r):((v=ls(t)).c(),v.m(n,s)):v&&(v.d(1),v=null)},d:function(t){t&&Cc(n),v&&v.d()}}}function ps(t){for(var n,r=t[0].adjustments,e=[],o=0;o<r.length;o+=1)e[o]=ss(fs(t,r,o));return{c:function(){for(var t=0;t<e.length;t+=1)e[t].c();n=zc()},m:function(t,r){for(var o=0;o<e.length;o+=1)e[o].m(t,r);Nc(t,n,r)},p:function(t,o){var i=eo(o,1)[0];if(1&i){var u;for(r=t[0].adjustments,u=0;u<r.length;u+=1){var c=fs(t,r,u);e[u]?e[u].p(c,i):(e[u]=ss(c),e[u].c(),e[u].m(n.parentNode,n))}for(;u<e.length;u+=1)e[u].d(1);e.length=r.length}},i:xc,o:xc,d:function(t){Dc(e,t),t&&Cc(n)}}}function ds(t,n,r){var e;return Ac(t,Tf,(function(t){return r(0,e=t)})),[e]}var vs=function(t){Wt(r,t);var n=as(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,ds,ps,jc,{}),e}return r}(_a);function hs(t){return u.default.get(ajaxurl,{action:"bookly_get_payment_details",payment_id:t,csrf_token:Of}).done((function(t){t.success?(ms(),Tf.set(t.data)):Tf.reset()}))}function ms(){kf.reset(),Rf.reset(),Pf.reset(),If.reset()}function ys(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function gs(t){var n,r,e,o,i,u;return{c:function(){n=Bc("div"),(r=Bc("label")).textContent="".concat(Vf.l10n.tax),e=Lc(),o=Bc("input"),qc(r,"for","bookly-adjustment-tax"),qc(o,"class","form-control"),qc(o,"type","number"),qc(o,"step","1"),qc(o,"id","bookly-adjustment-tax"),qc(n,"class","form-group")},m:function(c,a){Nc(c,n,a),Mc(n,r),Mc(n,e),Mc(n,o),Hc(o,t[4]),i||(u=Uc(o,"input",t[9]),i=!0)},p:function(t,n){16&n&&Wc(o.value)!==t[4]&&Hc(o,t[4])},d:function(t){t&&Cc(n),i=!1,u()}}}function bs(t){var n,r,e,o,i,u,c,a,f,l,s,p,d,v,h,m,y,g,b,w,x,$,_,O=t[1].show.taxes&&gs(t);return(b=new Ia({props:{class:"btn-success",caption:Vf.l10n.apply,loading:t[0]}})).$on("click",t[6]),{c:function(){n=Bc("tr"),r=Bc("th"),e=Lc(),o=Bc("th"),i=Bc("div"),(u=Bc("label")).textContent="".concat(Vf.l10n.reason),c=Lc(),a=Bc("textarea"),f=Lc(),l=Bc("div"),(s=Bc("label")).textContent="".concat(Vf.l10n.amount),p=Lc(),d=Bc("input"),v=Lc(),O&&O.c(),h=Lc(),m=Bc("div"),(y=Bc("button")).textContent="".concat(Vf.l10n.cancel),g=Lc(),ga(b.$$.fragment),Kc(r,"border-left-color","#fff"),Kc(r,"border-bottom-color","#fff"),qc(u,"for","bookly-adjustment-reason"),qc(a,"class","form-control"),qc(a,"id","bookly-adjustment-reason"),qc(i,"class","form-group"),qc(s,"for","bookly-adjustment-amount"),qc(d,"class","form-control"),qc(d,"type","number"),qc(d,"step","1"),qc(d,"id","bookly-adjustment-amount"),qc(l,"class","form-group"),qc(y,"class","btn btn-default"),qc(m,"class","text-right"),qc(o,"colspan",w=3+t[1].show.deposit+t[1].show.taxes),Kc(o,"font-weight","normal"),Qc(n,"d-none",!t[5])},m:function(w,S){Nc(w,n,S),Mc(n,r),Mc(n,e),Mc(n,o),Mc(o,i),Mc(i,u),Mc(i,c),Mc(i,a),Hc(a,t[2]),Mc(o,f),Mc(o,l),Mc(l,s),Mc(l,p),Mc(l,d),Hc(d,t[3]),Mc(o,v),O&&O.m(o,null),Mc(o,h),Mc(o,m),Mc(m,y),Mc(m,g),ba(b,m,null),x=!0,$||(_=[Uc(a,"input",t[7]),Uc(d,"input",t[8]),Uc(y,"click",t[10])],$=!0)},p:function(t,r){var e=eo(r,1)[0];4&e&&Hc(a,t[2]),8&e&&Wc(d.value)!==t[3]&&Hc(d,t[3]),t[1].show.taxes?O?O.p(t,e):((O=gs(t)).c(),O.m(o,h)):O&&(O.d(1),O=null);var i={};1&e&&(i.loading=t[0]),b.$set(i),(!x||2&e&&w!==(w=3+t[1].show.deposit+t[1].show.taxes))&&qc(o,"colspan",w),32&e&&Qc(n,"d-none",!t[5])},i:function(t){x||(ma(b.$$.fragment,t),x=!0)},o:function(t){ya(b.$$.fragment,t),x=!1},d:function(t){t&&Cc(n),O&&O.d(),wa(b),$=!1,Sc(_)}}}function ws(t,n,r){var e,o,i,c,a;Ac(t,Tf,(function(t){return r(1,e=t)})),Ac(t,Rf,(function(t){return r(2,o=t)})),Ac(t,Pf,(function(t){return r(3,i=t)})),Ac(t,If,(function(t){return r(4,c=t)})),Ac(t,kf,(function(t){return r(5,a=t)}));var f=!1;return[f,e,o,i,c,a,function(){var t,n,a,l;r(0,f=!0),(t=e.payment.id,n=o,a=i,l=c,u.default.ajax({url:ajaxurl,data:{action:"bookly_pro_add_payment_adjustment",payment_id:t,reason:n,amount:a,tax:l,csrf_token:Of},dataType:"json",type:"POST",success:function(n){if(n.success){ms(),hs(t);var r=u.default("table#bookly-payments-list.dataTable, table#bookly-appointments-list.dataTable");r.length&&r.DataTable().ajax.reload()}}})).done((function(){return r(0,f=!1)}))},function(){o=this.value,Rf.set(o)},function(){i=Wc(this.value),Pf.set(i)},function(){c=Wc(this.value),If.set(c)},function(){return Ic(kf,a=!a,a)}]}var xs=function(t){Wt(r,t);var n=ys(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,ws,bs,jc,{}),e}return r}(_a);function $s(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function _s(t){var n,r,e;return{c:function(){(n=Bc("button")).textContent="".concat(Vf.l10n.manual_adjustment),qc(n,"class","btn btn-default")},m:function(o,i){Nc(o,n,i),r||(e=Uc(n,"click",t[1]),r=!0)},p:xc,i:xc,o:xc,d:function(t){t&&Cc(n),r=!1,e()}}}function Os(t,n,r){var e;Ac(t,kf,(function(t){return r(0,e=t)}));return[e,function(){return Ic(kf,e=!e,e)}]}var Ss=function(t){Wt(r,t);var n=$s(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,Os,_s,jc,{}),e}return r}(_a);function Es(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function js(t){var n,r,e,o;n=new Ss({});var i=t[1].payment.total!==t[1].payment.paid&&Ts(t);return{c:function(){ga(n.$$.fragment),r=Lc(),i&&i.c(),e=zc()},m:function(t,u){ba(n,t,u),Nc(t,r,u),i&&i.m(t,u),Nc(t,e,u),o=!0},p:function(t,n){t[1].payment.total!==t[1].payment.paid?i?(i.p(t,n),2&n&&ma(i,1)):((i=Ts(t)).c(),ma(i,1),i.m(e.parentNode,e)):i&&(va(),ya(i,1,1,(function(){i=null})),ha())},i:function(t){o||(ma(n.$$.fragment,t),ma(i),o=!0)},o:function(t){ya(n.$$.fragment,t),ya(i),o=!1},d:function(t){wa(n,t),t&&Cc(r),i&&i.d(t),t&&Cc(e)}}}function As(t){var n,r;return(n=new Ia({props:{class:"btn-success",loading:t[0],caption:Vf.l10n.bind_payment}})).$on("click",t[3]),{c:function(){ga(n.$$.fragment)},m:function(t,e){ba(n,t,e),r=!0},p:function(t,r){var e={};1&r&&(e.loading=t[0]),n.$set(e)},i:function(t){r||(ma(n.$$.fragment,t),r=!0)},o:function(t){ya(n.$$.fragment,t),r=!1},d:function(t){wa(n,t)}}}function Ts(t){var n,r;return(n=new Ia({props:{class:"btn-success",loading:t[0],caption:Vf.l10n.complete_payment}})).$on("click",t[4]),{c:function(){ga(n.$$.fragment)},m:function(t,e){ba(n,t,e),r=!0},p:function(t,r){var e={};1&r&&(e.loading=t[0]),n.$set(e)},i:function(t){r||(ma(n.$$.fragment,t),r=!0)},o:function(t){ya(n.$$.fragment,t),r=!1},d:function(t){wa(n,t)}}}function ks(t){var n,r,e,o,i,u,c,a,f=[As,js],l=[];function s(t,n){return"attach"===t[2]?0:1}return i=s(t),u=l[i]=f[i](t),{c:function(){n=Bc("tr"),r=Bc("th"),e=Lc(),o=Bc("th"),u.c(),Kc(r,"border-left-color","#fff"),Kc(r,"border-bottom-color","#fff"),qc(o,"colspan",c=3+t[1].show.deposit+t[1].show.taxes),qc(o,"class","text-right")},m:function(t,u){Nc(t,n,u),Mc(n,r),Mc(n,e),Mc(n,o),l[i].m(o,null),a=!0},p:function(t,n){var r=eo(n,1)[0],e=i;(i=s(t))===e?l[i].p(t,r):(va(),ya(l[e],1,1,(function(){l[e]=null})),ha(),(u=l[i])?u.p(t,r):(u=l[i]=f[i](t)).c(),ma(u,1),u.m(o,null)),(!a||2&r&&c!==(c=3+t[1].show.deposit+t[1].show.taxes))&&qc(o,"colspan",c)},i:function(t){a||(ma(u),a=!0)},o:function(t){ya(u),a=!1},d:function(t){t&&Cc(n),l[i].d()}}}function Rs(t,n,r){var e,o;Ac(t,Tf,(function(t){return r(1,e=t)})),Ac(t,Af,(function(t){return r(2,o=t)}));var i,c=(i="cxt",Yc().$$.context.get(i)),a=!1;return[a,e,o,function(){var t,n;r(0,a=!0),(t=e.payment.id,n=c.opts,u.default.ajax({url:ajaxurl,data:{action:"bookly_get_payment_info",payment_id:t,csrf_token:Of},dataType:"json",type:"GET",success:function(r){r.success&&(n.customer.payment_id=t,n.customer.payment_type=r.data.payment_type,n.customer.payment_title=r.data.payment_title,n.customer.payment_action="attach",n.done())}})).done((function(){c.modal.hide(),r(0,a=!1)}))},function(){var t,n;r(0,a=!0),(t=e.payment.id,n=c.opts,u.default.ajax({url:ajaxurl,data:{action:"bookly_complete_payment",payment_id:t,csrf_token:Of},dataType:"json",type:"POST",success:function(r){if(r.success){hs(t),n.customer&&(n.customer.payment_id=t,n.customer.payment_title=r.data.payment_title),n.done();var e=u.default("table#bookly-payments-list.dataTable, table#bookly-appointments-list.dataTable");e.length&&e.DataTable().ajax.reload()}}})).done((function(){return r(0,a=!1)}))}]}var Ps=function(t){Wt(r,t);var n=Es(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,Rs,ks,jc,{}),e}return r}(_a);function Is(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function Ms(t){var n;return{c:function(){(n=Bc("td")).textContent="-",qc(n,"class","text-right")},m:function(t,r){Nc(t,n,r)},d:function(t){t&&Cc(n)}}}function Ns(t){var n,r,e,o,i,u,c,a,f,l,s,p,d=Vf.types[t[0].payment.type]+"",v=Vf.l10n.price_correction+"",h=Hf.price(t[0].payment.price_correction)+"",m=t[0].show.taxes&&Ms();return{c:function(){n=Bc("tr"),r=Bc("th"),e=Lc(),o=Bc("th"),i=Fc(d),u=Fc(" - "),c=Fc(v),f=Lc(),l=Bc("th"),s=Fc(h),p=Lc(),m&&m.c(),Kc(r,"border-left-color","#fff"),Kc(r,"border-bottom-color","#fff"),qc(o,"colspan",a=2+t[0].show.deposit),qc(l,"class","text-right")},m:function(t,a){Nc(t,n,a),Mc(n,r),Mc(n,e),Mc(n,o),Mc(o,i),Mc(o,u),Mc(o,c),Mc(n,f),Mc(n,l),Mc(l,s),Mc(n,p),m&&m.m(n,null)},p:function(t,r){var e=eo(r,1)[0];1&e&&d!==(d=Vf.types[t[0].payment.type]+"")&&Vc(i,d),1&e&&a!==(a=2+t[0].show.deposit)&&qc(o,"colspan",a),1&e&&h!==(h=Hf.price(t[0].payment.price_correction)+"")&&Vc(s,h),t[0].show.taxes?m||((m=Ms()).c(),m.m(n,null)):m&&(m.d(1),m=null)},i:xc,o:xc,d:function(t){t&&Cc(n),m&&m.d()}}}function Cs(t,n,r){var e;return Ac(t,Tf,(function(t){return r(0,e=t)})),[e]}var Ds=function(t){Wt(r,t);var n=Is(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,Cs,Ns,jc,{}),e}return r}(_a);function Bs(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function Fs(t){var n,r,e,o,i,u=Hf.price(t[0].payment.tax_paid)+"";return{c:function(){n=Bc("th"),r=Bc("i"),e=Fc("("),o=Fc(u),i=Fc(")"),qc(n,"class","text-right")},m:function(t,u){Nc(t,n,u),Mc(n,r),Mc(r,e),Mc(r,o),Mc(r,i)},p:function(t,n){1&n&&u!==(u=Hf.price(t[0].payment.tax_paid)+"")&&Vc(o,u)},d:function(t){t&&Cc(n)}}}function Ls(t){var n,r,e,o,i,u,c,a,f,l,s,p=Hf.price(t[0].payment.paid)+"",d=t[0].show.taxes&&Fs(t);return{c:function(){n=Bc("tr"),r=Bc("th"),e=Lc(),o=Bc("th"),(i=Bc("i")).textContent="".concat(Vf.l10n.paid),c=Lc(),a=Bc("th"),f=Bc("i"),l=Fc(p),s=Lc(),d&&d.c(),Kc(r,"border-left-color","white"),Kc(r,"border-bottom-color","white"),qc(o,"colspan",u=2+t[0].show.deposit),qc(a,"class","text-right")},m:function(t,u){Nc(t,n,u),Mc(n,r),Mc(n,e),Mc(n,o),Mc(o,i),Mc(n,c),Mc(n,a),Mc(a,f),Mc(f,l),Mc(n,s),d&&d.m(n,null)},p:function(t,r){var e=eo(r,1)[0];1&e&&u!==(u=2+t[0].show.deposit)&&qc(o,"colspan",u),1&e&&p!==(p=Hf.price(t[0].payment.paid)+"")&&Vc(l,p),t[0].show.taxes?d?d.p(t,e):((d=Fs(t)).c(),d.m(n,null)):d&&(d.d(1),d=null)},i:xc,o:xc,d:function(t){t&&Cc(n),d&&d.d()}}}function zs(t,n,r){var e;return Ac(t,Tf,(function(t){return r(0,e=t)})),[e]}var Us=function(t){Wt(r,t);var n=Bs(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,zs,Ls,jc,{}),e}return r}(_a);function qs(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function Gs(t){var n,r,e,o,i,u=Hf.price(Ha(t[0].payment.tax_total)-Ha(t[0].payment.tax_paid))+"";return{c:function(){n=Bc("th"),r=Bc("i"),e=Fc("("),o=Fc(u),i=Fc(")"),qc(n,"class","text-right")},m:function(t,u){Nc(t,n,u),Mc(n,r),Mc(r,e),Mc(r,o),Mc(r,i)},p:function(t,n){1&n&&u!==(u=Hf.price(Ha(t[0].payment.tax_total)-Ha(t[0].payment.tax_paid))+"")&&Vc(o,u)},d:function(t){t&&Cc(n)}}}function Ws(t){var n,r,e,o,i,u,c,a,f,l,s,p=Hf.price(Ha(t[0].payment.total)-Ha(t[0].payment.paid))+"",d=t[0].show.taxes&&Gs(t);return{c:function(){n=Bc("tr"),r=Bc("th"),e=Lc(),o=Bc("th"),(i=Bc("i")).textContent="".concat(Vf.l10n.due),c=Lc(),a=Bc("th"),f=Bc("i"),l=Fc(p),s=Lc(),d&&d.c(),Kc(r,"border-left-color","white"),Kc(r,"border-bottom-color","white"),qc(o,"colspan",u=2+t[0].show.deposit),qc(a,"class","text-right")},m:function(t,u){Nc(t,n,u),Mc(n,r),Mc(n,e),Mc(n,o),Mc(o,i),Mc(n,c),Mc(n,a),Mc(a,f),Mc(f,l),Mc(n,s),d&&d.m(n,null)},p:function(t,r){var e=eo(r,1)[0];1&e&&u!==(u=2+t[0].show.deposit)&&qc(o,"colspan",u),1&e&&p!==(p=Hf.price(Ha(t[0].payment.total)-Ha(t[0].payment.paid))+"")&&Vc(l,p),t[0].show.taxes?d?d.p(t,e):((d=Gs(t)).c(),d.m(n,null)):d&&(d.d(1),d=null)},i:xc,o:xc,d:function(t){t&&Cc(n),d&&d.d()}}}function Js(t,n,r){var e;return Ac(t,Tf,(function(t){return r(0,e=t)})),[e]}var Vs=function(t){Wt(r,t);var n=qs(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,Js,Ws,jc,{}),e}return r}(_a);function Hs(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function Ks(t){var n,r,e,o,i=Hf.price(t[0].payment.tax_total)+"";return{c:function(){n=Bc("th"),r=Fc("("),e=Fc(i),o=Fc(")"),qc(n,"class","text-right")},m:function(t,i){Nc(t,n,i),Mc(n,r),Mc(n,e),Mc(n,o)},p:function(t,n){1&n&&i!==(i=Hf.price(t[0].payment.tax_total)+"")&&Vc(e,i)},d:function(t){t&&Cc(n)}}}function Qs(t){var n,r,e,o,i,u,c,a,f,l,s=Vf.l10n.total+"",p=Hf.price(t[0].payment.total)+"",d=t[0].show.taxes&&Ks(t);return{c:function(){n=Bc("tr"),r=Bc("th"),e=Lc(),o=Bc("th"),i=Fc(s),c=Lc(),a=Bc("th"),f=Fc(p),l=Lc(),d&&d.c(),Kc(r,"border-left-color","#fff"),Kc(r,"border-bottom-color","#fff"),qc(o,"colspan",u=2+t[0].show.deposit),qc(a,"class","text-right")},m:function(t,u){Nc(t,n,u),Mc(n,r),Mc(n,e),Mc(n,o),Mc(o,i),Mc(n,c),Mc(n,a),Mc(a,f),Mc(n,l),d&&d.m(n,null)},p:function(t,r){var e=eo(r,1)[0];1&e&&u!==(u=2+t[0].show.deposit)&&qc(o,"colspan",u),1&e&&p!==(p=Hf.price(t[0].payment.total)+"")&&Vc(f,p),t[0].show.taxes?d?d.p(t,e):((d=Ks(t)).c(),d.m(n,null)):d&&(d.d(1),d=null)},i:xc,o:xc,d:function(t){t&&Cc(n),d&&d.d()}}}function Xs(t,n,r){var e;return Ac(t,Tf,(function(t){return r(0,e=t)})),[e]}var Ys=function(t){Wt(r,t);var n=Hs(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,Xs,Qs,jc,{}),e}return r}(_a);function Zs(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function tp(t){var n,r,e,o=t[4].default,i=Tc(o,t,t[3],null);return{c:function(){n=Bc("div"),i&&i.c(),qc(n,"class",r="alert-"+t[1]+" "+t[2])},m:function(t,r){Nc(t,n,r),i&&i.m(n,null),e=!0},p:function(t,u){i&&i.p&&8&u&&Rc(i,o,t,t[3],u,null,null),(!e||6&u&&r!==(r="alert-"+t[1]+" "+t[2]))&&qc(n,"class",r)},i:function(t){e||(ma(i,t),e=!0)},o:function(t){ya(i,t),e=!1},d:function(t){t&&Cc(n),i&&i.d(t)}}}function np(t){var n,r,e=t[0]&&tp(t);return{c:function(){e&&e.c(),n=zc()},m:function(t,o){e&&e.m(t,o),Nc(t,n,o),r=!0},p:function(t,r){var o=eo(r,1)[0];t[0]?e?(e.p(t,o),1&o&&ma(e,1)):((e=tp(t)).c(),ma(e,1),e.m(n.parentNode,n)):e&&(va(),ya(e,1,1,(function(){e=null})),ha())},i:function(t){r||(ma(e),r=!0)},o:function(t){ya(e),r=!1},d:function(t){e&&e.d(t),t&&Cc(n)}}}function rp(t,n,r){var e=n.$$slots,o=void 0===e?{}:e,i=n.$$scope,u=n.show,c=void 0===u||u,a=n.type,f=void 0===a?"info":a,l=n.class,s=void 0===l?"alert":l;return t.$$set=function(t){"show"in t&&r(0,c=t.show),"type"in t&&r(1,f=t.type),"class"in t&&r(2,s=t.class),"$$scope"in t&&r(3,i=t.$$scope)},[c,f,s,i,o]}var ep=function(t){Wt(r,t);var n=Zs(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,rp,np,jc,{show:0,type:1,class:2}),e}return r}(_a);function op(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function ip(t,n,r){var e=oo(t).call(t);return e[8]=n[r],e}function up(t){var n,r;return n=new ep({props:{type:"danger",$$slots:{default:[fp]},$$scope:{ctx:t}}}),{c:function(){ga(n.$$.fragment)},m:function(t,e){ba(n,t,e),r=!0},p:function(t,r){var e={};2048&r&&(e.$$scope={dirty:r,ctx:t}),n.$set(e)},i:function(t){r||(ma(n.$$.fragment,t),r=!0)},o:function(t){ya(n.$$.fragment,t),r=!1},d:function(t){wa(n,t)}}}function cp(t){for(var n,r,e,o,i,u,c,a,f,l,s,p,d,v,h,m,y,g,b,w,x,$,_,O,S,E,j,A,T,k,R,P,I,M,N,C,D,B,F,L,z,U,q,G,W,J,V,H,K,Q,X,Y,Z,tt,nt,rt,et,ot,it,ut,ct,at,ft=t[2].payment.customer+"",lt=Vf.l10n.date+"",st=Hf.date(t[2].payment.created_at)+"",pt=Hf.time(t[2].payment.created_at)+"",dt=Vf.l10n.type+"",vt=Vf.types[t[2].payment.type]+"",ht=Vf.l10n.status+"",mt=Vf.statuses[t[2].payment.status]+"",yt="1"===Vf.can_edit&&(_f("pro")||t[2].payment.total!==t[2].payment.paid),gt=t[2].show.deposit&&lp(),bt=t[2].show.taxes&&sp(),wt=t[2].payment.items,xt=[],$t=0;$t<wt.length;$t+=1)xt[$t]=pp(ip(t,wt,$t));var _t=function(t){return ya(xt[t],1,1,(function(){xt[t]=null}))};K=new Il({});var Ot=(t[2].show.coupons||t[2].payment.coupon)&&dp(),St=(t[2].show.customer_groups||t[2].payment.group_discount)&&vp(),Et=t[2].payment.discounts&&t[2].payment.discounts.length&&hp();tt=new vs({}),rt=new xs({});var jt=t[2].show.price_correction&&t[2].payment.price_correction&&mp();it=new Ys({});var At=t[2].payment.total!==t[2].payment.paid&&yp(),Tt=yt&&gp();return{c:function(){n=Bc("div"),r=Bc("table"),e=Bc("thead"),o=Bc("tr"),(i=Bc("th")).textContent="".concat(Vf.l10n.customer),u=Lc(),(c=Bc("th")).textContent="".concat(Vf.l10n.payment),a=Lc(),f=Bc("tbody"),l=Bc("tr"),s=Bc("td"),p=Fc(ft),d=Lc(),v=Bc("td"),h=Bc("div"),m=Fc(lt),y=Fc(": "),g=Fc(st),b=Lc(),w=Fc(pt),x=Lc(),$=Bc("div"),_=Fc(dt),O=Fc(": "),S=Fc(vt),E=Lc(),j=Bc("div"),A=Fc(ht),T=Fc(": "),k=Fc(mt),R=Lc(),P=Bc("div"),I=Bc("table"),M=Bc("thead"),N=Bc("tr"),(C=Bc("th")).textContent="".concat(Vf.l10n.service),D=Lc(),(B=Bc("th")).textContent="".concat(Vf.l10n.date),F=Lc(),(L=Bc("th")).textContent="".concat(Vf.l10n.provider),z=Lc(),gt&&gt.c(),U=Lc(),(q=Bc("th")).textContent="".concat(Vf.l10n.price),G=Lc(),bt&&bt.c(),W=Lc(),J=Bc("tbody");for(var t=0;t<xt.length;t+=1)xt[t].c();V=Lc(),H=Bc("tfoot"),ga(K.$$.fragment),Q=Lc(),Ot&&Ot.c(),X=Lc(),St&&St.c(),Y=Lc(),Et&&Et.c(),Z=Lc(),ga(tt.$$.fragment),nt=Lc(),ga(rt.$$.fragment),et=Lc(),jt&&jt.c(),ot=Lc(),ga(it.$$.fragment),ut=Lc(),At&&At.c(),ct=Lc(),Tt&&Tt.c(),qc(i,"width","50%"),qc(c,"width","50%"),qc(r,"class","table table-bordered"),qc(n,"class","table-responsive"),qc(q,"class","text-right"),qc(I,"class","table table-bordered"),qc(P,"class","table-responsive")},m:function(t,ft){Nc(t,n,ft),Mc(n,r),Mc(r,e),Mc(e,o),Mc(o,i),Mc(o,u),Mc(o,c),Mc(r,a),Mc(r,f),Mc(f,l),Mc(l,s),Mc(s,p),Mc(l,d),Mc(l,v),Mc(v,h),Mc(h,m),Mc(h,y),Mc(h,g),Mc(h,b),Mc(h,w),Mc(v,x),Mc(v,$),Mc($,_),Mc($,O),Mc($,S),Mc(v,E),Mc(v,j),Mc(j,A),Mc(j,T),Mc(j,k),Nc(t,R,ft),Nc(t,P,ft),Mc(P,I),Mc(I,M),Mc(M,N),Mc(N,C),Mc(N,D),Mc(N,B),Mc(N,F),Mc(N,L),Mc(N,z),gt&&gt.m(N,null),Mc(N,U),Mc(N,q),Mc(N,G),bt&&bt.m(N,null),Mc(I,W),Mc(I,J);for(var lt=0;lt<xt.length;lt+=1)xt[lt].m(J,null);Mc(I,V),Mc(I,H),ba(K,H,null),Mc(H,Q),Ot&&Ot.m(H,null),Mc(H,X),St&&St.m(H,null),Mc(H,Y),Et&&Et.m(H,null),Mc(H,Z),ba(tt,H,null),Mc(H,nt),ba(rt,H,null),Mc(H,et),jt&&jt.m(H,null),Mc(H,ot),ba(it,H,null),Mc(H,ut),At&&At.m(H,null),Mc(H,ct),Tt&&Tt.m(H,null),at=!0},p:function(t,n){if((!at||4&n)&&ft!==(ft=t[2].payment.customer+"")&&Vc(p,ft),(!at||4&n)&&st!==(st=Hf.date(t[2].payment.created_at)+"")&&Vc(g,st),(!at||4&n)&&pt!==(pt=Hf.time(t[2].payment.created_at)+"")&&Vc(w,pt),(!at||4&n)&&vt!==(vt=Vf.types[t[2].payment.type]+"")&&Vc(S,vt),(!at||4&n)&&mt!==(mt=Vf.statuses[t[2].payment.status]+"")&&Vc(k,mt),t[2].show.deposit?gt?gt.p(t,n):((gt=lp()).c(),gt.m(N,U)):gt&&(gt.d(1),gt=null),t[2].show.taxes?bt?bt.p(t,n):((bt=sp()).c(),bt.m(N,null)):bt&&(bt.d(1),bt=null),4&n){var r;for(wt=t[2].payment.items,r=0;r<wt.length;r+=1){var e=ip(t,wt,r);xt[r]?(xt[r].p(e,n),ma(xt[r],1)):(xt[r]=pp(e),xt[r].c(),ma(xt[r],1),xt[r].m(J,null))}for(va(),r=wt.length;r<xt.length;r+=1)_t(r);ha()}t[2].show.coupons||t[2].payment.coupon?Ot?4&n&&ma(Ot,1):((Ot=dp()).c(),ma(Ot,1),Ot.m(H,X)):Ot&&(va(),ya(Ot,1,1,(function(){Ot=null})),ha()),t[2].show.customer_groups||t[2].payment.group_discount?St?4&n&&ma(St,1):((St=vp()).c(),ma(St,1),St.m(H,Y)):St&&(va(),ya(St,1,1,(function(){St=null})),ha()),t[2].payment.discounts&&t[2].payment.discounts.length?Et?4&n&&ma(Et,1):((Et=hp()).c(),ma(Et,1),Et.m(H,Z)):Et&&(va(),ya(Et,1,1,(function(){Et=null})),ha()),t[2].show.price_correction&&t[2].payment.price_correction?jt?4&n&&ma(jt,1):((jt=mp()).c(),ma(jt,1),jt.m(H,ot)):jt&&(va(),ya(jt,1,1,(function(){jt=null})),ha()),t[2].payment.total!==t[2].payment.paid?At?4&n&&ma(At,1):((At=yp()).c(),ma(At,1),At.m(H,ct)):At&&(va(),ya(At,1,1,(function(){At=null})),ha()),4&n&&(yt="1"===Vf.can_edit&&(_f("pro")||t[2].payment.total!==t[2].payment.paid)),yt?Tt?4&n&&ma(Tt,1):((Tt=gp()).c(),ma(Tt,1),Tt.m(H,null)):Tt&&(va(),ya(Tt,1,1,(function(){Tt=null})),ha())},i:function(t){if(!at){for(var n=0;n<wt.length;n+=1)ma(xt[n]);ma(K.$$.fragment,t),ma(Ot),ma(St),ma(Et),ma(tt.$$.fragment,t),ma(rt.$$.fragment,t),ma(jt),ma(it.$$.fragment,t),ma(At),ma(Tt),at=!0}},o:function(t){xt=lo(xt).call(xt,Boolean);for(var n=0;n<xt.length;n+=1)ya(xt[n]);ya(K.$$.fragment,t),ya(Ot),ya(St),ya(Et),ya(tt.$$.fragment,t),ya(rt.$$.fragment,t),ya(jt),ya(it.$$.fragment,t),ya(At),ya(Tt),at=!1},d:function(t){t&&Cc(n),t&&Cc(R),t&&Cc(P),gt&&gt.d(),bt&&bt.d(),Dc(xt,t),wa(K),Ot&&Ot.d(),St&&St.d(),Et&&Et.d(),wa(tt),wa(rt),jt&&jt.d(),wa(it),At&&At.d(),Tt&&Tt.d()}}}function ap(t){var n;return{c:function(){qc(n=Bc("div"),"class","bookly-loading")},m:function(t,r){Nc(t,n,r)},p:xc,i:xc,o:xc,d:function(t){t&&Cc(n)}}}function fp(t){var n,r,e,o=Vf.l10n.payment_is_not_found+"";return{c:function(){n=Bc("span"),r=Lc(),e=Fc(o),qc(n,"class","fas fa-info-circle text-primary fa-lg")},m:function(t,o){Nc(t,n,o),Nc(t,r,o),Nc(t,e,o)},p:xc,d:function(t){t&&Cc(n),t&&Cc(r),t&&Cc(e)}}}function lp(t){var n;return{c:function(){(n=Bc("th")).textContent="".concat(Vf.l10n.deposit),qc(n,"class","text-right")},m:function(t,r){Nc(t,n,r)},p:xc,d:function(t){t&&Cc(n)}}}function sp(t){var n;return{c:function(){(n=Bc("th")).textContent="".concat(Vf.l10n.tax),qc(n,"class","text-right")},m:function(t,r){Nc(t,n,r)},p:xc,d:function(t){t&&Cc(n)}}}function pp(t){var n,r;return n=new jl({props:{item:t[8]}}),{c:function(){ga(n.$$.fragment)},m:function(t,e){ba(n,t,e),r=!0},p:function(t,r){var e={};4&r&&(e.item=t[8]),n.$set(e)},i:function(t){r||(ma(n.$$.fragment,t),r=!0)},o:function(t){ya(n.$$.fragment,t),r=!1},d:function(t){wa(n,t)}}}function dp(t){var n,r;return n=new ql({}),{c:function(){ga(n.$$.fragment)},m:function(t,e){ba(n,t,e),r=!0},i:function(t){r||(ma(n.$$.fragment,t),r=!0)},o:function(t){ya(n.$$.fragment,t),r=!1},d:function(t){wa(n,t)}}}function vp(t){var n,r;return n=new Ql({}),{c:function(){ga(n.$$.fragment)},m:function(t,e){ba(n,t,e),r=!0},i:function(t){r||(ma(n.$$.fragment,t),r=!0)},o:function(t){ya(n.$$.fragment,t),r=!1},d:function(t){wa(n,t)}}}function hp(t){var n,r;return n=new cs({}),{c:function(){ga(n.$$.fragment)},m:function(t,e){ba(n,t,e),r=!0},i:function(t){r||(ma(n.$$.fragment,t),r=!0)},o:function(t){ya(n.$$.fragment,t),r=!1},d:function(t){wa(n,t)}}}function mp(t){var n,r;return n=new Ds({}),{c:function(){ga(n.$$.fragment)},m:function(t,e){ba(n,t,e),r=!0},i:function(t){r||(ma(n.$$.fragment,t),r=!0)},o:function(t){ya(n.$$.fragment,t),r=!1},d:function(t){wa(n,t)}}}function yp(t){var n,r,e,o;return n=new Us({}),e=new Vs({}),{c:function(){ga(n.$$.fragment),r=Lc(),ga(e.$$.fragment)},m:function(t,i){ba(n,t,i),Nc(t,r,i),ba(e,t,i),o=!0},i:function(t){o||(ma(n.$$.fragment,t),ma(e.$$.fragment,t),o=!0)},o:function(t){ya(n.$$.fragment,t),ya(e.$$.fragment,t),o=!1},d:function(t){wa(n,t),t&&Cc(r),wa(e,t)}}}function gp(t){var n,r;return n=new Ps({}),{c:function(){ga(n.$$.fragment)},m:function(t,e){ba(n,t,e),r=!0},i:function(t){r||(ma(n.$$.fragment,t),r=!0)},o:function(t){ya(n.$$.fragment,t),r=!1},d:function(t){wa(n,t)}}}function bp(t){var n,r,e,o,i=[ap,cp,up],u=[];function c(t,n){return t[1]?0:t[2].payment.id?1:2}return n=c(t),r=u[n]=i[n](t),{c:function(){r.c(),e=zc()},m:function(t,r){u[n].m(t,r),Nc(t,e,r),o=!0},p:function(t,o){var a=n;(n=c(t))===a?u[n].p(t,o):(va(),ya(u[a],1,1,(function(){u[a]=null})),ha(),(r=u[n])?r.p(t,o):(r=u[n]=i[n](t)).c(),ma(r,1),r.m(e.parentNode,e))},i:function(t){o||(ma(r),o=!0)},o:function(t){ya(r),o=!1},d:function(t){u[n].d(t),t&&Cc(e)}}}function wp(t){var n,r,e;return r=new Ia({props:{"data-dismiss":"bookly-modal",caption:Vf.l10n.close}}),{c:function(){n=Bc("div"),ga(r.$$.fragment),qc(n,"slot","footer")},m:function(t,o){Nc(t,n,o),ba(r,n,null),e=!0},p:xc,i:function(t){e||(ma(r.$$.fragment,t),e=!0)},o:function(t){ya(r.$$.fragment,t),e=!1},d:function(t){t&&Cc(n),wa(r)}}}function xp(t){var n,r,e={size:"xl",title:Vf.l10n.payment,$$slots:{footer:[wp],default:[bp]},$$scope:{ctx:t}};return n=new Ta({props:e}),t[5](n),{c:function(){ga(n.$$.fragment)},m:function(t,e){ba(n,t,e),r=!0},p:function(t,r){var e=eo(r,1)[0],o={};2054&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i:function(t){r||(ma(n.$$.fragment,t),r=!0)},o:function(t){ya(n.$$.fragment,t),r=!1},d:function(r){t[5](null),wa(n,r)}}}function $p(t,n,r){var e,o;Ac(t,Af,(function(t){return r(6,e=t)})),Ac(t,Tf,(function(t){return r(2,o=t)}));var i,u,c={opts:{payment_id:null,customer:{},done:function(){}},modal:null};i="cxt",u=c,Yc().$$.context.set(i,u);var a=!0;function f(t){r(0,c.opts=t,c),r(1,a=!0),hs(c.opts.payment_id||c.opts.customer.payment_id).done((function(){return r(1,a=!1)})),c.modal.show()}return[c,a,o,function(t){Ic(Af,e="show",e),f(t)},function(t){Ic(Af,e="attach",e),f(t)},function(t){ra[t?"unshift":"push"]((function(){c.modal=t,r(0,c)}))}]}var _p,Op=function(t){Wt(r,t);var n=op(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,$p,xp,jc,{show:3,attach:4}),e}return et(r,[{key:"show",get:function(){return this.$$.ctx[3]}},{key:"attach",get:function(){return this.$$.ctx[4]}}]),r}(_a);return t.showAttachDialog=function(t){_p||(_p=new Op({target:document.getElementById("bookly-payment-details-dialog"),props:{}})),_p.attach(t)},t.showDialog=function(t){_p||(_p=new Op({target:document.getElementById("bookly-payment-details-dialog"),props:{}})),_p.show(t)},Object.defineProperty(t,"__esModule",{value:!0}),t}({},jQuery,Ladda,BooklyL10nPaymentDetailsDialog,moment);
1
+ var BooklyPaymentDetailsDialog=function(t,n,r,e,o){"use strict";function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var u=i(n),c=i(r),a=i(e),f=i(o);function l(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(t){var n={exports:{}};return t(n,n.exports),n.exports}var d=function(t){return t&&t.Math==Math&&t},v=d("object"==typeof globalThis&&globalThis)||d("object"==typeof window&&window)||d("object"==typeof self&&self)||d("object"==typeof s&&s)||function(){return this}()||Function("return this")(),h=function(t){try{return!!t()}catch(t){return!0}},m=!h((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),y={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,b={f:g&&!y.call({1:2},1)?function(t){var n=g(this,t);return!!n&&n.enumerable}:y},w=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}},x={}.toString,$=function(t){return x.call(t).slice(8,-1)},_="".split,O=h((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==$(t)?_.call(t,""):Object(t)}:Object,S=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},E=function(t){return O(S(t))},j=function(t){return"object"==typeof t?null!==t:"function"==typeof t},A=function(t,n){if(!j(t))return t;var r,e;if(n&&"function"==typeof(r=t.toString)&&!j(e=r.call(t)))return e;if("function"==typeof(r=t.valueOf)&&!j(e=r.call(t)))return e;if(!n&&"function"==typeof(r=t.toString)&&!j(e=r.call(t)))return e;throw TypeError("Can't convert object to primitive value")},T={}.hasOwnProperty,k=function(t,n){return T.call(t,n)},R=v.document,P=j(R)&&j(R.createElement),I=function(t){return P?R.createElement(t):{}},M=!m&&!h((function(){return 7!=Object.defineProperty(I("div"),"a",{get:function(){return 7}}).a})),N=Object.getOwnPropertyDescriptor,C={f:m?N:function(t,n){if(t=E(t),n=A(n,!0),M)try{return N(t,n)}catch(t){}if(k(t,n))return w(!b.f.call(t,n),t[n])}},D=/#|\.prototype\./,B=function(t,n){var r=L[F(t)];return r==U||r!=z&&("function"==typeof n?h(n):!!n)},F=B.normalize=function(t){return String(t).replace(D,".").toLowerCase()},L=B.data={},z=B.NATIVE="N",U=B.POLYFILL="P",q=B,G={},W=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},J=function(t,n,r){if(W(t),void 0===n)return t;switch(r){case 0:return function(){return t.call(n)};case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,o){return t.call(n,r,e,o)}}return function(){return t.apply(n,arguments)}},V=function(t){if(!j(t))throw TypeError(String(t)+" is not an object");return t},H=Object.defineProperty,K={f:m?H:function(t,n,r){if(V(t),n=A(n,!0),V(r),M)try{return H(t,n,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[n]=r.value),t}},Q=m?function(t,n,r){return K.f(t,n,w(1,r))}:function(t,n,r){return t[n]=r,t},X=C.f,Y=function(t){var n=function(n,r,e){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,e)}return t.apply(this,arguments)};return n.prototype=t.prototype,n},Z=function(t,n){var r,e,o,i,u,c,a,f,l=t.target,s=t.global,p=t.stat,d=t.proto,h=s?v:p?v[l]:(v[l]||{}).prototype,m=s?G:G[l]||(G[l]={}),y=m.prototype;for(o in n)r=!q(s?o:l+(p?".":"#")+o,t.forced)&&h&&k(h,o),u=m[o],r&&(c=t.noTargetGet?(f=X(h,o))&&f.value:h[o]),i=r&&c?c:n[o],r&&typeof u==typeof i||(a=t.bind&&r?J(i,v):t.wrap&&r?Y(i):d&&"function"==typeof i?J(Function.call,i):i,(t.sham||i&&i.sham||u&&u.sham)&&Q(a,"sham",!0),m[o]=a,d&&(k(G,e=l+"Prototype")||Q(G,e,{}),G[e][o]=i,t.real&&y&&!y[o]&&Q(y,o,i)))};Z({target:"Object",stat:!0,forced:!m,sham:!m},{defineProperty:K.f});var tt=p((function(t){var n=G.Object,r=t.exports=function(t,r,e){return n.defineProperty(t,r,e)};n.defineProperty.sham&&(r.sham=!0)})),nt=tt;function rt(t,n){for(var r=0;r<n.length;r++){var e=n[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),nt(t,e.key,e)}}function et(t,n,r){return n&&rt(t.prototype,n),r&&rt(t,r),t}function ot(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var it,ut=Math.ceil,ct=Math.floor,at=function(t){return isNaN(t=+t)?0:(t>0?ct:ut)(t)},ft=Math.min,lt=function(t){return t>0?ft(at(t),9007199254740991):0},st=Math.max,pt=Math.min,dt=function(t,n){var r=at(t);return r<0?st(r+n,0):pt(r,n)},vt=function(t){return function(n,r,e){var o,i=E(n),u=lt(i.length),c=dt(e,u);if(t&&r!=r){for(;u>c;)if((o=i[c++])!=o)return!0}else for(;u>c;c++)if((t||c in i)&&i[c]===r)return t||c||0;return!t&&-1}},ht={includes:vt(!0),indexOf:vt(!1)},mt={},yt=ht.indexOf,gt=function(t,n){var r,e=E(t),o=0,i=[];for(r in e)!k(mt,r)&&k(e,r)&&i.push(r);for(;n.length>o;)k(e,r=n[o++])&&(~yt(i,r)||i.push(r));return i},bt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],wt=Object.keys||function(t){return gt(t,bt)},xt=m?Object.defineProperties:function(t,n){V(t);for(var r,e=wt(n),o=e.length,i=0;o>i;)K.f(t,r=e[i++],n[r]);return t},$t=function(t){return"function"==typeof t?t:void 0},_t=function(t,n){return arguments.length<2?$t(G[t])||$t(v[t]):G[t]&&G[t][n]||v[t]&&v[t][n]},Ot=_t("document","documentElement"),St=!0,Et="__core-js_shared__",jt=v[Et]||function(t,n){try{Q(v,t,n)}catch(r){v[t]=n}return n}(Et,{}),At=p((function(t){(t.exports=function(t,n){return jt[t]||(jt[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.8.3",mode:"pure",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),Tt=0,kt=Math.random(),Rt=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++Tt+kt).toString(36)},Pt=At("keys"),It=function(t){return Pt[t]||(Pt[t]=Rt(t))},Mt=It("IE_PROTO"),Nt=function(){},Ct=function(t){return"<script>"+t+"</"+"script>"},Dt=function(){try{it=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,n;Dt=it?function(t){t.write(Ct("")),t.close();var n=t.parentWindow.Object;return t=null,n}(it):((n=I("iframe")).style.display="none",Ot.appendChild(n),n.src=String("javascript:"),(t=n.contentWindow.document).open(),t.write(Ct("document.F=Object")),t.close(),t.F);for(var r=bt.length;r--;)delete Dt.prototype[bt[r]];return Dt()};mt[Mt]=!0;var Bt=Object.create||function(t,n){var r;return null!==t?(Nt.prototype=V(t),r=new Nt,Nt.prototype=null,r[Mt]=t):r=Dt(),void 0===n?r:xt(r,n)};Z({target:"Object",stat:!0,sham:!m},{create:Bt});var Ft=G.Object,Lt=function(t,n){return Ft.create(t,n)},zt=Lt,Ut=Object.setPrototypeOf||("__proto__"in{}?function(){var t,n=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),n=r instanceof Array}catch(t){}return function(r,e){return V(r),function(t){if(!j(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(e),n?t.call(r,e):r.__proto__=e,r}}():void 0);Z({target:"Object",stat:!0},{setPrototypeOf:Ut});var qt=G.Object.setPrototypeOf;function Gt(t,n){return(Gt=qt||function(t,n){return t.__proto__=n,t})(t,n)}function Wt(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=zt(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&Gt(t,n)}var Jt,Vt,Ht=Array.isArray||function(t){return"Array"==$(t)},Kt=function(t){return Object(S(t))},Qt=function(t,n,r){var e=A(n);e in t?K.f(t,e,w(0,r)):t[e]=r},Xt=!!Object.getOwnPropertySymbols&&!h((function(){return!String(Symbol())})),Yt=Xt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Zt=At("wks"),tn=v.Symbol,nn=Yt?tn:tn&&tn.withoutSetter||Rt,rn=function(t){return k(Zt,t)||(Xt&&k(tn,t)?Zt[t]=tn[t]:Zt[t]=nn("Symbol."+t)),Zt[t]},en=rn("species"),on=function(t,n){var r;return Ht(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!Ht(r.prototype)?j(r)&&null===(r=r[en])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===n?0:n)},un=_t("navigator","userAgent")||"",cn=v.process,an=cn&&cn.versions,fn=an&&an.v8;fn?Vt=(Jt=fn.split("."))[0]+Jt[1]:un&&(!(Jt=un.match(/Edge\/(\d+)/))||Jt[1]>=74)&&(Jt=un.match(/Chrome\/(\d+)/))&&(Vt=Jt[1]);var ln=Vt&&+Vt,sn=rn("species"),pn=function(t){return ln>=51||!h((function(){var n=[];return(n.constructor={})[sn]=function(){return{foo:1}},1!==n[t](Boolean).foo}))},dn=rn("isConcatSpreadable"),vn=9007199254740991,hn="Maximum allowed index exceeded",mn=ln>=51||!h((function(){var t=[];return t[dn]=!1,t.concat()[0]!==t})),yn=pn("concat"),gn=function(t){if(!j(t))return!1;var n=t[dn];return void 0!==n?!!n:Ht(t)};Z({target:"Array",proto:!0,forced:!mn||!yn},{concat:function(t){var n,r,e,o,i,u=Kt(this),c=on(u,0),a=0;for(n=-1,e=arguments.length;n<e;n++)if(gn(i=-1===n?u:arguments[n])){if(a+(o=lt(i.length))>vn)throw TypeError(hn);for(r=0;r<o;r++,a++)r in i&&Qt(c,a,i[r])}else{if(a>=vn)throw TypeError(hn);Qt(c,a++,i)}return c.length=a,c}});var bn=bt.concat("length","prototype"),wn={f:Object.getOwnPropertyNames||function(t){return gt(t,bn)}},xn=wn.f,$n={}.toString,_n="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],On={f:function(t){return _n&&"[object Window]"==$n.call(t)?function(t){try{return xn(t)}catch(t){return _n.slice()}}(t):xn(E(t))}},Sn={f:Object.getOwnPropertySymbols},En=function(t,n,r,e){e&&e.enumerable?t[n]=r:Q(t,n,r)},jn={f:rn},An=K.f,Tn=function(t){var n=G.Symbol||(G.Symbol={});k(n,t)||An(n,t,{value:jn.f(t)})},kn={};kn[rn("toStringTag")]="z";var Rn="[object z]"===String(kn),Pn=rn("toStringTag"),In="Arguments"==$(function(){return arguments}()),Mn=Rn?$:function(t){var n,r,e;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,n){try{return t[n]}catch(t){}}(n=Object(t),Pn))?r:In?$(n):"Object"==(e=$(n))&&"function"==typeof n.callee?"Arguments":e},Nn=Rn?{}.toString:function(){return"[object "+Mn(this)+"]"},Cn=K.f,Dn=rn("toStringTag"),Bn=function(t,n,r,e){if(t){var o=r?t:t.prototype;k(o,Dn)||Cn(o,Dn,{configurable:!0,value:n}),e&&!Rn&&Q(o,"toString",Nn)}},Fn=Function.toString;"function"!=typeof jt.inspectSource&&(jt.inspectSource=function(t){return Fn.call(t)});var Ln,zn,Un,qn=jt.inspectSource,Gn=v.WeakMap,Wn="function"==typeof Gn&&/native code/.test(qn(Gn)),Jn=v.WeakMap;if(Wn){var Vn=jt.state||(jt.state=new Jn),Hn=Vn.get,Kn=Vn.has,Qn=Vn.set;Ln=function(t,n){return n.facade=t,Qn.call(Vn,t,n),n},zn=function(t){return Hn.call(Vn,t)||{}},Un=function(t){return Kn.call(Vn,t)}}else{var Xn=It("state");mt[Xn]=!0,Ln=function(t,n){return n.facade=t,Q(t,Xn,n),n},zn=function(t){return k(t,Xn)?t[Xn]:{}},Un=function(t){return k(t,Xn)}}var Yn={set:Ln,get:zn,has:Un,enforce:function(t){return Un(t)?zn(t):Ln(t,{})},getterFor:function(t){return function(n){var r;if(!j(n)||(r=zn(n)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},Zn=[].push,tr=function(t){var n=1==t,r=2==t,e=3==t,o=4==t,i=6==t,u=7==t,c=5==t||i;return function(a,f,l,s){for(var p,d,v=Kt(a),h=O(v),m=J(f,l,3),y=lt(h.length),g=0,b=s||on,w=n?b(a,y):r||u?b(a,0):void 0;y>g;g++)if((c||g in h)&&(d=m(p=h[g],g,v),t))if(n)w[g]=d;else if(d)switch(t){case 3:return!0;case 5:return p;case 6:return g;case 2:Zn.call(w,p)}else switch(t){case 4:return!1;case 7:Zn.call(w,p)}return i?-1:e||o?o:w}},nr={forEach:tr(0),map:tr(1),filter:tr(2),some:tr(3),every:tr(4),find:tr(5),findIndex:tr(6),filterOut:tr(7)},rr=nr.forEach,er=It("hidden"),or="Symbol",ir=rn("toPrimitive"),ur=Yn.set,cr=Yn.getterFor(or),ar=Object.prototype,fr=v.Symbol,lr=_t("JSON","stringify"),sr=C.f,pr=K.f,dr=On.f,vr=b.f,hr=At("symbols"),mr=At("op-symbols"),yr=At("string-to-symbol-registry"),gr=At("symbol-to-string-registry"),br=At("wks"),wr=v.QObject,xr=!wr||!wr.prototype||!wr.prototype.findChild,$r=m&&h((function(){return 7!=Bt(pr({},"a",{get:function(){return pr(this,"a",{value:7}).a}})).a}))?function(t,n,r){var e=sr(ar,n);e&&delete ar[n],pr(t,n,r),e&&t!==ar&&pr(ar,n,e)}:pr,_r=function(t,n){var r=hr[t]=Bt(fr.prototype);return ur(r,{type:or,tag:t,description:n}),m||(r.description=n),r},Or=Yt?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof fr},Sr=function(t,n,r){t===ar&&Sr(mr,n,r),V(t);var e=A(n,!0);return V(r),k(hr,e)?(r.enumerable?(k(t,er)&&t[er][e]&&(t[er][e]=!1),r=Bt(r,{enumerable:w(0,!1)})):(k(t,er)||pr(t,er,w(1,{})),t[er][e]=!0),$r(t,e,r)):pr(t,e,r)},Er=function(t,n){V(t);var r=E(n),e=wt(r).concat(kr(r));return rr(e,(function(n){m&&!jr.call(r,n)||Sr(t,n,r[n])})),t},jr=function(t){var n=A(t,!0),r=vr.call(this,n);return!(this===ar&&k(hr,n)&&!k(mr,n))&&(!(r||!k(this,n)||!k(hr,n)||k(this,er)&&this[er][n])||r)},Ar=function(t,n){var r=E(t),e=A(n,!0);if(r!==ar||!k(hr,e)||k(mr,e)){var o=sr(r,e);return!o||!k(hr,e)||k(r,er)&&r[er][e]||(o.enumerable=!0),o}},Tr=function(t){var n=dr(E(t)),r=[];return rr(n,(function(t){k(hr,t)||k(mt,t)||r.push(t)})),r},kr=function(t){var n=t===ar,r=dr(n?mr:E(t)),e=[];return rr(r,(function(t){!k(hr,t)||n&&!k(ar,t)||e.push(hr[t])})),e};if(Xt||(En((fr=function(){if(this instanceof fr)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,n=Rt(t),r=function(t){this===ar&&r.call(mr,t),k(this,er)&&k(this[er],n)&&(this[er][n]=!1),$r(this,n,w(1,t))};return m&&xr&&$r(ar,n,{configurable:!0,set:r}),_r(n,t)}).prototype,"toString",(function(){return cr(this).tag})),En(fr,"withoutSetter",(function(t){return _r(Rt(t),t)})),b.f=jr,K.f=Sr,C.f=Ar,wn.f=On.f=Tr,Sn.f=kr,jn.f=function(t){return _r(rn(t),t)},m&&pr(fr.prototype,"description",{configurable:!0,get:function(){return cr(this).description}})),Z({global:!0,wrap:!0,forced:!Xt,sham:!Xt},{Symbol:fr}),rr(wt(br),(function(t){Tn(t)})),Z({target:or,stat:!0,forced:!Xt},{for:function(t){var n=String(t);if(k(yr,n))return yr[n];var r=fr(n);return yr[n]=r,gr[r]=n,r},keyFor:function(t){if(!Or(t))throw TypeError(t+" is not a symbol");if(k(gr,t))return gr[t]},useSetter:function(){xr=!0},useSimple:function(){xr=!1}}),Z({target:"Object",stat:!0,forced:!Xt,sham:!m},{create:function(t,n){return void 0===n?Bt(t):Er(Bt(t),n)},defineProperty:Sr,defineProperties:Er,getOwnPropertyDescriptor:Ar}),Z({target:"Object",stat:!0,forced:!Xt},{getOwnPropertyNames:Tr,getOwnPropertySymbols:kr}),Z({target:"Object",stat:!0,forced:h((function(){Sn.f(1)}))},{getOwnPropertySymbols:function(t){return Sn.f(Kt(t))}}),lr){var Rr=!Xt||h((function(){var t=fr();return"[null]"!=lr([t])||"{}"!=lr({a:t})||"{}"!=lr(Object(t))}));Z({target:"JSON",stat:!0,forced:Rr},{stringify:function(t,n,r){for(var e,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(e=n,(j(n)||void 0!==t)&&!Or(t))return Ht(n)||(n=function(t,n){if("function"==typeof e&&(n=e.call(this,t,n)),!Or(n))return n}),o[1]=n,lr.apply(null,o)}})}fr.prototype[ir]||Q(fr.prototype,ir,fr.prototype.valueOf),Bn(fr,or),mt[er]=!0,Tn("asyncIterator"),Tn("hasInstance"),Tn("isConcatSpreadable"),Tn("iterator"),Tn("match"),Tn("matchAll"),Tn("replace"),Tn("search"),Tn("species"),Tn("split"),Tn("toPrimitive"),Tn("toStringTag"),Tn("unscopables"),Bn(v.JSON,"JSON",!0);var Pr=G.Symbol;Tn("asyncDispose"),Tn("dispose"),Tn("observable"),Tn("patternMatch"),Tn("replaceAll");var Ir,Mr,Nr,Cr=Pr,Dr=function(t){return function(n,r){var e,o,i=String(S(n)),u=at(r),c=i.length;return u<0||u>=c?t?"":void 0:(e=i.charCodeAt(u))<55296||e>56319||u+1===c||(o=i.charCodeAt(u+1))<56320||o>57343?t?i.charAt(u):e:t?i.slice(u,u+2):o-56320+(e-55296<<10)+65536}},Br={codeAt:Dr(!1),charAt:Dr(!0)},Fr=!h((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Lr=It("IE_PROTO"),zr=Object.prototype,Ur=Fr?Object.getPrototypeOf:function(t){return t=Kt(t),k(t,Lr)?t[Lr]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?zr:null},qr=rn("iterator"),Gr=!1;[].keys&&("next"in(Nr=[].keys())?(Mr=Ur(Ur(Nr)))!==Object.prototype&&(Ir=Mr):Gr=!0);var Wr=null==Ir||h((function(){var t={};return Ir[qr].call(t)!==t}));Wr&&(Ir={}),Wr&&!k(Ir,qr)&&Q(Ir,qr,(function(){return this}));var Jr={IteratorPrototype:Ir,BUGGY_SAFARI_ITERATORS:Gr},Vr={},Hr=Jr.IteratorPrototype,Kr=function(){return this},Qr=Jr.IteratorPrototype,Xr=Jr.BUGGY_SAFARI_ITERATORS,Yr=rn("iterator"),Zr="keys",te="values",ne="entries",re=function(){return this},ee=function(t,n,r,e,o,i,u){!function(t,n,r){var e=n+" Iterator";t.prototype=Bt(Hr,{next:w(1,r)}),Bn(t,e,!1,!0),Vr[e]=Kr}(r,n,e);var c,a,f,l=function(t){if(t===o&&h)return h;if(!Xr&&t in d)return d[t];switch(t){case Zr:case te:case ne:return function(){return new r(this,t)}}return function(){return new r(this)}},s=n+" Iterator",p=!1,d=t.prototype,v=d[Yr]||d["@@iterator"]||o&&d[o],h=!Xr&&v||l(o),m="Array"==n&&d.entries||v;if(m&&(c=Ur(m.call(new t)),Qr!==Object.prototype&&c.next&&(Bn(c,s,!0,!0),Vr[s]=re)),o==te&&v&&v.name!==te&&(p=!0,h=function(){return v.call(this)}),u&&d[Yr]!==h&&Q(d,Yr,h),Vr[n]=h,o)if(a={values:l(te),keys:i?h:l(Zr),entries:l(ne)},u)for(f in a)(Xr||p||!(f in d))&&En(d,f,a[f]);else Z({target:n,proto:!0,forced:Xr||p},a);return a},oe=Br.charAt,ie="String Iterator",ue=Yn.set,ce=Yn.getterFor(ie);ee(String,"String",(function(t){ue(this,{type:ie,string:String(t),index:0})}),(function(){var t,n=ce(this),r=n.string,e=n.index;return e>=r.length?{value:void 0,done:!0}:(t=oe(r,e),n.index+=t.length,{value:t,done:!1})}));var ae="Array Iterator",fe=Yn.set,le=Yn.getterFor(ae);ee(Array,"Array",(function(t,n){fe(this,{type:ae,target:E(t),index:0,kind:n})}),(function(){var t=le(this),n=t.target,r=t.kind,e=t.index++;return!n||e>=n.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:e,done:!1}:"values"==r?{value:n[e],done:!1}:{value:[e,n[e]],done:!1}}),"values"),Vr.Arguments=Vr.Array;var se=rn("toStringTag");for(var pe in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var de=v[pe],ve=de&&de.prototype;ve&&Mn(ve)!==se&&Q(ve,se,pe),Vr[pe]=Vr.Array}var he=jn.f("iterator");function me(t){return(me="function"==typeof Cr&&"symbol"==typeof he?function(t){return typeof t}:function(t){return t&&"function"==typeof Cr&&t.constructor===Cr&&t!==Cr.prototype?"symbol":typeof t})(t)}function ye(t,n){return!n||"object"!==me(n)&&"function"!=typeof n?ot(t):n}var ge=h((function(){Ur(1)}));Z({target:"Object",stat:!0,forced:ge,sham:!Fr},{getPrototypeOf:function(t){return Ur(Kt(t))}});var be=G.Object.getPrototypeOf;function we(t){return(we=qt?be:function(t){return t.__proto__||be(t)})(t)}Z({target:"Array",stat:!0},{isArray:Ht});var xe=G.Array.isArray;var $e=rn("iterator"),_e=function(t){var n=Object(t);return void 0!==n[$e]||"@@iterator"in n||Vr.hasOwnProperty(Mn(n))},Oe=rn("iterator"),Se=function(t){if(null!=t)return t[Oe]||t["@@iterator"]||Vr[Mn(t)]},Ee=function(t){var n=Se(t);if("function"!=typeof n)throw TypeError(String(t)+" is not iterable");return V(n.call(t))},je=Ee;var Ae=Object.defineProperty,Te={},ke=function(t){throw t},Re=function(t,n){if(k(Te,t))return Te[t];n||(n={});var r=[][t],e=!!k(n,"ACCESSORS")&&n.ACCESSORS,o=k(n,0)?n[0]:ke,i=k(n,1)?n[1]:void 0;return Te[t]=!!r&&!h((function(){if(e&&!m)return!0;var t={length:-1};e?Ae(t,1,{enumerable:!0,get:ke}):t[1]=1,r.call(t,o,i)}))},Pe=pn("slice"),Ie=Re("slice",{ACCESSORS:!0,0:0,1:2}),Me=rn("species"),Ne=[].slice,Ce=Math.max;Z({target:"Array",proto:!0,forced:!Pe||!Ie},{slice:function(t,n){var r,e,o,i=E(this),u=lt(i.length),c=dt(t,u),a=dt(void 0===n?u:n,u);if(Ht(i)&&("function"!=typeof(r=i.constructor)||r!==Array&&!Ht(r.prototype)?j(r)&&null===(r=r[Me])&&(r=void 0):r=void 0,r===Array||void 0===r))return Ne.call(i,c,a);for(e=new(void 0===r?Array:r)(Ce(a-c,0)),o=0;c<a;c++,o++)c in i&&Qt(e,o,i[c]);return e.length=o,e}});var De=function(t){return G[t+"Prototype"]},Be=De("Array").slice,Fe=Array.prototype,Le=function(t){var n=t.slice;return t===Fe||t instanceof Array&&n===Fe.slice?Be:n},ze=Le,Ue=function(t){var n=t.return;if(void 0!==n)return V(n.call(t)).value},qe=function(t,n,r,e){try{return e?n(V(r)[0],r[1]):n(r)}catch(n){throw Ue(t),n}},Ge=rn("iterator"),We=Array.prototype,Je=function(t){return void 0!==t&&(Vr.Array===t||We[Ge]===t)},Ve=rn("iterator"),He=!1;try{var Ke=0,Qe={next:function(){return{done:!!Ke++}},return:function(){He=!0}};Qe[Ve]=function(){return this},Array.from(Qe,(function(){throw 2}))}catch(t){}var Xe=function(t,n){if(!n&&!He)return!1;var r=!1;try{var e={};e[Ve]=function(){return{next:function(){return{done:r=!0}}}},t(e)}catch(t){}return r},Ye=!Xe((function(t){Array.from(t)}));Z({target:"Array",stat:!0,forced:Ye},{from:function(t){var n,r,e,o,i,u,c=Kt(t),a="function"==typeof this?this:Array,f=arguments.length,l=f>1?arguments[1]:void 0,s=void 0!==l,p=Se(c),d=0;if(s&&(l=J(l,f>2?arguments[2]:void 0,2)),null==p||a==Array&&Je(p))for(r=new a(n=lt(c.length));n>d;d++)u=s?l(c[d],d):c[d],Qt(r,d,u);else for(i=(o=p.call(c)).next,r=new a;!(e=i.call(o)).done;d++)u=s?qe(o,l,[e.value,d],!0):e.value,Qt(r,d,u);return r.length=d,r}});var Ze=G.Array.from,to=Ze;function no(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}function ro(t,n){var r;if(t){if("string"==typeof t)return no(t,n);var e=ze(r=Object.prototype.toString.call(t)).call(r,8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?to(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?no(t,n):void 0}}function eo(t,n){return function(t){if(xe(t))return t}(t)||function(t,n){if(void 0!==Cr&&_e(Object(t))){var r=[],e=!0,o=!1,i=void 0;try{for(var u,c=je(t);!(e=(u=c.next()).done)&&(r.push(u.value),!n||r.length!==n);e=!0);}catch(t){o=!0,i=t}finally{try{e||null==c.return||c.return()}finally{if(o)throw i}}return r}}(t,n)||ro(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var oo=Le,io=nr.filter,uo=pn("filter"),co=Re("filter");Z({target:"Array",proto:!0,forced:!uo||!co},{filter:function(t){return io(this,t,arguments.length>1?arguments[1]:void 0)}});var ao=De("Array").filter,fo=Array.prototype,lo=function(t){var n=t.filter;return t===fo||t instanceof Array&&n===fo.filter?ao:n},so=[].slice,po={},vo=function(t,n,r){if(!(n in po)){for(var e=[],o=0;o<n;o++)e[o]="a["+o+"]";po[n]=Function("C,a","return new C("+e.join(",")+")")}return po[n](t,r)},ho=Function.bind||function(t){var n=W(this),r=so.call(arguments,1),e=function(){var o=r.concat(so.call(arguments));return this instanceof e?vo(n,o.length,o):n.apply(t,o)};return j(n.prototype)&&(e.prototype=n.prototype),e},mo=_t("Reflect","construct"),yo=h((function(){function t(){}return!(mo((function(){}),[],t)instanceof t)})),go=!h((function(){mo((function(){}))})),bo=yo||go;Z({target:"Reflect",stat:!0,forced:bo,sham:bo},{construct:function(t,n){W(t),V(n);var r=arguments.length<3?t:W(arguments[2]);if(go&&!yo)return mo(t,n,r);if(t==r){switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3])}var e=[null];return e.push.apply(e,n),new(ho.apply(t,e))}var o=r.prototype,i=Bt(j(o)?o:Object.prototype),u=Function.apply.call(t,i,n);return j(u)?u:i}});var wo=G.Reflect.construct;Z({target:"Reflect",stat:!0},{get:function t(n,r){var e,o,i=arguments.length<3?n:arguments[2];return V(n)===i?n[r]:(e=C.f(n,r))?k(e,"value")?e.value:void 0===e.get?void 0:e.get.call(i):j(o=Ur(n))?t(o,r,i):void 0}}),G.Reflect.get;var xo=C.f,$o=h((function(){xo(1)}));Z({target:"Object",stat:!0,forced:!m||$o,sham:!m},{getOwnPropertyDescriptor:function(t,n){return xo(E(t),n)}});var _o=p((function(t){var n=G.Object,r=t.exports=function(t,r){return n.getOwnPropertyDescriptor(t,r)};n.getOwnPropertyDescriptor.sham&&(r.sham=!0)})),Oo=!h((function(){return Object.isExtensible(Object.preventExtensions({}))})),So=p((function(t){var n=K.f,r=Rt("meta"),e=0,o=Object.isExtensible||function(){return!0},i=function(t){n(t,r,{value:{objectID:"O"+ ++e,weakData:{}}})},u=t.exports={REQUIRED:!1,fastKey:function(t,n){if(!j(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!k(t,r)){if(!o(t))return"F";if(!n)return"E";i(t)}return t[r].objectID},getWeakData:function(t,n){if(!k(t,r)){if(!o(t))return!0;if(!n)return!1;i(t)}return t[r].weakData},onFreeze:function(t){return Oo&&u.REQUIRED&&o(t)&&!k(t,r)&&i(t),t}};mt[r]=!0})),Eo=function(t,n){this.stopped=t,this.result=n},jo=function(t,n,r){var e,o,i,u,c,a,f,l=r&&r.that,s=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_ITERATOR),d=!(!r||!r.INTERRUPTED),v=J(n,l,1+s+d),h=function(t){return e&&Ue(e),new Eo(!0,t)},m=function(t){return s?(V(t),d?v(t[0],t[1],h):v(t[0],t[1])):d?v(t,h):v(t)};if(p)e=t;else{if("function"!=typeof(o=Se(t)))throw TypeError("Target is not iterable");if(Je(o)){for(i=0,u=lt(t.length);u>i;i++)if((c=m(t[i]))&&c instanceof Eo)return c;return new Eo(!1)}e=o.call(t)}for(a=e.next;!(f=a.call(e)).done;){try{c=m(f.value)}catch(t){throw Ue(e),t}if("object"==typeof c&&c&&c instanceof Eo)return c}return new Eo(!1)},Ao=function(t,n,r){if(!(t instanceof n))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t},To=K.f,ko=nr.forEach,Ro=Yn.set,Po=Yn.getterFor,Io=function(t,n,r){var e,o=-1!==t.indexOf("Map"),i=-1!==t.indexOf("Weak"),u=o?"set":"add",c=v[t],a=c&&c.prototype,f={};if(m&&"function"==typeof c&&(i||a.forEach&&!h((function(){(new c).entries().next()})))){e=n((function(n,r){Ro(Ao(n,e,t),{type:t,collection:new c}),null!=r&&jo(r,n[u],{that:n,AS_ENTRIES:o})}));var l=Po(t);ko(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var n="add"==t||"set"==t;!(t in a)||i&&"clear"==t||Q(e.prototype,t,(function(r,e){var o=l(this).collection;if(!n&&i&&!j(r))return"get"==t&&void 0;var u=o[t](0===r?0:r,e);return n?this:u}))})),i||To(e.prototype,"size",{configurable:!0,get:function(){return l(this).collection.size}})}else e=r.getConstructor(n,t,o,u),So.REQUIRED=!0;return Bn(e,t,!1,!0),f[t]=e,Z({global:!0,forced:!0},f),i||r.setStrong(e,t,o),e},Mo=function(t,n,r){for(var e in n)r&&r.unsafe&&t[e]?t[e]=n[e]:En(t,e,n[e],r);return t},No=rn("species"),Co=function(t){var n=_t(t),r=K.f;m&&n&&!n[No]&&r(n,No,{configurable:!0,get:function(){return this}})},Do=K.f,Bo=So.fastKey,Fo=Yn.set,Lo=Yn.getterFor,zo={getConstructor:function(t,n,r,e){var o=t((function(t,i){Ao(t,o,n),Fo(t,{type:n,index:Bt(null),first:void 0,last:void 0,size:0}),m||(t.size=0),null!=i&&jo(i,t[e],{that:t,AS_ENTRIES:r})})),i=Lo(n),u=function(t,n,r){var e,o,u=i(t),a=c(t,n);return a?a.value=r:(u.last=a={index:o=Bo(n,!0),key:n,value:r,previous:e=u.last,next:void 0,removed:!1},u.first||(u.first=a),e&&(e.next=a),m?u.size++:t.size++,"F"!==o&&(u.index[o]=a)),t},c=function(t,n){var r,e=i(t),o=Bo(n);if("F"!==o)return e.index[o];for(r=e.first;r;r=r.next)if(r.key==n)return r};return Mo(o.prototype,{clear:function(){for(var t=i(this),n=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete n[r.index],r=r.next;t.first=t.last=void 0,m?t.size=0:this.size=0},delete:function(t){var n=this,r=i(n),e=c(n,t);if(e){var o=e.next,u=e.previous;delete r.index[e.index],e.removed=!0,u&&(u.next=o),o&&(o.previous=u),r.first==e&&(r.first=o),r.last==e&&(r.last=u),m?r.size--:n.size--}return!!e},forEach:function(t){for(var n,r=i(this),e=J(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.next:r.first;)for(e(n.value,n.key,this);n&&n.removed;)n=n.previous},has:function(t){return!!c(this,t)}}),Mo(o.prototype,r?{get:function(t){var n=c(this,t);return n&&n.value},set:function(t,n){return u(this,0===t?0:t,n)}}:{add:function(t){return u(this,t=0===t?0:t,t)}}),m&&Do(o.prototype,"size",{get:function(){return i(this).size}}),o},setStrong:function(t,n,r){var e=n+" Iterator",o=Lo(n),i=Lo(e);ee(t,n,(function(t,n){Fo(this,{type:e,target:t,state:o(t),kind:n,last:void 0})}),(function(){for(var t=i(this),n=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?"keys"==n?{value:r.key,done:!1}:"values"==n?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),Co(n)}};Io("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),zo);var Uo=G.Map;Z({target:"Map",stat:!0},{from:function(t){var n,r,e,o,i=arguments.length,u=i>1?arguments[1]:void 0;return W(this),(n=void 0!==u)&&W(u),null==t?new this:(r=[],n?(e=0,o=J(u,i>2?arguments[2]:void 0,2),jo(t,(function(t){r.push(o(t,e++))}))):jo(t,r.push,{that:r}),new this(r))}});Z({target:"Map",stat:!0},{of:function(){for(var t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return new this(n)}});var qo=function(){for(var t,n=V(this),r=W(n.delete),e=!0,o=0,i=arguments.length;o<i;o++)t=r.call(n,arguments[o]),e=e&&t;return!!e};Z({target:"Map",proto:!0,real:!0,forced:St},{deleteAll:function(){return qo.apply(this,arguments)}});Z({target:"Map",proto:!0,real:!0,forced:St},{emplace:function(t,n){var r=V(this),e=r.has(t)&&"update"in n?n.update(r.get(t),t,r):n.insert(t,r);return r.set(t,e),e}});var Go=Ee;Z({target:"Map",proto:!0,real:!0,forced:St},{every:function(t){var n=V(this),r=Go(n),e=J(t,arguments.length>1?arguments[1]:void 0,3);return!jo(r,(function(t,r,o){if(!e(r,t,n))return o()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var Wo=rn("species"),Jo=function(t,n){var r,e=V(t).constructor;return void 0===e||null==(r=V(e)[Wo])?n:W(r)};Z({target:"Map",proto:!0,real:!0,forced:St},{filter:function(t){var n=V(this),r=Go(n),e=J(t,arguments.length>1?arguments[1]:void 0,3),o=new(Jo(n,_t("Map"))),i=W(o.set);return jo(r,(function(t,r){e(r,t,n)&&i.call(o,t,r)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}}),Z({target:"Map",proto:!0,real:!0,forced:St},{find:function(t){var n=V(this),r=Go(n),e=J(t,arguments.length>1?arguments[1]:void 0,3);return jo(r,(function(t,r,o){if(e(r,t,n))return o(r)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),Z({target:"Map",proto:!0,real:!0,forced:St},{findKey:function(t){var n=V(this),r=Go(n),e=J(t,arguments.length>1?arguments[1]:void 0,3);return jo(r,(function(t,r,o){if(e(r,t,n))return o(t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),Z({target:"Map",stat:!0},{groupBy:function(t,n){var r=new this;W(n);var e=W(r.has),o=W(r.get),i=W(r.set);return jo(t,(function(t){var u=n(t);e.call(r,u)?o.call(r,u).push(t):i.call(r,u,[t])})),r}});Z({target:"Map",proto:!0,real:!0,forced:St},{includes:function(t){return jo(Go(V(this)),(function(n,r,e){if((o=r)===(i=t)||o!=o&&i!=i)return e();var o,i}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}}),Z({target:"Map",stat:!0},{keyBy:function(t,n){var r=new this;W(n);var e=W(r.set);return jo(t,(function(t){e.call(r,n(t),t)})),r}}),Z({target:"Map",proto:!0,real:!0,forced:St},{keyOf:function(t){return jo(Go(V(this)),(function(n,r,e){if(r===t)return e(n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),Z({target:"Map",proto:!0,real:!0,forced:St},{mapKeys:function(t){var n=V(this),r=Go(n),e=J(t,arguments.length>1?arguments[1]:void 0,3),o=new(Jo(n,_t("Map"))),i=W(o.set);return jo(r,(function(t,r){i.call(o,e(r,t,n),r)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}}),Z({target:"Map",proto:!0,real:!0,forced:St},{mapValues:function(t){var n=V(this),r=Go(n),e=J(t,arguments.length>1?arguments[1]:void 0,3),o=new(Jo(n,_t("Map"))),i=W(o.set);return jo(r,(function(t,r){i.call(o,t,e(r,t,n))}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}}),Z({target:"Map",proto:!0,real:!0,forced:St},{merge:function(t){for(var n=V(this),r=W(n.set),e=0;e<arguments.length;)jo(arguments[e++],r,{that:n,AS_ENTRIES:!0});return n}}),Z({target:"Map",proto:!0,real:!0,forced:St},{reduce:function(t){var n=V(this),r=Go(n),e=arguments.length<2,o=e?void 0:arguments[1];if(W(t),jo(r,(function(r,i){e?(e=!1,o=i):o=t(o,i,r,n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),e)throw TypeError("Reduce of empty map with no initial value");return o}}),Z({target:"Map",proto:!0,real:!0,forced:St},{some:function(t){var n=V(this),r=Go(n),e=J(t,arguments.length>1?arguments[1]:void 0,3);return jo(r,(function(t,r,o){if(e(r,t,n))return o()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}}),Z({target:"Map",proto:!0,real:!0,forced:St},{update:function(t,n){var r=V(this),e=arguments.length;W(n);var o=r.has(t);if(!o&&e<3)throw TypeError("Updating absent value");var i=o?r.get(t):W(e>2?arguments[2]:void 0)(t,r);return r.set(t,n(i,t,r)),r}});var Vo=function(t,n){var r,e=V(this),o=arguments.length>2?arguments[2]:void 0;if("function"!=typeof n&&"function"!=typeof o)throw TypeError("At least one callback required");return e.has(t)?(r=e.get(t),"function"==typeof n&&(r=n(r),e.set(t,r))):"function"==typeof o&&(r=o(),e.set(t,r)),r};Z({target:"Map",proto:!0,real:!0,forced:St},{upsert:Vo}),Z({target:"Map",proto:!0,real:!0,forced:St},{updateOrInsert:Vo});var Ho=function(t,n){var r=[][t];return!!r&&h((function(){r.call(null,n||function(){throw 1},1)}))},Ko=ht.indexOf,Qo=[].indexOf,Xo=!!Qo&&1/[1].indexOf(1,-0)<0,Yo=Ho("indexOf"),Zo=Re("indexOf",{ACCESSORS:!0,1:0});Z({target:"Array",proto:!0,forced:Xo||!Yo||!Zo},{indexOf:function(t){return Xo?Qo.apply(this,arguments)||0:Ko(this,t,arguments.length>1?arguments[1]:void 0)}});var ti=De("Array").indexOf,ni=Array.prototype,ri=function(t){var n=t.indexOf;return t===ni||t instanceof Array&&n===ni.indexOf?ti:n},ei=ri;function oi(t){return function(t){if(xe(t))return no(t)}(t)||function(t){if(void 0!==Cr&&_e(Object(t)))return to(t)}(t)||ro(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}Z({target:"Function",proto:!0},{bind:ho}),De("Function").bind;var ii=Lt,ui=nr.forEach,ci=Ho("forEach"),ai=Re("forEach"),fi=ci&&ai?[].forEach:function(t){return ui(this,t,arguments.length>1?arguments[1]:void 0)};Z({target:"Array",proto:!0,forced:[].forEach!=fi},{forEach:fi});var li=De("Array").forEach,si=Array.prototype,pi={DOMTokenList:!0,NodeList:!0},di=function(t){var n=t.forEach;return t===si||t instanceof Array&&n===si.forEach||pi.hasOwnProperty(Mn(t))?li:n},vi=h((function(){wt(1)}));Z({target:"Object",stat:!0,forced:vi},{keys:function(t){return wt(Kt(t))}});var hi=G.Object.keys,mi=hi;Io("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),zo);var yi=G.Set,gi=De("Array").concat,bi=Array.prototype,wi=function(t){var n=t.concat;return t===bi||t instanceof Array&&n===bi.concat?gi:n};Z({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}}),G.Date.now;var xi=function(t,n){var r=this;if(!(r instanceof xi))return new xi(t,n);Ut&&(r=Ut(new Error(void 0),Ur(r))),void 0!==n&&Q(r,"message",String(n));var e=[];return jo(t,e.push,{that:e}),Q(r,"errors",e),r};xi.prototype=Bt(Error.prototype,{constructor:w(5,xi),message:w(5,""),name:w(5,"AggregateError")}),Z({global:!0},{AggregateError:xi});var $i,_i,Oi,Si=v.Promise,Ei=/(iphone|ipod|ipad).*applewebkit/i.test(un),ji="process"==$(v.process),Ai=v.location,Ti=v.setImmediate,ki=v.clearImmediate,Ri=v.process,Pi=v.MessageChannel,Ii=v.Dispatch,Mi=0,Ni={},Ci="onreadystatechange",Di=function(t){if(Ni.hasOwnProperty(t)){var n=Ni[t];delete Ni[t],n()}},Bi=function(t){return function(){Di(t)}},Fi=function(t){Di(t.data)},Li=function(t){v.postMessage(t+"",Ai.protocol+"//"+Ai.host)};Ti&&ki||(Ti=function(t){for(var n=[],r=1;arguments.length>r;)n.push(arguments[r++]);return Ni[++Mi]=function(){("function"==typeof t?t:Function(t)).apply(void 0,n)},$i(Mi),Mi},ki=function(t){delete Ni[t]},ji?$i=function(t){Ri.nextTick(Bi(t))}:Ii&&Ii.now?$i=function(t){Ii.now(Bi(t))}:Pi&&!Ei?(Oi=(_i=new Pi).port2,_i.port1.onmessage=Fi,$i=J(Oi.postMessage,Oi,1)):v.addEventListener&&"function"==typeof postMessage&&!v.importScripts&&Ai&&"file:"!==Ai.protocol&&!h(Li)?($i=Li,v.addEventListener("message",Fi,!1)):$i=Ci in I("script")?function(t){Ot.appendChild(I("script")).onreadystatechange=function(){Ot.removeChild(this),Di(t)}}:function(t){setTimeout(Bi(t),0)});var zi,Ui,qi,Gi,Wi,Ji,Vi,Hi,Ki={set:Ti,clear:ki},Qi=/web0s(?!.*chrome)/i.test(un),Xi=C.f,Yi=Ki.set,Zi=v.MutationObserver||v.WebKitMutationObserver,tu=v.document,nu=v.process,ru=v.Promise,eu=Xi(v,"queueMicrotask"),ou=eu&&eu.value;ou||(zi=function(){var t,n;for(ji&&(t=nu.domain)&&t.exit();Ui;){n=Ui.fn,Ui=Ui.next;try{n()}catch(t){throw Ui?Gi():qi=void 0,t}}qi=void 0,t&&t.enter()},Ei||ji||Qi||!Zi||!tu?ru&&ru.resolve?(Vi=ru.resolve(void 0),Hi=Vi.then,Gi=function(){Hi.call(Vi,zi)}):Gi=ji?function(){nu.nextTick(zi)}:function(){Yi.call(v,zi)}:(Wi=!0,Ji=tu.createTextNode(""),new Zi(zi).observe(Ji,{characterData:!0}),Gi=function(){Ji.data=Wi=!Wi}));var iu=ou||function(t){var n={fn:t,next:void 0};qi&&(qi.next=n),Ui||(Ui=n,Gi()),qi=n},uu=function(t){var n,r;this.promise=new t((function(t,e){if(void 0!==n||void 0!==r)throw TypeError("Bad Promise constructor");n=t,r=e})),this.resolve=W(n),this.reject=W(r)},cu={f:function(t){return new uu(t)}},au=function(t,n){if(V(t),j(n)&&n.constructor===t)return n;var r=cu.f(t);return(0,r.resolve)(n),r.promise},fu=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},lu=Ki.set,su=rn("species"),pu="Promise",du=Yn.get,vu=Yn.set,hu=Yn.getterFor(pu),mu=Si,yu=v.TypeError,gu=v.document,bu=v.process;_t("fetch");var wu,xu,$u,_u=cu.f,Ou=_u,Su=!!(gu&&gu.createEvent&&v.dispatchEvent),Eu="function"==typeof PromiseRejectionEvent,ju="unhandledrejection",Au=q(pu,(function(){if(!(qn(mu)!==String(mu))){if(66===ln)return!0;if(!ji&&!Eu)return!0}if(!mu.prototype.finally)return!0;if(ln>=51&&/native code/.test(mu))return!1;var t=mu.resolve(1),n=function(t){t((function(){}),(function(){}))};return(t.constructor={})[su]=n,!(t.then((function(){}))instanceof n)})),Tu=Au||!Xe((function(t){mu.all(t).catch((function(){}))})),ku=function(t){var n;return!(!j(t)||"function"!=typeof(n=t.then))&&n},Ru=function(t,n){if(!t.notified){t.notified=!0;var r=t.reactions;iu((function(){for(var e=t.value,o=1==t.state,i=0;r.length>i;){var u,c,a,f=r[i++],l=o?f.ok:f.fail,s=f.resolve,p=f.reject,d=f.domain;try{l?(o||(2===t.rejection&&Nu(t),t.rejection=1),!0===l?u=e:(d&&d.enter(),u=l(e),d&&(d.exit(),a=!0)),u===f.promise?p(yu("Promise-chain cycle")):(c=ku(u))?c.call(u,s,p):s(u)):p(e)}catch(t){d&&!a&&d.exit(),p(t)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&Iu(t)}))}},Pu=function(t,n,r){var e,o;Su?((e=gu.createEvent("Event")).promise=n,e.reason=r,e.initEvent(t,!1,!0),v.dispatchEvent(e)):e={promise:n,reason:r},!Eu&&(o=v["on"+t])?o(e):t===ju&&function(t,n){var r=v.console;r&&r.error&&(1===arguments.length?r.error(t):r.error(t,n))}("Unhandled promise rejection",r)},Iu=function(t){lu.call(v,(function(){var n,r=t.facade,e=t.value;if(Mu(t)&&(n=fu((function(){ji?bu.emit("unhandledRejection",e,r):Pu(ju,r,e)})),t.rejection=ji||Mu(t)?2:1,n.error))throw n.value}))},Mu=function(t){return 1!==t.rejection&&!t.parent},Nu=function(t){lu.call(v,(function(){var n=t.facade;ji?bu.emit("rejectionHandled",n):Pu("rejectionhandled",n,t.value)}))},Cu=function(t,n,r){return function(e){t(n,e,r)}},Du=function(t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,Ru(t,!0))},Bu=function(t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===n)throw yu("Promise can't be resolved itself");var e=ku(n);e?iu((function(){var r={done:!1};try{e.call(n,Cu(Bu,r,t),Cu(Du,r,t))}catch(n){Du(r,n,t)}})):(t.value=n,t.state=1,Ru(t,!1))}catch(n){Du({done:!1},n,t)}}};Au&&(mu=function(t){Ao(this,mu,pu),W(t),wu.call(this);var n=du(this);try{t(Cu(Bu,n),Cu(Du,n))}catch(t){Du(n,t)}},(wu=function(t){vu(this,{type:pu,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=Mo(mu.prototype,{then:function(t,n){var r=hu(this),e=_u(Jo(this,mu));return e.ok="function"!=typeof t||t,e.fail="function"==typeof n&&n,e.domain=ji?bu.domain:void 0,r.parent=!0,r.reactions.push(e),0!=r.state&&Ru(r,!1),e.promise},catch:function(t){return this.then(void 0,t)}}),xu=function(){var t=new wu,n=du(t);this.promise=t,this.resolve=Cu(Bu,n),this.reject=Cu(Du,n)},cu.f=_u=function(t){return t===mu||t===$u?new xu(t):Ou(t)}),Z({global:!0,wrap:!0,forced:Au},{Promise:mu}),Bn(mu,pu,!1,!0),Co(pu),$u=_t(pu),Z({target:pu,stat:!0,forced:Au},{reject:function(t){var n=_u(this);return n.reject.call(void 0,t),n.promise}}),Z({target:pu,stat:!0,forced:St},{resolve:function(t){return au(this===$u?mu:this,t)}}),Z({target:pu,stat:!0,forced:Tu},{all:function(t){var n=this,r=_u(n),e=r.resolve,o=r.reject,i=fu((function(){var r=W(n.resolve),i=[],u=0,c=1;jo(t,(function(t){var a=u++,f=!1;i.push(void 0),c++,r.call(n,t).then((function(t){f||(f=!0,i[a]=t,--c||e(i))}),o)})),--c||e(i)}));return i.error&&o(i.value),r.promise},race:function(t){var n=this,r=_u(n),e=r.reject,o=fu((function(){var o=W(n.resolve);jo(t,(function(t){o.call(n,t).then(r.resolve,e)}))}));return o.error&&e(o.value),r.promise}}),Z({target:"Promise",stat:!0},{allSettled:function(t){var n=this,r=cu.f(n),e=r.resolve,o=r.reject,i=fu((function(){var r=W(n.resolve),o=[],i=0,u=1;jo(t,(function(t){var c=i++,a=!1;o.push(void 0),u++,r.call(n,t).then((function(t){a||(a=!0,o[c]={status:"fulfilled",value:t},--u||e(o))}),(function(t){a||(a=!0,o[c]={status:"rejected",reason:t},--u||e(o))}))})),--u||e(o)}));return i.error&&o(i.value),r.promise}});var Fu="No one promise resolved";Z({target:"Promise",stat:!0},{any:function(t){var n=this,r=cu.f(n),e=r.resolve,o=r.reject,i=fu((function(){var r=W(n.resolve),i=[],u=0,c=1,a=!1;jo(t,(function(t){var f=u++,l=!1;i.push(void 0),c++,r.call(n,t).then((function(t){l||a||(a=!0,e(t))}),(function(t){l||a||(l=!0,i[f]=t,--c||o(new(_t("AggregateError"))(i,Fu)))}))})),--c||o(new(_t("AggregateError"))(i,Fu))}));return i.error&&o(i.value),r.promise}});var Lu=!!Si&&h((function(){Si.prototype.finally.call({then:function(){}},(function(){}))}));Z({target:"Promise",proto:!0,real:!0,forced:Lu},{finally:function(t){var n=Jo(this,_t("Promise")),r="function"==typeof t;return this.then(r?function(r){return au(n,t()).then((function(){return r}))}:t,r?function(r){return au(n,t()).then((function(){throw r}))}:t)}});var zu=G.Promise,Uu=ri,qu=_t("Reflect","ownKeys")||function(t){var n=wn.f(V(t)),r=Sn.f;return r?n.concat(r(t)):n};Z({target:"Object",stat:!0,sham:!m},{getOwnPropertyDescriptors:function(t){for(var n,r,e=E(t),o=C.f,i=qu(e),u={},c=0;i.length>c;)void 0!==(r=o(e,n=i[c++]))&&Qt(u,n,r);return u}});var Gu=G.Object.getOwnPropertyDescriptors,Wu=Ze,Ju=pn("splice"),Vu=Re("splice",{ACCESSORS:!0,0:0,1:2}),Hu=Math.max,Ku=Math.min,Qu=9007199254740991,Xu="Maximum allowed length exceeded";Z({target:"Array",proto:!0,forced:!Ju||!Vu},{splice:function(t,n){var r,e,o,i,u,c,a=Kt(this),f=lt(a.length),l=dt(t,f),s=arguments.length;if(0===s?r=e=0:1===s?(r=0,e=f-l):(r=s-2,e=Ku(Hu(at(n),0),f-l)),f+r-e>Qu)throw TypeError(Xu);for(o=on(a,e),i=0;i<e;i++)(u=l+i)in a&&Qt(o,i,a[u]);if(o.length=e,r<e){for(i=l;i<f-e;i++)c=i+r,(u=i+e)in a?a[c]=a[u]:delete a[c];for(i=f;i>f-e+r;i--)delete a[i-1]}else if(r>e)for(i=f-e;i>l;i--)c=i+r-1,(u=i+e-1)in a?a[c]=a[u]:delete a[c];for(i=0;i<r;i++)a[i+l]=arguments[i+2];return a.length=f-e+r,o}});var Yu=De("Array").splice,Zu=Array.prototype,tc=function(t){var n=t.splice;return t===Zu||t instanceof Array&&n===Zu.splice?Yu:n},nc=nr.map,rc=pn("map"),ec=Re("map");Z({target:"Array",proto:!0,forced:!rc||!ec},{map:function(t){return nc(this,t,arguments.length>1?arguments[1]:void 0)}});var oc=De("Array").map,ic=Array.prototype,uc=function(t){var n=t.map;return t===ic||t instanceof Array&&n===ic.map?oc:n},cc=Uo,ac=Object.assign,fc=Object.defineProperty,lc=!ac||h((function(){if(m&&1!==ac({b:1},ac(fc({},"a",{enumerable:!0,get:function(){fc(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},n={},r=Symbol(),e="abcdefghijklmnopqrst";return t[r]=7,e.split("").forEach((function(t){n[t]=t})),7!=ac({},t)[r]||wt(ac({},n)).join("")!=e}))?function(t,n){for(var r=Kt(t),e=arguments.length,o=1,i=Sn.f,u=b.f;e>o;)for(var c,a=O(arguments[o++]),f=i?wt(a).concat(i(a)):wt(a),l=f.length,s=0;l>s;)c=f[s++],m&&!u.call(a,c)||(r[c]=a[c]);return r}:ac;Z({target:"Object",stat:!0,forced:Object.assign!==lc},{assign:lc}),G.Object.assign;var sc=_t("JSON","stringify"),pc=/[\uD800-\uDFFF]/g,dc=/^[\uD800-\uDBFF]$/,vc=/^[\uDC00-\uDFFF]$/,hc=function(t,n,r){var e=r.charAt(n-1),o=r.charAt(n+1);return dc.test(t)&&!vc.test(o)||vc.test(t)&&!dc.test(e)?"\\u"+t.charCodeAt(0).toString(16):t},mc=h((function(){return'"\\udf06\\ud834"'!==sc("\udf06\ud834")||'"\\udead"'!==sc("\udead")}));sc&&Z({target:"JSON",stat:!0,forced:mc},{stringify:function(t,n,r){var e=sc.apply(null,arguments);return"string"==typeof e?e.replace(pc,hc):e}}),G.JSON||(G.JSON={stringify:JSON.stringify});Z({target:"Array",proto:!0},{fill:function(t){for(var n=Kt(this),r=lt(n.length),e=arguments.length,o=dt(e>1?arguments[1]:void 0,r),i=e>2?arguments[2]:void 0,u=void 0===i?r:dt(i,r);u>o;)n[o++]=t;return n}});var yc,gc=De("Array").fill,bc=Array.prototype,wc=function(t){var n=t.fill;return t===bc||t instanceof Array&&n===bc.fill?gc:n};function xc(){}function $c(t,n){for(var r in n)t[r]=n[r];return t}function _c(t){return t()}function Oc(){return ii(null)}function Sc(t){di(t).call(t,_c)}function Ec(t){return"function"==typeof t}function jc(t,n){return t!=t?n==n:t!==n||t&&"object"===me(t)||"function"==typeof t}function Ac(t,n,r){t.$$.on_destroy.push(function(t){if(null==t)return xc;for(var n=arguments.length,r=new Array(n>1?n-1:0),e=1;e<n;e++)r[e-1]=arguments[e];var o=t.subscribe.apply(t,r);return o.unsubscribe?function(){return o.unsubscribe()}:o}(n,r))}function Tc(t,n,r,e){if(t){var o=kc(t,n,r,e);return t[0](o)}}function kc(t,n,r,e){var o;return t[1]&&e?$c(oo(o=r.ctx).call(o),t[1](e(n))):r.ctx}function Rc(t,n,r,e,o,i,u){var c=function(t,n,r,e){if(t[2]&&e){var o=t[2](e(r));if(void 0===n.dirty)return o;if("object"===me(o)){for(var i=[],u=Math.max(n.dirty.length,o.length),c=0;c<u;c+=1)i[c]=n.dirty[c]|o[c];return i}return n.dirty|o}return n.dirty}(n,e,o,i);if(c){var a=kc(n,r,e,u);t.p(a,c)}}function Pc(t,n){var r={};for(var e in n=new yi(n),t)n.has(e)||"$"===e[0]||(r[e]=t[e]);return r}function Ic(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;return t.set(r),n}function Mc(t,n){t.appendChild(n)}function Nc(t,n,r){t.insertBefore(n,r||null)}function Cc(t){t.parentNode.removeChild(t)}function Dc(t,n){for(var r=0;r<t.length;r+=1)t[r]&&t[r].d(n)}function Bc(t){return document.createElement(t)}function Fc(t){return document.createTextNode(t)}function Lc(){return Fc(" ")}function zc(){return Fc("")}function Uc(t,n,r,e){return t.addEventListener(n,r,e),function(){return t.removeEventListener(n,r,e)}}function qc(t,n,r){null==r?t.removeAttribute(n):t.getAttribute(n)!==r&&t.setAttribute(n,r)}function Gc(t,n){var r=Gu(t.__proto__);for(var e in n)null==n[e]?t.removeAttribute(e):"style"===e?t.style.cssText=n[e]:"__value"===e?t.value=t[e]=n[e]:r[e]&&r[e].set?t[e]=n[e]:qc(t,e,n[e])}function Wc(t){return""===t?null:+t}function Jc(t){return Wu(t.childNodes)}function Vc(t,n){n=""+n,t.wholeText!==n&&(t.data=n)}function Hc(t,n){t.value=null==n?"":n}function Kc(t,n,r,e){t.style.setProperty(n,r,e?"important":"")}function Qc(t,n,r){t.classList[r?"add":"remove"](n)}function Xc(t){yc=t}function Yc(){if(!yc)throw new Error("Function called outside component initialization");return yc}function Zc(t){Yc().$$.on_mount.push(t)}function ta(){var t=Yc();return function(n,r){var e=t.$$.callbacks[n];if(e){var o,i=function(t,n){var r=document.createEvent("CustomEvent");return r.initCustomEvent(t,!1,!1,n),r}(n,r);di(o=oo(e).call(e)).call(o,(function(n){n.call(t,i)}))}}}new yi,new yi;var na=[],ra=[],ea=[],oa=[],ia=zu.resolve(),ua=!1;function ca(t){ea.push(t)}var aa=!1,fa=new yi;function la(){if(!aa){aa=!0;do{for(var t=0;t<na.length;t+=1){var n=na[t];Xc(n),sa(n.$$)}for(Xc(null),na.length=0;ra.length;)ra.pop()();for(var r=0;r<ea.length;r+=1){var e=ea[r];fa.has(e)||(fa.add(e),e())}ea.length=0}while(na.length);for(;oa.length;)oa.pop()();ua=!1,aa=!1,fa.clear()}}function sa(t){if(null!==t.fragment){var n;t.update(),Sc(t.before_update);var r=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,r),di(n=t.after_update).call(n,ca)}}var pa,da=new yi;function va(){pa={r:0,c:[],p:pa}}function ha(){pa.r||Sc(pa.c),pa=pa.p}function ma(t,n){t&&t.i&&(da.delete(t),t.i(n))}function ya(t,n,r,e){if(t&&t.o){if(da.has(t))return;da.add(t),pa.c.push((function(){da.delete(t),e&&(r&&t.d(1),e())})),t.o(n)}}function ga(t){t&&t.c()}function ba(t,n,r,e){var o=t.$$,i=o.fragment,u=o.on_mount,c=o.on_destroy,a=o.after_update;i&&i.m(n,r),e||ca((function(){var n,r=lo(n=uc(u).call(u,_c)).call(n,Ec);c?c.push.apply(c,oi(r)):Sc(r),t.$$.on_mount=[]})),di(a).call(a,ca)}function wa(t,n){var r=t.$$;null!==r.fragment&&(Sc(r.on_destroy),r.fragment&&r.fragment.d(n),r.on_destroy=r.fragment=null,r.ctx=[])}function xa(t,n){var r;-1===t.$$.dirty[0]&&(na.push(t),ua||(ua=!0,ia.then(la)),wc(r=t.$$.dirty).call(r,0));t.$$.dirty[n/31|0]|=1<<n%31}function $a(t,n,r,e,o,i){var u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[-1],c=yc;Xc(t);var a=t.$$={fragment:null,ctx:null,props:i,update:xc,not_equal:o,bound:Oc(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new cc(c?c.$$.context:[]),callbacks:Oc(),dirty:u,skip_bound:!1},f=!1;if(a.ctx=r?r(t,n.props||{},(function(n,r){var e=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:r;return a.ctx&&o(a.ctx[n],a.ctx[n]=e)&&(!a.skip_bound&&a.bound[n]&&a.bound[n](e),f&&xa(t,n)),r})):[],a.update(),f=!0,Sc(a.before_update),a.fragment=!!e&&e(a.ctx),n.target){if(n.hydrate){var l=Jc(n.target);a.fragment&&a.fragment.l(l),di(l).call(l,Cc)}else a.fragment&&a.fragment.c();n.intro&&ma(t.$$.fragment),ba(t,n.target,n.anchor,n.customElement),la()}Xc(c)}new yi(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]);var _a=function(){function t(){l(this,t)}return et(t,[{key:"$destroy",value:function(){wa(this,1),this.$destroy=xc}},{key:"$on",value:function(t,n){var r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),function(){var t=Uu(r).call(r,n);-1!==t&&tc(r).call(r,t,1)}}},{key:"$set",value:function(t){this.$$set&&0!==mi(t).length&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}]),t}();function Oa(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}var Sa=function(t){return{}},Ea=function(t){return{}};function ja(t){var n,r,e,o,i,u,c,a,f,l,s,p,d,v,h=t[6].default,m=Tc(h,t,t[5],null),y=t[6].footer,g=Tc(y,t,t[5],Ea);return{c:function(){n=Bc("div"),r=Bc("div"),e=Bc("div"),o=Bc("div"),i=Bc("h5"),u=Fc(t[1]),c=Lc(),(a=Bc("button")).innerHTML='<span aria-hidden="true">×</span>',f=Lc(),l=Bc("div"),m&&m.c(),s=Lc(),p=Bc("div"),g&&g.c(),qc(i,"class","modal-title"),qc(a,"type","button"),qc(a,"class","close"),qc(a,"data-dismiss","bookly-modal"),qc(a,"aria-label","Close"),qc(o,"class","modal-header"),qc(l,"class","modal-body"),qc(p,"class","modal-footer"),qc(e,"class","modal-content"),qc(r,"class",d="modal-dialog modal-"+t[0]),qc(n,"class","bookly-modal bookly-fade"),qc(n,"tabindex","-1"),qc(n,"role","dialog")},m:function(d,h){Nc(d,n,h),Mc(n,r),Mc(r,e),Mc(e,o),Mc(o,i),Mc(i,u),Mc(o,c),Mc(o,a),Mc(e,f),Mc(e,l),m&&m.m(l,null),Mc(e,s),Mc(e,p),g&&g.m(p,null),t[7](n),v=!0},p:function(t,n){var e=eo(n,1)[0];(!v||2&e)&&Vc(u,t[1]),m&&m.p&&32&e&&Rc(m,h,t,t[5],e,null,null),g&&g.p&&32&e&&Rc(g,y,t,t[5],e,Sa,Ea),(!v||1&e&&d!==(d="modal-dialog modal-"+t[0]))&&qc(r,"class",d)},i:function(t){v||(ma(m,t),ma(g,t),v=!0)},o:function(t){ya(m,t),ya(g,t),v=!1},d:function(r){r&&Cc(n),m&&m.d(r),g&&g.d(r),t[7](null)}}}function Aa(t,n,r){var e,o=n.$$slots,i=void 0===o?{}:o,c=n.$$scope,a=ta(),f=n.size,l=void 0===f?"lg":f,s=n.title,p=void 0===s?"":s;return Zc((function(){return u.default(e).booklyModal().on("hidden.bs.modal",(function(){return a("hidden")}))})),t.$$set=function(t){"size"in t&&r(0,l=t.size),"title"in t&&r(1,p=t.title),"$$scope"in t&&r(5,c=t.$$scope)},[l,p,e,function(){u.default(e).booklyModal("show")},function(){u.default(e).booklyModal("hide")},c,i,function(t){ra[t?"unshift":"push"]((function(){r(2,e=t)}))}]}var Ta=function(t){Wt(r,t);var n=Oa(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,Aa,ja,jc,{size:0,title:1,show:3,hide:4}),e}return et(r,[{key:"show",get:function(){return this.$$.ctx[3]}},{key:"hide",get:function(){return this.$$.ctx[4]}}]),r}(_a);function ka(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function Ra(t){for(var n,r,e,o,i,u,c,a,f=t[3]?"…":"",l=t[9].default,s=Tc(l,t,t[8],null),p=[{type:t[0]},{class:i="btn ladda-button "+t[1]},{"data-spinner-size":"40"},{"data-style":"zoom-in"},t[5]],d={},v=0;v<p.length;v+=1)d=$c(d,p[v]);return{c:function(){n=Bc("button"),r=Bc("span"),s&&s.c(),e=Fc(t[2]),o=Fc(f),qc(r,"class","ladda-label"),Gc(n,d)},m:function(i,f){Nc(i,n,f),Mc(n,r),s&&s.m(r,null),Mc(r,e),Mc(r,o),t[11](n),u=!0,c||(a=Uc(n,"click",t[10]),c=!0)},p:function(t,r){var c=eo(r,1)[0];s&&s.p&&256&c&&Rc(s,l,t,t[8],c,null,null),(!u||4&c)&&Vc(e,t[2]),(!u||8&c)&&f!==(f=t[3]?"…":"")&&Vc(o,f),Gc(n,d=function(t,n){for(var r={},e={},o={$$scope:1},i=t.length;i--;){var u=t[i],c=n[i];if(c){for(var a in u)a in c||(e[a]=1);for(var f in c)o[f]||(r[f]=c[f],o[f]=1);t[i]=c}else for(var l in u)o[l]=1}for(var s in e)s in r||(r[s]=void 0);return r}(p,[(!u||1&c)&&{type:t[0]},(!u||2&c&&i!==(i="btn ladda-button "+t[1]))&&{class:i},{"data-spinner-size":"40"},{"data-style":"zoom-in"},32&c&&t[5]]))},i:function(t){u||(ma(s,t),u=!0)},o:function(t){ya(s,t),u=!1},d:function(r){r&&Cc(n),s&&s.d(r),t[11](null),c=!1,a()}}}function Pa(t,n,r){var e,o,i,u=["type","class","caption","loading","ellipsis"],a=Pc(n,u),f=n,l=f.$$slots,s=void 0===l?{}:l,p=f.$$scope,d=n.type,v=void 0===d?"button":d,h=n.class,m=void 0===h?"btn-default":h,y=n.caption,g=void 0===y?"":y,b=n.loading,w=void 0!==b&&b,x=n.ellipsis,$=void 0!==x&&x;return Zc((function(){return r(7,o=c.default.create(e))})),i=function(){return o&&o.remove()},Yc().$$.on_destroy.push(i),t.$$set=function(t){n=$c($c({},n),function(t){var n={};for(var r in t)"$"!==r[0]&&(n[r]=t[r]);return n}(t)),r(5,a=Pc(n,u)),"type"in t&&r(0,v=t.type),"class"in t&&r(1,m=t.class),"caption"in t&&r(2,g=t.caption),"loading"in t&&r(6,w=t.loading),"ellipsis"in t&&r(3,$=t.ellipsis),"$$scope"in t&&r(8,p=t.$$scope)},t.$$.update=function(){192&t.$$.dirty&&o&&(w?o.start():o.stop())},[v,m,g,$,e,a,w,o,p,s,function(n){!function(t,n){var r,e=t.$$.callbacks[n.type];e&&di(r=oo(e).call(e)).call(r,(function(t){return t(n)}))}(t,n)},function(t){ra[t?"unshift":"push"]((function(){r(4,e=t)}))}]}var Ia=function(t){Wt(r,t);var n=ka(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,Pa,Ra,jc,{type:0,class:1,caption:2,loading:6,ellipsis:3}),e}return r}(_a),Ma="\t\n\v\f\r                 \u2028\u2029\ufeff",Na="["+Ma+"]",Ca=RegExp("^"+Na+Na+"*"),Da=RegExp(Na+Na+"*$"),Ba=function(t){return function(n){var r=String(S(n));return 1&t&&(r=r.replace(Ca,"")),2&t&&(r=r.replace(Da,"")),r}},Fa={start:Ba(1),end:Ba(2),trim:Ba(3)},La=Fa.trim,za=v.parseInt,Ua=/^[+-]?0[Xx]/,qa=8!==za(Ma+"08")||22!==za(Ma+"0x16")?function(t,n){var r=La(String(t));return za(r,n>>>0||(Ua.test(r)?16:10))}:za;Z({global:!0,forced:parseInt!=qa},{parseInt:qa});var Ga=G.parseInt,Wa=Fa.trim,Ja=v.parseFloat,Va=1/Ja(Ma+"-0")!=-1/0?function(t){var n=Wa(String(t)),r=Ja(n);return 0===r&&"-"==n.charAt(0)?-0:r}:Ja;Z({global:!0,forced:parseFloat!=Va},{parseFloat:Va});var Ha=G.parseFloat,Ka=G.Object.getOwnPropertySymbols,Qa=Ka,Xa=_o;Z({target:"Object",stat:!0,forced:!m,sham:!m},{defineProperties:xt});var Ya=p((function(t){var n=G.Object,r=t.exports=function(t,r){return n.defineProperties(t,r)};n.defineProperties.sham&&(r.sham=!0)})),Za=tt;function tf(t,n,r){return n in t?nt(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}var nf=[];var rf=Ka,ef=hi;function of(t,n){if(null==t)return{};var r,e,o=function(t,n){if(null==t)return{};var r,e,o={},i=ef(t);for(e=0;e<i.length;e++)r=i[e],ei(n).call(n,r)>=0||(o[r]=t[r]);return o}(t,n);if(rf){var i=rf(t);for(e=0;e<i.length;e++)r=i[e],ei(n).call(n,r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function uf(t,n){var r=mi(t);if(Qa){var e=Qa(t);n&&(e=lo(e).call(e,(function(n){return Xa(t,n).enumerable}))),r.push.apply(r,e)}return r}function cf(t,n){var r=t,e=function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xc,e=[];function o(r){if(jc(t,r)&&(t=r,n)){for(var o=!nf.length,i=0;i<e.length;i+=1){var u=e[i];u[1](),nf.push(u,t)}if(o){for(var c=0;c<nf.length;c+=2)nf[c][0](nf[c+1]);nf.length=0}}}function i(n){o(n(t))}function u(i){var u=[i,arguments.length>1&&void 0!==arguments[1]?arguments[1]:xc];return e.push(u),1===e.length&&(n=r(o)||xc),i(t),function(){var t=Uu(e).call(e,u);-1!==t&&tc(e).call(e,t,1),0===e.length&&(n(),n=null)}}return{set:o,update:i,subscribe:u}}(t,n),o=e.set;return function(t){for(var n=1;n<arguments.length;n++){var r,e=null!=arguments[n]?arguments[n]:{};if(n%2)di(r=uf(Object(e),!0)).call(r,(function(n){tf(t,n,e[n])}));else if(Gu)Ya(t,Gu(e));else{var o;di(o=uf(Object(e))).call(o,(function(n){Za(t,n,Xa(e,n))}))}}return t}({set:function(t){r=t,o(t)},get:function(){return r}},of(e,["set"]))}var af=nr.find,ff="find",lf=!0,sf=Re(ff);ff in[]&&Array(1).find((function(){lf=!1})),Z({target:"Array",proto:!0,forced:lf||!sf},{find:function(t){return af(this,t,arguments.length>1?arguments[1]:void 0)}}),De("Array").find;var pf=ht.includes,df=Re("indexOf",{ACCESSORS:!0,1:0});Z({target:"Array",proto:!0,forced:!df},{includes:function(t){return pf(this,t,arguments.length>1?arguments[1]:void 0)}});var vf=De("Array").includes,hf=rn("match"),mf=function(t){if(function(t){var n;return j(t)&&(void 0!==(n=t[hf])?!!n:"RegExp"==$(t))}(t))throw TypeError("The method doesn't accept regular expressions");return t},yf=rn("match");Z({target:"String",proto:!0,forced:!function(t){var n=/./;try{"/./"[t](n)}catch(r){try{return n[yf]=!1,"/./"[t](n)}catch(t){}}return!1}("includes")},{includes:function(t){return!!~String(S(this)).indexOf(mf(t),arguments.length>1?arguments[1]:void 0)}});var gf=De("String").includes,bf=Array.prototype,wf=String.prototype,xf=function(t){var n=t.includes;return t===bf||t instanceof Array&&n===bf.includes?vf:"string"==typeof t||t===wf||t instanceof String&&n===wf.includes?gf:n};function $f(t){for(var n,r=arguments.length,e=new Array(r>1?r-1:0),o=1;o<r;o++)e[o-1]=arguments[o];return u.default.extend.apply(u.default,wi(n=[!0,{},t]).call(n,e))}function _f(t){var n;return xf(n=BooklyL10nGlobal.addons).call(n,t)}var Of=BooklyL10nGlobal.csrf_token;function Sf(t,n){var r=mi(t);if(Qa){var e=Qa(t);n&&(e=lo(e).call(e,(function(n){return Xa(t,n).enumerable}))),r.push.apply(r,e)}return r}function Ef(t){for(var n=1;n<arguments.length;n++){var r,e=null!=arguments[n]?arguments[n]:{};if(n%2)di(r=Sf(Object(e),!0)).call(r,(function(n){tf(t,n,e[n])}));else if(Gu)Ya(t,Gu(e));else{var o;di(o=Sf(Object(e))).call(o,(function(n){Za(t,n,Xa(e,n))}))}}return t}function jf(t,n){var r=$f({value:t}),e=cf(t,n);return Ef(Ef({},e),{},{reset:function(){return e.set($f(r).value)}})}var Af=cf(),Tf=jf({payment:{},adjustments:[],show:{}}),kf=jf(!1),Rf=jf(""),Pf=jf(),If=jf();function Mf(t,n){var r=n.get(t);if(!r)throw new TypeError("attempted to get private field on non-instance");return r.get?r.get.call(t):r.value}var Nf=So.getWeakData,Cf=Yn.set,Df=Yn.getterFor,Bf=nr.find,Ff=nr.findIndex,Lf=0,zf=function(t){return t.frozen||(t.frozen=new Uf)},Uf=function(){this.entries=[]},qf=function(t,n){return Bf(t.entries,(function(t){return t[0]===n}))};Uf.prototype={get:function(t){var n=qf(this,t);if(n)return n[1]},has:function(t){return!!qf(this,t)},set:function(t,n){var r=qf(this,t);r?r[1]=n:this.entries.push([t,n])},delete:function(t){var n=Ff(this.entries,(function(n){return n[0]===t}));return~n&&this.entries.splice(n,1),!!~n}};var Gf={getConstructor:function(t,n,r,e){var o=t((function(t,i){Ao(t,o,n),Cf(t,{type:n,id:Lf++,frozen:void 0}),null!=i&&jo(i,t[e],{that:t,AS_ENTRIES:r})})),i=Df(n),u=function(t,n,r){var e=i(t),o=Nf(V(n),!0);return!0===o?zf(e).set(n,r):o[e.id]=r,t};return Mo(o.prototype,{delete:function(t){var n=i(this);if(!j(t))return!1;var r=Nf(t);return!0===r?zf(n).delete(t):r&&k(r,n.id)&&delete r[n.id]},has:function(t){var n=i(this);if(!j(t))return!1;var r=Nf(t);return!0===r?zf(n).has(t):r&&k(r,n.id)}}),Mo(o.prototype,r?{get:function(t){var n=i(this);if(j(t)){var r=Nf(t);return!0===r?zf(n).get(t):r?r[n.id]:void 0}},set:function(t,n){return u(this,t,n)}}:{add:function(t){return u(this,t,!0)}}),o}};p((function(t){var n,r=Yn.enforce,e=!v.ActiveXObject&&"ActiveXObject"in v,o=Object.isExtensible,i=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},u=t.exports=Io("WeakMap",i,Gf);if(Wn&&e){n=Gf.getConstructor(i,"WeakMap",!0),So.REQUIRED=!0;var c=u.prototype,a=c.delete,f=c.has,l=c.get,s=c.set;Mo(c,{delete:function(t){if(j(t)&&!o(t)){var e=r(this);return e.frozen||(e.frozen=new n),a.call(this,t)||e.frozen.delete(t)}return a.call(this,t)},has:function(t){if(j(t)&&!o(t)){var e=r(this);return e.frozen||(e.frozen=new n),f.call(this,t)||e.frozen.has(t)}return f.call(this,t)},get:function(t){if(j(t)&&!o(t)){var e=r(this);return e.frozen||(e.frozen=new n),f.call(this,t)?l.call(this,t):e.frozen.get(t)}return l.call(this,t)},set:function(t,e){if(j(t)&&!o(t)){var i=r(this);i.frozen||(i.frozen=new n),f.call(this,t)?s.call(this,t,e):i.frozen.set(t,e)}else s.call(this,t,e);return this}})}}));var Wf=new(0,G.WeakMap),Jf=function(){function t(n){l(this,t),Wf.set(this,{writable:!0,value:void 0}),function(t,n,r){var e=n.get(t);if(!e)throw new TypeError("attempted to set private field on non-instance");if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}(this,Wf,n)}return et(t,[{key:"price",value:function(t){var n=Mf(this,Wf).format_price.format;return t=Ha(t),n=(n=n.replace("{sign}",t<0?"-":"")).replace("{price}",this._formatNumber(Math.abs(t),Mf(this,Wf).format_price.decimals,Mf(this,Wf).format_price.decimal_separator,Mf(this,Wf).format_price.thousands_separator))}},{key:"date",value:function(t){switch(me(t)){case"string":return f.default(t).format(Mf(this,Wf).moment_format_date)}}},{key:"time",value:function(t){switch(me(t)){case"string":return f.default(t).format(Mf(this,Wf).moment_format_time);case"object":return t.format(Mf(this,Wf).moment_format_time)}}},{key:"_formatNumber",value:function(t,n,r,e){var o;t=Math.abs(Number(t)||0).toFixed(n),n=isNaN(n=Math.abs(n))?2:n,r=void 0===r?".":r,e=void 0===e?",":e;var i=t<0?"-":"",u=String(Ga(t)),c=u.length>3?u.length%3:0;return i+(c?u.substr(0,c)+e:"")+u.substr(c).replace(/(\d{3})(?=\d)/g,"$1"+e)+(n?r+oo(o=Math.abs(t-u).toFixed(n)).call(o,2):"")}}]),t}(),Vf=a.default,Hf=new Jf(Vf);function Kf(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function Qf(t,n,r){var e=oo(t).call(t);return e[3]=n[r],e}function Xf(t,n,r){var e=oo(t).call(t);return e[6]=n[r],e}function Yf(t,n,r){var e=oo(t).call(t);return e[3]=n[r],e}function Zf(t,n,r){var e=oo(t).call(t);return e[6]=n[r],e}function tl(t,n,r){var e=oo(t).call(t);return e[3]=n[r],e}function nl(t){var n,r;return{c:function(){n=Fc(t[1]),r=Fc(" × ")},m:function(t,e){Nc(t,n,e),Nc(t,r,e)},p:function(t,r){2&r&&Vc(n,t[1])},d:function(t){t&&Cc(n),t&&Cc(r)}}}function rl(t){for(var n,r=t[0].extras,e=[],o=0;o<r.length;o+=1)e[o]=il(tl(t,r,o));return{c:function(){n=Bc("ul");for(var t=0;t<e.length;t+=1)e[t].c();qc(n,"class","pl-3 m-0")},m:function(t,r){Nc(t,n,r);for(var o=0;o<e.length;o+=1)e[o].m(n,null)},p:function(t,o){if(7&o){var i;for(r=t[0].extras,i=0;i<r.length;i+=1){var u=tl(t,r,i);e[i]?e[i].p(u,o):(e[i]=il(u),e[i].c(),e[i].m(n,null))}for(;i<e.length;i+=1)e[i].d(1);e.length=r.length}},d:function(t){t&&Cc(n),Dc(e,t)}}}function el(t){var n,r;return{c:function(){n=Fc(t[1]),r=Fc(" × ")},m:function(t,e){Nc(t,n,e),Nc(t,r,e)},p:function(t,r){2&r&&Vc(n,t[1])},d:function(t){t&&Cc(n),t&&Cc(r)}}}function ol(t){var n,r,e=t[3].quantity+"";return{c:function(){n=Fc(e),r=Fc(" × ")},m:function(t,e){Nc(t,n,e),Nc(t,r,e)},p:function(t,r){1&r&&e!==(e=t[3].quantity+"")&&Vc(n,e)},d:function(t){t&&Cc(n),t&&Cc(r)}}}function il(t){var n,r,e,o=Ga(t[3].quantity)>1,i=t[3].title+"",u=t[2].payment.extras_multiply_nop&&t[1]>1&&el(t),c=o&&ol(t);return{c:function(){n=Bc("li"),u&&u.c(),r=zc(),c&&c.c(),e=Fc(i)},m:function(t,o){Nc(t,n,o),u&&u.m(n,null),Mc(n,r),c&&c.m(n,null),Mc(n,e)},p:function(t,a){t[2].payment.extras_multiply_nop&&t[1]>1?u?u.p(t,a):((u=el(t)).c(),u.m(n,r)):u&&(u.d(1),u=null),1&a&&(o=Ga(t[3].quantity)>1),o?c?c.p(t,a):((c=ol(t)).c(),c.m(n,e)):c&&(c.d(1),c=null),1&a&&i!==(i=t[3].title+"")&&Vc(e,i)},d:function(t){t&&Cc(n),u&&u.d(),c&&c.d()}}}function ul(t){for(var n,r,e,o,i,u=Vf.l10n.discount+"",c=t[0].discounts,a=[],f=0;f<c.length;f+=1)a[f]=cl(Zf(t,c,f));return{c:function(){n=Bc("ul"),r=Bc("li"),e=Fc(u),o=Bc("br"),i=Lc();for(var t=0;t<a.length;t+=1)a[t].c();qc(n,"class","pl-3 m-0")},m:function(t,u){Nc(t,n,u),Mc(n,r),Mc(r,e),Mc(r,o),Mc(r,i);for(var c=0;c<a.length;c+=1)a[c].m(r,null)},p:function(t,n){if(1&n){var e;for(c=t[0].discounts,e=0;e<c.length;e+=1){var o=Zf(t,c,e);a[e]?a[e].p(o,n):(a[e]=cl(o),a[e].c(),a[e].m(r,null))}for(;e<a.length;e+=1)a[e].d(1);a.length=c.length}},d:function(t){t&&Cc(n),Dc(a,t)}}}function cl(t){var n,r,e=t[6].title+"";return{c:function(){n=Fc(e),r=Bc("br")},m:function(t,e){Nc(t,n,e),Nc(t,r,e)},p:function(t,r){1&r&&e!==(e=t[6].title+"")&&Vc(n,e)},d:function(t){t&&Cc(n),t&&Cc(r)}}}function al(t){var n,r=Vf.l10n.na+"";return{c:function(){n=Fc(r)},m:function(t,r){Nc(t,n,r)},p:xc,d:function(t){t&&Cc(n)}}}function fl(t){var n,r,e,o=Hf.date(t[0].appointment_date)+"",i=Hf.time(t[0].appointment_date)+"";return{c:function(){n=Fc(o),r=Lc(),e=Fc(i)},m:function(t,o){Nc(t,n,o),Nc(t,r,o),Nc(t,e,o)},p:function(t,r){1&r&&o!==(o=Hf.date(t[0].appointment_date)+"")&&Vc(n,o),1&r&&i!==(i=Hf.time(t[0].appointment_date)+"")&&Vc(e,i)},d:function(t){t&&Cc(n),t&&Cc(r),t&&Cc(e)}}}function ll(t){var n,r,e=t[0].deposit_format+"";return{c:function(){n=Bc("td"),r=Fc(e),qc(n,"class","text-right")},m:function(t,e){Nc(t,n,e),Mc(n,r)},p:function(t,n){1&n&&e!==(e=t[0].deposit_format+"")&&Vc(r,e)},d:function(t){t&&Cc(n)}}}function sl(t){var n,r,e,o,i=Hf.price(t[0].service_price)+"",u=t[1]>1&&dl(t),c=t[0].extras&&vl(t),a=t[0].discounts&&gl(t);return{c:function(){u&&u.c(),n=Fc(i),r=Lc(),e=Bc("ul"),c&&c.c(),o=Lc(),a&&a.c(),qc(e,"class","pl-3 m-0 list-unstyled")},m:function(t,i){u&&u.m(t,i),Nc(t,n,i),Nc(t,r,i),Nc(t,e,i),c&&c.m(e,null),Mc(e,o),a&&a.m(e,null)},p:function(t,r){t[1]>1?u?u.p(t,r):((u=dl(t)).c(),u.m(n.parentNode,n)):u&&(u.d(1),u=null),1&r&&i!==(i=Hf.price(t[0].service_price)+"")&&Vc(n,i),t[0].extras?c?c.p(t,r):((c=vl(t)).c(),c.m(e,o)):c&&(c.d(1),c=null),t[0].discounts?a?a.p(t,r):((a=gl(t)).c(),a.m(e,null)):a&&(a.d(1),a=null)},d:function(t){u&&u.d(t),t&&Cc(n),t&&Cc(r),t&&Cc(e),c&&c.d(),a&&a.d()}}}function pl(t){var n,r=Hf.price(t[0].service_price)+"";return{c:function(){n=Fc(r)},m:function(t,r){Nc(t,n,r)},p:function(t,e){1&e&&r!==(r=Hf.price(t[0].service_price)+"")&&Vc(n,r)},d:function(t){t&&Cc(n)}}}function dl(t){var n,r;return{c:function(){n=Fc(t[1]),r=Fc(" × ")},m:function(t,e){Nc(t,n,e),Nc(t,r,e)},p:function(t,r){2&r&&Vc(n,t[1])},d:function(t){t&&Cc(n),t&&Cc(r)}}}function vl(t){for(var n,r=t[0].extras,e=[],o=0;o<r.length;o+=1)e[o]=yl(Yf(t,r,o));return{c:function(){for(var t=0;t<e.length;t+=1)e[t].c();n=zc()},m:function(t,r){for(var o=0;o<e.length;o+=1)e[o].m(t,r);Nc(t,n,r)},p:function(t,o){if(7&o){var i;for(r=t[0].extras,i=0;i<r.length;i+=1){var u=Yf(t,r,i);e[i]?e[i].p(u,o):(e[i]=yl(u),e[i].c(),e[i].m(n.parentNode,n))}for(;i<e.length;i+=1)e[i].d(1);e.length=r.length}},d:function(t){Dc(e,t),t&&Cc(n)}}}function hl(t){var n,r;return{c:function(){n=Fc(t[1]),r=Fc(" × ")},m:function(t,e){Nc(t,n,e),Nc(t,r,e)},p:function(t,r){2&r&&Vc(n,t[1])},d:function(t){t&&Cc(n),t&&Cc(r)}}}function ml(t){var n,r,e=t[3].quantity+"";return{c:function(){n=Fc(e),r=Fc(" × ")},m:function(t,e){Nc(t,n,e),Nc(t,r,e)},p:function(t,r){1&r&&e!==(e=t[3].quantity+"")&&Vc(n,e)},d:function(t){t&&Cc(n),t&&Cc(r)}}}function yl(t){var n,r,e,o=Ga(t[3].quantity)>1,i=Hf.price(t[3].price)+"",u=t[2].payment.extras_multiply_nop&&t[1]>1&&hl(t),c=o&&ml(t);return{c:function(){n=Bc("li"),u&&u.c(),r=zc(),c&&c.c(),e=Fc(i)},m:function(t,o){Nc(t,n,o),u&&u.m(n,null),Mc(n,r),c&&c.m(n,null),Mc(n,e)},p:function(t,a){t[2].payment.extras_multiply_nop&&t[1]>1?u?u.p(t,a):((u=hl(t)).c(),u.m(n,r)):u&&(u.d(1),u=null),1&a&&(o=Ga(t[3].quantity)>1),o?c?c.p(t,a):((c=ml(t)).c(),c.m(n,e)):c&&(c.d(1),c=null),1&a&&i!==(i=Hf.price(t[3].price)+"")&&Vc(e,i)},d:function(t){t&&Cc(n),u&&u.d(),c&&c.d()}}}function gl(t){for(var n,r=t[0].discounts,e=[],o=0;o<r.length;o+=1)e[o]=xl(Xf(t,r,o));return{c:function(){for(var t=0;t<e.length;t+=1)e[t].c();n=zc()},m:function(t,r){for(var o=0;o<e.length;o+=1)e[o].m(t,r);Nc(t,n,r)},p:function(t,o){if(1&o){var i;for(r=t[0].discounts,i=0;i<r.length;i+=1){var u=Xf(t,r,i);e[i]?e[i].p(u,o):(e[i]=xl(u),e[i].c(),e[i].m(n.parentNode,n))}for(;i<e.length;i+=1)e[i].d(1);e.length=r.length}},d:function(t){Dc(e,t),t&&Cc(n)}}}function bl(t){var n,r,e,o=t[6].discount+"";return{c:function(){n=Bc("li"),r=Fc(o),e=Fc("%")},m:function(t,o){Nc(t,n,o),Mc(n,r),Mc(n,e)},p:function(t,n){1&n&&o!==(o=t[6].discount+"")&&Vc(r,o)},d:function(t){t&&Cc(n)}}}function wl(t){var n,r,e=Hf.price(t[6].deduction)+"";return{c:function(){n=Bc("li"),r=Fc(e)},m:function(t,e){Nc(t,n,e),Mc(n,r)},p:function(t,n){1&n&&e!==(e=Hf.price(t[6].deduction)+"")&&Vc(r,e)},d:function(t){t&&Cc(n)}}}function xl(t){var n,r,e=Ha(t[6].discount),o=Ha(t[6].deduction),i=e&&bl(t),u=o&&wl(t);return{c:function(){i&&i.c(),n=Lc(),u&&u.c(),r=zc()},m:function(t,e){i&&i.m(t,e),Nc(t,n,e),u&&u.m(t,e),Nc(t,r,e)},p:function(t,c){1&c&&(e=Ha(t[6].discount)),e?i?i.p(t,c):((i=bl(t)).c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null),1&c&&(o=Ha(t[6].deduction)),o?u?u.p(t,c):((u=wl(t)).c(),u.m(r.parentNode,r)):u&&(u.d(1),u=null)},d:function(t){i&&i.d(t),t&&Cc(n),u&&u.d(t),t&&Cc(r)}}}function $l(t){var n,r,e,o=Hf.tax(t[0].service_tax)+"",i=t[0].extras&&_l(t);return{c:function(){n=Bc("td"),r=Fc(o),e=Lc(),i&&i.c(),qc(n,"class","text-right")},m:function(t,o){Nc(t,n,o),Mc(n,r),Mc(n,e),i&&i.m(n,null)},p:function(t,e){1&e&&o!==(o=Hf.tax(t[0].service_tax)+"")&&Vc(r,o),t[0].extras?i?i.p(t,e):((i=_l(t)).c(),i.m(n,null)):i&&(i.d(1),i=null)},d:function(t){t&&Cc(n),i&&i.d()}}}function _l(t){for(var n,r=t[0].extras,e=[],o=0;o<r.length;o+=1)e[o]=Ol(Qf(t,r,o));return{c:function(){n=Bc("ul");for(var t=0;t<e.length;t+=1)e[t].c();qc(n,"class","pl-3 m-0 list-unstyled")},m:function(t,r){Nc(t,n,r);for(var o=0;o<e.length;o+=1)e[o].m(n,null)},p:function(t,o){if(1&o){var i;for(r=t[0].extras,i=0;i<r.length;i+=1){var u=Qf(t,r,i);e[i]?e[i].p(u,o):(e[i]=Ol(u),e[i].c(),e[i].m(n,null))}for(;i<e.length;i+=1)e[i].d(1);e.length=r.length}},d:function(t){t&&Cc(n),Dc(e,t)}}}function Ol(t){var n,r,e=Hf.tax(t[3].tax)+"";return{c:function(){n=Bc("li"),r=Fc(e)},m:function(t,e){Nc(t,n,e),Mc(n,r)},p:function(t,n){1&n&&e!==(e=Hf.tax(t[3].tax)+"")&&Vc(r,e)},d:function(t){t&&Cc(n)}}}function Sl(t){var n,r,e,o,i,u,c,a,f,l,s,p,d,v,h=t[0].service_name+"",m=t[0].staff_name+"",y=t[1]>1&&nl(t),g=t[0].extras&&rl(t),b=t[0].discounts&&t[0].discounts.length>0&&ul(t);function w(t,n){return t[0].appointment_date?fl:al}var x=w(t),$=x(t),_=t[2].show.deposit&&ll(t);function O(t,n){return t[2].payment.from_backend?pl:sl}var S=O(t),E=S(t),j=t[2].show.taxes&&$l(t);return{c:function(){n=Bc("tr"),r=Bc("td"),y&&y.c(),e=Fc(h),o=Lc(),g&&g.c(),i=Lc(),b&&b.c(),u=Lc(),c=Bc("td"),$.c(),a=Lc(),f=Bc("td"),l=Fc(m),s=Lc(),_&&_.c(),p=Lc(),d=Bc("td"),E.c(),v=Lc(),j&&j.c(),qc(d,"class","text-right")},m:function(t,h){Nc(t,n,h),Mc(n,r),y&&y.m(r,null),Mc(r,e),Mc(r,o),g&&g.m(r,null),Mc(r,i),b&&b.m(r,null),Mc(n,u),Mc(n,c),$.m(c,null),Mc(n,a),Mc(n,f),Mc(f,l),Mc(n,s),_&&_.m(n,null),Mc(n,p),Mc(n,d),E.m(d,null),Mc(n,v),j&&j.m(n,null)},p:function(t,o){var u=eo(o,1)[0];t[1]>1?y?y.p(t,u):((y=nl(t)).c(),y.m(r,e)):y&&(y.d(1),y=null),1&u&&h!==(h=t[0].service_name+"")&&Vc(e,h),t[0].extras?g?g.p(t,u):((g=rl(t)).c(),g.m(r,i)):g&&(g.d(1),g=null),t[0].discounts&&t[0].discounts.length>0?b?b.p(t,u):((b=ul(t)).c(),b.m(r,null)):b&&(b.d(1),b=null),x===(x=w(t))&&$?$.p(t,u):($.d(1),($=x(t))&&($.c(),$.m(c,null))),1&u&&m!==(m=t[0].staff_name+"")&&Vc(l,m),t[2].show.deposit?_?_.p(t,u):((_=ll(t)).c(),_.m(n,p)):_&&(_.d(1),_=null),S===(S=O(t))&&E?E.p(t,u):(E.d(1),(E=S(t))&&(E.c(),E.m(d,null))),t[2].show.taxes?j?j.p(t,u):((j=$l(t)).c(),j.m(n,null)):j&&(j.d(1),j=null)},i:xc,o:xc,d:function(t){t&&Cc(n),y&&y.d(),g&&g.d(),b&&b.d(),$.d(),_&&_.d(),E.d(),j&&j.d()}}}function El(t,n,r){var e;Ac(t,Tf,(function(t){return r(2,e=t)}));var o,i=n.item;return t.$$set=function(t){"item"in t&&r(0,i=t.item)},t.$$.update=function(){1&t.$$.dirty&&r(1,o=i.number_of_persons)},[i,o,e]}Hf.tax=function(t){return null!==t?"included"===Tf.get().payment.tax_in_price?"("+Hf.price(t)+")":Hf.price(t):"-"};var jl=function(t){Wt(r,t);var n=Kf(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,El,Sl,jc,{item:0}),e}return r}(_a);function Al(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function Tl(t){var n,r,e=Hf.price(t[0].payment.subtotal.deposit)+"";return{c:function(){n=Bc("th"),r=Fc(e),qc(n,"class","text-right")},m:function(t,e){Nc(t,n,e),Mc(n,r)},p:function(t,n){1&n&&e!==(e=Hf.price(t[0].payment.subtotal.deposit)+"")&&Vc(r,e)},d:function(t){t&&Cc(n)}}}function kl(t){var n;return{c:function(){n=Bc("th")},m:function(t,r){Nc(t,n,r)},d:function(t){t&&Cc(n)}}}function Rl(t){var n,r,e,o,i,u,c,a,f,l=Hf.price(t[0].payment.subtotal.price)+"",s=t[0].show.deposit&&Tl(t),p=t[0].show.taxes&&kl();return{c:function(){n=Bc("tr"),r=Bc("th"),e=Lc(),(o=Bc("th")).textContent="".concat(Vf.l10n.subtotal),i=Lc(),s&&s.c(),u=Lc(),c=Bc("th"),a=Fc(l),f=Lc(),p&&p.c(),Kc(r,"border-left-color","white"),Kc(r,"border-bottom-color","white"),qc(o,"colspan","2"),qc(c,"class","text-right")},m:function(t,l){Nc(t,n,l),Mc(n,r),Mc(n,e),Mc(n,o),Mc(n,i),s&&s.m(n,null),Mc(n,u),Mc(n,c),Mc(c,a),Mc(n,f),p&&p.m(n,null)},p:function(t,r){var e=eo(r,1)[0];t[0].show.deposit?s?s.p(t,e):((s=Tl(t)).c(),s.m(n,u)):s&&(s.d(1),s=null),1&e&&l!==(l=Hf.price(t[0].payment.subtotal.price)+"")&&Vc(a,l),t[0].show.taxes?p||((p=kl()).c(),p.m(n,null)):p&&(p.d(1),p=null)},i:xc,o:xc,d:function(t){t&&Cc(n),s&&s.d(),p&&p.d()}}}function Pl(t,n,r){var e;return Ac(t,Tf,(function(t){return r(0,e=t)})),[e]}var Il=function(t){Wt(r,t);var n=Al(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,Pl,Rl,jc,{}),e}return r}(_a);function Ml(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function Nl(t){var n,r,e,o,i,u=t[0].payment.coupon.code+"";return{c:function(){n=Bc("div"),r=Bc("small"),e=Fc("("),o=Fc(u),i=Fc(")")},m:function(t,u){Nc(t,n,u),Mc(n,r),Mc(r,e),Mc(r,o),Mc(r,i)},p:function(t,n){1&n&&u!==(u=t[0].payment.coupon.code+"")&&Vc(o,u)},d:function(t){t&&Cc(n)}}}function Cl(t){var n,r=Hf.price(0)+"";return{c:function(){n=Fc(r)},m:function(t,r){Nc(t,n,r)},p:xc,d:function(t){t&&Cc(n)}}}function Dl(t){var n,r,e=Ha(t[0].payment.coupon.discount),o=Ha(t[0].payment.coupon.deduction),i=e&&Bl(t),u=o&&Fl(t);return{c:function(){i&&i.c(),n=Lc(),u&&u.c(),r=zc()},m:function(t,e){i&&i.m(t,e),Nc(t,n,e),u&&u.m(t,e),Nc(t,r,e)},p:function(t,c){1&c&&(e=Ha(t[0].payment.coupon.discount)),e?i?i.p(t,c):((i=Bl(t)).c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null),1&c&&(o=Ha(t[0].payment.coupon.deduction)),o?u?u.p(t,c):((u=Fl(t)).c(),u.m(r.parentNode,r)):u&&(u.d(1),u=null)},d:function(t){i&&i.d(t),t&&Cc(n),u&&u.d(t),t&&Cc(r)}}}function Bl(t){var n,r,e,o=t[0].payment.coupon.discount+"";return{c:function(){n=Bc("div"),r=Fc(o),e=Fc("%")},m:function(t,o){Nc(t,n,o),Mc(n,r),Mc(n,e)},p:function(t,n){1&n&&o!==(o=t[0].payment.coupon.discount+"")&&Vc(r,o)},d:function(t){t&&Cc(n)}}}function Fl(t){var n,r,e=Hf.price(t[0].payment.coupon.deduction)+"";return{c:function(){n=Bc("div"),r=Fc(e)},m:function(t,e){Nc(t,n,e),Mc(n,r)},p:function(t,n){1&n&&e!==(e=Hf.price(t[0].payment.coupon.deduction)+"")&&Vc(r,e)},d:function(t){t&&Cc(n)}}}function Ll(t){var n;return{c:function(){n=Bc("th")},m:function(t,r){Nc(t,n,r)},d:function(t){t&&Cc(n)}}}function zl(t){var n,r,e,o,i,u,c,a,f,l,s=Vf.l10n.coupon_discount+"",p=t[0].payment.coupon&&Nl(t);function d(t,n){return t[0].payment.coupon?Dl:Cl}var v=d(t),h=v(t),m=t[0].show.taxes&&Ll();return{c:function(){n=Bc("tr"),r=Bc("th"),e=Lc(),o=Bc("th"),i=Fc(s),u=Lc(),p&&p.c(),a=Lc(),f=Bc("th"),h.c(),l=Lc(),m&&m.c(),Kc(r,"border-left-color","white"),Kc(r,"border-bottom-color","white"),qc(o,"colspan",c=2+t[0].show.deposit),qc(f,"class","text-right")},m:function(t,c){Nc(t,n,c),Mc(n,r),Mc(n,e),Mc(n,o),Mc(o,i),Mc(o,u),p&&p.m(o,null),Mc(n,a),Mc(n,f),h.m(f,null),Mc(n,l),m&&m.m(n,null)},p:function(t,r){var e=eo(r,1)[0];t[0].payment.coupon?p?p.p(t,e):((p=Nl(t)).c(),p.m(o,null)):p&&(p.d(1),p=null),1&e&&c!==(c=2+t[0].show.deposit)&&qc(o,"colspan",c),v===(v=d(t))&&h?h.p(t,e):(h.d(1),(h=v(t))&&(h.c(),h.m(f,null))),t[0].show.taxes?m||((m=Ll()).c(),m.m(n,null)):m&&(m.d(1),m=null)},i:xc,o:xc,d:function(t){t&&Cc(n),p&&p.d(),h.d(),m&&m.d()}}}function Ul(t,n,r){var e;return Ac(t,Tf,(function(t){return r(0,e=t)})),[e]}var ql=function(t){Wt(r,t);var n=Ml(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,Ul,zl,jc,{}),e}return r}(_a);function Gl(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function Wl(t){var n,r=Hf.price(0)+"";return{c:function(){n=Fc(r)},m:function(t,r){Nc(t,n,r)},p:xc,d:function(t){t&&Cc(n)}}}function Jl(t){var n,r=t[0].payment.group_discount+"";return{c:function(){n=Fc(r)},m:function(t,r){Nc(t,n,r)},p:function(t,e){1&e&&r!==(r=t[0].payment.group_discount+"")&&Vc(n,r)},d:function(t){t&&Cc(n)}}}function Vl(t){var n;return{c:function(){n=Bc("th")},m:function(t,r){Nc(t,n,r)},d:function(t){t&&Cc(n)}}}function Hl(t){var n,r,e,o,i,u,c,a,f,l=Vf.l10n.group_discount+"";function s(t,n){return t[0].payment.group_discount?Jl:Wl}var p=s(t),d=p(t),v=t[0].show.taxes&&Vl();return{c:function(){n=Bc("tr"),r=Bc("th"),e=Lc(),o=Bc("th"),i=Fc(l),c=Lc(),a=Bc("th"),d.c(),f=Lc(),v&&v.c(),Kc(r,"border-left-color","#fff"),Kc(r,"border-bottom-color","#fff"),qc(o,"colspan",u=2+t[0].show.deposit),qc(a,"class","text-right")},m:function(t,u){Nc(t,n,u),Mc(n,r),Mc(n,e),Mc(n,o),Mc(o,i),Mc(n,c),Mc(n,a),d.m(a,null),Mc(n,f),v&&v.m(n,null)},p:function(t,r){var e=eo(r,1)[0];1&e&&u!==(u=2+t[0].show.deposit)&&qc(o,"colspan",u),p===(p=s(t))&&d?d.p(t,e):(d.d(1),(d=p(t))&&(d.c(),d.m(a,null))),t[0].show.taxes?v||((v=Vl()).c(),v.m(n,null)):v&&(v.d(1),v=null)},i:xc,o:xc,d:function(t){t&&Cc(n),d.d(),v&&v.d()}}}function Kl(t,n,r){var e;return Ac(t,Tf,(function(t){return r(0,e=t)})),[e]}var Ql=function(t){Wt(r,t);var n=Gl(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,Kl,Hl,jc,{}),e}return r}(_a);function Xl(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function Yl(t,n,r){var e=oo(t).call(t);return e[1]=n[r],e}function Zl(t,n,r){var e=oo(t).call(t);return e[1]=n[r],e}function ts(t){var n,r,e,o=t[1].title+"";return{c:function(){n=Bc("small"),r=Fc(o),e=Bc("br")},m:function(t,o){Nc(t,n,o),Mc(n,r),Nc(t,e,o)},p:function(t,n){1&n&&o!==(o=t[1].title+"")&&Vc(r,o)},d:function(t){t&&Cc(n),t&&Cc(e)}}}function ns(t){var n,r,e,o=t[1].discount+"";return{c:function(){n=Fc(o),r=Fc("%"),e=Bc("br")},m:function(t,o){Nc(t,n,o),Nc(t,r,o),Nc(t,e,o)},p:function(t,r){1&r&&o!==(o=t[1].discount+"")&&Vc(n,o)},d:function(t){t&&Cc(n),t&&Cc(r),t&&Cc(e)}}}function rs(t){var n,r,e=Hf.price(t[1].deduction)+"";return{c:function(){n=Fc(e),r=Bc("br")},m:function(t,e){Nc(t,n,e),Nc(t,r,e)},p:function(t,r){1&r&&e!==(e=Hf.price(t[1].deduction)+"")&&Vc(n,e)},d:function(t){t&&Cc(n),t&&Cc(r)}}}function es(t){var n,r,e=Ha(t[1].discount),o=Ha(t[1].deduction),i=e&&ns(t),u=o&&rs(t);return{c:function(){i&&i.c(),n=Lc(),u&&u.c(),r=zc()},m:function(t,e){i&&i.m(t,e),Nc(t,n,e),u&&u.m(t,e),Nc(t,r,e)},p:function(t,c){1&c&&(e=Ha(t[1].discount)),e?i?i.p(t,c):((i=ns(t)).c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null),1&c&&(o=Ha(t[1].deduction)),o?u?u.p(t,c):((u=rs(t)).c(),u.m(r.parentNode,r)):u&&(u.d(1),u=null)},d:function(t){i&&i.d(t),t&&Cc(n),u&&u.d(t),t&&Cc(r)}}}function os(t){var n;return{c:function(){n=Bc("th")},m:function(t,r){Nc(t,n,r)},d:function(t){t&&Cc(n)}}}function is(t){for(var n,r,e,o,i,u,c,a,f,l,s,p=Vf.l10n.discount+"",d=t[0].payment.discounts,v=[],h=0;h<d.length;h+=1)v[h]=ts(Zl(t,d,h));for(var m=t[0].payment.discounts,y=[],g=0;g<m.length;g+=1)y[g]=es(Yl(t,m,g));var b=t[0].show.taxes&&os();return{c:function(){n=Bc("tr"),r=Bc("th"),e=Lc(),o=Bc("th"),i=Fc(p),u=Bc("br"),c=Lc();for(var d=0;d<v.length;d+=1)v[d].c();f=Lc(),l=Bc("th");for(var h=0;h<y.length;h+=1)y[h].c();s=Lc(),b&&b.c(),Kc(r,"border-left-color","#fff"),Kc(r,"border-bottom-color","#fff"),qc(o,"colspan",a=2+t[0].show.deposit),qc(l,"class","text-right")},m:function(t,a){Nc(t,n,a),Mc(n,r),Mc(n,e),Mc(n,o),Mc(o,i),Mc(o,u),Mc(o,c);for(var p=0;p<v.length;p+=1)v[p].m(o,null);Mc(n,f),Mc(n,l);for(var d=0;d<y.length;d+=1)y[d].m(l,null);Mc(n,s),b&&b.m(n,null)},p:function(t,r){var e=eo(r,1)[0];if(1&e){var i;for(d=t[0].payment.discounts,i=0;i<d.length;i+=1){var u=Zl(t,d,i);v[i]?v[i].p(u,e):(v[i]=ts(u),v[i].c(),v[i].m(o,null))}for(;i<v.length;i+=1)v[i].d(1);v.length=d.length}if(1&e&&a!==(a=2+t[0].show.deposit)&&qc(o,"colspan",a),1&e){var c;for(m=t[0].payment.discounts,c=0;c<m.length;c+=1){var f=Yl(t,m,c);y[c]?y[c].p(f,e):(y[c]=es(f),y[c].c(),y[c].m(l,null))}for(;c<y.length;c+=1)y[c].d(1);y.length=m.length}t[0].show.taxes?b||((b=os()).c(),b.m(n,null)):b&&(b.d(1),b=null)},i:xc,o:xc,d:function(t){t&&Cc(n),Dc(v,t),Dc(y,t),b&&b.d()}}}function us(t,n,r){var e;return Ac(t,Tf,(function(t){return r(0,e=t)})),[e]}var cs=function(t){Wt(r,t);var n=Xl(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,us,is,jc,{}),e}return r}(_a);function as(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function fs(t,n,r){var e=oo(t).call(t);return e[1]=n[r],e}function ls(t){var n,r,e=Hf.price(t[1].tax)+"";return{c:function(){n=Bc("th"),r=Fc(e),qc(n,"class","text-right")},m:function(t,e){Nc(t,n,e),Mc(n,r)},p:function(t,n){1&n&&e!==(e=Hf.price(t[1].tax)+"")&&Vc(r,e)},d:function(t){t&&Cc(n)}}}function ss(t){var n,r,e,o,i,u,c,a,f,l,s,p=t[1].reason+"",d=Hf.price(t[1].amount)+"",v=t[0].show.taxes&&ls(t);return{c:function(){n=Bc("tr"),r=Bc("th"),e=Lc(),o=Bc("th"),i=Fc(p),c=Lc(),a=Bc("th"),f=Fc(d),l=Lc(),v&&v.c(),s=Lc(),Kc(r,"border-left-color","#fff"),Kc(r,"border-bottom-color","#fff"),qc(o,"colspan",u=2+t[0].show.deposit),qc(a,"class","text-right")},m:function(t,u){Nc(t,n,u),Mc(n,r),Mc(n,e),Mc(n,o),Mc(o,i),Mc(n,c),Mc(n,a),Mc(a,f),Mc(n,l),v&&v.m(n,null),Mc(n,s)},p:function(t,r){1&r&&p!==(p=t[1].reason+"")&&Vc(i,p),1&r&&u!==(u=2+t[0].show.deposit)&&qc(o,"colspan",u),1&r&&d!==(d=Hf.price(t[1].amount)+"")&&Vc(f,d),t[0].show.taxes?v?v.p(t,r):((v=ls(t)).c(),v.m(n,s)):v&&(v.d(1),v=null)},d:function(t){t&&Cc(n),v&&v.d()}}}function ps(t){for(var n,r=t[0].adjustments,e=[],o=0;o<r.length;o+=1)e[o]=ss(fs(t,r,o));return{c:function(){for(var t=0;t<e.length;t+=1)e[t].c();n=zc()},m:function(t,r){for(var o=0;o<e.length;o+=1)e[o].m(t,r);Nc(t,n,r)},p:function(t,o){var i=eo(o,1)[0];if(1&i){var u;for(r=t[0].adjustments,u=0;u<r.length;u+=1){var c=fs(t,r,u);e[u]?e[u].p(c,i):(e[u]=ss(c),e[u].c(),e[u].m(n.parentNode,n))}for(;u<e.length;u+=1)e[u].d(1);e.length=r.length}},i:xc,o:xc,d:function(t){Dc(e,t),t&&Cc(n)}}}function ds(t,n,r){var e;return Ac(t,Tf,(function(t){return r(0,e=t)})),[e]}var vs=function(t){Wt(r,t);var n=as(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,ds,ps,jc,{}),e}return r}(_a);function hs(t){return u.default.get(ajaxurl,{action:"bookly_get_payment_details",payment_id:t,csrf_token:Of}).done((function(t){t.success?(ms(),Tf.set(t.data)):Tf.reset()}))}function ms(){kf.reset(),Rf.reset(),Pf.reset(),If.reset()}function ys(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function gs(t){var n,r,e,o,i,u;return{c:function(){n=Bc("div"),(r=Bc("label")).textContent="".concat(Vf.l10n.tax),e=Lc(),o=Bc("input"),qc(r,"for","bookly-adjustment-tax"),qc(o,"class","form-control"),qc(o,"type","number"),qc(o,"step","1"),qc(o,"id","bookly-adjustment-tax"),qc(n,"class","form-group")},m:function(c,a){Nc(c,n,a),Mc(n,r),Mc(n,e),Mc(n,o),Hc(o,t[4]),i||(u=Uc(o,"input",t[9]),i=!0)},p:function(t,n){16&n&&Wc(o.value)!==t[4]&&Hc(o,t[4])},d:function(t){t&&Cc(n),i=!1,u()}}}function bs(t){var n,r,e,o,i,u,c,a,f,l,s,p,d,v,h,m,y,g,b,w,x,$,_,O=t[1].show.taxes&&gs(t);return(b=new Ia({props:{class:"btn-success",caption:Vf.l10n.apply,loading:t[0]}})).$on("click",t[6]),{c:function(){n=Bc("tr"),r=Bc("th"),e=Lc(),o=Bc("th"),i=Bc("div"),(u=Bc("label")).textContent="".concat(Vf.l10n.reason),c=Lc(),a=Bc("textarea"),f=Lc(),l=Bc("div"),(s=Bc("label")).textContent="".concat(Vf.l10n.amount),p=Lc(),d=Bc("input"),v=Lc(),O&&O.c(),h=Lc(),m=Bc("div"),(y=Bc("button")).textContent="".concat(Vf.l10n.cancel),g=Lc(),ga(b.$$.fragment),Kc(r,"border-left-color","#fff"),Kc(r,"border-bottom-color","#fff"),qc(u,"for","bookly-adjustment-reason"),qc(a,"class","form-control"),qc(a,"id","bookly-adjustment-reason"),qc(i,"class","form-group"),qc(s,"for","bookly-adjustment-amount"),qc(d,"class","form-control"),qc(d,"type","number"),qc(d,"step","1"),qc(d,"id","bookly-adjustment-amount"),qc(l,"class","form-group"),qc(y,"class","btn btn-default"),qc(m,"class","text-right"),qc(o,"colspan",w=3+t[1].show.deposit+t[1].show.taxes),Kc(o,"font-weight","normal"),Qc(n,"d-none",!t[5])},m:function(w,S){Nc(w,n,S),Mc(n,r),Mc(n,e),Mc(n,o),Mc(o,i),Mc(i,u),Mc(i,c),Mc(i,a),Hc(a,t[2]),Mc(o,f),Mc(o,l),Mc(l,s),Mc(l,p),Mc(l,d),Hc(d,t[3]),Mc(o,v),O&&O.m(o,null),Mc(o,h),Mc(o,m),Mc(m,y),Mc(m,g),ba(b,m,null),x=!0,$||(_=[Uc(a,"input",t[7]),Uc(d,"input",t[8]),Uc(y,"click",t[10])],$=!0)},p:function(t,r){var e=eo(r,1)[0];4&e&&Hc(a,t[2]),8&e&&Wc(d.value)!==t[3]&&Hc(d,t[3]),t[1].show.taxes?O?O.p(t,e):((O=gs(t)).c(),O.m(o,h)):O&&(O.d(1),O=null);var i={};1&e&&(i.loading=t[0]),b.$set(i),(!x||2&e&&w!==(w=3+t[1].show.deposit+t[1].show.taxes))&&qc(o,"colspan",w),32&e&&Qc(n,"d-none",!t[5])},i:function(t){x||(ma(b.$$.fragment,t),x=!0)},o:function(t){ya(b.$$.fragment,t),x=!1},d:function(t){t&&Cc(n),O&&O.d(),wa(b),$=!1,Sc(_)}}}function ws(t,n,r){var e,o,i,c,a;Ac(t,Tf,(function(t){return r(1,e=t)})),Ac(t,Rf,(function(t){return r(2,o=t)})),Ac(t,Pf,(function(t){return r(3,i=t)})),Ac(t,If,(function(t){return r(4,c=t)})),Ac(t,kf,(function(t){return r(5,a=t)}));var f=!1;return[f,e,o,i,c,a,function(){var t,n,a,l;r(0,f=!0),(t=e.payment.id,n=o,a=i,l=c,u.default.ajax({url:ajaxurl,data:{action:"bookly_pro_add_payment_adjustment",payment_id:t,reason:n,amount:a,tax:l,csrf_token:Of},dataType:"json",type:"POST",success:function(n){if(n.success){ms(),hs(t);var r=u.default("table#bookly-payments-list.dataTable, table#bookly-appointments-list.dataTable");r.length&&r.DataTable().ajax.reload()}}})).done((function(){return r(0,f=!1)}))},function(){o=this.value,Rf.set(o)},function(){i=Wc(this.value),Pf.set(i)},function(){c=Wc(this.value),If.set(c)},function(){return Ic(kf,a=!a,a)}]}var xs=function(t){Wt(r,t);var n=ys(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,ws,bs,jc,{}),e}return r}(_a);function $s(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function _s(t){var n,r,e;return{c:function(){(n=Bc("button")).textContent="".concat(Vf.l10n.manual_adjustment),qc(n,"class","btn btn-default")},m:function(o,i){Nc(o,n,i),r||(e=Uc(n,"click",t[1]),r=!0)},p:xc,i:xc,o:xc,d:function(t){t&&Cc(n),r=!1,e()}}}function Os(t,n,r){var e;Ac(t,kf,(function(t){return r(0,e=t)}));return[e,function(){return Ic(kf,e=!e,e)}]}var Ss=function(t){Wt(r,t);var n=$s(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,Os,_s,jc,{}),e}return r}(_a);function Es(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function js(t){var n,r,e,o;n=new Ss({});var i=t[1].payment.total!==t[1].payment.paid&&Ts(t);return{c:function(){ga(n.$$.fragment),r=Lc(),i&&i.c(),e=zc()},m:function(t,u){ba(n,t,u),Nc(t,r,u),i&&i.m(t,u),Nc(t,e,u),o=!0},p:function(t,n){t[1].payment.total!==t[1].payment.paid?i?(i.p(t,n),2&n&&ma(i,1)):((i=Ts(t)).c(),ma(i,1),i.m(e.parentNode,e)):i&&(va(),ya(i,1,1,(function(){i=null})),ha())},i:function(t){o||(ma(n.$$.fragment,t),ma(i),o=!0)},o:function(t){ya(n.$$.fragment,t),ya(i),o=!1},d:function(t){wa(n,t),t&&Cc(r),i&&i.d(t),t&&Cc(e)}}}function As(t){var n,r;return(n=new Ia({props:{class:"btn-success",loading:t[0],caption:Vf.l10n.bind_payment}})).$on("click",t[3]),{c:function(){ga(n.$$.fragment)},m:function(t,e){ba(n,t,e),r=!0},p:function(t,r){var e={};1&r&&(e.loading=t[0]),n.$set(e)},i:function(t){r||(ma(n.$$.fragment,t),r=!0)},o:function(t){ya(n.$$.fragment,t),r=!1},d:function(t){wa(n,t)}}}function Ts(t){var n,r;return(n=new Ia({props:{class:"btn-success",loading:t[0],caption:Vf.l10n.complete_payment}})).$on("click",t[4]),{c:function(){ga(n.$$.fragment)},m:function(t,e){ba(n,t,e),r=!0},p:function(t,r){var e={};1&r&&(e.loading=t[0]),n.$set(e)},i:function(t){r||(ma(n.$$.fragment,t),r=!0)},o:function(t){ya(n.$$.fragment,t),r=!1},d:function(t){wa(n,t)}}}function ks(t){var n,r,e,o,i,u,c,a,f=[As,js],l=[];function s(t,n){return"attach"===t[2]?0:1}return i=s(t),u=l[i]=f[i](t),{c:function(){n=Bc("tr"),r=Bc("th"),e=Lc(),o=Bc("th"),u.c(),Kc(r,"border-left-color","#fff"),Kc(r,"border-bottom-color","#fff"),qc(o,"colspan",c=3+t[1].show.deposit+t[1].show.taxes),qc(o,"class","text-right")},m:function(t,u){Nc(t,n,u),Mc(n,r),Mc(n,e),Mc(n,o),l[i].m(o,null),a=!0},p:function(t,n){var r=eo(n,1)[0],e=i;(i=s(t))===e?l[i].p(t,r):(va(),ya(l[e],1,1,(function(){l[e]=null})),ha(),(u=l[i])?u.p(t,r):(u=l[i]=f[i](t)).c(),ma(u,1),u.m(o,null)),(!a||2&r&&c!==(c=3+t[1].show.deposit+t[1].show.taxes))&&qc(o,"colspan",c)},i:function(t){a||(ma(u),a=!0)},o:function(t){ya(u),a=!1},d:function(t){t&&Cc(n),l[i].d()}}}function Rs(t,n,r){var e,o;Ac(t,Tf,(function(t){return r(1,e=t)})),Ac(t,Af,(function(t){return r(2,o=t)}));var i,c=(i="cxt",Yc().$$.context.get(i)),a=!1;return[a,e,o,function(){var t,n;r(0,a=!0),(t=e.payment.id,n=c.opts,u.default.ajax({url:ajaxurl,data:{action:"bookly_get_payment_info",payment_id:t,csrf_token:Of},dataType:"json",type:"GET",success:function(r){r.success&&(n.customer.payment_id=t,n.customer.payment_type=r.data.payment_type,n.customer.payment_title=r.data.payment_title,n.customer.payment_action="attach",n.done())}})).done((function(){c.modal.hide(),r(0,a=!1)}))},function(){var t,n;r(0,a=!0),(t=e.payment.id,n=c.opts,u.default.ajax({url:ajaxurl,data:{action:"bookly_complete_payment",payment_id:t,csrf_token:Of},dataType:"json",type:"POST",success:function(r){if(r.success){hs(t),n.customer&&(n.customer.payment_id=t,n.customer.payment_title=r.data.payment_title),n.done();var e=u.default("table#bookly-payments-list.dataTable, table#bookly-appointments-list.dataTable");e.length&&e.DataTable().ajax.reload()}}})).done((function(){return r(0,a=!1)}))}]}var Ps=function(t){Wt(r,t);var n=Es(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,Rs,ks,jc,{}),e}return r}(_a);function Is(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function Ms(t){var n;return{c:function(){(n=Bc("td")).textContent="-",qc(n,"class","text-right")},m:function(t,r){Nc(t,n,r)},d:function(t){t&&Cc(n)}}}function Ns(t){var n,r,e,o,i,u,c,a,f,l,s,p,d=Vf.types[t[0].payment.type]+"",v=Vf.l10n.price_correction+"",h=Hf.price(t[0].payment.price_correction)+"",m=t[0].show.taxes&&Ms();return{c:function(){n=Bc("tr"),r=Bc("th"),e=Lc(),o=Bc("th"),i=Fc(d),u=Fc(" - "),c=Fc(v),f=Lc(),l=Bc("th"),s=Fc(h),p=Lc(),m&&m.c(),Kc(r,"border-left-color","#fff"),Kc(r,"border-bottom-color","#fff"),qc(o,"colspan",a=2+t[0].show.deposit),qc(l,"class","text-right")},m:function(t,a){Nc(t,n,a),Mc(n,r),Mc(n,e),Mc(n,o),Mc(o,i),Mc(o,u),Mc(o,c),Mc(n,f),Mc(n,l),Mc(l,s),Mc(n,p),m&&m.m(n,null)},p:function(t,r){var e=eo(r,1)[0];1&e&&d!==(d=Vf.types[t[0].payment.type]+"")&&Vc(i,d),1&e&&a!==(a=2+t[0].show.deposit)&&qc(o,"colspan",a),1&e&&h!==(h=Hf.price(t[0].payment.price_correction)+"")&&Vc(s,h),t[0].show.taxes?m||((m=Ms()).c(),m.m(n,null)):m&&(m.d(1),m=null)},i:xc,o:xc,d:function(t){t&&Cc(n),m&&m.d()}}}function Cs(t,n,r){var e;return Ac(t,Tf,(function(t){return r(0,e=t)})),[e]}var Ds=function(t){Wt(r,t);var n=Is(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,Cs,Ns,jc,{}),e}return r}(_a);function Bs(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function Fs(t){var n,r,e,o,i,u=Hf.price(t[0].payment.tax_paid)+"";return{c:function(){n=Bc("th"),r=Bc("i"),e=Fc("("),o=Fc(u),i=Fc(")"),qc(n,"class","text-right")},m:function(t,u){Nc(t,n,u),Mc(n,r),Mc(r,e),Mc(r,o),Mc(r,i)},p:function(t,n){1&n&&u!==(u=Hf.price(t[0].payment.tax_paid)+"")&&Vc(o,u)},d:function(t){t&&Cc(n)}}}function Ls(t){var n,r,e,o,i,u,c,a,f,l,s,p=Hf.price(t[0].payment.paid)+"",d=t[0].show.taxes&&Fs(t);return{c:function(){n=Bc("tr"),r=Bc("th"),e=Lc(),o=Bc("th"),(i=Bc("i")).textContent="".concat(Vf.l10n.paid),c=Lc(),a=Bc("th"),f=Bc("i"),l=Fc(p),s=Lc(),d&&d.c(),Kc(r,"border-left-color","white"),Kc(r,"border-bottom-color","white"),qc(o,"colspan",u=2+t[0].show.deposit),qc(a,"class","text-right")},m:function(t,u){Nc(t,n,u),Mc(n,r),Mc(n,e),Mc(n,o),Mc(o,i),Mc(n,c),Mc(n,a),Mc(a,f),Mc(f,l),Mc(n,s),d&&d.m(n,null)},p:function(t,r){var e=eo(r,1)[0];1&e&&u!==(u=2+t[0].show.deposit)&&qc(o,"colspan",u),1&e&&p!==(p=Hf.price(t[0].payment.paid)+"")&&Vc(l,p),t[0].show.taxes?d?d.p(t,e):((d=Fs(t)).c(),d.m(n,null)):d&&(d.d(1),d=null)},i:xc,o:xc,d:function(t){t&&Cc(n),d&&d.d()}}}function zs(t,n,r){var e;return Ac(t,Tf,(function(t){return r(0,e=t)})),[e]}var Us=function(t){Wt(r,t);var n=Bs(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,zs,Ls,jc,{}),e}return r}(_a);function qs(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function Gs(t){var n,r,e,o,i,u=Hf.price(Ha(t[0].payment.tax_total)-Ha(t[0].payment.tax_paid))+"";return{c:function(){n=Bc("th"),r=Bc("i"),e=Fc("("),o=Fc(u),i=Fc(")"),qc(n,"class","text-right")},m:function(t,u){Nc(t,n,u),Mc(n,r),Mc(r,e),Mc(r,o),Mc(r,i)},p:function(t,n){1&n&&u!==(u=Hf.price(Ha(t[0].payment.tax_total)-Ha(t[0].payment.tax_paid))+"")&&Vc(o,u)},d:function(t){t&&Cc(n)}}}function Ws(t){var n,r,e,o,i,u,c,a,f,l,s,p=Hf.price(Ha(t[0].payment.total)-Ha(t[0].payment.paid))+"",d=t[0].show.taxes&&Gs(t);return{c:function(){n=Bc("tr"),r=Bc("th"),e=Lc(),o=Bc("th"),(i=Bc("i")).textContent="".concat(Vf.l10n.due),c=Lc(),a=Bc("th"),f=Bc("i"),l=Fc(p),s=Lc(),d&&d.c(),Kc(r,"border-left-color","white"),Kc(r,"border-bottom-color","white"),qc(o,"colspan",u=2+t[0].show.deposit),qc(a,"class","text-right")},m:function(t,u){Nc(t,n,u),Mc(n,r),Mc(n,e),Mc(n,o),Mc(o,i),Mc(n,c),Mc(n,a),Mc(a,f),Mc(f,l),Mc(n,s),d&&d.m(n,null)},p:function(t,r){var e=eo(r,1)[0];1&e&&u!==(u=2+t[0].show.deposit)&&qc(o,"colspan",u),1&e&&p!==(p=Hf.price(Ha(t[0].payment.total)-Ha(t[0].payment.paid))+"")&&Vc(l,p),t[0].show.taxes?d?d.p(t,e):((d=Gs(t)).c(),d.m(n,null)):d&&(d.d(1),d=null)},i:xc,o:xc,d:function(t){t&&Cc(n),d&&d.d()}}}function Js(t,n,r){var e;return Ac(t,Tf,(function(t){return r(0,e=t)})),[e]}var Vs=function(t){Wt(r,t);var n=qs(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,Js,Ws,jc,{}),e}return r}(_a);function Hs(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function Ks(t){var n,r,e,o,i=Hf.price(t[0].payment.tax_total)+"";return{c:function(){n=Bc("th"),r=Fc("("),e=Fc(i),o=Fc(")"),qc(n,"class","text-right")},m:function(t,i){Nc(t,n,i),Mc(n,r),Mc(n,e),Mc(n,o)},p:function(t,n){1&n&&i!==(i=Hf.price(t[0].payment.tax_total)+"")&&Vc(e,i)},d:function(t){t&&Cc(n)}}}function Qs(t){var n,r,e,o,i,u,c,a,f,l,s=Vf.l10n.total+"",p=Hf.price(t[0].payment.total)+"",d=t[0].show.taxes&&Ks(t);return{c:function(){n=Bc("tr"),r=Bc("th"),e=Lc(),o=Bc("th"),i=Fc(s),c=Lc(),a=Bc("th"),f=Fc(p),l=Lc(),d&&d.c(),Kc(r,"border-left-color","#fff"),Kc(r,"border-bottom-color","#fff"),qc(o,"colspan",u=2+t[0].show.deposit),qc(a,"class","text-right")},m:function(t,u){Nc(t,n,u),Mc(n,r),Mc(n,e),Mc(n,o),Mc(o,i),Mc(n,c),Mc(n,a),Mc(a,f),Mc(n,l),d&&d.m(n,null)},p:function(t,r){var e=eo(r,1)[0];1&e&&u!==(u=2+t[0].show.deposit)&&qc(o,"colspan",u),1&e&&p!==(p=Hf.price(t[0].payment.total)+"")&&Vc(f,p),t[0].show.taxes?d?d.p(t,e):((d=Ks(t)).c(),d.m(n,null)):d&&(d.d(1),d=null)},i:xc,o:xc,d:function(t){t&&Cc(n),d&&d.d()}}}function Xs(t,n,r){var e;return Ac(t,Tf,(function(t){return r(0,e=t)})),[e]}var Ys=function(t){Wt(r,t);var n=Hs(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,Xs,Qs,jc,{}),e}return r}(_a);function Zs(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function tp(t){var n,r,e,o=t[4].default,i=Tc(o,t,t[3],null);return{c:function(){n=Bc("div"),i&&i.c(),qc(n,"class",r="alert-"+t[1]+" "+t[2])},m:function(t,r){Nc(t,n,r),i&&i.m(n,null),e=!0},p:function(t,u){i&&i.p&&8&u&&Rc(i,o,t,t[3],u,null,null),(!e||6&u&&r!==(r="alert-"+t[1]+" "+t[2]))&&qc(n,"class",r)},i:function(t){e||(ma(i,t),e=!0)},o:function(t){ya(i,t),e=!1},d:function(t){t&&Cc(n),i&&i.d(t)}}}function np(t){var n,r,e=t[0]&&tp(t);return{c:function(){e&&e.c(),n=zc()},m:function(t,o){e&&e.m(t,o),Nc(t,n,o),r=!0},p:function(t,r){var o=eo(r,1)[0];t[0]?e?(e.p(t,o),1&o&&ma(e,1)):((e=tp(t)).c(),ma(e,1),e.m(n.parentNode,n)):e&&(va(),ya(e,1,1,(function(){e=null})),ha())},i:function(t){r||(ma(e),r=!0)},o:function(t){ya(e),r=!1},d:function(t){e&&e.d(t),t&&Cc(n)}}}function rp(t,n,r){var e=n.$$slots,o=void 0===e?{}:e,i=n.$$scope,u=n.show,c=void 0===u||u,a=n.type,f=void 0===a?"info":a,l=n.class,s=void 0===l?"alert":l;return t.$$set=function(t){"show"in t&&r(0,c=t.show),"type"in t&&r(1,f=t.type),"class"in t&&r(2,s=t.class),"$$scope"in t&&r(3,i=t.$$scope)},[c,f,s,i,o]}var ep=function(t){Wt(r,t);var n=Zs(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,rp,np,jc,{show:0,type:1,class:2}),e}return r}(_a);function op(t){var n=function(){if("undefined"==typeof Reflect||!wo)return!1;if(wo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(wo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=we(t);if(n){var o=we(this).constructor;r=wo(e,arguments,o)}else r=e.apply(this,arguments);return ye(this,r)}}function ip(t,n,r){var e=oo(t).call(t);return e[8]=n[r],e}function up(t){var n,r;return n=new ep({props:{type:"danger",$$slots:{default:[fp]},$$scope:{ctx:t}}}),{c:function(){ga(n.$$.fragment)},m:function(t,e){ba(n,t,e),r=!0},p:function(t,r){var e={};2048&r&&(e.$$scope={dirty:r,ctx:t}),n.$set(e)},i:function(t){r||(ma(n.$$.fragment,t),r=!0)},o:function(t){ya(n.$$.fragment,t),r=!1},d:function(t){wa(n,t)}}}function cp(t){for(var n,r,e,o,i,u,c,a,f,l,s,p,d,v,h,m,y,g,b,w,x,$,_,O,S,E,j,A,T,k,R,P,I,M,N,C,D,B,F,L,z,U,q,G,W,J,V,H,K,Q,X,Y,Z,tt,nt,rt,et,ot,it,ut,ct,at,ft,lt=t[2].payment.customer+"",st=Vf.l10n.date+"",pt=Hf.date(t[2].payment.created_at)+"",dt=Hf.time(t[2].payment.created_at)+"",vt=Vf.l10n.type+"",ht=Vf.types[t[2].payment.type]+"",mt=Vf.l10n.status+"",yt=Vf.statuses[t[2].payment.status]+"",gt="1"===Vf.can_edit&&(_f("pro")||t[2].payment.total!==t[2].payment.paid),bt=t[2].payment.gateway_ref_id&&"woocommerce"===t[2].payment.type&&lp(t),wt=t[2].show.deposit&&sp(),xt=t[2].show.taxes&&pp(),$t=t[2].payment.items,_t=[],Ot=0;Ot<$t.length;Ot+=1)_t[Ot]=dp(ip(t,$t,Ot));var St=function(t){return ya(_t[t],1,1,(function(){_t[t]=null}))};Q=new Il({});var Et=(t[2].show.coupons||t[2].payment.coupon)&&vp(),jt=(t[2].show.customer_groups||t[2].payment.group_discount)&&hp(),At=t[2].payment.discounts&&t[2].payment.discounts.length&&mp();nt=new vs({}),et=new xs({});var Tt=t[2].show.price_correction&&t[2].payment.price_correction&&yp();ut=new Ys({});var kt=t[2].payment.total!==t[2].payment.paid&&gp(),Rt=gt&&bp();return{c:function(){n=Bc("div"),r=Bc("table"),e=Bc("thead"),o=Bc("tr"),(i=Bc("th")).textContent="".concat(Vf.l10n.customer),u=Lc(),(c=Bc("th")).textContent="".concat(Vf.l10n.payment),a=Lc(),f=Bc("tbody"),l=Bc("tr"),s=Bc("td"),p=Fc(lt),d=Lc(),v=Bc("td"),h=Bc("div"),m=Fc(st),y=Fc(": "),g=Fc(pt),b=Lc(),w=Fc(dt),x=Lc(),$=Bc("div"),_=Fc(vt),O=Fc(": "),S=Fc(ht),E=Lc(),bt&&bt.c(),j=Lc(),A=Bc("div"),T=Fc(mt),k=Fc(": "),R=Fc(yt),P=Lc(),I=Bc("div"),M=Bc("table"),N=Bc("thead"),C=Bc("tr"),(D=Bc("th")).textContent="".concat(Vf.l10n.service),B=Lc(),(F=Bc("th")).textContent="".concat(Vf.l10n.date),L=Lc(),(z=Bc("th")).textContent="".concat(Vf.l10n.provider),U=Lc(),wt&&wt.c(),q=Lc(),(G=Bc("th")).textContent="".concat(Vf.l10n.price),W=Lc(),xt&&xt.c(),J=Lc(),V=Bc("tbody");for(var t=0;t<_t.length;t+=1)_t[t].c();H=Lc(),K=Bc("tfoot"),ga(Q.$$.fragment),X=Lc(),Et&&Et.c(),Y=Lc(),jt&&jt.c(),Z=Lc(),At&&At.c(),tt=Lc(),ga(nt.$$.fragment),rt=Lc(),ga(et.$$.fragment),ot=Lc(),Tt&&Tt.c(),it=Lc(),ga(ut.$$.fragment),ct=Lc(),kt&&kt.c(),at=Lc(),Rt&&Rt.c(),qc(i,"width","50%"),qc(c,"width","50%"),qc(r,"class","table table-bordered"),qc(n,"class","table-responsive"),qc(G,"class","text-right"),qc(M,"class","table table-bordered"),qc(I,"class","table-responsive")},m:function(t,lt){Nc(t,n,lt),Mc(n,r),Mc(r,e),Mc(e,o),Mc(o,i),Mc(o,u),Mc(o,c),Mc(r,a),Mc(r,f),Mc(f,l),Mc(l,s),Mc(s,p),Mc(l,d),Mc(l,v),Mc(v,h),Mc(h,m),Mc(h,y),Mc(h,g),Mc(h,b),Mc(h,w),Mc(v,x),Mc(v,$),Mc($,_),Mc($,O),Mc($,S),Mc(v,E),bt&&bt.m(v,null),Mc(v,j),Mc(v,A),Mc(A,T),Mc(A,k),Mc(A,R),Nc(t,P,lt),Nc(t,I,lt),Mc(I,M),Mc(M,N),Mc(N,C),Mc(C,D),Mc(C,B),Mc(C,F),Mc(C,L),Mc(C,z),Mc(C,U),wt&&wt.m(C,null),Mc(C,q),Mc(C,G),Mc(C,W),xt&&xt.m(C,null),Mc(M,J),Mc(M,V);for(var st=0;st<_t.length;st+=1)_t[st].m(V,null);Mc(M,H),Mc(M,K),ba(Q,K,null),Mc(K,X),Et&&Et.m(K,null),Mc(K,Y),jt&&jt.m(K,null),Mc(K,Z),At&&At.m(K,null),Mc(K,tt),ba(nt,K,null),Mc(K,rt),ba(et,K,null),Mc(K,ot),Tt&&Tt.m(K,null),Mc(K,it),ba(ut,K,null),Mc(K,ct),kt&&kt.m(K,null),Mc(K,at),Rt&&Rt.m(K,null),ft=!0},p:function(t,n){if((!ft||4&n)&&lt!==(lt=t[2].payment.customer+"")&&Vc(p,lt),(!ft||4&n)&&pt!==(pt=Hf.date(t[2].payment.created_at)+"")&&Vc(g,pt),(!ft||4&n)&&dt!==(dt=Hf.time(t[2].payment.created_at)+"")&&Vc(w,dt),(!ft||4&n)&&ht!==(ht=Vf.types[t[2].payment.type]+"")&&Vc(S,ht),t[2].payment.gateway_ref_id&&"woocommerce"===t[2].payment.type?bt?bt.p(t,n):((bt=lp(t)).c(),bt.m(v,j)):bt&&(bt.d(1),bt=null),(!ft||4&n)&&yt!==(yt=Vf.statuses[t[2].payment.status]+"")&&Vc(R,yt),t[2].show.deposit?wt?wt.p(t,n):((wt=sp()).c(),wt.m(C,q)):wt&&(wt.d(1),wt=null),t[2].show.taxes?xt?xt.p(t,n):((xt=pp()).c(),xt.m(C,null)):xt&&(xt.d(1),xt=null),4&n){var r;for($t=t[2].payment.items,r=0;r<$t.length;r+=1){var e=ip(t,$t,r);_t[r]?(_t[r].p(e,n),ma(_t[r],1)):(_t[r]=dp(e),_t[r].c(),ma(_t[r],1),_t[r].m(V,null))}for(va(),r=$t.length;r<_t.length;r+=1)St(r);ha()}t[2].show.coupons||t[2].payment.coupon?Et?4&n&&ma(Et,1):((Et=vp()).c(),ma(Et,1),Et.m(K,Y)):Et&&(va(),ya(Et,1,1,(function(){Et=null})),ha()),t[2].show.customer_groups||t[2].payment.group_discount?jt?4&n&&ma(jt,1):((jt=hp()).c(),ma(jt,1),jt.m(K,Z)):jt&&(va(),ya(jt,1,1,(function(){jt=null})),ha()),t[2].payment.discounts&&t[2].payment.discounts.length?At?4&n&&ma(At,1):((At=mp()).c(),ma(At,1),At.m(K,tt)):At&&(va(),ya(At,1,1,(function(){At=null})),ha()),t[2].show.price_correction&&t[2].payment.price_correction?Tt?4&n&&ma(Tt,1):((Tt=yp()).c(),ma(Tt,1),Tt.m(K,it)):Tt&&(va(),ya(Tt,1,1,(function(){Tt=null})),ha()),t[2].payment.total!==t[2].payment.paid?kt?4&n&&ma(kt,1):((kt=gp()).c(),ma(kt,1),kt.m(K,at)):kt&&(va(),ya(kt,1,1,(function(){kt=null})),ha()),4&n&&(gt="1"===Vf.can_edit&&(_f("pro")||t[2].payment.total!==t[2].payment.paid)),gt?Rt?4&n&&ma(Rt,1):((Rt=bp()).c(),ma(Rt,1),Rt.m(K,null)):Rt&&(va(),ya(Rt,1,1,(function(){Rt=null})),ha())},i:function(t){if(!ft){for(var n=0;n<$t.length;n+=1)ma(_t[n]);ma(Q.$$.fragment,t),ma(Et),ma(jt),ma(At),ma(nt.$$.fragment,t),ma(et.$$.fragment,t),ma(Tt),ma(ut.$$.fragment,t),ma(kt),ma(Rt),ft=!0}},o:function(t){_t=lo(_t).call(_t,Boolean);for(var n=0;n<_t.length;n+=1)ya(_t[n]);ya(Q.$$.fragment,t),ya(Et),ya(jt),ya(At),ya(nt.$$.fragment,t),ya(et.$$.fragment,t),ya(Tt),ya(ut.$$.fragment,t),ya(kt),ya(Rt),ft=!1},d:function(t){t&&Cc(n),bt&&bt.d(),t&&Cc(P),t&&Cc(I),wt&&wt.d(),xt&&xt.d(),Dc(_t,t),wa(Q),Et&&Et.d(),jt&&jt.d(),At&&At.d(),wa(nt),wa(et),Tt&&Tt.d(),wa(ut),kt&&kt.d(),Rt&&Rt.d()}}}function ap(t){var n;return{c:function(){qc(n=Bc("div"),"class","bookly-loading")},m:function(t,r){Nc(t,n,r)},p:xc,i:xc,o:xc,d:function(t){t&&Cc(n)}}}function fp(t){var n,r,e,o=Vf.l10n.payment_is_not_found+"";return{c:function(){n=Bc("span"),r=Lc(),e=Fc(o),qc(n,"class","fas fa-info-circle text-primary fa-lg")},m:function(t,o){Nc(t,n,o),Nc(t,r,o),Nc(t,e,o)},p:xc,d:function(t){t&&Cc(n),t&&Cc(r),t&&Cc(e)}}}function lp(t){var n,r,e,o,i,u=Vf.l10n.wc_order_id+"",c=t[2].payment.gateway_ref_id+"";return{c:function(){n=Bc("div"),r=Fc("WooCommerce "),e=Fc(u),o=Fc(": "),i=Fc(c)},m:function(t,u){Nc(t,n,u),Mc(n,r),Mc(n,e),Mc(n,o),Mc(n,i)},p:function(t,n){4&n&&c!==(c=t[2].payment.gateway_ref_id+"")&&Vc(i,c)},d:function(t){t&&Cc(n)}}}function sp(t){var n;return{c:function(){(n=Bc("th")).textContent="".concat(Vf.l10n.deposit),qc(n,"class","text-right")},m:function(t,r){Nc(t,n,r)},p:xc,d:function(t){t&&Cc(n)}}}function pp(t){var n;return{c:function(){(n=Bc("th")).textContent="".concat(Vf.l10n.tax),qc(n,"class","text-right")},m:function(t,r){Nc(t,n,r)},p:xc,d:function(t){t&&Cc(n)}}}function dp(t){var n,r;return n=new jl({props:{item:t[8]}}),{c:function(){ga(n.$$.fragment)},m:function(t,e){ba(n,t,e),r=!0},p:function(t,r){var e={};4&r&&(e.item=t[8]),n.$set(e)},i:function(t){r||(ma(n.$$.fragment,t),r=!0)},o:function(t){ya(n.$$.fragment,t),r=!1},d:function(t){wa(n,t)}}}function vp(t){var n,r;return n=new ql({}),{c:function(){ga(n.$$.fragment)},m:function(t,e){ba(n,t,e),r=!0},i:function(t){r||(ma(n.$$.fragment,t),r=!0)},o:function(t){ya(n.$$.fragment,t),r=!1},d:function(t){wa(n,t)}}}function hp(t){var n,r;return n=new Ql({}),{c:function(){ga(n.$$.fragment)},m:function(t,e){ba(n,t,e),r=!0},i:function(t){r||(ma(n.$$.fragment,t),r=!0)},o:function(t){ya(n.$$.fragment,t),r=!1},d:function(t){wa(n,t)}}}function mp(t){var n,r;return n=new cs({}),{c:function(){ga(n.$$.fragment)},m:function(t,e){ba(n,t,e),r=!0},i:function(t){r||(ma(n.$$.fragment,t),r=!0)},o:function(t){ya(n.$$.fragment,t),r=!1},d:function(t){wa(n,t)}}}function yp(t){var n,r;return n=new Ds({}),{c:function(){ga(n.$$.fragment)},m:function(t,e){ba(n,t,e),r=!0},i:function(t){r||(ma(n.$$.fragment,t),r=!0)},o:function(t){ya(n.$$.fragment,t),r=!1},d:function(t){wa(n,t)}}}function gp(t){var n,r,e,o;return n=new Us({}),e=new Vs({}),{c:function(){ga(n.$$.fragment),r=Lc(),ga(e.$$.fragment)},m:function(t,i){ba(n,t,i),Nc(t,r,i),ba(e,t,i),o=!0},i:function(t){o||(ma(n.$$.fragment,t),ma(e.$$.fragment,t),o=!0)},o:function(t){ya(n.$$.fragment,t),ya(e.$$.fragment,t),o=!1},d:function(t){wa(n,t),t&&Cc(r),wa(e,t)}}}function bp(t){var n,r;return n=new Ps({}),{c:function(){ga(n.$$.fragment)},m:function(t,e){ba(n,t,e),r=!0},i:function(t){r||(ma(n.$$.fragment,t),r=!0)},o:function(t){ya(n.$$.fragment,t),r=!1},d:function(t){wa(n,t)}}}function wp(t){var n,r,e,o,i=[ap,cp,up],u=[];function c(t,n){return t[1]?0:t[2].payment.id?1:2}return n=c(t),r=u[n]=i[n](t),{c:function(){r.c(),e=zc()},m:function(t,r){u[n].m(t,r),Nc(t,e,r),o=!0},p:function(t,o){var a=n;(n=c(t))===a?u[n].p(t,o):(va(),ya(u[a],1,1,(function(){u[a]=null})),ha(),(r=u[n])?r.p(t,o):(r=u[n]=i[n](t)).c(),ma(r,1),r.m(e.parentNode,e))},i:function(t){o||(ma(r),o=!0)},o:function(t){ya(r),o=!1},d:function(t){u[n].d(t),t&&Cc(e)}}}function xp(t){var n,r,e;return r=new Ia({props:{"data-dismiss":"bookly-modal",caption:Vf.l10n.close}}),{c:function(){n=Bc("div"),ga(r.$$.fragment),qc(n,"slot","footer")},m:function(t,o){Nc(t,n,o),ba(r,n,null),e=!0},p:xc,i:function(t){e||(ma(r.$$.fragment,t),e=!0)},o:function(t){ya(r.$$.fragment,t),e=!1},d:function(t){t&&Cc(n),wa(r)}}}function $p(t){var n,r,e={size:"xl",title:Vf.l10n.payment,$$slots:{footer:[xp],default:[wp]},$$scope:{ctx:t}};return n=new Ta({props:e}),t[5](n),{c:function(){ga(n.$$.fragment)},m:function(t,e){ba(n,t,e),r=!0},p:function(t,r){var e=eo(r,1)[0],o={};2054&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i:function(t){r||(ma(n.$$.fragment,t),r=!0)},o:function(t){ya(n.$$.fragment,t),r=!1},d:function(r){t[5](null),wa(n,r)}}}function _p(t,n,r){var e,o;Ac(t,Af,(function(t){return r(6,e=t)})),Ac(t,Tf,(function(t){return r(2,o=t)}));var i,u,c={opts:{payment_id:null,customer:{},done:function(){}},modal:null};i="cxt",u=c,Yc().$$.context.set(i,u);var a=!0;function f(t){r(0,c.opts=t,c),r(1,a=!0),hs(c.opts.payment_id||c.opts.customer.payment_id).done((function(){return r(1,a=!1)})),c.modal.show()}return[c,a,o,function(t){Ic(Af,e="show",e),f(t)},function(t){Ic(Af,e="attach",e),f(t)},function(t){ra[t?"unshift":"push"]((function(){c.modal=t,r(0,c)}))}]}var Op,Sp=function(t){Wt(r,t);var n=op(r);function r(t){var e;return l(this,r),$a(ot(e=n.call(this)),t,_p,$p,jc,{show:3,attach:4}),e}return et(r,[{key:"show",get:function(){return this.$$.ctx[3]}},{key:"attach",get:function(){return this.$$.ctx[4]}}]),r}(_a);return t.showAttachDialog=function(t){Op||(Op=new Sp({target:document.getElementById("bookly-payment-details-dialog"),props:{}})),Op.attach(t)},t.showDialog=function(t){Op||(Op=new Sp({target:document.getElementById("bookly-payment-details-dialog"),props:{}})),Op.show(t)},Object.defineProperty(t,"__esModule",{value:!0}),t}({},jQuery,Ladda,BooklyL10nPaymentDetailsDialog,moment);
backend/components/dialogs/service/order/resources/js/service-order-dialog.js CHANGED
@@ -5,8 +5,8 @@ jQuery(function ($) {
5
  .on('service.submitForm', {},
6
  // Bind submit handler for service saving.
7
  function (event, $panel, data) {
8
- let id = data.find(function(value) { return value.name === 'id'; }).value,
9
- title = data.find(function(value) { return value.name === 'title'; }).value;
10
 
11
  BooklyServiceOrderDialogL10n.services
12
  .find(function(service) { return service.id == id; }).title = title;
5
  .on('service.submitForm', {},
6
  // Bind submit handler for service saving.
7
  function (event, $panel, data) {
8
+ let id = data.find(function (value) { return value.name === 'id'; }).value,
9
+ title = $.fn.dataTable.render.text().display(data.find(function (value) { return value.name === 'title'; }).value);
10
 
11
  BooklyServiceOrderDialogL10n.services
12
  .find(function(service) { return service.id == id; }).title = title;
backend/components/dialogs/staff/edit/Ajax.php CHANGED
@@ -119,7 +119,9 @@ class Ajax extends Lib\Base\Ajax
119
  self::$staff->save();
120
 
121
  Proxy\Shared::updateStaffDetails( self::$staff, $params );
122
- wp_send_json_success( array( 'staff' => self::$staff->getFields() ) );
 
 
123
  } else {
124
  wp_send_json_error( $data['alerts'] );
125
  }
119
  self::$staff->save();
120
 
121
  Proxy\Shared::updateStaffDetails( self::$staff, $params );
122
+ $staff = self::$staff->getFields();
123
+ $staff['full_name'] = esc_html( $staff['full_name'] );
124
+ wp_send_json_success( array( 'staff' => $staff ) );
125
  } else {
126
  wp_send_json_error( $data['alerts'] );
127
  }
backend/components/dialogs/staff/edit/Dialog.php CHANGED
@@ -60,34 +60,33 @@ class Dialog extends Lib\Base\Component
60
  }
61
 
62
  wp_localize_script( 'bookly-staff-edit-dialog.js', 'BooklyStaffEditDialogL10n', array(
63
- 'csrfToken' => Lib\Utils\Common::getCsrfToken(),
64
- 'intlTelInput' => array(
65
- 'enabled' => get_option( 'bookly_cst_phone_default_country' ) != 'disabled',
66
- 'utils' => plugins_url( 'intlTelInput.utils.js', Lib\Plugin::getDirectory() . '/frontend/resources/js/intlTelInput.utils.js' ),
67
  'country' => get_option( 'bookly_cst_phone_default_country' ),
 
 
68
  ),
69
  'holidays' => array(
70
- 'loading_img' => plugins_url( 'bookly-responsive-appointment-booking-tool/backend/resources/images/loading.gif' ),
71
- 'firstDay' => (int) get_option( 'start_of_week' ),
72
- 'days' => array_values( $wp_locale->weekday_abbrev ),
73
- 'months' => array_values( $wp_locale->month ),
74
- 'close' => esc_attr__( 'Close', 'bookly' ),
75
- 'repeat' => esc_attr__( 'Repeat every year', 'bookly' ),
76
- 'we_are_not_working' => esc_attr__( 'We are not working on this day', 'bookly' ),
77
  'special_days_error' => esc_attr__( 'The date has already passed.', 'bookly' ),
 
78
  ),
79
  'services' => array(
80
  'capacity_error' => esc_attr__( 'Min capacity should not be greater than max capacity.', 'bookly' ),
81
- 'hideTip' => get_user_meta( get_current_user_id(), 'bookly_packages_hide_staff_services_tip', true ),
82
  ),
83
- 'createStaff' => esc_attr__( 'Create staff', 'bookly' ),
84
- 'editStaff' => esc_attr__( 'Edit staff', 'bookly' ),
85
- 'areYouSure' => esc_attr__( 'Are you sure?', 'bookly' ),
86
- 'settingsSaved' => esc_attr__( 'Settings saved.', 'bookly' ),
87
- 'proRequired' => (int) ! Lib\Config::proActive(),
88
- 'limitation' => Limitation::getHtml(),
89
- 'currentTab' => self::parameter( 'tab', 'details' ),
90
- 'staff' => $query->sortBy( 'position' )->fetchArray(),
91
  ) );
92
 
93
  self::renderTemplate( 'dialog' );
60
  }
61
 
62
  wp_localize_script( 'bookly-staff-edit-dialog.js', 'BooklyStaffEditDialogL10n', array(
63
+ 'intlTelInput' => array(
 
 
 
64
  'country' => get_option( 'bookly_cst_phone_default_country' ),
65
+ 'enabled' => get_option( 'bookly_cst_phone_default_country' ) != 'disabled',
66
+ 'utils' => plugins_url( 'intlTelInput.utils.js', Lib\Plugin::getDirectory() . '/frontend/resources/js/intlTelInput.utils.js' ),
67
  ),
68
  'holidays' => array(
69
+ 'close' => esc_attr__( 'Close', 'bookly' ),
70
+ 'days' => array_values( $wp_locale->weekday_abbrev ),
71
+ 'firstDay' => (int) get_option( 'start_of_week' ),
72
+ 'loading_img' => plugins_url( 'bookly-responsive-appointment-booking-tool/backend/resources/images/loading.gif' ),
73
+ 'months' => array_values( $wp_locale->month ),
74
+ 'repeat' => esc_attr__( 'Repeat every year', 'bookly' ),
 
75
  'special_days_error' => esc_attr__( 'The date has already passed.', 'bookly' ),
76
+ 'we_are_not_working' => esc_attr__( 'We are not working on this day', 'bookly' ),
77
  ),
78
  'services' => array(
79
  'capacity_error' => esc_attr__( 'Min capacity should not be greater than max capacity.', 'bookly' ),
80
+ 'hideTip' => get_user_meta( get_current_user_id(), 'bookly_packages_hide_staff_services_tip', true ),
81
  ),
82
+ 'areYouSure' => esc_attr__( 'Are you sure?', 'bookly' ),
83
+ 'createStaff' => esc_attr__( 'Create staff', 'bookly' ),
84
+ 'currentTab' => self::parameter( 'tab', 'details' ),
85
+ 'editStaff' => esc_attr__( 'Edit staff', 'bookly' ),
86
+ 'limitation' => Limitation::forNewStaff(),
87
+ 'proRequired' => (int) ! Lib\Config::proActive(),
88
+ 'settingsSaved' => esc_attr__( 'Settings saved.', 'bookly' ),
89
+ 'staff' => $query->sortBy( 'position' )->fetchArray(),
90
  ) );
91
 
92
  self::renderTemplate( 'dialog' );
backend/components/dialogs/staff/edit/proxy/CustomerGroups.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Bookly\Backend\Components\Dialogs\Staff\Edit\Proxy;
3
+
4
+ use Bookly\Lib;
5
+
6
+ /**
7
+ * Class CustomerGroups
8
+ * @package Bookly\Backend\Components\Dialogs\Staff\Edit\Proxy
9
+ *
10
+ * @method static void renderPaymentGatewaysHelp() Render help message.
11
+ */
12
+ abstract class CustomerGroups extends Lib\Base\Proxy
13
+ {
14
+
15
+ }
backend/components/dialogs/staff/edit/proxy/Pro.php CHANGED
@@ -12,6 +12,7 @@ use Bookly\Lib;
12
  * @method static void renderArchivingComponents()
13
  * @method static void renderCreateWPUser() Render option for creating WordPress user
14
  * @method static string getAdvancedHtml( Lib\Entities\Staff $staff, array $tpl_data, bool $for_backend ) Render Advanced settings.
 
15
  */
16
  abstract class Pro extends Lib\Base\Proxy
17
  {
12
  * @method static void renderArchivingComponents()
13
  * @method static void renderCreateWPUser() Render option for creating WordPress user
14
  * @method static string getAdvancedHtml( Lib\Entities\Staff $staff, array $tpl_data, bool $for_backend ) Render Advanced settings.
15
+ * @method static string renderGoogleCalendarsList( array $calendars, $selected_calendar_id ) Render calendars list of Google Calendar
16
  */
17
  abstract class Pro extends Lib\Base\Proxy
18
  {
backend/components/dialogs/staff/edit/resources/js/staff-details.js CHANGED
@@ -3,20 +3,22 @@
3
  var Details = function ($container, options) {
4
  var obj = this;
5
  jQuery.extend(obj.options, options);
6
- let $form = $('.bookly-js-staff-details', $container),
7
  $staff_full_name = $('#bookly-full-name', $container),
8
- $staff_wp_user = $('#bookly-wp-user', $container),
9
- $staff_email = $('#bookly-email', $container),
10
- $staff_phone = $('#bookly-phone', $container),
11
  $staff_locations = $('#bookly-js-locations', $container),
12
- $staff_color = $('.bookly-js-color-picker', $container)
 
 
13
  ;
14
 
15
  if (obj.options.intlTelInput.enabled) {
16
  $staff_phone.intlTelInput({
17
  preferredCountries: [obj.options.intlTelInput.country],
18
- initialCountry : obj.options.intlTelInput.country,
19
- geoIpLookup : function (callback) {
20
  $.get('https://ipinfo.io', function () {
21
  }, 'jsonp').always(function (resp) {
22
  var countryCode = (resp && resp.country) ? resp.country : '';
@@ -38,6 +40,7 @@
38
  }
39
 
40
  $staff_locations.booklyDropdown();
 
41
 
42
  $container
43
  .on('click', '.bookly-thumb label', function (e) {
@@ -120,6 +123,7 @@
120
  .on('click', 'button:reset', function () {
121
  setTimeout(function () {
122
  $staff_locations.booklyDropdown('reset');
 
123
  }, 0);
124
  })
125
  .on('input', '#bookly-email', function () {
@@ -127,7 +131,15 @@
127
  })
128
  .on('input', '#bookly-full-name', function () {
129
  obj.options.validation(this.value == '', '');
 
 
 
 
 
 
 
130
  });
 
131
  };
132
 
133
  Details.prototype.options = {
3
  var Details = function ($container, options) {
4
  var obj = this;
5
  jQuery.extend(obj.options, options);
6
+ let $form = $('.bookly-js-staff-details', $container),
7
  $staff_full_name = $('#bookly-full-name', $container),
8
+ $staff_wp_user = $('#bookly-wp-user', $container),
9
+ $staff_email = $('#bookly-email', $container),
10
+ $staff_phone = $('#bookly-phone', $container),
11
  $staff_locations = $('#bookly-js-locations', $container),
12
+ $staff_gateways_list = $('#bookly-js-gateways-list', $form),
13
+ $staff_gateways = $('#bookly-gateways', $container),
14
+ $staff_color = $('.bookly-js-color-picker', $container)
15
  ;
16
 
17
  if (obj.options.intlTelInput.enabled) {
18
  $staff_phone.intlTelInput({
19
  preferredCountries: [obj.options.intlTelInput.country],
20
+ initialCountry: obj.options.intlTelInput.country,
21
+ geoIpLookup: function (callback) {
22
  $.get('https://ipinfo.io', function () {
23
  }, 'jsonp').always(function (resp) {
24
  var countryCode = (resp && resp.country) ? resp.country : '';
40
  }
41
 
42
  $staff_locations.booklyDropdown();
43
+ $staff_gateways_list.booklyDropdown();
44
 
45
  $container
46
  .on('click', '.bookly-thumb label', function (e) {
123
  .on('click', 'button:reset', function () {
124
  setTimeout(function () {
125
  $staff_locations.booklyDropdown('reset');
126
+ $staff_gateways_list.booklyDropdown('reset');
127
  }, 0);
128
  })
129
  .on('input', '#bookly-email', function () {
131
  })
132
  .on('input', '#bookly-full-name', function () {
133
  obj.options.validation(this.value == '', '');
134
+ })
135
+ .on('change', '[name="gateways"]', function () {
136
+ if (this.value == 'default') {
137
+ $staff_gateways_list.closest('.form-group').hide();
138
+ } else {
139
+ $staff_gateways_list.closest('.form-group').show();
140
+ }
141
  });
142
+ $('[name="gateways"]:checked', $form).trigger('change');
143
  };
144
 
145
  Details.prototype.options = {
backend/components/dialogs/staff/edit/resources/js/staff-edit-dialog.js CHANGED
@@ -47,8 +47,8 @@ jQuery(function ($) {
47
  url : ajaxurl,
48
  type : 'POST',
49
  data : {
50
- action : 'bookly_get_staff_count',
51
- csrf_token: BooklyStaffEditDialogL10n.csrfToken
52
  },
53
  dataType : 'json',
54
  success : function (response) {
@@ -78,7 +78,7 @@ jQuery(function ($) {
78
  $saveBtn.prop('disabled', false);
79
  $modalBody.html('<div class="bookly-loading"></div>');
80
  $modal.booklyModal();
81
- $.get(ajaxurl, {action: 'bookly_get_staff_data', id: staff_id, csrf_token: BooklyStaffEditDialogL10n.csrfToken}, function (response) {
82
  $modalBody.html(response.data.html.edit);
83
  booklyAlert(response.data.alert);
84
  $modalFooter.show();
@@ -119,7 +119,7 @@ jQuery(function ($) {
119
  let data = $.extend({
120
  action : 'bookly_remove_staff',
121
  'staff_ids[]': staff_id,
122
- csrf_token : BooklyStaffEditDialogL10n.csrfToken
123
  }, _data);
124
 
125
  $.post(ajaxurl, data, function (response) {
47
  url : ajaxurl,
48
  type : 'POST',
49
  data : {
50
+ action: 'bookly_get_staff_count',
51
+ csrf_token: BooklyL10nGlobal.csrf_token
52
  },
53
  dataType : 'json',
54
  success : function (response) {
78
  $saveBtn.prop('disabled', false);
79
  $modalBody.html('<div class="bookly-loading"></div>');
80
  $modal.booklyModal();
81
+ $.get(ajaxurl, {action: 'bookly_get_staff_data', id: staff_id, csrf_token: BooklyL10nGlobal.csrf_token}, function (response) {
82
  $modalBody.html(response.data.html.edit);
83
  booklyAlert(response.data.alert);
84
  $modalFooter.show();
119
  let data = $.extend({
120
  action : 'bookly_remove_staff',
121
  'staff_ids[]': staff_id,
122
+ csrf_token : BooklyL10nGlobal.csrf_token
123
  }, _data);
124
 
125
  $.post(ajaxurl, data, function (response) {
backend/components/elementor/base/Widget.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Bookly\Backend\Components\Elementor\Base;
3
+
4
+ use Elementor\Widget_Base;
5
+
6
+ /**
7
+ * Class Widget
8
+ * @package Bookly\Backend\Components\Elementor\Base
9
+ */
10
+ abstract class Widget extends Widget_Base
11
+ {
12
+ /** @var string widget name */
13
+ protected $name;
14
+ /** @var string widget icon */
15
+ protected $icon;
16
+
17
+ /**
18
+ * @param \Elementor\Widgets_Manager $widgets_manager
19
+ */
20
+ public static function register( $widgets_manager )
21
+ {
22
+ $widgets_manager->register_widget_type( new static() );
23
+
24
+ wp_enqueue_style( 'bookly-elementor' );
25
+ }
26
+
27
+ /**
28
+ * @inheritDoc
29
+ */
30
+ public function get_name()
31
+ {
32
+ return 'bookly-widget-' . $this->name;
33
+ }
34
+
35
+ /**
36
+ * @inheritDoc
37
+ */
38
+ public function get_icon()
39
+ {
40
+ return $this->icon;
41
+ }
42
+
43
+ /**
44
+ * @inheritDoc
45
+ */
46
+ public function get_categories()
47
+ {
48
+ return array( 'bookly' );
49
+ }
50
+ }
backend/components/elementor/resources/css/elementor.css ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .bookly-elementor-section {
2
+ margin: 8px
3
+ }
4
+
5
+ .bookly-elementor-section:before {
6
+ content: "";
7
+ height: 28px;
8
+ width: 28px;
9
+ position: absolute;
10
+ top: 6px;
11
+ left: 9px;
12
+ background-size: contain;
13
+ background-repeat: no-repeat;
14
+ background-position: 0;
15
+ background-image: url(../../../../resources/images/bookly_28.png)
16
+ }
17
+
18
+ .bookly-elementor-section-title {
19
+ font-weight: 600 !important
20
+ }
21
+
22
+ .bookly-elementor-section-description {
23
+ font-weight: 400;
24
+ font-size: 13px;
25
+ line-height: 18px;
26
+ color: #6d7882;
27
+ min-height: 42px;
28
+ }
29
+
30
+ .bookly-elementor-right {
31
+ float: right;
32
+ }
33
+
34
+ .elementor-element .icon .bookly::before {
35
+ content: "";
36
+ height: 28px;
37
+ display: block;
38
+ background-size: contain;
39
+ background-repeat: no-repeat;
40
+ background-position: 50%;
41
+ background-image: url(../../../../resources/images/bookly_28.png)
42
+ }
backend/components/elementor/widgets/bookly_form/Widget.php ADDED
@@ -0,0 +1,277 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Bookly\Backend\Components\Elementor\Widgets\BooklyForm;
3
+
4
+ use Bookly\Lib;
5
+ use Bookly\Backend\Components\Elementor\Base;
6
+ use Bookly\Lib\Config;
7
+ use Elementor\Controls_Manager;
8
+
9
+ /**
10
+ * Class Widget
11
+ * @package Bookly\Backend\Components\Elementor\Widgets\BooklyForm
12
+ */
13
+ class Widget extends Base\Widget
14
+ {
15
+ protected $name = 'bookly-form';
16
+ protected $icon = 'bookly';
17
+
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ public function get_title()
22
+ {
23
+ return __( 'Booking form', 'bookly' );
24
+ }
25
+
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ protected function _register_controls()
30
+ {
31
+ $this->start_controls_section(
32
+ 'bookly_booking_section',
33
+ array(
34
+ 'label' => '<div class="bookly-elementor-section"><p>Bookly</p><br><p class="bookly-elementor-section-description">'
35
+ . esc_html__( 'A custom block for displaying booking form', 'bookly' ) . '</p></div>',
36
+ )
37
+ );
38
+
39
+ $data = $this->getControlsData();
40
+ if ( Config::locationsActive() ) {
41
+ $this->add_control(
42
+ 'location_id',
43
+ array(
44
+ 'label' => __( 'Location', 'bookly' ),
45
+ 'type' => Controls_Manager::SELECT,
46
+ 'options' => $data['locations'],
47
+ 'default' => '0',
48
+ )
49
+ );
50
+ $this->add_control(
51
+ 'hide_locations',
52
+ array(
53
+ 'label' => __( 'hide', 'bookly' ),
54
+ 'type' => Controls_Manager::SWITCHER,
55
+ 'default' => false,
56
+ )
57
+ );
58
+ $this->add_control( 'hr-location', array( 'type' => Controls_Manager::DIVIDER, ) );
59
+ }
60
+ $this->add_control(
61
+ 'category_id',
62
+ array(
63
+ 'label' => __( 'Category', 'bookly' ),
64
+ 'type' => Controls_Manager::SELECT,
65
+ 'options' => $data['categories'],
66
+ 'default' => '0',
67
+ )
68
+ );
69
+ $this->add_control(
70
+ 'hide_categories',
71
+ array(
72
+ 'label' => __( 'hide', 'bookly' ),
73
+ 'type' => Controls_Manager::SWITCHER,
74
+ 'default' => false,
75
+ )
76
+ );
77
+ $this->add_control( 'hr-catogory', array( 'type' => Controls_Manager::DIVIDER, ) );
78
+
79
+ $this->add_control(
80
+ 'service_id',
81
+ array(
82
+ 'label' => __( 'Service', 'bookly' ),
83
+ 'type' => Controls_Manager::SELECT,
84
+ 'options' => $data['services'],
85
+ 'default' => '0',
86
+ )
87
+ );
88
+ $this->add_control(
89
+ 'hide_services',
90
+ array(
91
+ 'label' => __( 'hide', 'bookly' ),
92
+ 'type' => Controls_Manager::SWITCHER,
93
+ 'default' => false,
94
+ )
95
+ );
96
+ $this->add_control( 'hr-service', array( 'type' => Controls_Manager::DIVIDER, ) );
97
+
98
+ $this->add_control(
99
+ 'staff_member_id',
100
+ array(
101
+ 'label' => __( 'Employee', 'bookly' ),
102
+ 'type' => Controls_Manager::SELECT,
103
+ 'options' => $data['staff'],
104
+ 'default' => '0',
105
+ )
106
+ );
107
+ $this->add_control(
108
+ 'hide_staff_members',
109
+ array(
110
+ 'label' => __( 'hide', 'bookly' ),
111
+ 'type' => Controls_Manager::SWITCHER,
112
+ 'default' => false,
113
+ )
114
+ );
115
+
116
+ $this->add_control(
117
+ '_heading_buttons',
118
+ array(
119
+ 'raw' => '<strong>' . esc_html__( 'Fields', 'bookly' ) . '</strong><span class="bookly-elementor-right">' . esc_html__( 'hide', 'bookly' ) . '</span>',
120
+ 'type' => Controls_Manager::RAW_HTML,
121
+ 'separator' => 'before',
122
+ )
123
+ );
124
+ if ( Config::customDurationActive() ) {
125
+ $this->add_control(
126
+ 'hide_service_duration',
127
+ array(
128
+ 'label' => __( 'Duration', 'bookly' ),
129
+ 'type' => Controls_Manager::SWITCHER,
130
+ 'default' => false,
131
+ )
132
+ );
133
+ }
134
+ if ( Config::groupBookingActive() ) {
135
+ $this->add_control(
136
+ 'hide_nop',
137
+ array(
138
+ 'label' => __( 'Number of persons', 'bookly' ),
139
+ 'type' => Controls_Manager::SWITCHER,
140
+ 'default' => 'yes',
141
+ )
142
+ );
143
+ }
144
+ if ( Config::multiplyAppointmentsActive() ) {
145
+ $this->add_control(
146
+ 'hide_quantity',
147
+ array(
148
+ 'label' => __( 'Quantity', 'bookly' ),
149
+ 'type' => Controls_Manager::SWITCHER,
150
+ 'default' => false,
151
+ )
152
+ );
153
+ }
154
+ $this->add_control(
155
+ 'hide_date',
156
+ array(
157
+ 'label' => __( 'Date', 'bookly' ),
158
+ 'type' => Controls_Manager::SWITCHER,
159
+ 'default' => false,
160
+ )
161
+ );
162
+ $this->add_control(
163
+ 'hide_week_days',
164
+ array(
165
+ 'label' => __( 'Week days', 'bookly' ),
166
+ 'type' => Controls_Manager::SWITCHER,
167
+ 'default' => false,
168
+ )
169
+ );
170
+ $this->add_control(
171
+ 'hide_time_range',
172
+ array(
173
+ 'label' => __( 'Time range', 'bookly' ),
174
+ 'type' => Controls_Manager::SWITCHER,
175
+ 'default' => false,
176
+ )
177
+ );
178
+
179
+ $this->end_controls_section();
180
+ }
181
+
182
+ /**
183
+ * @inheritDoc
184
+ */
185
+ protected function render()
186
+ {
187
+ $settings = $this->get_settings_for_display();
188
+
189
+ $short_code = '[bookly-form';
190
+ $hide = array();
191
+
192
+ if ( Config::locationsActive() ) {
193
+ if ( isset( $settings['location_id'] ) && $settings['location_id'] != 0 ) {
194
+ $short_code .= ' location_id="' . $settings['location_id'] . '"';
195
+ }
196
+ if ( isset( $settings['hide_locations'] ) && $settings['hide_locations'] == 'yes' ) {
197
+ $hide[] = 'locations';
198
+ }
199
+ }
200
+ if ( isset( $settings['category_id'] ) && $settings['category_id'] != 0 ) {
201
+ $short_code .= ' category_id="' . $settings['category_id'] . '"';
202
+ }
203
+ if ( isset( $settings['hide_categories'] ) && $settings['hide_categories'] == 'yes' ) {
204
+ $hide[] = 'categories';
205
+ }
206
+ if ( isset( $settings['service_id'] ) && $settings['service_id'] != 0 ) {
207
+ $short_code .= ' service_id="' . $settings['service_id'] . '"';
208
+ }
209
+ if ( isset( $settings['hide_services'] ) && $settings['hide_services'] == 'yes' ) {
210
+ $hide[] = 'services';
211
+ }
212
+ if ( Config::customDurationActive() ) {
213
+ if ( isset( $settings['hide_service_duration'] ) && $settings['hide_service_duration'] == 'yes' ) {
214
+ $hide[] = 'service_duration';
215
+ }
216
+ }
217
+ if ( isset( $settings['staff_member_id'] ) && $settings['staff_member_id'] != 0 ) {
218
+ $short_code .= ' staff_member_id="' . $settings['staff_member_id'] . '"';
219
+ }
220
+ if ( Config::groupBookingActive() ) {
221
+ if ( isset( $settings['hide_nop'] ) && $settings['hide_nop'] == '' ) {
222
+ $short_code .= ' show_number_of_persons="1"';
223
+ }
224
+ }
225
+ if ( Config::multiplyAppointmentsActive() ) {
226
+ if ( isset( $settings['hide_quantity'] ) && $settings['hide_quantity'] == 'yes' ) {
227
+ $hide[] = 'quantity';
228
+ }
229
+ }
230
+ if ( isset( $settings['hide_staff_members'] ) && $settings['hide_staff_members'] == 'yes' ) {
231
+ $hide[] = 'staff_members';
232
+ }
233
+ if ( isset( $settings['hide_date'] ) && $settings['hide_date'] == 'yes' ) {
234
+ $hide[] = 'date';
235
+ }
236
+ if ( isset( $settings['hide_week_days'] ) && $settings['hide_week_days'] == 'yes' ) {
237
+ $hide[] = 'week_days';
238
+ }
239
+ if ( isset( $settings['hide_time_range'] ) && $settings['hide_time_range'] == 'yes' ) {
240
+ $hide[] = 'time_range';
241
+ }
242
+ if ( $hide ) {
243
+ $short_code .= ' hide="' . implode( ',', $hide ) . '"';
244
+ }
245
+
246
+ $short_code .= ']';
247
+
248
+ echo $short_code;
249
+ }
250
+
251
+ /**
252
+ * @return array
253
+ */
254
+ private function getControlsData()
255
+ {
256
+ $casest = Lib\Config::getCaSeSt();
257
+ $locations = array( 0 => __( 'Select location', 'bookly' ), );
258
+ $categories = array( 0 => __( 'Select category', 'bookly' ) );
259
+ $services = array( 0 => __( 'Select service', 'bookly' ) );
260
+ $staff = array( 0 => __( 'Any', 'bookly' ) );
261
+ foreach ( $casest['locations'] as $location ) {
262
+ $locations[ $location['id'] ] = $location['name'];
263
+ }
264
+ foreach ( $casest['categories'] as $category ) {
265
+ $categories[ $category['id'] ] = $category['name'];
266
+ }
267
+ foreach ( $casest['services'] as $service ) {
268
+ $services[ $service['id'] ] = $service['name'];
269
+ }
270
+ foreach ( $casest['staff'] as $value ) {
271
+ $staff[ $value['id'] ] = $value['name'];
272
+ }
273
+
274
+ return compact( 'locations', 'categories', 'services', 'staff' );
275
+ }
276
+
277
+ }
backend/components/gutenberg/bookly_form/Block.php CHANGED
@@ -43,6 +43,7 @@ class Block extends Lib\Base\Block
43
  'hide' => __( 'hide', 'bookly' ),
44
  'fields' => __( 'Fields', 'bookly' ),
45
  'duration' => __( 'Duration', 'bookly' ),
 
46
  'locationCustom' => (int) Lib\Proxy\Locations::servicesPerLocationAllowed(),
47
  'addons' => array(
48
  'customDuration' => (int) Lib\Config::customDurationActive(),
43
  'hide' => __( 'hide', 'bookly' ),
44
  'fields' => __( 'Fields', 'bookly' ),
45
  'duration' => __( 'Duration', 'bookly' ),
46
+ 'serviceHelp' => __( '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', 'bookly' ),
47
  'locationCustom' => (int) Lib\Proxy\Locations::servicesPerLocationAllowed(),
48
  'addons' => array(
49
  'customDuration' => (int) Lib\Config::customDurationActive(),
backend/components/gutenberg/bookly_form/resources/js/booking-form-block.js CHANGED
@@ -464,7 +464,7 @@
464
  }
465
  }));
466
 
467
- 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'));
468
 
469
  // Add staff
470
  inspectorElements.push(el(components.SelectControl, {
464
  }
465
  }));
466
 
467
+ inspectorElements.push(el('div', {style: {'margin': '-20px 0 1.5em 0', 'font-style': 'italic'}}, BooklyFormL10n.serviceHelp));
468
 
469
  // Add staff
470
  inspectorElements.push(el(components.SelectControl, {
backend/components/notices/Limitation.php CHANGED
@@ -12,8 +12,16 @@ class Limitation extends Lib\Base\Component
12
  /**
13
  * Render limitation notice.
14
  */
15
- public static function getHtml()
16
  {
17
- return self::renderTemplate( 'limitation', array(), false );
 
 
 
 
 
 
 
 
18
  }
19
  }
12
  /**
13
  * Render limitation notice.
14
  */
15
+ public static function forNewService()
16
  {
17
+ return self::renderTemplate( 'limitation_service', array(), false );
18
+ }
19
+
20
+ /**
21
+ * Render limitation notice.
22
+ */
23
+ public static function forNewStaff()
24
+ {
25
+ return self::renderTemplate( 'limitation_staff', array(), false );
26
  }
27
  }
backend/components/notices/templates/limitation.php DELETED
@@ -1,3 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
- <b class="h4"><?php esc_html_e( 'This function is not available in the Bookly.', 'bookly' ) ?></b>
3
- <br><br><?php _e( 'To get access to all Bookly features, lifetime free updates and 24/7 support, please upgrade to the Pro version of Bookly.<br>For more information visit', 'bookly' ) ?> <a href="http://booking-wp-plugin.com" target="_blank" class="alert-link">http://www.booking-wp-plugin.com</a>
 
 
 
backend/components/notices/templates/limitation_service.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <b class="h4"><?php esc_html_e( 'This function is not available in the Bookly.', 'bookly' ) ?></b>
3
+ <br><br><?php esc_html_e( 'You are using the free version of Bookly, so you can\'t add more than 5 services. To remove this limitation, get access to all Bookly features, lifetime free updates and 24/7 support, please upgrade to the Pro version of Bookly.', 'bookly' ) ?>
4
+ <br><?php esc_html_e( 'For more information visit', 'bookly' ) ?> <a href="https://booking-wp-plugin.com" target="_blank" class="alert-link">https://www.booking-wp-plugin.com</a>
backend/components/notices/templates/limitation_staff.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <b class="h4"><?php esc_html_e( 'This function is not available in the Bookly.', 'bookly' ) ?></b>
3
+ <br><br><?php esc_html_e( 'You are using the free version of Bookly, so you can\'t add more than 1 staff. To remove this limitation, get access to all Bookly features, lifetime free updates and 24/7 support, please upgrade to the Pro version of Bookly.', 'bookly' ) ?>
4
+ <br><?php esc_html_e( 'For more information visit', 'bookly' ) ?> <a href="https://www.booking-wp-plugin.com" target="_blank" class="alert-link">https://www.booking-wp-plugin.com</a>
backend/components/settings/Selects.php CHANGED
@@ -123,4 +123,64 @@ class Selects
123
 
124
  echo Inputs::buildControl( $option_name, $label, $help, $control );
125
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126
  }
123
 
124
  echo Inputs::buildControl( $option_name, $label, $help, $control );
125
  }
126
+
127
+ /**
128
+ * Render drop-down select.
129
+ *
130
+ * @param $option_name
131
+ * @param null $label
132
+ * @param null $help
133
+ * @param array $options
134
+ * @param array $attributes
135
+ */
136
+ public static function renderSingleWithCategories( $option_name, $label = null, $help = null, array $options = array(), $attributes = array() )
137
+ {
138
+ $options_str = '';
139
+ foreach ( $options as $option => $value ) {
140
+ if ( is_array( $value ) ) {
141
+ $options_str .= sprintf( '<optgroup label="%s">', esc_attr( $option ) );
142
+ foreach ( $value as $option_value => $option_label ) {
143
+ $options_str .= strtr(
144
+ '<option value="{value}"{attr}>{caption}</option>',
145
+ array(
146
+ '{value}' => esc_attr( $option_value ),
147
+ '{attr}' => selected( get_option( $option_name ), $option_value, false ),
148
+ '{caption}' => esc_html( $option_label ),
149
+ )
150
+ );
151
+ }
152
+ $options_str .= '</optgroup>';
153
+ } else {
154
+ $options_str .= strtr(
155
+ '<option value="{value}"{attr}>{caption}</option>',
156
+ array(
157
+ '{value}' => esc_attr( $option ),
158
+ '{attr}' => selected( get_option( $option_name ), $option, false ),
159
+ '{caption}' => esc_html( $value ),
160
+ )
161
+ );
162
+ }
163
+ }
164
+
165
+ $attributes['id'] = $option_name;
166
+ $attributes['class'] = 'form-control custom-select';
167
+ $attributes['name'] = $option_name;
168
+
169
+ $attributes_str = '';
170
+ foreach ( $attributes as $attr => $value ) {
171
+ if ( $value !== null ) {
172
+ $attributes_str .= sprintf( ' %s="%s"', $attr, esc_attr( $value ) );
173
+ }
174
+ }
175
+
176
+ $control = strtr(
177
+ '<select {attributes}>{options}</select>',
178
+ array(
179
+ '{attributes}' => $attributes_str,
180
+ '{options}' => $options_str,
181
+ )
182
+ );
183
+
184
+ echo Inputs::buildControl( $option_name, $label, $help, $control );
185
+ }
186
  }
backend/components/settings/proxy/Pro.php CHANGED
@@ -8,6 +8,7 @@ use Bookly\Lib;
8
  * @package Bookly\Backend\Components\Settings\Proxy
9
  *
10
  * @method static void renderPurchaseCode( $blog_id = null ) Render purchase code
 
11
  */
12
  abstract class Pro extends Lib\Base\Proxy
13
  {
8
  * @package Bookly\Backend\Components\Settings\Proxy
9
  *
10
  * @method static void renderPurchaseCode( $blog_id = null ) Render purchase code
11
+ * @method static void renderDisplayFrontendCalendar() Render option Display front-end calendar
12
  */
13
  abstract class Pro extends Lib\Base\Proxy
14
  {
backend/components/tiny_mce/Tools.php CHANGED
@@ -58,13 +58,12 @@ class Tools extends Lib\Base\Component
58
  ) );
59
 
60
  wp_localize_script( 'bookly-bookly-form-settings.js', 'BooklyFormShortCodeL10n', array(
61
- 'csrfToken' => Lib\Utils\Common::getCsrfToken(),
62
  'locationCustom' => (int) Lib\Proxy\Locations::servicesPerLocationAllowed(),
63
- 'locations' => $casest['locations'],
64
- 'categories' => $casest['categories'],
65
- 'services' => $casest['services'],
66
- 'staff' => $casest['staff'],
67
- 'title' => __( 'Insert Appointment Booking Form', 'bookly' ),
68
  ) );
69
  }
70
 
58
  ) );
59
 
60
  wp_localize_script( 'bookly-bookly-form-settings.js', 'BooklyFormShortCodeL10n', array(
 
61
  'locationCustom' => (int) Lib\Proxy\Locations::servicesPerLocationAllowed(),
62
+ 'locations' => $casest['locations'],
63
+ 'categories' => $casest['categories'],
64
+ 'services' => $casest['services'],
65
+ 'staff' => $casest['staff'],
66
+ 'title' => __( 'Insert Appointment Booking Form', 'bookly' ),
67
  ) );
68
  }
69
 
backend/components/tiny_mce/templates/bookly_popup.php CHANGED
@@ -5,7 +5,7 @@
5
  <?php static::renderTemplate( 'bookly_form' ) ?>
6
  <tr>
7
  <td></td>
8
- <td>
9
  <button class="button button-primary bookly-js-insert-shortcode" type="button"><?php esc_html_e( 'Insert', 'bookly' ) ?></button>
10
  </td>
11
  </tr>
5
  <?php static::renderTemplate( 'bookly_form' ) ?>
6
  <tr>
7
  <td></td>
8
+ <td class='wp-core-ui'>
9
  <button class="button button-primary bookly-js-insert-shortcode" type="button"><?php esc_html_e( 'Insert', 'bookly' ) ?></button>
10
  </td>
11
  </tr>
backend/modules/appearance/Ajax.php CHANGED
@@ -35,6 +35,7 @@ class Ajax extends Lib\Base\Ajax
35
  // Step, label and option texts.
36
  'bookly_l10n_button_apply',
37
  'bookly_l10n_button_back',
 
38
  'bookly_l10n_label_category',
39
  'bookly_l10n_label_email',
40
  'bookly_l10n_label_email_confirm',
@@ -52,6 +53,8 @@ class Ajax extends Lib\Base\Ajax
52
  'bookly_l10n_label_service',
53
  'bookly_l10n_label_start_from',
54
  'bookly_l10n_label_pay_cloud_stripe',
 
 
55
  'bookly_l10n_option_category',
56
  'bookly_l10n_option_employee',
57
  'bookly_l10n_option_service',
@@ -99,7 +102,9 @@ class Ajax extends Lib\Base\Ajax
99
  'bookly_app_show_staff_info',
100
  'bookly_app_show_single_slot',
101
  'bookly_app_show_start_over',
 
102
  'bookly_app_show_time_zone_switcher',
 
103
  'bookly_app_staff_name_with_price',
104
  'bookly_cst_first_last_name',
105
  'bookly_cst_required_details',
35
  // Step, label and option texts.
36
  'bookly_l10n_button_apply',
37
  'bookly_l10n_button_back',
38
+ 'bookly_l10n_button_download_ics',
39
  'bookly_l10n_label_category',
40
  'bookly_l10n_label_email',
41
  'bookly_l10n_label_email_confirm',
53
  'bookly_l10n_label_service',
54
  'bookly_l10n_label_start_from',
55
  'bookly_l10n_label_pay_cloud_stripe',
56
+ 'bookly_l10n_label_terms',
57
+ 'bookly_l10n_error_terms',
58
  'bookly_l10n_option_category',
59
  'bookly_l10n_option_employee',
60
  'bookly_l10n_option_service',
102
  'bookly_app_show_staff_info',
103
  'bookly_app_show_single_slot',
104
  'bookly_app_show_start_over',
105
+ 'bookly_app_show_terms',
106
  'bookly_app_show_time_zone_switcher',
107
+ 'bookly_app_show_download_ics',
108
  'bookly_app_staff_name_with_price',
109
  'bookly_cst_first_last_name',
110
  'bookly_cst_required_details',
backend/modules/appearance/Page.php CHANGED
@@ -143,5 +143,4 @@ class Page extends Lib\Base\Component
143
  self::renderTemplate( 'index', compact( 'steps', 'custom_css', 'payment_options' ) );
144
  }
145
 
146
-
147
  }
143
  self::renderTemplate( 'index', compact( 'steps', 'custom_css', 'payment_options' ) );
144
  }
145
 
 
146
  }
backend/modules/appearance/proxy/Pro.php CHANGED
@@ -11,6 +11,7 @@ use Bookly\Lib;
11
  * @method static void renderBirthday() Render inputs for birthday fields in appearance.
12
  * @method static void renderBookingStatesSelector() Render single/multiple/100% off booking selector on Payment step.
13
  * @method static void renderBookingStatesText() Render multiple or 100% off booking text option on Payment step.
 
14
  * @method static void renderFacebookButton() Render facebook login button on Time step.
15
  * @method static void renderShowAddress() render 'Show Address Fields' on Details Step.
16
  * @method static void renderShowBirthday() render 'Show Birthday Fields' on Details Step.
11
  * @method static void renderBirthday() Render inputs for birthday fields in appearance.
12
  * @method static void renderBookingStatesSelector() Render single/multiple/100% off booking selector on Payment step.
13
  * @method static void renderBookingStatesText() Render multiple or 100% off booking text option on Payment step.
14
+ * @method static void renderPaymentImpossible() Render payment impossible alert.
15
  * @method static void renderFacebookButton() Render facebook login button on Time step.
16
  * @method static void renderShowAddress() render 'Show Address Fields' on Details Step.
17
  * @method static void renderShowBirthday() render 'Show Birthday Fields' on Details Step.
backend/modules/appearance/proxy/SpecialHours.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Bookly\Backend\Modules\Appearance\Proxy;
3
+
4
+ use Bookly\Lib;
5
+
6
+ /**
7
+ * Class Pro
8
+ *
9
+ * @package Bookly\Backend\Modules\Appearance\Proxy
10
+ *
11
+ * @method static void renderHighlightSpecialHours() Render 'Highlight special hours' on Time step.
12
+ */
13
+ abstract class SpecialHours extends Lib\Base\Proxy
14
+ {
15
+
16
+ }
backend/modules/appearance/resources/js/appearance.js CHANGED
@@ -1,5 +1,14 @@
1
  jQuery(function ($) {
2
- var
 
 
 
 
 
 
 
 
 
3
  $appearance = $('#bookly-appearance'),
4
  $color_picker = $('.bookly-js-color-picker'),
5
  $editableElements = $('.bookly-js-editable'),
@@ -40,6 +49,7 @@ jQuery(function ($) {
40
  $day_one_column = $('#bookly-day-one-column'),
41
  $day_multi_columns = $('#bookly-day-multi-columns'),
42
  $columnizer = $('.bookly-time-step .bookly-columnizer-wrap'),
 
43
  // Step extras.
44
  $extras_step = $('.bookly-extra-step'),
45
  $extras_show = $('#bookly-step-settings [name="bookly_service_extras_show[]"]'),
@@ -66,14 +76,17 @@ jQuery(function ($) {
66
  $show_custom_fields = $('#bookly-show-custom-fields'),
67
  $show_customer_information = $('#bookly-show-customer-information'),
68
  $show_files = $('#bookly-show-files'),
 
69
  // Step payment.
70
  $show_coupons = $('#bookly-show-coupons'),
71
  // Step done.
72
  $done_nav_container = $('#bookly-step-8 .bookly-nav-steps'),
73
  $show_start_over = $('#bookly-show-start-over'),
74
  $show_download_invoice = $('#bookly-show-download-invoice'),
 
75
  $start_over = $('[data-option="bookly_l10n_step_done_button_start_over"]', $done_nav_container).parent('div'),
76
  $download_invoice = $('[data-option="bookly_l10n_button_download_invoice"]', $done_nav_container).parent('div'),
 
77
  $done_step_view = $('#bookly-done-step-view'),
78
  // Buttons.
79
  $save_button = $('#ajax-send-appearance'),
@@ -183,9 +196,9 @@ jQuery(function ($) {
183
  // Align buttons to the left
184
  $align_buttons_left.on('change', function () {
185
  if (this.checked) {
186
- $('.bookly-nav-steps > div.bookly-right').removeClass('bookly-right').addClass('bookly-left');
187
  } else {
188
- $('.bookly-nav-steps > div.bookly-left').removeClass('bookly-left').addClass('bookly-right');
189
  }
190
  });
191
 
@@ -569,6 +582,18 @@ jQuery(function ($) {
569
  }
570
  }).trigger('change');
571
 
 
 
 
 
 
 
 
 
 
 
 
 
572
  /**
573
  * Step repeat.
574
  */
@@ -611,6 +636,7 @@ jQuery(function ($) {
611
  /**
612
  * Step Repeat.
613
  */
 
614
  $bookly_show_step_repeat.change(function () {
615
  $('.bookly-js-repeat-enabled').toggle(this.checked);
616
  }).trigger('change');
@@ -618,6 +644,7 @@ jQuery(function ($) {
618
  /**
619
  * Step Cart
620
  */
 
621
  $show_cart_extras.change(function () {
622
  $('.bookly-js-extras-cart').toggle(this.checked);
623
  }).trigger('change');
@@ -755,6 +782,10 @@ jQuery(function ($) {
755
  $('.bookly-js-files').toggle(this.checked);
756
  }).trigger('change');
757
 
 
 
 
 
758
  $show_customer_information.change(function () {
759
  $('.bookly-js-customer-information').toggle(this.checked);
760
  }).trigger('change');
@@ -765,10 +796,13 @@ jQuery(function ($) {
765
 
766
  // Switch payment step view (single/several services).
767
  $('#bookly-payment-step-view').on('change', function () {
768
- $('.bookly-js-payment-single-app').toggle(this.value == 'single-app');
769
- $('.bookly-js-payment-several-apps').toggle(this.value == 'several-apps');
770
- $('.bookly-js-payment-100percents-off-price').toggle(this.value == '100percents-off-price');
771
- $('.bookly-js-payment-gateways').toggle(this.value !== '100percents-off-price');
 
 
 
772
  }).trigger('change');
773
 
774
  // Show credit card form.
@@ -804,16 +838,25 @@ jQuery(function ($) {
804
  doneNavContainerToggle();
805
  });
806
 
 
 
 
 
807
  function doneNavContainerToggle() {
808
- let show_container = $show_start_over.prop('checked');
809
  switch ($done_step_view.val()) {
810
  case 'booking-success':
811
  case 'booking-processing':
812
  show_container = show_container || ($show_download_invoice.length > 0 && $show_download_invoice.prop('checked'));
813
  $download_invoice.toggle($show_download_invoice.prop('checked'));
 
814
  break;
815
  case 'booking-limit-error':
 
 
 
816
  case 'booking-skip-payment':
 
817
  $download_invoice.hide();
818
  break;
819
  }
@@ -907,6 +950,7 @@ jQuery(function ($) {
907
  'bookly_app_show_calendar': Number($show_calendar.prop('checked')),
908
  'bookly_app_show_day_one_column': Number($show_day_one_column.prop('checked')),
909
  'bookly_app_show_single_slot': Number($show_single_slot.prop('checked')),
 
910
  'bookly_app_show_time_zone_switcher': Number($show_time_zone_switcher.prop('checked')),
911
  'bookly_app_show_login_button': Number($show_login_button.prop('checked')),
912
  'bookly_app_show_facebook_login_button': Number($show_facebook_login_button.prop('checked')),
@@ -936,11 +980,13 @@ jQuery(function ($) {
936
  'bookly_custom_fields_enabled': Number($show_custom_fields.prop('checked')),
937
  'bookly_customer_information_enabled': Number($show_customer_information.prop('checked')),
938
  'bookly_files_enabled': Number($show_files.prop('checked')),
 
939
  'bookly_waiting_list_enabled': Number($show_waiting_list.prop('checked')),
940
  'bookly_google_maps_address_enabled': Number($show_google_maps.prop('checked')),
941
  'bookly_service_extras_show_in_cart': Number($show_cart_extras.prop('checked')),
942
  'bookly_service_extras_show': bookly_service_extras_show,
943
- 'bookly_invoices_show_download_invoice': Number($show_download_invoice.prop('checked'))
 
944
  }
945
  };
946
  // Add data from editable elements.
1
  jQuery(function ($) {
2
+ let steps = {
3
+ $service: $('#bookly-step-1'),
4
+ $extras: $('#bookly-step-2'),
5
+ $time: $('#bookly-step-3'),
6
+ $repeat: $('#bookly-step-4'),
7
+ $cart: $('#bookly-step-5'),
8
+ $details: $('#bookly-step-6'),
9
+ $payment: $('#bookly-step-7'),
10
+ $done: $('#bookly-step-8')
11
+ },
12
  $appearance = $('#bookly-appearance'),
13
  $color_picker = $('.bookly-js-color-picker'),
14
  $editableElements = $('.bookly-js-editable'),
49
  $day_one_column = $('#bookly-day-one-column'),
50
  $day_multi_columns = $('#bookly-day-multi-columns'),
51
  $columnizer = $('.bookly-time-step .bookly-columnizer-wrap'),
52
+ $highlight_special_hours = $('#bookly-highlight-special-hours'),
53
  // Step extras.
54
  $extras_step = $('.bookly-extra-step'),
55
  $extras_show = $('#bookly-step-settings [name="bookly_service_extras_show[]"]'),
76
  $show_custom_fields = $('#bookly-show-custom-fields'),
77
  $show_customer_information = $('#bookly-show-customer-information'),
78
  $show_files = $('#bookly-show-files'),
79
+ $show_terms = $('#bookly-show-terms'),
80
  // Step payment.
81
  $show_coupons = $('#bookly-show-coupons'),
82
  // Step done.
83
  $done_nav_container = $('#bookly-step-8 .bookly-nav-steps'),
84
  $show_start_over = $('#bookly-show-start-over'),
85
  $show_download_invoice = $('#bookly-show-download-invoice'),
86
+ $show_download_ics = $('#bookly-show-download-ics'),
87
  $start_over = $('[data-option="bookly_l10n_step_done_button_start_over"]', $done_nav_container).parent('div'),
88
  $download_invoice = $('[data-option="bookly_l10n_button_download_invoice"]', $done_nav_container).parent('div'),
89
+ $download_ics = $('[data-option="bookly_l10n_button_download_ics"]', $done_nav_container).parent('div'),
90
  $done_step_view = $('#bookly-done-step-view'),
91
  // Buttons.
92
  $save_button = $('#ajax-send-appearance'),
196
  // Align buttons to the left
197
  $align_buttons_left.on('change', function () {
198
  if (this.checked) {
199
+ $('.bookly-nav-steps > div.bookly-right').removeClass('bookly-right ml-2').addClass('bookly-left mr-2');
200
  } else {
201
+ $('.bookly-nav-steps > div.bookly-left').removeClass('bookly-left mr-2').addClass('bookly-right ml-2');
202
  }
203
  });
204
 
582
  }
583
  }).trigger('change');
584
 
585
+ $highlight_special_hours.on('change', function () {
586
+ if (this.checked) {
587
+ $('.bookly-column .bookly-hour span:first-child').each(function () {
588
+ if (Math.random() < 0.2) {
589
+ $(this).addClass('font-weight-bold');
590
+ }
591
+ })
592
+ } else {
593
+ $('.bookly-column .bookly-hour span:first-child').removeClass('font-weight-bold');
594
+ }
595
+ }).trigger('change');
596
+
597
  /**
598
  * Step repeat.
599
  */
636
  /**
637
  * Step Repeat.
638
  */
639
+
640
  $bookly_show_step_repeat.change(function () {
641
  $('.bookly-js-repeat-enabled').toggle(this.checked);
642
  }).trigger('change');
644
  /**
645
  * Step Cart
646
  */
647
+
648
  $show_cart_extras.change(function () {
649
  $('.bookly-js-extras-cart').toggle(this.checked);
650
  }).trigger('change');
782
  $('.bookly-js-files').toggle(this.checked);
783
  }).trigger('change');
784
 
785
+ $show_terms.change(function () {
786
+ $('.bookly-js-terms').toggle(this.checked);
787
+ }).trigger('change');
788
+
789
  $show_customer_information.change(function () {
790
  $('.bookly-js-customer-information').toggle(this.checked);
791
  }).trigger('change');
796
 
797
  // Switch payment step view (single/several services).
798
  $('#bookly-payment-step-view').on('change', function () {
799
+ $('.bookly-js-payment-single-app',steps.$payment).toggle(this.value == 'single-app');
800
+ $('.bookly-js-payment-several-apps',steps.$payment).toggle(this.value == 'several-apps');
801
+ $('.bookly-js-payment-100percents-off-price',steps.$payment).toggle(this.value == '100percents-off-price');
802
+ $('.bookly-js-payment-gateways',steps.$payment).toggle(this.value !== '100percents-off-price');
803
+ $('.bookly-js-payment-gateways-intersected',steps.$payment).toggle(this.value != 'without-intersected-gateways');
804
+ $('.bookly-js-payment-impossible',steps.$payment).toggle(this.value == 'without-intersected-gateways');
805
+ $()
806
  }).trigger('change');
807
 
808
  // Show credit card form.
838
  doneNavContainerToggle();
839
  });
840
 
841
+ $show_download_ics.change(function () {
842
+ doneNavContainerToggle();
843
+ });
844
+
845
  function doneNavContainerToggle() {
846
+ let show_container = $show_start_over.prop('checked') || $show_download_ics.prop('checked');
847
  switch ($done_step_view.val()) {
848
  case 'booking-success':
849
  case 'booking-processing':
850
  show_container = show_container || ($show_download_invoice.length > 0 && $show_download_invoice.prop('checked'));
851
  $download_invoice.toggle($show_download_invoice.prop('checked'));
852
+ $download_ics.toggle($show_download_ics.prop('checked'));
853
  break;
854
  case 'booking-limit-error':
855
+ $download_ics.hide();
856
+ $download_invoice.hide();
857
+ break;
858
  case 'booking-skip-payment':
859
+ $download_ics.toggle($show_download_ics.prop('checked'));
860
  $download_invoice.hide();
861
  break;
862
  }
950
  'bookly_app_show_calendar': Number($show_calendar.prop('checked')),
951
  'bookly_app_show_day_one_column': Number($show_day_one_column.prop('checked')),
952
  'bookly_app_show_single_slot': Number($show_single_slot.prop('checked')),
953
+ 'bookly_app_highlight_special_hours': Number($highlight_special_hours.prop('checked')),
954
  'bookly_app_show_time_zone_switcher': Number($show_time_zone_switcher.prop('checked')),
955
  'bookly_app_show_login_button': Number($show_login_button.prop('checked')),
956
  'bookly_app_show_facebook_login_button': Number($show_facebook_login_button.prop('checked')),
980
  'bookly_custom_fields_enabled': Number($show_custom_fields.prop('checked')),
981
  'bookly_customer_information_enabled': Number($show_customer_information.prop('checked')),
982
  'bookly_files_enabled': Number($show_files.prop('checked')),
983
+ 'bookly_app_show_terms': Number($show_terms.prop('checked')),
984
  'bookly_waiting_list_enabled': Number($show_waiting_list.prop('checked')),
985
  'bookly_google_maps_address_enabled': Number($show_google_maps.prop('checked')),
986
  'bookly_service_extras_show_in_cart': Number($show_cart_extras.prop('checked')),
987
  'bookly_service_extras_show': bookly_service_extras_show,
988
+ 'bookly_invoices_show_download_invoice': Number($show_download_invoice.prop('checked')),
989
+ 'bookly_app_show_download_ics': Number($show_download_ics.prop('checked'))
990
  }
991
  };
992
  // Add data from editable elements.
backend/modules/appearance/templates/_6_details.php CHANGED
@@ -94,6 +94,16 @@ use Bookly\Lib\Config;
94
  </div>
95
 
96
  <?php Proxy\Files::renderAppearance() ?>
 
 
 
 
 
 
 
 
 
 
97
  </div>
98
 
99
  <?php Proxy\RecurringAppointments::renderInfoMessage() ?>
94
  </div>
95
 
96
  <?php Proxy\Files::renderAppearance() ?>
97
+
98
+ <div class="bookly-box bookly-table bookly-js-terms">
99
+ <div class="bookly-checkbox-group">
100
+ <input type="checkbox">
101
+ <label class="bookly-square bookly-checkbox" style="width:28px; float:left; margin-top: -5px;">
102
+ <i class="bookly-icon-sm"></i>
103
+ </label>
104
+ <?php Elements::renderLabel( array( 'bookly_l10n_label_terms', 'bookly_l10n_error_terms' ) ) ?>
105
+ </div>
106
+ </div>
107
  </div>
108
 
109
  <?php Proxy\RecurringAppointments::renderInfoMessage() ?>
backend/modules/appearance/templates/_7_payment.php CHANGED
@@ -7,73 +7,73 @@ use Bookly\Lib\Config;
7
  ?>
8
  <div class="bookly-form">
9
  <?php include '_progress_tracker.php' ?>
10
-
11
- <?php Proxy\Coupons::renderCouponBlock() ?>
12
- <?php Proxy\DepositPayments::renderAppearance() ?>
13
-
14
- <div class="bookly-payment-nav">
15
- <div class="bookly-box bookly-js-payment-single-app">
16
- <?php Elements::renderText( 'bookly_l10n_info_payment_step_single_app', Codes::getJson( 7 ) ) ?>
17
- </div>
18
- <?php Proxy\Pro::renderBookingStatesText() ?>
19
- <div class="bookly-js-payment-gateways">
20
- <?php foreach ( $payment_options as $gateway ) : ?>
21
- <div class="bookly-box bookly-list">
22
- <label>
23
- <input type="radio" name="payment" id="bookly-card-payment"/>
24
- <?php Elements::renderString( array( $gateway['label_option_name'], ), $gateway['title'] ) ?>
25
- <?php if ( $gateway['logo_url'] ) : ?>
26
- <img src="<?php echo esc_attr( $gateway['logo_url'] ) ?>" alt="<?php echo esc_attr( $gateway['title'] ) ?>"/>
27
- <?php endif ?>
28
- </label>
29
- <?php if ( $gateway['with_card'] ) : ?>
30
- <form class="bookly-card-form bookly-clear-bottom" style="margin-top:15px;display: none;">
31
- <div class="bookly-box bookly-table">
32
- <div class="bookly-form-group" style="width:200px!important">
33
- <label>
34
- <?php Elements::renderString( array( 'bookly_l10n_label_ccard_number', ) ) ?>
35
- </label>
36
- <div>
37
- <input type="text"/>
38
  </div>
39
- </div>
40
- <div class="bookly-form-group">
41
- <label>
42
- <?php Elements::renderString( array( 'bookly_l10n_label_ccard_expire', ) ) ?>
43
- </label>
44
- <div>
45
- <select class="bookly-card-exp">
46
- <?php for ( $i = 1; $i <= 12; ++ $i ) : ?>
47
- <option value="<?php echo esc_attr( $i ) ?>"><?php printf( '%02d', $i ) ?></option>
48
- <?php endfor ?>
49
- </select>
50
- <select class="bookly-card-exp">
51
- <?php for ( $i = date( 'Y' ); $i <= date( 'Y' ) + 10; ++ $i ) : ?>
52
- <option value="<?php echo esc_attr( $i ) ?>"><?php echo esc_html( $i ) ?></option>
53
- <?php endfor ?>
54
- </select>
55
  </div>
56
  </div>
57
- </div>
58
- <div class="bookly-box bookly-clear-bottom">
59
- <div class="bookly-form-group">
60
- <label>
61
- <?php Elements::renderString( array( 'bookly_l10n_label_ccard_code', ) ) ?>
62
- </label>
63
- <div>
64
- <input class="bookly-card-cvc" type="text"/>
65
  </div>
66
  </div>
67
- </div>
68
- </form>
69
- <?php endif ?>
70
- </div>
71
- <?php endforeach ?>
72
  </div>
73
- </div>
74
-
75
- <?php Proxy\RecurringAppointments::renderInfoMessage() ?>
76
 
 
 
 
77
  <div class="bookly-box bookly-nav-steps">
78
  <div class="bookly-back-step bookly-js-back-step bookly-btn">
79
  <?php Elements::renderString( array( 'bookly_l10n_button_back' ) ) ?>
7
  ?>
8
  <div class="bookly-form">
9
  <?php include '_progress_tracker.php' ?>
10
+ <div class="bookly-js-payment-gateways-intersected">
11
+ <?php Proxy\Coupons::renderCouponBlock() ?>
12
+ <?php Proxy\DepositPayments::renderAppearance() ?>
13
+ <div class="bookly-payment-nav">
14
+ <div class="bookly-box bookly-js-payment-single-app">
15
+ <?php Elements::renderText( 'bookly_l10n_info_payment_step_single_app', Codes::getJson( 7 ) ) ?>
16
+ </div>
17
+ <?php Proxy\Pro::renderBookingStatesText() ?>
18
+ <div class="bookly-js-payment-gateways">
19
+ <?php foreach ( $payment_options as $gateway ) : ?>
20
+ <div class="bookly-box bookly-list">
21
+ <label>
22
+ <input type="radio" name="payment" id="bookly-card-payment"/>
23
+ <?php Elements::renderString( array( $gateway['label_option_name'], ), $gateway['title'] ) ?>
24
+ <?php if ( $gateway['logo_url'] ) : ?>
25
+ <img src="<?php echo esc_attr( $gateway['logo_url'] ) ?>" alt="<?php echo esc_attr( $gateway['title'] ) ?>"/>
26
+ <?php endif ?>
27
+ </label>
28
+ <?php if ( $gateway['with_card'] ) : ?>
29
+ <form class="bookly-card-form bookly-clear-bottom" style="margin-top:15px;display: none;">
30
+ <div class="bookly-box bookly-table">
31
+ <div class="bookly-form-group" style="width:200px!important">
32
+ <label>
33
+ <?php Elements::renderString( array( 'bookly_l10n_label_ccard_number', ) ) ?>
34
+ </label>
35
+ <div>
36
+ <input type="text"/>
37
+ </div>
38
  </div>
39
+ <div class="bookly-form-group">
40
+ <label>
41
+ <?php Elements::renderString( array( 'bookly_l10n_label_ccard_expire', ) ) ?>
42
+ </label>
43
+ <div>
44
+ <select class="bookly-card-exp">
45
+ <?php for ( $i = 1; $i <= 12; ++ $i ) : ?>
46
+ <option value="<?php echo esc_attr( $i ) ?>"><?php printf( '%02d', $i ) ?></option>
47
+ <?php endfor ?>
48
+ </select>
49
+ <select class="bookly-card-exp">
50
+ <?php for ( $i = date( 'Y' ); $i <= date( 'Y' ) + 10; ++ $i ) : ?>
51
+ <option value="<?php echo esc_attr( $i ) ?>"><?php echo esc_html( $i ) ?></option>
52
+ <?php endfor ?>
53
+ </select>
54
+ </div>
55
  </div>
56
  </div>
57
+ <div class="bookly-box bookly-clear-bottom">
58
+ <div class="bookly-form-group">
59
+ <label>
60
+ <?php Elements::renderString( array( 'bookly_l10n_label_ccard_code', ) ) ?>
61
+ </label>
62
+ <div>
63
+ <input class="bookly-card-cvc" type="text"/>
64
+ </div>
65
  </div>
66
  </div>
67
+ </form>
68
+ <?php endif ?>
69
+ </div>
70
+ <?php endforeach ?>
71
+ </div>
72
  </div>
 
 
 
73
 
74
+ <?php Proxy\RecurringAppointments::renderInfoMessage() ?>
75
+ </div>
76
+ <?php Proxy\Pro::renderPaymentImpossible() ?>
77
  <div class="bookly-box bookly-nav-steps">
78
  <div class="bookly-back-step bookly-js-back-step bookly-btn">
79
  <?php Elements::renderString( array( 'bookly_l10n_button_back' ) ) ?>
backend/modules/appearance/templates/_8_complete.php CHANGED
@@ -16,11 +16,16 @@ use Bookly\Backend\Components\Editable\Elements;
16
  </div>
17
  <?php Proxy\CustomerGroups::renderStepCompleteInfo() ?>
18
  <div class="bookly-box bookly-nav-steps">
19
- <div class="ml-2 <?php echo get_option( 'bookly_app_align_buttons_left' ) ? 'bookly-left' : 'bookly-right' ?>">
20
  <div class="bookly-next-step bookly-js-next-step bookly-btn">
21
  <?php Elements::renderString( array( 'bookly_l10n_step_done_button_start_over' ) ) ?>
22
  </div>
23
  </div>
 
 
 
 
 
24
  <?php Proxy\Invoices::renderDownloadInvoice() ?>
25
  </div>
26
  </div>
16
  </div>
17
  <?php Proxy\CustomerGroups::renderStepCompleteInfo() ?>
18
  <div class="bookly-box bookly-nav-steps">
19
+ <div class="<?php echo get_option( 'bookly_app_align_buttons_left' ) ? 'mr-2 bookly-left' : 'ml-2 bookly-right' ?>">
20
  <div class="bookly-next-step bookly-js-next-step bookly-btn">
21
  <?php Elements::renderString( array( 'bookly_l10n_step_done_button_start_over' ) ) ?>
22
  </div>
23
  </div>
24
+ <div class="<?php echo get_option( 'bookly_app_align_buttons_left' ) ? 'mr-2 bookly-left' : 'ml-2 bookly-right' ?>">
25
+ <div class="bookly-next-step bookly-js-next-step bookly-btn">
26
+ <?php Elements::renderString( array( 'bookly_l10n_button_download_ics' ) ) ?>
27
+ </div>
28
+ </div>
29
  <?php Proxy\Invoices::renderDownloadInvoice() ?>
30
  </div>
31
  </div>
backend/modules/appearance/templates/index.php CHANGED
@@ -108,6 +108,7 @@ use Bookly\Backend\Modules\Appearance\Proxy;
108
  </div>
109
  <?php Proxy\Pro::renderTimeZoneSwitcherCheckbox() ?>
110
  <?php Proxy\Shared::renderTimeStepSettings() ?>
 
111
  </div>
112
  </div>
113
 
@@ -146,6 +147,9 @@ use Bookly\Backend\Modules\Appearance\Proxy;
146
  <?php Proxy\Files::renderShowFiles() ?>
147
  <?php Proxy\CustomerInformation::renderShowCustomerInformation() ?>
148
  <?php Proxy\Pro::renderShowFacebookButton() ?>
 
 
 
149
  </div>
150
  </div>
151
  <div class="bookly-js-payment-settings collapse">
@@ -160,6 +164,9 @@ use Bookly\Backend\Modules\Appearance\Proxy;
160
  <div class="col-md-3 my-2">
161
  <?php Inputs::renderCheckBox( __( 'Show \'Start over\' button', 'bookly' ), null, get_option( 'bookly_app_show_start_over' ), array( 'id' => 'bookly-show-start-over' ) ) ?>
162
  </div>
 
 
 
163
  <?php Proxy\Invoices::renderShowDownloadInvoice() ?>
164
  </div>
165
  <div class="alert alert-info my-2">
108
  </div>
109
  <?php Proxy\Pro::renderTimeZoneSwitcherCheckbox() ?>
110
  <?php Proxy\Shared::renderTimeStepSettings() ?>
111
+ <?php Proxy\SpecialHours::renderHighlightSpecialHours() ?>
112
  </div>
113
  </div>
114
 
147
  <?php Proxy\Files::renderShowFiles() ?>
148
  <?php Proxy\CustomerInformation::renderShowCustomerInformation() ?>
149
  <?php Proxy\Pro::renderShowFacebookButton() ?>
150
+ <div class="col-md-3 my-2">
151
+ <?php Inputs::renderCheckBox( __( 'Show Terms & Conditions checkbox', 'bookly' ), null, get_option( 'bookly_app_show_terms' ), array( 'id' => 'bookly-show-terms' ) ) ?>
152
+ </div>
153
  </div>
154
  </div>
155
  <div class="bookly-js-payment-settings collapse">
164
  <div class="col-md-3 my-2">
165
  <?php Inputs::renderCheckBox( __( 'Show \'Start over\' button', 'bookly' ), null, get_option( 'bookly_app_show_start_over' ), array( 'id' => 'bookly-show-start-over' ) ) ?>
166
  </div>
167
+ <div class="col-md-3 my-2">
168
+ <?php Inputs::renderCheckBox( __( 'Show \'Download ICS\' button', 'bookly' ), null, get_option( 'bookly_app_show_download_ics' ), array( 'id' => 'bookly-show-download-ics' ) ) ?>
169
+ </div>
170
  <?php Proxy\Invoices::renderShowDownloadInvoice() ?>
171
  </div>
172
  <div class="alert alert-info my-2">
backend/modules/calendar/Ajax.php CHANGED
@@ -30,10 +30,7 @@ class Ajax extends Page
30
  $one_day = new \DateInterval( 'P1D' );
31
  $start_date = new \DateTime( self::parameter( 'start' ) );
32
  $end_date = new \DateTime( self::parameter( 'end' ) );
33
- $location_ids = self::parameter( 'location_ids', '' );
34
- if ( $location_ids ) {
35
- $location_ids = array_map( 'intval', explode( ',', $location_ids ) );
36
- }
37
 
38
  // Determine display time zone
39
  $display_tz = Common::getCurrentUserTimeZone();
@@ -63,13 +60,15 @@ class Ajax extends Page
63
  $staff_ids = array_map( function ( $staff ) { return $staff->getId(); }, $staff_members );
64
  $schedule = Lib\Proxy\SpecialDays::getSchedule( $staff_ids, $start_date, $end_date ) ?: array();
65
  foreach ( $schedule as $day ) {
66
- if ( $location_ids == '' || in_array( $day['location_id'], $location_ids ) ) {
67
  $special_days[ $day['staff_id'] ][ $day['date'] ][] = $day;
68
  }
69
  }
70
 
71
  foreach ( $staff_members as $staff ) {
72
- $result = array_merge( $result, self::_getAppointmentsForCalendar( $staff->getId(), $start_date, $end_date, $display_tz ) );
 
 
73
 
74
  // Schedule
75
  $schedule = array();
@@ -108,7 +107,7 @@ class Ajax extends Page
108
  );
109
  $schedule[] = array(
110
  'start' => $break_start,
111
- 'end' => $break_end,
112
  );
113
  }
114
  }
@@ -188,15 +187,15 @@ class Ajax extends Page
188
  }
189
 
190
  /**
191
- * Get appointments for Event Calendar
192
  *
193
  * @param int $staff_id
194
  * @param \DateTime $start_date
195
  * @param \DateTime $end_date
196
- * @param string $display_tz
197
- * @return array
198
  */
199
- private static function _getAppointmentsForCalendar( $staff_id, \DateTime $start_date, \DateTime $end_date, $display_tz )
200
  {
201
  $query = Lib\Entities\Appointment::query( 'a' )
202
  ->where( 'st.id', $staff_id )
@@ -205,14 +204,14 @@ class Ajax extends Page
205
 
206
  $service_ids = array_filter( explode( ',', self::parameter( 'service_ids' ) ) );
207
 
208
- if ( !empty( $service_ids ) && !in_array( 'all', $service_ids ) ) {
209
  $raw_where = array();
210
  if ( in_array( 'custom', $service_ids ) ) {
211
  $raw_where[] = 'a.service_id IS NULL';
212
  }
213
 
214
  $service_ids = array_filter( $service_ids, 'is_numeric' );
215
- if ( !empty( $service_ids ) ) {
216
  $raw_where[] = 'a.service_id IN (' . implode( ',', $service_ids ) . ')';
217
  }
218
 
@@ -221,8 +220,8 @@ class Ajax extends Page
221
  }
222
  }
223
 
224
- Proxy\Shared::prepareAppointmentsQueryForCalendar( $query, $staff_id, $start_date, $end_date );
225
 
226
- return self::buildAppointmentsForCalendar( $query, $staff_id, $display_tz );
227
  }
228
  }
30
  $one_day = new \DateInterval( 'P1D' );
31
  $start_date = new \DateTime( self::parameter( 'start' ) );
32
  $end_date = new \DateTime( self::parameter( 'end' ) );
33
+ $location_ids = explode( ',', self::parameter( 'location_ids', '' ) );
 
 
 
34
 
35
  // Determine display time zone
36
  $display_tz = Common::getCurrentUserTimeZone();
60
  $staff_ids = array_map( function ( $staff ) { return $staff->getId(); }, $staff_members );
61
  $schedule = Lib\Proxy\SpecialDays::getSchedule( $staff_ids, $start_date, $end_date ) ?: array();
62
  foreach ( $schedule as $day ) {
63
+ if ( $location_ids == '' || $location_ids == 'all' || in_array( $day['location_id'], $location_ids ) ) {
64
  $special_days[ $day['staff_id'] ][ $day['date'] ][] = $day;
65
  }
66
  }
67
 
68
  foreach ( $staff_members as $staff ) {
69
+ $query = self::getAppointmentsQueryForCalendar( $staff->getId(), $start_date, $end_date, $location_ids );
70
+ $appointments = self::buildAppointmentsForCalendar( $query, $staff->getId(), $display_tz );
71
+ $result = array_merge( $result, $appointments );
72
 
73
  // Schedule
74
  $schedule = array();
107
  );
108
  $schedule[] = array(
109
  'start' => $break_start,
110
+ 'end' => $break_end,
111
  );
112
  }
113
  }
187
  }
188
 
189
  /**
190
+ * Get appointments query for Event Calendar
191
  *
192
  * @param int $staff_id
193
  * @param \DateTime $start_date
194
  * @param \DateTime $end_date
195
+ * @param array|null $location_ids
196
+ * @return Lib\Query
197
  */
198
+ public static function getAppointmentsQueryForCalendar( $staff_id, \DateTime $start_date, \DateTime $end_date, $location_ids )
199
  {
200
  $query = Lib\Entities\Appointment::query( 'a' )
201
  ->where( 'st.id', $staff_id )
204
 
205
  $service_ids = array_filter( explode( ',', self::parameter( 'service_ids' ) ) );
206
 
207
+ if ( ! empty( $service_ids ) && ! in_array( 'all', $service_ids ) ) {
208
  $raw_where = array();
209
  if ( in_array( 'custom', $service_ids ) ) {
210
  $raw_where[] = 'a.service_id IS NULL';
211
  }
212
 
213
  $service_ids = array_filter( $service_ids, 'is_numeric' );
214
+ if ( ! empty( $service_ids ) ) {
215
  $raw_where[] = 'a.service_id IN (' . implode( ',', $service_ids ) . ')';
216
  }
217
 
220
  }
221
  }
222
 
223
+ Proxy\Shared::prepareAppointmentsQueryForCalendar( $query, $staff_id, $start_date, $end_date, $location_ids );
224
 
225
+ return $query;
226
  }
227
  }
backend/modules/calendar/Page.php CHANGED
@@ -11,6 +11,7 @@ use Bookly\Lib\Utils\Price;
11
 
12
  /**
13
  * Class Page
 
14
  * @package Bookly\Backend\Modules\Calendar
15
  */
16
  class Page extends Lib\Base\Ajax
@@ -29,20 +30,18 @@ class Page extends Lib\Base\Ajax
29
  $staff_members = Staff::query()
30
  ->whereNot( 'visibility', 'archive' )
31
  ->sortBy( 'position' )
32
- ->find()
33
- ;
34
  $staff_dropdown_data = Lib\Proxy\Pro::getStaffDataForDropDown();
35
  } else {
36
  $staff_members = Staff::query()
37
  ->where( 'wp_user_id', get_current_user_id() )
38
  ->whereNot( 'visibility', 'archive' )
39
- ->find()
40
- ;
41
  $staff_dropdown_data = array(
42
  0 => array(
43
- 'name' => '',
44
- 'items' => empty ( $staff_members ) ? array() : array( $staff_members[0]->getFields() )
45
- )
46
  );
47
  }
48
  } else {
@@ -50,90 +49,49 @@ class Page extends Lib\Base\Ajax
50
  $staff_members = $staff ? array( $staff ) : array();
51
  $staff_dropdown_data = array(
52
  0 => array(
53
- 'name' => '',
54
- 'items' => empty ( $staff_members ) ? array() : array( $staff_members[0]->getFields() )
55
- )
56
  );
57
  }
58
 
59
- self::enqueueScripts( array(
60
- 'module' => $staff_members
61
- ? array(
62
- 'js/event-calendar.min.js' => array( 'bookly-backend-globals' ),
63
- 'js/calendar-common.js' => array( 'bookly-event-calendar.min.js' ),
64
- 'js/calendar.js' => array( 'bookly-calendar-common.js', 'bookly-dropdown.js' ),
65
- )
66
- : array( 'bookly-backend-globals' ),
67
- ) );
68
-
69
- $slot_length_minutes = get_option( 'bookly_gen_time_slot_length', '15' );
70
- $slot = new \DateInterval( 'PT' . $slot_length_minutes . 'M' );
71
-
72
- $hidden_days = array();
73
- $min_time = '00:00:00';
74
- $max_time = '24:00:00';
75
- $scroll_time = '08:00:00';
76
- // Find min and max business hours
77
- $min = $max = null;
78
- foreach ( Config::getBusinessHours() as $day => $bh ) {
79
- if ( $bh['start'] === null ) {
80
- if ( Config::showOnlyBusinessDaysInCalendar() ) {
81
- $hidden_days[] = $day;
82
- }
83
- continue;
84
- }
85
- if ( $min === null || $bh['start'] < $min ) {
86
- $min = $bh['start'];
87
- }
88
- if ( $max === null || $bh['end'] > $max ) {
89
- $max = $bh['end'];
90
- }
91
- }
92
- if ( $min !== null ) {
93
- $scroll_time = $min;
94
- if ( Config::showOnlyBusinessHoursInCalendar() ) {
95
- $min_time = $min;
96
- $max_time = $max;
97
- } else if ( $max > '24:00:00' ) {
98
- $min_time = DateTime::buildTimeString( DateTime::timeToSeconds( $max ) - DAY_IN_SECONDS );
99
- $max_time = $max;
100
- }
101
- }
102
 
103
- wp_localize_script( 'bookly-calendar.js', 'BooklyL10n', array(
104
- 'hiddenDays' => $hidden_days,
105
- 'slotDuration' => $slot->format( '%H:%I:%S' ),
106
- 'slotMinTime' => $min_time,
107
- 'slotMaxTime' => $max_time,
108
- 'scrollTime' => $scroll_time,
109
- 'locale' => Config::getShortLocale(),
110
- 'mjsTimeFormat' => DateTime::convertFormat( 'time', DateTime::FORMAT_MOMENT_JS ),
111
- 'datePicker' => DateTime::datePickerOptions(),
112
- 'dateRange' => DateTime::dateRangeOptions(),
113
- 'today' => __( 'Today', 'bookly' ),
114
- 'week' => __( 'Week', 'bookly' ),
115
- 'day' => __( 'Day', 'bookly' ),
116
- 'month' => __( 'Month', 'bookly' ),
117
- 'list' => __( 'List', 'bookly' ),
118
- 'noEvents' => __( 'No appointments for selected period.', 'bookly' ),
119
- 'delete' => __( 'Delete', 'bookly' ),
120
- 'are_you_sure' => __( 'Are you sure?', 'bookly' ),
121
- 'filterResourcesWithEvents' => Config::showOnlyStaffWithAppointmentsInCalendarDayView(),
122
- 'recurring_appointments' => array(
123
- 'active' => (int) Config::recurringAppointmentsActive(),
124
- 'title' => __( 'Recurring appointments', 'bookly' ),
125
- ),
126
- 'waiting_list' => array(
127
- 'active' => (int) Config::waitingListActive(),
128
- 'title' => __( 'On waiting list', 'bookly' ),
129
- ),
130
- 'packages' => array(
131
- 'active' => (int) Config::packagesActive(),
132
- 'title' => __( 'Package', 'bookly' ),
133
- ),
134
- 'more' => __( '+%d more', 'bookly')
135
  ) );
136
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
  $refresh_rate = get_user_meta( get_current_user_id(), 'bookly_calendar_refresh_rate', true );
138
  $services_dropdown_data = Common::getServiceDataForDropDown( 's.type = "simple"' );
139
 
@@ -156,47 +114,47 @@ class Page extends Lib\Base\Ajax
156
  $participants = null;
157
  $coloring_mode = get_option( 'bookly_cal_coloring_mode' );
158
  $default_codes = array(
159
- 'amount_due' => '',
160
- 'amount_paid' => '',
161
- 'appointment_date' => '',
162
  'appointment_notes' => '',
163
- 'appointment_time' => '',
164
- 'booking_number' => '',
165
- 'category_name' => '',
166
- 'client_address' => '',
167
- 'client_email' => '',
168
- 'client_name' => '',
169
  'client_first_name' => '',
170
- 'client_last_name' => '',
171
- 'client_phone' => '',
172
- 'client_birthday' => '',
173
- 'client_note' => '',
174
- 'company_address' => get_option( 'bookly_co_address' ),
175
- 'company_name' => get_option( 'bookly_co_name' ),
176
- 'company_phone' => get_option( 'bookly_co_phone' ),
177
- 'company_website' => get_option( 'bookly_co_website' ),
178
- 'custom_fields' => '',
179
- 'extras' => '',
180
- 'extras_total_price'=> 0,
181
- 'internal_note' => '',
182
- 'location_name' => '',
183
- 'location_info' => '',
184
  'number_of_persons' => '',
185
- 'on_waiting_list' => '',
186
- 'payment_status' => '',
187
- 'payment_type' => '',
188
- 'service_capacity' => '',
189
- 'service_duration' => '',
190
- 'service_info' => '',
191
- 'service_name' => '',
192
- 'service_price' => '',
193
- 'signed_up' => '',
194
- 'staff_email' => '',
195
- 'staff_info' => '',
196
- 'staff_name' => '',
197
- 'staff_phone' => '',
198
- 'status' => '',
199
- 'total_price' => '',
200
  );
201
  $query
202
  ->select( 'a.id, ca.series_id, a.staff_any, a.location_id, a.internal_note, a.start_date, DATE_ADD(a.end_date, INTERVAL IF(ca.extras_consider_duration, a.extras_duration, 0) SECOND) AS end_date,
@@ -251,7 +209,7 @@ class Page extends Lib\Base\Ajax
251
  if ( ! isset ( $appointments[ $appointment['id'] ] ) ) {
252
  if ( $convert_tz ) {
253
  $appointment['start_date'] = DateTime::convertTimeZone( $appointment['start_date'], $wp_tz, $display_tz );
254
- $appointment['end_date'] = DateTime::convertTimeZone( $appointment['end_date'], $wp_tz, $display_tz );
255
  }
256
  $appointments[ $appointment['id'] ] = $appointment;
257
  }
@@ -272,9 +230,9 @@ class Page extends Lib\Base\Ajax
272
  }
273
 
274
  $status_codes = array(
275
- CustomerAppointment::STATUS_APPROVED => 'success',
276
  CustomerAppointment::STATUS_CANCELLED => 'danger',
277
- CustomerAppointment::STATUS_REJECTED => 'danger',
278
  );
279
  $cancelled_statuses = array(
280
  CustomerAppointment::STATUS_CANCELLED,
@@ -299,13 +257,13 @@ class Page extends Lib\Base\Ajax
299
  $codes = $default_codes;
300
  $codes['appointment_date'] = DateTime::formatDate( $appointment['start_date'] );
301
  $codes['appointment_time'] = $appointment['duration'] >= DAY_IN_SECONDS && $appointment['start_time_info'] ? $appointment['start_time_info'] : Lib\Utils\DateTime::formatTime( $appointment['start_date'] );
302
- $codes['booking_number'] = $appointment['id'];
303
- $codes['internal_note'] = esc_html( $appointment['internal_note'] );
304
- $codes['on_waiting_list'] = $appointment['on_waiting_list'];
305
- $codes['service_name'] = $appointment['service_name'] ? esc_html( $appointment['service_name'] ) : __( 'Untitled', 'bookly' );
306
- $codes['service_price'] = Price::format( $appointment['service_price'] * $appointment['units'] );
307
  $codes['service_duration'] = DateTime::secondsToInterval( $appointment['duration'] * $appointment['units'] );
308
- $codes['signed_up'] = $appointment['total_number_of_persons'];
309
  foreach ( array( 'staff_name', 'staff_phone', 'staff_info', 'staff_email', 'service_info', 'service_capacity', 'category_name' ) as $field ) {
310
  $codes[ $field ] = esc_html( $appointment[ $field ] );
311
  }
@@ -350,7 +308,7 @@ class Page extends Lib\Base\Ajax
350
  // Display customer information only if there is 1 customer. Don't confuse with number_of_persons.
351
  if ( $appointment['number_of_persons'] == $appointment['total_number_of_persons'] ) {
352
  $participants = 'one';
353
- $template = $one_participant;
354
  foreach ( array( 'client_name', 'client_first_name', 'client_last_name', 'client_phone', 'client_email', 'client_birthday' ) as $data_entry ) {
355
  $codes[ $data_entry ] = esc_html( $appointment['customers'][0][ $data_entry ] );
356
  }
@@ -358,18 +316,18 @@ class Page extends Lib\Base\Ajax
358
  $codes['appointment_notes'] = $appointment['appointment_notes'];
359
  // Payment.
360
  if ( $appointment['total'] ) {
361
- $codes['total_price'] = Price::format( $appointment['total'] );
362
- $codes['amount_paid'] = Price::format( $appointment['paid'] );
363
- $codes['amount_due'] = Price::format( $appointment['total'] - $appointment['paid'] );
364
- $codes['total_price'] = Price::format( $appointment['total'] );
365
- $codes['payment_type'] = Lib\Entities\Payment::typeToString( $appointment['payment_gateway'] );
366
  $codes['payment_status'] = Lib\Entities\Payment::statusToString( $appointment['payment_status'] );
367
  }
368
  // Status.
369
  $codes['status'] = CustomerAppointment::statusToString( $appointment['status'] );
370
  } else {
371
  $participants = 'many';
372
- $template = $many_participants;
373
  }
374
  $tooltip = '<i class="fas fa-fw fa-circle mr-1" style="color:%s"></i><span>{service_name}</span>' . $popover_customers . '<span class="d-block text-muted">{appointment_time} - %s</span>';
375
 
@@ -393,20 +351,20 @@ class Page extends Lib\Base\Ajax
393
  }
394
 
395
  $appointments[ $key ] = array(
396
- 'id' => $appointment['id'],
397
- 'start' => $appointment['start_date'],
398
- 'end' => $appointment['end_date'],
399
- 'title' => ' ',
400
- 'color' => $color,
401
- 'resourceId' => $staff_id,
402
  'extendedProps' => array(
403
- 'tooltip' => Lib\Utils\Codes::replace( $tooltip, $codes, false ),
404
- 'desc' => Lib\Utils\Codes::replace( $template, $codes, false ),
405
- 'staffId' => $staff_id,
406
- 'series_id' => (int) $appointment['series_id'],
407
- 'package_id' => (int) $appointment['package_id'],
408
- 'waitlisted' => (int) $appointment['on_waiting_list'],
409
- 'staff_any' => (int) $appointment['staff_any'],
410
  'overall_status' => $overall_status,
411
  ),
412
  );
11
 
12
  /**
13
  * Class Page
14
+ *
15
  * @package Bookly\Backend\Modules\Calendar
16
  */
17
  class Page extends Lib\Base\Ajax
30
  $staff_members = Staff::query()
31
  ->whereNot( 'visibility', 'archive' )
32
  ->sortBy( 'position' )
33
+ ->find();
 
34
  $staff_dropdown_data = Lib\Proxy\Pro::getStaffDataForDropDown();
35
  } else {
36
  $staff_members = Staff::query()
37
  ->where( 'wp_user_id', get_current_user_id() )
38
  ->whereNot( 'visibility', 'archive' )
39
+ ->find();
 
40
  $staff_dropdown_data = array(
41
  0 => array(
42
+ 'name' => '',
43
+ 'items' => empty ( $staff_members ) ? array() : array( $staff_members[0]->getFields() ),
44
+ ),
45
  );
46
  }
47
  } else {
49
  $staff_members = $staff ? array( $staff ) : array();
50
  $staff_dropdown_data = array(
51
  0 => array(
52
+ 'name' => '',
53
+ 'items' => empty ( $staff_members ) ? array() : array( $staff_members[0]->getFields() ),
54
+ ),
55
  );
56
  }
57
 
58
+ self::enqueueScripts(
59
+ $staff_members ?
60
+ array(
61
+ 'module' => array(
62
+ 'js/event-calendar.min.js' => array( 'bookly-backend-globals' ),
63
+ 'js/calendar-common.js' => array( 'bookly-event-calendar.min.js' ),
64
+ 'js/calendar.js' => array( 'bookly-calendar-common.js', 'bookly-dropdown.js' ),
65
+ ),
66
+ ) :
67
+ array(
68
+ 'alias' => array( 'bookly-backend-globals', ),
69
+ ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
 
71
+ self::enqueueStyles( array(
72
+ 'alias' => array( 'bookly-backend-globals', ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  ) );
74
 
75
+ wp_localize_script( 'bookly-calendar.js', 'BooklyL10n', array_merge(
76
+ Lib\Utils\Common::getCalendarSettings(),
77
+ array(
78
+ 'delete' => __( 'Delete', 'bookly' ),
79
+ 'are_you_sure' => __( 'Are you sure?', 'bookly' ),
80
+ 'filterResourcesWithEvents' => Config::showOnlyStaffWithAppointmentsInCalendarDayView(),
81
+ 'recurring_appointments' => array(
82
+ 'active' => (int) Config::recurringAppointmentsActive(),
83
+ 'title' => __( 'Recurring appointments', 'bookly' ),
84
+ ),
85
+ 'waiting_list' => array(
86
+ 'active' => (int) Config::waitingListActive(),
87
+ 'title' => __( 'On waiting list', 'bookly' ),
88
+ ),
89
+ 'packages' => array(
90
+ 'active' => (int) Config::packagesActive(),
91
+ 'title' => __( 'Package', 'bookly' ),
92
+ ),
93
+ ) ) );
94
+
95
  $refresh_rate = get_user_meta( get_current_user_id(), 'bookly_calendar_refresh_rate', true );
96
  $services_dropdown_data = Common::getServiceDataForDropDown( 's.type = "simple"' );
97
 
114
  $participants = null;
115
  $coloring_mode = get_option( 'bookly_cal_coloring_mode' );
116
  $default_codes = array(
117
+ 'amount_due' => '',
118
+ 'amount_paid' => '',
119
+ 'appointment_date' => '',
120
  'appointment_notes' => '',
121
+ 'appointment_time' => '',
122
+ 'booking_number' => '',
123
+ 'category_name' => '',
124
+ 'client_address' => '',
125
+ 'client_email' => '',
126
+ 'client_name' => '',
127
  'client_first_name' => '',
128
+ 'client_last_name' => '',
129
+ 'client_phone' => '',
130
+ 'client_birthday' => '',
131
+ 'client_note' => '',
132
+ 'company_address' => get_option( 'bookly_co_address' ),
133
+ 'company_name' => get_option( 'bookly_co_name' ),
134
+ 'company_phone' => get_option( 'bookly_co_phone' ),
135
+ 'company_website' => get_option( 'bookly_co_website' ),
136
+ 'custom_fields' => '',
137
+ 'extras' => '',
138
+ 'extras_total_price' => 0,
139
+ 'internal_note' => '',
140
+ 'location_name' => '',
141
+ 'location_info' => '',
142
  'number_of_persons' => '',
143
+ 'on_waiting_list' => '',
144
+ 'payment_status' => '',
145
+ 'payment_type' => '',
146
+ 'service_capacity' => '',
147
+ 'service_duration' => '',
148
+ 'service_info' => '',
149
+ 'service_name' => '',
150
+ 'service_price' => '',
151
+ 'signed_up' => '',
152
+ 'staff_email' => '',
153
+ 'staff_info' => '',
154
+ 'staff_name' => '',
155
+ 'staff_phone' => '',
156
+ 'status' => '',
157
+ 'total_price' => '',
158
  );
159
  $query
160
  ->select( 'a.id, ca.series_id, a.staff_any, a.location_id, a.internal_note, a.start_date, DATE_ADD(a.end_date, INTERVAL IF(ca.extras_consider_duration, a.extras_duration, 0) SECOND) AS end_date,
209
  if ( ! isset ( $appointments[ $appointment['id'] ] ) ) {
210
  if ( $convert_tz ) {
211
  $appointment['start_date'] = DateTime::convertTimeZone( $appointment['start_date'], $wp_tz, $display_tz );
212
+ $appointment['end_date'] = DateTime::convertTimeZone( $appointment['end_date'], $wp_tz, $display_tz );
213
  }
214
  $appointments[ $appointment['id'] ] = $appointment;
215
  }
230
  }
231
 
232
  $status_codes = array(
233
+ CustomerAppointment::STATUS_APPROVED => 'success',
234
  CustomerAppointment::STATUS_CANCELLED => 'danger',
235
+ CustomerAppointment::STATUS_REJECTED => 'danger',
236
  );
237
  $cancelled_statuses = array(
238
  CustomerAppointment::STATUS_CANCELLED,
257
  $codes = $default_codes;
258
  $codes['appointment_date'] = DateTime::formatDate( $appointment['start_date'] );
259
  $codes['appointment_time'] = $appointment['duration'] >= DAY_IN_SECONDS && $appointment['start_time_info'] ? $appointment['start_time_info'] : Lib\Utils\DateTime::formatTime( $appointment['start_date'] );
260
+ $codes['booking_number'] = $appointment['id'];
261
+ $codes['internal_note'] = esc_html( $appointment['internal_note'] );
262
+ $codes['on_waiting_list'] = $appointment['on_waiting_list'];
263
+ $codes['service_name'] = $appointment['service_name'] ? esc_html( $appointment['service_name'] ) : __( 'Untitled', 'bookly' );
264
+ $codes['service_price'] = Price::format( $appointment['service_price'] * $appointment['units'] );
265
  $codes['service_duration'] = DateTime::secondsToInterval( $appointment['duration'] * $appointment['units'] );
266
+ $codes['signed_up'] = $appointment['total_number_of_persons'];
267
  foreach ( array( 'staff_name', 'staff_phone', 'staff_info', 'staff_email', 'service_info', 'service_capacity', 'category_name' ) as $field ) {
268
  $codes[ $field ] = esc_html( $appointment[ $field ] );
269
  }
308
  // Display customer information only if there is 1 customer. Don't confuse with number_of_persons.
309
  if ( $appointment['number_of_persons'] == $appointment['total_number_of_persons'] ) {
310
  $participants = 'one';
311
+ $template = $one_participant;
312
  foreach ( array( 'client_name', 'client_first_name', 'client_last_name', 'client_phone', 'client_email', 'client_birthday' ) as $data_entry ) {
313
  $codes[ $data_entry ] = esc_html( $appointment['customers'][0][ $data_entry ] );
314
  }
316
  $codes['appointment_notes'] = $appointment['appointment_notes'];
317
  // Payment.
318
  if ( $appointment['total'] ) {
319
+ $codes['total_price'] = Price::format( $appointment['total'] );
320
+ $codes['amount_paid'] = Price::format( $appointment['paid'] );
321
+ $codes['amount_due'] = Price::format( $appointment['total'] - $appointment['paid'] );
322
+ $codes['total_price'] = Price::format( $appointment['total'] );
323
+ $codes['payment_type'] = Lib\Entities\Payment::typeToString( $appointment['payment_gateway'] );
324
  $codes['payment_status'] = Lib\Entities\Payment::statusToString( $appointment['payment_status'] );
325
  }
326
  // Status.
327
  $codes['status'] = CustomerAppointment::statusToString( $appointment['status'] );
328
  } else {
329
  $participants = 'many';
330
+ $template = $many_participants;
331
  }
332
  $tooltip = '<i class="fas fa-fw fa-circle mr-1" style="color:%s"></i><span>{service_name}</span>' . $popover_customers . '<span class="d-block text-muted">{appointment_time} - %s</span>';
333
 
351
  }
352
 
353
  $appointments[ $key ] = array(
354
+ 'id' => $appointment['id'],
355
+ 'start' => $appointment['start_date'],
356
+ 'end' => $appointment['end_date'],
357
+ 'title' => ' ',
358
+ 'color' => $color,
359
+ 'resourceId' => $staff_id,
360
  'extendedProps' => array(
361
+ 'tooltip' => Lib\Utils\Codes::replace( $tooltip, $codes, false ),
362
+ 'desc' => Lib\Utils\Codes::replace( $template, $codes, false ),
363
+ 'staffId' => $staff_id,
364
+ 'series_id' => (int) $appointment['series_id'],
365
+ 'package_id' => (int) $appointment['package_id'],
366
+ 'waitlisted' => (int) $appointment['on_waiting_list'],
367
+ 'staff_any' => (int) $appointment['staff_any'],
368
  'overall_status' => $overall_status,
369
  ),
370
  );
backend/modules/calendar/proxy/Shared.php CHANGED
@@ -8,7 +8,7 @@ use Bookly\Lib;
8
  * @package Bookly\Backend\Modules\Calendar\Proxy
9
  *
10
  * @method static array prepareAppointmentCodesData( array $codes, array $appointment_data, string $participants ) Prepare codes data for appointment description displayed in calendar.
11
- * @method static void prepareAppointmentsQueryForCalendar( Lib\Query $query, int $staff_id, \DateTime $start_date, \DateTime $end_date ) Prepare appointments query for full calendar
12
  * @method static void renderAddOnsComponents() Render components on calendar page.
13
  */
14
  abstract class Shared extends Lib\Base\Proxy
8
  * @package Bookly\Backend\Modules\Calendar\Proxy
9
  *
10
  * @method static array prepareAppointmentCodesData( array $codes, array $appointment_data, string $participants ) Prepare codes data for appointment description displayed in calendar.
11
+ * @method static void prepareAppointmentsQueryForCalendar( Lib\Query $query, int $staff_id, \DateTime $start_date, \DateTime $end_date, array $location_ids ) Prepare appointments query for full calendar
12
  * @method static void renderAddOnsComponents() Render components on calendar page.
13
  */
14
  abstract class Shared extends Lib\Base\Proxy
backend/modules/calendar/resources/js/calendar-common.js CHANGED
@@ -87,12 +87,7 @@
87
  eventBackgroundColor: '#ccc',
88
  eventMouseEnter: function(arg) {
89
  if (arg.event.display === 'auto' && arg.view.type !== 'listWeek') {
90
- let $event = $(arg.el)
91
- let $popover = $event.find('.bookly-ec-popover');
92
- let offset = $event.offset();
93
- let top = Math.max($popover.outerHeight() + 40, Math.max($event.closest('.ec-body').offset().top, offset.top) - $(document).scrollTop());
94
- $popover.css('top', (top - $popover.outerHeight() - 4) + 'px')
95
- $popover.css('left', (offset.left + 2) + 'px')
96
  }
97
  },
98
  eventContent: function (arg) {
@@ -183,12 +178,18 @@
183
 
184
  if (arg.view.type !== 'listWeek') {
185
  $buttons.addClass('border-top pt-2 justify-content-end');
186
- let $popover = $('<div class="bookly-popover bs-popover-top bookly-ec-popover">')
187
  let $arrow = $('<div class="arrow" style="left:8px;">');
188
  let $body = $('<div class="popover-body">');
189
  $body.append(props.tooltip).append($buttons).css({minWidth: '200px'});
190
  $popover.append($arrow).append($body);
191
  nodes.push($popover.get(0));
 
 
 
 
 
 
192
  } else {
193
  $title.append($buttons);
194
  }
@@ -276,6 +277,15 @@
276
  }
277
  };
278
 
 
 
 
 
 
 
 
 
 
279
  function addAppointmentDialog(date, staffId, visibleStaffId) {
280
  BooklyAppointmentDialog.showDialog(
281
  null,
87
  eventBackgroundColor: '#ccc',
88
  eventMouseEnter: function(arg) {
89
  if (arg.event.display === 'auto' && arg.view.type !== 'listWeek') {
90
+ fixPopoverPosition($(arg.el).find('.bookly-ec-popover'));
 
 
 
 
 
91
  }
92
  },
93
  eventContent: function (arg) {
178
 
179
  if (arg.view.type !== 'listWeek') {
180
  $buttons.addClass('border-top pt-2 justify-content-end');
181
+ let $popover = $('<div class="bookly-popover bs-popover-top bookly-ec-popover">')
182
  let $arrow = $('<div class="arrow" style="left:8px;">');
183
  let $body = $('<div class="popover-body">');
184
  $body.append(props.tooltip).append($buttons).css({minWidth: '200px'});
185
  $popover.append($arrow).append($body);
186
  nodes.push($popover.get(0));
187
+ $time.on('touchstart', function () {
188
+ fixPopoverPosition($popover);
189
+ });
190
+ $title.on('touchstart', function () {
191
+ fixPopoverPosition($popover);
192
+ });
193
  } else {
194
  $title.append($buttons);
195
  }
277
  }
278
  };
279
 
280
+ function fixPopoverPosition($popover) {
281
+ let $event = $popover.closest('.ec-event'),
282
+ offset = $event.offset(),
283
+ top = Math.max($popover.outerHeight() + 40, Math.max($event.closest('.ec-body').offset().top, offset.top) - $(document).scrollTop());
284
+
285
+ $popover.css('top', (top - $popover.outerHeight() - 4) + 'px')
286
+ $popover.css('left', (offset.left + 2) + 'px')
287
+ }
288
+
289
  function addAppointmentDialog(date, staffId, visibleStaffId) {
290
  BooklyAppointmentDialog.showDialog(
291
  null,
backend/modules/calendar/resources/js/calendar.js CHANGED
@@ -152,14 +152,17 @@ jQuery(function ($) {
152
  /**
153
  * Init locations filter.
154
  */
155
- $locationsFilter.booklyDropdown({
156
- onChange: function (values, selected, all) {
157
- locationIds = this.booklyDropdown('getSelected');
158
- setCookie('bookly_cal_location_ids', locationIds);
159
- calendar.ec.refetchEvents();
 
160
  }
 
 
161
  });
162
- if (locationIds === null) {
163
  $locationsFilter.booklyDropdown('selectAll');
164
  } else if (locationIds !== '') {
165
  $locationsFilter.booklyDropdown('setSelected', locationIds.split(','));
152
  /**
153
  * Init locations filter.
154
  */
155
+ $locationsFilter.booklyDropdown();
156
+ $locationsFilter.on('changed', function () {
157
+ if ($locationsFilter.booklyDropdown('getSelectedAllState')) {
158
+ locationIds = 'all';
159
+ } else {
160
+ locationIds = $locationsFilter.booklyDropdown('getSelected');
161
  }
162
+ setCookie('bookly_cal_location_ids', locationIds);
163
+ calendar.ec.refetchEvents();
164
  });
165
+ if (locationIds === null || locationIds === 'all') {
166
  $locationsFilter.booklyDropdown('selectAll');
167
  } else if (locationIds !== '') {
168
  $locationsFilter.booklyDropdown('setSelected', locationIds.split(','));
backend/modules/cloud_billing/resources/js/cloud-billing.js CHANGED
@@ -52,7 +52,7 @@ jQuery(function ($) {
52
  }
53
  });
54
  } else {
55
- columns.push({data: column});
56
  }
57
  }
58
  });
52
  }
53
  });
54
  } else {
55
+ columns.push({data: column, render: $.fn.dataTable.render.text()});
56
  }
57
  }
58
  });
backend/modules/cloud_sms/Page.php CHANGED
@@ -28,8 +28,7 @@ class Page extends Lib\Base\Component
28
  'backend' => array( 'js/select2.min.js' => array( 'bookly-backend-globals' ), ),
29
  'frontend' => get_option( 'bookly_cst_phone_default_country' ) == 'disabled'
30
  ? array()
31
- : array( 'js/intlTelInput.min.js' => array( 'jquery' ) )
32
- ,
33
  'module' => array(
34
  'js/notifications-list.js' => array( 'bookly-notification-dialog.js', ),
35
  'js/sms.js' => array( 'bookly-notifications-list.js', ),
@@ -51,30 +50,30 @@ class Page extends Lib\Base\Component
51
 
52
  wp_localize_script( 'bookly-sms.js', 'BooklyL10n',
53
  array(
54
- 'csrfToken' => Lib\Utils\Common::getCsrfToken(),
55
- 'areYouSure' => __( 'Are you sure?', 'bookly' ),
56
- 'country' => $cloud->account->getCountry(),
57
- 'current_tab' => $current_tab,
58
- 'intlTelInput' => array(
59
  'country' => get_option( 'bookly_cst_phone_default_country' ),
60
- 'utils' => plugins_url( 'intlTelInput.utils.js', Lib\Plugin::getDirectory() . '/frontend/resources/js/intlTelInput.utils.js' ),
61
  'enabled' => get_option( 'bookly_cst_phone_default_country' ) != 'disabled',
62
  ),
63
- 'datePicker' => Lib\Utils\DateTime::datePickerOptions(),
64
- 'dateRange' => Lib\Utils\DateTime::dateRangeOptions( array( 'lastMonth' => __( 'Last month', 'bookly' ), ) ),
65
- 'sender_id' => array(
66
- 'sent' => __( 'Sender ID request is sent.', 'bookly' ),
67
  'set_default' => __( 'Sender ID is reset to default.', 'bookly' ),
68
  ),
69
- 'zeroRecords' => __( 'No records for selected period.', 'bookly' ),
70
- 'noResults' => __( 'No records.', 'bookly' ),
71
- 'processing' => __( 'Processing...', 'bookly' ),
72
- 'state' => array( __( 'Disabled', 'bookly' ), __( 'Enabled', 'bookly' ) ),
73
- 'action' => array( __( 'enable', 'bookly' ), __( 'disable', 'bookly' ) ),
74
- 'edit' => __( 'Edit', 'bookly' ),
75
  'settingsSaved' => __( 'Settings saved.', 'bookly' ),
76
- 'gateway' => 'sms',
77
- 'datatables' => $datatables
 
78
  )
79
  );
80
 
28
  'backend' => array( 'js/select2.min.js' => array( 'bookly-backend-globals' ), ),
29
  'frontend' => get_option( 'bookly_cst_phone_default_country' ) == 'disabled'
30
  ? array()
31
+ : array( 'js/intlTelInput.min.js' => array( 'jquery' ) ),
 
32
  'module' => array(
33
  'js/notifications-list.js' => array( 'bookly-notification-dialog.js', ),
34
  'js/sms.js' => array( 'bookly-notifications-list.js', ),
50
 
51
  wp_localize_script( 'bookly-sms.js', 'BooklyL10n',
52
  array(
53
+ 'areYouSure' => __( 'Are you sure?', 'bookly' ),
54
+ 'country' => $cloud->account->getCountry(),
55
+ 'current_tab' => $current_tab,
56
+ 'intlTelInput' => array(
 
57
  'country' => get_option( 'bookly_cst_phone_default_country' ),
58
+ 'utils' => plugins_url( 'intlTelInput.utils.js', Lib\Plugin::getDirectory() . '/frontend/resources/js/intlTelInput.utils.js' ),
59
  'enabled' => get_option( 'bookly_cst_phone_default_country' ) != 'disabled',
60
  ),
61
+ 'datePicker' => Lib\Utils\DateTime::datePickerOptions(),
62
+ 'dateRange' => Lib\Utils\DateTime::dateRangeOptions( array( 'lastMonth' => __( 'Last month', 'bookly' ), ) ),
63
+ 'sender_id' => array(
64
+ 'sent' => __( 'Sender ID request is sent.', 'bookly' ),
65
  'set_default' => __( 'Sender ID is reset to default.', 'bookly' ),
66
  ),
67
+ 'zeroRecords' => __( 'No records for selected period.', 'bookly' ),
68
+ 'noResults' => __( 'No records.', 'bookly' ),
69
+ 'processing' => __( 'Processing...', 'bookly' ),
70
+ 'state' => array( __( 'Disabled', 'bookly' ), __( 'Enabled', 'bookly' ) ),
71
+ 'action' => array( __( 'enable', 'bookly' ), __( 'disable', 'bookly' ) ),
72
+ 'edit' => __( 'Edit', 'bookly' ),
73
  'settingsSaved' => __( 'Settings saved.', 'bookly' ),
74
+ 'na' => __( 'N/A', 'bookly' ),
75
+ 'gateway' => 'sms',
76
+ 'datatables' => $datatables,
77
  )
78
  );
79
 
backend/modules/cloud_sms/resources/js/sms.js CHANGED
@@ -35,8 +35,9 @@ jQuery(function ($) {
35
  url: ajaxurl,
36
  data: {
37
  action: 'bookly_send_test_sms',
38
- csrf_token : BooklyL10n.csrfToken,
39
- phone_number: getPhoneNumber() },
 
40
  dataType: 'json',
41
  success: function (response) {
42
  if (response.success) {
@@ -57,7 +58,7 @@ jQuery(function ($) {
57
  data: {
58
  action: 'bookly_save_administrator_phone',
59
  bookly_sms_administrator_phone: getPhoneNumber(),
60
- csrf_token: BooklyL10n.csrfToken
61
  },
62
  success: function (response) {
63
  if (response.success) {
@@ -123,32 +124,32 @@ jQuery(function ($) {
123
 
124
  $.each(BooklyL10n.datatables.sms_details.settings.columns, function (column, show) {
125
  if (show) {
126
- columns.push({data: column});
127
  }
128
  });
129
  if (columns.length) {
130
- var dt = $('#bookly-sms').DataTable({
131
- ordering : false,
132
- paging : false,
133
- info : false,
134
- searching : false,
135
  processing: true,
136
  responsive: true,
137
- ajax : {
138
- url : ajaxurl,
139
- data : function (d) {
140
  return {
141
- action : 'bookly_get_sms_list',
142
- csrf_token: BooklyL10n.csrfToken,
143
- range : $date_range.data('date')
144
  };
145
  },
146
  dataSrc: 'list'
147
  },
148
- columns : columns,
149
- language : {
150
  zeroRecords: BooklyL10n.zeroRecords,
151
- processing : BooklyL10n.processing
152
  }
153
  });
154
  }
@@ -189,7 +190,7 @@ jQuery(function ($) {
189
  className: "text-right",
190
  render: function ( data, type, row, meta ) {
191
  if (row.price_alt === '') {
192
- return '-';
193
  } else {
194
  return '$' + data.replace(/0+$/, '');
195
  }
@@ -197,7 +198,7 @@ jQuery(function ($) {
197
  });
198
  break;
199
  default:
200
- columns.push({data: column});
201
  break;
202
  }
203
  }
@@ -212,7 +213,7 @@ jQuery(function ($) {
212
  responsive: true,
213
  ajax: {
214
  url: ajaxurl,
215
- data: {action: 'bookly_get_price_list', csrf_token: BooklyL10n.csrfToken},
216
  dataSrc: 'list'
217
  },
218
  columns: columns,
@@ -239,20 +240,20 @@ jQuery(function ($) {
239
 
240
  $.each(BooklyL10n.datatables.sms_sender.settings.columns, function (column, show) {
241
  if (show) {
242
- columns.push({data: column});
243
  }
244
  });
245
  if (columns.length) {
246
  var dt = $('#bookly-sender-ids').DataTable({
247
- ordering : false,
248
- paging : false,
249
- info : false,
250
- searching : false,
251
  processing: true,
252
  responsive: true,
253
- ajax : {
254
- url : ajaxurl,
255
- data : {action: 'bookly_get_sender_ids_list', csrf_token: BooklyL10n.csrfToken},
256
  dataSrc: function (json) {
257
  if (json.pending) {
258
  $sender_id.val(json.pending);
@@ -264,21 +265,21 @@ jQuery(function ($) {
264
  return json.list;
265
  }
266
  },
267
- columns : columns,
268
- language : {
269
  zeroRecords: BooklyL10n.zeroRecords2,
270
- processing : BooklyL10n.processing
271
  }
272
  });
273
  }
274
 
275
  $request_sender_id.on('click', function () {
276
- var ladda = Ladda.create(this);
277
  ladda.start();
278
  $.ajax({
279
- url : ajaxurl,
280
- data : {action: 'bookly_request_sender_id', csrf_token : BooklyL10n.csrfToken, 'sender_id': $sender_id.val()},
281
- dataType : 'json',
282
  success: function (response) {
283
  if (response.success) {
284
  booklyAlert({success: [BooklyL10n.sender_id.sent]});
@@ -300,7 +301,7 @@ jQuery(function ($) {
300
  if (confirm(BooklyL10n.areYouSure)) {
301
  $.ajax({
302
  url: ajaxurl,
303
- data: {action: 'bookly_reset_sender_id', csrf_token : BooklyL10n.csrfToken},
304
  dataType: 'json',
305
  success: function (response) {
306
  if (response.success) {
@@ -326,7 +327,7 @@ jQuery(function ($) {
326
  $.ajax({
327
  method: 'POST',
328
  url: ajaxurl,
329
- data: {action: 'bookly_cancel_sender_id', csrf_token : BooklyL10n.csrfToken},
330
  dataType: 'json',
331
  success: function (response) {
332
  if (response.success) {
35
  url: ajaxurl,
36
  data: {
37
  action: 'bookly_send_test_sms',
38
+ csrf_token: BooklyL10nGlobal.csrf_token,
39
+ phone_number: getPhoneNumber()
40
+ },
41
  dataType: 'json',
42
  success: function (response) {
43
  if (response.success) {
58
  data: {
59
  action: 'bookly_save_administrator_phone',
60
  bookly_sms_administrator_phone: getPhoneNumber(),
61
+ csrf_token: BooklyL10nGlobal.csrf_token
62
  },
63
  success: function (response) {
64
  if (response.success) {
124
 
125
  $.each(BooklyL10n.datatables.sms_details.settings.columns, function (column, show) {
126
  if (show) {
127
+ columns.push({data: column, render: $.fn.dataTable.render.text()});
128
  }
129
  });
130
  if (columns.length) {
131
+ let dt = $('#bookly-sms').DataTable({
132
+ ordering: false,
133
+ paging: false,
134
+ info: false,
135
+ searching: false,
136
  processing: true,
137
  responsive: true,
138
+ ajax: {
139
+ url: ajaxurl,
140
+ data: function (d) {
141
  return {
142
+ action: 'bookly_get_sms_list',
143
+ csrf_token: BooklyL10nGlobal.csrf_token,
144
+ range: $date_range.data('date')
145
  };
146
  },
147
  dataSrc: 'list'
148
  },
149
+ columns: columns,
150
+ language: {
151
  zeroRecords: BooklyL10n.zeroRecords,
152
+ processing: BooklyL10n.processing
153
  }
154
  });
155
  }
190
  className: "text-right",
191
  render: function ( data, type, row, meta ) {
192
  if (row.price_alt === '') {
193
+ return BooklyL10n.na;
194
  } else {
195
  return '$' + data.replace(/0+$/, '');
196
  }
198
  });
199
  break;
200
  default:
201
+ columns.push({data: column, render: $.fn.dataTable.render.text()});
202
  break;
203
  }
204
  }
213
  responsive: true,
214
  ajax: {
215
  url: ajaxurl,
216
+ data: {action: 'bookly_get_price_list', csrf_token: BooklyL10nGlobal.csrf_token},
217
  dataSrc: 'list'
218
  },
219
  columns: columns,
240
 
241
  $.each(BooklyL10n.datatables.sms_sender.settings.columns, function (column, show) {
242
  if (show) {
243
+ columns.push({data: column, render: $.fn.dataTable.render.text()});
244
  }
245
  });
246
  if (columns.length) {
247
  var dt = $('#bookly-sender-ids').DataTable({
248
+ ordering: false,
249
+ paging: false,
250
+ info: false,
251
+ searching: false,
252
  processing: true,
253
  responsive: true,
254
+ ajax: {
255
+ url: ajaxurl,
256
+ data: {action: 'bookly_get_sender_ids_list', csrf_token: BooklyL10nGlobal.csrf_token},
257
  dataSrc: function (json) {
258
  if (json.pending) {
259
  $sender_id.val(json.pending);
265
  return json.list;
266
  }
267
  },
268
+ columns: columns,
269
+ language: {
270
  zeroRecords: BooklyL10n.zeroRecords2,
271
+ processing: BooklyL10n.processing
272
  }
273
  });
274
  }
275
 
276
  $request_sender_id.on('click', function () {
277
+ let ladda = Ladda.create(this);
278
  ladda.start();
279
  $.ajax({
280
+ url: ajaxurl,
281
+ data: {action: 'bookly_request_sender_id', csrf_token: BooklyL10nGlobal.csrf_token, 'sender_id': $sender_id.val()},
282
+ dataType: 'json',
283
  success: function (response) {
284
  if (response.success) {
285
  booklyAlert({success: [BooklyL10n.sender_id.sent]});
301
  if (confirm(BooklyL10n.areYouSure)) {
302
  $.ajax({
303
  url: ajaxurl,
304
+ data: {action: 'bookly_reset_sender_id', csrf_token : BooklyL10nGlobal.csrf_token},
305
  dataType: 'json',
306
  success: function (response) {
307
  if (response.success) {
327
  $.ajax({
328
  method: 'POST',
329
  url: ajaxurl,
330
+ data: {action: 'bookly_cancel_sender_id', csrf_token : BooklyL10nGlobal.csrf_token},
331
  dataType: 'json',
332
  success: function (response) {
333
  if (response.success) {
backend/modules/debug/Ajax.php CHANGED
@@ -511,7 +511,12 @@ class Ajax extends Lib\Base\Ajax
511
  'bookly_staff.zoom_jwt_api_key' => 'varchar(255) null default null',
512
  'bookly_staff.zoom_jwt_api_secret' => 'varchar(255) null default null',
513
  'bookly_staff.zoom_oauth_token' => 'text null default null',
 
 
 
 
514
  'bookly_staff.color' => "varchar(255) not null default '#dddddd'",
 
515
  'bookly_staff_categories.id' => 'int unsigned not null auto_increment primary key',
516
  'bookly_staff_categories.name' => 'varchar(255) not null',
517
  'bookly_staff_categories.position' => "int not null default '9999'",
@@ -551,6 +556,7 @@ class Ajax extends Lib\Base\Ajax
551
  'bookly_staff_special_hours.location_id' => 'int unsigned null default null',
552
  'bookly_staff_special_hours.start_time' => 'time null default null',
553
  'bookly_staff_special_hours.end_time' => 'time null default null',
 
554
  'bookly_staff_special_hours.price' => "decimal(10,2) not null default '0.00'",
555
  'bookly_stats.id' => 'int unsigned not null auto_increment primary key',
556
  'bookly_stats.name' => 'varchar(255) not null',
511
  'bookly_staff.zoom_jwt_api_key' => 'varchar(255) null default null',
512
  'bookly_staff.zoom_jwt_api_secret' => 'varchar(255) null default null',
513
  'bookly_staff.zoom_oauth_token' => 'text null default null',
514
+ 'bookly_staff.icalendar' => "tinyint(1) not null default '0'",
515
+ 'bookly_staff.icalendar_token' => 'text null default null',
516
+ 'bookly_staff.icalendar_days_before' => "int not null default '365'",
517
+ 'bookly_staff.icalendar_days_after' => "int not null default '365'",
518
  'bookly_staff.color' => "varchar(255) not null default '#dddddd'",
519
+ 'bookly_staff.gateways' => 'varchar(255) null default null',
520
  'bookly_staff_categories.id' => 'int unsigned not null auto_increment primary key',
521
  'bookly_staff_categories.name' => 'varchar(255) not null',
522
  'bookly_staff_categories.position' => "int not null default '9999'",
556
  'bookly_staff_special_hours.location_id' => 'int unsigned null default null',
557
  'bookly_staff_special_hours.start_time' => 'time null default null',
558
  'bookly_staff_special_hours.end_time' => 'time null default null',
559
+ 'bookly_staff_special_hours.days' => "varchar(255) not null default '1,2,3,4,5,6,7'",
560
  'bookly_staff_special_hours.price' => "decimal(10,2) not null default '0.00'",
561
  'bookly_stats.id' => 'int unsigned not null auto_increment primary key',
562
  'bookly_stats.name' => 'varchar(255) not null',
backend/modules/debug/lib/QueryBuilder.php CHANGED
@@ -470,7 +470,12 @@ class QueryBuilder
470
  'bookly_staff.zoom_jwt_api_key' => array( 'type' => 'varchar(255)', 'is_nullabe' => 1, 'extra' => '', 'default' => null, 'key' => '' ),
471
  'bookly_staff.zoom_jwt_api_secret' => array( 'type' => 'varchar(255)', 'is_nullabe' => 1, 'extra' => '', 'default' => null, 'key' => '' ),
472
  'bookly_staff.zoom_oauth_token' => array( 'type' => 'text', 'is_nullabe' => 1, 'extra' => '', 'default' => null, 'key' => '' ),
 
 
 
 
473
  'bookly_staff.color' => array( 'type' => 'varchar(255)', 'is_nullabe' => 0, 'extra' => '', 'default' => '#dddddd', 'key' => '' ),
 
474
  'bookly_staff_categories.id' => array( 'type' => 'int unsigned', 'is_nullabe' => 0, 'extra' => 'auto_increment', 'default' => null, 'key' => 'PRI' ),
475
  'bookly_staff_categories.name' => array( 'type' => 'varchar(255)', 'is_nullabe' => 0, 'extra' => '', 'default' => null, 'key' => '' ),
476
  'bookly_staff_categories.position' => array( 'type' => 'int', 'is_nullabe' => 0, 'extra' => '', 'default' => '9999', 'key' => '' ),
@@ -510,6 +515,7 @@ class QueryBuilder
510
  'bookly_staff_special_hours.location_id' => array( 'type' => 'int unsigned', 'is_nullabe' => 1, 'extra' => '', 'default' => null, 'key' => '' ),
511
  'bookly_staff_special_hours.start_time' => array( 'type' => 'time', 'is_nullabe' => 1, 'extra' => '', 'default' => null, 'key' => '' ),
512
  'bookly_staff_special_hours.end_time' => array( 'type' => 'time', 'is_nullabe' => 1, 'extra' => '', 'default' => null, 'key' => '' ),
 
513
  'bookly_staff_special_hours.price' => array( 'type' => 'decimal(10,2)', 'is_nullabe' => 0, 'extra' => '', 'default' => '0.00', 'key' => '' ),
514
  'bookly_stats.id' => array( 'type' => 'int unsigned', 'is_nullabe' => 0, 'extra' => 'auto_increment', 'default' => null, 'key' => 'PRI' ),
515
  'bookly_stats.name' => array( 'type' => 'varchar(255)', 'is_nullabe' => 0, 'extra' => '', 'default' => null, 'key' => '' ),
470
  'bookly_staff.zoom_jwt_api_key' => array( 'type' => 'varchar(255)', 'is_nullabe' => 1, 'extra' => '', 'default' => null, 'key' => '' ),
471
  'bookly_staff.zoom_jwt_api_secret' => array( 'type' => 'varchar(255)', 'is_nullabe' => 1, 'extra' => '', 'default' => null, 'key' => '' ),
472
  'bookly_staff.zoom_oauth_token' => array( 'type' => 'text', 'is_nullabe' => 1, 'extra' => '', 'default' => null, 'key' => '' ),
473
+ 'bookly_staff.icalendar' => array( 'type' => 'tinyint(1)', 'is_nullabe' => 0, 'extra' => '', 'default' => '0', 'key' => '' ),
474
+ 'bookly_staff.icalendar_token' => array( 'type' => 'text', 'is_nullabe' => 1, 'extra' => '', 'default' => null, 'key' => '' ),
475
+ 'bookly_staff.icalendar_days_before' => array( 'type' => 'int', 'is_nullabe' => 0, 'extra' => '', 'default' => '365', 'key' => '' ),
476
+ 'bookly_staff.icalendar_days_after' => array( 'type' => 'int', 'is_nullabe' => 0, 'extra' => '', 'default' => '365', 'key' => '' ),
477
  'bookly_staff.color' => array( 'type' => 'varchar(255)', 'is_nullabe' => 0, 'extra' => '', 'default' => '#dddddd', 'key' => '' ),
478
+ 'bookly_staff.gateways' => array( 'type' => 'varchar(255)', 'is_nullabe' => 1, 'extra' => '', 'default' => null, 'key' => '' ),
479
  'bookly_staff_categories.id' => array( 'type' => 'int unsigned', 'is_nullabe' => 0, 'extra' => 'auto_increment', 'default' => null, 'key' => 'PRI' ),
480
  'bookly_staff_categories.name' => array( 'type' => 'varchar(255)', 'is_nullabe' => 0, 'extra' => '', 'default' => null, 'key' => '' ),
481
  'bookly_staff_categories.position' => array( 'type' => 'int', 'is_nullabe' => 0, 'extra' => '', 'default' => '9999', 'key' => '' ),
515
  'bookly_staff_special_hours.location_id' => array( 'type' => 'int unsigned', 'is_nullabe' => 1, 'extra' => '', 'default' => null, 'key' => '' ),
516
  'bookly_staff_special_hours.start_time' => array( 'type' => 'time', 'is_nullabe' => 1, 'extra' => '', 'default' => null, 'key' => '' ),
517
  'bookly_staff_special_hours.end_time' => array( 'type' => 'time', 'is_nullabe' => 1, 'extra' => '', 'default' => null, 'key' => '' ),
518
+ 'bookly_staff_special_hours.days' => array( 'type' => 'varchar(255)', 'is_nullabe' => 0, 'extra' => '', 'default' => '1,2,3,4,5,6,7', 'key' => '' ),
519
  'bookly_staff_special_hours.price' => array( 'type' => 'decimal(10,2)', 'is_nullabe' => 0, 'extra' => '', 'default' => '0.00', 'key' => '' ),
520
  'bookly_stats.id' => array( 'type' => 'int unsigned', 'is_nullabe' => 0, 'extra' => 'auto_increment', 'default' => null, 'key' => 'PRI' ),
521
  'bookly_stats.name' => array( 'type' => 'varchar(255)', 'is_nullabe' => 0, 'extra' => '', 'default' => null, 'key' => '' ),
backend/modules/services/Ajax.php CHANGED
@@ -126,14 +126,14 @@ class Ajax extends Page
126
  ! Lib\Config::proActive() &&
127
  get_option( 'bookly_updated_from_legacy_version' ) != 'lite' &&
128
  Lib\Entities\Service::query()->count() > 4 &&
129
- wp_send_json_error( array( 'message' => Limitation::getHtml() ) );
130
 
131
  $form = new Forms\Service();
132
  $form->bind( self::postParameters() );
133
  $form->getObject()->setDuration( Lib\Config::getTimeSlotLength() );
134
  $service = $form->save();
135
 
136
- Proxy\Shared::serviceCreated( $service, self::postParameters() );
137
 
138
  $sub_services_count = array_sum( array_map( function ( $sub_service ) {
139
  /** @var Lib\Entities\Service $sub_service */
@@ -258,7 +258,7 @@ class Ajax extends Page
258
  ! Lib\Config::proActive() &&
259
  get_option( 'bookly_updated_from_legacy_version' ) != 'lite' &&
260
  Lib\Entities\Service::query()->count() > 4 &&
261
- wp_send_json_error( array( 'message' => Limitation::getHtml() ) );
262
  $service_id = self::parameter( 'service_id' );
263
  $service = Lib\Entities\Service::find( $service_id );
264
  if ( $service ) {
126
  ! Lib\Config::proActive() &&
127
  get_option( 'bookly_updated_from_legacy_version' ) != 'lite' &&
128
  Lib\Entities\Service::query()->count() > 4 &&
129
+ wp_send_json_error( array( 'message' => Limitation::forNewService() ) );
130
 
131
  $form = new Forms\Service();
132
  $form->bind( self::postParameters() );
133
  $form->getObject()->setDuration( Lib\Config::getTimeSlotLength() );
134
  $service = $form->save();
135
 
136
+ Proxy\Shared::serviceCreated( $service );
137
 
138
  $sub_services_count = array_sum( array_map( function ( $sub_service ) {
139
  /** @var Lib\Entities\Service $sub_service */
258
  ! Lib\Config::proActive() &&
259
  get_option( 'bookly_updated_from_legacy_version' ) != 'lite' &&
260
  Lib\Entities\Service::query()->count() > 4 &&
261
+ wp_send_json_error( array( 'message' => Limitation::forNewService() ) );
262
  $service_id = self::parameter( 'service_id' );
263
  $service = Lib\Entities\Service::find( $service_id );
264
  if ( $service ) {
backend/modules/services/proxy/Shared.php CHANGED
@@ -5,13 +5,14 @@ use Bookly\Lib;
5
 
6
  /**
7
  * Class Shared
 
8
  * @package Bookly\Backend\Modules\Services\Proxy
9
  *
10
  * @method static void duplicateService( int $source_id, int $target_id ) Duplicate service.
11
  * @method static array prepareServiceColors( array $colors, int $service_id, int $service_type ) Prepare colors for service.
12
  * @method static array prepareServiceIcons( array $icons ) Prepare service icons.
13
  * @method static array prepareServiceTypes( array $types ) Prepare service types.
14
- * @method static array serviceCreated( Lib\Entities\Service $service, array $_post ) Service created.
15
  * @method static void serviceDeleted( Lib\Entities\Service $service ) Service deleted.
16
  */
17
  abstract class Shared extends Lib\Base\Proxy
5
 
6
  /**
7
  * Class Shared
8
+ *
9
  * @package Bookly\Backend\Modules\Services\Proxy
10
  *
11
  * @method static void duplicateService( int $source_id, int $target_id ) Duplicate service.
12
  * @method static array prepareServiceColors( array $colors, int $service_id, int $service_type ) Prepare colors for service.
13
  * @method static array prepareServiceIcons( array $icons ) Prepare service icons.
14
  * @method static array prepareServiceTypes( array $types ) Prepare service types.
15
+ * @method static array serviceCreated( Lib\Entities\Service $service ) Service created.
16
  * @method static void serviceDeleted( Lib\Entities\Service $service ) Service deleted.
17
  */
18
  abstract class Shared extends Lib\Base\Proxy
backend/modules/settings/Ajax.php CHANGED
@@ -77,18 +77,22 @@ class Ajax extends Page
77
  */
78
  public static function getLogs()
79
  {
 
 
80
  $filter = self::parameter( 'filter' );
81
  $columns = self::parameter( 'columns' );
82
  $order = self::parameter( 'order', array() );
83
 
84
- $query = Lib\Entities\Log::query( 'l' )
85
- ->select( 'l.*' );
86
 
87
  // Filters.
88
  list ( $start, $end ) = explode( ' - ', $filter['created_at'], 2 );
89
  $end = date( 'Y-m-d', strtotime( '+1 day', strtotime( $end ) ) );
90
 
91
- $query->whereBetween( 'l.created_at', $start, $end );
 
 
 
92
 
93
  $filtered = $query->count();
94
 
@@ -104,10 +108,10 @@ class Ajax extends Page
104
  $logs = $query->fetchArray();
105
 
106
  wp_send_json( array(
107
- 'draw' => ( int ) self::parameter( 'draw' ),
108
- 'recordsTotal' => count( $logs ),
109
  'recordsFiltered' => $filtered,
110
- 'data' => $logs,
111
  ) );
112
  }
113
 
77
  */
78
  public static function getLogs()
79
  {
80
+ global $wpdb;
81
+
82
  $filter = self::parameter( 'filter' );
83
  $columns = self::parameter( 'columns' );
84
  $order = self::parameter( 'order', array() );
85
 
86
+ $query = Lib\Entities\Log::query();
 
87
 
88
  // Filters.
89
  list ( $start, $end ) = explode( ' - ', $filter['created_at'], 2 );
90
  $end = date( 'Y-m-d', strtotime( '+1 day', strtotime( $end ) ) );
91
 
92
+ $query->whereBetween( 'created_at', $start, $end );
93
+ if ( $filter['search'] != '' ) {
94
+ $query->whereRaw( 'target LIKE "%%%s%" OR details LIKE "%%%s%" OR ref LIKE "%%%s%" OR comment LIKE "%%%s%"', array_fill( 0, 4, $wpdb->esc_like( $filter['search'] ) ) );
95
+ }
96
 
97
  $filtered = $query->count();
98
 
108
  $logs = $query->fetchArray();
109
 
110
  wp_send_json( array(
111
+ 'draw' => ( int ) self::parameter( 'draw' ),
112
+ 'recordsTotal' => count( $logs ),
113
  'recordsFiltered' => $filtered,
114
+ 'data' => $logs,
115
  ) );
116
  }
117
 
backend/modules/settings/Page.php CHANGED
@@ -116,9 +116,7 @@ class Page extends Lib\Base\Ajax
116
  $alert['success'][] = __( 'Settings saved.', 'bookly' );
117
  break;
118
  case 'appointments':
119
- if ( ! Lib\Config::customerGroupsActive() ) {
120
- update_option( 'bookly_appointment_default_status', self::parameter( 'bookly_appointment_default_status' ) );
121
- }
122
  $alert['success'][] = __( 'Settings saved.', 'bookly' );
123
  break;
124
  case 'company': // Company form.
@@ -127,6 +125,7 @@ class Page extends Lib\Base\Ajax
127
  update_option( 'bookly_co_name', self::parameter( 'bookly_co_name' ) );
128
  update_option( 'bookly_co_phone', self::parameter( 'bookly_co_phone' ) );
129
  update_option( 'bookly_co_website', self::parameter( 'bookly_co_website' ) );
 
130
  $alert['success'][] = __( 'Settings saved.', 'bookly' );
131
  break;
132
  case 'logs': // Logs form.
@@ -139,36 +138,24 @@ class Page extends Lib\Base\Ajax
139
  $alert = Proxy\Shared::saveSettings( $alert, self::parameter( 'tab' ), self::postParameters() );
140
  }
141
 
142
- // Check if WooCommerce cart exists.
143
- if ( get_option( 'bookly_wc_enabled' ) && class_exists( 'WooCommerce', false ) ) {
144
- $post = get_post( wc_get_page_id( 'cart' ) );
145
- if ( $post === null || $post->post_status != 'publish' ) {
146
- $alert['error'][] = sprintf(
147
- __( 'WooCommerce cart is not set up. Follow the <a href="%s">link</a> to correct this problem.', 'bookly' ),
148
- Lib\Utils\Common::escAdminUrl( 'wc-status', array( 'tab' => 'tools' ) )
149
- );
150
- }
151
- }
152
-
153
  Proxy\Shared::enqueueAssets();
154
 
155
  wp_localize_script( 'bookly-settings.js', 'BooklyL10n', array(
156
- 'alert' => $alert,
157
- 'current_tab' => $current_tab,
158
- 'csrf_token' => Lib\Utils\Common::getCsrfToken(),
159
- 'default_country' => get_option( 'bookly_cst_phone_default_country' ),
160
- 'holidays' => self::_getHolidays(),
161
- 'loading_img' => plugins_url( 'bookly-responsive-appointment-booking-tool/backend/resources/images/loading.gif' ),
162
- 'firstDay' => get_option( 'start_of_week' ),
163
- 'days' => array_values( $wp_locale->weekday_abbrev ),
164
- 'months' => array_values( $wp_locale->month ),
165
- 'close' => __( 'Close', 'bookly' ),
166
- 'repeat' => __( 'Repeat every year', 'bookly' ),
167
  'we_are_not_working' => __( 'We are not working on this day', 'bookly' ),
168
- 'sample_price' => number_format_i18n( 10, 3 ),
169
- 'are_you_sure' => __( 'Are you sure?', 'bookly' ),
170
- 'datePicker' => Lib\Utils\DateTime::datePickerOptions(),
171
- 'dateRange' => Lib\Utils\DateTime::dateRangeOptions( array( 'lastMonth' => __( 'Last month', 'bookly' ), ) ),
172
  ) );
173
  $values = array();
174
  foreach ( array( 5, 10, 12, 15, 20, 30, 45, 60, 90, 120, 180, 240, 360 ) as $duration ) {
116
  $alert['success'][] = __( 'Settings saved.', 'bookly' );
117
  break;
118
  case 'appointments':
119
+ update_option( 'bookly_appointment_default_status', self::parameter( 'bookly_appointment_default_status' ) );
 
 
120
  $alert['success'][] = __( 'Settings saved.', 'bookly' );
121
  break;
122
  case 'company': // Company form.
125
  update_option( 'bookly_co_name', self::parameter( 'bookly_co_name' ) );
126
  update_option( 'bookly_co_phone', self::parameter( 'bookly_co_phone' ) );
127
  update_option( 'bookly_co_website', self::parameter( 'bookly_co_website' ) );
128
+ update_option( 'bookly_co_industry', self::parameter( 'bookly_co_industry' ) );
129
  $alert['success'][] = __( 'Settings saved.', 'bookly' );
130
  break;
131
  case 'logs': // Logs form.
138
  $alert = Proxy\Shared::saveSettings( $alert, self::parameter( 'tab' ), self::postParameters() );
139
  }
140
 
 
 
 
 
 
 
 
 
 
 
 
141
  Proxy\Shared::enqueueAssets();
142
 
143
  wp_localize_script( 'bookly-settings.js', 'BooklyL10n', array(
144
+ 'alert' => $alert,
145
+ 'current_tab' => $current_tab,
146
+ 'default_country' => get_option( 'bookly_cst_phone_default_country' ),
147
+ 'holidays' => self::_getHolidays(),
148
+ 'loading_img' => plugins_url( 'bookly-responsive-appointment-booking-tool/backend/resources/images/loading.gif' ),
149
+ 'firstDay' => get_option( 'start_of_week' ),
150
+ 'days' => array_values( $wp_locale->weekday_abbrev ),
151
+ 'months' => array_values( $wp_locale->month ),
152
+ 'close' => __( 'Close', 'bookly' ),
153
+ 'repeat' => __( 'Repeat every year', 'bookly' ),
 
154
  'we_are_not_working' => __( 'We are not working on this day', 'bookly' ),
155
+ 'sample_price' => number_format_i18n( 10, 3 ),
156
+ 'are_you_sure' => __( 'Are you sure?', 'bookly' ),
157
+ 'datePicker' => Lib\Utils\DateTime::datePickerOptions(),
158
+ 'dateRange' => Lib\Utils\DateTime::dateRangeOptions( array( 'lastMonth' => __( 'Last month', 'bookly' ), ) ),
159
  ) );
160
  $values = array();
161
  foreach ( array( 5, 10, 12, 15, 20, 30, 45, 60, 90, 120, 180, 240, 360 ) as $duration ) {
backend/modules/settings/resources/js/settings.js CHANGED
@@ -1,39 +1,41 @@
1
  jQuery(function ($) {
2
  let container = {
3
  $calendar: $('#bookly_settings_calendar'),
 
4
  },
5
- $helpBtn = $('#bookly-help-btn'),
6
- $businessHours = $('#business-hours'),
7
- $companyLogo = $('#bookly-js-company-logo'),
8
- $finalStepUrl = $('.bookly-js-final-step-url'),
9
- $finalStepUrlMode = $('#bookly_settings_final_step_url_mode'),
10
- $participants = $('#bookly_appointment_participants'),
11
- $defaultCountry = $('#bookly_cst_phone_default_country'),
12
- $defaultCountryCode = $('#bookly_cst_default_country_code'),
13
- $gcSyncMode = $('#bookly_gc_sync_mode'),
14
- $gcLimitEvents = $('#bookly_gc_limit_events'),
15
- $gcFullSyncOffset = $('#bookly_gc_full_sync_offset_days_before'),
16
- $gcFullSyncTitles = $('#bookly_gc_full_sync_titles'),
17
  $gcForceUpdateDescription = $('#bookly_gc_force_update_description'),
18
- $ocSyncMode = $('#bookly_oc_sync_mode'),
19
- $ocLimitEvents = $('#bookly_oc_limit_events'),
20
- $ocFullSyncOffset = $('#bookly_oc_full_sync_offset_days_before'),
21
- $ocFullSyncTitles = $('#bookly_oc_full_sync_titles'),
22
- $currency = $('#bookly_pmt_currency'),
23
- $formats = $('#bookly_pmt_price_format'),
24
- $logsDateFilter = $('#bookly-logs-date-filter'),
25
- $logsTable = $('#bookly-logs-table'),
26
- $calOneParticipant = $('[name="bookly_cal_one_participant"]'),
27
- $calManyParticipants = $('[name="bookly_cal_many_participants"]'),
28
- $woocommerceInfo = $('[name="bookly_l10n_wc_cart_info_value"]'),
29
- $customerAddress = $('[name="bookly_l10n_cst_address_template"]'),
30
- $gcDescription = $('[name="bookly_gc_event_description"]'),
31
- $ocDescription = $('[name="bookly_oc_event_description"]'),
32
- $displayedTimeSlots = $('#bookly_appointments_displayed_time_slots'),
33
- $timeDelimiter = $('#bookly_appointments_time_delimiter'),
34
- $colorPicker = $('.bookly-js-color-picker', container.$calendar),
35
- $coloringMode = $('#bookly_cal_coloring_mode', container.$calendar),
36
- $colorsBy = $('.bookly-js-colors-by', container.$calendar)
 
37
  ;
38
 
39
  booklyAlert(BooklyL10n.alert);
@@ -118,10 +120,10 @@ jQuery(function ($) {
118
  $('#bookly_cal_many_participants').hide();
119
  $('#' + this.value).show();
120
  }).trigger('change');
121
- $("#bookly_settings_calendar button[type=reset]").on( 'click', function () {
122
  setTimeout(function () {
123
  $participants.trigger('change');
124
- }, 50 );
125
  });
126
 
127
  $calOneParticipant.data('default', $calOneParticipant.val());
@@ -160,7 +162,7 @@ jQuery(function ($) {
160
  $companyLogo.find('.bookly-thumb').removeClass('bookly-thumb-with-image');
161
  $(this).hide();
162
  });
163
- $companyLogo.find('.bookly-js-edit').on('click', function() {
164
  let frame = wp.media({
165
  library: {type: 'image'},
166
  multiple: false
@@ -213,7 +215,7 @@ jQuery(function ($) {
213
  $currency.on('change', function () {
214
  $formats.find('option').each(function () {
215
  var decimals = this.value.match(/{price\|(\d)}/)[1],
216
- price = BooklyL10n.sample_price
217
  ;
218
  if (decimals < 3) {
219
  price = price.slice(0, -(decimals == 0 ? 4 : 3 - decimals));
@@ -292,7 +294,9 @@ jQuery(function ($) {
292
  });
293
 
294
  // URL tab.
295
- if ($finalStepUrl.find('input').val()) { $finalStepUrlMode.val(1); }
 
 
296
  $finalStepUrlMode.change(function () {
297
  if (this.value == 0) {
298
  $finalStepUrl.hide().find('input').val('');
@@ -305,19 +309,19 @@ jQuery(function ($) {
305
  var d = new Date();
306
  $('.bookly-js-annual-calendar').jCal({
307
  day: new Date(d.getFullYear(), 0, 1),
308
- days: 1,
309
  showMonths: 12,
310
  scrollSpeed: 350,
311
- events: BooklyL10n.holidays,
312
- action: 'bookly_settings_holiday',
313
- csrf_token: BooklyL10n.csrf_token,
314
- dayOffset: parseInt(BooklyL10n.firstDay),
315
  loadingImg: BooklyL10n.loading_img,
316
- dow: BooklyL10n.days,
317
- ml: BooklyL10n.months,
318
  we_are_not_working: BooklyL10n.we_are_not_working,
319
- repeat: BooklyL10n.repeat,
320
- close: BooklyL10n.close
321
  });
322
  $('.bookly-js-jCalBtn').on('click', function (e) {
323
  e.preventDefault();
@@ -346,7 +350,7 @@ jQuery(function ($) {
346
 
347
  // Change link to Help page according to activated tab.
348
  let help_link = $helpBtn.attr('href');
349
- $('#bookly-sidebar a[data-toggle="bookly-pill"]').on('shown.bs.tab', function(e) {
350
  $helpBtn.attr('href', help_link + e.target.getAttribute('href').substring(1).replace(/_/g, '-'));
351
  });
352
 
@@ -354,23 +358,23 @@ jQuery(function ($) {
354
  $('a[href="#bookly_settings_' + BooklyL10n.current_tab + '"]').booklyTab('show');
355
 
356
  // Logs
357
- $('#bookly_logs_enabled').on('change', function() {
358
- $('#bookly-logs-table-wrap').toggle($(this).find('option:selected').val() === '1');
359
  }).trigger('change');
360
 
361
- $('#bookly-delete-logs').on('click', function (){
362
  if (confirm(BooklyL10n.are_you_sure)) {
363
  var ladda = Ladda.create(this);
364
  ladda.start();
365
  $.ajax({
366
- url : ajaxurl,
367
- type : 'POST',
368
- data : {
369
- action : 'bookly_delete_logs',
370
- csrf_token : BooklyL10n.csrf_token,
371
  },
372
- dataType : 'json',
373
- success : function() {
374
  ladda.stop();
375
  dt.ajax.reload();
376
  }
@@ -379,42 +383,42 @@ jQuery(function ($) {
379
  });
380
 
381
  let pickers = {
382
- dateFormat: 'YYYY-MM-DD',
383
  creationDate: {
384
  startDate: moment().subtract(30, 'days'),
385
- endDate : moment(),
386
  },
387
  };
388
  var picker_ranges = {};
389
  picker_ranges[BooklyL10n.dateRange.yesterday] = [moment().subtract(1, 'days'), moment().subtract(1, 'days')];
390
- picker_ranges[BooklyL10n.dateRange.today] = [moment(), moment()];
391
- picker_ranges[BooklyL10n.dateRange.last_7] = [moment().subtract(7, 'days'), moment()];
392
- picker_ranges[BooklyL10n.dateRange.last_30] = [moment().subtract(30, 'days'), moment()];
393
  picker_ranges[BooklyL10n.dateRange.thisMonth] = [moment().startOf('month'), moment().endOf('month')];
394
  picker_ranges[BooklyL10n.dateRange.lastMonth] = [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')];
395
 
396
  $logsDateFilter.daterangepicker({
397
- parentEl : $logsDateFilter.closest('.card-body'),
398
- startDate : pickers.creationDate.startDate,
399
- endDate : pickers.creationDate.endDate,
400
- ranges : picker_ranges,
401
- showDropdowns : true,
402
  linkedCalendars: false,
403
  autoUpdateInput: false,
404
- locale : $.extend({}, BooklyL10n.dateRange, BooklyL10n.datePicker)
405
  },
406
  function (start, end) {
407
  $logsDateFilter
408
- .data('date', start.format(pickers.dateFormat) + ' - ' + end.format(pickers.dateFormat))
409
- .find('span')
410
- .html(start.format(BooklyL10n.dateRange.format) + ' - ' + end.format(BooklyL10n.dateRange.format));
411
  }
412
  );
413
 
414
  var dt = $logsTable.DataTable({
415
  order: [0],
416
  info: false,
417
- paging : true,
418
  searching: false,
419
  lengthChange: false,
420
  processing: true,
@@ -426,9 +430,10 @@ jQuery(function ($) {
426
  url: ajaxurl,
427
  type: 'POST',
428
  data: function (d) {
429
- return $.extend({action: 'bookly_get_logs', csrf_token: BooklyL10n.csrf_token}, {
430
  filter: {
431
  created_at: $logsDateFilter.data('date'),
 
432
  }
433
  }, d);
434
  }
@@ -443,7 +448,7 @@ jQuery(function ($) {
443
  data: 'details',
444
  render: function (data, type, row, meta) {
445
  try {
446
- return JSON.stringify(JSON.parse(data), null, 2).replace(/\n/g, "<br/>");
447
  } catch (e) {
448
  return data;
449
  }
@@ -460,7 +465,16 @@ jQuery(function ($) {
460
  }
461
  });
462
 
463
- $logsDateFilter.on('apply.daterangepicker', function () { dt.ajax.reload(); });
 
 
 
 
 
 
 
 
 
464
 
465
  // Tab calendar
466
  $coloringMode
@@ -475,7 +489,7 @@ jQuery(function ($) {
475
  $jquery_collection.wpColorPicker();
476
  $jquery_collection.each(function () {
477
  $(this).data('last-color', $(this).val());
478
- $('.wp-color-result-text',$(this).closest('.bookly-color-picker')).html($(this).data('title'));
479
  });
480
  }
481
 
1
  jQuery(function ($) {
2
  let container = {
3
  $calendar: $('#bookly_settings_calendar'),
4
+ $log: $('#bookly_settings_logs')
5
  },
6
+ $helpBtn = $('#bookly-help-btn'),
7
+ $businessHours = $('#business-hours'),
8
+ $companyLogo = $('#bookly-js-company-logo'),
9
+ $finalStepUrl = $('.bookly-js-final-step-url'),
10
+ $finalStepUrlMode = $('#bookly_settings_final_step_url_mode'),
11
+ $participants = $('#bookly_appointment_participants'),
12
+ $defaultCountry = $('#bookly_cst_phone_default_country'),
13
+ $defaultCountryCode = $('#bookly_cst_default_country_code'),
14
+ $gcSyncMode = $('#bookly_gc_sync_mode'),
15
+ $gcLimitEvents = $('#bookly_gc_limit_events'),
16
+ $gcFullSyncOffset = $('#bookly_gc_full_sync_offset_days_before'),
17
+ $gcFullSyncTitles = $('#bookly_gc_full_sync_titles'),
18
  $gcForceUpdateDescription = $('#bookly_gc_force_update_description'),
19
+ $ocSyncMode = $('#bookly_oc_sync_mode'),
20
+ $ocLimitEvents = $('#bookly_oc_limit_events'),
21
+ $ocFullSyncOffset = $('#bookly_oc_full_sync_offset_days_before'),
22
+ $ocFullSyncTitles = $('#bookly_oc_full_sync_titles'),
23
+ $currency = $('#bookly_pmt_currency'),
24
+ $formats = $('#bookly_pmt_price_format'),
25
+ $logsDateFilter = $('#bookly-logs-date-filter', container.$log),
26
+ $logsTable = $('#bookly-logs-table', container.$log),
27
+ $logsSearch = $('#bookly-log-search', container.$log),
28
+ $calOneParticipant = $('[name="bookly_cal_one_participant"]'),
29
+ $calManyParticipants = $('[name="bookly_cal_many_participants"]'),
30
+ $woocommerceInfo = $('[name="bookly_l10n_wc_cart_info_value"]'),
31
+ $customerAddress = $('[name="bookly_l10n_cst_address_template"]'),
32
+ $gcDescription = $('[name="bookly_gc_event_description"]'),
33
+ $ocDescription = $('[name="bookly_oc_event_description"]'),
34
+ $displayedTimeSlots = $('#bookly_appointments_displayed_time_slots'),
35
+ $timeDelimiter = $('#bookly_appointments_time_delimiter'),
36
+ $colorPicker = $('.bookly-js-color-picker', container.$calendar),
37
+ $coloringMode = $('#bookly_cal_coloring_mode', container.$calendar),
38
+ $colorsBy = $('.bookly-js-colors-by', container.$calendar)
39
  ;
40
 
41
  booklyAlert(BooklyL10n.alert);
120
  $('#bookly_cal_many_participants').hide();
121
  $('#' + this.value).show();
122
  }).trigger('change');
123
+ $('#bookly_settings_calendar button[type=reset]').on('click', function () {
124
  setTimeout(function () {
125
  $participants.trigger('change');
126
+ }, 50);
127
  });
128
 
129
  $calOneParticipant.data('default', $calOneParticipant.val());
162
  $companyLogo.find('.bookly-thumb').removeClass('bookly-thumb-with-image');
163
  $(this).hide();
164
  });
165
+ $companyLogo.find('.bookly-js-edit').on('click', function () {
166
  let frame = wp.media({
167
  library: {type: 'image'},
168
  multiple: false
215
  $currency.on('change', function () {
216
  $formats.find('option').each(function () {
217
  var decimals = this.value.match(/{price\|(\d)}/)[1],
218
+ price = BooklyL10n.sample_price
219
  ;
220
  if (decimals < 3) {
221
  price = price.slice(0, -(decimals == 0 ? 4 : 3 - decimals));
294
  });
295
 
296
  // URL tab.
297
+ if ($finalStepUrl.find('input').val()) {
298
+ $finalStepUrlMode.val(1);
299
+ }
300
  $finalStepUrlMode.change(function () {
301
  if (this.value == 0) {
302
  $finalStepUrl.hide().find('input').val('');
309
  var d = new Date();
310
  $('.bookly-js-annual-calendar').jCal({
311
  day: new Date(d.getFullYear(), 0, 1),
312
+ days: 1,
313
  showMonths: 12,
314
  scrollSpeed: 350,
315
+ events: BooklyL10n.holidays,
316
+ action: 'bookly_settings_holiday',
317
+ csrf_token: BooklyL10nGlobal.csrf_token,
318
+ dayOffset: parseInt(BooklyL10n.firstDay),
319
  loadingImg: BooklyL10n.loading_img,
320
+ dow: BooklyL10n.days,
321
+ ml: BooklyL10n.months,
322
  we_are_not_working: BooklyL10n.we_are_not_working,
323
+ repeat: BooklyL10n.repeat,
324
+ close: BooklyL10n.close
325
  });
326
  $('.bookly-js-jCalBtn').on('click', function (e) {
327
  e.preventDefault();
350
 
351
  // Change link to Help page according to activated tab.
352
  let help_link = $helpBtn.attr('href');
353
+ $('#bookly-sidebar a[data-toggle="bookly-pill"]').on('shown.bs.tab', function (e) {
354
  $helpBtn.attr('href', help_link + e.target.getAttribute('href').substring(1).replace(/_/g, '-'));
355
  });
356
 
358
  $('a[href="#bookly_settings_' + BooklyL10n.current_tab + '"]').booklyTab('show');
359
 
360
  // Logs
361
+ $('#bookly_logs_enabled').on('change', function () {
362
+ $('#bookly-logs-table-wrap', container.$log).toggle($(this).find('option:selected').val() === '1');
363
  }).trigger('change');
364
 
365
+ $('#bookly-delete-logs').on('click', function () {
366
  if (confirm(BooklyL10n.are_you_sure)) {
367
  var ladda = Ladda.create(this);
368
  ladda.start();
369
  $.ajax({
370
+ url: ajaxurl,
371
+ type: 'POST',
372
+ data: {
373
+ action: 'bookly_delete_logs',
374
+ csrf_token: BooklyL10nGlobal.csrf_token,
375
  },
376
+ dataType: 'json',
377
+ success: function () {
378
  ladda.stop();
379
  dt.ajax.reload();
380
  }
383
  });
384
 
385
  let pickers = {
386
+ dateFormat: 'YYYY-MM-DD',
387
  creationDate: {
388
  startDate: moment().subtract(30, 'days'),
389
+ endDate: moment(),
390
  },
391
  };
392
  var picker_ranges = {};
393
  picker_ranges[BooklyL10n.dateRange.yesterday] = [moment().subtract(1, 'days'), moment().subtract(1, 'days')];
394
+ picker_ranges[BooklyL10n.dateRange.today] = [moment(), moment()];
395
+ picker_ranges[BooklyL10n.dateRange.last_7] = [moment().subtract(7, 'days'), moment()];
396
+ picker_ranges[BooklyL10n.dateRange.last_30] = [moment().subtract(30, 'days'), moment()];
397
  picker_ranges[BooklyL10n.dateRange.thisMonth] = [moment().startOf('month'), moment().endOf('month')];
398
  picker_ranges[BooklyL10n.dateRange.lastMonth] = [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')];
399
 
400
  $logsDateFilter.daterangepicker({
401
+ parentEl: $logsDateFilter.closest('.card-body'),
402
+ startDate: pickers.creationDate.startDate,
403
+ endDate: pickers.creationDate.endDate,
404
+ ranges: picker_ranges,
405
+ showDropdowns: true,
406
  linkedCalendars: false,
407
  autoUpdateInput: false,
408
+ locale: $.extend({}, BooklyL10n.dateRange, BooklyL10n.datePicker)
409
  },
410
  function (start, end) {
411
  $logsDateFilter
412
+ .data('date', start.format(pickers.dateFormat) + ' - ' + end.format(pickers.dateFormat))
413
+ .find('span')
414
+ .html(start.format(BooklyL10n.dateRange.format) + ' - ' + end.format(BooklyL10n.dateRange.format));
415
  }
416
  );
417
 
418
  var dt = $logsTable.DataTable({
419
  order: [0],
420
  info: false,
421
+ paging: true,
422
  searching: false,
423
  lengthChange: false,
424
  processing: true,
430
  url: ajaxurl,
431
  type: 'POST',
432
  data: function (d) {
433
+ return $.extend({action: 'bookly_get_logs', csrf_token: BooklyL10nGlobal.csrf_token}, {
434
  filter: {
435
  created_at: $logsDateFilter.data('date'),
436
+ search: $logsSearch.val()
437
  }
438
  }, d);
439
  }
448
  data: 'details',
449
  render: function (data, type, row, meta) {
450
  try {
451
+ return JSON.stringify(JSON.parse(data), null, 2).replace(/\n/g, '<br/>');
452
  } catch (e) {
453
  return data;
454
  }
465
  }
466
  });
467
 
468
+ $logsDateFilter.on('apply.daterangepicker', function () {dt.ajax.reload();});
469
+ $logsSearch.on('keyup', function () {
470
+ dt.search(this.value).draw();
471
+ })
472
+ .on('keydown', function (e) {
473
+ if (e.keyCode == 13) {
474
+ e.preventDefault();
475
+ return false;
476
+ }
477
+ });
478
 
479
  // Tab calendar
480
  $coloringMode
489
  $jquery_collection.wpColorPicker();
490
  $jquery_collection.each(function () {
491
  $(this).data('last-color', $(this).val());
492
+ $('.wp-color-result-text', $(this).closest('.bookly-color-picker')).text($(this).data('title'));
493
  });
494
  }
495
 
backend/modules/settings/templates/_appointmentsForm.php CHANGED
@@ -7,15 +7,13 @@ use Bookly\Lib\Utils\Common;
7
  use Bookly\Lib\Config;
8
 
9
  $help =__( 'Select status for newly booked appointments.', 'bookly' );
10
- $attributes = array();
11
  if ( Config::customerGroupsActive() ) {
12
  $help .= ' ' . sprintf( __( 'Please note that this setting will be overridden by Customer Groups > General settings > <a href="%s" target="_blank">Default appointment status</a>.', 'bookly' ), Common::escAdminUrl( 'bookly-customer-groups' ) );
13
- $attributes = array( 'disabled' => 'disabled' );
14
  }
15
  ?>
16
  <form method="post" action="<?php echo esc_url( add_query_arg( 'tab', 'appointments' ) ) ?>">
17
  <div class="card-body">
18
- <?php Selects::renderSingle( 'bookly_appointment_default_status', __( 'Default appointment status', 'bookly' ), $help, $statuses, $attributes ) ?>
19
  <?php Proxy\Pro::renderAppointmentsSettings() ?>
20
  </div>
21
 
7
  use Bookly\Lib\Config;
8
 
9
  $help =__( 'Select status for newly booked appointments.', 'bookly' );
 
10
  if ( Config::customerGroupsActive() ) {
11
  $help .= ' ' . sprintf( __( 'Please note that this setting will be overridden by Customer Groups > General settings > <a href="%s" target="_blank">Default appointment status</a>.', 'bookly' ), Common::escAdminUrl( 'bookly-customer-groups' ) );
 
12
  }
13
  ?>
14
  <form method="post" action="<?php echo esc_url( add_query_arg( 'tab', 'appointments' ) ) ?>">
15
  <div class="card-body">
16
+ <?php Selects::renderSingle( 'bookly_appointment_default_status', __( 'Default appointment status', 'bookly' ), $help, $statuses ) ?>
17
  <?php Proxy\Pro::renderAppointmentsSettings() ?>
18
  </div>
19
 
backend/modules/settings/templates/_calendarForm.php CHANGED
@@ -41,6 +41,7 @@ use Bookly\Lib\Entities\CustomerAppointment;
41
  <input type="hidden" name="bookly_cal_many_participants" value="<?php echo esc_attr( get_option( 'bookly_cal_many_participants', '' ) ) ?>">
42
  </div>
43
  </div>
 
44
  </div>
45
 
46
  <div class="card-footer bg-transparent d-flex justify-content-end">
41
  <input type="hidden" name="bookly_cal_many_participants" value="<?php echo esc_attr( get_option( 'bookly_cal_many_participants', '' ) ) ?>">
42
  </div>
43
  </div>
44
+ <?php Settings\Proxy\Pro::renderDisplayFrontendCalendar() ?>
45
  </div>
46
 
47
  <div class="card-footer bg-transparent d-flex justify-content-end">
backend/modules/settings/templates/_companyForm.php CHANGED
@@ -2,6 +2,8 @@
2
  use Bookly\Backend\Components\Controls\Buttons;
3
  use Bookly\Backend\Components\Controls\Inputs as ControlsInputs;
4
  use Bookly\Backend\Components\Settings\Inputs;
 
 
5
  ?>
6
  <form method="post" action="<?php echo esc_url( add_query_arg( 'tab', 'company' ) ) ?>">
7
  <div class="card-body">
@@ -39,6 +41,7 @@ use Bookly\Backend\Components\Settings\Inputs;
39
  <?php Inputs::renderTextArea( 'bookly_co_address', __( 'Address', 'bookly' ), '', 5 ) ?>
40
  <?php Inputs::renderText( 'bookly_co_phone', __( 'Phone', 'bookly' ) ) ?>
41
  <?php Inputs::renderText( 'bookly_co_website', __( 'Website', 'bookly' ) ) ?>
 
42
  </div>
43
 
44
  <div class="card-footer bg-transparent d-flex justify-content-end">
2
  use Bookly\Backend\Components\Controls\Buttons;
3
  use Bookly\Backend\Components\Controls\Inputs as ControlsInputs;
4
  use Bookly\Backend\Components\Settings\Inputs;
5
+ use Bookly\Backend\Components\Settings\Selects;
6
+ use Bookly\Lib\Utils\Common;
7
  ?>
8
  <form method="post" action="<?php echo esc_url( add_query_arg( 'tab', 'company' ) ) ?>">
9
  <div class="card-body">
41
  <?php Inputs::renderTextArea( 'bookly_co_address', __( 'Address', 'bookly' ), '', 5 ) ?>
42
  <?php Inputs::renderText( 'bookly_co_phone', __( 'Phone', 'bookly' ) ) ?>
43
  <?php Inputs::renderText( 'bookly_co_website', __( 'Website', 'bookly' ) ) ?>
44
+ <?php Selects::renderSingleWithCategories( 'bookly_co_industry', __( 'Industry', 'bookly' ), null, get_option( 'bookly_co_industry' ) ? Common::getIndustries() : array_merge( array( __( 'Select industry', 'bookly' ) ), Common::getIndustries() ) ); ?>
45
  </div>
46
 
47
  <div class="card-footer bg-transparent d-flex justify-content-end">
backend/modules/settings/templates/_logsForm.php CHANGED
@@ -15,10 +15,15 @@ use Bookly\Lib\Utils\DateTime;
15
  <button type="button" class="btn btn-default w-100 mb-3 text-truncate text-left" id="bookly-logs-date-filter" data-date="<?php echo date( 'Y-m-d', strtotime( 'first day of' ) ) ?> - <?php echo date( 'Y-m-d', strtotime( 'last day of' ) ) ?>">
16
  <i class="far fa-calendar-alt mr-1"></i>
17
  <span>
18
- <?php echo DateTime::formatDate( 'first day of this month' ) ?> - <?php echo DateTime::formatDate( 'last day of this month' ) ?>
19
- </span>
20
  </button>
21
  </div>
 
 
 
 
 
22
  </div>
23
  <div class="table-responsive">
24
  <table id="bookly-logs-table" class="table table-striped table-hover nowrap w-100">
@@ -36,7 +41,7 @@ use Bookly\Lib\Utils\DateTime;
36
  </thead>
37
  </table>
38
  <div class="text-right mt-3">
39
- <?php Buttons::renderDelete( 'bookly-delete-logs', 'mr-2', __( 'Clear logs', 'bookly' ) ); ?>
40
  </div>
41
  </div>
42
  </div>
15
  <button type="button" class="btn btn-default w-100 mb-3 text-truncate text-left" id="bookly-logs-date-filter" data-date="<?php echo date( 'Y-m-d', strtotime( 'first day of' ) ) ?> - <?php echo date( 'Y-m-d', strtotime( 'last day of' ) ) ?>">
16
  <i class="far fa-calendar-alt mr-1"></i>
17
  <span>
18
+ <?php echo DateTime::formatDate( 'first day of this month' ) ?> - <?php echo DateTime::formatDate( 'last day of this month' ) ?>
19
+ </span>
20
  </button>
21
  </div>
22
+ <div class="col-md-4">
23
+ <div class="form-group">
24
+ <input class="form-control" type="text" id="bookly-log-search" placeholder="<?php esc_attr_e( 'Quick search', 'bookly' ) ?>"/>
25
+ </div>
26
+ </div>
27
  </div>
28
  <div class="table-responsive">
29
  <table id="bookly-logs-table" class="table table-striped table-hover nowrap w-100">
41
  </thead>
42
  </table>
43
  <div class="text-right mt-3">
44
+ <?php Buttons::renderDelete( 'bookly-delete-logs', 'mr-2', __( 'Clear logs', 'bookly' ) ) ?>
45
  </div>
46
  </div>
47
  </div>
backend/modules/setup/Ajax.php ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Bookly\Backend\Modules\Setup;
3
+
4
+ use Bookly\Lib;
5
+ use Bookly\Backend\Modules\Services\Proxy;
6
+
7
+ /**
8
+ * Class Ajax
9
+ *
10
+ * @package Bookly\Backend\Modules\Setup
11
+ */
12
+ class Ajax extends Lib\Base\Ajax
13
+ {
14
+ /**
15
+ * Get data for setup page.
16
+ */
17
+ public static function getSetupForm()
18
+ {
19
+ $services = Lib\Entities\Service::query( 's' )
20
+ ->select( 'id, title, duration' )
21
+ ->fetchArray();
22
+ foreach ( $services as &$service ) {
23
+ $service['duration'] = (int) $service['duration'];
24
+ }
25
+ $staff = Lib\Entities\Staff::query( 's' )
26
+ ->select( 'id, full_name as name, email, phone' )
27
+ ->fetchArray();
28
+
29
+ wp_send_json_success( array(
30
+ 'company' => get_option( 'bookly_co_name', '' ),
31
+ 'industry' => get_option( 'bookly_co_industry', false ),
32
+ 'size' => get_option( 'bookly_co_size', '' ),
33
+ 'email' => get_option( 'bookly_co_email', '' ),
34
+ 'staff_members' => $staff,
35
+ 'services' => $services,
36
+ ) );
37
+ }
38
+
39
+ /**
40
+ * Seve setup form data.
41
+ */
42
+ public static function saveSetupForm()
43
+ {
44
+ $step = self::parameter( 'step', 1 );
45
+ switch ( $step ) {
46
+ case 1:
47
+ update_option( 'bookly_co_name', self::parameter( 'company' ) );
48
+ update_option( 'bookly_co_industry', self::parameter( 'industry' ) );
49
+ update_option( 'bookly_co_size', self::parameter( 'size' ) );
50
+ update_option( 'bookly_co_email', self::parameter( 'email' ) );
51
+ break;
52
+ case 2:
53
+ $existing_staff = array();
54
+ foreach ( self::parameter( 'staff_members', array() ) as $staff_data ) {
55
+ $staff = new Lib\Entities\Staff();
56
+ if ( isset( $staff_data['id'] ) && $staff_data['id'] ) {
57
+ $staff->load( $staff_data['id'] );
58
+ }
59
+ $staff
60
+ ->setFullName( $staff_data['name'] )
61
+ ->setPhone( $staff_data['formatted_phone'] ?: $staff_data['phone'] )
62
+ ->setEmail( $staff_data['email'] )
63
+ ->save();
64
+ $existing_staff[] = $staff->getId();
65
+ foreach ( Lib\Entities\Service::query()->find() as $service ) {
66
+ $staff_service = new Lib\Entities\StaffService();
67
+ $staff_service->loadBy( array( 'staff_id' => $staff->getId(), 'service_id' => $service->getId() ) );
68
+ if ( ! $staff_service->isLoaded() ) {
69
+ $staff_service
70
+ ->setStaffId( $staff->getId() )
71
+ ->setServiceId( $service->getId() )
72
+ ->save();
73
+ }
74
+ }
75
+ }
76
+ Lib\Entities\Staff::query()->delete()->whereNotIn( 'id', $existing_staff )->execute();
77
+ break;
78
+ case 3:
79
+ $existing_services = array();
80
+ foreach ( self::parameter( 'services', array() ) as $service_data ) {
81
+ $service = new Lib\Entities\Service();
82
+ if ( isset( $service_data['id'] ) && $service_data['id'] ) {
83
+ $service->load( $service_data['id'] );
84
+ }
85
+ $service
86
+ ->setTitle( $service_data['title'] )
87
+ ->setDuration( $service_data['duration'] )
88
+ ->save();
89
+ Proxy\Shared::serviceCreated( $service );
90
+ $existing_services[] = $service->getId();
91
+ foreach ( Lib\Entities\Staff::query()->find() as $staff ) {
92
+ $staff_service = new Lib\Entities\StaffService();
93
+ $staff_service->loadBy( array( 'staff_id' => $staff->getId(), 'service_id' => $service->getId() ) );
94
+ if ( ! $staff_service->isLoaded() ) {
95
+ $staff_service
96
+ ->setStaffId( $staff->getId() )
97
+ ->setServiceId( $service->getId() )
98
+ ->save();
99
+ }
100
+ }
101
+ }
102
+ Lib\Entities\Service::query()->delete()->whereNotIn( 'id', $existing_services )->execute();
103
+ break;
104
+ }
105
+ if ( $step < 4 ) {
106
+ update_option( 'bookly_setup_step', ++ $step );
107
+ }
108
+ }
109
+
110
+ /**
111
+ * Finish initial setup.
112
+ */
113
+ public static function finishSetupForm()
114
+ {
115
+ delete_option( 'bookly_setup_step' );
116
+
117
+ wp_send_json_success();
118
+ }
119
+ }
backend/modules/setup/Page.php ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Bookly\Backend\Modules\Setup;
3
+
4
+ use Bookly\Lib;
5
+ use Bookly\Lib\Utils\DateTime;
6
+ use Bookly\Backend\Modules\Calendar\Page as CalendarPage;
7
+
8
+ /**
9
+ * Class Page
10
+ *
11
+ * @package Bookly\Backend\Modules\Setup
12
+ */
13
+ class Page extends Lib\Base\Component
14
+ {
15
+ /**
16
+ * Render page.
17
+ */
18
+ public static function render()
19
+ {
20
+ $tel_input_enabled = get_option( 'bookly_cst_phone_default_country' ) != 'disabled';
21
+
22
+ self::enqueueStyles( array(
23
+ 'frontend' => $tel_input_enabled
24
+ ? array( 'css/intlTelInput.css' )
25
+ : array(),
26
+ 'backend' => array( 'css/fontawesome-all.min.css' => array( 'bookly-backend-globals' ) ),
27
+ 'module' => array( 'css/setup.css' => array( 'bookly-backend-globals' ) ),
28
+ ) );
29
+
30
+ self::enqueueScripts( array(
31
+ 'frontend' => $tel_input_enabled
32
+ ? array( 'js/intlTelInput.min.js' => array( 'jquery' ) )
33
+ : array(),
34
+ 'backend' => array( 'js/select2.min.js' => array( 'bookly-backend-globals' ), ),
35
+ 'module' => array( 'js/setup.js' => array( 'bookly-select2.min.js' ) ),
36
+ ) );
37
+
38
+ $industries = Lib\Utils\Common::getIndustries();
39
+
40
+ $sizes = array(
41
+ '1' => __( '1 - 9 employees', 'bookly' ),
42
+ '10' => __( '10 - 19 employees', 'bookly' ),
43
+ '20' => __( '20 - 49 employees', 'bookly' ),
44
+ '50' => __( '50 - 249 employees', 'bookly' ),
45
+ '250' => __( '250 or more employees', 'bookly' ),
46
+ );
47
+ $durations = array();
48
+ for ( $j = 15; $j <= 60; $j += 15 ) {
49
+ $durations[] = array( 'title' => DateTime::secondsToInterval( $j * 60 ), 'value' => $j * 60 );
50
+ }
51
+ for ( $j = 60 * 2; $j <= 60 * 12; $j += 60 ) {
52
+ $durations[] = array( 'title' => DateTime::secondsToInterval( $j * 60 ), 'value' => $j * 60 );
53
+ }
54
+ for ( $j = 60 * 24; $j <= 60 * 24 * 7; $j += 60 * 24 ) {
55
+ $durations[] = array( 'title' => DateTime::secondsToInterval( $j * 60 ), 'value' => $j * 60 );
56
+ }
57
+
58
+ wp_localize_script( 'bookly-setup.js', 'BooklyL10nSetupForm', Proxy\Pro::prepareOptions( array(
59
+ 'step' => get_option( 'bookly_setup_step', 1 ),
60
+ 'industries' => $industries,
61
+ 'sizes' => $sizes,
62
+ 'intlTelInput' => array(
63
+ 'enabled' => $tel_input_enabled,
64
+ 'utils' => plugins_url( 'intlTelInput.utils.js', Lib\Plugin::getDirectory() . '/frontend/resources/js/intlTelInput.utils.js' ),
65
+ 'country' => get_option( 'bookly_cst_phone_default_country' ),
66
+ ),
67
+ 'finish_url' => add_query_arg( array( 'page' => CalendarPage::pageSlug() ), admin_url( 'admin.php' ) ),
68
+ 'durations' => $durations,
69
+ 'l10n' => array(
70
+ 'company_name' => __( 'Company name', 'bookly' ),
71
+ 'industry' => __( 'Industry', 'bookly' ),
72
+ 'select_industry' => __( 'Select industry', 'bookly' ),
73
+ 'size' => __( 'Company size', 'bookly' ),
74
+ 'select_size' => __( 'Select company size', 'bookly' ),
75
+ 'company_email' => __( 'Company owner email', 'bookly' ),
76
+ 'staff_name' => __( 'Full name', 'bookly' ),
77
+ 'staff_email' => __( 'Email', 'bookly' ),
78
+ 'staff_phone' => __( 'Phone', 'bookly' ),
79
+ 'service_title' => __( 'Title', 'bookly' ),
80
+ 'service_duration' => __( 'Duration', 'bookly' ),
81
+ 'add_service' => __( 'Add service', 'bookly' ),
82
+ 'required' => __( 'Required', 'bookly' ),
83
+ 'continue' => __( 'Continue', 'bookly' ),
84
+ 'finish' => __( 'Finish', 'bookly' ),
85
+ 'skip' => __( 'Skip', 'bookly' ),
86
+ 'back' => __( 'Back', 'bookly' ),
87
+ 'delete' => __( 'Delete', 'bookly' ),
88
+ 'steps' => array(
89
+ __( 'Company', 'bookly' ),
90
+ __( 'Staff', 'bookly' ),
91
+ __( 'Service', 'bookly' ),
92
+ __( 'Done', 'bookly' ),
93
+ ),
94
+ 'done' => array(
95
+ 'string_1' => __( 'Congratulations, the initial setup is complete!', 'bookly' ),
96
+ 'string_2' => sprintf( __( 'Shortcut of your form is %s', 'bookly' ), '<input type="text" class="form-control d-inline" value="[bookly-form]" readonly style="max-width: 124px;">' ),
97
+ 'string_3' => __( 'Open the page where you want to add the booking form in page edit mode and paste this shortcut in a free block.', 'bookly' ),
98
+ 'string_4' => sprintf( __( 'You can find more detailed instructions for publishing Bookly form in our %s', 'bookly' ), sprintf( '<a href="https://support.booking-wp-plugin.com/hc/en-us/articles/212800185">%s</a>', __( 'Help center', 'bookly' ) ) ),
99
+ 'string_5' => sprintf( __( 'Bookly can boost your sales and scale together with your business. Get more features and remove the limits by upgrading to the paid version with the %s, which allows you to use a vast number of additional features and settings for online scheduling, install other add-ons for Bookly, and includes six months of customer support.', 'bookly' ), '<a href="https://codecanyon.net/item/bookly-booking-plugin-responsive-appointment-booking-and-scheduling/7226091">Bookly Pro (Add-on)</a>' ),
100
+ ),
101
+ ),
102
+ ) ) );
103
+
104
+ self::renderTemplate( 'index' );
105
+ }
106
+ }
backend/modules/setup/proxy/Pro.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Bookly\Backend\Modules\Setup\Proxy;
3
+
4
+ use Bookly\Lib;
5
+
6
+ /**
7
+ * Class Pro
8
+ *
9
+ * @package Bookly\Backend\Modules\Setup\Proxy
10
+ *
11
+ * @method static array prepareOptions( array $options ) Prepare options.
12
+ */
13
+ abstract class Pro extends Lib\Base\Proxy
14
+ {
15
+
16
+ }
backend/modules/setup/resources/css/setup.css ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #bookly-setup-form > .card {
2
+ min-height: 514px;
3
+ max-width: 800px;
4
+ position: relative;
5
+ padding-bottom: 38px;
6
+ }
7
+
8
+ .bookly-setup-footer {
9
+ position: absolute;
10
+ bottom: 0;
11
+ width: 100%;
12
+ margin-left: -20px !important;
13
+ padding: 10px;
14
+ }
15
+
16
+ .bookly-stepper {
17
+ flex-direction: row !important;
18
+ }
19
+
20
+ .bookly-stepper-number {
21
+ border: 2px solid rgba(0, 0, 0, .12);
22
+ color: #007bff;
23
+ font-weight: bold;
24
+ background-color: white;
25
+ width: 32px;
26
+ height: 32px;
27
+ border-radius: 50%;
28
+ display: inline-flex;
29
+ align-items: center;
30
+ justify-content: center;
31
+ }
32
+
33
+ .active .bookly-stepper-number {
34
+ border: 2px solid #007bff;
35
+ color: white;
36
+ font-weight: bold;
37
+ background-color: #007bff;
38
+ }
39
+
40
+ .active .bookly-stepper-title {
41
+ color: #007bff;
42
+ }
43
+
44
+ .bookly-stepper-interval {
45
+ background-color: rgba(0, 0, 0, .12);
46
+ height: 1px;
47
+ margin: auto 10px;
48
+ }
49
+
50
+
51
+ .bookly-stepper-interval.active {
52
+ background-color: #007bff;
53
+ }
54
+
55
+ .bookly-stepper-small-title {
56
+ color: #007bff;
57
+ font-weight: bold;
58
+ }
59
+
60
+ @media only screen and (max-width: 400px) {
61
+ .bookly-stepper-interval {
62
+ margin: auto;
63
+ }
64
+ }
65
+
66
+ @media only screen and (min-width: 768px) {
67
+ #bookly-tbs .card.bookly-item-card {
68
+ border: none;
69
+ }
70
+
71
+ #bookly-tbs .card.bookly-item-card .card-body {
72
+ padding: 0;
73
+ margin: 0;
74
+ }
75
+ }
backend/modules/setup/resources/js/setup.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(t,n){"use strict";function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var e=r(t),o=r(n);function i(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(t){var n={exports:{}};return t(n,n.exports),n.exports}var c=function(t){return t&&t.Math==Math&&t},f=c("object"==typeof globalThis&&globalThis)||c("object"==typeof window&&window)||c("object"==typeof self&&self)||c("object"==typeof u&&u)||function(){return this}()||Function("return this")(),l=function(t){try{return!!t()}catch(t){return!0}},s=!l((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),p={}.propertyIsEnumerable,v=Object.getOwnPropertyDescriptor,d={f:v&&!p.call({1:2},1)?function(t){var n=v(this,t);return!!n&&n.enumerable}:p},h=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}},y={}.toString,g=function(t){return y.call(t).slice(8,-1)},m="".split,b=l((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==g(t)?m.call(t,""):Object(t)}:Object,w=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},$=function(t){return b(w(t))},x=function(t){return"object"==typeof t?null!==t:"function"==typeof t},_=function(t,n){if(!x(t))return t;var r,e;if(n&&"function"==typeof(r=t.toString)&&!x(e=r.call(t)))return e;if("function"==typeof(r=t.valueOf)&&!x(e=r.call(t)))return e;if(!n&&"function"==typeof(r=t.toString)&&!x(e=r.call(t)))return e;throw TypeError("Can't convert object to primitive value")},O={}.hasOwnProperty,S=function(t,n){return O.call(t,n)},E=f.document,A=x(E)&&x(E.createElement),T=function(t){return A?E.createElement(t):{}},j=!s&&!l((function(){return 7!=Object.defineProperty(T("div"),"a",{get:function(){return 7}}).a})),k=Object.getOwnPropertyDescriptor,R={f:s?k:function(t,n){if(t=$(t),n=_(n,!0),j)try{return k(t,n)}catch(t){}if(S(t,n))return h(!d.f.call(t,n),t[n])}},P=/#|\.prototype\./,I=function(t,n){var r=C[L(t)];return r==N||r!=M&&("function"==typeof n?l(n):!!n)},L=I.normalize=function(t){return String(t).replace(P,".").toLowerCase()},C=I.data={},M=I.NATIVE="N",N=I.POLYFILL="P",F=I,B={},D=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},z=function(t,n,r){if(D(t),void 0===n)return t;switch(r){case 0:return function(){return t.call(n)};case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,o){return t.call(n,r,e,o)}}return function(){return t.apply(n,arguments)}},q=function(t){if(!x(t))throw TypeError(String(t)+" is not an object");return t},G=Object.defineProperty,U={f:s?G:function(t,n,r){if(q(t),n=_(n,!0),q(r),j)try{return G(t,n,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[n]=r.value),t}},H=s?function(t,n,r){return U.f(t,n,h(1,r))}:function(t,n,r){return t[n]=r,t},W=R.f,J=function(t){var n=function(n,r,e){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,e)}return t.apply(this,arguments)};return n.prototype=t.prototype,n},V=function(t,n){var r,e,o,i,u,a,c,l,s=t.target,p=t.global,v=t.stat,d=t.proto,h=p?f:v?f[s]:(f[s]||{}).prototype,y=p?B:B[s]||(B[s]={}),g=y.prototype;for(o in n)r=!F(p?o:s+(v?".":"#")+o,t.forced)&&h&&S(h,o),u=y[o],r&&(a=t.noTargetGet?(l=W(h,o))&&l.value:h[o]),i=r&&a?a:n[o],r&&typeof u==typeof i||(c=t.bind&&r?z(i,f):t.wrap&&r?J(i):d&&"function"==typeof i?z(Function.call,i):i,(t.sham||i&&i.sham||u&&u.sham)&&H(c,"sham",!0),y[o]=c,d&&(S(B,e=s+"Prototype")||H(B,e,{}),B[e][o]=i,t.real&&g&&!g[o]&&H(g,o,i)))};V({target:"Object",stat:!0,forced:!s,sham:!s},{defineProperty:U.f});var K=a((function(t){var n=B.Object,r=t.exports=function(t,r,e){return n.defineProperty(t,r,e)};n.defineProperty.sham&&(r.sham=!0)})),Q=K;function Y(t,n){for(var r=0;r<n.length;r++){var e=n[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Q(t,e.key,e)}}function X(t,n,r){return n&&Y(t.prototype,n),r&&Y(t,r),t}function Z(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var tt,nt=Math.ceil,rt=Math.floor,et=function(t){return isNaN(t=+t)?0:(t>0?rt:nt)(t)},ot=Math.min,it=function(t){return t>0?ot(et(t),9007199254740991):0},ut=Math.max,at=Math.min,ct=function(t,n){var r=et(t);return r<0?ut(r+n,0):at(r,n)},ft=function(t){return function(n,r,e){var o,i=$(n),u=it(i.length),a=ct(e,u);if(t&&r!=r){for(;u>a;)if((o=i[a++])!=o)return!0}else for(;u>a;a++)if((t||a in i)&&i[a]===r)return t||a||0;return!t&&-1}},lt={includes:ft(!0),indexOf:ft(!1)},st={},pt=lt.indexOf,vt=function(t,n){var r,e=$(t),o=0,i=[];for(r in e)!S(st,r)&&S(e,r)&&i.push(r);for(;n.length>o;)S(e,r=n[o++])&&(~pt(i,r)||i.push(r));return i},dt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ht=Object.keys||function(t){return vt(t,dt)},yt=s?Object.defineProperties:function(t,n){q(t);for(var r,e=ht(n),o=e.length,i=0;o>i;)U.f(t,r=e[i++],n[r]);return t},gt=function(t){return"function"==typeof t?t:void 0},mt=function(t,n){return arguments.length<2?gt(B[t])||gt(f[t]):B[t]&&B[t][n]||f[t]&&f[t][n]},bt=mt("document","documentElement"),wt=!0,$t="__core-js_shared__",xt=f[$t]||function(t,n){try{H(f,t,n)}catch(r){f[t]=n}return n}($t,{}),_t=a((function(t){(t.exports=function(t,n){return xt[t]||(xt[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.8.3",mode:"pure",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),Ot=0,St=Math.random(),Et=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++Ot+St).toString(36)},At=_t("keys"),Tt=function(t){return At[t]||(At[t]=Et(t))},jt=Tt("IE_PROTO"),kt=function(){},Rt=function(t){return"<script>"+t+"</"+"script>"},Pt=function(){try{tt=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,n;Pt=tt?function(t){t.write(Rt("")),t.close();var n=t.parentWindow.Object;return t=null,n}(tt):((n=T("iframe")).style.display="none",bt.appendChild(n),n.src=String("javascript:"),(t=n.contentWindow.document).open(),t.write(Rt("document.F=Object")),t.close(),t.F);for(var r=dt.length;r--;)delete Pt.prototype[dt[r]];return Pt()};st[jt]=!0;var It=Object.create||function(t,n){var r;return null!==t?(kt.prototype=q(t),r=new kt,kt.prototype=null,r[jt]=t):r=Pt(),void 0===n?r:yt(r,n)};V({target:"Object",stat:!0,sham:!s},{create:It});var Lt=B.Object,Ct=function(t,n){return Lt.create(t,n)},Mt=Ct,Nt=Object.setPrototypeOf||("__proto__"in{}?function(){var t,n=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),n=r instanceof Array}catch(t){}return function(r,e){return q(r),function(t){if(!x(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(e),n?t.call(r,e):r.__proto__=e,r}}():void 0);V({target:"Object",stat:!0},{setPrototypeOf:Nt});var Ft=B.Object.setPrototypeOf,Bt=Ft;function Dt(t,n){return(Dt=Bt||function(t,n){return t.__proto__=n,t})(t,n)}function zt(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Mt(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&Dt(t,n)}var qt,Gt,Ut=Array.isArray||function(t){return"Array"==g(t)},Ht=function(t){return Object(w(t))},Wt=function(t,n,r){var e=_(n);e in t?U.f(t,e,h(0,r)):t[e]=r},Jt=!!Object.getOwnPropertySymbols&&!l((function(){return!String(Symbol())})),Vt=Jt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Kt=_t("wks"),Qt=f.Symbol,Yt=Vt?Qt:Qt&&Qt.withoutSetter||Et,Xt=function(t){return S(Kt,t)||(Jt&&S(Qt,t)?Kt[t]=Qt[t]:Kt[t]=Yt("Symbol."+t)),Kt[t]},Zt=Xt("species"),tn=function(t,n){var r;return Ut(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!Ut(r.prototype)?x(r)&&null===(r=r[Zt])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===n?0:n)},nn=mt("navigator","userAgent")||"",rn=f.process,en=rn&&rn.versions,on=en&&en.v8;on?Gt=(qt=on.split("."))[0]+qt[1]:nn&&(!(qt=nn.match(/Edge\/(\d+)/))||qt[1]>=74)&&(qt=nn.match(/Chrome\/(\d+)/))&&(Gt=qt[1]);var un=Gt&&+Gt,an=Xt("species"),cn=function(t){return un>=51||!l((function(){var n=[];return(n.constructor={})[an]=function(){return{foo:1}},1!==n[t](Boolean).foo}))},fn=Xt("isConcatSpreadable"),ln=9007199254740991,sn="Maximum allowed index exceeded",pn=un>=51||!l((function(){var t=[];return t[fn]=!1,t.concat()[0]!==t})),vn=cn("concat"),dn=function(t){if(!x(t))return!1;var n=t[fn];return void 0!==n?!!n:Ut(t)};V({target:"Array",proto:!0,forced:!pn||!vn},{concat:function(t){var n,r,e,o,i,u=Ht(this),a=tn(u,0),c=0;for(n=-1,e=arguments.length;n<e;n++)if(dn(i=-1===n?u:arguments[n])){if(c+(o=it(i.length))>ln)throw TypeError(sn);for(r=0;r<o;r++,c++)r in i&&Wt(a,c,i[r])}else{if(c>=ln)throw TypeError(sn);Wt(a,c++,i)}return a.length=c,a}});var hn=dt.concat("length","prototype"),yn={f:Object.getOwnPropertyNames||function(t){return vt(t,hn)}},gn=yn.f,mn={}.toString,bn="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],wn={f:function(t){return bn&&"[object Window]"==mn.call(t)?function(t){try{return gn(t)}catch(t){return bn.slice()}}(t):gn($(t))}},$n={f:Object.getOwnPropertySymbols},xn=function(t,n,r,e){e&&e.enumerable?t[n]=r:H(t,n,r)},_n={f:Xt},On=U.f,Sn=function(t){var n=B.Symbol||(B.Symbol={});S(n,t)||On(n,t,{value:_n.f(t)})},En={};En[Xt("toStringTag")]="z";var An="[object z]"===String(En),Tn=Xt("toStringTag"),jn="Arguments"==g(function(){return arguments}()),kn=An?g:function(t){var n,r,e;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,n){try{return t[n]}catch(t){}}(n=Object(t),Tn))?r:jn?g(n):"Object"==(e=g(n))&&"function"==typeof n.callee?"Arguments":e},Rn=An?{}.toString:function(){return"[object "+kn(this)+"]"},Pn=U.f,In=Xt("toStringTag"),Ln=function(t,n,r,e){if(t){var o=r?t:t.prototype;S(o,In)||Pn(o,In,{configurable:!0,value:n}),e&&!An&&H(o,"toString",Rn)}},Cn=Function.toString;"function"!=typeof xt.inspectSource&&(xt.inspectSource=function(t){return Cn.call(t)});var Mn,Nn,Fn,Bn=xt.inspectSource,Dn=f.WeakMap,zn="function"==typeof Dn&&/native code/.test(Bn(Dn)),qn=f.WeakMap;if(zn){var Gn=xt.state||(xt.state=new qn),Un=Gn.get,Hn=Gn.has,Wn=Gn.set;Mn=function(t,n){return n.facade=t,Wn.call(Gn,t,n),n},Nn=function(t){return Un.call(Gn,t)||{}},Fn=function(t){return Hn.call(Gn,t)}}else{var Jn=Tt("state");st[Jn]=!0,Mn=function(t,n){return n.facade=t,H(t,Jn,n),n},Nn=function(t){return S(t,Jn)?t[Jn]:{}},Fn=function(t){return S(t,Jn)}}var Vn={set:Mn,get:Nn,has:Fn,enforce:function(t){return Fn(t)?Nn(t):Mn(t,{})},getterFor:function(t){return function(n){var r;if(!x(n)||(r=Nn(n)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},Kn=[].push,Qn=function(t){var n=1==t,r=2==t,e=3==t,o=4==t,i=6==t,u=7==t,a=5==t||i;return function(c,f,l,s){for(var p,v,d=Ht(c),h=b(d),y=z(f,l,3),g=it(h.length),m=0,w=s||tn,$=n?w(c,g):r||u?w(c,0):void 0;g>m;m++)if((a||m in h)&&(v=y(p=h[m],m,d),t))if(n)$[m]=v;else if(v)switch(t){case 3:return!0;case 5:return p;case 6:return m;case 2:Kn.call($,p)}else switch(t){case 4:return!1;case 7:Kn.call($,p)}return i?-1:e||o?o:$}},Yn={forEach:Qn(0),map:Qn(1),filter:Qn(2),some:Qn(3),every:Qn(4),find:Qn(5),findIndex:Qn(6),filterOut:Qn(7)},Xn=Yn.forEach,Zn=Tt("hidden"),tr="Symbol",nr=Xt("toPrimitive"),rr=Vn.set,er=Vn.getterFor(tr),or=Object.prototype,ir=f.Symbol,ur=mt("JSON","stringify"),ar=R.f,cr=U.f,fr=wn.f,lr=d.f,sr=_t("symbols"),pr=_t("op-symbols"),vr=_t("string-to-symbol-registry"),dr=_t("symbol-to-string-registry"),hr=_t("wks"),yr=f.QObject,gr=!yr||!yr.prototype||!yr.prototype.findChild,mr=s&&l((function(){return 7!=It(cr({},"a",{get:function(){return cr(this,"a",{value:7}).a}})).a}))?function(t,n,r){var e=ar(or,n);e&&delete or[n],cr(t,n,r),e&&t!==or&&cr(or,n,e)}:cr,br=function(t,n){var r=sr[t]=It(ir.prototype);return rr(r,{type:tr,tag:t,description:n}),s||(r.description=n),r},wr=Vt?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof ir},$r=function(t,n,r){t===or&&$r(pr,n,r),q(t);var e=_(n,!0);return q(r),S(sr,e)?(r.enumerable?(S(t,Zn)&&t[Zn][e]&&(t[Zn][e]=!1),r=It(r,{enumerable:h(0,!1)})):(S(t,Zn)||cr(t,Zn,h(1,{})),t[Zn][e]=!0),mr(t,e,r)):cr(t,e,r)},xr=function(t,n){q(t);var r=$(n),e=ht(r).concat(Er(r));return Xn(e,(function(n){s&&!_r.call(r,n)||$r(t,n,r[n])})),t},_r=function(t){var n=_(t,!0),r=lr.call(this,n);return!(this===or&&S(sr,n)&&!S(pr,n))&&(!(r||!S(this,n)||!S(sr,n)||S(this,Zn)&&this[Zn][n])||r)},Or=function(t,n){var r=$(t),e=_(n,!0);if(r!==or||!S(sr,e)||S(pr,e)){var o=ar(r,e);return!o||!S(sr,e)||S(r,Zn)&&r[Zn][e]||(o.enumerable=!0),o}},Sr=function(t){var n=fr($(t)),r=[];return Xn(n,(function(t){S(sr,t)||S(st,t)||r.push(t)})),r},Er=function(t){var n=t===or,r=fr(n?pr:$(t)),e=[];return Xn(r,(function(t){!S(sr,t)||n&&!S(or,t)||e.push(sr[t])})),e};if(Jt||(xn((ir=function(){if(this instanceof ir)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,n=Et(t),r=function(t){this===or&&r.call(pr,t),S(this,Zn)&&S(this[Zn],n)&&(this[Zn][n]=!1),mr(this,n,h(1,t))};return s&&gr&&mr(or,n,{configurable:!0,set:r}),br(n,t)}).prototype,"toString",(function(){return er(this).tag})),xn(ir,"withoutSetter",(function(t){return br(Et(t),t)})),d.f=_r,U.f=$r,R.f=Or,yn.f=wn.f=Sr,$n.f=Er,_n.f=function(t){return br(Xt(t),t)},s&&cr(ir.prototype,"description",{configurable:!0,get:function(){return er(this).description}})),V({global:!0,wrap:!0,forced:!Jt,sham:!Jt},{Symbol:ir}),Xn(ht(hr),(function(t){Sn(t)})),V({target:tr,stat:!0,forced:!Jt},{for:function(t){var n=String(t);if(S(vr,n))return vr[n];var r=ir(n);return vr[n]=r,dr[r]=n,r},keyFor:function(t){if(!wr(t))throw TypeError(t+" is not a symbol");if(S(dr,t))return dr[t]},useSetter:function(){gr=!0},useSimple:function(){gr=!1}}),V({target:"Object",stat:!0,forced:!Jt,sham:!s},{create:function(t,n){return void 0===n?It(t):xr(It(t),n)},defineProperty:$r,defineProperties:xr,getOwnPropertyDescriptor:Or}),V({target:"Object",stat:!0,forced:!Jt},{getOwnPropertyNames:Sr,getOwnPropertySymbols:Er}),V({target:"Object",stat:!0,forced:l((function(){$n.f(1)}))},{getOwnPropertySymbols:function(t){return $n.f(Ht(t))}}),ur){var Ar=!Jt||l((function(){var t=ir();return"[null]"!=ur([t])||"{}"!=ur({a:t})||"{}"!=ur(Object(t))}));V({target:"JSON",stat:!0,forced:Ar},{stringify:function(t,n,r){for(var e,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(e=n,(x(n)||void 0!==t)&&!wr(t))return Ut(n)||(n=function(t,n){if("function"==typeof e&&(n=e.call(this,t,n)),!wr(n))return n}),o[1]=n,ur.apply(null,o)}})}ir.prototype[nr]||H(ir.prototype,nr,ir.prototype.valueOf),Ln(ir,tr),st[Zn]=!0,Sn("asyncIterator"),Sn("hasInstance"),Sn("isConcatSpreadable"),Sn("iterator"),Sn("match"),Sn("matchAll"),Sn("replace"),Sn("search"),Sn("species"),Sn("split"),Sn("toPrimitive"),Sn("toStringTag"),Sn("unscopables"),Ln(f.JSON,"JSON",!0);var Tr=B.Symbol;Sn("asyncDispose"),Sn("dispose"),Sn("observable"),Sn("patternMatch"),Sn("replaceAll");var jr,kr,Rr,Pr=Tr,Ir=function(t){return function(n,r){var e,o,i=String(w(n)),u=et(r),a=i.length;return u<0||u>=a?t?"":void 0:(e=i.charCodeAt(u))<55296||e>56319||u+1===a||(o=i.charCodeAt(u+1))<56320||o>57343?t?i.charAt(u):e:t?i.slice(u,u+2):o-56320+(e-55296<<10)+65536}},Lr={codeAt:Ir(!1),charAt:Ir(!0)},Cr=!l((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Mr=Tt("IE_PROTO"),Nr=Object.prototype,Fr=Cr?Object.getPrototypeOf:function(t){return t=Ht(t),S(t,Mr)?t[Mr]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Nr:null},Br=Xt("iterator"),Dr=!1;[].keys&&("next"in(Rr=[].keys())?(kr=Fr(Fr(Rr)))!==Object.prototype&&(jr=kr):Dr=!0);var zr=null==jr||l((function(){var t={};return jr[Br].call(t)!==t}));zr&&(jr={}),zr&&!S(jr,Br)&&H(jr,Br,(function(){return this}));var qr={IteratorPrototype:jr,BUGGY_SAFARI_ITERATORS:Dr},Gr={},Ur=qr.IteratorPrototype,Hr=function(){return this},Wr=qr.IteratorPrototype,Jr=qr.BUGGY_SAFARI_ITERATORS,Vr=Xt("iterator"),Kr="keys",Qr="values",Yr="entries",Xr=function(){return this},Zr=function(t,n,r,e,o,i,u){!function(t,n,r){var e=n+" Iterator";t.prototype=It(Ur,{next:h(1,r)}),Ln(t,e,!1,!0),Gr[e]=Hr}(r,n,e);var a,c,f,l=function(t){if(t===o&&y)return y;if(!Jr&&t in v)return v[t];switch(t){case Kr:case Qr:case Yr:return function(){return new r(this,t)}}return function(){return new r(this)}},s=n+" Iterator",p=!1,v=t.prototype,d=v[Vr]||v["@@iterator"]||o&&v[o],y=!Jr&&d||l(o),g="Array"==n&&v.entries||d;if(g&&(a=Fr(g.call(new t)),Wr!==Object.prototype&&a.next&&(Ln(a,s,!0,!0),Gr[s]=Xr)),o==Qr&&d&&d.name!==Qr&&(p=!0,y=function(){return d.call(this)}),u&&v[Vr]!==y&&H(v,Vr,y),Gr[n]=y,o)if(c={values:l(Qr),keys:i?y:l(Kr),entries:l(Yr)},u)for(f in c)(Jr||p||!(f in v))&&xn(v,f,c[f]);else V({target:n,proto:!0,forced:Jr||p},c);return c},te=Lr.charAt,ne="String Iterator",re=Vn.set,ee=Vn.getterFor(ne);Zr(String,"String",(function(t){re(this,{type:ne,string:String(t),index:0})}),(function(){var t,n=ee(this),r=n.string,e=n.index;return e>=r.length?{value:void 0,done:!0}:(t=te(r,e),n.index+=t.length,{value:t,done:!1})}));var oe="Array Iterator",ie=Vn.set,ue=Vn.getterFor(oe);Zr(Array,"Array",(function(t,n){ie(this,{type:oe,target:$(t),index:0,kind:n})}),(function(){var t=ue(this),n=t.target,r=t.kind,e=t.index++;return!n||e>=n.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:e,done:!1}:"values"==r?{value:n[e],done:!1}:{value:[e,n[e]],done:!1}}),"values"),Gr.Arguments=Gr.Array;var ae=Xt("toStringTag");for(var ce in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var fe=f[ce],le=fe&&fe.prototype;le&&kn(le)!==ae&&H(le,ae,ce),Gr[ce]=Gr.Array}var se=_n.f("iterator");function pe(t){return(pe="function"==typeof Pr&&"symbol"==typeof se?function(t){return typeof t}:function(t){return t&&"function"==typeof Pr&&t.constructor===Pr&&t!==Pr.prototype?"symbol":typeof t})(t)}function ve(t,n){return!n||"object"!==pe(n)&&"function"!=typeof n?Z(t):n}var de=l((function(){Fr(1)}));V({target:"Object",stat:!0,forced:de,sham:!Cr},{getPrototypeOf:function(t){return Fr(Ht(t))}});var he=B.Object.getPrototypeOf,ye=he;function ge(t){return(ge=Bt?ye:function(t){return t.__proto__||ye(t)})(t)}V({target:"Array",stat:!0},{isArray:Ut});var me=B.Array.isArray;var be=Xt("iterator"),we=function(t){var n=Object(t);return void 0!==n[be]||"@@iterator"in n||Gr.hasOwnProperty(kn(n))},$e=Xt("iterator"),xe=function(t){if(null!=t)return t[$e]||t["@@iterator"]||Gr[kn(t)]},_e=function(t){var n=xe(t);if("function"!=typeof n)throw TypeError(String(t)+" is not iterable");return q(n.call(t))},Oe=_e;var Se=Object.defineProperty,Ee={},Ae=function(t){throw t},Te=function(t,n){if(S(Ee,t))return Ee[t];n||(n={});var r=[][t],e=!!S(n,"ACCESSORS")&&n.ACCESSORS,o=S(n,0)?n[0]:Ae,i=S(n,1)?n[1]:void 0;return Ee[t]=!!r&&!l((function(){if(e&&!s)return!0;var t={length:-1};e?Se(t,1,{enumerable:!0,get:Ae}):t[1]=1,r.call(t,o,i)}))},je=cn("slice"),ke=Te("slice",{ACCESSORS:!0,0:0,1:2}),Re=Xt("species"),Pe=[].slice,Ie=Math.max;V({target:"Array",proto:!0,forced:!je||!ke},{slice:function(t,n){var r,e,o,i=$(this),u=it(i.length),a=ct(t,u),c=ct(void 0===n?u:n,u);if(Ut(i)&&("function"!=typeof(r=i.constructor)||r!==Array&&!Ut(r.prototype)?x(r)&&null===(r=r[Re])&&(r=void 0):r=void 0,r===Array||void 0===r))return Pe.call(i,a,c);for(e=new(void 0===r?Array:r)(Ie(c-a,0)),o=0;a<c;a++,o++)a in i&&Wt(e,o,i[a]);return e.length=o,e}});var Le=function(t){return B[t+"Prototype"]},Ce=Le("Array").slice,Me=Array.prototype,Ne=function(t){var n=t.slice;return t===Me||t instanceof Array&&n===Me.slice?Ce:n},Fe=Ne,Be=function(t){var n=t.return;if(void 0!==n)return q(n.call(t)).value},De=function(t,n,r,e){try{return e?n(q(r)[0],r[1]):n(r)}catch(n){throw Be(t),n}},ze=Xt("iterator"),qe=Array.prototype,Ge=function(t){return void 0!==t&&(Gr.Array===t||qe[ze]===t)},Ue=Xt("iterator"),He=!1;try{var We=0,Je={next:function(){return{done:!!We++}},return:function(){He=!0}};Je[Ue]=function(){return this},Array.from(Je,(function(){throw 2}))}catch(t){}var Ve=function(t,n){if(!n&&!He)return!1;var r=!1;try{var e={};e[Ue]=function(){return{next:function(){return{done:r=!0}}}},t(e)}catch(t){}return r},Ke=!Ve((function(t){Array.from(t)}));V({target:"Array",stat:!0,forced:Ke},{from:function(t){var n,r,e,o,i,u,a=Ht(t),c="function"==typeof this?this:Array,f=arguments.length,l=f>1?arguments[1]:void 0,s=void 0!==l,p=xe(a),v=0;if(s&&(l=z(l,f>2?arguments[2]:void 0,2)),null==p||c==Array&&Ge(p))for(r=new c(n=it(a.length));n>v;v++)u=s?l(a[v],v):a[v],Wt(r,v,u);else for(i=(o=p.call(a)).next,r=new c;!(e=i.call(o)).done;v++)u=s?De(o,l,[e.value,v],!0):e.value,Wt(r,v,u);return r.length=v,r}});var Qe=B.Array.from,Ye=Qe;function Xe(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}function Ze(t,n){var r;if(t){if("string"==typeof t)return Xe(t,n);var e=Fe(r=Object.prototype.toString.call(t)).call(r,8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Ye(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Xe(t,n):void 0}}function to(t,n){return function(t){if(me(t))return t}(t)||function(t,n){if(void 0!==Pr&&we(Object(t))){var r=[],e=!0,o=!1,i=void 0;try{for(var u,a=Oe(t);!(e=(u=a.next()).done)&&(r.push(u.value),!n||r.length!==n);e=!0);}catch(t){o=!0,i=t}finally{try{e||null==a.return||a.return()}finally{if(o)throw i}}return r}}(t,n)||Ze(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var no="\t\n\v\f\r                 \u2028\u2029\ufeff",ro="["+no+"]",eo=RegExp("^"+ro+ro+"*"),oo=RegExp(ro+ro+"*$"),io=function(t){return function(n){var r=String(w(n));return 1&t&&(r=r.replace(eo,"")),2&t&&(r=r.replace(oo,"")),r}},uo={start:io(1),end:io(2),trim:io(3)},ao=uo.trim,co=f.parseInt,fo=/^[+-]?0[Xx]/,lo=8!==co(no+"08")||22!==co(no+"0x16")?function(t,n){var r=ao(String(t));return co(r,n>>>0||(fo.test(r)?16:10))}:co;V({global:!0,forced:parseInt!=lo},{parseInt:lo});var so=B.parseInt,po=[].slice,vo={},ho=function(t,n,r){if(!(n in vo)){for(var e=[],o=0;o<n;o++)e[o]="a["+o+"]";vo[n]=Function("C,a","return new C("+e.join(",")+")")}return vo[n](t,r)},yo=Function.bind||function(t){var n=D(this),r=po.call(arguments,1),e=function(){var o=r.concat(po.call(arguments));return this instanceof e?ho(n,o.length,o):n.apply(t,o)};return x(n.prototype)&&(e.prototype=n.prototype),e},go=mt("Reflect","construct"),mo=l((function(){function t(){}return!(go((function(){}),[],t)instanceof t)})),bo=!l((function(){go((function(){}))})),wo=mo||bo;V({target:"Reflect",stat:!0,forced:wo,sham:wo},{construct:function(t,n){D(t),q(n);var r=arguments.length<3?t:D(arguments[2]);if(bo&&!mo)return go(t,n,r);if(t==r){switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3])}var e=[null];return e.push.apply(e,n),new(yo.apply(t,e))}var o=r.prototype,i=It(x(o)?o:Object.prototype),u=Function.apply.call(t,i,n);return x(u)?u:i}});var $o=B.Reflect.construct;V({target:"Reflect",stat:!0},{get:function t(n,r){var e,o,i=arguments.length<3?n:arguments[2];return q(n)===i?n[r]:(e=R.f(n,r))?S(e,"value")?e.value:void 0===e.get?void 0:e.get.call(i):x(o=Fr(n))?t(o,r,i):void 0}}),B.Reflect.get;var xo=R.f,_o=l((function(){xo(1)}));V({target:"Object",stat:!0,forced:!s||_o,sham:!s},{getOwnPropertyDescriptor:function(t,n){return xo($(t),n)}});var Oo=a((function(t){var n=B.Object,r=t.exports=function(t,r){return n.getOwnPropertyDescriptor(t,r)};n.getOwnPropertyDescriptor.sham&&(r.sham=!0)})),So=!l((function(){return Object.isExtensible(Object.preventExtensions({}))})),Eo=a((function(t){var n=U.f,r=Et("meta"),e=0,o=Object.isExtensible||function(){return!0},i=function(t){n(t,r,{value:{objectID:"O"+ ++e,weakData:{}}})},u=t.exports={REQUIRED:!1,fastKey:function(t,n){if(!x(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!S(t,r)){if(!o(t))return"F";if(!n)return"E";i(t)}return t[r].objectID},getWeakData:function(t,n){if(!S(t,r)){if(!o(t))return!0;if(!n)return!1;i(t)}return t[r].weakData},onFreeze:function(t){return So&&u.REQUIRED&&o(t)&&!S(t,r)&&i(t),t}};st[r]=!0})),Ao=function(t,n){this.stopped=t,this.result=n},To=function(t,n,r){var e,o,i,u,a,c,f,l=r&&r.that,s=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),d=z(n,l,1+s+v),h=function(t){return e&&Be(e),new Ao(!0,t)},y=function(t){return s?(q(t),v?d(t[0],t[1],h):d(t[0],t[1])):v?d(t,h):d(t)};if(p)e=t;else{if("function"!=typeof(o=xe(t)))throw TypeError("Target is not iterable");if(Ge(o)){for(i=0,u=it(t.length);u>i;i++)if((a=y(t[i]))&&a instanceof Ao)return a;return new Ao(!1)}e=o.call(t)}for(c=e.next;!(f=c.call(e)).done;){try{a=y(f.value)}catch(t){throw Be(e),t}if("object"==typeof a&&a&&a instanceof Ao)return a}return new Ao(!1)},jo=function(t,n,r){if(!(t instanceof n))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t},ko=U.f,Ro=Yn.forEach,Po=Vn.set,Io=Vn.getterFor,Lo=function(t,n,r){var e,o=-1!==t.indexOf("Map"),i=-1!==t.indexOf("Weak"),u=o?"set":"add",a=f[t],c=a&&a.prototype,p={};if(s&&"function"==typeof a&&(i||c.forEach&&!l((function(){(new a).entries().next()})))){e=n((function(n,r){Po(jo(n,e,t),{type:t,collection:new a}),null!=r&&To(r,n[u],{that:n,AS_ENTRIES:o})}));var v=Io(t);Ro(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var n="add"==t||"set"==t;!(t in c)||i&&"clear"==t||H(e.prototype,t,(function(r,e){var o=v(this).collection;if(!n&&i&&!x(r))return"get"==t&&void 0;var u=o[t](0===r?0:r,e);return n?this:u}))})),i||ko(e.prototype,"size",{configurable:!0,get:function(){return v(this).collection.size}})}else e=r.getConstructor(n,t,o,u),Eo.REQUIRED=!0;return Ln(e,t,!1,!0),p[t]=e,V({global:!0,forced:!0},p),i||r.setStrong(e,t,o),e},Co=function(t,n,r){for(var e in n)r&&r.unsafe&&t[e]?t[e]=n[e]:xn(t,e,n[e],r);return t},Mo=Xt("species"),No=function(t){var n=mt(t),r=U.f;s&&n&&!n[Mo]&&r(n,Mo,{configurable:!0,get:function(){return this}})},Fo=U.f,Bo=Eo.fastKey,Do=Vn.set,zo=Vn.getterFor,qo={getConstructor:function(t,n,r,e){var o=t((function(t,i){jo(t,o,n),Do(t,{type:n,index:It(null),first:void 0,last:void 0,size:0}),s||(t.size=0),null!=i&&To(i,t[e],{that:t,AS_ENTRIES:r})})),i=zo(n),u=function(t,n,r){var e,o,u=i(t),c=a(t,n);return c?c.value=r:(u.last=c={index:o=Bo(n,!0),key:n,value:r,previous:e=u.last,next:void 0,removed:!1},u.first||(u.first=c),e&&(e.next=c),s?u.size++:t.size++,"F"!==o&&(u.index[o]=c)),t},a=function(t,n){var r,e=i(t),o=Bo(n);if("F"!==o)return e.index[o];for(r=e.first;r;r=r.next)if(r.key==n)return r};return Co(o.prototype,{clear:function(){for(var t=i(this),n=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete n[r.index],r=r.next;t.first=t.last=void 0,s?t.size=0:this.size=0},delete:function(t){var n=this,r=i(n),e=a(n,t);if(e){var o=e.next,u=e.previous;delete r.index[e.index],e.removed=!0,u&&(u.next=o),o&&(o.previous=u),r.first==e&&(r.first=o),r.last==e&&(r.last=u),s?r.size--:n.size--}return!!e},forEach:function(t){for(var n,r=i(this),e=z(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.next:r.first;)for(e(n.value,n.key,this);n&&n.removed;)n=n.previous},has:function(t){return!!a(this,t)}}),Co(o.prototype,r?{get:function(t){var n=a(this,t);return n&&n.value},set:function(t,n){return u(this,0===t?0:t,n)}}:{add:function(t){return u(this,t=0===t?0:t,t)}}),s&&Fo(o.prototype,"size",{get:function(){return i(this).size}}),o},setStrong:function(t,n,r){var e=n+" Iterator",o=zo(n),i=zo(e);Zr(t,n,(function(t,n){Do(this,{type:e,target:t,state:o(t),kind:n,last:void 0})}),(function(){for(var t=i(this),n=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?"keys"==n?{value:r.key,done:!1}:"values"==n?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),No(n)}};Lo("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),qo);var Go=B.Map;V({target:"Map",stat:!0},{from:function(t){var n,r,e,o,i=arguments.length,u=i>1?arguments[1]:void 0;return D(this),(n=void 0!==u)&&D(u),null==t?new this:(r=[],n?(e=0,o=z(u,i>2?arguments[2]:void 0,2),To(t,(function(t){r.push(o(t,e++))}))):To(t,r.push,{that:r}),new this(r))}});V({target:"Map",stat:!0},{of:function(){for(var t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return new this(n)}});var Uo=function(){for(var t,n=q(this),r=D(n.delete),e=!0,o=0,i=arguments.length;o<i;o++)t=r.call(n,arguments[o]),e=e&&t;return!!e};V({target:"Map",proto:!0,real:!0,forced:wt},{deleteAll:function(){return Uo.apply(this,arguments)}});V({target:"Map",proto:!0,real:!0,forced:wt},{emplace:function(t,n){var r=q(this),e=r.has(t)&&"update"in n?n.update(r.get(t),t,r):n.insert(t,r);return r.set(t,e),e}});var Ho=_e;V({target:"Map",proto:!0,real:!0,forced:wt},{every:function(t){var n=q(this),r=Ho(n),e=z(t,arguments.length>1?arguments[1]:void 0,3);return!To(r,(function(t,r,o){if(!e(r,t,n))return o()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var Wo=Xt("species"),Jo=function(t,n){var r,e=q(t).constructor;return void 0===e||null==(r=q(e)[Wo])?n:D(r)};V({target:"Map",proto:!0,real:!0,forced:wt},{filter:function(t){var n=q(this),r=Ho(n),e=z(t,arguments.length>1?arguments[1]:void 0,3),o=new(Jo(n,mt("Map"))),i=D(o.set);return To(r,(function(t,r){e(r,t,n)&&i.call(o,t,r)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}}),V({target:"Map",proto:!0,real:!0,forced:wt},{find:function(t){var n=q(this),r=Ho(n),e=z(t,arguments.length>1?arguments[1]:void 0,3);return To(r,(function(t,r,o){if(e(r,t,n))return o(r)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),V({target:"Map",proto:!0,real:!0,forced:wt},{findKey:function(t){var n=q(this),r=Ho(n),e=z(t,arguments.length>1?arguments[1]:void 0,3);return To(r,(function(t,r,o){if(e(r,t,n))return o(t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),V({target:"Map",stat:!0},{groupBy:function(t,n){var r=new this;D(n);var e=D(r.has),o=D(r.get),i=D(r.set);return To(t,(function(t){var u=n(t);e.call(r,u)?o.call(r,u).push(t):i.call(r,u,[t])})),r}});V({target:"Map",proto:!0,real:!0,forced:wt},{includes:function(t){return To(Ho(q(this)),(function(n,r,e){if((o=r)===(i=t)||o!=o&&i!=i)return e();var o,i}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}}),V({target:"Map",stat:!0},{keyBy:function(t,n){var r=new this;D(n);var e=D(r.set);return To(t,(function(t){e.call(r,n(t),t)})),r}}),V({target:"Map",proto:!0,real:!0,forced:wt},{keyOf:function(t){return To(Ho(q(this)),(function(n,r,e){if(r===t)return e(n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),V({target:"Map",proto:!0,real:!0,forced:wt},{mapKeys:function(t){var n=q(this),r=Ho(n),e=z(t,arguments.length>1?arguments[1]:void 0,3),o=new(Jo(n,mt("Map"))),i=D(o.set);return To(r,(function(t,r){i.call(o,e(r,t,n),r)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}}),V({target:"Map",proto:!0,real:!0,forced:wt},{mapValues:function(t){var n=q(this),r=Ho(n),e=z(t,arguments.length>1?arguments[1]:void 0,3),o=new(Jo(n,mt("Map"))),i=D(o.set);return To(r,(function(t,r){i.call(o,t,e(r,t,n))}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}}),V({target:"Map",proto:!0,real:!0,forced:wt},{merge:function(t){for(var n=q(this),r=D(n.set),e=0;e<arguments.length;)To(arguments[e++],r,{that:n,AS_ENTRIES:!0});return n}}),V({target:"Map",proto:!0,real:!0,forced:wt},{reduce:function(t){var n=q(this),r=Ho(n),e=arguments.length<2,o=e?void 0:arguments[1];if(D(t),To(r,(function(r,i){e?(e=!1,o=i):o=t(o,i,r,n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),e)throw TypeError("Reduce of empty map with no initial value");return o}}),V({target:"Map",proto:!0,real:!0,forced:wt},{some:function(t){var n=q(this),r=Ho(n),e=z(t,arguments.length>1?arguments[1]:void 0,3);return To(r,(function(t,r,o){if(e(r,t,n))return o()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}}),V({target:"Map",proto:!0,real:!0,forced:wt},{update:function(t,n){var r=q(this),e=arguments.length;D(n);var o=r.has(t);if(!o&&e<3)throw TypeError("Updating absent value");var i=o?r.get(t):D(e>2?arguments[2]:void 0)(t,r);return r.set(t,n(i,t,r)),r}});var Vo=function(t,n){var r,e=q(this),o=arguments.length>2?arguments[2]:void 0;if("function"!=typeof n&&"function"!=typeof o)throw TypeError("At least one callback required");return e.has(t)?(r=e.get(t),"function"==typeof n&&(r=n(r),e.set(t,r))):"function"==typeof o&&(r=o(),e.set(t,r)),r};V({target:"Map",proto:!0,real:!0,forced:wt},{upsert:Vo}),V({target:"Map",proto:!0,real:!0,forced:wt},{updateOrInsert:Vo});var Ko=function(t,n){var r=[][t];return!!r&&l((function(){r.call(null,n||function(){throw 1},1)}))},Qo=lt.indexOf,Yo=[].indexOf,Xo=!!Yo&&1/[1].indexOf(1,-0)<0,Zo=Ko("indexOf"),ti=Te("indexOf",{ACCESSORS:!0,1:0});V({target:"Array",proto:!0,forced:Xo||!Zo||!ti},{indexOf:function(t){return Xo?Yo.apply(this,arguments)||0:Qo(this,t,arguments.length>1?arguments[1]:void 0)}});var ni=Le("Array").indexOf,ri=Array.prototype,ei=function(t){var n=t.indexOf;return t===ri||t instanceof Array&&n===ri.indexOf?ni:n},oi=ei;function ii(t){return function(t){if(me(t))return Xe(t)}(t)||function(t){if(void 0!==Pr&&we(Object(t)))return Ye(t)}(t)||Ze(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}V({target:"Function",proto:!0},{bind:yo}),Le("Function").bind;var ui=Ct,ai=Yn.forEach,ci=Ko("forEach"),fi=Te("forEach"),li=ci&&fi?[].forEach:function(t){return ai(this,t,arguments.length>1?arguments[1]:void 0)};V({target:"Array",proto:!0,forced:[].forEach!=li},{forEach:li});var si=Le("Array").forEach,pi=Array.prototype,vi={DOMTokenList:!0,NodeList:!0},di=function(t){var n=t.forEach;return t===pi||t instanceof Array&&n===pi.forEach||vi.hasOwnProperty(kn(t))?si:n},hi=l((function(){ht(1)}));V({target:"Object",stat:!0,forced:hi},{keys:function(t){return ht(Ht(t))}});var yi=B.Object.keys,gi=yi,mi=Ne;Lo("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),qo);var bi=B.Set,wi=Le("Array").concat,$i=Array.prototype,xi=function(t){var n=t.concat;return t===$i||t instanceof Array&&n===$i.concat?wi:n};V({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}});var _i=B.Date.now,Oi=function(t,n){var r=this;if(!(r instanceof Oi))return new Oi(t,n);Nt&&(r=Nt(new Error(void 0),Fr(r))),void 0!==n&&H(r,"message",String(n));var e=[];return To(t,e.push,{that:e}),H(r,"errors",e),r};Oi.prototype=It(Error.prototype,{constructor:h(5,Oi),message:h(5,""),name:h(5,"AggregateError")}),V({global:!0},{AggregateError:Oi});var Si,Ei,Ai,Ti=f.Promise,ji=/(iphone|ipod|ipad).*applewebkit/i.test(nn),ki="process"==g(f.process),Ri=f.location,Pi=f.setImmediate,Ii=f.clearImmediate,Li=f.process,Ci=f.MessageChannel,Mi=f.Dispatch,Ni=0,Fi={},Bi="onreadystatechange",Di=function(t){if(Fi.hasOwnProperty(t)){var n=Fi[t];delete Fi[t],n()}},zi=function(t){return function(){Di(t)}},qi=function(t){Di(t.data)},Gi=function(t){f.postMessage(t+"",Ri.protocol+"//"+Ri.host)};Pi&&Ii||(Pi=function(t){for(var n=[],r=1;arguments.length>r;)n.push(arguments[r++]);return Fi[++Ni]=function(){("function"==typeof t?t:Function(t)).apply(void 0,n)},Si(Ni),Ni},Ii=function(t){delete Fi[t]},ki?Si=function(t){Li.nextTick(zi(t))}:Mi&&Mi.now?Si=function(t){Mi.now(zi(t))}:Ci&&!ji?(Ai=(Ei=new Ci).port2,Ei.port1.onmessage=qi,Si=z(Ai.postMessage,Ai,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts&&Ri&&"file:"!==Ri.protocol&&!l(Gi)?(Si=Gi,f.addEventListener("message",qi,!1)):Si=Bi in T("script")?function(t){bt.appendChild(T("script")).onreadystatechange=function(){bt.removeChild(this),Di(t)}}:function(t){setTimeout(zi(t),0)});var Ui,Hi,Wi,Ji,Vi,Ki,Qi,Yi,Xi={set:Pi,clear:Ii},Zi=/web0s(?!.*chrome)/i.test(nn),tu=R.f,nu=Xi.set,ru=f.MutationObserver||f.WebKitMutationObserver,eu=f.document,ou=f.process,iu=f.Promise,uu=tu(f,"queueMicrotask"),au=uu&&uu.value;au||(Ui=function(){var t,n;for(ki&&(t=ou.domain)&&t.exit();Hi;){n=Hi.fn,Hi=Hi.next;try{n()}catch(t){throw Hi?Ji():Wi=void 0,t}}Wi=void 0,t&&t.enter()},ji||ki||Zi||!ru||!eu?iu&&iu.resolve?(Qi=iu.resolve(void 0),Yi=Qi.then,Ji=function(){Yi.call(Qi,Ui)}):Ji=ki?function(){ou.nextTick(Ui)}:function(){nu.call(f,Ui)}:(Vi=!0,Ki=eu.createTextNode(""),new ru(Ui).observe(Ki,{characterData:!0}),Ji=function(){Ki.data=Vi=!Vi}));var cu=au||function(t){var n={fn:t,next:void 0};Wi&&(Wi.next=n),Hi||(Hi=n,Ji()),Wi=n},fu=function(t){var n,r;this.promise=new t((function(t,e){if(void 0!==n||void 0!==r)throw TypeError("Bad Promise constructor");n=t,r=e})),this.resolve=D(n),this.reject=D(r)},lu={f:function(t){return new fu(t)}},su=function(t,n){if(q(t),x(n)&&n.constructor===t)return n;var r=lu.f(t);return(0,r.resolve)(n),r.promise},pu=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},vu=Xi.set,du=Xt("species"),hu="Promise",yu=Vn.get,gu=Vn.set,mu=Vn.getterFor(hu),bu=Ti,wu=f.TypeError,$u=f.document,xu=f.process;mt("fetch");var _u,Ou,Su,Eu=lu.f,Au=Eu,Tu=!!($u&&$u.createEvent&&f.dispatchEvent),ju="function"==typeof PromiseRejectionEvent,ku="unhandledrejection",Ru=F(hu,(function(){if(!(Bn(bu)!==String(bu))){if(66===un)return!0;if(!ki&&!ju)return!0}if(!bu.prototype.finally)return!0;if(un>=51&&/native code/.test(bu))return!1;var t=bu.resolve(1),n=function(t){t((function(){}),(function(){}))};return(t.constructor={})[du]=n,!(t.then((function(){}))instanceof n)})),Pu=Ru||!Ve((function(t){bu.all(t).catch((function(){}))})),Iu=function(t){var n;return!(!x(t)||"function"!=typeof(n=t.then))&&n},Lu=function(t,n){if(!t.notified){t.notified=!0;var r=t.reactions;cu((function(){for(var e=t.value,o=1==t.state,i=0;r.length>i;){var u,a,c,f=r[i++],l=o?f.ok:f.fail,s=f.resolve,p=f.reject,v=f.domain;try{l?(o||(2===t.rejection&&Fu(t),t.rejection=1),!0===l?u=e:(v&&v.enter(),u=l(e),v&&(v.exit(),c=!0)),u===f.promise?p(wu("Promise-chain cycle")):(a=Iu(u))?a.call(u,s,p):s(u)):p(e)}catch(t){v&&!c&&v.exit(),p(t)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&Mu(t)}))}},Cu=function(t,n,r){var e,o;Tu?((e=$u.createEvent("Event")).promise=n,e.reason=r,e.initEvent(t,!1,!0),f.dispatchEvent(e)):e={promise:n,reason:r},!ju&&(o=f["on"+t])?o(e):t===ku&&function(t,n){var r=f.console;r&&r.error&&(1===arguments.length?r.error(t):r.error(t,n))}("Unhandled promise rejection",r)},Mu=function(t){vu.call(f,(function(){var n,r=t.facade,e=t.value;if(Nu(t)&&(n=pu((function(){ki?xu.emit("unhandledRejection",e,r):Cu(ku,r,e)})),t.rejection=ki||Nu(t)?2:1,n.error))throw n.value}))},Nu=function(t){return 1!==t.rejection&&!t.parent},Fu=function(t){vu.call(f,(function(){var n=t.facade;ki?xu.emit("rejectionHandled",n):Cu("rejectionhandled",n,t.value)}))},Bu=function(t,n,r){return function(e){t(n,e,r)}},Du=function(t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,Lu(t,!0))},zu=function(t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===n)throw wu("Promise can't be resolved itself");var e=Iu(n);e?cu((function(){var r={done:!1};try{e.call(n,Bu(zu,r,t),Bu(Du,r,t))}catch(n){Du(r,n,t)}})):(t.value=n,t.state=1,Lu(t,!1))}catch(n){Du({done:!1},n,t)}}};Ru&&(bu=function(t){jo(this,bu,hu),D(t),_u.call(this);var n=yu(this);try{t(Bu(zu,n),Bu(Du,n))}catch(t){Du(n,t)}},(_u=function(t){gu(this,{type:hu,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=Co(bu.prototype,{then:function(t,n){var r=mu(this),e=Eu(Jo(this,bu));return e.ok="function"!=typeof t||t,e.fail="function"==typeof n&&n,e.domain=ki?xu.domain:void 0,r.parent=!0,r.reactions.push(e),0!=r.state&&Lu(r,!1),e.promise},catch:function(t){return this.then(void 0,t)}}),Ou=function(){var t=new _u,n=yu(t);this.promise=t,this.resolve=Bu(zu,n),this.reject=Bu(Du,n)},lu.f=Eu=function(t){return t===bu||t===Su?new Ou(t):Au(t)}),V({global:!0,wrap:!0,forced:Ru},{Promise:bu}),Ln(bu,hu,!1,!0),No(hu),Su=mt(hu),V({target:hu,stat:!0,forced:Ru},{reject:function(t){var n=Eu(this);return n.reject.call(void 0,t),n.promise}}),V({target:hu,stat:!0,forced:wt},{resolve:function(t){return su(this===Su?bu:this,t)}}),V({target:hu,stat:!0,forced:Pu},{all:function(t){var n=this,r=Eu(n),e=r.resolve,o=r.reject,i=pu((function(){var r=D(n.resolve),i=[],u=0,a=1;To(t,(function(t){var c=u++,f=!1;i.push(void 0),a++,r.call(n,t).then((function(t){f||(f=!0,i[c]=t,--a||e(i))}),o)})),--a||e(i)}));return i.error&&o(i.value),r.promise},race:function(t){var n=this,r=Eu(n),e=r.reject,o=pu((function(){var o=D(n.resolve);To(t,(function(t){o.call(n,t).then(r.resolve,e)}))}));return o.error&&e(o.value),r.promise}}),V({target:"Promise",stat:!0},{allSettled:function(t){var n=this,r=lu.f(n),e=r.resolve,o=r.reject,i=pu((function(){var r=D(n.resolve),o=[],i=0,u=1;To(t,(function(t){var a=i++,c=!1;o.push(void 0),u++,r.call(n,t).then((function(t){c||(c=!0,o[a]={status:"fulfilled",value:t},--u||e(o))}),(function(t){c||(c=!0,o[a]={status:"rejected",reason:t},--u||e(o))}))})),--u||e(o)}));return i.error&&o(i.value),r.promise}});var qu="No one promise resolved";V({target:"Promise",stat:!0},{any:function(t){var n=this,r=lu.f(n),e=r.resolve,o=r.reject,i=pu((function(){var r=D(n.resolve),i=[],u=0,a=1,c=!1;To(t,(function(t){var f=u++,l=!1;i.push(void 0),a++,r.call(n,t).then((function(t){l||c||(c=!0,e(t))}),(function(t){l||c||(l=!0,i[f]=t,--a||o(new(mt("AggregateError"))(i,qu)))}))})),--a||o(new(mt("AggregateError"))(i,qu))}));return i.error&&o(i.value),r.promise}});var Gu=!!Ti&&l((function(){Ti.prototype.finally.call({then:function(){}},(function(){}))}));V({target:"Promise",proto:!0,real:!0,forced:Gu},{finally:function(t){var n=Jo(this,mt("Promise")),r="function"==typeof t;return this.then(r?function(r){return su(n,t()).then((function(){return r}))}:t,r?function(r){return su(n,t()).then((function(){throw r}))}:t)}});var Uu=B.Promise,Hu=Uu,Wu=ei,Ju=mt("Reflect","ownKeys")||function(t){var n=yn.f(q(t)),r=$n.f;return r?n.concat(r(t)):n};V({target:"Object",stat:!0,sham:!s},{getOwnPropertyDescriptors:function(t){for(var n,r,e=$(t),o=R.f,i=Ju(e),u={},a=0;i.length>a;)void 0!==(r=o(e,n=i[a++]))&&Wt(u,n,r);return u}});var Vu=B.Object.getOwnPropertyDescriptors,Ku=Qe,Qu=cn("splice"),Yu=Te("splice",{ACCESSORS:!0,0:0,1:2}),Xu=Math.max,Zu=Math.min,ta=9007199254740991,na="Maximum allowed length exceeded";V({target:"Array",proto:!0,forced:!Qu||!Yu},{splice:function(t,n){var r,e,o,i,u,a,c=Ht(this),f=it(c.length),l=ct(t,f),s=arguments.length;if(0===s?r=e=0:1===s?(r=0,e=f-l):(r=s-2,e=Zu(Xu(et(n),0),f-l)),f+r-e>ta)throw TypeError(na);for(o=tn(c,e),i=0;i<e;i++)(u=l+i)in c&&Wt(o,i,c[u]);if(o.length=e,r<e){for(i=l;i<f-e;i++)a=i+r,(u=i+e)in c?c[a]=c[u]:delete c[a];for(i=f;i>f-e+r;i--)delete c[i-1]}else if(r>e)for(i=f-e;i>l;i--)a=i+r-1,(u=i+e-1)in c?c[a]=c[u]:delete c[a];for(i=0;i<r;i++)c[i+l]=arguments[i+2];return c.length=f-e+r,o}});var ra=Le("Array").splice,ea=Array.prototype,oa=function(t){var n=t.splice;return t===ea||t instanceof Array&&n===ea.splice?ra:n},ia=Yn.map,ua=cn("map"),aa=Te("map");V({target:"Array",proto:!0,forced:!ua||!aa},{map:function(t){return ia(this,t,arguments.length>1?arguments[1]:void 0)}});var ca=Le("Array").map,fa=Array.prototype,la=function(t){var n=t.map;return t===fa||t instanceof Array&&n===fa.map?ca:n},sa=Yn.filter,pa=cn("filter"),va=Te("filter");V({target:"Array",proto:!0,forced:!pa||!va},{filter:function(t){return sa(this,t,arguments.length>1?arguments[1]:void 0)}});var da=Le("Array").filter,ha=Array.prototype,ya=function(t){var n=t.filter;return t===ha||t instanceof Array&&n===ha.filter?da:n},ga=Go,ma=Object.assign,ba=Object.defineProperty,wa=!ma||l((function(){if(s&&1!==ma({b:1},ma(ba({},"a",{enumerable:!0,get:function(){ba(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},n={},r=Symbol(),e="abcdefghijklmnopqrst";return t[r]=7,e.split("").forEach((function(t){n[t]=t})),7!=ma({},t)[r]||ht(ma({},n)).join("")!=e}))?function(t,n){for(var r=Ht(t),e=arguments.length,o=1,i=$n.f,u=d.f;e>o;)for(var a,c=b(arguments[o++]),f=i?ht(c).concat(i(c)):ht(c),l=f.length,p=0;l>p;)a=f[p++],s&&!u.call(c,a)||(r[a]=c[a]);return r}:ma;V({target:"Object",stat:!0,forced:Object.assign!==wa},{assign:wa}),B.Object.assign;var $a=mt("JSON","stringify"),xa=/[\uD800-\uDFFF]/g,_a=/^[\uD800-\uDBFF]$/,Oa=/^[\uDC00-\uDFFF]$/,Sa=function(t,n,r){var e=r.charAt(n-1),o=r.charAt(n+1);return _a.test(t)&&!Oa.test(o)||Oa.test(t)&&!_a.test(e)?"\\u"+t.charCodeAt(0).toString(16):t},Ea=l((function(){return'"\\udf06\\ud834"'!==$a("\udf06\ud834")||'"\\udead"'!==$a("\udead")}));$a&&V({target:"JSON",stat:!0,forced:Ea},{stringify:function(t,n,r){var e=$a.apply(null,arguments);return"string"==typeof e?e.replace(xa,Sa):e}}),B.JSON||(B.JSON={stringify:JSON.stringify});V({target:"Array",proto:!0},{fill:function(t){for(var n=Ht(this),r=it(n.length),e=arguments.length,o=ct(e>1?arguments[1]:void 0,r),i=e>2?arguments[2]:void 0,u=void 0===i?r:ct(i,r);u>o;)n[o++]=t;return n}});var Aa=Le("Array").fill,Ta=Array.prototype,ja=function(t){var n=t.fill;return t===Ta||t instanceof Array&&n===Ta.fill?Aa:n},ka=Tr;function Ra(){}var Pa=function(t){return t};function Ia(t){return t()}function La(){return ui(null)}function Ca(t){di(t).call(t,Ia)}function Ma(t){return"function"==typeof t}function Na(t,n){return t!=t?n==n:t!==n||t&&"object"===pe(t)||"function"==typeof t}function Fa(t,n,r){t.$$.on_destroy.push(function(t){if(null==t)return Ra;for(var n=arguments.length,r=new Array(n>1?n-1:0),e=1;e<n;e++)r[e-1]=arguments[e];var o=t.subscribe.apply(t,r);return o.unsubscribe?function(){return o.unsubscribe()}:o}(n,r))}function Ba(t,n,r,e){var o;return t[1]&&e?function(t,n){for(var r in n)t[r]=n[r];return t}(mi(o=r.ctx).call(o),t[1](e(n))):r.ctx}function Da(t,n,r,e,o,i,u){var a=function(t,n,r,e){if(t[2]&&e){var o=t[2](e(r));if(void 0===n.dirty)return o;if("object"===pe(o)){for(var i=[],u=Math.max(n.dirty.length,o.length),a=0;a<u;a+=1)i[a]=n.dirty[a]|o[a];return i}return n.dirty|o}return n.dirty}(n,e,o,i);if(a){var c=Ba(n,r,e,u);t.p(c,a)}}function za(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;return t.set(r),n}var qa="undefined"!=typeof window,Ga=qa?function(){return window.performance.now()}:function(){return _i()},Ua=qa?function(t){return requestAnimationFrame(t)}:Ra,Ha=new bi;function Wa(t){di(Ha).call(Ha,(function(n){n.c(t)||(Ha.delete(n),n.f())})),0!==Ha.size&&Ua(Wa)}function Ja(t,n){t.appendChild(n)}function Va(t,n,r){t.insertBefore(n,r||null)}function Ka(t){t.parentNode.removeChild(t)}function Qa(t,n){for(var r=0;r<t.length;r+=1)t[r]&&t[r].d(n)}function Ya(t){return document.createElement(t)}function Xa(t){return document.createTextNode(t)}function Za(){return Xa(" ")}function tc(){return Xa("")}function nc(t,n,r,e){return t.addEventListener(n,r,e),function(){return t.removeEventListener(n,r,e)}}function rc(t,n,r){null==r?t.removeAttribute(n):t.getAttribute(n)!==r&&t.setAttribute(n,r)}function ec(t){return Ku(t.childNodes)}function oc(t,n){t.value=null==n?"":n}function ic(t,n){for(var r=0;r<t.options.length;r+=1){var e=t.options[r];if(e.__value===n)return void(e.selected=!0)}}function uc(t){var n=t.querySelector(":checked")||t.options[0];return n&&n.__value}function ac(t,n,r){t.classList[r?"add":"remove"](n)}var cc,fc=function(){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;i(this,t),this.a=n,this.e=this.n=null}return X(t,[{key:"m",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.e||(this.e=Ya(n.nodeName),this.t=n,this.h(t)),this.i(r)}},{key:"h",value:function(t){this.e.innerHTML=t,this.n=Ku(this.e.childNodes)}},{key:"i",value:function(t){for(var n=0;n<this.n.length;n+=1)Va(this.t,this.n[n],t)}},{key:"p",value:function(t){this.d(),this.h(t),this.i(this.a)}},{key:"d",value:function(){var t;di(t=this.n).call(t,Ka)}}]),t}(),lc=new bi,sc=0;function pc(t){for(var n=5381,r=t.length;r--;)n=(n<<5)-n^t.charCodeAt(r);return n>>>0}function vc(t,n,r,e,o,i,u){for(var a,c,f,l,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,p=16.666/e,v="{\n",d=0;d<=1;d+=p){var h=n+(r-n)*i(d);v+=100*d+"%{".concat(u(h,1-h),"}\n")}var y=v+"100% {".concat(u(r,1-r),"}\n}"),g=xi(a="__svelte_".concat(pc(y),"_")).call(a,s),m=t.ownerDocument;lc.add(m);var b,w=m.__svelte_stylesheet||(m.__svelte_stylesheet=m.head.appendChild(Ya("style")).sheet),$=m.__svelte_rules||(m.__svelte_rules={});$[g]||($[g]=!0,w.insertRule(xi(b="@keyframes ".concat(g," ")).call(b,y),w.cssRules.length));var x=t.style.animation||"";return t.style.animation=xi(c=xi(f=xi(l="".concat(x?"".concat(x,", "):"")).call(l,g," ")).call(f,e,"ms linear ")).call(c,o,"ms 1 both"),sc+=1,g}function dc(t,n){var r=(t.style.animation||"").split(", "),e=ya(r).call(r,n?function(t){return Wu(t).call(t,n)<0}:function(t){return-1===Wu(t).call(t,"__svelte")}),o=r.length-e.length;o&&(t.style.animation=e.join(", "),(sc-=o)||Ua((function(){sc||(di(lc).call(lc,(function(t){for(var n=t.__svelte_stylesheet,r=n.cssRules.length;r--;)n.deleteRule(r);t.__svelte_rules={}})),lc.clear())})))}function hc(t){cc=t}function yc(t){(function(){if(!cc)throw new Error("Function called outside component initialization");return cc})().$$.on_mount.push(t)}var gc=[],mc=[],bc=[],wc=[],$c=Hu.resolve(),xc=!1;function _c(t){bc.push(t)}function Oc(t){wc.push(t)}var Sc,Ec=!1,Ac=new bi;function Tc(){if(!Ec){Ec=!0;do{for(var t=0;t<gc.length;t+=1){var n=gc[t];hc(n),jc(n.$$)}for(hc(null),gc.length=0;mc.length;)mc.pop()();for(var r=0;r<bc.length;r+=1){var e=bc[r];Ac.has(e)||(Ac.add(e),e())}bc.length=0}while(gc.length);for(;wc.length;)wc.pop()();xc=!1,Ec=!1,Ac.clear()}}function jc(t){if(null!==t.fragment){var n;t.update(),Ca(t.before_update);var r=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,r),di(n=t.after_update).call(n,_c)}}function kc(t,n,r){var e,o,i,u;t.dispatchEvent((o=xi(e="".concat(n?"intro":"outro")).call(e,r),(u=document.createEvent("CustomEvent")).initCustomEvent(o,!1,!1,i),u))}var Rc,Pc=new bi;function Ic(){Rc={r:0,c:[],p:Rc}}function Lc(){Rc.r||Ca(Rc.c),Rc=Rc.p}function Cc(t,n){t&&t.i&&(Pc.delete(t),t.i(n))}function Mc(t,n,r,e){if(t&&t.o){if(Pc.has(t))return;Pc.add(t),Rc.c.push((function(){Pc.delete(t),e&&(r&&t.d(1),e())})),t.o(n)}}var Nc={duration:0};function Fc(t,n,r,e){var o=n(t,r),i=e?0:1,u=null,a=null,c=null;function f(){c&&dc(t,c)}function l(t,n){var r=t.b-i;return n*=Math.abs(r),{a:i,b:t.b,d:r,duration:n,start:t.start,end:t.start+n,group:t.group}}function s(n){var r=o||Nc,e=r.delay,s=void 0===e?0:e,p=r.duration,v=void 0===p?300:p,d=r.easing,h=void 0===d?Pa:d,y=r.tick,g=void 0===y?Ra:y,m=r.css,b={start:Ga()+s,b:n};n||(b.group=Rc,Rc.r+=1),u||a?a=b:(m&&(f(),c=vc(t,i,n,v,s,h,m)),n&&g(0,1),u=l(b,v),_c((function(){return kc(t,n,"start")})),function(t){var n;0===Ha.size&&Ua(Wa),new Hu((function(r){Ha.add(n={c:t,f:r})}))}((function(n){if(a&&n>a.start&&(u=l(a,v),a=null,kc(t,u.b,"start"),m&&(f(),c=vc(t,i,u.b,u.duration,0,h,o.css))),u)if(n>=u.end)g(i=u.b,1-i),kc(t,u.b,"end"),a||(u.b?f():--u.group.r||Ca(u.group.c)),u=null;else if(n>=u.start){var r=n-u.start;i=u.a+u.d*h(r/u.duration),g(i,1-i)}return!(!u&&!a)})))}return{run:function(t){Ma(o)?(Sc||(Sc=Hu.resolve()).then((function(){Sc=null})),Sc).then((function(){o=o(),s(t)})):s(t)},end:function(){f(),u=a=null}}}function Bc(t,n,r){var e=t.$$.props[n];void 0!==e&&(t.$$.bound[e]=r,r(t.$$.ctx[e]))}function Dc(t){t&&t.c()}function zc(t,n,r,e){var o=t.$$,i=o.fragment,u=o.on_mount,a=o.on_destroy,c=o.after_update;i&&i.m(n,r),e||_c((function(){var n,r=ya(n=la(u).call(u,Ia)).call(n,Ma);a?a.push.apply(a,ii(r)):Ca(r),t.$$.on_mount=[]})),di(c).call(c,_c)}function qc(t,n){var r=t.$$;null!==r.fragment&&(Ca(r.on_destroy),r.fragment&&r.fragment.d(n),r.on_destroy=r.fragment=null,r.ctx=[])}function Gc(t,n){var r;-1===t.$$.dirty[0]&&(gc.push(t),xc||(xc=!0,$c.then(Tc)),ja(r=t.$$.dirty).call(r,0));t.$$.dirty[n/31|0]|=1<<n%31}function Uc(t,n,r,e,o,i){var u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[-1],a=cc;hc(t);var c=t.$$={fragment:null,ctx:null,props:i,update:Ra,not_equal:o,bound:La(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new ga(a?a.$$.context:[]),callbacks:La(),dirty:u,skip_bound:!1},f=!1;if(c.ctx=r?r(t,n.props||{},(function(n,r){var e=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:r;return c.ctx&&o(c.ctx[n],c.ctx[n]=e)&&(!c.skip_bound&&c.bound[n]&&c.bound[n](e),f&&Gc(t,n)),r})):[],c.update(),f=!0,Ca(c.before_update),c.fragment=!!e&&e(c.ctx),n.target){if(n.hydrate){var l=ec(n.target);c.fragment&&c.fragment.l(l),di(l).call(l,Ka)}else c.fragment&&c.fragment.c();n.intro&&Cc(t.$$.fragment),zc(t,n.target,n.anchor,n.customElement),Tc()}hc(a)}new bi(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]);var Hc=function(){function t(){i(this,t)}return X(t,[{key:"$destroy",value:function(){qc(this,1),this.$destroy=Ra}},{key:"$on",value:function(t,n){var r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),function(){var t=Wu(r).call(r,n);-1!==t&&oa(r).call(r,t,1)}}},{key:"$set",value:function(t){this.$$set&&0!==gi(t).length&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}]),t}(),Wc=B.Object.getOwnPropertySymbols,Jc=Wc,Vc=Oo;V({target:"Object",stat:!0,forced:!s,sham:!s},{defineProperties:yt});var Kc=a((function(t){var n=B.Object,r=t.exports=function(t,r){return n.defineProperties(t,r)};n.defineProperties.sham&&(r.sham=!0)})),Qc=K;function Yc(t,n,r){return n in t?Q(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}var Xc=Yn.find,Zc="find",tf=!0,nf=Te(Zc);Zc in[]&&Array(1).find((function(){tf=!1})),V({target:"Array",proto:!0,forced:tf||!nf},{find:function(t){return Xc(this,t,arguments.length>1?arguments[1]:void 0)}}),Le("Array").find;var rf=lt.includes,ef=Te("indexOf",{ACCESSORS:!0,1:0});V({target:"Array",proto:!0,forced:!ef},{includes:function(t){return rf(this,t,arguments.length>1?arguments[1]:void 0)}});var of=Le("Array").includes,uf=Xt("match"),af=function(t){if(function(t){var n;return x(t)&&(void 0!==(n=t[uf])?!!n:"RegExp"==g(t))}(t))throw TypeError("The method doesn't accept regular expressions");return t},cf=Xt("match");V({target:"String",proto:!0,forced:!function(t){var n=/./;try{"/./"[t](n)}catch(r){try{return n[cf]=!1,"/./"[t](n)}catch(t){}}return!1}("includes")},{includes:function(t){return!!~String(w(this)).indexOf(af(t),arguments.length>1?arguments[1]:void 0)}});var ff=Le("String").includes,lf=Array.prototype,sf=String.prototype,pf=function(t){var n=t.includes;return t===lf||t instanceof Array&&n===lf.includes?of:"string"==typeof t||t===sf||t instanceof String&&n===sf.includes?ff:n};function vf(t){for(var n,r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return e.default.extend.apply(e.default,xi(n=[{},t]).call(n,o))}function df(t){for(var n,r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return e.default.extend.apply(e.default,xi(n=[!0,{},t]).call(n,o))}function hf(t){var n;return pf(n=BooklyL10nGlobal.addons).call(n,t)}var yf=BooklyL10nGlobal.csrf_token,gf=o.default,mf=[];var bf=Wc,wf=yi;function $f(t,n){if(null==t)return{};var r,e,o=function(t,n){if(null==t)return{};var r,e,o={},i=wf(t);for(e=0;e<i.length;e++)r=i[e],oi(n).call(n,r)>=0||(o[r]=t[r]);return o}(t,n);if(bf){var i=bf(t);for(e=0;e<i.length;e++)r=i[e],oi(n).call(n,r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function xf(t,n){var r=gi(t);if(Jc){var e=Jc(t);n&&(e=ya(e).call(e,(function(n){return Vc(t,n).enumerable}))),r.push.apply(r,e)}return r}function _f(t,n){var r=t,e=function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ra,e=[];function o(r){if(Na(t,r)&&(t=r,n)){for(var o=!mf.length,i=0;i<e.length;i+=1){var u=e[i];u[1](),mf.push(u,t)}if(o){for(var a=0;a<mf.length;a+=2)mf[a][0](mf[a+1]);mf.length=0}}}function i(n){o(n(t))}function u(i){var u=[i,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ra];return e.push(u),1===e.length&&(n=r(o)||Ra),i(t),function(){var t=Wu(e).call(e,u);-1!==t&&oa(e).call(e,t,1),0===e.length&&(n(),n=null)}}return{set:o,update:i,subscribe:u}}(t,n),o=e.set;return function(t){for(var n=1;n<arguments.length;n++){var r,e=null!=arguments[n]?arguments[n]:{};if(n%2)di(r=xf(Object(e),!0)).call(r,(function(n){Yc(t,n,e[n])}));else if(Vu)Kc(t,Vu(e));else{var o;di(o=xf(Object(e))).call(o,(function(n){Qc(t,n,Vc(e,n))}))}}return t}({set:function(t){r=t,o(t)},get:function(){return r}},$f(e,["set"]))}function Of(t,n){var r=gi(t);if(Jc){var e=Jc(t);n&&(e=ya(e).call(e,(function(n){return Vc(t,n).enumerable}))),r.push.apply(r,e)}return r}function Sf(t){for(var n=1;n<arguments.length;n++){var r,e=null!=arguments[n]?arguments[n]:{};if(n%2)di(r=Of(Object(e),!0)).call(r,(function(n){Yc(t,n,e[n])}));else if(Vu)Kc(t,Vu(e));else{var o;di(o=Of(Object(e))).call(o,(function(n){Qc(t,n,Vc(e,n))}))}}return t}function Ef(t,n){var r=df({value:t}),e=_f(t,n);return Sf(Sf({},e),{},{reset:function(){return e.set(df(r).value)}})}var Af=Ef(""),Tf=Ef(null),jf=Ef(null),kf=Ef(""),Rf={name:"",email:"",phone:"",phone_formatted:""},Pf=Ef([Rf]),If={title:"",duration:3600},Lf=Ef([If]),Cf=Ef(1),Mf=Ef(!1);function Nf(t,n){var r=gi(t);if(Jc){var e=Jc(t);n&&(e=ya(e).call(e,(function(n){return Vc(t,n).enumerable}))),r.push.apply(r,e)}return r}function Ff(t){for(var n=1;n<arguments.length;n++){var r,e=null!=arguments[n]?arguments[n]:{};if(n%2)di(r=Nf(Object(e),!0)).call(r,(function(n){Yc(t,n,e[n])}));else if(Vu)Kc(t,Vu(e));else{var o;di(o=Nf(Object(e))).call(o,(function(n){Qc(t,n,Vc(e,n))}))}}return t}var Bf=uo.trim,Df=f.parseFloat,zf=1/Df(no+"-0")!=-1/0?function(t){var n=Bf(String(t)),r=Df(n);return 0===r&&"-"==n.charAt(0)?-0:r}:Df;V({global:!0,forced:parseFloat!=zf},{parseFloat:zf});var qf=B.parseFloat;function Gf(t){var n=t-1;return n*n*n+1}function Uf(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.delay,e=void 0===r?0:r,o=n.duration,i=void 0===o?400:o,u=n.easing,a=void 0===u?Gf:u,c=getComputedStyle(t),f=+c.opacity,l=qf(c.height),s=qf(c.paddingTop),p=qf(c.paddingBottom),v=qf(c.marginTop),d=qf(c.marginBottom),h=qf(c.borderTopWidth),y=qf(c.borderBottomWidth);return{delay:e,duration:i,easing:a,css:function(t){return"overflow: hidden;"+"opacity: ".concat(Math.min(20*t,1)*f,";")+"height: ".concat(t*l,"px;")+"padding-top: ".concat(t*s,"px;")+"padding-bottom: ".concat(t*p,"px;")+"margin-top: ".concat(t*v,"px;")+"margin-bottom: ".concat(t*d,"px;")+"border-top-width: ".concat(t*h,"px;")+"border-bottom-width: ".concat(t*y,"px;")}}}function Hf(t){var n=function(){if("undefined"==typeof Reflect||!$o)return!1;if($o.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($o(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=ge(t);if(n){var o=ge(this).constructor;r=$o(e,arguments,o)}else r=e.apply(this,arguments);return ve(this,r)}}function Wf(t){var n,r,e,o,i,u,a,c=t[4].default,f=function(t,n,r,e){if(t){var o=Ba(t,n,r,e);return t[0](o)}}(c,t,t[3],null);return{c:function(){n=Ya("div"),r=Ya("i"),o=Za(),f&&f.c(),rc(r,"class",e="fas pl-1 "+("danger"===t[1]?"fa-times":"fa-exclamation-triangle")),rc(n,"class",i="alert alert-"+t[1]+" form-group "+t[2]+" p-1")},m:function(t,e){Va(t,n,e),Ja(n,r),Ja(n,o),f&&f.m(n,null),a=!0},p:function(t,o){(!a||2&o&&e!==(e="fas pl-1 "+("danger"===t[1]?"fa-times":"fa-exclamation-triangle")))&&rc(r,"class",e),f&&f.p&&8&o&&Da(f,c,t,t[3],o,null,null),(!a||6&o&&i!==(i="alert alert-"+t[1]+" form-group "+t[2]+" p-1"))&&rc(n,"class",i)},i:function(t){a||(Cc(f,t),_c((function(){u||(u=Fc(n,Uf,{},!0)),u.run(1)})),a=!0)},o:function(t){Mc(f,t),u||(u=Fc(n,Uf,{},!1)),u.run(0),a=!1},d:function(t){t&&Ka(n),f&&f.d(t),t&&u&&u.end()}}}function Jf(t){var n,r,e=t[0]&&Wf(t);return{c:function(){e&&e.c(),n=tc()},m:function(t,o){e&&e.m(t,o),Va(t,n,o),r=!0},p:function(t,r){var o=to(r,1)[0];t[0]?e?(e.p(t,o),1&o&&Cc(e,1)):((e=Wf(t)).c(),Cc(e,1),e.m(n.parentNode,n)):e&&(Ic(),Mc(e,1,1,(function(){e=null})),Lc())},i:function(t){r||(Cc(e),r=!0)},o:function(t){Mc(e),r=!1},d:function(t){e&&e.d(t),t&&Ka(n)}}}function Vf(t,n,r){var e=n.$$slots,o=void 0===e?{}:e,i=n.$$scope,u=n.show,a=void 0===u||u,c=n.type,f=void 0===c?"warning":c,l=n.class,s=void 0===l?"":l;return t.$$set=function(t){"show"in t&&r(0,a=t.show),"type"in t&&r(1,f=t.type),"class"in t&&r(2,s=t.class),"$$scope"in t&&r(3,i=t.$$scope)},[a,f,s,i,o]}var Kf=function(t){zt(r,t);var n=Hf(r);function r(t){var e;return i(this,r),Uc(Z(e=n.call(this)),t,Vf,Jf,Na,{show:0,type:1,class:2}),e}return r}(Hc);function Qf(t){var n=function(){if("undefined"==typeof Reflect||!$o)return!1;if($o.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($o(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=ge(t);if(n){var o=ge(this).constructor;r=$o(e,arguments,o)}else r=e.apply(this,arguments);return ve(this,r)}}function Yf(t){var n,r=gf.l10n.required+"";return{c:function(){n=Xa(r)},m:function(t,r){Va(t,n,r)},p:Ra,d:function(t){t&&Ka(n)}}}function Xf(t){var n,r,e,o,i,u,a,c;return i=new Kf({props:{show:!t[0]&&t[1],type:"danger",class:"mt-2",$$slots:{default:[Yf]},$$scope:{ctx:t}}}),{c:function(){(n=Ya("label")).textContent="".concat(gf.l10n.company_name),r=Za(),e=Ya("input"),o=Za(),Dc(i.$$.fragment),rc(n,"for","bookly-setup-company-name"),rc(e,"type","text"),rc(e,"id","bookly-setup-company-name"),rc(e,"class","form-control")},m:function(f,l){Va(f,n,l),Va(f,r,l),Va(f,e,l),oc(e,t[0]),Va(f,o,l),zc(i,f,l),u=!0,a||(c=nc(e,"input",t[2]),a=!0)},p:function(t,n){var r=to(n,1)[0];1&r&&e.value!==t[0]&&oc(e,t[0]);var o={};3&r&&(o.show=!t[0]&&t[1]),8&r&&(o.$$scope={dirty:r,ctx:t}),i.$set(o)},i:function(t){u||(Cc(i.$$.fragment,t),u=!0)},o:function(t){Mc(i.$$.fragment,t),u=!1},d:function(t){t&&Ka(n),t&&Ka(r),t&&Ka(e),t&&Ka(o),qc(i,t),a=!1,c()}}}function Zf(t,n,r){var e,o;return Fa(t,Af,(function(t){return r(0,e=t)})),Fa(t,Mf,(function(t){return r(1,o=t)})),[e,o,function(){e=this.value,Af.set(e)}]}var tl=function(t){zt(r,t);var n=Qf(r);function r(t){var e;return i(this,r),Uc(Z(e=n.call(this)),t,Zf,Xf,Na,{}),e}return r}(Hc),nl=d.f,rl=function(t){return function(n){for(var r,e=$(n),o=ht(e),i=o.length,u=0,a=[];i>u;)r=o[u++],s&&!nl.call(e,r)||a.push(t?[r,e[r]]:e[r]);return a}},el={entries:rl(!0),values:rl(!1)}.entries;V({target:"Object",stat:!0},{entries:function(t){return el(t)}});var ol,il=B.Object.entries,ul=uo.trim;V({target:"String",proto:!0,forced:(ol="trim",l((function(){return!!no[ol]()||"​…᠎"!="​…᠎"[ol]()||no[ol].name!==ol})))},{trim:function(){return ul(this)}});var al=Le("String").trim,cl=String.prototype,fl=function(t){var n=t.trim;return"string"==typeof t||t===cl||t instanceof String&&n===cl.trim?al:n};function ll(t){var n=function(){if("undefined"==typeof Reflect||!$o)return!1;if($o.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($o(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=ge(t);if(n){var o=ge(this).constructor;r=$o(e,arguments,o)}else r=e.apply(this,arguments);return ve(this,r)}}function sl(t,n,r){var e=mi(t).call(t);return e[6]=n[r][0],e[7]=n[r][1],e}function pl(t,n,r){var e=mi(t).call(t);return e[10]=n[r][0],e[11]=n[r][1],e}function vl(t){var n,r,e=t[11]+"";return{c:function(){n=Ya("option"),r=Xa(e),n.__value=t[10],n.value=n.__value},m:function(t,e){Va(t,n,e),Ja(n,r)},p:Ra,d:function(t){t&&Ka(n)}}}function dl(t){for(var n,r=il(t[7]),e=[],o=0;o<r.length;o+=1)e[o]=vl(pl(t,r,o));return{c:function(){n=Ya("optgroup");for(var r=0;r<e.length;r+=1)e[r].c();rc(n,"label",t[6])},m:function(t,r){Va(t,n,r);for(var o=0;o<e.length;o+=1)e[o].m(n,null)},p:function(t,o){if(0&o){var i;for(r=il(t[7]),i=0;i<r.length;i+=1){var u=pl(t,r,i);e[i]?e[i].p(u,o):(e[i]=vl(u),e[i].c(),e[i].m(n,null))}for(;i<e.length;i+=1)e[i].d(1);e.length=r.length}},d:function(t){t&&Ka(n),Qa(e,t)}}}function hl(t){var n,r=gf.l10n.required+"";return{c:function(){n=Xa(r)},m:function(t,r){Va(t,n,r)},p:Ra,d:function(t){t&&Ka(n)}}}function yl(t){for(var n,r,e,o,i,u,a,c,f,l=il(gf.industries),s=[],p=0;p<l.length;p+=1)s[p]=dl(sl(t,l,p));return u=new Kf({props:{show:!t[1]&&t[2],type:"danger",class:"mt-2",$$slots:{default:[hl]},$$scope:{ctx:t}}}),{c:function(){(n=Ya("label")).textContent="".concat(gf.l10n.industry),r=Za(),e=Ya("select"),o=Ya("option");for(var a=0;a<s.length;a+=1)s[a].c();i=Za(),Dc(u.$$.fragment),rc(n,"for","bookly-setup-industry"),o.__value="",o.value=o.__value,rc(e,"id","bookly-setup-industry"),rc(e,"class","form-control"),rc(e,"data-placeholder",gf.l10n.select_industry),void 0===t[1]&&_c((function(){return t[4].call(e)})),ac(e,"is-invalid",!t[1]&&t[2])},m:function(l,p){Va(l,n,p),Va(l,r,p),Va(l,e,p),Ja(e,o);for(var v=0;v<s.length;v+=1)s[v].m(e,null);t[3](e),ic(e,t[1]),Va(l,i,p),zc(u,l,p),a=!0,c||(f=nc(e,"change",t[4]),c=!0)},p:function(t,n){var r=to(n,1)[0];if(0&r){var o;for(l=il(gf.industries),o=0;o<l.length;o+=1){var i=sl(t,l,o);s[o]?s[o].p(i,r):(s[o]=dl(i),s[o].c(),s[o].m(e,null))}for(;o<s.length;o+=1)s[o].d(1);s.length=l.length}2&r&&ic(e,t[1]),6&r&&ac(e,"is-invalid",!t[1]&&t[2]);var a={};6&r&&(a.show=!t[1]&&t[2]),16384&r&&(a.$$scope={dirty:r,ctx:t}),u.$set(a)},i:function(t){a||(Cc(u.$$.fragment,t),a=!0)},o:function(t){Mc(u.$$.fragment,t),a=!1},d:function(o){o&&Ka(n),o&&Ka(r),o&&Ka(e),Qa(s,o),t[3](null),o&&Ka(i),qc(u,o),c=!1,f()}}}function gl(t,n,r){var o,i,u;function a(t,n){if(n.parentText=n.parentText||"",""===fl(e.default).call(e.default,t.term))return n;if(n.children&&n.children.length>0){for(var r=e.default.extend(!0,{},n),o=n.children.length-1;o>=0;o--){var i,u=n.children[o];if(u.parentText+=n.parentText+" "+n.text,null==a(t,u))oa(i=r.children).call(i,o,1)}return r.children.length>0?r:a(t,r)}var c=(n.parentText+" "+n.text).toUpperCase(),f=t.term.toUpperCase();return Wu(c).call(c,f)>-1?n:null}return Fa(t,Tf,(function(t){return r(1,o=t)})),Fa(t,Mf,(function(t){return r(2,i=t)})),t.$$.update=function(){3&t.$$.dirty&&u&&e.default(u).select2({theme:"bootstrap4",width:"100%",dropdownParent:"#bookly-tbs",allowClear:!1,matcher:a,language:{noResults:function(){return gf.l10n.no_result_found}}}).off().on("select2:select select2:unselect",(function(t){za(Tf,o=t.params.data.id,o),e.default(u).val(o).trigger("change")}))},[u,o,i,function(t){mc[t?"unshift":"push"]((function(){r(0,u=t)}))},function(){o=uc(this),Tf.set(o)}]}var ml=function(t){zt(r,t);var n=ll(r);function r(t){var e;return i(this,r),Uc(Z(e=n.call(this)),t,gl,yl,Na,{}),e}return r}(Hc);function bl(t){var n=function(){if("undefined"==typeof Reflect||!$o)return!1;if($o.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($o(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=ge(t);if(n){var o=ge(this).constructor;r=$o(e,arguments,o)}else r=e.apply(this,arguments);return ve(this,r)}}function wl(t,n,r){var e=mi(t).call(t);return e[5]=n[r][0],e[6]=n[r][1],e}function $l(t){var n,r,e=t[6]+"";return{c:function(){n=Ya("option"),r=Xa(e),n.__value=t[5],n.value=n.__value},m:function(t,e){Va(t,n,e),Ja(n,r)},p:Ra,d:function(t){t&&Ka(n)}}}function xl(t){var n,r=gf.l10n.required+"";return{c:function(){n=Xa(r)},m:function(t,r){Va(t,n,r)},p:Ra,d:function(t){t&&Ka(n)}}}function _l(t){for(var n,r,e,o,i,u,a,c,f,l=il(gf.sizes),s=[],p=0;p<l.length;p+=1)s[p]=$l(wl(t,l,p));return u=new Kf({props:{show:!t[1]&&t[2],type:"danger",class:"mt-2",$$slots:{default:[xl]},$$scope:{ctx:t}}}),{c:function(){(n=Ya("label")).textContent="".concat(gf.l10n.size),r=Za(),e=Ya("select"),o=Ya("option");for(var a=0;a<s.length;a+=1)s[a].c();i=Za(),Dc(u.$$.fragment),rc(n,"for","bookly-setup-size"),o.__value="",o.value=o.__value,rc(e,"id","bookly-setup-size"),rc(e,"class","form-control"),rc(e,"data-placeholder",gf.l10n.select_size),void 0===t[1]&&_c((function(){return t[4].call(e)})),ac(e,"is-invalid",!t[1]&&t[2])},m:function(l,p){Va(l,n,p),Va(l,r,p),Va(l,e,p),Ja(e,o);for(var v=0;v<s.length;v+=1)s[v].m(e,null);t[3](e),ic(e,t[1]),Va(l,i,p),zc(u,l,p),a=!0,c||(f=nc(e,"change",t[4]),c=!0)},p:function(t,n){var r=to(n,1)[0];if(0&r){var o;for(l=il(gf.sizes),o=0;o<l.length;o+=1){var i=wl(t,l,o);s[o]?s[o].p(i,r):(s[o]=$l(i),s[o].c(),s[o].m(e,null))}for(;o<s.length;o+=1)s[o].d(1);s.length=l.length}2&r&&ic(e,t[1]),6&r&&ac(e,"is-invalid",!t[1]&&t[2]);var a={};6&r&&(a.show=!t[1]&&t[2]),512&r&&(a.$$scope={dirty:r,ctx:t}),u.$set(a)},i:function(t){a||(Cc(u.$$.fragment,t),a=!0)},o:function(t){Mc(u.$$.fragment,t),a=!1},d:function(o){o&&Ka(n),o&&Ka(r),o&&Ka(e),Qa(s,o),t[3](null),o&&Ka(i),qc(u,o),c=!1,f()}}}function Ol(t,n,r){var o,i,u;return Fa(t,jf,(function(t){return r(1,o=t)})),Fa(t,Mf,(function(t){return r(2,i=t)})),t.$$.update=function(){3&t.$$.dirty&&u&&e.default(u).select2({theme:"bootstrap4",width:"100%",dropdownParent:"#bookly-setup-form",allowClear:!1,language:{noResults:function(){return gf.l10n.no_result_found}}}).off().on("select2:select select2:unselect",(function(t){za(jf,o=t.params.data.id,o),e.default(u).val(o).trigger("change")}))},[u,o,i,function(t){mc[t?"unshift":"push"]((function(){r(0,u=t)}))},function(){o=uc(this),jf.set(o)}]}var Sl=function(t){zt(r,t);var n=bl(r);function r(t){var e;return i(this,r),Uc(Z(e=n.call(this)),t,Ol,_l,Na,{}),e}return r}(Hc);function El(t){var n=function(){if("undefined"==typeof Reflect||!$o)return!1;if($o.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($o(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=ge(t);if(n){var o=ge(this).constructor;r=$o(e,arguments,o)}else r=e.apply(this,arguments);return ve(this,r)}}function Al(t){var n,r=gf.l10n.required+"";return{c:function(){n=Xa(r)},m:function(t,r){Va(t,n,r)},p:Ra,d:function(t){t&&Ka(n)}}}function Tl(t){var n,r,e,o,i,u,a,c;return i=new Kf({props:{show:!t[0]&&t[1],type:"danger",class:"mt-2",$$slots:{default:[Al]},$$scope:{ctx:t}}}),{c:function(){(n=Ya("label")).textContent="".concat(gf.l10n.company_email),r=Za(),e=Ya("input"),o=Za(),Dc(i.$$.fragment),rc(n,"for","bookly-setup-company-email"),rc(e,"type","text"),rc(e,"id","bookly-setup-company-email"),rc(e,"class","form-control"),ac(e,"is-invalid",!t[0]&&t[1])},m:function(f,l){Va(f,n,l),Va(f,r,l),Va(f,e,l),oc(e,t[0]),Va(f,o,l),zc(i,f,l),u=!0,a||(c=nc(e,"input",t[2]),a=!0)},p:function(t,n){var r=to(n,1)[0];1&r&&e.value!==t[0]&&oc(e,t[0]),3&r&&ac(e,"is-invalid",!t[0]&&t[1]);var o={};3&r&&(o.show=!t[0]&&t[1]),8&r&&(o.$$scope={dirty:r,ctx:t}),i.$set(o)},i:function(t){u||(Cc(i.$$.fragment,t),u=!0)},o:function(t){Mc(i.$$.fragment,t),u=!1},d:function(t){t&&Ka(n),t&&Ka(r),t&&Ka(e),t&&Ka(o),qc(i,t),a=!1,c()}}}function jl(t,n,r){var e,o;return Fa(t,kf,(function(t){return r(0,e=t)})),Fa(t,Mf,(function(t){return r(1,o=t)})),[e,o,function(){e=this.value,kf.set(e)}]}var kl=function(t){zt(r,t);var n=El(r);function r(t){var e;return i(this,r),Uc(Z(e=n.call(this)),t,jl,Tl,Na,{}),e}return r}(Hc);function Rl(t){var n=function(){if("undefined"==typeof Reflect||!$o)return!1;if($o.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($o(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=ge(t);if(n){var o=ge(this).constructor;r=$o(e,arguments,o)}else r=e.apply(this,arguments);return ve(this,r)}}function Pl(t){var n,r,e,o,i,u,a,c,f,l,s,p;return r=new tl({}),i=new ml({}),c=new Sl({}),s=new kl({}),{c:function(){n=Ya("div"),Dc(r.$$.fragment),e=Za(),o=Ya("div"),Dc(i.$$.fragment),u=Za(),a=Ya("div"),Dc(c.$$.fragment),f=Za(),l=Ya("div"),Dc(s.$$.fragment),rc(n,"class","form-group"),rc(o,"class","form-group"),rc(a,"class","form-group"),rc(l,"class","form-group")},m:function(t,v){Va(t,n,v),zc(r,n,null),Va(t,e,v),Va(t,o,v),zc(i,o,null),Va(t,u,v),Va(t,a,v),zc(c,a,null),Va(t,f,v),Va(t,l,v),zc(s,l,null),p=!0},p:Ra,i:function(t){p||(Cc(r.$$.fragment,t),Cc(i.$$.fragment,t),Cc(c.$$.fragment,t),Cc(s.$$.fragment,t),p=!0)},o:function(t){Mc(r.$$.fragment,t),Mc(i.$$.fragment,t),Mc(c.$$.fragment,t),Mc(s.$$.fragment,t),p=!1},d:function(t){t&&Ka(n),qc(r),t&&Ka(e),t&&Ka(o),qc(i),t&&Ka(u),t&&Ka(a),qc(c),t&&Ka(f),t&&Ka(l),qc(s)}}}var Il=function(t){zt(r,t);var n=Rl(r);function r(t){var e;return i(this,r),Uc(Z(e=n.call(this)),t,null,Pl,Na,{}),e}return r}(Hc);V({target:"Promise",stat:!0},{try:function(t){var n=lu.f(this),r=pu(t);return(r.error?n.reject:n.resolve)(r.value),n.promise}});var Ll=Uu;function Cl(t,n,r,e,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void r(t)}a.done?n(c):Ll.resolve(c).then(e,o)}function Ml(t){return function(){var n=this,r=arguments;return new Ll((function(e,o){var i=t.apply(n,r);function u(t){Cl(i,e,o,u,a,"next",t)}function a(t){Cl(i,e,o,u,a,"throw",t)}u(void 0)}))}}var Nl=he,Fl=Ft,Bl=[].reverse,Dl=[1,2];V({target:"Array",proto:!0,forced:String(Dl)===String(Dl.reverse())},{reverse:function(){return Ut(this)&&(this.length=this.length),Bl.call(this)}});var zl=Le("Array").reverse,ql=Array.prototype,Gl=function(t){var n=t.reverse;return t===ql||t instanceof Array&&n===ql.reverse?zl:n},Ul=a((function(t){var n=function(t){var n,r=Object.prototype,e=r.hasOwnProperty,o="function"==typeof ka?ka:{},i=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function c(t,n,r){return Qc(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[n]}try{c({},"")}catch(t){c=function(t,n,r){return t[n]=r}}function f(t,n,r,e){var o=n&&n.prototype instanceof y?n:y,i=ui(o.prototype),u=new A(e||[]);return i._invoke=function(t,n,r){var e=s;return function(o,i){if(e===v)throw new Error("Generator is already running");if(e===d){if("throw"===o)throw i;return j()}for(r.method=o,r.arg=i;;){var u=r.delegate;if(u){var a=O(u,r);if(a){if(a===h)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(e===s)throw e=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);e=v;var c=l(t,n,r);if("normal"===c.type){if(e=r.done?d:p,c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(e=d,r.method="throw",r.arg=c.arg)}}}(t,r,u),i}function l(t,n,r){try{return{type:"normal",arg:t.call(n,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var s="suspendedStart",p="suspendedYield",v="executing",d="completed",h={};function y(){}function g(){}function m(){}var b={};b[i]=function(){return this};var w=Nl&&Nl(Nl(T([])));w&&w!==r&&e.call(w,i)&&(b=w);var $=m.prototype=y.prototype=ui(b);function x(t){var n;di(n=["next","throw","return"]).call(n,(function(n){c(t,n,(function(t){return this._invoke(n,t)}))}))}function _(t,n){function r(o,i,u,a){var c=l(t[o],t,i);if("throw"!==c.type){var f=c.arg,s=f.value;return s&&"object"===pe(s)&&e.call(s,"__await")?n.resolve(s.__await).then((function(t){r("next",t,u,a)}),(function(t){r("throw",t,u,a)})):n.resolve(s).then((function(t){f.value=t,u(f)}),(function(t){return r("throw",t,u,a)}))}a(c.arg)}var o;this._invoke=function(t,e){function i(){return new n((function(n,o){r(t,e,n,o)}))}return o=o?o.then(i,i):i()}}function O(t,r){var e=t.iterator[r.method];if(e===n){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=n,O(t,r),"throw"===r.method))return h;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=l(e,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=n),r.delegate=null,h):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function S(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function E(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function A(t){this.tryEntries=[{tryLoc:"root"}],di(t).call(t,S,this),this.reset(!0)}function T(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,u=function r(){for(;++o<t.length;)if(e.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=n,r.done=!0,r};return u.next=u}}return{next:j}}function j(){return{value:n,done:!0}}return g.prototype=$.constructor=m,m.constructor=g,g.displayName=c(m,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===g||"GeneratorFunction"===(n.displayName||n.name))},t.mark=function(t){return Fl?Fl(t,m):(t.__proto__=m,c(t,a,"GeneratorFunction")),t.prototype=ui($),t},t.awrap=function(t){return{__await:t}},x(_.prototype),_.prototype[u]=function(){return this},t.AsyncIterator=_,t.async=function(n,r,e,o,i){void 0===i&&(i=Hu);var u=new _(f(n,r,e,o),i);return t.isGeneratorFunction(r)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},x($),c($,a,"Generator"),$[i]=function(){return this},$.toString=function(){return"[object Generator]"},t.keys=function(t){var n=[];for(var r in t)n.push(r);return Gl(n).call(n),function r(){for(;n.length;){var e=n.pop();if(e in t)return r.value=e,r.done=!1,r}return r.done=!0,r}},t.values=T,A.prototype={constructor:A,reset:function(t){var r;if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,di(r=this.tryEntries).call(r,E),!t)for(var o in this)"t"===o.charAt(0)&&e.call(this,o)&&!isNaN(+mi(o).call(o,1))&&(this[o]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(e,o){return a.type="throw",a.arg=t,r.next=e,o&&(r.method="next",r.arg=n),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var u=this.tryEntries[i],a=u.completion;if("root"===u.tryLoc)return o("end");if(u.tryLoc<=this.prev){var c=e.call(u,"catchLoc"),f=e.call(u,"finallyLoc");if(c&&f){if(this.prev<u.catchLoc)return o(u.catchLoc,!0);if(this.prev<u.finallyLoc)return o(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return o(u.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return o(u.finallyLoc)}}}},abrupt:function(t,n){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&e.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=n&&n<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=t,u.arg=n,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(u)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),h},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),h}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc===t){var e=r.completion;if("throw"===e.type){var o=e.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:T(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=n),h}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}}));function Hl(t){var n=function(){if("undefined"==typeof Reflect||!$o)return!1;if($o.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($o(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=ge(t);if(n){var o=ge(this).constructor;r=$o(e,arguments,o)}else r=e.apply(this,arguments);return ve(this,r)}}function Wl(t){var n,r=gf.l10n.required+"";return{c:function(){n=Xa(r)},m:function(t,r){Va(t,n,r)},p:Ra,d:function(t){t&&Ka(n)}}}function Jl(t){var n,r,e,o,i,u;return e=new Kf({props:{show:!t[0]&&t[2],type:"danger",class:"mt-2",$$slots:{default:[Wl]},$$scope:{ctx:t}}}),{c:function(){n=Ya("input"),r=Za(),Dc(e.$$.fragment),rc(n,"type","text"),rc(n,"class","form-control")},m:function(a,c){Va(a,n,c),t[4](n),oc(n,t[0]),Va(a,r,c),zc(e,a,c),o=!0,i||(u=nc(n,"input",t[5]),i=!0)},p:function(t,r){var o=to(r,1)[0];1&o&&n.value!==t[0]&&oc(n,t[0]);var i={};5&o&&(i.show=!t[0]&&t[2]),64&o&&(i.$$scope={dirty:o,ctx:t}),e.$set(i)},i:function(t){o||(Cc(e.$$.fragment,t),o=!0)},o:function(t){Mc(e.$$.fragment,t),o=!1},d:function(o){o&&Ka(n),t[4](null),o&&Ka(r),qc(e,o),i=!1,u()}}}function Vl(t,n,r){var o,i;Fa(t,Mf,(function(t){return r(2,o=t)}));var u=n.value,a=n.valueFormatted;return yc(Ml(Ul.mark((function t(){return Ul.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:gf.intlTelInput.enabled&&(e.default(i).intlTelInput({preferredCountries:[gf.intlTelInput.country],initialCountry:gf.intlTelInput.country,geoIpLookup:function(t){e.default.get("https://ipinfo.io",(function(){}),"jsonp").always((function(n){var r=n&&n.country?n.country:"";t(r)}))},utilsScript:gf.intlTelInput.utils}),e.default(i).on("countrychange",(function(){r(3,a=e.default(i).intlTelInput("getNumber"))})));case 1:case"end":return t.stop()}}),t)})))),t.$$set=function(t){"value"in t&&r(0,u=t.value),"valueFormatted"in t&&r(3,a=t.valueFormatted)},t.$$.update=function(){3&t.$$.dirty&&i&&r(3,a=gf.intlTelInput.enabled?e.default(i).intlTelInput("getNumber"):u)},[u,i,o,a,function(t){mc[t?"unshift":"push"]((function(){r(1,i=t)}))},function(){u=this.value,r(0,u)}]}var Kl=function(t){zt(r,t);var n=Hl(r);function r(t){var e;return i(this,r),Uc(Z(e=n.call(this)),t,Vl,Jl,Na,{value:0,valueFormatted:3}),e}return r}(Hc);function Ql(t){var n=function(){if("undefined"==typeof Reflect||!$o)return!1;if($o.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($o(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=ge(t);if(n){var o=ge(this).constructor;r=$o(e,arguments,o)}else r=e.apply(this,arguments);return ve(this,r)}}function Yl(t){var n,r=gf.l10n.required+"";return{c:function(){n=Xa(r)},m:function(t,r){Va(t,n,r)},p:Ra,d:function(t){t&&Ka(n)}}}function Xl(t){var n,r,e,o,i,u;return e=new Kf({props:{show:!t[0]&&t[1],type:"danger",class:"mt-2",$$slots:{default:[Yl]},$$scope:{ctx:t}}}),{c:function(){n=Ya("input"),r=Za(),Dc(e.$$.fragment),rc(n,"type","text"),rc(n,"class","form-control"),ac(n,"is-invalid",!t[0]&&t[1])},m:function(a,c){Va(a,n,c),oc(n,t[0]),Va(a,r,c),zc(e,a,c),o=!0,i||(u=nc(n,"input",t[2]),i=!0)},p:function(t,r){var o=to(r,1)[0];1&o&&n.value!==t[0]&&oc(n,t[0]),3&o&&ac(n,"is-invalid",!t[0]&&t[1]);var i={};3&o&&(i.show=!t[0]&&t[1]),8&o&&(i.$$scope={dirty:o,ctx:t}),e.$set(i)},i:function(t){o||(Cc(e.$$.fragment,t),o=!0)},o:function(t){Mc(e.$$.fragment,t),o=!1},d:function(t){t&&Ka(n),t&&Ka(r),qc(e,t),i=!1,u()}}}function Zl(t,n,r){var e;Fa(t,Mf,(function(t){return r(1,e=t)}));var o=n.value;return t.$$set=function(t){"value"in t&&r(0,o=t.value)},[o,e,function(){o=this.value,r(0,o)}]}var ts=function(t){zt(r,t);var n=Ql(r);function r(t){var e;return i(this,r),Uc(Z(e=n.call(this)),t,Zl,Xl,Na,{value:0}),e}return r}(Hc);function ns(t){var n=function(){if("undefined"==typeof Reflect||!$o)return!1;if($o.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($o(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=ge(t);if(n){var o=ge(this).constructor;r=$o(e,arguments,o)}else r=e.apply(this,arguments);return ve(this,r)}}function rs(t){var n,r=gf.l10n.required+"";return{c:function(){n=Xa(r)},m:function(t,r){Va(t,n,r)},p:Ra,d:function(t){t&&Ka(n)}}}function es(t){var n,r,e,o,i,u;return e=new Kf({props:{show:!t[0]&&t[1],type:"danger",class:"mt-2",$$slots:{default:[rs]},$$scope:{ctx:t}}}),{c:function(){n=Ya("input"),r=Za(),Dc(e.$$.fragment),rc(n,"type","text"),rc(n,"class","form-control"),ac(n,"is-invalid",!t[0]&&t[1])},m:function(a,c){Va(a,n,c),oc(n,t[0]),Va(a,r,c),zc(e,a,c),o=!0,i||(u=nc(n,"input",t[2]),i=!0)},p:function(t,r){var o=to(r,1)[0];1&o&&n.value!==t[0]&&oc(n,t[0]),3&o&&ac(n,"is-invalid",!t[0]&&t[1]);var i={};3&o&&(i.show=!t[0]&&t[1]),8&o&&(i.$$scope={dirty:o,ctx:t}),e.$set(i)},i:function(t){o||(Cc(e.$$.fragment,t),o=!0)},o:function(t){Mc(e.$$.fragment,t),o=!1},d:function(t){t&&Ka(n),t&&Ka(r),qc(e,t),i=!1,u()}}}function os(t,n,r){var e;Fa(t,Mf,(function(t){return r(1,e=t)}));var o=n.value;return t.$$set=function(t){"value"in t&&r(0,o=t.value)},[o,e,function(){o=this.value,r(0,o)}]}var is=function(t){zt(r,t);var n=ns(r);function r(t){var e;return i(this,r),Uc(Z(e=n.call(this)),t,os,es,Na,{value:0}),e}return r}(Hc);function us(t){var n=function(){if("undefined"==typeof Reflect||!$o)return!1;if($o.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($o(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=ge(t);if(n){var o=ge(this).constructor;r=$o(e,arguments,o)}else r=e.apply(this,arguments);return ve(this,r)}}function as(t,n,r){var e=mi(t).call(t);return e[8]=n[r],e[9]=n,e[10]=r,e}function cs(t){var n,r,e,o,i,u,a,c,f,l,s,p,v,d,h,y,g;function m(n){t[3](n,t[8])}var b={};function w(n){t[4](n,t[8])}void 0!==t[8].name&&(b.value=t[8].name),i=new is({props:b}),mc.push((function(){return Bc(i,"value",m)}));var $={};function x(n){t[5](n,t[8])}function _(n){t[6](n,t[8])}void 0!==t[8].email&&($.value=t[8].email),f=new ts({props:$}),mc.push((function(){return Bc(f,"value",w)}));var O={};void 0!==t[8].phone&&(O.value=t[8].phone),void 0!==t[8].phone_formatted&&(O.valueFormatted=t[8].phone_formatted),v=new Kl({props:O}),mc.push((function(){return Bc(v,"value",x)})),mc.push((function(){return Bc(v,"valueFormatted",_)}));var S=0!==t[10]&&function(t){var n,r,e,o,i,u;function a(){return t[7](t[10])}return{c:function(){n=Ya("div"),r=Ya("button"),e=Ya("i"),(o=Ya("span")).textContent="".concat(gf.l10n.delete),rc(e,"class","fa fa-fw far fa-trash-alt"),rc(o,"class","d-inline d-md-none"),rc(r,"class","btn btn-danger mb-3 mb-md-0"),rc(n,"class","col-12 col-md-1 text-right")},m:function(t,c){Va(t,n,c),Ja(n,r),Ja(r,e),Ja(r,o),i||(u=nc(r,"click",a),i=!0)},p:function(n,r){t=n},d:function(t){t&&Ka(n),i=!1,u()}}}(t);return{c:function(){n=Ya("div"),r=Ya("div"),e=Ya("div"),o=Ya("div"),Dc(i.$$.fragment),a=Za(),c=Ya("div"),Dc(f.$$.fragment),s=Za(),p=Ya("div"),Dc(v.$$.fragment),y=Za(),S&&S.c(),rc(o,"class","form-group col-md-4 mb-3 mb-md-0"),rc(c,"class","form-group col-md-4 mb-3 mb-md-0"),rc(p,"class","form-group col-12 col-md-3 mb-3 mb-md-0"),rc(e,"class","form-row"),rc(r,"class","card-body pb-0"),rc(n,"class","card mb-2 bookly-item-card")},m:function(t,u){Va(t,n,u),Ja(n,r),Ja(r,e),Ja(e,o),zc(i,o,null),Ja(e,a),Ja(e,c),zc(f,c,null),Ja(e,s),Ja(e,p),zc(v,p,null),Ja(e,y),S&&S.m(e,null),g=!0},p:function(n,r){t=n;var e={};!u&&1&r&&(u=!0,e.value=t[8].name,Oc((function(){return u=!1}))),i.$set(e);var o={};!l&&1&r&&(l=!0,o.value=t[8].email,Oc((function(){return l=!1}))),f.$set(o);var a={};!d&&1&r&&(d=!0,a.value=t[8].phone,Oc((function(){return d=!1}))),!h&&1&r&&(h=!0,a.valueFormatted=t[8].phone_formatted,Oc((function(){return h=!1}))),v.$set(a),0!==t[10]&&S.p(t,r)},i:function(t){g||(Cc(i.$$.fragment,t),Cc(f.$$.fragment,t),Cc(v.$$.fragment,t),g=!0)},o:function(t){Mc(i.$$.fragment,t),Mc(f.$$.fragment,t),Mc(v.$$.fragment,t),g=!1},d:function(t){t&&Ka(n),qc(i),qc(f),qc(v),S&&S.d()}}}function fs(t){for(var n,r,e,o,i,u,a,c,f,l,s,p,v,d=hf("pro"),h=t[0],y=[],g=0;g<h.length;g+=1)y[g]=cs(as(t,h,g));var m=function(t){return Mc(y[t],1,1,(function(){y[t]=null}))},b=d&&function(t){var n,r,e,o,i,u,a,c=gf.l10n.add_staff+"";return{c:function(){n=Ya("div"),r=Ya("button"),e=Ya("i"),o=Za(),i=Xa(c),rc(e,"class","fa fa-fw fas fa-plus"),rc(r,"class","btn btn-primary"),rc(n,"class","text-right mt-3")},m:function(c,f){Va(c,n,f),Ja(n,r),Ja(r,e),Ja(r,o),Ja(r,i),u||(a=nc(r,"click",t[1]),u=!0)},p:Ra,d:function(t){t&&Ka(n),u=!1,a()}}}(t);return{c:function(){n=Ya("div"),r=Ya("div"),(e=Ya("label")).textContent="".concat(gf.l10n.staff_name),o=Za(),i=Ya("div"),(u=Ya("label")).textContent="".concat(gf.l10n.staff_email),a=Za(),c=Ya("div"),(f=Ya("label")).textContent="".concat(gf.l10n.staff_phone),l=Za();for(var t=0;t<y.length;t+=1)y[t].c();s=Za(),b&&b.c(),p=tc(),rc(r,"class","col-md-4"),rc(i,"class","col-md-4"),rc(c,"class","col-md-3"),rc(n,"class","form-row d-none d-md-flex")},m:function(t,d){Va(t,n,d),Ja(n,r),Ja(r,e),Ja(n,o),Ja(n,i),Ja(i,u),Ja(n,a),Ja(n,c),Ja(c,f),Va(t,l,d);for(var h=0;h<y.length;h+=1)y[h].m(t,d);Va(t,s,d),b&&b.m(t,d),Va(t,p,d),v=!0},p:function(t,n){var r=to(n,1)[0];if(5&r){var e;for(h=t[0],e=0;e<h.length;e+=1){var o=as(t,h,e);y[e]?(y[e].p(o,r),Cc(y[e],1)):(y[e]=cs(o),y[e].c(),Cc(y[e],1),y[e].m(s.parentNode,s))}for(Ic(),e=h.length;e<y.length;e+=1)m(e);Lc()}d&&b.p(t,r)},i:function(t){if(!v){for(var n=0;n<h.length;n+=1)Cc(y[n]);v=!0}},o:function(t){y=ya(y).call(y,Boolean);for(var n=0;n<y.length;n+=1)Mc(y[n]);v=!1},d:function(t){t&&Ka(n),t&&Ka(l),Qa(y,t),t&&Ka(s),b&&b.d(t),t&&Ka(p)}}}function ls(t,n,r){var e;function o(t){oa(e).call(e,t,1),Pf.set(e)}Fa(t,Pf,(function(t){return r(0,e=t)}));return[e,function(){e.push(vf(Rf)),Pf.set(e)},o,function(n,r){t.$$.not_equal(r.name,n)&&(r.name=n,Pf.set(e))},function(n,r){t.$$.not_equal(r.email,n)&&(r.email=n,Pf.set(e))},function(n,r){t.$$.not_equal(r.phone,n)&&(r.phone=n,Pf.set(e))},function(n,r){t.$$.not_equal(r.phone_formatted,n)&&(r.phone_formatted=n,Pf.set(e))},function(t){return o(t)}]}var ss=function(t){zt(r,t);var n=us(r);function r(t){var e;return i(this,r),Uc(Z(e=n.call(this)),t,ls,fs,Na,{}),e}return r}(Hc);function ps(t){var n=function(){if("undefined"==typeof Reflect||!$o)return!1;if($o.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($o(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=ge(t);if(n){var o=ge(this).constructor;r=$o(e,arguments,o)}else r=e.apply(this,arguments);return ve(this,r)}}function vs(t){var n,r=gf.l10n.required+"";return{c:function(){n=Xa(r)},m:function(t,r){Va(t,n,r)},p:Ra,d:function(t){t&&Ka(n)}}}function ds(t){var n,r,e,o,i,u;return e=new Kf({props:{show:!t[0]&&t[1],type:"danger",class:"mt-2",$$slots:{default:[vs]},$$scope:{ctx:t}}}),{c:function(){n=Ya("input"),r=Za(),Dc(e.$$.fragment),rc(n,"type","text"),rc(n,"class","form-control"),ac(n,"is-invalid",!t[0]&&t[1])},m:function(a,c){Va(a,n,c),oc(n,t[0]),Va(a,r,c),zc(e,a,c),o=!0,i||(u=nc(n,"input",t[2]),i=!0)},p:function(t,r){var o=to(r,1)[0];1&o&&n.value!==t[0]&&oc(n,t[0]),3&o&&ac(n,"is-invalid",!t[0]&&t[1]);var i={};3&o&&(i.show=!t[0]&&t[1]),8&o&&(i.$$scope={dirty:o,ctx:t}),e.$set(i)},i:function(t){o||(Cc(e.$$.fragment,t),o=!0)},o:function(t){Mc(e.$$.fragment,t),o=!1},d:function(t){t&&Ka(n),t&&Ka(r),qc(e,t),i=!1,u()}}}function hs(t,n,r){var e;Fa(t,Mf,(function(t){return r(1,e=t)}));var o=n.value;return t.$$set=function(t){"value"in t&&r(0,o=t.value)},[o,e,function(){o=this.value,r(0,o)}]}var ys=function(t){zt(r,t);var n=ps(r);function r(t){var e;return i(this,r),Uc(Z(e=n.call(this)),t,hs,ds,Na,{value:0}),e}return r}(Hc);function gs(t){var n=function(){if("undefined"==typeof Reflect||!$o)return!1;if($o.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($o(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=ge(t);if(n){var o=ge(this).constructor;r=$o(e,arguments,o)}else r=e.apply(this,arguments);return ve(this,r)}}function ms(t,n,r){var e=mi(t).call(t);return e[3]=n[r],e}function bs(t){var n,r,e=t[3].title+"";return{c:function(){n=Ya("option"),r=Xa(e),n.__value=t[3].value,n.value=n.__value},m:function(t,e){Va(t,n,e),Ja(n,r)},p:Ra,d:function(t){t&&Ka(n)}}}function ws(t){var n,r=gf.l10n.required+"";return{c:function(){n=Xa(r)},m:function(t,r){Va(t,n,r)},p:Ra,d:function(t){t&&Ka(n)}}}function $s(t){for(var n,r,e,o,i,u,a=gf.durations,c=[],f=0;f<a.length;f+=1)c[f]=bs(ms(t,a,f));return e=new Kf({props:{show:!t[0]&&t[1],type:"danger",class:"mt-2",$$slots:{default:[ws]},$$scope:{ctx:t}}}),{c:function(){n=Ya("select");for(var o=0;o<c.length;o+=1)c[o].c();r=Za(),Dc(e.$$.fragment),rc(n,"class","form-control"),void 0===t[0]&&_c((function(){return t[2].call(n)})),ac(n,"is-invalid",!t[0]&&t[1])},m:function(a,f){Va(a,n,f);for(var l=0;l<c.length;l+=1)c[l].m(n,null);ic(n,t[0]),Va(a,r,f),zc(e,a,f),o=!0,i||(u=nc(n,"change",t[2]),i=!0)},p:function(t,r){var o=to(r,1)[0];if(0&o){var i;for(a=gf.durations,i=0;i<a.length;i+=1){var u=ms(t,a,i);c[i]?c[i].p(u,o):(c[i]=bs(u),c[i].c(),c[i].m(n,null))}for(;i<c.length;i+=1)c[i].d(1);c.length=a.length}1&o&&ic(n,t[0]),3&o&&ac(n,"is-invalid",!t[0]&&t[1]);var f={};3&o&&(f.show=!t[0]&&t[1]),64&o&&(f.$$scope={dirty:o,ctx:t}),e.$set(f)},i:function(t){o||(Cc(e.$$.fragment,t),o=!0)},o:function(t){Mc(e.$$.fragment,t),o=!1},d:function(t){t&&Ka(n),Qa(c,t),t&&Ka(r),qc(e,t),i=!1,u()}}}function xs(t,n,r){var e;Fa(t,Mf,(function(t){return r(1,e=t)}));var o=n.value;return t.$$set=function(t){"value"in t&&r(0,o=t.value)},[o,e,function(){o=uc(this),r(0,o)}]}var _s=function(t){zt(r,t);var n=gs(r);function r(t){var e;return i(this,r),Uc(Z(e=n.call(this)),t,xs,$s,Na,{value:0}),e}return r}(Hc);function Os(t){var n=function(){if("undefined"==typeof Reflect||!$o)return!1;if($o.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($o(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=ge(t);if(n){var o=ge(this).constructor;r=$o(e,arguments,o)}else r=e.apply(this,arguments);return ve(this,r)}}function Ss(t,n,r){var e=mi(t).call(t);return e[6]=n[r],e[7]=n,e[8]=r,e}function Es(t){var n,r,e,o,i,u,a,c,f,l,s,p;function v(n){t[3](n,t[6])}var d={};function h(n){t[4](n,t[6])}void 0!==t[6].title&&(d.value=t[6].title),i=new ys({props:d}),mc.push((function(){return Bc(i,"value",v)}));var y={};void 0!==t[6].duration&&(y.value=t[6].duration),f=new _s({props:y}),mc.push((function(){return Bc(f,"value",h)}));var g=0!==t[8]&&function(t){var n,r,e,o,i,u;function a(){return t[5](t[8])}return{c:function(){n=Ya("div"),r=Ya("button"),e=Ya("i"),(o=Ya("span")).textContent="".concat(gf.l10n.delete),rc(e,"class","fa fa-fw far fa-trash-alt"),rc(o,"class","d-inline d-md-none"),rc(r,"class","btn btn-danger mb-3 mb-md-0"),rc(n,"class","col-12 col-md-1 text-right")},m:function(t,c){Va(t,n,c),Ja(n,r),Ja(r,e),Ja(r,o),i||(u=nc(r,"click",a),i=!0)},p:function(n,r){t=n},d:function(t){t&&Ka(n),i=!1,u()}}}(t);return{c:function(){n=Ya("div"),r=Ya("div"),e=Ya("div"),o=Ya("div"),Dc(i.$$.fragment),a=Za(),c=Ya("div"),Dc(f.$$.fragment),s=Za(),g&&g.c(),rc(o,"class","form-group col-md-6 mb-3 mb-md-0"),rc(c,"class","form-group col-md-5 mb-3 mb-md-0"),rc(e,"class","form-row"),rc(r,"class","card-body pb-0"),rc(n,"class","card mb-2 bookly-item-card")},m:function(t,u){Va(t,n,u),Ja(n,r),Ja(r,e),Ja(e,o),zc(i,o,null),Ja(e,a),Ja(e,c),zc(f,c,null),Ja(e,s),g&&g.m(e,null),p=!0},p:function(n,r){t=n;var e={};!u&&1&r&&(u=!0,e.value=t[6].title,Oc((function(){return u=!1}))),i.$set(e);var o={};!l&&1&r&&(l=!0,o.value=t[6].duration,Oc((function(){return l=!1}))),f.$set(o),0!==t[8]&&g.p(t,r)},i:function(t){p||(Cc(i.$$.fragment,t),Cc(f.$$.fragment,t),p=!0)},o:function(t){Mc(i.$$.fragment,t),Mc(f.$$.fragment,t),p=!1},d:function(t){t&&Ka(n),qc(i),qc(f),g&&g.d()}}}function As(t){for(var n,r,e,o,i,u,a,c,f,l,s=hf("pro"),p=t[0],v=[],d=0;d<p.length;d+=1)v[d]=Es(Ss(t,p,d));var h=function(t){return Mc(v[t],1,1,(function(){v[t]=null}))},y=s&&function(t){var n,r,e,o,i,u,a,c=gf.l10n.add_service+"";return{c:function(){n=Ya("div"),r=Ya("button"),e=Ya("i"),o=Za(),i=Xa(c),rc(e,"class","fa fa-fw fas fa-plus"),rc(r,"class","btn btn-primary"),rc(n,"class","text-right mt-3")},m:function(c,f){Va(c,n,f),Ja(n,r),Ja(r,e),Ja(r,o),Ja(r,i),u||(a=nc(r,"click",t[1]),u=!0)},p:Ra,d:function(t){t&&Ka(n),u=!1,a()}}}(t);return{c:function(){n=Ya("div"),r=Ya("div"),(e=Ya("label")).textContent="".concat(gf.l10n.service_title),o=Za(),i=Ya("div"),(u=Ya("label")).textContent="".concat(gf.l10n.service_duration),a=Za();for(var t=0;t<v.length;t+=1)v[t].c();c=Za(),y&&y.c(),f=tc(),rc(r,"class","col-md-6"),rc(i,"class","col-md-5"),rc(n,"class","form-row d-none d-md-flex")},m:function(t,s){Va(t,n,s),Ja(n,r),Ja(r,e),Ja(n,o),Ja(n,i),Ja(i,u),Va(t,a,s);for(var p=0;p<v.length;p+=1)v[p].m(t,s);Va(t,c,s),y&&y.m(t,s),Va(t,f,s),l=!0},p:function(t,n){var r=to(n,1)[0];if(5&r){var e;for(p=t[0],e=0;e<p.length;e+=1){var o=Ss(t,p,e);v[e]?(v[e].p(o,r),Cc(v[e],1)):(v[e]=Es(o),v[e].c(),Cc(v[e],1),v[e].m(c.parentNode,c))}for(Ic(),e=p.length;e<v.length;e+=1)h(e);Lc()}s&&y.p(t,r)},i:function(t){if(!l){for(var n=0;n<p.length;n+=1)Cc(v[n]);l=!0}},o:function(t){v=ya(v).call(v,Boolean);for(var n=0;n<v.length;n+=1)Mc(v[n]);l=!1},d:function(t){t&&Ka(n),t&&Ka(a),Qa(v,t),t&&Ka(c),y&&y.d(t),t&&Ka(f)}}}function Ts(t,n,r){var e;function o(t){oa(e).call(e,t,1),Lf.set(e)}Fa(t,Lf,(function(t){return r(0,e=t)}));return[e,function(){e.push(vf(If)),Lf.set(e)},o,function(n,r){t.$$.not_equal(r.title,n)&&(r.title=n,Lf.set(e))},function(n,r){t.$$.not_equal(r.duration,n)&&(r.duration=n,Lf.set(e))},function(t){return o(t)}]}var js=function(t){zt(r,t);var n=Os(r);function r(t){var e;return i(this,r),Uc(Z(e=n.call(this)),t,Ts,As,Na,{}),e}return r}(Hc);function ks(t){var n=function(){if("undefined"==typeof Reflect||!$o)return!1;if($o.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($o(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=ge(t);if(n){var o=ge(this).constructor;r=$o(e,arguments,o)}else r=e.apply(this,arguments);return ve(this,r)}}function Rs(t){var n,r,e,o,i,u,a,c,f,l=gf.l10n.done.string_1+"",s=gf.l10n.done.string_2+"",p=gf.l10n.done.string_3+"",v=gf.l10n.done.string_4+"",d=!hf("pro"),h=d&&function(t){var n,r,e,o,i,u=gf.l10n.done.string_5+"";return{c:function(){n=Ya("div"),r=Ya("div"),e=Ya("img"),o=Za(),rc(e,"class","img-thumbnail float-left mr-3"),"https://www.booking-wp-plugin.com/wp-content/uploads/2018/09/bookly-pro.png"!==e.src&&rc(e,"src","https://www.booking-wp-plugin.com/wp-content/uploads/2018/09/bookly-pro.png"),function(t,n,r,e){t.style.setProperty(n,r,e?"important":"")}(e,"max-width","64px"),rc(e,"alt","Bookly Pro (Add-on)"),i=new fc(null),rc(r,"class","card-body"),rc(n,"class","card bg-light")},m:function(t,a){Va(t,n,a),Ja(n,r),Ja(r,e),Ja(r,o),i.m(u,r)},p:Ra,d:function(t){t&&Ka(n)}}}();return{c:function(){n=Ya("div"),r=Ya("div"),e=Za(),o=Ya("div"),i=Za(),u=Ya("div"),a=Za(),c=Ya("div"),f=Za(),h&&h.c(),rc(r,"class","mb-2"),rc(o,"class","mb-2"),rc(u,"class","mb-2"),rc(c,"class","mb-4"),rc(n,"class","form-group")},m:function(t,d){Va(t,n,d),Ja(n,r),r.innerHTML=l,Ja(n,e),Ja(n,o),o.innerHTML=s,Ja(n,i),Ja(n,u),u.innerHTML=p,Ja(n,a),Ja(n,c),c.innerHTML=v,Ja(n,f),h&&h.m(n,null)},p:function(t,n){var r=to(n,1)[0];d&&h.p(t,r)},i:Ra,o:Ra,d:function(t){t&&Ka(n),h&&h.d()}}}var Ps=function(t){zt(r,t);var n=ks(r);function r(t){var e;return i(this,r),Uc(Z(e=n.call(this)),t,null,Rs,Na,{}),e}return r}(Hc);function Is(t){var n=function(){if("undefined"==typeof Reflect||!$o)return!1;if($o.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($o(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=ge(t);if(n){var o=ge(this).constructor;r=$o(e,arguments,o)}else r=e.apply(this,arguments);return ve(this,r)}}function Ls(t,n,r){var e=mi(t).call(t);return e[1]=n[r],e[3]=r,e}function Cs(t){var n,r,e,o,i,u,a,c,f=t[3]+1+"",l=t[1]+"",s=t[3]<3&&function(t){var n;return{c:function(){rc(n=Ya("div"),"class","bookly-stepper-interval col"),ac(n,"active",t[0]>t[3]+1)},m:function(t,r){Va(t,n,r)},p:function(t,r){1&r&&ac(n,"active",t[0]>t[3]+1)},d:function(t){t&&Ka(n)}}}(t);return{c:function(){n=Ya("div"),r=Ya("span"),e=Xa(f),o=Za(),i=Ya("span"),u=Xa(l),a=Za(),s&&s.c(),c=tc(),rc(r,"class","bookly-stepper-number mr-0 mr-md-1"),rc(i,"class","bookly-stepper-title d-none d-md-inline"),rc(n,"class","active col-auto my-1"),ac(n,"active",t[0]>t[3])},m:function(t,f){Va(t,n,f),Ja(n,r),Ja(r,e),Ja(n,o),Ja(n,i),Ja(i,u),Va(t,a,f),s&&s.m(t,f),Va(t,c,f)},p:function(t,r){1&r&&ac(n,"active",t[0]>t[3]),t[3]<3&&s.p(t,r)},d:function(t){t&&Ka(n),t&&Ka(a),s&&s.d(t),t&&Ka(c)}}}function Ms(t){for(var n,r,e,o,i=gf.l10n.steps[t[0]-1]+"",u=gf.l10n.steps,a=[],c=0;c<u.length;c+=1)a[c]=Cs(Ls(t,u,c));return{c:function(){n=Ya("div");for(var t=0;t<a.length;t+=1)a[t].c();r=Za(),e=Ya("div"),o=Xa(i),rc(n,"class","form-row card rounded bg-light p-3 bookly-stepper"),rc(e,"class","bookly-stepper-small-title d-block d-md-none py-2")},m:function(t,i){Va(t,n,i);for(var u=0;u<a.length;u+=1)a[u].m(n,null);Va(t,r,i),Va(t,e,i),Ja(e,o)},p:function(t,r){var e=to(r,1)[0];if(1&e){var c;for(u=gf.l10n.steps,c=0;c<u.length;c+=1){var f=Ls(t,u,c);a[c]?a[c].p(f,e):(a[c]=Cs(f),a[c].c(),a[c].m(n,null))}for(;c<a.length;c+=1)a[c].d(1);a.length=u.length}1&e&&i!==(i=gf.l10n.steps[t[0]-1]+"")&&function(t,n){n=""+n,t.wholeText!==n&&(t.data=n)}(o,i)},i:Ra,o:Ra,d:function(t){t&&Ka(n),Qa(a,t),t&&Ka(r),t&&Ka(e)}}}function Ns(t,n,r){var e;return Fa(t,Cf,(function(t){return r(0,e=t)})),[e]}var Fs,Bs=function(t){zt(r,t);var n=Is(r);function r(t){var e;return i(this,r),Uc(Z(e=n.call(this)),t,Ns,Ms,Na,{}),e}return r}(Hc);function Ds(t){var n=function(){if("undefined"==typeof Reflect||!$o)return!1;if($o.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call($o(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,e=ge(t);if(n){var o=ge(this).constructor;r=$o(e,arguments,o)}else r=e.apply(this,arguments);return ve(this,r)}}function zs(t){var n,r,e,o,i,u=1===t[1]&&Gs(),a=2===t[1]&&Us(),c=3===t[1]&&Hs(),f=4===t[1]&&Ws();return{c:function(){n=Ya("div"),u&&u.c(),r=Za(),a&&a.c(),e=Za(),c&&c.c(),o=Za(),f&&f.c(),rc(n,"class","my-0 my-md-3")},m:function(t,l){Va(t,n,l),u&&u.m(n,null),Ja(n,r),a&&a.m(n,null),Ja(n,e),c&&c.m(n,null),Ja(n,o),f&&f.m(n,null),i=!0},p:function(t,i){1===t[1]?u?2&i&&Cc(u,1):((u=Gs()).c(),Cc(u,1),u.m(n,r)):u&&(Ic(),Mc(u,1,1,(function(){u=null})),Lc()),2===t[1]?a?2&i&&Cc(a,1):((a=Us()).c(),Cc(a,1),a.m(n,e)):a&&(Ic(),Mc(a,1,1,(function(){a=null})),Lc()),3===t[1]?c?2&i&&Cc(c,1):((c=Hs()).c(),Cc(c,1),c.m(n,o)):c&&(Ic(),Mc(c,1,1,(function(){c=null})),Lc()),4===t[1]?f?2&i&&Cc(f,1):((f=Ws()).c(),Cc(f,1),f.m(n,null)):f&&(Ic(),Mc(f,1,1,(function(){f=null})),Lc())},i:function(t){i||(Cc(u),Cc(a),Cc(c),Cc(f),i=!0)},o:function(t){Mc(u),Mc(a),Mc(c),Mc(f),i=!1},d:function(t){t&&Ka(n),u&&u.d(),a&&a.d(),c&&c.d(),f&&f.d()}}}function qs(t){var n;return{c:function(){rc(n=Ya("div"),"class","bookly-loading")},m:function(t,r){Va(t,n,r)},p:Ra,i:Ra,o:Ra,d:function(t){t&&Ka(n)}}}function Gs(t){var n,r;return n=new Il({}),{c:function(){Dc(n.$$.fragment)},m:function(t,e){zc(n,t,e),r=!0},i:function(t){r||(Cc(n.$$.fragment,t),r=!0)},o:function(t){Mc(n.$$.fragment,t),r=!1},d:function(t){qc(n,t)}}}function Us(t){var n,r;return n=new ss({}),{c:function(){Dc(n.$$.fragment)},m:function(t,e){zc(n,t,e),r=!0},i:function(t){r||(Cc(n.$$.fragment,t),r=!0)},o:function(t){Mc(n.$$.fragment,t),r=!1},d:function(t){qc(n,t)}}}function Hs(t){var n,r;return n=new js({}),{c:function(){Dc(n.$$.fragment)},m:function(t,e){zc(n,t,e),r=!0},i:function(t){r||(Cc(n.$$.fragment,t),r=!0)},o:function(t){Mc(n.$$.fragment,t),r=!1},d:function(t){qc(n,t)}}}function Ws(t){var n,r;return n=new Ps({}),{c:function(){Dc(n.$$.fragment)},m:function(t,e){zc(n,t,e),r=!0},i:function(t){r||(Cc(n.$$.fragment,t),r=!0)},o:function(t){Mc(n.$$.fragment,t),r=!1},d:function(t){qc(n,t)}}}function Js(t){var n,r,e,o,i,u=t[1]>1&&Vs(t),a=t[1]>1&&t[1]<4&&Ks(t);function c(t,n){return t[1]<4?Ys:Qs}var f=c(t),l=f(t);return{c:function(){n=Ya("div"),r=Ya("div"),u&&u.c(),e=Za(),a&&a.c(),o=Za(),i=Ya("div"),l.c(),rc(r,"class","col"),rc(i,"class","col text-right"),rc(n,"class","form-row bookly-setup-footer")},m:function(t,c){Va(t,n,c),Ja(n,r),u&&u.m(r,null),Ja(r,e),a&&a.m(r,null),Ja(n,o),Ja(n,i),l.m(i,null)},p:function(t,n){t[1]>1?u?u.p(t,n):((u=Vs(t)).c(),u.m(r,e)):u&&(u.d(1),u=null),t[1]>1&&t[1]<4?a?a.p(t,n):((a=Ks(t)).c(),a.m(r,null)):a&&(a.d(1),a=null),f===(f=c(t))&&l?l.p(t,n):(l.d(1),(l=f(t))&&(l.c(),l.m(i,null)))},d:function(t){t&&Ka(n),u&&u.d(),a&&a.d(),l.d()}}}function Vs(t){var n,r,e;return{c:function(){(n=Ya("button")).textContent="".concat(gf.l10n.back),rc(n,"class","btn btn-default")},m:function(o,i){Va(o,n,i),r||(e=nc(n,"click",t[3]),r=!0)},p:Ra,d:function(t){t&&Ka(n),r=!1,e()}}}function Ks(t){var n,r,e;return{c:function(){(n=Ya("button")).textContent="".concat(gf.l10n.skip),rc(n,"class","btn btn-light text-secondary")},m:function(o,i){Va(o,n,i),r||(e=nc(n,"click",t[4]),r=!0)},p:Ra,d:function(t){t&&Ka(n),r=!1,e()}}}function Qs(t){var n,r,e;return{c:function(){(n=Ya("button")).textContent="".concat(gf.l10n.finish),rc(n,"class","btn btn-primary")},m:function(o,i){Va(o,n,i),r||(e=nc(n,"click",t[4]),r=!0)},p:Ra,d:function(t){t&&Ka(n),r=!1,e()}}}function Ys(t){var n,r,e;return{c:function(){(n=Ya("button")).textContent="".concat(gf.l10n.continue),rc(n,"class","btn btn-primary")},m:function(o,i){Va(o,n,i),r||(e=nc(n,"click",t[2]),r=!0)},p:Ra,d:function(t){t&&Ka(n),r=!1,e()}}}function Xs(t){var n,r,e,o,i,u,a,c;e=new Bs({});var f=[qs,zs],l=[];function s(t,n){return t[0]?0:1}i=s(t),u=l[i]=f[i](t);var p=!t[0]&&Js(t);return{c:function(){n=Ya("div"),r=Ya("div"),Dc(e.$$.fragment),o=Za(),u.c(),a=Za(),p&&p.c(),rc(r,"class","card-body"),rc(n,"class","card")},m:function(t,u){Va(t,n,u),Ja(n,r),zc(e,r,null),Ja(r,o),l[i].m(r,null),Ja(r,a),p&&p.m(r,null),c=!0},p:function(t,n){var e=to(n,1)[0],o=i;(i=s(t))===o?l[i].p(t,e):(Ic(),Mc(l[o],1,1,(function(){l[o]=null})),Lc(),(u=l[i])?u.p(t,e):(u=l[i]=f[i](t)).c(),Cc(u,1),u.m(r,a)),t[0]?p&&(p.d(1),p=null):p?p.p(t,e):((p=Js(t)).c(),p.m(r,null))},i:function(t){c||(Cc(e.$$.fragment,t),Cc(u),c=!0)},o:function(t){Mc(e.$$.fragment,t),Mc(u),c=!1},d:function(t){t&&Ka(n),qc(e),l[i].d(),p&&p.d()}}}function Zs(t,n,r){var o;Fa(t,Cf,(function(t){return r(1,o=t)}));var i=!0;return[i,o,function(){(function(t){var n,r,o={action:"bookly_save_setup_form",csrf_token:yf,step:t},i=!1;switch(t){case 1:Af.get()&&Tf.get()&&jf.get()&&kf.get()?(o.company=Af.get(),o.industry=Tf.get(),o.size=jf.get(),o.email=kf.get()):i=!0;break;case 2:di(n=Pf.get()).call(n,(function(t){t.name&&t.email&&t.phone||(i=!0)})),o.staff_members=Pf.get();break;case 3:di(r=Lf.get()).call(r,(function(t){t.title||(i=!0)})),o.services=Lf.get()}return i||e.default.post(ajaxurl,o),Mf.set(i),!i})(o)&&za(Cf,o++,o)},function(){za(Cf,o--,o)},function(){r(0,i=!0),e.default.post(ajaxurl,{action:"bookly_finish_setup_form",csrf_token:yf}).then((function(){window.location.href=gf.finish_url}))},function(){za(Cf,o=so(gf.step),o),e.default.get(ajaxurl,{action:"bookly_get_setup_form",csrf_token:yf}).done((function(t){var n;Af.set(t.data.company),Tf.set(t.data.industry),jf.set(t.data.size),kf.set(t.data.email),t.data.staff_members.length>0&&Pf.set(la(n=t.data.staff_members).call(n,(function(t){return Ff(Ff({},t),{},{phone_formatted:""})}))),t.data.services.length>0&&Lf.set(t.data.services)})).always((function(){return r(0,i=!1)}))}]}Fs||(Fs=new(function(t){zt(r,t);var n=Ds(r);function r(t){var e;return i(this,r),Uc(Z(e=n.call(this)),t,Zs,Xs,Na,{show:5}),e}return X(r,[{key:"show",get:function(){return this.$$.ctx[5]}}]),r}(Hc))({target:document.getElementById("bookly-setup-form"),props:{}})),Fs.show()}(jQuery,BooklyL10nSetupForm);
backend/modules/setup/templates/index.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <div id="bookly-tbs" class="wrap">
3
+ <div class="form-row align-items-center mb-3">
4
+ <h4 class="col m-0"><?php esc_html_e( 'Initial setup', 'bookly' ) ?></h4>
5
+ </div>
6
+ <div id="bookly-setup-form"></div>
7
+ </div>
backend/modules/staff/Ajax.php CHANGED
@@ -92,7 +92,7 @@ class Ajax extends Lib\Base\Ajax
92
  $search_columns[] = $field . ' LIKE "%%%s%"';
93
  }
94
  if ( ! empty( $search_columns ) ) {
95
- $query->whereRaw( implode( ' OR ', $search_columns ), array_fill( 0, count( $search_columns ), $filter['search'] ) );
96
  }
97
  }
98
 
92
  $search_columns[] = $field . ' LIKE "%%%s%"';
93
  }
94
  if ( ! empty( $search_columns ) ) {
95
+ $query->whereRaw( implode( ' OR ', $search_columns ), array_fill( 0, count( $search_columns ), $wpdb->esc_like( $filter['search'] ) ) );
96
  }
97
  }
98
 
backend/modules/staff/resources/js/staff-list.js CHANGED
@@ -51,7 +51,7 @@ jQuery(function ($) {
51
  case 'category_name':
52
  columns.push({
53
  data: column, render: function (data, type, row, meta) {
54
- return data !== null ? data : BooklyL10n.uncategorized;
55
  }
56
  });
57
  break;
51
  case 'category_name':
52
  columns.push({
53
  data: column, render: function (data, type, row, meta) {
54
+ return data !== null ? $.fn.dataTable.render.text().display(data) : BooklyL10n.uncategorized;
55
  }
56
  });
57
  break;
backend/resources/images/bookly_28.png ADDED
Binary file
backend/resources/js/alert.js CHANGED
@@ -11,7 +11,7 @@ function booklyAlert(alert) {
11
  if (not_empty) {
12
  let $container = jQuery('#bookly-alert');
13
  if ($container.length === 0) {
14
- $container = jQuery('<div id="bookly-alert" class="bookly-alert"></div>').appendTo('#bookly-tbs');
15
  }
16
  for (let type in alert) {
17
  alert[type].forEach(function (message) {
11
  if (not_empty) {
12
  let $container = jQuery('#bookly-alert');
13
  if ($container.length === 0) {
14
+ $container = jQuery('<div id="bookly-alert" class="bookly-alert" style="max-width:600px"></div>').appendTo('#bookly-tbs');
15
  }
16
  for (let type in alert) {
17
  alert[type].forEach(function (message) {
frontend/modules/booking/Ajax.php CHANGED
@@ -5,6 +5,7 @@ use Bookly\Lib;
5
  use Bookly\Frontend\Components\Booking\InfoText;
6
  use Bookly\Frontend\Modules\Booking\Lib\Steps;
7
  use Bookly\Frontend\Modules\Booking\Lib\Errors;
 
8
 
9
  /**
10
  * Class Ajax
@@ -232,6 +233,7 @@ class Ajax extends Lib\Base\Ajax
232
  'time_text' => $slot->start()->toClientTz()->formatI18n( $finder->isServiceDurationInDays() ? 'D, M d' : get_option( 'time_format' ) ),
233
  'status' => $block_time_slots ? 'booked' : ( $slot->waitingListEverStarted() ? 'waiting-list' : ( $slot->fullyBooked() ? 'booked' : '' ) ),
234
  'additional_text' => $slot->waitingListEverStarted() ? '(' . $slot->maxOnWaitingList() . ')' : ( Lib\Config::groupBookingActive() ? Proxy\GroupBooking::getTimeSlotText( $slot ) : '' ),
 
235
  );
236
  if ( ! $slot->waitingListEverStarted() && $slot->notFullyBooked() && Lib\Config::showSingleTimeSlot() ) {
237
  $block_time_slots = true;
@@ -276,6 +278,14 @@ class Ajax extends Lib\Base\Ajax
276
  $slots = $userData->getSlots();
277
  $selected_date = isset ( $slots[0][2] ) ? $slots[0][2] : null;
278
 
 
 
 
 
 
 
 
 
279
  // Set response.
280
  $response = Proxy\Shared::stepOptions( array(
281
  'success' => true,
@@ -360,10 +370,19 @@ class Ajax extends Lib\Base\Ajax
360
  'time_text' => $slot->start()->toClientTz()->formatI18n( $finder->isServiceDurationInDays() ? 'D, M d' : get_option( 'time_format' ) ),
361
  'status' => $slot->waitingListEverStarted() ? 'waiting-list' : ( $slot->fullyBooked() ? 'booked' : '' ),
362
  'additional_text' => $slot->waitingListEverStarted() ? '(' . $slot->maxOnWaitingList() . ')' : ( Lib\Config::groupBookingActive() ? Proxy\GroupBooking::getTimeSlotText( $slot ) : '' ),
 
363
  );
364
  }
365
  }
366
 
 
 
 
 
 
 
 
 
367
  // Set response.
368
  $response = array(
369
  'success' => true,
@@ -550,9 +569,12 @@ class Ajax extends Lib\Base\Ajax
550
  'enabled' => 0,
551
  ),
552
  'woocommerce' => array(
553
- 'enabled' => $woocommerce_enabled,
554
  'cart_url' => $woocommerce_enabled ? wc_get_cart_url() : '',
555
  ),
 
 
 
556
  ), 'details' );
557
  } else {
558
  $response = array( 'success' => false, 'error' => Errors::SESSION_ERROR );
@@ -601,91 +623,63 @@ class Ajax extends Lib\Base\Ajax
601
  $payment_options = array();
602
 
603
  // Prepare info texts.
604
- $cart_items_count = count( $userData->cart->getItems() );
605
  if ( $payment_step === 'show' ) {
606
- $options = array();
607
- if ( Lib\Config::payLocallyEnabled() && Proxy\CustomerGroups::allowedGateway( 'local', $userData ) !== false ) {
608
- $options['local'] = array(
609
- 'html' => self::renderTemplate( '_payment_local', array( 'form_id' => self::parameter( 'form_id' ) ), false ),
610
- 'pay' => $cart_info->getPayNow(),
611
- );
612
- }
613
- if ( Proxy\CustomerGroups::allowedGateway( 'cloud_stripe', $userData ) !== false ) {
614
- $pay_cloud_stripe = Lib\Cloud\API::getInstance()->account->productActive( 'stripe' ) && get_option( 'bookly_cloud_stripe_enabled' );
615
- if ( $pay_cloud_stripe ) {
616
- $cart_info->setGateway( Lib\Entities\Payment::TYPE_CLOUD_STRIPE );
617
- $options['cloud_stripe'] = array(
618
- 'html' => self::renderTemplate(
619
- '_cloud_stripe_option',
620
- array(
621
- 'form_id' => self::parameter( 'form_id' ),
622
- 'url_cards_image' => plugins_url( 'frontend/resources/images/cards.png', Lib\Plugin::getMainFile() ),
623
- 'show_price' => Lib\Proxy\Shared::showPaymentSpecificPrices( false ),
624
- 'cart_info' => $cart_info,
625
- 'payment_status' => $userData->extractPaymentStatus(),
626
- ),
627
- false
628
- ),
629
- 'pay' => $cart_info->getPayNow(),
630
- );
631
- }
632
- }
633
- $options = Proxy\Shared::preparePaymentOptions(
634
- $options,
635
- self::parameter( 'form_id' ),
636
- Lib\Proxy\Shared::showPaymentSpecificPrices( false ),
637
- $cart_info,
638
- $userData
639
- );
640
- $order = explode( ',', get_option( 'bookly_pmt_order' ) );
641
 
642
- if ( $order ) {
643
- foreach ( $order as $payment_system ) {
644
- if ( array_key_exists( $payment_system, $options ) ) {
645
- $payment_options[] = $options[ $payment_system ]['html'];
 
646
  }
647
  }
648
- }
649
- foreach ( $options as $slug => $data ) {
650
- if ( ! $order || ! in_array( $slug, $order ) ) {
651
- if ( $data['pay'] == 0 ) {
652
- $payment_step = 'show-100%-discount';
653
- $payment_options = array();
654
- break;
 
655
  }
656
- $payment_options[] = $data['html'];
657
  }
 
 
658
  }
659
- } else {
660
- $pay_cloud_stripe = false;
661
  }
662
 
663
- if ( $payment_step === 'show-100%-discount' ) {
664
- $info_text_tpl = Lib\Utils\Common::getTranslatedOption( 'bookly_l10n_info_payment_step_with_100percents_off_price' );
665
  } else {
666
- $info_text_tpl = Lib\Utils\Common::getTranslatedOption(
667
- $cart_items_count > 1
668
- ? 'bookly_l10n_info_payment_step_several_apps'
669
- : 'bookly_l10n_info_payment_step_single_app'
670
- );
671
- }
672
-
673
- $info_text = InfoText::prepare( Steps::PAYMENT, $info_text_tpl, $userData );
 
674
 
675
- // Set response.
676
- $response = Proxy\Shared::stepOptions( array(
677
- 'success' => true,
678
- 'disabled' => false,
679
- 'html' => self::renderTemplate( '7_payment', array(
680
  'form_id' => self::parameter( 'form_id' ),
681
  'progress_tracker' => $progress_tracker,
682
  'info_text' => $info_text,
683
- 'pay_cloud_stripe' => $pay_cloud_stripe,
684
- 'pay_local' => Lib\Config::payLocallyEnabled(),
685
  'payment_options' => $payment_options,
686
  'page_url' => self::parameter( 'page_url' ),
687
  'userData' => $userData,
688
- ), false ),
 
 
 
 
 
 
 
689
  'stripe_publishable_key' => get_option( 'bookly_stripe_publishable_key' ),
690
  ), 'payment' );
691
  } else {
@@ -827,9 +821,10 @@ class Ajax extends Lib\Base\Ajax
827
  if ( $failed_cart_key === null ) {
828
  $cart_info = $userData->cart->getInfo();
829
  $is_payment_disabled = Lib\Config::paymentStepDisabled();
830
- $is_pay_locally_enabled = Lib\Config::payLocallyEnabled();
831
  $skip_payment = Lib\Proxy\CustomerGroups::getSkipPayment( $userData->getCustomer() );
832
- if ( $is_payment_disabled || $is_pay_locally_enabled || $cart_info->getPayNow() <= 0 || $skip_payment ) {
 
 
833
  // Handle coupon.
834
  $coupon = $userData->getCoupon();
835
  if ( $coupon ) {
@@ -851,16 +846,9 @@ class Ajax extends Lib\Base\Ajax
851
  }
852
  } else {
853
  $payment = new Lib\Entities\Payment();
854
- $options = Proxy\Shared::preparePaymentOptions(
855
- array(),
856
- self::parameter( 'form_id' ),
857
- Lib\Proxy\Shared::showPaymentSpecificPrices( false ),
858
- clone $cart_info,
859
- $userData
860
- );
861
  $status = Lib\Entities\Payment::STATUS_PENDING;
862
  $type = Lib\Entities\Payment::TYPE_LOCAL;
863
- foreach ( $options as $gateway => $data ) {
864
  if ( $data['pay'] == 0 ) {
865
  $status = Lib\Entities\Payment::STATUS_COMPLETED;
866
  $type = Lib\Entities\Payment::TYPE_FREE;
@@ -1113,6 +1101,54 @@ class Ajax extends Lib\Base\Ajax
1113
  wp_send_json( $response );
1114
  }
1115
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1116
  /**
1117
  * Render progress tracker into a variable.
1118
  *
@@ -1307,6 +1343,53 @@ class Ajax extends Lib\Base\Ajax
1307
  }
1308
  }
1309
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1310
  /**
1311
  * Override parent method to exclude actions from CSRF token verification.
1312
  *
5
  use Bookly\Frontend\Components\Booking\InfoText;
6
  use Bookly\Frontend\Modules\Booking\Lib\Steps;
7
  use Bookly\Frontend\Modules\Booking\Lib\Errors;
8
+ use Bookly\Lib\Utils\Common;
9
 
10
  /**
11
  * Class Ajax
233
  'time_text' => $slot->start()->toClientTz()->formatI18n( $finder->isServiceDurationInDays() ? 'D, M d' : get_option( 'time_format' ) ),
234
  'status' => $block_time_slots ? 'booked' : ( $slot->waitingListEverStarted() ? 'waiting-list' : ( $slot->fullyBooked() ? 'booked' : '' ) ),
235
  'additional_text' => $slot->waitingListEverStarted() ? '(' . $slot->maxOnWaitingList() . ')' : ( Lib\Config::groupBookingActive() ? Proxy\GroupBooking::getTimeSlotText( $slot ) : '' ),
236
+ 'slot' => $slot,
237
  );
238
  if ( ! $slot->waitingListEverStarted() && $slot->notFullyBooked() && Lib\Config::showSingleTimeSlot() ) {
239
  $block_time_slots = true;
278
  $slots = $userData->getSlots();
279
  $selected_date = isset ( $slots[0][2] ) ? $slots[0][2] : null;
280
 
281
+ $slots_data = Proxy\Shared::prepareSlotsData( $slots_data );
282
+
283
+ $slots_data = array_map( function ( $slot_data ) {
284
+ unset ( $slot_data['slot'] );
285
+
286
+ return $slot_data;
287
+ }, $slots_data );
288
+
289
  // Set response.
290
  $response = Proxy\Shared::stepOptions( array(
291
  'success' => true,
370
  'time_text' => $slot->start()->toClientTz()->formatI18n( $finder->isServiceDurationInDays() ? 'D, M d' : get_option( 'time_format' ) ),
371
  'status' => $slot->waitingListEverStarted() ? 'waiting-list' : ( $slot->fullyBooked() ? 'booked' : '' ),
372
  'additional_text' => $slot->waitingListEverStarted() ? '(' . $slot->maxOnWaitingList() . ')' : ( Lib\Config::groupBookingActive() ? Proxy\GroupBooking::getTimeSlotText( $slot ) : '' ),
373
+ 'slot' => $slot,
374
  );
375
  }
376
  }
377
 
378
+ $slots_data = Proxy\Shared::prepareSlotsData( $slots_data );
379
+
380
+ $slots_data = array_map( function ( $slot_data ) {
381
+ unset ( $slot_data['slot'] );
382
+
383
+ return $slot_data;
384
+ }, $slots_data );
385
+
386
  // Set response.
387
  $response = array(
388
  'success' => true,
569
  'enabled' => 0,
570
  ),
571
  'woocommerce' => array(
572
+ 'enabled' => $woocommerce_enabled,
573
  'cart_url' => $woocommerce_enabled ? wc_get_cart_url() : '',
574
  ),
575
+ 'l10n' => array(
576
+ 'terms_error' => Lib\Utils\Common::getTranslatedOption( 'bookly_l10n_error_terms' ),
577
+ ),
578
  ), 'details' );
579
  } else {
580
  $response = array( 'success' => false, 'error' => Errors::SESSION_ERROR );
623
  $payment_options = array();
624
 
625
  // Prepare info texts.
 
626
  if ( $payment_step === 'show' ) {
627
+ $gateways = self::getGateways( $userData, $cart_info );
628
+
629
+ if ( $gateways ) {
630
+ $order = explode( ',', get_option( 'bookly_pmt_order' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
631
 
632
+ if ( $order ) {
633
+ foreach ( $order as $payment_system ) {
634
+ if ( array_key_exists( $payment_system, $gateways ) ) {
635
+ $payment_options[ $payment_system ] = $gateways[ $payment_system ]['html'];
636
+ }
637
  }
638
  }
639
+ foreach ( $gateways as $slug => $data ) {
640
+ if ( ! $order || ! in_array( $slug, $order ) ) {
641
+ if ( $data['pay'] == 0 ) {
642
+ $payment_step = 'show-100%-discount';
643
+ $payment_options = array();
644
+ break;
645
+ }
646
+ $payment_options[ $slug ] = $data['html'];
647
  }
 
648
  }
649
+ } else {
650
+ $payment_step = 'payment-impossible';
651
  }
 
 
652
  }
653
 
654
+ if ( $payment_step === 'payment-impossible' ) {
655
+ $html = Proxy\Pro::getHtmlPaymentImpossible( $progress_tracker, $userData );
656
  } else {
657
+ if ( $payment_step === 'show-100%-discount' ) {
658
+ $info_text_tpl = Lib\Utils\Common::getTranslatedOption( 'bookly_l10n_info_payment_step_with_100percents_off_price' );
659
+ } else {
660
+ $info_text_tpl = Lib\Utils\Common::getTranslatedOption(
661
+ count( $userData->cart->getItems() ) > 1
662
+ ? 'bookly_l10n_info_payment_step_several_apps'
663
+ : 'bookly_l10n_info_payment_step_single_app'
664
+ );
665
+ }
666
 
667
+ $info_text = InfoText::prepare( Steps::PAYMENT, $info_text_tpl, $userData );
668
+ $html = self::renderTemplate( '7_payment', array(
 
 
 
669
  'form_id' => self::parameter( 'form_id' ),
670
  'progress_tracker' => $progress_tracker,
671
  'info_text' => $info_text,
 
 
672
  'payment_options' => $payment_options,
673
  'page_url' => self::parameter( 'page_url' ),
674
  'userData' => $userData,
675
+ ), false );
676
+ }
677
+
678
+ // Set response.
679
+ $response = Proxy\Shared::stepOptions( array(
680
+ 'success' => true,
681
+ 'disabled' => false,
682
+ 'html' => $html,
683
  'stripe_publishable_key' => get_option( 'bookly_stripe_publishable_key' ),
684
  ), 'payment' );
685
  } else {
821
  if ( $failed_cart_key === null ) {
822
  $cart_info = $userData->cart->getInfo();
823
  $is_payment_disabled = Lib\Config::paymentStepDisabled();
 
824
  $skip_payment = Lib\Proxy\CustomerGroups::getSkipPayment( $userData->getCustomer() );
825
+ $gateways = self::getGateways( $userData, $cart_info );
826
+
827
+ if ( $is_payment_disabled || isset( $gateways['local'] ) || $cart_info->getPayNow() <= 0 || $skip_payment ) {
828
  // Handle coupon.
829
  $coupon = $userData->getCoupon();
830
  if ( $coupon ) {
846
  }
847
  } else {
848
  $payment = new Lib\Entities\Payment();
 
 
 
 
 
 
 
849
  $status = Lib\Entities\Payment::STATUS_PENDING;
850
  $type = Lib\Entities\Payment::TYPE_LOCAL;
851
+ foreach ( $gateways as $gateway => $data ) {
852
  if ( $data['pay'] == 0 ) {
853
  $status = Lib\Entities\Payment::STATUS_COMPLETED;
854
  $type = Lib\Entities\Payment::TYPE_FREE;
1101
  wp_send_json( $response );
1102
  }
1103
 
1104
+ /**
1105
+ * Download ICS file for order
1106
+ */
1107
+ public static function downloadIcs()
1108
+ {
1109
+ $userData = new Lib\UserBookingData( self::parameter( 'form_id' ) );
1110
+
1111
+ if ( $userData->load() && $userData->getOrderId() ) {
1112
+ // Generate ICS feed.
1113
+ $ics = new Lib\Utils\Ics\Feed();
1114
+
1115
+ $ca_ids = Lib\Entities\CustomerAppointment::query( 'ca' )
1116
+ ->select( 'MIN(ca.id) AS id' )
1117
+ ->where( 'ca.order_id', $userData->getOrderId() )
1118
+ ->groupBy( 'COALESCE(ca.compound_token, ca.collaborative_token, ca.id)' )
1119
+ ->fetchCol( 'id' );
1120
+
1121
+ $query = Proxy\Shared::prepareIcsQuery(
1122
+ Lib\Entities\CustomerAppointment::query( 'ca' )
1123
+ ->select( 'COALESCE(ca.compound_service_id,ca.collaborative_service_id,a.service_id) AS service_id, a.custom_service_name, a.location_id, s.title AS service_title, a.start_date, a.end_date, st.full_name AS staff_name' )
1124
+ ->leftJoin( 'Appointment', 'a', 'a.id = ca.appointment_id' )
1125
+ ->leftJoin( 'Service', 's', 's.id = COALESCE(ca.compound_service_id,ca.collaborative_service_id,a.service_id)' )
1126
+ ->leftJoin( 'Staff', 'st', 'st.id = a.staff_id' )
1127
+ ->whereIn( 'ca.id', $ca_ids )
1128
+ );
1129
+
1130
+ $appointments = $query->fetchArray();
1131
+
1132
+ foreach ( $appointments as $appointment ) {
1133
+ if ( $appointment['service_id'] === null ) {
1134
+ $service_name = $appointment['custom_service_name'];
1135
+ } else {
1136
+ $service_name = Common::getTranslatedString( 'service_' . $appointment['service_id'], $appointment['service_title'] );
1137
+ }
1138
+ $ics->addEvent( $appointment['start_date'], $appointment['end_date'], $service_name, sprintf( "%s\n%s", $service_name, $appointment['staff_name'] ), $appointment['location_id'] );
1139
+ }
1140
+
1141
+ header( 'Content-Type: text/calendar' );
1142
+ header( 'Content-Type: application/octet-stream', false );
1143
+ header( 'Content-Disposition: attachment; filename="Bookly_' . $userData->getOrderId() . '.ics"' );
1144
+ header( 'Content-Transfer-Encoding: binary' );
1145
+
1146
+ echo $ics->render();
1147
+ }
1148
+
1149
+ exit();
1150
+ }
1151
+
1152
  /**
1153
  * Render progress tracker into a variable.
1154
  *
1343
  }
1344
  }
1345
 
1346
+ /**
1347
+ * Return suitable gateways for customer and all staff members
1348
+ *
1349
+ * @param Lib\UserBookingData $userData
1350
+ * @param Lib\CartInfo $cart_info
1351
+ * @return array
1352
+ */
1353
+ private static function getGateways( $userData, $cart_info )
1354
+ {
1355
+ $gateways = array();
1356
+ if ( Lib\Config::payLocallyEnabled() && Proxy\CustomerGroups::allowedGateway( 'local', $userData ) !== false ) {
1357
+ $gateways['local'] = array(
1358
+ 'html' => self::renderTemplate( '_payment_local', array( 'form_id' => self::parameter( 'form_id' ) ), false ),
1359
+ 'pay' => $cart_info->getPayNow(),
1360
+ );
1361
+ }
1362
+ if ( Proxy\CustomerGroups::allowedGateway( 'cloud_stripe', $userData ) !== false ) {
1363
+ $pay_cloud_stripe = Lib\Cloud\API::getInstance()->account->productActive( 'stripe' ) && get_option( 'bookly_cloud_stripe_enabled' );
1364
+ if ( $pay_cloud_stripe ) {
1365
+ $cart_info->setGateway( Lib\Entities\Payment::TYPE_CLOUD_STRIPE );
1366
+ $gateways['cloud_stripe'] = array(
1367
+ 'html' => self::renderTemplate(
1368
+ '_cloud_stripe_option',
1369
+ array(
1370
+ 'form_id' => self::parameter( 'form_id' ),
1371
+ 'url_cards_image' => plugins_url( 'frontend/resources/images/cards.png', Lib\Plugin::getMainFile() ),
1372
+ 'show_price' => Lib\Proxy\Shared::showPaymentSpecificPrices( false ),
1373
+ 'cart_info' => $cart_info,
1374
+ 'payment_status' => $userData->extractPaymentStatus(),
1375
+ ),
1376
+ false
1377
+ ),
1378
+ 'pay' => $cart_info->getPayNow(),
1379
+ );
1380
+ }
1381
+ }
1382
+ $gateways = Proxy\Shared::preparePaymentOptions(
1383
+ $gateways,
1384
+ self::parameter( 'form_id' ),
1385
+ Lib\Proxy\Shared::showPaymentSpecificPrices( false ),
1386
+ $cart_info,
1387
+ $userData
1388
+ );
1389
+
1390
+ return Proxy\Pro::filterGateways( $gateways, $userData );
1391
+ }
1392
+
1393
  /**
1394
  * Override parent method to exclude actions from CSRF token verification.
1395
  *
frontend/modules/booking/ShortCode.php CHANGED
@@ -6,6 +6,7 @@ use Bookly\Frontend\Modules\Booking\Lib\Errors;
6
 
7
  /**
8
  * Class ShortCode
 
9
  * @package Bookly\Frontend\Modules\Booking
10
  */
11
  class ShortCode extends Lib\Base\Component
@@ -72,7 +73,7 @@ class ShortCode extends Lib\Base\Component
72
  'frontend/resources/js/picker.js' => array( 'jquery' ),
73
  'frontend/resources/js/picker.date.js' => array( 'bookly-picker.js' ),
74
  'frontend/resources/js/bookly.min.js' => Proxy\Shared::enqueueBookingScripts( array( 'bookly-hammer.min.js', 'bookly-picker.date.js' ) ),
75
- )
76
  ) );
77
  if ( get_option( 'bookly_cst_phone_default_country' ) != 'disabled' ) {
78
  self::enqueueScripts( array(
@@ -89,15 +90,16 @@ class ShortCode extends Lib\Base\Component
89
  }
90
 
91
  wp_localize_script( 'bookly-bookly.min.js', 'BooklyL10n', array(
92
- 'ajaxurl' => $ajaxurl,
93
  'csrf_token' => Lib\Utils\Common::getCsrfToken(),
94
- 'today' => __( 'Today', 'bookly' ),
95
- 'months' => array_values( $wp_locale->month ),
96
- 'days' => array_values( $wp_locale->weekday ),
97
- 'daysShort' => array_values( $wp_locale->weekday_abbrev ),
98
- 'nextMonth' => __( 'Next month', 'bookly' ),
99
- 'prevMonth' => __( 'Previous month', 'bookly' ),
100
- 'show_more' => __( 'Show more', 'bookly' ),
 
101
  ) );
102
  }
103
  }
@@ -152,22 +154,22 @@ class ShortCode extends Lib\Base\Component
152
 
153
  // Handle short code attributes.
154
  $fields_to_hide = isset ( $attributes['hide'] ) ? explode( ',', $attributes['hide'] ) : array();
155
- $location_id = (int) ( isset( $_GET['loc_id'] ) ? $_GET['loc_id'] : ( isset( $attributes['location_id'] ) ? $attributes['location_id'] : 0 ) );
156
- $category_id = (int) ( isset( $_GET['cat_id'] ) ? $_GET['cat_id'] : ( isset( $attributes['category_id'] ) ? $attributes['category_id'] : 0 ) );
157
- $service_id = (int) ( isset( $_GET['service_id'] ) ? $_GET['service_id'] : ( isset( $attributes['service_id'] ) ? $attributes['service_id'] : 0 ) );
158
- $staff_id = (int) ( isset( $_GET['staff_id'] ) ? $_GET['staff_id'] : ( isset( $attributes['staff_member_id'] ) ? $attributes['staff_member_id'] : 0 ) );
159
 
160
  $form_attributes = array(
161
- 'hide_categories' => in_array( 'categories', $fields_to_hide ),
162
- 'hide_services' => in_array( 'services', $fields_to_hide ),
163
- 'hide_staff_members' => in_array( 'staff_members', $fields_to_hide ) && ( get_option( 'bookly_app_required_employee' ) ? $staff_id : true ),
164
  'show_number_of_persons' => (bool) ( isset( $attributes['show_number_of_persons'] ) ? $attributes['show_number_of_persons'] : false ),
165
- 'hide_service_duration' => true,
166
- 'hide_locations' => true,
167
- 'hide_quantity' => true,
168
- 'hide_date' => in_array( 'date', $fields_to_hide ),
169
- 'hide_week_days' => in_array( 'week_days', $fields_to_hide ),
170
- 'hide_time_range' => in_array( 'time_range', $fields_to_hide ),
171
  );
172
  if ( $form_attributes['hide_categories'] && $category_id ) {
173
  // Keeping 'admin' preselected category,
@@ -183,7 +185,7 @@ class ShortCode extends Lib\Base\Component
183
  $form_attributes['hide_locations'] = in_array( 'locations', $fields_to_hide );
184
  }
185
  if ( Lib\Config::multiplyAppointmentsActive() ) {
186
- $form_attributes['hide_quantity'] = in_array( 'quantity', $fields_to_hide );
187
  }
188
 
189
  $hide_service_part1 = (
@@ -208,12 +210,12 @@ class ShortCode extends Lib\Base\Component
208
 
209
  // Errors.
210
  $errors = array(
211
- Errors::SESSION_ERROR => __( 'Session error.', 'bookly' ),
212
- Errors::FORM_ID_ERROR => __( 'Form ID error.', 'bookly' ),
213
- Errors::CART_ITEM_NOT_AVAILABLE => Lib\Utils\Common::getTranslatedOption( Lib\Config::showStepCart() ? 'bookly_l10n_step_cart_slot_not_available' : 'bookly_l10n_step_time_slot_not_available' ),
214
- Errors::PAY_LOCALLY_NOT_AVAILABLE => __( 'Pay locally is not available.', 'bookly' ),
215
- Errors::INVALID_GATEWAY => __( 'Invalid gateway.', 'bookly' ),
216
- Errors::PAYMENT_ERROR => __( 'Error.', 'bookly' ),
217
  Errors::INCORRECT_USERNAME_PASSWORD => __( 'Incorrect username or password.' ),
218
  );
219
 
6
 
7
  /**
8
  * Class ShortCode
9
+ *
10
  * @package Bookly\Frontend\Modules\Booking
11
  */
12
  class ShortCode extends Lib\Base\Component
73
  'frontend/resources/js/picker.js' => array( 'jquery' ),
74
  'frontend/resources/js/picker.date.js' => array( 'bookly-picker.js' ),
75
  'frontend/resources/js/bookly.min.js' => Proxy\Shared::enqueueBookingScripts( array( 'bookly-hammer.min.js', 'bookly-picker.date.js' ) ),
76
+ ),
77
  ) );
78
  if ( get_option( 'bookly_cst_phone_default_country' ) != 'disabled' ) {
79
  self::enqueueScripts( array(
90
  }
91
 
92
  wp_localize_script( 'bookly-bookly.min.js', 'BooklyL10n', array(
93
+ 'ajaxurl' => $ajaxurl,
94
  'csrf_token' => Lib\Utils\Common::getCsrfToken(),
95
+ 'today' => __( 'Today', 'bookly' ),
96
+ 'months' => array_values( $wp_locale->month ),
97
+ 'days' => array_values( $wp_locale->weekday ),
98
+ 'daysShort' => array_values( $wp_locale->weekday_abbrev ),
99
+ 'monthsShort' => array_values( $wp_locale->month_abbrev ),
100
+ 'nextMonth' => __( 'Next month', 'bookly' ),
101
+ 'prevMonth' => __( 'Previous month', 'bookly' ),
102
+ 'show_more' => __( 'Show more', 'bookly' ),
103
  ) );
104
  }
105
  }
154
 
155
  // Handle short code attributes.
156
  $fields_to_hide = isset ( $attributes['hide'] ) ? explode( ',', $attributes['hide'] ) : array();
157
+ $location_id = (int) ( isset( $_GET['loc_id'] ) ? $_GET['loc_id'] : ( isset( $attributes['location_id'] ) ? $attributes['location_id'] : 0 ) );
158
+ $category_id = (int) ( isset( $_GET['cat_id'] ) ? $_GET['cat_id'] : ( isset( $attributes['category_id'] ) ? $attributes['category_id'] : 0 ) );
159
+ $service_id = (int) ( isset( $_GET['service_id'] ) ? $_GET['service_id'] : ( isset( $attributes['service_id'] ) ? $attributes['service_id'] : 0 ) );
160
+ $staff_id = (int) ( isset( $_GET['staff_id'] ) ? $_GET['staff_id'] : ( isset( $attributes['staff_member_id'] ) ? $attributes['staff_member_id'] : 0 ) );
161
 
162
  $form_attributes = array(
163
+ 'hide_categories' => in_array( 'categories', $fields_to_hide ),
164
+ 'hide_services' => in_array( 'services', $fields_to_hide ),
165
+ 'hide_staff_members' => in_array( 'staff_members', $fields_to_hide ) && ( get_option( 'bookly_app_required_employee' ) ? $staff_id : true ),
166
  'show_number_of_persons' => (bool) ( isset( $attributes['show_number_of_persons'] ) ? $attributes['show_number_of_persons'] : false ),
167
+ 'hide_service_duration' => true,
168
+ 'hide_locations' => true,
169
+ 'hide_quantity' => true,
170
+ 'hide_date' => in_array( 'date', $fields_to_hide ),
171
+ 'hide_week_days' => in_array( 'week_days', $fields_to_hide ),
172
+ 'hide_time_range' => in_array( 'time_range', $fields_to_hide ),
173
  );
174
  if ( $form_attributes['hide_categories'] && $category_id ) {
175
  // Keeping 'admin' preselected category,
185
  $form_attributes['hide_locations'] = in_array( 'locations', $fields_to_hide );
186
  }
187
  if ( Lib\Config::multiplyAppointmentsActive() ) {
188
+ $form_attributes['hide_quantity'] = in_array( 'quantity', $fields_to_hide );
189
  }
190
 
191
  $hide_service_part1 = (
210
 
211
  // Errors.
212
  $errors = array(
213
+ Errors::SESSION_ERROR => __( 'Session error.', 'bookly' ),
214
+ Errors::FORM_ID_ERROR => __( 'Form ID error.', 'bookly' ),
215
+ Errors::CART_ITEM_NOT_AVAILABLE => Lib\Utils\Common::getTranslatedOption( Lib\Config::showStepCart() ? 'bookly_l10n_step_cart_slot_not_available' : 'bookly_l10n_step_time_slot_not_available' ),
216
+ Errors::PAY_LOCALLY_NOT_AVAILABLE => __( 'Pay locally is not available.', 'bookly' ),
217
+ Errors::INVALID_GATEWAY => __( 'Invalid gateway.', 'bookly' ),
218
+ Errors::PAYMENT_ERROR => __( 'Error.', 'bookly' ),
219
  Errors::INCORRECT_USERNAME_PASSWORD => __( 'Incorrect username or password.' ),
220
  );
221
 
frontend/modules/booking/proxy/Pro.php CHANGED
@@ -11,6 +11,8 @@ use Bookly\Lib as BooklyLib;
11
  * @method static void renderDetailsBirthday( BooklyLib\UserBookingData $userData ) Render birthday fields at Details step.
12
  * @method static void renderFacebookButton() Render facebook button.
13
  * @method static void renderTimeZoneSwitcher() Render time zone switcher at Time step.
 
 
14
  */
15
  abstract class Pro extends BooklyLib\Base\Proxy
16
  {
11
  * @method static void renderDetailsBirthday( BooklyLib\UserBookingData $userData ) Render birthday fields at Details step.
12
  * @method static void renderFacebookButton() Render facebook button.
13
  * @method static void renderTimeZoneSwitcher() Render time zone switcher at Time step.
14
+ * @method static string getHtmlPaymentImpossible( string $progress_tracker, BooklyLib\UserBookingData $userData ) Render payment impossible message
15
+ * @method static array filterGateways( $gateways, BooklyLib\UserBookingData $userData ) Remain gateways that are suitable for all staff members
16
  */
17
  abstract class Pro extends BooklyLib\Base\Proxy
18
  {
frontend/modules/booking/proxy/Shared.php CHANGED
@@ -5,6 +5,7 @@ use Bookly\Lib;
5
 
6
  /**
7
  * Class Shared
 
8
  * @package Bookly\Frontend\Modules\Booking\Proxy
9
  *
10
  * @method static array booklyFormOptions( array $options ) Modify Bookly form options.
@@ -14,6 +15,7 @@ use Bookly\Lib;
14
  * @method static array prepareChainItemInfoText( array $data, Lib\ChainItem $chain_item ) Prepare array for replacing in Chain items.
15
  * @method static array prepareInfoTextCodes( array $codes, array $data ) Prepare array for replacing on booking steps.
16
  * @method static array preparePaymentOptions( array $options, $form_id, bool $show_price, Lib\CartInfo $cart_info, Lib\UserBookingData $userData ) Prepare payment options for Payment step.
 
17
  * @method static void renderCartItemInfo( Lib\UserBookingData $userData, $cart_key, $positions, $desktop ) Render extra info for cart item at Cart step.
18
  * @method static string renderCustomFieldsOnDetailsStep( Lib\UserBookingData $userData ) Get Custom Fields HTML for details step.
19
  * @method static void renderPaymentForms( $form_id, $page_url ) Render payment form for each gateway at Payment step.
5
 
6
  /**
7
  * Class Shared
8
+ *
9
  * @package Bookly\Frontend\Modules\Booking\Proxy
10
  *
11
  * @method static array booklyFormOptions( array $options ) Modify Bookly form options.
15
  * @method static array prepareChainItemInfoText( array $data, Lib\ChainItem $chain_item ) Prepare array for replacing in Chain items.
16
  * @method static array prepareInfoTextCodes( array $codes, array $data ) Prepare array for replacing on booking steps.
17
  * @method static array preparePaymentOptions( array $options, $form_id, bool $show_price, Lib\CartInfo $cart_info, Lib\UserBookingData $userData ) Prepare payment options for Payment step.
18
+ * @method static array prepareSlotsData( array $slots_data ) Prepare slots data for Time step.
19
  * @method static void renderCartItemInfo( Lib\UserBookingData $userData, $cart_key, $positions, $desktop ) Render extra info for cart item at Cart step.
20
  * @method static string renderCustomFieldsOnDetailsStep( Lib\UserBookingData $userData ) Get Custom Fields HTML for details step.
21
  * @method static void renderPaymentForms( $form_id, $page_url ) Render payment form for each gateway at Payment step.
frontend/modules/booking/templates/6_details.php CHANGED
@@ -87,6 +87,20 @@ echo Common::stripScripts( $progress_tracker );
87
  </div>
88
  </div>
89
  <?php endif ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  </div>
91
 
92
  <?php Proxy\RecurringAppointments::renderInfoMessage( $userData ) ?>
87
  </div>
88
  </div>
89
  <?php endif ?>
90
+ <?php if ( get_option( 'bookly_app_show_terms', false ) ): ?>
91
+ <div class="bookly-box">
92
+ <div class="bookly-checkbox-group" style="line-height: 28px;">
93
+ <input type="checkbox" class="bookly-js-terms" id="bookly-terms-<?php echo $userData->getFormId() ?>">
94
+ <label class="bookly-square bookly-checkbox" style="width:28px; float:left; margin-left: 0; margin-right: 5px;" for="bookly-terms-<?php echo $userData->getFormId() ?>">
95
+ <i class="bookly-icon-sm"></i>
96
+ </label>
97
+ <label for="bookly-terms-<?php echo $userData->getFormId() ?>">
98
+ <?php echo Common::getTranslatedOption( 'bookly_l10n_label_terms' ) ?>
99
+ </label>
100
+ </div>
101
+ <div class="bookly-js-terms-error bookly-label-error"></div>
102
+ </div>
103
+ <?php endif ?>
104
  </div>
105
 
106
  <?php Proxy\RecurringAppointments::renderInfoMessage( $userData ) ?>
frontend/modules/booking/templates/7_payment.php CHANGED
@@ -19,7 +19,7 @@ Proxy\DepositPayments::renderPaymentStep( $userData );
19
  <?php if ( $payment_options ) : ?>
20
  <?php Proxy\RecurringAppointments::renderInfoMessage( $userData ) ?>
21
 
22
- <?php if ( $pay_local ) : ?>
23
  <div class="bookly-gateway-buttons pay-local bookly-box bookly-nav-steps">
24
  <button class="bookly-back-step bookly-js-back-step bookly-btn ladda-button" data-style="zoom-in" data-spinner-size="40">
25
  <span class="ladda-label"><?php echo Common::getTranslatedOption( 'bookly_l10n_button_back' ) ?></span>
@@ -43,7 +43,7 @@ Proxy\DepositPayments::renderPaymentStep( $userData );
43
  </div>
44
  </div>
45
 
46
- <?php if ( $pay_cloud_stripe ) : ?>
47
  <?php self::renderTemplate( '_cloud_stripe_form', compact( 'form_id', 'page_url' ) ) ?>
48
  <?php endif ?>
49
 
19
  <?php if ( $payment_options ) : ?>
20
  <?php Proxy\RecurringAppointments::renderInfoMessage( $userData ) ?>
21
 
22
+ <?php if ( isset( $payment_options['local'] ) ) : ?>
23
  <div class="bookly-gateway-buttons pay-local bookly-box bookly-nav-steps">
24
  <button class="bookly-back-step bookly-js-back-step bookly-btn ladda-button" data-style="zoom-in" data-spinner-size="40">
25
  <span class="ladda-label"><?php echo Common::getTranslatedOption( 'bookly_l10n_button_back' ) ?></span>
43
  </div>
44
  </div>
45
 
46
+ <?php if ( isset( $payment_options['cloud_stripe'] ) ) : ?>
47
  <?php self::renderTemplate( '_cloud_stripe_form', compact( 'form_id', 'page_url' ) ) ?>
48
  <?php endif ?>
49
 
frontend/modules/booking/templates/8_complete.php CHANGED
@@ -5,8 +5,8 @@ if ( ! isset( $download_invoice ) ) {
5
  }
6
  echo Common::stripScripts( $progress_tracker );
7
  ?>
8
- <div class="bookly-box"><?php echo Common::html( $info_text ) ?></div>
9
- <?php if ( get_option( 'bookly_app_show_start_over' ) || $download_invoice ) : ?>
10
  <div class="bookly-box bookly-nav-steps">
11
  <?php if ( get_option( 'bookly_app_show_start_over' ) ): ?>
12
  <div class="<?php echo get_option( 'bookly_app_align_buttons_left' ) ? 'bookly-left' : 'bookly-right' ?>">
@@ -15,6 +15,13 @@ echo Common::stripScripts( $progress_tracker );
15
  </button>
16
  </div>
17
  <?php endif ?>
 
 
 
 
 
 
 
18
  <?php echo Common::stripScripts( $download_invoice ) ?>
19
  </div>
20
  <?php endif ?>
5
  }
6
  echo Common::stripScripts( $progress_tracker );
7
  ?>
8
+ <div class="bookly-box"><?php echo Common::html( $info_text ) ?></div>
9
+ <?php if ( get_option( 'bookly_app_show_start_over' ) || get_option( 'bookly_app_show_download_ics' ) || $download_invoice ) : ?>
10
  <div class="bookly-box bookly-nav-steps">
11
  <?php if ( get_option( 'bookly_app_show_start_over' ) ): ?>
12
  <div class="<?php echo get_option( 'bookly_app_align_buttons_left' ) ? 'bookly-left' : 'bookly-right' ?>">
15
  </button>
16
  </div>
17
  <?php endif ?>
18
+ <?php if ( get_option( 'bookly_app_show_download_ics' ) ): ?>
19
+ <div class="<?php echo get_option( 'bookly_app_align_buttons_left' ) ? 'bookly-left' : 'bookly-right' ?>">
20
+ <button class="bookly-nav-btn bookly-js-download-ics bookly-btn ladda-button" data-style="zoom-in" data-spinner-size="40">
21
+ <span class="ladda-label"><?php echo Common::getTranslatedOption( 'bookly_l10n_button_download_ics' ) ?></span>
22
+ </button>
23
+ </div>
24
+ <?php endif ?>
25
  <?php echo Common::stripScripts( $download_invoice ) ?>
26
  </div>
27
  <?php endif ?>
frontend/resources/css/bookly-main.css CHANGED
@@ -455,27 +455,44 @@ span.bookly-round {
455
  text-decoration: none;
456
  }
457
  .bookly-columnizer .bookly-hour {
458
- background: white!important;
459
  cursor: pointer;
460
  }
 
461
  .bookly-columnizer .bookly-hour span {
462
  font-weight: normal;
463
- color: #333!important;
464
  }
 
465
  .bookly-columnizer .bookly-hour.bookly-slot-in-waiting-list {
466
  background-color: #d6d6d6 !important;
467
  }
468
- .bookly-columnizer .bookly-hour .ladda-label { display: inline-block; }
 
 
 
 
 
 
 
 
469
  .bookly-schedule-date,
470
  .bookly-columnizer .bookly-day {
471
  background: #f4662f;
472
- color: white!important;
473
- font-weight: bold!important;
474
  border: 1px solid #f4662f;
475
  }
 
476
  .bookly-columnizer .booked,
477
- .bookly-columnizer .booked:hover { opacity: .5; cursor: default!important; }
478
- .bookly-columnizer .booked span { text-decoration: line-through; }
 
 
 
 
 
 
479
  .bookly-columnizer .bookly-hour .bookly-hour-icon {
480
  display: block;
481
  float: left;
455
  text-decoration: none;
456
  }
457
  .bookly-columnizer .bookly-hour {
458
+ background: white !important;
459
  cursor: pointer;
460
  }
461
+
462
  .bookly-columnizer .bookly-hour span {
463
  font-weight: normal;
464
+ color: #333 !important;
465
  }
466
+
467
  .bookly-columnizer .bookly-hour.bookly-slot-in-waiting-list {
468
  background-color: #d6d6d6 !important;
469
  }
470
+
471
+ .bookly-columnizer .bookly-hour.bookly-slot-in-special-hour .bookly-time-main {
472
+ font-weight: bold;
473
+ }
474
+
475
+ .bookly-columnizer .bookly-hour .ladda-label {
476
+ display: inline-block;
477
+ }
478
+
479
  .bookly-schedule-date,
480
  .bookly-columnizer .bookly-day {
481
  background: #f4662f;
482
+ color: white !important;
483
+ font-weight: bold !important;
484
  border: 1px solid #f4662f;
485
  }
486
+
487
  .bookly-columnizer .booked,
488
+ .bookly-columnizer .booked:hover {
489
+ opacity: .5;
490
+ cursor: default !important;
491
+ }
492
+
493
+ .bookly-columnizer .booked span {
494
+ text-decoration: line-through;
495
+ }
496
  .bookly-columnizer .bookly-hour .bookly-hour-icon {
497
  display: block;
498
  float: left;
frontend/resources/js/bookly.js CHANGED
@@ -2843,11 +2843,21 @@ var bookly = (function ($) {
2843
  new_chain: true
2844
  });
2845
  });
2846
- $__default['default']('.bookly-js-download-invoice', $container).on('click', function (e) {
2847
  var _context;
2848
 
2849
  var ladda = laddaStart(this);
2850
- window.location = BooklyL10n.ajaxurl + (indexOf(_context = BooklyL10n.ajaxurl).call(_context, '?') > 0 ? '&' : '?') + 'action=bookly_invoices_download_invoice&form_id=' + params.form_id + '&csrf_token=' + BooklyL10n.csrf_token;
 
 
 
 
 
 
 
 
 
 
2851
 
2852
  setTimeout$1(function () {
2853
  return ladda.stop();
@@ -3195,7 +3205,8 @@ var bookly = (function ($) {
3195
  update_details_dialog = response.update_details_dialog,
3196
  woocommerce = response.woocommerce,
3197
  customJS = response.custom_js,
3198
- custom_fields_conditions = response.custom_fields_conditions || [];
 
3199
 
3200
  if (opt[params.form_id].hasOwnProperty('google_maps') && opt[params.form_id].google_maps.enabled) {
3201
  booklyInitGooglePlacesAutocomplete($container);
@@ -3509,384 +3520,395 @@ var bookly = (function ($) {
3509
  }
3510
 
3511
  $next_btn.on('click', function (e, force_update_customer) {
3512
- var _context12, _context13;
3513
 
3514
- e.preventDefault();
3515
- var info_fields = [],
3516
- custom_fields = {},
3517
- checkbox_values,
3518
- captcha_ids = [],
3519
- ladda = laddaStart(this); // Execute custom JavaScript
3520
 
3521
- if (customJS) {
3522
- try {
3523
- $__default['default'].globalEval(customJS.next_button);
3524
- } catch (e) {// Do nothing
3525
- }
3526
- } // Customer information fields.
3527
-
3528
-
3529
- $__default['default']('div.bookly-js-info-field-row', $container).each(function () {
3530
- var $this = $__default['default'](this);
3531
-
3532
- switch ($this.data('type')) {
3533
- case 'text-field':
3534
- info_fields.push({
3535
- id: $this.data('id'),
3536
- value: find($this).call($this, 'input.bookly-js-info-field').val()
3537
- });
3538
- break;
3539
-
3540
- case 'textarea':
3541
- info_fields.push({
3542
- id: $this.data('id'),
3543
- value: find($this).call($this, 'textarea.bookly-js-info-field').val()
3544
- });
3545
- break;
3546
-
3547
- case 'checkboxes':
3548
- checkbox_values = [];
3549
 
3550
- find($this).call($this, 'input.bookly-js-info-field:checked').each(function () {
3551
- checkbox_values.push(this.value);
3552
- });
 
 
3553
 
3554
- info_fields.push({
3555
- id: $this.data('id'),
3556
- value: checkbox_values
3557
- });
3558
- break;
3559
-
3560
- case 'radio-buttons':
3561
- info_fields.push({
3562
- id: $this.data('id'),
3563
- value: find($this).call($this, 'input.bookly-js-info-field:checked').val() || null
3564
- });
3565
- break;
3566
 
3567
- case 'drop-down':
3568
- info_fields.push({
3569
- id: $this.data('id'),
3570
- value: find($this).call($this, 'select.bookly-js-info-field').val()
3571
- });
3572
- break;
3573
- }
3574
- }); // Custom fields.
3575
 
3576
- $__default['default']('.bookly-custom-fields-container', $container).each(function () {
3577
- var $cf_container = $__default['default'](this),
3578
- key = $cf_container.data('key'),
3579
- custom_fields_data = [];
3580
- $__default['default']('div.bookly-custom-field-row', $cf_container).each(function () {
3581
  var $this = $__default['default'](this);
3582
 
3583
  switch ($this.data('type')) {
3584
  case 'text-field':
3585
- case 'file':
3586
- custom_fields_data.push({
3587
  id: $this.data('id'),
3588
- value: find($this).call($this, 'input.bookly-custom-field').val()
3589
  });
3590
  break;
3591
 
3592
  case 'textarea':
3593
- custom_fields_data.push({
3594
  id: $this.data('id'),
3595
- value: find($this).call($this, 'textarea.bookly-custom-field').val()
3596
  });
3597
  break;
3598
 
3599
  case 'checkboxes':
3600
  checkbox_values = [];
3601
 
3602
- find($this).call($this, 'input.bookly-custom-field:checked').each(function () {
3603
  checkbox_values.push(this.value);
3604
  });
3605
 
3606
- custom_fields_data.push({
3607
  id: $this.data('id'),
3608
  value: checkbox_values
3609
  });
3610
  break;
3611
 
3612
  case 'radio-buttons':
3613
- custom_fields_data.push({
3614
  id: $this.data('id'),
3615
- value: find($this).call($this, 'input.bookly-custom-field:checked').val() || null
3616
  });
3617
  break;
3618
 
3619
  case 'drop-down':
3620
- custom_fields_data.push({
3621
  id: $this.data('id'),
3622
- value: find($this).call($this, 'select.bookly-custom-field').val()
3623
  });
3624
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3625
 
3626
- case 'number':
3627
- custom_fields_data.push({
3628
- id: $this.data('id'),
3629
- value: find($this).call($this, 'input.bookly-custom-field').val()
3630
- });
3631
- break;
3632
 
3633
- case 'time':
3634
- custom_fields_data.push({
3635
- id: $this.data('id'),
3636
- value: find($this).call($this, 'select.bookly-custom-field').val()
3637
- });
3638
- break;
3639
 
3640
- case 'date':
3641
- custom_fields_data.push({
3642
- id: $this.data('id'),
3643
- value: find($this).call($this, 'input.bookly-custom-field').pickadate('picker').get('select', 'yyyy-mm-dd')
3644
- });
3645
- break;
3646
 
3647
- case 'captcha':
3648
- custom_fields_data.push({
3649
- id: $this.data('id'),
3650
- value: find($this).call($this, 'input.bookly-custom-field').val()
3651
- });
3652
- captcha_ids.push($this.data('id'));
3653
- break;
3654
- }
3655
- });
3656
- custom_fields[key] = {
3657
- custom_fields: stringify(custom_fields_data)
3658
- };
3659
- });
3660
 
3661
- try {
3662
- phone_number = intlTelInput.enabled ? $phone_field.intlTelInput('getNumber') : $phone_field.val();
 
 
 
 
3663
 
3664
- if (phone_number == '') {
3665
- phone_number = $phone_field.val();
3666
- }
3667
- } catch (error) {
3668
- // In case when intlTelInput can't return phone number.
3669
- phone_number = $phone_field.val();
3670
- }
3671
 
3672
- var data = {
3673
- action: 'bookly_session_save',
3674
- csrf_token: BooklyL10n.csrf_token,
3675
- form_id: params.form_id,
3676
- full_name: $full_name_field.val(),
3677
- first_name: $first_name_field.val(),
3678
- last_name: $last_name_field.val(),
3679
- phone: phone_number,
3680
- email: trim(_context12 = $email_field.val()).call(_context12),
3681
- email_confirm: $email_confirm_field.length === 1 ? trim(_context13 = $email_confirm_field.val()).call(_context13) : undefined,
3682
- birthday: {
3683
- day: $birthday_day_field.val(),
3684
- month: $birthday_month_field.val(),
3685
- year: $birthday_year_field.val()
3686
- },
3687
- country: $address_country_field.val(),
3688
- state: $address_state_field.val(),
3689
- postcode: $address_postcode_field.val(),
3690
- city: $address_city_field.val(),
3691
- street: $address_street_field.val(),
3692
- street_number: $address_street_number_field.val(),
3693
- additional_address: $address_additional_field.val(),
3694
- address_iso: {
3695
- country: $address_country_field.data('short'),
3696
- state: $address_state_field.data('short')
3697
- },
3698
- info_fields: info_fields,
3699
- notes: $notes_field.val(),
3700
- cart: custom_fields,
3701
- captcha_ids: stringify(captcha_ids),
3702
- force_update_customer: !update_details_dialog || force_update_customer,
3703
- verification_code: $verification_code.val()
3704
- };
3705
- booklyAjax({
3706
- type: 'POST',
3707
- data: data,
3708
- success: function success(response) {
3709
- // Error messages
3710
- $errors.empty();
3711
- $fields.removeClass('bookly-error');
3712
 
3713
- if (response.success) {
3714
- if (woocommerce.enabled) {
3715
- var data = {
3716
- action: 'bookly_pro_add_to_woocommerce_cart',
3717
- csrf_token: BooklyL10n.csrf_token,
3718
- form_id: params.form_id
3719
- };
3720
- booklyAjax({
3721
- type: 'POST',
3722
- data: data,
3723
- success: function success(response) {
3724
- if (response.success) {
3725
- window.location.href = woocommerce.cart_url;
3726
- } else {
3727
- ladda.stop();
3728
- stepTime({
3729
- form_id: params.form_id
3730
- }, opt[params.form_id].errors[response.error]);
3731
- }
3732
- }
3733
- });
3734
- } else {
3735
- stepPayment({
3736
- form_id: params.form_id
3737
- });
3738
  }
3739
- } else {
3740
- var $scroll_to = null;
 
 
 
3741
 
3742
- if (response.appointments_limit_reached) {
3743
- stepComplete({
3744
- form_id: params.form_id,
3745
- error: 'appointments_limit_reached'
3746
- });
3747
- } else if (response.hasOwnProperty('verify')) {
3748
- ladda.stop();
3749
 
3750
- find($verification_modal).call($verification_modal, '#bookly-verification-code-text').html(response.verify_text).end().addClass('bookly-in');
3751
- } else if (response.group_skip_payment) {
3752
- booklyAjax({
3753
- type: 'POST',
3754
- data: {
3755
- action: 'bookly_save_appointment',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3756
  csrf_token: BooklyL10n.csrf_token,
3757
  form_id: params.form_id
3758
- },
3759
- success: function success(response) {
3760
- stepComplete({
3761
- form_id: params.form_id,
3762
- error: 'group_skip_payment'
3763
- });
3764
- }
3765
- });
 
 
 
 
 
 
 
 
 
 
 
 
3766
  } else {
3767
- ladda.stop();
3768
- var invalidClass = 'bookly-error',
3769
- validateFields = [{
3770
- name: 'full_name',
3771
- errorElement: $name_error,
3772
- formElement: $full_name_field
3773
- }, {
3774
- name: 'first_name',
3775
- errorElement: $first_name_error,
3776
- formElement: $first_name_field
3777
- }, {
3778
- name: 'last_name',
3779
- errorElement: $last_name_error,
3780
- formElement: $last_name_field
3781
- }, {
3782
- name: 'phone',
3783
- errorElement: $phone_error,
3784
- formElement: $phone_field
3785
- }, {
3786
- name: 'email',
3787
- errorElement: $email_error,
3788
- formElement: $email_field
3789
- }, {
3790
- name: 'email_confirm',
3791
- errorElement: $email_confirm_error,
3792
- formElement: $email_confirm_field
3793
- }, {
3794
- name: 'birthday_day',
3795
- errorElement: $birthday_day_error,
3796
- formElement: $birthday_day_field
3797
- }, {
3798
- name: 'birthday_month',
3799
- errorElement: $birthday_month_error,
3800
- formElement: $birthday_month_field
3801
- }, {
3802
- name: 'birthday_year',
3803
- errorElement: $birthday_year_error,
3804
- formElement: $birthday_year_field
3805
- }, {
3806
- name: 'country',
3807
- errorElement: $address_country_error,
3808
- formElement: $address_country_field
3809
- }, {
3810
- name: 'state',
3811
- errorElement: $address_state_error,
3812
- formElement: $address_state_field
3813
- }, {
3814
- name: 'postcode',
3815
- errorElement: $address_postcode_error,
3816
- formElement: $address_postcode_field
3817
- }, {
3818
- name: 'city',
3819
- errorElement: $address_city_error,
3820
- formElement: $address_city_field
3821
- }, {
3822
- name: 'street',
3823
- errorElement: $address_street_error,
3824
- formElement: $address_street_field
3825
- }, {
3826
- name: 'street_number',
3827
- errorElement: $address_street_number_error,
3828
- formElement: $address_street_number_field
3829
- }, {
3830
- name: 'additional_address',
3831
- errorElement: $address_additional_error,
3832
- formElement: $address_additional_field
3833
- }];
3834
-
3835
- forEach(validateFields).call(validateFields, function (field) {
3836
- if (!response[field.name]) {
3837
- return;
3838
- }
3839
 
3840
- field.errorElement.html(response[field.name]);
3841
- field.formElement.addClass(invalidClass);
3842
-
3843
- if ($scroll_to === null) {
3844
- $scroll_to = field.formElement;
3845
- }
3846
- });
3847
-
3848
- if (response.info_fields) {
3849
- $__default['default'].each(response.info_fields, function (field_id, message) {
3850
- var $div = $__default['default']('div.bookly-js-info-field-row[data-id="' + field_id + '"]', $container);
3851
 
3852
- find($div).call($div, '.bookly-js-info-field-error').html(message);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3853
 
3854
- find($div).call($div, '.bookly-js-info-field').addClass('bookly-error');
 
3855
 
3856
  if ($scroll_to === null) {
3857
- $scroll_to = find($div).call($div, '.bookly-js-info-field');
3858
  }
3859
  });
3860
- }
3861
 
3862
- if (response.custom_fields) {
3863
- $__default['default'].each(response.custom_fields, function (key, fields) {
3864
- $__default['default'].each(fields, function (field_id, message) {
3865
- var $custom_fields_collector = $__default['default']('.bookly-custom-fields-container[data-key="' + key + '"]', $container);
3866
- var $div = $__default['default']('[data-id="' + field_id + '"]', $custom_fields_collector);
3867
 
3868
- find($div).call($div, '.bookly-custom-field-error').html(message);
3869
 
3870
- find($div).call($div, '.bookly-custom-field').addClass('bookly-error');
3871
 
3872
  if ($scroll_to === null) {
3873
- $scroll_to = find($div).call($div, '.bookly-custom-field');
3874
  }
3875
  });
3876
- });
3877
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3878
 
3879
- if (response.customer) {
3880
- find($cst_modal).call($cst_modal, '.bookly-js-modal-body').html(response.customer).end().addClass('bookly-in');
 
3881
  }
3882
- }
3883
 
3884
- if ($scroll_to !== null) {
3885
- scrollTo($scroll_to, params.form_id);
 
3886
  }
3887
  }
3888
- }
3889
- });
3890
  });
3891
  $__default['default']('.bookly-js-back-step', $container).on('click', function (e) {
3892
  e.preventDefault();
@@ -4432,6 +4454,7 @@ var bookly = (function ($) {
4432
  close: false,
4433
  today: BooklyL10n.today,
4434
  monthsFull: BooklyL10n.months,
 
4435
  weekdaysFull: BooklyL10n.days,
4436
  weekdaysShort: BooklyL10n.daysShort,
4437
  labelMonthNext: BooklyL10n.nextMonth,
@@ -4926,7 +4949,7 @@ var bookly = (function ($) {
4926
  $__default['default'].each(slots_data, function (group, group_slots) {
4927
  var html = '<button class="bookly-day" value="' + group + '">' + group_slots.title + '</button>';
4928
  $__default['default'].each(group_slots.slots, function (id, slot) {
4929
- html += '<button value="' + stringify(slot.data).replace(/"/g, '&quot;') + '" data-group="' + group + '" class="bookly-hour' + (slot.status == 'waiting-list' ? ' bookly-slot-in-waiting-list' : slot.status == 'booked' ? ' booked' : '') + '"' + (slot.status == 'booked' ? ' disabled' : '') + '>' + '<span class="ladda-label bookly-time-main' + (slot.data[0][2] == selected_date ? ' bookly-bold' : '') + '">' + '<i class="bookly-hour-icon"><span></span></i>' + slot.time_text + '</span>' + '<span class="bookly-time-additional' + (slot.status == 'waiting-list' ? ' bookly-waiting-list' : '') + '"> ' + slot.additional_text + '</span>' + '</button>';
4930
  });
4931
  response[group] = html;
4932
  });
@@ -9062,7 +9085,7 @@ var bookly = (function ($) {
9062
  destroy_component(select);
9063
  }
9064
  };
9065
- } // (482:4) {#if hasCategorySelect}
9066
 
9067
 
9068
  function create_if_block_11(ctx) {
@@ -9138,7 +9161,7 @@ var bookly = (function ($) {
9138
  destroy_component(select);
9139
  }
9140
  };
9141
- } // (493:4) {#if hasServiceSelect}
9142
 
9143
 
9144
  function create_if_block_9(ctx) {
@@ -9320,7 +9343,7 @@ var bookly = (function ($) {
9320
  if (detaching) detach(if_block_anchor);
9321
  }
9322
  };
9323
- } // (505:8) {#if showServiceInfo && serviceId && services[serviceId].hasOwnProperty('info') && services[serviceId].info !== ''}
9324
 
9325
 
9326
  function create_if_block_10(ctx) {
@@ -9369,7 +9392,7 @@ var bookly = (function ($) {
9369
  if (detaching && div_transition) div_transition.end();
9370
  }
9371
  };
9372
- } // (511:4) {#if hasStaffSelect}
9373
 
9374
 
9375
  function create_if_block_7(ctx) {
@@ -9551,7 +9574,7 @@ var bookly = (function ($) {
9551
  if (detaching) detach(if_block_anchor);
9552
  }
9553
  };
9554
- } // (523:8) {#if showStaffInfo && staffId && staff[staffId].hasOwnProperty('info') && staff[staffId].info !== ''}
9555
 
9556
 
9557
  function create_if_block_8(ctx) {
@@ -9600,7 +9623,7 @@ var bookly = (function ($) {
9600
  if (detaching && div_transition) div_transition.end();
9601
  }
9602
  };
9603
- } // (529:4) {#if hasDurationSelect}
9604
 
9605
 
9606
  function create_if_block_6(ctx) {
@@ -9668,7 +9691,7 @@ var bookly = (function ($) {
9668
  destroy_component(select);
9669
  }
9670
  };
9671
- } // (539:4) {#if hasNopSelect}
9672
 
9673
 
9674
  function create_if_block_5(ctx) {
@@ -9736,7 +9759,7 @@ var bookly = (function ($) {
9736
  destroy_component(select);
9737
  }
9738
  };
9739
- } // (549:4) {#if hasQuantitySelect}
9740
 
9741
 
9742
  function create_if_block_4(ctx) {
@@ -9804,7 +9827,7 @@ var bookly = (function ($) {
9804
  destroy_component(select);
9805
  }
9806
  };
9807
- } // (559:4) {#if hasDropBtn}
9808
 
9809
 
9810
  function create_if_block_2(ctx) {
@@ -9852,7 +9875,7 @@ var bookly = (function ($) {
9852
  if (if_block) if_block.d();
9853
  }
9854
  };
9855
- } // (563:16) {#if showDropBtn}
9856
 
9857
 
9858
  function create_if_block_3(ctx) {
@@ -9882,7 +9905,7 @@ var bookly = (function ($) {
9882
  dispose();
9883
  }
9884
  };
9885
- } // (570:0) {#if showServiceInfo && serviceId && services[serviceId].hasOwnProperty('info') && services[serviceId].info !== ''}
9886
 
9887
 
9888
  function create_if_block_1(ctx) {
@@ -9931,7 +9954,7 @@ var bookly = (function ($) {
9931
  if (detaching && div_transition) div_transition.end();
9932
  }
9933
  };
9934
- } // (575:0) {#if showStaffInfo && staffId && staff[staffId].hasOwnProperty('info') && staff[staffId].info !== ''}
9935
 
9936
 
9937
  function create_if_block$1(ctx) {
@@ -10903,6 +10926,12 @@ var bookly = (function ($) {
10903
  $$invalidate(24, categoryItems[id] = category, categoryItems);
10904
  }
10905
  });
 
 
 
 
 
 
10906
  $__default['default'].each(services, function (id, service) {
10907
  if ($__default['default'].inArray(id, serviceIds) > -1) {
10908
  if (!categoryId || !categorySelected || service.category_id === categoryId) {
@@ -11561,6 +11590,7 @@ var bookly = (function ($) {
11561
  close: false,
11562
  today: BooklyL10n.today,
11563
  monthsFull: BooklyL10n.months,
 
11564
  weekdaysFull: BooklyL10n.days,
11565
  weekdaysShort: BooklyL10n.daysShort,
11566
  labelMonthNext: BooklyL10n.nextMonth,
2843
  new_chain: true
2844
  });
2845
  });
2846
+ $__default['default']('.bookly-js-download-ics', $container).on('click', function (e) {
2847
  var _context;
2848
 
2849
  var ladda = laddaStart(this);
2850
+ window.location = BooklyL10n.ajaxurl + (indexOf(_context = BooklyL10n.ajaxurl).call(_context, '?') > 0 ? '&' : '?') + 'action=bookly_download_ics&form_id=' + params.form_id + '&csrf_token=' + BooklyL10n.csrf_token;
2851
+
2852
+ setTimeout$1(function () {
2853
+ return ladda.stop();
2854
+ }, 1500);
2855
+ });
2856
+ $__default['default']('.bookly-js-download-invoice', $container).on('click', function (e) {
2857
+ var _context2;
2858
+
2859
+ var ladda = laddaStart(this);
2860
+ window.location = BooklyL10n.ajaxurl + (indexOf(_context2 = BooklyL10n.ajaxurl).call(_context2, '?') > 0 ? '&' : '?') + 'action=bookly_invoices_download_invoice&form_id=' + params.form_id + '&csrf_token=' + BooklyL10n.csrf_token;
2861
 
2862
  setTimeout$1(function () {
2863
  return ladda.stop();
3205
  update_details_dialog = response.update_details_dialog,
3206
  woocommerce = response.woocommerce,
3207
  customJS = response.custom_js,
3208
+ custom_fields_conditions = response.custom_fields_conditions || [],
3209
+ terms_error = response.l10n.terms_error;
3210
 
3211
  if (opt[params.form_id].hasOwnProperty('google_maps') && opt[params.form_id].google_maps.enabled) {
3212
  booklyInitGooglePlacesAutocomplete($container);
3520
  }
3521
 
3522
  $next_btn.on('click', function (e, force_update_customer) {
3523
+ e.preventDefault(); // Terms and conditions checkbox
3524
 
3525
+ var $terms = $__default['default']('.bookly-js-terms', $container),
3526
+ $terms_error = $__default['default']('.bookly-js-terms-error', $container);
3527
+ $terms_error.html('');
 
 
 
3528
 
3529
+ if ($terms.length && !$terms.prop('checked')) {
3530
+ $terms_error.html(terms_error);
3531
+ } else {
3532
+ var _context12, _context13;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3533
 
3534
+ var info_fields = [],
3535
+ custom_fields = {},
3536
+ checkbox_values,
3537
+ captcha_ids = [],
3538
+ ladda = laddaStart(this); // Execute custom JavaScript
3539
 
3540
+ if (customJS) {
3541
+ try {
3542
+ $__default['default'].globalEval(customJS.next_button);
3543
+ } catch (e) {// Do nothing
3544
+ }
3545
+ } // Customer information fields.
 
 
 
 
 
 
3546
 
 
 
 
 
 
 
 
 
3547
 
3548
+ $__default['default']('div.bookly-js-info-field-row', $container).each(function () {
 
 
 
 
3549
  var $this = $__default['default'](this);
3550
 
3551
  switch ($this.data('type')) {
3552
  case 'text-field':
3553
+ info_fields.push({
 
3554
  id: $this.data('id'),
3555
+ value: find($this).call($this, 'input.bookly-js-info-field').val()
3556
  });
3557
  break;
3558
 
3559
  case 'textarea':
3560
+ info_fields.push({
3561
  id: $this.data('id'),
3562
+ value: find($this).call($this, 'textarea.bookly-js-info-field').val()
3563
  });
3564
  break;
3565
 
3566
  case 'checkboxes':
3567
  checkbox_values = [];
3568
 
3569
+ find($this).call($this, 'input.bookly-js-info-field:checked').each(function () {
3570
  checkbox_values.push(this.value);
3571
  });
3572
 
3573
+ info_fields.push({
3574
  id: $this.data('id'),
3575
  value: checkbox_values
3576
  });
3577
  break;
3578
 
3579
  case 'radio-buttons':
3580
+ info_fields.push({
3581
  id: $this.data('id'),
3582
+ value: find($this).call($this, 'input.bookly-js-info-field:checked').val() || null
3583
  });
3584
  break;
3585
 
3586
  case 'drop-down':
3587
+ info_fields.push({
3588
  id: $this.data('id'),
3589
+ value: find($this).call($this, 'select.bookly-js-info-field').val()
3590
  });
3591
  break;
3592
+ }
3593
+ }); // Custom fields.
3594
+
3595
+ $__default['default']('.bookly-custom-fields-container', $container).each(function () {
3596
+ var $cf_container = $__default['default'](this),
3597
+ key = $cf_container.data('key'),
3598
+ custom_fields_data = [];
3599
+ $__default['default']('div.bookly-custom-field-row', $cf_container).each(function () {
3600
+ var $this = $__default['default'](this);
3601
+
3602
+ if ($this.css('display') !== 'none') {
3603
+ switch ($this.data('type')) {
3604
+ case 'text-field':
3605
+ case 'file':
3606
+ custom_fields_data.push({
3607
+ id: $this.data('id'),
3608
+ value: find($this).call($this, 'input.bookly-custom-field').val()
3609
+ });
3610
+ break;
3611
 
3612
+ case 'textarea':
3613
+ custom_fields_data.push({
3614
+ id: $this.data('id'),
3615
+ value: find($this).call($this, 'textarea.bookly-custom-field').val()
3616
+ });
3617
+ break;
3618
 
3619
+ case 'checkboxes':
3620
+ checkbox_values = [];
 
 
 
 
3621
 
3622
+ find($this).call($this, 'input.bookly-custom-field:checked').each(function () {
3623
+ checkbox_values.push(this.value);
3624
+ });
 
 
 
3625
 
3626
+ custom_fields_data.push({
3627
+ id: $this.data('id'),
3628
+ value: checkbox_values
3629
+ });
3630
+ break;
 
 
 
 
 
 
 
 
3631
 
3632
+ case 'radio-buttons':
3633
+ custom_fields_data.push({
3634
+ id: $this.data('id'),
3635
+ value: find($this).call($this, 'input.bookly-custom-field:checked').val() || null
3636
+ });
3637
+ break;
3638
 
3639
+ case 'drop-down':
3640
+ custom_fields_data.push({
3641
+ id: $this.data('id'),
3642
+ value: find($this).call($this, 'select.bookly-custom-field').val()
3643
+ });
3644
+ break;
 
3645
 
3646
+ case 'number':
3647
+ custom_fields_data.push({
3648
+ id: $this.data('id'),
3649
+ value: find($this).call($this, 'input.bookly-custom-field').val()
3650
+ });
3651
+ break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3652
 
3653
+ case 'time':
3654
+ custom_fields_data.push({
3655
+ id: $this.data('id'),
3656
+ value: find($this).call($this, 'select.bookly-custom-field').val()
3657
+ });
3658
+ break;
3659
+
3660
+ case 'date':
3661
+ custom_fields_data.push({
3662
+ id: $this.data('id'),
3663
+ value: find($this).call($this, 'input.bookly-custom-field').pickadate('picker').get('select', 'yyyy-mm-dd')
3664
+ });
3665
+ break;
3666
+
3667
+ case 'captcha':
3668
+ custom_fields_data.push({
3669
+ id: $this.data('id'),
3670
+ value: find($this).call($this, 'input.bookly-custom-field').val()
3671
+ });
3672
+ captcha_ids.push($this.data('id'));
3673
+ break;
3674
+ }
 
 
 
3675
  }
3676
+ });
3677
+ custom_fields[key] = {
3678
+ custom_fields: stringify(custom_fields_data)
3679
+ };
3680
+ });
3681
 
3682
+ try {
3683
+ phone_number = intlTelInput.enabled ? $phone_field.intlTelInput('getNumber') : $phone_field.val();
 
 
 
 
 
3684
 
3685
+ if (phone_number == '') {
3686
+ phone_number = $phone_field.val();
3687
+ }
3688
+ } catch (error) {
3689
+ // In case when intlTelInput can't return phone number.
3690
+ phone_number = $phone_field.val();
3691
+ }
3692
+
3693
+ var data = {
3694
+ action: 'bookly_session_save',
3695
+ csrf_token: BooklyL10n.csrf_token,
3696
+ form_id: params.form_id,
3697
+ full_name: $full_name_field.val(),
3698
+ first_name: $first_name_field.val(),
3699
+ last_name: $last_name_field.val(),
3700
+ phone: phone_number,
3701
+ email: trim(_context12 = $email_field.val()).call(_context12),
3702
+ email_confirm: $email_confirm_field.length === 1 ? trim(_context13 = $email_confirm_field.val()).call(_context13) : undefined,
3703
+ birthday: {
3704
+ day: $birthday_day_field.val(),
3705
+ month: $birthday_month_field.val(),
3706
+ year: $birthday_year_field.val()
3707
+ },
3708
+ country: $address_country_field.val(),
3709
+ state: $address_state_field.val(),
3710
+ postcode: $address_postcode_field.val(),
3711
+ city: $address_city_field.val(),
3712
+ street: $address_street_field.val(),
3713
+ street_number: $address_street_number_field.val(),
3714
+ additional_address: $address_additional_field.val(),
3715
+ address_iso: {
3716
+ country: $address_country_field.data('short'),
3717
+ state: $address_state_field.data('short')
3718
+ },
3719
+ info_fields: info_fields,
3720
+ notes: $notes_field.val(),
3721
+ cart: custom_fields,
3722
+ captcha_ids: stringify(captcha_ids),
3723
+ force_update_customer: !update_details_dialog || force_update_customer,
3724
+ verification_code: $verification_code.val()
3725
+ };
3726
+ booklyAjax({
3727
+ type: 'POST',
3728
+ data: data,
3729
+ success: function success(response) {
3730
+ // Error messages
3731
+ $errors.empty();
3732
+ $fields.removeClass('bookly-error');
3733
+
3734
+ if (response.success) {
3735
+ if (woocommerce.enabled) {
3736
+ var data = {
3737
+ action: 'bookly_pro_add_to_woocommerce_cart',
3738
  csrf_token: BooklyL10n.csrf_token,
3739
  form_id: params.form_id
3740
+ };
3741
+ booklyAjax({
3742
+ type: 'POST',
3743
+ data: data,
3744
+ success: function success(response) {
3745
+ if (response.success) {
3746
+ window.location.href = woocommerce.cart_url;
3747
+ } else {
3748
+ ladda.stop();
3749
+ stepTime({
3750
+ form_id: params.form_id
3751
+ }, opt[params.form_id].errors[response.error]);
3752
+ }
3753
+ }
3754
+ });
3755
+ } else {
3756
+ stepPayment({
3757
+ form_id: params.form_id
3758
+ });
3759
+ }
3760
  } else {
3761
+ var $scroll_to = null;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3762
 
3763
+ if (response.appointments_limit_reached) {
3764
+ stepComplete({
3765
+ form_id: params.form_id,
3766
+ error: 'appointments_limit_reached'
3767
+ });
3768
+ } else if (response.hasOwnProperty('verify')) {
3769
+ ladda.stop();
 
 
 
 
3770
 
3771
+ find($verification_modal).call($verification_modal, '#bookly-verification-code-text').html(response.verify_text).end().addClass('bookly-in');
3772
+ } else if (response.group_skip_payment) {
3773
+ booklyAjax({
3774
+ type: 'POST',
3775
+ data: {
3776
+ action: 'bookly_save_appointment',
3777
+ csrf_token: BooklyL10n.csrf_token,
3778
+ form_id: params.form_id
3779
+ },
3780
+ success: function success(response) {
3781
+ stepComplete({
3782
+ form_id: params.form_id,
3783
+ error: 'group_skip_payment'
3784
+ });
3785
+ }
3786
+ });
3787
+ } else {
3788
+ ladda.stop();
3789
+ var invalidClass = 'bookly-error',
3790
+ validateFields = [{
3791
+ name: 'full_name',
3792
+ errorElement: $name_error,
3793
+ formElement: $full_name_field
3794
+ }, {
3795
+ name: 'first_name',
3796
+ errorElement: $first_name_error,
3797
+ formElement: $first_name_field
3798
+ }, {
3799
+ name: 'last_name',
3800
+ errorElement: $last_name_error,
3801
+ formElement: $last_name_field
3802
+ }, {
3803
+ name: 'phone',
3804
+ errorElement: $phone_error,
3805
+ formElement: $phone_field
3806
+ }, {
3807
+ name: 'email',
3808
+ errorElement: $email_error,
3809
+ formElement: $email_field
3810
+ }, {
3811
+ name: 'email_confirm',
3812
+ errorElement: $email_confirm_error,
3813
+ formElement: $email_confirm_field
3814
+ }, {
3815
+ name: 'birthday_day',
3816
+ errorElement: $birthday_day_error,
3817
+ formElement: $birthday_day_field
3818
+ }, {
3819
+ name: 'birthday_month',
3820
+ errorElement: $birthday_month_error,
3821
+ formElement: $birthday_month_field
3822
+ }, {
3823
+ name: 'birthday_year',
3824
+ errorElement: $birthday_year_error,
3825
+ formElement: $birthday_year_field
3826
+ }, {
3827
+ name: 'country',
3828
+ errorElement: $address_country_error,
3829
+ formElement: $address_country_field
3830
+ }, {
3831
+ name: 'state',
3832
+ errorElement: $address_state_error,
3833
+ formElement: $address_state_field
3834
+ }, {
3835
+ name: 'postcode',
3836
+ errorElement: $address_postcode_error,
3837
+ formElement: $address_postcode_field
3838
+ }, {
3839
+ name: 'city',
3840
+ errorElement: $address_city_error,
3841
+ formElement: $address_city_field
3842
+ }, {
3843
+ name: 'street',
3844
+ errorElement: $address_street_error,
3845
+ formElement: $address_street_field
3846
+ }, {
3847
+ name: 'street_number',
3848
+ errorElement: $address_street_number_error,
3849
+ formElement: $address_street_number_field
3850
+ }, {
3851
+ name: 'additional_address',
3852
+ errorElement: $address_additional_error,
3853
+ formElement: $address_additional_field
3854
+ }];
3855
+
3856
+ forEach(validateFields).call(validateFields, function (field) {
3857
+ if (!response[field.name]) {
3858
+ return;
3859
+ }
3860
 
3861
+ field.errorElement.html(response[field.name]);
3862
+ field.formElement.addClass(invalidClass);
3863
 
3864
  if ($scroll_to === null) {
3865
+ $scroll_to = field.formElement;
3866
  }
3867
  });
 
3868
 
3869
+ if (response.info_fields) {
3870
+ $__default['default'].each(response.info_fields, function (field_id, message) {
3871
+ var $div = $__default['default']('div.bookly-js-info-field-row[data-id="' + field_id + '"]', $container);
 
 
3872
 
3873
+ find($div).call($div, '.bookly-js-info-field-error').html(message);
3874
 
3875
+ find($div).call($div, '.bookly-js-info-field').addClass('bookly-error');
3876
 
3877
  if ($scroll_to === null) {
3878
+ $scroll_to = find($div).call($div, '.bookly-js-info-field');
3879
  }
3880
  });
3881
+ }
3882
+
3883
+ if (response.custom_fields) {
3884
+ $__default['default'].each(response.custom_fields, function (key, fields) {
3885
+ $__default['default'].each(fields, function (field_id, message) {
3886
+ var $custom_fields_collector = $__default['default']('.bookly-custom-fields-container[data-key="' + key + '"]', $container);
3887
+ var $div = $__default['default']('[data-id="' + field_id + '"]', $custom_fields_collector);
3888
+
3889
+ find($div).call($div, '.bookly-custom-field-error').html(message);
3890
+
3891
+ find($div).call($div, '.bookly-custom-field').addClass('bookly-error');
3892
+
3893
+ if ($scroll_to === null) {
3894
+ $scroll_to = find($div).call($div, '.bookly-custom-field');
3895
+ }
3896
+ });
3897
+ });
3898
+ }
3899
 
3900
+ if (response.customer) {
3901
+ find($cst_modal).call($cst_modal, '.bookly-js-modal-body').html(response.customer).end().addClass('bookly-in');
3902
+ }
3903
  }
 
3904
 
3905
+ if ($scroll_to !== null) {
3906
+ scrollTo($scroll_to, params.form_id);
3907
+ }
3908
  }
3909
  }
3910
+ });
3911
+ }
3912
  });
3913
  $__default['default']('.bookly-js-back-step', $container).on('click', function (e) {
3914
  e.preventDefault();
4454
  close: false,
4455
  today: BooklyL10n.today,
4456
  monthsFull: BooklyL10n.months,
4457
+ monthsShort: BooklyL10n.monthsShort,
4458
  weekdaysFull: BooklyL10n.days,
4459
  weekdaysShort: BooklyL10n.daysShort,
4460
  labelMonthNext: BooklyL10n.nextMonth,
4949
  $__default['default'].each(slots_data, function (group, group_slots) {
4950
  var html = '<button class="bookly-day" value="' + group + '">' + group_slots.title + '</button>';
4951
  $__default['default'].each(group_slots.slots, function (id, slot) {
4952
+ html += '<button value="' + stringify(slot.data).replace(/"/g, '&quot;') + '" data-group="' + group + '" class="bookly-hour' + (slot.special_hour ? ' bookly-slot-in-special-hour' : '') + (slot.status == 'waiting-list' ? ' bookly-slot-in-waiting-list' : slot.status == 'booked' ? ' booked' : '') + '"' + (slot.status == 'booked' ? ' disabled' : '') + '>' + '<span class="ladda-label bookly-time-main' + (slot.data[0][2] == selected_date ? ' bookly-bold' : '') + '">' + '<i class="bookly-hour-icon"><span></span></i>' + slot.time_text + '</span>' + '<span class="bookly-time-additional' + (slot.status == 'waiting-list' ? ' bookly-waiting-list' : '') + '"> ' + slot.additional_text + '</span>' + '</button>';
4953
  });
4954
  response[group] = html;
4955
  });
9085
  destroy_component(select);
9086
  }
9087
  };
9088
+ } // (486:4) {#if hasCategorySelect}
9089
 
9090
 
9091
  function create_if_block_11(ctx) {
9161
  destroy_component(select);
9162
  }
9163
  };
9164
+ } // (497:4) {#if hasServiceSelect}
9165
 
9166
 
9167
  function create_if_block_9(ctx) {
9343
  if (detaching) detach(if_block_anchor);
9344
  }
9345
  };
9346
+ } // (509:8) {#if showServiceInfo && serviceId && services[serviceId].hasOwnProperty('info') && services[serviceId].info !== ''}
9347
 
9348
 
9349
  function create_if_block_10(ctx) {
9392
  if (detaching && div_transition) div_transition.end();
9393
  }
9394
  };
9395
+ } // (515:4) {#if hasStaffSelect}
9396
 
9397
 
9398
  function create_if_block_7(ctx) {
9574
  if (detaching) detach(if_block_anchor);
9575
  }
9576
  };
9577
+ } // (527:8) {#if showStaffInfo && staffId && staff[staffId].hasOwnProperty('info') && staff[staffId].info !== ''}
9578
 
9579
 
9580
  function create_if_block_8(ctx) {
9623
  if (detaching && div_transition) div_transition.end();
9624
  }
9625
  };
9626
+ } // (533:4) {#if hasDurationSelect}
9627
 
9628
 
9629
  function create_if_block_6(ctx) {
9691
  destroy_component(select);
9692
  }
9693
  };
9694
+ } // (543:4) {#if hasNopSelect}
9695
 
9696
 
9697
  function create_if_block_5(ctx) {
9759
  destroy_component(select);
9760
  }
9761
  };
9762
+ } // (553:4) {#if hasQuantitySelect}
9763
 
9764
 
9765
  function create_if_block_4(ctx) {
9827
  destroy_component(select);
9828
  }
9829
  };
9830
+ } // (563:4) {#if hasDropBtn}
9831
 
9832
 
9833
  function create_if_block_2(ctx) {
9875
  if (if_block) if_block.d();
9876
  }
9877
  };
9878
+ } // (567:16) {#if showDropBtn}
9879
 
9880
 
9881
  function create_if_block_3(ctx) {
9905
  dispose();
9906
  }
9907
  };
9908
+ } // (574:0) {#if showServiceInfo && serviceId && services[serviceId].hasOwnProperty('info') && services[serviceId].info !== ''}
9909
 
9910
 
9911
  function create_if_block_1(ctx) {
9954
  if (detaching && div_transition) div_transition.end();
9955
  }
9956
  };
9957
+ } // (579:0) {#if showStaffInfo && staffId && staff[staffId].hasOwnProperty('info') && staff[staffId].info !== ''}
9958
 
9959
 
9960
  function create_if_block$1(ctx) {
10926
  $$invalidate(24, categoryItems[id] = category, categoryItems);
10927
  }
10928
  });
10929
+
10930
+ if (categoryId && $__default['default'].inArray(categoryId, categoryIds) === -1) {
10931
+ $$invalidate(16, categoryId = 0);
10932
+ $$invalidate(59, categorySelected = false);
10933
+ }
10934
+
10935
  $__default['default'].each(services, function (id, service) {
10936
  if ($__default['default'].inArray(id, serviceIds) > -1) {
10937
  if (!categoryId || !categorySelected || service.category_id === categoryId) {
11590
  close: false,
11591
  today: BooklyL10n.today,
11592
  monthsFull: BooklyL10n.months,
11593
+ monthsShort: BooklyL10n.monthsShort,
11594
  weekdaysFull: BooklyL10n.days,
11595
  weekdaysShort: BooklyL10n.daysShort,
11596
  labelMonthNext: BooklyL10n.nextMonth,
frontend/resources/js/bookly.min.js CHANGED
@@ -1 +1 @@
1
- var bookly=function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=e(jQuery),n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t){var e={exports:{}};return t(e,e.exports),e.exports}var a,i,l=function(t){return t&&t.Math==Math&&t},c=l("object"==typeof globalThis&&globalThis)||l("object"==typeof window&&window)||l("object"==typeof self&&self)||l("object"==typeof n&&n)||function(){return this}()||Function("return this")(),s=function(t){try{return!!t()}catch(t){return!0}},u=!s((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),f={}.propertyIsEnumerable,d=Object.getOwnPropertyDescriptor,p={f:d&&!f.call({1:2},1)?function(t){var e=d(this,t);return!!e&&e.enumerable}:f},m=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},y={}.toString,h=function(t){return y.call(t).slice(8,-1)},v="".split,_=s((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==h(t)?v.call(t,""):Object(t)}:Object,b=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},k=function(t){return _(b(t))},g=function(t){return"object"==typeof t?null!==t:"function"==typeof t},w=function(t,e){if(!g(t))return t;var o,n;if(e&&"function"==typeof(o=t.toString)&&!g(n=o.call(t)))return n;if("function"==typeof(o=t.valueOf)&&!g(n=o.call(t)))return n;if(!e&&"function"==typeof(o=t.toString)&&!g(n=o.call(t)))return n;throw TypeError("Can't convert object to primitive value")},j={}.hasOwnProperty,S=function(t,e){return j.call(t,e)},x=c.document,O=g(x)&&g(x.createElement),E=function(t){return O?x.createElement(t):{}},T=!u&&!s((function(){return 7!=Object.defineProperty(E("div"),"a",{get:function(){return 7}}).a})),$=Object.getOwnPropertyDescriptor,A={f:u?$:function(t,e){if(t=k(t),e=w(e,!0),T)try{return $(t,e)}catch(t){}if(S(t,e))return m(!p.f.call(t,e),t[e])}},P=/#|\.prototype\./,L=function(t,e){var o=I[C(t)];return o==D||o!=M&&("function"==typeof e?s(e):!!e)},C=L.normalize=function(t){return String(t).replace(P,".").toLowerCase()},I=L.data={},M=L.NATIVE="N",D=L.POLYFILL="P",B=L,R={},N=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},F=function(t,e,o){if(N(t),void 0===e)return t;switch(o){case 0:return function(){return t.call(e)};case 1:return function(o){return t.call(e,o)};case 2:return function(o,n){return t.call(e,o,n)};case 3:return function(o,n,r){return t.call(e,o,n,r)}}return function(){return t.apply(e,arguments)}},q=function(t){if(!g(t))throw TypeError(String(t)+" is not an object");return t},z=Object.defineProperty,U={f:u?z:function(t,e,o){if(q(t),e=w(e,!0),q(o),T)try{return z(t,e,o)}catch(t){}if("get"in o||"set"in o)throw TypeError("Accessors not supported");return"value"in o&&(t[e]=o.value),t}},H=u?function(t,e,o){return U.f(t,e,m(1,o))}:function(t,e,o){return t[e]=o,t},Y=A.f,V=function(t){var e=function(e,o,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,o)}return new t(e,o,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e},Q=function(t,e){var o,n,r,a,i,l,s,u,f=t.target,d=t.global,p=t.stat,m=t.proto,y=d?c:p?c[f]:(c[f]||{}).prototype,h=d?R:R[f]||(R[f]={}),v=h.prototype;for(r in e)o=!B(d?r:f+(p?".":"#")+r,t.forced)&&y&&S(y,r),i=h[r],o&&(l=t.noTargetGet?(u=Y(y,r))&&u.value:y[r]),a=o&&l?l:e[r],o&&typeof i==typeof a||(s=t.bind&&o?F(a,c):t.wrap&&o?V(a):m&&"function"==typeof a?F(Function.call,a):a,(t.sham||a&&a.sham||i&&i.sham)&&H(s,"sham",!0),h[r]=s,m&&(S(R,n=f+"Prototype")||H(R,n,{}),R[n][r]=a,t.real&&v&&!v[r]&&H(v,r,a)))},W=Array.isArray||function(t){return"Array"==h(t)},J=function(t){return Object(b(t))},Z=Math.ceil,G=Math.floor,K=function(t){return isNaN(t=+t)?0:(t>0?G:Z)(t)},X=Math.min,tt=function(t){return t>0?X(K(t),9007199254740991):0},et=function(t,e,o){var n=w(e);n in t?U.f(t,n,m(0,o)):t[n]=o},ot=!0,nt="__core-js_shared__",rt=c[nt]||function(t,e){try{H(c,t,e)}catch(o){c[t]=e}return e}(nt,{}),at=r((function(t){(t.exports=function(t,e){return rt[t]||(rt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.10.0",mode:"pure",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),it=0,lt=Math.random(),ct=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++it+lt).toString(36)},st="process"==h(c.process),ut=function(t){return"function"==typeof t?t:void 0},ft=function(t,e){return arguments.length<2?ut(R[t])||ut(c[t]):R[t]&&R[t][e]||c[t]&&c[t][e]},dt=ft("navigator","userAgent")||"",pt=c.process,mt=pt&&pt.versions,yt=mt&&mt.v8;yt?i=(a=yt.split("."))[0]+a[1]:dt&&(!(a=dt.match(/Edge\/(\d+)/))||a[1]>=74)&&(a=dt.match(/Chrome\/(\d+)/))&&(i=a[1]);var ht=i&&+i,vt=!!Object.getOwnPropertySymbols&&!s((function(){return!Symbol.sham&&(st?38===ht:ht>37&&ht<41)})),_t=vt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,bt=at("wks"),kt=c.Symbol,gt=_t?kt:kt&&kt.withoutSetter||ct,wt=function(t){return S(bt,t)&&(vt||"string"==typeof bt[t])||(vt&&S(kt,t)?bt[t]=kt[t]:bt[t]=gt("Symbol."+t)),bt[t]},jt=wt("species"),St=function(t,e){var o;return W(t)&&("function"!=typeof(o=t.constructor)||o!==Array&&!W(o.prototype)?g(o)&&null===(o=o[jt])&&(o=void 0):o=void 0),new(void 0===o?Array:o)(0===e?0:e)},xt=wt("species"),Ot=function(t){return ht>=51||!s((function(){var e=[];return(e.constructor={})[xt]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Et=wt("isConcatSpreadable"),Tt=9007199254740991,$t="Maximum allowed index exceeded",At=ht>=51||!s((function(){var t=[];return t[Et]=!1,t.concat()[0]!==t})),Pt=Ot("concat"),Lt=function(t){if(!g(t))return!1;var e=t[Et];return void 0!==e?!!e:W(t)};Q({target:"Array",proto:!0,forced:!At||!Pt},{concat:function(t){var e,o,n,r,a,i=J(this),l=St(i,0),c=0;for(e=-1,n=arguments.length;e<n;e++)if(Lt(a=-1===e?i:arguments[e])){if(c+(r=tt(a.length))>Tt)throw TypeError($t);for(o=0;o<r;o++,c++)o in a&&et(l,c,a[o])}else{if(c>=Tt)throw TypeError($t);et(l,c++,a)}return l.length=c,l}});var Ct,It=Math.max,Mt=Math.min,Dt=function(t,e){var o=K(t);return o<0?It(o+e,0):Mt(o,e)},Bt=function(t){return function(e,o,n){var r,a=k(e),i=tt(a.length),l=Dt(n,i);if(t&&o!=o){for(;i>l;)if((r=a[l++])!=r)return!0}else for(;i>l;l++)if((t||l in a)&&a[l]===o)return t||l||0;return!t&&-1}},Rt={includes:Bt(!0),indexOf:Bt(!1)},Nt={},Ft=Rt.indexOf,qt=function(t,e){var o,n=k(t),r=0,a=[];for(o in n)!S(Nt,o)&&S(n,o)&&a.push(o);for(;e.length>r;)S(n,o=e[r++])&&(~Ft(a,o)||a.push(o));return a},zt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ut=Object.keys||function(t){return qt(t,zt)},Ht=u?Object.defineProperties:function(t,e){q(t);for(var o,n=Ut(e),r=n.length,a=0;r>a;)U.f(t,o=n[a++],e[o]);return t},Yt=ft("document","documentElement"),Vt=at("keys"),Qt=function(t){return Vt[t]||(Vt[t]=ct(t))},Wt=Qt("IE_PROTO"),Jt=function(){},Zt=function(t){return"<script>"+t+"</"+"script>"},Gt=function(){try{Ct=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;Gt=Ct?function(t){t.write(Zt("")),t.close();var e=t.parentWindow.Object;return t=null,e}(Ct):((e=E("iframe")).style.display="none",Yt.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Zt("document.F=Object")),t.close(),t.F);for(var o=zt.length;o--;)delete Gt.prototype[zt[o]];return Gt()};Nt[Wt]=!0;var Kt=Object.create||function(t,e){var o;return null!==t?(Jt.prototype=q(t),o=new Jt,Jt.prototype=null,o[Wt]=t):o=Gt(),void 0===e?o:Ht(o,e)},Xt=zt.concat("length","prototype"),te={f:Object.getOwnPropertyNames||function(t){return qt(t,Xt)}},ee=te.f,oe={}.toString,ne="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],re={f:function(t){return ne&&"[object Window]"==oe.call(t)?function(t){try{return ee(t)}catch(t){return ne.slice()}}(t):ee(k(t))}},ae={f:Object.getOwnPropertySymbols},ie=function(t,e,o,n){n&&n.enumerable?t[e]=o:H(t,e,o)},le={f:wt},ce=U.f,se=function(t){var e=R.Symbol||(R.Symbol={});S(e,t)||ce(e,t,{value:le.f(t)})},ue={};ue[wt("toStringTag")]="z";var fe="[object z]"===String(ue),de=wt("toStringTag"),pe="Arguments"==h(function(){return arguments}()),me=fe?h:function(t){var e,o,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(o=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),de))?o:pe?h(e):"Object"==(n=h(e))&&"function"==typeof e.callee?"Arguments":n},ye=fe?{}.toString:function(){return"[object "+me(this)+"]"},he=U.f,ve=wt("toStringTag"),_e=function(t,e,o,n){if(t){var r=o?t:t.prototype;S(r,ve)||he(r,ve,{configurable:!0,value:e}),n&&!fe&&H(r,"toString",ye)}},be=Function.toString;"function"!=typeof rt.inspectSource&&(rt.inspectSource=function(t){return be.call(t)});var ke,ge,we,je=rt.inspectSource,Se=c.WeakMap,xe="function"==typeof Se&&/native code/.test(je(Se)),Oe=c.WeakMap;if(xe){var Ee=rt.state||(rt.state=new Oe),Te=Ee.get,$e=Ee.has,Ae=Ee.set;ke=function(t,e){return e.facade=t,Ae.call(Ee,t,e),e},ge=function(t){return Te.call(Ee,t)||{}},we=function(t){return $e.call(Ee,t)}}else{var Pe=Qt("state");Nt[Pe]=!0,ke=function(t,e){return e.facade=t,H(t,Pe,e),e},ge=function(t){return S(t,Pe)?t[Pe]:{}},we=function(t){return S(t,Pe)}}var Le={set:ke,get:ge,has:we,enforce:function(t){return we(t)?ge(t):ke(t,{})},getterFor:function(t){return function(e){var o;if(!g(e)||(o=ge(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return o}}},Ce=[].push,Ie=function(t){var e=1==t,o=2==t,n=3==t,r=4==t,a=6==t,i=7==t,l=5==t||a;return function(c,s,u,f){for(var d,p,m=J(c),y=_(m),h=F(s,u,3),v=tt(y.length),b=0,k=f||St,g=e?k(c,v):o||i?k(c,0):void 0;v>b;b++)if((l||b in y)&&(p=h(d=y[b],b,m),t))if(e)g[b]=p;else if(p)switch(t){case 3:return!0;case 5:return d;case 6:return b;case 2:Ce.call(g,d)}else switch(t){case 4:return!1;case 7:Ce.call(g,d)}return a?-1:n||r?r:g}},Me={forEach:Ie(0),map:Ie(1),filter:Ie(2),some:Ie(3),every:Ie(4),find:Ie(5),findIndex:Ie(6),filterOut:Ie(7)},De=Me.forEach,Be=Qt("hidden"),Re="Symbol",Ne=wt("toPrimitive"),Fe=Le.set,qe=Le.getterFor(Re),ze=Object.prototype,Ue=c.Symbol,He=ft("JSON","stringify"),Ye=A.f,Ve=U.f,Qe=re.f,We=p.f,Je=at("symbols"),Ze=at("op-symbols"),Ge=at("string-to-symbol-registry"),Ke=at("symbol-to-string-registry"),Xe=at("wks"),to=c.QObject,eo=!to||!to.prototype||!to.prototype.findChild,oo=u&&s((function(){return 7!=Kt(Ve({},"a",{get:function(){return Ve(this,"a",{value:7}).a}})).a}))?function(t,e,o){var n=Ye(ze,e);n&&delete ze[e],Ve(t,e,o),n&&t!==ze&&Ve(ze,e,n)}:Ve,no=function(t,e){var o=Je[t]=Kt(Ue.prototype);return Fe(o,{type:Re,tag:t,description:e}),u||(o.description=e),o},ro=_t?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof Ue},ao=function(t,e,o){t===ze&&ao(Ze,e,o),q(t);var n=w(e,!0);return q(o),S(Je,n)?(o.enumerable?(S(t,Be)&&t[Be][n]&&(t[Be][n]=!1),o=Kt(o,{enumerable:m(0,!1)})):(S(t,Be)||Ve(t,Be,m(1,{})),t[Be][n]=!0),oo(t,n,o)):Ve(t,n,o)},io=function(t,e){q(t);var o=k(e),n=Ut(o).concat(uo(o));return De(n,(function(e){u&&!lo.call(o,e)||ao(t,e,o[e])})),t},lo=function(t){var e=w(t,!0),o=We.call(this,e);return!(this===ze&&S(Je,e)&&!S(Ze,e))&&(!(o||!S(this,e)||!S(Je,e)||S(this,Be)&&this[Be][e])||o)},co=function(t,e){var o=k(t),n=w(e,!0);if(o!==ze||!S(Je,n)||S(Ze,n)){var r=Ye(o,n);return!r||!S(Je,n)||S(o,Be)&&o[Be][n]||(r.enumerable=!0),r}},so=function(t){var e=Qe(k(t)),o=[];return De(e,(function(t){S(Je,t)||S(Nt,t)||o.push(t)})),o},uo=function(t){var e=t===ze,o=Qe(e?Ze:k(t)),n=[];return De(o,(function(t){!S(Je,t)||e&&!S(ze,t)||n.push(Je[t])})),n};if(vt||(ie((Ue=function(){if(this instanceof Ue)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=ct(t),o=function(t){this===ze&&o.call(Ze,t),S(this,Be)&&S(this[Be],e)&&(this[Be][e]=!1),oo(this,e,m(1,t))};return u&&eo&&oo(ze,e,{configurable:!0,set:o}),no(e,t)}).prototype,"toString",(function(){return qe(this).tag})),ie(Ue,"withoutSetter",(function(t){return no(ct(t),t)})),p.f=lo,U.f=ao,A.f=co,te.f=re.f=so,ae.f=uo,le.f=function(t){return no(wt(t),t)},u&&Ve(Ue.prototype,"description",{configurable:!0,get:function(){return qe(this).description}})),Q({global:!0,wrap:!0,forced:!vt,sham:!vt},{Symbol:Ue}),De(Ut(Xe),(function(t){se(t)})),Q({target:Re,stat:!0,forced:!vt},{for:function(t){var e=String(t);if(S(Ge,e))return Ge[e];var o=Ue(e);return Ge[e]=o,Ke[o]=e,o},keyFor:function(t){if(!ro(t))throw TypeError(t+" is not a symbol");if(S(Ke,t))return Ke[t]},useSetter:function(){eo=!0},useSimple:function(){eo=!1}}),Q({target:"Object",stat:!0,forced:!vt,sham:!u},{create:function(t,e){return void 0===e?Kt(t):io(Kt(t),e)},defineProperty:ao,defineProperties:io,getOwnPropertyDescriptor:co}),Q({target:"Object",stat:!0,forced:!vt},{getOwnPropertyNames:so,getOwnPropertySymbols:uo}),Q({target:"Object",stat:!0,forced:s((function(){ae.f(1)}))},{getOwnPropertySymbols:function(t){return ae.f(J(t))}}),He){var fo=!vt||s((function(){var t=Ue();return"[null]"!=He([t])||"{}"!=He({a:t})||"{}"!=He(Object(t))}));Q({target:"JSON",stat:!0,forced:fo},{stringify:function(t,e,o){for(var n,r=[t],a=1;arguments.length>a;)r.push(arguments[a++]);if(n=e,(g(e)||void 0!==t)&&!ro(t))return W(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!ro(e))return e}),r[1]=e,He.apply(null,r)}})}Ue.prototype[Ne]||H(Ue.prototype,Ne,Ue.prototype.valueOf),_e(Ue,Re),Nt[Be]=!0,se("asyncIterator"),se("hasInstance"),se("isConcatSpreadable"),se("iterator"),se("match"),se("matchAll"),se("replace"),se("search"),se("species"),se("split"),se("toPrimitive"),se("toStringTag"),se("unscopables"),_e(c.JSON,"JSON",!0);var po=R.Symbol;se("asyncDispose"),se("dispose"),se("observable"),se("patternMatch"),se("replaceAll");var mo,yo,ho,vo=po,_o=function(t){return function(e,o){var n,r,a=String(b(e)),i=K(o),l=a.length;return i<0||i>=l?t?"":void 0:(n=a.charCodeAt(i))<55296||n>56319||i+1===l||(r=a.charCodeAt(i+1))<56320||r>57343?t?a.charAt(i):n:t?a.slice(i,i+2):r-56320+(n-55296<<10)+65536}},bo={codeAt:_o(!1),charAt:_o(!0)},ko=!s((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),go=Qt("IE_PROTO"),wo=Object.prototype,jo=ko?Object.getPrototypeOf:function(t){return t=J(t),S(t,go)?t[go]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?wo:null},So=wt("iterator"),xo=!1;[].keys&&("next"in(ho=[].keys())?(yo=jo(jo(ho)))!==Object.prototype&&(mo=yo):xo=!0);var Oo=null==mo||s((function(){var t={};return mo[So].call(t)!==t}));Oo&&(mo={}),Oo&&!S(mo,So)&&H(mo,So,(function(){return this}));var Eo={IteratorPrototype:mo,BUGGY_SAFARI_ITERATORS:xo},To={},$o=Eo.IteratorPrototype,Ao=function(){return this},Po=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,o={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(o,[]),e=o instanceof Array}catch(t){}return function(o,n){return q(o),function(t){if(!g(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(n),e?t.call(o,n):o.__proto__=n,o}}():void 0),Lo=Eo.IteratorPrototype,Co=Eo.BUGGY_SAFARI_ITERATORS,Io=wt("iterator"),Mo="keys",Do="values",Bo="entries",Ro=function(){return this},No=function(t,e,o,n,r,a,i){!function(t,e,o){var n=e+" Iterator";t.prototype=Kt($o,{next:m(1,o)}),_e(t,n,!1,!0),To[n]=Ao}(o,e,n);var l,c,s,u=function(t){if(t===r&&h)return h;if(!Co&&t in p)return p[t];switch(t){case Mo:case Do:case Bo:return function(){return new o(this,t)}}return function(){return new o(this)}},f=e+" Iterator",d=!1,p=t.prototype,y=p[Io]||p["@@iterator"]||r&&p[r],h=!Co&&y||u(r),v="Array"==e&&p.entries||y;if(v&&(l=jo(v.call(new t)),Lo!==Object.prototype&&l.next&&(_e(l,f,!0,!0),To[f]=Ro)),r==Do&&y&&y.name!==Do&&(d=!0,h=function(){return y.call(this)}),i&&p[Io]!==h&&H(p,Io,h),To[e]=h,r)if(c={values:u(Do),keys:a?h:u(Mo),entries:u(Bo)},i)for(s in c)(Co||d||!(s in p))&&ie(p,s,c[s]);else Q({target:e,proto:!0,forced:Co||d},c);return c},Fo=bo.charAt,qo="String Iterator",zo=Le.set,Uo=Le.getterFor(qo);No(String,"String",(function(t){zo(this,{type:qo,string:String(t),index:0})}),(function(){var t,e=Uo(this),o=e.string,n=e.index;return n>=o.length?{value:void 0,done:!0}:(t=Fo(o,n),e.index+=t.length,{value:t,done:!1})}));var Ho="Array Iterator",Yo=Le.set,Vo=Le.getterFor(Ho);No(Array,"Array",(function(t,e){Yo(this,{type:Ho,target:k(t),index:0,kind:e})}),(function(){var t=Vo(this),e=t.target,o=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==o?{value:n,done:!1}:"values"==o?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),To.Arguments=To.Array;var Qo=wt("toStringTag");for(var Wo in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var Jo=c[Wo],Zo=Jo&&Jo.prototype;Zo&&me(Zo)!==Qo&&H(Zo,Qo,Wo),To[Wo]=To.Array}var Go=le.f("iterator");function Ko(t){return(Ko="function"==typeof vo&&"symbol"==typeof Go?function(t){return typeof t}:function(t){return t&&"function"==typeof vo&&t.constructor===vo&&t!==vo.prototype?"symbol":typeof t})(t)}function Xo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Q({target:"Object",stat:!0,forced:!u,sham:!u},{defineProperty:U.f});var tn=r((function(t){var e=R.Object,o=t.exports=function(t,o,n){return e.defineProperty(t,o,n)};e.defineProperty.sham&&(o.sham=!0)}));function en(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),tn(t,n.key,n)}}function on(t,e,o){return e&&en(t.prototype,e),o&&en(t,o),t}function nn(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function rn(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,nn(t,e,"get"))}function an(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,nn(t,e,"set"),o),o}var ln="\t\n\v\f\r                 \u2028\u2029\ufeff",cn="["+ln+"]",sn=RegExp("^"+cn+cn+"*"),un=RegExp(cn+cn+"*$"),fn=function(t){return function(e){var o=String(b(e));return 1&t&&(o=o.replace(sn,"")),2&t&&(o=o.replace(un,"")),o}},dn={start:fn(1),end:fn(2),trim:fn(3)},pn=dn.trim,mn=c.parseFloat,yn=1/mn(ln+"-0")!=-1/0?function(t){var e=pn(String(t)),o=mn(e);return 0===o&&"-"==e.charAt(0)?-0:o}:mn;Q({global:!0,forced:parseFloat!=yn},{parseFloat:yn});var hn=R.parseFloat,vn=dn.trim,_n=c.parseInt,bn=/^[+-]?0[Xx]/,kn=8!==_n(ln+"08")||22!==_n(ln+"0x16")?function(t,e){var o=vn(String(t));return _n(o,e>>>0||(bn.test(o)?16:10))}:_n;Q({global:!0,forced:parseInt!=kn},{parseInt:kn});var gn=R.parseInt,wn=Ot("slice"),jn=wt("species"),Sn=[].slice,xn=Math.max;Q({target:"Array",proto:!0,forced:!wn},{slice:function(t,e){var o,n,r,a=k(this),i=tt(a.length),l=Dt(t,i),c=Dt(void 0===e?i:e,i);if(W(a)&&("function"!=typeof(o=a.constructor)||o!==Array&&!W(o.prototype)?g(o)&&null===(o=o[jn])&&(o=void 0):o=void 0,o===Array||void 0===o))return Sn.call(a,l,c);for(n=new(void 0===o?Array:o)(xn(c-l,0)),r=0;l<c;l++,r++)l in a&&et(n,r,a[l]);return n.length=r,n}});var On=function(t){return R[t+"Prototype"]},En=On("Array").slice,Tn=Array.prototype,$n=function(t){var e=t.slice;return t===Tn||t instanceof Array&&e===Tn.slice?En:e},An=$n,Pn=function(t,e,o){for(var n in e)o&&o.unsafe&&t[n]?t[n]=e[n]:ie(t,n,e[n],o);return t},Ln=!s((function(){return Object.isExtensible(Object.preventExtensions({}))})),Cn=r((function(t){var e=U.f,o=ct("meta"),n=0,r=Object.isExtensible||function(){return!0},a=function(t){e(t,o,{value:{objectID:"O"+ ++n,weakData:{}}})},i=t.exports={REQUIRED:!1,fastKey:function(t,e){if(!g(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!S(t,o)){if(!r(t))return"F";if(!e)return"E";a(t)}return t[o].objectID},getWeakData:function(t,e){if(!S(t,o)){if(!r(t))return!0;if(!e)return!1;a(t)}return t[o].weakData},onFreeze:function(t){return Ln&&i.REQUIRED&&r(t)&&!S(t,o)&&a(t),t}};Nt[o]=!0})),In=wt("iterator"),Mn=Array.prototype,Dn=function(t){return void 0!==t&&(To.Array===t||Mn[In]===t)},Bn=wt("iterator"),Rn=function(t){if(null!=t)return t[Bn]||t["@@iterator"]||To[me(t)]},Nn=function(t){var e=t.return;if(void 0!==e)return q(e.call(t)).value},Fn=function(t,e){this.stopped=t,this.result=e},qn=function(t,e,o){var n,r,a,i,l,c,s,u=o&&o.that,f=!(!o||!o.AS_ENTRIES),d=!(!o||!o.IS_ITERATOR),p=!(!o||!o.INTERRUPTED),m=F(e,u,1+f+p),y=function(t){return n&&Nn(n),new Fn(!0,t)},h=function(t){return f?(q(t),p?m(t[0],t[1],y):m(t[0],t[1])):p?m(t,y):m(t)};if(d)n=t;else{if("function"!=typeof(r=Rn(t)))throw TypeError("Target is not iterable");if(Dn(r)){for(a=0,i=tt(t.length);i>a;a++)if((l=h(t[a]))&&l instanceof Fn)return l;return new Fn(!1)}n=r.call(t)}for(c=n.next;!(s=c.call(n)).done;){try{l=h(s.value)}catch(t){throw Nn(n),t}if("object"==typeof l&&l&&l instanceof Fn)return l}return new Fn(!1)},zn=function(t,e,o){if(!(t instanceof e))throw TypeError("Incorrect "+(o?o+" ":"")+"invocation");return t},Un=U.f,Hn=Me.forEach,Yn=Le.set,Vn=Le.getterFor,Qn=function(t,e,o){var n,r=-1!==t.indexOf("Map"),a=-1!==t.indexOf("Weak"),i=r?"set":"add",l=c[t],f=l&&l.prototype,d={};if(u&&"function"==typeof l&&(a||f.forEach&&!s((function(){(new l).entries().next()})))){n=e((function(e,o){Yn(zn(e,n,t),{type:t,collection:new l}),null!=o&&qn(o,e[i],{that:e,AS_ENTRIES:r})}));var p=Vn(t);Hn(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"==t||"set"==t;!(t in f)||a&&"clear"==t||H(n.prototype,t,(function(o,n){var r=p(this).collection;if(!e&&a&&!g(o))return"get"==t&&void 0;var i=r[t](0===o?0:o,n);return e?this:i}))})),a||Un(n.prototype,"size",{configurable:!0,get:function(){return p(this).collection.size}})}else n=o.getConstructor(e,t,r,i),Cn.REQUIRED=!0;return _e(n,t,!1,!0),d[t]=n,Q({global:!0,forced:!0},d),a||o.setStrong(n,t,r),n},Wn=Cn.getWeakData,Jn=Le.set,Zn=Le.getterFor,Gn=Me.find,Kn=Me.findIndex,Xn=0,tr=function(t){return t.frozen||(t.frozen=new er)},er=function(){this.entries=[]},or=function(t,e){return Gn(t.entries,(function(t){return t[0]===e}))};er.prototype={get:function(t){var e=or(this,t);if(e)return e[1]},has:function(t){return!!or(this,t)},set:function(t,e){var o=or(this,t);o?o[1]=e:this.entries.push([t,e])},delete:function(t){var e=Kn(this.entries,(function(e){return e[0]===t}));return~e&&this.entries.splice(e,1),!!~e}};var nr={getConstructor:function(t,e,o,n){var r=t((function(t,a){zn(t,r,e),Jn(t,{type:e,id:Xn++,frozen:void 0}),null!=a&&qn(a,t[n],{that:t,AS_ENTRIES:o})})),a=Zn(e),i=function(t,e,o){var n=a(t),r=Wn(q(e),!0);return!0===r?tr(n).set(e,o):r[n.id]=o,t};return Pn(r.prototype,{delete:function(t){var e=a(this);if(!g(t))return!1;var o=Wn(t);return!0===o?tr(e).delete(t):o&&S(o,e.id)&&delete o[e.id]},has:function(t){var e=a(this);if(!g(t))return!1;var o=Wn(t);return!0===o?tr(e).has(t):o&&S(o,e.id)}}),Pn(r.prototype,o?{get:function(t){var e=a(this);if(g(t)){var o=Wn(t);return!0===o?tr(e).get(t):o?o[e.id]:void 0}},set:function(t,e){return i(this,t,e)}}:{add:function(t){return i(this,t,!0)}}),r}};r((function(t){var e,o=Le.enforce,n=!c.ActiveXObject&&"ActiveXObject"in c,r=Object.isExtensible,a=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},i=t.exports=Qn("WeakMap",a,nr);if(xe&&n){e=nr.getConstructor(a,"WeakMap",!0),Cn.REQUIRED=!0;var l=i.prototype,s=l.delete,u=l.has,f=l.get,d=l.set;Pn(l,{delete:function(t){if(g(t)&&!r(t)){var n=o(this);return n.frozen||(n.frozen=new e),s.call(this,t)||n.frozen.delete(t)}return s.call(this,t)},has:function(t){if(g(t)&&!r(t)){var n=o(this);return n.frozen||(n.frozen=new e),u.call(this,t)||n.frozen.has(t)}return u.call(this,t)},get:function(t){if(g(t)&&!r(t)){var n=o(this);return n.frozen||(n.frozen=new e),u.call(this,t)?f.call(this,t):n.frozen.get(t)}return f.call(this,t)},set:function(t,n){if(g(t)&&!r(t)){var a=o(this);a.frozen||(a.frozen=new e),u.call(this,t)?d.call(this,t,n):a.frozen.set(t,n)}else d.call(this,t,n);return this}})}}));var rr=R.WeakMap,ar={};function ir(t){var e=Ladda.create(t);return e.start(),e}function lr(t,e){if(ar[e].scroll){var n=t.offset().top,r=o.default(window).scrollTop();(n<o.default(window).scrollTop()||n>r+window.innerHeight)&&o.default("html,body").animate({scrollTop:n-50},500)}else ar[e].scroll=!0}function cr(t){return o.default.ajax(jQuery.extend({url:BooklyL10n.ajaxurl,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,beforeSend:function(t,e){}},t))}var sr=new rr,ur=function(){function t(e){Xo(this,t),sr.set(this,{writable:!0,value:void 0}),an(this,sr,e)}return on(t,[{key:"price",value:function(t){var e=rn(this,sr).format_price.format;return t=hn(t),e=(e=e.replace("{sign}",t<0?"-":"")).replace("{price}",this._formatNumber(Math.abs(t),rn(this,sr).format_price.decimals,rn(this,sr).format_price.decimal_separator,rn(this,sr).format_price.thousands_separator))}},{key:"_formatNumber",value:function(t,e,o,n){var r;t=Math.abs(Number(t)||0).toFixed(e),e=isNaN(e=Math.abs(e))?2:e,o=void 0===o?".":o,n=void 0===n?",":n;var a=t<0?"-":"",i=String(gn(t)),l=i.length>3?i.length%3:0;return a+(l?i.substr(0,l)+n:"")+i.substr(l).replace(/(\d{3})(?=\d)/g,"$1"+n)+(e?o+An(r=Math.abs(t-i).toFixed(e)).call(r,2):"")}}]),t}(),fr=[].slice,dr=/MSIE .\./.test(dt),pr=function(t){return function(e,o){var n=arguments.length>2,r=n?fr.call(arguments,2):void 0;return t(n?function(){("function"==typeof e?e:Function(e)).apply(this,r)}:e,o)}};Q({global:!0,bind:!0,forced:dr},{setTimeout:pr(c.setTimeout),setInterval:pr(c.setInterval)});var mr=R.setTimeout,yr=Me.find,hr="find",vr=!0;hr in[]&&Array(1).find((function(){vr=!1})),Q({target:"Array",proto:!0,forced:vr},{find:function(t){return yr(this,t,arguments.length>1?arguments[1]:void 0)}});var _r=On("Array").find,br=Array.prototype,kr=function(t){var e=t.find;return t===br||t instanceof Array&&e===br.find?_r:e},gr=ft("JSON","stringify"),wr=/[\uD800-\uDFFF]/g,jr=/^[\uD800-\uDBFF]$/,Sr=/^[\uDC00-\uDFFF]$/,xr=function(t,e,o){var n=o.charAt(e-1),r=o.charAt(e+1);return jr.test(t)&&!Sr.test(r)||Sr.test(t)&&!jr.test(n)?"\\u"+t.charCodeAt(0).toString(16):t},Or=s((function(){return'"\\udf06\\ud834"'!==gr("\udf06\ud834")||'"\\udead"'!==gr("\udead")}));gr&&Q({target:"JSON",stat:!0,forced:Or},{stringify:function(t,e,o){var n=gr.apply(null,arguments);return"string"==typeof n?n.replace(wr,xr):n}}),R.JSON||(R.JSON={stringify:JSON.stringify});var Er=function(t,e,o){return R.JSON.stringify.apply(null,arguments)};Q({target:"String",proto:!0},{repeat:function(t){var e=String(b(this)),o="",n=K(t);if(n<0||n==1/0)throw RangeError("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(e+=e))1&n&&(o+=e);return o}});var Tr=On("String").repeat,$r=String.prototype,Ar=function(t){var e=t.repeat;return"string"==typeof t||t===$r||t instanceof String&&e===$r.repeat?Tr:e},Pr=function(t,e){var o=[][t];return!!o&&s((function(){o.call(null,e||function(){throw 1},1)}))},Lr=Me.forEach,Cr=Pr("forEach")?[].forEach:function(t){return Lr(this,t,arguments.length>1?arguments[1]:void 0)};Q({target:"Array",proto:!0,forced:[].forEach!=Cr},{forEach:Cr});var Ir=On("Array").forEach,Mr=Array.prototype,Dr={DOMTokenList:!0,NodeList:!0},Br=function(t){var e=t.forEach;return t===Mr||t instanceof Array&&e===Mr.forEach||Dr.hasOwnProperty(me(t))?Ir:e},Rr=Ot("splice"),Nr=Math.max,Fr=Math.min,qr=9007199254740991,zr="Maximum allowed length exceeded";Q({target:"Array",proto:!0,forced:!Rr},{splice:function(t,e){var o,n,r,a,i,l,c=J(this),s=tt(c.length),u=Dt(t,s),f=arguments.length;if(0===f?o=n=0:1===f?(o=0,n=s-u):(o=f-2,n=Fr(Nr(K(e),0),s-u)),s+o-n>qr)throw TypeError(zr);for(r=St(c,n),a=0;a<n;a++)(i=u+a)in c&&et(r,a,c[i]);if(r.length=n,o<n){for(a=u;a<s-n;a++)l=a+o,(i=a+n)in c?c[l]=c[i]:delete c[l];for(a=s;a>s-n+o;a--)delete c[a-1]}else if(o>n)for(a=s-n;a>u;a--)l=a+o-1,(i=a+n-1)in c?c[l]=c[i]:delete c[l];for(a=0;a<o;a++)c[a+u]=arguments[a+2];return c.length=s-n+o,r}});var Ur=On("Array").splice,Hr=Array.prototype,Yr=function(t){var e=t.splice;return t===Hr||t instanceof Array&&e===Hr.splice?Ur:e},Vr=Me.every,Qr=Pr("every");Q({target:"Array",proto:!0,forced:!Qr},{every:function(t){return Vr(this,t,arguments.length>1?arguments[1]:void 0)}});var Wr=On("Array").every,Jr=Array.prototype,Zr=function(t){var e=t.every;return t===Jr||t instanceof Array&&e===Jr.every?Wr:e},Gr=On("Array").concat,Kr=Array.prototype,Xr=function(t){var e=t.concat;return t===Kr||t instanceof Array&&e===Kr.concat?Gr:e},ta=Me.map,ea=Ot("map");Q({target:"Array",proto:!0,forced:!ea},{map:function(t){return ta(this,t,arguments.length>1?arguments[1]:void 0)}});var oa=On("Array").map,na=Array.prototype,ra=function(t){var e=t.map;return t===na||t instanceof Array&&e===na.map?oa:e},aa=Me.filter,ia=Ot("filter");Q({target:"Array",proto:!0,forced:!ia},{filter:function(t){return aa(this,t,arguments.length>1?arguments[1]:void 0)}});var la,ca=On("Array").filter,sa=Array.prototype,ua=function(t){var e=t.filter;return t===sa||t instanceof Array&&e===sa.filter?ca:e},fa=dn.trim;Q({target:"String",proto:!0,forced:(la="trim",s((function(){return!!ln[la]()||"​…᠎"!="​…᠎"[la]()||ln[la].name!==la})))},{trim:function(){return fa(this)}});var da=On("String").trim,pa=String.prototype,ma=function(t){var e=t.trim;return"string"==typeof t||t===pa||t instanceof String&&e===pa.trim?da:e},ya=Rt.indexOf,ha=[].indexOf,va=!!ha&&1/[1].indexOf(1,-0)<0,_a=Pr("indexOf");Q({target:"Array",proto:!0,forced:va||!_a},{indexOf:function(t){return va?ha.apply(this,arguments)||0:ya(this,t,arguments.length>1?arguments[1]:void 0)}});var ba=On("Array").indexOf,ka=Array.prototype,ga=function(t){var e=t.indexOf;return t===ka||t instanceof Array&&e===ka.indexOf?ba:e};function wa(t){var e=o.default.extend({action:"bookly_render_complete",csrf_token:BooklyL10n.csrf_token},t),n=ar[t.form_id].$container;cr({data:e,success:function(r){r.success&&(r.final_step_url&&!e.error?document.location.href=r.final_step_url:(n.html(r.html),lr(n,t.form_id),o.default(".bookly-js-start-over",n).on("click",(function(e){e.preventDefault(),ir(this),hu({form_id:t.form_id,reset_form:!0,new_chain:!0})})),o.default(".bookly-js-download-invoice",n).on("click",(function(e){var o,n=ir(this);window.location=BooklyL10n.ajaxurl+(ga(o=BooklyL10n.ajaxurl).call(o,"?")>0?"&":"?")+"action=bookly_invoices_download_invoice&form_id="+t.form_id+"&csrf_token="+BooklyL10n.csrf_token,mr((function(){return n.stop()}),1500)}))))}})}function ja(t){var e=ar[t.form_id].$container;cr({type:"POST",data:{action:"bookly_render_payment",csrf_token:BooklyL10n.csrf_token,form_id:t.form_id,page_url:document.URL.split("#")[0]},success:function(n){if(n.success){if(n.disabled)return void Sa(t.form_id);e.html(n.html),lr(e,t.form_id),"cancelled"==ar[t.form_id].status.booking&&(ar[t.form_id].status.booking="ok");var r=n.custom_js;if(kr(e).call(e,"#bookly-stripe-card-field").length)if(n.stripe_publishable_key){var a=Stripe(n.stripe_publishable_key,{betas:["payment_intent_beta_3"]}),i=a.elements().create("card");i.mount("#bookly-stripe-card-field")}else kr(e).call(e,".bookly-stripe #bookly-stripe-card-field").hide(),kr(e).call(e,".pay-card .bookly-js-next-step").prop("disabled",!0),kr(e).call(e,".bookly-stripe .bookly-js-card-error").text("Please call Stripe() with your publishable key. You used an empty string.");var l=o.default(".bookly-payment",e),c=o.default(".bookly-js-apply-coupon",e),s=o.default("input.bookly-user-coupon",e),u=o.default(".bookly-js-coupon-error",e),f=o.default("input[type=radio][name=bookly-full-payment]",e),d=o.default(".bookly-info-text-coupon",e),p=o.default(".bookly-gateway-buttons,form.bookly-authorize_net,form.bookly-stripe",e);l.on("click",(function(){p.hide(),o.default(".bookly-gateway-buttons.pay-"+o.default(this).val(),e).show(),"card"==o.default(this).val()&&o.default("form.bookly-"+o.default(this).data("form"),e).show()})),l.eq(0).trigger("click"),f.on("change",(function(){var e={action:"bookly_deposit_payments_apply_payment_method",csrf_token:BooklyL10n.csrf_token,form_id:t.form_id,deposit_full:o.default(this).val()};o.default(this).hide(),o.default(this).prev().css("display","inline-block"),cr({type:"POST",data:e,success:function(e){e.success&&ja({form_id:t.form_id})}})})),c.on("click",(function(e){var o=ir(this);u.text(""),s.removeClass("bookly-error"),cr({type:"POST",data:{action:"bookly_coupons_apply_coupon",csrf_token:BooklyL10n.csrf_token,form_id:t.form_id,coupon_code:s.val()},success:function(e){e.success?ja({form_id:t.form_id}):(u.html(e.error),s.addClass("bookly-error"),d.html(e.text),lr(u,t.form_id),o.stop())},error:function(){o.stop()}})})),o.default(".bookly-js-next-step",e).on("click",(function(n){var l,c=ir(this);if(r)try{o.default.globalEval(r.next_button)}catch(n){}if(o.default(".bookly-payment[value=local]",e).is(":checked")||o.default(this).hasClass("bookly-js-coupon-payment"))n.preventDefault(),Sa(t.form_id);else if(o.default(".bookly-payment[value=card]",e).is(":checked"))if(o.default(".bookly-payment[data-form=stripe]",e).is(":checked"))cr({type:"POST",data:{action:"bookly_stripe_create_intent",csrf_token:BooklyL10n.csrf_token,form_id:t.form_id},success:function(o){o.success?a.handleCardPayment(o.intent_secret,i).then((function(n){n.error?cr({type:"POST",data:{action:"bookly_stripe_failed_payment",csrf_token:BooklyL10n.csrf_token,form_id:t.form_id,intent_id:o.intent_id},success:function(t){t.success&&(c.stop(),kr(e).call(e,".bookly-stripe .bookly-js-card-error").text(n.error.message))}}):wa({form_id:t.form_id})})):("cart_item_not_available"===o.error&&xa(o,t.form_id),c.stop(),kr(e).call(e,".bookly-stripe .bookly-js-card-error").text(o.error_message))}});else{l=kr(e).call(e,".bookly-authorize_net"),n.preventDefault();!function(e){cr({type:"POST",data:e,success:function(e){e.success?wa({form_id:t.form_id}):"cart_item_not_available"==e.error?xa(e,t.form_id):"payment_error"==e.error&&(c.stop(),kr(l).call(l,".bookly-js-card-error").text(e.error_message))}})}({action:"bookly_authorize_net_aim_payment",csrf_token:BooklyL10n.csrf_token,card:{number:kr(l).call(l,'input[name="card_number"]').val(),cvc:kr(l).call(l,'input[name="card_cvc"]').val(),exp_month:kr(l).call(l,'select[name="card_exp_month"]').val(),exp_year:kr(l).call(l,'select[name="card_exp_year"]').val()},form_id:t.form_id})}else(o.default(".bookly-payment[value=paypal]",e).is(":checked")||o.default(".bookly-payment[value=2checkout]",e).is(":checked")||o.default(".bookly-payment[value=payu_biz]",e).is(":checked")||o.default(".bookly-payment[value=payu_latam]",e).is(":checked")||o.default(".bookly-payment[value=payson]",e).is(":checked")||o.default(".bookly-payment[value=mollie]",e).is(":checked")||o.default(".bookly-payment[value=cloud_stripe]",e).is(":checked"))&&(n.preventDefault(),l=o.default(this).closest("form"),kr(l).call(l,"input.bookly-payment-id").length>0?cr({type:"POST",data:{action:"bookly_pro_save_pending_appointment",csrf_token:BooklyL10n.csrf_token,form_id:t.form_id,payment_type:l.data("gateway")},success:function(e){e.success?(kr(l).call(l,"input.bookly-payment-id").val(e.payment_id),l.submit()):"cart_item_not_available"==e.error&&xa(e,t.form_id)}}):cr({type:"POST",data:{action:"bookly_check_cart",csrf_token:BooklyL10n.csrf_token,form_id:t.form_id},success:function(e){e.success?l.submit():"cart_item_not_available"==e.error&&xa(e,t.form_id)}}))})),o.default(".bookly-js-back-step",e).on("click",(function(e){e.preventDefault(),ir(this),Oa({form_id:t.form_id})}))}}})}function Sa(t){cr({type:"POST",data:{action:"bookly_save_appointment",csrf_token:BooklyL10n.csrf_token,form_id:t},success:function(e){e.success?wa({form_id:t}):"cart_item_not_available"==e.error&&xa(e,t)}})}function xa(t,e){ar[e].skip_steps.cart?Aa({form_id:e},ar[e].errors[t.error]):Ea({form_id:e},{failed_key:t.failed_cart_key,message:ar[e].errors[t.error]})}function Oa(t){var e=o.default.extend({action:"bookly_render_details",csrf_token:BooklyL10n.csrf_token},t),n=ar[t.form_id].$container;cr({data:e,success:function(e){if(e.success){var r,a;n.html(e.html),lr(n,t.form_id);var i=e.intlTelInput,l=e.update_details_dialog,c=e.woocommerce,s=e.custom_js,u=e.custom_fields_conditions||[];ar[t.form_id].hasOwnProperty("google_maps")&&ar[t.form_id].google_maps.enabled&&(n||o.default(".bookly-form .bookly-details-step")).each((function(){!function(t){var e=kr(t).call(t,".bookly-js-cst-address-autocomplete");if(!e.length)return!1;var o=new google.maps.places.Autocomplete(e[0],{types:["geocode"]}),n=[{selector:".bookly-js-address-country",val:function(){return r("country")},short:function(){return r("country",!0)}},{selector:".bookly-js-address-postcode",val:function(){return r("postal_code")}},{selector:".bookly-js-address-city",val:function(){return r("locality")||r("administrative_area_level_3")}},{selector:".bookly-js-address-state",val:function(){return r("administrative_area_level_1")},short:function(){return r("administrative_area_level_1",!0)}},{selector:".bookly-js-address-street",val:function(){return r("route")}},{selector:".bookly-js-address-street_number",val:function(){return r("street_number")}}],r=function(t,e){for(var n=o.getPlace().address_components,r=0;r<n.length;r++)if(n[r].types[0]===t)return e?n[r].short_name:n[r].long_name;return""};o.addListener("place_changed",(function(){Br(n).call(n,(function(e){var o=kr(t).call(t,e.selector);0!==o.length&&(o.val(e.val()),"function"==typeof e.short&&o.data("short",e.short()))}))}))}(o.default(this))})),o.default(document.body).trigger("bookly.render.step_detail",[n]);var f="",d=o.default(".bookly-js-guest",n),p=o.default(".bookly-js-user-phone-input",n),m=o.default(".bookly-js-user-email",n),y=o.default(".bookly-js-user-email-confirm",n),h=o.default(".bookly-js-select-birthday-day",n),v=o.default(".bookly-js-select-birthday-month",n),_=o.default(".bookly-js-select-birthday-year",n),b=o.default(".bookly-js-address-country",n),k=o.default(".bookly-js-address-state",n),g=o.default(".bookly-js-address-postcode",n),w=o.default(".bookly-js-address-city",n),j=o.default(".bookly-js-address-street",n),S=o.default(".bookly-js-address-street_number",n),x=o.default(".bookly-js-address-additional_address",n),O=o.default(".bookly-js-address-country-error",n),E=o.default(".bookly-js-address-state-error",n),T=o.default(".bookly-js-address-postcode-error",n),$=o.default(".bookly-js-address-city-error",n),A=o.default(".bookly-js-address-street-error",n),P=o.default(".bookly-js-address-street_number-error",n),L=o.default(".bookly-js-address-additional_address-error",n),C=o.default(".bookly-js-select-birthday-day-error",n),I=o.default(".bookly-js-select-birthday-month-error",n),M=o.default(".bookly-js-select-birthday-year-error",n),D=o.default(".bookly-js-full-name",n),B=o.default(".bookly-js-first-name",n),R=o.default(".bookly-js-last-name",n),N=o.default(".bookly-js-user-notes",n),F=o.default(".bookly-custom-field",n),q=o.default(".bookly-js-info-field",n),z=o.default(".bookly-js-user-phone-error",n),U=o.default(".bookly-js-user-email-error",n),H=o.default(".bookly-js-user-email-confirm-error",n),Y=o.default(".bookly-js-full-name-error",n),V=o.default(".bookly-js-first-name-error",n),Q=o.default(".bookly-js-last-name-error",n),W=o.default(".bookly-js-captcha-img",n),J=o.default(".bookly-custom-field-error",n),Z=o.default(".bookly-js-info-field-error",n),G=o.default(".bookly-js-modal",n),K=o.default(".bookly-js-login",n),X=o.default(".bookly-js-cst-duplicate",n),tt=o.default(".bookly-js-verification-code",n),et=o.default("#bookly-verification-code",n),ot=o.default(".bookly-js-next-step",n),nt=ra(r=o.default([C,I,M,O,E,T,$,A,P,L,Y,V,Q,z,U,H,J,Z])).call(r,o.default.fn.toArray),rt=ra(a=o.default([h,v,_,w,b,g,k,j,S,x,D,B,R,p,m,y,F,q])).call(a,o.default.fn.toArray),at=function(t){if(D.val(t.data.full_name).removeClass("bookly-error"),B.val(t.data.first_name).removeClass("bookly-error"),R.val(t.data.last_name).removeClass("bookly-error"),t.data.birthday){var e=t.data.birthday.split("-"),o=gn(e[0]),r=gn(e[1]),a=gn(e[2]);h.val(a).removeClass("bookly-error"),v.val(r).removeClass("bookly-error"),_.val(o).removeClass("bookly-error")}var l;(t.data.phone&&(p.removeClass("bookly-error"),i.enabled?p.intlTelInput("setNumber",t.data.phone):p.val(t.data.phone)),t.data.country&&b.val(t.data.country).removeClass("bookly-error"),t.data.state&&k.val(t.data.state).removeClass("bookly-error"),t.data.postcode&&g.val(t.data.postcode).removeClass("bookly-error"),t.data.city&&w.val(t.data.city).removeClass("bookly-error"),t.data.street&&j.val(t.data.street).removeClass("bookly-error"),t.data.street_number&&S.val(t.data.street_number).removeClass("bookly-error"),t.data.additional_address&&x.val(t.data.additional_address).removeClass("bookly-error"),m.val(t.data.email).removeClass("bookly-error"),t.data.info_fields)&&Br(l=t.data.info_fields).call(l,(function(t){var e,o,r=kr(n).call(n,'.bookly-js-info-field-row[data-id="'+t.id+'"]');switch(r.data("type")){case"checkboxes":Br(e=t.value).call(e,(function(t){var e;ua(e=kr(r).call(r,".bookly-js-info-field")).call(e,(function(){return this.value==t})).prop("checked",!0)}));break;case"radio-buttons":ua(o=kr(r).call(r,".bookly-js-info-field")).call(o,(function(){return this.value==t.value})).prop("checked",!0);break;default:kr(r).call(r,".bookly-js-info-field").val(t.value)}}));ua(nt).call(nt,":not(.bookly-custom-field-error)").html("")};o.default(".bookly-custom-field-row").on("change",'select, input[type="checkbox"], input[type="radio"]',(function(){var t=o.default(this).closest(".bookly-custom-field-row"),e=t.data("id"),n=o.default(this);o.default.each(u,(function(r,a){if(gn(a.source)===e)switch(t.data("type")){case"drop-down":case"radio-buttons":n.val()===a.value&&"1"===a.equal||n.val()!==a.value&&"1"!==a.equal?o.default('.bookly-custom-field-row[data-id="'+a.target+'"]').show():o.default('.bookly-custom-field-row[data-id="'+a.target+'"]').hide();break;case"checkboxes":kr(t).call(t,"input").each((function(){o.default(this).prop("checked")&&o.default(this).val()===a.value&&"1"===a.equal||!o.default(this).prop("checked")&&o.default(this).val()===a.value&&"1"!==a.equal?o.default('.bookly-custom-field-row[data-id="'+a.target+'"]').show():(!o.default(this).prop("checked")&&o.default(this).val()===a.value&&"1"===a.equal||o.default(this).prop("checked")&&o.default(this).val()===a.value&&"1"!==a.equal)&&o.default('.bookly-custom-field-row[data-id="'+a.target+'"]').hide()}))}}))})),o.default(".bookly-js-cf-date",n).each((function(){var e,n;o.default(this).pickadate({formatSubmit:"yyyy-mm-dd",format:ar[t.form_id].date_format,min:""!==o.default(this).data("min")&&ra(e=o.default(this).data("min").split("-")).call(e,(function(t,e){return 1===e?t-1:gn(t)})),max:""!==o.default(this).data("max")&&ra(n=o.default(this).data("max").split("-")).call(n,(function(t,e){return 1===e?t-1:gn(t)})),clear:!1,close:!1,today:BooklyL10n.today,monthsFull:BooklyL10n.months,weekdaysFull:BooklyL10n.days,weekdaysShort:BooklyL10n.daysShort,labelMonthNext:BooklyL10n.nextMonth,labelMonthPrev:BooklyL10n.prevMonth,firstDay:ar[t.form_id].firstDay})})),i.enabled&&p.intlTelInput({preferredCountries:[i.country],initialCountry:i.country,geoIpLookup:function(t){o.default.get("https://ipinfo.io",(function(){}),"jsonp").always((function(e){var o=e&&e.country?e.country:"";t(o)}))},utilsScript:i.utils}),kr(n).call(n,".bookly-js-modal."+t.form_id).remove(),G.addClass(t.form_id).appendTo(n).on("click",".bookly-js-close",(function(t){var e,n,r;t.preventDefault(),kr(e=kr(n=kr(r=o.default(t.delegateTarget).removeClass("bookly-in")).call(r,"form").trigger("reset").end()).call(n,"input").removeClass("bookly-error").end()).call(e,".bookly-label-error").html("")})),o.default(".bookly-js-login-show",n).on("click",(function(t){t.preventDefault(),K.addClass("bookly-in")})),o.default("button:submit",K).on("click",(function(e){e.preventDefault();var o=Ladda.create(this);o.start(),cr({type:"POST",data:{action:"bookly_wp_user_login",csrf_token:BooklyL10n.csrf_token,form_id:t.form_id,log:kr(K).call(K,'[name="log"]').val(),pwd:kr(K).call(K,'[name="pwd"]').val(),rememberme:kr(K).call(K,'[name="rememberme"]').prop("checked")?1:0},success:function(e){e.success?(BooklyL10n.csrf_token=e.data.csrf_token,d.fadeOut("slow"),at(e),K.removeClass("bookly-in")):"incorrect_username_password"==e.error&&(kr(K).call(K,"input").addClass("bookly-error"),kr(K).call(K,".bookly-label-error").html(ar[t.form_id].errors[e.error])),o.stop()}})})),o.default("button:submit",X).on("click",(function(t){t.preventDefault(),X.removeClass("bookly-in"),ot.trigger("click",[1])})),o.default("button:submit",tt).on("click",(function(t){t.preventDefault(),tt.removeClass("bookly-in"),ot.trigger("click")})),ar[t.form_id].hasOwnProperty("facebook")&&ar[t.form_id].facebook.enabled&&"undefined"!=typeof FB&&(FB.XFBML.parse(o.default(".bookly-js-fb-login-button",n).parent().get(0)),ar[t.form_id].facebook.onStatusChange=function(e){"connected"===e.status&&(ar[t.form_id].facebook.enabled=!1,ar[t.form_id].facebook.onStatusChange=void 0,d.fadeOut("slow",(function(){o.default(".bookly-js-fb-login-button").hide()})),FB.api("/me",{fields:"id,name,first_name,last_name,email"},(function(e){cr({type:"POST",data:o.default.extend(e,{action:"bookly_pro_facebook_login",csrf_token:BooklyL10n.csrf_token,form_id:t.form_id}),success:function(t){t.success&&at(t)}})})))}),ot.on("click",(function(e,r){var a,u;e.preventDefault();var d,F=[],q={},W=[],J=ir(this);if(s)try{o.default.globalEval(s.next_button)}catch(e){}o.default("div.bookly-js-info-field-row",n).each((function(){var t=o.default(this);switch(t.data("type")){case"text-field":F.push({id:t.data("id"),value:kr(t).call(t,"input.bookly-js-info-field").val()});break;case"textarea":F.push({id:t.data("id"),value:kr(t).call(t,"textarea.bookly-js-info-field").val()});break;case"checkboxes":d=[],kr(t).call(t,"input.bookly-js-info-field:checked").each((function(){d.push(this.value)})),F.push({id:t.data("id"),value:d});break;case"radio-buttons":F.push({id:t.data("id"),value:kr(t).call(t,"input.bookly-js-info-field:checked").val()||null});break;case"drop-down":F.push({id:t.data("id"),value:kr(t).call(t,"select.bookly-js-info-field").val()})}})),o.default(".bookly-custom-fields-container",n).each((function(){var t=o.default(this),e=t.data("key"),n=[];o.default("div.bookly-custom-field-row",t).each((function(){var t=o.default(this);switch(t.data("type")){case"text-field":case"file":n.push({id:t.data("id"),value:kr(t).call(t,"input.bookly-custom-field").val()});break;case"textarea":n.push({id:t.data("id"),value:kr(t).call(t,"textarea.bookly-custom-field").val()});break;case"checkboxes":d=[],kr(t).call(t,"input.bookly-custom-field:checked").each((function(){d.push(this.value)})),n.push({id:t.data("id"),value:d});break;case"radio-buttons":n.push({id:t.data("id"),value:kr(t).call(t,"input.bookly-custom-field:checked").val()||null});break;case"drop-down":n.push({id:t.data("id"),value:kr(t).call(t,"select.bookly-custom-field").val()});break;case"number":n.push({id:t.data("id"),value:kr(t).call(t,"input.bookly-custom-field").val()});break;case"time":n.push({id:t.data("id"),value:kr(t).call(t,"select.bookly-custom-field").val()});break;case"date":n.push({id:t.data("id"),value:kr(t).call(t,"input.bookly-custom-field").pickadate("picker").get("select","yyyy-mm-dd")});break;case"captcha":n.push({id:t.data("id"),value:kr(t).call(t,"input.bookly-custom-field").val()}),W.push(t.data("id"))}})),q[e]={custom_fields:Er(n)}}));try{""==(f=i.enabled?p.intlTelInput("getNumber"):p.val())&&(f=p.val())}catch(t){f=p.val()}cr({type:"POST",data:{action:"bookly_session_save",csrf_token:BooklyL10n.csrf_token,form_id:t.form_id,full_name:D.val(),first_name:B.val(),last_name:R.val(),phone:f,email:ma(a=m.val()).call(a),email_confirm:1===y.length?ma(u=y.val()).call(u):void 0,birthday:{day:h.val(),month:v.val(),year:_.val()},country:b.val(),state:k.val(),postcode:g.val(),city:w.val(),street:j.val(),street_number:S.val(),additional_address:x.val(),address_iso:{country:b.data("short"),state:k.data("short")},info_fields:F,notes:N.val(),cart:q,captcha_ids:Er(W),force_update_customer:!l||r,verification_code:et.val()},success:function(e){if(nt.empty(),rt.removeClass("bookly-error"),e.success){if(c.enabled)cr({type:"POST",data:{action:"bookly_pro_add_to_woocommerce_cart",csrf_token:BooklyL10n.csrf_token,form_id:t.form_id},success:function(e){e.success?window.location.href=c.cart_url:(J.stop(),Aa({form_id:t.form_id},ar[t.form_id].errors[e.error]))}});else ja({form_id:t.form_id})}else{var r=null;if(e.appointments_limit_reached)wa({form_id:t.form_id,error:"appointments_limit_reached"});else if(e.hasOwnProperty("verify"))J.stop(),kr(tt).call(tt,"#bookly-verification-code-text").html(e.verify_text).end().addClass("bookly-in");else if(e.group_skip_payment)cr({type:"POST",data:{action:"bookly_save_appointment",csrf_token:BooklyL10n.csrf_token,form_id:t.form_id},success:function(e){wa({form_id:t.form_id,error:"group_skip_payment"})}});else{J.stop();var a=[{name:"full_name",errorElement:Y,formElement:D},{name:"first_name",errorElement:V,formElement:B},{name:"last_name",errorElement:Q,formElement:R},{name:"phone",errorElement:z,formElement:p},{name:"email",errorElement:U,formElement:m},{name:"email_confirm",errorElement:H,formElement:y},{name:"birthday_day",errorElement:C,formElement:h},{name:"birthday_month",errorElement:I,formElement:v},{name:"birthday_year",errorElement:M,formElement:_},{name:"country",errorElement:O,formElement:b},{name:"state",errorElement:E,formElement:k},{name:"postcode",errorElement:T,formElement:g},{name:"city",errorElement:$,formElement:w},{name:"street",errorElement:A,formElement:j},{name:"street_number",errorElement:P,formElement:S},{name:"additional_address",errorElement:L,formElement:x}];Br(a).call(a,(function(t){e[t.name]&&(t.errorElement.html(e[t.name]),t.formElement.addClass("bookly-error"),null===r&&(r=t.formElement))})),e.info_fields&&o.default.each(e.info_fields,(function(t,e){var a=o.default('div.bookly-js-info-field-row[data-id="'+t+'"]',n);kr(a).call(a,".bookly-js-info-field-error").html(e),kr(a).call(a,".bookly-js-info-field").addClass("bookly-error"),null===r&&(r=kr(a).call(a,".bookly-js-info-field"))})),e.custom_fields&&o.default.each(e.custom_fields,(function(t,e){o.default.each(e,(function(e,a){var i=o.default('.bookly-custom-fields-container[data-key="'+t+'"]',n),l=o.default('[data-id="'+e+'"]',i);kr(l).call(l,".bookly-custom-field-error").html(a),kr(l).call(l,".bookly-custom-field").addClass("bookly-error"),null===r&&(r=kr(l).call(l,".bookly-custom-field"))}))})),e.customer&&kr(X).call(X,".bookly-js-modal-body").html(e.customer).end().addClass("bookly-in")}null!==r&&lr(r,t.form_id)}}})})),o.default(".bookly-js-back-step",n).on("click",(function(e){e.preventDefault(),ir(this),ar[t.form_id].skip_steps.cart?ar[t.form_id].no_time||ar[t.form_id].skip_steps.time?ar[t.form_id].no_extras||ar[t.form_id].skip_steps.extras?hu({form_id:t.form_id}):Pa({form_id:t.form_id}):!Ar(ar[t.form_id].skip_steps)&&ar[t.form_id].recurrence_enabled?Ta({form_id:t.form_id}):ar[t.form_id].skip_steps.extras||"after_step_time"!=ar[t.form_id].step_extras||ar[t.form_id].no_extras?Aa({form_id:t.form_id}):Pa({form_id:t.form_id}):Ea({form_id:t.form_id})})),o.default(".bookly-js-captcha-refresh",n).on("click",(function(){W.css("opacity","0.5"),cr({type:"POST",data:{action:"bookly_custom_fields_captcha_refresh",form_id:t.form_id,csrf_token:BooklyL10n.csrf_token},success:function(t){t.success&&W.attr("src",t.data.captcha_url).on("load",(function(){W.css("opacity","1")}))}})}))}}})}function Ea(t,e){if(ar[t.form_id].skip_steps.cart)Oa(t);else{t&&t.from_step&&(ar[t.form_id].cart_prev_step=t.from_step);var n=o.default.extend({action:"bookly_render_cart",csrf_token:BooklyL10n.csrf_token},t),r=ar[t.form_id].$container;cr({data:n,success:function(n){if(n.success){r.html(n.html),e?(o.default(".bookly-label-error",r).html(e.message),o.default('tr[data-cart-key="'+e.failed_key+'"]',r).addClass("bookly-label-error")):o.default(".bookly-label-error",r).hide(),lr(r,t.form_id);var a=n.custom_js;o.default(".bookly-js-next-step",r).on("click",(function(){if(ir(this),a)try{o.default.globalEval(a.next_button)}catch(t){}Oa({form_id:t.form_id})})),o.default(".bookly-add-item",r).on("click",(function(){ir(this),hu({form_id:t.form_id,new_chain:!0})})),o.default(".bookly-js-back-step",r).on("click",(function(e){switch(e.preventDefault(),ir(this),ar[t.form_id].cart_prev_step){case"service":hu({form_id:t.form_id});break;case"extras":Pa({form_id:t.form_id});break;case"time":Aa({form_id:t.form_id});break;case"repeat":Ta({form_id:t.form_id});break;default:hu({form_id:t.form_id})}})),o.default(".bookly-js-actions button",r).on("click",(function(){ir(this);var e=o.default(this),n=e.closest("tr");switch(e.data("action")){case"drop":cr({data:{action:"bookly_cart_drop_item",csrf_token:BooklyL10n.csrf_token,form_id:t.form_id,cart_key:n.data("cart-key")},success:function(t){if(t.success){var e=n.data("cart-key"),a=o.default('tr[data-cart-key="'+e+'"]',r);n.delay(300).fadeOut(200,(function(){t.data.total_waiting_list?(o.default(".bookly-js-waiting-list-price",r).html(t.data.waiting_list_price),o.default(".bookly-js-waiting-list-deposit",r).html(t.data.waiting_list_deposit)):o.default(".bookly-js-waiting-list-price",r).closest("tr").remove(),o.default(".bookly-js-subtotal-price",r).html(t.data.subtotal_price),o.default(".bookly-js-subtotal-deposit",r).html(t.data.subtotal_deposit),o.default(".bookly-js-pay-now-deposit",r).html(t.data.pay_now_deposit),o.default(".bookly-js-pay-now-tax",r).html(t.data.pay_now_tax),o.default(".bookly-js-total-price",r).html(t.data.total_price),o.default(".bookly-js-total-tax",r).html(t.data.total_tax),a.remove(),0==o.default("tr[data-cart-key]").length&&(o.default(".bookly-js-back-step",r).hide(),o.default(".bookly-js-next-step",r).hide())}))}}});break;case"edit":hu({form_id:t.form_id,edit_cart_item:n.data("cart-key")})}}))}}})}}function Ta(t,e){if(Ar(ar[t.form_id].skip_steps))Ea(t,e);else{var n=o.default.extend({action:"bookly_render_repeat",csrf_token:BooklyL10n.csrf_token},t),r=ar[t.form_id].$container;cr({data:n,success:function(e){var n;if(e.success){r.html(e.html),lr(r,t.form_id);var a=o.default(".bookly-js-repeat-appointment-enabled",r),i=o.default(".bookly-js-next-step",r),l=o.default(".bookly-js-repeat-variants-container",r),c=o.default('[class^="bookly-js-variant"]',l),s=o.default(".bookly-js-repeat-variant",l),u=o.default(".bookly-js-get-schedule",l),f=o.default(".bookly-js-variant-weekly",l),d=o.default(".bookly-js-repeat-variant-monthly",l),p=o.default(".bookly-js-repeat-until",l),m=o.default(".bookly-js-repeat-times",l),y=o.default(".bookly-js-monthly-specific-day",l),h=o.default(".bookly-js-monthly-week-day",l),v=o.default(".bookly-js-repeat-daily-every",l),_=o.default(".bookly-js-week-day",l),b=o.default(".bookly-js-schedule-container",r),k=o.default(".bookly-js-days-error",l),g=o.default(".bookly-js-schedule-slots",b),w=o.default(".bookly-js-intersection-info",b),j=o.default(".bookly-js-schedule-help",b),S=o.default(".bookly-well",b),x=o.default(".bookly-pagination",b),O=o.default(".bookly-schedule-row-template .bookly-schedule-row",b),E=e.pages_warning_info,T=e.short_date_format,$={min:e.date_min||!0,max:e.date_max||!0},A=[],P=e.custom_js,L={prepareButtonNextState:function(){for(var t=i.prop("disabled"),e=0==A.length,o=0;o<A.length;o++)if(t){if(!A[o].deleted){e=!1;break}}else{if(!A[o].deleted){e=!1;break}e=!0}i.prop("disabled",e)},addTimeSlotControl:function(t,e,n,r){var a,i="";e.length&&(i=o.default("<select/>"),o.default.each(e,(function(t,e){var l=o.default("<option/>");l.text(e.title).val(e.value),e.disabled&&l.attr("disabled","disabled"),i.append(l),a||e.disabled||(e.title==n?(i.val(e.value),a=!0):e.title==r&&i.val(e.value))})));kr(t).call(t,".bookly-js-schedule-time").html(i),kr(t).call(t,"div.bookly-label-error").toggle(!e.length)},renderSchedulePage:function(t){var e,n=A.length,r=5*t-5,a=[];g.html("");for(var i=r,l=0;l<5&&i<n;i++,l++)(e=O.clone()).data("datetime",A[i].datetime),e.data("index",A[i].index),o.default("> div:first-child",e).html(A[i].index),o.default(".bookly-schedule-date",e).html(A[i].display_date),void 0!==A[i].all_day_service_time?(o.default(".bookly-js-schedule-time",e).hide(),o.default(".bookly-js-schedule-all-day-time",e).html(A[i].all_day_service_time).show()):(o.default(".bookly-js-schedule-time",e).html(A[i].display_time).show(),o.default(".bookly-js-schedule-all-day-time",e).hide()),A[i].another_time&&o.default(".bookly-schedule-intersect",e).show(),A[i].deleted&&kr(e).call(e,".bookly-schedule-appointment").addClass("bookly-appointment-hidden"),g.append(e);if(n>5){var c=o.default("<li/>").html("«");for(c.on("click",(function(){var t=gn(kr(x).call(x,".active").html());t>1&&L.renderSchedulePage(t-1)})),x.html(c),i=0,l=1;i<n;i+=5,l++)c=o.default("<li/>").html(l),x.append(c),c.on("click",(function(){L.renderSchedulePage(o.default(this).html())}));for(kr(x).call(x,"li:eq("+t+")").addClass("active"),(c=o.default("<li/>").html("»")).on("click",(function(){var t=gn(kr(x).call(x,".active").html());t<n/5&&L.renderSchedulePage(t+1)})),x.append(c).show(),i=0;i<n;i++)A[i].another_time&&(t=gn(i/5)+1,a.push(t),i=5*t-1);a.length>0&&w.html(E.replace("{list}",a.join(", "))),S.toggle(a.length>0),x.toggle(n>5)}else for(x.hide(),S.hide(),i=0;i<n;i++)if(A[i].another_time){j.show();break}},renderFullSchedule:function(e){A=e;var n=null;o.default.each(A,(function(t,e){n||e.another_time||(n=e.display_time)})),L.renderSchedulePage(1),b.show(),i.prop("disabled",0==A.length),g.on("click","button[data-action]",(function(){var e=o.default(this).closest(".bookly-schedule-row"),r=e.data("index")-1;switch(o.default(this).data("action")){case"drop":A[r].deleted=!0,kr(e).call(e,".bookly-schedule-appointment").addClass("bookly-appointment-hidden"),L.prepareButtonNextState();break;case"restore":A[r].deleted=!1,kr(e).call(e,".bookly-schedule-appointment").removeClass("bookly-appointment-hidden"),i.prop("disabled",!1);break;case"edit":var a=o.default('<input type="text"/>'),l=o.default(this),c=ir(this);kr(e).call(e,".bookly-schedule-date").html(a),a.pickadate({min:$.min,max:$.max,formatSubmit:"yyyy-mm-dd",format:T,clear:!1,close:!1,today:BooklyL10n.today,monthsFull:BooklyL10n.months,weekdaysFull:BooklyL10n.days,weekdaysShort:BooklyL10n.daysShort,labelMonthNext:BooklyL10n.nextMonth,labelMonthPrev:BooklyL10n.prevMonth,firstDay:ar[t.form_id].firstDay,onSet:function(){var a=[];o.default.each(A,(function(t,e){r==t||e.deleted||a.push(e.slots)})),cr({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:t.form_id,exclude:a},success:function(t){l.hide(),c.stop(),t.data.length?(L.addTimeSlotControl(e,t.data[0].options,n,A[r].display_time,t.data[0].all_day_service_time),kr(e).call(e,'button[data-action="save"]').show()):(L.addTimeSlotControl(e,[]),kr(e).call(e,'button[data-action="save"]').hide())}})}});var s=JSON.parse(A[r].slots);a.pickadate("picker").set("select",new Date(s[0][2]));break;case"save":o.default(this).hide(),kr(e).call(e,'button[data-action="edit"]').show();var u=kr(e).call(e,".bookly-schedule-date"),f=kr(e).call(e,".bookly-js-schedule-time"),d=kr(f).call(f,"select"),p=kr(d).call(d,"option:selected");A[r].slots=d.val(),A[r].display_date=kr(u).call(u,"input").val(),A[r].display_time=p.text(),u.html(A[r].display_date),f.html(A[r].display_time)}}))},isDateMatchesSelections:function(t){switch(s.val()){case"daily":if((v.val()>6||-1!=o.default.inArray(t.format("ddd").toLowerCase(),L.week_days))&&t.diff(L.date_from,"days")%v.val()==0)return!0;break;case"weekly":case"biweekly":if(("weekly"==s.val()||t.diff(L.date_from.clone().startOf("isoWeek"),"weeks")%2==0)&&-1!=o.default.inArray(t.format("ddd").toLowerCase(),L.checked_week_days))return!0;break;case"monthly":switch(d.val()){case"specific":if(t.format("D")==y.val())return!0;break;case"last":if(t.format("ddd").toLowerCase()==h.val()&&t.clone().endOf("month").diff(t,"days")<7)return!0;break;default:var e=t.diff(t.clone().startOf("month"),"days");if(t.format("ddd").toLowerCase()==h.val()&&e>=7*(d.prop("selectedIndex")-1)&&e<7*d.prop("selectedIndex"))return!0}}return!1},updateRepeatDate:function(){var t,e=0,n=m.val(),r=An(t=$.min).call(t),a=p.pickadate("picker").get("select"),i=moment().year(a.year).month(a.month).date(a.date).add(5,"years");r[1]++,L.date_from=moment(r.join(","),"YYYY,M,D"),L.week_days=[],kr(h).call(h,"option").each((function(){L.week_days.push(o.default(this).val())})),L.checked_week_days=[],_.each((function(){o.default(this).prop("checked")&&L.checked_week_days.push(o.default(this).val())}));var l=L.date_from.clone();do{L.isDateMatchesSelections(l)&&e++,l.add(1,"days")}while(e<n&&l.isBefore(i));p.val(l.subtract(1,"days").format("MMMM D, YYYY")),p.pickadate("picker").set("select",new Date(l.format("YYYY"),l.format("M")-1,l.format("D")))},updateRepeatTimes:function(){var t,e=0,n=An(t=$.min).call(t),r=p.pickadate("picker").get("select"),a=moment().year(r.year).month(r.month).date(r.date);n[1]++,L.date_from=moment(n.join(","),"YYYY,M,D"),L.week_days=[],kr(h).call(h,"option").each((function(){L.week_days.push(o.default(this).val())})),L.checked_week_days=[],_.each((function(){o.default(this).prop("checked")&&L.checked_week_days.push(o.default(this).val())}));var i=L.date_from.clone();do{L.isDateMatchesSelections(i)&&e++,i.add(1,"days")}while(i.isBefore(a));m.val(e)}};p.pickadate({formatSubmit:"yyyy-mm-dd",format:ar[t.form_id].date_format,min:$.min,max:$.max,clear:!1,close:!1,today:BooklyL10n.today,monthsFull:BooklyL10n.months,weekdaysFull:BooklyL10n.days,weekdaysShort:BooklyL10n.daysShort,labelMonthNext:BooklyL10n.nextMonth,labelMonthPrev:BooklyL10n.prevMonth,firstDay:ar[t.form_id].firstDay});var C=a.on("change",(function(){l.toggle(o.default(this).prop("checked")),o.default(this).prop("checked")?L.prepareButtonNextState():i.prop("disabled",!1)}));if(e.repeated){var I=e.repeat_data,M=I.params;a.prop("checked",!0),s.val(Ar(I));var D=I.until.split("-");switch(p.pickadate("set").set("select",new Date(D[0],D[1]-1,D[2])),Ar(I)){case"daily":v.val(Zr(M));break;case"weekly":case"biweekly":o.default(".bookly-js-week-days input.bookly-js-week-day",l).prop("checked",!1).parent().removeClass("active"),Br(n=M.on).call(n,(function(t){o.default(".bookly-js-week-days input.bookly-js-week-day[value="+t+"]",l).prop("checked",!0).parent().addClass("active")}));break;case"monthly":"day"===M.on?(d.val("specific"),o.default(".bookly-js-monthly-specific-day[value="+M.day+"]",l).prop("checked",!0)):(d.val(M.on),h.val(M.weekday))}L.renderFullSchedule(e.schedule)}C.trigger("change"),e.could_be_repeated||a.attr("disabled",!0),s.on("change",(function(){c.hide(),kr(l).call(l,".bookly-js-variant-"+this.value).show(),L.updateRepeatTimes()})).trigger("change"),d.on("change",(function(){h.toggle("specific"!=this.value),y.toggle("specific"==this.value),L.updateRepeatTimes()})).trigger("change"),_.on("change",(function(){var t=o.default(this);t.is(":checked")?t.parent().not("[class*='active']").addClass("active"):t.parent().removeClass("active"),L.updateRepeatTimes()})),y.val(e.date_min[2]),y.on("change",(function(){L.updateRepeatTimes()})),h.on("change",(function(){L.updateRepeatTimes()})),p.on("change",(function(){L.updateRepeatTimes()})),v.on("change",(function(){L.updateRepeatTimes()})),m.on("change",(function(){L.updateRepeatDate()})),u.on("click",(function(){b.hide();var e={action:"bookly_recurring_appointments_get_customer_schedule",csrf_token:BooklyL10n.csrf_token,form_id:t.form_id,repeat:s.val(),until:p.pickadate("picker").get("select","yyyy-mm-dd"),params:{}},n=ir(this);switch(Ar(e)){case"daily":e.params={every:v.val()};break;case"weekly":case"biweekly":if(e.params.on=[],o.default(".bookly-js-week-days input.bookly-js-week-day:checked",f).each((function(){e.params.on.push(this.value)})),0==e.params.on.length)return k.toggle(!0),n.stop(),!1;k.toggle(!1);break;case"monthly":"specific"==d.val()?e.params={on:"day",day:y.val()}:e.params={on:d.val(),weekday:h.val()}}g.off("click"),cr({type:"POST",data:e,success:function(t){t.success&&(L.renderFullSchedule(t.data),n.stop())}})})),o.default(".bookly-js-back-step",r).on("click",(function(e){e.preventDefault(),ir(this),cr({type:"POST",data:{action:"bookly_session_save",csrf_token:BooklyL10n.csrf_token,form_id:t.form_id,unrepeat:1},success:function(e){ar[t.form_id].skip_steps.extras||"after_step_time"!=ar[t.form_id].step_extras||ar[t.form_id].no_extras?Aa({form_id:t.form_id}):Pa({form_id:t.form_id})}})})),o.default(".bookly-js-go-to-cart",r).on("click",(function(e){e.preventDefault(),ir(this),Ea({form_id:t.form_id,from_step:"repeat"})})),o.default(".bookly-js-next-step",r).on("click",(function(e){if(ir(this),P)try{o.default.globalEval(P.next_button)}catch(e){}if(a.is(":checked")){var n=[],r=0;Br(A).call(A,(function(t){if(!t.deleted){var e=JSON.parse(t.slots);n=Xr(n).call(n,e),r++}})),cr({type:"POST",data:{action:"bookly_session_save",csrf_token:BooklyL10n.csrf_token,form_id:t.form_id,slots:Er(n),repeat:r},success:function(e){Ea({form_id:t.form_id,add_to_cart:!0,from_step:"repeat"})}})}else cr({type:"POST",data:{action:"bookly_session_save",csrf_token:BooklyL10n.csrf_token,form_id:t.form_id,unrepeat:1},success:function(e){Ea({form_id:t.form_id,add_to_cart:!0,from_step:"repeat"})}})}))}}})}}var $a=null;function Aa(t,e){if(ar[t.form_id].no_time||ar[t.form_id].skip_steps.time)ar[t.form_id].skip_steps.extras||"after_step_time"!=ar[t.form_id].step_extras||ar[t.form_id].no_extras?ar[t.form_id].skip_steps.cart?Oa({form_id:t.form_id,add_to_cart:!0}):Ea({form_id:t.form_id,add_to_cart:!0,from_step:t&&t.prev_step?t.prev_step:"service"}):Pa({form_id:t.form_id});else{var n={action:"bookly_render_time",csrf_token:BooklyL10n.csrf_token},r=ar[t.form_id].$container;ar[t.form_id].skip_steps.service&&ar[t.form_id].use_client_time_zone&&(n.time_zone=ar[t.form_id].timeZone,n.time_zone_offset=ar[t.form_id].timeZoneOffset),o.default.extend(n,t),$a=cr({data:n,success:function(n){if(0!=n.success){BooklyL10n.csrf_token=n.csrf_token,r.html(n.html);var l,c,s,u=o.default(".bookly-columnizer-wrap",r),f=o.default(".bookly-columnizer",u),d=o.default(".bookly-time-next",r),p=o.default(".bookly-time-prev",r),m=null,y=n.time_slots_wide?205:127,h=n.time_slots_wide?"bookly-column bookly-column-wide":"bookly-column",v=0,_=0,b=n.has_more_slots,k=!1,g=n.show_calendar,w=n.is_rtl,j=n.day_one_column,S=a(n.slots_data,n.selected_date),x=n.custom_js;if(o.default(".bookly-js-back-step",r).on("click",(function(e){e.preventDefault(),ir(this),ar[t.form_id].skip_steps.extras||ar[t.form_id].no_extras?hu({form_id:t.form_id}):"before_step_time"==ar[t.form_id].step_extras?Pa({form_id:t.form_id}):hu({form_id:t.form_id})})).toggle(!ar[t.form_id].skip_steps.service||!ar[t.form_id].skip_steps.extras),o.default(".bookly-js-go-to-cart",r).on("click",(function(e){e.preventDefault(),ir(this),Ea({form_id:t.form_id,from_step:"time"})})),o.default(".bookly-js-time-zone-switcher",r).on("change",(function(e){ar[t.form_id].timeZone=this.value,ar[t.form_id].timeZoneOffset=void 0,A(),i(),Aa({form_id:t.form_id,time_zone:ar[t.form_id].timeZone})})),g){var O=o.default(".bookly-js-selected-date",r);O.pickadate({formatSubmit:"yyyy-mm-dd",format:ar[t.form_id].date_format,min:n.date_min||!0,max:n.date_max||!0,weekdaysFull:BooklyL10n.days,weekdaysShort:BooklyL10n.daysShort,monthsFull:BooklyL10n.months,firstDay:ar[t.form_id].firstDay,clear:!1,close:!1,today:!1,disable:n.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");S[o]?(f.html(S[o]).css("left","0px"),v=0,_=0,m=null,P(),p.hide(),d.toggle(1!=l.length)):(i(),Aa({form_id:t.form_id,selected_date:o}),A())}this.open()},onClose:function(){this.open(!1)},onRender:function(){var e=new Date(Date.UTC(this.get("view").year,this.get("view").month));o.default(".picker__nav--next",r).on("click",(function(){e.setUTCMonth(e.getUTCMonth()+1),i(),Aa({form_id:t.form_id,selected_date:e.toJSON().substr(0,10)}),A()})),o.default(".picker__nav--prev",r).on("click",(function(){e.setUTCMonth(e.getUTCMonth()-1),i(),Aa({form_id:t.form_id,selected_date:e.toJSON().substr(0,10)}),A()}))}});var E=O.pickadate("picker").get("select","yyyy-mm-dd");f.html(S[E])}else{var T="";o.default.each(S,(function(t,e){T+=e})),f.html(T)}if(n.has_slots){e?kr(r).call(r,".bookly-label-error").html(e):kr(r).call(r,".bookly-label-error").hide(),(c=gn(o.default(window).height()/36,10))<4?c=4:c>10&&(c=10),(s=gn(u.width()/y,10))>10?s=10:0==s&&(k=!0,s=4),P(),b||1!=l.length||d.hide();var $=o.default(".bookly-time-step",r).hammer({swipe_velocity:.1});$.on("swipeleft",(function(){d.is(":visible")&&d.trigger("click")})),$.on("swiperight",(function(){p.is(":visible")&&p.trigger("click")})),d.on("click",(function(e){if(p.show(),l.eq(_+1).length)f.animate({left:(w?"+":"-")+(_+1)*m.width()},{duration:800}),m=l.eq(++_),u.animate({height:m.height()},{duration:800}),_+1!=l.length||b||d.hide();else if(b){var n=o.default("> button:last",f);0==n.length&&0==(n=o.default(".bookly-column:hidden:last > button:last",f)).length&&(n=o.default(".bookly-column:last > button:last",f));var i={action:"bookly_render_next_time",csrf_token:BooklyL10n.csrf_token,form_id:t.form_id,last_slot:n.val()},c=ir(this);cr({type:"POST",data:i,success:function(t){if(t.success)if(t.has_slots){b=t.has_more_slots;var e="";o.default.each(a(t.slots_data,t.selected_date),(function(t,o){e+=o}));var n=o.default(e),i=n.eq(0);o.default('button.bookly-day[value="'+i.attr("value")+'"]',r).length&&(n=n.not(":first")),f.append(n),P(),d.trigger("click")}else d.hide();else d.hide();c.stop()}})}})),p.on("click",(function(){d.show(),m=l.eq(--_),f.animate({left:(w?"+":"-")+_*m.width()},{duration:800}),u.animate({height:m.height()},{duration:800}),0===_&&p.hide()}))}lr(r,t.form_id)}else hu({form_id:t.form_id});function A(){o.default(".bookly-time-screen,.bookly-not-time-screen",r).addClass("bookly-spin-overlay");var t={lines:11,length:11,width:4,radius:5};l?new Spinner(t).spin(l.eq(_).get(0)):new Spinner(t).spin(o.default(".bookly-not-time-screen",r).get(0))}function P(){var e,n,a,i=o.default("> button",f),d=0,p=0;if(j)for(;i.length>0;)i.eq(0).hasClass("bookly-day")?(d=1,n=o.default('<div class="'+h+'" />'),(e=o.default(Yr(i).call(i,0,1))).addClass("bookly-js-first-child"),n.append(e)):(d++,e=o.default(Yr(i).call(i,0,1)),!i.length||i.eq(0).hasClass("bookly-day")?(e.addClass("bookly-last-child"),n.append(e),f.append(n)):n.append(e)),d>p&&(p=d);else for(;b?i.length>c:i.length;){n=o.default('<div class="'+h+'" />'),p=c,v%s!=0||i.eq(0).hasClass("bookly-day")||--p;for(var _=0;_<p&&(_+1!=p||!i.eq(0).hasClass("bookly-day"));++_)e=o.default(Yr(i).call(i,0,1)),0==_?e.addClass("bookly-js-first-child"):_+1==p&&e.addClass("bookly-last-child"),n.append(e);f.append(n),++v}for(var g=o.default("> .bookly-column",f);b?g.length>=s:g.length;){a=o.default('<div class="bookly-time-screen"/>');for(_=0;_<s;++_){if(n=o.default(Yr(g).call(g,0,1)),0==_){n.addClass("bookly-js-first-column");var w=kr(n).call(n,".bookly-js-first-child");if(!w.hasClass("bookly-day")){var S=w.data("group"),O=o.default('button.bookly-day[value="'+S+'"]:last',r);n.prepend(O.clone())}}a.append(n)}f.append(a)}l=o.default(".bookly-time-screen",f),null===m&&(m=l.eq(0)),o.default("button.bookly-time-skip",r).off("click").on("click",(function(e){ir(this),ar[t.form_id].no_extras||"after_step_time"!==ar[t.form_id].step_extras?ar[t.form_id].skip_steps.cart?Oa({form_id:t.form_id,add_to_cart:!0}):Ea({form_id:t.form_id,add_to_cart:!0,from_step:"time"}):Pa({form_id:t.form_id})}));var E=null;o.default("button.bookly-hour",r).off("click").on("click",(function(e){null!=E&&(E.abort(),E=null),e.preventDefault();var n=o.default(this),r={action:"bookly_session_save",csrf_token:BooklyL10n.csrf_token,form_id:t.form_id,slots:this.value};if(n.attr({"data-style":"zoom-in","data-spinner-color":"#333","data-spinner-size":"40"}),ir(this),x)try{o.default.globalEval(x.next_button)}catch(e){}E=cr({type:"POST",data:r,success:function(e){ar[t.form_id].skip_steps.extras||"after_step_time"!=ar[t.form_id].step_extras||ar[t.form_id].no_extras?!Ar(ar[t.form_id].skip_steps)&&ar[t.form_id].recurrence_enabled?Ta({form_id:t.form_id}):ar[t.form_id].skip_steps.cart?Oa({form_id:t.form_id,add_to_cart:!0}):Ea({form_id:t.form_id,add_to_cart:!0,from_step:"time"}):Pa({form_id:t.form_id})}})})),o.default(".bookly-time-step",r).width(s*y),u.height(k?39*o.default(".bookly-column.bookly-js-first-column button",m).length:m.height()),k=!1}}})}function a(t,e){var n={};return o.default.each(t,(function(t,r){var a='<button class="bookly-day" value="'+t+'">'+r.title+"</button>";o.default.each(r.slots,(function(o,n){a+='<button value="'+Er(n.data).replace(/"/g,"&quot;")+'" data-group="'+t+'" class="bookly-hour'+("waiting-list"==n.status?" bookly-slot-in-waiting-list":"booked"==n.status?" booked":"")+'"'+("booked"==n.status?" disabled":"")+'><span class="ladda-label bookly-time-main'+(n.data[0][2]==e?" bookly-bold":"")+'"><i class="bookly-hour-icon"><span></span></i>'+n.time_text+'</span><span class="bookly-time-additional'+("waiting-list"==n.status?" bookly-waiting-list":"")+'"> '+n.additional_text+"</span></button>"})),n[t]=a})),n}function i(){null!=$a&&($a.abort(),$a=null)}}function Pa(t){var e={action:"bookly_render_extras",csrf_token:BooklyL10n.csrf_token},n=ar[t.form_id].$container;ar[t.form_id].skip_steps.service&&ar[t.form_id].use_client_time_zone&&(e.time_zone=ar[t.form_id].timeZone,e.time_zone_offset=ar[t.form_id].timeZoneOffset),o.default.extend(e,t),cr({data:e,success:function(e){if(e.success){BooklyL10n.csrf_token=e.csrf_token,n.html(e.html),lr(n,t.form_id);var r,a,i=o.default(".bookly-js-next-step",n),l=o.default(".bookly-js-back-step",n),c=o.default(".bookly-js-go-to-cart",n),s=o.default(".bookly-js-extras-item",n),u=o.default(".bookly-js-extras-summary span",n),f=e.custom_js,d=new ur(e),p=function(t,e){var n=kr(t).call(t,"input"),r=kr(t).call(t,".bookly-js-extras-total-price"),a=e*hn(t.data("price"));r.text(d.price(a)),n.val(e),kr(t).call(t,".bookly-js-extras-thumb").toggleClass("bookly-extras-selected",e>0);var i=0;s.each((function(t,e){var n=o.default(this),r=n.closest(".bookly-js-extras-container").data("multiplier");i+=hn(n.data("price"))*kr(n).call(n,"input").val()*r})),i?u.html(" + "+d.price(i)):u.html("")};s.each((function(t,e){var n,r,a,i=o.default(this),l=kr(i).call(i,"input");kr(i).call(i,".bookly-js-extras-thumb").on("click",(function(){p(i,l.val()>i.data("min_quantity")?i.data("min_quantity"):"0"==i.data("min_quantity")?1:i.data("min_quantity"))})),kr(i).call(i,".bookly-js-count-control").on("click",(function(){var t=gn(l.val());t=o.default(this).hasClass("bookly-js-extras-increment")?Math.min(i.data("max_quantity"),t+1):Math.max(i.data("min_quantity"),t-1),p(i,t)})),n=l.get(0),r=function(t){var e=/^\d*$/.test(t)&&(""===t||gn(t)<=i.data("max_quantity")&&gn(t)>=i.data("min_quantity"));return e&&p(i,""===t?i.data("min_quantity"):gn(t)),e},Br(a=["input","keydown","keyup","mousedown","mouseup","select","contextmenu","drop"]).call(a,(function(t){n.addEventListener(t,(function(){r(this.value)?(this.oldValue=this.value,this.oldSelectionStart=this.selectionStart,this.oldSelectionEnd=this.selectionEnd):this.hasOwnProperty("oldValue")?(this.value=this.oldValue,this.setSelectionRange(this.oldSelectionStart,this.oldSelectionEnd)):this.value=""}))}))})),c.on("click",(function(e){e.preventDefault(),ir(this),Ea({form_id:t.form_id,from_step:"extras"})})),i.on("click",(function(e){if(e.preventDefault(),ir(this),f)try{o.default.globalEval(f.next_button)}catch(e){}var i={};o.default(".bookly-js-extras-container",n).each((function(){var t=o.default(this),e=t.data("chain"),n={};kr(t).call(t,".bookly-js-extras-item").each((function(t,e){r=o.default(this),(a=kr(r).call(r,"input")).val()>0&&(n[r.data("id")]=a.val())})),i[e]=Er(n)})),cr({type:"POST",data:{action:"bookly_session_save",csrf_token:BooklyL10n.csrf_token,form_id:t.form_id,extras:i},success:function(e){"before_step_time"!=ar[t.form_id].step_extras||ar[t.form_id].skip_steps.time?!Ar(ar[t.form_id].skip_steps)&&ar[t.form_id].recurrence_enabled?Ta({form_id:t.form_id}):ar[t.form_id].skip_steps.cart?Oa({form_id:t.form_id,add_to_cart:!0}):Ea({form_id:t.form_id,add_to_cart:!0,from_step:"time"}):Aa({form_id:t.form_id,prev_step:"extras"})}})})),l.on("click",(function(e){e.preventDefault(),ir(this),"after_step_time"!=ar[t.form_id].step_extras||ar[t.form_id].no_time?hu({form_id:t.form_id}):Aa({form_id:t.form_id,prev_step:"extras"})}))}}})}function La(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}Q({target:"Object",stat:!0,sham:!u},{create:Kt});var Ca=R.Object,Ia=function(t,e){return Ca.create(t,e)},Ma=Ia;Q({target:"Object",stat:!0},{setPrototypeOf:Po});var Da=R.Object.setPrototypeOf;function Ba(t,e){return(Ba=Da||function(t,e){return t.__proto__=e,t})(t,e)}function Ra(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Ma(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ba(t,e)}function Na(t,e){return!e||"object"!==Ko(e)&&"function"!=typeof e?La(t):e}var Fa=s((function(){jo(1)}));Q({target:"Object",stat:!0,forced:Fa,sham:!ko},{getPrototypeOf:function(t){return jo(J(t))}});var qa=R.Object.getPrototypeOf;function za(t){return(za=Da?qa:function(t){return t.__proto__||qa(t)})(t)}Q({target:"Array",stat:!0},{isArray:W});var Ua=R.Array.isArray;var Ha=wt("iterator"),Ya=function(t){var e=Object(t);return void 0!==e[Ha]||"@@iterator"in e||To.hasOwnProperty(me(e))},Va=function(t){var e=Rn(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return q(e.call(t))},Qa=Va;var Wa=$n,Ja=function(t,e,o,n){try{return n?e(q(o)[0],o[1]):e(o)}catch(e){throw Nn(t),e}},Za=wt("iterator"),Ga=!1;try{var Ka=0,Xa={next:function(){return{done:!!Ka++}},return:function(){Ga=!0}};Xa[Za]=function(){return this},Array.from(Xa,(function(){throw 2}))}catch(t){}var ti=function(t,e){if(!e&&!Ga)return!1;var o=!1;try{var n={};n[Za]=function(){return{next:function(){return{done:o=!0}}}},t(n)}catch(t){}return o},ei=!ti((function(t){Array.from(t)}));Q({target:"Array",stat:!0,forced:ei},{from:function(t){var e,o,n,r,a,i,l=J(t),c="function"==typeof this?this:Array,s=arguments.length,u=s>1?arguments[1]:void 0,f=void 0!==u,d=Rn(l),p=0;if(f&&(u=F(u,s>2?arguments[2]:void 0,2)),null==d||c==Array&&Dn(d))for(o=new c(e=tt(l.length));e>p;p++)i=f?u(l[p],p):l[p],et(o,p,i);else for(a=(r=d.call(l)).next,o=new c;!(n=a.call(r)).done;p++)i=f?Ja(r,u,[n.value,p],!0):n.value,et(o,p,i);return o.length=p,o}});var oi=R.Array.from,ni=oi;function ri(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,n=new Array(e);o<e;o++)n[o]=t[o];return n}function ai(t,e){var o;if(t){if("string"==typeof t)return ri(t,e);var n=Wa(o=Object.prototype.toString.call(t)).call(o,8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?ni(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ri(t,e):void 0}}function ii(t,e){return function(t){if(Ua(t))return t}(t)||function(t,e){if(void 0!==vo&&Ya(Object(t))){var o=[],n=!0,r=!1,a=void 0;try{for(var i,l=Qa(t);!(n=(i=l.next()).done)&&(o.push(i.value),!e||o.length!==e);n=!0);}catch(t){r=!0,a=t}finally{try{n||null==l.return||l.return()}finally{if(r)throw a}}return o}}(t,e)||ai(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var li=wt("species"),ci=function(t){var e=ft(t),o=U.f;u&&e&&!e[li]&&o(e,li,{configurable:!0,get:function(){return this}})},si=U.f,ui=Cn.fastKey,fi=Le.set,di=Le.getterFor,pi={getConstructor:function(t,e,o,n){var r=t((function(t,a){zn(t,r,e),fi(t,{type:e,index:Kt(null),first:void 0,last:void 0,size:0}),u||(t.size=0),null!=a&&qn(a,t[n],{that:t,AS_ENTRIES:o})})),a=di(e),i=function(t,e,o){var n,r,i=a(t),c=l(t,e);return c?c.value=o:(i.last=c={index:r=ui(e,!0),key:e,value:o,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=c),n&&(n.next=c),u?i.size++:t.size++,"F"!==r&&(i.index[r]=c)),t},l=function(t,e){var o,n=a(t),r=ui(e);if("F"!==r)return n.index[r];for(o=n.first;o;o=o.next)if(o.key==e)return o};return Pn(r.prototype,{clear:function(){for(var t=a(this),e=t.index,o=t.first;o;)o.removed=!0,o.previous&&(o.previous=o.previous.next=void 0),delete e[o.index],o=o.next;t.first=t.last=void 0,u?t.size=0:this.size=0},delete:function(t){var e=this,o=a(e),n=l(e,t);if(n){var r=n.next,i=n.previous;delete o.index[n.index],n.removed=!0,i&&(i.next=r),r&&(r.previous=i),o.first==n&&(o.first=r),o.last==n&&(o.last=i),u?o.size--:e.size--}return!!n},forEach:function(t){for(var e,o=a(this),n=F(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.next:o.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!l(this,t)}}),Pn(r.prototype,o?{get:function(t){var e=l(this,t);return e&&e.value},set:function(t,e){return i(this,0===t?0:t,e)}}:{add:function(t){return i(this,t=0===t?0:t,t)}}),u&&si(r.prototype,"size",{get:function(){return a(this).size}}),r},setStrong:function(t,e,o){var n=e+" Iterator",r=di(e),a=di(n);No(t,e,(function(t,e){fi(this,{type:n,target:t,state:r(t),kind:e,last:void 0})}),(function(){for(var t=a(this),e=t.kind,o=t.last;o&&o.removed;)o=o.previous;return t.target&&(t.last=o=o?o.next:t.state.first)?"keys"==e?{value:o.key,done:!1}:"values"==e?{value:o.value,done:!1}:{value:[o.key,o.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),o?"entries":"values",!o,!0),ci(e)}};Qn("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),pi);var mi=R.Map,yi=[].slice,hi={},vi=function(t,e,o){if(!(e in hi)){for(var n=[],r=0;r<e;r++)n[r]="a["+r+"]";hi[e]=Function("C,a","return new C("+n.join(",")+")")}return hi[e](t,o)},_i=Function.bind||function(t){var e=N(this),o=yi.call(arguments,1),n=function(){var r=o.concat(yi.call(arguments));return this instanceof n?vi(e,r.length,r):e.apply(t,r)};return g(e.prototype)&&(n.prototype=e.prototype),n},bi=ft("Reflect","construct"),ki=s((function(){function t(){}return!(bi((function(){}),[],t)instanceof t)})),gi=!s((function(){bi((function(){}))})),wi=ki||gi;Q({target:"Reflect",stat:!0,forced:wi,sham:wi},{construct:function(t,e){N(t),q(e);var o=arguments.length<3?t:N(arguments[2]);if(gi&&!ki)return bi(t,e,o);if(t==o){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return n.push.apply(n,e),new(_i.apply(t,n))}var r=o.prototype,a=Kt(g(r)?r:Object.prototype),i=Function.apply.call(t,a,e);return g(i)?i:a}});var ji=R.Reflect.construct;Q({target:"Reflect",stat:!0},{get:function t(e,o){var n,r,a=arguments.length<3?e:arguments[2];return q(e)===a?e[o]:(n=A.f(e,o))?S(n,"value")?n.value:void 0===n.get?void 0:n.get.call(a):g(r=jo(e))?t(r,o,a):void 0}}),R.Reflect.get;var Si=A.f,xi=s((function(){Si(1)}));Q({target:"Object",stat:!0,forced:!u||xi,sham:!u},{getOwnPropertyDescriptor:function(t,e){return Si(k(t),e)}}),r((function(t){var e=R.Object,o=t.exports=function(t,o){return e.getOwnPropertyDescriptor(t,o)};e.getOwnPropertyDescriptor.sham&&(o.sham=!0)}));Q({target:"Map",stat:!0},{from:function(t){var e,o,n,r,a=arguments.length,i=a>1?arguments[1]:void 0;return N(this),(e=void 0!==i)&&N(i),null==t?new this:(o=[],e?(n=0,r=F(i,a>2?arguments[2]:void 0,2),qn(t,(function(t){o.push(r(t,n++))}))):qn(t,o.push,{that:o}),new this(o))}});Q({target:"Map",stat:!0},{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}});var Oi=function(){for(var t,e=q(this),o=N(e.delete),n=!0,r=0,a=arguments.length;r<a;r++)t=o.call(e,arguments[r]),n=n&&t;return!!n};Q({target:"Map",proto:!0,real:!0,forced:ot},{deleteAll:function(){return Oi.apply(this,arguments)}});Q({target:"Map",proto:!0,real:!0,forced:ot},{emplace:function(t,e){var o=q(this),n=o.has(t)&&"update"in e?e.update(o.get(t),t,o):e.insert(t,o);return o.set(t,n),n}});var Ei=Va;Q({target:"Map",proto:!0,real:!0,forced:ot},{every:function(t){var e=q(this),o=Ei(e),n=F(t,arguments.length>1?arguments[1]:void 0,3);return!qn(o,(function(t,o,r){if(!n(o,t,e))return r()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var Ti=wt("species"),$i=function(t,e){var o,n=q(t).constructor;return void 0===n||null==(o=q(n)[Ti])?e:N(o)};Q({target:"Map",proto:!0,real:!0,forced:ot},{filter:function(t){var e=q(this),o=Ei(e),n=F(t,arguments.length>1?arguments[1]:void 0,3),r=new($i(e,ft("Map"))),a=N(r.set);return qn(o,(function(t,o){n(o,t,e)&&a.call(r,t,o)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),r}}),Q({target:"Map",proto:!0,real:!0,forced:ot},{find:function(t){var e=q(this),o=Ei(e),n=F(t,arguments.length>1?arguments[1]:void 0,3);return qn(o,(function(t,o,r){if(n(o,t,e))return r(o)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),Q({target:"Map",proto:!0,real:!0,forced:ot},{findKey:function(t){var e=q(this),o=Ei(e),n=F(t,arguments.length>1?arguments[1]:void 0,3);return qn(o,(function(t,o,r){if(n(o,t,e))return r(t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),Q({target:"Map",stat:!0},{groupBy:function(t,e){var o=new this;N(e);var n=N(o.has),r=N(o.get),a=N(o.set);return qn(t,(function(t){var i=e(t);n.call(o,i)?r.call(o,i).push(t):a.call(o,i,[t])})),o}});Q({target:"Map",proto:!0,real:!0,forced:ot},{includes:function(t){return qn(Ei(q(this)),(function(e,o,n){if((r=o)===(a=t)||r!=r&&a!=a)return n();var r,a}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}}),Q({target:"Map",stat:!0},{keyBy:function(t,e){var o=new this;N(e);var n=N(o.set);return qn(t,(function(t){n.call(o,e(t),t)})),o}}),Q({target:"Map",proto:!0,real:!0,forced:ot},{keyOf:function(t){return qn(Ei(q(this)),(function(e,o,n){if(o===t)return n(e)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),Q({target:"Map",proto:!0,real:!0,forced:ot},{mapKeys:function(t){var e=q(this),o=Ei(e),n=F(t,arguments.length>1?arguments[1]:void 0,3),r=new($i(e,ft("Map"))),a=N(r.set);return qn(o,(function(t,o){a.call(r,n(o,t,e),o)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),r}}),Q({target:"Map",proto:!0,real:!0,forced:ot},{mapValues:function(t){var e=q(this),o=Ei(e),n=F(t,arguments.length>1?arguments[1]:void 0,3),r=new($i(e,ft("Map"))),a=N(r.set);return qn(o,(function(t,o){a.call(r,t,n(o,t,e))}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),r}}),Q({target:"Map",proto:!0,real:!0,forced:ot},{merge:function(t){for(var e=q(this),o=N(e.set),n=0;n<arguments.length;)qn(arguments[n++],o,{that:e,AS_ENTRIES:!0});return e}}),Q({target:"Map",proto:!0,real:!0,forced:ot},{reduce:function(t){var e=q(this),o=Ei(e),n=arguments.length<2,r=n?void 0:arguments[1];if(N(t),qn(o,(function(o,a){n?(n=!1,r=a):r=t(r,a,o,e)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),n)throw TypeError("Reduce of empty map with no initial value");return r}}),Q({target:"Map",proto:!0,real:!0,forced:ot},{some:function(t){var e=q(this),o=Ei(e),n=F(t,arguments.length>1?arguments[1]:void 0,3);return qn(o,(function(t,o,r){if(n(o,t,e))return r()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}}),Q({target:"Map",proto:!0,real:!0,forced:ot},{update:function(t,e){var o=q(this),n=arguments.length;N(e);var r=o.has(t);if(!r&&n<3)throw TypeError("Updating absent value");var a=r?o.get(t):N(n>2?arguments[2]:void 0)(t,o);return o.set(t,e(a,t,o)),o}});var Ai=function(t,e){var o,n=q(this),r=arguments.length>2?arguments[2]:void 0;if("function"!=typeof e&&"function"!=typeof r)throw TypeError("At least one callback required");return n.has(t)?(o=n.get(t),"function"==typeof e&&(o=e(o),n.set(t,o))):"function"==typeof r&&(o=r(),n.set(t,o)),o};function Pi(t){return function(t){if(Ua(t))return ri(t)}(t)||function(t){if(void 0!==vo&&Ya(Object(t)))return ni(t)}(t)||ai(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}Q({target:"Map",proto:!0,real:!0,forced:ot},{upsert:Ai}),Q({target:"Map",proto:!0,real:!0,forced:ot},{updateOrInsert:Ai}),Q({target:"Function",proto:!0},{bind:_i}),On("Function").bind;var Li=Ia,Ci=s((function(){Ut(1)}));Q({target:"Object",stat:!0,forced:Ci},{keys:function(t){return Ut(J(t))}});var Ii=R.Object.keys;Qn("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),pi);var Mi=R.Set;Q({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}});var Di=R.Date.now,Bi=function(t,e){var o=this;if(!(o instanceof Bi))return new Bi(t,e);Po&&(o=Po(new Error(void 0),jo(o))),void 0!==e&&H(o,"message",String(e));var n=[];return qn(t,n.push,{that:n}),H(o,"errors",n),o};Bi.prototype=Kt(Error.prototype,{constructor:m(5,Bi),message:m(5,""),name:m(5,"AggregateError")}),Q({global:!0},{AggregateError:Bi});var Ri,Ni,Fi,qi=c.Promise,zi=/(iphone|ipod|ipad).*applewebkit/i.test(dt),Ui=c.location,Hi=c.setImmediate,Yi=c.clearImmediate,Vi=c.process,Qi=c.MessageChannel,Wi=c.Dispatch,Ji=0,Zi={},Gi="onreadystatechange",Ki=function(t){if(Zi.hasOwnProperty(t)){var e=Zi[t];delete Zi[t],e()}},Xi=function(t){return function(){Ki(t)}},tl=function(t){Ki(t.data)},el=function(t){c.postMessage(t+"",Ui.protocol+"//"+Ui.host)};Hi&&Yi||(Hi=function(t){for(var e=[],o=1;arguments.length>o;)e.push(arguments[o++]);return Zi[++Ji]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},Ri(Ji),Ji},Yi=function(t){delete Zi[t]},st?Ri=function(t){Vi.nextTick(Xi(t))}:Wi&&Wi.now?Ri=function(t){Wi.now(Xi(t))}:Qi&&!zi?(Fi=(Ni=new Qi).port2,Ni.port1.onmessage=tl,Ri=F(Fi.postMessage,Fi,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts&&Ui&&"file:"!==Ui.protocol&&!s(el)?(Ri=el,c.addEventListener("message",tl,!1)):Ri=Gi in E("script")?function(t){Yt.appendChild(E("script")).onreadystatechange=function(){Yt.removeChild(this),Ki(t)}}:function(t){setTimeout(Xi(t),0)});var ol,nl,rl,al,il,ll,cl,sl,ul={set:Hi,clear:Yi},fl=/web0s(?!.*chrome)/i.test(dt),dl=A.f,pl=ul.set,ml=c.MutationObserver||c.WebKitMutationObserver,yl=c.document,hl=c.process,vl=c.Promise,_l=dl(c,"queueMicrotask"),bl=_l&&_l.value;bl||(ol=function(){var t,e;for(st&&(t=hl.domain)&&t.exit();nl;){e=nl.fn,nl=nl.next;try{e()}catch(t){throw nl?al():rl=void 0,t}}rl=void 0,t&&t.enter()},zi||st||fl||!ml||!yl?vl&&vl.resolve?(cl=vl.resolve(void 0),sl=cl.then,al=function(){sl.call(cl,ol)}):al=st?function(){hl.nextTick(ol)}:function(){pl.call(c,ol)}:(il=!0,ll=yl.createTextNode(""),new ml(ol).observe(ll,{characterData:!0}),al=function(){ll.data=il=!il}));var kl=bl||function(t){var e={fn:t,next:void 0};rl&&(rl.next=e),nl||(nl=e,al()),rl=e},gl=function(t){var e,o;this.promise=new t((function(t,n){if(void 0!==e||void 0!==o)throw TypeError("Bad Promise constructor");e=t,o=n})),this.resolve=N(e),this.reject=N(o)},wl={f:function(t){return new gl(t)}},jl=function(t,e){if(q(t),g(e)&&e.constructor===t)return e;var o=wl.f(t);return(0,o.resolve)(e),o.promise},Sl=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},xl=ul.set,Ol=wt("species"),El="Promise",Tl=Le.get,$l=Le.set,Al=Le.getterFor(El),Pl=qi,Ll=c.TypeError,Cl=c.document,Il=c.process;ft("fetch");var Ml,Dl,Bl,Rl=wl.f,Nl=Rl,Fl=!!(Cl&&Cl.createEvent&&c.dispatchEvent),ql="function"==typeof PromiseRejectionEvent,zl="unhandledrejection",Ul=B(El,(function(){if(!(je(Pl)!==String(Pl))){if(66===ht)return!0;if(!st&&!ql)return!0}if(!Pl.prototype.finally)return!0;if(ht>=51&&/native code/.test(Pl))return!1;var t=Pl.resolve(1),e=function(t){t((function(){}),(function(){}))};return(t.constructor={})[Ol]=e,!(t.then((function(){}))instanceof e)})),Hl=Ul||!ti((function(t){Pl.all(t).catch((function(){}))})),Yl=function(t){var e;return!(!g(t)||"function"!=typeof(e=t.then))&&e},Vl=function(t,e){if(!t.notified){t.notified=!0;var o=t.reactions;kl((function(){for(var n=t.value,r=1==t.state,a=0;o.length>a;){var i,l,c,s=o[a++],u=r?s.ok:s.fail,f=s.resolve,d=s.reject,p=s.domain;try{u?(r||(2===t.rejection&&Zl(t),t.rejection=1),!0===u?i=n:(p&&p.enter(),i=u(n),p&&(p.exit(),c=!0)),i===s.promise?d(Ll("Promise-chain cycle")):(l=Yl(i))?l.call(i,f,d):f(i)):d(n)}catch(t){p&&!c&&p.exit(),d(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&Wl(t)}))}},Ql=function(t,e,o){var n,r;Fl?((n=Cl.createEvent("Event")).promise=e,n.reason=o,n.initEvent(t,!1,!0),c.dispatchEvent(n)):n={promise:e,reason:o},!ql&&(r=c["on"+t])?r(n):t===zl&&function(t,e){var o=c.console;o&&o.error&&(1===arguments.length?o.error(t):o.error(t,e))}("Unhandled promise rejection",o)},Wl=function(t){xl.call(c,(function(){var e,o=t.facade,n=t.value;if(Jl(t)&&(e=Sl((function(){st?Il.emit("unhandledRejection",n,o):Ql(zl,o,n)})),t.rejection=st||Jl(t)?2:1,e.error))throw e.value}))},Jl=function(t){return 1!==t.rejection&&!t.parent},Zl=function(t){xl.call(c,(function(){var e=t.facade;st?Il.emit("rejectionHandled",e):Ql("rejectionhandled",e,t.value)}))},Gl=function(t,e,o){return function(n){t(e,n,o)}},Kl=function(t,e,o){t.done||(t.done=!0,o&&(t=o),t.value=e,t.state=2,Vl(t,!0))},Xl=function(t,e,o){if(!t.done){t.done=!0,o&&(t=o);try{if(t.facade===e)throw Ll("Promise can't be resolved itself");var n=Yl(e);n?kl((function(){var o={done:!1};try{n.call(e,Gl(Xl,o,t),Gl(Kl,o,t))}catch(e){Kl(o,e,t)}})):(t.value=e,t.state=1,Vl(t,!1))}catch(e){Kl({done:!1},e,t)}}};Ul&&(Pl=function(t){zn(this,Pl,El),N(t),Ml.call(this);var e=Tl(this);try{t(Gl(Xl,e),Gl(Kl,e))}catch(t){Kl(e,t)}},(Ml=function(t){$l(this,{type:El,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=Pn(Pl.prototype,{then:function(t,e){var o=Al(this),n=Rl($i(this,Pl));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=st?Il.domain:void 0,o.parent=!0,o.reactions.push(n),0!=o.state&&Vl(o,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),Dl=function(){var t=new Ml,e=Tl(t);this.promise=t,this.resolve=Gl(Xl,e),this.reject=Gl(Kl,e)},wl.f=Rl=function(t){return t===Pl||t===Bl?new Dl(t):Nl(t)}),Q({global:!0,wrap:!0,forced:Ul},{Promise:Pl}),_e(Pl,El,!1,!0),ci(El),Bl=ft(El),Q({target:El,stat:!0,forced:Ul},{reject:function(t){var e=Rl(this);return e.reject.call(void 0,t),e.promise}}),Q({target:El,stat:!0,forced:ot},{resolve:function(t){return jl(this===Bl?Pl:this,t)}}),Q({target:El,stat:!0,forced:Hl},{all:function(t){var e=this,o=Rl(e),n=o.resolve,r=o.reject,a=Sl((function(){var o=N(e.resolve),a=[],i=0,l=1;qn(t,(function(t){var c=i++,s=!1;a.push(void 0),l++,o.call(e,t).then((function(t){s||(s=!0,a[c]=t,--l||n(a))}),r)})),--l||n(a)}));return a.error&&r(a.value),o.promise},race:function(t){var e=this,o=Rl(e),n=o.reject,r=Sl((function(){var r=N(e.resolve);qn(t,(function(t){r.call(e,t).then(o.resolve,n)}))}));return r.error&&n(r.value),o.promise}}),Q({target:"Promise",stat:!0},{allSettled:function(t){var e=this,o=wl.f(e),n=o.resolve,r=o.reject,a=Sl((function(){var o=N(e.resolve),r=[],a=0,i=1;qn(t,(function(t){var l=a++,c=!1;r.push(void 0),i++,o.call(e,t).then((function(t){c||(c=!0,r[l]={status:"fulfilled",value:t},--i||n(r))}),(function(t){c||(c=!0,r[l]={status:"rejected",reason:t},--i||n(r))}))})),--i||n(r)}));return a.error&&r(a.value),o.promise}});var tc="No one promise resolved";Q({target:"Promise",stat:!0},{any:function(t){var e=this,o=wl.f(e),n=o.resolve,r=o.reject,a=Sl((function(){var o=N(e.resolve),a=[],i=0,l=1,c=!1;qn(t,(function(t){var s=i++,u=!1;a.push(void 0),l++,o.call(e,t).then((function(t){u||c||(c=!0,n(t))}),(function(t){u||c||(u=!0,a[s]=t,--l||r(new(ft("AggregateError"))(a,tc)))}))})),--l||r(new(ft("AggregateError"))(a,tc))}));return a.error&&r(a.value),o.promise}});var ec=!!qi&&s((function(){qi.prototype.finally.call({then:function(){}},(function(){}))}));Q({target:"Promise",proto:!0,real:!0,forced:ec},{finally:function(t){var e=$i(this,ft("Promise")),o="function"==typeof t;return this.then(o?function(o){return jl(e,t()).then((function(){return o}))}:t,o?function(o){return jl(e,t()).then((function(){throw o}))}:t)}});var oc=R.Promise,nc=ft("Reflect","ownKeys")||function(t){var e=te.f(q(t)),o=ae.f;return o?e.concat(o(t)):e};Q({target:"Object",stat:!0,sham:!u},{getOwnPropertyDescriptors:function(t){for(var e,o,n=k(t),r=A.f,a=nc(n),i={},l=0;a.length>l;)void 0!==(o=r(n,e=a[l++]))&&et(i,e,o);return i}}),R.Object.getOwnPropertyDescriptors;var rc=oi,ac=Object.assign,ic=Object.defineProperty,lc=!ac||s((function(){if(u&&1!==ac({b:1},ac(ic({},"a",{enumerable:!0,get:function(){ic(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},o=Symbol(),n="abcdefghijklmnopqrst";return t[o]=7,n.split("").forEach((function(t){e[t]=t})),7!=ac({},t)[o]||Ut(ac({},e)).join("")!=n}))?function(t,e){for(var o=J(t),n=arguments.length,r=1,a=ae.f,i=p.f;n>r;)for(var l,c=_(arguments[r++]),s=a?Ut(c).concat(a(c)):Ut(c),f=s.length,d=0;f>d;)l=s[d++],u&&!i.call(c,l)||(o[l]=c[l]);return o}:ac;Q({target:"Object",stat:!0,forced:Object.assign!==lc},{assign:lc}),R.Object.assign;Q({target:"Array",proto:!0},{fill:function(t){for(var e=J(this),o=tt(e.length),n=arguments.length,r=Dt(n>1?arguments[1]:void 0,o),a=n>2?arguments[2]:void 0,i=void 0===a?o:Dt(a,o);i>r;)e[r++]=t;return e}});var cc=On("Array").fill,sc=Array.prototype,uc=function(t){var e=t.fill;return t===sc||t instanceof Array&&e===sc.fill?cc:e};function fc(){}var dc=function(t){return t};function pc(t,e){for(var o in e)t[o]=e[o];return t}function mc(t){return t()}function yc(){return Li(null)}function hc(t){Br(t).call(t,mc)}function vc(t){return"function"==typeof t}function _c(t,e){return t!=t?e==e:t!==e||t&&"object"===Ko(t)||"function"==typeof t}var bc="undefined"!=typeof window,kc=bc?function(){return window.performance.now()}:function(){return Di()},gc=bc?function(t){return requestAnimationFrame(t)}:fc,wc=new Mi;function jc(t){Br(wc).call(wc,(function(e){e.c(t)||(wc.delete(e),e.f())})),0!==wc.size&&gc(jc)}function Sc(t,e){t.appendChild(e)}function xc(t,e,o){t.insertBefore(e,o||null)}function Oc(t){t.parentNode.removeChild(t)}function Ec(t){return document.createElement(t)}function Tc(t){return document.createTextNode(t)}function $c(){return Tc(" ")}function Ac(){return Tc("")}function Pc(t,e,o,n){return t.addEventListener(e,o,n),function(){return t.removeEventListener(e,o,n)}}function Lc(t,e,o){null==o?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o)}function Cc(t){return rc(t.childNodes)}function Ic(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function Mc(t,e){for(var o=0;o<t.options.length;o+=1){var n=t.options[o];if(n.__value===e)return void(n.selected=!0)}}function Dc(t,e){var o=document.createEvent("CustomEvent");return o.initCustomEvent(t,!1,!1,e),o}var Bc,Rc=new Mi,Nc=0;function Fc(t){for(var e=5381,o=t.length;o--;)e=(e<<5)-e^t.charCodeAt(o);return e>>>0}function qc(t,e,o,n,r,a,i){for(var l,c,s,u,f=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,d=16.666/n,p="{\n",m=0;m<=1;m+=d){var y=e+(o-e)*a(m);p+=100*m+"%{".concat(i(y,1-y),"}\n")}var h=p+"100% {".concat(i(o,1-o),"}\n}"),v=Xr(l="__svelte_".concat(Fc(h),"_")).call(l,f),_=t.ownerDocument;Rc.add(_);var b,k=_.__svelte_stylesheet||(_.__svelte_stylesheet=_.head.appendChild(Ec("style")).sheet),g=_.__svelte_rules||(_.__svelte_rules={});g[v]||(g[v]=!0,k.insertRule(Xr(b="@keyframes ".concat(v," ")).call(b,h),k.cssRules.length));var w=t.style.animation||"";return t.style.animation=Xr(c=Xr(s=Xr(u="".concat(w?"".concat(w,", "):"")).call(u,v," ")).call(s,n,"ms linear ")).call(c,r,"ms 1 both"),Nc+=1,v}function zc(t,e){var o=(t.style.animation||"").split(", "),n=ua(o).call(o,e?function(t){return ga(t).call(t,e)<0}:function(t){return-1===ga(t).call(t,"__svelte")}),r=o.length-n.length;r&&(t.style.animation=n.join(", "),(Nc-=r)||gc((function(){Nc||(Br(Rc).call(Rc,(function(t){for(var e=t.__svelte_stylesheet,o=e.cssRules.length;o--;)e.deleteRule(o);t.__svelte_rules={}})),Rc.clear())})))}function Uc(t){Bc=t}function Hc(){var t=function(){if(!Bc)throw new Error("Function called outside component initialization");return Bc}();return function(e,o){var n=t.$$.callbacks[e];if(n){var r,a=Dc(e,o);Br(r=An(n).call(n)).call(r,(function(e){e.call(t,a)}))}}}var Yc=[],Vc=[],Qc=[],Wc=[],Jc=oc.resolve(),Zc=!1;function Gc(){Zc||(Zc=!0,Jc.then(ns))}function Kc(t){Qc.push(t)}function Xc(t){Wc.push(t)}var ts,es=!1,os=new Mi;function ns(){if(!es){es=!0;do{for(var t=0;t<Yc.length;t+=1){var e=Yc[t];Uc(e),rs(e.$$)}for(Uc(null),Yc.length=0;Vc.length;)Vc.pop()();for(var o=0;o<Qc.length;o+=1){var n=Qc[o];os.has(n)||(os.add(n),n())}Qc.length=0}while(Yc.length);for(;Wc.length;)Wc.pop()();Zc=!1,es=!1,os.clear()}}function rs(t){if(null!==t.fragment){var e;t.update(),hc(t.before_update);var o=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,o),Br(e=t.after_update).call(e,Kc)}}function as(t,e,o){var n;t.dispatchEvent(Dc(Xr(n="".concat(e?"intro":"outro")).call(n,o)))}var is,ls=new Mi;function cs(){is={r:0,c:[],p:is}}function ss(){is.r||hc(is.c),is=is.p}function us(t,e){t&&t.i&&(ls.delete(t),t.i(e))}function fs(t,e,o,n){if(t&&t.o){if(ls.has(t))return;ls.add(t),is.c.push((function(){ls.delete(t),n&&(o&&t.d(1),n())})),t.o(e)}}var ds={duration:0};function ps(t,e,o,n){var r=e(t,o),a=n?0:1,i=null,l=null,c=null;function s(){c&&zc(t,c)}function u(t,e){var o=t.b-a;return e*=Math.abs(o),{a:a,b:t.b,d:o,duration:e,start:t.start,end:t.start+e,group:t.group}}function f(e){var o=r||ds,n=o.delay,f=void 0===n?0:n,d=o.duration,p=void 0===d?300:d,m=o.easing,y=void 0===m?dc:m,h=o.tick,v=void 0===h?fc:h,_=o.css,b={start:kc()+f,b:e};e||(b.group=is,is.r+=1),i||l?l=b:(_&&(s(),c=qc(t,a,e,p,f,y,_)),e&&v(0,1),i=u(b,p),Kc((function(){return as(t,e,"start")})),function(t){var e;0===wc.size&&gc(jc),new oc((function(o){wc.add(e={c:t,f:o})}))}((function(e){if(l&&e>l.start&&(i=u(l,p),l=null,as(t,i.b,"start"),_&&(s(),c=qc(t,a,i.b,i.duration,0,y,r.css))),i)if(e>=i.end)v(a=i.b,1-a),as(t,i.b,"end"),l||(i.b?s():--i.group.r||hc(i.group.c)),i=null;else if(e>=i.start){var o=e-i.start;a=i.a+i.d*y(o/i.duration),v(a,1-a)}return!(!i&&!l)})))}return{run:function(t){vc(r)?(ts||(ts=oc.resolve()).then((function(){ts=null})),ts).then((function(){r=r(),f(t)})):f(t)},end:function(){s(),i=l=null}}}function ms(t,e){fs(t,1,1,(function(){e.delete(t.key)}))}function ys(t,e,o){var n=t.$$.props[e];void 0!==n&&(t.$$.bound[n]=o,o(t.$$.ctx[n]))}function hs(t){t&&t.c()}function vs(t,e,o,n){var r=t.$$,a=r.fragment,i=r.on_mount,l=r.on_destroy,c=r.after_update;a&&a.m(e,o),n||Kc((function(){var e,o=ua(e=ra(i).call(i,mc)).call(e,vc);l?l.push.apply(l,Pi(o)):hc(o),t.$$.on_mount=[]})),Br(c).call(c,Kc)}function _s(t,e){var o=t.$$;null!==o.fragment&&(hc(o.on_destroy),o.fragment&&o.fragment.d(e),o.on_destroy=o.fragment=null,o.ctx=[])}function bs(t,e){var o;-1===t.$$.dirty[0]&&(Yc.push(t),Gc(),uc(o=t.$$.dirty).call(o,0));t.$$.dirty[e/31|0]|=1<<e%31}function ks(t,e,o,n,r,a){var i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[-1],l=Bc;Uc(t);var c=t.$$={fragment:null,ctx:null,props:a,update:fc,not_equal:r,bound:yc(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new mi(l?l.$$.context:e.context||[]),callbacks:yc(),dirty:i,skip_bound:!1},s=!1;if(c.ctx=o?o(t,e.props||{},(function(e,o){var n=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:o;return c.ctx&&r(c.ctx[e],c.ctx[e]=n)&&(!c.skip_bound&&c.bound[e]&&c.bound[e](n),s&&bs(t,e)),o})):[],c.update(),s=!0,hc(c.before_update),c.fragment=!!n&&n(c.ctx),e.target){if(e.hydrate){var u=Cc(e.target);c.fragment&&c.fragment.l(u),Br(u).call(u,Oc)}else c.fragment&&c.fragment.c();e.intro&&us(t.$$.fragment),vs(t,e.target,e.anchor,e.customElement),ns()}Uc(l)}new Mi(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]);var gs=function(){function t(){Xo(this,t)}return on(t,[{key:"$destroy",value:function(){_s(this,1),this.$destroy=fc}},{key:"$on",value:function(t,e){var o=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return o.push(e),function(){var t=ga(o).call(o,e);-1!==t&&Yr(o).call(o,t,1)}}},{key:"$set",value:function(t){this.$$set&&0!==Ii(t).length&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}]),t}(),ws=p.f,js=function(t){return function(e){for(var o,n=k(e),r=Ut(n),a=r.length,i=0,l=[];a>i;)o=r[i++],u&&!ws.call(n,o)||l.push(t?[o,n[o]]:n[o]);return l}},Ss={entries:js(!0),values:js(!1)}.values;Q({target:"Object",stat:!0},{values:function(t){return Ss(t)}});var xs=R.Object.values,Os=[],Es=Os.sort,Ts=s((function(){Os.sort(void 0)})),$s=s((function(){Os.sort(null)})),As=Pr("sort");Q({target:"Array",proto:!0,forced:Ts||!$s||!As},{sort:function(t){return void 0===t?Es.call(J(this)):Es.call(J(this),N(t))}});var Ps=On("Array").sort,Ls=Array.prototype,Cs=function(t){var e=t.sort;return t===Ls||t instanceof Array&&e===Ls.sort?Ps:e};function Is(t){var e=function(){if("undefined"==typeof Reflect||!ji)return!1;if(ji.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ji(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var o,n=za(t);if(e){var r=za(this).constructor;o=ji(n,arguments,r)}else o=n.apply(this,arguments);return Na(this,o)}}function Ms(t,e,o){var n=An(t).call(t);return n[10]=e[o],n}function Ds(t){var e,o,n,r=t[3].name+"";return{c:function(){e=Ec("option"),o=Tc(r),e.__value=n=t[3].id,e.value=e.__value},m:function(t,n){xc(t,e,n),Sc(e,o)},p:function(t,a){8&a&&r!==(r=t[3].name+"")&&Ic(o,r),8&a&&n!==(n=t[3].id)&&(e.__value=n,e.value=e.__value)},d:function(t){t&&Oc(e)}}}function Bs(t){var e,o,n,r=t[10].name+"";return{c:function(){e=Ec("option"),o=Tc(r),e.__value=n=t[10].id,e.value=e.__value},m:function(t,n){xc(t,e,n),Sc(e,o)},p:function(t,a){16&a&&r!==(r=t[10].name+"")&&Ic(o,r),16&a&&n!==(n=t[10].id)&&(e.__value=n,e.value=e.__value)},d:function(t){t&&Oc(e)}}}function Rs(t){var e,o=!t[10].hidden&&Bs(t);return{c:function(){o&&o.c(),e=Ac()},m:function(t,n){o&&o.m(t,n),xc(t,e,n)},p:function(t,n){t[10].hidden?o&&(o.d(1),o=null):o?o.p(t,n):((o=Bs(t)).c(),o.m(e.parentNode,e))},d:function(t){o&&o.d(t),t&&Oc(e)}}}function Ns(t){var e,o;return{c:function(){e=Ec("div"),o=Tc(t[5]),Lc(e,"class","bookly-label-error")},m:function(t,n){xc(t,e,n),Sc(e,o)},p:function(t,e){32&e&&Ic(o,t[5])},d:function(t){t&&Oc(e)}}}function Fs(t){for(var e,o,n,r,a,i,l,c,s,u,f=t[3]&&Ds(t),d=t[4],p=[],m=0;m<d.length;m+=1)p[m]=Rs(Ms(t,d,m));var y=t[5]&&Ns(t);return{c:function(){e=Ec("label"),o=Tc(t[2]),n=$c(),r=Ec("div"),a=Ec("select"),f&&f.c(),i=Ac();for(var s=0;s<p.length;s+=1)p[s].c();l=$c(),y&&y.c(),c=Ac(),void 0===t[1]&&Kc((function(){return t[8].call(a)}))},m:function(d,m){xc(d,e,m),Sc(e,o),t[7](e),xc(d,n,m),xc(d,r,m),Sc(r,a),f&&f.m(a,null),Sc(a,i);for(var h=0;h<p.length;h+=1)p[h].m(a,null);Mc(a,t[1]),xc(d,l,m),y&&y.m(d,m),xc(d,c,m),s||(u=[Pc(a,"change",t[8]),Pc(a,"change",t[6])],s=!0)},p:function(t,e){var n=ii(e,1)[0];if(4&n&&Ic(o,t[2]),t[3]?f?f.p(t,n):((f=Ds(t)).c(),f.m(a,i)):f&&(f.d(1),f=null),16&n){var r;for(d=t[4],r=0;r<d.length;r+=1){var l=Ms(t,d,r);p[r]?p[r].p(l,n):(p[r]=Rs(l),p[r].c(),p[r].m(a,null))}for(;r<p.length;r+=1)p[r].d(1);p.length=d.length}26&n&&Mc(a,t[1]),t[5]?y?y.p(t,n):((y=Ns(t)).c(),y.m(c.parentNode,c)):y&&(y.d(1),y=null)},i:fc,o:fc,d:function(o){o&&Oc(e),t[7](null),o&&Oc(n),o&&Oc(r),f&&f.d(),function(t,e){for(var o=0;o<t.length;o+=1)t[o]&&t[o].d(e)}(p,o),o&&Oc(l),y&&y.d(o),o&&Oc(c),s=!1,hc(u)}}}function qs(t,e){return t.pos<e.pos?-1:t.pos>e.pos?1:0}function zs(t,e,o){var n=e.el,r=void 0===n?null:n,a=e.label,i=void 0===a?"":a,l=e.placeholder,c=void 0===l?null:l,s=e.items,u=void 0===s?[]:s,f=e.selected,d=void 0===f?"":f,p=e.error,m=void 0===p?null:p,y=Hc();return t.$$set=function(t){"el"in t&&o(0,r=t.el),"label"in t&&o(2,i=t.label),"placeholder"in t&&o(3,c=t.placeholder),"items"in t&&o(4,u=t.items),"selected"in t&&o(1,d=t.selected),"error"in t&&o(5,m=t.error)},t.$$.update=function(){16&t.$$.dirty&&Cs(u).call(u,qs)},[r,d,i,c,u,m,function(){y("change",d)},function(t){Vc[t?"unshift":"push"]((function(){o(0,r=t)}))},function(){var t,e;e=(t=this).querySelector(":checked")||t.options[0],d=e&&e.__value,o(1,d),o(4,u),o(3,c)}]}var Us=function(t){Ra(o,t);var e=Is(o);function o(t){var n;return Xo(this,o),ks(La(n=e.call(this)),t,zs,Fs,_c,{el:0,label:2,placeholder:3,items:4,selected:1,error:5}),n}return o}(gs);function Hs(t){var e=t-1;return e*e*e+1}function Ys(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=e.delay,n=void 0===o?0:o,r=e.duration,a=void 0===r?400:r,i=e.easing,l=void 0===i?Hs:i,c=getComputedStyle(t),s=+c.opacity,u=hn(c.height),f=hn(c.paddingTop),d=hn(c.paddingBottom),p=hn(c.marginTop),m=hn(c.marginBottom),y=hn(c.borderTopWidth),h=hn(c.borderBottomWidth);return{delay:n,duration:a,easing:l,css:function(t){return"overflow: hidden;"+"opacity: ".concat(Math.min(20*t,1)*s,";")+"height: ".concat(t*u,"px;")+"padding-top: ".concat(t*f,"px;")+"padding-bottom: ".concat(t*d,"px;")+"margin-top: ".concat(t*p,"px;")+"margin-bottom: ".concat(t*m,"px;")+"border-top-width: ".concat(t*y,"px;")+"border-bottom-width: ".concat(t*h,"px;")}}}function Vs(t){var e=function(){if("undefined"==typeof Reflect||!ji)return!1;if(ji.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ji(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var o,n=za(t);if(e){var r=za(this).constructor;o=ji(n,arguments,r)}else o=n.apply(this,arguments);return Na(this,o)}}function Qs(t){var e,o,n,r;function a(e){t[64](e)}var i={label:t[14].location_label,placeholder:t[28],items:xs(t[0]),selected:t[15],error:t[32]};return void 0!==t[33]&&(i.el=t[33]),o=new Us({props:i}),Vc.push((function(){return ys(o,"el",a)})),o.$on("change",t[38]),{c:function(){e=Ec("div"),hs(o.$$.fragment),Lc(e,"class","bookly-form-group"),Lc(e,"data-type","location")},m:function(t,n){xc(t,e,n),vs(o,e,null),r=!0},p:function(t,e){var r={};16384&e[0]&&(r.label=t[14].location_label),268435456&e[0]&&(r.placeholder=t[28]),1&e[0]&&(r.items=xs(t[0])),32768&e[0]&&(r.selected=t[15]),2&e[1]&&(r.error=t[32]),!n&&4&e[1]&&(n=!0,r.el=t[33],Xc((function(){return n=!1}))),o.$set(r)},i:function(t){r||(us(o.$$.fragment,t),r=!0)},o:function(t){fs(o.$$.fragment,t),r=!1},d:function(t){t&&Oc(e),_s(o)}}}function Ws(t){var e,o,n;return(o=new Us({props:{label:t[14].category_label,placeholder:t[29],items:xs(t[24]),selected:t[16]}})).$on("change",t[39]),{c:function(){e=Ec("div"),hs(o.$$.fragment),Lc(e,"class","bookly-form-group"),Lc(e,"data-type","category")},m:function(t,r){xc(t,e,r),vs(o,e,null),n=!0},p:function(t,e){var n={};16384&e[0]&&(n.label=t[14].category_label),536870912&e[0]&&(n.placeholder=t[29]),16777216&e[0]&&(n.items=xs(t[24])),65536&e[0]&&(n.selected=t[16]),o.$set(n)},i:function(t){n||(us(o.$$.fragment,t),n=!0)},o:function(t){fs(o.$$.fragment,t),n=!1},d:function(t){t&&Oc(e),_s(o)}}}function Js(t){var e,o,n,r,a,i,l=t[3]&&t[17]&&t[1][t[17]].hasOwnProperty("info")&&""!==t[1][t[17]].info;function c(e){t[65](e)}var s={label:t[14].service_label,placeholder:t[30],items:xs(t[25]),selected:t[17],error:t[34]};void 0!==t[35]&&(s.el=t[35]),o=new Us({props:s}),Vc.push((function(){return ys(o,"el",c)})),o.$on("change",t[40]);var u=l&&Zs(t);return{c:function(){e=Ec("div"),hs(o.$$.fragment),r=$c(),u&&u.c(),a=Ac(),Lc(e,"class","bookly-form-group"),Lc(e,"data-type","service")},m:function(t,n){xc(t,e,n),vs(o,e,null),xc(t,r,n),u&&u.m(t,n),xc(t,a,n),i=!0},p:function(t,e){var r={};16384&e[0]&&(r.label=t[14].service_label),1073741824&e[0]&&(r.placeholder=t[30]),33554432&e[0]&&(r.items=xs(t[25])),131072&e[0]&&(r.selected=t[17]),8&e[1]&&(r.error=t[34]),!n&&16&e[1]&&(n=!0,r.el=t[35],Xc((function(){return n=!1}))),o.$set(r),131082&e[0]&&(l=t[3]&&t[17]&&t[1][t[17]].hasOwnProperty("info")&&""!==t[1][t[17]].info),l?u?(u.p(t,e),131082&e[0]&&us(u,1)):((u=Zs(t)).c(),us(u,1),u.m(a.parentNode,a)):u&&(cs(),fs(u,1,1,(function(){u=null})),ss())},i:function(t){i||(us(o.$$.fragment,t),us(u),i=!0)},o:function(t){fs(o.$$.fragment,t),fs(u),i=!1},d:function(t){t&&Oc(e),_s(o),t&&Oc(r),u&&u.d(t),t&&Oc(a)}}}function Zs(t){var e,o,n,r=t[1][t[17]].info+"";return{c:function(){Lc(e=Ec("div"),"class","bookly-box bookly-visible-sm bookly-service-info")},m:function(t,o){xc(t,e,o),e.innerHTML=r,n=!0},p:function(t,o){(!n||131074&o[0])&&r!==(r=t[1][t[17]].info+"")&&(e.innerHTML=r)},i:function(t){n||(Kc((function(){o||(o=ps(e,Ys,{},!0)),o.run(1)})),n=!0)},o:function(t){o||(o=ps(e,Ys,{},!1)),o.run(0),n=!1},d:function(t){t&&Oc(e),t&&o&&o.end()}}}function Gs(t){var e,o,n,r,a,i,l=t[4]&&t[18]&&t[2][t[18]].hasOwnProperty("info")&&""!==t[2][t[18]].info;function c(e){t[66](e)}var s={label:t[14].staff_label,placeholder:t[31],items:xs(t[21]),selected:t[18],error:t[36]};void 0!==t[37]&&(s.el=t[37]),o=new Us({props:s}),Vc.push((function(){return ys(o,"el",c)})),o.$on("change",t[41]);var u=l&&Ks(t);return{c:function(){e=Ec("div"),hs(o.$$.fragment),r=$c(),u&&u.c(),a=Ac(),Lc(e,"class","bookly-form-group"),Lc(e,"data-type","staff")},m:function(t,n){xc(t,e,n),vs(o,e,null),xc(t,r,n),u&&u.m(t,n),xc(t,a,n),i=!0},p:function(t,e){var r={};16384&e[0]&&(r.label=t[14].staff_label),1&e[1]&&(r.placeholder=t[31]),2097152&e[0]&&(r.items=xs(t[21])),262144&e[0]&&(r.selected=t[18]),32&e[1]&&(r.error=t[36]),!n&&64&e[1]&&(n=!0,r.el=t[37],Xc((function(){return n=!1}))),o.$set(r),262164&e[0]&&(l=t[4]&&t[18]&&t[2][t[18]].hasOwnProperty("info")&&""!==t[2][t[18]].info),l?u?(u.p(t,e),262164&e[0]&&us(u,1)):((u=Ks(t)).c(),us(u,1),u.m(a.parentNode,a)):u&&(cs(),fs(u,1,1,(function(){u=null})),ss())},i:function(t){i||(us(o.$$.fragment,t),us(u),i=!0)},o:function(t){fs(o.$$.fragment,t),fs(u),i=!1},d:function(t){t&&Oc(e),_s(o),t&&Oc(r),u&&u.d(t),t&&Oc(a)}}}function Ks(t){var e,o,n,r=t[2][t[18]].info+"";return{c:function(){Lc(e=Ec("div"),"class","bookly-box bookly-visible-sm bookly-staff-info")},m:function(t,o){xc(t,e,o),e.innerHTML=r,n=!0},p:function(t,o){(!n||262148&o[0])&&r!==(r=t[2][t[18]].info+"")&&(e.innerHTML=r)},i:function(t){n||(Kc((function(){o||(o=ps(e,Ys,{},!0)),o.run(1)})),n=!0)},o:function(t){o||(o=ps(e,Ys,{},!1)),o.run(0),n=!1},d:function(t){t&&Oc(e),t&&o&&o.end()}}}function Xs(t){var e,o,n;return(o=new Us({props:{label:t[14].duration_label,items:xs(t[22]),selected:t[19]}})).$on("change",t[42]),{c:function(){e=Ec("div"),hs(o.$$.fragment),Lc(e,"class","bookly-form-group"),Lc(e,"data-type","duration")},m:function(t,r){xc(t,e,r),vs(o,e,null),n=!0},p:function(t,e){var n={};16384&e[0]&&(n.label=t[14].duration_label),4194304&e[0]&&(n.items=xs(t[22])),524288&e[0]&&(n.selected=t[19]),o.$set(n)},i:function(t){n||(us(o.$$.fragment,t),n=!0)},o:function(t){fs(o.$$.fragment,t),n=!1},d:function(t){t&&Oc(e),_s(o)}}}function tu(t){var e,o,n;return(o=new Us({props:{label:t[14].nop_label,items:xs(t[26]),selected:t[20]}})).$on("change",t[43]),{c:function(){e=Ec("div"),hs(o.$$.fragment),Lc(e,"class","bookly-form-group"),Lc(e,"data-type","nop")},m:function(t,r){xc(t,e,r),vs(o,e,null),n=!0},p:function(t,e){var n