FileMaster
Search
Toggle Dark Mode
Home
/
.
/
wp-content
/
plugins
/
ameliabooking
/
public
/
js
/
chunks
Edit File: amelia-booking-services-0d421e0e1e2bdd88e543.js
wpJsonpAmeliaBookingPlugin([3],{1078:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(680),o=n.n(i),a=n(1079),s=n.n(a),r=n(1082),l=n.n(r),c=n(693),u=n.n(c),d=n(749),p=n.n(d),m=n(91),f=n(654),h=n(678),g=n(336),v=n(660),b=n(657),y=n(658),_=n(828),k=n.n(_),x=n(705),C=n(672),w=n(737),S=n.n(w),P=n(1084),T=n.n(P),E=n(1091),$=n.n(E),O=n(1093),A=n.n(O),D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default={mixins:[m.a,f.a,g.a,v.a,b.a,C.a,y.a,h.a,x.a],data:function(){return{toaster:!1,showConfirmDelete:!1,loadDeleteResourcesBtn:!1,countDeletedResources:{success:0,error:0},countTotal:0,countFiltered:0,paginationParams:{page:1,show:this.$root.settings.general.servicesPerPage},typeTab:"services",package:null,packages:[],dialogPackage:!1,dialogPackageBooking:!1,resources:[],resource:null,allResourcesChecked:!1,activeCategory:{},categories:[],category:null,count:0,dialogService:!1,dialogCategory:!1,dialogResource:!1,searchResource:"",deleteConfirmation:!1,draggableOptions:{handle:".am-drag-handle",animation:150},fetched:!1,fetchedFiltered:!1,fetchedResources:!1,timer:null,form:new o.a,futureAppointments:{},loadingAddCategory:!1,loadingDeleteCategory:!1,options:{employees:[],settings:{payments:{wc:[]},general:{usedLanguages:[]}}},service:null,services:[],sortingServices:this.$root.settings.general.sortingServices,sortingPackages:this.$root.settings.general.sortingPackages,sortingSelection:[{sortName:this.$root.labels.services_sorting_name_asc,sortValue:"nameAsc"},{sortName:this.$root.labels.services_sorting_name_desc,sortValue:"nameDesc"},{sortName:this.$root.labels.services_sorting_price_asc,sortValue:"priceAsc"},{sortName:this.$root.labels.services_sorting_price_desc,sortValue:"priceDesc"},{sortName:this.$root.labels.services_sorting_custom,sortValue:"custom"}],svgLoaded:!1,dialogTranslate:!1,dialogTranslateExtra:!1,dialogTranslateCategory:!1,dialogTranslateType:"name",dialogTranslateTab:"service",dialogTranslateData:{},dialogTranslateName:"",extrasTranslateIndex:0,languagesData:[],newExtraTranslations:null,showPurchasedPackages:!1,purchasedPackage:null,showAllServices:!1,showAllEmployees:!1,showAllLocations:!1}},created:function(){o.a.defaults.axios=this.$http,this.getOptions(),this.getServices()},mounted:function(){},updated:function(){this.svgLoaded&&this.inlineSVG(),this.svgLoaded=!0},methods:{hasLocations:function(){return"locations"in this.options&&this.options.locations.length},showNewEntityDialog:function(){switch(this.typeTab){case"services":this.showDialogNewService();break;case"packages":this.showPurchasedPackages?this.showDialogNewPackageBooking():this.showDialogNewPackage();break;case"resources":this.showDialogNewResource()}},handleCheckAllResources:function(){var e=this;this.resources.forEach(function(t){t.checked=e.allResourcesChecked}),this.toaster=this.allResourcesChecked},handleCheckResource:function(){this.toaster=this.countCheckedResources()>0},countCheckedResources:function(){return this.resources.filter(function(e){return e.checked}).length},deleteCheckedResources:function(){var e=this;this.loadDeleteResourcesBtn=!0;var t=[];this.resources.forEach(function(e){e.checked&&t.push(e.id)}),this.resources.forEach(function(n){n.checked&&e.$http.post(e.$root.getAjaxUrl+"/resources/delete/"+n.id).then(function(){e.deleteResourcesCallback(t,!0)}).catch(function(){e.deleteResourcesCallback(t,!1)})})},deleteResourcesCallback:function(e,t){e.pop(),t?this.countDeletedResources.success++:this.countDeletedResources.error++,0===e.length&&(this.countDeletedResources.success&&this.notify(this.$root.labels.success,this.countDeletedResources.success+" "+(this.countDeletedResources.success>1?this.$root.labels.resources_deleted:this.$root.labels.resource_deleted),"success"),this.countDeletedResources.error&&this.notify(this.$root.labels.error,this.countDeletedResources.error+" "+(this.countDeletedResources.error>1?this.$root.labels.resources_not_deleted:this.$root.labels.resource_not_deleted),"error"),this.countDeletedResources.success=0,this.countDeletedResources.error=0,this.getResources(),this.resources.forEach(function(e){e.checked=!1}),this.allResourcesChecked=!1,this.toaster=!1,this.loadDeleteResourcesBtn=!1,this.showConfirmDelete=!1)},changeServiceSorting:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.fetchedFiltered=!1,this.updateServicesPositions(e,!0,!0)},changePackagesSorting:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];switch(this.sortingPackages){case"nameAsc":this.packages=this.packages.sort(function(e,t){return e.name.toLowerCase()>t.name.toLowerCase()?1:-1});break;case"nameDesc":this.packages=this.packages.sort(function(e,t){return e.name.toLowerCase()<t.name.toLowerCase()?1:-1});break;case"priceAsc":this.packages=this.packages.sort(function(e,t){return e.price-e.price*(e.discount/100)>t.price-t.price*(t.discount/100)?1:-1});break;case"priceDesc":this.packages=this.packages.sort(function(e,t){return e.price-e.price*(e.discount/100)<t.price-t.price*(t.discount/100)?1:-1})}this.updatePackagesPositions(e)},updateServicesPositions:function(e,t,n){var i=this,o=[];this.services.forEach(function(e){var t=e.settings?JSON.parse(JSON.stringify(e.settings)):null;t&&t.payments&&t.payments.wc.productId===i.$root.settings.payments.wc.productId&&delete t.payments.wc,o.push(Object.assign(JSON.parse(JSON.stringify(e)),{settings:t?JSON.stringify(t):null}))}),this.$http.post(this.$root.getAjaxUrl+"/services/positions",{services:o,sorting:this.sortingServices}).then(function(){e&&i.notify(i.$root.labels.success,i.$root.labels.services_positions_saved,"success"),t&&i.updateStashEntities({}),n&&i.getServices()}).catch(function(){i.notify(i.$root.labels.error,i.$root.labels.services_positions_saved_fail,"error")})},updatePackagesPositions:function(e){var t=this;this.packages.forEach(function(e,t){e.position=t+1}),this.$http.post(this.$root.getAjaxUrl+"/packages/positions",{packages:this.packages,sorting:this.sortingPackages}).then(function(){e&&t.notify(t.$root.labels.success,t.$root.labels.packages_positions_saved,"success"),t.updateStashEntities({})}).catch(function(){t.notify(t.$root.labels.error,t.$root.labels.packages_positions_saved_fail,"error")})},getServices:function(){var e=this;this.fetchedFiltered=!1,this.$http.get(this.$root.getAjaxUrl+"/services",{params:{page:this.paginationParams.page,categoryId:this.activeCategory?this.activeCategory.id:null}}).then(function(t){e.services=t.data.data.services,e.countTotal=t.data.data.countTotal,e.countFiltered=t.data.data.countFiltered,e.services.forEach(function(t){t.visible=!0,e.setEntitySettings(t,"service"),t.customPricing=e.getArrayCustomPricing(t)}),e.dialogService=!1,e.fetchedFiltered=!0}).catch(function(t){console.log(t.message),e.dialogService=!1,e.fetchedFiltered=!0})},getOptions:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.$http.get(this.$root.getAjaxUrl+"/entities",{params:this.getAppropriateUrlParams({types:["employees","categories","packages","locations","settings","resources"]})}).then(function(i){e.options.settings.general.usedLanguages=i.data.data.settings.general.usedLanguages,e.options.employees=i.data.data.employees,e.options.locations=i.data.data.locations,e.resources=i.data.data.resources,e.options.entitiesRelations=i.data.data.entitiesRelations,e.packages=i.data.data.packages,e.packages.sort(function(e,t){return e.position>t.position?1:-1}),e.languagesData=i.data.data.settings.languages,e.categories=i.data.data.categories,e.categories.sort(function(e,t){return e.position>t.position?1:-1}),e.setupResources(),e.packages.forEach(function(t){e.setEntitySettings(t,"package")}),e.fetched=!0,e.fetchedResources=!0,t&&(e.options.settings.general.usedLanguages=t),!0===n&&e.changePackagesSorting(!1)}).catch(function(t){console.log(t.message),e.fetched=!0,e.fetchedResources=!0})},updateCategoriesPositions:function(e){var t=this;this.$http.post(this.$root.getAjaxUrl+"/categories/positions",{categories:this.categories}).then(function(){e&&t.notify(t.$root.labels.success,t.$root.labels.categories_positions_saved,"success"),t.updateStashEntities({})}).catch(function(){t.notify(t.$root.labels.error,t.$root.labels.categories_positions_saved_fail,"error")})},dropCategory:function(e){if(e.newIndex!==e.oldIndex){var t=this;this.categories.forEach(function(e){e.position=t.categories.indexOf(e)+1}),this.updateCategoriesPositions(!0)}},dropService:function(e){e.newIndex!==e.oldIndex&&(this.sortingServices="custom",this.updateServicesPositions(!0,!0,!1))},dropPackage:function(e){e.newIndex!==e.oldIndex&&(this.sortingPackages="custom",this.updatePackagesPositions(!0))},getService:function(e){var t=this;this.$http.get(this.$root.getAjaxUrl+"/services/"+e).then(function(e){var n=e.data.data.service;null===n.timeBefore&&(n.timeBefore=""),null===n.timeAfter&&(n.timeAfter=""),t.setEntitySettings(n,"service"),t.futureAppointments={},t.futureAppointments[n.id]=e.data.data.futureAppointmentsProvidersIds,n.customPricing=t.getArrayCustomPricing(n),n.extras.sort(function(e,t){return e.position>t.position?1:-1}),n.gallery.sort(function(e,t){return e.position>t.position?1:-1}),t.service=n}).catch(function(e){console.log(e.message)})},filterServices:function(e){this.activeCategory=e,this.paginationParams.page=1,this.getServices()},showDialogNewService:function(){this.service=this.getInitServiceObject(),this.dialogService=!0},showDialogNewCategory:function(){this.category={status:"visible",name:"",id:0,position:this.categories.length+1,color:"#1A84EE"},this.dialogCategory=!0},showDialogNewPackage:function(){this.package=this.getInitPackageObject(),this.package.position=this.packages.length+1,this.dialogPackage=!0},showDialogNewPackageBooking:function(){this.dialogPackageBooking=!0},showDialogNewResource:function(){this.resource=this.getInitResourceObject(),this.dialogResource=!0},showDialogEditResource:function(e){this.resource=e,this.dialogResource=!0},showDialogEditService:function(e){var t=this;this.service=null,setTimeout(function(){t.getService(e)},500),this.dialogService=!0},showDialogEditCategory:function(e){this.category=e,this.dialogCategory=!0},purchasedPackages:function(e){this.purchasedPackage=e,this.showPurchasedPackages=!0},showDialogEditPackage:function(e){this.package=this.packages[e],this.dialogPackage=!0},duplicateServiceCallback:function(e){var t=this;this.service=e,this.service.id=0,this.service.duplicated=!0,setTimeout(function(){t.dialogService=!0},300)},duplicateCategoryCallback:function(e){var t=this;this.category=JSON.parse(JSON.stringify(e)),delete this.category.id,this.category.position=this.categories.length+1,this.svgLoaded=!1,this.category.serviceList.forEach(function(e){delete e.id,e.extras.forEach(function(e){delete e.id}),"object"===D(e.settings)&&null!==e.settings?e.settings=JSON.stringify(e.settings):e.settings=null}),setTimeout(function(){t.dialogCategory=!0},300)},duplicateResourceCallback:function(e){var t=this;this.resource=e,this.resource.id=0,this.resource.duplicated=!0,setTimeout(function(){t.dialogResource=!0},300)},duplicatePackageCallback:function(e){var t=this;this.package=e,this.package.id=0,this.package.duplicated=!0,setTimeout(function(){t.dialogPackage=!0},300)},bgColor:function(e){return{"background-color":e}},saveServiceCallback:function(){this.$http.post(this.$root.getAjaxUrl+"/settings",{usedLanguages:this.options.settings.general.usedLanguages}).catch(function(e){console.log(e)}),"custom"!==this.sortingServices||this.service&&!this.service.position?this.updateServicesPositions(!1,!1,!0):this.getServices(),this.getOptions()},saveCategoryCallback:function(){this.$http.post(this.$root.getAjaxUrl+"/settings",{usedLanguages:this.options.settings.general.usedLanguages}).catch(function(e){console.log(e)}),"custom"!==this.sortingServices||this.service&&!this.service.position?this.updateServicesPositions(!1,!1,!0):this.getServices(),this.getOptions()},saveResourceCallback:function(){this.getResources()},getResources:function(){var e=this;this.fetchedResources=!1,this.$http.get(this.$root.getAjaxUrl+"/resources",{params:{search:this.searchResource}}).then(function(t){e.resources=t.data.data.resources,e.setupResources(),e.fetchedResources=!0}).catch(function(t){console.log(t.message),e.fetchedResources=!0})},setupResources:function(){var e=this,t=this.categories.map(function(e){return e.serviceList}).flat();this.resources.forEach(function(n){var i=n.entities?Object.values(n.entities):[];n.locations=i.filter(function(e){return"location"===e.entityType}),n.employees=i.filter(function(e){return"employee"===e.entityType}),n.employees.forEach(function(t){t.employee=e.options.employees.find(function(e){return e.id===t.entityId})}),n.locations.forEach(function(t){t.location=e.options.locations.find(function(e){return e.id===t.entityId})}),n.services=i.filter(function(e){return"service"===e.entityType}),n.services.forEach(function(e){e.service=t.find(function(t){return t.id===e.entityId})}),n.locations=n.locations.map(function(e){return e.location}),n.services=n.services.map(function(e){return e.service}),n.employees=n.employees.map(function(e){return e.employee})})},savePackageCallback:function(){this.$http.post(this.$root.getAjaxUrl+"/settings",{usedLanguages:this.options.settings.general.usedLanguages}).catch(function(e){console.log(e)}),this.dialogPackage=!1,this.getOptions(this.options.settings.general.usedLanguages,!0)},getInitPackageObject:function(){return{id:0,bookable:[],color:"#1788FB",description:"",name:"",pictureFullPath:"",pictureThumbPath:"",price:0,calculatedPrice:!0,discount:0,status:"visible",gallery:[],position:0,settings:this.getInitEntitySettings("package"),endDate:null,durationCount:null,durationType:null,deposit:0,depositPayment:"disabled",translations:null,sharedCapacity:0,quantity:1,limitPerCustomer:{enabled:!1,numberOfApp:1,timeFrame:"day",period:1}}},getInitServiceObject:function(){return{id:0,categoryId:"",color:"#1788FB",description:"",duration:"",providers:[],extras:[],maxCapacity:1,minCapacity:1,name:"",pictureFullPath:"",pictureThumbPath:"",price:0,customPricing:{enabled:null,durations:[],persons:[],periods:{default:[],custom:[]}},status:"visible",timeAfter:"",timeBefore:"",bringingAnyone:!0,show:!0,applyGlobally:!1,gallery:[],aggregatedPrice:!0,settings:this.getInitEntitySettings("service"),recurringCycle:"disabled",recurringSub:"future",recurringPayment:0,position:0,deposit:0,depositPayment:"disabled",depositPerPerson:1,fullPayment:!1,translations:null,minSelectedExtras:null,mandatoryExtra:!1,maxExtraPeople:null,limitPerCustomer:{enabled:!1,numberOfApp:1,timeFrame:"day",period:1,from:"bookingDate"}}},getInitResourceObject:function(){return{id:0,name:"",quantity:1,services:[],locations:[],employees:[],status:"visible",shared:null,countAdditionalPeople:!1}},showDialogTranslate:function(e,t,n){switch(this.dialogTranslateTab=t,this.dialogTranslateType=e,t){case"service":this.dialogTranslateData=this.service.translations,this.dialogTranslateName=this.service.name,this.dialogTranslate=!0;break;case"extra":this.extrasTranslateIndex=n,this.dialogTranslateData=this.service.extras[n]?this.service.extras[n].translations:this.newExtraTranslations,this.dialogTranslateName=this.service.extras[n]?this.service.extras[n].name:null,this.dialogTranslate=!0;break;case"category":this.dialogTranslateData=this.category.translations,this.dialogTranslateName=this.category.name,this.dialogTranslate=!0;break;case"package":this.dialogTranslateData=this.package.translations,this.dialogTranslateName=this.package.name,this.dialogTranslate=!0}},saveDialogTranslate:function(e,t,n){switch(this.options.settings.general.usedLanguages=this.options.settings.general.usedLanguages.concat(t),this.dialogTranslate=!1,n){case"service":this.service.translations=e;break;case"extra":if(this.service.extras[this.extrasTranslateIndex])this.service.extras[this.extrasTranslateIndex].translations=e;else if(this.newExtraTranslations){var i=JSON.parse(this.newExtraTranslations);JSON.parse(e).name&&(i.name=JSON.parse(e).name),JSON.parse(e).description&&(i.description=JSON.parse(e).description),this.newExtraTranslations=JSON.stringify(i)}else this.newExtraTranslations=e;break;case"category":this.activeCategory.translations=e;break;case"package":this.package.translations=e}},closeDialogTranslate:function(){this.dialogTranslate=!1},closePurchasedPackage:function(){this.showPurchasedPackages=!1},extraSaved:function(e,t){this.newExtraTranslations=null,this.service.extras[t]=e},filterResources:function(){this.fetchedResources=!1,this.getResources()}},watch:{searchResource:function(){void 0!==this.searchResource&&(this.fetchedResources=!0,clearTimeout(this.timer),this.timer=setTimeout(this.filterResources,300))}},components:{DialogResource:$.a,PageHeader:u.a,Draggable:p.a,PaginationBlock:S.a,DialogPackage:l.a,DialogService:s.a,DialogTranslate:k.a,Packages:T.a,DialogCategory:A.a}}},1079:function(e,t,n){var i=n(90)(n(1080),n(1081),!1,null,null,null);e.exports=i.exports},1080:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(91),o=n(654),a=n(336),s=n(660),r=n(657),l=n(655),c=n(678),u=n(672),d=n(661),p=n(806),m=n.n(p),f=n(680),h=n.n(f),g=n(749),v=n.n(g),b=n(699),y=(n.n(b),n(658)),_=n(697),k=n.n(_),x=n(874),C=n.n(x),w=n(828),S=n.n(w),P=n(733),T=n.n(P),E=n(897),$=n.n(E),O=n(899),A=n.n(O),D=n(902),I=n.n(D);t.default={mixins:[i.a,o.a,a.a,s.a,r.a,u.a,d.a,y.a,l.a,c.a],props:{categories:null,passedService:null,employees:null,settings:null,futureAppointments:null,newExtraTranslations:null},data:function(){var e=this,t=function(t,n,i){n<0?i(new Error(e.$root.labels.enter_non_negative_price_warning)):i()};return{durationPricingEnabled:!1,personPricingEnabled:!1,periodPricingEnabled:!1,durations:[],depositEnabled:!1,mandatoryExtraEnabled:!1,depositPayment:"fixed",depositOptions:[{value:"fixed",label:this.$root.labels.amount_fixed},{value:"percentage",label:this.$root.labels.amount_percentage}],executeUpdate:!0,dialogLoading:!0,appointmentsEmployees:[],colorPopover:!1,draggableOptions:{animation:150,group:"people",handle:".am-drag-handle"},editedExtra:null,editedExtraOld:null,extraEditDialog:!1,extraToDelete:null,extraToDeleteLoading:!1,form:new h.a,rulesExtra:{name:[{required:!0,message:this.$root.labels.enter_extra_name_warning,trigger:"submit"}],price:[{validator:t,trigger:"submit"},{required:!0,message:this.$root.labels.enter_extra_price_warning,trigger:"submit",type:"number"}]},rulesService:{name:[{required:!0,message:this.$root.labels.enter_name_warning,trigger:"submit"}],categoryId:[{required:!0,message:this.$root.labels.select_service_category_warning,trigger:"submit",type:"number"}],duration:[{required:!0,message:this.$root.labels.select_service_duration_warning,trigger:"submit",type:"number"}],price:[{validator:t,trigger:"submit"},{required:!0,message:this.$root.labels.enter_service_price_warning,trigger:"submit",type:"number"}],deposit:[{validator:function(t,n,i){n<=0?(e.serviceTabs="pricing",i(new Error(e.$root.labels.enter_positive_price_warning))):i()},trigger:"submit"}],providers:[{required:!0,message:this.$root.labels.select_service_employee_warning,trigger:"submit"}]},recurringCycles:[{label:this.$root.labels.disabled,value:"disabled"},{label:this.$root.labels.all,value:"all"},{label:this.$root.labels.recurring_type_daily,value:"daily"},{label:this.$root.labels.recurring_type_weekly,value:"weekly"},{label:this.$root.labels.recurring_type_monthly,value:"monthly"}],recurringSubs:[{label:this.$root.labels.disabled,value:"disabled"},{label:this.$root.labels.service_recurring_sub_future,value:"future"},{label:this.$root.labels.service_recurring_sub_past,value:"past"},{label:this.$root.labels.service_recurring_sub_both,value:"both"}],recurringPayments:[{label:this.$root.labels.service_recurring_payment_none,value:0},{label:this.$root.labels.service_recurring_payment_all,value:999}],limitPerCustomerTimeFrames:[{label:this.$root.labels.hour,value:"hour"},{label:this.$root.labels.day,value:"day"},{label:this.$root.labels.week,value:"week"},{label:this.$root.labels.month,value:"month"},{label:this.$root.labels.year,value:"year"}],limitPerCustomerFrom:[{label:this.$root.labels.limit_app_date_booked,value:"dateBooked"},{label:this.$root.labels.limit_app_booking_date,value:"bookingDate"}],service:null,serviceColors:["1788FB","4BBEC6","FBC22D","FA3C52","D696B8","689BCA","26CC2B","FD7E35","E38587","774DFB"],serviceTabs:"service_details",style:"",maxExtraPeopleEnabled:!1}},created:function(){h.a.defaults.axios=this.$http,this.instantiateDialog()},updated:function(){if(this.instantiateDialog(),this.service&&(!this.service.limitPerCustomer||!this.service.limitPerCustomer.period)){var e=document.getElementById("am-limit-service-period");e&&(e.getElementsByClassName("el-input__inner")[0].value="")}if(this.service&&(!this.service.limitPerCustomer||!this.service.limitPerCustomer.numberOfApp)){var t=document.getElementById("am-limit-service-number");t&&(t.getElementsByClassName("el-input__inner")[0].value="")}},methods:{changeMaxExtraPeople:function(){this.maxExtraPeopleEnabled&&null===this.service.maxExtraPeople&&(this.service.maxExtraPeople=this.service.minCapacity-1)},minSelectedExtrasChanged:function(){this.service.minSelectedExtras>this.service.extras.length&&(this.service.minSelectedExtras=this.service.extras.length)},toggleDurationPricing:function(){this.service.customPricing.enabled=this.durationPricingEnabled?"duration":null,this.personPricingEnabled=!1,this.periodPricingEnabled=!1},togglePersonPricing:function(){this.service.customPricing.enabled=this.personPricingEnabled?"person":null,this.durationPricingEnabled=!1,this.periodPricingEnabled=!1},togglePeriodPricing:function(){this.service.customPricing.enabled=this.periodPricingEnabled?"period":null,this.durationPricingEnabled=!1,this.personPricingEnabled=!1},changeCapacity:function(){var e=this;if(this.service.customPricing.persons.length){this.service.customPricing.persons[this.service.customPricing.persons.length-1].range=null;var t=null;this.service.customPricing.persons.forEach(function(n,i){null===t&&i>0?e.service.customPricing.persons[i-1].range>=e.service.maxCapacity&&(t=i):null===t&&(e.service.customPricing.persons[i].range?e.service.customPricing.persons[i].range:e.service.maxCapacity)>=e.service.maxCapacity&&(t=0)}),null!==t&&0!==t&&(this.service.customPricing.persons=this.service.customPricing.persons.filter(function(e,n){return n<t}),this.service.customPricing.persons[this.service.customPricing.persons.length-1].range=null),(this.service.customPricing.persons.length<=1||0===t)&&(this.service.customPricing.persons=[],this.service.customPricing.enabled="person"===this.service.customPricing.enabled?null:this.service.customPricing.enabled,this.personPricingEnabled=!1)}this.clearValidation()},depositAvailable:function(){var e=parseFloat(this.service.price)>0;return this.isDurationPricingEnabled(this.service.customPricing)&&(e=e||this.service.customPricing.durations.filter(function(e){return e.price}).length),this.isPersonPricingEnabled(this.service.customPricing)&&(e=e||this.service.customPricing.persons.filter(function(e){return e.price}).length),this.isPeriodPricingEnabled(this.service.customPricing)&&(e=e||this.service.customPricing.periods.default.filter(function(e){return e.ranges.filter(function(e){return e.price>0}).length}).length||this.service.customPricing.periods.custom.filter(function(e){return e.ranges.filter(function(e){return e.price>0}).length}).length),e},depositEnabledChanged:function(){this.depositEnabled?this.service.depositPayment=this.depositPayment:this.service.depositPayment="disabled"},getMaxPrice:function(){var e=this.service.price;return this.isDurationPricingEnabled(this.service.customPricing)&&this.service.customPricing.durations.forEach(function(t){t.price>e&&(e=t.price)}),this.isPersonPricingEnabled(this.service.customPricing)&&this.service.customPricing.persons.forEach(function(t){t.price>e&&(e=t.price)}),e},depositChanged:function(){var e=this.getMaxPrice();this.service.deposit>e&&"fixed"===this.depositPayment&&(this.service.deposit=e)},priceChanged:function(){var e=this.getMaxPrice();this.service.deposit>e&&"fixed"===this.depositPayment&&(this.service.deposit=e),this.service.customPricing.persons.length&&(this.service.customPricing.persons[0].price=this.service.price)},isDurationSelected:function(e){return this.isDurationPricingEnabled(this.service.customPricing)&&this.service.customPricing.durations.map(function(e){return e.duration}).includes(e)},instantiateDialog:function(){if(null!==this.passedService&&!0===this.executeUpdate){this.service=JSON.parse(JSON.stringify(this.passedService)),this.maxExtraPeopleEnabled=null!==this.service.maxExtraPeople,this.service.description&&this.service.description.startsWith("\x3c!-- Content --\x3e")&&(this.service.descriptionHtml=this.service.description),"disabled"===this.service.depositPayment?this.depositEnabled=!1:(this.depositEnabled=!0,this.depositPayment=this.service.depositPayment),!0!==this.service.duplicated&&this.$set(this.service,"providers",this.selectedVisibleEmployees),null===this.service.limitPerCustomer?this.service.limitPerCustomer={enabled:this.$root.settings.roles.limitPerCustomerService.enabled,numberOfApp:null,period:null,timeFrame:null,from:null}:0!==this.service.id&&(this.service.limitPerCustomer=JSON.parse(this.service.limitPerCustomer));for(var e=0;e<this.service.extras.length;e++)null===this.service.extras[e].duration&&(this.service.extras[e].duration="");this.service.id in this.futureAppointments&&(this.appointmentsEmployees=this.futureAppointments[this.service.id]),this.service.extras.sort(function(e,t){return e.position>t.position?1:-1}),1===this.employees.length&&(this.service.providers=[this.employees[0]]),this.service.recurringCycle||(this.service.recurringCycle="disabled"),this.durationPricingEnabled=this.isDurationPricingEnabled(this.service.customPricing),this.personPricingEnabled=this.isPersonPricingEnabled(this.service.customPricing),this.periodPricingEnabled=this.isPeriodPricingEnabled(this.service.customPricing),this.dialogLoading=!1,this.executeUpdate=!1}},validationFailCallback:function(){0===this.service.providers.length&&(this.serviceTabs="service_details",this.scrollViewInModal("providersElement"))},galleryUpdated:function(e){this.service.gallery=e},closeDialog:function(){this.$emit("closeDialog")},getParsedEntity:function(e){var t=this;if(void 0!==this.$refs.extra)for(var n=function(e){t.$refs.extra[e].validate(function(n){return n?(t.$refs.extra[e].clearValidate(),!0):(t.serviceTabs="extras",!1)})},i=0;i<this.$refs.extra.length;i++)n(i);var o=this.prepareBookableEntityPaymentsForSave(this.prepareServiceSettingsForSave(this.service));return this.service.providers=this.service.providers.map(function(e){return e.id}),this.service.applyGlobally=e,this.depositEnabled?this.service.depositPayment=this.depositPayment:this.service.depositPayment="disabled",this.service.aggregatedPrice||(this.service.depositPerPerson=0),(!this.maxExtraPeopleEnabled||this.service.maxCapacity<=1)&&(this.service.maxExtraPeople=null),Object.assign(JSON.parse(JSON.stringify(this.service)),{settings:o?JSON.stringify(o):null,customPricing:this.getJsonCustomPricing(this.service),limitPerCustomer:JSON.stringify(this.service.limitPerCustomer)})},haveSaveConfirmation:function(){var e=this,t=!1,n=!1,i=!1;return this.service.customPricing.durations=this.service.customPricing.durations.filter(function(e){return e.duration}),this.service.customPricing.durations.forEach(function(n){e.passedService.customPricing.durations.forEach(function(e){n.duration===e.duration&&n.price!==e.price&&(t=!0)})}),this.service.customPricing.persons.forEach(function(t){e.passedService.customPricing.persons.forEach(function(e){t.range===e.range&&t.price!==e.price&&(n=!0)})}),this.service.customPricing.periods.default.forEach(function(t,n){t.ranges.forEach(function(t){e.passedService.customPricing.periods.default.forEach(function(e,o){n===o&&e.ranges.forEach(function(e){t.from===e.from&&t.to===e.to&&t.price!==e.price&&(i=!0)})})})}),this.service.customPricing.periods.custom.forEach(function(t){t.ranges.forEach(function(n){e.passedService.customPricing.periods.custom.forEach(function(e){t.dates.start===e.dates.start&&t.dates.end===e.dates.end&&e.ranges.forEach(function(e){n.from===e.from&&n.to===e.to&&n.price!==e.price&&(i=!0)})})})}),this.service.id&&(this.passedService.price!==this.service.price||this.passedService.minCapacity!==this.service.minCapacity||this.passedService.maxCapacity!==this.service.maxCapacity||t||n||i)},bgColor:function(e){return{"background-color":e}},servicePictureSelected:function(e,t){this.service.pictureFullPath=e,this.service.pictureThumbPath=t},galleryPictureSelected:function(e,t){this.clearValidation(),this.service.gallery.push({id:0,pictureFullPath:e,pictureThumbPath:t,position:this.service.gallery.length+1})},deleteGalleryImage:function(e){this.service.gallery.splice(e,1);for(var t=0;t<this.service.gallery.length;t++)this.service.gallery[t].position=t+1},dropGalleryImage:function(e){if(e.newIndex!==e.oldIndex){var t=this;this.service.gallery.forEach(function(e){e.position=t.service.gallery.indexOf(e)+1})}},changeServiceColor:function(e){Array.from(e.target.parentNode.children).forEach(function(e){e.className.includes("color-active")&&e.classList.remove("color-active")}),e.target.className=e.target.className+" color-active",this.service.color=e.target.getAttribute("data-color")},checkCapacityLimits:function(){this.clearValidation(),this.service.minCapacity>this.service.maxCapacity&&(this.service.maxCapacity=this.service.minCapacity),this.maxExtraPeopleEnabled&&this.service.maxExtraPeople<this.service.minCapacity-1&&(this.service.maxExtraPeople=this.service.minCapacity-1)},showEditExtraDialog:function(e){null===e.aggregatedPrice&&(e.aggregatedPrice=this.service.aggregatedPrice),this.handleExtraForm(),this.editedExtra=e,this.editedExtraOld=Object.assign({},e),this.extraToDelete=null,this.extraEditDialog=!0},cancelExtra:function(e){null!==this.editedExtraOld&&(e.name=this.editedExtraOld.name,e.duration=this.editedExtraOld.duration,e.price=this.editedExtraOld.price,e.maxQuantity=this.editedExtraOld.maxQuantity,e.description=this.editedExtraOld.description),this.editedExtra=null,this.editedExtraOld=null,this.extraEditDialog=!1,void 0===e.id&&!0===e.isNew&&this.service.extras.splice(-1,1)},addExtra:function(){this.handleExtraForm(),this.extraEditDialog=!0,this.editedExtra={name:"",duration:"",price:"",maxQuantity:1,description:"",serviceId:this.service.id,position:this.service.extras.length+1,isNew:!0},this.service.extras.push(this.editedExtra),this.scrollViewInModal("extra"+(this.service.extras.length-1))},saveExtra:function(e){var t=this,n=this.service.extras.indexOf(e);this.passedService.extras[n]?this.service.extras[n].translations=this.passedService.extras[n].translations:this.service.extras[n].translations=this.newExtraTranslations,this.$refs.extra[n].validate(function(e){if(!e)return!1;t.editedExtra=null,t.editedExtraOld=null,t.extraEditDialog=!1,t.$refs.extra[n].clearValidate()}),this.service.extras[n].isNew=!1,this.$emit("extraSaved",this.service.extras[n],n)},showDeleteExtraDialog:function(e){this.handleExtraForm(),this.extraToDelete=e,this.editedExtra=null,this.extraEditDialog=!1},handleExtraForm:function(){null!==this.editedExtra&&void 0===this.editedExtra.id&&this.service.extras.splice(-1,1),null!==this.editedExtraOld&&this.cancelExtra(this.editedExtra)},hideDeleteExtraDialog:function(){this.extraToDelete=null,this.extraEditDialog=!0},deleteExtra:function(e){var t=this;if(void 0===e.id){var n=this.service.extras.indexOf(e);this.service.extras.splice(n,1)}else this.extraToDeleteLoading=!0,this.$http.post(this.$root.getAjaxUrl+"/extras/delete/"+e.id).then(function(){var n=t.service.extras.indexOf(e);t.service.extras.splice(n,1),t.passedService.extras.splice(n,1),t.passedService.minSelectedExtras>t.passedService.extras.length&&(t.passedService.minSelectedExtras=t.passedService.extras.length),t.service.minSelectedExtras>t.service.extras.length&&(t.service.minSelectedExtras=t.service.extras.length),0!==t.service.minSelectedExtras&&0!==t.passedService.minSelectedExtras||(t.service.mandatoryExtra=!1,t.passedService.mandatoryExtra=!1),t.extraToDeleteLoading=!1}).catch(function(){t.extraToDeleteLoading=!1,t.notify(t.$root.labels.error,t.$root.labels.extra_delete_fail,"error")});for(var i=0;i<this.service.extras.length;i++)this.service.extras[i].position=i+1},dropExtra:function(e){if(e.newIndex!==e.oldIndex){var t=this;this.service.extras.forEach(function(e){e.position=t.service.extras.indexOf(e)+1})}},clearValidation:function(){void 0!==this.$refs.service&&this.$refs.service.clearValidate()},changeEmployees:function(){var e=this.service.providers.map(function(e){return e.id}),t=this.appointmentsEmployees.filter(function(t){return!e.includes(t)});if(t.length){var n=this,i=[];t.forEach(function(e){i.push(n.visibleEmployees.filter(function(t){return t.id===e})[0]),n.notify(n.$root.labels.error,n.$root.labels.service_provider_remove_fail,"error")}),this.service.providers=this.service.providers.concat(i).sort(function(e,t){return(e.firstName+" "+e.lastName).localeCompare(t.firstName+" "+t.lastName)})}},showDialogTranslate:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;switch(e){case"serviceName":this.$emit("showDialogTranslate","name","service");break;case"serviceDescription":this.$emit("showDialogTranslate","description","service");break;case"extraName":this.$emit("showDialogTranslate","name","extra",t);break;case"extraDescription":this.$emit("showDialogTranslate","description","extra",t)}},validationTabFailCallback:function(){this.serviceTabs="pricing"}},computed:{visibleCategories:function(){return this.categories.filter(function(e){return"visible"===e.status})},visibleEmployees:function(){var e=this;return this.employees.filter(function(t){return"visible"===t.status||"hidden"===t.status&&-1!==t.serviceList.map(function(e){return e.id}).indexOf(e.service.id)})},selectedVisibleEmployees:function(){var e=this;return this.employees.filter(function(t){return-1!==t.serviceList.map(function(e){return e.id}).indexOf(e.service.id)})}},watch:{"service.price":function(){this.clearValidation()},"passedService.translations":function(){this.service&&(this.service.translations=this.passedService.translations)}},components:{DialogTranslate:S.a,PictureUpload:m.a,Draggable:v.a,Money:b.Money,EntitySettings:C.a,ContentBlock:T.a,DialogActions:k.a,CustomDuration:$.a,PersonPrice:A.a,PeriodPrice:I.a}}},1081:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{directives:[{name:"show",rawName:"v-show",value:null===e.passedService||e.dialogLoading,expression:"passedService === null || dialogLoading"}],staticClass:"am-dialog-loader"},[n("div",{staticClass:"am-dialog-loader-content"},[n("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}}),e._v(" "),n("p",[e._v(e._s(e.$root.labels.loader_message))])])]),e._v(" "),null===e.passedService||e.dialogLoading?e._e():n("div",{staticClass:"am-dialog-scrollable",class:{"am-edit":0!==e.service.id}},[n("div",{staticClass:"am-dialog-header"},[n("el-row",[n("el-col",{attrs:{span:18}},[0!==e.service.id?n("h2",[e._v(e._s(e.$root.labels.edit_service))]):n("h2",[e._v(e._s(e.$root.labels.new_service))])]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:6}},[n("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:e.closeDialog}})],1)],1)],1),e._v(" "),n("el-form",{ref:"service",attrs:{model:e.service,rules:e.rulesService,"label-position":"top"}},[n("el-tabs",{model:{value:e.serviceTabs,callback:function(t){e.serviceTabs=t},expression:"serviceTabs"}},[n("el-tab-pane",{attrs:{label:e.$root.labels.details,name:"service_details"}},[n("div",{staticClass:"am-service-profile"},[n("picture-upload",{attrs:{"delete-icon-visibility":e.service.pictureThumbPath&&e.service.pictureFullPath,"edited-entity":this.service,"entity-name":"service"},on:{pictureSelected:e.servicePictureSelected,deleteImage:function(){return e.deleteImage(e.service)}}}),e._v(" "),n("el-popover",{ref:"color-popover",attrs:{placement:"bottom",width:"160",trigger:"click","popper-class":"am-color-popover"},model:{value:e.colorPopover,callback:function(t){e.colorPopover=t},expression:"colorPopover"}},[e._l(e.serviceColors,function(t){return n("span",{key:t,staticClass:"am-service-color",class:{"color-active":"#"+t===e.service.color},style:"background-color:#"+t,attrs:{"data-color":"#"+t},on:{click:e.changeServiceColor}})}),e._v(" "),n("el-form-item",{attrs:{label:e.$root.labels.hex+":"}},[n("el-input",{attrs:{"auto-complete":"off"},model:{value:e.service.color,callback:function(t){e.$set(e.service,"color",t)},expression:"service.color"}})],1),e._v(" "),n("div",{staticClass:"align-right"},[n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(t){e.colorPopover=!1}}},[e._v(e._s(e.$root.labels.ok))])],1)],2),e._v(" "),n("span",{directives:[{name:"popover",rawName:"v-popover:color-popover",arg:"color-popover"}],staticClass:"am-service-color",style:e.bgColor(e.service.color)}),e._v(" "),n("h2",[e._v(e._s(e.service.name))])],1),e._v(" "),n("el-form-item",{attrs:{prop:"name"}},[n("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.name+":")+"\n "),n("div",{staticClass:"am-service-translate",on:{click:function(t){return e.showDialogTranslate("serviceName")}}},[n("img",{staticClass:"am-dialog-translate-svg",attrs:{width:"16px",src:e.$root.getUrl+"public/img/translate.svg"}}),e._v("\n "+e._s(e.$root.labels.translate)+"\n ")])]),e._v(" "),n("el-input",{attrs:{id:"am-service-name","auto-complete":"off"},on:{input:function(t){return e.clearValidation()},change:function(t){return e.trimProperty(e.service,"name")}},model:{value:e.service.name,callback:function(t){e.$set(e.service,"name",t)},expression:"service.name"}})],1),e._v(" "),n("el-form-item",{attrs:{label:e.$root.labels.category+":",prop:"categoryId"}},[n("el-select",{attrs:{placeholder:""},on:{change:function(t){return e.clearValidation()}},model:{value:e.service.categoryId,callback:function(t){e.$set(e.service,"categoryId",t)},expression:"service.categoryId"}},e._l(e.visibleCategories,function(e){return n("el-option",{key:e.id,attrs:{disabled:e.disabled,label:e.name,value:e.id}})}),1),e._v(" "),n("img",{staticClass:"svg-amelia is-spinner",attrs:{src:e.$root.getUrl+"public/img/oval-spinner.svg"}})],1),e._v(" "),n("div",{staticClass:"am-setting-box am-switch-box",class:e.licenceClass("starter")},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:19}},[e._v("\n "+e._s(e.$root.labels.service_show_on_site)+"\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.service_show_on_site_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:5}},[n("el-switch",{attrs:{disabled:e.notInLicence("starter"),"active-text":"","inactive-text":""},model:{value:e.service.show,callback:function(t){e.$set(e.service,"show",t)},expression:"service.show"}})],1)],1),e._v(" "),n("LicenceBlock",{attrs:{licence:"starter"}})],1),e._v(" "),n("el-row",{class:e.licenceClass()},[n("el-form-item",{attrs:{label:"placeholder",label:e.$root.labels.service_recurring_cycle+":"}},[n("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.service_recurring_cycle)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.service_recurring_cycle_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-select",{attrs:{disabled:e.notInLicence()},on:{change:function(t){return e.clearValidation()}},model:{value:e.service.recurringCycle,callback:function(t){e.$set(e.service,"recurringCycle",t)},expression:"service.recurringCycle"}},e._l(e.recurringCycles,function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1),e._v(" "),n("LicenceBlock")],1),e._v(" "),"disabled"!==e.service.recurringCycle?n("el-row",[n("el-form-item",{attrs:{label:"placeholder",label:e.$root.labels.service_recurring_sub+":"}},[n("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.service_recurring_sub)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.service_recurring_sub_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-select",{on:{change:function(t){return e.clearValidation()}},model:{value:e.service.recurringSub,callback:function(t){e.$set(e.service,"recurringSub",t)},expression:"service.recurringSub"}},e._l(e.recurringSubs,function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1)],1):e._e(),e._v(" "),"disabled"!==e.service.recurringCycle?n("el-row",[n("el-form-item",{attrs:{label:"placeholder",label:e.$root.labels.service_recurring_payment+":"}},[n("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.service_recurring_payment)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.service_recurring_payment_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-select",{on:{change:function(t){return e.clearValidation()}},model:{value:e.service.recurringPayment,callback:function(t){e.$set(e.service,"recurringPayment",t)},expression:"service.recurringPayment"}},e._l(e.recurringPayments,function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1)],1):e._e(),e._v(" "),n("div",{staticClass:"am-setting-box am-switch-box",class:e.licenceClass()},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:19}},[e._v("\n "+e._s(e.$root.labels.limit_app_per_customer)+"\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.limit_app_per_customer_tt)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:5}},[n("el-switch",{attrs:{disabled:e.notInLicence()},model:{value:e.service.limitPerCustomer.enabled,callback:function(t){e.$set(e.service.limitPerCustomer,"enabled",t)},expression:"service.limitPerCustomer.enabled"}})],1)],1),e._v(" "),e.service.limitPerCustomer.enabled?n("el-row",{attrs:{gutter:24}},[n("el-col",[n("el-form-item",[n("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.number_of_appointments)+":\n ")]),e._v(" "),n("el-input-number",{attrs:{min:0,id:"am-limit-service-number",placeholder:e.$root.settings.roles.limitPerCustomerService.numberOfApp.toString()},model:{value:e.service.limitPerCustomer.numberOfApp,callback:function(t){e.$set(e.service.limitPerCustomer,"numberOfApp",t)},expression:"service.limitPerCustomer.numberOfApp"}})],1)],1)],1):e._e(),e._v(" "),e.service.limitPerCustomer.enabled?n("el-row",{attrs:{gutter:24}},[n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.time_frame)+":\n ")]),e._v(" "),n("el-select",{attrs:{clearable:"",placeholder:e.limitPerCustomerTimeFrames.find(function(t){return t.value===e.$root.settings.roles.limitPerCustomerService.timeFrame}).label},model:{value:e.service.limitPerCustomer.timeFrame,callback:function(t){e.$set(e.service.limitPerCustomer,"timeFrame",t)},expression:"service.limitPerCustomer.timeFrame"}},e._l(e.limitPerCustomerTimeFrames,function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1)],1),e._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.period)+":\n ")]),e._v(" "),n("el-input-number",{attrs:{min:0,id:"am-limit-service-period",placeholder:e.$root.settings.roles.limitPerCustomerService.period.toString()},model:{value:e.service.limitPerCustomer.period,callback:function(t){e.$set(e.service.limitPerCustomer,"period",t)},expression:"service.limitPerCustomer.period"}})],1)],1)],1):e._e(),e._v(" "),e.service.limitPerCustomer.enabled?n("el-row",{staticStyle:{"margin-top":"10px",display:"flex","align-items":"baseline"},attrs:{gutter:24}},[n("el-col",{attrs:{span:12}},[e._v("\n "+e._s(e.$root.labels.limit_app_per_customer_from)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.limit_app_per_customer_from_tt)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-col",{attrs:{span:12}},[n("el-select",{attrs:{placeholder:e.limitPerCustomerFrom.find(function(t){return t.value===e.$root.settings.roles.limitPerCustomerService.from}).label,clearable:""},model:{value:e.service.limitPerCustomer.from,callback:function(t){e.$set(e.service.limitPerCustomer,"from",t)},expression:"service.limitPerCustomer.from"}},e._l(e.limitPerCustomerFrom,function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1)],1):e._e(),e._v(" "),n("LicenceBlock")],1),e._v(" "),e.notInLicence("starter")?e._e():n("el-form-item",{attrs:{label:e.$root.labels.employees+":",prop:"providers",id:"providersElement"}},[n("el-select",{attrs:{"value-key":"id",placeholder:"",multiple:"","collapse-tags":""},on:{change:e.changeEmployees},model:{value:e.service.providers,callback:function(t){e.$set(e.service,"providers",t)},expression:"service.providers"}},e._l(e.visibleEmployees,function(e){return n("el-option",{key:e.id,attrs:{label:e.firstName+" "+e.lastName,value:e}})}),1)],1),e._v(" "),n("content-block",{attrs:{label:e.$root.labels.description,entity:e.service,textProperty:"description",htmlProperty:"descriptionHtml",hasTranslation:!0,hasQuill:!0,textModeProp:!0,allowImage:!1},on:{showDialogTranslate:function(t){return e.showDialogTranslate("serviceDescription")}}})],1),e._v(" "),n("el-tab-pane",{attrs:{label:e.$root.labels.duration_and_pricing,name:"pricing"}},[n("el-row",{attrs:{gutter:24}},[n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:e.$root.labels.duration+":",prop:"duration"}},[n("el-select",{attrs:{placeholder:""},on:{change:function(t){return e.clearValidation()}},model:{value:e.service.duration,callback:function(t){e.$set(e.service,"duration",t)},expression:"service.duration"}},e._l(e.getPossibleDurationsInSeconds(e.service.duration),function(t){return n("el-option",{key:t,attrs:{label:e.secondsToNiceDuration(t),disabled:e.isDurationSelected(t),value:t}})}),1)],1)],1),e._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:e.$root.labels.price+":",prop:"price"}},[n("div",{staticClass:"el-input"},[n("money",e._b({staticClass:"el-input__inner",on:{input:e.priceChanged},model:{value:e.service.price,callback:function(t){e.$set(e.service,"price",t)},expression:"service.price"}},"money",e.moneyComponentData,!1))],1)])],1)],1),e._v(" "),n("div",{class:e.licenceClass("starter")},[n("el-row",{attrs:{gutter:24}},[n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"placeholder"}},[n("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.service_buffer_time_before)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.service_buffer_time_before_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-select",{attrs:{disabled:e.notInLicence("starter"),placeholder:"",clearable:""},on:{change:function(t){return e.clearValidation()}},model:{value:e.service.timeBefore,callback:function(t){e.$set(e.service,"timeBefore",t)},expression:"service.timeBefore"}},e._l(e.getPossibleDurationsInSeconds(e.service.timeBefore),function(t){return n("el-option",{key:t,attrs:{label:e.secondsToNiceDuration(t),value:t}})}),1)],1)],1),e._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"placeholder"}},[n("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.service_buffer_time_after)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.service_buffer_time_after_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-select",{attrs:{disabled:e.notInLicence("starter"),placeholder:"",clearable:""},on:{change:function(t){return e.clearValidation()}},model:{value:e.service.timeAfter,callback:function(t){e.$set(e.service,"timeAfter",t)},expression:"service.timeAfter"}},e._l(e.getPossibleDurationsInSeconds(e.service.timeAfter),function(t){return n("el-option",{key:t,attrs:{label:e.secondsToNiceDuration(t),value:t}})}),1)],1)],1)],1),e._v(" "),n("LicenceBlock",{attrs:{licence:"starter"}})],1),e._v(" "),n("div",{class:e.licenceClass("starter")},[n("el-row",{attrs:{gutter:24}},[n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"placeholder"}},[n("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.minimum_capacity)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.minimum_capacity_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-input-number",{attrs:{min:1,disabled:e.notInLicence("starter")},on:{input:function(t){return e.checkCapacityLimits()}},model:{value:e.service.minCapacity,callback:function(t){e.$set(e.service,"minCapacity",t)},expression:"service.minCapacity"}})],1)],1),e._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"placeholder"}},[n("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.maximum_capacity)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.maximum_capacity_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-input-number",{attrs:{disabled:e.notInLicence("starter"),min:e.service.minCapacity},on:{input:e.changeCapacity},model:{value:e.service.maxCapacity,callback:function(t){e.$set(e.service,"maxCapacity",t)},expression:"service.maxCapacity"}})],1)],1)],1),e._v(" "),n("LicenceBlock",{attrs:{licence:"starter"}})],1),e._v(" "),e.service.maxCapacity>1?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:19}},[e._v("\n "+e._s(e.$root.labels.limit_extra_people)+"\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.limit_extra_people_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:5}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},on:{change:e.changeMaxExtraPeople},model:{value:e.maxExtraPeopleEnabled,callback:function(t){e.maxExtraPeopleEnabled=t},expression:"maxExtraPeopleEnabled"}})],1)],1),e._v(" "),e.maxExtraPeopleEnabled?n("el-row",{staticStyle:{"margin-top":"10px"}},[n("el-col",[n("el-form-item",{attrs:{label:"placeholder"}},[n("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.limit_extra_people_set)+":\n ")]),e._v(" "),n("el-input-number",{attrs:{min:e.service.minCapacity-1,max:e.service.maxCapacity-1},on:{input:function(t){return e.clearValidation()}},model:{value:e.service.maxExtraPeople,callback:function(t){e.$set(e.service,"maxExtraPeople",t)},expression:"service.maxExtraPeople"}})],1)],1)],1):e._e()],1):e._e(),e._v(" "),e.service.maxCapacity>1?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:19}},[e._v("\n "+e._s(e.$root.labels.bringing_anyone)+"\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.bringing_anyone_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:5}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:e.service.bringingAnyone,callback:function(t){e.$set(e.service,"bringingAnyone",t)},expression:"service.bringingAnyone"}})],1)],1)],1):e._e(),e._v(" "),e.service.maxCapacity>1&&e.service.bringingAnyone?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:19}},[e._v("\n "+e._s(e.$root.labels.aggregated_price)+"\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.aggregated_price_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:5}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:e.service.aggregatedPrice,callback:function(t){e.$set(e.service,"aggregatedPrice",t)},expression:"service.aggregatedPrice"}})],1)],1)],1):e._e(),e._v(" "),e.service.maxCapacity>1||e.service.duration?n("div",{staticClass:"am-custom-pricing"},[n("div",{staticClass:"am-custom-pricing-label"},[e._v(e._s(e.$root.labels.custom_pricing))]),e._v(" "),e.service.maxCapacity>1?n("div",{staticClass:"am-setting-box am-switch-box",class:e.licenceClass(),attrs:{id:"am-service-pricing-person"}},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:19}},[e._v("\n "+e._s(e.$root.labels.custom_person_pricing_enabled)+"\n ")]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:5}},[n("el-switch",{attrs:{disabled:e.notInLicence(),"active-text":"","inactive-text":""},on:{change:e.togglePersonPricing},model:{value:e.personPricingEnabled,callback:function(t){e.personPricingEnabled=t},expression:"personPricingEnabled"}})],1)],1),e._v(" "),e.isPersonPricingEnabled(e.service.customPricing)?n("person-price",{attrs:{service:e.service,enabledDelete:!0,enabledRange:!0},on:{disable:function(t){e.personPricingEnabled=!1}}}):e._e(),e._v(" "),n("LicenceBlock")],1):e._e(),e._v(" "),n("div",{staticClass:"am-setting-box am-switch-box",class:e.licenceClass("pro"),attrs:{id:"am-service-pricing-period"}},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{staticClass:"am-custom-pricing-label-new",attrs:{span:19}},[e._v("\n "+e._s(e.$root.labels.custom_period_pricing_enabled)+"\n "),n("span",[e._v("\n "+e._s(e.$root.labels.new_caps)+"\n ")])]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:5}},[n("el-switch",{attrs:{disabled:e.notInLicence("pro"),"active-text":"","inactive-text":""},on:{change:e.togglePeriodPricing},model:{value:e.periodPricingEnabled,callback:function(t){e.periodPricingEnabled=t},expression:"periodPricingEnabled"}})],1)],1),e._v(" "),!e.isPeriodPricingEnabled(e.service.customPricing)||e.$root.licence.isLite||e.$root.licence.isStarter||e.$root.licence.isBasic?e._e():n("period-price",{attrs:{service:e.service,enabledAdd:!0,enabledEdit:!0,enabledDelete:!0},on:{disable:function(t){e.periodPricingEnabled=!1}}}),e._v(" "),n("LicenceBlock",{attrs:{licence:"pro"}})],1),e._v(" "),e.service.duration?n("div",{staticClass:"am-setting-box am-switch-box",class:e.licenceClass(),attrs:{id:"am-service-pricing-duration"}},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:19}},[e._v("\n "+e._s(e.$root.labels.custom_duration_pricing_enabled)+"\n ")]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:5}},[n("el-switch",{attrs:{disabled:e.notInLicence(),"active-text":"","inactive-text":""},on:{change:e.toggleDurationPricing},model:{value:e.durationPricingEnabled,callback:function(t){e.durationPricingEnabled=t},expression:"durationPricingEnabled"}})],1)],1),e._v(" "),e.isDurationPricingEnabled(e.service.customPricing)?n("custom-duration",{attrs:{service:e.service,enabledDelete:!0,enabledAdd:!0,enabledDuration:!0}}):e._e(),e._v(" "),n("LicenceBlock")],1):e._e()]):e._e(),e._v(" "),e.depositAvailable()?n("div",{staticClass:"am-setting-box am-switch-box",class:e.licenceClass(),attrs:{id:"am-service-deposit"}},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:19}},[e._v("\n "+e._s(e.$root.labels.deposit_enabled)+"\n ")]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:5}},[n("el-switch",{attrs:{disabled:e.notInLicence(),"active-text":"","inactive-text":""},on:{change:e.depositEnabledChanged},model:{value:e.depositEnabled,callback:function(t){e.depositEnabled=t},expression:"depositEnabled"}})],1)],1),e._v(" "),e.depositEnabled?n("el-row",{staticClass:"am-service-deposit",attrs:{gutter:24}},[n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.deposit_payment)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.deposit_payment_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-select",{attrs:{placeholder:""},on:{change:function(t){return e.depositChanged()}},model:{value:e.depositPayment,callback:function(t){e.depositPayment=t},expression:"depositPayment"}},e._l(e.depositOptions,function(e,t){return n("el-option",{key:t,attrs:{label:e.label,value:e.value}})}),1)],1)],1),e._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:e.$root.labels.deposit_amount+("fixed"===e.depositPayment?" ("+e.getCurrencySymbol()+")":"")+("percentage"===e.depositPayment?" (%)":"")+":",prop:"deposit"}},["fixed"===e.depositPayment?n("div",{staticClass:"el-input"},[n("money",e._b({staticClass:"el-input__inner",on:{input:e.depositChanged},model:{value:e.service.deposit,callback:function(t){e.$set(e.service,"deposit",t)},expression:"service.deposit"}},"money",e.moneyComponentData,!1))],1):e._e(),e._v(" "),"percentage"===e.depositPayment?n("el-input-number",{attrs:{min:0,max:100},on:{input:function(t){return e.depositChanged()}},model:{value:e.service.deposit,callback:function(t){e.$set(e.service,"deposit",t)},expression:"service.deposit"}}):e._e()],1)],1)],1):e._e(),e._v(" "),e.depositEnabled&&e.service.aggregatedPrice&&e.service.maxCapacity>1&&"fixed"===e.depositPayment?n("el-row",{attrs:{gutter:24}},[n("el-col",[n("el-checkbox",{model:{value:e.service.depositPerPerson,callback:function(t){e.$set(e.service,"depositPerPerson",t)},expression:"service.depositPerPerson"}},[e._v("\n "+e._s(e.$root.labels.deposit_per_person)+"\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.deposit_by_the_number_of_people)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)],1)],1):e._e(),e._v(" "),e.depositEnabled?n("el-row",{staticClass:"am-service-deposit",attrs:{gutter:24}},[n("el-col",[n("el-checkbox",{model:{value:e.service.fullPayment,callback:function(t){e.$set(e.service,"fullPayment",t)},expression:"service.fullPayment"}},[e._v("\n "+e._s(e.$root.labels.allow_total_amount)+"\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.allow_customers_to_pay_total)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("hr")],1)],1):e._e(),e._v(" "),e.depositEnabled?n("el-row",{staticClass:"am-service-deposit",attrs:{gutter:24}},[n("el-col",{style:{display:"flex"},attrs:{span:24}},[n("i",{staticClass:"el-icon-warning-outline",style:{marginRight:"8px"}}),e._v(" "),n("label",[e._v("\n "+e._s(0===e.service.extras.length?e.$root.labels.deposit_info:"fixed"===e.depositPayment?e.$root.labels.deposit_info_fixed:e.$root.labels.deposit_info_percentage)+"\n ")])])],1):e._e(),e._v(" "),n("LicenceBlock")],1):e._e()],1),e._v(" "),n("el-tab-pane",{attrs:{label:e.$root.labels.gallery,name:"gallery"}},[n("div",{staticClass:"am-gallery-images"},[n("el-row",{attrs:{gutter:24}},[n("draggable",{attrs:{options:e.draggableOptions},on:{end:e.dropGalleryImage},model:{value:e.service.gallery,callback:function(t){e.$set(e.service,"gallery",t)},expression:"service.gallery"}},e._l(e.service.gallery,function(t,i){return n("el-col",{key:i,attrs:{sm:12}},[n("div",{staticClass:"am-gallery-image-wrapper"},[n("div",{staticClass:"am-gallery-image",style:{"background-image":"url("+t.pictureFullPath+")"}},[n("i",{staticClass:"el-icon-delete",on:{click:function(t){return e.deleteGalleryImage(i)}}})]),e._v(" "),n("div",{staticClass:"am-gallery-image-title"},[n("span",{staticClass:"am-drag-handle"},[n("img",{staticClass:"svg-amelia",attrs:{width:"20px",src:e.$root.getUrl+"public/img/burger-menu.svg"}})]),e._v(" "),n("span",[e._v(e._s(t.pictureFullPath.substring(t.pictureFullPath.lastIndexOf("/")+1)))])])])])}),1),e._v(" "),n("el-col",{attrs:{sm:12}},[n("div",{staticClass:"am-gallery-image-add"},[n("div",[n("picture-upload",{attrs:{multiple:!0,"edited-entity":null,"entity-name":"gallery"},on:{pictureSelected:e.galleryPictureSelected}})],1)])])],1)],1)]),e._v(" "),!e.notInLicence("starter")||e.licenceVisible()?n("el-tab-pane",{attrs:{label:e.$root.labels.extras,name:"extras"}},[n("LicenceBlockHeader",{attrs:{licence:"starter"}}),e._v(" "),e.service.extras.length>0?n("div",{staticClass:"am-setting-box am-switch-box",class:e.licenceClassDisabled("starter")},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:19}},[e._v("\n "+e._s(e.$root.labels.mandatory_extra_enable)+"\n ")]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:5}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:e.service.mandatoryExtra,callback:function(t){e.$set(e.service,"mandatoryExtra",t)},expression:"service.mandatoryExtra"}})],1)],1),e._v(" "),e.service.mandatoryExtra?n("el-row",{staticClass:"am-service-deposit",attrs:{gutter:24}},[n("el-col",{attrs:{span:24}},[n("el-form-item",[n("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.min_required_extras)+":\n ")]),e._v(" "),n("el-input-number",{attrs:{min:1,max:e.service.extras.length},on:{input:function(t){return e.minSelectedExtrasChanged()}},model:{value:e.service.minSelectedExtras,callback:function(t){e.$set(e.service,"minSelectedExtras",t)},expression:"service.minSelectedExtras"}})],1)],1)],1):e._e()],1):e._e(),e._v(" "),n("div",{staticClass:"am-extra-list",class:e.licenceClassDisabled("starter")},[n("el-button",{staticClass:"am-dialog-create",attrs:{disabled:e.notInLicence("starter"),size:"large",type:"primary"},on:{click:e.addExtra}},[n("i",{staticClass:"el-icon-plus"}),e._v(" "),n("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_extra))])]),e._v(" "),n("draggable",{attrs:{options:e.draggableOptions},on:{end:e.dropExtra},model:{value:e.service.extras,callback:function(t){e.$set(e.service,"extras",t)},expression:"service.extras"}},[n("transition-group",{attrs:{name:"list-complete"}},e._l(e.service.extras,function(t,i){return n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.extraToDeleteLoading&&i===e.service.extras.indexOf(e.extraToDelete),expression:"extraToDeleteLoading && index === service.extras.indexOf(extraToDelete)"}],key:i+1,staticClass:"am-extra-item",attrs:{id:"extra"+i}},[n("el-row",{attrs:{type:"flex",align:"top"}},[n("el-col",{attrs:{span:2}},[n("span",{staticClass:"am-drag-handle"},[n("img",{staticClass:"svg-amelia",attrs:{width:"20px",src:e.$root.getUrl+"public/img/burger-menu.svg"}})])]),e._v(" "),n("el-col",{attrs:{span:22}},[n("el-row",{attrs:{type:"flex",align:"middle"}},[n("el-col",{attrs:{span:18}},[n("h3",[e._v(e._s(t.name))])]),e._v(" "),n("el-col",{directives:[{name:"show",rawName:"v-show",value:i!==e.service.extras.indexOf(e.editedExtra)||null!==e.editedExtraOld,expression:"index !== service.extras.indexOf(editedExtra) || editedExtraOld !== null"}],staticClass:"extra-item-actions align-right",attrs:{span:6}},[n("span",{on:{click:function(n){return e.showEditExtraDialog(t)}}},[n("img",{staticClass:"svg-amelia edit",attrs:{width:"16px",src:e.$root.getUrl+"public/img/edit.svg"}})]),e._v(" "),!0===e.$root.settings.capabilities.canDelete?n("span",{on:{click:function(n){return e.showDeleteExtraDialog(t)}}},[n("img",{staticClass:"svg-amelia",attrs:{width:"16px",src:e.$root.getUrl+"public/img/delete.svg"}})]):e._e()])],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!(null!==e.editedExtra&&i===e.service.extras.indexOf(e.editedExtra)||null!==e.extraToDelete&&i===e.service.extras.indexOf(e.extraToDelete)),expression:"(editedExtra === null || index !== service.extras.indexOf(editedExtra)) && (extraToDelete === null || index !== service.extras.indexOf(extraToDelete))"}],staticClass:"am-extra-item-data"},[n("el-row",{attrs:{gutter:24}},[n("el-col",{attrs:{sm:7}},[n("span",{staticClass:"data-title"},[e._v(e._s(e.$root.labels.duration)+":")]),e._v(" "),n("span",{staticClass:"data-value"},[e._v("\n "+e._s(t.duration?e.secondsToNiceDuration(t.duration):"/")+"\n ")])]),e._v(" "),n("el-col",{attrs:{sm:7}},[n("span",{staticClass:"data-title"},[e._v(e._s(e.$root.labels.price)+":")]),e._v(" "),n("span",{staticClass:"data-value"},[e._v(e._s(e.getFormattedPrice(t.price)))])]),e._v(" "),n("el-col",{attrs:{sm:10}},[n("span",{staticClass:"data-title"},[e._v(e._s(e.$root.labels.maximum_quantity)+":")]),e._v(" "),n("span",{staticClass:"data-value"},[e._v(e._s(t.maxQuantity))])])],1)],1)],1)],1),e._v(" "),n("el-collapse-transition",[n("div",{directives:[{name:"show",rawName:"v-show",value:null!==e.extraToDelete&&i===e.service.extras.indexOf(e.extraToDelete),expression:"extraToDelete !== null && index === service.extras.indexOf(extraToDelete)"}],staticClass:"am-confirmation"},[n("p",[e._v(e._s(e.$root.labels.delete_extra_confirmation)+"?")]),e._v(" "),n("div",{staticClass:"align-right"},[n("el-button",{attrs:{size:"small"},on:{click:function(t){return e.hideDeleteExtraDialog()}}},[e._v(e._s(e.$root.labels.cancel))]),e._v(" "),n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(n){return e.deleteExtra(t)}}},[e._v(e._s(e.$root.labels.delete)+"\n ")])],1)])]),e._v(" "),n("el-collapse-transition",[n("div",{directives:[{name:"show",rawName:"v-show",value:!0===e.extraEditDialog&&i===e.service.extras.indexOf(e.editedExtra),expression:"extraEditDialog === true && index === service.extras.indexOf(editedExtra)"}]},[n("el-form",{ref:"extra",refInFor:!0,attrs:{model:t,rules:e.rulesExtra,"label-position":"top"}},[n("el-form-item",{attrs:{prop:"name"}},[n("label",{staticClass:"am-service-name-label",attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.name+":")+"\n "),n("div",{staticClass:"am-service-translate",on:{click:function(t){return e.showDialogTranslate("extraName",i)}}},[n("img",{staticClass:"am-dialog-translate-svg",attrs:{width:"16px",src:e.$root.getUrl+"public/img/translate.svg"}}),e._v("\n "+e._s(e.$root.labels.translate)+"\n ")])]),e._v(" "),n("el-input",{attrs:{"auto-complete":"off"},model:{value:t.name,callback:function(n){e.$set(t,"name",n)},expression:"extra.name"}})],1),e._v(" "),n("el-row",{attrs:{gutter:24}},[n("el-col",{attrs:{sm:8,xs:12}},[n("el-form-item",{attrs:{label:e.$root.labels.duration+":"}},[n("el-select",{attrs:{clearable:"",placeholder:""},model:{value:t.duration,callback:function(n){e.$set(t,"duration",n)},expression:"extra.duration"}},e._l(e.getPossibleDurationsInSeconds(t.duration),function(t){return n("el-option",{key:t,attrs:{label:e.secondsToNiceDuration(t),value:t}})}),1)],1)],1),e._v(" "),n("el-col",{attrs:{sm:8,xs:12}},[n("el-form-item",{attrs:{label:e.$root.labels.price+":",prop:"price"}},[n("div",{staticClass:"el-input"},[n("money",e._b({staticClass:"el-input__inner",model:{value:t.price,callback:function(n){e.$set(t,"price",n)},expression:"extra.price"}},"money",e.moneyComponentData,!1))],1)])],1),e._v(" "),n("el-col",{attrs:{sm:8,xs:24}},[n("el-form-item",{attrs:{label:e.$root.labels.maximum_quantity+":"}},[n("el-input-number",{attrs:{min:1},model:{value:t.maxQuantity,callback:function(n){e.$set(t,"maxQuantity",n)},expression:"extra.maxQuantity"}})],1)],1)],1),e._v(" "),e.service.maxCapacity>1&&null!==t.aggregatedPrice&&e.service.bringingAnyone?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:19}},[e._v("\n "+e._s(e.$root.labels.aggregated_price)+"\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.aggregated_price_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:5}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:t.aggregatedPrice,callback:function(n){e.$set(t,"aggregatedPrice",n)},expression:"extra.aggregatedPrice"}})],1)],1)],1):e._e(),e._v(" "),n("content-block",{attrs:{label:e.$root.labels.description,entity:e.service.extras[i],textProperty:"description",htmlProperty:"descriptionHtml",hasTranslation:!0,hasQuill:!0,textModeProp:!0,allowImage:!1},on:{showDialogTranslate:function(t){return e.showDialogTranslate("extraDescription",i)}}}),e._v(" "),n("div",{staticClass:"align-right"},[n("el-button",{attrs:{size:"small"},on:{click:function(n){return e.cancelExtra(t)}}},[e._v(e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(n){return e.saveExtra(t)}}},[e._v(e._s(e.$root.labels.save)+"\n ")])],1)],1)],1)])],1)}),0)],1)],1)],1):e._e(),e._v(" "),n("el-tab-pane",{attrs:{label:e.$root.labels.settings,name:"settings"}},[n("entity-settings",{attrs:{settings:e.settings,paymentsSettings:e.service.settings.payments,generalSettings:e.service.settings.general,zoomSettings:e.service.settings.zoom,lessonSpaceSettings:e.service.settings.lessonSpace,"google-meet-settings":e.service.settings.googleMeet,"microsoft-teams-settings":e.service.settings.microsoftTeams,providers:e.service.providers}})],1)],1)],1)],1),e._v(" "),e.dialogLoading?e._e():n("dialog-actions",{attrs:{formName:"service",urlName:"services",isNew:0===e.service.id,entity:e.service,getParsedEntity:e.getParsedEntity,haveSaveConfirmation:e.haveSaveConfirmation,hasIcons:!0,updateStash:!0,status:{on:"visible",off:"hidden"},buttonText:{confirm:{save:{yes:e.$root.labels.update_for_all,no:e.$root.labels.no},status:{yes:"visible"===e.service.status?e.$root.labels.visibility_hide:e.$root.labels.visibility_show,no:e.$root.labels.visibility_show}}},action:{haveAdd:!0,haveEdit:!0,haveStatus:!0,haveRemove:!0===e.$root.settings.capabilities.canDelete,haveRemoveEffect:!0,haveDuplicate:!0},message:{success:{save:e.$root.labels.service_saved,remove:e.$root.labels.service_deleted,show:e.$root.labels.service_visible,hide:e.$root.labels.service_hidden},confirm:{save:e.$root.labels.confirm_global_change_service,remove:e.$root.labels.confirm_delete_service,show:e.$root.labels.confirm_show_service,hide:e.$root.labels.confirm_hide_service,duplicate:e.$root.labels.confirm_duplicate_service}}},on:{validationTabFailCallback:e.validationTabFailCallback,validationFailCallback:e.validationFailCallback}})],1)},staticRenderFns:[]}},1082:function(e,t,n){var i=n(90)(null,n(1083),!1,null,null,null);e.exports=i.exports},1083:function(e,t){e.exports={render:function(){var e=this.$createElement;return(this._self._c||e)("div")},staticRenderFns:[]}},1084:function(e,t,n){var i=n(90)(n(1085),n(1090),!1,null,null,null);e.exports=i.exports},1085:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1086),o=n.n(i),a=n(816),s=n(704),r=n(673),l=n(336),c=n(817),u=n.n(c),d=n(1088),p=n.n(d),m=n(796),f=n.n(m),h=n(802),g=n.n(h),v=n(823),b=n.n(v),y=n(660),k=n(659),x=n(680),C=n.n(x),w=n(655),S=n(654),P=n(0),T=n.n(P),E=n(658),$=n(693),O=n.n($),A=n(684),D=n(657),I=n(663),N=n(737),F=n.n(N),L=n(710),j=n(666);t.default={mixins:[I.a,A.a,k.a,a.a,S.a,l.a,y.a,E.a,r.a,D.a,w.a,s.a,L.a,j.a],props:["purchasedPackage","dialogPackageBooking"],data:function(){return{customersNoShowCount:[],customersLoading:!1,changedRange:!1,packageServices:[],packageCustomer:null,showDeleteButton:!0,appointment:null,customer:null,deleteLoading:!1,dialogAppointment:!1,dialogPayment:!1,dialogExport:!1,fetched:!1,fetchedFiltered:!1,filterFields:!0,form:new C.a,params:{page:1,dates:this.getDatePickerInitRange(),providers:[],search:"",status:"",services:[],customerId:"",packageStatus:""},selectedPaymentModalData:{paymentId:null,bookingStart:null,bookings:null,service:null,providers:null,customer:null},showDeleteConfirmation:!1,timer:null,toaster:!1,updateBookingStatusId:0,updateBookingStatusLoading:!1,appointmentsDeleteCount:{success:0,error:0},packageCustomersDeleteCount:{success:0,error:0},packageCustomers:[],newUser:null,packageStatuses:[{value:"approved",label:this.$root.labels.active},{value:"expired",label:this.$root.labels.expired},{value:"canceled",label:this.$root.labels.canceled}],bookingCount:[{value:1,label:this.$root.labels.available},{value:0,label:this.$root.labels.fully_booked}],paginationParams:{page:1,show:this.$root.settings.general.itemsPerPageBackEnd,total:0}}},created:function(){C.a.defaults.axios=this.$http;var e=this.getUrlQueryParams(window.location.href);this.params.dates="dateFrom"in e&&"dateTo"in e?{start:T()(e.dateFrom).toDate(),end:T()(e.dateTo).toDate()}:this.getDatePickerInitRange(),e.status&&(this.params.status=e.status),e.bookingId&&(this.params.bookingId=e.bookingId),this.getAppointmentOptions(!0,!0)},mounted:function(){this.$root.settings.payments.wc&&this.$root.settings.payments.wc.enabled&&this.exportParams.fields.push({label:this.$root.labels.wc_order_id,value:"wcOrderId",checked:!0})},updated:function(){this.fetched&&this.inlineSVG()},methods:{getPackagePurchasedExpiration:function(e){return null===e?{label:this.$root.labels.unlimited,class:"unlimited"}:this.getDateTime(e)<this.getNowDate()?{label:this.$root.labels.expired,class:"expired"}:{label:this.$root.labels.expires_on+" "+this.getFrontedFormattedDateFromDateTimeString(e),class:"active"}},clearDateFilter:function(){this.params.dates=null,this.paginationParams.page=1,this.getAppointments()},getPackageDiscountedPrice:function(e){var t=this.getAmountData(e.tax&&e.tax.length?e.tax[0]:null,e.price,this.options.entities.coupons.length&&e.couponId?this.options.entities.coupons.find(function(t){return t.id===e.couponId}):null);return t.total-t.discount+t.tax},saveCustomerCallback:function(e){this.options.entities.customers.push(e.user),this.newUser=e.user,this.customerCreatedCount++},getAvailableServicesForPurchase:function(e){var t=e.appointments[0].packageCustomerId,n=[];return e.data.forEach(function(e){e.bookings.filter(function(e){return e.count>0&&e.packageCustomerId===t}).length&&n.push(e.serviceId)}),this.options.entities.services.filter(function(e){return-1!==n.indexOf(e.id)})},showDialogNewPackageAppointment:function(e){this.packageServices=this.getAvailableServicesForPurchase(e),this.packageCustomer=e,this.showDialogNewAppointment({customerId:e.appointments[0].booking.packageCustomerService.packageCustomer.customerId,id:e.appointments[0].packageCustomerId})},showDialogEditPackageAppointment:function(e,t){this.packageServices=this.getAvailableServicesForPurchase(t),this.packageCustomer=t,this.showDialogEditAppointment(e,t.appointments[0].booking.customerId)},getPurchasedPackageProviders:function(e){return _.uniq(e.map(function(e){return e.provider?e.provider.id:0})).filter(function(e){return 0!==e})},goBack:function(){this.$emit("closePurchasedPackages")},switchShowDeleteConfirmation:function(e){this.showDeleteConfirmation=e,this.showDeleteButton=!e},confirmationText:function(){var e=this,t=this.checkedAppointmentsCount()<2?this.$root.labels.confirm_delete_appointment:this.$root.labels.confirm_delete_appointment_plural;return Object.keys(this.packageCustomers).forEach(function(n){e.packageCustomers[n].checked&&(t=e.$root.labels.confirm_delete_package_purchase)}),t},checkedAppointmentsCount:function(){var e=this,t=0;return Object.keys(this.packageCustomers).forEach(function(n){t+=e.packageCustomers[n].appointments.filter(function(e){return e.checked}).length}),t},deleteSelected:function(){var e=this;this.deleteLoading=!0;var t=[],n=[];Object.keys(this.packageCustomers).forEach(function(i){e.packageCustomers[i].appointments.forEach(function(n){n.checked&&!e.packageCustomers[i].checked&&t.push(n.id)}),e.packageCustomers[i].checked&&n.push(i)}),Object.keys(this.packageCustomers).forEach(function(i){e.packageCustomers[i].appointments.forEach(function(o){o.checked&&!e.packageCustomers[i].checked&&e.form.post(e.$root.getAjaxUrl+"/bookings/delete/"+o.booking.id).then(function(){e.deleteSelectedCallback(t,n,"appointment",!0)}).catch(function(){e.deleteSelectedCallback(t,n,"appointment",!1)})})}),Object.keys(this.packageCustomers).forEach(function(i){e.packageCustomers[i].checked&&e.form.post(e.$root.getAjaxUrl+"/packages/customers/delete/"+i).then(function(){e.deleteSelectedCallback(t,n,"packageCustomer",!0)}).catch(function(){e.deleteSelectedCallback(t,n,"packageCustomer",!1)})})},deleteSelectedCallback:function(e,t,n,i){"appointment"===n&&(e.pop(),i?this.appointmentsDeleteCount.success++:this.appointmentsDeleteCount.error++),"packageCustomer"===n&&(t.pop(),i?this.packageCustomersDeleteCount.success++:this.packageCustomersDeleteCount.error++),0===e.length&&0===t.length&&(this.appointmentsDeleteCount.success&&this.notify(this.$root.labels.success,this.appointmentsDeleteCount.success+" "+(this.appointmentsDeleteCount.success>1?this.$root.labels.appointments_deleted:this.$root.labels.appointment_deleted),"success"),this.appointmentsDeleteCount.error&&this.notify(this.$root.labels.error,this.appointmentsDeleteCount.error+" "+(this.appointmentsDeleteCount.error>1?this.$root.labels.appointments_not_deleted:this.$root.labels.appointment_not_deleted),"error"),this.packageCustomersDeleteCount.success&&this.notify(this.$root.labels.success,this.packageCustomersDeleteCount.success+" "+(this.packageCustomersDeleteCount.success>1?this.$root.labels.package_customers_deleted:this.$root.labels.package_customer_deleted),"success"),this.packageCustomersDeleteCount.error&&this.notify(this.$root.labels.error,this.packageCustomersDeleteCount.error+" "+(this.packageCustomersDeleteCount.error>1?this.$root.labels.package_customers_not_deleted:this.$root.labels.package_customer_not_deleted),"error"),this.appointmentsDeleteCount.success=0,this.appointmentsDeleteCount.error=0,this.packageCustomersDeleteCount.success=0,this.packageCustomersDeleteCount.error=0,this.getAppointmentOptions(!0),this.toaster=!1,this.deleteLoading=!1,this.showDeleteConfirmation=!1,this.showDeleteButton=!0)},packageBookingCallback:function(){this.$emit("savePackageBookingCallback"),this.getAppointments()},getAppointmentOptions:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.options.fetched=!1,this.customersLoading=!0,this.fetchEntities(function(i){i&&e&&(t.customersLoading=!1,t.getAppointments(n)),t.fetched=!0,t.options.fetched=!0},{types:["locations","employees","categories","custom_fields","packages","coupons","resources","coupons"],lite:!0,page:"appointments",isFrontEnd:!1,isPanel:!1})},getAppointments:function(){var e=this;arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.fetchedFiltered=!1;var t=JSON.parse(JSON.stringify(this.params)),n=[];t.dates&&(t.dates.start&&n.push(T()(t.dates.start).format("YYYY-MM-DD")),t.dates.end&&n.push(T()(t.dates.end).format("YYYY-MM-DD")),t.dates=n),t.page=this.paginationParams.page,t.packageId=this.purchasedPackage.id,Object.keys(t).forEach(function(e){return!t[e]&&0!==t[e]&&delete t[e]}),this.$http.get(this.$root.getAjaxUrl+"/package/appointments",{params:this.getAppropriateUrlParams(t)}).then(function(t){e.toaster=!1;var n=e.options.entities.customers.map(function(e){return parseInt(e.id)}),i=e.options.entities.customers,o={};e.useSortedDateStrings(Object.keys(t.data.data.appointments)).forEach(function(e){t.data.data.appointments[e].appointments.forEach(function(e){e.checked=!1,e.bookings.forEach(function(t){-1===n.indexOf(parseInt(t.customer.id))&&(n.push(t.customer.id),i.push(t.customer));var a=parseInt(t.packageCustomerService.packageCustomer.id);a in o||(o[a]={status:t.packageCustomerService.packageCustomer.status,checked:!1,updating:!1,appointments:[],count:0,total:0,data:[]});var s={status:"canceled"===t.status||"rejected"===t.status?t.status:e.status,packageCustomerId:a,canceled:!1,checked:!1,bookingStarts:e.bookingStart,bookingEnd:e.bookingEnd,provider:e.provider,service:e.service,id:e.id,booking:t};o[a].appointments.push(s)})})});var a=e.groupBy(t.data.data.emptyPackageBookings,"packageCustomer");if(a)for(var s in a){-1===n.indexOf(parseInt(a[s][0].packageCustomer.customer.id))&&(n.push(parseInt(a[s][0].packageCustomer.customer.id)),i.push(a[s][0].packageCustomer.customer));var r=parseInt(s);if(a.hasOwnProperty(r)){s in o||(o[r]={status:a[s][0].packageCustomer.status,checked:!1,updating:!1,appointments:[],count:0,total:0,data:[]});var l={status:null,packageCustomerId:r,canceled:!1,checked:!1,bookingStarts:null,provider:null,service:null,id:null,booking:{customer:a[s][0].packageCustomer.customer,packageCustomerService:a[s][0],id:r,payments:a[s][0].packageCustomer.payments}};o[r].appointments.push(l)}}t.data.data.availablePackageBookings.forEach(function(e){e.packages.forEach(function(e){e.services.forEach(function(e){e.bookings.forEach(function(t){t.packageCustomerId in o&&(t.sharedCapacity?0===o[t.packageCustomerId].total&&(o[t.packageCustomerId].count=t.total-o[t.packageCustomerId].appointments.filter(function(e){return e.id&&"canceled"!==e.status}).length,o[t.packageCustomerId].total=t.total):(o[t.packageCustomerId].count+=t.count,o[t.packageCustomerId].total+=t.total),o[t.packageCustomerId].data.push(e))})})})}),e.options.entities.customers=Object.values(i.sort(function(e,t){return e.firstName.toLowerCase()>t.firstName.toLowerCase()?1:-1})),e.packageCustomers=0===Object.keys(o).length?[]:o,e.paginationParams.total=t.data.data.totalPackagePurchases,e.changedRange=!1,e.fetched=!0,e.fetchedFiltered=!0}).catch(function(t){console.log(t.message),e.fetched=!0,e.fetchedFiltered=!0})},appointmentCameFrom:function(e){var t=[];return e.appointments.forEach(function(e){e.booking.info?t.push("front"):t.push("back")}),-1!==t.indexOf("front")&&-1!==t.indexOf("back")?"am-mixed-appointment":-1!==t.indexOf("front")&&t.indexOf("back")<0?"am-front-appointment":t.indexOf("front")<0&&-1!==t.indexOf("back")?"am-back-appointment":""},changeRange:function(){this.setDatePickerSelectedDaysCount(this.params.dates.start,this.params.dates.end),this.changedRange=!0,this.changeFilter()},changeFilter:function(){this.params.customerId||(this.searchedCustomers=[]),this.paginationParams.page=1,this.getAppointments()},handleResize:function(){this.filterFields=window.innerWidth>=992},handleCheckPackageAppointments:function(e){var t=this;this.packageCustomers[e].checked&&this.packageCustomers[e].appointments.filter(function(e){return null!==e.id}).forEach(function(n){n.checked=t.packageCustomers[e].checked}),Object.keys(this.packageCustomers).forEach(function(n){n!==e&&(t.packageCustomers[n].checked=!1,t.packageCustomers[n].appointments.filter(function(e){return null!==e.id}).forEach(function(e){e.checked=!1}))}),this.handleToaster(e)},handleToaster:function(e){var t=this,n=!1,i=!1;Object.keys(this.packageCustomers).forEach(function(o){e!==o&&t.packageCustomers[o].appointments.filter(function(e){return null!==e.id}).forEach(function(e){e.checked=!1}),t.packageCustomers[o].appointments.filter(function(e){return null!==e.id}).forEach(function(e){e.checked&&(n=!0)}),0!==t.packageCustomers[o].appointments.filter(function(e){return null!==e.id}).length&&t.packageCustomers[o].appointments.filter(function(e){return e.checked&&null!==e.id}).length<t.packageCustomers[o].appointments.filter(function(e){return null!==e.id}).length&&(t.packageCustomers[o].checked=!1),t.packageCustomers[o].checked&&(i=!0)}),this.toaster=n||i},showDialogNewCustomer:function(){this.customer=this.getInitCustomerObject(),this.dialogCustomer=!0},closePackageBooking:function(){this.$emit("closePackageBooking")},openRecurringAppointment:function(e){var t=this;this.dialogAppointment=!1,setTimeout(function(){t.showDialogEditAppointment(e)},200)},getPackagePaymentStatus:function(e){var t=e[0].booking.payments;if(t.every(function(e){return"refunded"===e.status}))return"refunded";var n=this.getPackageDiscountedPrice(e[0].booking.packageCustomerService.packageCustomer);n-=t.filter(function(e){return e.wcOrderId&&e.wcItemCouponValue}).reduce(function(e,t){return e+t.wcItemCouponValue},0),n+=t.filter(function(e){return e.wcOrderId&&e.wcItemTaxValue}).reduce(function(e,t){return e+t.wcItemTaxValue},0);var i=t.filter(function(e){return"pending"!==e.status&&"refunded"!==e.status}).reduce(function(e,t){return e+t.amount},0);return Math.round(100*i)/100>=Math.round(100*n)/100?"paid":i>0?"partiallyPaid":"pending"},updatePackageAppointmentBookingStatusCallback:function(e,t,n){this.updateAppointmentBookingStatus(e,e.status,t,function(i){"approved"!==n&&"pending"!==n||"canceled"!==e.status&&"rejected"!==e.status?"canceled"!==n&&"rejected"!==n||"approved"!==e.status&&"pending"!==e.status||t.count--:t.count++})},updatePackageCustomerStatus:function(e,t){var n=this;this.packageCustomers[e].updating=!0,this.form.post(this.$root.getAjaxUrl+"/packages/customers/"+e,{status:t}).then(function(i){n.packageCustomers[e].updating=!1,n.packageCustomers[e].status=t,n.notify(n.$root.labels.success,i.message,"success")}).catch(function(t){n.packageCustomers[e].updating=!1,t.response&&n.notify(n.$root.labels.error,t.response.data.message,"error")})},groupBy:function(e,t){return e.reduce(function(e,n){return(e[n[t].id]=e[n[t].id]||[]).push(n),e},{})}},computed:{filterApplied:function(){return!!this.params.services.length||!!this.params.providers.length||!!this.params.customerId||this.params.dates&&(!!this.params.dates.start||!!this.params.dates.end)||!!this.params.status||!!this.params.packageStatus}},watch:{},components:{PaginationBlock:F.a,PageHeader:O.a,DialogExport:g.a,DialogAppointment:u.a,DialogPackageBooking:p.a,DialogCustomer:f.a,DialogPayment:b.a,PackagesListCollapsed:o.a}}},1086:function(e,t,n){var i=n(90)(null,n(1087),!1,null,null,null);e.exports=i.exports},1087:function(e,t){e.exports={render:function(){var e=this.$createElement;return(this._self._c||e)("div")},staticRenderFns:[]}},1088:function(e,t,n){var i=n(90)(null,n(1089),!1,null,null,null);e.exports=i.exports},1089:function(e,t){e.exports={render:function(){var e=this.$createElement;return(this._self._c||e)("div")},staticRenderFns:[]}},1090:function(e,t){e.exports={render:function(){var e=this,t=this,n=t.$createElement,i=t._self._c||n;return i("div",{staticClass:"am-wrap"},[i("div",{staticClass:"am-body",attrs:{id:"am-appointments"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:!t.fetched||!t.options.fetched,expression:"!fetched || !options.fetched"}],staticClass:"am-spinner am-section"},[i("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}})]),t._v(" "),t.fetched&&0===t.packageCustomers.length&&!t.filterApplied&&t.fetchedFiltered&&t.options.fetched?i("div",{staticClass:"am-empty-state am-section"},[i("img",{attrs:{src:t.$root.getUrl+"public/img/emptystate.svg"}}),t._v(" "),i("h2",[t._v(t._s(t.$root.labels.no_appointments_yet))]),t._v(" "),i("p",[t._v(t._s(t.$root.labels.click_add_appointments))])]):t._e(),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.fetched&&t.options.fetched&&(0!==t.packageCustomers.length||0===t.packageCustomers.length&&t.filterApplied||!t.fetchedFiltered),expression:"fetched && options.fetched && (packageCustomers.length !== 0 || (packageCustomers.length === 0 && filterApplied) || !fetchedFiltered)"}]},[i("div",{staticClass:"am-appointments-filter am-section"},[i("div",{staticStyle:{"margin-bottom":"16px"}},[i("h1",{staticStyle:{cursor:"pointer",display:"inline-block"},on:{click:t.goBack}},[i("img",{attrs:{src:t.$root.getUrl+"public/img/arrow-back.svg"}}),t._v(" "+t._s(t.purchasedPackage.name))])]),t._v(" "),i("el-form",{staticClass:"demo-form-inline",attrs:{model:t.params,action:t.exportAction,method:"POST"}},[i("transition",{attrs:{name:"fade"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.filterFields,expression:"filterFields"}],staticClass:"am-filter-fields"},[i("el-row",{staticClass:"am-package-appointment-filters",attrs:{gutter:16}},[i("el-col",{staticClass:"v-calendar-column",attrs:{sm:24,md:12,lg:8}},[i("el-form-item",{attrs:{prop:"dates"}},[i("v-date-picker",{attrs:{"is-double-paned":!1,mode:"range","popover-visibility":"focus","popover-direction":"bottom","tint-color":"#1A84EE","show-day-popover":!1,"input-props":{class:"el-input__inner"},"is-expanded":!1,"is-required":!0,"input-class":"el-input__inner",formats:t.vCalendarFormats},on:{input:t.changeRange},model:{value:t.params.dates,callback:function(e){t.$set(t.params,"dates",e)},expression:"params.dates"}}),t._v(" "),t.params.dates?i("span",{staticClass:"am-v-date-picker-suffix el-input__suffix-inner",on:{click:t.clearDateFilter}},[i("i",{staticClass:"el-select__caret el-input__icon el-icon-circle-close"})]):t._e()],1)],1),t._v(" "),i("el-col",{attrs:{sm:24,md:12,lg:8}},[i("el-form-item",[i("el-select",{attrs:{filterable:"",clearable:"",placeholder:t.$root.labels.customer,remote:"","remote-method":t.searchCustomers,loading:t.customersLoading},on:{change:t.changeFilter},model:{value:t.params.customerId,callback:function(e){t.$set(t.params,"customerId",e)},expression:"params.customerId"}},t._l(t.searchedCustomers.length?t.searchedCustomers:t.options.entities.customers,function(e,n){return i("el-option",{key:n,attrs:{label:e.firstName.trim()||e.lastName.trim()?e.firstName+" "+e.lastName:t.$root.labels.customer+" "+e.id,value:e.id}})}),1)],1)],1),t._v(" "),i("el-col",{attrs:{sm:24,md:12,lg:8}},[i("el-form-item",[i("el-select",{attrs:{clearable:"",placeholder:t.$root.labels.package_status},on:{change:t.changeFilter},model:{value:t.params.packageStatus,callback:function(e){t.$set(t.params,"packageStatus",e)},expression:"params.packageStatus"}},t._l(t.packageStatuses,function(e,t){return i("el-option",{key:t,attrs:{label:e.label,value:e.value}})}),1)],1)],1)],1)],1)]),t._v(" "),i("transition",{attrs:{name:"slide"}},[t.dialogExport?i("el-dialog",{staticClass:"am-side-dialog am-dialog-export",attrs:{"close-on-click-modal":!1,visible:t.dialogExport,"show-close":!1},on:{"update:visible":function(e){t.dialogExport=e}}},[i("dialog-export",{attrs:{data:Object.assign(t.params,t.exportParams),action:t.$root.getAjaxUrl+"/report/appointments"},on:{updateAction:function(t){e.exportAction=t},closeDialogExport:function(e){t.dialogExport=!1}}})],1):t._e()],1)],1)],1),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.fetched&&0===Object.keys(t.packageCustomers).length&&t.filterApplied&&t.fetchedFiltered&&t.options.fetched,expression:"fetched && Object.keys(packageCustomers).length === 0 && filterApplied && fetchedFiltered && options.fetched"}],staticClass:"am-empty-state am-section"},[i("img",{attrs:{src:t.$root.getUrl+"public/img/emptystate.svg"}}),t._v(" "),i("h2",[t._v(t._s(t.$root.labels.no_results))])]),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:!t.fetchedFiltered,expression:"!fetchedFiltered"}],staticClass:"am-spinner am-section"},[i("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}})]),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.fetchedFiltered&&t.options.fetched&&0!==Object.keys(t.packageCustomers).length,expression:"fetchedFiltered && options.fetched && Object.keys(packageCustomers).length !== 0"}],staticClass:"am-appointments am-section"},[i("div",{staticClass:"am-appointments-list-head"},[i("el-row",[i("el-col",{attrs:{lg:12}},[i("el-row",{attrs:{gutter:10,type:"flex",justify:"space-around",align:"middle"}},[i("el-col",{attrs:{lg:2,sm:2}}),t._v(" "),i("el-col",{attrs:{lg:8,md:8,sm:12}},[i("p",[t._v(t._s(t.$root.labels.customer)+":")])]),t._v(" "),i("el-col",{attrs:{lg:7,md:7,sm:12}},[i("p",[t._v(t._s(t.$root.labels.appointments)+":")])]),t._v(" "),i("el-col",{attrs:{lg:7,md:7,sm:12}},[i("p",[t._v(t._s(t.$root.labels.package_date_purchased)+":")])])],1)],1),t._v(" "),i("el-col",{attrs:{lg:12}},[i("el-row",{attrs:{gutter:10,type:"flex",justify:"space-around",align:"middle"}},[i("el-col",{attrs:{lg:6,md:6}},[i("p",[t._v(t._s(t.$root.labels.employees)+":")])]),t._v(" "),i("el-col",{attrs:{lg:5,sm:5}},[i("p",[t._v(t._s(t.$root.labels.price)+":")])]),t._v(" "),i("el-col",{attrs:{lg:6,md:7}},[i("p",[t._v(t._s(t.$root.labels.package_payment_status)+":")])]),t._v(" "),i("el-col",{attrs:{lg:7,sm:3,xs:8}})],1)],1)],1)],1),t._v(" "),i("div",[i("div",{staticClass:"am-appointments-list"},[i("el-collapse",t._l(t.packageCustomers,function(e,n){return i("el-collapse-item",{key:n,staticClass:"am-appointment",class:t.appointmentCameFrom(e),attrs:{name:n}},[i("template",{slot:"title"},[i("div",{staticClass:"am-appointment-data"},[i("el-row",[i("el-col",{attrs:{lg:12}},[i("el-row",{staticClass:"am-appointments-flex-row-middle-align",attrs:{gutter:15}},[i("el-col",{attrs:{lg:2,sm:2}},[i("span",{staticClass:"am-appointment-checkbox",on:{click:function(e){e.stopPropagation()}}},[!0===t.$root.settings.capabilities.canDelete?i("el-checkbox",{attrs:{value:e.checked,label:e.checked},on:{change:function(e){return t.handleCheckPackageAppointments(n)}},model:{value:e.checked,callback:function(n){t.$set(e,"checked",n)},expression:"packageCustomer.checked"}}):t._e()],1)]),t._v(" "),i("el-col",{attrs:{lg:8,sm:8,xs:24}},[i("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.customer)+":")]),t._v(" "),[i("h3",[i("span",{class:t.getNoShowClass(e.appointments[0].booking.customer.id,t.customersNoShowCount,null,e.appointments[0].booking.customer.status)},[t._v("\n "+t._s(null!==(t.user=t.getCustomerInfo(e.appointments[0].booking))?t.user.firstName.trim()||t.user.lastName.trim()?t.user.firstName+" "+t.user.lastName:t.$root.labels.customer+" "+t.user.id:"")+"\n ")])]),t._v(" "),i("span",[t._v(t._s(e.appointments[0].booking.customer.email))])]],2),t._v(" "),i("el-col",{attrs:{lg:7,sm:7}},[i("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.appointments)+":")]),t._v(" "),i("h3",[t._v(t._s(e.total)+" "+t._s(t.$root.labels.package_total))]),t._v(" "),i("span",[t._v(" "+t._s(e.count)+" "+t._s(t.$root.labels.package_to_be_booked))])]),t._v(" "),i("el-col",{attrs:{lg:7,sm:7,xs:12}},[i("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.package_date_purchased)+":")]),t._v(" "),i("h3",[t._v(t._s(t.getFrontedFormattedDateFromDateTimeString(e.appointments[0].booking.packageCustomerService.packageCustomer.purchased)))]),t._v(" "),i("span",[t._v(t._s(t.getFrontedFormattedTimeFromDateTimeString(e.appointments[0].booking.packageCustomerService.packageCustomer.purchased)))]),t._v(" "),i("span",{class:"am-appointment-package-purchased-status am-appointment-package-purchased-status-"+t.getPackagePurchasedExpiration(e.appointments[0].booking.packageCustomerService.packageCustomer.end).class},[t._v("\n "+t._s(t.getPackagePurchasedExpiration(e.appointments[0].booking.packageCustomerService.packageCustomer.end).label)+"\n ")])])],1)],1),t._v(" "),i("el-col",{attrs:{lg:12}},[i("el-row",{staticClass:"am-appointments-flex-row-middle-align",attrs:{gutter:15}},[i("el-col",{attrs:{lg:0,md:2,sm:2}}),t._v(" "),i("el-col",{attrs:{lg:6,sm:6}},[i("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.employees)+":")]),t._v(" "),i("div",{staticClass:"am-category-services-thumbs"},t._l(t.getPurchasedPackageProviders(e.appointments),function(e,n){return n<3?i("img",{key:e,attrs:{src:t.pictureLoad(t.getProviderById(e),!0)},on:{error:function(n){t.imageLoadError(t.getProviderById(e),!0)}}}):t._e()}),0)]),t._v(" "),i("el-col",{staticClass:"am-appointment-payment",attrs:{lg:5,sm:5,xs:13}},[i("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.price)+":")]),t._v(" "),i("h3",[t._v(t._s(t.getFormattedPrice(t.getPackageDiscountedPrice(e.appointments[0].booking.packageCustomerService.packageCustomer))))])]),t._v(" "),i("el-col",{staticClass:"am-finance-payment-status",attrs:{lg:6,sm:6,xs:16}},[i("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.package_payment_status)+":")]),t._v(" "),i("div",{staticClass:"am-payment-status"},[i("span",{class:"am-payment-status-symbol am-payment-status-symbol-"+t.getPackagePaymentStatus(e.appointments)}),t._v(" "),i("h3",[t._v("\n "+t._s(t.getPaymentStatusNiceName(t.getPackagePaymentStatus(e.appointments)))+"\n ")])])]),t._v(" "),i("el-col",{attrs:{lg:7,sm:3,xs:8}},[i("div",{on:{click:function(e){e.stopPropagation()}}},["canceled"!==e.status?i("el-button",{attrs:{type:"danger",plain:"",loading:e.updating},on:{click:function(e){return t.updatePackageCustomerStatus(n,"canceled")}}},[t._v("\n "+t._s(t.$root.labels.cancel)+"\n ")]):i("el-button",{attrs:{type:"primary",plain:"",loading:e.updating},on:{click:function(e){return t.updatePackageCustomerStatus(n,"approved")}}},[t._v("\n "+t._s(t.$root.labels.open)+"\n ")])],1)])],1)],1)],1)],1)]),t._v(" "),i("packages-list-collapsed",{attrs:{packageCustomer:e,packageCustomerId:n,options:t.options,purchasedPackage:t.purchasedPackage},on:{showDialogEditPackageAppointment:t.showDialogEditPackageAppointment,updatePackageAppointmentBookingStatus:t.updatePackageAppointmentBookingStatusCallback,showDialogNewPackageAppointment:t.showDialogNewPackageAppointment,handleCheckPackageAppointment:t.handleToaster}})],2)}),1)],1)])]),t._v(" "),i("transition",{attrs:{name:"slide-vertical"}},[t.toaster?i("div",{staticClass:"am-bottom-popover"},[i("transition",{attrs:{name:"fade"}},[i("el-button",{directives:[{name:"show",rawName:"v-show",value:t.showDeleteButton,expression:"showDeleteButton"}],staticClass:"am-button-icon",on:{click:function(e){return t.switchShowDeleteConfirmation(!0)}}},[i("img",{staticClass:"svg-amelia",attrs:{alt:t.$root.labels.delete,src:t.$root.getUrl+"public/img/delete.svg"}})])],1),t._v(" "),i("transition",{attrs:{name:"slide-vertical"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.showDeleteConfirmation,expression:"showDeleteConfirmation"}],staticClass:"am-bottom-popover-confirmation"},[i("el-row",{attrs:{type:"flex",justify:"start",align:"middle"}},[i("h3",[t._v(t._s(t.confirmationText()))]),t._v(" "),i("div",{staticClass:"align-left"},[i("el-button",{attrs:{size:"small"},on:{click:function(e){return t.switchShowDeleteConfirmation(!1)}}},[t._v("\n "+t._s(t.$root.labels.cancel)+"\n ")]),t._v(" "),i("el-button",{attrs:{size:"small",type:"primary",loading:t.deleteLoading},on:{click:t.deleteSelected}},[t._v("\n "+t._s(t.$root.labels.delete)+"\n ")])],1)])],1)])],1):t._e()]),t._v(" "),i("pagination-block",{attrs:{params:t.paginationParams,show:t.paginationParams.show,count:t.paginationParams.total,label:t.$root.labels.purchased_packages_pagination,visible:t.paginationParams.total>t.paginationParams.show},on:{change:t.getAppointments}})],1),t._v(" "),i("transition",{attrs:{name:"slide"}},[t.dialogAppointment?i("el-dialog",{staticClass:"am-side-dialog",attrs:{"close-on-click-modal":!1,visible:t.dialogAppointment,"show-close":!1},on:{"update:visible":function(e){t.dialogAppointment=e}}},[i("dialog-appointment",{attrs:{appointment:t.appointment,recurringAppointments:t.recurringAppointments,savedAppointment:t.savedAppointment,totalBookings:t.totalBookings,bookings:t.bookings,options:t.options,customerCreatedCount:t.customerCreatedCount,customersNoShowCount:t.customersNoShowCount,packageServices:t.packageServices,packageCustomer:t.packageCustomer,"have-duplicate":t.packageCustomer.count>0&&t.appointment&&-1!==t.packageServices.map(function(e){return e.id}).indexOf(t.appointment.serviceId)},on:{sortBookings:t.sortBookings,saveCallback:function(e){t.appointment.id?t.saveAppointmentCallback(e,!0):t.saveAppointmentCallback(e)},duplicateCallback:function(e){return t.duplicateAppointmentCallback(t.appointment)},closeDialog:t.closeDialogAppointment,showDialogNewCustomer:function(e){return t.showDialogNewCustomer()},editPayment:t.editPayment,openRecurringAppointment:t.openRecurringAppointment}})],1):t._e()],1),t._v(" "),i("transition",{attrs:{name:"slide"}},[t.dialogPackageBooking?i("el-dialog",{staticClass:"am-side-dialog",attrs:{"close-on-click-modal":!1,visible:t.dialogPackageBooking,"show-close":!1},on:{"update:visible":function(e){t.dialogPackageBooking=e}}},[i("dialog-package-booking",{attrs:{options:t.options,"passed-package":t.purchasedPackage,customerCreatedCount:t.customerCreatedCount,"new-user":t.newUser},on:{saveCallback:t.packageBookingCallback,closeDialog:t.closePackageBooking,showDialogNewCustomer:function(e){return t.showDialogNewCustomer()},editPayment:t.editPayment}})],1):t._e()],1),t._v(" "),i("transition",{attrs:{name:"slide"}},[t.dialogCustomer?i("el-dialog",{staticClass:"am-side-dialog",attrs:{"close-on-click-modal":!1,visible:t.dialogCustomer,"show-close":!1},on:{"update:visible":function(e){t.dialogCustomer=e}}},[i("dialog-customer",{attrs:{customer:t.customer},on:{closeDialog:function(e){t.dialogCustomer=!1},saveCallback:t.saveCustomerCallback}})],1):t._e()],1),t._v(" "),i("transition",{attrs:{name:"slide"}},[t.dialogPayment?i("el-dialog",{staticClass:"am-side-dialog am-dialog-coupon",attrs:{"close-on-click-modal":!1,visible:t.dialogPayment,"show-close":!1},on:{"update:visible":function(e){t.dialogPayment=e}}},[i("dialog-payment",{attrs:{modalData:t.selectedPaymentModalData,bookingFetched:!0},on:{closeDialogPayment:function(e){t.dialogPayment=!1},updatePaymentCallback:t.updatePaymentCallback,deletePaymentCallback:t.deletePaymentCallback}})],1):t._e()],1)],1)])},staticRenderFns:[]}},1091:function(e,t,n){var i=n(90)(null,n(1092),!1,null,null,null);e.exports=i.exports},1092:function(e,t){e.exports={render:function(){var e=this.$createElement;return(this._self._c||e)("div")},staticRenderFns:[]}},1093:function(e,t,n){var i=n(90)(n(1094),n(1095),!1,null,null,null);e.exports=i.exports},1094:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(654),o=n(655),a=n(678),s=n(806),r=n.n(s),l=n(680),c=n.n(l),u=n(658),d=n(697),p=n.n(d),m=n(874),f=n.n(m),h=n(828),g=n.n(h),v=n(733),b=n.n(v);t.default={mixins:[i.a,u.a,o.a,a.a],props:{passedCategory:null,settings:null},data:function(){return{executeUpdate:!0,dialogLoading:!0,colorPopover:!1,form:new c.a,rulesCategory:{name:[{required:!0,message:this.$root.labels.enter_name_warning,trigger:"submit"}]},category:null,categoryColors:["1788FB","4BBEC6","FBC22D","FA3C52","D696B8","689BCA","26CC2B","FD7E35","E38587","774DFB"],style:""}},created:function(){c.a.defaults.axios=this.$http,this.category=JSON.parse(JSON.stringify(this.passedCategory)),this.dialogLoading=!1},updated:function(){},methods:{validationFailCallback:function(){},closeDialog:function(){this.$emit("closeDialog")},getParsedEntity:function(e){return JSON.parse(JSON.stringify(this.category))},haveSaveConfirmation:function(){},bgColor:function(e){return{"background-color":e}},categoryPictureSelected:function(e,t){this.category.pictureFullPath=e,this.category.pictureThumbPath=t},changeCategoryColor:function(e){Array.from(e.target.parentNode.children).forEach(function(e){e.className.includes("color-active")&&e.classList.remove("color-active")}),e.target.className=e.target.className+" color-active",this.category.color=e.target.getAttribute("data-color")},clearValidation:function(){void 0!==this.$refs.category&&this.$refs.category.clearValidate()},showDialogTranslate:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(e){case"categoryName":this.$emit("showDialogTranslate","name","category")}},validationTabFailCallback:function(){}},computed:{},watch:{"passedCategory.translations":function(){this.category&&(this.category.translations=this.passedCategory.translations)}},components:{DialogTranslate:g.a,PictureUpload:r.a,EntitySettings:f.a,ContentBlock:b.a,DialogActions:p.a}}},1095:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{directives:[{name:"show",rawName:"v-show",value:null===e.passedCategory||e.dialogLoading,expression:"passedCategory === null || dialogLoading"}],staticClass:"am-dialog-loader"},[n("div",{staticClass:"am-dialog-loader-content"},[n("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}}),e._v(" "),n("p",[e._v(e._s(e.$root.labels.loader_message))])])]),e._v(" "),null===e.passedCategory||e.dialogLoading?e._e():n("div",{staticClass:"am-dialog-scrollable",class:{"am-edit":0!==e.category.id}},[n("div",{staticClass:"am-dialog-header"},[n("el-row",[n("el-col",{attrs:{span:18}},[0!==e.category.id?n("h2",[e._v("\n "+e._s(e.$root.labels.edit_category)+"\n ")]):n("h2",[e._v("\n "+e._s(e.$root.labels.new_category)+"\n ")])]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:6}},[n("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:e.closeDialog}})],1)],1)],1),e._v(" "),n("el-form",{ref:"category",attrs:{model:e.category,rules:e.rulesCategory,"label-position":"top"}},[n("div",{staticClass:"am-service-profile"},[n("picture-upload",{attrs:{"delete-icon-visibility":e.category.pictureThumbPath&&e.category.pictureFullPath,"edited-entity":this.category,"entity-name":"category"},on:{pictureSelected:e.categoryPictureSelected,deleteImage:function(){return e.deleteImage(e.category)}}}),e._v(" "),n("el-popover",{ref:"color-popover",attrs:{placement:"bottom",width:"160",trigger:"click","popper-class":"am-color-popover"},model:{value:e.colorPopover,callback:function(t){e.colorPopover=t},expression:"colorPopover"}},[e._l(e.categoryColors,function(t){return n("span",{key:t,staticClass:"am-service-color",class:{"color-active":"#"+t===e.category.color},style:"background-color:#"+t,attrs:{"data-color":"#"+t},on:{click:e.changeCategoryColor}})}),e._v(" "),n("el-form-item",{attrs:{label:e.$root.labels.hex+":"}},[n("el-input",{attrs:{"auto-complete":"off"},model:{value:e.category.color,callback:function(t){e.$set(e.category,"color",t)},expression:"category.color"}})],1),e._v(" "),n("div",{staticClass:"align-right"},[n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(t){e.colorPopover=!1}}},[e._v("\n "+e._s(e.$root.labels.ok)+"\n ")])],1)],2),e._v(" "),n("span",{directives:[{name:"popover",rawName:"v-popover:color-popover",arg:"color-popover"}],staticClass:"am-service-color",style:e.bgColor(e.category.color)}),e._v(" "),n("h2",[e._v(e._s(e.category.name))])],1),e._v(" "),n("el-form-item",{attrs:{prop:"name"}},[n("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.name+":")+"\n "),n("div",{staticClass:"am-service-translate",on:{click:function(t){return e.showDialogTranslate("categoryName")}}},[n("img",{staticClass:"am-dialog-translate-svg",attrs:{width:"16px",src:e.$root.getUrl+"public/img/translate.svg"}}),e._v("\n "+e._s(e.$root.labels.translate)+"\n ")])]),e._v(" "),n("el-input",{attrs:{id:"am-category-name","auto-complete":"off"},on:{input:function(t){return e.clearValidation()},change:function(t){return e.trimProperty(e.category,"name")}},model:{value:e.category.name,callback:function(t){e.$set(e.category,"name",t)},expression:"category.name"}})],1)],1)],1),e._v(" "),e.dialogLoading?e._e():n("dialog-actions",{attrs:{formName:"category",urlName:"categories",isNew:!e.passedCategory.id,entity:e.category,hasIcons:!0,updateStash:!0,getParsedEntity:e.getParsedEntity,haveSaveConfirmation:e.haveSaveConfirmation,status:{on:"visible",off:"hidden"},buttonText:{confirm:{save:{yes:e.$root.labels.update_for_all,no:e.$root.labels.no},status:{yes:"visible"===e.category.status?e.$root.labels.visibility_hide:e.$root.labels.visibility_show,no:e.$root.labels.visibility_show}}},action:{haveAdd:!0,haveEdit:!0,haveRemove:!0===e.$root.settings.capabilities.canDelete,haveRemoveEffect:!1,haveDuplicate:!0},message:{success:{save:e.$root.labels.category_saved,remove:e.$root.labels.category_deleted},confirm:{save:e.$root.labels.confirm_global_change_category,remove:e.$root.labels.delete_category_confirmation,duplicate:e.$root.labels.duplicate_category_confirmation}}},on:{validationTabFailCallback:e.validationTabFailCallback,validationFailCallback:e.validationFailCallback}})],1)},staticRenderFns:[]}},1096:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"am-wrap"},[n("div",{staticClass:"am-body",attrs:{id:"am-services"}},[n("page-header",{attrs:{bookableType:e.typeTab,servicesTotal:e.countTotal,categoriesTotal:e.categories.length,packagesTotal:e.showPurchasedPackages?-1:e.packages.length,resourcesTotal:e.resources?e.resources.length:0},on:{newServiceBtnClicked:function(t){return e.showDialogNewService()},newPackageBtnClicked:function(t){return e.showDialogNewPackage()},newPackageBookingBtnClicked:function(t){return e.showDialogNewPackageBooking()},newResourceBtnClicked:function(t){return e.showDialogNewResource()}}}),e._v(" "),e.showPurchasedPackages?e._e():n("div",{staticClass:"am-section"},[!e.notInLicence("pro")||e.licenceVisible()?n("el-tabs",{model:{value:e.typeTab,callback:function(t){e.typeTab=t},expression:"typeTab"}},[n("el-tab-pane",{key:0,attrs:{label:e.$root.labels.services,name:"services"}}),e._v(" "),n("el-tab-pane",{key:1,attrs:{name:"packages"}},[e.$root.licence.isLite?n("span",{staticClass:"am-premium-tag",attrs:{slot:"label"},slot:"label"},[n("img",{attrs:{src:e.$root.getUrl+"public/img/am-star-gold.svg"}}),e._v("\n "+e._s(e.$root.labels.packages)+"\n ")]):n("template",{slot:"label"},[e._v("\n "+e._s(e.$root.labels.packages)+"\n ")])],2),e._v(" "),n("el-tab-pane",{key:2,attrs:{name:"resources"}},[e.$root.licence.isLite?n("span",{staticClass:"am-premium-tag",attrs:{slot:"label"},slot:"label"},[n("img",{attrs:{src:e.$root.getUrl+"public/img/am-star-gold.svg"}}),e._v("\n "+e._s(e.$root.labels.resources)+"\n ")]):n("template",{slot:"label"},[e._v("\n "+e._s(e.$root.labels.resources)+"\n ")])],2)],1):e._e(),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:"services"===e.typeTab,expression:"typeTab === 'services'"}],key:0,staticClass:"am-services-categories"},[n("div",{directives:[{name:"show",rawName:"v-show",value:!e.fetched,expression:"!fetched"}],staticClass:"am-spinner am-section"},[n("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}})]),e._v(" "),e.fetched?n("el-row",{staticClass:"am-flexed am-side-bar-category"},[n("el-col",{attrs:{md:8}},[n("div",{staticClass:"am-categories-column am-section"},[n("h2",[e._v("\n "+e._s(e.$root.labels.categories)+"\n ")]),e._v(" "),n("div",{staticClass:"am-category-item",class:{active:0===Object.keys(e.activeCategory).length},on:{click:function(t){return e.filterServices({})}}},[n("h3",[n("span",{staticClass:"am-category-title"},[e._v("\n "+e._s(e.$root.labels.all_services)+"\n ")])])]),e._v(" "),n("draggable",{attrs:{options:e.draggableOptions},on:{end:e.dropCategory},model:{value:e.categories,callback:function(t){e.categories=t},expression:"categories"}},[n("transition-group",{attrs:{name:"list-complete"}},e._l(e.categories,function(t){return n("div",{key:t.id,staticClass:"am-category-item",class:{active:e.activeCategory.id===t.id},on:{click:function(n){return e.filterServices(t)}}},[n("div",{staticClass:"am-category-item__inner"},[n("span",{staticClass:"am-drag-handle"},[n("img",{staticClass:"svg-amelia",attrs:{width:"20px",src:e.$root.getUrl+"public/img/burger-menu.svg"}})]),e._v(" "),n("div",{staticClass:"am-category-photo"},[n("img",{attrs:{src:e.pictureLoad(t,!1)},on:{error:function(n){return e.imageLoadError(t,!1)}}}),e._v(" "),n("span",{staticClass:"am-service-color",style:e.bgColor(t.color)})]),e._v(" "),n("span",{staticClass:"am-category-title"},[n("span",{staticClass:"am-category-name"},[e._v("\n "+e._s(t.name)+"\n ")]),e._v(" "),n("span",{staticClass:"am-category-title-id"},[e._v("\n "+e._s("("+e.$root.labels.id+": "+t.id+")")+"\n ")])]),e._v(" "),n("span",{staticClass:"service-count"},[e._v("\n "+e._s(t.serviceList.length+" "+(1===t.serviceList.length?e.$root.labels.service:e.$root.labels.services))+"\n ")])]),e._v(" "),n("div",{staticClass:"am-category-item-footer",on:{click:function(n){return e.showDialogEditCategory(t)}}},[n("img",{staticClass:"svg-amelia edit",attrs:{width:"16px",src:e.$root.getUrl+"public/img/edit.svg"}})])])}),0)],1),e._v(" "),n("el-button",{staticClass:"am-dialog-create",attrs:{size:"large",type:"primary",loading:e.loadingAddCategory},on:{click:e.showDialogNewCategory}},[n("i",{staticClass:"el-icon-plus"}),e._v(" "),n("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_category))])])],1)]),e._v(" "),n("el-col",{attrs:{md:16}},[n("div",{staticClass:"am-services-column am-section"},[n("el-row",{attrs:{gutter:16}},[n("el-col",{attrs:{md:12}},[n("h2",{directives:[{name:"show",rawName:"v-show",value:0===Object.keys(e.activeCategory).length,expression:"Object.keys(activeCategory).length === 0"}]},[e._v("\n "+e._s(e.$root.labels.all_services)+"\n ")]),e._v(" "),n("h2",{directives:[{name:"show",rawName:"v-show",value:0!==Object.keys(e.activeCategory).length,expression:"Object.keys(activeCategory).length !== 0"}]},[e._v("\n "+e._s(e.activeCategory.name)+"\n ")])]),e._v(" "),n("el-col",{staticClass:"am-align-right",attrs:{md:12}},[n("span",{staticClass:"am-sort-services-label"},[e._v(e._s(e.$root.labels.services_sorting))]),e._v(" "),n("el-select",{staticClass:"am-sort-services",attrs:{clearable:"",placeholder:"Sort Services"},on:{change:e.changeServiceSorting},model:{value:e.sortingServices,callback:function(t){e.sortingServices=t},expression:"sortingServices"}},e._l(e.sortingSelection,function(e){return n("el-option",{key:e.sortValue,attrs:{label:e.sortName,value:e.sortValue}})}),1)],1)],1),e._v(" "),n("EmptyState",{attrs:{visible:e.fetched&&0===e.categories.length,title:e.$root.labels.no_categories_yet,description:e.$root.labels.click_add_category}}),e._v(" "),n("EmptyState",{attrs:{visible:e.fetched&&e.fetchedFiltered&&0!==e.categories.length&&0===e.services.filter(function(e){return e.visible}).length,title:e.$root.labels.no_services_yet,description:e.$root.labels.click_add_service}}),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.fetched&&!e.fetchedFiltered,expression:"fetched && !fetchedFiltered"}],staticClass:"am-spinner am-section"},[n("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.fetchedFiltered&&e.fetched&&0!==e.categories.length,expression:"fetchedFiltered && fetched && categories.length !== 0"}],staticClass:"am-services-grid"},[n("el-row",{attrs:{gutter:16}},[n("el-col",{attrs:{md:24}},[n("draggable",{attrs:{options:e.draggableOptions},on:{end:e.dropService},model:{value:e.services,callback:function(t){e.services=t},expression:"services"}},e._l(e.services,function(t,i){return n("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"service.visible"}],staticClass:"am-service-card",class:{"am-hidden-entity":"hidden"===t.status},on:{click:function(n){return e.showDialogEditService(t.id)}}},[n("span",{staticClass:"am-drag-handle"},[n("img",{staticClass:"svg-amelia",attrs:{width:"20px",src:e.$root.getUrl+"public/img/burger-menu.svg"}})]),e._v(" "),n("div",{staticClass:"am-service-photo"},[n("img",{attrs:{src:e.pictureLoad(t,!1)},on:{error:function(n){return e.imageLoadError(t,!1)}}}),e._v(" "),n("span",{staticClass:"am-service-color",style:e.bgColor(t.color)})]),e._v(" "),n("div",{staticClass:"am-service-data"},[n("el-row",{attrs:{gutter:16}},[n("el-col",{attrs:{md:12}},[n("h4",[e._v("\n "+e._s(t.name)+"\n "),n("span",{staticClass:"am-service-data-id"},[e._v(" ("+e._s(e.$root.labels.id)+": "+e._s(t.id)+")")])])]),e._v(" "),n("el-col",{attrs:{md:6}},[n("p",[e._v(e._s(e.$root.labels.duration)+": "+e._s(e.secondsToNiceDuration(t.duration)))])]),e._v(" "),n("el-col",{attrs:{md:6}},[n("p",[e._v(e._s(e.$root.labels.price)+": "+e._s(e.getFormattedPrice(t.price)))])])],1)],1)])}),0)],1)],1)],1),e._v(" "),n("pagination-block",{attrs:{params:e.paginationParams,show:e.paginationParams.show,count:e.countFiltered,label:e.$root.labels.services.toLowerCase(),visible:e.fetched&&e.fetchedFiltered&&0!==e.services.length&&e.countTotal>e.paginationParams.show},on:{change:e.getServices}})],1)])],1):e._e()],1),e._v(" "),!e.notInLicence("pro")||e.licenceVisible()?n("div",{directives:[{name:"show",rawName:"v-show",value:"packages"===e.typeTab,expression:"typeTab === 'packages'"}],key:1,staticClass:"am-services-categories am-packages-feature"},[n("div",{directives:[{name:"show",rawName:"v-show",value:!e.fetched,expression:"!fetched"}],staticClass:"am-spinner am-section"},[n("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}})]),e._v(" "),e.fetched?n("el-row",{staticClass:"am-flexed"},[n("el-col",{attrs:{md:24}},[n("div",{staticClass:"am-services-column am-section"},[n("el-row",{attrs:{gutter:16}},[n("el-col",{attrs:{md:12}},[n("h2"),e._v(" "),n("h2")]),e._v(" "),n("el-col",{staticClass:"am-align-right",attrs:{md:12}},[n("span",{staticClass:"am-sort-services-label"},[e._v(e._s(e.$root.labels.packages_sorting))]),e._v(" "),n("el-select",{staticClass:"am-sort-services",attrs:{clearable:"",placeholder:"Sort Packages"},on:{change:e.changePackagesSorting},model:{value:e.sortingPackages,callback:function(t){e.sortingPackages=t},expression:"sortingPackages"}},e._l(e.sortingSelection,function(e){return n("el-option",{key:e.sortValue,attrs:{label:e.sortName,value:e.sortValue}})}),1)],1)],1),e._v(" "),n("EmptyState",{attrs:{visible:e.fetched&&0===e.packages.length,licence:"pro",title:e.$root.labels.no_packages_yet,description:e.$root.labels.click_add_package}}),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.fetched&&0!==e.packages.length,expression:"fetched && packages.length !== 0"}],staticClass:"am-services-grid"},[n("el-row",{attrs:{gutter:16}},[n("el-col",{attrs:{md:24}},[n("draggable",{attrs:{options:e.draggableOptions},on:{end:e.dropPackage},model:{value:e.packages,callback:function(t){e.packages=t},expression:"packages"}},e._l(e.packages,function(t,i){return n("div",{staticClass:"am-service-card",class:{"am-hidden-entity":"hidden"===t.status},on:{click:function(t){return e.showDialogEditPackage(i)}}},[n("span",{staticClass:"am-drag-handle"},[n("img",{staticClass:"svg-amelia",attrs:{width:"20px",src:e.$root.getUrl+"public/img/burger-menu.svg"}})]),e._v(" "),n("div",{staticClass:"am-service-photo"},[n("img",{attrs:{src:e.pictureLoad(t,!1)},on:{error:function(n){return e.imageLoadError(t,!1)}}}),e._v(" "),n("span",{staticClass:"am-service-color",style:e.bgColor(t.color)})]),e._v(" "),n("div",{staticClass:"am-service-data"},[n("el-row",{staticClass:"am-appointments-flex-row-middle-align",staticStyle:{"margin-bottom":"0"},attrs:{gutter:10}},[n("el-col",{staticStyle:{margin:"auto"},attrs:{lg:14,md:14}},[n("el-row",[n("el-col",{staticStyle:{margin:"auto"},attrs:{lg:8,md:8}},[n("span",{staticClass:"am-service-data-name",staticStyle:{"font-size":"16px","line-height":"1.5","font-weight":"500",color:"#354052"}},[e._v("\n "+e._s(t.name)+"\n "),n("span",{staticClass:"am-service-data-id"},[e._v(" ("+e._s(e.$root.labels.id)+": "+e._s(t.id)+")")])])]),e._v(" "),n("el-col",{staticStyle:{margin:"auto",display:"flex"},attrs:{lg:8,md:8}},[n("p",[e._v(e._s(e.$root.labels.services)+": "+e._s(t.bookable.length))])]),e._v(" "),n("el-col",{staticStyle:{margin:"auto",display:"flex"},attrs:{lg:8,md:8}},[n("p",[e._v(e._s(e.$root.labels.price)+": "+e._s(e.getFormattedPrice(t.calculatedPrice?t.price:t.price-t.price/100*t.discount)))])])],1)],1),e._v(" "),n("el-col",{staticClass:"align-right",staticStyle:{margin:"auto"},attrs:{lg:10,md:10,sm:12}},[n("div",{on:{click:function(e){e.stopPropagation()}}},[n("el-button",{on:{click:function(n){return e.purchasedPackages(t)}}},[e._v(e._s(e.$root.labels.purchased_packages))]),e._v(" "),n("el-button",{on:{click:function(t){return e.showDialogEditPackage(i)}}},[e._v(e._s(e.$root.labels.edit))])],1)])],1)],1)])}),0)],1)],1)],1)],1)])],1):e._e()],1):e._e(),e._v(" "),!e.notInLicence("pro")||e.licenceVisible()?n("div",{directives:[{name:"show",rawName:"v-show",value:"resources"===e.typeTab,expression:"typeTab === 'resources'"}],key:2,staticClass:"am-services-categories am-resources-feature"},[n("el-row",{staticClass:"am-flexed"},[n("el-col",{attrs:{md:24}},[n("div",{staticClass:"am-services-column am-section"},[n("el-row",{attrs:{gutter:16}},[n("el-col",{attrs:{md:24}},[n("div",{staticClass:"am-search"},[n("el-input",{attrs:{disabled:e.notInLicence("pro"),placeholder:e.$root.labels.resource_search_placeholder,name:"search"},model:{value:e.searchResource,callback:function(t){e.searchResource=t},expression:"searchResource"}})],1)])],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.fetchedResources,expression:"!fetchedResources"}],staticClass:"am-spinner am-section"},[n("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}})]),e._v(" "),n("EmptyState",{attrs:{visible:e.fetchedResources&&0===e.resources.length&&!e.searchResource,licence:"pro",title:e.$root.labels.no_resources_yet,description:e.$root.labels.click_add_resource}}),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.fetchedResources&&0===e.resources.length&&!!e.searchResource,expression:"fetchedResources && resources.length === 0 && !!searchResource"}],staticClass:"am-empty-state am-section",staticStyle:{position:"relative"}},[n("img",{attrs:{src:e.$root.getUrl+"public/img/emptystate.svg"}}),e._v(" "),n("h2",[e._v(e._s(e.$root.labels.no_results))])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.fetchedResources&&0!==e.resources.length,expression:"fetchedResources && resources.length !== 0"}],staticClass:"am-services-grid"},[n("el-row",{attrs:{gutter:16}},[n("el-col",{attrs:{md:24}},[n("div",{staticClass:"am-resources"},[n("div",{staticClass:"am-resources-header",staticStyle:{"border-bottom":"1px solid #E2E6EC"}},[n("el-row",{attrs:{gutter:10,align:"middle"}},[n("el-col",{attrs:{lg:1,md:1}},[n("p",[!0===e.$root.settings.capabilities.canDelete?n("el-checkbox",{on:{change:e.handleCheckAllResources},model:{value:e.allResourcesChecked,callback:function(t){e.allResourcesChecked=t},expression:"allResourcesChecked"}}):e._e()],1)]),e._v(" "),n("el-col",{attrs:{lg:3,md:3}},[n("p",[e._v(e._s(e.$root.labels.resource)+":")])]),e._v(" "),n("el-col",{attrs:{lg:2,md:2}},[n("p",[e._v(e._s(e.$root.labels.resource_quantity)+":")])]),e._v(" "),n("el-col",{attrs:{lg:e.hasLocations()?5:7,md:e.hasLocations()?5:7}},[n("p",[e._v(e._s(e.$root.labels.services)+":")])]),e._v(" "),e.hasLocations()?n("el-col",{attrs:{lg:5,md:5}},[n("p",[e._v(e._s(e.$root.labels.locations)+":")])]):e._e(),e._v(" "),n("el-col",{attrs:{lg:e.hasLocations()?4:7,md:e.hasLocations()?4:7}},[n("p",[e._v(e._s(e.$root.labels.employees)+":")])]),e._v(" "),n("el-col",{attrs:{lg:2,md:2}},[n("p",[e._v(e._s(e.$root.labels.type)+":")])]),e._v(" "),n("el-col",{attrs:{lg:2,md:2}},[n("p")])],1)],1),e._v(" "),n("div",[n("div",{staticClass:"am-resources-list"},[n("el-collapse",e._l(e.resources,function(t){return n("el-collapse-item",{key:t.id,staticClass:"am-resource",class:{"am-hidden-entity":"hidden"===t.status},attrs:{name:t.id}},[n("template",{slot:"title"},[n("div",{staticClass:"am-resource-data"},[n("el-row",{attrs:{gutter:10,align:"middle"}},[n("el-col",{staticStyle:{"margin-top":"4px"},attrs:{lg:1,sm:1}},[n("span",{staticClass:"am-resource-checkbox"},[!0===e.$root.settings.capabilities.canDelete?n("el-checkbox",{attrs:{value:t.id,label:t.id},on:{change:e.handleCheckResource},model:{value:t.checked,callback:function(n){e.$set(t,"checked",n)},expression:"res.checked"}}):e._e()],1)]),e._v(" "),n("el-col",{attrs:{lg:3,sm:3}},[n("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.resource)+":")]),e._v(" "),n("p",[e._v(e._s(t.name))])]),e._v(" "),n("el-col",{attrs:{lg:2,sm:2}},[n("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.resource_quantity)+":")]),e._v(" "),n("p",[e._v(e._s(t.quantity))])]),e._v(" "),n("el-col",{staticClass:"am-resource-entities",attrs:{lg:e.hasLocations()?5:7,sm:e.hasLocations()?5:7}},[n("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.services)+":")]),e._v(" "),n("div",[t.services&&t.services.length?n("p",[e._v("\n "+e._s(t.services[0]?t.services[0].name:"")+"\n "),t.services.length>1?n("span",{staticClass:"am-resource-entities-plus"},[e._v("\n +"+e._s(t.services.length-1)+"\n ")]):e._e()]):n("p",[e._v(e._s(e.$root.labels.all_services))])])]),e._v(" "),e.hasLocations()?n("el-col",{staticClass:"am-resource-entities",attrs:{lg:5,sm:5}},[n("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.locations)+":")]),e._v(" "),n("div",[t.locations&&t.locations.length?n("p",[e._v("\n "+e._s(t.locations[0]?t.locations[0].name:"")+"\n "),t.locations.length>1?n("span",{staticClass:"am-resource-entities-plus"},[e._v("\n +"+e._s(t.locations.length-1)+"\n ")]):e._e()]):n("p",[e._v(e._s(e.$root.labels.all_locations))])])]):e._e(),e._v(" "),n("el-col",{staticClass:"am-resource-entities",attrs:{lg:e.hasLocations()?4:7,sm:e.hasLocations()?4:7}},[n("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.employees)+":")]),e._v(" "),t.employees&&t.employees.length>1?n("div",{staticClass:"am-assigned am-multiple-employees"},[e._l(t.employees,function(t,i){return i<=4?n("img",{key:t.id,attrs:{src:e.pictureLoad(t,!0)},on:{error:function(n){return e.imageLoadError(t,!0)}}}):e._e()}),e._v(" "),t.employees.length-5>0?n("span",{staticClass:"am-resource-entities-plus",staticStyle:{"margin-left":"0"}},[e._v(" +"+e._s(t.employees.length-5))]):e._e()],2):t.employees&&1===t.employees.length?n("div",{staticClass:"am-assigned"},[n("img",{attrs:{src:e.pictureLoad(t.employees[0],!0)},on:{error:function(n){return e.imageLoadError(t.employees[0],!0)}}}),e._v(" "),n("p",[e._v("\n "+e._s(t.employees[0].firstName+" "+t.employees[0].lastName)+"\n ")])]):n("p",[e._v(e._s(e.$root.labels.all_employees))])]),e._v(" "),n("el-col",{staticClass:"am-resource-entities",attrs:{lg:2,md:2}},[n("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.type)+":")]),e._v(" "),t.shared?n("p",{staticStyle:{"margin-bottom":"0","margin-top":"8px"}},[e._v("\n "+e._s(e.$root.labels.unique)+"\n ")]):e._e(),e._v(" "),t.shared?n("span",[e._v("("+e._s(e.$root.labels[t.shared])+")")]):n("p",[e._v("\n "+e._s(e.$root.labels.shared)+"\n ")])]),e._v(" "),n("el-col",{attrs:{lg:2,sm:2}},[n("div",{staticClass:"am-edit-btn",on:{click:function(e){e.stopPropagation()}}},[n("el-button",{staticClass:"am-button-icon",staticStyle:{"margin-top":"0","margin-right":"15px"},on:{click:function(n){return e.showDialogEditResource(t)}}},[n("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.edit,src:e.$root.getUrl+"public/img/edit.svg"}})])],1)])],1)],1)]),e._v(" "),[n("div",[n("el-row",[n("el-col",{attrs:{lg:6,md:6}},[n("h3")]),e._v(" "),n("el-col",{staticClass:"am-resource-entity-wrap",attrs:{lg:5,md:5}},[n("p",[e._v(e._s(e.$root.labels.services)+":")]),e._v(" "),n("div",{staticClass:"am-resource-entity-list"},[t.services.length>0?n("div",[e._l(e.showAllServices?t.services:t.services.slice(0,3),function(t){return n("p",[e._v("\n "+e._s(t.name)+"\n ")])}),e._v(" "),t.services.length>3&&!e.showAllServices?n("p",{staticClass:"am-link",on:{click:function(t){e.showAllServices=!e.showAllServices}}},[e._v("\n "+e._s(e.$root.labels.resource_view_more)+"\n ")]):e._e(),e._v(" "),t.services.length>3&&e.showAllServices?n("p",{staticClass:"am-link",on:{click:function(t){e.showAllServices=!e.showAllServices}}},[e._v("\n "+e._s(e.$root.labels.resource_view_less)+"\n ")]):e._e()],2):n("p",[e._v("\n "+e._s(e.$root.labels.all_services)+"\n ")])])]),e._v(" "),n("el-col",{staticClass:"am-resource-entity-wrap",attrs:{lg:5,md:5}},[n("p",[e._v(e._s(e.$root.labels.locations)+":")]),e._v(" "),n("div",{staticClass:"am-resource-entity-list"},[t.locations.length>0?n("div",[e._l(e.showAllLocations?t.locations:t.locations.slice(0,3),function(t){return n("p",[e._v("\n "+e._s(t.name)+"\n ")])}),e._v(" "),t.locations.length>3&&!e.showAllLocations?n("p",{staticClass:"am-link",on:{click:function(t){e.showAllLocations=!e.showAllLocations}}},[e._v("\n "+e._s(e.$root.labels.resource_view_more)+"\n ")]):e._e(),e._v(" "),t.locations.length>3&&e.showAllLocations?n("p",{staticClass:"am-link",on:{click:function(t){e.showAllLocations=!e.showAllLocations}}},[e._v("\n "+e._s(e.$root.labels.resource_view_less)+"\n ")]):e._e()],2):n("p",[e._v("\n "+e._s(e.$root.labels.all_locations)+"\n ")])])]),e._v(" "),n("el-col",{staticClass:"am-resource-entity-wrap",attrs:{lg:5,md:5}},[n("p",[e._v(e._s(e.$root.labels.employees)+":")]),e._v(" "),n("div",{staticClass:"am-resource-entity-list"},[t.employees.length>0?n("div",[e._l(e.showAllEmployees?t.employees:t.employees.slice(0,3),function(t){return n("div",{staticClass:"am-assigned"},[n("img",{attrs:{src:e.pictureLoad(t,!0)},on:{error:function(n){return e.imageLoadError(t,!0)}}}),e._v(" "),n("p",[e._v("\n "+e._s(t.firstName+" "+t.lastName)+"\n ")])])}),e._v(" "),t.employees.length>3&&!e.showAllEmployees?n("p",{staticClass:"am-link",on:{click:function(t){e.showAllEmployees=!e.showAllEmployees}}},[e._v("\n "+e._s(e.$root.labels.resource_view_more)+"\n ")]):e._e(),e._v(" "),t.employees.length>3&&e.showAllEmployees?n("p",{staticClass:"am-link",on:{click:function(t){e.showAllEmployees=!e.showAllEmployees}}},[e._v("\n "+e._s(e.$root.labels.resource_view_less)+"\n ")]):e._e()],2):n("p",[e._v("\n "+e._s(e.$root.labels.all_employees)+"\n ")])])]),e._v(" "),n("el-col",{attrs:{lg:2,sm:2}},[n("h4")])],1)],1)]],2)}),1)],1)])])])],1),e._v(" "),n("transition",{attrs:{name:"slide-vertical"}},[e.toaster?n("div",{staticClass:"am-bottom-popover"},[n("transition",{attrs:{name:"fade"}},[n("el-button",{directives:[{name:"show",rawName:"v-show",value:!e.showConfirmDelete,expression:"!showConfirmDelete"}],staticClass:"am-button-icon",on:{click:function(t){e.showConfirmDelete=!0}}},[n("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.delete,src:e.$root.getUrl+"public/img/delete.svg"}})])],1),e._v(" "),n("transition",{attrs:{name:"slide-vertical"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.showConfirmDelete,expression:"showConfirmDelete"}],staticClass:"am-bottom-popover-confirmation"},[n("el-row",{attrs:{type:"flex",justify:"start",align:"middle"}},[n("h3",[e._v(e._s(e.$root.labels["confirm_delete_resource"+(e.countCheckedResources()>1?"_plural":"")]))]),e._v(" "),n("div",{staticClass:"align-left"},[n("el-button",{attrs:{size:"small"},on:{click:function(t){e.toaster=!1}}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),n("el-button",{attrs:{size:"small",type:"primary",loading:e.loadDeleteResourcesBtn},on:{click:e.deleteCheckedResources}},[e._v("\n "+e._s(e.$root.labels.delete)+"\n ")])],1)])],1)])],1):e._e()])],1)],1)])],1)],1):e._e()],1),e._v(" "),e.showPurchasedPackages?n("packages",{attrs:{"purchased-package":e.purchasedPackage,"dialog-package-booking":e.dialogPackageBooking},on:{closePurchasedPackages:e.closePurchasedPackage,closePackageBooking:function(t){e.dialogPackageBooking=!1},savePackageBookingCallback:e.getOptions}}):e._e(),e._v(" "),e.categories.length>0&&!0===e.$root.settings.capabilities.canWrite?n("div",{staticClass:"am-button-new",attrs:{id:"am-button-new"}},[n("el-button",{class:"services"===e.typeTab?{}:e.licenceClassDisabled("pro"),attrs:{id:"am-plus-symbol",type:"primary",icon:"el-icon-plus",disabled:"services"!==e.typeTab&&(e.$root.licence.isLite||e.$root.licence.isStarter)},on:{click:function(t){return e.showNewEntityDialog()}}})],1):e._e(),e._v(" "),n("transition",{attrs:{name:"slide"}},[e.dialogService?n("el-dialog",{staticClass:"am-side-dialog am-dialog-service",attrs:{visible:e.dialogService,"close-on-click-modal":!1,"show-close":!1},on:{"update:visible":function(t){e.dialogService=t}}},[n("dialog-service",{attrs:{categories:e.categories,passedService:e.service,employees:e.options.employees,settings:e.options.settings,futureAppointments:e.futureAppointments,newExtraTranslations:e.newExtraTranslations},on:{saveCallback:e.saveServiceCallback,duplicateCallback:e.duplicateServiceCallback,closeDialog:function(t){e.dialogService=!1},showDialogTranslate:e.showDialogTranslate,extraSaved:e.extraSaved}})],1):e._e()],1),e._v(" "),n("transition",{attrs:{name:"slide"}},[e.dialogCategory?n("el-dialog",{staticClass:"am-side-dialog am-dialog-service",attrs:{visible:e.dialogCategory,"close-on-click-modal":!1,"show-close":!1},on:{"update:visible":function(t){e.dialogCategory=t}}},[n("dialog-category",{attrs:{passedCategory:e.category,settings:e.options.settings},on:{closeDialog:function(t){e.dialogCategory=!1},saveCallback:e.saveCategoryCallback,duplicateCallback:e.duplicateCategoryCallback,showDialogTranslate:e.showDialogTranslate}})],1):e._e()],1),e._v(" "),n("transition",{attrs:{name:"slide"}},[e.dialogTranslate?n("el-dialog",{staticClass:"am-side-dialog am-dialog-translate am-edit",attrs:{"close-on-click-modal":!1,"show-close":!0,visible:e.dialogTranslate,service:e.service},on:{"update:visible":function(t){e.dialogTranslate=t}}},[n("dialog-translate",{attrs:{"passed-translations":e.dialogTranslateData,name:e.dialogTranslateName,allLanguagesData:e.languagesData,"used-languages":e.options.settings.general.usedLanguages,type:e.dialogTranslateType,tab:e.dialogTranslateTab},on:{saveDialogTranslate:e.saveDialogTranslate,closeDialogTranslate:function(t){e.dialogTranslate=!1}}})],1):e._e()],1),e._v(" "),n("transition",{attrs:{name:"slide"}},[e.dialogPackage?n("el-dialog",{staticClass:"am-side-dialog am-dialog-service",attrs:{visible:e.dialogPackage,"close-on-click-modal":!1,"show-close":!1},on:{"update:visible":function(t){e.dialogPackage=t}}},[n("dialog-package",{attrs:{categories:e.categories,passedPackage:e.package,options:{entitiesRelations:e.options.entitiesRelations,entities:{employees:e.options.employees,locations:e.options.locations}},settings:e.options.settings},on:{saveCallback:e.savePackageCallback,duplicateCallback:e.duplicatePackageCallback,closeDialog:function(t){e.dialogPackage=!1},showDialogTranslate:e.showDialogTranslate}})],1):e._e()],1),e._v(" "),n("transition",{attrs:{name:"slide"}},[e.dialogResource?n("el-dialog",{staticClass:"am-side-dialog am-dialog-service",attrs:{"close-on-click-modal":!1,visible:e.dialogResource,"show-close":!1},on:{"update:visible":function(t){e.dialogResource=t}}},[n("dialog-resource",{attrs:{services:e.services,categories:e.categories,employees:e.options.employees,locations:e.options.locations,settings:e.options.settings,passedResource:e.resource,"entities-relations":e.options.entitiesRelations},on:{saveCallback:e.saveResourceCallback,duplicateCallback:e.duplicateResourceCallback,closeDialog:function(t){e.dialogResource=!1}}})],1):e._e()],1),e._v(" "),n("el-col",{attrs:{md:6}},[n("a",{staticClass:"am-help-button",attrs:{href:"https://wpamelia.com/services-and-categories/",target:"_blank",rel:"nofollow"}},[n("i",{staticClass:"el-icon-question"}),e._v(" "+e._s(e.$root.labels.need_help)+"?\n ")])])],1)])},staticRenderFns:[]}},1613:function(e,t,n){var i=n(90)(n(1078),n(1096),!1,null,null,null);e.exports=i.exports},654:function(e,t,n){"use strict";t.a={data:function(){return{colors:["1788FB","4BBEC6","FBC22D","FA3C52","D696B8","689BCA","26CC2B","FD7E35","E38587","774DFB","31CDF3","6AB76C","FD5FA1","A697C5"],usedColors:[]}},methods:{deleteImage:function(e){e.pictureThumbPath="",e.pictureFullPath=""},getAppropriateUrlParams:function(e){if("disableUrlParams"in this.$root.settings.activation&&!this.$root.settings.activation.disableUrlParams)return e;var t=JSON.parse(JSON.stringify(e));return["categories","services","packages","employees","providers","providerIds","extras","locations","events","types","dates"].forEach(function(e){if("extras"===e&&e in t){t.extras=JSON.parse(t.extras);var n=[];t.extras.forEach(function(e){n.push(e.id+"-"+e.quantity)}),t.extras=n.length?n:null}e in t&&Array.isArray(t[e])&&t[e].length&&(t[e]=t[e].join(","))}),t},inlineSVG:function(){var e=n(662);e.init({svgSelector:"img.svg-amelia",initClass:"js-inlinesvg"})},inlineSVGCabinet:function(){setTimeout(function(){n(662).init({svgSelector:"img.svg-cabinet",initClass:"js-inlinesvg"})},100)},imageFromText:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=this.getNameInitials(e),o=Math.floor(Math.random()*this.colors.length),a=this.colors[o];if(this.usedColors.push(this.colors[o]),this.colors.splice(o,1),0===this.colors.length&&(this.colors=this.usedColors,this.usedColors=[]),n)return t.firstName?this.$root.getUrl+"public/img/default-employee.svg":t.latitude?this.$root.getUrl+"public/img/default-location.svg":this.$root.getUrl+"public/img/default-service.svg";var s=document.createElement("canvas");s.width=100,s.height=100;var r=s.getContext("2d");return r.fillStyle=a.startsWith("#")?a:"#"+a,r.fillRect(0,0,s.width,s.height),r.font="40px Arial",r.fillStyle="#ffffff",r.textAlign="center",r.textBaseline="middle",r.fillText(i,s.width/2,s.height/2),s.toDataURL("image/png")},pictureLoad:function(e,t){if(null!==e){var n=!0===t?e.firstName+" "+e.lastName:e.name;if(void 0!==n)return e.pictureThumbPath=e.pictureThumbPath||this.imageFromText(n),e.pictureThumbPath}},imageLoadError:function(e,t){var n=!0===t?e.firstName+" "+e.lastName:e.name;void 0!==n&&(e.pictureThumbPath=this.imageFromText(n,e,!0))},getNameInitials:function(e){return e.split(" ").map(function(e){return e.charAt(0)}).join("").toUpperCase().substring(0,3).replace(/[^\w\s]/g,"")}}}},655:function(e,t,n){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.a={data:function(){return{}},methods:{replaceExistingObjectProperties:function(e,t){var n=this;Object.keys(e).forEach(function(o){null!==e[o]&&"object"===i(e[o])&&o in t?n.replaceExistingObjectProperties(e[o],t[o]):o in t&&(e[o]=t[o])})},addMissingObjectProperties:function(e,t){var n=this;Object.keys(t).forEach(function(o){var a=!1;o in e||("object"===i(t[o])?(e[o]={},a=!0):(e[o]=null,a=!0)),null===t[o]||"object"!==i(t[o])?a&&(e[o]=t[o]):n.addMissingObjectProperties(e[o],t[o])})},scrollView:function(e,t,n){"undefined"!=typeof jQuery&&(void 0!==n&&n||jQuery(window).width()<=600)&&setTimeout(function(){var n=document.getElementById(e);void 0!==n&&null!==n&&n.scrollIntoView({behavior:"smooth",block:t,inline:"end"})},200)},scrollViewInModal:function(e){this.$nextTick(function(){var t=document.getElementById(e),n=document.querySelectorAll(".am-dialog-scrollable");if(t&&n&&n.length){var i=t,o=t.offsetTop;do{o+=(i=i.offsetParent).offsetTop}while(i===n[0]);n[0].scrollTop=o}})},getUrlQueryParams:function(e){var t=e.indexOf("#")>0?e.substring(0,e.indexOf("#")).split("?")[1]:e.split("?")[1];if(t){var n=[],i={};return t.split("&").forEach(function(e){n=e.split("="),i[n[0]]=decodeURIComponent(n[1]).replace(/\+/g," ")}),i}},getUrlParams:function(e){var t={};if(-1!==e.indexOf("?")){var n=[];e.split("?")[1].split("&").forEach(function(e){n=e.split("="),t[n[0]]=decodeURIComponent(n[1]).replace(/\+/g," ")})}return t},removeURLParameter:function(e,t){var n=e.split("?");if(n.length>=2){for(var i=encodeURIComponent(t)+"=",o=n[1].split(/[&;]/g),a=o.length;a-- >0;)-1!==o[a].lastIndexOf(i,0)&&o.splice(a,1);return e=n[0]+(o.length>0?"?"+o.join("&"):"")}return e},capitalizeFirstLetter:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},trimProperty:function(e,t){e[t]=e[t].trim()}}}},656:function(e,t,n){"use strict";var i=n(686),o=n(344),a=Object.prototype.toString;function s(e){return"[object Array]"===a.call(e)}function r(e){return null!==e&&"object"==typeof e}function l(e){return"[object Function]"===a.call(e)}function c(e,t){if(null!==e&&void 0!==e)if("object"==typeof e||s(e)||(e=[e]),s(e))for(var n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:s,isArrayBuffer:function(e){return"[object ArrayBuffer]"===a.call(e)},isBuffer:o,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:r,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===a.call(e)},isFile:function(e){return"[object File]"===a.call(e)},isBlob:function(e){return"[object Blob]"===a.call(e)},isFunction:l,isStream:function(e){return r(e)&&l(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function e(){var t={};function n(n,i){"object"==typeof t[i]&&"object"==typeof n?t[i]=e(t[i],n):t[i]=n}for(var i=0,o=arguments.length;i<o;i++)c(arguments[i],n);return t},extend:function(e,t,n){return c(t,function(t,o){e[o]=n&&"function"==typeof t?i(t,n):t}),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},657:function(e,t,n){"use strict";t.a={data:function(){return{currencies:[{symbol:"$",name:"US Dollar",symbol_native:"$",code:"USD",iso:"us"},{symbol:"€",name:"Euro",symbol_native:"€",code:"EUR",iso:"eu"},{symbol:"£",name:"British Pound Sterling",symbol_native:"£",code:"GBP",iso:"gb"},{symbol:"CA$",name:"Canadian Dollar",symbol_native:"$",code:"CAD",iso:"ca"},{symbol:"FCFP",name:"CFP Franc",symbol_native:"FCFP",code:"XPF",iso:"fr"},{symbol:"CHF",name:"Swiss Franc",symbol_native:"CHF",code:"CHF",iso:"ch"},{symbol:"RUB",name:"Russian Ruble",symbol_native:"руб.",code:"RUB",iso:"ru"},{symbol:"¥",name:"Japanese Yen",symbol_native:"¥",code:"JPY",iso:"jp"},{symbol:"Af",name:"Afghan Afghani",symbol_native:"؋",code:"AFN",iso:"af"},{symbol:"ALL",name:"Albanian Lek",symbol_native:"Lek",code:"ALL",iso:"al"},{symbol:"DA",name:"Algerian Dinar",symbol_native:"د.ج.",code:"DZD",iso:"dz"},{symbol:"AR$",name:"Argentine Peso",symbol_native:"$",code:"ARS",iso:"ar"},{symbol:"AMD",name:"Armenian Dram",symbol_native:"դր.",code:"AMD",iso:"am"},{symbol:"AU$",name:"Australian Dollar",symbol_native:"$",code:"AUD",iso:"au"},{symbol:"man.",name:"Azerbaijani Manat",symbol_native:"ман.",code:"AZN",iso:"az"},{symbol:"BD",name:"Bahraini Dinar",symbol_native:"د.ب.",code:"BHD",iso:"bh"},{symbol:"Tk",name:"Bangladeshi Taka",symbol_native:"৳",code:"BDT",iso:"bd"},{symbol:"BYR",name:"Belarusian Ruble",symbol_native:"BYR",code:"BYR",iso:"by"},{symbol:"BZ$",name:"Belize Dollar",symbol_native:"$",code:"BZD",iso:"bz"},{symbol:"Bs",name:"Bolivian Boliviano",symbol_native:"Bs",code:"BOB",iso:"bo"},{symbol:"KM",name:"Bosnia-Herzegovina Convertible Mark",symbol_native:"KM",code:"BAM",iso:"ba"},{symbol:"BWP",name:"Botswanan Pula",symbol_native:"P",code:"BWP",iso:"bw"},{symbol:"R$",name:"Brazilian Real",symbol_native:"R$",code:"BRL",iso:"br"},{symbol:"BN$",name:"Brunei Dollar",symbol_native:"$",code:"BND",iso:"bn"},{symbol:"BGN",name:"Bulgarian Lev",symbol_native:"лв.",code:"BGN",iso:"bg"},{symbol:"FBu",name:"Burundian Franc",symbol_native:"FBu",code:"BIF",iso:"bi"},{symbol:"CFA",name:"CFA Franc BCEAO",symbol_native:"CFA",code:"XOF",iso:"auto"},{symbol:"FCFA",name:"CFA Franc BEAC",symbol_native:"FCFA",code:"XAF",iso:"auto"},{symbol:"KHR",name:"Cambodian Riel",symbol_native:"៛",code:"KHR",iso:"kh"},{symbol:"CV$",name:"Cape Verdean Escudo",symbol_native:"CV$",code:"CVE",iso:"cv"},{symbol:"CLP",name:"Chilean Peso",symbol_native:"$",code:"CLP",iso:"cl"},{symbol:"CN¥",name:"Chinese Yuan",symbol_native:"CN¥",code:"CNY",iso:"cn"},{symbol:"COP",name:"Colombian Peso",symbol_native:"$",code:"COP",iso:"co"},{symbol:"CF",name:"Comorian Franc",symbol_native:"FC",code:"KMF",iso:"km"},{symbol:"CDF",name:"Congolese Franc",symbol_native:"FrCD",code:"CDF",iso:"cd"},{symbol:"₡",name:"Costa Rican Colón",symbol_native:"₡",code:"CRC",iso:"cr"},{symbol:"kn",name:"Croatian Kuna",symbol_native:"kn",code:"HRK",iso:"hr"},{symbol:"Kč",name:"Czech Republic Koruna",symbol_native:"Kč",code:"CZK",iso:"cz"},{symbol:"Dkk",name:"Danish Krone",symbol_native:"kr",code:"DKK",iso:"dk"},{symbol:"Fdj",name:"Djiboutian Franc",symbol_native:"Fdj",code:"DJF",iso:"dj"},{symbol:"RD$",name:"Dominican Peso",symbol_native:"RD$",code:"DOP",iso:"do"},{symbol:"EGP",name:"Egyptian Pound",symbol_native:"ج.م.",code:"EGP",iso:"eg"},{symbol:"Nfk",name:"Eritrean Nakfa",symbol_native:"Nfk",code:"ERN",iso:"er"},{symbol:"Ekr",name:"Estonian Kroon",symbol_native:"kr",code:"EEK",iso:"ee"},{symbol:"Br",name:"Ethiopian Birr",symbol_native:"Br",code:"ETB",iso:"et"},{symbol:"GEL",name:"Georgian Lari",symbol_native:"GEL",code:"GEL",iso:"ge"},{symbol:"GH₵",name:"Ghanaian Cedi",symbol_native:"GH₵",code:"GHS",iso:"gh"},{symbol:"GTQ",name:"Guatemalan Quetzal",symbol_native:"Q",code:"GTQ",iso:"gt"},{symbol:"FG",name:"Guinean Franc",symbol_native:"FG",code:"GNF",iso:"gn"},{symbol:"HNL",name:"Honduran Lempira",symbol_native:"L",code:"HNL",iso:"hn"},{symbol:"HK$",name:"Hong Kong Dollar",symbol_native:"$",code:"HKD",iso:"hk"},{symbol:"Ft",name:"Hungarian Forint",symbol_native:"Ft",code:"HUF",iso:"hu"},{symbol:"kr",name:"Icelandic Króna",symbol_native:"kr",code:"ISK",iso:"is"},{symbol:"INR",name:"Indian Rupee",symbol_native:"টকা",code:"INR",iso:"in"},{symbol:"Rp",name:"Indonesian Rupiah",symbol_native:"Rp",code:"IDR",iso:"id"},{symbol:"IRR",name:"Iranian Rial",symbol_native:"﷼",code:"IRR",iso:"ir"},{symbol:"IQD",name:"Iraqi Dinar",symbol_native:"د.ع.",code:"IQD",iso:"iq"},{symbol:"₪",name:"Israeli New Sheqel",symbol_native:"₪",code:"ILS",iso:"il"},{symbol:"J$",name:"Jamaican Dollar",symbol_native:"$",code:"JMD",iso:"jm"},{symbol:"JD",name:"Jordanian Dinar",symbol_native:"د.أ.",code:"JOD",iso:"jo"},{symbol:"KZT",name:"Kazakhstani Tenge",symbol_native:"тңг.",code:"KZT",iso:"kz"},{symbol:"Ksh",name:"Kenyan Shilling",symbol_native:"Ksh",code:"KES",iso:"ke"},{symbol:"KD",name:"Kuwaiti Dinar",symbol_native:"د.ك.",code:"KWD",iso:"kw"},{symbol:"Ls",name:"Latvian Lats",symbol_native:"Ls",code:"LVL",iso:"lv"},{symbol:"LB£",name:"Lebanese Pound",symbol_native:"ل.ل.",code:"LBP",iso:"lb"},{symbol:"LD",name:"Libyan Dinar",symbol_native:"د.ل.",code:"LYD",iso:"ly"},{symbol:"Lt",name:"Lithuanian Litas",symbol_native:"Lt",code:"LTL",iso:"lt"},{symbol:"MOP$",name:"Macanese Pataca",symbol_native:"MOP$",code:"MOP",iso:"mo"},{symbol:"MKD",name:"Macedonian Denar",symbol_native:"MKD",code:"MKD",iso:"mk"},{symbol:"MGA",name:"Malagasy Ariary",symbol_native:"MGA",code:"MGA",iso:"mg"},{symbol:"RM",name:"Malaysian Ringgit",symbol_native:"RM",code:"MYR",iso:"my"},{symbol:"MURs",name:"Mauritian Rupee",symbol_native:"MURs",code:"MUR",iso:"mu"},{symbol:"MX$",name:"Mexican Peso",symbol_native:"$",code:"MXN",iso:"mx"},{symbol:"MDL",name:"Moldovan Leu",symbol_native:"MDL",code:"MDL",iso:"md"},{symbol:"MAD",name:"Moroccan Dirham",symbol_native:"د.م.",code:"MAD",iso:"ma"},{symbol:"MTn",name:"Mozambican Metical",symbol_native:"MTn",code:"MZN",iso:"mz"},{symbol:"MMK",name:"Myanma Kyat",symbol_native:"K",code:"MMK",iso:"mm"},{symbol:"N$",name:"Namibian Dollar",symbol_native:"N$",code:"NAD",iso:"na"},{symbol:"NPRs",name:"Nepalese Rupee",symbol_native:"नेरू",code:"NPR",iso:"np"},{symbol:"NT$",name:"New Taiwan Dollar",symbol_native:"NT$",code:"TWD",iso:"tw"},{symbol:"NZ$",name:"New Zealand Dollar",symbol_native:"$",code:"NZD",iso:"nz"},{symbol:"C$",name:"Nicaraguan Córdoba",symbol_native:"C$",code:"NIO",iso:"ni"},{symbol:"₦",name:"Nigerian Naira",symbol_native:"₦",code:"NGN",iso:"ng"},{symbol:"kr",name:"Norwegian Krone",symbol_native:"kr",code:"NOK",iso:"no"},{symbol:"OMR",name:"Omani Rial",symbol_native:"ر.ع.",code:"OMR",iso:"om"},{symbol:"PKRs",name:"Pakistani Rupee",symbol_native:"₨",code:"PKR",iso:"pk"},{symbol:"B/.",name:"Panamanian Balboa",symbol_native:"B/.",code:"PAB",iso:"pa"},{symbol:"₲",name:"Paraguayan Guarani",symbol_native:"₲",code:"PYG",iso:"py"},{symbol:"S/.",name:"Peruvian Nuevo Sol",symbol_native:"S/.",code:"PEN",iso:"pe"},{symbol:"₱",name:"Philippine Peso",symbol_native:"₱",code:"PHP",iso:"ph"},{symbol:"zł",name:"Polish Zloty",symbol_native:"zł",code:"PLN",iso:"pl"},{symbol:"QR",name:"Qatari Rial",symbol_native:"ر.ق.",code:"QAR",iso:"qa"},{symbol:"RON",name:"Romanian Leu",symbol_native:"RON",code:"RON",iso:"ro"},{symbol:"RWF",name:"Rwandan Franc",symbol_native:"FR",code:"RWF",iso:"rw"},{symbol:"SR",name:"Saudi Riyal",symbol_native:"ر.س.",code:"SAR",iso:"sa"},{symbol:"rsd.",name:"Serbian Dinar",symbol_native:"дин.",code:"RSD",iso:"rs"},{symbol:"S$",name:"Singapore Dollar",symbol_native:"$",code:"SGD",iso:"sg"},{symbol:"Ssh",name:"Somali Shilling",symbol_native:"Ssh",code:"SOS",iso:"so"},{symbol:"R",name:"South African Rand",symbol_native:"R",code:"ZAR",iso:"za"},{symbol:"₩",name:"South Korean Won",symbol_native:"₩",code:"KRW",iso:"kr"},{symbol:"₭",name:"Lao kip",symbol_native:"₭",code:"LAK",iso:"la"},{symbol:"SLRs",name:"Sri Lankan Rupee",symbol_native:"SL Re",code:"LKR",iso:"lk"},{symbol:"SDG",name:"Sudanese Pound",symbol_native:"SDG",code:"SDG",iso:"sd"},{symbol:"kr",name:"Swedish Krona",symbol_native:"kr",code:"SEK",iso:"se"},{symbol:"SY£",name:"Syrian Pound",symbol_native:"ل.س.",code:"SYP",iso:"sy"},{symbol:"TSh",name:"Tanzanian Shilling",symbol_native:"TSh",code:"TZS",iso:"tz"},{symbol:"฿",name:"Thai Baht",symbol_native:"฿",code:"THB",iso:"th"},{symbol:"T$",name:"Tongan Paʻanga",symbol_native:"T$",code:"TOP",iso:"to"},{symbol:"TT$",name:"Trinidad and Tobago Dollar",symbol_native:"$",code:"TTD",iso:"tt"},{symbol:"DT",name:"Tunisian Dinar",symbol_native:"د.ت.",code:"TND",iso:"tn"},{symbol:"TL",name:"Turkish Lira",symbol_native:"TL",code:"TRY",iso:"tr"},{symbol:"USh",name:"Ugandan Shilling",symbol_native:"USh",code:"UGX",iso:"ug"},{symbol:"₴",name:"Ukrainian Hryvnia",symbol_native:"₴",code:"UAH",iso:"ua"},{symbol:"AED",name:"United Arab Emirates Dirham",symbol_native:"د.إ.",code:"AED",iso:"ae"},{symbol:"$U",name:"Uruguayan Peso",symbol_native:"$",code:"UYU",iso:"uy"},{symbol:"UZS",name:"Uzbekistan Som",symbol_native:"UZS",code:"UZS",iso:"uz"},{symbol:"Bs.S.",name:"Venezuelan Bolívar",symbol_native:"Bs.S.",code:"VES",iso:"ve"},{symbol:"₫",name:"Vietnamese Dong",symbol_native:"₫",code:"VND",iso:"vn"},{symbol:"YR",name:"Yemeni Rial",symbol_native:"ر.ي.",code:"YER",iso:"ye"},{symbol:"ZK",name:"Zambian Kwacha",symbol_native:"ZK",code:"ZMK",iso:"zm"}],thousandSeparatorMap:{1:",",2:".",3:" ",4:" "},decimalSeparatorMap:{1:".",2:",",3:".",4:","}}},methods:{getCurrencySymbol:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.currencies.find(function(t){return t.code===e.$root.settings.payments.currencyCode});return n&&t&&"INR"!==n.code?n.symbol_native:t&&"INR"===n.code?n.code:this.$root.settings.payments.currency},getPriceThousandSeparator:function(){return this.thousandSeparatorMap[this.$root.settings.payments.priceSeparator]},getPriceDecimalSeparator:function(){return this.decimalSeparatorMap[this.$root.settings.payments.priceSeparator]},getPriceNumberOfDecimalPlaces:function(){return this.$root.settings.payments.priceNumberOfDecimals},getPricePrefix:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return"after"===this.$root.settings.payments.priceSymbolPosition||"afterWithSpace"===this.$root.settings.payments.priceSymbolPosition?"":"before"===this.$root.settings.payments.priceSymbolPosition?this.getCurrencySymbol(e):this.getCurrencySymbol(e)+" "},getPriceSuffix:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return"before"===this.$root.settings.payments.priceSymbolPosition||"beforeWithSpace"===this.$root.settings.payments.priceSymbolPosition?"":"after"===this.$root.settings.payments.priceSymbolPosition?this.getCurrencySymbol(e):" "+this.getCurrencySymbol(e)},getFormattedPrice:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.getPriceNumberOfDecimalPlaces(),i=this.getPriceThousandSeparator(),o=this.getPriceDecimalSeparator(),a=this.getPricePrefix(),s=this.getPriceSuffix(),r=parseInt(e=Math.abs(+e||0).toFixed(n))+"",l=r.length>3?r.length%3:0;return(t?a:"")+(l?r.substr(0,l)+i:"")+r.substr(l).replace(/(\d{3})(?=\d)/g,"$1"+i)+(n?o+Math.abs(e-r).toFixed(n).slice(2):"")+(t?s:"")},getPercentage:function(e,t){return e*t/100}},computed:{moneyComponentData:function(){return{decimal:this.getPriceDecimalSeparator(),thousands:this.getPriceThousandSeparator(),prefix:this.getPricePrefix(!0),suffix:this.getPriceSuffix(!0),precision:this.getPriceNumberOfDecimalPlaces(),masked:!1}}}}},658:function(e,t,n){"use strict";t.a={methods:{notify:function(e,t,n,i,o){var a=this;void 0===i&&(i=""),setTimeout(function(){var s={customClass:i,title:e,message:t,type:n,offset:50};void 0!==o&&(s.duration=o),a.$notify(s)},700)}}}},659:function(e,t,n){"use strict";var i=n(679),o=n(672),a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.a={mixins:[i.a,o.a],data:function(){return{}},methods:{getLocationById:function(e){return this.options.entities.locations.find(function(t){return t.id===e})||null},getCustomerById:function(e){return this.options.entities.customers.find(function(t){return t.id===e})||null},getProviderById:function(e){return this.options.entities.employees.find(function(t){return t.id===e})||null},getServiceById:function(e){return this.options.entities.services.find(function(t){return t.id===e})||null},getCategoryById:function(e){return this.options.entities.categories.find(function(t){return t.id===e})||null},getPackageById:function(e){return this.options.entities.packages.find(function(t){return t.id===e})||null},getProviderService:function(e,t){var n=this.getProviderById(e).serviceList.find(function(e){return e.id===parseInt(t)});return n?Object.assign(JSON.parse(JSON.stringify(this.getServiceById(t))),n):null},getProviderBadge:function(e,t){var n=this.$root.settings.roles.providerBadges.badges.map(function(e){return e.id}),i=null;if(!e.badgeId||!n.includes(e.badgeId))return null;switch(i=this.$root.settings.roles.providerBadges.badges.find(function(t){return t.id===e.badgeId}),t){case"":return!0;case"color":return i.color;case"content":return i.content;default:return!0}},getServiceProviders:function(e,t){var n=this;return void 0!==t&&t?this.options.entities.employees.filter(function(t){return-1!==t.serviceList.map(function(e){return e.id}).indexOf(e)}):this.options.entities.employees.filter(function(t){return-1!==t.serviceList.filter(function(e){return n.isEmployeeService(t.id,e.id)}).map(function(e){return e.id}).indexOf(e)})},getServiceLocations:function(e,t){var n=this,i=[];return this.options.entities.employees.filter(function(t){return-1!==t.serviceList.map(function(e){return e.id}).indexOf(e)}).forEach(function(e){i=n.getProviderLocations(e.id,t).map(function(e){return e.id}).concat(i)}),this.options.entities.locations.filter(function(e){return-1!==i.indexOf(e.id)})},getProviderLocations:function(e,t){var n=this,i=[this.getProviderById(e).locationId];if(e in this.options.entitiesRelations)for(var o in this.options.entitiesRelations[e])this.options.entitiesRelations[e].hasOwnProperty(o)&&(i=i.concat(this.options.entitiesRelations[e][o]));return i=i.filter(function(e,t,n){return n.indexOf(e)===t}),(void 0!==t&&t?this.options.entities.locations:this.options.entities.locations.filter(function(t){return n.isEmployeeLocation(e,t.id)})).filter(function(e){return-1!==i.indexOf(e.id)})},getLocationProviders:function(e,t){var n=this,i=[];return this.options.entities.employees.forEach(function(o){-1!==(void 0!==t&&t?n.getProviderLocations(o.id).filter(function(e){return n.isEmployeeLocation(o.id,e.id)}):n.getProviderLocations(o.id)).map(function(e){return e.id}).indexOf(e)&&i.push(o.id)}),i=i.filter(function(e,t,n){return n.indexOf(e)===t}),this.options.entities.employees.filter(function(e){return-1!==i.indexOf(e.id)})},getServicesFromCategories:function(e){var t=[];return e.map(function(e){return e.serviceList}).forEach(function(e){t=t.concat(e)}),t.sort(this.sortWithNull)},getCategoryServices:function(e){return this.options.entities.categories.find(function(t){return t.id===e}).serviceList},getCustomerInfo:function(e){var t=null;return"info"in e&&e.info?Object.assign({id:"customer"in e?e.customer.id:null},JSON.parse(e.info)):("customerId"in e?t=this.getCustomerById(e.customerId):"customer"in e&&(t=this.getCustomerById(e.customer.id)),null!==t?t:"customer"in e?e.customer:null)},isEmployeeServiceLocation:function(e,t,n){return e in this.options.entitiesRelations&&t in this.options.entitiesRelations[e]&&-1!==this.options.entitiesRelations[e][t].indexOf(n)},isEmployeeService:function(e,t){return e in this.options.entitiesRelations&&t in this.options.entitiesRelations[e]},isEmployeeLocation:function(e,t){var n=!1;if(e in this.options.entitiesRelations)for(var i in this.options.entitiesRelations[e])this.options.entitiesRelations[e].hasOwnProperty(i)&&-1!==this.options.entitiesRelations[e][i].indexOf(t)&&(n=!0);return n},getAvailableEntitiesIds:function(e,t){var n=this,i=[],o=[],a=[],s=null!==t.categoryId?e.categories.find(function(e){return e.id===t.categoryId}):null,r=s?s.serviceList.map(function(e){return e.id}):[];if(null!==t.categoryId&&0===r.length||null!==t.serviceId&&null!==t.employeeId&&!this.isEmployeeService(t.employeeId,t.serviceId)||null!==t.serviceId&&null!==t.employeeId&&null!==t.locationId&&!this.isEmployeeServiceLocation(t.employeeId,t.serviceId,t.locationId))return{services:[],locations:[],employees:[],categories:[]};var l=function(e){if(!n.options.entitiesRelations.hasOwnProperty(e))return"continue";var s=parseInt(e);if(null!==t.employeeId&&t.employeeId!==s||null!==t.locationId&&!n.isEmployeeLocation(s,t.locationId)||null!==t.serviceId&&!n.isEmployeeService(s,t.serviceId)||null!==t.categoryId&&0===r.filter(function(e){return n.isEmployeeService(s,e)}).length||null!==t.categoryId&&null!==t.locationId&&0===r.filter(function(e){return n.isEmployeeServiceLocation(s,e,t.locationId)}).length||null!==t.serviceId&&null!==t.locationId&&!n.isEmployeeServiceLocation(s,t.serviceId,t.locationId))return"continue";for(var l in-1===o.indexOf(s)&&o.push(s),n.options.entitiesRelations[s])if(n.options.entitiesRelations[s].hasOwnProperty(l)){var c=parseInt(l);null!==t.serviceId&&t.serviceId!==c||null!==t.categoryId&&-1===r.indexOf(c)||null!==t.locationId&&!n.isEmployeeServiceLocation(s,c,t.locationId)||(-1===i.indexOf(c)&&i.push(c),n.options.entitiesRelations[s][c].length&&n.options.entitiesRelations[s][c].forEach(function(e){null!==t.locationId&&t.locationId!==e||-1===a.indexOf(e)&&a.push(e)}))}};for(var c in this.options.entitiesRelations)l(c);return{services:i,locations:a,employees:o,categories:e.categories.filter(function(e){return e.serviceList.map(function(e){return e.id}).filter(function(e){return-1!==i.indexOf(e)}).length>0}).map(function(e){return e.id})}},getParsedCustomPricing:function(e){return null===e.customPricing?e.customPricing={enabled:null,durations:[],persons:[],periods:{default:[],custom:[]}}:"object"!==a(e.customPricing)&&(e.customPricing=this.getArrayCustomPricing(e)),e.customPricing},filterEntities:function(e,t){var n=this,i=this.getAvailableEntitiesIds(e,t);this.options.entities.employees=e.employees.filter(function(e){return-1!==i.employees.indexOf(e.id)&&e.serviceList.filter(function(e){return-1!==i.services.indexOf(e.id)}).length>0}),this.options.entities.employees.forEach(function(e){e.fullName=e.firstName+" "+e.lastName,e.serviceList.forEach(function(e){e.customPricing=n.getParsedCustomPricing(e)})}),this.options.entities.categories=e.categories,this.options.entities.services=this.getServicesFromCategories(this.options.entities.categories).filter(function(e){return e.show&&-1!==i.services.indexOf(e.id)}),this.options.entities.services.forEach(function(e){e.extras.forEach(function(e){e.extraId=e.id}),e.customPricing=n.getParsedCustomPricing(e)}),this.options.entities.locations=e.locations.filter(function(e){return-1!==i.locations.indexOf(e.id)}),this.options.entities.customFields=e.customFields;var o=this.options.entities.services.map(function(e){return e.id});if("packages"in e&&(!("show"in t)||"services"!==t.show)){e.packages.forEach(function(e){"bookableIds"in e||(e.bookableIds=e.bookable.map(function(e){return e.service.id}))});var a=e.packages.filter(function(e){return"visible"===e.status}).filter(function(e){return e.bookableIds.filter(function(e){return-1!==o.indexOf(e)}).length}),s=this.options.entities.locations.map(function(e){return e.id}),r=this.options.entities.employees.map(function(e){return e.id}),l=[];if(a.forEach(function(t){var i=!1;"availableBookableInfo"in t||(t.availableBookableInfo=[]),t.bookable.forEach(function(o){var a=!1;(0===o.minimumScheduled&&o.maximumScheduled>0||o.minimumScheduled>0&&0===o.maximumScheduled||o.minimumScheduled>0&&o.maximumScheduled>0)&&(i=!0,a=!0),o.hasSlots=a;var c=o.providers.length;if(!e.locations.length||n.options.entities.locations.length){var u=o.locations.length;!c||(o.providers=o.providers.filter(function(e){return-1!==r.indexOf(e.id)&&u?o.locations.filter(function(t){return n.isEmployeeServiceLocation(e.id,o.service.id,t.id)}).length:!n.options.entities.locations.length||n.options.entities.locations.filter(function(t){return n.isEmployeeServiceLocation(e.id,o.service.id,t.id)}).length}),o.providers.length)?(u&&(o.locations=o.locations.filter(function(e){return-1!==s.indexOf(e.id)&&(c?o.providers.filter(function(t){return n.isEmployeeServiceLocation(t.id,o.service.id,e.id)}).length:n.options.entities.employees.filter(function(t){return n.isEmployeeServiceLocation(t.id,o.service.id,e.id)}).length)}),o.locations.length||l.push(t.id)),-1===t.availableBookableInfo.map(function(e){return e.serviceId}).indexOf(o.service.id)&&t.availableBookableInfo.push({serviceId:o.service.id,serviceName:n.getNameTranslated(o.service),serviceQuantity:o.quantity,providersCount:o.providers.length})):l.push(t.id)}else l.push(t.id)}),t.bookable=t.bookable.filter(function(e){return e.hasSlots}),t.hasSlots=i}),this.options.entities.packages=a.filter(function(e){return-1===l.indexOf(e.id)}),"show"in t&&"packages"===t.show){var c=[];this.options.entities.packages.forEach(function(e){e.bookable.forEach(function(e){c.push(e.service.categoryId)})}),this.options.entities.categories=this.options.entities.categories.filter(function(e){return-1!==c.indexOf(e.id)})}this.options.entities.taxes=e.taxes}},processEntities:function(e){var t=this;this.options.entitiesRelations=e.entitiesRelations,this.options.isFrontEnd?("packages"in e&&e.packages.length&&(this.responseEntities.employees=e.employees,this.responseEntities.categories=e.categories,this.responseEntities.locations=e.locations,this.responseEntities.customFields=e.customFields,this.responseEntities.services=this.getServicesFromCategories(this.responseEntities.categories),this.responseEntities.packages=e.packages?e.packages.filter(function(e){return e.available}):[],this.responseEntities.daysOff=e.settings?e.settings.daysOff:[],this.responseEntities.taxes=e.taxes?e.taxes:[],e.packages=e.packages.filter(function(e){return e.available}),this.params&&this.params.sort||(e.packages=e.packages.sort(function(e,t){return e.position-t.position}))),this.filterEntities(e,this.getShortCodeEntityIds())):(this.options.entities.employees=e.employees,this.options.entities.categories=e.categories,this.options.entities.locations=e.locations,"customers"in e&&e.customers.length&&(this.options.entities.customers=e.customers),this.options.entities.services=this.getServicesFromCategories(this.options.entities.categories),this.options.entities.resources=e.resources,this.options.entities.packages=e.packages,this.options.entities.customFields=e.customFields,this.options.entities.coupons=e.coupons,this.options.entities.spaces=e.spaces,this.options.entities.services.forEach(function(e){e.extras.forEach(function(e){e.extraId=e.id})}),this.options.availableEntitiesIds=this.getAvailableEntitiesIds(e,{categoryId:null,serviceId:null,employeeId:null,locationId:null})),this.options.entities.employees.forEach(function(e){e.serviceList.forEach(function(e){e.customPricing=t.getParsedCustomPricing(e)})}),this.options.entities.services.forEach(function(e){e.customPricing=t.getParsedCustomPricing(e)}),"settings"in e&&(this.options.entities.settings=e.settings),this.options.entities.tags="tags"in e?e.tags:[],this.options.entities.taxes="taxes"in e?e.taxes:[]},getShortCodeEntityIds:function(){return this.$root.shortcodeData.booking?{categoryId:"category"in this.$root.shortcodeData.booking?this.$root.shortcodeData.booking.category:null,serviceId:"service"in this.$root.shortcodeData.booking?this.$root.shortcodeData.booking.service:null,employeeId:"employee"in this.$root.shortcodeData.booking?this.$root.shortcodeData.booking.employee:null,locationId:"location"in this.$root.shortcodeData.booking?this.$root.shortcodeData.booking.location:null,show:"show"in this.$root.shortcodeData.booking?this.$root.shortcodeData.booking.show:null}:{categoryId:null,serviceId:null,employeeId:null,locationId:null,show:null}},entitiesLoaded:function(){return"ameliaAppointmentEntities"in window||"ameliaEntities"in window},fillCachedEntities:function(e){var t=this.getServicesFromCategories(e.categories);e.employees.forEach(function(e){e.serviceList.forEach(function(e){Object.assign(e,t.find(function(t){return t.id===e.id}),{price:e.price,customPricing:e.customPricing,minCapacity:e.minCapacity,maxCapacity:e.maxCapacity})})}),"packages"in e&&e.packages.forEach(function(e){e.bookable.forEach(function(e){var n=t.find(function(t){return t.id===e.service.id});n&&(e.service=JSON.parse(JSON.stringify(n)))})})},fetchEntities:function(e,t){var n=this,i={params:this.getAppropriateUrlParams({lite:!0,types:t.types,dates:t.dates})};if(t.page?i.params.page=t.page:"isFrontEnd"in t&&t.isFrontEnd&&(i.params.page="booking"),void 0!==this.$store&&void 0!==this.$store.state.cabinet&&"provider"===this.$store.state.cabinet.cabinetType&&(i=Object.assign(i,this.getAuthorizationHeaderObject()),Object.assign(i.params,{source:"cabinet-"+this.$store.state.cabinet.cabinetType})),t.isPanel||"calendar"===i.params.page||this.$root.hasApiCall&&!this.entitiesLoaded())this.$http.get(this.$root.getAjaxUrl+"/entities",i).then(function(i){n.options.isFrontEnd=t.isFrontEnd,window.ameliaAppointmentEntities=i.data.data;var o=JSON.parse(JSON.stringify(window.ameliaAppointmentEntities));n.fillCachedEntities(o),n.processEntities(o),n.$root.useTranslations&&n.translateEntities(o);e(!0)}).catch(function(t){console.log(t);e(!1)});else var o=setInterval(function(){if(n.entitiesLoaded()){clearInterval(o),n.options.isFrontEnd=t.isFrontEnd;var i="ameliaEntities"in window?JSON.parse(JSON.stringify(window.ameliaEntities)):JSON.parse(JSON.stringify(window.ameliaAppointmentEntities));n.fillCachedEntities(i),n.processEntities(i),n.$root.useTranslations&&n.translateEntities(i);e(!0)}},1e3)},setMissingServices:function(e){var t=this,n=this.options.entities.services.map(function(e){return parseInt(e.id)});Object.keys(e).forEach(function(i){e[i].appointments.forEach(function(e){e.service&&-1===n.indexOf(parseInt(e.serviceId))&&(t.options.entities.services.push(e.service),n.push(parseInt(e.serviceId)))})})},getFilteredEntities:function(e,t,n){var i=this,o=this.appointment&&this.appointment.id&&this.appointment[n]?this.appointment[n]:null;return this.options.entities[t].forEach(function(t){t.disabled=-1===e.indexOf(t.id)}),this.options.entities[t].filter(function(e){return-1!==i.options.availableEntitiesIds[t].indexOf(e.id)||null!==o&&o===e.id})}},computed:{visibleLocations:function(){return this.options.entities.locations.filter(function(e){return"visible"===e.status})},visibleEmployees:function(){return this.options.entities.employees.filter(function(e){return"visible"===e.status})},visibleCustomers:function(){return this.options.entities.customers.filter(function(e){return"visible"===e.status})},visibleServices:function(){return this.options.entities.services.filter(function(e){return"visible"===e.status}).sort(this.sortWithNull)},employeesFiltered:function(){var e=this,t=void 0!==this.appointment&&"bookings"in this.appointment&&this.appointment.bookings.length?this.appointment.bookings[0].persons:null,n=this.$root.settings.roles.providerBadges.badges.map(function(e){return e.id});this.visibleEmployees.forEach(function(t){t.badgeId&&n.includes(t.badgeId)?t.badge=e.$root.settings.roles.providerBadges.badges.find(function(e){return e.id===t.badgeId}):t.badge=null});var i=this.visibleEmployees.filter(function(n){return n.serviceList.filter(function(i){return"visible"===i.status&&(null===t||i.maxCapacity>=t)&&(!e.appointment.serviceId||e.isEmployeeService(n.id,i.id)&&i.id===e.appointment.serviceId)&&(!e.appointment.locationId||e.isEmployeeServiceLocation(n.id,i.id,e.appointment.locationId))&&(!e.appointment.categoryId||n.serviceList.filter(function(t){return"visible"===t.status&&t.categoryId===e.appointment.categoryId}).length>0)}).length>0});return this.options.isFrontEnd?i:this.getFilteredEntities(i.map(function(e){return e.id}),"employees","providerId").sort(function(e,t){return e.disabled-t.disabled})},servicesFiltered:function(){var e=this,t=[];if(this.appointment.providerId){var n=this.employeesFiltered.find(function(t){return t.id===e.appointment.providerId});t=void 0!==n?n.serviceList.filter(function(e){return"visible"===e.status}).map(function(e){return e.id}):[]}var i=this.visibleServices.filter(function(n){return!(e.appointment.providerId&&-1===t.indexOf(n.id)||e.appointment.locationId&&!(e.employeesFiltered.filter(function(t){return e.isEmployeeServiceLocation(t.id,n.id,e.appointment.locationId)}).length>0)||e.appointment.categoryId&&n.categoryId!==e.appointment.categoryId)});return this.options.isFrontEnd?i:this.getFilteredEntities(i.map(function(e){return e.id}),"services","serviceId")},sortWithNull:function(){return function(e,t){return e.position===t.position?0:null===e.position?1:null===t.position?-1:e.position<t.position?-1:1}},sortNotifications:function(){return function(e,t){return e.customName===t.customName?0:null===e.customName?1:null===t.customName?-1:e.id>t.id?-1:1}},locationsFiltered:function(){var e=this,t=[];if(this.appointment.providerId){var n=this.employeesFiltered.find(function(t){return t.id===e.appointment.providerId});t=void 0!==n?n.serviceList.filter(function(e){return"visible"===e.status}):[]}var i=null;this.appointment.categoryId&&(i=this.categoriesFiltered.find(function(t){return t.id===e.appointment.categoryId}));var o=this.visibleLocations.filter(function(n){return(!e.appointment.providerId||t.filter(function(t){return e.isEmployeeServiceLocation(e.appointment.providerId,t.id,n.id)}).length>0)&&(!e.appointment.serviceId||e.employeesFiltered.filter(function(t){return e.isEmployeeServiceLocation(t.id,e.appointment.serviceId,n.id)}).length>0)&&(!e.appointment.categoryId||void 0!==i&&e.employeesFiltered.filter(function(t){return t.serviceList.filter(function(o){return"visible"===o.status&&o.categoryId===i.id&&e.isEmployeeServiceLocation(t.id,o.id,n.id)}).length>0}).length>0)});return this.options.isFrontEnd?o:this.getFilteredEntities(o.map(function(e){return e.id}),"locations","locationId").sort(function(e,t){return e.disabled-t.disabled})},couponsFilteredService:function(){var e=this,t=[];return this.options.entities.coupons&&(t=this.options.entities.coupons.filter(function(e){return e.serviceList.length>0}),this.appointment.serviceId)?t.filter(function(t){return t.serviceList.find(function(t){return t.id===e.appointment.serviceId})}):t},couponsFilteredEvent:function(){var e=this,t=[];return this.options.entities.coupons&&(t=this.options.entities.coupons.filter(function(e){return e.eventList.length>0}),this.eventId)?t.filter(function(t){return t.eventList.find(function(t){return t.id===e.eventId})}):t},categoriesFiltered:function(){var e=this,t=null;this.appointment.providerId&&(t=this.employeesFiltered.find(function(t){return t.id===e.appointment.providerId}));var n=null;this.appointment.serviceId&&(n=this.servicesFiltered.find(function(t){return t.id===e.appointment.serviceId}));var i=this.options.entities.categories.filter(function(i){return(!e.appointment.serviceId||void 0!==n&&n.categoryId===i.id)&&(!e.appointment.locationId||i.serviceList.filter(function(t){return"visible"===t.status&&e.employeesFiltered.filter(function(n){return e.isEmployeeServiceLocation(n.id,t.id,e.appointment.locationId)}).length>0}).length>0)&&(!e.appointment.providerId||void 0!==t&&-1!==t.serviceList.filter(function(t){return"visible"===t.status&&e.isEmployeeService(e.appointment.providerId,t.id)}).map(function(e){return e.categoryId}).indexOf(i.id))});return this.options.isFrontEnd?i:this.getFilteredEntities(i.map(function(e){return e.id}),"categories","categoryId").sort(function(e,t){return e.disabled-t.disabled})}}}},660:function(e,t,n){"use strict";var i=n(0),o=n.n(i);t.a={data:function(){return{timeSelectOptions:{start:"00:00",end:"23:59",step:this.secondsToTimeSelectStep(this.getTimeSlotLength())}}},methods:{convertDateTimeRangeDifferenceToMomentDuration:function(e,t){return o.a.duration(o()(t).diff(o()(e)))},convertSecondsToMomentDuration:function(e){return o.a.duration(e,"seconds")},momentDurationToNiceDurationWithUnit:function(e){var t=Math.floor(e.asMinutes()/60),n=e.asMinutes()%60;return(t?t+this.$root.labels.h+" ":"")+" "+(n?n+this.$root.labels.min:"")},secondsToNiceDuration:function(e){var t=Math.floor(e/3600),n=e/60%60;return(t?t+this.$root.labels.h+" ":"")+" "+(n?n+this.$root.labels.min:"")},secondsToTimeSelectStep:function(e){var t=Math.floor(e/3600),n=Math.floor(e/60)-60*t;return e<0?(t||"00")+":"+((n<9?"0"+n:n)||"00"):((t<=9?"0"+t:t)||"00")+":"+((n<=9?"0"+n:n)||"00")},getTimeSlotLength:function(){return this.$root.settings.general.timeSlotLength},getPossibleDurationsInSeconds:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:86400,n=this.getTimeSlotLength(),i=[],o=n;o<=t;o+=n)i.push(o);return e&&-1===i.indexOf(e)&&(i.push(e),i.sort(function(e,t){return e-t})),i},getTimeSelectOptionsWithLimits:function(e,t){return{start:"00:00",end:"24:00",step:this.secondsToTimeSelectStep(this.getTimeSlotLength()),minTime:e,maxTime:t}},getSecondsInStringTime:function(e){return o.a.utc(1e3*e).format("HH:mm")},getStringTimeInSeconds:function(e){return o()(e,"HH:mm").diff(o()().startOf("day"),"seconds")}}}},661:function(e,t,n){"use strict";var i=n(657);t.a={mixins:[i.a],methods:{isDurationPricingEnabled:function(e){return null!==e&&("duration"===e.enabled||!0===e.enabled)&&"durations"in e},isPersonPricingEnabled:function(e){return null!==e&&"person"===e.enabled&&"persons"in e},isPeriodPricingEnabled:function(e){return null!==e&&"period"===e.enabled&&"periods"in e&&!this.$root.licence.isLite&&!this.$root.licence.isStarter&&!this.$root.licence.isBasic},getBookingServicePrice:function(e,t,n,i,o){return this.isDurationPricingEnabled(e.customPricing)?this.getBookingDurationPrice(e,t):this.isPersonPricingEnabled(e.customPricing)?this.getBookingPersonPrice(e,n):this.isPeriodPricingEnabled(e.customPricing)&&i&&o?this.getBookingPeriodPrice(e,parseInt(i),o):e.price},getBookingDurationPrice:function(e,t){return t&&e.customPricing.durations.filter(function(e){return e.duration===t}).length?e.customPricing.durations.find(function(e){return e.duration===t}).price:e.price},getBookingPersonPrice:function(e,t){var n=e.customPricing.persons.map(function(e){return e.range}).sort(function(e,t){return t.range-e.range});if(t&&n.length){var i=n.filter(function(e){return e>=t}),o=0===i.length?n[n.length-1]:i[0];return e.customPricing.persons.find(function(e){return e.range===o}).price}return e.price},getBookingPeriodPrice:function(e,t,n){var i=n.split(" ");if(i[0]in this.pricedCalendarTimeSlots&&i[1].substr(0,5)in this.pricedCalendarTimeSlots[i[0]]){var o=this.pricedCalendarTimeSlots[i[0]][i[1].substr(0,5)].filter(function(e){return e.e===t});return o.length?o[0].p:e.price}return e.price}}}},662:function(e,t,n){(function(n){var i,o,a,s;s=void 0!==n?n:this.window||this.global,o=[],i=function(e){var t,n={},i=!!document.querySelector&&!!e.addEventListener,o={initClass:"js-inlinesvg",svgSelector:"img.svg"},a=function(){var e={},t=!1,n=0,i=arguments.length;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(t=arguments[0],n++);for(var o=function(n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t&&"[object Object]"===Object.prototype.toString.call(n[i])?e[i]=a(!0,e[i],n[i]):e[i]=n[i])};i>n;n++){o(arguments[n])}return e},s=function(e){var n=document.querySelectorAll(t.svgSelector),i=function(e,t){return function(){return--e<1?t.apply(this,arguments):void 0}}(n.length,e);Array.prototype.forEach.call(n,function(e,n){var o=e.src||e.getAttribute("data-src"),a=e.attributes,s=new XMLHttpRequest;s.open("GET",o,!0),s.onload=function(){if(s.status>=200&&s.status<400){var n=(new DOMParser).parseFromString(s.responseText,"text/xml").getElementsByTagName("svg")[0];if(n.removeAttribute("xmlns:a"),n.removeAttribute("width"),n.removeAttribute("height"),n.removeAttribute("x"),n.removeAttribute("y"),n.removeAttribute("enable-background"),n.removeAttribute("xmlns:xlink"),n.removeAttribute("xml:space"),n.removeAttribute("version"),Array.prototype.slice.call(a).forEach(function(e){"src"!==e.name&&"alt"!==e.name&&n.setAttribute(e.name,e.value)}),n.classList?n.classList.add("inlined-svg"):n.className+=" inlined-svg",n.setAttribute("role","img"),a.longdesc){var o=document.createElementNS("http://www.w3.org/2000/svg","desc"),r=document.createTextNode(a.longdesc.value);o.appendChild(r),n.insertBefore(o,n.firstChild)}if(a.alt){n.setAttribute("aria-labelledby","title");var l=document.createElementNS("http://www.w3.org/2000/svg","title"),c=document.createTextNode(a.alt.value);l.appendChild(c),n.insertBefore(l,n.firstChild)}e.parentNode.replaceChild(n,e),i(t.svgSelector)}else console.error("There was an error retrieving the source of the SVG.")},s.onerror=function(){console.error("There was an error connecting to the origin server.")},s.send()})};return n.init=function(e,n){i&&(t=a(o,e||{}),s(n||function(){}),document.documentElement.className+=" "+t.initClass)},n}(s),void 0===(a="function"==typeof i?i.apply(t,o):i)||(e.exports=a)}).call(t,n(37))},663:function(e,t,n){"use strict";t.a={data:function(){return{}},methods:{isCustomFieldVisible:function(e,t,n){switch(t){case"appointment":return-1!==e.services.map(function(e){return e.id}).indexOf(n)||e.allServices;case"event":return-1!==e.events.map(function(e){return e.id}).indexOf(n)||e.allEvents}return!1},getAllowedCustomFields:function(e,t,n){var i=[];this.options.entities.customFields.forEach(function(e){"services"===t&&e.allServices||"events"===t&&e.allEvents?i.push(parseInt(e.id)):e[t].forEach(function(t){t.id===n&&i.push(parseInt(e.id))})});var o={};for(var a in e)-1!==i.indexOf(parseInt(a))&&(o[a]=e[a]);return o},setBookingCustomFields:function(){if(this.appointment&&this.appointment.bookings&&this.appointment.bookings.length)for(var e=0;e<this.appointment.bookings.length;e++)for(var t=0;t<this.options.entities.customFields.length;t++)if(null===this.appointment.bookings[e].customFields&&(this.appointment.bookings[e].customFields={}),void 0!==this.appointment.bookings[e].customFields[this.options.entities.customFields[t].id]&&(this.appointment.bookings[e].customFields[this.options.entities.customFields[t].id].type=this.options.entities.customFields[t].type),void 0!==this.appointment.bookings[e].customFields[this.options.entities.customFields[t].id]&&"datepicker"===this.appointment.bookings[e].customFields[this.options.entities.customFields[t].id].type&&this.appointment.bookings[e].customFields[this.options.entities.customFields[t].id].value&&(this.appointment.bookings[e].customFields[this.options.entities.customFields[t].id].value=this.$moment(this.appointment.bookings[e].customFields[this.options.entities.customFields[t].id].value).toDate()),"content"!==this.options.entities.customFields[t].type&&void 0===this.appointment.bookings[e].customFields[this.options.entities.customFields[t].id]){var n="";"checkbox"===this.options.entities.customFields[t].type&&(n=[]),"datepicker"===this.options.entities.customFields[t].type&&(n=null),this.$set(this.appointment.bookings[e].customFields,this.options.entities.customFields[t].id,{label:this.options.entities.customFields[t].label,value:n,type:this.options.entities.customFields[t].type})}},getCustomFieldOptions:function(e){return e.map(function(e){return e.label})},getCustomFieldValue:function(e,t){return Array.isArray(e)?e.join("; "):"datepicker"!==t?e:e?this.getFrontedFormattedDate(e):null},getCustomFieldFileURL:function(e,t,n){return this.$root.getAjaxUrl+"/fields/"+e+"/"+t+"/"+n+"&source=cabinet-provider"}}}},664:function(e,t,n){"use strict";t.a={data:function(){return{screenWidth:window.innerWidth}},mounted:function(){var e=this;window.onresize=function(){e.screenWidth=window.innerWidth}}}},666:function(e,t,n){"use strict";t.a={methods:{getEntityTax:function(e,t){var n=[];"taxes"in this&&this.taxes&&this.taxes.length?n=this.taxes:"options"in this&&"entities"in this.options&&"taxes"in this.options.entities&&this.options.entities.taxes&&this.options.entities.taxes.length&&(n=this.options.entities.taxes);var i=n.find(function(n){return n[t+"List"].find(function(t){return t.id===e})});return!i||void 0===i||"status"in i&&"visible"!==i.status?null:i},getEntityTaxAmount:function(e,t){switch(e.type){case"percentage":return this.getPercentage(t,e.amount);case"fixed":return e.amount}},getAmountData:function(e,t,n){e&&!e.excluded&&(t=this.getBaseAmount(t,e));var i=n?t/100*n.discount+n.deduction:0,o=0;return e&&(o=this.getEntityTaxAmount(e,t-i)),{total:t,discount:i,tax:o}},getEventBookingPriceAmount:function(e){var t=0;return e.ticketsData&&e.ticketsData.length?e.ticketsData.forEach(function(n){t+=n.price*(e.aggregatedPrice?n.persons:1)}):t=e.price*(e.aggregatedPrice?e.persons:1),this.getAmountData(e.tax&&e.tax.length?e.tax[0]:null,t,e.coupon)},getAppointmentPriceAmount:function(e,t,n,i,o){var a=this,s=null,r=this.$root.settings.payments.taxes.excluded,l=this.$root.settings.payments.taxes.enabled;"tax"in e?(r=(s=e.tax&&e.tax.length?e.tax[0]:null)?s.excluded:r,l=null!==s):l&&(s=this.getEntityTax(e.id,"service"));var c=(e.aggregatedPrice?n:1)*e.price,u=0,d=0,p=0,m=0;if(i){u=c,d=c,l&&s&&!r&&(c=this.getBaseAmount(c,s));var f=i.discount?this.getPercentage(c,i.discount):0,h=c-f;c=h;var g=i.deduction,v=0;if(h>0&&g>0&&(c=h-(v=h>=g?g:h),g=h>=g?0:g-h),l&&s&&r)m=this.getEntityTaxAmount(s,c);else if(l&&s&&!r){c=this.getBaseAmount((e.aggregatedPrice?n:1)*e.price,s);var b=this.getEntityTaxAmount(s,c-f-v);o?u=c+b:(u=c,d=c,m=b)}p=f+v,t.forEach(function(t){var s=null,r=a.$root.settings.payments.taxes.excluded,l=a.$root.settings.payments.taxes.enabled;"tax"in t?(t.tax&&!Array.isArray(t.tax)&&(t.tax=JSON.parse(t.tax)),r=(s=t.tax&&t.tax.length?t.tax[0]:null)?s.excluded:r,l=null!==s):l&&(s=a.getEntityTax(t.extraId,"extra"));var c=null===t.aggregatedPrice?e.aggregatedPrice:t.aggregatedPrice,d=t.price*t.quantity*(c?n:1),f=d;l&&s&&!r&&(d=a.getBaseAmount(d,s));var h=i.discount?a.getPercentage(d,i.discount):0,v=d-h;d=v;var b=0;if(v>0&&g>0&&(d=v-(b=v>=g?g:v),g=v>=g?0:g-v),l&&s&&r)m+=a.getEntityTaxAmount(s,d);else if(l&&s&&!r){d=a.getBaseAmount(t.price*t.quantity*(c?n:1),s);var y=a.getEntityTaxAmount(s,d-h-b);o?f=d+y:(f=d,m+=y)}else!l||s||r||(f=t.price*t.quantity*(c?n:1));u+=f,p+=h+b})}else l&&s&&r?m=this.getEntityTaxAmount(s,c):l&&s&&!r&&!o&&(c=this.getBaseAmount((e.aggregatedPrice?n:1)*e.price,s),m=this.getEntityTaxAmount(s,c)),u=c,d=c,t.forEach(function(t){var i=null===t.aggregatedPrice?e.aggregatedPrice:t.aggregatedPrice,s=t.price*t.quantity*(i?n:1),r=null,l=a.$root.settings.payments.taxes.excluded,c=a.$root.settings.payments.taxes.enabled;"tax"in t?(t.tax&&!Array.isArray(t.tax)&&(t.tax=JSON.parse(t.tax)),l=(r=t.tax&&t.tax.length?t.tax[0]:null)?r.excluded:l,c=null!==r):c&&(r=a.getEntityTax(t.extraId,"extra")),c&&r&&l?m+=a.getEntityTaxAmount(r,s):c&&r&&!l&&!o&&(s=a.getBaseAmount(t.price*t.quantity*(i?n:1),r),m+=a.getEntityTaxAmount(r,s)),u+=s});return{total:u,totalBookable:d,discount:p,tax:m}},getBaseAmount:function(e,t){switch(t.type){case"percentage":return e/(1+t.amount/100);case"fixed":return e-t.amount}},getPercentage:function(e,t){return e*t/100},getRound:function(e){return Math.round(100*e)/100}}}},667:function(e,t,n){"use strict";t.a={data:function(){return{defaultFormsData:{stepByStepForm:{selectServiceForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{serviceHeadingFormField:{labels:{please_select_service:{value:"",translations:{x:""}},book_appointment:{value:"",translations:{x:""}}},visibility:!0}},itemsDraggable:{serviceFormField:{labels:{service:{value:"",translations:{x:""}}}},servicePackageFormField:{labels:{package_available:{value:"",translations:{x:""}},package_discount_text:{value:"",translations:{x:""}}},visibility:!0},locationFormField:{labels:{locations:{value:"",translations:{x:""}}},visibility:!0,required:!1},employeeFormField:{labels:{employee:{value:"",translations:{x:""}},any_employee:{value:"",translations:{x:""}}},visibility:!0,required:!1,anyEmployeeVisible:!0},bringingFormField:{labels:{bringing_anyone_with_you:{value:"",translations:{x:""}},number_of_additional_persons:{value:"",translations:{x:""}}}},addExtraFormField:{labels:{add_extra:{value:"",translations:{x:""}},extra_colon:{value:"",translations:{x:""}},qty_colon:{value:"",translations:{x:""}},duration_colon:{value:"",translations:{x:""}},price_colon:{value:"",translations:{x:""}}},visibility:!0}}},calendarDateTimeForm:{globalSettings:{formTextColor:"#ffffff",formGradientColor1:"#1A84EE",formGradientColor2:"#0454A2",formGradientAngle:135},itemsStatic:{timeZoneFormField:{visibility:!1},calendarHeadingFormField:{labels:{pick_date_and_time:{value:"",translations:{x:""}}},visibility:!0},calendarAppointmentFormField:{endDateVisibility:!0},recurringSwitchFormField:{labels:{recurring_active:{value:"",translations:{x:""}}},visibility:!0}}},recurringSetupForm:{globalSettings:{formTextColor:"#ffffff",formGradientColor1:"#1A84EE",formGradientColor2:"#0454A2",formGradientAngle:135,formInputColor:"rgba(0, 0, 0, 0)",formInputTextColor:"#ffffff",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{recurringSetupHeadingFormField:{labels:{recurring_active:{value:"",translations:{x:""}}},visibility:!0},recurringSettingsFormField:{labels:{recurring_repeat:{value:"",translations:{x:""}},recurring_every:{value:"",translations:{x:""}},recurring_on:{value:"",translations:{x:""}},recurring_until:{value:"",translations:{x:""}},recurring_times:{value:"",translations:{x:""}}}}}},recurringDatesForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{recurringDatesHeadingFormField:{labels:{recurring_appointments:{value:"",translations:{x:""}},recurring_edit:{value:"",translations:{x:""}}},visibility:!0},recurringInfoFormField:{labels:{date:{value:"",translations:{x:""}},time:{value:"",translations:{x:""}}}}}},selectPackageForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{packageHeadingFormField:{labels:{please_select_package:{value:"",translations:{x:""}}},visibility:!0},packageFormField:{labels:{package_colon:{value:"",translations:{x:""}}}}}},packageInfoForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052"},itemsStatic:{packageInfoFormField:{labels:{package_discount_text:{value:"",translations:{x:""}},employee:{value:"",translations:{x:""}},employees:{value:"",translations:{x:""}}}}}},packageSetupForm:{globalSettings:{formTextColor:"#ffffff",formGradientColor1:"#1A84EE",formGradientColor2:"#0454A2",formGradientAngle:135,formInputColor:"rgba(0, 0, 0, 0.1)",formInputTextColor:"#ffffff",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{packageEmployeeFormField:{labels:{employee:{value:"",translations:{x:""}},any_employee:{value:"",translations:{x:""}}},anyEmployeeVisible:!0},packageLocationFormField:{labels:{location:{value:"",translations:{x:""}}}},packageRulesFormField:{labels:{package_min_book:{value:"",translations:{x:""}},package_min_book_plural:{value:"",translations:{x:""}}}},packageCalendarFormField:{labels:{no_selected_slot_requirements:{value:"",translations:{x:""}}},endDateVisibility:!0,timeZoneVisibility:!0}}},packageListForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052"},itemsStatic:{packageListFormField:{labels:{package_list_overview:{value:"",translations:{x:""}},appointments:{value:"",translations:{x:""}},appointment:{value:"",translations:{x:""}},date:{value:"",translations:{x:""}},time:{value:"",translations:{x:""}},employee:{value:"",translations:{x:""}},location:{value:"",translations:{x:""}}}}}},confirmBookingForm:{appointment:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{confirmServiceHeadingFormField:{visibility:!0},confirmHeadingDataFormField:{labels:{employee:{value:"",translations:{x:""}},date_colon:{value:"",translations:{x:""}},time_colon:{value:"",translations:{x:""}},location_colon:{value:"",translations:{x:""}}},visibility:!0},recurringStringFormField:{labels:{recurring_active:{value:"",translations:{x:""}}},visibility:!0},paymentTypeFormField:{labels:{payment_type_colon:{value:"",translations:{x:""}},payment_type_deposit_only:{value:"",translations:{x:""}},payment_type_full_amount:{value:"",translations:{x:""}}}},paymentMethodFormField:{labels:{payment_method_colon:{value:"",translations:{x:""}},payment_btn_on_site:{value:"",translations:{x:""}},payment_btn_stripe:{value:"",translations:{x:""}},payment_btn_mollie:{value:"",translations:{x:""}}},switchPaymentMethodView:"Buttons",switchPaymentMethodViewOptions:[{id:1,name:this.$root.labels.buttons},{id:2,name:this.$root.labels.select}]},stripeCardFormField:{labels:{credit_or_debit_card_colon:{value:"",translations:{x:""}}}},priceFormFiled:{labels:{total_number_of_persons:{value:"",translations:{x:""}},base_price_colon:{value:"",translations:{x:""}},extras_costs_colon:{value:"",translations:{x:""}},subtotal_colon:{value:"",translations:{x:""}},discount_amount_colon:{value:"",translations:{x:""}},deposit:{value:"",translations:{x:""}},recurring_costs_colon:{value:"",translations:{x:""}},pay_now:{value:"",translations:{x:""}},pay_later:{value:"",translations:{x:""}},total_cost_colon:{value:"",translations:{x:""}}}}},itemsDraggable:{firstNameFormField:{labels:{first_name_colon:{value:"",translations:{x:""}}}},lastNameFormField:{labels:{last_name_colon:{value:"",translations:{x:""}}},visibility:!0,required:!0},emailFormField:{labels:{email_colon:{value:"",translations:{x:""}}},visibility:!0,required:this.$root.settings.general.requiredEmailField},phoneFormField:{labels:{phone_colon:{value:"",translations:{x:""}}},visibility:!0,required:this.$root.settings.general.requiredPhoneNumberField}}},package:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{paymentTypeFormField:{labels:{payment_type_colon:{value:"",translations:{x:""}},payment_type_deposit_only:{value:"",translations:{x:""}},payment_type_full_amount:{value:"",translations:{x:""}}}},paymentMethodFormField:{labels:{payment_method_colon:{value:"",translations:{x:""}},payment_btn_on_site:{value:"",translations:{x:""}},payment_btn_stripe:{value:"",translations:{x:""}},payment_btn_mollie:{value:"",translations:{x:""}}},switchPaymentMethodView:"Buttons",switchPaymentMethodViewOptions:[{id:1,name:this.$root.labels.buttons},{id:2,name:this.$root.labels.select}]},stripeCardFormField:{labels:{credit_or_debit_card_colon:{value:"",translations:{x:""}}}},priceFormFiled:{labels:{base_price_colon:{value:"",translations:{x:""}},subtotal_colon:{value:"",translations:{x:""}},deposit:{value:"",translations:{x:""}},pay_now:{value:"",translations:{x:""}},pay_later:{value:"",translations:{x:""}},total_cost_colon:{value:"",translations:{x:""}}}}},itemsDraggable:{firstNameFormField:{labels:{first_name_colon:{value:"",translations:{x:""}}}},lastNameFormField:{labels:{last_name_colon:{value:"",translations:{x:""}}},visibility:!0,required:!0},emailFormField:{labels:{email_colon:{value:"",translations:{x:""}}},visibility:!0,required:this.$root.settings.general.requiredEmailField},phoneFormField:{labels:{phone_colon:{value:"",translations:{x:""}}},visibility:!0,required:this.$root.settings.general.requiredPhoneNumberField}}}},congratulationsForm:{appointment:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052",formImageColor:"#1A84EE"},itemsStatic:{congratulationsHeadingFormField:{labels:{congratulations:{value:"",translations:{x:""}}},visibility:!0},congratulationsImageFormField:{visibility:!0},congratulationsMessagesFormField:{labels:{booking_completed_approved:{value:"",translations:{x:""}},booking_completed_pending:{value:"",translations:{x:""}}},visibility:!0},addToCalendarFormField:{addToCalendarVisibility:!0}}},package:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052",formImageColor:"#1A84EE"},itemsStatic:{congratulationsHeadingFormField:{labels:{congratulations:{value:"",translations:{x:""}}},visibility:!0},congratulationsImageFormField:{visibility:!0},congratulationsMessagesFormField:{labels:{booking_completed_approved:{value:"",translations:{x:""}},booking_completed_pending:{value:"",translations:{x:""}}},visibility:!0},addToCalendarFormField:{addToCalendarVisibility:!0}}}}},catalogForm:{catalogListForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052"},labels:{categories:{value:"",translations:{x:""},visibility:!0},services_lower:{value:"",translations:{x:""},visibility:!0}},parts:{service_images_thumbs:{visibility:!0}}},categoryListForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052"},labels:{back:{value:"",translations:{x:""}},view_more:{value:"",translations:{x:""}},price_colon:{value:"",translations:{x:""}},services:{value:"",translations:{x:""}},package:{value:"",translations:{x:""}},package_discount_text:{value:"",translations:{x:""}}},parts:{service_badge:{visibility:!0},service_price:{visibility:!0},service_employees_list:{visibility:!0},package_badge:{visibility:!0},package_price:{visibility:!0},package_services_list:{visibility:!0}}},categoryServiceForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052"},labels:{capacity_colon:{value:"",translations:{x:""}},duration_colon:{value:"",translations:{x:""}},description:{value:"",translations:{x:""}},service_info:{value:"",translations:{x:""}},category_colon:{value:"",translations:{x:""}},extras:{value:"",translations:{x:""}},price_colon:{value:"",translations:{x:""}},maximum_quantity_colon:{value:"",translations:{x:""}},description_colon:{value:"",translations:{x:""}},employees:{value:"",translations:{x:""}}},parts:{capacity_colon:{visibility:!0},duration_colon:{visibility:!0},description:{visibility:!0},service_info:{visibility:!0},extras:{visibility:!0},employees:{visibility:!0}}},categoryPackageForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052"},parts:{package_rules_description:{visibility:!0},selected_services:{visibility:!0}}},selectServiceForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{serviceHeadingFormField:{labels:{book_appointment:{value:"",translations:{x:""}}},visibility:!0}},itemsDraggable:{locationFormField:{labels:{locations:{value:"",translations:{x:""}}},visibility:!0,required:!1},employeeFormField:{labels:{employee:{value:"",translations:{x:""}},any_employee:{value:"",translations:{x:""}}},visibility:!0,required:!1,anyEmployeeVisible:!0},bringingFormField:{labels:{bringing_anyone_with_you:{value:"",translations:{x:""}},number_of_additional_persons:{value:"",translations:{x:""}}}},addExtraFormField:{labels:{add_extra:{value:"",translations:{x:""}},extra_colon:{value:"",translations:{x:""}},qty_colon:{value:"",translations:{x:""}},duration_colon:{value:"",translations:{x:""}},price_colon:{value:"",translations:{x:""}}},visibility:!0}}},calendarDateTimeForm:{globalSettings:{formTextColor:"#ffffff",formGradientColor1:"#1A84EE",formGradientColor2:"#0454A2",formGradientAngle:135},itemsStatic:{timeZoneFormField:{visibility:!1},calendarHeadingFormField:{labels:{pick_date_and_time:{value:"",translations:{x:""}}},visibility:!0},calendarAppointmentFormField:{endDateVisibility:!0},recurringSwitchFormField:{labels:{recurring_active:{value:"",translations:{x:""}}},visibility:!0}}},recurringSetupForm:{globalSettings:{formTextColor:"#ffffff",formGradientColor1:"#1A84EE",formGradientColor2:"#0454A2",formGradientAngle:135,formInputColor:"rgba(0, 0, 0, 0)",formInputTextColor:"#ffffff",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{recurringSetupHeadingFormField:{labels:{recurring_active:{value:"",translations:{x:""}}},visibility:!0},recurringSettingsFormField:{labels:{recurring_repeat:{value:"",translations:{x:""}},recurring_every:{value:"",translations:{x:""}},recurring_on:{value:"",translations:{x:""}},recurring_until:{value:"",translations:{x:""}},recurring_times:{value:"",translations:{x:""}}}}}},recurringDatesForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{recurringDatesHeadingFormField:{labels:{recurring_appointments:{value:"",translations:{x:""}},recurring_edit:{value:"",translations:{x:""}}},visibility:!0},recurringInfoFormField:{labels:{date:{value:"",translations:{x:""}},time:{value:"",translations:{x:""}}}}}},packageSetupForm:{globalSettings:{formTextColor:"#ffffff",formGradientColor1:"#1A84EE",formGradientColor2:"#0454A2",formGradientAngle:135,formInputColor:"rgba(0, 0, 0, 0.1)",formInputTextColor:"#ffffff",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{packageEmployeeFormField:{labels:{employee:{value:"",translations:{x:""}},any_employee:{value:"",translations:{x:""}}},anyEmployeeVisible:!0},packageLocationFormField:{labels:{location:{value:"",translations:{x:""}}}},packageRulesFormField:{labels:{package_min_book:{value:"",translations:{x:""}},package_min_book_plural:{value:"",translations:{x:""}}}},packageCalendarFormField:{labels:{no_selected_slot_requirements:{value:"",translations:{x:""}}},endDateVisibility:!0,timeZoneVisibility:!0}}},packageListForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052"},itemsStatic:{packageListFormField:{labels:{appointments:{value:"",translations:{x:""}},appointment:{value:"",translations:{x:""}},date:{value:"",translations:{x:""}},time:{value:"",translations:{x:""}},employee:{value:"",translations:{x:""}},location:{value:"",translations:{x:""}}}}}},confirmBookingForm:{appointment:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{confirmServiceHeadingFormField:{visibility:!0},confirmHeadingDataFormField:{labels:{employee:{value:"",translations:{x:""}},date_colon:{value:"",translations:{x:""}},time_colon:{value:"",translations:{x:""}},location_colon:{value:"",translations:{x:""}}},visibility:!0},recurringStringFormField:{labels:{recurring_active:{value:"",translations:{x:""}}},visibility:!0},paymentTypeFormField:{labels:{payment_type_colon:{value:"",translations:{x:""}},payment_type_deposit_only:{value:"",translations:{x:""}},payment_type_full_amount:{value:"",translations:{x:""}}}},paymentMethodFormField:{labels:{payment_method_colon:{value:"",translations:{x:""}},payment_btn_on_site:{value:"",translations:{x:""}},payment_btn_stripe:{value:"",translations:{x:""}},payment_btn_mollie:{value:"",translations:{x:""}}},switchPaymentMethodView:"Buttons",switchPaymentMethodViewOptions:[{id:1,name:this.$root.labels.buttons},{id:2,name:this.$root.labels.select}]},stripeCardFormField:{labels:{credit_or_debit_card_colon:{value:"",translations:{x:""}}}},priceFormFiled:{labels:{total_number_of_persons:{value:"",translations:{x:""}},base_price_colon:{value:"",translations:{x:""}},extras_costs_colon:{value:"",translations:{x:""}},subtotal_colon:{value:"",translations:{x:""}},discount_amount_colon:{value:"",translations:{x:""}},deposit:{value:"",translations:{x:""}},recurring_costs_colon:{value:"",translations:{x:""}},pay_now:{value:"",translations:{x:""}},pay_later:{value:"",translations:{x:""}},total_cost_colon:{value:"",translations:{x:""}}}}},itemsDraggable:{firstNameFormField:{labels:{first_name_colon:{value:"",translations:{x:""}}}},lastNameFormField:{labels:{last_name_colon:{value:"",translations:{x:""}}},visibility:!0,required:!0},emailFormField:{labels:{email_colon:{value:"",translations:{x:""}}},visibility:!0,required:this.$root.settings.general.requiredEmailField},phoneFormField:{labels:{phone_colon:{value:"",translations:{x:""}}},visibility:!0,required:this.$root.settings.general.requiredPhoneNumberField}}},package:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{paymentTypeFormField:{labels:{payment_type_colon:{value:"",translations:{x:""}},payment_type_deposit_only:{value:"",translations:{x:""}},payment_type_full_amount:{value:"",translations:{x:""}}}},paymentMethodFormField:{labels:{payment_method_colon:{value:"",translations:{x:""}},payment_btn_on_site:{value:"",translations:{x:""}},payment_btn_stripe:{value:"",translations:{x:""}},payment_btn_mollie:{value:"",translations:{x:""}}},switchPaymentMethodView:"Buttons",switchPaymentMethodViewOptions:[{id:1,name:this.$root.labels.buttons},{id:2,name:this.$root.labels.select}]},stripeCardFormField:{labels:{credit_or_debit_card_colon:{value:"",translations:{x:""}}}},priceFormFiled:{labels:{base_price_colon:{value:"",translations:{x:""}},subtotal_colon:{value:"",translations:{x:""}},deposit:{value:"",translations:{x:""}},pay_now:{value:"",translations:{x:""}},pay_later:{value:"",translations:{x:""}},total_cost_colon:{value:"",translations:{x:""}}}}},itemsDraggable:{firstNameFormField:{labels:{first_name_colon:{value:"",translations:{x:""}}}},lastNameFormField:{labels:{last_name_colon:{value:"",translations:{x:""}}},visibility:!0,required:!0},emailFormField:{labels:{email_colon:{value:"",translations:{x:""}}},visibility:!0,required:this.$root.settings.general.requiredEmailField},phoneFormField:{labels:{phone_colon:{value:"",translations:{x:""}}},visibility:!0,required:this.$root.settings.general.requiredPhoneNumberField}}}},congratulationsForm:{appointment:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052",formImageColor:"#1A84EE"},itemsStatic:{congratulationsHeadingFormField:{labels:{congratulations:{value:"",translations:{x:""}}},visibility:!0},congratulationsImageFormField:{visibility:!0},congratulationsMessagesFormField:{labels:{booking_completed_approved:{value:"",translations:{x:""}},booking_completed_pending:{value:"",translations:{x:""}}},visibility:!0},addToCalendarFormField:{addToCalendarVisibility:!0}}},package:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052",formImageColor:"#1A84EE"},itemsStatic:{congratulationsHeadingFormField:{labels:{congratulations:{value:"",translations:{x:""}}},visibility:!0},congratulationsImageFormField:{visibility:!0},congratulationsMessagesFormField:{labels:{booking_completed_approved:{value:"",translations:{x:""}},booking_completed_pending:{value:"",translations:{x:""}}},visibility:!0},addToCalendarFormField:{addToCalendarVisibility:!0}}}}},eventListForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},eventFilterForm:{itemsStatic:{eventFilterFormField:{labels:{event_type:{value:"",translations:{x:""}},event_location:{value:"",translations:{x:""}}},parts:{ev_spots_number:{visibility:!0}}}}},eventDetailsForm:{itemsStatic:{eventDetailsFormField:{labels:{open:{value:"",translations:{x:""}},closed:{value:"",translations:{x:""}},canceled:{value:"",translations:{x:""}},full:{value:"",translations:{x:""}},upcoming:{value:"",translations:{x:""}},event_capacity:{value:"",translations:{x:""},visibility:!0},location:{visibility:!0},event_date:{visibility:!0},time_zone:{visibility:!1},event_free:{value:"",translations:{x:""}},event_price:{visibility:!0},event_about:{value:"",translations:{x:""}},event_book:{value:"",translations:{x:""},visibility:!0},event_book_persons:{value:"",translations:{x:""}},ev_spot:{value:"",translations:{x:""}},ev_spots:{value:"",translations:{x:""}},ev_no_spots:{value:"",translations:{x:""}}},parts:{ev_spots_number:{visibility:!0}},showSingleEvent:!0}}},confirmBookingForm:{event:{itemsStatic:{paymentTypeFormField:{labels:{payment_type_colon:{value:"",translations:{x:""}},payment_type_deposit_only:{value:"",translations:{x:""}},payment_type_full_amount:{value:"",translations:{x:""}}}},paymentMethodFormField:{labels:{payment_method_colon:{value:"",translations:{x:""}},payment_btn_on_site:{value:"",translations:{x:""}},payment_btn_stripe:{value:"",translations:{x:""}},payment_btn_mollie:{value:"",translations:{x:""}}},switchPaymentMethodView:"Buttons",switchPaymentMethodViewOptions:[{id:1,name:this.$root.labels.buttons},{id:2,name:this.$root.labels.select}]},stripeCardFormField:{labels:{credit_or_debit_card_colon:{value:"",translations:{x:""}}}},priceFormFiled:{labels:{total_number_of_persons:{value:"",translations:{x:""}},base_price_colon:{value:"",translations:{x:""}},subtotal_colon:{value:"",translations:{x:""}},discount_amount_colon:{value:"",translations:{x:""}},deposit:{value:"",translations:{x:""}},recurring_costs_colon:{value:"",translations:{x:""}},pay_now:{value:"",translations:{x:""}},pay_later:{value:"",translations:{x:""}},total_cost_colon:{value:"",translations:{x:""}}}}},itemsDraggable:{firstNameFormField:{labels:{first_name_colon:{value:"",translations:{x:""}}}},lastNameFormField:{labels:{last_name_colon:{value:"",translations:{x:""}}},visibility:!0,required:!0},emailFormField:{labels:{email_colon:{value:"",translations:{x:""}}},visibility:!0,required:this.$root.settings.general.requiredEmailField},phoneFormField:{labels:{phone_colon:{value:"",translations:{x:""}}},visibility:!0,required:this.$root.settings.general.requiredPhoneNumberField}}}},congratulationsForm:{event:{itemsStatic:{congratulationsHeadingFormField:{labels:{congratulations:{value:"",translations:{x:""}}},visibility:!0},congratulationsImageFormField:{visibility:!0},congratulationsMessagesFormField:{labels:{booking_completed_approved:{value:"",translations:{x:""}},booking_completed_pending:{value:"",translations:{x:""}}},visibility:!0},addToCalendarFormField:{addToCalendarVisibility:!0}}}}},eventCalendarForm:{selectEventCalendarForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#f2f3f5",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},labels:{event_today:{value:"",translations:{x:""}},event_filters:{value:"",translations:{x:""}},event_location:{value:"",translations:{x:""}},event_type:{value:"",translations:{x:""}},event_status:{value:"",translations:{x:""}},event_employee:{value:"",translations:{x:""}},event_spot:{value:"",translations:{x:""}},event_spots_left:{value:"",translations:{x:""}},event_no_spots:{value:"",translations:{x:""}},event_day:{value:"",translations:{x:""}},event_upcoming_events:{value:"",translations:{x:""}},event_free:{value:"",translations:{x:""}},event_upcoming_empty:{value:"",translations:{x:""}},event:{value:"",translations:{x:""}},events:{value:"",translations:{x:""}},open:{value:"",translations:{x:""}},full:{value:"",translations:{x:""}},upcoming:{value:"",translations:{x:""}},closed:{value:"",translations:{x:""}},canceled:{value:"",translations:{x:""}}},parts:{ev_spots_number:{visibility:!0},upcoming_events_block:{visibility:!0},event_capacity_block:{visibility:!0},event_location_block:{visibility:!0},event_price_block:{visibility:!0},event_day_block:{visibility:!0}}},infoEventCalendarForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052"},labels:{event_book_now:{value:"",translations:{x:""}},event_show_less:{value:"",translations:{x:""}},event_schedule:{value:"",translations:{x:""}},event_hosted_by:{value:"",translations:{x:""}}},parts:{event_range_block:{visibility:!0},event_capacity_block:{visibility:!0},event_location_block:{visibility:!0},event_price_block:{visibility:!0}}},inviteEventCalendarForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052"},labels:{event_book_event:{value:"",translations:{x:""}},event_many_people:{value:"",translations:{x:""}},event_book_persons:{value:"",translations:{x:""}},ev_spot:{value:"",translations:{x:""}},ev_spots:{value:"",translations:{x:""}},ev_no_spots:{value:"",translations:{x:""}}},parts:{ev_spots_number:{visibility:!0},event_range_block:{visibility:!0},event_capacity_block:{visibility:!0},event_location_block:{visibility:!0}}},confirmBookingForm:{event:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{dialogEventCalendarHeadingFormField:{labels:{event_book_event:{value:"",translations:{x:""}}},parts:{event_range_block:{visibility:!0},event_capacity_block:{visibility:!0},event_location_block:{visibility:!0}}},paymentTypeFormField:{labels:{payment_type_colon:{value:"",translations:{x:""}},payment_type_deposit_only:{value:"",translations:{x:""}},payment_type_full_amount:{value:"",translations:{x:""}}}},paymentMethodFormField:{labels:{payment_method_colon:{value:"",translations:{x:""}},payment_btn_on_site:{value:"",translations:{x:""}},payment_btn_stripe:{value:"",translations:{x:""}},payment_btn_mollie:{value:"",translations:{x:""}}},switchPaymentMethodView:"Buttons",switchPaymentMethodViewOptions:[{id:1,name:this.$root.labels.buttons},{id:2,name:this.$root.labels.select}]},stripeCardFormField:{labels:{credit_or_debit_card_colon:{value:"",translations:{x:""}}}},priceFormFiled:{labels:{total_number_of_persons:{value:"",translations:{x:""}},base_price_colon:{value:"",translations:{x:""}},subtotal_colon:{value:"",translations:{x:""}},discount_amount_colon:{value:"",translations:{x:""}},deposit:{value:"",translations:{x:""}},recurring_costs_colon:{value:"",translations:{x:""}},pay_now:{value:"",translations:{x:""}},pay_later:{value:"",translations:{x:""}},total_cost_colon:{value:"",translations:{x:""}}}}},itemsDraggable:{firstNameFormField:{labels:{first_name_colon:{value:"",translations:{x:""}}}},lastNameFormField:{labels:{last_name_colon:{value:"",translations:{x:""}}},visibility:!0,required:!0},emailFormField:{labels:{email_colon:{value:"",translations:{x:""}}},visibility:!0,required:this.$root.settings.general.requiredEmailField},phoneFormField:{labels:{phone_colon:{value:"",translations:{x:""}}},visibility:!0,required:this.$root.settings.general.requiredPhoneNumberField}}}},congratulationsForm:{event:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{dialogEventCalendarHeadingFormField:{labels:{event_book_event:{value:"",translations:{x:""}}},parts:{event_range_block:{visibility:!0},event_capacity_block:{visibility:!0},event_location_block:{visibility:!0}}},congratulationsHeadingFormField:{labels:{congratulations:{value:"",translations:{x:""}}},visibility:!0},congratulationsImageFormField:{visibility:!0},congratulationsMessagesFormField:{labels:{booking_completed_approved:{value:"",translations:{x:""}},booking_completed_pending:{value:"",translations:{x:""}}},visibility:!0},addToCalendarFormField:{addToCalendarVisibility:!0}}}}}}}},methods:{getTranslatedForms:function(e){var t=this,n=this.$root.settings.customization.forms&&this.$root.settings.customization.forms.hasOwnProperty(e)?this.$root.settings.customization.forms:this.defaultFormsData,i=window.localeLanguage[0];return Object.keys(n[e]).forEach(function(o){"labels"in n[e][o]?t.getTranslatedLabels(n[e][o],i):"confirmBookingForm"!==o&&"globalSettings"!==o&&"congratulationsForm"!==o?n[e][o]=t.getTranslatedFormScreen(n[e][o],e,o,i):"confirmBookingForm"!==o&&"congratulationsForm"!==o||Object.keys(n[e][o]).forEach(function(a){n[e][o][a]=t.getTranslatedFormScreen(n[e][o][a],e,o,i)})}),n},getTranslatedFormScreen:function(e,t,n,i){var o=this;return["itemsDraggable","itemsStatic"].forEach(function(t){t in e&&Object.keys(e[t]).forEach(function(n){o.getTranslatedLabels(e[t][n],i)})}),e},getTranslatedLabels:function(e,t){if("labels"in e){var n=window.wpAmeliaSettings.general.usedLanguages,i=n.includes(t);Object.keys(e.labels).forEach(function(o){if("translations"in e.labels[o]&&t in e.labels[o].translations&&i)e.labels[o].value=e.labels[o].translations[t];else if(e.labels[o].translations)for(var a=n.map(function(e){return e.length>2?e.slice(0,2):e}),s=t.length>2?t.slice(0,2):t,r=a.includes(s),l=Object.keys(e.labels[o].translations),c=Object.keys(e.labels[o].translations).map(function(e){return e.length>2?e.slice(0,2):e}),u=0;u<c.length;u++)if(c[u]===s&&r){e.labels[o].value=e.labels[o].translations[l[u]];break}})}}}}},668:function(e,t,n){"use strict";var i=n(0),o=n.n(i);t.a={data:function(){return{payBtnLoader:null,timeZone:"",statusesCabinet:[{value:"approved",label:this.$root.labels.approved},{value:"pending",label:this.$root.labels.pending},{value:"canceled",label:this.$root.labels.canceled},{value:"rejected",label:this.$root.labels.rejected},{value:"no-show",label:this.$root.labels["no-show"]},{value:"waiting",label:this.$root.labels.waiting_list}]}},methods:{isPanelActive:function(e){return!this.$root.shortcodeData.cabinet||!(this.$root.shortcodeData.cabinet.appointments||this.$root.shortcodeData.cabinet.events||this.$root.shortcodeData.cabinet.profile)||(!("appointments"!==e||!this.$root.shortcodeData.cabinet||!this.$root.shortcodeData.cabinet.appointments)||(!("events"!==e||!this.$root.shortcodeData.cabinet||!this.$root.shortcodeData.cabinet.events)||"profile"===e&&this.$root.shortcodeData.cabinet&&this.$root.shortcodeData.cabinet.profile))},changeRange:function(e){this.$store.commit("cabinet/setParams",{dates:e}),this.setDatePickerSelectedDaysCount(this.$store.state.cabinet.params.dates.start,this.$store.state.cabinet.params.dates.end),this.$emit("refreshReservations")},isBookingCancelable:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.cancelable&&!("canceled"===e.bookings[t].status||"rejected"===e.bookings[t].status||"no-show"===e.bookings[t].status)},isBookingReschedulable:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.reschedulable&&!("canceled"===e.bookings[t].status||"rejected"===e.bookings[t].status||"no-show"===e.bookings[t].status)},disableAuthorizationHeader:function(){return"ameliaBooking"in window&&"cabinet"in window.ameliaBooking&&"disableAuthorizationHeader"in window.ameliaBooking.cabinet&&window.ameliaBooking.cabinet.disableAuthorizationHeader},getAuthorizationHeaderObject:function(){return this.$store.state.cabinet.ameliaToken&&!this.disableAuthorizationHeader()?{headers:{Authorization:"Bearer "+this.$store.state.cabinet.ameliaToken}}:{}},getPaymentLink:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.payBtnLoader=t.bookings?t.bookings[0].id:t.id;var o=JSON.parse(JSON.stringify(t));o[o.type]=t;var a=JSON.parse(JSON.stringify(this.$store.state.cabinet.profile));if(a.birthday=null,o.customer=a,"package"===o.type){var s=i||Object.keys(o.payments)[0],r=o.payments[s].payments.sort(function(e,t){return e.id>t.id?1:-1});o.paymentId=r[0].id,o.packageCustomerId=s,o.packageReservations=[],o.bookable.forEach(function(e){o.packageReservations=o.packageReservations.concat(e.service.bookedAppointments.filter(function(e){return e.bookings[0].packageCustomerService.packageCustomer.id===parseInt(s)}))}),o.booking=o.packageReservations&&o.packageReservations.length>0?o.packageReservations[0].bookings[0]:null}else o.booking=t.bookings[0],o.paymentId=t.bookings[0].payments[0].id;this.$http.post(this.$root.getAjaxUrl+"/payments/link",{data:o,paymentMethod:e}).then(function(e){n.payBtnLoader=null,!e.data.data.error&&e.data.data.paymentLink?window.location.href=e.data.data.paymentLink:n.notify(n.$root.labels.error,n.$root.labels.payment_link_error,"error")}).catch(function(e){n.payBtnLoader=null,n.notify(n.$root.labels.error,e.message,"error"),console.log(e)})},paymentFromCustomerPanel:function(e,t){if("package"!==e.type&&(!e.bookings||0===e.bookings.length))return!1;var n=this.$root.settings;t&&t.payments&&t.payments.paymentLinks&&(n=JSON.parse(t));var i=n.payments.paymentLinks,a="package"===e.type?Object.values(e.purchases).filter(function(e){return"approved"===e.status}).length>0:"approved"===e.bookings[0].status||"pending"===e.bookings[0].status,s="package"===e.type?e.price:e.bookings[0].price,r=!1;switch(e.type){case"package":r=!e.expireDateString||o()(e.expireDateString,"YYYY-MM-DD HH:mm:ss").isAfter(o()());break;case"appointment":r=o()(e.bookingStart,"YYYY-MM-DD HH:mm:ss").isAfter(o()())&&e.bookings[0].payments.length>0;break;case"event":r=o()(e.periods[e.periods.length-1].periodEnd,"YYYY-MM-DD HH:mm:ss").isAfter(o()())&&e.bookings[0].payments.length>0}return this.paymentMethods(n).length&&i&&i.enabled&&a&&s>0&&r},paymentMethods:function(e){"string"==typeof e&&(e=JSON.parse(e));var t=[];return e=e.payments,this.$root.settings.payments.wc.enabled?t.push({value:"wc",label:this.$root.labels.wc}):!this.$root.settings.payments.mollie.enabled||"mollie"in e&&!e.mollie.enabled?!this.$root.settings.payments.square.enabled||"square"in e&&!e.square.enabled?(!this.$root.settings.payments.payPal.enabled||"payPal"in e&&!e.payPal.enabled||t.push({value:"payPal",label:this.$root.labels.pay_pal}),!this.$root.settings.payments.stripe.enabled||"stripe"in e&&!e.stripe.enabled||t.push({value:"stripe",label:this.$root.labels.credit_card}),!this.$root.settings.payments.razorpay.enabled||"razorpay"in e&&!e.razorpay.enabled||t.push({value:"razorpay",label:this.$root.labels.razorpay})):t.push({value:"square",label:this.$root.labels.on_line}):t.push({value:"mollie",label:this.$root.labels.on_line}),t}}}},669:function(e,t,n){"use strict";(function(t){var i=n(656),o=n(716),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var r,l={adapter:("undefined"!=typeof XMLHttpRequest?r=n(687):void 0!==t&&(r=n(687)),r),transformRequest:[function(e,t){return o(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};l.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],function(e){l.headers[e]={}}),i.forEach(["post","put","patch"],function(e){l.headers[e]=i.merge(a)}),e.exports=l}).call(t,n(142))},671:function(e,t,n){var i=n(90)(n(682),n(683),!1,null,null,null);e.exports=i.exports},672:function(e,t,n){"use strict";var i=n(661),o=n(0),a=n.n(o),s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.a={mixins:[i.a],methods:{getArrayCustomPricing:function(e){var t=e.customPricing,n=null;if(void 0===t||null===t||""===t)n={enabled:null,durations:{},persons:{},periods:{default:[],custom:[]}};else if("object"===(void 0===t?"undefined":s(t))){if(Array.isArray(t.durations))return"persons"in t||(t.persons=[]),"periods"in t||(t.periods={default:[],custom:[]}),!0===t.enabled&&(t.enabled="duration"),t;n=JSON.parse(JSON.stringify(t))}else n=JSON.parse(t);!0===n.enabled&&(n.enabled="duration"),n.persons="persons"in n?n.persons:[],n.periods="periods"in n?n.periods:{default:[],custom:[]};var i=[];Object.keys(n.persons).length&&(i.push({start:1,range:Object.keys(n.persons)[0]-1,price:e.price,rules:[]}),Object.keys(n.persons).forEach(function(t,o){i.push({start:parseInt(t),range:o!==Object.keys(n.persons).length-1?Object.keys(n.persons)[o+1]-1:e.maxCapacity,price:n.persons[t].price,rules:n.persons[t].rules})}));var o=[];return Object.keys(n.durations).forEach(function(e){o.push({duration:parseInt(e),price:n.durations[e].price,rules:n.durations[e].rules})}),n.periods.custom.forEach(function(e){e.dates.start=a()(e.dates.start).toDate(),e.dates.end=a()(e.dates.end).toDate()}),{enabled:n.enabled,durations:o,persons:i,periods:n.periods}},getJsonCustomPricing:function(e){var t={},n=e.customPricing;n&&n.durations.filter(function(e){return e.duration}).length>0&&n.durations.forEach(function(e){t[e.duration]={price:e.price,rules:e.rules}});var i={};n&&n.persons.length&&n.persons.forEach(function(e,t){0!==t&&(i[n.persons[t-1].range+1]={price:e.price,rules:e.rules})});var o=[];n.periods.default.filter(function(e){return e.days.length}).forEach(function(e){e.ranges.forEach(function(e){null===e.from&&(e.from="00:00"),null===e.to&&(e.to="24:00")}),o.push(e)});var s=[];n.periods.custom.filter(function(e){return e.dates.start&&e.dates.end}).forEach(function(e){e.ranges.forEach(function(e){null===e.from&&(e.from="00:00"),null===e.to&&(e.to="24:00")}),e.dates.start=a()(e.dates.start).format("YYYY-MM-DD"),e.dates.end=a()(e.dates.end).format("YYYY-MM-DD"),s.push(e)});var r=null;return n&&this.isDurationPricingEnabled(n)?r="duration":n&&this.isPersonPricingEnabled(n)?r="person":n&&this.isPeriodPricingEnabled(n)&&(o.length||s.length)&&(r="period"),JSON.stringify({enabled:r,durations:t,persons:i,periods:{default:o,custom:s}})}}}},673:function(e,t,n){"use strict";t.a={data:function(){return{searchCounter:0,loadingCustomers:!1,searchCustomersTimer:null,searchedCustomers:[],dialogCustomer:!1}},methods:{setCustomerFromUrl:function(e){var t=null;this.options.entities.customers.length&&(t=this.options.entities.customers.find(function(t){return t.id==e})),t&&(this.params.customerId=t.id)},getInitCustomerObject:function(){return{id:0,firstName:"",lastName:"",externalId:"",phone:"",countryPhoneIso:null,email:"",gender:"",birthday:null,note:"",status:"visible",type:"customer",countPendingAppointments:0}},setInitialCustomers:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};"customer"!==this.$root.settings.role&&this.searchCustomers("",function(){var n=e.options&&"entities"in e.options&&"customers"in e.options.entities?e.options.entities.customers:[],i=n.map(function(e){return parseInt(e.id)}),o=n;e.searchedCustomers.forEach(function(e){-1===i.indexOf(parseInt(e.id))&&(i.push(e.id),o.push(e))}),e.$nextTick(function(){e.options.entities.customers=Object.values(o.sort(function(e,t){return e.firstName.toLowerCase()>t.firstName.toLowerCase()?1:-1})),e.params&&e.params.customerId&&e.setCustomerFromUrl(e.params.customerId),t()})})},searchCustomers:function(e,t){var n=this;clearTimeout(this.searchCustomersTimer),this.loadingCustomers=!0,this.searchCounter++,this.searchCustomersTimer=setTimeout(function(){var i=n.searchCounter,o={search:e,page:1,limit:n.$root.settings.general.customersFilterLimit,skipCount:1};n.params&&n.params.customerId&&(o.customers=[n.params.customerId]),n.$http.get(n.$root.getAjaxUrl+"/users/customers",{params:o}).then(function(e){i>=n.searchCounter&&(n.searchedCustomers=e.data.data.users.sort(function(e,t){return e.firstName.toLowerCase()>t.firstName.toLowerCase()?1:-1})),n.loadingCustomers=!1,t()}).catch(function(e){n.loadingCustomers=!1})},500)},getNoShowClass:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(i&&"blocked"===i)return"am-customer-name am-customer-blocked";if(!this.$root.settings.roles.enableNoShowTag)return"";var o=null,a=this.searchedCustomers.map(function(e){return e.id}),s=this.options&&this.options.entities?this.options.entities.customers.map(function(e){return e.id}):[];if(n)o=n.noShowCount;else if(null!==t&&0!==t.length&&null!==e){var r=t.find(function(t){return t.id===e});o=r?r.count:0}else a.includes(e)&&this.searchedCustomers.length&&0!==e?o=this.searchedCustomers.find(function(t){return t.id===e}).noShowCount:s.includes(e)&&this.options.entities.customers&&0!==e&&(o=this.options.entities.customers.find(function(t){return t.id===e}).noShowCount);var l="";if(o)switch(l="am-customer-name",!0){case 1===o:l+=" am-no-show-gray";break;case 2===o:l+=" am-no-show-yellow";break;case o>=3:l+=" am-no-show-red"}return l},getOptionClass:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=e.customer?e.customer:e,o=this.getNoShowClass(i.id,t,i.noShowCount?i:null,n)||"";return o+=i.email?" am-drop-item-name":""}}}},674:function(e,t,n){"use strict";(function(e){var i=n(752),o=n(753),a=n(746);function s(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function r(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return c(this,e,t,n)}function c(e,t,n,i){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,i){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,n):new Uint8Array(t,n,i);l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=p(e,t);return e}(e,t,n,i):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|f(t,n),o=(e=r(e,i)).write(t,n);o!==i&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(l.isBuffer(t)){var n=0|m(t.length);return 0===(e=r(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(i=t.length)!=i?r(e,0):p(e,t);if("Buffer"===t.type&&a(t.data))return p(e,t.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(u(t),e=r(e,t<0?0:0|m(t)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function p(e,t){var n=t.length<0?0:0|m(t.length);e=r(e,n);for(var i=0;i<n;i+=1)e[i]=255&t[i];return e}function m(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function f(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return M(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(e).length;default:if(i)return M(e).length;t=(""+t).toLowerCase(),i=!0}}function h(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function g(e,t,n,i,o){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=l.from(t,i)),l.isBuffer(t))return 0===t.length?-1:v(e,t,n,i,o);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,i,o);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,i,o){var a,s=1,r=e.length,l=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;s=2,r/=2,l/=2,n/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var u=-1;for(a=n;a<r;a++)if(c(e,a)===c(t,-1===u?0:a-u)){if(-1===u&&(u=a),a-u+1===l)return u*s}else-1!==u&&(a-=a-u),u=-1}else for(n+l>r&&(n=r-l),a=n;a>=0;a--){for(var d=!0,p=0;p<l;p++)if(c(e,a+p)!==c(t,p)){d=!1;break}if(d)return a}return-1}function b(e,t,n,i){n=Number(n)||0;var o=e.length-n;i?(i=Number(i))>o&&(i=o):i=o;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");i>a/2&&(i=a/2);for(var s=0;s<i;++s){var r=parseInt(t.substr(2*s,2),16);if(isNaN(r))return s;e[n+s]=r}return s}function y(e,t,n,i){return U(M(t,e.length-n),e,n,i)}function _(e,t,n,i){return U(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,i)}function k(e,t,n,i){return _(e,t,n,i)}function x(e,t,n,i){return U(q(t),e,n,i)}function C(e,t,n,i){return U(function(e,t){for(var n,i,o,a=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),i=n>>8,o=n%256,a.push(o),a.push(i);return a}(t,e.length-n),e,n,i)}function w(e,t,n){return 0===t&&n===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,n))}function S(e,t,n){n=Math.min(e.length,n);for(var i=[],o=t;o<n;){var a,s,r,l,c=e[o],u=null,d=c>239?4:c>223?3:c>191?2:1;if(o+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(a=e[o+1]))&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=e[o+1],s=e[o+2],128==(192&a)&&128==(192&s)&&(l=(15&c)<<12|(63&a)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=e[o+1],s=e[o+2],r=e[o+3],128==(192&a)&&128==(192&s)&&128==(192&r)&&(l=(15&c)<<18|(63&a)<<12|(63&s)<<6|63&r)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,i.push(u>>>10&1023|55296),u=56320|1023&u),i.push(u),o+=d}return function(e){var t=e.length;if(t<=P)return String.fromCharCode.apply(String,e);var n="",i=0;for(;i<t;)n+=String.fromCharCode.apply(String,e.slice(i,i+=P));return n}(i)}t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,n){return c(null,e,t,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,n){return function(e,t,n,i){return u(t),t<=0?r(e,t):void 0!==n?"string"==typeof i?r(e,t).fill(n,i):r(e,t).fill(n):r(e,t)}(null,e,t,n)},l.allocUnsafe=function(e){return d(null,e)},l.allocUnsafeSlow=function(e){return d(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,o=0,a=Math.min(n,i);o<a;++o)if(e[o]!==t[o]){n=e[o],i=t[o];break}return n<i?-1:i<n?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=l.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var s=e[n];if(!l.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i},l.byteLength=f,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)h(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)h(this,t,t+3),h(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)h(this,t,t+7),h(this,t+1,t+6),h(this,t+2,t+5),h(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?S(this,0,e):function(e,t,n){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return $(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return E(this,t,n);case"base64":return w(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},l.prototype.compare=function(e,t,n,i,o){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),t<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=n)return 0;if(i>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var a=o-i,s=n-t,r=Math.min(a,s),c=this.slice(i,o),u=e.slice(t,n),d=0;d<r;++d)if(c[d]!==u[d]){a=c[d],s=u[d];break}return a<s?-1:s<a?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return g(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return g(this,e,t,n,!1)},l.prototype.write=function(e,t,n,i){if(void 0===t)i="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)i=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var a=!1;;)switch(i){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return y(this,e,t,n);case"ascii":return _(this,e,t,n);case"latin1":case"binary":return k(this,e,t,n);case"base64":return x(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var P=4096;function T(e,t,n){var i="";n=Math.min(e.length,n);for(var o=t;o<n;++o)i+=String.fromCharCode(127&e[o]);return i}function E(e,t,n){var i="";n=Math.min(e.length,n);for(var o=t;o<n;++o)i+=String.fromCharCode(e[o]);return i}function $(e,t,n){var i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var o="",a=t;a<n;++a)o+=R(e[a]);return o}function O(e,t,n){for(var i=e.slice(t,n),o="",a=0;a<i.length;a+=2)o+=String.fromCharCode(i[a]+256*i[a+1]);return o}function A(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,i,o,a){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<a)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function I(e,t,n,i){t<0&&(t=65535+t+1);for(var o=0,a=Math.min(e.length-n,2);o<a;++o)e[n+o]=(t&255<<8*(i?o:1-o))>>>8*(i?o:1-o)}function N(e,t,n,i){t<0&&(t=4294967295+t+1);for(var o=0,a=Math.min(e.length-n,4);o<a;++o)e[n+o]=t>>>8*(i?o:3-o)&255}function F(e,t,n,i,o,a){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,i,a){return a||F(e,0,n,4),o.write(e,t,n,i,23,4),n+4}function j(e,t,n,i,a){return a||F(e,0,n,8),o.write(e,t,n,i,52,8),n+8}l.prototype.slice=function(e,t){var n,i=this.length;if(e=~~e,t=void 0===t?i:~~t,e<0?(e+=i)<0&&(e=0):e>i&&(e=i),t<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e),l.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=l.prototype;else{var o=t-e;n=new l(o,void 0);for(var a=0;a<o;++a)n[a]=this[a+e]}return n},l.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var i=this[e],o=1,a=0;++a<t&&(o*=256);)i+=this[e+a]*o;return i},l.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var i=this[e+--t],o=1;t>0&&(o*=256);)i+=this[e+--t]*o;return i},l.prototype.readUInt8=function(e,t){return t||A(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||A(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||A(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var i=this[e],o=1,a=0;++a<t&&(o*=256);)i+=this[e+a]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var i=t,o=1,a=this[e+--i];i>0&&(o*=256);)a+=this[e+--i]*o;return a>=(o*=128)&&(a-=Math.pow(2,8*t)),a},l.prototype.readInt8=function(e,t){return t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||A(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||A(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||A(e,4,this.length),o.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||A(e,4,this.length),o.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||A(e,8,this.length),o.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||A(e,8,this.length),o.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,i){(e=+e,t|=0,n|=0,i)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,a=0;for(this[t]=255&e;++a<n&&(o*=256);)this[t+a]=e/o&255;return t+n},l.prototype.writeUIntBE=function(e,t,n,i){(e=+e,t|=0,n|=0,i)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,a=1;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=e/a&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t|=0,!i){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var a=0,s=1,r=0;for(this[t]=255&e;++a<n&&(s*=256);)e<0&&0===r&&0!==this[t+a-1]&&(r=1),this[t+a]=(e/s>>0)-r&255;return t+n},l.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t|=0,!i){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var a=n-1,s=1,r=0;for(this[t+a]=255&e;--a>=0&&(s*=256);)e<0&&0===r&&0!==this[t+a+1]&&(r=1),this[t+a]=(e/s>>0)-r&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return j(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return j(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var o,a=i-n;if(this===e&&n<t&&t<i)for(o=a-1;o>=0;--o)e[o+t]=this[o+n];else if(a<1e3||!l.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},l.prototype.fill=function(e,t,n,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!l.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var s=l.isBuffer(e)?e:M(new l(e,i).toString()),r=s.length;for(a=0;a<n-t;++a)this[a+t]=s[a%r]}return this};var B=/[^+\/0-9A-Za-z-_]/g;function R(e){return e<16?"0"+e.toString(16):e.toString(16)}function M(e,t){var n;t=t||1/0;for(var i=e.length,o=null,a=[],s=0;s<i;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(s+1===i){(t-=3)>-1&&a.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&a.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function q(e){return i.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(B,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,n,i){for(var o=0;o<i&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(t,n(37))},675:function(e,t,n){"use strict";t.a={data:function(){return{countries:[{id:1,iso:"af",nicename:"Afghanistan",phonecode:93,format:"070 123 4567"},{id:2,iso:"al",nicename:"Albania",phonecode:355,format:"066 123 4567"},{id:3,iso:"dz",nicename:"Algeria",phonecode:213,format:"0551 23 45 67"},{id:4,iso:"as",nicename:"American Samoa",phonecode:1,format:"(684) 733 1234"},{id:5,iso:"ad",nicename:"Andorra",phonecode:376,format:"312 345"},{id:6,iso:"ao",nicename:"Angola",phonecode:244,format:"923 123 456"},{id:7,iso:"ai",nicename:"Anguilla",phonecode:1,format:"(264) 235 1234"},{id:8,iso:"ag",nicename:"Antigua and Barbuda",phonecode:1,format:"(268) 464 1234"},{id:9,iso:"ar",nicename:"Argentina",phonecode:54,format:"9 (11) 1234 567"},{id:10,iso:"am",nicename:"Armenia",phonecode:374,format:"077 123 456"},{id:11,iso:"aw",nicename:"Aruba",phonecode:297,format:"560 1234"},{id:12,iso:"au",nicename:"Australia",phonecode:61,format:"0412 345 678"},{id:13,iso:"at",nicename:"Austria",phonecode:43,format:"0664 123456"},{id:14,iso:"az",nicename:"Azerbaijan",phonecode:994,format:"040 123 45 67"},{id:15,iso:"bs",nicename:"Bahamas",phonecode:1,format:"(242) 359 1234"},{id:16,iso:"bh",nicename:"Bahrain",phonecode:973,format:"3600 1234"},{id:17,iso:"bd",nicename:"Bangladesh",phonecode:880,format:"018 1234 5678"},{id:18,iso:"bb",nicename:"Barbados",phonecode:1,format:"(246) 250 1234"},{id:19,iso:"by",nicename:"Belarus",phonecode:375,format:"029 491 1911"},{id:20,iso:"be",nicename:"Belgium",phonecode:32,format:"0470 123 456"},{id:21,iso:"bz",nicename:"Belize",phonecode:501,format:"622 1234"},{id:22,iso:"bj",nicename:"Benin",phonecode:229,format:"90 123 456"},{id:23,iso:"bm",nicename:"Bermuda",phonecode:1,format:"(441) 370 1234"},{id:24,iso:"bt",nicename:"Bhutan",phonecode:975,format:"17 123 456"},{id:25,iso:"bo",nicename:"Bolivia",phonecode:591,format:"7 123 4567"},{id:26,iso:"ba",nicename:"Bosnia and Herzegovina",phonecode:387,format:"061 123 456"},{id:27,iso:"bw",nicename:"Botswana",phonecode:267,format:"71 123 456"},{id:28,iso:"br",nicename:"Brazil",phonecode:55,format:"(11) 9 1234 5678"},{id:29,iso:"vg",nicename:"British Virgin Islands",phonecode:1,format:"(284) 300 1234"},{id:30,iso:"bn",nicename:"Brunei",phonecode:673,format:"712 3456"},{id:31,iso:"bg",nicename:"Bulgaria",phonecode:359,format:"087 123 4567"},{id:32,iso:"bf",nicename:"Burkina Faso",phonecode:226,format:"70 12 34 56"},{id:33,iso:"bi",nicename:"Burundi",phonecode:257,format:"79 56 12 34"},{id:34,iso:"kh",nicename:"Cambodia",phonecode:855,format:"091 234 567"},{id:35,iso:"cm",nicename:"Cameroon",phonecode:237,format:"6 71 23 45 67"},{id:36,iso:"ca",nicename:"Canada",phonecode:1,format:"(204) 123 4567"},{id:37,iso:"cv",nicename:"Cape Verde",phonecode:238,format:"991 12 34"},{id:38,iso:"ky",nicename:"Cayman Islands",phonecode:1,format:"(345) 323 1234"},{id:39,iso:"cf",nicename:"Central African Republic",phonecode:236,format:"70 01 23 45"},{id:40,iso:"td",nicename:"Chad",phonecode:235,format:"63 01 23 45"},{id:41,iso:"cl",nicename:"Chile",phonecode:56,format:"09 6123 4567"},{id:42,iso:"cn",nicename:"China",phonecode:86,format:"131 2345 6789"},{id:43,iso:"co",nicename:"Colombia",phonecode:57,format:"321 1234567"},{id:44,iso:"km",nicename:"Comoros",phonecode:269,format:"321 23 45"},{id:45,iso:"cd",nicename:"Congo (DRC)",phonecode:243,format:"0991 234 567"},{id:46,iso:"cg",nicename:"Congo (Republic)",phonecode:242,format:"06 123 4567"},{id:47,iso:"ck",nicename:"Cook Islands",phonecode:682,format:"71 234"},{id:48,iso:"cr",nicename:"Costa Rica",phonecode:506,format:"8312 3456"},{id:49,iso:"ci",nicename:"Cote D'Ivoire",phonecode:225,format:"01 23 45 67"},{id:50,iso:"hr",nicename:"Croatia",phonecode:385,format:"091 234 5678"},{id:51,iso:"cu",nicename:"Cuba",phonecode:53,format:"05 1234567"},{id:57,iso:"cy",nicename:"Cyprus",phonecode:357,format:"96 123456"},{id:58,iso:"cz",nicename:"Czech Republic",phonecode:420,format:"601 123 456"},{id:59,iso:"dk",nicename:"Denmark",phonecode:45,format:"20 12 34 56"},{id:60,iso:"dj",nicename:"Djibouti",phonecode:253,format:"77 83 10 01"},{id:61,iso:"dm",nicename:"Dominica",phonecode:1,format:"(767) 225 1234"},{id:62,iso:"do",nicename:"Dominican Republic",phonecode:1,format:"(809) 234 5678"},{id:63,iso:"ec",nicename:"Ecuador",phonecode:593,format:"099 123 4567"},{id:64,iso:"eg",nicename:"Egypt",phonecode:20,format:"0100 123 4567"},{id:65,iso:"sv",nicename:"El Salvador",phonecode:503,format:"7012 3456"},{id:66,iso:"gq",nicename:"Equatorial Guinea",phonecode:240,format:"222 123 456"},{id:67,iso:"er",nicename:"Eritrea",phonecode:291,format:"07 123 456"},{id:68,iso:"ee",nicename:"Estonia",phonecode:372,format:"5123 4567"},{id:69,iso:"et",nicename:"Ethiopia",phonecode:251,format:"091 123 4567"},{id:70,iso:"fk",nicename:"Falkland Islands (Malvinas)",phonecode:500,format:"51234"},{id:71,iso:"fo",nicename:"Faroe Islands",phonecode:298,format:"211234"},{id:72,iso:"fj",nicename:"Fiji",phonecode:679,format:"701 2345"},{id:73,iso:"fi",nicename:"Finland",phonecode:358,format:"041 2345678"},{id:74,iso:"fr",nicename:"France",phonecode:33,format:"06 12 34 56 78"},{id:75,iso:"gf",nicename:"French Guiana",phonecode:594,format:"0694 20 12 34"},{id:76,iso:"pf",nicename:"French Polynesia",phonecode:689,format:"87 12 34 56"},{id:77,iso:"ga",nicename:"Gabon",phonecode:241,format:"06 03 12 34"},{id:78,iso:"gm",nicename:"Gambia",phonecode:220,format:"301 2345"},{id:79,iso:"ge",nicename:"Georgia",phonecode:995,format:"555 12 34 56"},{id:80,iso:"de",nicename:"Germany",phonecode:49,format:"01512 3456789"},{id:81,iso:"gh",nicename:"Ghana",phonecode:233,format:"023 123 4567"},{id:82,iso:"gi",nicename:"Gibraltar",phonecode:350,format:"57123456"},{id:83,iso:"gr",nicename:"Greece",phonecode:30,format:"691 234 5678"},{id:84,iso:"gl",nicename:"Greenland",phonecode:299,format:"22 12 34"},{id:85,iso:"gp",nicename:"Guadeloupe",phonecode:590,format:"690 123 456"},{id:87,iso:"gu",nicename:"Guam",phonecode:1,format:"(671) 300 1234"},{id:88,iso:"gt",nicename:"Guatemala",phonecode:502,format:"5123 4567"},{id:89,iso:"gg",nicename:"Guernsey",phonecode:44,format:"07781 123456"},{id:90,iso:"gn",nicename:"Guinea",phonecode:224,format:"601 12 34 56"},{id:91,iso:"gw",nicename:"Guinea-Bissau",phonecode:245,format:"955 012 345"},{id:92,iso:"gy",nicename:"Guyana",phonecode:592,format:"609 1234"},{id:93,iso:"ht",nicename:"Haiti",phonecode:509,format:"34 10 1234"},{id:94,iso:"hn",nicename:"Honduras",phonecode:504,format:"9123 4567"},{id:95,iso:"hk",nicename:"Hong Kong",phonecode:852,format:"5123 4567"},{id:96,iso:"hu",nicename:"Hungary",phonecode:36,format:"(20) 123 4567"},{id:97,iso:"is",nicename:"Iceland",phonecode:354,format:"611 1234"},{id:98,iso:"in",nicename:"India",phonecode:91,format:"099876 54321"},{id:99,iso:"id",nicename:"Indonesia",phonecode:62,format:"0812 345 678"},{id:100,iso:"ir",nicename:"Iran",phonecode:98,format:"0912 345 6789"},{id:101,iso:"iq",nicename:"Iraq",phonecode:964,format:"0791 234 5678"},{id:102,iso:"ie",nicename:"Ireland",phonecode:353,format:"085 012 3456"},{id:103,iso:"im",nicename:"Isle of Man",phonecode:44,format:"07924 123456"},{id:104,iso:"il",nicename:"Israel",phonecode:972,format:"050 123 4567"},{id:105,iso:"it",nicename:"Italy",phonecode:39,format:"312 345 6789"},{id:106,iso:"jm",nicename:"Jamaica",phonecode:1,format:"(876) 210 1234"},{id:107,iso:"jp",nicename:"Japan",phonecode:81,format:"090 1234 5678"},{id:108,iso:"je",nicename:"Jersey",phonecode:44,format:"07797 123456"},{id:109,iso:"jo",nicename:"Jordan",phonecode:962,format:"07 9012 3456"},{id:110,iso:"kz",nicename:"Kazakhstan",phonecode:7,format:"(771) 123 4567"},{id:111,iso:"ke",nicename:"Kenya",phonecode:254,format:"0712 123456"},{id:112,iso:"ki",nicename:"Kiribati",phonecode:686,format:"72012345"},{id:241,iso:"xk",nicename:"Kosovo",phonecode:383,format:"044 1234567"},{id:113,iso:"kw",nicename:"Kuwait",phonecode:965,format:"500 12345"},{id:114,iso:"kg",nicename:"Kyrgyzstan",phonecode:996,format:"0700 123 456"},{id:115,iso:"la",nicename:"Laos",phonecode:856,format:"020 23 123 456"},{id:116,iso:"lv",nicename:"Latvia",phonecode:371,format:"21 234 567"},{id:117,iso:"lb",nicename:"Lebanon",phonecode:961,format:"71 123 456"},{id:118,iso:"ls",nicename:"Lesotho",phonecode:266,format:"5012 3456"},{id:119,iso:"lr",nicename:"Liberia",phonecode:231,format:"077 012 3456"},{id:120,iso:"ly",nicename:"Libya",phonecode:218,format:"091 2345678"},{id:121,iso:"li",nicename:"Liechtenstein",phonecode:423,format:"660 234 567"},{id:122,iso:"lt",nicename:"Lithuania",phonecode:370,format:"612 345 67"},{id:123,iso:"lu",nicename:"Luxembourg",phonecode:352,format:"628 123 456"},{id:124,iso:"mo",nicename:"Macao",phonecode:853,format:"6612 3456"},{id:125,iso:"mk",nicename:"Macedonia (FYROM)",phonecode:389,format:"072 345 678"},{id:126,iso:"mg",nicename:"Madagascar",phonecode:261,format:"032 12 345 67"},{id:127,iso:"mw",nicename:"Malawi",phonecode:265,format:"0991 23 45 67"},{id:128,iso:"my",nicename:"Malaysia",phonecode:60,format:"012 345 6789"},{id:129,iso:"mv",nicename:"Maldives",phonecode:960,format:"771 2345"},{id:130,iso:"ml",nicename:"Mali",phonecode:223,format:"65 01 23 45"},{id:131,iso:"mt",nicename:"Malta",phonecode:356,format:"9696 1234"},{id:132,iso:"mh",nicename:"Marshall Islands",phonecode:692,format:"235 1234"},{id:133,iso:"mq",nicename:"Martinique",phonecode:596,format:"0696 20 12 34"},{id:134,iso:"mr",nicename:"Mauritania",phonecode:222,format:"22 12 34 56"},{id:135,iso:"mu",nicename:"Mauritius",phonecode:230,format:"5251 2345"},{id:136,iso:"yt",nicename:"Mayotte",phonecode:269,format:"0639 12 34 56"},{id:137,iso:"mx",nicename:"Mexico",phonecode:52,format:"222 123 4567"},{id:138,iso:"fm",nicename:"Micronesia",phonecode:691,format:"350 1234"},{id:139,iso:"md",nicename:"Moldova",phonecode:373,format:"0621 12 345"},{id:140,iso:"mc",nicename:"Monaco",phonecode:377,format:"06 12 34 56 78"},{id:141,iso:"mn",nicename:"Mongolia",phonecode:976,format:"8812 3456"},{id:142,iso:"me",nicename:"Montenegro",phonecode:382,format:"067 622 901"},{id:143,iso:"ms",nicename:"Montserrat",phonecode:1,format:"(664) 492 3456"},{id:144,iso:"ma",nicename:"Morocco",phonecode:212,format:"0650 123456"},{id:145,iso:"mz",nicename:"Mozambique",phonecode:258,format:"82 123 4567"},{id:146,iso:"mm",nicename:"Myanmar",phonecode:95,format:"09 212 3456"},{id:147,iso:"na",nicename:"Namibia",phonecode:264,format:"081 123 4567"},{id:149,iso:"np",nicename:"Nepal",phonecode:977,format:"984 1234567"},{id:150,iso:"nl",nicename:"Netherlands",phonecode:31,format:"06 12345678"},{id:151,iso:"nc",nicename:"New Caledonia",phonecode:687,format:"75 12 34"},{id:152,iso:"nz",nicename:"New Zealand",phonecode:64,format:"021 123 4567"},{id:153,iso:"ni",nicename:"Nicaragua",phonecode:505,format:"8123 4567"},{id:154,iso:"ne",nicename:"Niger",phonecode:227,format:"93 12 34 56"},{id:155,iso:"ng",nicename:"Nigeria",phonecode:234,format:"0802 123 4567"},{id:156,iso:"nu",nicename:"Niue",phonecode:683,format:"1234"},{id:157,iso:"nf",nicename:"Norfolk Island",phonecode:672,format:"3 81234"},{id:160,iso:"no",nicename:"Norway",phonecode:47,format:"406 12 345"},{id:161,iso:"om",nicename:"Oman",phonecode:968,format:"9212 3456"},{id:162,iso:"pk",nicename:"Pakistan",phonecode:92,format:"0301 2345678"},{id:163,iso:"pw",nicename:"Palau",phonecode:680,format:"620 1234"},{id:164,iso:"ps",nicename:"Palestine",phonecode:970,format:"0599 123 456"},{id:165,iso:"pa",nicename:"Panama",phonecode:507,format:"6001 2345"},{id:166,iso:"pg",nicename:"Papua New Guinea",phonecode:675,format:"681 2345"},{id:167,iso:"py",nicename:"Paraguay",phonecode:595,format:"0961 456789"},{id:168,iso:"pe",nicename:"Peru",phonecode:51,format:"912 345 678"},{id:169,iso:"ph",nicename:"Philippines",phonecode:63,format:"0905 123 4567"},{id:170,iso:"pl",nicename:"Poland",phonecode:48,format:"512 345 678"},{id:171,iso:"pt",nicename:"Portugal",phonecode:351,format:"912 345 678"},{id:172,iso:"pr",nicename:"Puerto Rico",phonecode:1,format:"(787) 234 5678"},{id:173,iso:"qa",nicename:"Qatar",phonecode:974,format:"3312 3456"},{id:174,iso:"re",nicename:"Réunion",phonecode:262,format:"639 123456"},{id:175,iso:"ro",nicename:"Romania",phonecode:40,format:"0712 345 678"},{id:176,iso:"ru",nicename:"Russia",phonecode:7,format:"(912) 123 4567",priority:1},{id:177,iso:"rw",nicename:"Rwanda",phonecode:250,format:"0720 123 456"},{id:180,iso:"kn",nicename:"Saint Kitts and Nevis",phonecode:1,format:"(869) 765 2917"},{id:181,iso:"lc",nicename:"Saint Lucia",phonecode:1,format:"(758) 284 5678"},{id:184,iso:"vc",nicename:"Saint Vincent and the Grenadines",phonecode:1,format:"(784) 430 1234"},{id:185,iso:"ws",nicename:"Samoa",phonecode:684,format:"601234"},{id:186,iso:"sm",nicename:"San Marino",phonecode:378,format:"66 66 12 12"},{id:187,iso:"st",nicename:"Sao Tome and Principe",phonecode:239,format:"981 2345"},{id:188,iso:"sa",nicename:"Saudi Arabia",phonecode:966,format:"051 234 5678"},{id:189,iso:"sn",nicename:"Senegal",phonecode:221,format:"70 123 45 67"},{id:190,iso:"rs",nicename:"Serbia",phonecode:381,format:"060 1234567"},{id:191,iso:"sc",nicename:"Seychelles",phonecode:248,format:"2 510 123"},{id:192,iso:"sl",nicename:"Sierra Leone",phonecode:232,format:"(025) 123456"},{id:193,iso:"sg",nicename:"Singapore",phonecode:65,format:"8123 4567"},{id:195,iso:"sk",nicename:"Slovakia",phonecode:421,format:"0912 123 456"},{id:196,iso:"si",nicename:"Slovenia",phonecode:386,format:"031 234 567"},{id:197,iso:"sb",nicename:"Solomon Islands",phonecode:677,format:"74 21234"},{id:198,iso:"so",nicename:"Somalia",phonecode:252,format:"7 1123456"},{id:199,iso:"za",nicename:"South Africa",phonecode:27,format:"071 123 4567"},{id:200,iso:"kr",nicename:"South Korea",phonecode:82,format:"010 1234 567"},{id:201,iso:"ss",nicename:"South Sudan",phonecode:211,format:"0977 123 456"},{id:202,iso:"es",nicename:"Spain",phonecode:34,format:"612 34 56 78"},{id:203,iso:"lk",nicename:"Sri Lanka",phonecode:94,format:"071 234 5678"},{id:204,iso:"sd",nicename:"Sudan",phonecode:249,format:"091 123 1234"},{id:205,iso:"sr",nicename:"Suriname",phonecode:597,format:"741 2345"},{id:207,iso:"sz",nicename:"Swaziland",phonecode:268,format:"7612 3456"},{id:208,iso:"se",nicename:"Sweden",phonecode:46,format:"070 123 45 67"},{id:209,iso:"ch",nicename:"Switzerland",phonecode:41,format:"078 123 45 67"},{id:210,iso:"sy",nicename:"Syria",phonecode:963,format:"0944 567 890"},{id:211,iso:"tw",nicename:"Taiwan",phonecode:886,format:"0912 345 678"},{id:212,iso:"tj",nicename:"Tajikistan",phonecode:992,format:"917 123 456"},{id:213,iso:"tz",nicename:"Tanzania",phonecode:255,format:"740 123 456"},{id:214,iso:"th",nicename:"Thailand",phonecode:66,format:"081 234 5678"},{id:215,iso:"tl",nicename:"Timor-Leste",phonecode:670,format:"7721 2345"},{id:216,iso:"tg",nicename:"Togo",phonecode:228,format:"90 11 23 45"},{id:218,iso:"to",nicename:"Tonga",phonecode:676,format:"771 5123"},{id:219,iso:"tt",nicename:"Trinidad and Tobago",phonecode:868,format:"(868) 291 1234"},{id:220,iso:"tn",nicename:"Tunisia",phonecode:216,format:"20 123 456"},{id:221,iso:"tr",nicename:"Turkey",phonecode:90,format:"0501 234 56 78"},{id:222,iso:"tm",nicename:"Turkmenistan",phonecode:7370,format:"8 66 123456"},{id:223,iso:"tc",nicename:"Turks and Caicos Islands",phonecode:1,format:"(649) 231 1234"},{id:224,iso:"tv",nicename:"Tuvalu",phonecode:688,format:"901234"},{id:225,iso:"ug",nicename:"Uganda",phonecode:256,format:"0712 345678"},{id:226,iso:"ua",nicename:"Ukraine",phonecode:380,format:"039 123 4567"},{id:227,iso:"ae",nicename:"United Arab Emirates",phonecode:971,format:"050 123 4567"},{id:228,iso:"gb",nicename:"United Kingdom",phonecode:44,format:"07400 123456",priority:1},{id:229,iso:"us",nicename:"United States",phonecode:1,format:"(201) 555 0123",priority:1},{id:230,iso:"uy",nicename:"Uruguay",phonecode:598,format:"094 231 234"},{id:231,iso:"uz",nicename:"Uzbekistan",phonecode:998,format:"8 91 234 56 78"},{id:232,iso:"vu",nicename:"Vanuatu",phonecode:678,format:"591 2345"},{id:234,iso:"ve",nicename:"Venezuela",phonecode:58,format:"0412 1234567"},{id:235,iso:"vn",nicename:"Vietnam",phonecode:84,format:"091 234 56 78"},{id:236,iso:"vi",nicename:"Virgin Islands, U.S.",phonecode:1,format:"(340) 642 1234"},{id:237,iso:"ye",nicename:"Yemen",phonecode:967,format:"0712 345 678"},{id:238,iso:"zm",nicename:"Zambia",phonecode:260,format:"095 5123456"},{id:239,iso:"zw",nicename:"Zimbabwe",phonecode:263,format:"071 123 4567"},{id:240,iso:"ax",nicename:"Åland Islands",phonecode:358,format:"041 2345678"}]}}}},677:function(e,t,n){var i=n(90)(n(691),n(692),!1,null,null,null);e.exports=i.exports},678:function(e,t,n){"use strict";var i=n(655);t.a={mixins:[i.a],data:function(){return{}},methods:{getInitEntitySettings:function(e){var t={payments:{paymentLinks:{enabled:this.$root.settings.payments.paymentLinks.enabled,changeBookingStatus:this.$root.settings.payments.paymentLinks.changeBookingStatus,redirectUrl:null},onSite:this.$root.settings.payments.onSite,wc:{enabled:this.$root.settings.payments.wc.enabled,productId:this.$root.settings.payments.wc.productId},payPal:{enabled:this.$root.settings.payments.payPal.enabled},stripe:{enabled:this.$root.settings.payments.stripe.enabled},mollie:{enabled:this.$root.settings.payments.mollie.enabled},square:{enabled:this.$root.settings.payments.square.enabled},razorpay:{enabled:this.$root.settings.payments.razorpay.enabled}}};switch(e){case"service":t.general={minimumTimeRequirementPriorToCanceling:null,minimumTimeRequirementPriorToRescheduling:null,redirectUrlAfterAppointment:null},t.general.defaultAppointmentStatus=null,t.general.numberOfDaysAvailableForBooking=0,t.general.minimumTimeRequirementPriorToBooking=null,t.zoom={enabled:this.$root.settings.zoom.enabled},t.lessonSpace={enabled:this.$root.settings.lessonSpace.enabled},t.googleMeet={enabled:this.$root.settings.googleCalendar.enabled&&this.$root.settings.googleCalendar.googleMeetEnabled},t.microsoftTeams={enabled:this.$root.settings.outlookCalendar.enabled&&this.$root.settings.outlookCalendar.microsoftTeamsEnabled};break;case"event":t.general={minimumTimeRequirementPriorToCanceling:null,redirectUrlAfterAppointment:null},t.zoom={enabled:this.$root.settings.zoom.enabled},t.lessonSpace={enabled:this.$root.settings.lessonSpace.enabled},t.googleMeet={enabled:this.$root.settings.googleCalendar.enabled&&this.$root.settings.googleCalendar.googleMeetEnabled},t.microsoftTeams={enabled:this.$root.settings.outlookCalendar.enabled&&this.$root.settings.outlookCalendar.microsoftTeamsEnabled},t.waitingList={enabled:!1,addingMethod:this.$root.settings.appointments.waitingListEvents.addingMethod,maxCapacity:1,maxExtraPeopleEnabled:!1,maxExtraPeople:0};break;case"package":t.general={redirectUrlAfterAppointment:null}}return t},setEntitySettings:function(e,t){e.settings=null!==e.settings?JSON.parse(e.settings):this.getInitEntitySettings(t),this.addMissingObjectProperties(e.settings,this.getInitEntitySettings(t))},updateSettings:function(e){var t=this;if(!this.$root.clonedSettings.payments.onSite||this.$root.clonedSettings.payments.stripe.enabled||this.$root.clonedSettings.payments.payPal.enabled||this.$root.clonedSettings.payments.wc.enabled||this.$root.clonedSettings.payments.mollie.enabled||this.$root.clonedSettings.payments.square.enabled||this.$root.clonedSettings.payments.razorpay.enabled){if(!1===this.$root.clonedSettings.payments.wc.enabled&&!1===this.$root.clonedSettings.payments.mollie.enabled&&null!==e){var n=JSON.parse(e);"payments"in n||(n.payments={}),["onSite","stripe","payPal","wc","mollie","razorpay","square"].forEach(function(e){e in n.payments||(n.payments[e]=t.$root.clonedSettings.payments[e])}),n.payments.wc=this.$root.clonedSettings.payments.wc,n.payments.mollie=this.$root.clonedSettings.payments.mollie,this.$root.clonedSettings.payments.onSite||(n.payments.onSite=this.$root.clonedSettings.payments.onSite),this.$root.clonedSettings.payments.square||(n.payments.square=this.$root.clonedSettings.payments.square),this.$root.clonedSettings.payments.payPal.enabled||(n.payments.payPal=this.$root.clonedSettings.payments.payPal),this.$root.clonedSettings.payments.stripe.enabled||(n.payments.stripe=this.$root.clonedSettings.payments.stripe),this.$root.clonedSettings.payments.razorpay.enabled&&n.payments.razorpay||(n.payments.razorpay=this.$root.clonedSettings.payments.razorpay),("onSite"in n.payments?n.payments.onSite&&this.$root.clonedSettings.payments.onSite:this.$root.clonedSettings.payments.onSite)&&("payPal"in n.payments?n.payments.payPal.enabled&&this.$root.clonedSettings.payments.payPal.enabled:this.$root.clonedSettings.payments.payPal.enabled)&&("stripe"in n.payments?n.payments.stripe.enabled&&this.$root.clonedSettings.payments.stripe.enabled:this.$root.clonedSettings.payments.stripe.enabled)&&("mollie"in n.payments?n.payments.mollie.enabled&&this.$root.clonedSettings.payments.mollie.enabled:this.$root.clonedSettings.payments.mollie.enabled)&&("razorpay"in n.payments?n.payments.razorpay.enabled&&this.$root.clonedSettings.payments.razorpay.enabled:this.$root.clonedSettings.payments.razorpay.enabled)&&("square"in n.payments?n.payments.square.enabled&&this.$root.clonedSettings.payments.square.enabled:this.$root.clonedSettings.payments.square.enabled)&&(n.payments=this.$root.clonedSettings.payments),e=JSON.stringify(n)}if(!0===this.$root.clonedSettings.payments.wc.enabled&&null!==e){var i=JSON.parse(e);"payments"in i||(i.payments={}),i.payments.onSite=this.$root.clonedSettings.payments.onSite,i.payments.stripe=this.$root.clonedSettings.payments.stripe,i.payments.payPal=this.$root.clonedSettings.payments.payPal,i.payments.mollie=this.$root.clonedSettings.payments.mollie,i.payments.square=this.$root.clonedSettings.payments.square,i.payments.razorpay=this.$root.clonedSettings.payments.razorpay,e=JSON.stringify(i)}if(!0===this.$root.clonedSettings.payments.mollie.enabled&&null!==e){var o=JSON.parse(e);"payments"in o||(o.payments={}),this.$root.clonedSettings.payments.onSite||(o.payments.onSite=this.$root.clonedSettings.payments.onSite,o.payments.mollie=this.$root.clonedSettings.payments.mollie),o.payments.stripe=this.$root.clonedSettings.payments.stripe,o.payments.payPal=this.$root.clonedSettings.payments.payPal,o.payments.razorpay=this.$root.clonedSettings.payments.razorpay,e=JSON.stringify(o)}if(!0===this.$root.clonedSettings.payments.square.enabled&&null!==e){var a=JSON.parse(e);"payments"in a||(a.payments={}),this.$root.clonedSettings.payments.onSite||(a.payments.onSite=this.$root.clonedSettings.payments.onSite,a.payments.square=this.$root.clonedSettings.payments.square),a.payments.stripe=this.$root.clonedSettings.payments.stripe,a.payments.payPal=this.$root.clonedSettings.payments.payPal,a.payments.razorpay=this.$root.clonedSettings.payments.razorpay,e=JSON.stringify(a)}"oliverPos"in this.$root.shortcodeData&&this.$root.shortcodeData.oliverPos&&((e=JSON.parse(e)).payments.onSite=!0,e.payments.stripe.enabled=!1,e.payments.payPal.enabled=!1,e.payments.razorpay.enabled=!1,e=JSON.stringify(e)),this.replaceExistingObjectProperties(this.$root.settings,null!==e?JSON.parse(e):this.$root.clonedSettings)}},prepareBookableEntityPaymentsForSave:function(e){var t=this,n={};return e&&"payments"in e&&("onSite"in e.payments&&e.payments.onSite!==this.$root.settings.payments.onSite&&(n.onSite=e.payments.onSite),["stripe","payPal","razorpay","mollie","square"].forEach(function(i){i in e.payments&&e.payments[i].enabled!==t.$root.settings.payments[i].enabled&&(n[i]=e.payments[i])}),"wc"in e.payments&&(e.payments.wc.enabled!==this.$root.settings.payments.wc.enabled||"productId"in e.payments.wc&&e.payments.wc.productId!==this.$root.settings.payments.wc.productId)&&(n.wc=e.payments.wc),n.paymentLinks=e.payments.paymentLinks),e.payments=n,e},prepareServiceSettingsForSave:function(e){var t=JSON.parse(JSON.stringify(e.settings));return"general"in t&&(t.general.redirectUrlAfterAppointment||delete t.general.redirectUrlAfterAppointment,t.general.defaultAppointmentStatus||delete t.general.defaultAppointmentStatus,(t.general.minimumTimeRequirementPriorToBooking||this.$root.settings.general.minimumTimeRequirementPriorToBooking)&&""!==t.general.minimumTimeRequirementPriorToBooking||delete t.general.minimumTimeRequirementPriorToBooking,(t.general.minimumTimeRequirementPriorToCanceling||this.$root.settings.general.minimumTimeRequirementPriorToCanceling)&&""!==t.general.minimumTimeRequirementPriorToCanceling||delete t.general.minimumTimeRequirementPriorToCanceling,(t.general.minimumTimeRequirementPriorToRescheduling||this.$root.settings.general.minimumTimeRequirementPriorToRescheduling)&&""!==t.general.minimumTimeRequirementPriorToRescheduling||delete t.general.minimumTimeRequirementPriorToRescheduling,t.general.numberOfDaysAvailableForBooking||delete t.general.numberOfDaysAvailableForBooking,0===Object.keys(t.general).length&&delete t.general),0===Object.keys(t).length&&(t=null),t}},computed:{}}},679:function(e,t,n){"use strict";t.a={data:function(){return{}},methods:{checkTranslations:function(e,t){var n=""!==t?JSON.parse(e.translations)[t]:JSON.parse(e.translations);if(window.localeLanguage[0]in n)return n[window.localeLanguage[0]];for(var i=Object.keys(n),o=Object.keys(n).map(function(e){return e.length>2?e.slice(0,2):e}),a=window.localeLanguage[0].length>2?window.localeLanguage[0].slice(0,2):window.localeLanguage[0],s="",r=0;r<o.length;r++)if(o[r]===a){s=n[i[r]];break}return s},getTranslated:function(e,t){return e.translations&&JSON.parse(e.translations)[t]&&this.checkTranslations(e,t)?this.checkTranslations(e,t):e[t]},getNameTranslated:function(e){return e.translations&&JSON.parse(e.translations).name&&this.checkTranslations(e,"name")?this.checkTranslations(e,"name"):e.name},getTicketTranslated:function(e){return e.translations&&this.checkTranslations(e,"")?this.checkTranslations(e,""):e.name},getCfLabelTranslated:function(e){return e.translations&&this.checkTranslations(e,"name")?this.checkTranslations(e,"name"):e.label},getCfOptionTranslated:function(e){return e.translations&&this.checkTranslations(e,"")?this.checkTranslations(e,""):e.label},getDescriptionTranslated:function(e){return e.translations&&JSON.parse(e.translations).description&&this.checkTranslations(e,"description")?this.checkTranslations(e,"description"):e.description},translateEntities:function(e){var t=this;e.services&&e.services.length&&e.services.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e),e.extras.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e)})}),e.locations&&e.locations.length&&e.locations.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e)}),e.packages&&e.packages.length&&e.packages.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e),e.bookable.forEach(function(e){e.service.name=t.getNameTranslated(e.service),e.service.description=t.getDescriptionTranslated(e.service),"extras"in e.service&&e.service.extras.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e)})})}),e.categories&&e.categories.length&&e.categories.forEach(function(e){e.name=t.getNameTranslated(e),e.serviceList.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e),e.extras.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e)})})}),e.events&&e.events.length&&e.events.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e),e.extras.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e)})}),e.customFields&&e.customFields.length&&e.customFields.forEach(function(e){e.label=t.getCfLabelTranslated(e),e.options.forEach(function(e){e.label=t.getCfOptionTranslated(e)})}),e.employees&&e.employees.length&&e.employees.forEach(function(e){e.firstName=t.getTranslated(e,"firstName"),e.lastName=t.getTranslated(e,"lastName"),e.serviceList.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e),e.extras.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e)})})})}},computed:{}}},680:function(e,t,n){"use strict";var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=r(n(713)),a=r(n(731)),s=r(n(732));function r(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.progress=0,this.isPending=!1,this.errors=new a.default,["post","patch","put","delete"].forEach(function(e){t[e]=function(n,i){return t.submit(e,n,i)}})}return i(e,[{key:"submit",value:function(t,n){var i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=t.toLowerCase(),this.hasFiles(o)&&(o=(0,s.default)(o),"post"!==t&&(o.append("_method",t.toUpperCase()),t="post")),this.progress=0,this.errors.clear(),this.isPending=!0,new Promise(function(a,s){e.defaults.axios[t](n,o,i.config()).then(function(e){a(e.data)}).catch(function(e){i.handleError(e),s(e)}).then(function(){return i.isPending=!1})})}},{key:"hasFiles",value:function(e){for(var t in e)if(this.fileIsPresent(e[t]))return!0;return!1}},{key:"fileIsPresent",value:function(e){return e instanceof File||e instanceof Array&&e.some(function(e){return e instanceof File})}},{key:"save",value:function(e,t){var n="post";return t.hasOwnProperty("id")&&(n="patch",e=this.urlToPatchResource(e,t)),this[n](e,t)}},{key:"urlToPatchResource",value:function(e,t){return e.replace(/\/+$/,"")+"/"+t.id}},{key:"config",value:function(){var e=this;return{onUploadProgress:function(t){e.progress=Math.round(100*t.loaded/t.total)}}}},{key:"handleError",value:function(e){if(e.response&&422===e.response.status){var t=e.response.data.hasOwnProperty("errors")?e.response.data.errors:e.response.data;this.errors.set(t)}}}]),e}();l.defaults={axios:o.default},e.exports=l},682:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(675);t.default={mixins:[i.a],template:"#phone-input",props:{savedPhone:{default:"",type:String},disabled:{default:!1,type:Boolean},countryPhoneIso:null,dropdownClass:{type:String,default:""}},data:function(){return{input:"",phone:"",value:this.$root.settings.general.phoneDefaultCountryCode,format:""}},mounted:function(){""!==this.value?this.savedPhone?this.fillInputWithSavedPhone():this.formatPhoneNumber():this.savedPhone&&this.fillInputWithSavedPhone()},methods:{onClear:function(){this.value="",this.phone="",this.$emit("phoneFormatted",this.phone,this.value)},changeCountry:function(){""!==this.value&&""!==this.input&&(this.input=""),this.formatPhoneNumber()},formatPhoneNumber:function(){var e=this;if(""!==this.value){var t=this.countries.find(function(t){return t.iso===e.value});this.format=!0===this.disabled?"":t.format}var n=this.input;if("ar"===window.localeLanguage[0]&&(n=n.replace(/[٠-٩]/g,function(e){return"٠١٢٣٤٥٦٧٨٩".indexOf(e)})),""!==n){if(n.startsWith("+")){var i=parseInt(n.slice(1)),o=this.countries.filter(function(e){return e.phonecode===i});if(o.length){var a=null;1===i?a=o.find(function(e){return 229===e.id}):44===i?a=o.find(function(e){return 228===e.id}):7===i&&(a=o.find(function(e){return 176===e.id})),void 0!==a&&null!==a||(a=o[0]),this.value=a.iso}this.phone=n}else this.phone=void 0!==t?!0===n.startsWith("0")&&"it"!==this.countryPhoneIso?"+"+t.phonecode+n.slice(1).replace(/\D/g,""):"+"+t.phonecode+n.replace(/\D/g,""):n;this.$emit("phoneFormatted",this.phone,this.value)}else this.phone=n,this.$emit("phoneFormatted",this.phone,this.value)},fillInputWithSavedPhone:function(){var e=this,t=null;null!==this.countryPhoneIso&&void 0===(t=this.countries.find(function(t){return t.iso===e.countryPhoneIso}))&&(t=null);for(var n=1;null===t&&n<5;)t=void 0!==(t=this.countries.find(function(t){return t.phonecode===parseInt(e.savedPhone.substr(1,n))&&1===t.priority}))?t:null,n++;if(!t)for(n=1;null===t&&n<5;)t=void 0!==(t=this.countries.find(function(t){return t.phonecode===parseInt(e.savedPhone.substr(1,n))}))?t:null,n++;null!==t&&(this.value=t.iso,this.input=this.savedPhone.replace("+"+t.phonecode,""),this.input=t.format.startsWith("0")?"0"+this.input:this.input)}},watch:{input:function(){this.formatPhoneNumber()}},components:{}}},683:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-input",{attrs:{placeholder:e.format,disabled:e.disabled,type:"tel",name:"tel",autocomplete:"tel",clearable:""},on:{clear:e.onClear},model:{value:e.input,callback:function(t){e.input=t},expression:"input"}},[n("el-select",{class:"am-selected-flag am-selected-flag-"+e.value,attrs:{slot:"prepend",placeholder:"","popper-class":e.$root.settings.customization.forms?e.dropdownClass:"",disabled:e.disabled},on:{change:e.changeCountry},slot:"prepend",model:{value:e.value,callback:function(t){e.value=t},expression:"value"}},e._l(e.countries,function(t){return n("el-option",{key:t.id,attrs:{value:t.iso,label:" "}},[n("span",{class:"am-flag am-flag-"+t.iso}),e._v(" "),n("span",{staticClass:"am-phone-input-nicename"},[e._v(e._s(t.nicename))]),e._v(" "),n("span",{staticClass:"am-phone-input-phonecode"},[e._v("+"+e._s(t.phonecode))])])}),1)],1)},staticRenderFns:[]}},684:function(e,t,n){"use strict";var i=n(666);t.a={mixins:[i.a],data:function(){return{}},methods:{getPaymentType:function(e){return e.gateway&&"onSite"!==e.gateway?"partiallyPaid"===e.status?"deposit":"online":"onsite"},longNamePayments:function(e){return["mollie","razorpay","square"].includes(e)},getPaymentData:function(e,t,n,i){var o=this,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],s={};if(s.paymentId=e.id,t){s.bookableType="appointment";var r=this.getProviderById(t.providerId);r.fullName=r.firstName+" "+r.lastName,s.appointment=[{bookable:this.getServiceById(t.serviceId),bookingStart:t.bookingStart,providers:[r]}],t.bookings.forEach(function(t){t.payments.forEach(function(n){n.id===e.id&&(s.appointment[0].booking=t)})}),a.forEach(function(e){var t=o.getProviderById(e.providerId);t.fullName=t.firstName+" "+t.lastName,s.appointment.push({bookable:o.getServiceById(e.serviceId),bookingStart:e.bookingStart,providers:[t],booking:e.bookings[0]})})}return n&&(s.bookableType="event",s.event=[{bookable:n,bookingStart:n.periods[0].periodStart,providers:n.providers}],n.bookings.forEach(function(t){t.payments.forEach(function(n){n.id===e.id&&(s.event[0].booking=t)})})),i&&(s.bookableType="package",s.package=[{bookable:i.package,bookingStart:null,providers:[],booking:i.booking}]),s.customer={email:e.customerEmail,firstName:e.customerFirstName,lastName:e.customerLastName,id:e.customerId},s},getPaymentStatusNiceName:function(e){switch(e){case"paid":return this.$root.labels.paid;case"pending":return this.$root.labels.pending;case"partiallyPaid":return this.$root.labels.partially_paid;case"refunded":return this.$root.labels.refunded}},getPaymentClassName:function(e){var t=e.gateway;return"oliver"===e.gatewayTitle&&(t="oliver"),"am-appointment-payment am-appointment-payment-"+t},getPaymentIconName:function(e){return"onSite"!==e.gateway&&"stripe"!==e.gateway||"oliver"!==e.gatewayTitle?e.gateway+".svg":"oliver.png"},getPaymentGatewayNiceName:function(e){return"stripe"===e.gateway&&"oliver"===e.gatewayTitle?this.$root.labels.oliver_on_line:"onSite"===e.gateway&&"oliver"===e.gatewayTitle?this.$root.labels.oliver_on_site:"onSite"===e.gateway?this.$root.labels.on_site:"wc"===e.gateway?e.gatewayTitle:e.gateway?e.gateway.charAt(0).toUpperCase()+e.gateway.slice(1):void 0},getPaymentIconWidth:function(e){switch(e){case"razorpay":return"76px";case"square":return"70px";case"mollie":return"38px";default:return"16px"}},getPaymentAmountData:function(e,t){var n={bookablePriceTotal:0,extrasPriceTotal:0,tax:0,wcTax:0,discountTotal:0,paidDeposit:0,paidRemaining:0,paid:0,refunded:0,subtotal:0,total:0,due:0},i=this;return e.forEach(function(e){var o=e.booking;switch(o.tax&&!Array.isArray(o.tax)&&(o.tax=JSON.parse(o.tax)),t){case"appointment":var a=i.getAppointmentPriceAmount({price:o.price,aggregatedPrice:o.aggregatedPrice,tax:o.tax,id:null},o.extras,o.persons,o.coupon,!1);n.bookablePriceTotal+=a.totalBookable,n.extrasPriceTotal+=a.total-a.totalBookable,n.tax+=a.tax,n.discountTotal+=a.discount;break;case"event":var s=i.getEventBookingPriceAmount(o);n.bookablePriceTotal+=s.total,n.extrasPriceTotal+=0,n.tax+=s.tax,n.discountTotal+=s.discount;break;case"package":var r=null;o.payments.forEach(function(e){r=e.coupon?e.coupon:r});var l=o.price*(o.aggregatedPrice?o.persons:1),c=i.getAmountData(o.tax&&o.tax.length?o.tax[0]:null,l,r);n.bookablePriceTotal+=c.total,n.extrasPriceTotal+=0,n.tax+=c.tax,n.discountTotal+=c.discount}var u=0,d=0;o.payments.forEach(function(e){n.discountTotal+=e.wcOrderId?e.wcItemCouponValue:0,"paid"===e.status?d+=e.amount:"partiallyPaid"===e.status&&(u+=e.amount),e.wcOrderId&&e.wcItemTaxValue&&(n.wcTax+=e.wcItemTaxValue)}),n.paidDeposit+=u,n.paidRemaining+=d,n.refunded+=o.payments.filter(function(e){return"refunded"===e.status}).reduce(function(e,t){return e+t.amount},0)}),n.subTotal=n.bookablePriceTotal+n.extrasPriceTotal,n.total=n.subTotal+n.tax+n.wcTax,n.total-=n.discountTotal,n.paid=n.paidDeposit+n.paidRemaining,n.total=n.total>=0?n.total:0,n.due=n.total-n.paid>0?n.total-n.paid:0,n}}}},686:function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];return e.apply(t,n)}}},687:function(e,t,n){"use strict";var i=n(656),o=n(717),a=n(719),s=n(720),r=n(721),l=n(688),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(722);e.exports=function(e){return new Promise(function(t,u){var d=e.data,p=e.headers;i.isFormData(d)&&delete p["Content-Type"];var m=new XMLHttpRequest,f="onreadystatechange",h=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in m||r(e.url)||(m=new window.XDomainRequest,f="onload",h=!0,m.onprogress=function(){},m.ontimeout=function(){}),e.auth){var g=e.auth.username||"",v=e.auth.password||"";p.Authorization="Basic "+c(g+":"+v)}if(m.open(e.method.toUpperCase(),a(e.url,e.params,e.paramsSerializer),!0),m.timeout=e.timeout,m[f]=function(){if(m&&(4===m.readyState||h)&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in m?s(m.getAllResponseHeaders()):null,i={data:e.responseType&&"text"!==e.responseType?m.response:m.responseText,status:1223===m.status?204:m.status,statusText:1223===m.status?"No Content":m.statusText,headers:n,config:e,request:m};o(t,u,i),m=null}},m.onerror=function(){u(l("Network Error",e,null,m)),m=null},m.ontimeout=function(){u(l("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",m)),m=null},i.isStandardBrowserEnv()){var b=n(723),y=(e.withCredentials||r(e.url))&&e.xsrfCookieName?b.read(e.xsrfCookieName):void 0;y&&(p[e.xsrfHeaderName]=y)}if("setRequestHeader"in m&&i.forEach(p,function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete p[t]:m.setRequestHeader(t,e)}),e.withCredentials&&(m.withCredentials=!0),e.responseType)try{m.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&m.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&m.upload&&m.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){m&&(m.abort(),u(e),m=null)}),void 0===d&&(d=null),m.send(d)})}},688:function(e,t,n){"use strict";var i=n(718);e.exports=function(e,t,n,o,a){var s=new Error(e);return i(s,t,n,o,a)}},689:function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},690:function(e,t,n){"use strict";function i(e){this.message=e}i.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},i.prototype.__CANCEL__=!0,e.exports=i},691:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i={street_number:"short_name",route:"long_name",locality:"long_name",administrative_area_level_1:"short_name",administrative_area_level_2:"county",country:"long_name",postal_code:"short_name"},o=["locality","administrative_area_level_3"],a=["locality","sublocality","postal_code","country","administrative_area_level_1","administrative_area_level_2"];t.default={name:"VueGoogleAutocomplete",props:{id:{type:String,required:!0},classname:String,placeholder:{type:String,default:"Start typing"},types:{type:String,default:"address"},country:{type:[String,Array],default:null},enableGeolocation:{type:Boolean,default:!1},geolocationOptions:{type:Object,default:null}},data:function(){return{autocomplete:null,autocompleteText:"",geolocation:{geocoder:null,loc:null,position:null}}},watch:{autocompleteText:function(e,t){this.$emit("inputChange",{newVal:e,oldVal:t},this.id)},country:function(e,t){this.autocomplete.setComponentRestrictions({country:null===this.country?[]:this.country})}},mounted:function(){var e={};this.types&&(e.types=[this.types]),this.country&&(e.componentRestrictions={country:this.country}),this.autocomplete=new google.maps.places.Autocomplete(document.getElementById(this.id),e),this.autocomplete.addListener("place_changed",this.onPlaceChanged)},methods:{onPlaceChanged:function(){var e=this.autocomplete.getPlace();e.geometry?void 0!==e.address_components&&(this.$emit("placechanged",this.formatResult(e),e,this.id),this.autocompleteText=document.getElementById(this.id).value,this.onChange()):this.$emit("no-results-found",e,this.id)},onFocus:function(){this.biasAutocompleteLocation(),this.$emit("focus")},onBlur:function(){this.$emit("blur")},onChange:function(){this.$emit("change",this.autocompleteText)},onKeyPress:function(e){this.$emit("keypress",e)},onKeyUp:function(e){this.$emit("keyup",e)},clear:function(){this.autocompleteText=""},focus:function(){this.$refs.autocomplete.focus()},blur:function(){this.$refs.autocomplete.blur()},update:function(e){this.autocompleteText=e},updateCoordinates:function(e){var t=this;(e||e.lat||e.lng)&&(this.geolocation.geocoder||(this.geolocation.geocoder=new google.maps.Geocoder),this.geolocation.geocoder.geocode({location:e},function(e,n){"OK"===n?(e=t.filterGeocodeResultTypes(e))[0]?(t.$emit("placechanged",t.formatResult(e[0]),e[0],t.id),t.update(e[0].formatted_address)):t.$emit("error","no result for provided coordinates"):t.$emit("error","error getting address from coords")}))},geolocate:function(){var e=this;this.updateGeolocation(function(t,n){e.updateCoordinates(t)})},updateGeolocation:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(navigator.geolocation){var n={};this.geolocationOptions&&Object.assign(n,this.geolocationOptions),navigator.geolocation.getCurrentPosition(function(n){var i={lat:n.coords.latitude,lng:n.coords.longitude};e.geolocation.loc=i,e.geolocation.position=n,t&&t(i,n)},function(t){e.$emit("error","Cannot get Coordinates from navigator",t)},n)}},biasAutocompleteLocation:function(){var e=this;this.enableGeolocation&&this.updateGeolocation(function(t,n){var i=new google.maps.Circle({center:t,radius:n.coords.accuracy});e.autocomplete.setBounds(i.getBounds())})},formatResult:function(e){for(var t={},n=0;n<e.address_components.length;n++){var o=e.address_components[n].types[0];if(i[o]){var a=e.address_components[n][i[o]];t[o]=a}}return t.latitude=e.geometry.location.lat(),t.longitude=e.geometry.location.lng(),t},filterGeocodeResultTypes:function(e){if(!e||!this.types)return e;var t=[],n=[this.types];n.includes("(cities)")&&(n=n.concat(o)),n.includes("(regions)")&&(n=n.concat(a));var i=!0,s=!1,r=void 0;try{for(var l,c=e[Symbol.iterator]();!(i=(l=c.next()).done);i=!0){var u=l.value,d=!0,p=!1,m=void 0;try{for(var f,h=u.types[Symbol.iterator]();!(d=(f=h.next()).done);d=!0){var g=f.value;if(n.includes(g)){t.push(u);break}}}catch(e){p=!0,m=e}finally{try{!d&&h.return&&h.return()}finally{if(p)throw m}}}}catch(e){s=!0,r=e}finally{try{!i&&c.return&&c.return()}finally{if(s)throw r}}return t}}}},692:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("input",{directives:[{name:"model",rawName:"v-model",value:e.autocompleteText,expression:"autocompleteText"}],ref:"autocomplete",class:e.classname,attrs:{type:"text",id:e.id,placeholder:e.placeholder},domProps:{value:e.autocompleteText},on:{focus:function(t){return e.onFocus()},blur:function(t){return e.onBlur()},change:e.onChange,keypress:e.onKeyPress,keyup:e.onKeyUp,input:function(t){t.target.composing||(e.autocompleteText=t.target.value)}}})},staticRenderFns:[]}},693:function(e,t,n){var i=n(90)(n(694),n(695),!1,null,null,null);e.exports=i.exports},694:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(91),o=n(336),a=n(654);t.default={mixins:[i.a,o.a,a.a],props:["oldCustomize","appointmentsApproved","appointmentsPending","employeesTotal","customersTotal","locationsTotal","packagesTotal","resourcesTotal","servicesTotal","categoriesTotal","financeTotal","addNewTaxBtnDisplay","addNewCouponBtnDisplay","addNewCustomFieldBtnDisplay","locations","categories","bookableType","params","fetched"],methods:{showMainCustomize:function(){this.$emit("showMainCustomize",null)},showDialogCustomer:function(){this.$emit("newCustomerBtnClicked",null)},showDialogAppointment:function(){this.$emit("newAppointmentBtnClicked",null)},showDialogEvent:function(){this.$emit("newEventBtnClicked",null)},showDialogEmployee:function(){this.$emit("newEmployeeBtnClicked")},showDialogLocation:function(){this.$emit("newLocationBtnClicked")},showDialogService:function(){this.$emit("newServiceBtnClicked")},showDialogPackage:function(){this.$emit("newPackageBtnClicked")},showDialogPackageBooking:function(){this.$emit("newPackageBookingBtnClicked")},showDialogResource:function(){this.$emit("newResourceBtnClicked")},showDialogTax:function(){this.$emit("newTaxBtnClicked")},showDialogCoupon:function(){this.$emit("newCouponBtnClicked")},showDialogCustomFields:function(){this.$emit("newCustomFieldBtnClicked")},selectAllInCategory:function(e){this.$emit("selectAllInCategory",e)},changeFilter:function(){this.$emit("changeFilter")}}}},695:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"am-page-header am-section"},[n("el-row",{attrs:{type:"wpamelia-calendar"===e.$router.currentRoute.name?"":"flex",align:"middle"}},[n("el-col",{attrs:{span:"wpamelia-calendar"===e.$router.currentRoute.name?6:18}},[n("div",{staticClass:"am-logo"},[n("img",{staticClass:"logo-big",attrs:{width:"92",src:e.$root.getUrl+"public/img/amelia-logo-horizontal.svg"}}),e._v(" "),n("img",{staticClass:"logo-small",attrs:{width:"28",src:e.$root.getUrl+"public/img/amelia-logo-symbol.svg"}})]),e._v(" "),n("h1",{staticClass:"am-page-title"},[e._v("\n "+e._s(e.bookableType?e.$root.labels[e.bookableType]:e.$router.currentRoute.meta.title)+"\n\n "),e._v(" "),e.appointmentsApproved>=0?n("span",{staticClass:"am-appointments-number approved"},[e._v("\n "+e._s(e.appointmentsApproved)+"\n ")]):e._e(),e._v(" "),e.appointmentsPending>=0?n("span",{staticClass:"am-appointments-number pending"},[e._v("\n "+e._s(e.appointmentsPending)+"\n ")]):e._e(),e._v(" "),e.employeesTotal>=0&&!0===e.$root.settings.capabilities.canReadOthers?n("span",[n("span",{staticClass:"total-number"},[e._v(e._s(e.employeesTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e(),e._v(" "),e.customersTotal>=0?n("span",[n("span",{staticClass:"total-number"},[e._v(e._s(e.customersTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e(),e._v(" "),e.locationsTotal>=0?n("span",[n("span",{staticClass:"total-number"},[e._v(e._s(e.locationsTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e(),e._v(" "),e.servicesTotal>=0&&"services"===e.bookableType?n("span",[n("span",{staticClass:"total-number"},[e._v(e._s(e.servicesTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e(),e._v(" "),e.packagesTotal>=0&&"packages"===e.bookableType?n("span",[n("span",{staticClass:"total-number"},[e._v(e._s(e.packagesTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e(),e._v(" "),e.resourcesTotal>=0&&"resources"===e.bookableType?n("span",[n("span",{staticClass:"total-number"},[e._v(e._s(e.resourcesTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e(),e._v(" "),e.financeTotal>=0?n("span",[n("span",{staticClass:"total-number"},[e._v(e._s(e.financeTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e()])]),e._v(" "),n("el-col",{staticClass:"align-right v-calendar-column",attrs:{span:"wpamelia-calendar"===e.$router.currentRoute.name?18:6}},["wpamelia-appointments"===e.$router.currentRoute.name&&(!0===e.$root.settings.capabilities.canWriteOthers||"provider"===this.$root.settings.role&&this.$root.settings.roles.allowWriteAppointments)?n("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogAppointment}},[n("i",{staticClass:"el-icon-plus"}),e._v(" "),n("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.new_appointment))])]):e._e(),e._v(" "),"wpamelia-events"===e.$router.currentRoute.name&&(!0===e.$root.settings.capabilities.canWriteOthers||"provider"===this.$root.settings.role&&this.$root.settings.roles.allowWriteEvents)?n("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogEvent}},[n("i",{staticClass:"el-icon-plus"}),e._v(" "),n("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.new_event))])]):e._e(),e._v(" "),"wpamelia-employees"===e.$router.currentRoute.name&&!0===e.$root.settings.capabilities.canWrite&&!0===e.$root.settings.capabilities.canWriteOthers?n("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogEmployee}},[n("i",{staticClass:"el-icon-plus"}),e._v(" "),n("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_employee))])]):e._e(),e._v(" "),"wpamelia-customers"===e.$router.currentRoute.name&&!0===e.$root.settings.capabilities.canWrite?n("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogCustomer}},[n("i",{staticClass:"el-icon-plus"}),e._v(" "),n("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_customer))])]):e._e(),e._v(" "),"wpamelia-locations"===e.$router.currentRoute.name&&!0===e.$root.settings.capabilities.canWrite?n("el-button",{staticClass:"am-dialog-create",class:e.licenceClassDisabled(),attrs:{type:"primary",disabled:e.notInLicence()},on:{click:e.showDialogLocation}},[n("i",{staticClass:"el-icon-plus"}),e._v(" "),n("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_location))])]):e._e(),e._v(" "),"wpamelia-services"===e.$router.currentRoute.name&&e.categoriesTotal>0&&!0===e.$root.settings.capabilities.canWrite&&"services"===e.bookableType?n("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogService}},[n("i",{staticClass:"el-icon-plus"}),e._v(" "),n("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_service))])]):e._e(),e._v(" "),"wpamelia-services"===e.$router.currentRoute.name&&!0===e.$root.settings.capabilities.canWrite&&"packages"===e.bookableType?n("el-button",{staticClass:"am-dialog-create",class:e.licenceClassDisabled("pro"),attrs:{type:"primary",disabled:e.notInLicence("pro")},on:{click:function(t){e.packagesTotal>=0?e.showDialogPackage():e.showDialogPackageBooking()}}},[n("i",{staticClass:"el-icon-plus"}),e._v(" "),n("span",{staticClass:"button-text"},[e._v(e._s(e.packagesTotal>=0?e.$root.labels.add_package:e.$root.labels.book_package))])]):e._e(),e._v(" "),"wpamelia-services"===e.$router.currentRoute.name&&!0===e.$root.settings.capabilities.canWrite&&"resources"===e.bookableType?n("el-button",{staticClass:"am-dialog-create",class:e.licenceClassDisabled("pro"),attrs:{type:"primary",disabled:e.notInLicence("pro")},on:{click:function(t){return e.showDialogResource()}}},[n("i",{staticClass:"el-icon-plus"}),e._v(" "),n("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_resource))])]):e._e(),e._v(" "),"wpamelia-finance"===e.$router.currentRoute.name&&e.addNewTaxBtnDisplay&&!0===e.$root.settings.capabilities.canWrite?n("el-button",{staticClass:"am-dialog-create",class:e.licenceClassDisabled(),attrs:{type:"primary",disabled:e.notInLicence()},on:{click:e.showDialogTax}},[n("i",{staticClass:"el-icon-plus"}),e._v(" "),n("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.new_tax))])]):e._e(),e._v(" "),"wpamelia-finance"===e.$router.currentRoute.name&&e.addNewCouponBtnDisplay&&!0===e.$root.settings.capabilities.canWrite?n("el-button",{staticClass:"am-dialog-create",class:e.licenceClassDisabled("starter"),attrs:{type:"primary",disabled:e.notInLicence("starter")},on:{click:e.showDialogCoupon}},[n("i",{staticClass:"el-icon-plus"}),e._v(" "),n("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.new_coupon))])]):e._e(),e._v(" "),n("transition",{attrs:{name:"fade"}},["wpamelia-cf"===e.$router.currentRoute.name&&e.addNewCustomFieldBtnDisplay?n("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogCustomFields}},[n("i",{staticClass:"el-icon-plus"}),e._v(" "),n("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_custom_field))])]):e._e()],1),e._v(" "),"wpamelia-dashboard"===e.$router.currentRoute.name?n("div",{staticClass:"v-calendar-column"},[n("div",{staticClass:"el-form-item__content"},[n("v-date-picker",{attrs:{mode:"range","popover-visibility":"focus","popover-direction":"bottom","popover-align":"right","tint-color":"#1A84EE","show-day-popover":!1,"input-props":{class:"el-input__inner"},"is-expanded":!1,"is-required":!0,"input-class":"el-input__inner",formats:e.vCalendarFormats,"is-double-paned":!0},on:{input:e.changeFilter},model:{value:e.params.dates,callback:function(t){e.$set(e.params,"dates",t)},expression:"params.dates"}})],1)]):e._e(),e._v(" "),"wpamelia-calendar"===e.$router.currentRoute.name?n("div",{staticClass:"am-calendar-header-filters"},[n("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0}},[n("el-form-item",{attrs:{label:e.$root.labels.services+":"}},[n("el-select",{attrs:{multiple:"",filterable:"","collapse-tags":"",loading:!e.fetched,placeholder:e.$root.labels.all_services},on:{change:e.changeFilter},model:{value:e.params.services,callback:function(t){e.$set(e.params,"services",t)},expression:"params.services"}},e._l(e.categories,function(t){return n("div",{key:t.id},[n("div",{staticClass:"am-drop-parent",on:{click:function(n){return e.selectAllInCategory(t.id)}}},[n("span",[e._v(e._s(t.name))])]),e._v(" "),e._l(t.serviceList,function(e){return n("el-option",{key:e.id,staticClass:"am-drop-child",attrs:{label:e.name,value:e.id}})})],2)}),0)],1),e._v(" "),n("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.locations.length,expression:"locations.length"}],attrs:{label:e.$root.labels.locations+":"}},[n("el-select",{attrs:{multiple:"",clearable:"","collapse-tags":"",placeholder:e.$root.labels.all_locations,loading:!e.fetched},on:{change:e.changeFilter},model:{value:e.params.locations,callback:function(t){e.$set(e.params,"locations",t)},expression:"params.locations"}},e._l(e.locations,function(e){return n("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1),e._v(" "),"wpamelia-calendar"===e.$router.currentRoute.name&&("admin"===e.$root.settings.role||"manager"===e.$root.settings.role||"provider"===e.$root.settings.role&&e.$root.settings.roles.allowWriteAppointments)?n("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogAppointment}},[n("i",{staticClass:"el-icon-plus"}),e._v(" "),n("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.new_appointment))])]):e._e()],1):e._e(),e._v(" "),e.oldCustomize&&"wpamelia-customize"===e.$router.currentRoute.name?n("div",{staticClass:"am-calendar-header-filters"},[n("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showMainCustomize}},[n("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.go_back))])])],1):e._e()],1)],1)],1)},staticRenderFns:[]}},697:function(e,t,n){var i=n(90)(n(739),n(740),!1,null,null,null);e.exports=i.exports},698:function(e,t,n){"use strict";var i=n(0),o=n.n(i),a=n(661);t.a={mixins:[a.a],data:function(){return{recurringDates:[]}},methods:{getRecurringAppointmentsData:function(){var e=this,t=[];return this.recurringData.dates.forEach(function(n){var i=e.getProviderService(n.providerId,e.appointment.serviceId);t.push({providerId:n.providerId,locationId:n.locationId,bookingStart:o()(n.date).format("YYYY-MM-DD")+" "+n.time,price:e.getBookingServicePrice(i,e.appointment.serviceDuration,e.appointment.bookings[0].persons,n.providerId,o()(n.date).format("YYYY-MM-DD")+" "+n.time),depositData:"disabled"!==i.depositPayment?{deposit:i.deposit,depositPayment:i.depositPayment,depositPerPerson:i.depositPerPerson}:null})}),t.shift(),t},toggleRecurringActive:function(){this.appointment.serviceId&&"disabled"!==this.getServiceById(this.appointment.serviceId).recurringCycle?this.isRecurringAvailable=!0:(this.isRecurringAvailable=!1,this.activeRecurring=!1)},getDefaultRecurringSettings:function(e,t,n){var i=this.getAvailableRecurringDates(n),a="all"===t?"daily":t,s="",r=o()(e,"YYYY-MM-DD"),l=r.format("D");switch(a){case"daily":s="day";break;case"weekly":s="week";break;case"monthly":s="month"}return{selectedMonthlyWeekDayString:r.format("dddd"),monthDateRule:Math.ceil(l/7),cycle:a,maxDate:o()(e,"YYYY-MM-DD HH:mm").add(1,"days").toDate(),maxCount:1,selectedWeekDayIndex:r.isoWeekday()-1,calendarDates:i,cycleInterval:1,weekDaysSelected:[r.isoWeekday()-1],repeatIntervalLabels:this.getRepeatIntervalLabels(this.$root.labels[s],this.$root.labels[s+"s"],o()(i[i.length-1]).diff(r,"days"))}},getAvailableRecurringDates:function(e){var t=[];return this.useSortedDateStrings(Object.keys(e)).forEach(function(e){t.push(o()(e+" 00:00:00"))}),t},getRepeatIntervalLabels:function(e,t,n){for(var i=[],o=0;o<n;o++)i.push({label:0===o?e:o+1+" "+t,value:o+1});return i}}}},699:function(e,t,n){var i;i=function(){return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=".",t(t.s=9)}([function(e,t,n){"use strict";t.a={prefix:"",suffix:"",thousands:",",decimal:".",precision:2}},function(e,t,n){"use strict";var i=n(2),o=n(5),a=n(0);t.a=function(e,t){if(t.value){var s=n.i(o.a)(a.a,t.value);if("INPUT"!==e.tagName.toLocaleUpperCase()){var r=e.getElementsByTagName("input");1!==r.length||(e=r[0])}e.oninput=function(){var t=e.value.length-e.selectionEnd;e.value=n.i(i.a)(e.value,s),t=Math.max(t,s.suffix.length),t=e.value.length-t,t=Math.max(t,s.prefix.length+1),n.i(i.b)(e,t),e.dispatchEvent(n.i(i.c)("change"))},e.onfocus=function(){n.i(i.b)(e,e.value.length-s.suffix.length)},e.oninput(),e.dispatchEvent(n.i(i.c)("input"))}}},function(e,t,n){"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.a;"number"==typeof e&&(e=e.toFixed(s(t.precision)));var n=e.indexOf("-")>=0?"-":"",i=l(r(a(e),t.precision)).split("."),o=i[0],c=i[1];return o=function(e,t){return e.replace(/(\d)(?=(?:\d{3})+\b)/gm,"$1"+t)}(o,t.thousands),t.prefix+n+function(e,t,n){return t?e+n+t:e}(o,c,t.decimal)+t.suffix}function o(e,t){var n=e.indexOf("-")>=0?-1:1,i=r(a(e),t);return parseFloat(i)*n}function a(e){return l(e).replace(/\D+/g,"")||"0"}function s(e){return function(e,t,n){return Math.max(e,Math.min(t,n))}(0,e,20)}function r(e,t){var n=Math.pow(10,t);return(parseFloat(e)/n).toFixed(s(t))}function l(e){return e?e.toString():""}function c(e,t){var n=function(){e.setSelectionRange(t,t)};e===document.activeElement&&(n(),setTimeout(n,1))}function u(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}var d=n(0);n.d(t,"a",function(){return i}),n.d(t,"d",function(){return o}),n.d(t,"b",function(){return c}),n.d(t,"c",function(){return u})},function(e,t,n){"use strict";function i(e,t){t&&Object.keys(t).map(function(e){r.a[e]=t[e]}),e.directive("money",s.a),e.component("money",a.a)}Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),a=n.n(o),s=n(1),r=n(0);n.d(t,"Money",function(){return a.a}),n.d(t,"VMoney",function(){return s.a}),n.d(t,"options",function(){return r.a}),n.d(t,"VERSION",function(){return l});var l="0.8.1";t.default=i,"undefined"!=typeof window&&window.Vue&&window.Vue.use(i)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(0),a=n(2);t.default={name:"Money",props:{value:{required:!0,type:[Number,String],default:0},masked:{type:Boolean,default:!1},precision:{type:Number,default:function(){return o.a.precision}},decimal:{type:String,default:function(){return o.a.decimal}},thousands:{type:String,default:function(){return o.a.thousands}},prefix:{type:String,default:function(){return o.a.prefix}},suffix:{type:String,default:function(){return o.a.suffix}}},directives:{money:i.a},data:function(){return{formattedValue:""}},watch:{value:{immediate:!0,handler:function(e,t){var i=n.i(a.a)(e,this.$props);i!==this.formattedValue&&(this.formattedValue=i)}}},methods:{change:function(e){this.$emit("input",this.masked?e.target.value:n.i(a.d)(e.target.value,this.precision))}}}},function(e,t,n){"use strict";t.a=function(e,t){return e=e||{},t=t||{},Object.keys(e).concat(Object.keys(t)).reduce(function(n,i){return n[i]=void 0===t[i]?e[i]:t[i],n},{})}},function(e,t,n){var i=n(7)(n(4),n(8),null,null);e.exports=i.exports},function(e,t){e.exports=function(e,t,n,i){var o,a=e=e||{},s=typeof e.default;"object"!==s&&"function"!==s||(o=e,a=e.default);var r="function"==typeof a?a.options:a;if(t&&(r.render=t.render,r.staticRenderFns=t.staticRenderFns),n&&(r._scopeId=n),i){var l=r.computed||(r.computed={});Object.keys(i).forEach(function(e){var t=i[e];l[e]=function(){return t}})}return{esModule:o,exports:a,options:r}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("input",{directives:[{name:"money",rawName:"v-money",value:{precision:e.precision,decimal:e.decimal,thousands:e.thousands,prefix:e.prefix,suffix:e.suffix},expression:"{precision, decimal, thousands, prefix, suffix}"}],staticClass:"v-money",attrs:{type:"tel"},domProps:{value:e.formattedValue},on:{change:e.change}})},staticRenderFns:[]}},function(e,t,n){e.exports=n(3)}])},e.exports=i()},704:function(e,t,n){"use strict";var i=n(666),o=n(661);t.a={mixins:[o.a,i.a],data:function(){return{}},methods:{getAppointmentService:function(e){return this.getProviderById(e.providerId).serviceList.find(function(t){return t.id===e.serviceId})||this.getServiceById(e.serviceId)},getAppointmentPrice:function(e,t){var n=this,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=0;return t.filter(function(e){return null===e.packageCustomerService}).forEach(function(t){["approved","pending"].includes(t.status)&&(o+=n.getBookingPrice(t,!1,t.price,t.aggregatedPrice,e.id))}),i?this.getFormattedPrice(o>=0?o:0,!this.$root.settings.payments.hideCurrencySymbolFrontend):o>=0?o:0},getBookingPrice:function(e,t,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a={price:t?n:e.price,aggregatedPrice:i,id:t?null:o};t||(a.tax=e.tax);var s=this.getAppointmentPriceAmount(a,e.extras.filter(function(e){return!("selected"in e)||e.selected}),e.persons,e.coupon,!1);return s.discount>s.total?0:s.total-s.discount+s.tax},getPackagePrice:function(e,t){var n=e.bookings[t].packageCustomerService.packageCustomer.coupon,i=e.bookings[t].packageCustomerService.packageCustomer.price,o=i/100*(n?n.discount:0)+(n?n.deduction:0);return o>i?0:i-o}}}},705:function(e,t,n){"use strict";t.a={data:function(){return{}},methods:{updateStashEntities:function(e){this.$root.settings.activation.stash&&this.$http.post(this.$root.getAjaxUrl+"/stash",e).then(function(e){})}}}},706:function(e,t,n){var i=n(90)(null,n(707),!1,null,null,null);e.exports=i.exports},707:function(e,t){e.exports={render:function(){var e=this.$createElement;return(this._self._c||e)("div")},staticRenderFns:[]}},708:function(e,t,n){var i=n(90)(null,n(709),!1,null,null,null);e.exports=i.exports},709:function(e,t){e.exports={render:function(){var e=this.$createElement;return(this._self._c||e)("div")},staticRenderFns:[]}},710:function(e,t,n){"use strict";var i=n(0),o=n.n(i),a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.a={mixins:[],data:function(){return{selectedPackageId:null,packageSlotsFetched:0,packageServiceSelected:0,selectedPackage:null,activePackage:!1,packageListShown:!1,packageCreated:!1,disableFetchPackageSlots:!1}},methods:{getPackagePrice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=null;if(t)for(var i in e.purchases)if(e.purchases[i].packageCustomerId===parseInt(t)){n=e.purchases[i].coupon;break}var o=e.calculatedPrice?e.price:e.price-e.price/100*e.discount,a=n?o*n.discount/100-n.deduction:0;return o-Math.abs(a)},packageSlotsFetchedCallback:function(){this.packageSlotsFetched++,this.passedPackage&&(this.fetched=!0)},getAvailablePackages:function(){var e=this;return this.options.entities.packages.filter(function(t){return t.availableBookableInfo.filter(function(t){return t.serviceId===e.appointment.serviceId}).length>0}).sort(function(e,t){return e.position-t.position})},initPackage:function(e){this.selectedPackage=e,this.selectedPackage.bookable.forEach(function(e){e.bookings=[],e.bookings.push({cleared:!1,date:null,time:null,providerId:null,locationId:null,slots:[]}),e.calendarData={slotsIndexStarted:0,clonedSlotsData:null,slotsData:null,disabledWeekdays:null,availableDates:null,availableTimeSlots:[],selectedWeekIndex:0}})},selectPackage:function(e){var t=document.getElementById(this.id);this.activePicker=!1,t.classList.remove("am-active-picker"),this.activeRecurringDates=!1,this.activeRecurringSetup=!1,this.activeRecurring=!1,this.calendarVisible=!1,this.packageCalendarActive=!0,this.initPackage(e),this.getCurrentUser(),this.activePackage=!0},closePackage:function(){var e=this;this.selectedPackage=null,this.activePackage=!1,this.packageCreated=!1,this.packageCalendarActive=!1,null===this.selectedPackageId&&this.updateSettings(this.getServiceById(this.appointment.serviceId).settings);var t=document.getElementById(this.id);this.fetchedSlots||t.classList.remove("am-active-picker"),setTimeout(function(){e.times=document.getElementById(e.calendarId)},200)},getPackageAppointmentsData:function(){var e=[],t=[];return this.selectedPackage&&this.selectedPackage.bookable.forEach(function(n){n.bookings.forEach(function(t){t.date&&t.time&&e.push({bookingStart:o()(t.date).format("YYYY-MM-DD")+" "+t.time,serviceId:n.service.id,providerId:t.providerId,locationId:t.locationId})}),t.push({serviceId:n.service.id,providerId:n.providerId?n.providerId:null,locationId:n.locationId?n.locationId:null})}),{id:this.selectedPackage?this.selectedPackage.id:null,data:e,rules:t}},packageListShow:function(){this.loading=!1,this.activePackage=!1,this.packageListShown=!0;var e=document.getElementById(this.id);e.classList.toggle("am-active-package-list",!0),e.classList.toggle("am-active-picker",!1),e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},packageSlotsSelectedCallback:function(){this.appointment.bookings[0].extras=[],this.updateSettings(this.getPackageById(this.selectedPackage.id).settings);var e=document.getElementById(this.id);this.loading=!1,this.packageCreated=!1,this.packageListShown=!1,this.activeConfirm=!0,this.packageCreated=!0,e.classList.remove("am-active-package-list"),e.classList.toggle("am-active-confirm",this.activeConfirm)},bookingPackageDataCompiler:function(e){var t=this,n=[];return e.forEach(function(e){e.date&&e.time&&n.push({date:e.date,time:e.time,provider:t.getProviderById(e.providerId)||t.responseEntities.employees.filter(function(t){return t.id===e.providerId})[0],location:e.locationId?t.getLocationById(e.locationId):null})}),n},getBookablePackageData:function(){var e=this,t=[],n=this.options.entities.locations.length>0;return this.selectedPackage.bookable.forEach(function(i){var o=e.bookingPackageDataCompiler(i.bookings),a=n?{appointment:1,date:7,time:4,employee:6,location:6}:{appointment:1,date:9,time:6,employee:8,location:0};t.push({serviceName:i.service.name,serviceQuantity:i.quantity,serviceAppointment:o,serviceDuration:i.service.duration,service:i.service,spanLengths:a,hasLocations:n,singleEmployee:null,singleLocation:null})}),{name:this.selectedPackage.name,color:this.selectedPackage.color,discount:this.selectedPackage.discount,description:this.selectedPackage.description,price:this.getPackagePrice(this.selectedPackage),pictureThumbPath:this.selectedPackage.pictureThumbPath,durationCount:this.selectedPackage.durationCount,durationType:this.selectedPackage.durationType,endDate:this.selectedPackage.endDate,bookings:t,translations:this.selectedPackage.translations}},parsePackageAppointments:function(e,t,n){var i=this,a=e.find(function(e){return e.customerId===i.state.profile.id});void 0!==a&&a||(a={packages:[]}),this.packagesAppointments=this.parseAppointments(t,n),this.packagesAvailability=a?a.packages:[];var s=this.calculateServicesOccupancy(),r=[];a.packages.forEach(function(e){var t=i.getPackageById(e.packageId),n=t.bookable.map(function(e){return e.service.id});e.services.forEach(function(e){if(-1===n.indexOf(e.serviceId)){var o={providers:[],locations:[]};e.bookings.forEach(function(e){e.providerId&&o.providers.push(e.providerId),e.locationId&&o.locations.push(e.locationId)}),o.service=i.getServiceById(e.serviceId),t.bookable.push(o)}})}),this.options.entities.packages.forEach(function(e){a.packages.forEach(function(t){if(e.id===t.packageId){var n=null;e.bookable.forEach(function(a){a.appointmentServiceIds=[],t.services.forEach(function(t){var r={};t.bookings.forEach(function(e){t.serviceId in r||(r[t.serviceId]=0),r[t.serviceId]+=e.total,(null===n||o()(e.end).isBefore(o()(n)))&&(n=e.end),e.locationId&&-1===a.locations.map(function(e){return e.id}).indexOf(e.locationId)&&a.locations.push(i.getLocationById(e.locationId)),a.appointmentServiceIds.push(e.id)}),a.service.id===t.serviceId&&(a.service.appointmentsAvailable=i.getAvailableServicePackageAppointmentsCount(s,e.id,a.service.id),a.service.total=i.getTotalServicePackageAppointmentsCount(s,e.id,a.service.id))});var r=[];Object.values(i.packagesAppointments).forEach(function(e){e.appointments.forEach(function(e){e.bookings.forEach(function(t){-1!==a.appointmentServiceIds.indexOf(t.packageCustomerService.id)&&e.serviceId===a.service.id&&r.push(e)})})}),r.sort(function(e,t){return t.id-e.id}),a.service.bookedAppointments=r});var a=!1;for(var l in s[e.id])if(null!==s[e.id][l].quantity){a=!0;break}e.totalAvailableAppointments=i.getTotalAvailablePackageAppointmentsCount(s,e.id),e.appointmentsSharable=a,e.expireDateString=n,r.push(e)}})}),r.forEach(function(e){"purchases"in e||(e.purchases={}),"payments"in e||(e.payments={}),i.packagesAvailability.find(function(t){return t.packageId===e.id}).services.forEach(function(t){t.bookings.forEach(function(n){if(n.id in e.purchases||(e.purchases[n.id]=n),n.packageCustomerId in e.payments||(e.payments[n.packageCustomerId]={payments:n.payments,packagePurchased:n.purchased}),"canceled"===n.status){e.totalAvailableAppointments=e.totalAvailableAppointments-n.count;var i=e.bookable.find(function(e){return e.service.id===t.serviceId});i&&void 0!==i&&(i.service.appointmentsAvailable=i.service.appointmentsAvailable-n.count,i.service.total=i.service.total-n.total)}})})}),this.packagesData=r},calculateServicesOccupancy:function(){var e={};this.packagesAvailability.forEach(function(t){t.packageId in e||(e[t.packageId]={}),t.services.forEach(function(n){n.bookings.forEach(function(n){n.packageCustomerId in e[t.packageId]||(e[t.packageId][n.packageCustomerId]={quantity:n.sharedCapacity?n.total:null,total:n.sharedCapacity?n.total:null,shared:n.sharedCapacity,services:{},ids:{}}),n.serviceId in e[t.packageId][n.packageCustomerId].services||(e[t.packageId][n.packageCustomerId].services[n.serviceId]={}),n.id in e[t.packageId][n.packageCustomerId].services[n.serviceId]||(e[t.packageId][n.packageCustomerId].services[n.serviceId][n.id]={quantity:n.sharedCapacity?null:n.total,total:n.sharedCapacity?null:n.total}),e[t.packageId][n.packageCustomerId].ids[n.id]=!0})})});var t={};for(var n in this.packagesAppointments)this.packagesAppointments[n].appointments.filter(function(e){return"canceled"!==e.status}).forEach(function(e){e.bookings.forEach(function(n){"canceled"!==n.status&&(n.packageCustomerService.id in t||(t[n.packageCustomerService.id]={serviceId:e.serviceId,quantity:0}),t[n.packageCustomerService.id].quantity++)})});for(var i in e)for(var o in e[i]){for(var a in e[i][o].ids)a in t&&(null!==e[i][o].quantity?e[i][o].quantity-=t[a].quantity:e[i][o].services[t[a].serviceId][a].quantity-=t[a].quantity);delete e[i][o].shared,delete e[i][o].ids}return e},getTotalAvailablePackageAppointmentsCount:function(e,t){var n=0;for(var i in e[t]){var o=e[t][i];if(null!==o.quantity)n+=o.quantity;else for(var a in o.services)for(var s in o.services[a])n+=o.services[a][s].quantity}return n},getTotalServicePackageAppointmentsCount:function(e,t,n){var i=0;for(var o in e[t]){var a=e[t][o];if(null!==a.total)i+=a.total;else for(var s in a.services[n])i+=a.services[n][s].total}return i},getAvailableServicePackageAppointmentsCount:function(e,t,n){var i=0;for(var o in e[t]){var a=e[t][o];if(null!==a.quantity)i+=a.quantity;else for(var s in a.services[n])i+=a.services[n][s].quantity}return i},packagePurchaseHasAppointments:function(e){return e.appointments.filter(function(e){return null!==e.id}).length>0},parseAppointments:function(e,t){var n=this;if(0===Object.keys(e).length)return{};for(var i in e)e.hasOwnProperty(i)&&e[i].appointments.forEach(function(e){var i={};e.bookings.forEach(function(e){e.customerId in i||(i[e.customerId]=[]),i[e.customerId][e.id]=e.status});var o={};for(var a in i)for(var s in i[a])a in o&&"approved"!==i[a][s]&&"pending"!==i[a][s]||(o[a]=s);e.bookings.forEach(function(i){i.customerId in o&&parseInt(i.id)!==parseInt(o[i.customerId])||(""===t&&(e.bookingStart=n.getConvertedUtcToLocalDateTime(e.bookingStart),e.bookingEnd=n.getConvertedUtcToLocalDateTime(e.bookingEnd)),e.loadingTimeSlots=!1,n.state&&"customer"===n.state.cabinetType&&(e.bookings=[i]))})});if(""===t){var o=function(){var t={};for(var n in e)e.hasOwnProperty(n)&&e[n].appointments.forEach(function(e){var n=e.bookingStart.split(" ")[0];n in t?t[n].appointments.push(e):t[n]={appointments:[e],date:n}});return{v:t}}();if("object"===(void 0===o?"undefined":a(o)))return o.v}return e}}}},713:function(e,t,n){e.exports=n(714)},714:function(e,t,n){"use strict";var i=n(656),o=n(686),a=n(715),s=n(669);function r(e){var t=new a(e),n=o(a.prototype.request,t);return i.extend(n,a.prototype,t),i.extend(n,t),n}var l=r(s);l.Axios=a,l.create=function(e){return r(i.merge(s,e))},l.Cancel=n(690),l.CancelToken=n(729),l.isCancel=n(689),l.all=function(e){return Promise.all(e)},l.spread=n(730),e.exports=l,e.exports.default=l},715:function(e,t,n){"use strict";var i=n(669),o=n(656),a=n(724),s=n(725),r=n(727),l=n(728);function c(e){this.defaults=e,this.interceptors={request:new a,response:new a}}c.prototype.request=function(e){"string"==typeof e&&(e=o.merge({url:arguments[0]},arguments[1])),(e=o.merge(i,this.defaults,{method:"get"},e)).method=e.method.toLowerCase(),e.baseURL&&!r(e.url)&&(e.url=l(e.baseURL,e.url));var t=[s,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},o.forEach(["delete","get","head","options"],function(e){c.prototype[e]=function(t,n){return this.request(o.merge(n||{},{method:e,url:t}))}}),o.forEach(["post","put","patch"],function(e){c.prototype[e]=function(t,n,i){return this.request(o.merge(i||{},{method:e,url:t,data:n}))}}),e.exports=c},716:function(e,t,n){"use strict";var i=n(656);e.exports=function(e,t){i.forEach(e,function(n,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[i])})}},717:function(e,t,n){"use strict";var i=n(688);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(i("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},718:function(e,t,n){"use strict";e.exports=function(e,t,n,i,o){return e.config=t,n&&(e.code=n),e.request=i,e.response=o,e}},719:function(e,t,n){"use strict";var i=n(656);function o(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(i.isURLSearchParams(t))a=t.toString();else{var s=[];i.forEach(t,function(e,t){null!==e&&void 0!==e&&(i.isArray(e)&&(t+="[]"),i.isArray(e)||(e=[e]),i.forEach(e,function(e){i.isDate(e)?e=e.toISOString():i.isObject(e)&&(e=JSON.stringify(e)),s.push(o(t)+"="+o(e))}))}),a=s.join("&")}return a&&(e+=(-1===e.indexOf("?")?"?":"&")+a),e}},720:function(e,t,n){"use strict";var i=n(656);e.exports=function(e){var t,n,o,a={};return e?(i.forEach(e.split("\n"),function(e){o=e.indexOf(":"),t=i.trim(e.substr(0,o)).toLowerCase(),n=i.trim(e.substr(o+1)),t&&(a[t]=a[t]?a[t]+", "+n:n)}),a):a}},721:function(e,t,n){"use strict";var i=n(656);e.exports=i.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=i.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},722:function(e,t,n){"use strict";var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function o(){this.message="String contains an invalid character"}o.prototype=new Error,o.prototype.code=5,o.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,n,a=String(e),s="",r=0,l=i;a.charAt(0|r)||(l="=",r%1);s+=l.charAt(63&t>>8-r%1*8)){if((n=a.charCodeAt(r+=.75))>255)throw new o;t=t<<8|n}return s}},723:function(e,t,n){"use strict";var i=n(656);e.exports=i.isStandardBrowserEnv()?{write:function(e,t,n,o,a,s){var r=[];r.push(e+"="+encodeURIComponent(t)),i.isNumber(n)&&r.push("expires="+new Date(n).toGMTString()),i.isString(o)&&r.push("path="+o),i.isString(a)&&r.push("domain="+a),!0===s&&r.push("secure"),document.cookie=r.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},724:function(e,t,n){"use strict";var i=n(656);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){i.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=o},725:function(e,t,n){"use strict";var i=n(656),o=n(726),a=n(689),s=n(669);function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return r(e),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=i.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),i.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||s.adapter)(e).then(function(t){return r(e),t.data=o(t.data,t.headers,e.transformResponse),t},function(t){return a(t)||(r(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},726:function(e,t,n){"use strict";var i=n(656);e.exports=function(e,t,n){return i.forEach(n,function(n){e=n(e,t)}),e}},727:function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},728:function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},729:function(e,t,n){"use strict";var i=n(690);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new i(e),t(n.reason))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o(function(t){e=t}),cancel:e}},e.exports=o},730:function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},731:function(e,t,n){"use strict";var i,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=n(11),s=(i=a)&&i.__esModule?i:{default:i};e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.errors={}}return o(e,[{key:"set",value:function(e){this.errors=e}},{key:"has",value:function(e){return this.errors.hasOwnProperty(e)}},{key:"get",value:function(e){if(this.has(e))return this.errors[e][0]}},{key:"getAll",value:function(e){if(this.has(e))return this.errors[e]}},{key:"clear",value:function(e){e?s.default.delete(this.errors,e):this.errors={}}},{key:"any",value:function(){return Object.keys(this.errors).length>0}}]),e}()},732:function(e,t,n){"use strict";function i(e){return void 0===e}function o(e){return Array.isArray(e)}function a(e){return e&&"number"==typeof e.size&&"string"==typeof e.type&&"function"==typeof e.slice}e.exports=function e(t,n,s,r){if(n instanceof FormData&&(r=s,s=n,n=null),(n=n||{}).indices=!i(n.indices)&&n.indices,n.nulls=!!i(n.nulls)||n.nulls,s=s||new FormData,i(t))return s;if(function(e){return null===e}(t))n.nulls&&s.append(r,"");else if(o(t))if(t.length)t.forEach(function(t,i){var o=r+"["+(n.indices?i:"")+"]";e(t,n,s,o)});else{var l=r+"[]";s.append(l,"")}else!function(e){return e instanceof Date}(t)?!function(e){return e===Object(e)}(t)||function(e){return a(e)&&("object"==typeof e.lastModifiedDate||"number"==typeof e.lastModified)&&"string"==typeof e.name}(t)||a(t)?s.append(r,t):Object.keys(t).forEach(function(i){var a=t[i];if(o(a))for(;i.length>2&&i.lastIndexOf("[]")===i.length-2;)i=i.substring(0,i.length-2);e(a,n,s,r?r+"["+i+"]":i)}):s.append(r,t.toISOString());return s}},733:function(e,t,n){var i=n(90)(n(750),n(754),!1,null,null,null);e.exports=i.exports},734:function(e,t,n){var i;i=function(e){return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=2)}([function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(4),o=n.n(i),a=n(6),s=n(5)(o.a,a.a,!1,null,null,null);t.default=s.exports},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.install=t.quillEditor=t.Quill=void 0;var o=i(n(0)),a=i(n(1)),s=window.Quill||o.default,r=function(e,t){t&&(a.default.props.globalOptions.default=function(){return t}),e.component(a.default.name,a.default)},l={Quill:s,quillEditor:a.default,install:r};t.default=l,t.Quill=s,t.quillEditor=a.default,t.install=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={theme:"snow",boundary:document.body,modules:{toolbar:[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["clean"],["link","image","video"]]},placeholder:"Insert text here ...",readOnly:!1}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(0)),a=i(n(3)),s=window.Quill||o.default;"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),i=1;i<arguments.length;i++){var o=arguments[i];if(null!=o)for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(n[a]=o[a])}return n},writable:!0,configurable:!0}),t.default={name:"quill-editor",data:function(){return{_options:{},_content:"",defaultOptions:a.default}},props:{content:String,value:String,disabled:{type:Boolean,default:!1},options:{type:Object,required:!1,default:function(){return{}}},globalOptions:{type:Object,required:!1,default:function(){return{}}}},mounted:function(){this.initialize()},beforeDestroy:function(){this.quill=null,delete this.quill},methods:{initialize:function(){var e=this;this.$el&&(this._options=Object.assign({},this.defaultOptions,this.globalOptions,this.options),this.quill=new s(this.$refs.editor,this._options),this.quill.enable(!1),(this.value||this.content)&&this.quill.pasteHTML(this.value||this.content),this.disabled||this.quill.enable(!0),this.quill.on("selection-change",function(t){t?e.$emit("focus",e.quill):e.$emit("blur",e.quill)}),this.quill.on("text-change",function(t,n,i){var o=e.$refs.editor.children[0].innerHTML,a=e.quill,s=e.quill.getText();"<p><br></p>"===o&&(o=""),e._content=o,e.$emit("input",e._content),e.$emit("change",{html:o,text:s,quill:a})}),this.$emit("ready",this.quill))}},watch:{content:function(e,t){this.quill&&(e&&e!==this._content?(this._content=e,this.quill.pasteHTML(e)):e||this.quill.setText(""))},value:function(e,t){this.quill&&(e&&e!==this._content?(this._content=e,this.quill.pasteHTML(e)):e||this.quill.setText(""))},disabled:function(e,t){this.quill&&this.quill.enable(!e)}}}},function(e,t){e.exports=function(e,t,n,i,o,a){var s,r=e=e||{},l=typeof e.default;"object"!==l&&"function"!==l||(s=e,r=e.default);var c,u="function"==typeof r?r.options:r;if(t&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0),n&&(u.functional=!0),o&&(u._scopeId=o),a?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},u._ssrRegister=c):i&&(c=i),c){var d=u.functional,p=d?u.render:u.beforeCreate;d?(u._injectStyles=c,u.render=function(e,t){return c.call(t),p(e,t)}):u.beforeCreate=p?[].concat(p,c):[c]}return{esModule:s,exports:r,options:u}}},function(e,t,n){"use strict";var i={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"quill-editor"},[e._t("toolbar"),e._v(" "),n("div",{ref:"editor"})],2)},staticRenderFns:[]};t.a=i}])},e.exports=i(n(751))},735:function(e,t,n){"use strict";var i=n(658),o=n(336);t.a={mixins:[i.a,o.a],data:function(){return{groupedPlaceholders:{},initialGroupedPlaceholders:{companyPlaceholders:[{value:"%company_address%",label:this.$root.labels.ph_company_address},{value:"%company_name%",label:this.$root.labels.ph_company_name},{value:"%company_phone%",label:this.$root.labels.ph_company_phone},{value:"%company_website%",label:this.$root.labels.ph_company_website},{value:"%company_email%",label:this.$root.labels.ph_company_email},{value:"%company_vat_number%",label:this.$root.labels.ph_company_vat_number}],customerPlaceholders:[{value:"%customer_email%",label:this.$root.labels.ph_customer_email},{value:"%customer_first_name%",label:this.$root.labels.ph_customer_first_name},{value:"%customer_full_name%",label:this.$root.labels.ph_customer_full_name},{value:"%customer_last_name%",label:this.$root.labels.ph_customer_last_name},{value:"%customer_note%",label:this.$root.labels.ph_customer_note},{value:"%customer_phone%",label:this.$root.labels.ph_customer_phone},{value:"%customer_panel_url%",label:this.$root.labels.ph_customer_cabinet_url,parse:"link"}],packagePlaceholders:[{value:"%package_appointments_details%",label:this.$root.labels.ph_package_appointments_details},{value:"%package_description%",label:this.$root.labels.ph_package_description},{value:"%package_duration%",label:this.$root.labels.ph_package_duration},{value:"%package_name%",label:this.$root.labels.ph_package_name},{value:"%package_price%",label:this.$root.labels.ph_package_price},{value:"%time_zone%",label:this.$root.labels.ph_time_zone,type:"package"},{value:"%coupon_used%",label:this.$root.labels.ph_coupon_used,type:"package"}],employeePlaceholders:[{value:"%employee_id%",label:this.$root.labels.ph_employee_id},{value:"%employee_email%",label:this.$root.labels.ph_employee_email},{value:"%employee_first_name%",label:this.$root.labels.ph_employee_first_name},{value:"%employee_full_name%",label:this.$root.labels.ph_employee_full_name},{value:"%employee_last_name%",label:this.$root.labels.ph_employee_last_name},{value:"%employee_note%",label:this.$root.labels.ph_employee_note},{value:"%employee_description%",label:this.$root.labels.ph_employee_description},{value:"%employee_phone%",label:this.$root.labels.ph_employee_phone},{value:"%employee_panel_url%",label:this.$root.labels.ph_employee_cabinet_url,parse:"link"},{value:"%employee_password%",label:this.$root.labels.ph_employee_password}],paymentPlaceholders:[{value:"%payment_type%",label:this.$root.labels.ph_payment_type},{value:"%appointment_deposit_payment%",label:this.$root.labels.ph_appointment_deposit_payment},{value:"%event_deposit_payment%",label:this.$root.labels.ph_event_deposit_payment},{value:"%package_deposit_payment%",label:this.$root.labels.ph_package_deposit_payment},{value:"%payment_due_amount%",label:this.$root.labels.ph_payment_due_amount},{value:"%payment_link_woocommerce%",label:this.$root.labels.ph_payment_link_woocommerce},{value:"%payment_link_mollie%",label:this.$root.labels.ph_payment_link_mollie},{value:"%payment_link_paypal%",label:this.$root.labels.ph_payment_link_paypal},{value:"%payment_link_stripe%",label:this.$root.labels.ph_payment_link_stripe},{value:"%payment_link_razorpay%",label:this.$root.labels.ph_payment_link_razorpay},{value:"%payment_link_square%",label:this.$root.labels.ph_payment_link_square}],categoryPlaceholders:[{value:"%category_id%",label:this.$root.labels.ph_category_id},{value:"%category_name%",label:this.$root.labels.ph_category_name},{value:"%service_description%",label:this.$root.labels.ph_service_description},{value:"%service_duration%",label:this.$root.labels.ph_service_duration},{value:"%service_id%",label:this.$root.labels.ph_service_id},{value:"%service_name%",label:this.$root.labels.ph_service_name},{value:"%service_price%",label:this.$root.labels.ph_service_price}],locationPlaceholders:[{value:"%location_address%",label:this.$root.labels.ph_location_address},{value:"%location_description%",label:this.$root.labels.ph_location_description},{value:"%location_id%",label:this.$root.labels.ph_location_id},{value:"%location_name%",label:this.$root.labels.ph_location_name},{value:"%location_phone%",label:this.$root.labels.ph_location_phone},{value:"%location_latitude%",label:this.$root.labels.ph_location_latitude},{value:"%location_longitude%",label:this.$root.labels.ph_location_longitude}],appointmentPlaceholders:[{value:"%appointment_id%",label:this.$root.labels.ph_appointment_id},{value:"%appointment_cancel_url%",label:this.$root.labels.ph_appointment_cancel_url,parse:"link"},{value:"%appointment_approve_url%",label:this.$root.labels.ph_appointment_approve_url,parse:"link"},{value:"%appointment_reject_url%",label:this.$root.labels.ph_appointment_reject_url,parse:"link"},{value:"%appointment_date%",label:this.$root.labels.ph_appointment_date},{value:"%appointment_date_time%",label:this.$root.labels.ph_appointment_date_time},{value:"%appointment_start_time%",label:this.$root.labels.ph_appointment_start_time},{value:"%appointment_end_time%",label:this.$root.labels.ph_appointment_end_time},{value:"%initial_appointment_date%",label:this.$root.labels.ph_initial_appointment_date},{value:"%initial_appointment_date_time%",label:this.$root.labels.ph_initial_appointment_date_time},{value:"%initial_appointment_start_time%",label:this.$root.labels.ph_initial_appointment_start_time},{value:"%initial_appointment_end_time%",label:this.$root.labels.ph_initial_appointment_end_time},{value:"%appointment_duration%",label:this.$root.labels.ph_appointment_duration},{value:"%appointment_notes%",label:this.$root.labels.ph_appointment_notes},{value:"%appointment_price%",label:this.$root.labels.ph_appointment_price},{value:"%appointment_status%",label:this.$root.labels.ph_appointment_status},{value:"%booked_customer%",label:this.$root.labels.ph_booked_customer},{value:"%coupon_used%",label:this.$root.labels.ph_coupon_used,type:"appointment"},{value:"%number_of_persons%",label:this.$root.labels.ph_booking_number_of_persons},{value:"%recurring_appointments_details%",label:this.$root.labels.ph_recurring_appointments_details},{value:"%group_appointment_details%",label:this.$root.labels.ph_group_appointment_details},{value:"%zoom_host_url%",label:this.$root.labels.ph_zoom_host_url},{value:"%zoom_join_url%",label:this.$root.labels.ph_zoom_join_url},{value:"%google_meet_url%",label:this.$root.labels.ph_google_meet_url},{value:"%microsoft_teams_url%",label:this.$root.labels.ph_microsoft_teams_url},{value:"%lesson_space_url%",label:this.$root.labels.ph_lesson_space_url},{value:"%reservation_name%",label:this.$root.labels.ph_reservation_name,type:"appointment"},{value:"%reservation_description%",label:this.$root.labels.ph_reservation_description,type:"appointment"},{value:"%time_zone%",label:this.$root.labels.ph_time_zone,type:"appointment"}],eventPlaceholders:[{value:"%attendee_code%",label:this.$root.labels.ph_attendee_code},{value:"%coupon_used%",label:this.$root.labels.ph_coupon_used,type:"event"},{value:"%event_cancel_url%",label:this.$root.labels.ph_event_cancel_url,parse:"link"},{value:"%event_description%",label:this.$root.labels.ph_event_description},{value:"%event_location%",label:this.$root.labels.ph_event_location},{value:"%event_end_date%",label:this.$root.labels.ph_event_end_date},{value:"%event_end_date_time%",label:this.$root.labels.ph_event_end_date_time},{value:"%event_end_time%",label:this.$root.labels.ph_event_end_time},{value:"%group_event_details%",label:this.$root.labels.ph_group_event_details},{value:"%event_tickets%",label:this.$root.labels.ph_event_tickets},{value:"%event_id%",label:this.$root.labels.ph_event_id},{value:"%event_name%",label:this.$root.labels.ph_event_name},{value:"%event_period_date%",label:this.$root.labels.ph_event_period_date},{value:"%event_period_date_time%",label:this.$root.labels.ph_event_period_date_time},{value:"%event_price%",label:this.$root.labels.ph_event_price},{value:"%booking_price%",label:this.$root.labels.ph_booking_price},{value:"%event_start_date%",label:this.$root.labels.ph_event_start_date},{value:"%event_start_date_time%",label:this.$root.labels.ph_event_start_date_time},{value:"%event_start_time%",label:this.$root.labels.ph_event_start_time},{value:"%initial_event_start_date%",label:this.$root.labels.ph_initial_event_start_date},{value:"%initial_event_start_date_time%",label:this.$root.labels.ph_initial_event_start_date_time},{value:"%initial_event_start_time%",label:this.$root.labels.ph_initial_event_start_time},{value:"%initial_event_end_date%",label:this.$root.labels.ph_initial_event_end_date},{value:"%initial_event_end_date_time%",label:this.$root.labels.ph_initial_event_end_date_time},{value:"%initial_event_end_time%",label:this.$root.labels.ph_initial_event_end_time},{value:"%employee_name_email_phone%",label:this.$root.labels.ph_employee_name_email_phone},{value:"%number_of_persons%",label:this.$root.labels.ph_booking_number_of_persons},{value:"%lesson_space_url_date%",label:this.$root.labels.ph_lesson_space_url_date},{value:"%lesson_space_url_date_time%",label:this.$root.labels.ph_lesson_space_url_date_time},{value:"%google_meet_url_date%",label:this.$root.labels.ph_google_meet_url_date},{value:"%google_meet_url_date_time%",label:this.$root.labels.ph_google_meet_url_date_date},{value:"%microsoft_teams_url_date%",label:this.$root.labels.ph_microsoft_teams_url_date},{value:"%microsoft_teams_url_date_time%",label:this.$root.labels.ph_microsoft_teams_url_date_date},{value:"%zoom_host_url_date%",label:this.$root.labels.ph_zoom_host_url_date},{value:"%zoom_host_url_date_time%",label:this.$root.labels.ph_zoom_host_url_date_date},{value:"%zoom_join_url_date%",label:this.$root.labels.ph_zoom_join_url_date},{value:"%zoom_join_url_date_time%",label:this.$root.labels.ph_zoom_join_url_date_date},{value:"%reservation_name%",label:this.$root.labels.ph_reservation_name,type:"event"},{value:"%reservation_description%",label:this.$root.labels.ph_reservation_description,type:"event"},{value:"%time_zone%",label:this.$root.labels.ph_time_zone,type:"event"}],cartPlaceholders:[{value:"%cart_appointments_details%",label:this.$root.labels.ph_cart_appointments_details}],customFieldsPlaceholders:[],extrasPlaceholders:[],couponsPlaceholders:[]},placeholders:[],linksForParsing:{"%customer_panel_url%":'<a href="%customer_panel_url%">'+this.$root.labels.ph_customer_cabinet_url+"</a>","%employee_panel_url%":'<a href="%employee_panel_url%">'+this.$root.labels.ph_employee_cabinet_url+"</a>","%appointment_cancel_url%":'<a href="%appointment_cancel_url%">'+this.$root.labels.ph_appointment_cancel_url+"</a>","%appointment_approve_url%":'<a href="%appointment_approve_url%">'+this.$root.labels.ph_appointment_approve_url+"</a>","%appointment_reject_url%":'<a href="%appointment_reject_url%">'+this.$root.labels.ph_appointment_reject_url+"</a>","%event_cancel_url%":'<a href="%event_cancel_url%">'+this.$root.labels.ph_event_cancel_url+"</a>"},plainTextLinksForParsing:{"%customer_panel_url%":'<a href="%customer_panel_url%">'+this.$root.labels.ph_customer_cabinet_url+"</a>","%employee_panel_url%":'<a href="%employee_panel_url%">'+this.$root.labels.ph_employee_cabinet_url+"</a>","%appointment_cancel_url%":'<a href="%appointment_cancel_url%">'+this.$root.labels.ph_appointment_cancel_url+"</a>","%appointment_approve_url%":'<a href="%appointment_approve_url%">'+this.$root.labels.ph_appointment_approve_url+"</a>","%appointment_reject_url%":'<a href="%appointment_reject_url%">'+this.$root.labels.ph_appointment_reject_url+"</a>","%event_cancel_url%":'<a href="%event_cancel_url%">'+this.$root.labels.ph_event_cancel_url+"</a>"}}},methods:{getEventPlaceholders:function(){return this.groupedPlaceholders.companyPlaceholders.concat(this.groupedPlaceholders.customerPlaceholders.concat(this.groupedPlaceholders.employeePlaceholders.concat(this.groupedPlaceholders.locationPlaceholders.concat(this.groupedPlaceholders.customFieldsPlaceholders.concat(this.groupedPlaceholders.eventPlaceholders.concat(this.groupedPlaceholders.couponsPlaceholders.concat(this.groupedPlaceholders.paymentPlaceholders)))))))},getAppointmentPlaceholders:function(){return this.groupedPlaceholders.companyPlaceholders.concat(this.groupedPlaceholders.customerPlaceholders.concat(this.groupedPlaceholders.employeePlaceholders.concat(this.groupedPlaceholders.locationPlaceholders.concat(this.groupedPlaceholders.customFieldsPlaceholders.concat(this.groupedPlaceholders.couponsPlaceholders.concat(this.groupedPlaceholders.appointmentPlaceholders.concat(this.groupedPlaceholders.categoryPlaceholders.concat(this.groupedPlaceholders.extrasPlaceholders.concat(this.groupedPlaceholders.paymentPlaceholders)))))))))},getPackagePlaceholders:function(){return this.groupedPlaceholders.companyPlaceholders.concat(this.groupedPlaceholders.customerPlaceholders.concat(this.groupedPlaceholders.packagePlaceholders.concat(this.groupedPlaceholders.paymentPlaceholders)))},getCartPlaceholders:function(){return this.initialGroupedPlaceholders.cartPlaceholders},removePlaceholder:function(e,t){if(e in this.groupedPlaceholders){var n=null;this.groupedPlaceholders[e].forEach(function(e,i){e.value===t&&(n=i)}),null!==n&&this.groupedPlaceholders[e].splice(n,1)}},getParsedCodeLabel:function(e){if("link"===e.parse)for(var t in this.linksForParsing)if(e.value===t)return this.linksForParsing[t];return""},closeDialog:function(){this.$emit("closeDialogPlaceholders")},copyCodeText:function(e){var t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("Copy"),document.body.removeChild(t),this.notify("",this.$root.labels.placeholder_copied,"info","no-title")},addCustomFieldsPlaceholders:function(e){this.groupedPlaceholders.customFieldsPlaceholders=[];for(var t=0;t<this.customFields.length;t++)"file"===this.customFields[t].type&&"provider"!==e||this.groupedPlaceholders.customFieldsPlaceholders.push({value:"%custom_field_"+this.customFields[t].id+"%",label:this.customFields[t].label})},addCouponsPlaceholders:function(e){if(this.groupedPlaceholders.couponsPlaceholders=[],"customer"===e)for(var t=0;t<this.coupons.length;t++)this.groupedPlaceholders.couponsPlaceholders.push({value:"%coupon_"+this.coupons[t].id+"%",label:this.coupons[t].code+" ["+this.$root.labels.discount+": "+this.coupons[t].discount+", "+this.$root.labels.deduction+": "+this.coupons[t].deduction+this.getCurrencySymbol()+", "+this.$root.labels.expiration_date+": "+(this.coupons[t].expirationDate?this.getFrontedFormattedDate(this.coupons[t].expirationDate):"/")+"]"})},addExtrasPlaceholders:function(){this.groupedPlaceholders.extrasPlaceholders=[];for(var e=0;e<this.categories.length;e++)for(var t=0;t<this.categories[e].serviceList.length;t++)for(var n=0;n<this.categories[e].serviceList[t].extras.length;n++)this.groupedPlaceholders.extrasPlaceholders.push({value:"%service_extra_"+this.categories[e].serviceList[t].extras[n].id+"_name%",label:this.categories[e].serviceList[t].extras[n].name}),this.groupedPlaceholders.extrasPlaceholders.push({value:"%service_extra_"+this.categories[e].serviceList[t].extras[n].id+"_quantity%",label:this.categories[e].serviceList[t].extras[n].name}),this.groupedPlaceholders.extrasPlaceholders.push({value:"%service_extra_"+this.categories[e].serviceList[t].extras[n].id+"_price%",label:this.categories[e].serviceList[t].extras[n].name});this.groupedPlaceholders.extrasPlaceholders.push({value:"%service_extras%",label:this.$root.labels.ph_extras}),this.groupedPlaceholders.extrasPlaceholders.push({value:"%service_extras_details%",label:this.$root.labels.ph_extras_details})},setPlaceholders:function(e){var t=this;this.groupedPlaceholders=JSON.parse(JSON.stringify(this.initialGroupedPlaceholders)),this.addExtrasPlaceholders(),this.addCouponsPlaceholders(this.userTypeTab),this.addCustomFieldsPlaceholders(this.userTypeTab);var n=function(n){e[n].forEach(function(e){t.removePlaceholder(n,e)})};for(var i in e)n(i)}},computed:{}}},737:function(e,t,n){var i=n(90)(n(741),n(742),!1,null,null,null);e.exports=i.exports},738:function(e,t,n){"use strict";var i=n(735);t.a={mixins:[i.a],data:function(){return{textMode:!1,editorOptions:{modules:{toolbar:[["bold","italic","underline","strike"],["blockquote"],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{font:[]}],[{color:[]},{background:[]}],[{align:[]}],["clean"],["link","image"]]}},pageUrl:""}},methods:{parseQuillEditorContent:function(e){if(void 0!==e)for(var t=e.quill.root.getElementsByTagName("p"),n=0;n<t.length;n++)for(var i in this.linksForParsing){for(var o=t[n].getElementsByTagName("a"),a=0;a<o.length;a++)o[a].href===this.pageUrl+i&&(o[a].href=i);-1!==t[n].textContent.indexOf(this.linksForParsing[i])&&(t[n].innerHTML=t[n].innerHTML.replace(this.plainTextLinksForParsing[i],this.linksForParsing[i]))}},process:function(e){var t=document.createElement("div");return t.innerHTML=e.trim(),this.format(t,0).innerHTML},format:function(e,t){for(var n=new Array(1+t++).join(" "),i=new Array(t-1).join(" "),o=null,a=0;a<e.children.length;a++)o=document.createTextNode("\n"+n),e.insertBefore(o,e.children[a]),this.format(e.children[a],t),e.lastElementChild===e.children[a]&&(o=document.createTextNode("\n"+i),e.appendChild(o));return e},changedContentText:function(e,t,n){n?this[e][n]=this[t][n]:this[e]=this[t]},textModeChanged:function(e,t,n){this.textMode=!this.textMode,this.textMode?n?this[t][n]=this.process(this[e][n].replace("\x3c!-- Content --\x3e","").replace(/(\r\n|\n|\r)/gm,"")):this[t]=this.process(this[e].replace("\x3c!-- Content --\x3e","").replace(/(\r\n|\n|\r)/gm,"")):n?this[t][n]="\x3c!-- Content --\x3e"+this[t][n]:this[t]="\x3c!-- Content --\x3e"+this[t],n?this[e][n]=this[t][n]:this[e]=this[t]}}}},739:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(680),o=n.n(i),a=n(658),s=n(336),r=n(668),l=n(705);t.default={mixins:[a.a,s.a,r.a,l.a],props:{formName:"",urlName:null,urlSubName:{type:String,default:""},isNew:null,entity:null,getParsedEntity:null,updateStash:!1,haveSaveConfirmation:null,hasApplyGloballyVisibility:!1,hasApplyGloballyDeletion:!1,loadSaveButton:!1,calendarConflict:{enable:!1},getCalendarEvents:null,hasIcons:!0,status:null,buttonType:{status:"primary",remove:"danger"},action:{haveAdd:!1,haveEdit:!1,haveStatus:!1,haveBlock:!1,haveRemove:!1,haveRemoveEffect:!1,ignoreDeleteEffect:!1,haveDuplicate:!1,haveSaveWarning:!1},message:{success:{save:null,remove:null,show:null,hide:null},confirm:{remove:null,show:null,hide:null,duplicate:null,save:null,saveDetails:null}},buttonText:null},data:function(){return{form:new o.a,allowedDelete:!0,showDeleteConfirmation:!1,showVisibilityConfirmation:!1,showDuplicateConfirmation:!1,showSaveConfirmation:!1,showAddHoursDialog:!1,confirmCalendarConflict:!1,showBlockConfirmation:!1,deleteEffectMessage:null,dialogLoading:!1}},created:function(){o.a.defaults.axios=this.$http},methods:{getButtonType:function(e){switch(e){case"status":return this.hasIcons?null:this.buttonType.status;case"remove":return this.hasIcons?null:this.buttonType.remove;case"block":case"duplicate":return this.hasIcons?null:this.buttonType.duplicate}},closeDialog:function(){this.$parent.$emit("closeDialog")},closeMessage:function(){this.showSaveConfirmation=!1,this.$emit("closeSaveConfirmation")},onSubmit:function(e){var t=this,n=this.$root;this.$parent.$refs[this.formName].validate(function(i,o){if(!i)return"appointment"===t.formName&&t.handleDialogTabChange(o,"bookings."),"service"===t.formName&&t.handleDialogTabChange(o,"duration"),t.$emit("validationFailCallback"),!1;t.calendarConflict&&t.calendarConflict.enabled?(t.handleSaveConfirmation(),e&&(t.$emit("confirmCalendarConflict"),t.confirmCalendarConflict=!0,t.handleSaveClick(e))):(t.dialogLoading=!0,t.isNew?t.addEntity(e):t.editEntity(e)),t.$root=n})},onSuccess:function(e,t,n){var i=this;this.$parent.$emit("saveCallback",n),setTimeout(function(){i.dialogLoading=!1,i.$parent.$emit("closeDialog")},300),this.notify(e,t,"success")},onError:function(e,t){this.dialogLoading=!1,this.$emit("errorCallback",t)},errorEntityMissing:function(e){return!!("data"in e.response&&"data"in e.response.data&&"object"===e.response.data.data&&"entityMissing"in e.response.data.data&&e.response.data.data.entityMissing)&&(this.dialogLoading=!1,this.notify(this.$root.labels.error,e.response.data.message,"error"),!0)},addEntity:function(e){var t=this,n=null;void 0!==this.$store&&void 0!==this.$store.state.cabinet&&"provider"===this.$store.state.cabinet.cabinetType&&(n=Object.assign(this.getAuthorizationHeaderObject(),{params:{source:"cabinet-"+this.$store.state.cabinet.cabinetType}})),this.$http.post(this.$root.getAjaxUrl+"/"+this.urlName,this.getParsedEntity(e),n).then(function(e){t.onSuccess(t.$root.labels.success,t.message.success.save,e.data.data),t.updateStash&&t.updateStashEntities({})}).catch(function(e){if(e.response){if(t.errorEntityMissing(e))return;t.onError("",e.response.data.data)}})},editEntity:function(e){var t=this,n=null;void 0!==this.$store&&void 0!==this.$store.state.cabinet&&"provider"===this.$store.state.cabinet.cabinetType&&(n=Object.assign(this.getAuthorizationHeaderObject(),{params:{source:"cabinet-"+this.$store.state.cabinet.cabinetType}})),this.$http.post(this.$root.getAjaxUrl+"/"+this.urlName+this.urlSubName+"/"+this.entity.id,this.getParsedEntity(e),n).then(function(e){t.onSuccess(t.$root.labels.success,t.message.success.save,e.data.data),t.updateStash&&t.updateStashEntities({})}).catch(function(e){if(e.response){if(t.errorEntityMissing(e))return;t.onError("",e.response.data.data)}})},deleteEntity:function(e){var t=this;this.dialogLoading=!0,this.form.post(this.$root.getAjaxUrl+"/"+this.urlName+"/delete/"+this.entity.id,{status:this.status.on,applyGlobally:e}).then(function(e){t.onSuccess(t.$root.labels.success,t.message.success.remove,e.data.data),t.updateStash&&t.updateStashEntities({})}).catch(function(e){e.response&&t.onError("",e.response.data.data.message)})},showEntity:function(e){var t=this;this.dialogLoading=!0,this.form.post(this.$root.getAjaxUrl+"/"+this.urlName+"/status/"+this.entity.id,{status:this.status.on,applyGlobally:e}).then(function(e){t.onSuccess(t.$root.labels.success,t.message.success.show,null),t.updateStash&&t.updateStashEntities({})}).catch(function(e){e.response&&t.onError("",e.response.data.data.message)})},hideEntity:function(e){var t=this;this.dialogLoading=!0,this.form.post(this.$root.getAjaxUrl+"/"+this.urlName+"/status/"+this.entity.id,{status:this.status.off,applyGlobally:e}).then(function(){t.onSuccess(t.$root.labels.success,t.message.success.hide,null),t.updateStash&&t.updateStashEntities({})}).catch(function(e){e.response&&t.onError("",e.response.data.data.message)})},blockEntity:function(e){var t=this;this.dialogLoading=!0,this.form.post(this.$root.getAjaxUrl+"/"+this.urlName+"/status/"+this.entity.id,{status:"visible"===this.entity.status?this.status.block:this.status.on,applyGlobally:e}).then(function(){t.onSuccess(t.$root.labels.success,t.message.success.block,null),t.updateStash&&t.updateStashEntities({})}).catch(function(e){e.response&&t.onError("",e.response.data.data.message)})},duplicateEntity:function(){var e=this;this.dialogLoading=!0,this.$parent.$emit("closeDialog",!0),this.$parent.$emit("duplicateCallback",this.entity),setTimeout(function(){e.showDuplicateConfirmation=!1,e.dialogLoading=!1},600)},handleSaveConfirmation:function(){this.showSaveConfirmation=!this.showSaveConfirmation,this.showVisibilityConfirmation=!1,this.showDeleteConfirmation=!1,this.showDuplicateConfirmation=!1,this.showBlockConfirmation=!1},handleDuplicateConfirmation:function(){this.showDuplicateConfirmation=!this.showDuplicateConfirmation,this.showSaveConfirmation=!1,this.showDeleteConfirmation=!1,this.showVisibilityConfirmation=!1,this.showBlockConfirmation=!1},handleVisibilityConfirmation:function(){this.showVisibilityConfirmation=!this.showVisibilityConfirmation,this.showSaveConfirmation=!1,this.showDeleteConfirmation=!1,this.showDuplicateConfirmation=!1,this.showBlockConfirmation=!1},handleBlockConfirmation:function(){this.showBlockConfirmation=!this.showBlockConfirmation,this.showSaveConfirmation=!1,this.showDeleteConfirmation=!1,this.showDuplicateConfirmation=!1,this.showVisibilityConfirmation=!1},handleDeleteConfirmation:function(){var e=this;this.showVisibilityConfirmation=!1,this.showDuplicateConfirmation=!1,this.showSaveConfirmation=!1,this.showBlockConfirmation=!1,this.action.haveRemoveEffect?!1===this.showDeleteConfirmation&&this.$http.get(this.$root.getAjaxUrl+"/"+this.urlName+"/effect/"+this.entity.id).then(function(t){e.allowedDelete=t.data.data.valid||e.ignoreDeleteEffect,e.deleteEffectMessage=t.data.data.message,e.showDeleteConfirmation=!e.showDeleteConfirmation}).catch(function(t){e.showDeleteConfirmation=!e.showDeleteConfirmation,e.deleteEffectMessage=""}):this.showDeleteConfirmation=!this.showDeleteConfirmation},handleSaveClick:function(){var e=this;this.getCalendarEvents&&!this.confirmCalendarConflict?this.getCalendarEvents().then(function(){e.haveSaveConfirmation&&e.haveSaveConfirmation()?e.handleSaveConfirmation():e.onSubmit(!1)}):this.haveSaveConfirmation&&this.haveSaveConfirmation()?this.handleSaveConfirmation():this.onSubmit(!1)},getConfirmSaveButtonText:function(){return null!==this.buttonText&&this.buttonText.confirm&&this.buttonText.confirm.save?{yes:this.buttonText.confirm.save.yes,no:this.buttonText.confirm.save.no}:{yes:this.$root.labels.yes,no:this.$root.labels.no}},getConfirmDeleteButtonText:function(){return null!==this.buttonText&&this.buttonText.confirm&&this.buttonText.confirm.remove?{yes:this.buttonText.confirm.remove.yes,no:this.buttonText.confirm.remove.no}:{yes:this.$root.labels.yes,no:this.$root.labels.no}},getConfirmBlockButtonText:function(){return null!==this.buttonText&&this.buttonText.confirm&&this.buttonText.confirm.status?{yes:this.buttonText.confirm.status.block,no:this.buttonText.confirm.status.no}:{yes:this.$root.labels.yes,no:this.$root.labels.no}},getConfirmStatusButtonText:function(){return null!==this.buttonText&&this.buttonText.confirm&&this.buttonText.confirm.status?{yes:this.buttonText.confirm.status.yes,no:this.buttonText.confirm.status.no}:{yes:this.$root.labels.yes,no:this.$root.labels.no}},getActionStatusButtonText:function(){return null!==this.buttonText&&this.buttonText.action?this.buttonText.action.status:""},getActionRemoveButtonText:function(){return null!==this.buttonText&&this.buttonText.action?this.buttonText.action.remove:""},getActionDuplicateButtonText:function(){return null!==this.buttonText&&this.buttonText.action?this.buttonText.action.duplicate:""},handleDialogTabChange:function(e,t){for(var n=Object.keys(e),i=0,o=0;o<n.length;o++)i=n[o].startsWith(t)?i+1:i;i===n.length&&this.$emit("validationTabFailCallback")},isStatusOn:function(){return this.entity.status===this.status.on},isStatusOff:function(){return this.entity.status===this.status.off},isStatusBlocked:function(){return this.entity.status===this.status.block}},computed:{},components:{}}},740:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"am-dialog-footer"},[n("div",{staticClass:"am-dialog-footer-actions"},[n("transition",{attrs:{name:"slide-vertical"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.showDeleteConfirmation,expression:"showDeleteConfirmation"}],staticClass:"am-dialog-confirmation"},[n("h3",{directives:[{name:"show",rawName:"v-show",value:e.allowedDelete,expression:"allowedDelete"}]},[e._v("\n "+e._s(e.message.confirm.remove)+"\n ")]),e._v(" "),e.action.haveRemoveEffect&&e.deleteEffectMessage?n("el-alert",{attrs:{title:"",type:"warning",description:e.deleteEffectMessage,"show-icon":"",closable:!1}}):e._e(),e._v(" "),e.hasApplyGloballyDeletion?n("div",{staticClass:"align-left"},[n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.deleteEntity(!1)}}},[e._v("\n "+e._s(e.getConfirmDeleteButtonText().no)+"\n ")]),e._v(" "),n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.deleteEntity(!0)}}},[e._v("\n "+e._s(e.getConfirmDeleteButtonText().yes)+"\n ")])],1):n("div",{staticClass:"align-left"},[e.allowedDelete?n("el-button",{attrs:{size:"small"},on:{click:function(t){e.showDeleteConfirmation=!e.showDeleteConfirmation}}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]):e._e(),e._v(" "),e.allowedDelete?n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.deleteEntity(!1)}}},[e._v("\n "+e._s(e.$root.labels.delete)+"\n ")]):e._e(),e._v(" "),e.allowedDelete?e._e():n("el-button",{staticClass:"am-dialog-action-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:function(t){e.showDeleteConfirmation=!e.showDeleteConfirmation}}})],1)],1)]),e._v(" "),n("transition",{attrs:{name:"slide-vertical"}},[e.status?n("div",{directives:[{name:"show",rawName:"v-show",value:e.showVisibilityConfirmation,expression:"showVisibilityConfirmation"}],staticClass:"am-dialog-confirmation"},[e.isStatusOn()?n("h3",[e._v(e._s(e.message.confirm.hide))]):e.isStatusOff()?n("h3",[e._v(e._s(e.message.confirm.show))]):e._e(),e._v(" "),e.hasApplyGloballyVisibility?n("div",{staticClass:"align-left"},[e.isStatusOn()?n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.hideEntity(!1)}}},[e._v("\n "+e._s(e.getConfirmStatusButtonText().no)+"\n ")]):e._e(),e._v(" "),e.isStatusOn()?n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.hideEntity(!0)}}},[e._v("\n "+e._s(e.getConfirmStatusButtonText().yes)+"\n ")]):e._e(),e._v(" "),e.isStatusOff()?n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.showEntity(!1)}}},[e._v("\n "+e._s(e.getConfirmStatusButtonText().no)+"\n ")]):e._e(),e._v(" "),e.isStatusOff()?n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.showEntity(!0)}}},[e._v("\n "+e._s(e.getConfirmStatusButtonText().yes)+"\n ")]):e._e()],1):n("div",{staticClass:"align-left"},[n("el-button",{attrs:{size:"small"},on:{click:function(t){e.showVisibilityConfirmation=!e.showVisibilityConfirmation}}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),e.isStatusOn()?n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.hideEntity(!1)}}},[e._v("\n "+e._s(e.getConfirmStatusButtonText().yes)+"\n ")]):e._e(),e._v(" "),e.isStatusOff()?n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.showEntity(!1)}}},[e._v("\n "+e._s(e.getConfirmStatusButtonText().no)+"\n ")]):e._e()],1)]):e._e()]),e._v(" "),n("transition",{attrs:{name:"slide-vertical"}},[e.status?n("div",{directives:[{name:"show",rawName:"v-show",value:e.showBlockConfirmation,expression:"showBlockConfirmation"}],staticClass:"am-dialog-confirmation"},[n("h3",[e._v(e._s(e.message.confirm.block))]),e._v(" "),n("div",{staticClass:"align-left"},[n("el-button",{attrs:{size:"small"},on:{click:function(t){e.showBlockConfirmation=!e.showBlockConfirmation}}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.blockEntity(!1)}}},[e._v("\n "+e._s(e.getConfirmBlockButtonText().yes)+"\n ")])],1)]):e._e()]),e._v(" "),n("transition",{attrs:{name:"slide-vertical"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.showDuplicateConfirmation,expression:"showDuplicateConfirmation"}],staticClass:"am-dialog-confirmation"},[n("h3",[e._v(e._s(e.message.confirm.duplicate))]),e._v(" "),n("div",{staticClass:"align-left"},[n("el-button",{attrs:{size:"small"},on:{click:function(t){e.showDuplicateConfirmation=!e.showDuplicateConfirmation}}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),n("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.duplicateEntity}},[e._v("\n "+e._s(e.$root.labels.duplicate)+"\n ")])],1)])]),e._v(" "),n("transition",{attrs:{name:"slide-vertical"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.showSaveConfirmation,expression:"showSaveConfirmation"}],staticClass:"am-dialog-confirmation"},[e.buttonText?n("h3",{staticStyle:{display:"block"}},[e._v(e._s(e.message.confirm.save)+"\n "),e.message.confirm.saveDetails?n("span",[e._v(e._s(e.message.confirm.saveDetails))]):e._e()]):e._e(),e._v(" "),e.buttonText?n("div",{staticClass:"align-left",staticStyle:{display:"block"}},[n("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.onSubmit(!1)}}},[e._v("\n "+e._s(e.getConfirmSaveButtonText().no)+"\n ")]),e._v(" "),n("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.onSubmit(!0)}}},[e._v("\n "+e._s(e.getConfirmSaveButtonText().yes)+"\n ")])],1):e._e(),e._v(" "),n("el-col",{attrs:{span:22}},[e.action.haveSaveWarning?n("el-alert",{staticStyle:{"word-break":"break-word"},attrs:{title:"",type:"warning",description:e.message.confirm.save,"show-icon":"",closable:!1}}):e._e()],1),e._v(" "),n("el-col",{attrs:{span:2}},[e.showSaveConfirmation?n("el-button",{staticClass:"am-dialog-action-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:function(t){return e.closeMessage()}}}):e._e()],1)],1)]),e._v(" "),e.isNew?n("el-row",[n("el-col",{staticClass:"align-right",attrs:{sm:24}},[n("el-button",{attrs:{type:""},on:{click:e.closeDialog}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),e.action.haveAdd&&e.action.haveEdit?n("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary",loading:e.loadSaveButton},on:{click:e.handleSaveClick}},[e._v("\n "+e._s(e.$root.labels.save)+"\n ")]):e._e()],1)],1):n("el-row",[n("el-col",{staticClass:"align-left",attrs:{sm:16}},[e.action.haveDuplicate?n("el-button",{class:{"am-button-icon":e.hasIcons,"am-dialog-create":!e.hasIcons},attrs:{type:e.getButtonType("duplicate")},on:{click:e.handleDuplicateConfirmation}},[e.hasIcons?n("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.duplicate,src:e.$root.getUrl+"public/img/copy.svg"}}):n("span",[e._v(e._s(e.getActionDuplicateButtonText()))])]):e._e(),e._v(" "),e.action.haveStatus?n("el-button",{class:{"am-button-icon":e.hasIcons,"am-dialog-create":!e.hasIcons},attrs:{type:e.getButtonType("status")},on:{click:e.handleVisibilityConfirmation}},[e.hasIcons?n("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.hide,src:e.$root.getUrl+(e.isStatusOff()?"public/img/unhide.svg":"public/img/hide.svg")}}):n("span",[e._v("\n "+e._s(e.getActionStatusButtonText())+"\n ")])]):e._e(),e._v(" "),e.action.haveRemove?n("el-button",{class:{"am-button-icon":e.hasIcons,"am-dialog-create":!e.hasIcons},attrs:{type:e.getButtonType("remove")},on:{click:e.handleDeleteConfirmation}},[e.hasIcons?n("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.delete,src:e.$root.getUrl+"public/img/delete.svg"}}):n("span",[e._v("\n "+e._s(e.getActionRemoveButtonText())+"\n ")])]):e._e(),e._v(" "),e.action.haveBlock?n("el-button",{staticClass:"am-button-block",attrs:{type:e.getButtonType("block")},on:{click:e.handleBlockConfirmation}},[n("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.block,src:e.$root.getUrl+(e.isStatusBlocked()?"public/img/unblock.svg":"public/img/block.svg")}}),e._v(" "),n("span",[e._v("\n "+e._s(e.getConfirmBlockButtonText().yes)+"\n ")])]):e._e()],1),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{sm:!1===e.action.haveRemove&&!1===e.action.haveStatus&&!1===e.action.haveDuplicate?24:8}},[e.action.haveAdd&&e.action.haveEdit?n("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary",loading:e.loadSaveButton},on:{click:e.handleSaveClick}},[e._v("\n "+e._s(e.$root.labels.save)+"\n ")]):e._e()],1)],1)],1)]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[n("div",{staticClass:"am-dialog-loader-content"},[n("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}}),e._v(" "),n("p",[e._v(e._s(e.$root.labels.loader_message))])])])])},staticRenderFns:[]}},741:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={mixins:[],props:{params:null,visible:!1,label:"",count:0,show:null},data:function(){return{currentPage:null}},methods:{change:function(){this.$emit("change")}},computed:{paginationMessage:function(){return this.$root.labels.showing+" "+(this.params.page*this.getItemsPerPage-this.getItemsPerPage+1)+" "+this.$root.labels.to+" "+(this.params.page*this.getItemsPerPage>this.count?this.count:this.params.page*this.getItemsPerPage)+" "+this.$root.labels.of+" "+this.count+" "+this.label},getItemsPerPage:function(){return void 0===this.show||null===this.show?this.$root.settings.general.itemsPerPage:this.show}}}},742:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"show",rawName:"v-show",value:e.visible,expression:"visible"}],staticClass:"am-pagination am-section"},[n("el-row",[n("el-col",{attrs:{sm:8}},[n("p",[e._v(e._s(e.paginationMessage))])]),e._v(" "),n("el-col",{attrs:{sm:16}},[n("el-pagination",{attrs:{layout:"prev, pager, next","page-size":e.getItemsPerPage,total:e.count,"current-page":e.params.page},on:{"update:currentPage":function(t){return e.$set(e.params,"page",t)},"update:current-page":function(t){return e.$set(e.params,"page",t)},"current-change":e.change}})],1)],1)],1)},staticRenderFns:[]}},746:function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},749:function(e,t,n){var i;"undefined"!=typeof self&&self,i=function(e){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="fb15")}({"02f4":function(e,t,n){var i=n("4588"),o=n("be13");e.exports=function(e){return function(t,n){var a,s,r=String(o(t)),l=i(n),c=r.length;return l<0||l>=c?e?"":void 0:(a=r.charCodeAt(l))<55296||a>56319||l+1===c||(s=r.charCodeAt(l+1))<56320||s>57343?e?r.charAt(l):a:e?r.slice(l,l+2):s-56320+(a-55296<<10)+65536}}},"0390":function(e,t,n){"use strict";var i=n("02f4")(!0);e.exports=function(e,t,n){return t+(n?i(e,t).length:1)}},"07e3":function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},"0bfb":function(e,t,n){"use strict";var i=n("cb7c");e.exports=function(){var e=i(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},"0fc9":function(e,t,n){var i=n("3a38"),o=Math.max,a=Math.min;e.exports=function(e,t){return(e=i(e))<0?o(e+t,0):a(e,t)}},1654:function(e,t,n){"use strict";var i=n("71c1")(!0);n("30f1")(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=i(t,n),this._i+=e.length,{value:e,done:!1})})},1691:function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"1af6":function(e,t,n){var i=n("63b6");i(i.S,"Array",{isArray:n("9003")})},"1bc3":function(e,t,n){var i=n("f772");e.exports=function(e,t){if(!i(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!i(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},"1ec9":function(e,t,n){var i=n("f772"),o=n("e53d").document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},"20fd":function(e,t,n){"use strict";var i=n("d9f6"),o=n("aebd");e.exports=function(e,t,n){t in e?i.f(e,t,o(0,n)):e[t]=n}},"214f":function(e,t,n){"use strict";n("b0c5");var i=n("2aba"),o=n("32e9"),a=n("79e5"),s=n("be13"),r=n("2b4c"),l=n("520a"),c=r("species"),u=!a(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),d=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var p=r(e),m=!a(function(){var t={};return t[p]=function(){return 7},7!=""[e](t)}),f=m?!a(function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[c]=function(){return n}),n[p](""),!t}):void 0;if(!m||!f||"replace"===e&&!u||"split"===e&&!d){var h=/./[p],g=n(s,p,""[e],function(e,t,n,i,o){return t.exec===l?m&&!o?{done:!0,value:h.call(t,n,i)}:{done:!0,value:e.call(n,t,i)}:{done:!1}}),v=g[0],b=g[1];i(String.prototype,e,v),o(RegExp.prototype,p,2==t?function(e,t){return b.call(e,this,t)}:function(e){return b.call(e,this)})}}},"230e":function(e,t,n){var i=n("d3f4"),o=n("7726").document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},"23c6":function(e,t,n){var i=n("2d95"),o=n("2b4c")("toStringTag"),a="Arguments"==i(function(){return arguments}());e.exports=function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:a?i(t):"Object"==(s=i(t))&&"function"==typeof t.callee?"Arguments":s}},"241e":function(e,t,n){var i=n("25eb");e.exports=function(e){return Object(i(e))}},"25eb":function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},"294c":function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},"2aba":function(e,t,n){var i=n("7726"),o=n("32e9"),a=n("69a8"),s=n("ca5a")("src"),r=n("fa5b"),l="toString",c=(""+r).split(l);n("8378").inspectSource=function(e){return r.call(e)},(e.exports=function(e,t,n,r){var l="function"==typeof n;l&&(a(n,"name")||o(n,"name",t)),e[t]!==n&&(l&&(a(n,s)||o(n,s,e[t]?""+e[t]:c.join(String(t)))),e===i?e[t]=n:r?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,l,function(){return"function"==typeof this&&this[s]||r.call(this)})},"2b4c":function(e,t,n){var i=n("5537")("wks"),o=n("ca5a"),a=n("7726").Symbol,s="function"==typeof a;(e.exports=function(e){return i[e]||(i[e]=s&&a[e]||(s?a:o)("Symbol."+e))}).store=i},"2d00":function(e,t){e.exports=!1},"2d95":function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},"2fdb":function(e,t,n){"use strict";var i=n("5ca1"),o=n("d2c8"),a="includes";i(i.P+i.F*n("5147")(a),"String",{includes:function(e){return!!~o(this,e,a).indexOf(e,arguments.length>1?arguments[1]:void 0)}})},"30f1":function(e,t,n){"use strict";var i=n("b8e3"),o=n("63b6"),a=n("9138"),s=n("35e8"),r=n("481b"),l=n("8f60"),c=n("45f2"),u=n("53e2"),d=n("5168")("iterator"),p=!([].keys&&"next"in[].keys()),m="keys",f="values",h=function(){return this};e.exports=function(e,t,n,g,v,b,y){l(n,t,g);var _,k,x,C=function(e){if(!p&&e in T)return T[e];switch(e){case m:case f:return function(){return new n(this,e)}}return function(){return new n(this,e)}},w=t+" Iterator",S=v==f,P=!1,T=e.prototype,E=T[d]||T["@@iterator"]||v&&T[v],$=E||C(v),O=v?S?C("entries"):$:void 0,A="Array"==t&&T.entries||E;if(A&&((x=u(A.call(new e)))!==Object.prototype&&x.next&&(c(x,w,!0),i||"function"==typeof x[d]||s(x,d,h))),S&&E&&E.name!==f&&(P=!0,$=function(){return E.call(this)}),i&&!y||!p&&!P&&T[d]||s(T,d,$),r[t]=$,r[w]=h,v)if(_={values:S?$:C(f),keys:b?$:C(m),entries:O},y)for(k in _)k in T||a(T,k,_[k]);else o(o.P+o.F*(p||P),t,_);return _}},"32a6":function(e,t,n){var i=n("241e"),o=n("c3a1");n("ce7e")("keys",function(){return function(e){return o(i(e))}})},"32e9":function(e,t,n){var i=n("86cc"),o=n("4630");e.exports=n("9e1e")?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},"32fc":function(e,t,n){var i=n("e53d").document;e.exports=i&&i.documentElement},"335c":function(e,t,n){var i=n("6b4c");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},"355d":function(e,t){t.f={}.propertyIsEnumerable},"35e8":function(e,t,n){var i=n("d9f6"),o=n("aebd");e.exports=n("8e60")?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},"36c3":function(e,t,n){var i=n("335c"),o=n("25eb");e.exports=function(e){return i(o(e))}},3702:function(e,t,n){var i=n("481b"),o=n("5168")("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},"3a38":function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},"40c3":function(e,t,n){var i=n("6b4c"),o=n("5168")("toStringTag"),a="Arguments"==i(function(){return arguments}());e.exports=function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:a?i(t):"Object"==(s=i(t))&&"function"==typeof t.callee?"Arguments":s}},4588:function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},"45f2":function(e,t,n){var i=n("d9f6").f,o=n("07e3"),a=n("5168")("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,a)&&i(e,a,{configurable:!0,value:t})}},4630:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"469f":function(e,t,n){n("6c1c"),n("1654"),e.exports=n("7d7b")},"481b":function(e,t){e.exports={}},"4aa6":function(e,t,n){e.exports=n("dc62")},"4bf8":function(e,t,n){var i=n("be13");e.exports=function(e){return Object(i(e))}},"4ee1":function(e,t,n){var i=n("5168")("iterator"),o=!1;try{var a=[7][i]();a.return=function(){o=!0},Array.from(a,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var a=[7],s=a[i]();s.next=function(){return{done:n=!0}},a[i]=function(){return s},e(a)}catch(e){}return n}},"50ed":function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},5147:function(e,t,n){var i=n("2b4c")("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[i]=!1,!"/./"[e](t)}catch(e){}}return!0}},5168:function(e,t,n){var i=n("dbdb")("wks"),o=n("62a0"),a=n("e53d").Symbol,s="function"==typeof a;(e.exports=function(e){return i[e]||(i[e]=s&&a[e]||(s?a:o)("Symbol."+e))}).store=i},5176:function(e,t,n){e.exports=n("51b6")},"51b6":function(e,t,n){n("a3c3"),e.exports=n("584a").Object.assign},"520a":function(e,t,n){"use strict";var i=n("0bfb"),o=RegExp.prototype.exec,a=String.prototype.replace,s=o,r="lastIndex",l=function(){var e=/a/,t=/b*/g;return o.call(e,"a"),o.call(t,"a"),0!==e[r]||0!==t[r]}(),c=void 0!==/()??/.exec("")[1];(l||c)&&(s=function(e){var t,n,s,u,d=this;return c&&(n=new RegExp("^"+d.source+"$(?!\\s)",i.call(d))),l&&(t=d[r]),s=o.call(d,e),l&&s&&(d[r]=d.global?s.index+s[0].length:t),c&&s&&s.length>1&&a.call(s[0],n,function(){for(u=1;u<arguments.length-2;u++)void 0===arguments[u]&&(s[u]=void 0)}),s}),e.exports=s},"53e2":function(e,t,n){var i=n("07e3"),o=n("241e"),a=n("5559")("IE_PROTO"),s=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),i(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},"549b":function(e,t,n){"use strict";var i=n("d864"),o=n("63b6"),a=n("241e"),s=n("b0dc"),r=n("3702"),l=n("b447"),c=n("20fd"),u=n("7cd6");o(o.S+o.F*!n("4ee1")(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,o,d,p=a(e),m="function"==typeof this?this:Array,f=arguments.length,h=f>1?arguments[1]:void 0,g=void 0!==h,v=0,b=u(p);if(g&&(h=i(h,f>2?arguments[2]:void 0,2)),void 0==b||m==Array&&r(b))for(n=new m(t=l(p.length));t>v;v++)c(n,v,g?h(p[v],v):p[v]);else for(d=b.call(p),n=new m;!(o=d.next()).done;v++)c(n,v,g?s(d,h,[o.value,v],!0):o.value);return n.length=v,n}})},"54a1":function(e,t,n){n("6c1c"),n("1654"),e.exports=n("95d5")},5537:function(e,t,n){var i=n("8378"),o=n("7726"),a="__core-js_shared__",s=o[a]||(o[a]={});(e.exports=function(e,t){return s[e]||(s[e]=void 0!==t?t:{})})("versions",[]).push({version:i.version,mode:n("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},5559:function(e,t,n){var i=n("dbdb")("keys"),o=n("62a0");e.exports=function(e){return i[e]||(i[e]=o(e))}},"584a":function(e,t){var n=e.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},"5b4e":function(e,t,n){var i=n("36c3"),o=n("b447"),a=n("0fc9");e.exports=function(e){return function(t,n,s){var r,l=i(t),c=o(l.length),u=a(s,c);if(e&&n!=n){for(;c>u;)if((r=l[u++])!=r)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},"5ca1":function(e,t,n){var i=n("7726"),o=n("8378"),a=n("32e9"),s=n("2aba"),r=n("9b43"),l="prototype",c=function(e,t,n){var u,d,p,m,f=e&c.F,h=e&c.G,g=e&c.S,v=e&c.P,b=e&c.B,y=h?i:g?i[t]||(i[t]={}):(i[t]||{})[l],_=h?o:o[t]||(o[t]={}),k=_[l]||(_[l]={});for(u in h&&(n=t),n)p=((d=!f&&y&&void 0!==y[u])?y:n)[u],m=b&&d?r(p,i):v&&"function"==typeof p?r(Function.call,p):p,y&&s(y,u,p,e&c.U),_[u]!=p&&a(_,u,m),v&&k[u]!=p&&(k[u]=p)};i.core=o,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},"5d73":function(e,t,n){e.exports=n("469f")},"5f1b":function(e,t,n){"use strict";var i=n("23c6"),o=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var a=n.call(e,t);if("object"!=typeof a)throw new TypeError("RegExp exec method returned something other than an Object or null");return a}if("RegExp"!==i(e))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},"626a":function(e,t,n){var i=n("2d95");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},"62a0":function(e,t){var n=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},"63b6":function(e,t,n){var i=n("e53d"),o=n("584a"),a=n("d864"),s=n("35e8"),r=n("07e3"),l="prototype",c=function(e,t,n){var u,d,p,m=e&c.F,f=e&c.G,h=e&c.S,g=e&c.P,v=e&c.B,b=e&c.W,y=f?o:o[t]||(o[t]={}),_=y[l],k=f?i:h?i[t]:(i[t]||{})[l];for(u in f&&(n=t),n)(d=!m&&k&&void 0!==k[u])&&r(y,u)||(p=d?k[u]:n[u],y[u]=f&&"function"!=typeof k[u]?n[u]:v&&d?a(p,i):b&&k[u]==p?function(e){var t=function(t,n,i){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,i)}return e.apply(this,arguments)};return t[l]=e[l],t}(p):g&&"function"==typeof p?a(Function.call,p):p,g&&((y.virtual||(y.virtual={}))[u]=p,e&c.R&&_&&!_[u]&&s(_,u,p)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},6762:function(e,t,n){"use strict";var i=n("5ca1"),o=n("c366")(!0);i(i.P,"Array",{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")("includes")},6821:function(e,t,n){var i=n("626a"),o=n("be13");e.exports=function(e){return i(o(e))}},"69a8":function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},"6a99":function(e,t,n){var i=n("d3f4");e.exports=function(e,t){if(!i(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!i(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},"6b4c":function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},"6c1c":function(e,t,n){n("c367");for(var i=n("e53d"),o=n("35e8"),a=n("481b"),s=n("5168")("toStringTag"),r="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l<r.length;l++){var c=r[l],u=i[c],d=u&&u.prototype;d&&!d[s]&&o(d,s,c),a[c]=a.Array}},"71c1":function(e,t,n){var i=n("3a38"),o=n("25eb");e.exports=function(e){return function(t,n){var a,s,r=String(o(t)),l=i(n),c=r.length;return l<0||l>=c?e?"":void 0:(a=r.charCodeAt(l))<55296||a>56319||l+1===c||(s=r.charCodeAt(l+1))<56320||s>57343?e?r.charAt(l):a:e?r.slice(l,l+2):s-56320+(a-55296<<10)+65536}}},7726:function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"774e":function(e,t,n){e.exports=n("d2d5")},"77f1":function(e,t,n){var i=n("4588"),o=Math.max,a=Math.min;e.exports=function(e,t){return(e=i(e))<0?o(e+t,0):a(e,t)}},"794b":function(e,t,n){e.exports=!n("8e60")&&!n("294c")(function(){return 7!=Object.defineProperty(n("1ec9")("div"),"a",{get:function(){return 7}}).a})},"79aa":function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},"79e5":function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},"7cd6":function(e,t,n){var i=n("40c3"),o=n("5168")("iterator"),a=n("481b");e.exports=n("584a").getIteratorMethod=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||a[i(e)]}},"7d7b":function(e,t,n){var i=n("e4ae"),o=n("7cd6");e.exports=n("584a").getIterator=function(e){var t=o(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return i(t.call(e))}},"7e90":function(e,t,n){var i=n("d9f6"),o=n("e4ae"),a=n("c3a1");e.exports=n("8e60")?Object.defineProperties:function(e,t){o(e);for(var n,s=a(t),r=s.length,l=0;r>l;)i.f(e,n=s[l++],t[n]);return e}},8378:function(e,t){var n=e.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},8436:function(e,t){e.exports=function(){}},"86cc":function(e,t,n){var i=n("cb7c"),o=n("c69a"),a=n("6a99"),s=Object.defineProperty;t.f=n("9e1e")?Object.defineProperty:function(e,t,n){if(i(e),t=a(t,!0),i(n),o)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},"8aae":function(e,t,n){n("32a6"),e.exports=n("584a").Object.keys},"8e60":function(e,t,n){e.exports=!n("294c")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"8f60":function(e,t,n){"use strict";var i=n("a159"),o=n("aebd"),a=n("45f2"),s={};n("35e8")(s,n("5168")("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=i(s,{next:o(1,n)}),a(e,t+" Iterator")}},9003:function(e,t,n){var i=n("6b4c");e.exports=Array.isArray||function(e){return"Array"==i(e)}},9138:function(e,t,n){e.exports=n("35e8")},9306:function(e,t,n){"use strict";var i=n("c3a1"),o=n("9aa9"),a=n("355d"),s=n("241e"),r=n("335c"),l=Object.assign;e.exports=!l||n("294c")(function(){var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach(function(e){t[e]=e}),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=i})?function(e,t){for(var n=s(e),l=arguments.length,c=1,u=o.f,d=a.f;l>c;)for(var p,m=r(arguments[c++]),f=u?i(m).concat(u(m)):i(m),h=f.length,g=0;h>g;)d.call(m,p=f[g++])&&(n[p]=m[p]);return n}:l},9427:function(e,t,n){var i=n("63b6");i(i.S,"Object",{create:n("a159")})},"95d5":function(e,t,n){var i=n("40c3"),o=n("5168")("iterator"),a=n("481b");e.exports=n("584a").isIterable=function(e){var t=Object(e);return void 0!==t[o]||"@@iterator"in t||a.hasOwnProperty(i(t))}},"9aa9":function(e,t){t.f=Object.getOwnPropertySymbols},"9b43":function(e,t,n){var i=n("d8e8");e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,o){return e.call(t,n,i,o)}}return function(){return e.apply(t,arguments)}}},"9c6c":function(e,t,n){var i=n("2b4c")("unscopables"),o=Array.prototype;void 0==o[i]&&n("32e9")(o,i,{}),e.exports=function(e){o[i][e]=!0}},"9def":function(e,t,n){var i=n("4588"),o=Math.min;e.exports=function(e){return e>0?o(i(e),9007199254740991):0}},"9e1e":function(e,t,n){e.exports=!n("79e5")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},a159:function(e,t,n){var i=n("e4ae"),o=n("7e90"),a=n("1691"),s=n("5559")("IE_PROTO"),r=function(){},l="prototype",c=function(){var e,t=n("1ec9")("iframe"),i=a.length;for(t.style.display="none",n("32fc").appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;i--;)delete c[l][a[i]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(r[l]=i(e),n=new r,r[l]=null,n[s]=e):n=c(),void 0===t?n:o(n,t)}},a352:function(t,n){t.exports=e},a3c3:function(e,t,n){var i=n("63b6");i(i.S+i.F,"Object",{assign:n("9306")})},a481:function(e,t,n){"use strict";var i=n("cb7c"),o=n("4bf8"),a=n("9def"),s=n("4588"),r=n("0390"),l=n("5f1b"),c=Math.max,u=Math.min,d=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,m=/\$([$&`']|\d\d?)/g,f=function(e){return void 0===e?e:String(e)};n("214f")("replace",2,function(e,t,n,h){return[function(i,o){var a=e(this),s=void 0==i?void 0:i[t];return void 0!==s?s.call(i,a,o):n.call(String(a),i,o)},function(e,t){var o=h(n,e,this,t);if(o.done)return o.value;var d=i(e),p=String(this),m="function"==typeof t;m||(t=String(t));var v=d.global;if(v){var b=d.unicode;d.lastIndex=0}for(var y=[];;){var _=l(d,p);if(null===_)break;if(y.push(_),!v)break;""===String(_[0])&&(d.lastIndex=r(p,a(d.lastIndex),b))}for(var k="",x=0,C=0;C<y.length;C++){_=y[C];for(var w=String(_[0]),S=c(u(s(_.index),p.length),0),P=[],T=1;T<_.length;T++)P.push(f(_[T]));var E=_.groups;if(m){var $=[w].concat(P,S,p);void 0!==E&&$.push(E);var O=String(t.apply(void 0,$))}else O=g(w,p,S,P,E,t);S>=x&&(k+=p.slice(x,S)+O,x=S+w.length)}return k+p.slice(x)}];function g(e,t,i,a,s,r){var l=i+e.length,c=a.length,u=m;return void 0!==s&&(s=o(s),u=p),n.call(r,u,function(n,o){var r;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,i);case"'":return t.slice(l);case"<":r=s[o.slice(1,-1)];break;default:var u=+o;if(0===u)return n;if(u>c){var p=d(u/10);return 0===p?n:p<=c?void 0===a[p-1]?o.charAt(1):a[p-1]+o.charAt(1):n}r=a[u-1]}return void 0===r?"":r})}})},a4bb:function(e,t,n){e.exports=n("8aae")},a745:function(e,t,n){e.exports=n("f410")},aae3:function(e,t,n){var i=n("d3f4"),o=n("2d95"),a=n("2b4c")("match");e.exports=function(e){var t;return i(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==o(e))}},aebd:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},b0c5:function(e,t,n){"use strict";var i=n("520a");n("5ca1")({target:"RegExp",proto:!0,forced:i!==/./.exec},{exec:i})},b0dc:function(e,t,n){var i=n("e4ae");e.exports=function(e,t,n,o){try{return o?t(i(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw void 0!==a&&i(a.call(e)),t}}},b447:function(e,t,n){var i=n("3a38"),o=Math.min;e.exports=function(e){return e>0?o(i(e),9007199254740991):0}},b8e3:function(e,t){e.exports=!0},be13:function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},c366:function(e,t,n){var i=n("6821"),o=n("9def"),a=n("77f1");e.exports=function(e){return function(t,n,s){var r,l=i(t),c=o(l.length),u=a(s,c);if(e&&n!=n){for(;c>u;)if((r=l[u++])!=r)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},c367:function(e,t,n){"use strict";var i=n("8436"),o=n("50ed"),a=n("481b"),s=n("36c3");e.exports=n("30f1")(Array,"Array",function(e,t){this._t=s(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),a.Arguments=a.Array,i("keys"),i("values"),i("entries")},c3a1:function(e,t,n){var i=n("e6f3"),o=n("1691");e.exports=Object.keys||function(e){return i(e,o)}},c649:function(e,t,n){"use strict";(function(e){n.d(t,"c",function(){return c}),n.d(t,"a",function(){return r}),n.d(t,"b",function(){return a}),n.d(t,"d",function(){return l}),n("a481");var i=n("4aa6"),o=n.n(i);var a="undefined"!=typeof window?window.console:e.console;var s=/-(\w)/g,r=function(e){var t=o()(null);return function(n){return t[n]||(t[n]=e(n))}}(function(e){return e.replace(s,function(e,t){return t?t.toUpperCase():""})});function l(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function c(e,t,n){var i=0===n?e.children[0]:e.children[n-1].nextSibling;e.insertBefore(t,i)}}).call(this,n("c8ba"))},c69a:function(e,t,n){e.exports=!n("9e1e")&&!n("79e5")(function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a})},c8ba:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},c8bb:function(e,t,n){e.exports=n("54a1")},ca5a:function(e,t){var n=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},cb7c:function(e,t,n){var i=n("d3f4");e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},ce7e:function(e,t,n){var i=n("63b6"),o=n("584a"),a=n("294c");e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],s={};s[e]=t(n),i(i.S+i.F*a(function(){n(1)}),"Object",s)}},d2c8:function(e,t,n){var i=n("aae3"),o=n("be13");e.exports=function(e,t,n){if(i(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(e))}},d2d5:function(e,t,n){n("1654"),n("549b"),e.exports=n("584a").Array.from},d3f4:function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},d864:function(e,t,n){var i=n("79aa");e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,o){return e.call(t,n,i,o)}}return function(){return e.apply(t,arguments)}}},d8e8:function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},d9f6:function(e,t,n){var i=n("e4ae"),o=n("794b"),a=n("1bc3"),s=Object.defineProperty;t.f=n("8e60")?Object.defineProperty:function(e,t,n){if(i(e),t=a(t,!0),i(n),o)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},dbdb:function(e,t,n){var i=n("584a"),o=n("e53d"),a="__core-js_shared__",s=o[a]||(o[a]={});(e.exports=function(e,t){return s[e]||(s[e]=void 0!==t?t:{})})("versions",[]).push({version:i.version,mode:n("b8e3")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},dc62:function(e,t,n){n("9427");var i=n("584a").Object;e.exports=function(e,t){return i.create(e,t)}},e4ae:function(e,t,n){var i=n("f772");e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},e53d:function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},e6f3:function(e,t,n){var i=n("07e3"),o=n("36c3"),a=n("5b4e")(!1),s=n("5559")("IE_PROTO");e.exports=function(e,t){var n,r=o(e),l=0,c=[];for(n in r)n!=s&&i(r,n)&&c.push(n);for(;t.length>l;)i(r,n=t[l++])&&(~a(c,n)||c.push(n));return c}},f410:function(e,t,n){n("1af6"),e.exports=n("584a").Array.isArray},f559:function(e,t,n){"use strict";var i=n("5ca1"),o=n("9def"),a=n("d2c8"),s="startsWith",r=""[s];i(i.P+i.F*n("5147")(s),"String",{startsWith:function(e){var t=a(this,e,s),n=o(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),i=String(e);return r?r.call(t,i,n):t.slice(n,n+i.length)===i}})},f772:function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},fa5b:function(e,t,n){e.exports=n("5537")("native-function-to-string",Function.toString)},fb15:function(e,t,n){"use strict";var i;n.r(t),"undefined"!=typeof window&&(i=window.document.currentScript)&&(i=i.src.match(/(.+\/)[^\/]+\.js(\?.*)?$/))&&(n.p=i[1]);var o=n("5176"),a=n.n(o),s=(n("f559"),n("a4bb")),r=n.n(s),l=(n("6762"),n("2fdb"),n("a745")),c=n.n(l);var u=n("5d73"),d=n.n(u);function p(e,t){return function(e){if(c()(e))return e}(e)||function(e,t){var n=[],i=!0,o=!1,a=void 0;try{for(var s,r=d()(e);!(i=(s=r.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){o=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(o)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var m=n("774e"),f=n.n(m),h=n("c8bb"),g=n.n(h);function v(e){return function(e){if(c()(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(g()(Object(e))||"[object Arguments]"===Object.prototype.toString.call(e))return f()(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var b=n("a352"),y=n.n(b),_=n("c649");function k(e,t){var n=this;this.$nextTick(function(){return n.$emit(e.toLowerCase(),t)})}function x(e,t){var n=null,i=function(e,t){n=function(e,t,n){return void 0===n?e:((e=e||{})[t]=n,e)}(n,e,t)};if(i("attrs",r()(e).filter(function(e){return"id"===e||e.startsWith("data-")}).reduce(function(t,n){return t[n]=e[n],t},{})),!t)return n;var o=t.on,s=t.props,l=t.attrs;return i("on",o),i("props",s),a()(n.attrs,l),n}var C=["Start","Add","Remove","Update","End"],w=["Choose","Sort","Filter","Clone"],S=["Move"].concat(C,w).map(function(e){return"on"+e}),P=null,T={name:"draggable",inheritAttrs:!1,props:{options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:function(e){return e}},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},data:function(){return{transitionMode:!1,noneFunctionalComponentMode:!1,init:!1}},render:function(e){var t=this.$slots.default;this.transitionMode=function(e){if(!e||1!==e.length)return!1;var t=p(e,1)[0].componentOptions;return!!t&&["transition-group","TransitionGroup"].includes(t.tag)}(t);var n=function(e,t){var n=t.header,i=t.footer,o=0,a=0;return n&&(o=n.length,e=e?[].concat(v(n),v(e)):v(n)),i&&(a=i.length,e=e?[].concat(v(e),v(i)):v(i)),{children:e,headerOffset:o,footerOffset:a}}(t,this.$slots),i=n.children,o=n.headerOffset,a=n.footerOffset;this.headerOffset=o,this.footerOffset=a;var s=x(this.$attrs,this.componentData);return e(this.getTag(),s,i)},created:function(){null!==this.list&&null!==this.value&&_.b.error("Value and list props are mutually exclusive! Please set one or another."),"div"!==this.element&&_.b.warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),void 0!==this.options&&_.b.warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted:function(){var e=this;if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error("Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ".concat(this.getTag()));var t={};C.forEach(function(n){t["on"+n]=function(e){var t=this;return function(n){null!==t.realList&&t["onDrag"+e](n),k.call(t,e,n)}}.call(e,n)}),w.forEach(function(n){t["on"+n]=k.bind(e,n)});var n=r()(this.$attrs).reduce(function(t,n){return t[Object(_.a)(n)]=e.$attrs[n],t},{}),i=a()({},this.options,n,t,{onMove:function(t,n){return e.onDragMove(t,n)}});!("draggable"in i)&&(i.draggable=">*"),this._sortable=new y.a(this.rootContainer,i),this.computeIndexes()},beforeDestroy:function(){void 0!==this._sortable&&this._sortable.destroy()},computed:{rootContainer:function(){return this.transitionMode?this.$el.children[0]:this.$el},realList:function(){return this.list?this.list:this.value}},watch:{options:{handler:function(e){this.updateOptions(e)},deep:!0},$attrs:{handler:function(e){this.updateOptions(e)},deep:!0},realList:function(){this.computeIndexes()}},methods:{getTag:function(){return this.tag||this.element},updateOptions:function(e){for(var t in e){var n=Object(_.a)(t);-1===S.indexOf(n)&&this._sortable.option(n,e[t])}},getChildrenNodes:function(){if(this.init||(this.noneFunctionalComponentMode=this.noneFunctionalComponentMode&&1===this.$children.length,this.init=!0),this.noneFunctionalComponentMode)return this.$children[0].$slots.default;var e=this.$slots.default;return this.transitionMode?e[0].child.$slots.default:e},computeIndexes:function(){var e=this;this.$nextTick(function(){e.visibleIndexes=function(e,t,n,i){if(!e)return[];var o=e.map(function(e){return e.elm}),a=t.length-i,s=v(t).map(function(e,t){return t>=a?o.length:o.indexOf(e)});return n?s.filter(function(e){return-1!==e}):s}(e.getChildrenNodes(),e.rootContainer.children,e.transitionMode,e.footerOffset)})},getUnderlyingVm:function(e){var t=function(e,t){return e.map(function(e){return e.elm}).indexOf(t)}(this.getChildrenNodes()||[],e);return-1===t?null:{index:t,element:this.realList[t]}},getUnderlyingPotencialDraggableComponent:function(e){var t=e.__vue__;return t&&t.$options&&"transition-group"===t.$options._componentTag?t.$parent:t},emitChanges:function(e){var t=this;this.$nextTick(function(){t.$emit("change",e)})},alterList:function(e){if(this.list)e(this.list);else{var t=v(this.value);e(t),this.$emit("input",t)}},spliceList:function(){var e=arguments;this.alterList(function(t){return t.splice.apply(t,v(e))})},updatePosition:function(e,t){this.alterList(function(n){return n.splice(t,0,n.splice(e,1)[0])})},getRelatedContextFromMoveEvent:function(e){var t=e.to,n=e.related,i=this.getUnderlyingPotencialDraggableComponent(t);if(!i)return{component:i};var o=i.realList,s={list:o,component:i};if(t!==n&&o&&i.getUnderlyingVm){var r=i.getUnderlyingVm(n);if(r)return a()(r,s)}return s},getVmIndex:function(e){var t=this.visibleIndexes,n=t.length;return e>n-1?n:t[e]},getComponent:function(){return this.$slots.default[0].componentInstance},resetTransitionData:function(e){if(this.noTransitionOnDrag&&this.transitionMode){this.getChildrenNodes()[e].data=null;var t=this.getComponent();t.children=[],t.kept=void 0}},onDragStart:function(e){this.context=this.getUnderlyingVm(e.item),e.item._underlying_vm_=this.clone(this.context.element),P=e.item},onDragAdd:function(e){var t=e.item._underlying_vm_;if(void 0!==t){Object(_.d)(e.item);var n=this.getVmIndex(e.newIndex);this.spliceList(n,0,t),this.computeIndexes();var i={element:t,newIndex:n};this.emitChanges({added:i})}},onDragRemove:function(e){if(Object(_.c)(this.rootContainer,e.item,e.oldIndex),"clone"!==e.pullMode){var t=this.context.index;this.spliceList(t,1);var n={element:this.context.element,oldIndex:t};this.resetTransitionData(t),this.emitChanges({removed:n})}else Object(_.d)(e.clone)},onDragUpdate:function(e){Object(_.d)(e.item),Object(_.c)(e.from,e.item,e.oldIndex);var t=this.context.index,n=this.getVmIndex(e.newIndex);this.updatePosition(t,n);var i={element:this.context.element,oldIndex:t,newIndex:n};this.emitChanges({moved:i})},updateProperty:function(e,t){e.hasOwnProperty(t)&&(e[t]+=this.headerOffset)},computeFutureIndex:function(e,t){if(!e.element)return 0;var n=v(t.to.children).filter(function(e){return"none"!==e.style.display}),i=n.indexOf(t.related),o=e.component.getVmIndex(i);return-1!==n.indexOf(P)||!t.willInsertAfter?o:o+1},onDragMove:function(e,t){var n=this.move;if(!n||!this.realList)return!0;var i=this.getRelatedContextFromMoveEvent(e),o=this.context,s=this.computeFutureIndex(i,e);return a()(o,{futureIndex:s}),n(a()({},e,{relatedContext:i,draggedContext:o}),t)},onDragEnd:function(){this.computeIndexes(),P=null}}};"undefined"!=typeof window&&"Vue"in window&&window.Vue.component("draggable",T);var E=T;t.default=E}}).default},e.exports=i(n(805))},750:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(734),o=(n.n(i),n(738));t.default={mixins:[o.a],props:{textModeProp:null,allowImage:!1,hasTranslation:!0,hasQuill:!0,label:"",entity:null,textProperty:"",htmlProperty:""},data:function(){return{textValue:"",isTextMode:!1}},mounted:function(){var e=this;this.textProperty in this.entity&&null!==this.entity[this.textProperty]||(this.entity[this.textProperty]=""),this.htmlProperty in this.entity&&null!==this.entity[this.htmlProperty]||(this.entity[this.htmlProperty]=""),this.$nextTick(function(){e.isTextMode=e.textModeProp,e.textValue=e.entity[e.textProperty],e.entity[e.htmlProperty]=e.entity[e.textProperty],e.entity[e.textProperty].startsWith("\x3c!-- Content --\x3e")&&(e.isTextMode=!1),e.isTextMode&&(e.entity[e.textProperty]=e.entity[e.textProperty].replace("\x3c!-- Content --\x3e",""))})},methods:{readyQuill:function(){this.textProperty in this.entity&&this.entity[this.textProperty]&&(this.entity[this.textProperty]=this.entity[this.textProperty].replace("<p><br></p><ul>","<ul>"),this.entity[this.textProperty]=this.entity[this.textProperty].replace("<p><br></p><ol>","<ol>"))},changedContentQuill:function(e){this.entity[this.textProperty]="\x3c!-- Content --\x3e"+this.entity[this.htmlProperty].replace("\x3c!-- Content --\x3e",""),this.$emit("changeQuillContent",e)},changedContentText:function(){this.entity[this.textProperty]=this.process(this.textValue.replace("\x3c!-- Content --\x3e","").replace(/(\r\n|\n|\r)/gm,"")),this.entity[this.htmlProperty]=this.entity[this.textProperty]},showDialogTranslate:function(){this.$emit("showDialogTranslate")},textModeChanged:function(){this.isTextMode=!this.isTextMode,this.isTextMode?this.entity[this.textProperty]=this.process(this.entity[this.htmlProperty].replace("\x3c!-- Content --\x3e","").replace(/(\r\n|\n|\r)/gm,"")):(this.entity[this.textProperty]="\x3c!-- Content --\x3e"+this.entity[this.textProperty],this.entity[this.htmlProperty]=this.entity[this.textProperty]),this.textValue=this.entity[this.textProperty]}},components:{quillEditor:i.quillEditor}}},751:function(e,t,n){(function(t){var n;"undefined"!=typeof self&&self,n=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=109)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(17),o=n(18),a=n(19),s=n(45),r=n(46),l=n(47),c=n(48),u=n(49),d=n(12),p=n(32),m=n(33),f=n(31),h=n(1),g={Scope:h.Scope,create:h.create,find:h.find,query:h.query,register:h.register,Container:i.default,Format:o.default,Leaf:a.default,Embed:c.default,Scroll:s.default,Block:l.default,Inline:r.default,Text:u.default,Attributor:{Attribute:d.default,Class:p.default,Style:m.default,Store:f.default}};t.default=g},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t){var n=this;return t="[Parchment] "+t,(n=e.call(this,t)||this).message=t,n.name=n.constructor.name,n}return o(t,e),t}(Error);t.ParchmentError=a;var s,r={},l={},c={},u={};function d(e,t){var n;if(void 0===t&&(t=s.ANY),"string"==typeof e)n=u[e]||r[e];else if(e instanceof Text||e.nodeType===Node.TEXT_NODE)n=u.text;else if("number"==typeof e)e&s.LEVEL&s.BLOCK?n=u.block:e&s.LEVEL&s.INLINE&&(n=u.inline);else if(e instanceof HTMLElement){var i=(e.getAttribute("class")||"").split(/\s+/);for(var o in i)if(n=l[i[o]])break;n=n||c[e.tagName]}return null==n?null:t&s.LEVEL&n.scope&&t&s.TYPE&n.scope?n:null}t.DATA_KEY="__blot",function(e){e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY"}(s=t.Scope||(t.Scope={})),t.create=function(e,t){var n=d(e);if(null==n)throw new a("Unable to create "+e+" blot");var i=n;return new i(e instanceof Node||e.nodeType===Node.TEXT_NODE?e:i.create(t),t)},t.find=function e(n,i){return void 0===i&&(i=!1),null==n?null:null!=n[t.DATA_KEY]?n[t.DATA_KEY].blot:i?e(n.parentNode,i):null},t.query=d,t.register=function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t.length>1)return t.map(function(t){return e(t)});var i=t[0];if("string"!=typeof i.blotName&&"string"!=typeof i.attrName)throw new a("Invalid definition");if("abstract"===i.blotName)throw new a("Cannot register abstract class");u[i.blotName||i.attrName]=i,"string"==typeof i.keyName?r[i.keyName]=i:(null!=i.className&&(l[i.className]=i),null!=i.tagName&&(Array.isArray(i.tagName)?i.tagName=i.tagName.map(function(e){return e.toUpperCase()}):i.tagName=i.tagName.toUpperCase(),(Array.isArray(i.tagName)?i.tagName:[i.tagName]).forEach(function(e){null!=c[e]&&null!=i.className||(c[e]=i)})));return i}},function(e,t,n){var i=n(51),o=n(11),a=n(3),s=n(20),r=String.fromCharCode(0),l=function(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]};l.prototype.insert=function(e,t){var n={};return 0===e.length?this:(n.insert=e,null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))},l.prototype.delete=function(e){return e<=0?this:this.push({delete:e})},l.prototype.retain=function(e,t){if(e<=0)return this;var n={retain:e};return null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)},l.prototype.push=function(e){var t=this.ops.length,n=this.ops[t-1];if(e=a(!0,{},e),"object"==typeof n){if("number"==typeof e.delete&&"number"==typeof n.delete)return this.ops[t-1]={delete:n.delete+e.delete},this;if("number"==typeof n.delete&&null!=e.insert&&(t-=1,"object"!=typeof(n=this.ops[t-1])))return this.ops.unshift(e),this;if(o(e.attributes,n.attributes)){if("string"==typeof e.insert&&"string"==typeof n.insert)return this.ops[t-1]={insert:n.insert+e.insert},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this;if("number"==typeof e.retain&&"number"==typeof n.retain)return this.ops[t-1]={retain:n.retain+e.retain},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this},l.prototype.chop=function(){var e=this.ops[this.ops.length-1];return e&&e.retain&&!e.attributes&&this.ops.pop(),this},l.prototype.filter=function(e){return this.ops.filter(e)},l.prototype.forEach=function(e){this.ops.forEach(e)},l.prototype.map=function(e){return this.ops.map(e)},l.prototype.partition=function(e){var t=[],n=[];return this.forEach(function(i){(e(i)?t:n).push(i)}),[t,n]},l.prototype.reduce=function(e,t){return this.ops.reduce(e,t)},l.prototype.changeLength=function(){return this.reduce(function(e,t){return t.insert?e+s.length(t):t.delete?e-t.delete:e},0)},l.prototype.length=function(){return this.reduce(function(e,t){return e+s.length(t)},0)},l.prototype.slice=function(e,t){e=e||0,"number"!=typeof t&&(t=1/0);for(var n=[],i=s.iterator(this.ops),o=0;o<t&&i.hasNext();){var a;o<e?a=i.next(e-o):(a=i.next(t-o),n.push(a)),o+=s.length(a)}return new l(n)},l.prototype.compose=function(e){for(var t=s.iterator(this.ops),n=s.iterator(e.ops),i=new l;t.hasNext()||n.hasNext();)if("insert"===n.peekType())i.push(n.next());else if("delete"===t.peekType())i.push(t.next());else{var o=Math.min(t.peekLength(),n.peekLength()),a=t.next(o),r=n.next(o);if("number"==typeof r.retain){var c={};"number"==typeof a.retain?c.retain=o:c.insert=a.insert;var u=s.attributes.compose(a.attributes,r.attributes,"number"==typeof a.retain);u&&(c.attributes=u),i.push(c)}else"number"==typeof r.delete&&"number"==typeof a.retain&&i.push(r)}return i.chop()},l.prototype.concat=function(e){var t=new l(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t},l.prototype.diff=function(e,t){if(this.ops===e.ops)return new l;var n=[this,e].map(function(t){return t.map(function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:r;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")}).join("")}),a=new l,c=i(n[0],n[1],t),u=s.iterator(this.ops),d=s.iterator(e.ops);return c.forEach(function(e){for(var t=e[1].length;t>0;){var n=0;switch(e[0]){case i.INSERT:n=Math.min(d.peekLength(),t),a.push(d.next(n));break;case i.DELETE:n=Math.min(t,u.peekLength()),u.next(n),a.delete(n);break;case i.EQUAL:n=Math.min(u.peekLength(),d.peekLength(),t);var r=u.next(n),l=d.next(n);o(r.insert,l.insert)?a.retain(n,s.attributes.diff(r.attributes,l.attributes)):a.push(l).delete(n)}t-=n}}),a.chop()},l.prototype.eachLine=function(e,t){t=t||"\n";for(var n=s.iterator(this.ops),i=new l,o=0;n.hasNext();){if("insert"!==n.peekType())return;var a=n.peek(),r=s.length(a)-n.peekLength(),c="string"==typeof a.insert?a.insert.indexOf(t,r)-r:-1;if(c<0)i.push(n.next());else if(c>0)i.push(n.next(c));else{if(!1===e(i,n.next(1).attributes||{},o))return;o+=1,i=new l}}i.length()>0&&e(i,{},o)},l.prototype.transform=function(e,t){if(t=!!t,"number"==typeof e)return this.transformPosition(e,t);for(var n=s.iterator(this.ops),i=s.iterator(e.ops),o=new l;n.hasNext()||i.hasNext();)if("insert"!==n.peekType()||!t&&"insert"===i.peekType())if("insert"===i.peekType())o.push(i.next());else{var a=Math.min(n.peekLength(),i.peekLength()),r=n.next(a),c=i.next(a);if(r.delete)continue;c.delete?o.push(c):o.retain(a,s.attributes.transform(r.attributes,c.attributes,t))}else o.retain(s.length(n.next()));return o.chop()},l.prototype.transformPosition=function(e,t){t=!!t;for(var n=s.iterator(this.ops),i=0;n.hasNext()&&i<=e;){var o=n.peekLength(),a=n.peekType();n.next(),"delete"!==a?("insert"===a&&(i<e||!t)&&(e+=o),i+=o):e-=Math.min(o,e-i)}return e},e.exports=l},function(e,t){"use strict";var n=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},a=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,o=n.call(e,"constructor"),a=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!a)return!1;for(t in e);return void 0===t||n.call(e,t)};e.exports=function e(){var t,n,i,s,r,l,c=arguments[0],u=1,d=arguments.length,p=!1;for("boolean"==typeof c&&(p=c,c=arguments[1]||{},u=2),(null==c||"object"!=typeof c&&"function"!=typeof c)&&(c={});u<d;++u)if(null!=(t=arguments[u]))for(n in t)i=c[n],c!==(s=t[n])&&(p&&s&&(a(s)||(r=o(s)))?(r?(r=!1,l=i&&o(i)?i:[]):l=i&&a(i)?i:{},c[n]=e(p,l,s)):void 0!==s&&(c[n]=s));return c}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BlockEmbed=t.bubbleFormats=void 0;var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(i):void 0},a=d(n(3)),s=d(n(2)),r=d(n(0)),l=d(n(16)),c=d(n(6)),u=d(n(7));function d(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=function(e){function t(){return p(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return f(t,r.default.Embed),i(t,[{key:"attach",value:function(){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"attach",this).call(this),this.attributes=new r.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new s.default).insert(this.value(),(0,a.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(e,t){var n=r.default.query(e,r.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,t)}},{key:"formatAt",value:function(e,t,n,i){this.format(n,i)}},{key:"insertAt",value:function(e,n,i){if("string"==typeof n&&n.endsWith("\n")){var a=r.default.create(g.blotName);this.parent.insertBefore(a,0===e?this:this.next),a.insertAt(0,n.slice(0,-1))}else o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,i)}}]),t}();h.scope=r.default.Scope.BLOCK_BLOT;var g=function(e){function t(e){p(this,t);var n=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.cache={},n}return f(t,r.default.Block),i(t,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(r.default.Leaf).reduce(function(e,t){return 0===t.length()?e:e.insert(t.value(),v(t))},new s.default).insert("\n",v(this))),this.cache.delta}},{key:"deleteAt",value:function(e,n){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),this.cache={}}},{key:"formatAt",value:function(e,n,i,a){n<=0||(r.default.query(i,r.default.Scope.BLOCK)?e+n===this.length()&&this.format(i,a):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,Math.min(n,this.length()-e-1),i,a),this.cache={})}},{key:"insertAt",value:function(e,n,i){if(null!=i)return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,i);if(0!==n.length){var a=n.split("\n"),s=a.shift();s.length>0&&(e<this.length()-1||null==this.children.tail?o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,Math.min(e,this.length()-1),s):this.children.tail.insertAt(this.children.tail.length(),s),this.cache={});var r=this;a.reduce(function(e,t){return(r=r.split(e,!0)).insertAt(0,t),t.length},e+s.length)}}},{key:"insertBefore",value:function(e,n){var i=this.children.head;o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n),i instanceof l.default&&i.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(e,n){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"moveChildren",this).call(this,e,n),this.cache={}}},{key:"optimize",value:function(e){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.cache={}}},{key:"path",value:function(e){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e,!0)}},{key:"removeChild",value:function(e){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"removeChild",this).call(this,e),this.cache={}}},{key:"split",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===e||e>=this.length()-1)){var i=this.clone();return 0===e?(this.parent.insertBefore(i,this),this):(this.parent.insertBefore(i,this.next),i)}var a=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"split",this).call(this,e,n);return this.cache={},a}}]),t}();function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==e?t:("function"==typeof e.formats&&(t=(0,a.default)(t,e.formats())),null==e.parent||"scroll"==e.parent.blotName||e.parent.statics.scope!==e.statics.scope?t:v(e.parent,t))}g.blotName="block",g.tagName="P",g.defaultChild="break",g.allowedChildren=[c.default,r.default.Embed,u.default],t.bubbleFormats=v,t.BlockEmbed=h,t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.overload=t.expandConfig=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],i=!0,o=!1,a=void 0;try{for(var s,r=e[Symbol.iterator]();!(i=(s=r.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){o=!0,a=e}finally{try{!i&&r.return&&r.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();n(50);var s=g(n(2)),r=g(n(14)),l=g(n(8)),c=g(n(9)),u=g(n(0)),d=n(15),p=g(d),m=g(n(3)),f=g(n(10)),h=g(n(34));function g(e){return e&&e.__esModule?e:{default:e}}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=(0,f.default)("quill"),y=function(){function e(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=_(t,i),this.container=this.options.container,null==this.container)return b.error("Invalid Quill container",t);this.options.debug&&e.debug(this.options.debug);var o=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new l.default,this.scroll=u.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new r.default(this.scroll),this.selection=new p.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(l.default.events.EDITOR_CHANGE,function(e){e===l.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())}),this.emitter.on(l.default.events.SCROLL_UPDATE,function(e,t){var i=n.selection.lastRange,o=i&&0===i.length?i.index:void 0;k.call(n,function(){return n.editor.update(null,t,o)},e)});var a=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+o+"<p><br></p></div>");this.setContents(a),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return a(e,null,[{key:"debug",value:function(e){!0===e&&(e="log"),f.default.level(e)}},{key:"find",value:function(e){return e.__quill||u.default.find(e)}},{key:"import",value:function(e){return null==this.imports[e]&&b.error("Cannot import "+e+". Are you sure it was registered?"),this.imports[e]}},{key:"register",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof e){var o=e.attrName||e.blotName;"string"==typeof o?this.register("formats/"+o,e,t):Object.keys(e).forEach(function(i){n.register(i,e[i],t)})}else null==this.imports[e]||i||b.warn("Overwriting "+e+" with",t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&"abstract"!==t.blotName?u.default.register(t):e.startsWith("modules")&&"function"==typeof t.register&&t.register()}}]),a(e,[{key:"addContainer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof e){var n=e;(e=document.createElement("div")).classList.add(n)}return this.container.insertBefore(e,t),e}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(e,t,n){var i=this,a=x(e,t,n),s=o(a,4);return e=s[0],t=s[1],n=s[3],k.call(this,function(){return i.editor.deleteText(e,t)},n,e,-1*t)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}},{key:"focus",value:function(){var e=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=e,this.scrollIntoView()}},{key:"format",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;return k.call(this,function(){var i=n.getSelection(!0),o=new s.default;if(null==i)return o;if(u.default.query(e,u.default.Scope.BLOCK))o=n.editor.formatLine(i.index,i.length,v({},e,t));else{if(0===i.length)return n.selection.format(e,t),o;o=n.editor.formatText(i.index,i.length,v({},e,t))}return n.setSelection(i,l.default.sources.SILENT),o},i)}},{key:"formatLine",value:function(e,t,n,i,a){var s,r=this,l=x(e,t,n,i,a),c=o(l,4);return e=c[0],t=c[1],s=c[2],a=c[3],k.call(this,function(){return r.editor.formatLine(e,t,s)},a,e,0)}},{key:"formatText",value:function(e,t,n,i,a){var s,r=this,l=x(e,t,n,i,a),c=o(l,4);return e=c[0],t=c[1],s=c[2],a=c[3],k.call(this,function(){return r.editor.formatText(e,t,s)},a,e,0)}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof e?this.selection.getBounds(e,t):this.selection.getBounds(e.index,e.length);var i=this.container.getBoundingClientRect();return{bottom:n.bottom-i.top,height:n.height,left:n.left-i.left,right:n.right-i.left,top:n.top-i.top,width:n.width}}},{key:"getContents",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=x(e,t),i=o(n,2);return e=i[0],t=i[1],this.editor.getContents(e,t)}},{key:"getFormat",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof e?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}},{key:"getIndex",value:function(e){return e.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(e){return this.scroll.leaf(e)}},{key:"getLine",value:function(e){return this.scroll.line(e)}},{key:"getLines",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof e?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}},{key:"getModule",value:function(e){return this.theme.modules[e]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=x(e,t),i=o(n,2);return e=i[0],t=i[1],this.editor.getText(e,t)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(t,n,i){var o=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.sources.API;return k.call(this,function(){return o.editor.insertEmbed(t,n,i)},a,t)}},{key:"insertText",value:function(e,t,n,i,a){var s,r=this,l=x(e,0,n,i,a),c=o(l,4);return e=c[0],s=c[2],a=c[3],k.call(this,function(){return r.editor.insertText(e,t,s)},a,e,t.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(e,t,n){this.clipboard.dangerouslyPasteHTML(e,t,n)}},{key:"removeFormat",value:function(e,t,n){var i=this,a=x(e,t,n),s=o(a,4);return e=s[0],t=s[1],n=s[3],k.call(this,function(){return i.editor.removeFormat(e,t)},n,e)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return k.call(this,function(){e=new s.default(e);var n=t.getLength(),i=t.editor.deleteText(0,n),o=t.editor.applyDelta(e),a=o.ops[o.ops.length-1];return null!=a&&"string"==typeof a.insert&&"\n"===a.insert[a.insert.length-1]&&(t.editor.deleteText(t.getLength()-1,1),o.delete(1)),i.compose(o)},n)}},{key:"setSelection",value:function(t,n,i){if(null==t)this.selection.setRange(null,n||e.sources.API);else{var a=x(t,n,i),s=o(a,4);t=s[0],n=s[1],i=s[3],this.selection.setRange(new d.Range(t,n),i),i!==l.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API,n=(new s.default).insert(e);return this.setContents(n,t)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,t=this.scroll.update(e);return this.selection.update(e),t}},{key:"updateContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return k.call(this,function(){return e=new s.default(e),t.editor.applyDelta(e,n)},n,!0)}}]),e}();function _(e,t){if((t=(0,m.default)(!0,{container:e,modules:{clipboard:!0,keyboard:!0,history:!0}},t)).theme&&t.theme!==y.DEFAULTS.theme){if(t.theme=y.import("themes/"+t.theme),null==t.theme)throw new Error("Invalid theme "+t.theme+". Did you register it?")}else t.theme=h.default;var n=(0,m.default)(!0,{},t.theme.DEFAULTS);[n,t].forEach(function(e){e.modules=e.modules||{},Object.keys(e.modules).forEach(function(t){!0===e.modules[t]&&(e.modules[t]={})})});var i=Object.keys(n.modules).concat(Object.keys(t.modules)).reduce(function(e,t){var n=y.import("modules/"+t);return null==n?b.error("Cannot load "+t+" module. Are you sure you registered it?"):e[t]=n.DEFAULTS||{},e},{});return null!=t.modules&&t.modules.toolbar&&t.modules.toolbar.constructor!==Object&&(t.modules.toolbar={container:t.modules.toolbar}),t=(0,m.default)(!0,{},y.DEFAULTS,{modules:i},n,t),["bounds","container","scrollingContainer"].forEach(function(e){"string"==typeof t[e]&&(t[e]=document.querySelector(t[e]))}),t.modules=Object.keys(t.modules).reduce(function(e,n){return t.modules[n]&&(e[n]=t.modules[n]),e},{}),t}function k(e,t,n,i){if(this.options.strict&&!this.isEnabled()&&t===l.default.sources.USER)return new s.default;var o=null==n?null:this.getSelection(),a=this.editor.delta,r=e();if(null!=o&&(!0===n&&(n=o.index),null==i?o=C(o,r,t):0!==i&&(o=C(o,n,i,t)),this.setSelection(o,l.default.sources.SILENT)),r.length()>0){var c,u,d=[l.default.events.TEXT_CHANGE,r,a,t];if((c=this.emitter).emit.apply(c,[l.default.events.EDITOR_CHANGE].concat(d)),t!==l.default.sources.SILENT)(u=this.emitter).emit.apply(u,d)}return r}function x(e,t,n,o,a){var s={};return"number"==typeof e.index&&"number"==typeof e.length?"number"!=typeof t?(a=o,o=n,n=t,t=e.length,e=e.index):(t=e.length,e=e.index):"number"!=typeof t&&(a=o,o=n,n=t,t=0),"object"===(void 0===n?"undefined":i(n))?(s=n,a=o):"string"==typeof n&&(null!=o?s[n]=o:a=n),[e,t,s,a=a||l.default.sources.API]}function C(e,t,n,i){if(null==e)return null;var a=void 0,r=void 0;if(t instanceof s.default){var c=[e.index,e.index+e.length].map(function(e){return t.transformPosition(e,i!==l.default.sources.USER)}),u=o(c,2);a=u[0],r=u[1]}else{var p=[e.index,e.index+e.length].map(function(e){return e<t||e===t&&i===l.default.sources.USER?e:n>=0?e+n:Math.max(t,e+n)}),m=o(p,2);a=m[0],r=m[1]}return new d.Range(a,r-a)}y.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},y.events=l.default.events,y.sources=l.default.sources,y.version="1.3.6",y.imports={delta:s.default,parchment:u.default,"core/module":c.default,"core/theme":h.default},t.expandConfig=_,t.overload=x,t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(i):void 0},a=r(n(7)),s=r(n(0));function r(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default.Inline),i(t,[{key:"formatAt",value:function(e,n,i,a){if(t.compare(this.statics.blotName,i)<0&&s.default.query(i,s.default.Scope.BLOT)){var r=this.isolate(e,n);a&&r.wrap(i,a)}else o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,i,a)}},{key:"optimize",value:function(e){if(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.parent instanceof t&&t.compare(this.statics.blotName,this.parent.statics.blotName)>0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(e,n){var i=t.order.indexOf(e),o=t.order.indexOf(n);return i>=0||o>=0?i-o:e===n?0:e<n?-1:1}}]),t}();l.allowedChildren=[l,s.default.Embed,a.default],l.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(0),a=(i=o)&&i.__esModule?i:{default:i};var s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default.Text),t}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=a(n(54));function a(e){return e&&e.__esModule?e:{default:e}}var s=(0,a(n(10)).default)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach(function(e){document.addEventListener(e,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(e){var n;e.__quill&&e.__quill.emitter&&(n=e.__quill.emitter).handleDOM.apply(n,t)})})});var r=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.listeners={},e.on("error",s.error),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),i(t,[{key:"emit",value:function(){s.log.apply(s,arguments),function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(i):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];(this.listeners[e.type]||[]).forEach(function(t){var i=t.node,o=t.handler;(e.target===i||i.contains(e.target))&&o.apply(void 0,[e].concat(n))})}},{key:"listenDOM",value:function(e,t,n){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({node:t,handler:n})}}]),t}();r.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},r.sources={API:"api",SILENT:"silent",USER:"user"},t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.options=n};i.DEFAULTS={},t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=["error","warn","log","info"],o="warn";function a(e){if(i.indexOf(e)<=i.indexOf(o)){for(var t,n=arguments.length,a=Array(n>1?n-1:0),s=1;s<n;s++)a[s-1]=arguments[s];(t=console)[e].apply(t,a)}}function s(e){return i.reduce(function(t,n){return t[n]=a.bind(console,n,e),t},{})}a.level=s.level=function(e){o=e},t.default=s},function(e,t,n){var i=Array.prototype.slice,o=n(52),a=n(53),s=e.exports=function(e,t,n){return n||(n={}),e===t||(e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():!e||!t||"object"!=typeof e&&"object"!=typeof t?n.strict?e===t:e==t:function(e,t,n){var c,u;if(r(e)||r(t))return!1;if(e.prototype!==t.prototype)return!1;if(a(e))return!!a(t)&&(e=i.call(e),t=i.call(t),s(e,t,n));if(l(e)){if(!l(t))return!1;if(e.length!==t.length)return!1;for(c=0;c<e.length;c++)if(e[c]!==t[c])return!1;return!0}try{var d=o(e),p=o(t)}catch(e){return!1}if(d.length!=p.length)return!1;for(d.sort(),p.sort(),c=d.length-1;c>=0;c--)if(d[c]!=p[c])return!1;for(c=d.length-1;c>=0;c--)if(u=d[c],!s(e[u],t[u],n))return!1;return typeof e==typeof t}(e,t,n))};function r(e){return null===e||void 0===e}function l(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length)&&("function"==typeof e.copy&&"function"==typeof e.slice&&!(e.length>0&&"number"!=typeof e[0]))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=function(){function e(e,t,n){void 0===n&&(n={}),this.attrName=e,this.keyName=t;var o=i.Scope.TYPE&i.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&i.Scope.LEVEL|o:this.scope=i.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return e.keys=function(e){return[].map.call(e.attributes,function(e){return e.name})},e.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.setAttribute(this.keyName,t),!0)},e.prototype.canAdd=function(e,t){return null!=i.query(e,i.Scope.BLOT&(this.scope|i.Scope.TYPE))&&(null==this.whitelist||("string"==typeof t?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1))},e.prototype.remove=function(e){e.removeAttribute(this.keyName)},e.prototype.value=function(e){var t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""},e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Code=void 0;var i=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],i=!0,o=!1,a=void 0;try{for(var s,r=e[Symbol.iterator]();!(i=(s=r.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){o=!0,a=e}finally{try{!i&&r.return&&r.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(i):void 0},s=d(n(2)),r=d(n(0)),l=d(n(4)),c=d(n(6)),u=d(n(7));function d(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=function(e){function t(){return p(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return f(t,c.default),t}();h.blotName="code",h.tagName="CODE";var g=function(e){function t(){return p(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return f(t,l.default),o(t,[{key:"delta",value:function(){var e=this,t=this.domNode.textContent;return t.endsWith("\n")&&(t=t.slice(0,-1)),t.split("\n").reduce(function(t,n){return t.insert(n).insert("\n",e.formats())},new s.default)}},{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n){var o=this.descendant(u.default,this.length()-1),s=i(o,1)[0];null!=s&&s.deleteAt(s.length()-1,1),a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}},{key:"formatAt",value:function(e,n,i,o){if(0!==n&&null!=r.default.query(i,r.default.Scope.BLOCK)&&(i!==this.statics.blotName||o!==this.statics.formats(this.domNode))){var a=this.newlineIndex(e);if(!(a<0||a>=e+n)){var s=this.newlineIndex(e,!0)+1,l=a-s+1,c=this.isolate(s,l),u=c.next;c.format(i,o),u instanceof t&&u.formatAt(0,e-s+n-l,i,o)}}}},{key:"insertAt",value:function(e,t,n){if(null==n){var o=this.descendant(u.default,e),a=i(o,2),s=a[0],r=a[1];s.insertAt(r,t)}}},{key:"length",value:function(){var e=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?e:e+1}},{key:"newlineIndex",value:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,e).lastIndexOf("\n");var t=this.domNode.textContent.slice(e).indexOf("\n");return t>-1?e+t:-1}},{key:"optimize",value:function(e){this.domNode.textContent.endsWith("\n")||this.appendChild(r.default.create("text","\n")),a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(e),n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(e){var t=r.default.find(e);null==t?e.parentNode.removeChild(e):t instanceof r.default.Embed?t.remove():t.unwrap()})}}],[{key:"create",value:function(e){var n=a(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),t}();g.blotName="code-block",g.tagName="PRE",g.TAB=" ",t.Code=h,t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],i=!0,o=!1,a=void 0;try{for(var s,r=e[Symbol.iterator]();!(i=(s=r.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){o=!0,a=e}finally{try{!i&&r.return&&r.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=v(n(2)),r=v(n(20)),l=v(n(0)),c=v(n(13)),u=v(n(24)),d=n(4),p=v(d),m=v(n(16)),f=v(n(21)),h=v(n(11)),g=v(n(3));function v(e){return e&&e.__esModule?e:{default:e}}var b=/^[ -~]*$/,y=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scroll=t,this.delta=this.getDelta()}return a(e,[{key:"applyDelta",value:function(e){var t=this,n=!1;this.scroll.update();var a=this.scroll.length();return this.scroll.batchStart(),(e=function(e){return e.reduce(function(e,t){if(1===t.insert){var n=(0,f.default)(t.attributes);return delete n.image,e.insert({image:t.attributes.image},n)}if(null==t.attributes||!0!==t.attributes.list&&!0!==t.attributes.bullet||((t=(0,f.default)(t)).attributes.list?t.attributes.list="ordered":(t.attributes.list="bullet",delete t.attributes.bullet)),"string"==typeof t.insert){var i=t.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return e.insert(i,t.attributes)}return e.push(t)},new s.default)}(e)).reduce(function(e,s){var c=s.retain||s.delete||s.insert.length||1,u=s.attributes||{};if(null!=s.insert){if("string"==typeof s.insert){var m=s.insert;m.endsWith("\n")&&n&&(n=!1,m=m.slice(0,-1)),e>=a&&!m.endsWith("\n")&&(n=!0),t.scroll.insertAt(e,m);var f=t.scroll.line(e),h=o(f,2),v=h[0],b=h[1],y=(0,g.default)({},(0,d.bubbleFormats)(v));if(v instanceof p.default){var _=v.descendant(l.default.Leaf,b),k=o(_,1)[0];y=(0,g.default)(y,(0,d.bubbleFormats)(k))}u=r.default.attributes.diff(y,u)||{}}else if("object"===i(s.insert)){var x=Object.keys(s.insert)[0];if(null==x)return e;t.scroll.insertAt(e,x,s.insert[x])}a+=c}return Object.keys(u).forEach(function(n){t.scroll.formatAt(e,c,n,u[n])}),e+c},0),e.reduce(function(e,n){return"number"==typeof n.delete?(t.scroll.deleteAt(e,n.delete),e):e+(n.retain||n.insert.length||1)},0),this.scroll.batchEnd(),this.update(e)}},{key:"deleteText",value:function(e,t){return this.scroll.deleteAt(e,t),this.update((new s.default).retain(e).delete(t))}},{key:"formatLine",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(i).forEach(function(o){if(null==n.scroll.whitelist||n.scroll.whitelist[o]){var a=n.scroll.lines(e,Math.max(t,1)),s=t;a.forEach(function(t){var a=t.length();if(t instanceof c.default){var r=e-t.offset(n.scroll),l=t.newlineIndex(r+s)-r+1;t.formatAt(r,l,o,i[o])}else t.format(o,i[o]);s-=a})}}),this.scroll.optimize(),this.update((new s.default).retain(e).retain(t,(0,f.default)(i)))}},{key:"formatText",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(i).forEach(function(o){n.scroll.formatAt(e,t,o,i[o])}),this.update((new s.default).retain(e).retain(t,(0,f.default)(i)))}},{key:"getContents",value:function(e,t){return this.delta.slice(e,e+t)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(e,t){return e.concat(t.delta())},new s.default)}},{key:"getFormat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],i=[];0===t?this.scroll.path(e).forEach(function(e){var t=o(e,1)[0];t instanceof p.default?n.push(t):t instanceof l.default.Leaf&&i.push(t)}):(n=this.scroll.lines(e,t),i=this.scroll.descendants(l.default.Leaf,e,t));var a=[n,i].map(function(e){if(0===e.length)return{};for(var t=(0,d.bubbleFormats)(e.shift());Object.keys(t).length>0;){var n=e.shift();if(null==n)return t;t=_((0,d.bubbleFormats)(n),t)}return t});return g.default.apply(g.default,a)}},{key:"getText",value:function(e,t){return this.getContents(e,t).filter(function(e){return"string"==typeof e.insert}).map(function(e){return e.insert}).join("")}},{key:"insertEmbed",value:function(e,t,n){return this.scroll.insertAt(e,t,n),this.update((new s.default).retain(e).insert(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,n)))}},{key:"insertText",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(e,t),Object.keys(i).forEach(function(o){n.scroll.formatAt(e,t.length,o,i[o])}),this.update((new s.default).retain(e).insert(t,(0,f.default)(i)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var e=this.scroll.children.head;return e.statics.blotName===p.default.blotName&&(!(e.children.length>1)&&e.children.head instanceof m.default)}},{key:"removeFormat",value:function(e,t){var n=this.getText(e,t),i=this.scroll.line(e+t),a=o(i,2),r=a[0],l=a[1],u=0,d=new s.default;null!=r&&(u=r instanceof c.default?r.newlineIndex(l)-l+1:r.length()-l,d=r.delta().slice(l,l+u-1).insert("\n"));var p=this.getContents(e,t+u).diff((new s.default).insert(n).concat(d)),m=(new s.default).retain(e).concat(p);return this.applyDelta(m)}},{key:"update",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this.delta;if(1===t.length&&"characterData"===t[0].type&&t[0].target.data.match(b)&&l.default.find(t[0].target)){var o=l.default.find(t[0].target),a=(0,d.bubbleFormats)(o),r=o.offset(this.scroll),c=t[0].oldValue.replace(u.default.CONTENTS,""),p=(new s.default).insert(c),m=(new s.default).insert(o.value());e=(new s.default).retain(r).concat(p.diff(m,n)).reduce(function(e,t){return t.insert?e.insert(t.insert,a):e.push(t)},new s.default),this.delta=i.compose(e)}else this.delta=this.getDelta(),e&&(0,h.default)(i.compose(e),this.delta)||(e=i.diff(this.delta,n));return e}}]),e}();function _(e,t){return Object.keys(t).reduce(function(n,i){return null==e[i]?n:(t[i]===e[i]?n[i]=t[i]:Array.isArray(t[i])?t[i].indexOf(e[i])<0&&(n[i]=t[i].concat([e[i]])):n[i]=[t[i],e[i]],n)},{})}t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Range=void 0;var i=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],i=!0,o=!1,a=void 0;try{for(var s,r=e[Symbol.iterator]();!(i=(s=r.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){o=!0,a=e}finally{try{!i&&r.return&&r.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=c(n(0)),s=c(n(21)),r=c(n(11)),l=c(n(8));function c(e){return e&&e.__esModule?e:{default:e}}function u(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p=(0,c(n(10)).default)("quill:selection"),m=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;d(this,e),this.index=t,this.length=n},f=function(){function e(t,n){var i=this;d(this,e),this.emitter=n,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=a.default.create("cursor",this),this.lastRange=this.savedRange=new m(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){i.mouseDown||setTimeout(i.update.bind(i,l.default.sources.USER),1)}),this.emitter.on(l.default.events.EDITOR_CHANGE,function(e,t){e===l.default.events.TEXT_CHANGE&&t.length()>0&&i.update(l.default.sources.SILENT)}),this.emitter.on(l.default.events.SCROLL_BEFORE_UPDATE,function(){if(i.hasFocus()){var e=i.getNativeRange();null!=e&&e.start.node!==i.cursor.textNode&&i.emitter.once(l.default.events.SCROLL_UPDATE,function(){try{i.setNativeRange(e.start.node,e.start.offset,e.end.node,e.end.offset)}catch(e){}})}}),this.emitter.on(l.default.events.SCROLL_OPTIMIZE,function(e,t){if(t.range){var n=t.range,o=n.startNode,a=n.startOffset,s=n.endNode,r=n.endOffset;i.setNativeRange(o,a,s,r)}}),this.update(l.default.sources.SILENT)}return o(e,[{key:"handleComposition",value:function(){var e=this;this.root.addEventListener("compositionstart",function(){e.composing=!0}),this.root.addEventListener("compositionend",function(){if(e.composing=!1,e.cursor.parent){var t=e.cursor.restore();if(!t)return;setTimeout(function(){e.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)},1)}})}},{key:"handleDragging",value:function(){var e=this;this.emitter.listenDOM("mousedown",document.body,function(){e.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){e.mouseDown=!1,e.update(l.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(e,t){if(null==this.scroll.whitelist||this.scroll.whitelist[e]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!a.default.query(e,a.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var i=a.default.find(n.start.node,!1);if(null==i)return;if(i instanceof a.default.Leaf){var o=i.split(n.start.offset);i.parent.insertBefore(this.cursor,o)}else i.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();e=Math.min(e,n-1),t=Math.min(e+t,n-1)-e;var o=void 0,a=this.scroll.leaf(e),s=i(a,2),r=s[0],l=s[1];if(null==r)return null;var c=r.position(l,!0),u=i(c,2);o=u[0],l=u[1];var d=document.createRange();if(t>0){d.setStart(o,l);var p=this.scroll.leaf(e+t),m=i(p,2);if(r=m[0],l=m[1],null==r)return null;var f=r.position(l,!0),h=i(f,2);return o=h[0],l=h[1],d.setEnd(o,l),d.getBoundingClientRect()}var g="left",v=void 0;return o instanceof Text?(l<o.data.length?(d.setStart(o,l),d.setEnd(o,l+1)):(d.setStart(o,l-1),d.setEnd(o,l),g="right"),v=d.getBoundingClientRect()):(v=r.domNode.getBoundingClientRect(),l>0&&(g="right")),{bottom:v.top+v.height,height:v.height,left:v[g],right:v[g],top:v.top,width:0}}},{key:"getNativeRange",value:function(){var e=document.getSelection();if(null==e||e.rangeCount<=0)return null;var t=e.getRangeAt(0);if(null==t)return null;var n=this.normalizeNative(t);return p.info("getNativeRange",n),n}},{key:"getRange",value:function(){var e=this.getNativeRange();return null==e?[null,null]:[this.normalizedToRange(e),e]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(e){var t=this,n=[[e.start.node,e.start.offset]];e.native.collapsed||n.push([e.end.node,e.end.offset]);var o=n.map(function(e){var n=i(e,2),o=n[0],s=n[1],r=a.default.find(o,!0),l=r.offset(t.scroll);return 0===s?l:r instanceof a.default.Container?l+r.length():l+r.index(o,s)}),s=Math.min(Math.max.apply(Math,u(o)),this.scroll.length()-1),r=Math.min.apply(Math,[s].concat(u(o)));return new m(r,s-r)}},{key:"normalizeNative",value:function(e){if(!h(this.root,e.startContainer)||!e.collapsed&&!h(this.root,e.endContainer))return null;var t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach(function(e){for(var t=e.node,n=e.offset;!(t instanceof Text)&&t.childNodes.length>0;)if(t.childNodes.length>n)t=t.childNodes[n],n=0;else{if(t.childNodes.length!==n)break;n=(t=t.lastChild)instanceof Text?t.data.length:t.childNodes.length+1}e.node=t,e.offset=n}),t}},{key:"rangeToNative",value:function(e){var t=this,n=e.collapsed?[e.index]:[e.index,e.index+e.length],o=[],a=this.scroll.length();return n.forEach(function(e,n){e=Math.min(a-1,e);var s,r=t.scroll.leaf(e),l=i(r,2),c=l[0],u=l[1],d=c.position(u,0!==n),p=i(d,2);s=p[0],u=p[1],o.push(s,u)}),o.length<2&&(o=o.concat(o)),o}},{key:"scrollIntoView",value:function(e){var t=this.lastRange;if(null!=t){var n=this.getBounds(t.index,t.length);if(null!=n){var o=this.scroll.length()-1,a=this.scroll.line(Math.min(t.index,o)),s=i(a,1)[0],r=s;if(t.length>0){var l=this.scroll.line(Math.min(t.index+t.length,o));r=i(l,1)[0]}if(null!=s&&null!=r){var c=e.getBoundingClientRect();n.top<c.top?e.scrollTop-=c.top-n.top:n.bottom>c.bottom&&(e.scrollTop+=n.bottom-c.bottom)}}}}},{key:"setNativeRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(p.info("setNativeRange",e,t,n,i),null==e||null!=this.root.parentNode&&null!=e.parentNode&&null!=n.parentNode){var a=document.getSelection();if(null!=a)if(null!=e){this.hasFocus()||this.root.focus();var s=(this.getNativeRange()||{}).native;if(null==s||o||e!==s.startContainer||t!==s.startOffset||n!==s.endContainer||i!==s.endOffset){"BR"==e.tagName&&(t=[].indexOf.call(e.parentNode.childNodes,e),e=e.parentNode),"BR"==n.tagName&&(i=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var r=document.createRange();r.setStart(e,t),r.setEnd(n,i),a.removeAllRanges(),a.addRange(r)}}else a.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;if("string"==typeof t&&(n=t,t=!1),p.info("setRange",e),null!=e){var i=this.rangeToNative(e);this.setNativeRange.apply(this,u(i).concat([t]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,t=this.lastRange,n=this.getRange(),o=i(n,2),a=o[0],c=o[1];if(this.lastRange=a,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,r.default)(t,this.lastRange)){var u;!this.composing&&null!=c&&c.native.collapsed&&c.start.node!==this.cursor.textNode&&this.cursor.restore();var d,p=[l.default.events.SELECTION_CHANGE,(0,s.default)(this.lastRange),(0,s.default)(t),e];if((u=this.emitter).emit.apply(u,[l.default.events.EDITOR_CHANGE].concat(p)),e!==l.default.sources.SILENT)(d=this.emitter).emit.apply(d,p)}}}]),e}();function h(e,t){try{t.parentNode}catch(e){return!1}return t instanceof Text&&(t=t.parentNode),e.contains(t)}t.Range=m,t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=n(0),s=(i=a)&&i.__esModule?i:{default:i};var r=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default.Embed),o(t,[{key:"insertInto",value:function(e,n){0===e.children.length?function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(i):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertInto",this).call(this,e,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),t}();r.blotName="break",r.tagName="BR",t.default=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(44),s=n(30),r=n(1),l=function(e){function t(t){var n=e.call(this,t)||this;return n.build(),n}return o(t,e),t.prototype.appendChild=function(e){this.insertBefore(e)},t.prototype.attach=function(){e.prototype.attach.call(this),this.children.forEach(function(e){e.attach()})},t.prototype.build=function(){var e=this;this.children=new a.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(t){try{var n=c(t);e.insertBefore(n,e.children.head||void 0)}catch(e){if(e instanceof r.ParchmentError)return;throw e}})},t.prototype.deleteAt=function(e,t){if(0===e&&t===this.length())return this.remove();this.children.forEachAt(e,t,function(e,t,n){e.deleteAt(t,n)})},t.prototype.descendant=function(e,n){var i=this.children.find(n),o=i[0],a=i[1];return null==e.blotName&&e(o)||null!=e.blotName&&o instanceof e?[o,a]:o instanceof t?o.descendant(e,a):[null,-1]},t.prototype.descendants=function(e,n,i){void 0===n&&(n=0),void 0===i&&(i=Number.MAX_VALUE);var o=[],a=i;return this.children.forEachAt(n,i,function(n,i,s){(null==e.blotName&&e(n)||null!=e.blotName&&n instanceof e)&&o.push(n),n instanceof t&&(o=o.concat(n.descendants(e,i,a))),a-=s}),o},t.prototype.detach=function(){this.children.forEach(function(e){e.detach()}),e.prototype.detach.call(this)},t.prototype.formatAt=function(e,t,n,i){this.children.forEachAt(e,t,function(e,t,o){e.formatAt(t,o,n,i)})},t.prototype.insertAt=function(e,t,n){var i=this.children.find(e),o=i[0],a=i[1];if(o)o.insertAt(a,t,n);else{var s=null==n?r.create("text",t):r.create(t,n);this.appendChild(s)}},t.prototype.insertBefore=function(e,t){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some(function(t){return e instanceof t}))throw new r.ParchmentError("Cannot insert "+e.statics.blotName+" into "+this.statics.blotName);e.insertInto(this,t)},t.prototype.length=function(){return this.children.reduce(function(e,t){return e+t.length()},0)},t.prototype.moveChildren=function(e,t){this.children.forEach(function(n){e.insertBefore(n,t)})},t.prototype.optimize=function(t){if(e.prototype.optimize.call(this,t),0===this.children.length)if(null!=this.statics.defaultChild){var n=r.create(this.statics.defaultChild);this.appendChild(n),n.optimize(t)}else this.remove()},t.prototype.path=function(e,n){void 0===n&&(n=!1);var i=this.children.find(e,n),o=i[0],a=i[1],s=[[this,e]];return o instanceof t?s.concat(o.path(a,n)):(null!=o&&s.push([o,a]),s)},t.prototype.removeChild=function(e){this.children.remove(e)},t.prototype.replace=function(n){n instanceof t&&n.moveChildren(this),e.prototype.replace.call(this,n)},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(e,this.length(),function(e,i,o){e=e.split(i,t),n.appendChild(e)}),n},t.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},t.prototype.update=function(e,t){var n=this,i=[],o=[];e.forEach(function(e){e.target===n.domNode&&"childList"===e.type&&(i.push.apply(i,e.addedNodes),o.push.apply(o,e.removedNodes))}),o.forEach(function(e){if(!(null!=e.parentNode&&"IFRAME"!==e.tagName&&document.body.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var t=r.find(e);null!=t&&(null!=t.domNode.parentNode&&t.domNode.parentNode!==n.domNode||t.detach())}}),i.filter(function(e){return e.parentNode==n.domNode}).sort(function(e,t){return e===t?0:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(e){var t=null;null!=e.nextSibling&&(t=r.find(e.nextSibling));var i=c(e);i.next==t&&null!=i.next||(null!=i.parent&&i.parent.removeChild(n),n.insertBefore(i,t||void 0))})},t}(s.default);function c(e){var t=r.find(e);if(null==t)try{t=r.create(e)}catch(n){t=r.create(r.Scope.INLINE),[].slice.call(e.childNodes).forEach(function(e){t.domNode.appendChild(e)}),e.parentNode&&e.parentNode.replaceChild(t.domNode,e),t.attach()}return t}t.default=l},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(12),s=n(31),r=n(17),l=n(1),c=function(e){function t(t){var n=e.call(this,t)||this;return n.attributes=new s.default(n.domNode),n}return o(t,e),t.formats=function(e){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?e.tagName.toLowerCase():void 0)},t.prototype.format=function(e,t){var n=l.query(e);n instanceof a.default?this.attributes.attribute(n,t):t&&(null==n||e===this.statics.blotName&&this.formats()[e]===t||this.replaceWith(e,t))},t.prototype.formats=function(){var e=this.attributes.values(),t=this.statics.formats(this.domNode);return null!=t&&(e[this.statics.blotName]=t),e},t.prototype.replaceWith=function(t,n){var i=e.prototype.replaceWith.call(this,t,n);return this.attributes.copy(i),i},t.prototype.update=function(t,n){var i=this;e.prototype.update.call(this,t,n),t.some(function(e){return e.target===i.domNode&&"attributes"===e.type})&&this.attributes.build()},t.prototype.wrap=function(n,i){var o=e.prototype.wrap.call(this,n,i);return o instanceof t&&o.statics.scope===this.statics.scope&&this.attributes.move(o),o},t}(r.default);t.default=c},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(30),s=n(1),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.value=function(e){return!0},t.prototype.index=function(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1},t.prototype.position=function(e,t){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return e>0&&(n+=1),[this.parent.domNode,n]},t.prototype.value=function(){return(e={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,e;var e},t.scope=s.Scope.INLINE_BLOT,t}(a.default);t.default=r},function(e,t,n){var i=n(11),o=n(3),a={attributes:{compose:function(e,t,n){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var i=o(!0,{},t);for(var a in n||(i=Object.keys(i).reduce(function(e,t){return null!=i[t]&&(e[t]=i[t]),e},{})),e)void 0!==e[a]&&void 0===t[a]&&(i[a]=e[a]);return Object.keys(i).length>0?i:void 0},diff:function(e,t){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var n=Object.keys(e).concat(Object.keys(t)).reduce(function(n,o){return i(e[o],t[o])||(n[o]=void 0===t[o]?null:t[o]),n},{});return Object.keys(n).length>0?n:void 0},transform:function(e,t,n){if("object"!=typeof e)return t;if("object"==typeof t){if(!n)return t;var i=Object.keys(t).reduce(function(n,i){return void 0===e[i]&&(n[i]=t[i]),n},{});return Object.keys(i).length>0?i:void 0}}},iterator:function(e){return new s(e)},length:function(e){return"number"==typeof e.delete?e.delete:"number"==typeof e.retain?e.retain:"string"==typeof e.insert?e.insert.length:1}};function s(e){this.ops=e,this.index=0,this.offset=0}s.prototype.hasNext=function(){return this.peekLength()<1/0},s.prototype.next=function(e){e||(e=1/0);var t=this.ops[this.index];if(t){var n=this.offset,i=a.length(t);if(e>=i-n?(e=i-n,this.index+=1,this.offset=0):this.offset+=e,"number"==typeof t.delete)return{delete:e};var o={};return t.attributes&&(o.attributes=t.attributes),"number"==typeof t.retain?o.retain=e:"string"==typeof t.insert?o.insert=t.insert.substr(n,e):o.insert=t.insert,o}return{retain:1/0}},s.prototype.peek=function(){return this.ops[this.index]},s.prototype.peekLength=function(){return this.ops[this.index]?a.length(this.ops[this.index])-this.offset:1/0},s.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},e.exports=a},function(e,n){var i=function(){"use strict";function e(e,t){return null!=t&&e instanceof t}var n,i,o;try{n=Map}catch(e){n=function(){}}try{i=Set}catch(e){i=function(){}}try{o=Promise}catch(e){o=function(){}}function a(s,l,c,u,d){"object"==typeof l&&(c=l.depth,u=l.prototype,d=l.includeNonEnumerable,l=l.circular);var p=[],m=[],f=void 0!==t;return void 0===l&&(l=!0),void 0===c&&(c=1/0),function s(c,h){if(null===c)return null;if(0===h)return c;var g,v;if("object"!=typeof c)return c;if(e(c,n))g=new n;else if(e(c,i))g=new i;else if(e(c,o))g=new o(function(e,t){c.then(function(t){e(s(t,h-1))},function(e){t(s(e,h-1))})});else if(a.__isArray(c))g=[];else if(a.__isRegExp(c))g=new RegExp(c.source,r(c)),c.lastIndex&&(g.lastIndex=c.lastIndex);else if(a.__isDate(c))g=new Date(c.getTime());else{if(f&&t.isBuffer(c))return g=new t(c.length),c.copy(g),g;e(c,Error)?g=Object.create(c):void 0===u?(v=Object.getPrototypeOf(c),g=Object.create(v)):(g=Object.create(u),v=u)}if(l){var b=p.indexOf(c);if(-1!=b)return m[b];p.push(c),m.push(g)}for(var y in e(c,n)&&c.forEach(function(e,t){var n=s(t,h-1),i=s(e,h-1);g.set(n,i)}),e(c,i)&&c.forEach(function(e){var t=s(e,h-1);g.add(t)}),c){var _;v&&(_=Object.getOwnPropertyDescriptor(v,y)),_&&null==_.set||(g[y]=s(c[y],h-1))}if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(c);for(y=0;y<k.length;y++){var x=k[y];(!(w=Object.getOwnPropertyDescriptor(c,x))||w.enumerable||d)&&(g[x]=s(c[x],h-1),w.enumerable||Object.defineProperty(g,x,{enumerable:!1}))}}if(d){var C=Object.getOwnPropertyNames(c);for(y=0;y<C.length;y++){var w,S=C[y];(w=Object.getOwnPropertyDescriptor(c,S))&&w.enumerable||(g[S]=s(c[S],h-1),Object.defineProperty(g,S,{enumerable:!1}))}}return g}(s,c)}function s(e){return Object.prototype.toString.call(e)}function r(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return a.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},a.__objToStr=s,a.__isDate=function(e){return"object"==typeof e&&"[object Date]"===s(e)},a.__isArray=function(e){return"object"==typeof e&&"[object Array]"===s(e)},a.__isRegExp=function(e){return"object"==typeof e&&"[object RegExp]"===s(e)},a.__getRegExpFlags=r,a}();"object"==typeof e&&e.exports&&(e.exports=i)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],i=!0,o=!1,a=void 0;try{for(var s,r=e[Symbol.iterator]();!(i=(s=r.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){o=!0,a=e}finally{try{!i&&r.return&&r.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(i):void 0},s=m(n(0)),r=m(n(8)),l=n(4),c=m(l),u=m(n(16)),d=m(n(13)),p=m(n(25));function m(e){return e&&e.__esModule?e:{default:e}}function f(e){return e instanceof c.default||e instanceof l.BlockEmbed}var h=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return i.emitter=n.emitter,Array.isArray(n.whitelist)&&(i.whitelist=n.whitelist.reduce(function(e,t){return e[t]=!0,e},{})),i.domNode.addEventListener("DOMNodeInserted",function(){}),i.optimize(),i.enable(),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default.Scroll),o(t,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(e,n){var o=this.line(e),s=i(o,2),r=s[0],c=s[1],p=this.line(e+n),m=i(p,1)[0];if(a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),null!=m&&r!==m&&c>0){if(r instanceof l.BlockEmbed||m instanceof l.BlockEmbed)return void this.optimize();if(r instanceof d.default){var f=r.newlineIndex(r.length(),!0);if(f>-1&&(r=r.split(f+1))===m)return void this.optimize()}else if(m instanceof d.default){var h=m.newlineIndex(0);h>-1&&m.split(h+1)}var g=m.children.head instanceof u.default?null:m.children.head;r.moveChildren(m,g),r.remove()}this.optimize()}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",e)}},{key:"formatAt",value:function(e,n,i,o){(null==this.whitelist||this.whitelist[i])&&(a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,i,o),this.optimize())}},{key:"insertAt",value:function(e,n,i){if(null==i||null==this.whitelist||this.whitelist[n]){if(e>=this.length())if(null==i||null==s.default.query(n,s.default.Scope.BLOCK)){var o=s.default.create(this.statics.defaultChild);this.appendChild(o),null==i&&n.endsWith("\n")&&(n=n.slice(0,-1)),o.insertAt(0,n,i)}else{var r=s.default.create(n,i);this.appendChild(r)}else a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,i);this.optimize()}}},{key:"insertBefore",value:function(e,n){if(e.statics.scope===s.default.Scope.INLINE_BLOT){var i=s.default.create(this.statics.defaultChild);i.appendChild(e),e=i}a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n)}},{key:"leaf",value:function(e){return this.path(e).pop()||[null,-1]}},{key:"line",value:function(e){return e===this.length()?this.line(e-1):this.descendant(f,e)}},{key:"lines",value:function(){return function e(t,n,i){var o=[],a=i;return t.children.forEachAt(n,i,function(t,n,i){f(t)?o.push(t):t instanceof s.default.Container&&(o=o.concat(e(t,n,a))),a-=i}),o}(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE)}},{key:"optimize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e,n),e.length>0&&this.emitter.emit(r.default.events.SCROLL_OPTIMIZE,e,n))}},{key:"path",value:function(e){return a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e).slice(1)}},{key:"update",value:function(e){if(!0!==this.batch){var n=r.default.sources.USER;"string"==typeof e&&(n=e),Array.isArray(e)||(e=this.observer.takeRecords()),e.length>0&&this.emitter.emit(r.default.events.SCROLL_BEFORE_UPDATE,n,e),a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"update",this).call(this,e.concat([])),e.length>0&&this.emitter.emit(r.default.events.SCROLL_UPDATE,n,e)}}}]),t}();h.blotName="scroll",h.className="ql-editor",h.tagName="DIV",h.defaultChild="block",h.allowedChildren=[c.default,l.BlockEmbed,p.default],t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHORTKEY=t.default=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],i=!0,o=!1,a=void 0;try{for(var s,r=e[Symbol.iterator]();!(i=(s=r.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){o=!0,a=e}finally{try{!i&&r.return&&r.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=h(n(21)),r=h(n(11)),l=h(n(3)),c=h(n(2)),u=h(n(20)),d=h(n(0)),p=h(n(5)),m=h(n(10)),f=h(n(9));function h(e){return e&&e.__esModule?e:{default:e}}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=(0,m.default)("quill:keyboard"),b=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",y=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return i.bindings={},Object.keys(i.options.bindings).forEach(function(t){("list autofill"!==t||null==e.scroll.whitelist||e.scroll.whitelist.list)&&i.options.bindings[t]&&i.addBinding(i.options.bindings[t])}),i.addBinding({key:t.keys.ENTER,shiftKey:null},w),i.addBinding({key:t.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(i.addBinding({key:t.keys.BACKSPACE},{collapsed:!0},k),i.addBinding({key:t.keys.DELETE},{collapsed:!0},x)):(i.addBinding({key:t.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},k),i.addBinding({key:t.keys.DELETE},{collapsed:!0,suffix:/^.?$/},x)),i.addBinding({key:t.keys.BACKSPACE},{collapsed:!1},C),i.addBinding({key:t.keys.DELETE},{collapsed:!1},C),i.addBinding({key:t.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},k),i.listen(),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,f.default),a(t,null,[{key:"match",value:function(e,t){return t=T(t),!["altKey","ctrlKey","metaKey","shiftKey"].some(function(n){return!!t[n]!==e[n]&&null!==t[n]})&&t.key===(e.which||e.keyCode)}}]),a(t,[{key:"addBinding",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=T(e);if(null==i||null==i.key)return v.warn("Attempted to add invalid keyboard binding",i);"function"==typeof t&&(t={handler:t}),"function"==typeof n&&(n={handler:n}),i=(0,l.default)(i,t,n),this.bindings[i.key]=this.bindings[i.key]||[],this.bindings[i.key].push(i)}},{key:"listen",value:function(){var e=this;this.quill.root.addEventListener("keydown",function(n){if(!n.defaultPrevented){var a=n.which||n.keyCode,s=(e.bindings[a]||[]).filter(function(e){return t.match(n,e)});if(0!==s.length){var l=e.quill.getSelection();if(null!=l&&e.quill.hasFocus()){var c=e.quill.getLine(l.index),u=o(c,2),p=u[0],m=u[1],f=e.quill.getLeaf(l.index),h=o(f,2),g=h[0],v=h[1],b=0===l.length?[g,v]:e.quill.getLeaf(l.index+l.length),y=o(b,2),_=y[0],k=y[1],x=g instanceof d.default.Text?g.value().slice(0,v):"",C=_ instanceof d.default.Text?_.value().slice(k):"",w={collapsed:0===l.length,empty:0===l.length&&p.length()<=1,format:e.quill.getFormat(l),offset:m,prefix:x,suffix:C};s.some(function(t){if(null!=t.collapsed&&t.collapsed!==w.collapsed)return!1;if(null!=t.empty&&t.empty!==w.empty)return!1;if(null!=t.offset&&t.offset!==w.offset)return!1;if(Array.isArray(t.format)){if(t.format.every(function(e){return null==w.format[e]}))return!1}else if("object"===i(t.format)&&!Object.keys(t.format).every(function(e){return!0===t.format[e]?null!=w.format[e]:!1===t.format[e]?null==w.format[e]:(0,r.default)(t.format[e],w.format[e])}))return!1;return!(null!=t.prefix&&!t.prefix.test(w.prefix))&&(!(null!=t.suffix&&!t.suffix.test(w.suffix))&&!0!==t.handler.call(e,l,w))})&&n.preventDefault()}}}})}}]),t}();function _(e,t){var n,i=e===y.keys.LEFT?"prefix":"suffix";return g(n={key:e,shiftKey:t,altKey:null},i,/^$/),g(n,"handler",function(n){var i=n.index;e===y.keys.RIGHT&&(i+=n.length+1);var a=this.quill.getLeaf(i);return!(o(a,1)[0]instanceof d.default.Embed)||(e===y.keys.LEFT?t?this.quill.setSelection(n.index-1,n.length+1,p.default.sources.USER):this.quill.setSelection(n.index-1,p.default.sources.USER):t?this.quill.setSelection(n.index,n.length+1,p.default.sources.USER):this.quill.setSelection(n.index+n.length+1,p.default.sources.USER),!1)}),n}function k(e,t){if(!(0===e.index||this.quill.getLength()<=1)){var n=this.quill.getLine(e.index),i=o(n,1)[0],a={};if(0===t.offset){var s=this.quill.getLine(e.index-1),r=o(s,1)[0];if(null!=r&&r.length()>1){var l=i.formats(),c=this.quill.getFormat(e.index-1,1);a=u.default.attributes.diff(l,c)||{}}}var d=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;this.quill.deleteText(e.index-d,d,p.default.sources.USER),Object.keys(a).length>0&&this.quill.formatLine(e.index-d,d,a,p.default.sources.USER),this.quill.focus()}}function x(e,t){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(!(e.index>=this.quill.getLength()-n)){var i={},a=0,s=this.quill.getLine(e.index),r=o(s,1)[0];if(t.offset>=r.length()-1){var l=this.quill.getLine(e.index+1),c=o(l,1)[0];if(c){var d=r.formats(),m=this.quill.getFormat(e.index,1);i=u.default.attributes.diff(d,m)||{},a=c.length()}}this.quill.deleteText(e.index,n,p.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(e.index+a-1,n,i,p.default.sources.USER)}}function C(e){var t=this.quill.getLines(e),n={};if(t.length>1){var i=t[0].formats(),o=t[t.length-1].formats();n=u.default.attributes.diff(o,i)||{}}this.quill.deleteText(e,p.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(e.index,1,n,p.default.sources.USER),this.quill.setSelection(e.index,p.default.sources.SILENT),this.quill.focus()}function w(e,t){var n=this;e.length>0&&this.quill.scroll.deleteAt(e.index,e.length);var i=Object.keys(t.format).reduce(function(e,n){return d.default.query(n,d.default.Scope.BLOCK)&&!Array.isArray(t.format[n])&&(e[n]=t.format[n]),e},{});this.quill.insertText(e.index,"\n",i,p.default.sources.USER),this.quill.setSelection(e.index+1,p.default.sources.SILENT),this.quill.focus(),Object.keys(t.format).forEach(function(e){null==i[e]&&(Array.isArray(t.format[e])||"link"!==e&&n.quill.format(e,t.format[e],p.default.sources.USER))})}function S(e){return{key:y.keys.TAB,shiftKey:!e,format:{"code-block":!0},handler:function(t){var n=d.default.query("code-block"),i=t.index,a=t.length,s=this.quill.scroll.descendant(n,i),r=o(s,2),l=r[0],c=r[1];if(null!=l){var u=this.quill.getIndex(l),m=l.newlineIndex(c,!0)+1,f=l.newlineIndex(u+c+a),h=l.domNode.textContent.slice(m,f).split("\n");c=0,h.forEach(function(t,o){e?(l.insertAt(m+c,n.TAB),c+=n.TAB.length,0===o?i+=n.TAB.length:a+=n.TAB.length):t.startsWith(n.TAB)&&(l.deleteAt(m+c,n.TAB.length),c-=n.TAB.length,0===o?i-=n.TAB.length:a-=n.TAB.length),c+=t.length+1}),this.quill.update(p.default.sources.USER),this.quill.setSelection(i,a,p.default.sources.SILENT)}}}}function P(e){return{key:e[0].toUpperCase(),shortKey:!0,handler:function(t,n){this.quill.format(e,!n.format[e],p.default.sources.USER)}}}function T(e){if("string"==typeof e||"number"==typeof e)return T({key:e});if("object"===(void 0===e?"undefined":i(e))&&(e=(0,s.default)(e,!1)),"string"==typeof e.key)if(null!=y.keys[e.key.toUpperCase()])e.key=y.keys[e.key.toUpperCase()];else{if(1!==e.key.length)return null;e.key=e.key.toUpperCase().charCodeAt(0)}return e.shortKey&&(e[b]=e.shortKey,delete e.shortKey),e}y.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},y.DEFAULTS={bindings:{bold:P("bold"),italic:P("italic"),underline:P("underline"),indent:{key:y.keys.TAB,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","+1",p.default.sources.USER)}},outdent:{key:y.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","-1",p.default.sources.USER)}},"outdent backspace":{key:y.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(e,t){null!=t.format.indent?this.quill.format("indent","-1",p.default.sources.USER):null!=t.format.list&&this.quill.format("list",!1,p.default.sources.USER)}},"indent code-block":S(!0),"outdent code-block":S(!1),"remove tab":{key:y.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(e){this.quill.deleteText(e.index-1,1,p.default.sources.USER)}},tab:{key:y.keys.TAB,handler:function(e){this.quill.history.cutoff();var t=(new c.default).retain(e.index).delete(e.length).insert("\t");this.quill.updateContents(t,p.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,p.default.sources.SILENT)}},"list empty enter":{key:y.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(e,t){this.quill.format("list",!1,p.default.sources.USER),t.format.indent&&this.quill.format("indent",!1,p.default.sources.USER)}},"checklist enter":{key:y.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(e){var t=this.quill.getLine(e.index),n=o(t,2),i=n[0],a=n[1],s=(0,l.default)({},i.formats(),{list:"checked"}),r=(new c.default).retain(e.index).insert("\n",s).retain(i.length()-a-1).retain(1,{list:"unchecked"});this.quill.updateContents(r,p.default.sources.USER),this.quill.setSelection(e.index+1,p.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:y.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(e,t){var n=this.quill.getLine(e.index),i=o(n,2),a=i[0],s=i[1],r=(new c.default).retain(e.index).insert("\n",t.format).retain(a.length()-s-1).retain(1,{header:null});this.quill.updateContents(r,p.default.sources.USER),this.quill.setSelection(e.index+1,p.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(e,t){var n=t.prefix.length,i=this.quill.getLine(e.index),a=o(i,2),s=a[0],r=a[1];if(r>n)return!0;var l=void 0;switch(t.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(e.index," ",p.default.sources.USER),this.quill.history.cutoff();var u=(new c.default).retain(e.index-r).delete(n+1).retain(s.length()-2-r).retain(1,{list:l});this.quill.updateContents(u,p.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,p.default.sources.SILENT)}},"code exit":{key:y.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(e){var t=this.quill.getLine(e.index),n=o(t,2),i=n[0],a=n[1],s=(new c.default).retain(e.index+i.length()-a-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(s,p.default.sources.USER)}},"embed left":_(y.keys.LEFT,!1),"embed left shift":_(y.keys.LEFT,!0),"embed right":_(y.keys.RIGHT,!1),"embed right shift":_(y.keys.RIGHT,!0)}},t.default=y,t.SHORTKEY=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],i=!0,o=!1,a=void 0;try{for(var s,r=e[Symbol.iterator]();!(i=(s=r.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){o=!0,a=e}finally{try{!i&&r.return&&r.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(i):void 0},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=l(n(0)),r=l(n(7));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return i.selection=n,i.textNode=document.createTextNode(t.CONTENTS),i.domNode.appendChild(i.textNode),i._length=0,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default.Embed),a(t,null,[{key:"value",value:function(){}}]),a(t,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(e,n){if(0!==this._length)return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);for(var i=this,a=0;null!=i&&i.statics.scope!==s.default.Scope.BLOCK_BLOT;)a+=i.offset(i.parent),i=i.parent;null!=i&&(this._length=t.CONTENTS.length,i.optimize(),i.formatAt(a,t.CONTENTS.length,e,n),this._length=0)}},{key:"index",value:function(e,n){return e===this.textNode?0:o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!this.selection.composing&&null!=this.parent){var e=this.textNode,n=this.selection.getNativeRange(),o=void 0,a=void 0,l=void 0;if(null!=n&&n.start.node===e&&n.end.node===e){var c=[e,n.start.offset,n.end.offset];o=c[0],a=c[1],l=c[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==t.CONTENTS){var u=this.textNode.data.split(t.CONTENTS).join("");this.next instanceof r.default?(o=this.next.domNode,this.next.insertAt(0,u),this.textNode.data=t.CONTENTS):(this.textNode.data=u,this.parent.insertBefore(s.default.create(this.textNode),this),this.textNode=document.createTextNode(t.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=a){var d=[a,l].map(function(e){return Math.max(0,Math.min(o.data.length,e-1))}),p=i(d,2);return a=p[0],l=p[1],{startNode:o,startOffset:a,endNode:o,endOffset:l}}}}},{key:"update",value:function(e,t){var n=this;if(e.some(function(e){return"characterData"===e.type&&e.target===n.textNode})){var i=this.restore();i&&(t.range=i)}}},{key:"value",value:function(){return""}}]),t}();c.blotName="cursor",c.className="ql-cursor",c.tagName="span",c.CONTENTS="\ufeff",t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=s(n(0)),o=n(4),a=s(o);function s(e){return e&&e.__esModule?e:{default:e}}var r=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default.Container),t}();r.allowedChildren=[a.default,o.BlockEmbed,r],t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorStyle=t.ColorClass=t.ColorAttributor=void 0;var i,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=n(0),s=(i=a)&&i.__esModule?i:{default:i};var r=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default.Attributor.Style),o(t,[{key:"value",value:function(e){var n=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(i):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e);return n.startsWith("rgb(")?(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+n.split(",").map(function(e){return("00"+parseInt(e).toString(16)).slice(-2)}).join("")):n}}]),t}(),l=new s.default.Attributor.Class("color","ql-color",{scope:s.default.Scope.INLINE}),c=new r("color","color",{scope:s.default.Scope.INLINE});t.ColorAttributor=r,t.ColorClass=l,t.ColorStyle=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sanitize=t.default=void 0;var i,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(i):void 0},s=n(6),r=(i=s)&&i.__esModule?i:{default:i};var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.default),o(t,[{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n)return a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{key:"create",value:function(e){var n=a(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return e=this.sanitize(e),n.setAttribute("href",e),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(e){return e.getAttribute("href")}},{key:"sanitize",value:function(e){return c(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}}]),t}();function c(e,t){var n=document.createElement("a");n.href=e;var i=n.href.slice(0,n.href.indexOf(":"));return t.indexOf(i)>-1}l.blotName="link",l.tagName="A",l.SANITIZED_URL="about:blank",l.PROTOCOL_WHITELIST=["http","https","mailto","tel"],t.default=l,t.sanitize=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=r(n(23)),s=r(n(107));function r(e){return e&&e.__esModule?e:{default:e}}var l=0;function c(e,t){e.setAttribute(t,!("true"===e.getAttribute(t)))}var u=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){n.togglePicker()}),this.label.addEventListener("keydown",function(e){switch(e.keyCode){case a.default.keys.ENTER:n.togglePicker();break;case a.default.keys.ESCAPE:n.escape(),e.preventDefault()}}),this.select.addEventListener("change",this.update.bind(this))}return o(e,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),c(this.label,"aria-expanded"),c(this.options,"aria-hidden")}},{key:"buildItem",value:function(e){var t=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),e.hasAttribute("value")&&n.setAttribute("data-value",e.getAttribute("value")),e.textContent&&n.setAttribute("data-label",e.textContent),n.addEventListener("click",function(){t.selectItem(n,!0)}),n.addEventListener("keydown",function(e){switch(e.keyCode){case a.default.keys.ENTER:t.selectItem(n,!0),e.preventDefault();break;case a.default.keys.ESCAPE:t.escape(),e.preventDefault()}}),n}},{key:"buildLabel",value:function(){var e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=s.default,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}},{key:"buildOptions",value:function(){var e=this,t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id="ql-picker-options-"+l,l+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,[].slice.call(this.select.options).forEach(function(n){var i=e.buildItem(n);t.appendChild(i),!0===n.selected&&e.selectItem(i)}),this.container.appendChild(t)}},{key:"buildPicker",value:function(){var e=this;[].slice.call(this.select.attributes).forEach(function(t){e.container.setAttribute(t.name,t.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var e=this;this.close(),setTimeout(function(){return e.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(e!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=e&&(e.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(e.parentNode.children,e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":i(Event))){var o=document.createEvent("Event");o.initEvent("change",!0,!0),this.select.dispatchEvent(o)}this.close()}}},{key:"update",value:function(){var e=void 0;if(this.select.selectedIndex>-1){var t=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(t)}else this.selectItem(null);var n=null!=e&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),e}();t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=v(n(0)),o=v(n(5)),a=n(4),s=v(a),r=v(n(16)),l=v(n(25)),c=v(n(24)),u=v(n(35)),d=v(n(6)),p=v(n(22)),m=v(n(7)),f=v(n(55)),h=v(n(42)),g=v(n(23));function v(e){return e&&e.__esModule?e:{default:e}}o.default.register({"blots/block":s.default,"blots/block/embed":a.BlockEmbed,"blots/break":r.default,"blots/container":l.default,"blots/cursor":c.default,"blots/embed":u.default,"blots/inline":d.default,"blots/scroll":p.default,"blots/text":m.default,"modules/clipboard":f.default,"modules/history":h.default,"modules/keyboard":g.default}),i.default.register(s.default,r.default,c.default,d.default,p.default,m.default),t.default=o.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=function(){function e(e){this.domNode=e,this.domNode[i.DATA_KEY]={blot:this}}return Object.defineProperty(e.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),e.create=function(e){if(null==this.tagName)throw new i.ParchmentError("Blot definition missing tagName");var t;return Array.isArray(this.tagName)?("string"==typeof e&&(e=e.toUpperCase(),parseInt(e).toString()===e&&(e=parseInt(e))),t="number"==typeof e?document.createElement(this.tagName[e-1]):this.tagName.indexOf(e)>-1?document.createElement(e):document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t},e.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},e.prototype.clone=function(){var e=this.domNode.cloneNode(!1);return i.create(e)},e.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[i.DATA_KEY]},e.prototype.deleteAt=function(e,t){this.isolate(e,t).remove()},e.prototype.formatAt=function(e,t,n,o){var a=this.isolate(e,t);if(null!=i.query(n,i.Scope.BLOT)&&o)a.wrap(n,o);else if(null!=i.query(n,i.Scope.ATTRIBUTE)){var s=i.create(this.statics.scope);a.wrap(s),s.format(n,o)}},e.prototype.insertAt=function(e,t,n){var o=null==n?i.create("text",t):i.create(t,n),a=this.split(e);this.parent.insertBefore(o,a)},e.prototype.insertInto=function(e,t){void 0===t&&(t=null),null!=this.parent&&this.parent.children.remove(this);var n=null;e.children.insertBefore(this,t),null!=t&&(n=t.domNode),this.domNode.parentNode==e.domNode&&this.domNode.nextSibling==n||e.domNode.insertBefore(this.domNode,n),this.parent=e,this.attach()},e.prototype.isolate=function(e,t){var n=this.split(e);return n.split(t),n},e.prototype.length=function(){return 1},e.prototype.offset=function(e){return void 0===e&&(e=this.parent),null==this.parent||this==e?0:this.parent.children.offset(this)+this.parent.offset(e)},e.prototype.optimize=function(e){null!=this.domNode[i.DATA_KEY]&&delete this.domNode[i.DATA_KEY].mutations},e.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},e.prototype.replace=function(e){null!=e.parent&&(e.parent.insertBefore(this,e.next),e.remove())},e.prototype.replaceWith=function(e,t){var n="string"==typeof e?i.create(e,t):e;return n.replace(this),n},e.prototype.split=function(e,t){return 0===e?this:this.next},e.prototype.update=function(e,t){},e.prototype.wrap=function(e,t){var n="string"==typeof e?i.create(e,t):e;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},e.blotName="abstract",e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),o=n(32),a=n(33),s=n(1),r=function(){function e(e){this.attributes={},this.domNode=e,this.build()}return e.prototype.attribute=function(e,t){t?e.add(this.domNode,t)&&(null!=e.value(this.domNode)?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])},e.prototype.build=function(){var e=this;this.attributes={};var t=i.default.keys(this.domNode),n=o.default.keys(this.domNode),r=a.default.keys(this.domNode);t.concat(n).concat(r).forEach(function(t){var n=s.query(t,s.Scope.ATTRIBUTE);n instanceof i.default&&(e.attributes[n.attrName]=n)})},e.prototype.copy=function(e){var t=this;Object.keys(this.attributes).forEach(function(n){var i=t.attributes[n].value(t.domNode);e.format(n,i)})},e.prototype.move=function(e){var t=this;this.copy(e),Object.keys(this.attributes).forEach(function(e){t.attributes[e].remove(t.domNode)}),this.attributes={}},e.prototype.values=function(){var e=this;return Object.keys(this.attributes).reduce(function(t,n){return t[n]=e.attributes[n].value(e.domNode),t},{})},e}();t.default=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function a(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter(function(e){return 0===e.indexOf(t+"-")})}Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.keys=function(e){return(e.getAttribute("class")||"").split(/\s+/).map(function(e){return e.split("-").slice(0,-1).join("-")})},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(this.remove(e),e.classList.add(this.keyName+"-"+t),!0)},t.prototype.remove=function(e){a(e,this.keyName).forEach(function(t){e.classList.remove(t)}),0===e.classList.length&&e.removeAttribute("class")},t.prototype.value=function(e){var t=(a(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=s},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function a(e){var t=e.split("-"),n=t.slice(1).map(function(e){return e[0].toUpperCase()+e.slice(1)}).join("");return t[0]+n}Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.keys=function(e){return(e.getAttribute("style")||"").split(";").map(function(e){return e.split(":")[0].trim()})},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.style[a(this.keyName)]=t,!0)},t.prototype.remove=function(e){e.style[a(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")},t.prototype.value=function(e){var t=e.style[a(this.keyName)];return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.options=n,this.modules={}}return i(e,[{key:"init",value:function(){var e=this;Object.keys(this.options.modules).forEach(function(t){null==e.modules[t]&&e.addModule(t)})}},{key:"addModule",value:function(e){var t=this.quill.constructor.import("modules/"+e);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}}]),e}();o.DEFAULTS={modules:{}},o.themes={default:o},t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=s(n(0)),a=s(n(7));function s(e){return e&&e.__esModule?e:{default:e}}var r="\ufeff",l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.contentNode=document.createElement("span"),n.contentNode.setAttribute("contenteditable",!1),[].slice.call(n.domNode.childNodes).forEach(function(e){n.contentNode.appendChild(e)}),n.leftGuard=document.createTextNode(r),n.rightGuard=document.createTextNode(r),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default.Embed),i(t,[{key:"index",value:function(e,n){return e===this.leftGuard?0:e===this.rightGuard?1:function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(i):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,n)}},{key:"restore",value:function(e){var t=void 0,n=void 0,i=e.data.split(r).join("");if(e===this.leftGuard)if(this.prev instanceof a.default){var s=this.prev.length();this.prev.insertAt(s,i),t={startNode:this.prev.domNode,startOffset:s+i.length}}else n=document.createTextNode(i),this.parent.insertBefore(o.default.create(n),this),t={startNode:n,startOffset:i.length};else e===this.rightGuard&&(this.next instanceof a.default?(this.next.insertAt(0,i),t={startNode:this.next.domNode,startOffset:i.length}):(n=document.createTextNode(i),this.parent.insertBefore(o.default.create(n),this.next),t={startNode:n,startOffset:i.length}));return e.data=r,t}},{key:"update",value:function(e,t){var n=this;e.forEach(function(e){if("characterData"===e.type&&(e.target===n.leftGuard||e.target===n.rightGuard)){var i=n.restore(e.target);i&&(t.range=i)}})}}]),t}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlignStyle=t.AlignClass=t.AlignAttribute=void 0;var i,o=n(0),a=(i=o)&&i.__esModule?i:{default:i};var s={scope:a.default.Scope.BLOCK,whitelist:["right","center","justify"]},r=new a.default.Attributor.Attribute("align","align",s),l=new a.default.Attributor.Class("align","ql-align",s),c=new a.default.Attributor.Style("align","text-align",s);t.AlignAttribute=r,t.AlignClass=l,t.AlignStyle=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackgroundStyle=t.BackgroundClass=void 0;var i,o=n(0),a=(i=o)&&i.__esModule?i:{default:i},s=n(26);var r=new a.default.Attributor.Class("background","ql-bg",{scope:a.default.Scope.INLINE}),l=new s.ColorAttributor("background","background-color",{scope:a.default.Scope.INLINE});t.BackgroundClass=r,t.BackgroundStyle=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectionStyle=t.DirectionClass=t.DirectionAttribute=void 0;var i,o=n(0),a=(i=o)&&i.__esModule?i:{default:i};var s={scope:a.default.Scope.BLOCK,whitelist:["rtl"]},r=new a.default.Attributor.Attribute("direction","dir",s),l=new a.default.Attributor.Class("direction","ql-direction",s),c=new a.default.Attributor.Style("direction","direction",s);t.DirectionAttribute=r,t.DirectionClass=l,t.DirectionStyle=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FontClass=t.FontStyle=void 0;var i,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=n(0),s=(i=a)&&i.__esModule?i:{default:i};var r={scope:s.default.Scope.INLINE,whitelist:["serif","monospace"]},l=new s.default.Attributor.Class("font","ql-font",r),c=new(function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default.Attributor.Style),o(t,[{key:"value",value:function(e){return function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(i):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e).replace(/["']/g,"")}}]),t}())("font","font-family",r);t.FontStyle=c,t.FontClass=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SizeStyle=t.SizeClass=void 0;var i,o=n(0),a=(i=o)&&i.__esModule?i:{default:i};var s=new a.default.Attributor.Class("size","ql-size",{scope:a.default.Scope.INLINE,whitelist:["small","large","huge"]}),r=new a.default.Attributor.Style("size","font-size",{scope:a.default.Scope.INLINE,whitelist:["10px","18px","32px"]});t.SizeClass=s,t.SizeStyle=r},function(e,t,n){"use strict";e.exports={align:{"":n(76),center:n(77),right:n(78),justify:n(79)},background:n(80),blockquote:n(81),bold:n(82),clean:n(83),code:n(58),"code-block":n(58),color:n(84),direction:{"":n(85),rtl:n(86)},float:{center:n(87),full:n(88),left:n(89),right:n(90)},formula:n(91),header:{1:n(92),2:n(93)},italic:n(94),image:n(95),indent:{"+1":n(96),"-1":n(97)},link:n(98),list:{ordered:n(99),bullet:n(100),check:n(101)},script:{sub:n(102),super:n(103)},strike:n(104),underline:n(105),video:n(106)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLastChangeIndex=t.default=void 0;var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=r(n(0)),a=r(n(5)),s=r(n(9));function r(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return i.lastRecorded=0,i.ignoreChange=!1,i.clear(),i.quill.on(a.default.events.EDITOR_CHANGE,function(e,t,n,o){e!==a.default.events.TEXT_CHANGE||i.ignoreChange||(i.options.userOnly&&o!==a.default.sources.USER?i.transform(t):i.record(t,n))}),i.quill.keyboard.addBinding({key:"Z",shortKey:!0},i.undo.bind(i)),i.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},i.redo.bind(i)),/Win/i.test(navigator.platform)&&i.quill.keyboard.addBinding({key:"Y",shortKey:!0},i.redo.bind(i)),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default),i(t,[{key:"change",value:function(e,t){if(0!==this.stack[e].length){var n=this.stack[e].pop();this.stack[t].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[e],a.default.sources.USER),this.ignoreChange=!1;var i=c(n[e]);this.quill.setSelection(i)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(e,t){if(0!==e.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(t),i=Date.now();if(this.lastRecorded+this.options.delay>i&&this.stack.undo.length>0){var o=this.stack.undo.pop();n=n.compose(o.undo),e=o.redo.compose(e)}else this.lastRecorded=i;this.stack.undo.push({redo:e,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(e){this.stack.undo.forEach(function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)}),this.stack.redo.forEach(function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),t}();function c(e){var t=e.reduce(function(e,t){return e+=t.delete||0},0),n=e.length()-t;return function(e){var t=e.ops[e.ops.length-1];return null!=t&&(null!=t.insert?"string"==typeof t.insert&&t.insert.endsWith("\n"):null!=t.attributes&&Object.keys(t.attributes).some(function(e){return null!=o.default.query(e,o.default.Scope.BLOCK)}))}(e)&&(n-=1),n}l.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},t.default=l,t.getLastChangeIndex=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BaseTooltip=void 0;var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=m(n(3)),a=m(n(2)),s=m(n(8)),r=m(n(23)),l=m(n(34)),c=m(n(59)),u=m(n(60)),d=m(n(28)),p=m(n(61));function m(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var v=[!1,"center","right","justify"],b=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],y=[!1,"serif","monospace"],_=["1","2","3",!1],k=["small",!1,"large","huge"],x=function(e){function t(e,n){f(this,t);var i=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return e.emitter.listenDOM("click",document.body,function t(n){if(!document.body.contains(e.root))return document.body.removeEventListener("click",t);null==i.tooltip||i.tooltip.root.contains(n.target)||document.activeElement===i.tooltip.textbox||i.quill.hasFocus()||i.tooltip.hide(),null!=i.pickers&&i.pickers.forEach(function(e){e.container.contains(n.target)||e.close()})}),i}return g(t,l.default),i(t,[{key:"addModule",value:function(e){var n=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(i):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addModule",this).call(this,e);return"toolbar"===e&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(e,t){e.forEach(function(e){(e.getAttribute("class")||"").split(/\s+/).forEach(function(n){if(n.startsWith("ql-")&&(n=n.slice("ql-".length),null!=t[n]))if("direction"===n)e.innerHTML=t[n][""]+t[n].rtl;else if("string"==typeof t[n])e.innerHTML=t[n];else{var i=e.value||"";null!=i&&t[n][i]&&(e.innerHTML=t[n][i])}})})}},{key:"buildPickers",value:function(e,t){var n=this;this.pickers=e.map(function(e){if(e.classList.contains("ql-align"))return null==e.querySelector("option")&&w(e,v),new u.default(e,t.align);if(e.classList.contains("ql-background")||e.classList.contains("ql-color")){var n=e.classList.contains("ql-background")?"background":"color";return null==e.querySelector("option")&&w(e,b,"background"===n?"#ffffff":"#000000"),new c.default(e,t[n])}return null==e.querySelector("option")&&(e.classList.contains("ql-font")?w(e,y):e.classList.contains("ql-header")?w(e,_):e.classList.contains("ql-size")&&w(e,k)),new d.default(e)});this.quill.on(s.default.events.EDITOR_CHANGE,function(){n.pickers.forEach(function(e){e.update()})})}}]),t}();x.DEFAULTS=(0,o.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var e=this,t=this.container.querySelector("input.ql-image[type=file]");null==t&&((t=document.createElement("input")).setAttribute("type","file"),t.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),t.classList.add("ql-image"),t.addEventListener("change",function(){if(null!=t.files&&null!=t.files[0]){var n=new FileReader;n.onload=function(n){var i=e.quill.getSelection(!0);e.quill.updateContents((new a.default).retain(i.index).delete(i.length).insert({image:n.target.result}),s.default.sources.USER),e.quill.setSelection(i.index+1,s.default.sources.SILENT),t.value=""},n.readAsDataURL(t.files[0])}}),this.container.appendChild(t)),t.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var C=function(e){function t(e,n){f(this,t);var i=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return i.textbox=i.root.querySelector('input[type="text"]'),i.listen(),i}return g(t,p.default),i(t,[{key:"listen",value:function(){var e=this;this.textbox.addEventListener("keydown",function(t){r.default.match(t,"enter")?(e.save(),t.preventDefault()):r.default.match(t,"escape")&&(e.cancel(),t.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=t?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+e)||""),this.root.setAttribute("data-mode",e)}},{key:"restoreFocus",value:function(){var e=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=e}},{key:"save",value:function(){var e=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var t=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,s.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,s.default.sources.USER)),this.quill.root.scrollTop=t;break;case"video":e=function(e){var t=e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);if(t)return(t[1]||"https")+"://www.youtube.com/embed/"+t[2]+"?showinfo=0";if(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))return(t[1]||"https")+"://player.vimeo.com/video/"+t[2]+"/";return e}(e);case"formula":if(!e)break;var n=this.quill.getSelection(!0);if(null!=n){var i=n.index+n.length;this.quill.insertEmbed(i,this.root.getAttribute("data-mode"),e,s.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(i+1," ",s.default.sources.USER),this.quill.setSelection(i+2,s.default.sources.USER)}}this.textbox.value="",this.hide()}}]),t}();function w(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach(function(t){var i=document.createElement("option");t===n?i.setAttribute("selected","selected"):i.setAttribute("value",t),e.appendChild(i)})}t.BaseTooltip=C,t.default=x},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){this.head=this.tail=null,this.length=0}return e.prototype.append=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.insertBefore(e[0],null),e.length>1&&this.append.apply(this,e.slice(1))},e.prototype.contains=function(e){for(var t,n=this.iterator();t=n();)if(t===e)return!0;return!1},e.prototype.insertBefore=function(e,t){e&&(e.next=t,null!=t?(e.prev=t.prev,null!=t.prev&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):null!=this.tail?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)},e.prototype.offset=function(e){for(var t=0,n=this.head;null!=n;){if(n===e)return t;t+=n.length(),n=n.next}return-1},e.prototype.remove=function(e){this.contains(e)&&(null!=e.prev&&(e.prev.next=e.next),null!=e.next&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)},e.prototype.iterator=function(e){return void 0===e&&(e=this.head),function(){var t=e;return null!=e&&(e=e.next),t}},e.prototype.find=function(e,t){void 0===t&&(t=!1);for(var n,i=this.iterator();n=i();){var o=n.length();if(e<o||t&&e===o&&(null==n.next||0!==n.next.length()))return[n,e];e-=o}return[null,0]},e.prototype.forEach=function(e){for(var t,n=this.iterator();t=n();)e(t)},e.prototype.forEachAt=function(e,t,n){if(!(t<=0))for(var i,o=this.find(e),a=o[0],s=e-o[1],r=this.iterator(a);(i=r())&&s<e+t;){var l=i.length();e>s?n(i,e-s,Math.min(t,s+l-e)):n(i,0,Math.min(l,e+t-s)),s+=l}},e.prototype.map=function(e){return this.reduce(function(t,n){return t.push(e(n)),t},[])},e.prototype.reduce=function(e,t){for(var n,i=this.iterator();n=i();)t=e(t,n);return t},e}();t.default=i},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(17),s=n(1),r={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},l=function(e){function t(t){var n=e.call(this,t)||this;return n.scroll=n,n.observer=new MutationObserver(function(e){n.update(e)}),n.observer.observe(n.domNode,r),n.attach(),n}return o(t,e),t.prototype.detach=function(){e.prototype.detach.call(this),this.observer.disconnect()},t.prototype.deleteAt=function(t,n){this.update(),0===t&&n===this.length()?this.children.forEach(function(e){e.remove()}):e.prototype.deleteAt.call(this,t,n)},t.prototype.formatAt=function(t,n,i,o){this.update(),e.prototype.formatAt.call(this,t,n,i,o)},t.prototype.insertAt=function(t,n,i){this.update(),e.prototype.insertAt.call(this,t,n,i)},t.prototype.optimize=function(t,n){var i=this;void 0===t&&(t=[]),void 0===n&&(n={}),e.prototype.optimize.call(this,n);for(var o=[].slice.call(this.observer.takeRecords());o.length>0;)t.push(o.pop());for(var r=function(e,t){void 0===t&&(t=!0),null!=e&&e!==i&&null!=e.domNode.parentNode&&(null==e.domNode[s.DATA_KEY].mutations&&(e.domNode[s.DATA_KEY].mutations=[]),t&&r(e.parent))},l=function(e){null!=e.domNode[s.DATA_KEY]&&null!=e.domNode[s.DATA_KEY].mutations&&(e instanceof a.default&&e.children.forEach(l),e.optimize(n))},c=t,u=0;c.length>0;u+=1){if(u>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(c.forEach(function(e){var t=s.find(e.target,!0);null!=t&&(t.domNode===e.target&&("childList"===e.type?(r(s.find(e.previousSibling,!1)),[].forEach.call(e.addedNodes,function(e){var t=s.find(e,!1);r(t,!1),t instanceof a.default&&t.children.forEach(function(e){r(e,!1)})})):"attributes"===e.type&&r(t.prev)),r(t))}),this.children.forEach(l),o=(c=[].slice.call(this.observer.takeRecords())).slice();o.length>0;)t.push(o.pop())}},t.prototype.update=function(t,n){var i=this;void 0===n&&(n={}),(t=t||this.observer.takeRecords()).map(function(e){var t=s.find(e.target,!0);return null==t?null:null==t.domNode[s.DATA_KEY].mutations?(t.domNode[s.DATA_KEY].mutations=[e],t):(t.domNode[s.DATA_KEY].mutations.push(e),null)}).forEach(function(e){null!=e&&e!==i&&null!=e.domNode[s.DATA_KEY]&&e.update(e.domNode[s.DATA_KEY].mutations||[],n)}),null!=this.domNode[s.DATA_KEY].mutations&&e.prototype.update.call(this,this.domNode[s.DATA_KEY].mutations,n),this.optimize(t,n)},t.blotName="scroll",t.defaultChild="block",t.scope=s.Scope.BLOCK_BLOT,t.tagName="DIV",t}(a.default);t.default=l},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(18),s=n(1);var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.formats=function(n){if(n.tagName!==t.tagName)return e.formats.call(this,n)},t.prototype.format=function(n,i){var o=this;n!==this.statics.blotName||i?e.prototype.format.call(this,n,i):(this.children.forEach(function(e){e instanceof a.default||(e=e.wrap(t.blotName,!0)),o.attributes.copy(e)}),this.unwrap())},t.prototype.formatAt=function(t,n,i,o){null!=this.formats()[i]||s.query(i,s.Scope.ATTRIBUTE)?this.isolate(t,n).format(i,o):e.prototype.formatAt.call(this,t,n,i,o)},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n);var i=this.formats();if(0===Object.keys(i).length)return this.unwrap();var o=this.next;o instanceof t&&o.prev===this&&function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}(i,o.formats())&&(o.moveChildren(this),o.remove())},t.blotName="inline",t.scope=s.Scope.INLINE_BLOT,t.tagName="SPAN",t}(a.default);t.default=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(18),s=n(1),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.formats=function(n){var i=s.query(t.blotName).tagName;if(n.tagName!==i)return e.formats.call(this,n)},t.prototype.format=function(n,i){null!=s.query(n,s.Scope.BLOCK)&&(n!==this.statics.blotName||i?e.prototype.format.call(this,n,i):this.replaceWith(t.blotName))},t.prototype.formatAt=function(t,n,i,o){null!=s.query(i,s.Scope.BLOCK)?this.format(i,o):e.prototype.formatAt.call(this,t,n,i,o)},t.prototype.insertAt=function(t,n,i){if(null==i||null!=s.query(n,s.Scope.INLINE))e.prototype.insertAt.call(this,t,n,i);else{var o=this.split(t),a=s.create(n,i);o.parent.insertBefore(a,o)}},t.prototype.update=function(t,n){navigator.userAgent.match(/Trident/)?this.build():e.prototype.update.call(this,t,n)},t.blotName="block",t.scope=s.Scope.BLOCK_BLOT,t.tagName="P",t}(a.default);t.default=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.formats=function(e){},t.prototype.format=function(t,n){e.prototype.formatAt.call(this,0,this.length(),t,n)},t.prototype.formatAt=function(t,n,i,o){0===t&&n===this.length()?this.format(i,o):e.prototype.formatAt.call(this,t,n,i,o)},t.prototype.formats=function(){return this.statics.formats(this.domNode)},t}(n(19).default);t.default=a},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(19),s=n(1),r=function(e){function t(t){var n=e.call(this,t)||this;return n.text=n.statics.value(n.domNode),n}return o(t,e),t.create=function(e){return document.createTextNode(e)},t.value=function(e){var t=e.data;return t.normalize&&(t=t.normalize()),t},t.prototype.deleteAt=function(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)},t.prototype.index=function(e,t){return this.domNode===e?t:-1},t.prototype.insertAt=function(t,n,i){null==i?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):e.prototype.insertAt.call(this,t,n,i)},t.prototype.length=function(){return this.text.length},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof t&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},t.prototype.position=function(e,t){return void 0===t&&(t=!1),[this.domNode,e]},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=s.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},t.prototype.update=function(e,t){var n=this;e.some(function(e){return"characterData"===e.type&&e.target===n.domNode})&&(this.text=this.statics.value(this.domNode))},t.prototype.value=function(){return this.text},t.blotName="text",t.scope=s.Scope.INLINE_BLOT,t}(a.default);t.default=r},function(e,t,n){"use strict";var i=document.createElement("div");if(i.classList.toggle("test-class",!1),i.classList.contains("test-class")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return arguments.length>1&&!this.contains(e)==!t?t:o.call(this,e)}}String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var n=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>n.length)&&(t=n.length),t-=e.length;var i=n.indexOf(e,t);return-1!==i&&i===t}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var t,n=Object(this),i=n.length>>>0,o=arguments[1],a=0;a<i;a++)if(t=n[a],e.call(o,t,a,n))return t}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(e,t){var n=-1,i=1,o=0;function a(e,t,c){if(e==t)return e?[[o,e]]:[];(c<0||e.length<c)&&(c=null);var d=r(e,t),p=e.substring(0,d);d=l(e=e.substring(d),t=t.substring(d));var m=e.substring(e.length-d),f=function(e,t){var c;if(!e)return[[i,t]];if(!t)return[[n,e]];var u=e.length>t.length?e:t,d=e.length>t.length?t:e,p=u.indexOf(d);if(-1!=p)return c=[[i,u.substring(0,p)],[o,d],[i,u.substring(p+d.length)]],e.length>t.length&&(c[0][0]=c[2][0]=n),c;if(1==d.length)return[[n,e],[i,t]];var m=function(e,t){var n=e.length>t.length?e:t,i=e.length>t.length?t:e;if(n.length<4||2*i.length<n.length)return null;function o(e,t,n){for(var i,o,a,s,c=e.substring(n,n+Math.floor(e.length/4)),u=-1,d="";-1!=(u=t.indexOf(c,u+1));){var p=r(e.substring(n),t.substring(u)),m=l(e.substring(0,n),t.substring(0,u));d.length<m+p&&(d=t.substring(u-m,u)+t.substring(u,u+p),i=e.substring(0,n-m),o=e.substring(n+p),a=t.substring(0,u-m),s=t.substring(u+p))}return 2*d.length>=e.length?[i,o,a,s,d]:null}var a,s,c,u,d,p=o(n,i,Math.ceil(n.length/4)),m=o(n,i,Math.ceil(n.length/2));if(!p&&!m)return null;a=m?p&&p[4].length>m[4].length?p:m:p;e.length>t.length?(s=a[0],c=a[1],u=a[2],d=a[3]):(u=a[0],d=a[1],s=a[2],c=a[3]);var f=a[4];return[s,c,u,d,f]}(e,t);if(m){var f=m[0],h=m[1],g=m[2],v=m[3],b=m[4],y=a(f,g),_=a(h,v);return y.concat([[o,b]],_)}return function(e,t){for(var o=e.length,a=t.length,r=Math.ceil((o+a)/2),l=r,c=2*r,u=new Array(c),d=new Array(c),p=0;p<c;p++)u[p]=-1,d[p]=-1;u[l+1]=0,d[l+1]=0;for(var m=o-a,f=m%2!=0,h=0,g=0,v=0,b=0,y=0;y<r;y++){for(var _=-y+h;_<=y-g;_+=2){for(var k=l+_,x=(T=_==-y||_!=y&&u[k-1]<u[k+1]?u[k+1]:u[k-1]+1)-_;T<o&&x<a&&e.charAt(T)==t.charAt(x);)T++,x++;if(u[k]=T,T>o)g+=2;else if(x>a)h+=2;else if(f){var C=l+m-_;if(C>=0&&C<c&&-1!=d[C]){var w=o-d[C];if(T>=w)return s(e,t,T,x)}}}for(var S=-y+v;S<=y-b;S+=2){for(var C=l+S,P=(w=S==-y||S!=y&&d[C-1]<d[C+1]?d[C+1]:d[C-1]+1)-S;w<o&&P<a&&e.charAt(o-w-1)==t.charAt(a-P-1);)w++,P++;if(d[C]=w,w>o)b+=2;else if(P>a)v+=2;else if(!f){var k=l+m-S;if(k>=0&&k<c&&-1!=u[k]){var T=u[k],x=l+T-k;if(T>=(w=o-w))return s(e,t,T,x)}}}}return[[n,e],[i,t]]}(e,t)}(e=e.substring(0,e.length-d),t=t.substring(0,t.length-d));return p&&f.unshift([o,p]),m&&f.push([o,m]),function e(t){t.push([o,""]);var a=0;var s=0;var c=0;var u="";var d="";var p;for(;a<t.length;)switch(t[a][0]){case i:c++,d+=t[a][1],a++;break;case n:s++,u+=t[a][1],a++;break;case o:s+c>1?(0!==s&&0!==c&&(0!==(p=r(d,u))&&(a-s-c>0&&t[a-s-c-1][0]==o?t[a-s-c-1][1]+=d.substring(0,p):(t.splice(0,0,[o,d.substring(0,p)]),a++),d=d.substring(p),u=u.substring(p)),0!==(p=l(d,u))&&(t[a][1]=d.substring(d.length-p)+t[a][1],d=d.substring(0,d.length-p),u=u.substring(0,u.length-p))),0===s?t.splice(a-c,s+c,[i,d]):0===c?t.splice(a-s,s+c,[n,u]):t.splice(a-s-c,s+c,[n,u],[i,d]),a=a-s-c+(s?1:0)+(c?1:0)+1):0!==a&&t[a-1][0]==o?(t[a-1][1]+=t[a][1],t.splice(a,1)):a++,c=0,s=0,u="",d=""}""===t[t.length-1][1]&&t.pop();var m=!1;a=1;for(;a<t.length-1;)t[a-1][0]==o&&t[a+1][0]==o&&(t[a][1].substring(t[a][1].length-t[a-1][1].length)==t[a-1][1]?(t[a][1]=t[a-1][1]+t[a][1].substring(0,t[a][1].length-t[a-1][1].length),t[a+1][1]=t[a-1][1]+t[a+1][1],t.splice(a-1,1),m=!0):t[a][1].substring(0,t[a+1][1].length)==t[a+1][1]&&(t[a-1][1]+=t[a+1][1],t[a][1]=t[a][1].substring(t[a+1][1].length)+t[a+1][1],t.splice(a+1,1),m=!0)),a++;m&&e(t)}(f),null!=c&&(f=function(e,t){var i=function(e,t){if(0===t)return[o,e];for(var i=0,a=0;a<e.length;a++){var s=e[a];if(s[0]===n||s[0]===o){var r=i+s[1].length;if(t===r)return[a+1,e];if(t<r){e=e.slice();var l=t-i,c=[s[0],s[1].slice(0,l)],u=[s[0],s[1].slice(l)];return e.splice(a,1,c,u),[a+1,e]}i=r}}throw new Error("cursor_pos is out of bounds!")}(e,t),a=i[1],s=i[0],r=a[s],l=a[s+1];if(null==r)return e;if(r[0]!==o)return e;if(null!=l&&r[1]+l[1]===l[1]+r[1])return a.splice(s,2,l,r),u(a,s,2);if(null!=l&&0===l[1].indexOf(r[1])){a.splice(s,2,[l[0],r[1]],[0,r[1]]);var c=l[1].slice(r[1].length);return c.length>0&&a.splice(s+2,0,[l[0],c]),u(a,s,3)}return e}(f,c)),f=function(e){for(var t=!1,a=function(e){return e.charCodeAt(0)>=56320&&e.charCodeAt(0)<=57343},s=2;s<e.length;s+=1)e[s-2][0]===o&&((r=e[s-2][1]).charCodeAt(r.length-1)>=55296&&r.charCodeAt(r.length-1)<=56319)&&e[s-1][0]===n&&a(e[s-1][1])&&e[s][0]===i&&a(e[s][1])&&(t=!0,e[s-1][1]=e[s-2][1].slice(-1)+e[s-1][1],e[s][1]=e[s-2][1].slice(-1)+e[s][1],e[s-2][1]=e[s-2][1].slice(0,-1));var r;if(!t)return e;for(var l=[],s=0;s<e.length;s+=1)e[s][1].length>0&&l.push(e[s]);return l}(f)}function s(e,t,n,i){var o=e.substring(0,n),s=t.substring(0,i),r=e.substring(n),l=t.substring(i),c=a(o,s),u=a(r,l);return c.concat(u)}function r(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,i=Math.min(e.length,t.length),o=i,a=0;n<o;)e.substring(a,o)==t.substring(a,o)?a=n=o:i=o,o=Math.floor((i-n)/2+n);return o}function l(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,i=Math.min(e.length,t.length),o=i,a=0;n<o;)e.substring(e.length-o,e.length-a)==t.substring(t.length-o,t.length-a)?a=n=o:i=o,o=Math.floor((i-n)/2+n);return o}var c=a;function u(e,t,n){for(var i=t+n-1;i>=0&&i>=t-1;i--)if(i+1<e.length){var o=e[i],a=e[i+1];o[0]===a[1]&&e.splice(i,2,[o[0],o[1]+a[1]])}return e}c.INSERT=i,c.DELETE=n,c.EQUAL=o,e.exports=c},function(e,t){function n(e){var t=[];for(var n in e)t.push(n);return t}(e.exports="function"==typeof Object.keys?Object.keys:n).shim=n},function(e,t){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function i(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function o(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}(t=e.exports=n?i:o).supported=i,t.unsupported=o},function(e,t){"use strict";var n=Object.prototype.hasOwnProperty,i="~";function o(){}function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1)),s.prototype.eventNames=function(){var e,t,o=[];if(0===this._eventsCount)return o;for(t in e=this._events)n.call(e,t)&&o.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e,t){var n=i?i+e:e,o=this._events[n];if(t)return!!o;if(!o)return[];if(o.fn)return[o.fn];for(var a=0,s=o.length,r=new Array(s);a<s;a++)r[a]=o[a].fn;return r},s.prototype.emit=function(e,t,n,o,a,s){var r=i?i+e:e;if(!this._events[r])return!1;var l,c,u=this._events[r],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,o),!0;case 5:return u.fn.call(u.context,t,n,o,a),!0;case 6:return u.fn.call(u.context,t,n,o,a,s),!0}for(c=1,l=new Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var p,m=u.length;for(c=0;c<m;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,n);break;case 4:u[c].fn.call(u[c].context,t,n,o);break;default:if(!l)for(p=1,l=new Array(d-1);p<d;p++)l[p-1]=arguments[p];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(e,t,n){var o=new a(t,n||this),s=i?i+e:e;return this._events[s]?this._events[s].fn?this._events[s]=[this._events[s],o]:this._events[s].push(o):(this._events[s]=o,this._eventsCount++),this},s.prototype.once=function(e,t,n){var o=new a(t,n||this,!0),s=i?i+e:e;return this._events[s]?this._events[s].fn?this._events[s]=[this._events[s],o]:this._events[s].push(o):(this._events[s]=o,this._eventsCount++),this},s.prototype.removeListener=function(e,t,n,a){var s=i?i+e:e;if(!this._events[s])return this;if(!t)return 0==--this._eventsCount?this._events=new o:delete this._events[s],this;var r=this._events[s];if(r.fn)r.fn!==t||a&&!r.once||n&&r.context!==n||(0==--this._eventsCount?this._events=new o:delete this._events[s]);else{for(var l=0,c=[],u=r.length;l<u;l++)(r[l].fn!==t||a&&!r[l].once||n&&r[l].context!==n)&&c.push(r[l]);c.length?this._events[s]=1===c.length?c[0]:c:0==--this._eventsCount?this._events=new o:delete this._events[s]}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=i?i+e:e,this._events[t]&&(0==--this._eventsCount?this._events=new o:delete this._events[t])):(this._events=new o,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prototype.setMaxListeners=function(){return this},s.prefixed=i,s.EventEmitter=s,void 0!==e&&(e.exports=s)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.matchText=t.matchSpacing=t.matchNewline=t.matchBlot=t.matchAttributor=t.default=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],i=!0,o=!1,a=void 0;try{for(var s,r=e[Symbol.iterator]();!(i=(s=r.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){o=!0,a=e}finally{try{!i&&r.return&&r.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=y(n(3)),r=y(n(2)),l=y(n(0)),c=y(n(5)),u=y(n(10)),d=y(n(9)),p=n(36),m=n(37),f=y(n(13)),h=n(26),g=n(38),v=n(39),b=n(40);function y(e){return e&&e.__esModule?e:{default:e}}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var k=(0,u.default)("quill:clipboard"),x="__ql-matcher",C=[[Node.TEXT_NODE,L],[Node.TEXT_NODE,N],["br",function(e,t){$(t,"\n")||t.insert("\n");return t}],[Node.ELEMENT_NODE,N],[Node.ELEMENT_NODE,I],[Node.ELEMENT_NODE,F],[Node.ELEMENT_NODE,D],[Node.ELEMENT_NODE,function(e,t){var n={},i=e.style||{};i.fontStyle&&"italic"===E(e).fontStyle&&(n.italic=!0);i.fontWeight&&(E(e).fontWeight.startsWith("bold")||parseInt(E(e).fontWeight)>=700)&&(n.bold=!0);Object.keys(n).length>0&&(t=T(t,n));parseFloat(i.textIndent||0)>0&&(t=(new r.default).insert("\t").concat(t));return t}],["li",function(e,t){var n=l.default.query(e);if(null==n||"list-item"!==n.blotName||!$(t,"\n"))return t;var i=-1,o=e.parentNode;for(;!o.classList.contains("ql-clipboard");)"list"===(l.default.query(o)||{}).blotName&&(i+=1),o=o.parentNode;return i<=0?t:t.compose((new r.default).retain(t.length()-1).retain(1,{indent:i}))}],["b",A.bind(A,"bold")],["i",A.bind(A,"italic")],["style",function(){return new r.default}]],w=[p.AlignAttribute,g.DirectionAttribute].reduce(function(e,t){return e[t.keyName]=t,e},{}),S=[p.AlignStyle,m.BackgroundStyle,h.ColorStyle,g.DirectionStyle,v.FontStyle,b.SizeStyle].reduce(function(e,t){return e[t.keyName]=t,e},{}),P=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return i.quill.root.addEventListener("paste",i.onPaste.bind(i)),i.container=i.quill.addContainer("ql-clipboard"),i.container.setAttribute("contenteditable",!0),i.container.setAttribute("tabindex",-1),i.matchers=[],C.concat(i.options.matchers).forEach(function(e){var t=o(e,2),a=t[0],s=t[1];(n.matchVisual||s!==F)&&i.addMatcher(a,s)}),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,d.default),a(t,[{key:"addMatcher",value:function(e,t){this.matchers.push([e,t])}},{key:"convert",value:function(e){if("string"==typeof e)return this.container.innerHTML=e.replace(/\>\r?\n +\</g,"><"),this.convert();var t=this.quill.getFormat(this.quill.selection.savedRange.index);if(t[f.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new r.default).insert(n,_({},f.default.blotName,t[f.default.blotName]))}var i=this.prepareMatching(),a=o(i,2),s=a[0],l=a[1],c=function e(t,n,i){return t.nodeType===t.TEXT_NODE?i.reduce(function(e,n){return n(t,e)},new r.default):t.nodeType===t.ELEMENT_NODE?[].reduce.call(t.childNodes||[],function(o,a){var s=e(a,n,i);return a.nodeType===t.ELEMENT_NODE&&(s=n.reduce(function(e,t){return t(a,e)},s),s=(a[x]||[]).reduce(function(e,t){return t(a,e)},s)),o.concat(s)},new r.default):new r.default}(this.container,s,l);return $(c,"\n")&&null==c.ops[c.ops.length-1].attributes&&(c=c.compose((new r.default).retain(c.length()-1).delete(1))),k.log("convert",this.container.innerHTML,c),this.container.innerHTML="",c}},{key:"dangerouslyPasteHTML",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.default.sources.API;if("string"==typeof e)this.quill.setContents(this.convert(e),t),this.quill.setSelection(0,c.default.sources.SILENT);else{var i=this.convert(t);this.quill.updateContents((new r.default).retain(e).concat(i),n),this.quill.setSelection(e+i.length(),c.default.sources.SILENT)}}},{key:"onPaste",value:function(e){var t=this;if(!e.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),i=(new r.default).retain(n.index),o=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(c.default.sources.SILENT),setTimeout(function(){i=i.concat(t.convert()).delete(n.length),t.quill.updateContents(i,c.default.sources.USER),t.quill.setSelection(i.length()-n.length,c.default.sources.SILENT),t.quill.scrollingContainer.scrollTop=o,t.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var e=this,t=[],n=[];return this.matchers.forEach(function(i){var a=o(i,2),s=a[0],r=a[1];switch(s){case Node.TEXT_NODE:n.push(r);break;case Node.ELEMENT_NODE:t.push(r);break;default:[].forEach.call(e.container.querySelectorAll(s),function(e){e[x]=e[x]||[],e[x].push(r)})}}),[t,n]}}]),t}();function T(e,t,n){return"object"===(void 0===t?"undefined":i(t))?Object.keys(t).reduce(function(e,n){return T(e,n,t[n])},e):e.reduce(function(e,i){return i.attributes&&i.attributes[t]?e.push(i):e.insert(i.insert,(0,s.default)({},_({},t,n),i.attributes))},new r.default)}function E(e){if(e.nodeType!==Node.ELEMENT_NODE)return{};return e["__ql-computed-style"]||(e["__ql-computed-style"]=window.getComputedStyle(e))}function $(e,t){for(var n="",i=e.ops.length-1;i>=0&&n.length<t.length;--i){var o=e.ops[i];if("string"!=typeof o.insert)break;n=o.insert+n}return n.slice(-1*t.length)===t}function O(e){if(0===e.childNodes.length)return!1;var t=E(e);return["block","list-item"].indexOf(t.display)>-1}function A(e,t,n){return T(n,e,!0)}function D(e,t){var n=l.default.Attributor.Attribute.keys(e),i=l.default.Attributor.Class.keys(e),o=l.default.Attributor.Style.keys(e),a={};return n.concat(i).concat(o).forEach(function(t){var n=l.default.query(t,l.default.Scope.ATTRIBUTE);null!=n&&(a[n.attrName]=n.value(e),a[n.attrName])||(null==(n=w[t])||n.attrName!==t&&n.keyName!==t||(a[n.attrName]=n.value(e)||void 0),null==(n=S[t])||n.attrName!==t&&n.keyName!==t||(n=S[t],a[n.attrName]=n.value(e)||void 0))}),Object.keys(a).length>0&&(t=T(t,a)),t}function I(e,t){var n=l.default.query(e);if(null==n)return t;if(n.prototype instanceof l.default.Embed){var i={},o=n.value(e);null!=o&&(i[n.blotName]=o,t=(new r.default).insert(i,n.formats(e)))}else"function"==typeof n.formats&&(t=T(t,n.blotName,n.formats(e)));return t}function N(e,t){return $(t,"\n")||(O(e)||t.length()>0&&e.nextSibling&&O(e.nextSibling))&&t.insert("\n"),t}function F(e,t){if(O(e)&&null!=e.nextElementSibling&&!$(t,"\n\n")){var n=e.offsetHeight+parseFloat(E(e).marginTop)+parseFloat(E(e).marginBottom);e.nextElementSibling.offsetTop>e.offsetTop+1.5*n&&t.insert("\n")}return t}function L(e,t){var n=e.data;if("O:P"===e.parentNode.tagName)return t.insert(n.trim());if(0===n.trim().length&&e.parentNode.classList.contains("ql-clipboard"))return t;if(!E(e.parentNode).whiteSpace.startsWith("pre")){var i=function(e,t){return(t=t.replace(/[^\u00a0]/g,"")).length<1&&e?" ":t};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,i.bind(i,!0)),(null==e.previousSibling&&O(e.parentNode)||null!=e.previousSibling&&O(e.previousSibling))&&(n=n.replace(/^\s+/,i.bind(i,!1))),(null==e.nextSibling&&O(e.parentNode)||null!=e.nextSibling&&O(e.nextSibling))&&(n=n.replace(/\s+$/,i.bind(i,!1)))}return t.insert(n)}P.DEFAULTS={matchers:[],matchVisual:!0},t.default=P,t.matchAttributor=D,t.matchBlot=I,t.matchNewline=N,t.matchSpacing=F,t.matchText=L},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(i):void 0},s=n(6),r=(i=s)&&i.__esModule?i:{default:i};var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.default),o(t,[{key:"optimize",value:function(e){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return a(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),t}();l.blotName="bold",l.tagName=["STRONG","B"],t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addControls=t.default=void 0;var i=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],i=!0,o=!1,a=void 0;try{for(var s,r=e[Symbol.iterator]();!(i=(s=r.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){o=!0,a=e}finally{try{!i&&r.return&&r.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=u(n(2)),s=u(n(0)),r=u(n(5)),l=u(n(10)),c=u(n(9));function u(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p=(0,l.default)("quill:toolbar"),m=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o,a=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if(Array.isArray(a.options.container)){var s=document.createElement("div");h(s,a.options.container),e.container.parentNode.insertBefore(s,e.container),a.container=s}else"string"==typeof a.options.container?a.container=document.querySelector(a.options.container):a.container=a.options.container;return a.container instanceof HTMLElement?(a.container.classList.add("ql-toolbar"),a.controls=[],a.handlers={},Object.keys(a.options.handlers).forEach(function(e){a.addHandler(e,a.options.handlers[e])}),[].forEach.call(a.container.querySelectorAll("button, select"),function(e){a.attach(e)}),a.quill.on(r.default.events.EDITOR_CHANGE,function(e,t){e===r.default.events.SELECTION_CHANGE&&a.update(t)}),a.quill.on(r.default.events.SCROLL_OPTIMIZE,function(){var e=a.quill.selection.getRange(),t=i(e,1)[0];a.update(t)}),a):(o=p.error("Container required for toolbar",a.options),d(a,o))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,c.default),o(t,[{key:"addHandler",value:function(e,t){this.handlers[e]=t}},{key:"attach",value:function(e){var t=this,n=[].find.call(e.classList,function(e){return 0===e.indexOf("ql-")});if(n){if(n=n.slice("ql-".length),"BUTTON"===e.tagName&&e.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n])return void p.warn("ignoring attaching to disabled format",n,e);if(null==s.default.query(n))return void p.warn("ignoring attaching to nonexistent format",n,e)}var o="SELECT"===e.tagName?"change":"click";e.addEventListener(o,function(o){var l=void 0;if("SELECT"===e.tagName){if(e.selectedIndex<0)return;var c=e.options[e.selectedIndex];l=!c.hasAttribute("selected")&&(c.value||!1)}else l=!e.classList.contains("ql-active")&&(e.value||!e.hasAttribute("value")),o.preventDefault();t.quill.focus();var u=t.quill.selection.getRange(),d=i(u,1)[0];if(null!=t.handlers[n])t.handlers[n].call(t,l);else if(s.default.query(n).prototype instanceof s.default.Embed){if(!(l=prompt("Enter "+n)))return;t.quill.updateContents((new a.default).retain(d.index).delete(d.length).insert(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},n,l)),r.default.sources.USER)}else t.quill.format(n,l,r.default.sources.USER);t.update(d)}),this.controls.push([n,e])}}},{key:"update",value:function(e){var t=null==e?{}:this.quill.getFormat(e);this.controls.forEach(function(n){var o=i(n,2),a=o[0],s=o[1];if("SELECT"===s.tagName){var r=void 0;if(null==e)r=null;else if(null==t[a])r=s.querySelector("option[selected]");else if(!Array.isArray(t[a])){var l=t[a];"string"==typeof l&&(l=l.replace(/\"/g,'\\"')),r=s.querySelector('option[value="'+l+'"]')}null==r?(s.value="",s.selectedIndex=-1):r.selected=!0}else if(null==e)s.classList.remove("ql-active");else if(s.hasAttribute("value")){var c=t[a]===s.getAttribute("value")||null!=t[a]&&t[a].toString()===s.getAttribute("value")||null==t[a]&&!s.getAttribute("value");s.classList.toggle("ql-active",c)}else s.classList.toggle("ql-active",null!=t[a])})}}]),t}();function f(e,t,n){var i=document.createElement("button");i.setAttribute("type","button"),i.classList.add("ql-"+t),null!=n&&(i.value=n),e.appendChild(i)}function h(e,t){Array.isArray(t[0])||(t=[t]),t.forEach(function(t){var n=document.createElement("span");n.classList.add("ql-formats"),t.forEach(function(e){if("string"==typeof e)f(n,e);else{var t=Object.keys(e)[0],i=e[t];Array.isArray(i)?function(e,t,n){var i=document.createElement("select");i.classList.add("ql-"+t),n.forEach(function(e){var t=document.createElement("option");!1!==e?t.setAttribute("value",e):t.setAttribute("selected","selected"),i.appendChild(t)}),e.appendChild(i)}(n,t,i):f(n,t,i)}}),e.appendChild(n)})}m.DEFAULTS={},m.DEFAULTS={container:null,handlers:{clean:function(){var e=this,t=this.quill.getSelection();if(null!=t)if(0==t.length){var n=this.quill.getFormat();Object.keys(n).forEach(function(t){null!=s.default.query(t,s.default.Scope.INLINE)&&e.quill.format(t,!1)})}else this.quill.removeFormat(t,r.default.sources.USER)},direction:function(e){var t=this.quill.getFormat().align;"rtl"===e&&null==t?this.quill.format("align","right",r.default.sources.USER):e||"right"!==t||this.quill.format("align",!1,r.default.sources.USER),this.quill.format("direction",e,r.default.sources.USER)},indent:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t),i=parseInt(n.indent||0);if("+1"===e||"-1"===e){var o="+1"===e?1:-1;"rtl"===n.direction&&(o*=-1),this.quill.format("indent",i+o,r.default.sources.USER)}},link:function(e){!0===e&&(e=prompt("Enter link URL:")),this.quill.format("link",e,r.default.sources.USER)},list:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t);"check"===e?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,r.default.sources.USER):this.quill.format("list","unchecked",r.default.sources.USER):this.quill.format("list",e,r.default.sources.USER)}}},t.default=m,t.addControls=h},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(i):void 0},s=n(28),r=(i=s)&&i.__esModule?i:{default:i};var l=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return i.label.innerHTML=n,i.container.classList.add("ql-color-picker"),[].slice.call(i.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(e){e.classList.add("ql-primary")}),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.default),o(t,[{key:"buildItem",value:function(e){var n=a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"buildItem",this).call(this,e);return n.style.backgroundColor=e.getAttribute("value")||"",n}},{key:"selectItem",value:function(e,n){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n);var i=this.label.querySelector(".ql-color-label"),o=e&&e.getAttribute("data-value")||"";i&&("line"===i.tagName?i.style.stroke=o:i.style.fill=o)}}]),t}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=n(28),s=(i=a)&&i.__esModule?i:{default:i};var r=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return i.container.classList.add("ql-icon-picker"),[].forEach.call(i.container.querySelectorAll(".ql-picker-item"),function(e){e.innerHTML=n[e.getAttribute("data-value")||""]}),i.defaultItem=i.container.querySelector(".ql-selected"),i.selectItem(i.defaultItem),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default),o(t,[{key:"selectItem",value:function(e,n){(function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(i):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n),e=e||this.defaultItem,this.label.innerHTML=e.innerHTML}}]),t}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var o=function(){function e(t,n){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.boundsContainer=n||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){i.root.style.marginTop=-1*i.quill.root.scrollTop+"px"}),this.hide()}return i(e,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(e){var t=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=t+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var i=this.boundsContainer.getBoundingClientRect(),o=this.root.getBoundingClientRect(),a=0;if(o.right>i.right&&(a=i.right-o.right,this.root.style.left=t+a+"px"),o.left<i.left&&(a=i.left-o.left,this.root.style.left=t+a+"px"),o.bottom>i.bottom){var s=o.bottom-o.top,r=e.bottom-e.top+s;this.root.style.top=n-r+"px",this.root.classList.add("ql-flip")}return a}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],i=!0,o=!1,a=void 0;try{for(var s,r=e[Symbol.iterator]();!(i=(s=r.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){o=!0,a=e}finally{try{!i&&r.return&&r.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(i):void 0},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=m(n(3)),r=m(n(8)),l=n(43),c=m(l),u=m(n(27)),d=n(15),p=m(n(41));function m(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var v=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],b=function(e){function t(e,n){f(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=v);var i=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return i.quill.container.classList.add("ql-snow"),i}return g(t,c.default),a(t,[{key:"extendToolbar",value:function(e){e.container.classList.add("ql-snow"),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),p.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),p.default),this.tooltip=new y(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(t,n){e.handlers.link.call(e,!n.format.link)})}}]),t}();b.DEFAULTS=(0,s.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){if(e){var t=this.quill.getSelection();if(null==t||0==t.length)return;var n=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n="mailto:"+n),this.quill.theme.tooltip.edit("link",n)}else this.quill.format("link",!1)}}}}});var y=function(e){function t(e,n){f(this,t);var i=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return i.preview=i.root.querySelector("a.ql-preview"),i}return g(t,l.BaseTooltip),a(t,[{key:"listen",value:function(){var e=this;o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(t){e.root.classList.contains("ql-editing")?e.save():e.edit("link",e.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(t){if(null!=e.linkRange){var n=e.linkRange;e.restoreFocus(),e.quill.formatText(n,"link",!1,r.default.sources.USER),delete e.linkRange}t.preventDefault(),e.hide()}),this.quill.on(r.default.events.SELECTION_CHANGE,function(t,n,o){if(null!=t){if(0===t.length&&o===r.default.sources.USER){var a=e.quill.scroll.descendant(u.default,t.index),s=i(a,2),l=s[0],c=s[1];if(null!=l){e.linkRange=new d.Range(t.index-c,l.length());var p=u.default.formats(l.domNode);return e.preview.textContent=p,e.preview.setAttribute("href",p),e.show(),void e.position(e.quill.getBounds(e.linkRange))}}else delete e.linkRange;e.hide()}})}},{key:"show",value:function(){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),t}();y.TEMPLATE=['<a class="ql-preview" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=F(n(29)),o=n(36),a=n(38),s=n(64),r=F(n(65)),l=F(n(66)),c=n(67),u=F(c),d=n(37),p=n(26),m=n(39),f=n(40),h=F(n(56)),g=F(n(68)),v=F(n(27)),b=F(n(69)),y=F(n(70)),_=F(n(71)),k=F(n(72)),x=F(n(73)),C=n(13),w=F(C),S=F(n(74)),P=F(n(75)),T=F(n(57)),E=F(n(41)),$=F(n(28)),O=F(n(59)),A=F(n(60)),D=F(n(61)),I=F(n(108)),N=F(n(62));function F(e){return e&&e.__esModule?e:{default:e}}i.default.register({"attributors/attribute/direction":a.DirectionAttribute,"attributors/class/align":o.AlignClass,"attributors/class/background":d.BackgroundClass,"attributors/class/color":p.ColorClass,"attributors/class/direction":a.DirectionClass,"attributors/class/font":m.FontClass,"attributors/class/size":f.SizeClass,"attributors/style/align":o.AlignStyle,"attributors/style/background":d.BackgroundStyle,"attributors/style/color":p.ColorStyle,"attributors/style/direction":a.DirectionStyle,"attributors/style/font":m.FontStyle,"attributors/style/size":f.SizeStyle},!0),i.default.register({"formats/align":o.AlignClass,"formats/direction":a.DirectionClass,"formats/indent":s.IndentClass,"formats/background":d.BackgroundStyle,"formats/color":p.ColorStyle,"formats/font":m.FontClass,"formats/size":f.SizeClass,"formats/blockquote":r.default,"formats/code-block":w.default,"formats/header":l.default,"formats/list":u.default,"formats/bold":h.default,"formats/code":C.Code,"formats/italic":g.default,"formats/link":v.default,"formats/script":b.default,"formats/strike":y.default,"formats/underline":_.default,"formats/image":k.default,"formats/video":x.default,"formats/list/item":c.ListItem,"modules/formula":S.default,"modules/syntax":P.default,"modules/toolbar":T.default,"themes/bubble":I.default,"themes/snow":N.default,"ui/icons":E.default,"ui/picker":$.default,"ui/icon-picker":A.default,"ui/color-picker":O.default,"ui/tooltip":D.default},!0),t.default=i.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IndentClass=void 0;var i,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(i):void 0},s=n(0),r=(i=s)&&i.__esModule?i:{default:i};var l=new(function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.default.Attributor.Class),o(t,[{key:"add",value:function(e,n){if("+1"===n||"-1"===n){var i=this.value(e)||0;n="+1"===n?i+1:i-1}return 0===n?(this.remove(e),!0):a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"add",this).call(this,e,n)}},{key:"canAdd",value:function(e,n){return a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,n)||a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,parseInt(n))}},{key:"value",value:function(e){return parseInt(a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e))||void 0}}]),t}())("indent","ql-indent",{scope:r.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});t.IndentClass=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(4),a=(i=o)&&i.__esModule?i:{default:i};var s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),t}();s.blotName="blockquote",s.tagName="blockquote",t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=n(4),s=(i=a)&&i.__esModule?i:{default:i};var r=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default),o(t,null,[{key:"formats",value:function(e){return this.tagName.indexOf(e.tagName)+1}}]),t}();r.blotName="header",r.tagName=["H1","H2","H3","H4","H5","H6"],t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ListItem=void 0;var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(i):void 0},a=l(n(0)),s=l(n(4)),r=l(n(25));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var p=function(e){function t(){return c(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return d(t,s.default),i(t,[{key:"format",value:function(e,n){e!==m.blotName||n?o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n):this.replaceWith(a.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(e,n){return this.parent.isolate(this.offset(this.parent),this.length()),e===this.parent.statics.blotName?(this.parent.replaceWith(e,n),this):(this.parent.unwrap(),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e,n))}}],[{key:"formats",value:function(e){return e.tagName===this.tagName?void 0:o(t.__proto__||Object.getPrototypeOf(t),"formats",this).call(this,e)}}]),t}();p.blotName="list-item",p.tagName="LI";var m=function(e){function t(e){c(this,t);var n=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),i=function(t){if(t.target.parentNode===e){var i=n.statics.formats(e),o=a.default.find(t.target);"checked"===i?o.format("list","unchecked"):"unchecked"===i&&o.format("list","checked")}};return e.addEventListener("touchstart",i),e.addEventListener("mousedown",i),n}return d(t,r.default),i(t,null,[{key:"create",value:function(e){var n="ordered"===e?"OL":"UL",i=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,n);return"checked"!==e&&"unchecked"!==e||i.setAttribute("data-checked","checked"===e),i}},{key:"formats",value:function(e){return"OL"===e.tagName?"ordered":"UL"===e.tagName?e.hasAttribute("data-checked")?"true"===e.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),i(t,[{key:"format",value:function(e,t){this.children.length>0&&this.children.tail.format(e,t)}},{key:"formats",value:function(){return e={},t=this.statics.blotName,n=this.statics.formats(this.domNode),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}},{key:"insertBefore",value:function(e,n){if(e instanceof p)o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n);else{var i=null==n?this.length():n.offset(this),a=this.split(i);a.parent.insertBefore(e,a)}}},{key:"optimize",value:function(e){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){if(e.statics.blotName!==this.statics.blotName){var n=a.default.create(this.statics.defaultChild);e.moveChildren(n),this.appendChild(n)}o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e)}}]),t}();m.blotName="list",m.scope=a.default.Scope.BLOCK_BLOT,m.tagName=["OL","UL"],m.defaultChild="list-item",m.allowedChildren=[p],t.ListItem=p,t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(56),a=(i=o)&&i.__esModule?i:{default:i};var s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),t}();s.blotName="italic",s.tagName=["EM","I"],t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=n(6),s=(i=a)&&i.__esModule?i:{default:i};var r=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default),o(t,null,[{key:"create",value:function(e){return"super"===e?document.createElement("sup"):"sub"===e?document.createElement("sub"):function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(i):void 0}(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e)}},{key:"formats",value:function(e){return"SUB"===e.tagName?"sub":"SUP"===e.tagName?"super":void 0}}]),t}();r.blotName="script",r.tagName=["SUB","SUP"],t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(6),a=(i=o)&&i.__esModule?i:{default:i};var s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),t}();s.blotName="strike",s.tagName="S",t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(6),a=(i=o)&&i.__esModule?i:{default:i};var s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),t}();s.blotName="underline",s.tagName="U",t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(i):void 0},s=n(0),r=(i=s)&&i.__esModule?i:{default:i},l=n(27);var c=["alt","height","width"],u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.default.Embed),o(t,[{key:"format",value:function(e,n){c.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=a(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"==typeof e&&n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return c.reduce(function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t},{})}},{key:"match",value:function(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}},{key:"sanitize",value:function(e){return(0,l.sanitize)(e,["http","https","data"])?e:"//:0"}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}();u.blotName="image",u.tagName="IMG",t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(i):void 0},s=n(4),r=n(27),l=(i=r)&&i.__esModule?i:{default:i};var c=["height","width"],u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.BlockEmbed),o(t,[{key:"format",value:function(e,n){c.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=a(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return c.reduce(function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t},{})}},{key:"sanitize",value:function(e){return l.default.sanitize(e)}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}();u.blotName="video",u.className="ql-video",u.tagName="IFRAME",t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FormulaBlot=void 0;var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=r(n(35)),a=r(n(5)),s=r(n(9));function r(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var d=function(e){function t(){return l(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,o.default),i(t,null,[{key:"create",value:function(e){var n=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(i):void 0}(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"==typeof e&&(window.katex.render(e,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",e)),n}},{key:"value",value:function(e){return e.getAttribute("data-value")}}]),t}();d.blotName="formula",d.className="ql-formula",d.tagName="SPAN";var p=function(e){function t(){l(this,t);var e=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return e}return u(t,s.default),i(t,null,[{key:"register",value:function(){a.default.register(d,!0)}}]),t}();t.FormulaBlot=d,t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CodeToken=t.CodeBlock=void 0;var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=l(n(0)),a=l(n(5)),s=l(n(9)),r=l(n(13));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var p=function(e){function t(){return c(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return d(t,r.default),i(t,[{key:"replaceWith",value:function(e){this.domNode.textContent=this.domNode.textContent,this.attach(),function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(i):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e)}},{key:"highlight",value:function(e){var t=this.domNode.textContent;this.cachedText!==t&&((t.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=e(t),this.domNode.normalize(),this.attach()),this.cachedText=t)}}]),t}();p.className="ql-syntax";var m=new o.default.Attributor.Class("token","hljs",{scope:o.default.Scope.INLINE}),f=function(e){function t(e,n){c(this,t);var i=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if("function"!=typeof i.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var o=null;return i.quill.on(a.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(o),o=setTimeout(function(){i.highlight(),o=null},i.options.interval)}),i.highlight(),i}return d(t,s.default),i(t,null,[{key:"register",value:function(){a.default.register(m,!0),a.default.register(p,!0)}}]),i(t,[{key:"highlight",value:function(){var e=this;if(!this.quill.selection.composing){this.quill.update(a.default.sources.USER);var t=this.quill.getSelection();this.quill.scroll.descendants(p).forEach(function(t){t.highlight(e.options.highlight)}),this.quill.update(a.default.sources.SILENT),null!=t&&this.quill.setSelection(t,a.default.sources.SILENT)}}}]),t}();f.DEFAULTS={highlight:null==window.hljs?null:function(e){return window.hljs.highlightAuto(e).value},interval:1e3},t.CodeBlock=p,t.CodeToken=m,t.default=f},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(e,t){e.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(e,t){e.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(e,t){e.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(e,t){e.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BubbleTooltip=void 0;var i=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(i):void 0},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=d(n(3)),s=d(n(8)),r=n(43),l=d(r),c=n(15),u=d(n(41));function d(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],g=function(e){function t(e,n){p(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=h);var i=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return i.quill.container.classList.add("ql-bubble"),i}return f(t,l.default),o(t,[{key:"extendToolbar",value:function(e){this.tooltip=new v(this.quill,this.options.bounds),this.tooltip.root.appendChild(e.container),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),u.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),u.default)}}]),t}();g.DEFAULTS=(0,a.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var v=function(e){function t(e,n){p(this,t);var i=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return i.quill.on(s.default.events.EDITOR_CHANGE,function(e,t,n,o){if(e===s.default.events.SELECTION_CHANGE)if(null!=t&&t.length>0&&o===s.default.sources.USER){i.show(),i.root.style.left="0px",i.root.style.width="",i.root.style.width=i.root.offsetWidth+"px";var a=i.quill.getLines(t.index,t.length);if(1===a.length)i.position(i.quill.getBounds(t));else{var r=a[a.length-1],l=i.quill.getIndex(r),u=Math.min(r.length()-1,t.index+t.length-l),d=i.quill.getBounds(new c.Range(l,u));i.position(d)}}else document.activeElement!==i.textbox&&i.quill.hasFocus()&&i.hide()}),i}return f(t,r.BaseTooltip),o(t,[{key:"listen",value:function(){var e=this;i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){e.root.classList.remove("ql-editing")}),this.quill.on(s.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!e.root.classList.contains("ql-hidden")){var t=e.quill.getSelection();null!=t&&e.position(e.quill.getBounds(t))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(e){var n=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"position",this).call(this,e),o=this.root.querySelector(".ql-tooltip-arrow");if(o.style.marginLeft="",0===n)return n;o.style.marginLeft=-1*n-o.offsetWidth/2+"px"}}]),t}();v.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),t.BubbleTooltip=v,t.default=g},function(e,t,n){e.exports=n(63)}]).default},e.exports=n()}).call(t,n(674).Buffer)},752:function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],i=t[1];return 3*(n+i)/4-i},t.toByteArray=function(e){for(var t,n=c(e),i=n[0],s=n[1],r=new a(function(e,t,n){return 3*(t+n)/4-n}(0,i,s)),l=0,u=s>0?i-4:i,d=0;d<u;d+=4)t=o[e.charCodeAt(d)]<<18|o[e.charCodeAt(d+1)]<<12|o[e.charCodeAt(d+2)]<<6|o[e.charCodeAt(d+3)],r[l++]=t>>16&255,r[l++]=t>>8&255,r[l++]=255&t;2===s&&(t=o[e.charCodeAt(d)]<<2|o[e.charCodeAt(d+1)]>>4,r[l++]=255&t);1===s&&(t=o[e.charCodeAt(d)]<<10|o[e.charCodeAt(d+1)]<<4|o[e.charCodeAt(d+2)]>>2,r[l++]=t>>8&255,r[l++]=255&t);return r},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,a=[],s=0,r=n-o;s<r;s+=16383)a.push(u(e,s,s+16383>r?r:s+16383));1===o?(t=e[n-1],a.push(i[t>>2]+i[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],a.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"="));return a.join("")};for(var i=[],o=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,l=s.length;r<l;++r)i[r]=s[r],o[s.charCodeAt(r)]=r;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var o,a,s=[],r=t;r<n;r+=3)o=(e[r]<<16&16711680)+(e[r+1]<<8&65280)+(255&e[r+2]),s.push(i[(a=o)>>18&63]+i[a>>12&63]+i[a>>6&63]+i[63&a]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},753:function(e,t){t.read=function(e,t,n,i,o){var a,s,r=8*o-i-1,l=(1<<r)-1,c=l>>1,u=-7,d=n?o-1:0,p=n?-1:1,m=e[t+d];for(d+=p,a=m&(1<<-u)-1,m>>=-u,u+=r;u>0;a=256*a+e[t+d],d+=p,u-=8);for(s=a&(1<<-u)-1,a>>=-u,u+=i;u>0;s=256*s+e[t+d],d+=p,u-=8);if(0===a)a=1-c;else{if(a===l)return s?NaN:1/0*(m?-1:1);s+=Math.pow(2,i),a-=c}return(m?-1:1)*s*Math.pow(2,a-i)},t.write=function(e,t,n,i,o,a){var s,r,l,c=8*a-o-1,u=(1<<c)-1,d=u>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,m=i?0:a-1,f=i?1:-1,h=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(r=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+d>=1?p/l:p*Math.pow(2,1-d))*l>=2&&(s++,l/=2),s+d>=u?(r=0,s=u):s+d>=1?(r=(t*l-1)*Math.pow(2,o),s+=d):(r=t*Math.pow(2,d-1)*Math.pow(2,o),s=0));o>=8;e[n+m]=255&r,m+=f,r/=256,o-=8);for(s=s<<o|r,c+=o;c>0;e[n+m]=255&s,m+=f,s/=256,c-=8);e[n+m-f]|=128*h}},754:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{"margin-bottom":"30px"}},[e.hasTranslation?n("div",[n("el-row",{staticStyle:{"margin-bottom":"5px"},attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:24}},[e._v("\n "+e._s(e.label+":")+"\n ")])],1),e._v(" "),n("el-row",{attrs:{type:"flex",align:"middle"}},[n("el-col",{attrs:{span:12}},[n("el-button-group",{staticStyle:{"margin-bottom":"5px"}},[n("el-button",{attrs:{size:"mini",type:e.isTextMode?"default":"primary"},on:{click:e.textModeChanged}},[e._v(e._s(e.$root.labels.text_mode))]),e._v(" "),n("el-button",{attrs:{size:"mini",type:e.isTextMode?"primary":"default"},on:{click:e.textModeChanged}},[e._v(e._s(e.$root.labels.html_mode))])],1)],1),e._v(" "),n("el-col",{attrs:{span:12}},[n("div",{staticClass:"am-service-translate am-event-translate",staticStyle:{cursor:"pointer","line-height":"inherit"},on:{click:e.showDialogTranslate}},[n("img",{staticClass:"am-dialog-translate-svg",attrs:{width:"16px",src:e.$root.getUrl+"public/img/translate.svg"}}),e._v("\n "+e._s(e.$root.labels.translate)+"\n ")])])],1)],1):n("div",{staticStyle:{"margin-bottom":"5px"}},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:12}},[e._v("\n "+e._s(e.label+":")+"\n ")]),e._v(" "),e.hasQuill?n("el-col",{staticClass:"align-right",attrs:{span:12}},[n("el-button-group",[n("el-button",{attrs:{size:"mini",type:e.isTextMode?"default":"primary"},on:{click:e.textModeChanged}},[e._v(e._s(e.$root.labels.text_mode))]),e._v(" "),n("el-button",{attrs:{size:"mini",type:e.isTextMode?"primary":"default"},on:{click:e.textModeChanged}},[e._v(e._s(e.$root.labels.html_mode))])],1)],1):e._e()],1)],1),e._v(" "),n("el-row",[n("el-col",[n("el-alert",{staticStyle:{"margin-bottom":"10px"},attrs:{type:"warning","show-icon":"",title:"",description:e.$root.labels.content_mode_tooltip,closable:!1}})],1)],1),e._v(" "),e.isTextMode?n("el-input",{attrs:{type:"textarea",autosize:{minRows:4,maxRows:6},placeholder:""},on:{input:e.changedContentText},model:{value:e.textValue,callback:function(t){e.textValue=t},expression:"textValue"}}):n("quill-editor",{attrs:{options:{modules:{toolbar:[["bold","italic","underline","strike"],["blockquote"],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{color:[]},{background:[]}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{font:[]}],[{align:[]}],["clean"],e.allowImage?["link","image"]:["link"]]}}},on:{change:e.changedContentQuill,ready:e.readyQuill},model:{value:e.entity[e.htmlProperty],callback:function(t){e.$set(e.entity,e.htmlProperty,t)},expression:"entity[htmlProperty]"}})],1)},staticRenderFns:[]}},791:function(e,t,n){var i=n(90)(n(794),n(795),!1,null,null,null);e.exports=i.exports},794:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(663),o=n(336),a=n(664),s=n(677),r=n.n(s),l=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],i=!0,o=!1,a=void 0;try{for(var s,r=e[Symbol.iterator]();!(i=(s=r.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){o=!0,a=e}finally{try{!i&&r.return&&r.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.default={mixins:[i.a,o.a,a.a],props:{showCustomerInfo:!0,entityId:null,entityType:null,appointment:{default:function(){}},customFields:{default:function(){return[]}},hideAttachmentCustomField:{required:!1,default:!1,type:Boolean},isCabinet:{type:Boolean,default:!1,required:!1}},data:function(){return{}},mounted:function(){this.setAddressCustomFields()},methods:{setAddressCF:function(e,t,n){this.appointment.bookings[n].customFields[t].value=e},googleMapsLoaded:function(){return window.google&&this.$root.settings.general.gMapApiKey},clearValidation:function(){this.$emit("clearValidation")},setAddressCustomFields:function(){var e=this;this.appointment.bookings.forEach(function(t,n){var i=!0,o=!1,a=void 0;try{for(var s,r=Object.entries(t.customFields)[Symbol.iterator]();!(i=(s=r.next()).done);i=!0){var c=s.value,u=l(c,2),d=u[0],p=u[1];"address"===p.type&&void 0!==e.$refs["amelia-cf-address-"+n+"-"+d]&&e.$refs["amelia-cf-address-"+n+"-"+d].length>0&&e.$refs["amelia-cf-address-"+n+"-"+d][0].update(p.value)}}catch(e){o=!0,a=e}finally{try{!i&&r.return&&r.return()}finally{if(o)throw a}}})}},watch:{"appointment.bookings":function(){var e=this;this.$nextTick(function(){e.setAddressCustomFields()})}},components:{VueGoogleAutocomplete:r.a}}},795:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"am-dialog-table am-custom-fields-container"},e._l(e.appointment.bookings,function(t,i){return n("div",{staticClass:"am-customer-extras"},[n("el-row",{staticClass:"am-customer-extras-data"},[e.showCustomerInfo?n("el-col",[n("h3",[e._v(e._s(t.customer.firstName)+" "+e._s(t.customer.lastName))]),e._v(" "),n("span",[e._v(e._s(t.customer.email))])]):e._e()],1),e._v(" "),n("div",{staticClass:"am-custom-fields"},e._l(e.customFields,function(t){return e.isCustomFieldVisible(t,e.entityType,e.entityId)&&"content"!==t.type&&("file"!==t.type||"file"===t.type&&e.appointment.bookings[i].customFields[t.id].value&&e.appointment.bookings[i].customFields[t.id].value.length>0)?n("el-form-item",{key:t.id,attrs:{prop:!0===t.required&&"content"!==t.type&&"file"!==t.type?"bookings."+i+".customFields."+t.id+".value":null,label:"content"!==t.type&&"checkbox"!==t.type&&"radio"!==t.type&&t.label?t.label+":":""}},["checkbox"!==t.type&&"radio"!==t.type||!t.label?e._e():n("span",{class:"checkbox"!==t.type&&"radio"!==t.type||!t.required?"":"am-custom-required-as-html",domProps:{innerHTML:e._s(t.label?"<label class='el-form-item__label'>"+t.label+"</label>:":"")}},[e._v("\n >\n ")]),e._v(" "),"text"===t.type?n("el-input",{attrs:{placeholder:""},on:{input:function(t){return e.clearValidation()}},model:{value:e.appointment.bookings[i].customFields[t.id].value,callback:function(n){e.$set(e.appointment.bookings[i].customFields[t.id],"value",n)},expression:"appointment.bookings[key].customFields[customField.id].value"}}):e._e(),e._v(" "),"address"===t.type?n("div",{staticClass:"el-input",style:{marginBottom:e.$root.settings.general.gMapApiKey?"":0}},[e.googleMapsLoaded()?n("vue-google-autocomplete",{ref:"amelia-cf-address-"+i+"-"+t.id,refInFor:!0,attrs:{id:"address-autocomplete-"+i+"-"+t.id,classname:"el-input__inner",placeholder:"",types:""},on:{change:function(n){return e.setAddressCF(n,t.id,i)}}}):n("el-input",{attrs:{placeholder:""},model:{value:e.appointment.bookings[i].customFields[t.id].value,callback:function(n){e.$set(e.appointment.bookings[i].customFields[t.id],"value",n)},expression:"appointment.bookings[key].customFields[customField.id].value"}})],1):"text-area"===t.type?n("el-input",{staticClass:"am-front-texarea",attrs:{rows:3,placeholder:"",type:"textarea"},on:{input:function(t){return e.clearValidation()}},model:{value:e.appointment.bookings[i].customFields[t.id].value,callback:function(n){e.$set(e.appointment.bookings[i].customFields[t.id],"value",n)},expression:"appointment.bookings[key].customFields[customField.id].value"}}):"select"===t.type?n("el-select",{attrs:{placeholder:"",clearable:"","popper-class":"am-dropdown-cabinet"},on:{change:function(t){return e.clearValidation()}},model:{value:e.appointment.bookings[i].customFields[t.id].value,callback:function(n){e.$set(e.appointment.bookings[i].customFields[t.id],"value",n)},expression:"appointment.bookings[key].customFields[customField.id].value"}},e._l(e.getCustomFieldOptions(t.options),function(e,t){return n("el-option",{key:t,attrs:{value:e,label:e}})}),1):"checkbox"===t.type?n("el-checkbox-group",{on:{change:function(t){return e.clearValidation()}},model:{value:e.appointment.bookings[i].customFields[t.id].value,callback:function(n){e.$set(e.appointment.bookings[i].customFields[t.id],"value",n)},expression:"appointment.bookings[key].customFields[customField.id].value"}},e._l(e.getCustomFieldOptions(t.options),function(e,t){return n("el-checkbox",{key:t,attrs:{label:e}})}),1):"radio"===t.type?n("el-radio-group",{model:{value:e.appointment.bookings[i].customFields[t.id].value,callback:function(n){e.$set(e.appointment.bookings[i].customFields[t.id],"value",n)},expression:"appointment.bookings[key].customFields[customField.id].value"}},e._l(e.getCustomFieldOptions(t.options),function(t,i){return n("el-radio",{key:i,attrs:{label:t},on:{change:function(t){return e.clearValidation()}}})}),1):"file"===t.type&&!1===e.hideAttachmentCustomField?e._l(e.appointment.bookings[i].customFields[t.id].value,function(o,a){return n("div",{staticStyle:{margin:"15px",clear:"left"}},[n("a",{key:a,attrs:{href:e.$root.useUploadsAmeliaPath?e.$root.getAjaxUrl+"/fields/"+t.id+"/"+e.appointment.bookings[i].id+"/"+a+(e.isCabinet?"&source=cabinet-provider":""):e.$root.getUploadsAmeliaUrl+e.appointment.bookings[i].id+"_"+o.fileName,target:"_blank"}},[e._v("\n "+e._s(o.name)+"\n ")])])}):"datepicker"===t.type?n("div",[n("v-date-picker",{attrs:{mode:"single","popover-visibility":"focus","popover-direction":"bottom","popover-align":e.screenWidth<768?"center":"left","tint-color":"#1A84EE","show-day-popover":!1,"input-props":{class:"el-input__inner",readOnly:"readonly"},"is-expanded":!1,"is-required":!0,disabled:!1,formats:e.vCalendarFormats},model:{value:e.appointment.bookings[i].customFields[t.id].value,callback:function(n){e.$set(e.appointment.bookings[i].customFields[t.id],"value",n)},expression:"appointment.bookings[key].customFields[customField.id].value"}})],1):e._e()],2):e._e()}),1)],1)}),0)},staticRenderFns:[]}},796:function(e,t,n){var i=n(90)(n(797),n(801),!1,null,null,null);e.exports=i.exports},797:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(697),o=n.n(i),a=n(671),s=n.n(a),r=n(654),l=n(336),c=n(658),u=n(663),d=n(655),p=n(798),m=n.n(p);t.default={mixins:[r.a,l.a,c.a,d.a,u.a],props:{customer:null},data:function(){return{customerTabs:"details",customerCustomFields:null,languagesData:[],usedLanguages:[],dialogLoading:!0,errors:{email:""},formOptions:{wpUsers:[],genders:[{value:"female",label:this.$root.labels.female},{value:"male",label:this.$root.labels.male}]},rules:{firstName:[{required:!0,message:this.$root.labels.enter_first_name_warning,trigger:"submit"}],lastName:[{required:!0,message:this.$root.labels.enter_last_name_warning,trigger:"submit"}],email:[{required:!1,message:this.$root.labels.enter_email_warning,trigger:"submit"},{type:"email",message:this.$root.labels.enter_valid_email_warning,trigger:"submit"}]}}},created:function(){0!==this.customer.id?(this.customer.birthday=this.customer.birthday?this.$moment(this.customer.birthday).toDate():null,this.getWPUsers(this.customer.externalId)):this.getWPUsers(0),this.usedLanguages=this.$root.settings.general.usedLanguages,this.usedLanguages.includes(this.$root.settings.wordpress.locale)||this.usedLanguages.push(this.$root.settings.wordpress.locale),this.usedLanguages.includes(this.customer.language)||(this.customer.language=this.$root.settings.wordpress.locale),this.getLanguagesData()},mounted:function(){this.inlineSVG()},methods:{showCustomerActivity:function(e){var t=new URL(window.location.href.replaceAll("customers",e));t.searchParams.set("customerId",this.customer.id),window.location.href=t},getLanguagesData:function(){var e=this;this.$http.get(this.$root.getAjaxUrl+"/entities",{params:this.getAppropriateUrlParams({types:["settings","custom_fields"]})}).then(function(t){e.languagesData=t.data.data.settings.languages,e.customerCustomFields=t.data.data.customFields.filter(function(e){return"customer"===e.saveType})}).catch(function(e){console.log(e.message)})},getLanguageLabel:function(e){return this.languagesData[e]?this.languagesData[e].name:""},getLanguageFlag:function(e){return e&&this.languagesData[e]&&this.languagesData[e].country_code?this.$root.getUrl+"public/img/flags/"+this.languagesData[e].country_code+".png":this.$root.getUrl+"public/img/grey.svg"},errorCallback:function(e){var t=this;t.errors.email="",setTimeout(function(){t.errors.email=e},200)},getParsedEntity:function(){var e=JSON.parse(JSON.stringify(this.customer));return e.birthday&&(e.birthday=this.getDatabaseFormattedDate(this.$moment(e.birthday).format("YYYY-MM-DD"))),0===e.externalId||e.externalId||(e.externalId=-1),e.language?e.translations=JSON.stringify({defaultLanguage:e.language}):e.translations=null,e.customFields&&(e.customFields=JSON.stringify(this.customer.customFields)),e},closeDialog:function(){this.$emit("closeDialog")},getWPUsers:function(e){var t=this;this.$http.get(this.$root.getAjaxUrl+"/users/wp-users",{params:{id:e,role:"customer"}}).then(function(e){t.formOptions.wpUsers=e.data.data.users,t.formOptions.wpUsers.unshift({value:0,label:t.$root.labels.create_new}),-1===t.formOptions.wpUsers.map(function(e){return e.value}).indexOf(t.customer.externalId)&&(t.customer.externalId=""),t.dialogLoading=!1})},phoneFormatted:function(e,t){this.clearValidation(),this.customer.phone=e,this.customer.countryPhoneIso=t},clearValidation:function(){void 0!==this.$refs.customer&&this.$refs.customer.clearValidate()},selectCreateNewWPUser:function(){this.customer.externalId=0,this.$refs.wpUser.blur()}},components:{CustomerCustomFields:m.a,PhoneInput:s.a,DialogActions:o.a}}},798:function(e,t,n){var i=n(90)(n(799),n(800),!1,null,null,null);e.exports=i.exports},799:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(663),o=n(336),a=n(664),s=n(677),r=n.n(s);t.default={mixins:[i.a,o.a,a.a],props:{entityId:null,entityType:null,customer:{default:function(){}},customFields:{default:function(){return[]}},hideAttachmentCustomField:{required:!1,default:!1,type:Boolean},isCabinet:{type:Boolean,default:!1,required:!1}},created:function(){for(var e in this.setInitCustomerCustomFields(),this.customer.customFields)"datepicker"===this.customer.customFields[e].type&&this.customer.customFields[e].value&&(this.customer.customFields[e].value=this.$moment(this.customer.customFields[e].value).toDate())},methods:{setAddressCF:function(e,t){this.customer.customFields[t].value=e},googleMapsLoaded:function(){return window.google&&this.$root.settings.general.gMapApiKey},clearValidation:function(){this.$emit("clearValidation")},setInitCustomerCustomFields:function(){var e=this.customer.customFields?this.customer.customFields:{};this.customFields.forEach(function(t){void 0===e[t.id]&&(e[t.id]={value:"checkbox"===t.type||"attachment"===t.type||"radio"===t.type?[]:"",type:t.type,label:t.label})}),this.customer.customFields=e}},components:{VueGoogleAutocomplete:r.a}}},800:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"am-dialog-table am-custom-fields-container"},[n("div",{staticClass:"am-customer-extras"},[n("div",{staticClass:"am-custom-fields"},e._l(e.customFields,function(t,i){return"content"!==t.type?n("el-form-item",{key:t.id,attrs:{label:"content"!==t.type&&"checkbox"!==t.type&&"radio"!==t.type&&t.label?t.label+":":""}},["checkbox"!==t.type&&"radio"!==t.type||!t.label?e._e():n("span",{domProps:{innerHTML:e._s(t.label?"<label class='el-form-item__label'>"+t.label+"</label>:":"")}},[e._v("\n >\n ")]),e._v(" "),"text"===t.type?n("el-input",{attrs:{placeholder:""},on:{input:function(t){return e.clearValidation()}},model:{value:e.customer.customFields[t.id].value,callback:function(n){e.$set(e.customer.customFields[t.id],"value",n)},expression:"customer.customFields[customField.id].value"}}):e._e(),e._v(" "),"address"===t.type?n("div",{staticClass:"el-input",style:{marginBottom:e.$root.settings.general.gMapApiKey?"":0}},[e.googleMapsLoaded()?n("vue-google-autocomplete",{attrs:{id:"address-autocomplete-"+i+"-"+t.id,classname:"el-input__inner",value:e.customer.customFields[t.id].value,placeholder:"",types:""},on:{input:function(n){e.customer.customFields[t.id].value=n},change:function(n){return e.setAddressCF(n,t.id)}}}):n("el-input",{attrs:{placeholder:""},model:{value:e.customer.customFields[t.id].value,callback:function(n){e.$set(e.customer.customFields[t.id],"value",n)},expression:"customer.customFields[customField.id].value"}})],1):"text-area"===t.type?n("el-input",{staticClass:"am-front-texarea",attrs:{rows:3,placeholder:"",type:"textarea"},on:{input:function(t){return e.clearValidation()}},model:{value:e.customer.customFields[t.id].value,callback:function(n){e.$set(e.customer.customFields[t.id],"value",n)},expression:"customer.customFields[customField.id].value"}}):"select"===t.type?n("el-select",{attrs:{placeholder:"",clearable:"","popper-class":"am-dropdown-cabinet"},on:{change:function(t){return e.clearValidation()}},model:{value:e.customer.customFields[t.id].value,callback:function(n){e.$set(e.customer.customFields[t.id],"value",n)},expression:"customer.customFields[customField.id].value"}},e._l(e.getCustomFieldOptions(t.options),function(e,t){return n("el-option",{key:t,attrs:{value:e,label:e}})}),1):"checkbox"===t.type?n("el-checkbox-group",{attrs:{"aria-required":"false"},on:{change:function(t){return e.clearValidation()}},model:{value:e.customer.customFields[t.id].value,callback:function(n){e.$set(e.customer.customFields[t.id],"value",n)},expression:"customer.customFields[customField.id].value"}},e._l(e.getCustomFieldOptions(t.options),function(e,t){return n("el-checkbox",{key:t,attrs:{label:e}})}),1):"radio"===t.type?n("el-radio-group",{model:{value:e.customer.customFields[t.id].value,callback:function(n){e.$set(e.customer.customFields[t.id],"value",n)},expression:"customer.customFields[customField.id].value"}},e._l(e.getCustomFieldOptions(t.options),function(t,i){return n("el-radio",{key:i,attrs:{label:t},on:{change:function(t){return e.clearValidation()}}})}),1):"file"===t.type&&!1===e.hideAttachmentCustomField?e._l(e.customer.customFields[t.id].value,function(i,o){return n("div",{staticStyle:{margin:"15px",clear:"left"}},[n("a",{key:o,attrs:{href:e.$root.useUploadsAmeliaPath?e.$root.getAjaxUrl+"/fields/"+t.id+"/"+e.customer.id+"/"+o+(e.isCabinet?"&source=cabinet-provider":""):e.$root.getUploadsAmeliaUrl+e.customer.id+"_"+i.fileName,target:"_blank"}},[e._v("\n "+e._s(i.name)+"\n ")])])}):"datepicker"===t.type?n("div",[n("v-date-picker",{attrs:{mode:"single","popover-visibility":"focus","popover-direction":"bottom","popover-align":e.screenWidth<768?"center":"left","tint-color":"#1A84EE","show-day-popover":!1,"input-props":{class:"el-input__inner",readOnly:"readonly"},"is-expanded":!1,"is-required":!0,disabled:!1,formats:e.vCalendarFormats},model:{value:e.customer.customFields[t.id].value,callback:function(n){e.$set(e.customer.customFields[t.id],"value",n)},expression:"customer.customFields[customField.id].value"}})],1):e._e()],2):e._e()}),1)])])},staticRenderFns:[]}},801:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{directives:[{name:"show",rawName:"v-show",value:e.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[n("div",{staticClass:"am-dialog-loader-content"},[n("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}}),e._v(" "),n("p",[e._v(e._s(e.$root.labels.loader_message))])])]),e._v(" "),e.dialogLoading?e._e():n("div",{staticClass:"am-dialog-scrollable",class:{"am-edit":0!==e.customer.id}},[n("div",{staticClass:"am-dialog-header"},[n("el-row",[n("el-col",{attrs:{span:18}},[0!==e.customer.id?n("h2",[e._v(e._s(e.$root.labels.edit_customer))]):n("h2",[e._v(e._s(e.$root.labels.new_customer))])]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:6}},[n("span"),e._v(" "),n("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:e.closeDialog}})],1)],1)],1),e._v(" "),n("el-form",{ref:"customer",attrs:{model:e.customer,rules:e.rules,"label-position":"top"},on:{submit:function(t){return t.preventDefault(),e.onSubmit(t)}}},[n("el-tabs",{model:{value:e.customerTabs,callback:function(t){e.customerTabs=t},expression:"customerTabs"}},[n("el-tab-pane",{attrs:{label:e.$root.labels.details,name:"details"}},[n("el-form-item",{attrs:{label:e.$root.labels.first_name+":",prop:"firstName"}},[n("el-input",{attrs:{"auto-complete":"off"},on:{input:function(t){return e.clearValidation()},change:function(t){return e.trimProperty(e.customer,"firstName")}},model:{value:e.customer.firstName,callback:function(t){e.$set(e.customer,"firstName",t)},expression:"customer.firstName"}})],1),e._v(" "),n("el-form-item",{attrs:{label:e.$root.labels.last_name+":",prop:"lastName"}},[n("el-input",{attrs:{"auto-complete":"off"},on:{input:function(t){return e.clearValidation()},change:function(t){return e.trimProperty(e.customer,"lastName")}},model:{value:e.customer.lastName,callback:function(t){e.$set(e.customer,"lastName",t)},expression:"customer.lastName"}})],1),e._v(" "),n("el-form-item",{attrs:{label:e.$root.labels.email+":",prop:"email",error:e.errors.email}},[n("el-input",{attrs:{"auto-complete":"off",placeholder:e.$root.labels.email_placeholder},on:{input:function(t){return e.clearValidation()}},model:{value:e.customer.email,callback:function(t){e.$set(e.customer,"email",t)},expression:"customer.email"}})],1),e._v(" "),n("el-form-item",{attrs:{label:"placeholder"}},[n("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.wp_user)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.wp_user_customer_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-select",{ref:"wpUser",attrs:{filterable:"",clearable:"",placeholder:e.$root.labels.select_wp_user},on:{change:function(t){return e.clearValidation()}},model:{value:e.customer.externalId,callback:function(t){e.$set(e.customer,"externalId",t)},expression:"customer.externalId"}},[n("div",{staticClass:"am-drop"},[e.customer&&e.customer.email?n("div",{staticClass:"am-drop-create-item",on:{click:e.selectCreateNewWPUser}},[e._v("\n "+e._s(e.$root.labels.create_new)+"\n ")]):e._e(),e._v(" "),e._l(e.formOptions.wpUsers,function(e){return n("el-option",{key:e.value,class:{hidden:0===e.value},attrs:{label:e.label,value:e.value}})})],2)])],1),e._v(" "),n("el-form-item",{attrs:{label:e.$root.labels.phone+":"}},[n("phone-input",{attrs:{countryPhoneIso:e.customer.countryPhoneIso,savedPhone:e.customer.phone},on:{phoneFormatted:e.phoneFormatted}})],1),e._v(" "),1!==e.usedLanguages.length||e.usedLanguages[0]!==e.$root.settings.wordpress.locale?n("el-form-item",{attrs:{label:"placeholder"}},[n("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.notification_language)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{style:{maxWidth:"312px"},attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.wp_customer_lang_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-select",{staticClass:"select-languages",attrs:{placeholder:e.$root.labels.language,clearable:"",filterable:""},model:{value:e.customer.language,callback:function(t){e.$set(e.customer,"language",t)},expression:"customer.language"}},[n("template",{slot:"prefix"},[n("img",{staticClass:"select-languages-flag",attrs:{src:e.getLanguageFlag(e.customer.language)}})]),e._v(" "),e._l(e.usedLanguages,function(t,i){return n("el-option",{key:i,attrs:{label:e.getLanguageLabel(t),value:t}},[n("span",[n("img",{staticClass:"option-languages-flag",attrs:{src:e.getLanguageFlag(t)}}),e._v("\n "+e._s(e.getLanguageLabel(t))+"\n ")])])})],2)],1):e._e(),e._v(" "),n("el-form-item",{attrs:{label:e.$root.labels.gender+":"}},[n("el-select",{attrs:{placeholder:"",clearable:""},on:{change:function(t){return e.clearValidation()}},model:{value:e.customer.gender,callback:function(t){e.$set(e.customer,"gender",t)},expression:"customer.gender"}},e._l(e.formOptions.genders,function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1),e._v(" "),n("el-form-item",{attrs:{label:e.$root.labels.date_of_birth+":"}},[n("v-date-picker",{attrs:{mode:"single","popover-visibility":"focus","popover-direction":"top","tint-color":"#1A84EE","show-day-popover":!1,"input-props":{class:"el-input__inner",placeholder:e.$root.labels.select_date_of_birth},"is-expanded":!1,formats:e.vCalendarFormats},on:{input:function(t){return e.clearValidation()}},model:{value:e.customer.birthday,callback:function(t){e.$set(e.customer,"birthday",t)},expression:"customer.birthday"}}),e._v(" "),e.customer.birthday?n("span",{staticClass:"am-v-date-picker-suffix el-input__suffix-inner",on:{click:function(t){e.customer.birthday=null}}},[n("i",{staticClass:"el-select__caret el-input__icon el-icon-circle-close"})]):e._e()],1),e._v(" "),e.customer.countAppointmentBookings>0||e.customer.countEventBookings>0?n("div",{staticClass:"am-customer-activity"},[n("span",{staticClass:"am-customer-activity-title"},[e._v(e._s(e.$root.labels.customer_activity+":"))]),e._v(" "),n("div",{staticClass:"align-left"},[e.customer.countAppointmentBookings>0?n("div",{staticClass:"am-customer-activity-box"},[n("span",[e._v(e._s(e.$root.labels.appointments)+": "+e._s(e.customer.countAppointmentBookings))]),e._v(" "),n("el-button",{attrs:{size:"small"},on:{click:function(t){return e.showCustomerActivity("appointments")}}},[e._v("\n "+e._s(e.$root.labels.view_appointments)+"\n ")])],1):e._e(),e._v(" "),e.customer.countEventBookings>0?n("div",{staticClass:"am-customer-activity-box"},[n("span",[e._v(e._s(e.$root.labels.events_booked)+": "+e._s(e.customer.countEventBookings))]),e._v(" "),n("el-button",{attrs:{size:"small"},on:{click:function(t){return e.showCustomerActivity("events")}}},[e._v("\n "+e._s(e.$root.labels.view_events)+"\n ")])],1):e._e()])]):e._e(),e._v(" "),n("div",{staticClass:"am-divider"}),e._v(" "),n("el-form-item",{attrs:{label:e.$root.labels.note_internal+":"}},[n("el-input",{attrs:{type:"textarea",autosize:{minRows:4,maxRows:6},placeholder:""},on:{input:function(t){return e.clearValidation()}},model:{value:e.customer.note,callback:function(t){e.$set(e.customer,"note",t)},expression:"customer.note"}})],1)],1),e._v(" "),e.customerCustomFields&&e.customerCustomFields.length?n("el-tab-pane",{attrs:{label:e.$root.labels.custom_fields,name:"customFields"}},[n("customer-custom-fields",{attrs:{customer:e.customer,customFields:e.customerCustomFields,entityType:"customer"},on:{clearValidation:e.clearValidation}})],1):e._e()],1)],1)],1),e._v(" "),e.dialogLoading?e._e():n("dialog-actions",{attrs:{formName:"customer",urlName:"users/customers",isNew:0===e.customer.id,entity:e.customer,getParsedEntity:e.getParsedEntity,hasIcons:!0,status:{on:"visible",off:"hidden",block:"blocked"},buttonText:{confirm:{status:{yes:"visible"===e.customer.status?e.$root.labels.visibility_hide:e.$root.labels.visibility_show,no:e.$root.labels.no,block:"visible"===e.customer.status?e.$root.labels.block:e.$root.labels.unblock}}},action:{haveAdd:!0,haveEdit:!0,haveStatus:!1,haveRemove:!0===e.$root.settings.capabilities.canDelete,haveRemoveEffect:!0,haveDuplicate:!1,haveBlock:!e.$root.licence.isLite},message:{success:{save:e.$root.labels.customer_saved,remove:e.$root.labels.customer_deleted,show:"",hide:"",block:"visible"===this.customer.status?e.$root.labels.customer_blocked:e.$root.labels.customer_unblocked},confirm:{remove:e.$root.labels.confirm_delete_customer,show:"",hide:"",duplicate:"",block:"visible"===this.customer.status?e.$root.labels.confirm_block_customer:e.$root.labels.confirm_unblock_customer}}},on:{errorCallback:e.errorCallback}})],1)},staticRenderFns:[]}},802:function(e,t,n){var i=n(90)(n(803),n(804),!1,null,null,null);e.exports=i.exports},803:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(91),o=n(654),a=n(336);t.default={mixins:[i.a,o.a,a.a],props:{data:null,action:null},data:function(){return{delimiter:",",delimiters:[{label:this.$root.labels.csv_delimiter_comma,value:","},{label:this.$root.labels.csv_delimiter_semicolon,value:";"}],separateBookings:!1,hasSeparateBookingOption:!1}},updated:function(){this.inlineSVG()},mounted:function(){this.hasSeparateBookingOption=this.action===this.$root.getAjaxUrl+"/report/appointments"||this.action===this.$root.getAjaxUrl+"/report/event/attendees",this.separateBookings=this.action===this.$root.getAjaxUrl+"/report/event/attendees",this.$emit("updateAction",this.getAction()),this.inlineSVG()},methods:{changeFields:function(){this.$emit("updateAction",this.getAction())},closeDialog:function(){this.$emit("closeDialogExport")},getAction:function(){var e=this,t=this.$root.settings.activation.disableUrlParams?{}:[],n=function(n){if(e.data.hasOwnProperty(n))if(e.data[n]instanceof Array||e.data[n]instanceof Object){var i=Object.keys(e.data[n]).map(function(t){return e.data[n][t]});for(var o in i)if(""!==i[o]){var a="";""!==(a=i[o]instanceof Date?i[o]instanceof Date?e.getDatabaseFormattedDate(i[o]):i[o]:i[o]instanceof Object&&!0===i[o].checked?i[o].value:i[o])&&(e.$root.settings.activation.disableUrlParams?(n in t||(t[n]=[]),t[n].push(encodeURIComponent(a))):t.push(n+"["+o+"]="+encodeURIComponent(a)))}}else""!==e.data[n]&&(e.$root.settings.activation.disableUrlParams?(n in t||(t[n]=[]),t[n].push(encodeURIComponent(e.data[n]))):t.push(n+"="+encodeURIComponent(e.data[n])))};for(var i in this.data)n(i);if(this.$root.settings.activation.disableUrlParams){var o=[];for(var i in t)o.push(i+"="+t[i].join(","));t=o}return this.action+"&"+t.join("&")+"&delimiter="+this.delimiter+(this.hasSeparateBookingOption?"&separate="+this.separateBookings:"")+"&wpAmeliaNonce="+window.wpAmeliaNonce}},components:{}}},804:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"am-dialog-scrollable"},[n("div",{staticClass:"am-dialog-header"},[n("el-row",[n("el-col",{attrs:{span:14}},[n("h2",[e._v(e._s(e.$root.labels.export))])]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:10}},[n("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:e.closeDialog}})],1)],1)],1),e._v(" "),n("LicenceBlockHeader",{attrs:{licence:"starter"}}),e._v(" "),n("el-form",{class:e.licenceClassDisabled("starter"),attrs:{"label-position":"top"}},[n("el-form-item",{attrs:{label:e.$root.labels.csv_delimiter+":"}},[n("el-select",{attrs:{placeholder:e.$root.labels.csv_delimiter},on:{change:e.changeFields},model:{value:e.delimiter,callback:function(t){e.delimiter=t},expression:"delimiter"}},e._l(e.delimiters,function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1),e._v(" "),e.hasSeparateBookingOption?n("el-form-item",{attrs:{label:e.$root.labels["select_rows_settings"+(e.action===e.$root.getAjaxUrl+"/report/event/attendees"?"_event":"")]+":"}},[n("el-select",{attrs:{placeholder:e.$root.labels.exported_same_row},on:{change:e.changeFields},model:{value:e.separateBookings,callback:function(t){e.separateBookings=t},expression:"separateBookings"}},[n("el-option",{attrs:{label:this.$root.labels["exported_same_row"+(e.action===e.$root.getAjaxUrl+"/report/event/attendees"?"_event":"")],value:!1}}),e._v(" "),n("el-option",{attrs:{label:this.$root.labels["exported_separate_rows"+(e.action===e.$root.getAjaxUrl+"/report/event/attendees"?"_event":"")],value:!0}})],1)],1):e._e(),e._v(" "),e._l(e.data.fields,function(t){return[n("el-checkbox",{attrs:{checked:"",label:t.label,border:""},on:{change:e.changeFields},model:{value:t.checked,callback:function(n){e.$set(t,"checked",n)},expression:"field.checked"}})]})],2)],1),e._v(" "),n("div",{staticClass:"am-dialog-footer"},[n("div",{staticClass:"am-dialog-footer-actions"},[n("el-row",[n("el-col",{staticClass:"align-right",attrs:{sm:24}},[n("el-button",{attrs:{disabled:e.notInLicence("starter"),type:""},on:{click:e.closeDialog}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),n("el-button",{staticClass:"am-dialog-create",attrs:{disabled:e.notInLicence("starter"),type:"primary","native-type":"submit"},on:{click:e.closeDialog}},[e._v("\n "+e._s(e.$root.labels.export)+"\n ")])],1)],1)],1)])])},staticRenderFns:[]}},805:function(e,t,n){var i,o;!function(a){"use strict";void 0===(o="function"==typeof(i=a)?i.call(t,n,t,e):i)||(e.exports=o)}(function(){"use strict";if("undefined"==typeof window||!window.document)return function(){throw new Error("Sortable.js requires a window with a document")};var e,t,n,i,o,a,s,r,l,c,u,d,p,m,f,h,g,v,b,y,_,k,x,C,w,S,P,T,E=[],$=!1,O=!1,A=!1,D=[],I=!1,N=!1,F=[],L=/\s+/g,j="Sortable"+(new Date).getTime(),B=window,R=B.document,M=B.parseInt,q=B.setTimeout,U=B.jQuery||B.Zepto,z=B.Polymer,H={capture:!1,passive:!1},V=!!navigator.userAgent.match(/(?:Trident.*rv[ :]?11\.|msie|iemobile)/i),Y=!!navigator.userAgent.match(/Edge/i),G=!!navigator.userAgent.match(/firefox/i),K=!(!navigator.userAgent.match(/safari/i)||navigator.userAgent.match(/chrome/i)||navigator.userAgent.match(/android/i)),W=!!navigator.userAgent.match(/iP(ad|od|hone)/i),J=Y||V?"cssFloat":"float",Z="draggable"in R.createElement("div"),X=function(){if(V)return!1;var e=R.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}(),Q=!1,ee=!1,te=Math.abs,ne=Math.min,ie=Math.max,oe=[],ae=function(e,t){var n=Ce(e),i=M(n.width)-M(n.paddingLeft)-M(n.paddingRight)-M(n.borderLeftWidth)-M(n.borderRightWidth),o=Oe(e,0,t),a=Oe(e,1,t),s=o&&Ce(o),r=a&&Ce(a),l=s&&M(s.marginLeft)+M(s.marginRight)+qe(o).width,c=r&&M(r.marginLeft)+M(r.marginRight)+qe(a).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&"none"!==s.float){var u="left"===s.float?"left":"right";return!a||"both"!==r.clear&&r.clear!==u?"horizontal":"vertical"}return o&&("block"===s.display||"flex"===s.display||"table"===s.display||"grid"===s.display||l>=i&&"none"===n[J]||a&&"none"===n[J]&&l+c>i)?"vertical":"horizontal"},se=function(e,t){if(!e||!e.getBoundingClientRect)return re();var n=e,i=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=Ce(n);if(n.clientWidth<n.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!n||!n.getBoundingClientRect||n===R.body)return re();if(i||t)return n;i=!0}}}while(n=n.parentNode);return re()},re=function(){return V?R.documentElement:R.scrollingElement},le=function(e,t,n){e.scrollLeft+=t,e.scrollTop+=n},ce=Le(function(e,t,n,i){if(t.scroll){var o=n?n[j]:window,a=t.scrollSensitivity,s=t.scrollSpeed,u=e.clientX,d=e.clientY,p=re(),m=!1;l!==n&&(ue(),r=t.scroll,c=t.scrollFn,!0===r&&(r=se(n,!0),l=r));var f=0,h=r;do{var g,v,b,y,k,x,C,w,S,P=h,T=qe(P),O=T.top,A=T.bottom,D=T.left,I=T.right,N=T.width,F=T.height;if(g=P.scrollWidth,v=P.scrollHeight,b=Ce(P),w=P.scrollLeft,S=P.scrollTop,P===p?(x=N<g&&("auto"===b.overflowX||"scroll"===b.overflowX||"visible"===b.overflowX),C=F<v&&("auto"===b.overflowY||"scroll"===b.overflowY||"visible"===b.overflowY)):(x=N<g&&("auto"===b.overflowX||"scroll"===b.overflowX),C=F<v&&("auto"===b.overflowY||"scroll"===b.overflowY)),y=x&&(te(I-u)<=a&&w+N<g)-(te(D-u)<=a&&!!w),k=C&&(te(A-d)<=a&&S+F<v)-(te(O-d)<=a&&!!S),!E[f])for(var L=0;L<=f;L++)E[L]||(E[L]={});E[f].vx==y&&E[f].vy==k&&E[f].el===P||(E[f].el=P,E[f].vx=y,E[f].vy=k,clearInterval(E[f].pid),!P||0==y&&0==k||(m=!0,E[f].pid=setInterval(function(){i&&0===this.layer&&(ve.active._emulateDragOver(!0),ve.active._onTouchMove(_,!0));var t=E[this.layer].vy?E[this.layer].vy*s:0,n=E[this.layer].vx?E[this.layer].vx*s:0;"function"==typeof c&&"continue"!==c.call(o,n,t,e,_,E[this.layer].el)||le(E[this.layer].el,n,t)}.bind({layer:f}),24))),f++}while(t.bubbleScroll&&h!==p&&(h=se(h,!1)));$=m}},30),ue=function(){E.forEach(function(e){clearInterval(e.pid)}),E=[]},de=function(e){function t(e,n){return function(i,o,a,s){var r=i.options.group.name&&o.options.group.name&&i.options.group.name===o.options.group.name;if(null==e&&(n||r))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(i,o,a,s),n)(i,o,a,s);var l=(n?i:o).options.group.name;return!0===e||"string"==typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var n={},i=e.group;i&&"object"==typeof i||(i={name:i}),n.name=i.name,n.checkPull=t(i.pull,!0),n.checkPut=t(i.put),n.revertClone=i.revertClone,e.group=n},pe=function(t){e&&e.parentNode&&e.parentNode[j]&&e.parentNode[j]._computeIsAligned(t)},me=function(){!X&&n&&Ce(n,"display","none")},fe=function(){!X&&n&&Ce(n,"display","")};R.addEventListener("click",function(e){if(A)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),A=!1,!1},!0);var he,ge=function(t){if(e){var n=function(e,t){for(var n=0;n<D.length;n++)if(!Ae(D[n])){var i=qe(D[n]),o=D[n][j].options.emptyInsertThreshold,a=e>=i.left-o&&e<=i.right+o,s=t>=i.top-o&&t<=i.bottom+o;if(o&&a&&s)return D[n]}}((t=t.touches?t.touches[0]:t).clientX,t.clientY);if(n){var i={};for(var o in t)i[o]=t[o];i.target=i.rootEl=n,i.preventDefault=void 0,i.stopPropagation=void 0,n[j]._onDragOver(i)}}};function ve(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be HTMLElement, not "+{}.toString.call(e);this.el=e,this.options=t=je({},t),e[j]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0,draggable:/[uo]l/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return ae(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:M(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==ve.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var i in n)!(i in t)&&(t[i]=n[i]);for(var o in de(t),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!t.forceFallback&&Z,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?_e(e,"pointerdown",this._onTapStart):(_e(e,"mousedown",this._onTapStart),_e(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(_e(e,"dragover",this),_e(e,"dragenter",this)),D.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[])}function be(e,t,n,i){if(e){n=n||R;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&Fe(e,t):Fe(e,t))||i&&e===n)return e;if(e===n)break}while(e=ye(e))}return null}function ye(e){return e.host&&e!==R&&e.host.nodeType?e.host:e.parentNode}function _e(e,t,n){e.addEventListener(t,n,!V&&H)}function ke(e,t,n){e.removeEventListener(t,n,!V&&H)}function xe(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(L," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(L," ")}}function Ce(e,t,n){var i=e&&e.style;if(i){if(void 0===n)return R.defaultView&&R.defaultView.getComputedStyle?n=R.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in i||-1!==t.indexOf("webkit")||(t="-webkit-"+t),i[t]=n+("string"==typeof n?"":"px")}}function we(e){var t="";do{var n=Ce(e,"transform");n&&"none"!==n&&(t=n+" "+t)}while(e=e.parentNode);return window.DOMMatrix?new DOMMatrix(t):window.WebKitCSSMatrix?new WebKitCSSMatrix(t):window.CSSMatrix?new CSSMatrix(t):void 0}function Se(e,t,n){if(e){var i=e.getElementsByTagName(t),o=0,a=i.length;if(n)for(;o<a;o++)n(i[o],o);return i}return[]}function Pe(e,t,n,o,a,s,r,l,c,u,d){var p,m=(e=e||t[j]).options,f="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||V||Y?(p=R.createEvent("Event")).initEvent(n,!0,!0):p=new CustomEvent(n,{bubbles:!0,cancelable:!0}),p.to=a||t,p.from=s||t,p.item=o||t,p.clone=i,p.oldIndex=r,p.newIndex=l,p.oldDraggableIndex=c,p.newDraggableIndex=u,p.originalEvent=d,p.pullMode=h?h.lastPutMode:void 0,t&&t.dispatchEvent(p),m[f]&&m[f].call(e,p)}function Te(e,t,n,i,o,a,s,r){var l,c,u=e[j],d=u.options.onMove;return!window.CustomEvent||V||Y?(l=R.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=t,l.from=e,l.dragged=n,l.draggedRect=i,l.related=o||t,l.relatedRect=a||qe(t),l.willInsertAfter=r,l.originalEvent=s,e.dispatchEvent(l),d&&(c=d.call(u,l,s)),c}function Ee(e){e.draggable=!1}function $e(){Q=!1}function Oe(t,i,o){for(var a=0,s=0,r=t.children;s<r.length;){if("none"!==r[s].style.display&&r[s]!==n&&r[s]!==e&&be(r[s],o.draggable,t,!1)){if(a===i)return r[s];a++}s++}return null}function Ae(e){for(var t=e.lastElementChild;t&&(t===n||"none"===Ce(t,"display"));)t=t.previousElementSibling;return t||null}function De(t){return Ne(e)<Ne(t)?1:-1}function Ie(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;n--;)i+=t.charCodeAt(n);return i.toString(36)}function Ne(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e&&(e=e.previousElementSibling);)"TEMPLATE"===e.nodeName.toUpperCase()||e===i||t&&!Fe(e,t)||n++;return n}function Fe(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function Le(e,t){return function(){if(!he){var n=arguments,i=this;he=q(function(){1===n.length?e.call(i,n[0]):e.apply(i,n),he=void 0},t)}}}function je(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function Be(e){return z&&z.dom?z.dom(e).cloneNode(!0):U?U(e).clone(!0)[0]:e.cloneNode(!0)}function Re(e){return q(e,0)}function Me(e){return clearTimeout(e)}function qe(e,t,n,i){if(e.getBoundingClientRect||e===B){var o,a,s,r,l,c,u;if(e!==B&&e!==re()?(a=(o=e.getBoundingClientRect()).top,s=o.left,r=o.bottom,l=o.right,c=o.height,u=o.width):(a=0,s=0,r=window.innerHeight,l=window.innerWidth,c=window.innerHeight,u=window.innerWidth),i&&e!==B&&(n=n||e.parentNode,!V))do{if(n&&n.getBoundingClientRect&&"none"!==Ce(n,"transform")){var d=n.getBoundingClientRect();a-=d.top+M(Ce(n,"border-top-width")),s-=d.left+M(Ce(n,"border-left-width")),r=a+o.height,l=s+o.width;break}}while(n=n.parentNode);if(t&&e!==B){var p=we(n||e),m=p&&p.a,f=p&&p.d;p&&(r=(a/=f)+(c/=f),l=(s/=m)+(u/=m))}return{top:a,left:s,bottom:r,right:l,width:u,height:c}}}function Ue(e,t){for(var n=se(e,!0),i=qe(e)[t];n;){var o=qe(n)[t];if(!("top"===t||"left"===t?i>=o:i<=o))return n;if(n===re())break;n=se(n,!1)}return!1}function ze(e){var t=0,n=0,i=re();if(e)do{var o=we(e),a=o.a,s=o.d;t+=e.scrollLeft*a,n+=e.scrollTop*s}while(e!==i&&(e=e.parentNode));return[t,n]}return ve.prototype={constructor:ve,_computeIsAligned:function(t){var i;if(n&&!X?(me(),i=R.elementFromPoint(t.clientX,t.clientY),fe()):i=t.target,i=be(i,this.options.draggable,this.el,!1),!ee&&e&&e.parentNode===this.el){for(var o,a,s,r,l,c,u,d,p=this.el.children,m=0;m<p.length;m++)be(p[m],this.options.draggable,this.el,!1)&&p[m]!==i&&(p[m].sortableMouseAligned=(o=t.clientX,a=t.clientY,s=p[m],r=this._getDirection(t,null),this.options,void 0,void 0,void 0,void 0,l=qe(s),c="vertical"===r?l.left:l.top,u="vertical"===r?l.right:l.bottom,c<(d="vertical"===r?o:a)&&d<u));be(i,this.options.draggable,this.el,!0)||(x=null),ee=!0,q(function(){ee=!1},30)}},_getDirection:function(t,n){return"function"==typeof this.options.direction?this.options.direction.call(this,t,n,e):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n,i,o=this,a=this.el,r=this.options,l=r.preventOnFilter,c=t.type,u=t.touches&&t.touches[0],d=(u||t).target,p=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||d,m=r.filter;if(function(e){oe.length=0;var t=e.getElementsByTagName("input"),n=t.length;for(;n--;){var i=t[n];i.checked&&oe.push(i)}}(a),!e&&!(/mousedown|pointerdown/.test(c)&&0!==t.button||r.disabled||p.isContentEditable||(d=be(d,r.draggable,a,!1),s===d))){if(n=Ne(d),i=Ne(d,r.draggable),"function"==typeof m){if(m.call(this,t,d,this))return Pe(o,p,"filter",d,a,a,n,void 0,i),void(l&&t.cancelable&&t.preventDefault())}else if(m&&(m=m.split(",").some(function(e){if(e=be(p,e.trim(),a,!1))return Pe(o,e,"filter",d,a,a,n,void 0,i),!0})))return void(l&&t.cancelable&&t.preventDefault());r.handle&&!be(p,r.handle,a,!1)||this._prepareDragStart(t,u,d,n,i)}}},_handleAutoScroll:function(t,n){if(e&&this.options.scroll){var i=t.clientX,o=t.clientY,a=R.elementFromPoint(i,o),s=this;if(n||Y||V||K){ce(t,s.options,a,n);var r=se(a,!0);!$||g&&i===v&&o===b||(g&&clearInterval(g),g=setInterval(function(){if(e){var a=se(R.elementFromPoint(i,o),!0);a!==r&&(r=a,ue(),ce(t,s.options,r,n))}},10),v=i,b=o)}else{if(!s.options.bubbleScroll||se(a,!0)===re())return void ue();ce(t,s.options,se(a,!1),!1)}}},_prepareDragStart:function(n,i,r,l,c){var d,m=this,h=m.el,g=m.options,v=h.ownerDocument;r&&!e&&r.parentNode===h&&(o=h,t=(e=r).parentNode,a=e.nextSibling,s=r,f=g.group,u=l,p=c,y={target:e,clientX:(i||n).clientX,clientY:(i||n).clientY},this._lastX=(i||n).clientX,this._lastY=(i||n).clientY,e.style["will-change"]="all",e.style.transition="",e.style.transform="",d=function(){m._disableDelayedDragEvents(),!G&&m.nativeDraggable&&(e.draggable=!0),m._triggerDragStart(n,i),Pe(m,o,"choose",e,o,o,u,void 0,p),xe(e,g.chosenClass,!0)},g.ignore.split(",").forEach(function(t){Se(e,t.trim(),Ee)}),_e(v,"dragover",ge),_e(v,"mousemove",ge),_e(v,"touchmove",ge),_e(v,"mouseup",m._onDrop),_e(v,"touchend",m._onDrop),_e(v,"touchcancel",m._onDrop),G&&this.nativeDraggable&&(this.options.touchStartThreshold=4,e.draggable=!0),!g.delay||g.delayOnTouchOnly&&!i||this.nativeDraggable&&(Y||V)?d():(_e(v,"mouseup",m._disableDelayedDrag),_e(v,"touchend",m._disableDelayedDrag),_e(v,"touchcancel",m._disableDelayedDrag),_e(v,"mousemove",m._delayedDragTouchMoveHandler),_e(v,"touchmove",m._delayedDragTouchMoveHandler),g.supportPointer&&_e(v,"pointermove",m._delayedDragTouchMoveHandler),m._dragStartTimer=q(d,g.delay)))},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;ie(te(t.clientX-this._lastX),te(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){e&&Ee(e),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;ke(e,"mouseup",this._disableDelayedDrag),ke(e,"touchend",this._disableDelayedDrag),ke(e,"touchcancel",this._disableDelayedDrag),ke(e,"mousemove",this._delayedDragTouchMoveHandler),ke(e,"touchmove",this._delayedDragTouchMoveHandler),ke(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||("touch"==t.pointerType?t:null),!this.nativeDraggable||n?this.options.supportPointer?_e(R,"pointermove",this._onTouchMove):_e(R,n?"touchmove":"mousemove",this._onTouchMove):(_e(e,"dragend",this),_e(o,"dragstart",this._onDragStart));try{R.selection?Re(function(){R.selection.empty()}):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(t,n){if(O=!1,o&&e){this.nativeDraggable&&(_e(R,"dragover",this._handleAutoScroll),_e(R,"dragover",pe));var i=this.options;!t&&xe(e,i.dragClass,!1),xe(e,i.ghostClass,!0),Ce(e,"transform",""),ve.active=this,t&&this._appendGhost(),Pe(this,o,"start",e,o,o,u,void 0,p,void 0,n)}else this._nulling()},_emulateDragOver:function(t){if(_){if(this._lastX===_.clientX&&this._lastY===_.clientY&&!t)return;this._lastX=_.clientX,this._lastY=_.clientY,me();for(var n=R.elementFromPoint(_.clientX,_.clientY),i=n;n&&n.shadowRoot&&(n=n.shadowRoot.elementFromPoint(_.clientX,_.clientY))!==i;)i=n;if(i)do{if(i[j])if(i[j]._onDragOver({clientX:_.clientX,clientY:_.clientY,target:n,rootEl:i})&&!this.options.dragoverBubble)break;n=i}while(i=i.parentNode);e.parentNode[j]._computeIsAligned(_),fe()}},_onTouchMove:function(e,t){if(y){var i=this.options,o=i.fallbackTolerance,a=i.fallbackOffset,s=e.touches?e.touches[0]:e,r=n&&we(n),l=n&&r&&r.a,c=n&&r&&r.d,u=W&&P&&ze(P),d=(s.clientX-y.clientX+a.x)/(l||1)+(u?u[0]-F[0]:0)/(l||1),p=(s.clientY-y.clientY+a.y)/(c||1)+(u?u[1]-F[1]:0)/(c||1),m=e.touches?"translate3d("+d+"px,"+p+"px,0)":"translate("+d+"px,"+p+"px)";if(!ve.active&&!O){if(o&&ne(te(s.clientX-this._lastX),te(s.clientY-this._lastY))<o)return;this._onDragStart(e,!0)}!t&&this._handleAutoScroll(s,!0),k=!0,_=s,Ce(n,"webkitTransform",m),Ce(n,"mozTransform",m),Ce(n,"msTransform",m),Ce(n,"transform",m),e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!n){var t=this.options.fallbackOnBody?R.body:o,i=qe(e,!0,t,!W),a=(Ce(e),this.options);if(W){for(P=t;"static"===Ce(P,"position")&&"none"===Ce(P,"transform")&&P!==R;)P=P.parentNode;if(P!==R){var s=qe(P,!0);i.top-=s.top,i.left-=s.left}P!==R.body&&P!==R.documentElement?(P===R&&(P=re()),i.top+=P.scrollTop,i.left+=P.scrollLeft):P=re(),F=ze(P)}xe(n=e.cloneNode(!0),a.ghostClass,!1),xe(n,a.fallbackClass,!0),xe(n,a.dragClass,!0),Ce(n,"box-sizing","border-box"),Ce(n,"margin",0),Ce(n,"top",i.top),Ce(n,"left",i.left),Ce(n,"width",i.width),Ce(n,"height",i.height),Ce(n,"opacity","0.8"),Ce(n,"position",W?"absolute":"fixed"),Ce(n,"zIndex","100000"),Ce(n,"pointerEvents","none"),t.appendChild(n)}},_onDragStart:function(t,n){var a=this,s=t.dataTransfer,r=a.options;(i=Be(e)).draggable=!1,i.style["will-change"]="",this._hideClone(),xe(i,a.options.chosenClass,!1),a._cloneId=Re(function(){a.options.removeCloneOnHide||o.insertBefore(i,e),Pe(a,o,"clone",e)}),!n&&xe(e,r.dragClass,!0),n?(A=!0,a._loopId=setInterval(a._emulateDragOver,50)):(ke(R,"mouseup",a._onDrop),ke(R,"touchend",a._onDrop),ke(R,"touchcancel",a._onDrop),s&&(s.effectAllowed="move",r.setData&&r.setData.call(a,s,e)),_e(R,"drop",a),Ce(e,"transform","translateZ(0)")),O=!0,a._dragStartId=Re(a._dragStarted.bind(a,n,t)),_e(R,"selectstart",a),K&&Ce(R.body,"user-select","none")},_onDragOver:function(n){var i,s,r,l=this.el,c=n.target,d=this.options,m=d.group,g=ve.active,v=f===m,b=d.sort,y=this;if(!Q){if(void 0!==n.preventDefault&&n.cancelable&&n.preventDefault(),k=!0,c=be(c,d.draggable,l,!0),e.contains(n.target)||c.animated)return H(!1);if(c!==e&&(A=!1),g&&!d.disabled&&(v?b||(r=!o.contains(e)):h===this||(this.lastPutMode=f.checkPull(this,g,e,n))&&m.checkPut(this,g,e,n))){var _=this._getDirection(n,c);if(i=qe(e),r)return this._hideClone(),t=o,a?o.insertBefore(e,a):o.appendChild(e),H(!0);var P=Ae(l);if(!P||function(e,t,n){var i=qe(Ae(n)),o="vertical"===t?e.clientY:e.clientX,a="vertical"===t?e.clientX:e.clientY,s="vertical"===t?i.bottom:i.right,r="vertical"===t?i.left:i.top,l="vertical"===t?i.right:i.bottom;return"vertical"===t?a>l+10||a<=l&&o>s&&a>=r:o>s&&a>r||o<=s&&a>l+10}(n,_,l)&&!P.animated){if(P&&l===n.target&&(c=P),c&&(s=qe(c)),v?g._hideClone():g._showClone(this),!1!==Te(o,l,e,i,c,s,n,!!c))return l.appendChild(e),t=l,T=null,V(),H(!0)}else if(c&&c!==e&&c.parentNode===l){var E,$=0,O=c.sortableMouseAligned,D=e.parentNode!==l,F="vertical"===_?"top":"left",L=Ue(c,"top")||Ue(e,"top"),B=L?L.scrollTop:void 0;if(x!==c&&(w=null,E=qe(c)[F],I=!1),function(t,n,i){var o=t===e&&T||qe(t),a=n===e&&T||qe(n),s="vertical"===i?o.left:o.top,r="vertical"===i?o.right:o.bottom,l="vertical"===i?o.width:o.height,c="vertical"===i?a.left:a.top,u="vertical"===i?a.right:a.bottom,d="vertical"===i?a.width:a.height;return s===c||r===u||s+l/2===c+d/2}(e,c,_)&&O||D||L||d.invertSwap||"insert"===w||"swap"===w?("swap"!==w&&(N=d.invertSwap||D),$=function(t,n,i,o,a,s,r){var l=qe(n),c="vertical"===i?t.clientY:t.clientX,u="vertical"===i?l.height:l.width,d="vertical"===i?l.top:l.left,p="vertical"===i?l.bottom:l.right,m=qe(e),f=!1;if(!s)if(r&&S<u*o)if(!I&&(1===C?c>d+u*a/2:c<p-u*a/2)&&(I=!0),I)f=!0;else{"vertical"===i?m.top:m.left,"vertical"===i?m.bottom:m.right;if(1===C?c<d+S:c>p-S)return-1*C}else if(c>d+u*(1-o)/2&&c<p-u*(1-o)/2)return De(n);if((f=f||s)&&(c<d+u*a/2||c>p-u*a/2))return c>d+u/2?1:-1;return 0}(n,c,_,d.swapThreshold,null==d.invertedSwapThreshold?d.swapThreshold:d.invertedSwapThreshold,N,x===c),w="swap"):($=De(c),w="insert"),0===$)return H(!1);T=null,x=c,C=$,s=qe(c);var M=c.nextElementSibling,U=!1,z=Te(o,l,e,i,c,s,n,U=1===$);if(!1!==z)return 1!==z&&-1!==z||(U=1===z),Q=!0,q($e,30),v?g._hideClone():g._showClone(this),U&&!M?l.appendChild(e):c.parentNode.insertBefore(e,U?M:c),L&&le(L,0,B-L.scrollTop),t=e.parentNode,void 0===E||N||(S=te(E-qe(c)[F])),V(),H(!0)}if(l.contains(e))return H(!1)}return!1}function H(t){return t&&(v?g._hideClone():g._showClone(y),g&&(xe(e,h?h.options.ghostClass:g.options.ghostClass,!1),xe(e,d.ghostClass,!0)),h!==y&&y!==ve.active?h=y:y===ve.active&&(h=null),i&&y._animate(i,e),c&&s&&y._animate(s,c)),(c===e&&!e.animated||c===l&&!c.animated)&&(x=null),d.dragoverBubble||n.rootEl||c===R||(y._handleAutoScroll(n),e.parentNode[j]._computeIsAligned(n),!t&&ge(n)),!d.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),!0}function V(){Pe(y,o,"change",c,l,o,u,Ne(e),p,Ne(e,d.draggable),n)}},_animate:function(t,n){var i=this.options.animation;if(i){var o=qe(n);if(n===e&&(T=o),1===t.nodeType&&(t=qe(t)),t.left+t.width/2!==o.left+o.width/2||t.top+t.height/2!==o.top+o.height/2){var a=we(this.el),s=a&&a.a,r=a&&a.d;Ce(n,"transition","none"),Ce(n,"transform","translate3d("+(t.left-o.left)/(s||1)+"px,"+(t.top-o.top)/(r||1)+"px,0)"),this._repaint(n),Ce(n,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),Ce(n,"transform","translate3d(0,0,0)")}"number"==typeof n.animated&&clearTimeout(n.animated),n.animated=q(function(){Ce(n,"transition",""),Ce(n,"transform",""),n.animated=!1},i)}},_repaint:function(e){return e.offsetWidth},_offMoveEvents:function(){ke(R,"touchmove",this._onTouchMove),ke(R,"pointermove",this._onTouchMove),ke(R,"dragover",ge),ke(R,"mousemove",ge),ke(R,"touchmove",ge)},_offUpEvents:function(){var e=this.el.ownerDocument;ke(e,"mouseup",this._onDrop),ke(e,"touchend",this._onDrop),ke(e,"pointerup",this._onDrop),ke(e,"touchcancel",this._onDrop),ke(R,"selectstart",this)},_onDrop:function(s){var r=this.el,l=this.options;O=!1,$=!1,N=!1,I=!1,clearInterval(this._loopId),clearInterval(g),ue(),clearTimeout(he),he=void 0,clearTimeout(this._dragStartTimer),Me(this._cloneId),Me(this._dragStartId),ke(R,"mousemove",this._onTouchMove),this.nativeDraggable&&(ke(R,"drop",this),ke(r,"dragstart",this._onDragStart),ke(R,"dragover",this._handleAutoScroll),ke(R,"dragover",pe)),K&&Ce(R.body,"user-select",""),this._offMoveEvents(),this._offUpEvents(),s&&(k&&(s.cancelable&&s.preventDefault(),!l.dropBubble&&s.stopPropagation()),n&&n.parentNode&&n.parentNode.removeChild(n),(o===t||h&&"clone"!==h.lastPutMode)&&i&&i.parentNode&&i.parentNode.removeChild(i),e&&(this.nativeDraggable&&ke(e,"dragend",this),Ee(e),e.style["will-change"]="",xe(e,h?h.options.ghostClass:this.options.ghostClass,!1),xe(e,this.options.chosenClass,!1),Pe(this,o,"unchoose",e,t,o,u,null,p,null,s),o!==t?(d=Ne(e),m=Ne(e,l.draggable),d>=0&&(Pe(null,t,"add",e,t,o,u,d,p,m,s),Pe(this,o,"remove",e,t,o,u,d,p,m,s),Pe(null,t,"sort",e,t,o,u,d,p,m,s),Pe(this,o,"sort",e,t,o,u,d,p,m,s)),h&&h.save()):e.nextSibling!==a&&(d=Ne(e),m=Ne(e,l.draggable),d>=0&&(Pe(this,o,"update",e,t,o,u,d,p,m,s),Pe(this,o,"sort",e,t,o,u,d,p,m,s))),ve.active&&(null!=d&&-1!==d||(d=u,m=p),Pe(this,o,"end",e,t,o,u,d,p,m,s),this.save()))),this._nulling()},_nulling:function(){o=e=t=n=a=i=s=r=l=E.length=g=v=b=y=_=k=d=u=x=C=T=h=f=ve.active=null,oe.forEach(function(e){e.checked=!0}),oe.length=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":e&&(this._onDragOver(t),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.cancelable&&e.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,i=0,o=n.length,a=this.options;i<o;i++)be(e=n[i],a.draggable,this.el,!1)&&t.push(e.getAttribute(a.dataIdAttr)||Ie(e));return t},sort:function(e){var t={},n=this.el;this.toArray().forEach(function(e,i){var o=n.children[i];be(o,this.options.draggable,n,!1)&&(t[e]=o)},this),e.forEach(function(e){t[e]&&(n.removeChild(t[e]),n.appendChild(t[e]))})},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return be(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];n[e]=t,"group"===e&&de(n)},destroy:function(){var e=this.el;e[j]=null,ke(e,"mousedown",this._onTapStart),ke(e,"touchstart",this._onTapStart),ke(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(ke(e,"dragover",this),ke(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),D.splice(D.indexOf(this.el),1),this.el=e=null},_hideClone:function(){i.cloneHidden||(Ce(i,"display","none"),i.cloneHidden=!0,i.parentNode&&this.options.removeCloneOnHide&&i.parentNode.removeChild(i))},_showClone:function(t){"clone"===t.lastPutMode?i.cloneHidden&&(o.contains(e)&&!this.options.group.revertClone?o.insertBefore(i,e):a?o.insertBefore(i,a):o.appendChild(i),this.options.group.revertClone&&this._animate(e,i),Ce(i,"display",""),i.cloneHidden=!1):this._hideClone()}},_e(R,"touchmove",function(e){(ve.active||O)&&e.cancelable&&e.preventDefault()}),ve.utils={on:_e,off:ke,css:Ce,find:Se,is:function(e,t){return!!be(e,t,e,!1)},extend:je,throttle:Le,closest:be,toggleClass:xe,clone:Be,index:Ne,nextTick:Re,cancelNextTick:Me,detectDirection:ae,getChild:Oe},ve.create=function(e,t){return new ve(e,t)},ve.version="1.9.0",ve})},806:function(e,t,n){var i=n(90)(n(826),n(827),!1,null,null,null);e.exports=i.exports},816:function(e,t,n){"use strict";var i=n(663),o=n(336),a=n(668),s=n(684),r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e};t.a={mixins:[i.a,a.a,o.a,s.a],data:function(){return{recurringAppointments:[],customerCreatedCount:0,appointment:null,bookings:[],duplicateEvent:!1,exportAction:"",exportParams:{fields:[{label:this.$root.labels.customers,value:"customers",checked:!0},{label:this.$root.labels.employee,value:"employee",checked:!0},{label:this.$root.labels.service,value:"service",checked:!0},{label:this.$root.labels.location,value:"location",checked:!0},{label:this.$root.labels.start_time,value:"startTime",checked:!0},{label:this.$root.labels.end_time,value:"endTime",checked:!0},{label:this.$root.labels.duration,value:"duration",checked:!0},{label:this.$root.labels.payment_amount,value:"paymentAmount",checked:!0},{label:this.$root.labels.payment_status,value:"paymentStatus",checked:!0},{label:this.$root.labels.payment_method,value:"paymentMethod",checked:!0},{label:this.$root.labels.price,value:"price",checked:!0},{label:this.$root.labels.note,value:"note",checked:!0},{label:this.$root.labels.status,value:"status",checked:!0},{label:this.$root.labels.custom_fields,value:"customFields",checked:!0},{label:this.$root.labels.ph_booking_number_of_persons,value:"persons",checked:!0},{label:this.$root.labels.coupon_code,value:"couponCode",checked:!0},{label:this.$root.labels.extras,value:"extras",checked:!0}]},savedAppointment:null,totalBookings:0,statuses:[{value:"approved",label:this.$root.labels.approved},{value:"pending",label:this.$root.labels.pending},{value:"canceled",label:this.$root.labels.canceled},{value:"rejected",label:this.$root.labels.rejected}],noShowStatus:[{value:"no-show",label:this.$root.labels["no-show"]}],options:{fetched:!1,availableEntitiesIds:{packages:[],categories:[],employees:[],locations:[],services:[]},entities:{categories:[],customers:[],customFields:[],employees:[],locations:[],services:[]}}}},methods:{getInitAppointmentObject:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=[];if(e){var n=this.options.entities.customers.find(function(t){return t.id===e.customerId});t=[{id:0,customer:n,status:this.$root.settings.general.defaultAppointmentStatus,duration:null,persons:1,total:0,extras:[],payments:[],price:0,coupon:null,added:!1,visible:!0,info:JSON.stringify({firstName:n.firstName,lastName:n.lastName,email:n.email,phone:n.phone}),aggregatedPrice:null,packageCustomerService:{packageCustomer:{id:e.id}},customFields:{}}]}return{id:0,bookings:t,categoryId:"",serviceId:"",providerId:"",locationId:"",selectedDate:null,selectedPeriod:"",status:this.$root.settings.general.defaultAppointmentStatus,internalNotes:"",notifyParticipants:this.$root.settings.notifications.notifyCustomers,createPaymentLinks:!0,dateTimeSlots:[],calendarTimeSlots:[],occupiedTimeSlots:[],bookedTimeSlots:{},loadedDates:{},extrasTotalPrice:0,serviceTotalPrice:0,discountTotalPrice:0,providerServiceMinCapacity:0,providerServiceMaxCapacity:0,extrasCount:0,extrasSelectedCount:0,duration:0,lessonSpace:0}},showDialogNewAppointment:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.setBookings(0),this.savedAppointment=null,this.dialogAppointment=!0,setTimeout(function(){e.appointment=e.getInitAppointmentObject(t),t&&e.setBookingCustomFields()},500)},showDialogEditAppointment:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.dialogAppointment=!0,setTimeout(function(){t.getAppointment(e,n)},500)},saveAppointmentCallback:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.appointment=this.getInitAppointmentObject(null),e&&"booking"in e&&e.booking&&!t&&this.$http.post(this.$root.getAjaxUrl+"/bookings/success/"+e.booking.id,{type:"appointment",appointmentStatusChanged:e.appointmentStatusChanged,paymentId:"paymentId"in e&&e.paymentId?e.paymentId:null,packageBookingFromBackend:"packageBookingFromBackend"in e?e.packageBookingFromBackend:null}),this.getAppointmentOptions(!0)},closeDialogAppointment:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.duplicateEvent=e,this.dialogAppointment=!1},setBookings:function(e){var t=[],n=this;this.options.entities.customers.forEach(function(i){if("hidden"!==i.status){var o=0,a=[],s=[],r=null,l=0,c=null,u=1,d=null,p=null,m=JSON.stringify({firstName:i.firstName,lastName:i.lastName,email:i.email,phone:i.phone});n.appointment&&e&&n.appointment.bookings.forEach(function(e){e.customerId===i.id&&(o=e.id,a=e.extras,s=e.payments,l=e.price,c=e.duration,u=e.persons,r=e.coupon,m=e.info,d=e.aggregatedPrice,p=e.packageCustomerService)}),t.push({id:o,customer:i,status:n.$root.settings.general.defaultAppointmentStatus,duration:c,persons:u,total:0,extras:a,payments:s,price:l,coupon:r,added:!1,info:m,aggregatedPrice:d,packageCustomerService:p,customFields:{}})}}),this.bookings=t},getAppointment:function(e,t){var n=this,i=null,o="";void 0!==this.$store&&void 0!==this.$store.state.cabinet&&"provider"===this.$store.state.cabinet.cabinetType&&(o=""===this.$store.state.cabinet.timeZone?"UTC":this.$store.state.cabinet.timeZone,i=Object.assign(this.getAuthorizationHeaderObject(),{params:{source:"cabinet-"+this.$store.state.cabinet.cabinetType,timeZone:o}})),void 0===this.$store&&"provider"===this.$root.settings.role&&1===this.options.entities.employees.length&&this.options.entities.employees[0].timeZone&&(i=Object.assign({params:{timeZone:this.options.entities.employees[0].timeZone}})),this.$http.get(this.$root.getAjaxUrl+"/appointments/"+e,i).then(function(i){n.totalBookings=i.data.data.appointment.bookings.length,t&&(i.data.data.appointment.bookings=i.data.data.appointment.bookings.filter(function(e){return parseInt(e.customerId)===parseInt(t)}));var a=n;n.savedAppointment=JSON.parse(JSON.stringify(i.data.data.appointment)),n.savedAppointment.categoryId=n.getServiceById(n.savedAppointment.serviceId).categoryId,n.appointment=Object.assign(n.getInitAppointmentObject(null),i.data.data.appointment),n.appointment.notifyParticipants=!!n.appointment.notifyParticipants,n.appointment.createPaymentLinks=!!n.appointment.createPaymentLinks,"UTC"===o&&n.$root.settings.general.showClientTimeZone&&(n.appointment.bookingStart=n.getConvertedUtcToLocalDateTime(n.appointment.bookingStart),n.appointment.bookingEnd=n.getConvertedUtcToLocalDateTime(n.appointment.bookingEnd),n.savedAppointment.bookingStart=n.getConvertedUtcToLocalDateTime(n.savedAppointment.bookingStart),n.savedAppointment.bookingEnd=n.getConvertedUtcToLocalDateTime(n.savedAppointment.bookingEnd)),n.appointment.bookings.forEach(function(e){var t=null;a.options.entities.services.forEach(function(e){e.id===a.appointment.serviceId&&(t=JSON.parse(JSON.stringify(e.extras))).forEach(function(e){e.quantity=1,e.selected=!1})}),e.customer=null,e.added=!1,a.options.entities.customers.forEach(function(t){if(t.id===e.customerId){e.customer=t;var n=a.getCustomerInfo(e);0!==e.id&&n&&(e.info=JSON.stringify({firstName:n.firstName,lastName:n.lastName,email:n.email,phone:n.phone})),e.added=!0}}),e.extras.forEach(function(e){t.forEach(function(t){t.extraId===e.extraId&&(t.id=e.id,t.selected=!0,t.quantity=e.quantity?e.quantity:1,t.price=e.price,t.aggregatedPrice=e.aggregatedPrice,t.tax=e.tax)})}),t.forEach(function(e){e.selected||(e.id=0)}),e.extras=t,"[]"!==e.customFields&&null!==e.customFields||(e.customFields="{}"),e.customFields=JSON.parse(e.customFields)}),n.setBookings(e),n.recurringAppointments=i.data.data.recurring,n.appointment.lessonSpace=null!==n.appointment.lessonSpace?n.appointment.lessonSpace.split("https://www.thelessonspace.com/space/")[1]:0,i.data.data.appointment.lessonSpaceDetails&&a.options.entities.spaces&&!a.options.entities.spaces.find(function(e){return e.id===i.data.data.appointment.lessonSpaceDetails.id})&&a.options.entities.spaces.push(i.data.data.appointment.lessonSpaceDetails)}).catch(function(e){console.log(e.message)})},sortBookings:function(e){e.sort(function(e,t){return(e.customer.firstName+" "+e.customer.lastName).localeCompare(t.customer.firstName+" "+t.customer.lastName)})},duplicateAppointmentCallback:function(e){var t=this;this.appointment=e,this.appointment.id=0,this.appointment.selectedDate=null,this.appointment.selectedPeriod="",this.appointment.dateTimeSlots=[],this.appointment.calendarTimeSlots=[],this.appointment.bookings[0].packageCustomerService&&(this.appointment.bookings[0].payments=[]),setTimeout(function(){t.dialogAppointment=!0},300)},getCustomersFromGroup:function(e){var t=this,n="";return e.bookings.forEach(function(e){if(t.options.entities.customers.length){var i=t.getCustomerInfo(e);i&&(n+='<span class="am-appointment-status-symbol am-appointment-status-symbol-'+e.status+'"></span><span>'+i.firstName+" "+i.lastName+"</span><br>")}}),n},saveCustomerCallback:function(e){delete e.user.birthday,this.options.entities.customers.push(e.user);var t=this.appointment&&this.appointment.serviceId?this.getServiceById(this.appointment.serviceId):null,n={id:0,customer:e.user,customerId:e.user.id,status:this.$root.settings.general.defaultAppointmentStatus,persons:1,duration:t?t.duration:null,total:0,extras:t?t.extras:[],payments:[],coupon:null,info:JSON.stringify({firstName:e.user.firstName,lastName:e.user.lastName,email:e.user.email,phone:e.user.phone}),customFields:[],added:!0};this.bookings.push(n),this.sortBookings(this.bookings),null!==this.appointment&&(this.appointment.bookings.push(n),this.sortBookings(this.appointment.bookings)),this.setBookingCustomFields(),this.customerCreatedCount++},updateAppointmentStatus:function(e,t,n){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.updateStatusDisabled=!0,this.form.post(this.$root.getAjaxUrl+"/appointments/status/"+e.id,{status:t,packageCustomerId:"packageCustomerId"in e&&e.packageCustomerId?e.packageCustomerId:null}).then(function(a){var s=[];"bookingsWithChangedStatus"in a.data&&(s=a.data.bookingsWithChangedStatus.map(function(e){return e.id})),n&&i.setTotalStatusCounts(e,t,a.data.status,s),i.notify(t===a.data.status?i.$root.labels.success:i.$root.labels.error,i.$root.labels.appointment_status_changed+i.$root.labels[a.data.status].toLowerCase(),t===a.data.status?"success":"error"),e.status=a.data.status,"packageCustomerId"in e&&e.packageCustomerId&&o&&o(),i.updateStatusDisabled=!1}).catch(function(t){"timeSlotUnavailable"in t.response.data.data&&!0===t.response.data.data.timeSlotUnavailable&&(i.notify(i.$root.labels.error,i.$root.labels.time_slot_unavailable,"error"),e.status=t.response.data.data.status),i.updateStatusDisabled=!1})},updateAppointmentBookingStatus:function(e,t,n){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.updateStatusDisabled=!0,this.form.post(this.$root.getAjaxUrl+"/bookings/status/"+e.id,{status:t}).then(function(a){i.notify(t===a.data.booking.status?i.$root.labels.success:i.$root.labels.error,i.$root.labels.booking_status_changed+i.$root.labels[a.data.booking.status].toLowerCase(),t===a.data.booking.status?"success":"error"),e.status=a.data.booking.status,n&&o&&o(),i.updateStatusDisabled=!1}).catch(function(t){"timeSlotUnavailable"in t.response.data.data&&!0===t.response.data.data.timeSlotUnavailable&&(i.notify(i.$root.labels.error,i.$root.labels.time_slot_unavailable,"error"),e.status=t.response.data.data.status),i.updateStatusDisabled=!1})},packageTooltipContent:function(e){var t=this.bookingTypeCountInPackage(e),n="";for(var i in t.regular&&(n+=t.regular+"/"+e.length+" "+this.$root.labels.bookings_regular_tooltip+"<br/>"),t.package){var o=this.getPackageById(parseInt(i));n+=t.package[i].count+"/"+e.length+" "+this.$root.labels.bookings_package_tooltip+" <strong>"+(o?o.name:"Package")+"</strong><br/>"}return n},deletePaymentCallback:function(e){this.updatePaymentCallback(e,!0)},bookingTypeCountInPackage:function(e){for(var t={regular:0,package:{}},n=0;n<e.length;n++)if(null!==e[n].packageCustomerService){var i=e[n].packageCustomerService.packageCustomer.packageId,o=e[n].packageCustomerService.packageCustomer.payment;i in t.package?(t.package[i].count++,t.package[i].payment+=o?o.ampunt:0):t.package[i]={count:1,price:o?o.amount:0}}else t.regular++;return t},getAppointmentPaymentMethods:function(e){var t=[];return e.forEach(function(e){var n=e.payments.length?e.payments[0].gateway:null;""!==n&&null!==n||(n="onSite"),-1===t.indexOf(n)&&t.push(n)}),t},getAppointmentPayment:function(e){var t=this,n=[];return e.forEach(function(e){var i=e.payments.length?e.payments[0]:null;null===i&&(i="onSite"),n.find(function(e){return t.getPaymentType(e)===t.getPaymentType(i)})||n.push(i)}),n},editPayment:function(e){if(e.package){var t=e.payment;t.coupon=e.booking.packageCustomerService.packageCustomer.couponId?e.booking.coupon:null,e.booking={price:e.booking.packageCustomerService.packageCustomer.price,payments:[t],extras:[]}}this.selectedPaymentModalData=this.getPaymentData(e.payment,e.package?null:this.savedAppointment,null,e.package?e:null),this.selectedPaymentModalData.customer=this.getCustomerById(e.payment.customerId),this.selectedPaymentModalData.recurring=e.recurring,this.dialogPayment=!0},updatePaymentCallback:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this;this.appointment.bookings.forEach(function(i){i.payments.forEach(function(o,a){if(o.id===e.id)if(t){i.payments.splice(a,1);var s=n.savedAppointment.bookings.findIndex(function(e){return e.id===i.id});-1!==s&&n.savedAppointment.bookings[s].payments.splice(a,1)}else{i.payments.splice(a,1,e);var r=n.savedAppointment.bookings.findIndex(function(e){return e.id===i.id});-1!==r&&n.savedAppointment.bookings[r].payments.splice(a,1,e)}})}),this.dialogPayment=!1},filterCategoriesByProviderServiceIDs:function(e){var t=this;if(this.currentUser&&"provider"===this.$root.settings.role){var n=this.options.entities.employees.find(function(e){return e.id===t.currentUser.id}).serviceList.map(function(e){return e.id});return e.map(function(e){if(e.serviceList&&e.serviceList.length>0){var t=e.serviceList.filter(function(e){return n.includes(e.id)});return r({},e,{serviceList:t})}return e}).filter(function(e){return e.serviceList&&e.serviceList.length>0})}return e}},watch:{dialogAppointment:function(){!1===this.dialogAppointment&&!1===this.duplicateEvent&&(this.appointment=null)}}}},817:function(e,t,n){var i=n(90)(n(818),n(822),!1,null,null,null);e.exports=i.exports},818:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(91),o=n(666),a=n(667),s=n(704),r=n(663),l=n(336),c=n(660),u=n(697),d=n.n(u),p=n(819),m=n.n(p),f=n(791),h=n.n(f),g=n(659),v=n(655),b=n(654),y=n(0),_=n.n(y),k=n(658),x=n(657),C=n(661),w=n(706),S=n.n(w),P=n(698),T=n(708),E=n.n(T),$=n(664),O=n(673),A=n(337),D=n.n(A);t.default={mixins:[i.a,o.a,O.a,g.a,b.a,l.a,c.a,k.a,x.a,C.a,r.a,s.a,P.a,v.a,$.a,a.a],props:{currentUser:null,packageServices:null,packageCustomer:null,selectedTimeZone:"",appointment:null,recurringAppointments:null,savedAppointment:null,totalBookings:{type:Number,default:0},bookings:null,options:null,customerCreatedCount:0,showHeader:{required:!1,default:!0,type:Boolean},haveDuplicate:{required:!1,default:!0,type:Boolean},hideAttachmentCustomField:{required:!1,default:!1,type:Boolean},isCabinet:{type:Boolean,default:!1,required:!1},customersNoShowCount:{type:Array,default:function(){return[]},required:!1}},data:function(){var e=this,t=function(t,n,i){n||(e.newAppointmentTabs="schedule"),i()};return{saveConfirmMessage:null,requiredDuration:0,existingAppointmentAcknowledged:!1,fullAppointmentAcknowledged:!1,intersectedAppointmentAcknowledged:!1,calendarNavigating:!1,slotsIndexCounter:0,startDateTime:null,endDateTime:null,monthsLoad:0,searchSpacesTimer:null,loadingSpaces:!1,spaces:[],searchSpacesCounter:0,coupon:null,showCoupon:!1,clonedBookings:null,cachedClonedBookings:[],serviceUpdated:!1,recurringDatesChanged:!1,selectedRecurringDates:[],activeRecurring:!1,enabledRecurring:!1,initialRecurringData:null,recurringData:this.getDefaultRecurringData(),isProviderService:!0,availableDates:[],categorySpinnerActive:!1,dialogLoading:!0,disabledWeekdays:{weekdays:[1,2,3,4,5,6,7]},employeeSpinnerActive:!1,filter:null,locationSpinnerActive:!1,mounted:!1,newAppointmentTabs:"schedule",serviceSpinnerActive:!1,statusMessage:"",loadingTimeSlots:!1,pricedSlots:{},pricedCalendarTimeSlots:{},pricedOccupiedTimeSlots:{},attributes:[],payment:{amount:0,gateway:"onSite"},rulesInit:{bookings:[{required:!0,message:this.$root.labels.select_customer_warning,trigger:"submit",type:"array"},{validator:function(t,n,i){e.appointment.serviceId&&e.appointment.providerId&&e.isProviderService&&e.getApprovedPersonsCount()>e.appointment.providerServiceMaxCapacity?(e.newAppointmentTabs="schedule",i(new Error(e.$root.labels.select_max_customer_count_warning+" "+e.appointment.providerServiceMaxCapacity))):i()},trigger:"submit"}],serviceId:[{required:!0,message:this.$root.labels.select_service_warning,trigger:"submit",type:"number"}],providerId:[{required:!0,message:this.$root.labels.select_employee_warning,trigger:"submit",type:"number"}],selectedDate:[{validator:t,trigger:"submit"},{required:!0,message:this.$root.labels.select_date_warning,trigger:"submit",type:"date"}],"selectedPeriod.time":[{validator:t,trigger:"submit"},{required:!0,message:this.$root.labels.select_time_warning,trigger:"submit"}]},rules:{},statuses:[{id:1,value:"approved",label:this.$root.labels.approved},{id:0,value:"pending",label:this.$root.labels.pending},{id:2,value:"canceled",label:this.$root.labels.canceled},{id:3,value:"rejected",label:this.$root.labels.rejected}],noShowStatus:[{id:4,value:"no-show",label:this.$root.labels["no-show"]}],renderObject:{recurringSetupForm:{globalSettings:{formTextColor:"#ffffff",formGradientColor1:"#1A84EE",formGradientColor2:"#0454A2",formGradientAngle:135,formInputColor:"rgba(0, 0, 0, 0)",formInputTextColor:"#ffffff",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{recurringSetupHeadingFormField:{labels:{recurring_active:{value:"",translations:{x:""}}},visibility:!0},recurringSettingsFormField:{labels:{recurring_repeat:{value:"",translations:{x:""}},recurring_every:{value:"",translations:{x:""}},recurring_on:{value:"",translations:{x:""}},recurring_until:{value:"",translations:{x:""}},recurring_times:{value:"",translations:{x:""}}}}}},recurringDatesForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{recurringDatesHeadingFormField:{labels:{recurring_appointments:{value:"",translations:{x:""}},recurring_edit:{value:"",translations:{x:""}}},visibility:!0},recurringInfoFormField:{labels:{date:{value:"",translations:{x:""}},time:{value:"",translations:{x:""}}}}}}}}},mounted:function(){this.monthsLoad=1,this.startDateTime=_()().startOf("month").format("YYYY-MM-DD"),this.endDateTime=null,this.appointment&&0===this.appointment.id&&this.instantiateDialog(),this.rules=this.rulesInit},methods:{isGenerateLinkVisible:function(){return"customer"!==this.$root.settings.role&&!this.packageCustomer&&this.appointment.notifyParticipants&&this.appointment.serviceId&&this.isPaymentLinkEnabled(this.appointment.serviceId)},isPaymentLinkEnabled:function(e){var t=this.getServiceById(e),n=t&&t.settings?JSON.parse(t.settings):null,i=n&&"payments"in n&&n.payments&&"paymentLinks"in n.payments&&n.payments.paymentLinks?n.payments.paymentLinks:this.$root.settings.payments.paymentLinks;return i&&i.enabled},changedMonth:function(e){void 0!==e&&"key"in e&&(this.availableDates=[],this.disabledWeekdays={weekdays:[1,2,3,4,5,6,7]},this.calendarNavigating=!0,this.startDateTime=_()(e.year+"-"+e.month+"-01 00:00","YYYY-MM-DD HH:mm").format("YYYY-MM-DD HH:mm"),this.endDateTime=_()(e.year+"-"+e.month+"-01 00:00","YYYY-MM-DD HH:mm").add(1,"month").format("YYYY-MM-DD HH:mm"),this.getTimeSlots(this.updateCalendar))},getAllowedStatuses:function(){var e=this;return this.isCabinet&&_()(this.appointment.bookingStart)<_()()&&"no-show"!==this.appointment.status?this.statuses.filter(function(t){return t.value===e.appointment.status}).concat(this.noShowStatus):this.statuses.concat(this.getDateTime(this.appointment.bookingEnd)<this.getNowDate()?this.noShowStatus:[])},disableStatusChange:function(){return this.isCabinet&&_()(this.appointment.bookingStart)<_()()&&"no-show"===this.appointment.status},getAllowedServices:function(){var e=this,t=[];return this.packageServices&&0===this.packageServices.length?[this.getServiceById(this.appointment.serviceId)]:(t=this.packageServices&&this.packageServices.length?this.servicesFiltered.filter(function(t){return-1!==e.packageServices.map(function(e){return e.id}).indexOf(t.id)}):this.servicesFiltered,this.packageServices&&this.packageServices.length&&this.appointment.id&&this.appointment.serviceId&&-1===t.map(function(e){return e.id}).indexOf(this.appointment.serviceId)&&t.push(this.getServiceById(this.appointment.serviceId)),t.sort(function(e,t){return e.disabled-t.disabled}))},filterServices:function(){var e=this;this.options.entities.services.forEach(function(e){e.disabled=!1});var t=this.options.entities.coupons?this.options.entities.coupons.find(function(t){return t.id===e.coupon}):null;t&&this.options.entities.services.forEach(function(e){t.serviceList.map(function(e){return e.id}).includes(e.id)||(e.disabled=!0)})},searchExistingSpaces:function(e){var t=this;e?this.searchSpaces(e):setTimeout(function(){clearTimeout(t.searchSpacesTimer),t.spaces=t.options.entities.spaces},500)},searchSpaces:function(e){var t=this;clearTimeout(this.searchSpacesTimer),this.loadingSpaces=!0,this.searchSpacesCounter++,this.searchSpacesTimer=setTimeout(function(){var n=t.searchSpacesCounter;t.$http.get(t.$root.getAjaxUrl+"/entities",{params:{types:["lessonSpace_spaces"],lessonSpaceSearch:e}}).then(function(e){var i=t.options.entities.spaces;n>=t.searchSpacesCounter&&(i=e.data.data.spaces),t.spaces=i,t.loadingSpaces=!1}).catch(function(e){t.loadingSpaces=!1})},500)},searchExistingCustomers:function(e){var t=this;e?this.searchCustomers(e,this.setFilteredBookings):setTimeout(function(){clearTimeout(t.searchCustomersTimer),t.setFilteredBookings(!1)},500)},setFilteredBookings:function(e){var t=this,n=[];this.appointment.bookings.forEach(function(e){n.push(e.customerId)});var i=this.searchedCustomers;void 0===e||e||(i=this.options.entities.customers,this.clonedBookings=[]);var o=this.clonedBookings.map(function(e){return e.customer}).map(function(e){return e.id});i.forEach(function(e){-1===n.indexOf(e.id)&&-1===o.indexOf(e.id)&&t.clonedBookings.push({id:0,customer:e,status:t.$root.settings.general.defaultAppointmentStatus,duration:t.appointment.serviceId?t.getServiceById(t.appointment.serviceId).duration:null,persons:1,total:0,extras:[],payments:[],price:0,coupon:null,added:!1,visible:!0,info:JSON.stringify({firstName:e.firstName,lastName:e.lastName,email:e.email,phone:e.phone}),aggregatedPrice:null,packageCustomerService:null,customFields:{}})});for(var a=i.map(function(e){return e.id}),s=this.clonedBookings.length-1;s>=0;s--)-1===a.indexOf(this.clonedBookings[s].customer.id)?this.clonedBookings[s].visible=!1:this.clonedBookings[s].visible=!0},selectedTime:function(){var e=this,t=this;this.existingAppointmentAcknowledged=!1,this.fullAppointmentAcknowledged=!1,this.intersectedAppointmentAcknowledged=!1,this.saveConfirmMessage="";var n=this.getStringFromDate(this.appointment.selectedDate);n in this.appointment.calendarTimeSlots&&this.appointment.selectedPeriod.time in this.appointment.calendarTimeSlots[n]&&this.appointment.calendarTimeSlots[n][this.appointment.selectedPeriod.time].forEach(function(e){e[0]===t.appointment.providerId&&(t.appointment.locationId=e[1])}),this.selectedRecurringDates.length?this.$nextTick(function(){e.refreshRecurringData()}):this.activeRecurring&&this.enabledRecurring&&this.setRecurringData(),this.clearValidation()},updateByCustomer:function(){var e=this;this.dialogLoading=!0;var t=this.getStringFromDate(this.appointment.selectedDate)+" "+this.appointment.selectedPeriod.time;this.$http.post(this.$root.getAjaxUrl+"/bookings/reassign/"+this.appointment.bookings[0].id,{bookingStart:t}).then(function(t){e.$emit("saveCallback",t),setTimeout(function(){e.dialogLoading=!1,e.$emit("closeDialog")},300),e.notify(e.$root.labels.success,e.$root.labels.appointment_rescheduled,"success")}).catch(function(t){if(t.response){e.dialogLoading=!1;var n=e;setTimeout(function(){"timeSlotUnavailable"in t.response.data.data&&!0===t.response.data.data.timeSlotUnavailable&&n.notify(n.$root.labels.error,n.$root.labels.time_slot_unavailable,"error"),"rescheduleBookingUnavailable"in t.response.data.data&&!0===t.response.data.data.rescheduleBookingUnavailable&&n.notify(n.$root.labels.error,n.$root.labels.booking_reschedule_exception,"error"),"customerAlreadyBooked"in t.response.data.data&&!0===t.response.data.data.customerAlreadyBooked&&n.notify(n.$root.labels.error,n.$root.labels.customer_already_booked_app,"error")},200)}})},editPayment:function(e){this.$emit("editPayment",e)},instantiateDialog:function(){null!==this.appointment&&(this.clonedBookings=JSON.parse(JSON.stringify(this.bookings)),this.spaces=this.options.entities.spaces,this.clonedBookings.forEach(function(e){e.visible=!0}),this.cachedClonedBookings=JSON.parse(JSON.stringify(this.clonedBookings)),"provider"===this.$root.settings.role&&(this.currentUser?this.appointment.providerId=this.currentUser.id:this.appointment.providerId=this.options.entities.employees[0].id),this.$root.licence.isLite&&this.options.entities.employees.length&&(this.appointment.providerId=this.options.entities.employees[0].id),0!==this.appointment.id?(this.appointment.bookings.forEach(function(e){e.payments.sort(function(e,t){return new Date(e.dateTime)-new Date(t.dateTime)})}),this.activeRecurring=this.recurringAppointments.length>0,this.initialRecurringData=this.getDefaultRecurringSettings(this.appointment.selectedDate,this.getServiceById(this.appointment.serviceId).recurringCycle,this.appointment.calendarTimeSlots),this.setCategory(),this.setLocation(),this.handleCustomerChange(),this.coupon=this.appointment.bookings[0].coupon?this.appointment.bookings[0].coupon.id:null,this.showCoupon=!!this.coupon,this.startDateTime=_()(this.appointment.bookingStart,"YYYY-MM-DD HH:mm:ss").startOf("month").format("YYYY-MM-DD"),this.endDateTime=_()(this.appointment.bookingStart,"YYYY-MM-DD HH:mm:ss").startOf("month").add(1,"month").format("YYYY-MM-DD"),this.getTimeSlots(function(e,t){var n=this,i=n.appointment.bookingStart.split(" "),o=i[0],a=i[1].slice(0,-3);if(o in e){if(!(a in e[o])){var s=Object.keys(e[o]);s.push(a);var r={};s.sort().forEach(function(t){r[t]=t===a?[n.appointment.providerId]:e[o][t]}),e[o]=r}}else e[o]={},e[o][a]=[[this.appointment.providerId,this.appointment.locationId]];this.appointment.selectedDate=_()(o).toDate(),this.appointment.selectedPeriod={time:a,employee:n.appointment.providerId},this.updateCalendar(e,t)}.bind(this))):""!==this.appointment.serviceId?(this.setCategory(),this.setLocation(),this.getTimeSlots(this.updateCalendar)):0===this.appointment.id&&(this.dialogLoading=!1,this.showCoupon=!0),this.mounted=!0)},setCategory:function(){var e=this;this.appointment.categoryId=this.options.entities.services.find(function(t){return t.id===e.appointment.serviceId}).categoryId},setLocation:function(){var e=this;this.appointment.locationId=this.appointment.locationId?this.appointment.locationId:this.options.entities.employees.find(function(t){return e.appointment.providerId===t.id}).locationId},closeDialog:function(){this.$emit("closeDialog")},getParsedEntity:function(){var e=this;this.existingAppointmentAcknowledged=!1,this.fullAppointmentAcknowledged=!1,this.intersectedAppointmentAcknowledged=!1,this.saveConfirmMessage="";var t=[];if(null!==this.packageCustomer&&this.appointment.id)return{bookingStart:this.getBookingStart(),status:this.appointment.bookings[0].status,locationId:this.appointment.locationId,providerId:this.appointment.providerId,serviceId:this.appointment.serviceId,timeZone:"UTC"===this.selectedTimeZone?null:this.selectedTimeZone,notifyParticipants:this.appointment.notifyParticipants?1:0,createPaymentLinks:this.appointment.createPaymentLinks?1:0,customFields:this.appointment.bookings[0].customFields,internalNotes:this.appointment.internalNotes};if(null!==this.packageCustomer)return this.appointment.bookings.forEach(function(n){var i=n.customFields;for(var o in i)"datepicker"===i[o].type&&i[o].value&&(i[o].value=i[o].value instanceof Date?e.getStringFromDate(i[o].value):i[o].value);var a=!1,s=e.packageCustomer.appointments[0].packageCustomerId;e.packageCustomer.data.forEach(function(e){e.bookings.forEach(function(e){parseInt(e.packageCustomerId)===parseInt(s)&&(a=!0)})});var r={id:null,customerId:n.customer.id,customer:n.customer,status:n.status,duration:n.duration,persons:n.persons,extras:[],customFields:e.getAllowedCustomFields(i,"services",e.appointment.serviceId),payments:n.payments,packageCustomerService:{id:a?e.packageCustomer.data.find(function(t){return parseInt(t.serviceId)===parseInt(e.appointment.serviceId)}).bookings.find(function(e){return parseInt(e.packageCustomerId)===parseInt(s)}).id:e.packageCustomer.data.find(function(t){return t.serviceId===e.appointment.serviceId}).bookings.filter(function(e){return e.count})[0].id},utcOffset:null};t.push(r)}),{type:"appointment",bookings:t,bookingStart:this.getBookingStart(),notifyParticipants:this.appointment.notifyParticipants?1:0,locationId:this.appointment.locationId,providerId:this.appointment.providerId,serviceId:this.appointment.serviceId,payment:null,recurring:[],package:[],timeZone:"UTC"===this.selectedTimeZone?null:this.selectedTimeZone,utc:"UTC"===this.selectedTimeZone,locale:null,createPaymentLinks:this.appointment.createPaymentLinks?1:0,packageBookingFromBackend:!0};this.appointment.bookings.forEach(function(n){var i=[];for(var o in n.customFields)"datepicker"===n.customFields[o].type&&n.customFields[o].value&&(n.customFields[o].value=n.customFields[o].value instanceof Date?e.getStringFromDate(n.customFields[o].value):n.customFields[o].value);n.extras.forEach(function(e){e.selected&&i.push({id:e.id,customerBookingId:n.id,extraId:e.extraId,quantity:e.quantity,price:e.price})});var a={id:n.id,customerId:n.customer.id,customer:n.customer,status:n.status,duration:n.duration,persons:n.persons,extras:i,customFields:JSON.stringify(n.customFields),payments:n.payments,packageCustomerService:n.packageCustomerService,aggregatedPrice:n.aggregatedPrice};a.coupon="admin"!==e.$root.settings.role&&"manager"!==e.$root.settings.role||!e.options.entities.coupons?n.coupon:e.options.entities.coupons.find(function(t){return t.id===e.coupon}),t.push(a)}),this.activeRecurring&&this.enabledRecurring&&"dates"in this.recurringData&&this.recurringData.dates.length&&this.recurringData.dates.forEach(function(t,n){n in e.selectedRecurringDates&&(e.selectedRecurringDates[n].bookingStart=_()(t.date).format("YYYY-MM-DD")+" "+t.time)});var n=[];if(this.savedAppointment&&"bookings"in this.savedAppointment){var i=t.map(function(e){return e.id});this.savedAppointment.bookings.forEach(function(e){-1===i.indexOf(e.id)&&n.push(e)})}return t.forEach(function(t){var n=e.getAllowedCustomFields(JSON.parse(t.customFields),"services",e.appointment.serviceId);t.customFields=n}),{serviceId:this.appointment.serviceId,providerId:this.appointment.providerId,locationId:this.appointment.locationId,bookings:t,removedBookings:n,bookingStart:this.getBookingStart(),utc:"UTC"===this.selectedTimeZone,timeZone:"UTC"===this.selectedTimeZone?null:this.selectedTimeZone,notifyParticipants:this.appointment.notifyParticipants?1:0,createPaymentLinks:this.appointment.createPaymentLinks?1:0,internalNotes:this.appointment.internalNotes,id:this.appointment.id,payment:this.payment,recurring:this.activeRecurring&&this.enabledRecurring?this.selectedRecurringDates:[],lessonSpace:this.appointment.lessonSpace?"https://www.thelessonspace.com/space/"+this.appointment.lessonSpace:null}},getBookingStart:function(){var e=this.getStringFromDate(this.appointment.selectedDate)+" "+this.appointment.selectedPeriod.time;return"UTC"===this.selectedTimeZone&&this.$root.settings.general.showClientTimeZone&&(e=_()(e,"YYYY-MM-DD HH:mm").utc().format("YYYY-MM-DD HH:mm")),e},showDialogNewCustomer:function(){this.$emit("showDialogNewCustomer")},getPossibleCustomDurations:function(e){var t=this.getServiceById(this.appointment.serviceId),n=t.customPricing.durations.map(function(e){return e.duration});return n.push(t.duration),e.duration&&-1===n.indexOf(e.duration)&&n.push(e.duration),n.sort(function(e,t){return e-t}),n},handleBookingDurationChange:function(){var e=this.appointment.serviceId?this.getServiceById(this.appointment.serviceId):null;e&&e.customPricing&&(this.isDurationPricingEnabled(e.customPricing)&&this.setDuration(),this.appointment.bookings.forEach(function(t){t.duration&&0!==e.customPricing.durations.filter(function(e){return e.duration===t.duration}).length||(t.duration=e.duration)}))},handleCustomerChange:function(){var e=this;this.setServiceExtrasForCustomers(!1),this.handleBookingDurationChange(),this.setPrice(),this.setServiceCapacityForProvider(),this.setBookingCustomFields(),this.addCustomFieldsValidationRules(),this.mounted&&this.getTimeSlots(this.updateCalendar),this.showCoupon=!0;var t=this.cachedClonedBookings.map(function(e){return e.customer}).map(function(e){return e.id}),n=this.clonedBookings.map(function(e){return e.customer}).map(function(e){return e.id}),i=[];t.forEach(function(e){-1===n.indexOf(e)&&i.push(e)});for(var o=this.clonedBookings.length-1;o>=0;o--)-1!==i.indexOf(this.clonedBookings[o].customer.id)&&this.clonedBookings.splice(o,1);setTimeout(function(){e.clonedBookings.forEach(function(e){e.visible=!0}),e.cachedClonedBookings=JSON.parse(JSON.stringify(e.clonedBookings))},200),this.$emit("sortBookings",this.appointment.bookings)},handleCustomerRemove:function(e){this.appointment.duration;for(var t=this.clonedBookings.length-1;t>=0;t--)this.clonedBookings[t].customer.id===this.appointment.bookings[e].customer.id&&this.clonedBookings.splice(t,1);this.clearValidation(),this.appointment.bookings.splice(e,1),this.setPrice(),this.setSelectedExtrasCount(),this.setDuration(),this.mounted&&this.getTimeSlots(this.updateCalendar)},setServiceExtrasForCustomers:function(e){var t=this,n=null;t.appointment.serviceId&&(t.options.entities.services.forEach(function(e){e.id===t.appointment.serviceId&&(n=e.extras,t.appointment.extrasCount=n.length)}),t.appointment.bookings.forEach(function(t){(e||!t.id&&!t.added)&&(t.extras=JSON.parse(JSON.stringify(n)),t.extras.forEach(function(e){e.selected=!1,e.id=0,e.customerBookingId=0})),t.added=!0}),this.setSelectedExtrasCount(),this.setDuration())},handleSelected:function(){for(var e=this,t=document.querySelectorAll(".am-appointment-status-option.selected"),n=0;n<t.length;n++)t[n].addEventListener("click",function(t){e.handleGroupStatusChange()})},handleGroupStatusChange:function(){this.clearValidation();var e=this;this.appointment.bookings.forEach(function(t){t.status=e.appointment.status})},handleEmployeeChange:function(){var e=this;this.serviceSpinnerActive=!0,this.locationSpinnerActive=!0,this.categorySpinnerActive=!0,this.setServiceExtrasForCustomers(!1),this.setServiceCapacityForProvider(),this.setPrice(),!this.appointment.providerId&&this.enabledRecurring?this.enabledRecurring=!1:this.mounted&&this.getTimeSlots(this.updateCalendar),setTimeout(function(){e.serviceSpinnerActive=!1,e.locationSpinnerActive=!1,e.categorySpinnerActive=!1},300)},handleLocationChange:function(){var e=this;this.clearValidation(),this.serviceSpinnerActive=!0,this.employeeSpinnerActive=!0,this.categorySpinnerActive=!0,this.mounted&&this.getTimeSlots(this.updateCalendar),setTimeout(function(){e.serviceSpinnerActive=!1,e.employeeSpinnerActive=!1,e.categorySpinnerActive=!1},300)},handleServiceChange:function(){var e=this;this.locationSpinnerActive=!0,this.employeeSpinnerActive=!0,this.categorySpinnerActive=!0,this.setServiceCapacityForProvider(),this.handleBookingDurationChange(),this.setPrice(),this.setServiceExtrasForCustomers(!0),this.addCustomFieldsValidationRules(),this.serviceUpdated=!0,this.mounted&&this.getTimeSlots(this.updateCalendar),setTimeout(function(){e.locationSpinnerActive=!1,e.employeeSpinnerActive=!1,e.categorySpinnerActive=!1},300)},handleCategoryChange:function(){var e=this;this.clearValidation(),this.locationSpinnerActive=!0,this.employeeSpinnerActive=!0,this.serviceSpinnerActive=!0,setTimeout(function(){e.locationSpinnerActive=!1,e.employeeSpinnerActive=!1,e.serviceSpinnerActive=!1},300)},getProviderService:function(){var e=this,t=null;return this.appointment.providerId&&this.appointment.serviceId&&this.options.entities.employees.forEach(function(n){n.id===e.appointment.providerId&&n.serviceList.forEach(function(n){n.id===e.appointment.serviceId&&(t=n)})}),this.appointment.id&&this.appointment.serviceId&&!t?(this.isProviderService=!1,this.getServiceById(this.appointment.serviceId)):t},setServiceCapacityForProvider:function(){var e=this.getProviderService(),t=this.appointment.serviceId?this.getServiceById(this.appointment.serviceId):null;this.appointment.providerServiceMaxCapacity=e?e.maxCapacity:0,this.appointment.providerServiceMaxAdditonalCapacity=t&&null!==t.maxExtraPeople&&(!e||t.maxExtraPeople<e.maxCapacity)?t.maxExtraPeople+1:e?e.maxCapacity:0,this.appointment.providerServiceMinCapacity=e?e.minCapacity:0,this.setStatusMessage()},setStatusMessage:function(){this.statusMessage=this.getApprovedPersonsCount()<this.appointment.providerServiceMinCapacity?"(minimum "+this.appointment.providerServiceMinCapacity+")":""},handlePersonsChange:function(){this.handleBookingChange(!0)},handleBookingChange:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.appointment.duration;this.handleBookingDurationChange(),this.setPrice(),this.setStatusMessage(),(e||this.options.entities.resources.length>0||t!==this.appointment.duration)&&this.getTimeSlots(this.updateCalendar)},getApprovedPersonsCount:function(){var e=0;return this.appointment.bookings.forEach(function(t){"approved"===t.status&&(e+=t.persons)}),e},setPrice:function(){this.clearValidation();var e=this,t=!(!this.appointment||!this.savedAppointment)&&this.appointment.serviceId!==parseInt(this.savedAppointment.serviceId);e.$nextTick(function(){if(e.appointment.serviceId&&e.appointment.providerId&&e.appointment.bookings){var n=e.getProviderService(),i=e.getServiceById(e.appointment.serviceId),o=0,a=0,s=0,r=0;e.appointment.bookings.forEach(function(l){if(["approved","pending"].includes(l.status)){var c=e.savedAppointment&&l.id?e.savedAppointment.bookings.find(function(e){return e.id===l.id}):null,u=c&&c.persons!==l.persons&&e.isPersonPricingEnabled(i.customPricing),d=c&&(null===l.duration?n.duration:l.duration)!==c.duration&&e.isDurationPricingEnabled(i.customPricing),p=e.getBookingServicePrice(n,l.duration,l.persons,e.appointment.providerId,e.appointment.bookingStart),m={price:l.id?t||d||u?p:l.price:p,aggregatedPrice:l.id?l.aggregatedPrice:i.aggregatedPrice,id:l.id?null:e.appointment.serviceId};l.id&&(m.tax=l.tax);var f=e.getAppointmentPriceAmount(m,l.extras.filter(function(e){return e.selected}),l.persons,l.coupon,!1);l.extrasTotalPrice=f.total-f.totalBookable,l.bookingPrice=f.total,l.serviceTotalPrice=f.totalBookable,l.discountTotalPrice=f.discount,l.taxTotalPrice=f.tax,o+=l.serviceTotalPrice,a+=l.extrasTotalPrice,s+=l.discountTotalPrice,r+=l.taxTotalPrice}}),e.appointment.serviceTotalPrice=o,e.appointment.extrasTotalPrice=a,e.appointment.discountTotalPrice=s,e.appointment.taxTotalPrice=r}})},handleExtrasSelectionChange:function(e){void 0===e.quantity&&(e.quantity=1),this.setPrice(),this.setSelectedExtrasCount(),this.setDuration(),e.duration>0&&this.mounted&&this.getTimeSlots(this.updateCalendar)},updateCalendar:function(e,t){var n=this,i=this;if(this.appointment.selectedDate){var o=this.getStringFromDate(this.appointment.selectedDate);o in this.appointment.calendarTimeSlots&&!(o in e)&&this.calendarNavigating&&(e[o]=this.appointment.calendarTimeSlots[o])}this.appointment.calendarTimeSlots=e,this.appointment.occupiedTimeSlots=t;var a=[];this.useSortedDateStrings(Object.keys(this.appointment.calendarTimeSlots)).forEach(function(e){a.push(i.getDate(e))});var s=!this.appointment.selectedDate&&!this.availableDates.length&&a.length&&!this.calendarNavigating;this.availableDates=a,s&&(this.appointment.selectedDate=this.availableDates[0],this.$nextTick(function(){n.appointment.selectedDate=null})),this.disabledWeekdays={weekdays:[]},this.disabledWeekdays=0===this.availableDates.length?{weekdays:[1,2,3,4,5,6,7]}:null,this.dateChange()},getTimeSlots:function(e){var t=this,n=this.appointment,i=[],o=0;if(n.serviceId){this.loadingTimeSlots=!0,this.appointment.bookings.forEach(function(e){o+="approved"===e.status||"pending"===e.status?e.persons:0,e.extras.forEach(function(e){e.selected&&i.push({id:e.extraId,quantity:e.quantity})})}),this.slotsIndexCounter++;var a=this.slotsIndexCounter,s=n.id;this.savedAppointment&&this.packageCustomer&&this.totalBookings>1&&(this.savedAppointment.serviceId!==n.serviceId||this.savedAppointment.providerId!==n.providerId||this.savedAppointment.locationId!==n.locationId)&&(s=null),this.$http.get(this.$root.getAjaxUrl+"/slots",{params:this.getAppropriateUrlParams({serviceId:n.serviceId,serviceDuration:this.getMaxBookingDuration(),locationId:n.locationId,providerIds:n.providerId?[n.providerId]:[],extras:JSON.stringify(i),excludeAppointmentId:s,group:"customer"===this.$root.settings.role||this.packageCustomer||!this.appointment.id?1:0,timeZone:this.selectedTimeZone,monthsLoad:this.monthsLoad,startDateTime:this.startDateTime?this.startDateTime:this.appointment.selectedDate&&this.appointment.selectedPeriod&&this.appointment.selectedPeriod.time?_()(this.getBookingStart(),"YYYY-MM-DD HH:mm").subtract("1","days").format("YYYY-MM-DD HH:mm"):null,endDateTime:this.endDateTime,page:"appointments",persons:this.packageCustomer||!o?1:o,structured:!0})}).then(function(i){if(a<t.slotsIndexCounter)t.fetchedSlots=!0;else{t.requiredDuration=i.data.data.duration,t.existingAppointmentAcknowledged=!1,t.fullAppointmentAcknowledged=!1,t.intersectedAppointmentAcknowledged=!1;var o="UTC"===t.selectedTimeZone&&(t.$root.settings.general.showClientTimeZone||"provider"===t.$root.settings.role&&t.isCabinet);t.appointment.bookedTimeSlots={};var s=o?t.getConvertedTimeSlots(i.data.data.slots):i.data.data.slots,r=o?t.getConvertedTimeSlots(i.data.data.occupied):i.data.data.occupied,l={};Object.keys(s).forEach(function(e){l[e]={},Object.keys(s[e]).forEach(function(t){l[e][t]=[],s[e][t].forEach(function(n){l[e][t].push([n.e,n.l].concat("c"in n?[n.c,n.s,n.d]:[]))})})});var c={};Object.keys(r).forEach(function(e){c[e]={},Object.keys(r[e]).forEach(function(t){c[e][t]=[],r[e][t].forEach(function(n){c[e][t].push([n.e,n.l].concat("c"in n?[n.c,n.s,n.d]:[]))})})}),t.pricedCalendarTimeSlots=s,t.pricedOccupiedTimeSlots=r,n.providerId&&(t.setBookedTimeSlots(l,l,!1),t.setBookedTimeSlots(c,l,!0)),e(l,c),t.dialogLoading=!1,t.loadingTimeSlots=!1}}).catch(function(e){console.log(e.message),t.loadingTimeSlots=!1})}},setPeriodsPricing:function(e){var t=this,n={};this.options.entities.employees.forEach(function(t){var i=t.serviceList.find(function(t){return t.id===parseInt(e)});n[t.id]=i.price});var i={};Object.keys(this.pricedCalendarTimeSlots).forEach(function(e){i[e]={slots:{}},Object.keys(t.pricedCalendarTimeSlots[e]).forEach(function(o){var a=!1,s=!1,r=!1,l=null,c=null;t.pricedCalendarTimeSlots[e][o].forEach(function(e){var t=null===e.p?n[e.e]:e.p;t===n[e.e]?r=!0:t<n[e.e]?s=!0:t>n[e.e]&&(a=!0),(null===l||t<l)&&(l=t),(null===c||t>c)&&(c=t)}),i[e].slots[o]={type:!s||a||r?!a||s||r?"mid":"high":"low",price:l===c?l:null}}),i[e].price=0===Object.values(i[e].slots).filter(function(e){return null===e.price}).length;var o=Object.values(i[e].slots).map(function(e){return e.type});o.filter(function(e){return"low"===e}).length===o.length?i[e].type="low":o.filter(function(e){return"high"===e}).length===o.length?i[e].type="high":i[e].type="mid"}),this.pricedSlots=i;var o=[{highlight:{key:"low",backgroundColor:"rgba(196, 255, 201, 1)"},dates:[]},{highlight:{key:"mid",backgroundColor:"rgba(196, 235, 255, 1)"},dates:[]},{highlight:{key:"high",backgroundColor:"rgba(255, 196, 196, 1)"},dates:[]}];Object.keys(this.pricedSlots).forEach(function(e){switch(t.pricedSlots[e].type){case"low":o[0].dates.push(_()(e).toDate());break;case"mid":o[1].dates.push(_()(e).toDate());break;case"high":o[2].dates.push(_()(e).toDate())}}),this.attributes=o},dateSelected:function(){this.calendarNavigating=!1,this.existingAppointmentAcknowledged=!1,this.fullAppointmentAcknowledged=!1,this.intersectedAppointmentAcknowledged=!1,this.saveConfirmMessage="",this.dateChange()},dateChange:function(){var e=this;this.clearValidation();var t=this,n=[],i=null,o=!1;this.appointment.selectedDate&&this.appointment.calendarTimeSlots&&(i=this.appointment.calendarTimeSlots[this.getStringFromDate(this.appointment.selectedDate)])?(Object.keys(i).forEach(function(e){t.appointment.selectedPeriod&&t.appointment.selectedPeriod.hasOwnProperty("time")&&t.appointment.selectedPeriod.time===e&&(o=!0),"24:00"!==e&&n.push({time:e,employees:i[e]})}),o||(this.appointment.selectedPeriod="")):this.calendarNavigating||(this.appointment.selectedDate=null,this.appointment.selectedPeriod=""),this.appointment.dateTimeSlots=n,this.calendarNavigating=!1,this.appointment.id||this.$nextTick(function(){e.refreshRecurringData()})},openRecurringAppointment:function(e){this.$emit("openRecurringAppointment",e)},handleTabClick:function(e){"recurring"===e.name&&(this.recurringDatesChanged=!1)},isPriceChanged:function(){var e=this,t=!1,n=!(!this.$root.settings.payments||!this.$root.settings.payments.paymentLinks)&&this.$root.settings.payments.paymentLinks.enabled,i=this.appointment.serviceId?this.getServiceById(this.appointment.serviceId):null,o=i&&i.settings?JSON.parse(i.settings):null;if(o&&o.payments&&o.payments.paymentLinks&&(n=o.payments.paymentLinks.enabled),n&&0!==this.appointment.id&&this.appointment.serviceId){var a=function(n){var o=e.clonedBookings.find(function(e){return e.id===n.id});if(o&&0!==o.id&&e.getBookingPrice(o,!1,o.bookingPrice?o.bookingPrice:o.price,o.aggregatedPrice,i.id)<e.getBookingPrice(n,!1,n.bookingPrice?n.bookingPrice:n.price,n.aggregatedPrice,i.id))return t=!0,e.saveConfirmMessage=e.$root.labels.price_changed_message,"break"},s=!0,r=!1,l=void 0;try{for(var c,u=this.appointment.bookings[Symbol.iterator]();!(s=(c=u.next()).done);s=!0){if("break"===a(c.value))break}}catch(e){r=!0,l=e}finally{try{!s&&u.return&&u.return()}finally{if(r)throw l}}}return t},isExistingAppointment:function(){var e=this.appointment.selectedDate?this.getStringFromDate(this.appointment.selectedDate):null;return this.appointment.serviceId&&this.appointment.providerId&&this.appointment.selectedPeriod&&this.appointment.selectedPeriod.time&&(!this.savedAppointment||this.savedAppointment.providerId!==this.appointment.providerId||this.savedAppointment.bookingStart!==e+" "+this.appointment.selectedPeriod.time+":00")&&e&&e in this.appointment.bookedTimeSlots&&this.appointment.selectedPeriod.time in this.appointment.bookedTimeSlots[e].onTimeFree},isFullAppointment:function(){var e=this.appointment.selectedDate?this.getStringFromDate(this.appointment.selectedDate):null;return this.appointment.serviceId&&this.appointment.providerId&&this.appointment.selectedPeriod&&this.appointment.selectedPeriod.time&&(!this.savedAppointment||this.savedAppointment.providerId!==this.appointment.providerId||this.savedAppointment.bookingStart!==e+" "+this.appointment.selectedPeriod.time+":00")&&e&&e in this.appointment.bookedTimeSlots&&(this.appointment.selectedPeriod.time in this.appointment.bookedTimeSlots[e].onTimeFull||this.appointment.selectedPeriod.time in this.appointment.bookedTimeSlots[e].duringTime)},isIntersectedAppointment:function(){var e=this,t=this.appointment.selectedDate?this.getStringFromDate(this.appointment.selectedDate):null,n=!1;if(this.appointment.serviceId&&this.appointment.providerId&&this.appointment.selectedPeriod&&this.appointment.selectedPeriod.time&&(!this.savedAppointment||this.savedAppointment.providerId!==this.appointment.providerId||this.savedAppointment.bookingStart!==t+" "+this.appointment.selectedPeriod.time+":00")&&t in this.appointment.bookedTimeSlots){var i=this.getStringTimeInSeconds(this.appointment.selectedPeriod.time)/60;if(i+this.requiredDuration<=1440){var o=i+this.requiredDuration,a=0;["onTimeFree","onTimeFull"].forEach(function(s){Object.keys(e.appointment.bookedTimeSlots[t][s]).forEach(function(t){(a=e.getStringTimeInSeconds(t)/60)>i&&a<o&&(n=!0)})})}else{var s=_()(t+" "+this.appointment.selectedPeriod.time).add(1,"days").format("YYYY-MM-DD");if(s in this.appointment.bookedTimeSlots){var r=i+this.requiredDuration-1440;["onTimeFree","onTimeFull"].forEach(function(t){Object.keys(e.appointment.bookedTimeSlots[s][t]).forEach(function(t){e.getStringTimeInSeconds(t)/60<r&&(n=!0)})})}}}return n},getSlotLabel:function(e){var t="";if(this.appointment.providerId&&this.appointment.selectedDate){var n=this.getStringFromDate(this.appointment.selectedDate);n in this.appointment.bookedTimeSlots&&(e.time in this.appointment.bookedTimeSlots[n].onTimeFree||e.time in this.appointment.bookedTimeSlots[n].onTimeFull||e.time in this.appointment.bookedTimeSlots[n].duringTime)&&(t=' <span style="float: right; font-style: italic;">'+this.$root.labels.booked+"</span>")}return this.getFrontedFormattedTime(e.time+":00")+t},setBookedTimeSlots:function(e,t,n){var i=this,o=n?"onTimeFull":"onTimeFree",a=!0,s=0,r=0,l=0;Object.keys(e).forEach(function(n){Object.keys(e[n]).forEach(function(c){e[n][c].filter(function(e){return e.length>2}).forEach(function(e){if(s=i.getStringTimeInSeconds(c)/60,a=s+e[4]<=1440,r=a?s+e[4]:s+e[4]-1440,n in i.appointment.bookedTimeSlots||(i.appointment.bookedTimeSlots[n]={onTimeFull:{},onTimeFree:{},duringTime:{}}),c in i.appointment.bookedTimeSlots[n][o]||(i.appointment.bookedTimeSlots[n][o][c]=!0),n in t&&Object.keys(t[n]).forEach(function(e){(l=i.getStringTimeInSeconds(e)/60)>s&&l<(a?r:1440)&&!(e in i.appointment.bookedTimeSlots[n].duringTime)&&(i.appointment.bookedTimeSlots[n].duringTime[e]=!0)}),!a){var u=_()(n+" "+c).add(1,"days").format("YYYY-MM-DD");u in i.appointment.bookedTimeSlots||(i.appointment.bookedTimeSlots[u]={onTimeFull:{},onTimeFree:{},duringTime:{}}),u in t&&Object.keys(t[u]).forEach(function(e){(l=i.getStringTimeInSeconds(e)/60)<r&&!(e in i.appointment.bookedTimeSlots[u].duringTime)&&(i.appointment.bookedTimeSlots[u].duringTime[e]=!0)})}})})})},closeSaveConfirmation:function(){this.existingAppointmentAcknowledged=!1,this.fullAppointmentAcknowledged=!1,this.intersectedAppointmentAcknowledged=!1,this.saveConfirmMessage=""},haveSaveConfirmation:function(){if(this.isExistingAppointment()&&!this.existingAppointmentAcknowledged)return this.existingAppointmentAcknowledged=!0,this.fullAppointmentAcknowledged=!0,this.intersectedAppointmentAcknowledged=!0,this.saveConfirmMessage=this.$root.labels.group_booking_message,!0;if(this.isFullAppointment()&&!this.fullAppointmentAcknowledged)return this.existingAppointmentAcknowledged=!0,this.fullAppointmentAcknowledged=!0,this.intersectedAppointmentAcknowledged=!0,this.saveConfirmMessage=this.$root.labels.over_booking_message,!0;if(this.isIntersectedAppointment()&&!this.intersectedAppointmentAcknowledged)return this.existingAppointmentAcknowledged=!0,this.fullAppointmentAcknowledged=!0,this.intersectedAppointmentAcknowledged=!0,this.saveConfirmMessage=this.$root.labels.over_booking_message,!0;var e=this.activeRecurring&&this.enabledRecurring&&this.recurringDatesChanged;return e&&(this.recurringDatesChanged=!1,this.newAppointmentTabs="recurring",this.saveConfirmMessage=this.$root.labels.recurring_changed_message),e},getSelectedDistinctExtras:function(){var e=[],t=[];return this.appointment.bookings.forEach(function(n){n.extras.filter(function(e){return e.selected}).forEach(function(n){-1===t.indexOf(n.id)&&(e.push(n),t.push(n.id))})}),e},refreshRecurringData:function(){this.activeRecurring&&this.enabledRecurring&&this.appointment.selectedDate&&this.appointment.selectedPeriod?(this.serviceUpdated&&(this.serviceUpdated=!1,this.setRecurringData()),this.activeRecurring=!1,this.recurringData.startDate=_()(this.appointment.selectedDate).format("YYYY-MM-DD HH:mm:ss"),this.recurringData.startTime=this.appointment.selectedPeriod.time,this.initialRecurringData.calendarDates=this.getAvailableRecurringDates(this.appointment.calendarTimeSlots),this.activeRecurring=!0,null!==this.recurringData.setupCallback&&this.recurringData.setupCallback("count")):this.appointment.selectedDate||(this.recurringData=this.getDefaultRecurringData(),this.initialRecurringData=null,this.selectedRecurringDates=[])},recurringDatesDefined:function(e){var t=[];if(e.forEach(function(e){t.push({bookingStart:_()(e.date).format("YYYY-MM-DD")+" "+e.time,providerId:e.providerId,locationId:e.locationId})}),"recurring"!==this.newAppointmentTabs)if(this.recurringDatesChanged=!1,t.length!==this.selectedRecurringDates.length)this.recurringDatesChanged=!0;else for(var n=0;n<t.length;n++)if(t[n].bookingStart!==this.selectedRecurringDates[n].bookingStart){this.recurringDatesChanged=!0;break}this.selectedRecurringDates=t},setRecurringData:function(){if(this.appointment.selectedDate&&this.appointment.selectedPeriod){this.recurringData.dates=[],this.recurringData.startDate=_()(this.appointment.selectedDate).format("YYYY-MM-DD HH:mm:ss"),this.recurringData.startTime=this.appointment.selectedPeriod.time;var e=this.getServiceById(this.appointment.serviceId);this.initialRecurringData=this.getDefaultRecurringSettings(this.appointment.selectedDate,e.recurringCycle,this.appointment.calendarTimeSlots)}},setSelectedExtrasCount:function(){var e=0;this.appointment.bookings.forEach(function(t){t.extras.forEach(function(t){t.selected&&e++})}),this.appointment.extrasSelectedCount=e},getMaxBookingDuration:function(){var e=0;return this.appointment.bookings.forEach(function(t){("pending"===t.status||"approved"===t.status)&&t.duration>e&&(e=t.duration)}),e},setDuration:function(){if(this.appointment.serviceId){var e=this.getMaxBookingDuration(),t=0!==e?e:this.getServiceById(this.appointment.serviceId).duration;this.appointment.bookings.forEach(function(e){var n=0;e.extras.forEach(function(e){e.selected&&e.duration>n&&(n=e.duration)}),t+=n}),this.appointment.duration=t}},clearValidation:function(){void 0!==this.$refs.appointment&&this.$refs.appointment.clearValidate()},errorCallback:function(e){var t=this;setTimeout(function(){"timeSlotUnavailable"in e&&!0===e.timeSlotUnavailable&&(t.notify(t.$root.labels.error,t.$root.labels.time_slot_unavailable,"error"),t.getTimeSlots(t.updateCalendar)),"packageBookingUnavailable"in e&&!0===e.packageBookingUnavailable&&(t.notify(t.$root.labels.error,t.$root.labels.package_booking_unavailable,"error"),t.getTimeSlots(t.updateCalendar)),"customerAlreadyBooked"in e&&!0===e.customerAlreadyBooked&&t.notify(t.$root.labels.error,t.$root.labels.customer_already_booked,"error")},200)},addCustomFieldsValidationRules:function(){if(this.appointment.serviceId&&this.appointment.bookings.length>0){this.rules=this.rulesInit;for(var e=0;e<this.appointment.bookings.length;e++)for(var t=0;t<this.options.entities.customFields.length;t++)this.isCustomFieldVisible(this.options.entities.customFields[t],"appointment",this.appointment.serviceId)&&(void 0===this.rules.bookings[e]&&this.$set(this.rules.bookings,e,{type:"array"}),void 0===this.rules.bookings[e].customFields&&this.$set(this.rules.bookings[e],"customFields",{}),this.rules.bookings[e].customFields[this.options.entities.customFields[t].id]={value:[{required:!0,message:this.$root.labels.required_field,trigger:"submit"}]})}},showCustomFieldsTab:function(){var e=Array.prototype.concat.apply([],this.options.entities.customFields.map(function(e){return e.services.map(function(e){return e.id})}));return this.options.entities.customFields.length>0&&this.appointment.bookings.length>0&&this.appointment.serviceId&&(e.includes(this.appointment.serviceId)||this.options.entities.customFields.filter(function(e){return e.allServices}).length>0)},getDefaultRecurringData:function(){return{dates:[],startDate:null,startTime:null,pageRecurringDates:[],pagination:{show:this.$root.settings.general.itemsPerPage,page:1,count:0},recurringString:"",datesCallback:null,setupCallback:null}},enableRecurring:function(){var e=this;this.enabledRecurring&&(this.recurringDatesChanged=!1,this.monthsLoad=0,this.startDateTime=null,this.endDateTime=null,this.getTimeSlots(function(t,n){e.initialRecurringData=null,e.recurringData={dates:[],startDate:null,startTime:null,pageRecurringDates:[],pagination:{show:e.$root.settings.general.itemsPerPage,page:1,count:0},recurringString:"",datesCallback:null,setupCallback:null},e.updateCalendar(t,n),e.setRecurringData(),e.activeRecurring=!0,e.newAppointmentTabs="recurring"}))},validationTabFailCallback:function(){this.newAppointmentTabs="customFields"}},computed:{selectedCustomersMessage:function(){return""!==this.statusMessage?this.$root.labels.selected_customers+" "+this.statusMessage+":":this.$root.labels.selected_customers+":"},customersMaxLimit:function(){var e=this.appointment.bookings.filter(function(e){return"canceled"===e.status||"rejected"===e.status}).length;return this.appointment.serviceId&&this.appointment.providerId&&this.getProviderService()?this.getProviderService().maxCapacity+e:this.appointment.serviceId&&!this.appointment.providerId?this.getServiceById(this.appointment.serviceId).maxCapacity+e:0},showCustomer:function(){return"customer"!==this.$root.settings.role}},watch:{customerCreatedCount:function(){var e=this,t=this.clonedBookings.map(function(e){return e.customer.id});this.bookings.forEach(function(n){-1===t.indexOf(n.customer.id)&&(n.visible=!0,e.clonedBookings.push(n))}),this.clonedBookings.sort(function(e,t){return(e.customer.firstName+" "+e.customer.lastName).localeCompare(t.customer.firstName+" "+t.customer.lastName)}),this.addCustomFieldsValidationRules()},appointment:function(){this.instantiateDialog(),"provider"===this.$root.settings.role&&this.isCabinet&&null!==this.appointment&&null!==this.appointment.providerId&&(this.appointment.providerId=this.options.entities.employees[0].id)}},components:{DialogAppointmentPayment:m.a,DialogCustomFields:h.a,RecurringSetup:E.a,RecurringDates:S.a,DialogActions:d.a,LicenceBlockHeader:D.a}}},819:function(e,t,n){var i=n(90)(n(820),n(821),!1,null,null,null);e.exports=i.exports},820:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(336),o=n(657),a=n(684),s=n(659),r=n(673);t.default={mixins:[i.a,o.a,a.a,s.a,r.a],props:{appointment:{default:function(){},type:Object},isCabinet:!1,options:null,recurring:{default:function(){return[]},type:Array}},data:function(){return{paymentStatuses:[{value:"paid",label:this.$root.labels.paid},{value:"pending",label:this.$root.labels.pending},{value:"partiallyPaid",label:this.$root.labels.partially_paid}]}},methods:{showDialogEditPayment:function(e,t){e.customerId=t.customerId;var n=t.packageCustomerService?this.getPackageById(t.packageCustomerService.packageCustomer.packageId):null;this.$emit("editPayment",{payment:e,appointment:this.appointment,booking:t,package:t.packageCustomerService?n||{name:"Package"}:null,recurring:this.recurring})},getPaymentStatus:function(e){var t="";return this.paymentStatuses.forEach(function(n){n.value===e&&(t=n.label)}),t},getPackageDiscount:function(e){var t=e.packageCustomerService.packageCustomer.price,n=e.coupon;return t/100*(n?n.discount:0)+(n?n.deduction:0)},getPackageDue:function(e){var t=this.getPackageTotal(e)-(e.payments.length>0?e.payments.filter(function(e){return"refunded"!==e.status}).reduce(function(e,t){return e+t.amount},0):0);return t>=0?t:0},getPackageTotal:function(e){var t=e.packageCustomerService.packageCustomer.price+this.getPackageTax(e)-this.getPackageDiscount(e);return t>=0?t:0},getPackageTax:function(e){return e.packageCustomerService.packageCustomer.payments.length>0&&e.packageCustomerService.packageCustomer.payments.filter(function(e){return e.wcItemTaxValue}).length>0?e.packageCustomerService.packageCustomer.payments.reduce(function(e,t){return e+t.wcItemTaxValue},0):0},getBookingSubtotal:function(e){return e.serviceTotalPrice+e.extrasTotalPrice},getBookingDiscount:function(e){return e.discountTotalPrice+(e.payments.length>0&&e.payments.filter(function(e){return e.wcItemCouponValue}).length>0?e.payments.reduce(function(e,t){return e+t.wcItemCouponValue},0):0)},getBookingDue:function(e){var t=this.getBookingTotal(e)-(e.payments.length>0?e.payments.filter(function(e){return"refunded"!==e.status&&"pending"!==e.status}).reduce(function(e,t){return e+t.amount},0):0);return t>=0?t:0},getRefundedAmount:function(e){return e.payments.filter(function(e){return"refunded"===e.status}).reduce(function(e,t){return e+t.amount},0)},getBookingTotal:function(e){var t=this.getBookingSubtotal(e)+e.taxTotalPrice+this.getBookingTax(e)-this.getBookingDiscount(e);return t>=0?t:0},getBookingTax:function(e){return e.payments.length>0&&e.payments.filter(function(e){return e.wcItemTaxValue}).length>0?e.payments.reduce(function(e,t){return e+t.wcItemTaxValue},0):0}}}},821:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"am-dialog-table"},[e.appointment.bookings.length>0?n("div",e._l(e.appointment.bookings,function(t){return t.id?n("div",{staticClass:"am-customer-extras"},[n("el-row",{staticClass:"am-customer-extras-data"},[n("el-col",[n("h3",{class:e.getNoShowClass(t.customerId)},[e._v(e._s(t.customer.firstName)+" "+e._s(t.customer.lastName))]),e._v(" "),n("span",[e._v(e._s(t.customer.email))])])],1),e._v(" "),n("div",{staticClass:"am-appointment-payments-dialog"},[n("el-row",{staticClass:"am-customer-extras-payment",attrs:{gutter:10}},[n("el-col",{attrs:{span:12}},[n("span",{staticClass:"am-strong"},[e._v(e._s(e.$root.labels.payment))])]),e._v(" "),n("el-col",{attrs:{span:12}},[n("span",{staticClass:"am-link",on:{click:function(n){return e.showDialogEditPayment(t.payments[0],t)}}},[e._v("\n "+e._s(e.$root.labels.edit_payment_details)+"\n ")])]),e._v(" "),n("el-col",{attrs:{span:12}},[n("span",[e._v(e._s(e.$root.labels.date)+":")])]),e._v(" "),n("el-col",{attrs:{span:12}},e._l(t.payments,function(t){return n("el-row",{key:t.id},[n("span",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFrontedFormattedDate(t.dateTime)))])])}),1),e._v(" "),n("el-col",{attrs:{span:12}},[n("span",[e._v(e._s(e.$root.labels.payment_method)+":")])]),e._v(" "),n("el-col",{attrs:{span:12}},e._l(t.payments,function(t,i){return n("el-row",{key:t.id,attrs:{align:"center"}},[n("span",{key:t.id,staticClass:"am-semi-strong"},[n("img",{staticClass:"svg-amelia",style:{width:e.getPaymentIconWidth(t.gateway),verticalAlign:"middle"},attrs:{src:e.$root.getUrl+"public/img/payments/"+e.getPaymentIconName(t)}}),e._v(" "),e.longNamePayments(t.gateway)?e._e():n("span",[e._v(e._s(e.getPaymentGatewayNiceName(t)))])])])}),1),e._v(" "),t.payments.find(function(e){return e.wcOrderId})&&!e.isCabinet?n("el-col",{attrs:{span:12}},[n("span",[e._v(e._s(e.$root.labels.wc_order)+":")])]):e._e(),e._v(" "),t.payments.find(function(e){return e.wcOrderId})&&!e.isCabinet?n("el-col",{attrs:{span:12}},e._l(t.payments,function(t){return n("el-row",{key:t.id},[n("a",{attrs:{href:t.wcOrderUrl,target:"_blank"}},[e._v("\n #"+e._s(t.wcOrderId)+"\n ")])])}),1):e._e(),e._v(" "),n("el-col",{attrs:{span:12}},[n("span",[e._v(e._s(e.$root.labels.status)+":")])]),e._v(" "),n("el-col",{attrs:{span:12}},e._l(t.payments,function(t){return n("el-row",{key:t.id},[n("span",{staticClass:"am-semi-strong am-payment-status"},[n("span",{class:"am-payment-status-symbol am-payment-status-symbol-"+t.status}),e._v("\n "+e._s(e.getPaymentStatusNiceName(t.status))+"\n ")])])}),1),e._v(" "),t.packageCustomerService?n("el-col",{attrs:{span:12}},[n("span",[e._v(e._s(e.$root.labels.package)+":")])]):e._e(),e._v(" "),t.packageCustomerService?n("el-col",{staticClass:"am-payment-package-name",attrs:{span:12}},[n("img",{attrs:{src:e.$root.getUrl+"public/img/am-package.svg"}}),e._v(" "),n("span",{staticClass:"am-semi-strong"},[e._v("\n "+e._s((e.pack=e.getPackageById(t.packageCustomerService.packageCustomer.packageId))?e.pack.name:"Package")+"\n ")])]):e._e()],1),e._v(" "),t.packageCustomerService?n("el-row",{staticClass:"subtotal",attrs:{gutter:10}},[n("div",{staticClass:"am-payment-package-deal"},[n("img",{attrs:{src:e.$root.getUrl+"public/img/am-package-black.svg"}}),e._v(" "),n("span",[e._v(e._s(e.$root.labels.package_deal))])]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:14}},[e._v("\n "+e._s(e.$root.labels.package_price)+":\n ")]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:10}},[e._v("\n "+e._s(e.getFormattedPrice(t.packageCustomerService.packageCustomer.price))+"\n ")]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:14}},[e._v("\n "+e._s(e.$root.labels.discount_amount)+":\n ")]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:10}},[e._v("\n "+e._s(e.getFormattedPrice(e.getPackageDiscount(t)))+"\n ")]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:14}},[1===t.payments.length?n("span",[e._v(e._s(e.$root.labels.paid))]):e._e(),e._v(" "),t.payments.length>1?n("span",[e._v(e._s(e.$root.labels.paid_deposit))]):e._e()]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:10}},[n("el-row",{staticStyle:{"margin-bottom":"0"}},[1===t.payments.length?n("span",[e._v("\n "+e._s(e.getFormattedPrice(t.payments.filter(function(e){return"pending"!==e.status&&"refunded"!==e.status}).reduce(function(e,t){return e+t.amount},0)))+"\n ")]):e._e(),e._v(" "),t.payments.length>1?n("span",[e._v("\n "+e._s(e.getFormattedPrice(t.payments.filter(function(e){return"partiallyPaid"===e.status}).reduce(function(e,t){return e+t.amount},0)))+"\n ")]):e._e()])],1),e._v(" "),t.packageCustomerService.packageCustomer.payments.length>1?n("el-col",{staticClass:"align-right",attrs:{span:14}},[n("span",[e._v(e._s(e.$root.labels.paid_remaining_amount))])]):e._e(),e._v(" "),t.packageCustomerService.packageCustomer.payments.length>1?n("el-col",{staticClass:"align-right",attrs:{span:10}},[n("el-row",{staticStyle:{"margin-bottom":"0"}},[n("span",[e._v("\n "+e._s(e.getFormattedPrice(t.packageCustomerService.packageCustomer.payments.filter(function(e){return"paid"===e.status}).reduce(function(e,t){return e+t.amount},0)))+"\n ")])])],1):e._e(),e._v(" "),e.getRefundedAmount(t)>0?n("el-col",{staticClass:"align-right",attrs:{span:14}},[n("span",[e._v(e._s(e.$root.labels.refunded))])]):e._e(),e._v(" "),e.getRefundedAmount(t)>0?n("el-col",{staticClass:"align-right",attrs:{span:10}},[n("span",[e._v(e._s(e.getFormattedPrice(e.getRefundedAmount(t))))])]):e._e(),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:14}},[n("span",[e._v(e._s(e.$root.labels.due)+":")])]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:10}},[n("span",[e._v(e._s(e.getFormattedPrice(e.getPackageDue(t))))])]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:14}},[n("span",{staticClass:"am-strong"},[e._v(e._s(e.$root.labels.total)+":")])]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:10}},[n("span",{staticClass:"am-strong"},[e._v(e._s(e.getFormattedPrice(e.getPackageTotal(t))))])])],1):n("el-row",{staticClass:"subtotal",attrs:{gutter:10}},[n("el-col",{staticClass:"align-right",attrs:{span:14}},[e._v("\n "+e._s(e.$root.labels.price)+":\n ")]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:10}},[e._v("\n "+e._s(e.getFormattedPrice(t.serviceTotalPrice))+"\n ")]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:14}},[e._v("\n "+e._s(e.$root.labels.extras)+":\n ")]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:10}},[e._v("\n "+e._s(e.getFormattedPrice(t.extrasTotalPrice))+"\n ")]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:14}},[n("span",[e._v(e._s(e.$root.labels.subtotal)+":")])]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:10}},[n("span",[e._v(e._s(e.getFormattedPrice(e.getBookingSubtotal(t))))])]),e._v(" "),e.getBookingDiscount(t)?n("el-col",{staticClass:"align-right",attrs:{span:14}},[e._v("\n "+e._s(e.$root.labels.discount_amount)+":\n ")]):e._e(),e._v(" "),e.getBookingDiscount(t)?n("el-col",{staticClass:"align-right",attrs:{span:10}},[e._v("\n "+e._s(e.getFormattedPrice((e.discount=e.getBookingDiscount(t))>(e.subtotal=e.getBookingSubtotal(t))?e.subtotal:e.discount))+"\n ")]):e._e(),e._v(" "),t.taxTotalPrice?n("el-col",{staticClass:"align-right",attrs:{span:14}},[e._v("\n "+e._s(e.$root.labels.tax)+":\n ")]):e._e(),e._v(" "),t.taxTotalPrice?n("el-col",{staticClass:"align-right",attrs:{span:10}},[e._v("\n "+e._s(e.getFormattedPrice(t.taxTotalPrice))+"\n ")]):e._e(),e._v(" "),e.getBookingTax(t)?n("el-col",{staticClass:"align-right",attrs:{span:14}},[e._v("\n "+e._s(e.$root.labels.tax)+" (Woo):\n ")]):e._e(),e._v(" "),e.getBookingTax(t)?n("el-col",{staticClass:"align-right",attrs:{span:10}},[e._v("\n "+e._s(e.getFormattedPrice(e.getBookingTax(t)))+"\n ")]):e._e(),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:14}},[1===t.payments.length?n("span",[e._v(e._s(e.$root.labels.paid)+":")]):e._e(),e._v(" "),t.payments.length>1?n("span",[e._v(e._s(e.$root.labels.paid_deposit)+":")]):e._e()]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:10}},[1===t.payments.length?n("span",[e._v(e._s(e.getFormattedPrice(t.payments.filter(function(e){return"pending"!==e.status&&"refunded"!==e.status}).reduce(function(e,t){return e+t.amount},0))))]):e._e(),e._v(" "),t.payments.length>1?n("span",[e._v(e._s(e.getFormattedPrice(t.payments.filter(function(e){return"partiallyPaid"===e.status}).reduce(function(e,t){return e+t.amount},0))))]):e._e()]),e._v(" "),t.payments.length>1?n("el-col",{staticClass:"align-right",attrs:{span:14}},[n("span",[e._v(e._s(e.$root.labels.paid_remaining_amount)+":")])]):e._e(),e._v(" "),t.payments.length>1?n("el-col",{staticClass:"align-right",attrs:{span:10}},[n("span",[e._v(e._s(e.getFormattedPrice(t.payments.filter(function(e){return"paid"===e.status}).reduce(function(e,t){return e+t.amount},0))))])]):e._e(),e._v(" "),e.getRefundedAmount(t)>0?n("el-col",{staticClass:"align-right",attrs:{span:14}},[n("span",[e._v(e._s(e.$root.labels.refunded)+":")])]):e._e(),e._v(" "),e.getRefundedAmount(t)>0?n("el-col",{staticClass:"align-right",attrs:{span:10}},[n("span",[e._v(e._s(e.getFormattedPrice(e.getRefundedAmount(t))))])]):e._e(),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:14}},[n("span",[e._v(e._s(e.$root.labels.due)+":")])]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:10}},[n("span",[e._v(e._s(e.getFormattedPrice(e.getBookingDue(t))))])]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:14}},[n("span",{staticClass:"am-strong"},[e._v(e._s(e.$root.labels.total)+":")])]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:10}},[n("span",{staticClass:"am-strong"},[e._v(e._s(e.getFormattedPrice(e.getBookingTotal(t))))])])],1)],1)],1):e._e()}),0):n("div",[n("p",{attrs:{align:"center"}},[e._v(e._s(e.$root.labels.no_selected_customers))])])])},staticRenderFns:[]}},822:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"am-dialog-appointment"},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[n("div",{staticClass:"am-dialog-loader-content"},[n("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}}),e._v(" "),n("p",[e._v(e._s(e.$root.labels.loader_message))])])]),e._v(" "),null===e.appointment||e.dialogLoading?e._e():n("div",{staticClass:"am-dialog-scrollable",class:{"am-edit":0!==e.appointment.id}},[e.showHeader?n("div",{staticClass:"am-dialog-header"},[n("el-row",[n("el-col",{attrs:{span:18}},[0!==e.appointment.id?n("h2",[e._v(e._s(e.$root.labels.edit_appointment))]):n("h2",[e._v(e._s(e.$root.labels.new_appointment))])]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:6}},[n("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:e.closeDialog}})],1)],1)],1):e._e(),e._v(" "),e.mounted&&null!==e.appointment?n("el-form",{ref:"appointment",attrs:{model:e.appointment,rules:e.rules,"label-position":"top"}},[n("el-tabs",{on:{"tab-click":e.handleTabClick},model:{value:e.newAppointmentTabs,callback:function(t){e.newAppointmentTabs=t},expression:"newAppointmentTabs"}},[n("el-tab-pane",{attrs:{label:e.$root.labels.schedule,name:"schedule"}},[e.showCustomer?n("el-form-item",{staticClass:"am-appointment-customer",attrs:{label:e.$root.labels.customers_singular_plural+":",prop:"bookings"}},[n("el-select",{staticClass:"no-tags",attrs:{"value-key":"customer.id",remote:"",multiple:"",filterable:"","collapse-tags":"",loading:e.loadingCustomers,"multiple-limit":e.customersMaxLimit,placeholder:e.$root.labels.select_customers,"popper-class":"am-dropdown-cabinet","remote-method":e.searchExistingCustomers,disabled:null!==e.packageCustomer},on:{change:e.handleCustomerChange},model:{value:e.appointment.bookings,callback:function(t){e.$set(e.appointment,"bookings",t)},expression:"appointment.bookings"}},[n("div",{staticClass:"am-drop"},[this.$root.settings.additionalCapabilities.canWriteCustomers?n("div",{staticClass:"am-drop-create-item",on:{click:e.showDialogNewCustomer}},[e._v("\n "+e._s(e.$root.labels.create_new)+"\n ")]):e._e(),e._v(" "),e._l(e.clonedBookings,function(t,i){return t.visible?n("el-option",{key:i,staticClass:"am-has-option-meta",attrs:{label:null!==(e.user=e.getCustomerInfo(t))?e.user.firstName.trim()||e.user.lastName.trim()?e.user.firstName+" "+e.user.lastName:e.$root.labels.customer+" "+e.user.id:"",value:t}},[n("span",{class:e.getOptionClass(t,e.customersNoShowCount,t.customer.status)},[e._v("\n "+e._s(t.customer.firstName.trim()||t.customer.lastName.trim()?"":e.$root.labels.customer+" "+t.customer.id)+" "+e._s(t.customer.firstName+" "+t.customer.lastName)+"\n ")]),e._v(" "),t.customer.email?n("span",{staticClass:"am-drop-item-meta"},[e._v("\n "+e._s(t.customer.email)+"\n ")]):e._e()]):e._e()}),e._v(" "),e._l([{customer:{id:0,firstName:"",lastName:"",email:"",info:JSON.stringify({firstName:"",lastName:"",email:"",phone:""})}}],function(t){return 0===e.clonedBookings.length?n("el-option",{key:t.customer.id,staticClass:"am-has-option-meta",style:{display:"none"},attrs:{label:null!==(e.user=e.getCustomerInfo(t))?e.user.firstName.trim()||e.user.lastName.trim()?e.user.firstName+" "+e.user.lastName:e.$root.labels.customer+" "+e.user.id:"",value:t}}):e._e()})],2)])],1):e._e(),e._v(" "),n("transition",{attrs:{name:"fade"}},[e.appointment.bookings.length>0&&"customer"!==this.$root.settings.role?n("div",{staticClass:"am-selected-dropdown-items"},[n("el-form-item",{attrs:{label:e.selectedCustomersMessage}}),e._v(" "),e._l(e.appointment.bookings,function(t,i){return n("div",{key:i,staticClass:"am-selected-dropdown-item"},[n("el-row",{staticClass:"am-selected-dropdown-item__inner",attrs:{align:"middle",gutter:4,justify:"left"}},[n("el-col",{attrs:{sm:10}},[n("h3",{class:e.isCabinet?"":e.getNoShowClass(e.packageServices&&!e.appointment.id?e.getCustomerInfo(t).id:t.customerId,e.customersNoShowCount,null,t.customer.status)},[e._v("\n "+e._s(null!==(e.user=e.getCustomerInfo(t))?e.user.firstName.trim()||e.user.lastName.trim()?e.user.firstName+" "+e.user.lastName:e.$root.labels.customer+" "+e.user.id:"")+"\n ")]),e._v(" "),t.customer.email?n("a",{staticClass:"am-customer-link",attrs:{href:"mailto:"+t.customer.email}},[e._v("\n "+e._s(t.customer.email)+"\n ")]):e._e(),e._v(" "),t.customer.phone?n("a",{staticClass:"am-customer-link",attrs:{href:"tel:"+t.customer.phone}},[e._v("\n "+e._s(t.customer.phone)+"\n ")]):e._e()]),e._v(" "),n("el-col",{staticClass:"am-align-right",attrs:{sm:14}},[n("div",{staticClass:"am-appointment-status small"},[n("span",{class:"am-appointment-status-symbol am-appointment-status-symbol-"+t.status}),e._v(" "),n("el-select",{attrs:{disabled:e.disableStatusChange(),"popper-class":"am-dropdown-cabinet"},on:{change:e.handleBookingChange},model:{value:t.status,callback:function(n){e.$set(t,"status",n)},expression:"booking.status"}},e._l(e.getAllowedStatuses(),function(e){return n("el-option",{key:e.value,staticClass:"am-appointment-dialog-status-option",attrs:{value:e.value}},[n("span",{class:"am-appointment-status-symbol am-appointment-status-symbol-"+e.value})])}),1)],1),e._v(" "),n("div",{staticClass:"am-appointment-persons small"},[n("img",{staticClass:"svg-amelia",attrs:{slot:"prefix",width:"16px",src:e.$root.getUrl+"public/img/group.svg"},slot:"prefix"}),e._v(" "),n("el-select",{staticClass:"small-status",attrs:{"popper-class":"am-dropdown-cabinet","no-data-text":e.$root.labels.choose_a_group_service,disabled:null!==e.packageCustomer||"packageCustomerService"in t&&null!==t.packageCustomerService},on:{change:e.handlePersonsChange},model:{value:t.persons,callback:function(n){e.$set(t,"persons",n)},expression:"booking.persons"}},e._l(e.appointment.providerServiceMaxAdditonalCapacity,function(e){return n("el-option",{key:e,attrs:{value:e}})}),1)],1),e._v(" "),!e.packageServices&&e.appointment.serviceId&&e.isDurationPricingEnabled(e.getServiceById(e.appointment.serviceId).customPricing)?n("div",{staticClass:"am-appointment-duration small"},[n("img",{staticClass:"svg-amelia",attrs:{slot:"prefix",width:"16px",src:e.$root.getUrl+"public/img/duration.svg"},slot:"prefix"}),e._v(" "),n("el-select",{staticClass:"small-status",attrs:{"popper-class":"am-dropdown-cabinet","no-data-text":e.$root.labels.choose_a_group_service},on:{change:e.handleBookingChange},model:{value:t.duration,callback:function(n){e.$set(t,"duration",n)},expression:"booking.duration"}},e._l(e.getPossibleCustomDurations(t),function(t){return n("el-option",{key:t,attrs:{label:e.secondsToNiceDuration(t),value:t}})}),1)],1):e._e(),e._v(" "),null===e.packageCustomer?n("div",{staticClass:"am-appointment-remove small"},[n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.customers_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})]),e._v(" "),n("i",{staticClass:"el-icon-close remove",on:{click:function(t){return e.handleCustomerRemove(i)}}})],1):e._e()])],1)],1)}),e._v(" "),e.appointment.bookings.length>1?n("div",{staticClass:"group-status-change"},[n("el-row",{attrs:{gutter:4}},[n("el-col",{attrs:{sm:14}},[n("h3",[e._v(e._s(e.$root.labels.change_group_status))])]),e._v(" "),n("el-col",{attrs:{sm:10}},[n("el-form-item",[n("div",{staticClass:"am-appointment-status"},[n("span",{class:"am-appointment-status-symbol am-appointment-status-symbol-"+e.appointment.status}),e._v(" "),n("el-select",{attrs:{disabled:e.disableStatusChange(),"popper-class":"am-dropdown-cabinet"},on:{change:e.handleGroupStatusChange,"visible-change":e.handleSelected},model:{value:e.appointment.status,callback:function(t){e.$set(e.appointment,"status",t)},expression:"appointment.status"}},e._l(e.getAllowedStatuses(),function(t){return n("el-option",{key:t.value,staticClass:"am-appointment-status-option",attrs:{label:t.label,value:t.value}},[n("span",{class:"am-appointment-status-symbol am-appointment-status-symbol-"+t.value},[e._v("\n "+e._s(t.label)+"\n ")])])}),1)],1)])],1)],1)],1):e._e()],2):e._e()]),e._v(" "),n("el-form-item",{class:{active:e.categorySpinnerActive},attrs:{label:e.$root.labels.category+":"}},[n("el-select",{attrs:{filterable:"",clearable:"",placeholder:e.$root.labels.select_service_category,"popper-class":"am-dropdown-cabinet",disabled:"customer"===e.$root.settings.role},on:{change:e.handleCategoryChange},model:{value:e.appointment.categoryId,callback:function(t){e.$set(e.appointment,"categoryId",t)},expression:"appointment.categoryId"}},e._l(e.categoriesFiltered,function(t){return n("el-option",{directives:[{name:"show",rawName:"v-show",value:"provider"===e.$root.settings.role&&!t.disabled||"provider"!==e.$root.settings.role,expression:"($root.settings.role === 'provider' && !item.disabled) || $root.settings.role !== 'provider'"}],key:t.id,attrs:{disabled:t.disabled,label:t.name,value:t.id}})}),1),e._v(" "),n("img",{staticClass:"svg-amelia is-spinner",attrs:{src:e.$root.getUrl+"public/img/oval-spinner.svg"}})],1),e._v(" "),n("el-form-item",{class:{active:e.serviceSpinnerActive},attrs:{prop:"serviceId",label:e.capitalizeFirstLetter(e.$root.labels.service)+":"}},[n("el-select",{attrs:{filterable:"",clearable:"",placeholder:e.$root.labels.select_service+":","popper-class":"am-dropdown-cabinet am-appointment-services",disabled:"customer"===e.$root.settings.role},on:{change:e.handleServiceChange},model:{value:e.appointment.serviceId,callback:function(t){e.$set(e.appointment,"serviceId",t)},expression:"appointment.serviceId"}},e._l(e.getAllowedServices(),function(t){return n("el-option",{directives:[{name:"show",rawName:"v-show",value:"provider"===e.$root.settings.role&&!t.disabled||"provider"!==e.$root.settings.role,expression:"($root.settings.role === 'provider' && !item.disabled) || $root.settings.role !== 'provider'"}],key:t.id,attrs:{disabled:t.disabled,label:t.name,value:t.id}})}),1),e._v(" "),n("img",{staticClass:"svg-amelia is-spinner",attrs:{src:e.$root.getUrl+"public/img/oval-spinner.svg"}})],1),e._v(" "),e.locationsFiltered.length?n("el-form-item",{class:{active:e.locationSpinnerActive},attrs:{label:e.$root.labels.location+":",disabled:"customer"===e.$root.settings.role}},[n("el-select",{attrs:{filterable:"",clearable:"",placeholder:e.$root.labels.select_location,"popper-class":"am-dropdown-cabinet"},on:{change:e.handleLocationChange},model:{value:e.appointment.locationId,callback:function(t){e.$set(e.appointment,"locationId",t)},expression:"appointment.locationId"}},e._l(e.locationsFiltered,function(t){return n("el-option",{directives:[{name:"show",rawName:"v-show",value:"provider"===e.$root.settings.role&&!t.disabled||"provider"!==e.$root.settings.role,expression:"($root.settings.role === 'provider' && !item.disabled) || $root.settings.role !== 'provider'"}],key:t.id,attrs:{disabled:t.disabled,label:t.name,value:t.id}})}),1),e._v(" "),n("img",{staticClass:"svg-amelia is-spinner",attrs:{src:e.$root.getUrl+"public/img/oval-spinner.svg"}})],1):e._e(),e._v(" "),e.notInLicence("starter")?e._e():n("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.$root.settings.capabilities.canReadOthers&&e.$root.settings.capabilities.canWriteOthers,expression:"$root.settings.capabilities.canReadOthers && $root.settings.capabilities.canWriteOthers"}],class:{active:e.employeeSpinnerActive},attrs:{label:e.capitalizeFirstLetter(e.$root.labels.employee)+":",prop:"providerId"}},[n("el-select",{attrs:{filterable:"",clearable:"",placeholder:e.$root.labels.select_employee,"popper-class":"am-dropdown-cabinet am-appointment-employees",disabled:"customer"===e.$root.settings.role},on:{change:e.handleEmployeeChange},model:{value:e.appointment.providerId,callback:function(t){e.$set(e.appointment,"providerId",t)},expression:"appointment.providerId"}},e._l(e.employeesFiltered,function(t){return n("el-option",{key:t.id,attrs:{disabled:t.disabled,label:t.firstName+" "+t.lastName,value:t.id}},[n("span",[e._v("\n "+e._s(t.firstName+" "+t.lastName)+"\n ")]),e._v(" "),t.badge?n("span",{staticClass:"am-employee-badge",style:{background:t.badge.color}},[e._v("\n "+e._s(t.badge.content)+"\n ")]):e._e()])}),1),e._v(" "),n("img",{staticClass:"svg-amelia is-spinner",attrs:{src:e.$root.getUrl+"public/img/oval-spinner.svg"}})],1),e._v(" "),n("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.$root.settings.lessonSpace.enabled&&"customer"!==e.$root.settings.role,expression:"$root.settings.lessonSpace.enabled && $root.settings.role !== 'customer'"}],attrs:{label:e.$root.labels.lesson_space+":",prop:"lessonSpaceId"}},[n("el-select",{attrs:{filterable:"",clearable:"","popper-class":"am-dropdown-cabinet",disabled:"customer"===e.$root.settings.role,loading:e.loadingSpaces,remote:"","remote-method":e.searchExistingSpaces},model:{value:e.appointment.lessonSpace,callback:function(t){e.$set(e.appointment,"lessonSpace",t)},expression:"appointment.lessonSpace"}},[n("el-option",{key:0,attrs:{label:e.$root.labels.lesson_space_new_space,value:0}}),e._v(" "),e._l(e.spaces,function(e){return n("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})],2)],1),e._v(" "),e.packageServices&&e.packageServices.length||!(e.couponsFilteredService.length>0)||!e.showCoupon||"admin"!==e.$root.settings.role&&"manager"!==e.$root.settings.role?e._e():n("el-form-item",{class:{active:e.categorySpinnerActive},attrs:{label:e.$root.labels.apply_coupon}},[n("el-select",{attrs:{filterable:"",clearable:"",placeholder:e.$root.labels.select_coupon,"popper-class":"am-dropdown-cabinet",disabled:"customer"===e.$root.settings.role},on:{change:e.filterServices},model:{value:e.coupon,callback:function(t){e.coupon=t},expression:"coupon"}},e._l(e.couponsFilteredService,function(t){return n("el-option",{key:t.id,attrs:{disabled:t.disabled,label:t.code+(e.couponExpired(t.expirationDate)?" - "+e.$root.labels.expired:""),value:t.id}})}),1),e._v(" "),n("img",{staticClass:"svg-amelia is-spinner",attrs:{src:e.$root.getUrl+"public/img/oval-spinner.svg"}})],1),e._v(" "),n("el-row",{attrs:{gutter:20}},[n("el-col",{staticClass:"v-calendar-column",attrs:{lg:12,md:12,sm:24}},[n("el-form-item",{class:{active:e.loadingTimeSlots&&!e.calendarNavigating},style:{"pointer-events":e.loadingTimeSlots&&!e.calendarNavigating?"none":"all"},attrs:{label:e.$root.labels.date+":",prop:"selectedDate"}},[n("v-date-picker",{attrs:{mode:"single","popover-visibility":"focus","popover-direction":"top","popover-align":e.screenWidth<768?"center":"left","tint-color":e.isCabinet?e.$root.settings.customization.primaryColor:"#1A84EE","is-required":!0,"is-expanded":!1,"show-day-popover":!1,"input-props":{class:"el-input__inner",readOnly:"readonly"},"available-dates":e.availableDates,"disabled-dates":e.disabledWeekdays,disabled:!1,formats:e.vCalendarFormats,"popover-keep-visible-on-input":!0,"theme-styles":{weeks:e.loadingTimeSlots?{background:"url("+e.$root.getUrl+"public/img/oval-spinner.svg)",backgroundRepeat:"no-repeat",backgroundSize:"40%",backgroundPosition:"center",pointerEvents:"none"}:{},dayCellNotInMonth:{opacity:0,display:"none"}},attributes:e.attributes},on:{"update:fromPage":e.changedMonth,input:e.dateSelected},model:{value:e.appointment.selectedDate,callback:function(t){e.$set(e.appointment,"selectedDate",t)},expression:"appointment.selectedDate"}}),e._v(" "),n("img",{staticClass:"svg-amelia is-spinner is-spinner-right",attrs:{src:e.$root.getUrl+"public/img/oval-spinner.svg"}})],1)],1),e._v(" "),n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("el-form-item",{class:{active:e.loadingTimeSlots},attrs:{label:e.$root.labels.time+":",prop:"selectedPeriod.time"}},[n("el-select",{attrs:{"value-key":"time",filterable:"",placeholder:e.$root.labels.select_time,"popper-class":"am-dropdown-cabinet am-appointment-slots"},on:{change:function(t){return e.selectedTime()}},model:{value:e.appointment.selectedPeriod,callback:function(t){e.$set(e.appointment,"selectedPeriod",t)},expression:"appointment.selectedPeriod"}},e._l(e.appointment.dateTimeSlots,function(t){return n("el-option",{key:t.time,attrs:{label:e.getFrontedFormattedTime(t.time+":00"),value:t},domProps:{innerHTML:e._s(e.getSlotLabel(t))}})}),1),e._v(" "),n("img",{staticClass:"svg-amelia is-spinner",attrs:{src:e.$root.getUrl+"public/img/oval-spinner.svg"}})],1)],1)],1),e._v(" "),e.packageServices||"customer"===e.$root.settings.role||e.appointment.id||!e.appointment.serviceId||"disabled"===e.getServiceById(e.appointment.serviceId).recurringCycle?e._e():n("el-form-item",{staticClass:"am-recurring-check"},[n("el-checkbox",{attrs:{disabled:!e.appointment.selectedDate||!e.appointment.selectedPeriod||!e.appointment.providerId},on:{change:function(t){return e.enableRecurring()}},model:{value:e.enabledRecurring,callback:function(t){e.enabledRecurring=t},expression:"enabledRecurring"}},[e._v("\n "+e._s(e.$root.labels.recurring_active)+"\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.recurring_active_tooltip)},slot:"content"}),e._v(" "),e.appointment.providerId?e._e():n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.recurring_select_employee)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)],1),e._v(" "),"customer"!==this.$root.settings.role?n("el-form-item",[n("el-checkbox",{on:{change:function(t){return e.clearValidation()}},model:{value:e.appointment.notifyParticipants,callback:function(t){e.$set(e.appointment,"notifyParticipants",t)},expression:"appointment.notifyParticipants"}},[e._v("\n "+e._s(e.$root.labels.notify_customers)+"\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.notify_customers_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)],1):e._e(),e._v(" "),e.isGenerateLinkVisible()?n("el-form-item",[n("el-checkbox",{on:{change:function(t){return e.clearValidation()}},model:{value:e.appointment.createPaymentLinks,callback:function(t){e.$set(e.appointment,"createPaymentLinks",t)},expression:"appointment.createPaymentLinks"}},[e._v("\n "+e._s(e.$root.labels.generate_payment_links)+"\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.generate_payment_links_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)],1):e._e(),e._v(" "),"customer"!==this.$root.settings.role?n("div",{staticClass:"am-divider"}):e._e(),e._v(" "),"customer"!==this.$root.settings.role?n("el-form-item",{attrs:{label:e.$root.labels.note_internal+":"}},[n("el-input",{attrs:{type:"textarea",placeholder:"",autosize:{minRows:4,maxRows:6}},on:{input:function(t){return e.clearValidation()}},model:{value:e.appointment.internalNotes,callback:function(t){e.$set(e.appointment,"internalNotes",t)},expression:"appointment.internalNotes"}})],1):e._e()],1),e._v(" "),"customer"===e.$root.settings.role||e.packageCustomer?e._e():n("el-tab-pane",{attrs:{name:"extras"}},[n("LicenceBlockHeader",{attrs:{licence:"starter"}}),e._v(" "),n("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$root.labels.extras)+"\n "),e.appointment.serviceId&&e.appointment.bookings.length>0&&e.appointment.extrasSelectedCount>0?n("el-badge",{staticClass:"mark",attrs:{value:e.appointment.extrasSelectedCount}}):e._e()],1),e._v(" "),n("div",{staticClass:"am-dialog-table",class:e.licenceClassDisabled("starter")},[e.appointment.providerId&&e.appointment.serviceId&&e.appointment.extrasCount>0&&e.appointment.bookings.length>0?n("div",e._l(e.appointment.bookings,function(t,i){return["approved","pending","rejected"].includes(t.status)?n("div",{key:i,staticClass:"am-customer-extras"},[n("el-row",{staticClass:"am-customer-extras-data"},[n("el-col",[n("h3",[e._v("\n "+e._s(t.customer.firstName+" "+t.customer.lastName)+"\n ")]),e._v(" "),n("span",[e._v(e._s(t.customer.email))])])],1),e._v(" "),e._l(t.extras,function(t){return n("el-row",{key:t.extraId,attrs:{gutter:10}},[n("el-col",{attrs:{sm:10,xs:24}},[n("el-row",[n("el-col",{attrs:{sm:4,xs:2}},[n("el-checkbox",{on:{change:function(n){return e.handleExtrasSelectionChange(t)}},model:{value:t.selected,callback:function(n){e.$set(t,"selected",n)},expression:"item.selected"}})],1),e._v(" "),n("el-col",{attrs:{sm:20,xs:22}},[n("span",[e._v(e._s(t.name))])])],1)],1),e._v(" "),n("el-col",{attrs:{sm:14,xs:24}},[n("el-row",[n("el-col",{staticClass:"align-right",attrs:{sm:14,xs:14}},[n("el-input-number",{attrs:{size:"small",type:"number",min:1,max:t.maxQuantity,value:t.quantity,disabled:!t.selected},on:{change:function(n){return e.handleExtrasSelectionChange(t)}},model:{value:t.quantity,callback:function(n){e.$set(t,"quantity",n)},expression:"item.quantity"}})],1),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{sm:10,xs:10}},[e._v("\n "+e._s(e.getFormattedPrice(t.price))+"\n ")])],1)],1)],1)}),e._v(" "),n("el-row",{staticClass:"subtotal",attrs:{gutter:10}},[n("el-col",{staticClass:"align-right",attrs:{span:14}},[e._v("\n "+e._s(e.$root.labels.subtotal)+":\n ")]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:10}},[e._v("\n "+e._s(e.getFormattedPrice(t.extrasTotalPrice))+"\n ")])],1)],2):e._e()}),0):e.appointment.serviceId&&e.appointment.providerId&&0===e.appointment.extrasCount?n("div",[n("p",{attrs:{align:"center"}},[e._v(e._s(e.$root.labels.service_no_extras))])]):n("div",[n("p",{attrs:{align:"center"}},[e._v(e._s(e.$root.labels.no_selected_extras_requirements))])])])],1),e._v(" "),0!==e.appointment.id&&"customer"!==this.$root.settings.role?n("el-tab-pane",{attrs:{label:e.$root.labels.payment,name:"payment"}},[n("dialog-appointment-payment",{attrs:{appointment:e.appointment,options:e.options,"is-cabinet":e.isCabinet,recurring:e.recurringAppointments},on:{editPayment:e.editPayment}})],1):e._e(),e._v(" "),e.showCustomFieldsTab()&&"customer"!==this.$root.settings.role?n("el-tab-pane",{attrs:{label:e.$root.labels.custom_fields,name:"customFields"}},[n("dialog-custom-fields",{attrs:{appointment:e.appointment,entityId:e.appointment.serviceId,customFields:this.options.entities.customFields,showCustomerInfo:!0,"hide-attachment-custom-field":e.hideAttachmentCustomField,"is-cabinet":e.isCabinet,entityType:"appointment"},on:{clearValidation:e.clearValidation}})],1):e._e(),e._v(" "),e.$root.settings.zoom.enabled&&e.appointment.zoomMeeting?n("el-tab-pane",{staticClass:"am-zoom-tabpane",attrs:{label:e.$root.labels.zoom,name:"zoom"}},["customer"!==this.$root.settings.role?n("div",[e._v("\n "+e._s(e.$root.labels.zoom_start_link)+":\n "),n("a",{staticClass:"am-link",attrs:{href:e.appointment.zoomMeeting.startUrl}},[e._v("\n "+e._s(e.$root.labels.zoom_click_to_start)+"\n ")])]):e._e(),e._v(" "),n("div",[e._v("\n "+e._s(e.$root.labels.zoom_join_link)+":\n "),n("a",{staticClass:"am-link",attrs:{href:e.appointment.zoomMeeting.joinUrl}},[e._v("\n "+e._s(e.$root.labels.zoom_click_to_join)+"\n ")])])]):e._e(),e._v(" "),e.$root.settings.lessonSpace.enabled&&e.appointment.lessonSpace?n("el-tab-pane",{staticClass:"am-zoom-tabpane",attrs:{label:e.$root.labels.lesson_space,name:"lessonSpace"}},[n("div",[e._v("\n "+e._s(e.$root.labels.lesson_space_link)+":\n "),n("a",{staticClass:"am-link",attrs:{href:e.appointment.lessonSpace}},[e._v("\n "+e._s(e.$root.labels.lesson_space_join)+"\n ")])])]):e._e(),e._v(" "),(e.$root.licence.isBasic||e.$root.licence.isPro||e.$root.licence.isDeveloper)&&e.appointment.serviceId&&(e.appointment.id?e.recurringAppointments.length:e.activeRecurring&&e.enabledRecurring&&"disabled"!==e.getServiceById(e.appointment.serviceId).recurringCycle)?n("el-tab-pane",{attrs:{label:e.$root.labels.linked,name:"recurring"}},[e.appointment.id?n("div",e._l(e.appointment.bookings,function(t){return n("div",{staticClass:"am-dialog-table"},[n("div",[n("div",{staticClass:"am-customer-extras"},[e.recurringAppointments.filter(function(e){return e.bookings.filter(function(e){return parseInt(e.customer.id)===parseInt(t.customer.id)}).length}).length?n("el-row",{staticClass:"am-customer-extras-data"},[n("el-col",[n("h3",[e._v(e._s(t.customer.firstName)+" "+e._s(t.customer.lastName))]),e._v(" "),n("span",[e._v(e._s(t.customer.email))])])],1):e._e()],1)]),e._v(" "),e._l(e.recurringAppointments.filter(function(e){return e.bookings.filter(function(e){return parseInt(e.customer.id)===parseInt(t.customer.id)}).length}),function(i,o){return n("el-row",{key:t.id+"-"+o},[n("el-col",{staticStyle:{"line-height":"40px"},attrs:{span:3}},[e._v("\n "+e._s(o+1)+"\n ")]),e._v(" "),n("el-col",{staticStyle:{"line-height":"40px"},attrs:{span:12}},[e._v("\n "+e._s(e.getFrontedFormattedDateTime(i.bookingStart))+"\n ")]),e._v(" "),n("el-col",{attrs:{span:9}},[n("el-button",{on:{click:function(t){return e.openRecurringAppointment(i.id)}}},[e._v("\n "+e._s(e.$root.labels.edit)+"\n ")])],1)],1)})],2)}),0):e.appointment.selectedDate&&e.appointment.selectedPeriod&&e.activeRecurring&&e.enabledRecurring&&e.initialRecurringData?n("div",[n("recurring-setup",{attrs:{initialRecurringData:e.initialRecurringData,recurringData:e.recurringData,disabledWeekdays:e.disabledWeekdays,availableDates:e.availableDates,calendarTimeSlots:e.appointment.calendarTimeSlots,occupiedTimeSlots:e.appointment.occupiedTimeSlots,service:e.getServiceById(e.appointment.serviceId),isFrontend:!1,"form-type":"recurring","forms-data":e.renderObject}}),e._v(" "),n("recurring-dates",{attrs:{dialogClass:"am-recurring-dates",recurringData:e.recurringData,availableDates:e.availableDates,calendarTimeSlots:e.appointment.calendarTimeSlots,isFrontend:!1,"form-type":"recurring","forms-data":e.renderObject,service:e.getServiceById(e.appointment.serviceId),selectedExtras:e.getSelectedDistinctExtras()},on:{datesDefined:e.recurringDatesDefined}})],1):e.activeRecurring&&e.enabledRecurring?n("div",[n("p",{attrs:{align:"center"}},[e._v(e._s(e.$root.labels.no_selected_slot_requirements))])]):e._e()]):e._e()],1)],1):e._e()],1),e._v(" "),null===e.appointment||e.dialogLoading||"customer"===this.$root.settings.role?e._e():n("dialog-actions",{attrs:{formName:"appointment",urlName:null===e.packageCustomer?"appointments":"bookings",urlSubName:null===e.packageCustomer?"":"/reassign",isNew:0===e.appointment.id,entity:null!=e.packageCustomer&&e.appointment.id?e.appointment.bookings[0]:e.appointment,getParsedEntity:e.getParsedEntity,haveSaveConfirmation:e.haveSaveConfirmation,hasIcons:!0,status:{on:"visible",off:"hidden"},action:{haveAdd:!0,haveEdit:!0,haveStatus:!1,haveRemove:!0===e.$root.settings.capabilities.canDelete,haveRemoveEffect:!1,haveDuplicate:e.haveDuplicate,haveSaveWarning:e.isExistingAppointment()||e.isFullAppointment()||e.isIntersectedAppointment()||this.activeRecurring&&this.enabledRecurring},buttonText:null,message:{success:{save:e.$root.labels.appointment_saved,remove:e.$root.labels.appointment_deleted,show:"",hide:""},confirm:{remove:e.$root.labels.confirm_delete_appointment,show:"",hide:"",duplicate:e.$root.labels.confirm_duplicate_appointment,save:e.saveConfirmMessage}}},on:{errorCallback:e.errorCallback,validationTabFailCallback:e.validationTabFailCallback,closeSaveConfirmation:e.closeSaveConfirmation}}),e._v(" "),n("div",["customer"===this.$root.settings.role?n("div",{staticClass:"am-dialog-footer"},[n("div",{staticClass:"am-dialog-footer-actions"},[n("el-row",[n("el-col",{staticClass:"align-right",attrs:{sm:24}},[n("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.updateByCustomer}},[e._v("\n "+e._s(e.$root.labels.save)+"\n ")])],1)],1)],1)]):e._e()])],1)},staticRenderFns:[]}},823:function(e,t,n){var i=n(90)(n(824),n(825),!1,null,null,null);e.exports=i.exports},824:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(680),o=n.n(i),a=n(699),s=(n.n(a),n(336)),r=n(654),l=n(658),c=n(657),u=n(684),d=n(673),p=n(666);t.default={mixins:[r.a,s.a,l.a,c.a,u.a,d.a,p.a],props:{modalData:null,bookingFetched:!1,customersNoShowCount:null,invoiceInDialog:!1},data:function(){return{dialogLoading:!0,refundBtnLoading:!1,refundMainBtnLoading:!1,finance:{bookablePriceTotal:0,extrasPriceTotal:0,discountTotal:0,subTotal:0,due:0,refunded:0,total:0,paidDeposit:0,paidRemaining:0,tax:0,wcTax:0,multipleBookings:!1},form:new o.a,payment:null,paymentStatuses:[{value:"pending",label:this.$root.labels.pending},{value:"paid",label:this.$root.labels.paid},{value:"partiallyPaid",label:this.$root.labels.partially_paid}],showDeleteConfirmation:!1,showUpdatePaymentAmount:!1,payments:[],showRefundConfirmation:!1,refundAmount:0,invoiceLoading:{preview:!1,download:!1,send:!1}}},created:function(){o.a.defaults.axios=this.$http,this.$root.licence.isBasic||this.$root.licence.isStarter||this.$root.licence.isLite||this.paymentStatuses.push({value:"refunded",label:this.$root.labels.refunded}),this.bookingFetched&&(this.setFinance(),this.dialogLoading=!1)},updated:function(){this.$nextTick(function(){var e=this;setTimeout(function(){e.inlineSVG()},5)})},methods:{showPaidSeparate:function(){return this.payments.filter(function(e){return"partiallyPaid"===e.status}).length>0&&!this.invoiceInDialog},createFileUrlFromResponse:function(e){for(var t=atob(e.data),n=new Array(t.length),i=0;i<t.length;i++)n[i]=t.charCodeAt(i);var o=new Uint8Array(n),a=new Blob([o],{type:"application/pdf;base64"});return URL.createObjectURL(a)},sendInvoice:function(){var e=this;if(this.invoiceLoading.send=!0,this.modalData.customer.email){var t=this.payments.find(function(e){return null===e.parentId});this.$http.post(this.$root.getAjaxUrl+"/invoices/"+t.id,{sendEmail:!0}).then(function(t){e.notify(e.$root.labels.success,e.$root.labels.invoice_sent,"success"),e.invoiceLoading.send=!1}).catch(function(t){console.log(t.response.data.message),e.notify(e.$root.labels.error,e.$root.labels.invoice_sending_failed,"error"),e.invoiceLoading.send=!1})}else this.notify(this.$root.labels.error,this.$root.labels.send_invoice_no_email,"error"),this.invoiceLoading.send=!1},previewInvoice:function(){var e=this;this.invoiceLoading.preview=!0;var t=this.payments.find(function(e){return null===e.parentId});this.$http.post(this.$root.getAjaxUrl+"/invoices/"+t.id).then(function(t){window.open(e.createFileUrlFromResponse(t)),e.invoiceLoading.preview=!1}).catch(function(t){console.log(t.message),e.invoiceLoading.preview=!1})},downloadInvoice:function(){var e=this;this.invoiceLoading.download=!0;var t=this.payments.find(function(e){return null===e.parentId});this.$http.post(this.$root.getAjaxUrl+"/invoices/"+t.id).then(function(t){var n=e.createFileUrlFromResponse(t),i=document.createElement("a");i.href=n,i.download="Invoice",document.body.appendChild(i),i.click(),document.body.removeChild(i),e.invoiceLoading.download=!1}).catch(function(t){console.log(t.message),e.invoiceLoading.download=!1})},showRefundModal:function(e){var t=this;this.showDeleteConfirmation=!1,this.showUpdatePaymentAmount=!1,this.payment=e,this.refundMainBtnLoading=!0,this.$http.get(this.$root.getAjaxUrl+"/payments/transaction/"+e.id).then(function(e){t.refundAmount=e.data.data.refundAmount,t.showRefundConfirmation=!0,t.refundMainBtnLoading=!1}).catch(function(e){console.log(e.message),t.refundMainBtnLoading=!1})},showUpdateModal:function(e){this.showUpdatePaymentAmount=!0,this.showDeleteConfirmation=!1,this.payment=e},showDeleteModal:function(e){this.showDeleteConfirmation=!0,this.showRefundConfirmation=!1,this.showUpdatePaymentAmount=!1,this.payment=e},paymentRefundable:function(e){return!this.$root.licence.isBasic&&!this.$root.licence.isStarter&&!this.$root.licence.isLite&&("partiallyPaid"===e.status||"paid"===e.status)&&(e.transactionId||e.wcOrderId)&&("mollie"!==e.gateway||e.transactionId&&!e.transactionId.includes("pl_"))&&"onSite"!==e.gateway},refundPayment:function(){var e=this;this.refundBtnLoading=!0,this.$http.post(this.$root.getAjaxUrl+"/payments/refund/"+this.payment.id).then(function(t){e.notify(e.$root.labels.success,e.$root.labels.payment_refunded,"success"),e.refundBtnLoading=!1,e.payment.status="refunded",e.showRefundConfirmation=!1,e.$emit("updatePaymentCallback",e.payment)}).catch(function(t){console.log(t),e.refundBtnLoading=!1,e.notify(e.$root.labels.error,t.response.data.message?t.response.data.message:e.$root.labels.payment_refund_failed,"error")})},getTicketsData:function(){var e=[];return"event"===this.modalData.bookableType&&this.modalData[this.modalData.bookableType][0]&&this.modalData.event.forEach(function(t){t.booking.ticketsData.forEach(function(n){var i=t.bookable.customTickets.find(function(e){return e.id===n.eventTicketId});i&&e.push({name:i.name,persons:n.persons})})}),e},instantiateDialog:function(){null!==this.modalData.bookings&&(this.setFinance(),this.dialogLoading=!1)},setFinance:function(){var e=this;JSON.parse(JSON.stringify(this.modalData[this.modalData.bookableType])).forEach(function(t){e.payments=e.payments.concat(t.booking.payments)}),this.payments.sort(function(e,t){return new Date(e.dateTime)-new Date(t.dateTime)});var t=this.modalData.bookableType,n=this.modalData[t];this.finance=this.getPaymentAmountData(n,t),this.finance.multipleBookings=n.length>0},closeDialog:function(){this.$emit("closeDialogPayment")},getPaymentStatus:function(e){var t="";return this.paymentStatuses.forEach(function(n){n.value===e&&(t=n.label)}),t},deletePayment:function(){var e=this;this.dialogLoading=!0,this.$http.post(this.$root.getAjaxUrl+"/payments/delete/"+this.payment.id).then(function(t){e.dialogLoading=!1,t.data&&(e.$emit("deletePaymentCallback",e.payment),e.showDeleteConfirmation=!e.showDeleteConfirmation,e.notify(e.$root.labels.success,e.$root.labels.payment_deleted,"success"))}).catch(function(t){e.dialogLoading=!1,e.errorMessage=t.message})},updatePayment:function(){var e=this;this.payment?(this.dialogLoading=!0,this.form.post(this.$root.getAjaxUrl+"/payments/"+this.payment.id,this.payment).then(function(){e.showUpdatePaymentAmount=!e.showUpdatePaymentAmount,e.setFinance(),e.notify(e.$root.labels.success,e.$root.labels.payment_saved,"success"),e.$emit("updatePaymentCallback",e.payment),e.dialogLoading=!1}).catch(function(t){e.dialogLoading=!1,e.errorMessage=t.message})):this.$emit("updatePaymentCallback")},getPaymentIconName:function(e){return"onSite"!==e.gateway&&"stripe"!==e.gateway||"oliver"!==e.gatewayTitle?e.gateway+".svg":"oliver.png"},getPaymentGatewayNiceName:function(e){return"stripe"===e.gateway&&"oliver"===e.gatewayTitle?this.$root.labels.oliver_on_line:"onSite"===e.gateway&&"oliver"===e.gatewayTitle?this.$root.labels.oliver_on_site:"onSite"===e.gateway?this.$root.labels.on_site:"wc"===e.gateway?e.gatewayTitle:e.gateway?e.gateway.charAt(0).toUpperCase()+e.gateway.slice(1):void 0}},watch:{bookingFetched:function(){!0===this.bookingFetched&&this.instantiateDialog()}},components:{Money:a.Money}}},825:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{directives:[{name:"show",rawName:"v-show",value:e.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[n("div",{staticClass:"am-dialog-loader-content"},[n("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}}),e._v(" "),n("p",[e._v(e._s(e.$root.labels.loader_message))])])]),e._v(" "),e.dialogLoading?e._e():n("div",{staticClass:"am-dialog-scrollable"},[n("div",{staticClass:"am-dialog-header"},[n("el-row",[n("el-col",{attrs:{span:18}},[n("h2",[e._v(e._s(e.invoiceInDialog?e.$root.labels.invoice_details:e.$root.labels.payment_details))])]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:6}},[n("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:e.closeDialog}})],1)],1)],1),e._v(" "),n("div",{staticClass:"am-payment-details"},[!e.payments[0].invoiceNumber||e.$root.licence.isLite||e.$root.licence.isStarter?e._e():n("el-row",{staticClass:"am-payment-details-row"},[n("h4",[e._v(e._s(e.$root.labels.invoice_number+": #"+e.payments[0].invoiceNumber))])]),e._v(" "),n("el-row",{staticClass:"am-payment-details-row"},[n("h4",[e._v(e._s(e.$root.labels.customer))]),e._v(" "),n("el-col",{attrs:{span:24}},[n("h3",{class:e.getNoShowClass(e.modalData.customer.id,e.customersNoShowCount)},[e._v(e._s(e.modalData.customer.id?e.modalData.customer.firstName+" "+e.modalData.customer.lastName:""))]),e._v(" "),n("p",[e._v(e._s(e.modalData.customer?e.modalData.customer.email:""))])])],1),e._v(" "),e._l(e.payments,function(t,i){return n("el-row",{key:t.id,staticClass:"am-payment-details-row"},[n("div",{staticClass:"am-payment-details-row-header"},[n("h4",[e._v(e._s(e.$root.labels.payment)+" "+e._s(e.payments.length>1?"#"+(i+1):"")+" ")]),e._v(" "),!e.invoiceInDialog&&e.payments.length>1?n("div",{staticClass:"am-payment-details-row-options"},[e.paymentRefundable(t)?n("div",[n("el-button",{attrs:{size:"small",loading:e.refundMainBtnLoading},on:{click:function(n){return e.showRefundModal(t)}}},[e._v("\n "+e._s(e.$root.labels.refund)+"\n ")])],1):e._e(),e._v(" "),n("el-button",{staticClass:"am-button-icon",staticStyle:{padding:"7px 10px"},attrs:{size:"small"},on:{click:function(n){return e.showUpdateModal(t)}}},[n("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.edit,src:e.$root.getUrl+"public/img/edit.svg"}})]),e._v(" "),!0===e.$root.settings.capabilities.canDelete?n("el-button",{staticClass:"am-button-icon",staticStyle:{padding:"7px 10px","margin-left":"0px"},attrs:{size:"small"},on:{click:function(n){return e.showDeleteModal(t)}}},[n("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.delete,src:e.$root.getUrl+"public/img/delete.svg"}})]):e._e()],1):e._e()]),e._v(" "),n("el-col",{attrs:{span:12}},[n("p",[e._v(e._s(e.invoiceInDialog?e.$root.labels.issue_date:e.$root.labels.date))]),e._v(" "),n("p",[e._v(e._s(e.$root.labels.payment_method))]),e._v(" "),t.wcOrderId?n("p",[e._v(e._s(e.$root.labels.wc_order)+":")]):e._e(),e._v(" "),n("p",[e._v(e._s(e.$root.labels.status))]),e._v(" "),n("p",[e._v(e._s(e.$root.labels.id))])]),e._v(" "),n("el-col",{attrs:{span:12}},[n("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.invoiceInDialog?e.getFrontedFormattedDate(t.created):e.getFrontedFormattedDate(t.dateTime)))]),e._v(" "),n("p",{staticClass:"am-semi-strong"},[n("img",{staticClass:"svg-amelia",style:{width:e.getPaymentIconWidth(t.gateway),verticalAlign:"middle"},attrs:{src:e.$root.getUrl+"public/img/payments/"+e.getPaymentIconName(t)}}),e._v(" "),e.longNamePayments(t.gateway)?e._e():n("span",[e._v(e._s(e.getPaymentGatewayNiceName(t)))])]),e._v(" "),t.wcOrderId?n("p",[n("a",{attrs:{href:t.wcOrderUrl,target:"_blank"}},[e._v("\n #"+e._s(t.wcOrderId)+"\n ")])]):e._e(),e._v(" "),n("div",{staticClass:"am-payment-status"},[n("span",{class:"am-payment-status-symbol am-payment-status-symbol-"+t.status}),e._v(" "),n("p",{staticClass:"am-semi-strong"},[n("span",[e._v(e._s(e.getPaymentStatusNiceName(t.status)))])])]),e._v(" "),n("p",{staticClass:"am-semi-strong"},[e._v(e._s(t.id))])])],1)}),e._v(" "),e._l(e.modalData[e.modalData.bookableType],function(t,i){return n("el-row",{key:i,staticClass:"am-payment-details-row"},[n("h4",[e._v(e._s(e.$root.labels[e.modalData.bookableType+"_info"]))]),e._v(" "),n("el-col",{attrs:{span:12}},[n("p",[e._v(e._s(e.$root.labels[e.modalData.bookableType]))]),e._v(" "),"package"!==e.modalData.bookableType?n("p",[e._v(e._s(e.$root.labels.date))]):e._e(),e._v(" "),t.providers.length&&"appointment"===e.modalData.bookableType?n("p",[e._v(e._s(e.$root.labels.employee))]):e._e(),e._v(" "),"event"===e.modalData.bookableType&&e.getTicketsData().length?n("p",[e._v(e._s(e.$root.labels.event_tickets))]):e._e()]),e._v(" "),n("el-col",{attrs:{span:12}},[n("p",{staticClass:"am-semi-strong"},[e._v(e._s(t.bookable.name))]),e._v(" "),"package"!==e.modalData.bookableType?n("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFrontedFormattedDateTime(t.bookingStart)))]):e._e(),e._v(" "),t.providers.length>0&&"appointment"===e.modalData.bookableType?n("p",{staticClass:"am-semi-strong"},[n("img",{staticClass:"am-employee-photo",attrs:{src:e.pictureLoad(t.providers[0],!0)},on:{error:function(n){return e.imageLoadError(t.providers[0].id,!0)}}}),e._v("\n "+e._s(t.providers[0].fullName)+"\n ")]):e._e(),e._v(" "),"event"===e.modalData.bookableType&&e.getTicketsData().length?n("p",{staticClass:"am-semi-strong",staticStyle:{"white-space":"unset"}},e._l(e.getTicketsData(),function(t){return n("span",{staticClass:"am-attendees-plus"},[e._v("\n "+e._s(t.persons)+" x "+e._s(t.name)+"\n ")])}),0):e._e()])],1)}),e._v(" "),n("el-row",{staticClass:"am-payment-details-row am-payment-summary"},[n("el-col",{attrs:{span:12}},[n("p",[e._v(e._s(e.$root.labels[(e.finance.multipleBookings?"bookings":"appointment"===e.modalData.bookableType?"service":e.modalData.bookableType)+"_price"]))]),e._v(" "),"package"!==e.modalData.bookableType&&"event"!==e.modalData.bookableType?n("p",[e._v(e._s(e.$root.labels.extras))]):e._e(),e._v(" "),"package"!==e.modalData.bookableType&&"event"!==e.modalData.bookableType?n("p",[e._v(e._s(e.$root.labels.subtotal))]):e._e(),e._v(" "),e.finance.discountTotal?n("p",[e._v(e._s(e.$root.labels.discount_amount))]):e._e(),e._v(" "),e.finance.tax?n("p",[e._v(e._s(e.$root.labels.tax))]):e._e(),e._v(" "),e.payments.filter(function(e){return e.wcOrderId&&e.wcItemTaxValue}).length>0?n("p",[e._v(e._s(e.$root.labels.tax)+" (Woo)")]):e._e(),e._v(" "),e.showPaidSeparate()?e._e():n("p",[e._v(e._s(e.$root.labels.paid))]),e._v(" "),e.showPaidSeparate()?n("p",[e._v(e._s(e.$root.labels.paid_deposit))]):e._e(),e._v(" "),e.showPaidSeparate()?n("p",[e._v(e._s(e.$root.labels.paid_remaining_amount))]):e._e(),e._v(" "),e.finance.refunded>0?n("p",[e._v(e._s(e.$root.labels.refunded))]):e._e(),e._v(" "),n("p",[e._v(e._s(e.$root.labels.due))]),e._v(" "),n("p",{staticClass:"am-payment-total"},[e._v(e._s(e.$root.labels.total))])]),e._v(" "),n("el-col",{attrs:{span:12}},[n("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.bookablePriceTotal)))]),e._v(" "),"package"!==e.modalData.bookableType&&"event"!==e.modalData.bookableType?n("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.extrasPriceTotal)))]):e._e(),e._v(" "),"package"!==e.modalData.bookableType&&"event"!==e.modalData.bookableType?n("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.subTotal)))]):e._e(),e._v(" "),e.finance.discountTotal?n("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.discountTotal>e.finance.subTotal?e.finance.subTotal:e.finance.discountTotal)))]):e._e(),e._v(" "),e.finance.tax?n("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.tax)))]):e._e(),e._v(" "),e.payments.filter(function(e){return e.wcOrderId&&e.wcItemTaxValue}).length>0?n("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.wcTax)))]):e._e(),e._v(" "),e.showPaidSeparate()?e._e():n("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.paidRemaining+e.finance.paidDeposit)))]),e._v(" "),e.showPaidSeparate()?n("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.paidDeposit)))]):e._e(),e._v(" "),e.showPaidSeparate()?n("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.paidRemaining)))]):e._e(),e._v(" "),e.finance.refunded>0?n("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.refunded)))]):e._e(),e._v(" "),n("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.due)+(e.payments[0].wcItemTaxValue&&e.finance.due>0?e.$root.labels.plus_tax:"")))]),e._v(" "),n("p",{staticClass:"am-semi-strong am-payment-total"},[e._v(e._s(e.getFormattedPrice(e.finance.total)+(e.payments[0].wcItemTaxValue&&e.finance.due>0?e.$root.labels.plus_tax:"")))])])],1)],2)]),e._v(" "),!0!==e.$root.settings.capabilities.canWriteOthers||e.dialogLoading?e._e():n("div",{staticClass:"am-dialog-footer"},[n("div",{staticClass:"am-dialog-footer-actions"},[n("transition",{attrs:{name:"slide-vertical"}},[e.showDeleteConfirmation?n("div",{staticClass:"am-dialog-confirmation"},[n("h3",[e._v(e._s(e.$root.labels.confirm_delete_payment))]),e._v(" "),n("div",{staticClass:"align-left"},[n("el-button",{attrs:{size:"small"},on:{click:function(t){e.showDeleteConfirmation=!e.showDeleteConfirmation}}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.deletePayment()}}},[e._v("\n "+e._s(e.$root.labels.delete)+"\n ")])],1)]):e._e()]),e._v(" "),n("transition",{attrs:{name:"slide-vertical"}},[e.showUpdatePaymentAmount?n("div",{staticClass:"am-dialog-confirmation"},[n("el-form",{attrs:{"label-position":"top"}},[n("h3",[e._v(e._s(e.$root.labels.enter_new_payment_amount))]),e._v(" "),n("el-row",{staticClass:"am-no-padding",attrs:{gutter:24}},[n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:e.$root.labels.payment+":"}},[n("money",e._b({staticClass:"el-input__inner",model:{value:e.payment.amount,callback:function(t){e.$set(e.payment,"amount",t)},expression:"payment.amount"}},"money",e.moneyComponentData,!1))],1)],1),e._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:e.$root.labels.status+":"}},[n("el-select",{model:{value:e.payment.status,callback:function(t){e.$set(e.payment,"status",t)},expression:"payment.status"}},e._l(e.paymentStatuses,function(t){return n("el-option",{key:t.value,staticClass:"am-appointment-status-option",attrs:{label:t.label,value:t.value}},[n("span",{class:"am-appointment-status-symbol am-appointment-status-symbol-"+t.value}),e._v(" "),n("span",[e._v(e._s(t.label))])])}),1)],1)],1)],1),e._v(" "),n("div",{staticClass:"align-left"},[n("el-button",{attrs:{size:"small"},on:{click:function(t){e.showUpdatePaymentAmount=!e.showUpdatePaymentAmount}}},[e._v("\n "+e._s(e.$root.labels.close)+"\n ")])],1)],1)],1):e._e()]),e._v(" "),n("transition",{attrs:{name:"slide-vertical"}},[!e.showRefundConfirmation||e.$root.licence.isBasic||e.$root.licence.isStarter||e.$root.licence.isLite?e._e():n("div",{staticClass:"am-dialog-confirmation"},[n("h3",[e._v(e._s(e.$root.labels.confirm_refund_payment))]),e._v(" "),n("h3",[n("b",[e._v(e._s(e.$root.labels.refund_payment_amount)+" "+e._s(e.getFormattedPrice(e.refundAmount)))])]),e._v(" "),n("div",{staticClass:"align-left"},[n("el-button",{attrs:{size:"small"},on:{click:function(t){e.showRefundConfirmation=!1}}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),n("el-button",{attrs:{size:"small",type:"primary",loading:e.refundBtnLoading},on:{click:function(t){return e.refundPayment()}}},[e._v("\n "+e._s(e.$root.labels.confirm)+"\n ")])],1)])]),e._v(" "),e.invoiceInDialog?n("el-row",[n("el-col",{staticClass:"align-left invoice-download",attrs:{sm:8,span:8}},[n("el-button",{attrs:{loading:e.invoiceLoading.download},on:{click:function(t){return e.downloadInvoice()}}},[e._v("\n "+e._s(e.$root.labels.download)+"\n ")])],1),e._v(" "),n("el-col",{staticClass:"align-left invoice-download-mobile",attrs:{sm:4,span:4}},[n("el-button",{staticClass:"button-export am-button-icon",on:{click:function(t){return e.downloadInvoice()}}},[n("img",{staticClass:"svg-amelia",attrs:{alt:"Import",src:e.$root.getUrl+"public/img/import.svg"}})])],1),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{sm:16,span:16}},[n("el-button",{staticClass:"am-dialog-create",attrs:{loading:e.invoiceLoading.preview},on:{click:function(t){return e.previewInvoice()}}},[e._v("\n "+e._s(e.$root.labels.preview)+"\n ")]),e._v(" "),n("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary",loading:e.invoiceLoading.send},on:{click:function(t){return e.sendInvoice()}}},[e._v("\n "+e._s(e.$root.labels.send_invoice)+"\n ")])],1)],1):n("el-row",[1===e.payments.length?n("el-col",{staticClass:"align-left",attrs:{sm:12}},[!0===e.$root.settings.capabilities.canDelete?n("el-button",{staticClass:"am-button-icon",style:{display:"none"},on:{click:function(t){return e.showDeleteModal(e.payments[0])}}},[n("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.delete,src:e.$root.getUrl+"public/img/delete.svg"}})]):e._e(),e._v(" "),n("el-button",{staticClass:"am-button-icon",on:{click:function(t){return e.showUpdateModal(e.payments[0])}}},[n("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.edit,src:e.$root.getUrl+"public/img/edit.svg"}})]),e._v(" "),e.paymentRefundable(e.payments[0])?n("el-button",{attrs:{loading:e.refundMainBtnLoading},on:{click:function(t){return e.showRefundModal(e.payments[0])}}},[e._v("\n "+e._s(e.$root.labels.refund)+"\n ")]):e._e()],1):e._e(),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{sm:e.payments.length>1?24:12}},[n("el-button",{attrs:{type:""},on:{click:e.closeDialog}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),n("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:function(t){return e.updatePayment()}}},[e._v("\n "+e._s(e.$root.labels.save)+"\n ")])],1)],1)],1)])])},staticRenderFns:[]}},826:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={template:"#picture-upload",props:{deleteIconVisibility:!1,editedEntity:null,entityName:"",multiple:!1},data:function(){return{pictureFullPath:"",pictureThumbPath:""}},mounted:function(){},methods:{removeImage:function(e){e.stopPropagation(),this.pictureFullPath="",this.pictureThumbPath="",this.$emit("deleteImage")},openMediaModal:function(){var e,t=this;e?e.open():((e=wp.media({title:"Select or Upload Profile Picture",button:{text:"Select picture"},multiple:this.multiple,library:{type:"image"}})).on("select",function(){var n=null;e.state().get("selection").forEach(function(e){n=e.toJSON(),t.pictureFullPath=n.url,t.pictureThumbPath=n.sizes.thumbnail?n.sizes.thumbnail.url:n.url,t.$emit("pictureSelected",t.pictureFullPath,t.pictureThumbPath)})}),e.open())}},computed:{getPictureSrc:function(){return null!==this.editedEntity&&!this.pictureThumbPath&&this.editedEntity.pictureThumbPath?this.editedEntity.pictureThumbPath:this.pictureThumbPath&&"gallery"!==this.entityName?this.pictureThumbPath:this.$root.getUrl+"public/img/default-"+this.entityName+".svg"}}}},827:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"am-profile-photo",on:{click:e.openMediaModal}},[e.deleteIconVisibility?n("i",{staticClass:"el-icon-delete",on:{click:function(t){return e.removeImage(t)}}}):e._e(),e._v(" "),n("i",{class:{"el-icon-plus":"gallery"===e.entityName,"el-icon-picture":"gallery"!==e.entityName}}),e._v(" "),"gallery"===e.entityName?n("span",[e._v(e._s(e.$root.labels.add_image))]):e._e(),e._v(" "),"gallery"!==e.entityName?n("img",{attrs:{src:e.getPictureSrc,alt:""}}):e._e()])},staticRenderFns:[]}},828:function(e,t,n){var i=n(90)(n(881),n(882),!1,null,null,null);e.exports=i.exports},874:function(e,t,n){var i=n(90)(n(878),n(879),!1,null,null,null);e.exports=i.exports},878:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(91);t.default={props:{zoomSettings:null,lessonSpaceSettings:null,googleMeetSettings:null,microsoftTeamsSettings:null,paymentsSettings:null,generalSettings:null,settings:null,providers:null},mixins:[i.a],data:function(){var e=this;return{products:[],searchCounter:0,loadingProducts:!1,integrationsSettingsCollapse:null,paymentsSettingsCollapse:null,generalSettingsCollapse:null,rules:{redirectURLAfter:[{validator:function(t,n,i){e.clearValidation();var o=e.$refs.settings.model.redirectUrlAfterAppointment;""===o||/^((http|https):\/\/)/.test(o)?i():i(new Error(e.$root.labels.enter_valid_url_warning))},trigger:"submit"}]},errors:{redirectURLAfter:""},options:{defaultAppointmentStatus:[{label:this.$root.labels.pending,value:"pending"},{label:this.$root.labels.approved,value:"approved"}],minimumTime:[{label:this.$root.labels.disabled,value:0},{label:this.$root.labels.min10,value:600},{label:this.$root.labels.min12,value:720},{label:this.$root.labels.min15,value:900},{label:this.$root.labels.min30,value:1800},{label:this.$root.labels.min45,value:2700},{label:this.$root.labels.h1,value:3600},{label:this.$root.labels.h1min30,value:5400},{label:this.$root.labels.h2,value:7200},{label:this.$root.labels.h3,value:10800},{label:this.$root.labels.h4,value:14400},{label:this.$root.labels.h6,value:21600},{label:this.$root.labels.h8,value:28800},{label:this.$root.labels.h9,value:32400},{label:this.$root.labels.h10,value:36e3},{label:this.$root.labels.h11,value:39600},{label:this.$root.labels.h12,value:43200},{label:this.$root.labels.day1,value:86400},{label:this.$root.labels.days2,value:172800},{label:this.$root.labels.days3,value:259200},{label:this.$root.labels.days4,value:345600},{label:this.$root.labels.days5,value:432e3},{label:this.$root.labels.days6,value:518400},{label:this.$root.labels.week1,value:604800},{label:this.$root.labels.weeks2,value:1209600},{label:this.$root.labels.weeks3,value:1814400},{label:this.$root.labels.weeks4,value:2419200},{label:this.$root.labels.months3,value:7884e3},{label:this.$root.labels.months6,value:15768e3}]}}},mounted:function(){if(this.setProducts(),null!==this.generalSettings&&"numberOfDaysAvailableForBooking"in this.generalSettings&&!this.generalSettings.numberOfDaysAvailableForBooking)for(var e=document.getElementsByClassName("am-number-of-days"),t=0;t<e.length;t++)e[t].getElementsByClassName("el-input__inner")[0].value=""},computed:{isZoomProvidersConnected:function(){return null!==this.providers&&(!this.providers.map(function(e){return e.zoomUserId}).includes(null)&&0!==this.providers.length)}},methods:{isDefaultStatusPending:function(){return this.paymentsSettings.paymentLinks.enabled&&this.generalSettings&&("pending"===this.generalSettings.defaultAppointmentStatus||null===this.generalSettings.defaultAppointmentStatus&&"pending"===this.$root.settings.general.defaultAppointmentStatus)},setProducts:function(){var e=this;this.$root.settings.payments.wc.enabled&&(this.$root.settings.payments.wc.enabled&&this.paymentsSettings.wc.productId&&0===this.$root.wcProducts.filter(function(t){return t.id===e.paymentsSettings.wc.productId}).length&&this.fetchProducts({id:this.paymentsSettings.wc.productId},function(t){t.length&&e.products.push(t[0])}),this.products=this.$root.wcProducts)},selectedProduct:function(e){if(0===this.$root.wcProducts.filter(function(t){return t.id===e}).length){var t=this.products.find(function(t){return t.id===e});t&&this.$root.wcProducts.push(t)}},fetchProducts:function(e,t){var n=this;clearTimeout(this.searchProductsTimer),this.loadingProducts=!0,this.searchCounter++,this.searchProductsTimer=setTimeout(function(){var i=n.searchCounter;n.$http.get(n.$root.getAjaxUrl+"/payment/wc/products",{params:e}).then(function(e){i>=n.searchCounter&&t(e.data.data.products.sort(function(e,t){return e.name.toLowerCase()>t.name.toLowerCase()?1:-1})),n.loadingProducts=!1}).catch(function(e){n.loadingProducts=!1})},500)},searchProducts:function(e){var t=this;e?this.fetchProducts({name:e},function(e){t.products=e}):this.products=this.$root.wcProducts},clearValidation:function(){}}}},879:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"am-entity-settings"},[null!==e.generalSettings?n("el-collapse",{class:e.licenceClass(),model:{value:e.generalSettingsCollapse,callback:function(t){e.generalSettingsCollapse=t},expression:"generalSettingsCollapse"}},[n("el-collapse-item",{staticClass:"am-setting-box",attrs:{disabled:e.notInLicence(),name:"generalSettings"}},[n("template",{slot:"title"},[n("img",{staticClass:"svg-amelia",staticStyle:{"margin-right":"10px"},attrs:{src:e.$root.getUrl+"public/img/setting.svg"}}),e._v(" "+e._s(e.$root.labels.general)+"\n ")]),e._v(" "),null!==e.generalSettings&&"defaultAppointmentStatus"in e.generalSettings?n("el-form-item",{attrs:{label:"placeholder"}},[n("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.default_appointment_status)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.default_appointment_status)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-select",{attrs:{clearable:"",placeholder:e.options.defaultAppointmentStatus.find(function(t){return t.value===e.$root.settings.general.defaultAppointmentStatus}).label,"popper-class":"am-dropdown-cabinet"},model:{value:e.generalSettings.defaultAppointmentStatus,callback:function(t){e.$set(e.generalSettings,"defaultAppointmentStatus",t)},expression:"generalSettings.defaultAppointmentStatus"}},e._l(e.options.defaultAppointmentStatus,function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1):e._e(),e._v(" "),null!==e.generalSettings&&"minimumTimeRequirementPriorToBooking"in e.generalSettings?n("el-form-item",{attrs:{label:"placeholder"}},[n("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.minimum_time_before_booking)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.minimum_time_before_booking_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-select",{attrs:{clearable:"","collapse-tags":"",placeholder:"Select",placeholder:e.options.minimumTime.find(function(t){return t.value===e.$root.settings.general.minimumTimeRequirementPriorToBooking}).label,"popper-class":"am-dropdown-cabinet"},model:{value:e.generalSettings.minimumTimeRequirementPriorToBooking,callback:function(t){e.$set(e.generalSettings,"minimumTimeRequirementPriorToBooking",t)},expression:"generalSettings.minimumTimeRequirementPriorToBooking"}},e._l(e.options.minimumTime,function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1):e._e(),e._v(" "),null!==e.generalSettings&&"minimumTimeRequirementPriorToCanceling"in e.generalSettings?n("el-form-item",{attrs:{label:"placeholder"}},[n("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.minimum_time_before_canceling)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.minimum_time_before_canceling_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-select",{attrs:{clearable:"",placeholder:e.options.minimumTime.find(function(t){return t.value===e.$root.settings.general.minimumTimeRequirementPriorToCanceling}).label,"popper-class":"am-dropdown-cabinet"},model:{value:e.generalSettings.minimumTimeRequirementPriorToCanceling,callback:function(t){e.$set(e.generalSettings,"minimumTimeRequirementPriorToCanceling",t)},expression:"generalSettings.minimumTimeRequirementPriorToCanceling"}},e._l(e.options.minimumTime,function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1):e._e(),e._v(" "),null!==e.generalSettings&&"minimumTimeRequirementPriorToRescheduling"in e.generalSettings?n("el-form-item",{attrs:{label:"placeholder"}},[n("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.minimum_time_before_rescheduling)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.minimum_time_before_rescheduling_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-select",{attrs:{clearable:"",placeholder:e.options.minimumTime.find(function(t){return t.value===e.$root.settings.general.minimumTimeRequirementPriorToRescheduling}).label,"popper-class":"am-dropdown-cabinet"},model:{value:e.generalSettings.minimumTimeRequirementPriorToRescheduling,callback:function(t){e.$set(e.generalSettings,"minimumTimeRequirementPriorToRescheduling",t)},expression:"generalSettings.minimumTimeRequirementPriorToRescheduling"}},e._l(e.options.minimumTime,function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1):e._e(),e._v(" "),null!==e.generalSettings&&"numberOfDaysAvailableForBooking"in e.generalSettings?n("el-form-item",{attrs:{label:"placeholder"}},[n("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.period_available_for_booking)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.period_available_for_booking_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-input-number",{staticClass:"am-number-of-days",attrs:{min:0,placeholder:e.$root.settings.general.numberOfDaysAvailableForBooking.toString()},model:{value:e.generalSettings.numberOfDaysAvailableForBooking,callback:function(t){e.$set(e.generalSettings,"numberOfDaysAvailableForBooking",t)},expression:"generalSettings.numberOfDaysAvailableForBooking"}})],1):e._e(),e._v(" "),null!==e.generalSettings&&"redirectUrlAfterAppointment"in e.generalSettings?n("el-form-item",{attrs:{label:"placeholder",prop:"redirectURLAfter",error:e.errors.redirectURLAfter}},[n("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.redirect_url_after_appointment)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.licence.isPro||e.$root.licence.isDeveloper?e.$root.labels.redirect_url_after_app_or_package_tt:e.$root.labels.redirect_url_after_appointment_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-input",{attrs:{"auto-complete":"off",placeholder:e.$root.settings.general.redirectUrlAfterAppointment.toString()},on:{input:function(t){return e.clearValidation()}},model:{value:e.generalSettings.redirectUrlAfterAppointment,callback:function(t){e.$set(e.generalSettings,"redirectUrlAfterAppointment",t)},expression:"generalSettings.redirectUrlAfterAppointment"}})],1):e._e()],2),e._v(" "),n("LicenceBlock")],1):e._e(),e._v(" "),null!==e.paymentsSettings?n("el-collapse",{staticClass:"am-entity-settings-payments",class:e.licenceClass("starter"),model:{value:e.paymentsSettingsCollapse,callback:function(t){e.paymentsSettingsCollapse=t},expression:"paymentsSettingsCollapse"}},[n("el-collapse-item",{staticClass:"am-setting-box",attrs:{disabled:e.notInLicence("starter"),name:"paymentsSettings"}},[n("template",{slot:"title"},[n("img",{staticClass:"svg-amelia",staticStyle:{"margin-right":"10px"},attrs:{src:e.$root.getUrl+"public/img/credit-card.svg"}}),e._v(" "+e._s(e.$root.labels.payments)+"\n ")]),e._v(" "),!e.notInLicence("basic")||e.licenceVisible()?n("div",{staticClass:"am-setting-box am-switch-box",class:e.licenceClass("basic")},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[n("span",[e._v(e._s(e.$root.labels.payment_links_enable))]),e._v(" "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.payment_links_enable_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{attrs:{disabled:e.notInLicence()},model:{value:e.paymentsSettings.paymentLinks.enabled,callback:function(t){e.$set(e.paymentsSettings.paymentLinks,"enabled",t)},expression:"paymentsSettings.paymentLinks.enabled"}})],1)],1),e._v(" "),e.paymentsSettings.paymentLinks.enabled?n("el-row",{staticStyle:{"margin-top":"16px"}},[n("el-col",[n("el-form-item",{attrs:{label:"placeholder"}},[n("label",{staticStyle:{"font-size":"13px"},attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.payment_links_redirect)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.payment_links_redirect_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-input",{attrs:{placeholder:e.$root.settings.payments.paymentLinks.redirectUrl?e.$root.settings.payments.paymentLinks.redirectUrl:e.$root.getSiteUrl,"auto-complete":"off"},model:{value:e.paymentsSettings.paymentLinks.redirectUrl,callback:function(t){e.$set(e.paymentsSettings.paymentLinks,"redirectUrl",t)},expression:"paymentsSettings.paymentLinks.redirectUrl"}})],1)],1)],1):e._e(),e._v(" "),e.isDefaultStatusPending()?n("el-row",{staticStyle:{"font-size":"14px","margin-bottom":"16px !important"},attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[n("span",[e._v(e._s(e.$root.labels.payment_links_change_status))]),e._v(" "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.payment_links_change_status_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{model:{value:e.paymentsSettings.paymentLinks.changeBookingStatus,callback:function(t){e.$set(e.paymentsSettings.paymentLinks,"changeBookingStatus",t)},expression:"paymentsSettings.paymentLinks.changeBookingStatus"}})],1)],1):e._e(),e._v(" "),e.paymentsSettings.paymentLinks.enabled&&"provider"!==e.$root.settings.role?n("el-alert",{staticStyle:{"margin-bottom":"5px"},attrs:{type:"warning","show-icon":"",title:"",description:e.$root.labels.payment_links_warning,closable:!1}}):e._e(),e._v(" "),n("LicenceBlock")],1):e._e(),e._v(" "),e.$root.settings.payments.onSite?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[e._v("\n "+e._s(e.$root.labels.on_site)+"\n ")]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:e.paymentsSettings.onSite,callback:function(t){e.$set(e.paymentsSettings,"onSite",t)},expression:"paymentsSettings.onSite"}})],1)],1)],1):e._e(),e._v(" "),e.$root.settings.payments.wc.enabled?n("el-col",{attrs:{span:24}},[e.$root.settings.payments.onSite?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[e._v("\n "+e._s(e.$root.labels.wc_service)+"\n ")]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:e.paymentsSettings.wc.enabled,callback:function(t){e.$set(e.paymentsSettings.wc,"enabled",t)},expression:"paymentsSettings.wc.enabled"}})],1)],1)],1):e._e(),e._v(" "),e.paymentsSettings.wc.enabled?n("el-form-item",{attrs:{label:"placeholder"}},[n("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.wc_product)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.wc_product_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-select",{attrs:{filterable:"",remote:"",placeholder:"","popper-class":"am-dropdown-cabinet",loading:e.loadingProducts,"remote-method":e.searchProducts},on:{change:e.selectedProduct},model:{value:e.paymentsSettings.wc.productId,callback:function(t){e.$set(e.paymentsSettings.wc,"productId",t)},expression:"paymentsSettings.wc.productId"}},e._l(e.products,function(e){return n("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1):e._e()],1):e._e(),e._v(" "),e.$root.settings.payments.payPal.enabled?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[n("img",{staticClass:"svg-amelia",attrs:{width:"60px",src:e.$root.getUrl+"public/img/payments/paypal-light.svg"}})]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:e.paymentsSettings.payPal.enabled,callback:function(t){e.$set(e.paymentsSettings.payPal,"enabled",t)},expression:"paymentsSettings.payPal.enabled"}})],1)],1)],1):e._e(),e._v(" "),e.$root.settings.payments.stripe.enabled?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[n("img",{staticClass:"svg-amelia",attrs:{width:"40px",src:e.$root.getUrl+"public/img/payments/stripe.svg"}})]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:e.paymentsSettings.stripe.enabled,callback:function(t){e.$set(e.paymentsSettings.stripe,"enabled",t)},expression:"paymentsSettings.stripe.enabled"}})],1)],1)],1):e._e(),e._v(" "),e.$root.settings.payments.mollie.enabled?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[n("img",{staticClass:"svg-amelia",attrs:{width:"60px",src:e.$root.getUrl+"public/img/payments/mollie.svg"}})]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:e.paymentsSettings.mollie.enabled,callback:function(t){e.$set(e.paymentsSettings.mollie,"enabled",t)},expression:"paymentsSettings.mollie.enabled"}})],1)],1)],1):e._e(),e._v(" "),e.$root.settings.payments.square.enabled?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[n("img",{staticClass:"svg-amelia",attrs:{width:"60px",src:e.$root.getUrl+"public/img/payments/square.svg"}})]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:e.paymentsSettings.square.enabled,callback:function(t){e.$set(e.paymentsSettings.square,"enabled",t)},expression:"paymentsSettings.square.enabled"}})],1)],1)],1):e._e(),e._v(" "),e.$root.settings.payments.razorpay.enabled?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[n("img",{staticClass:"svg-amelia",attrs:{width:"60px",src:e.$root.getUrl+"public/img/payments/razorpay.svg"}})]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:e.paymentsSettings.razorpay.enabled,callback:function(t){e.$set(e.paymentsSettings.razorpay,"enabled",t)},expression:"paymentsSettings.razorpay.enabled"}})],1)],1)],1):e._e(),e._v(" "),e.paymentsSettings.wc.enabled&&(e.$root.settings.payments.wc.enabled||!e.paymentsSettings.wc.enabled)||e.paymentsSettings.onSite&&(e.$root.settings.payments.onSite||!e.paymentsSettings.onSite)||e.paymentsSettings.payPal.enabled&&(e.$root.settings.payments.payPal.enabled||!e.paymentsSettings.payPal.enabled)||e.paymentsSettings.stripe.enabled&&(e.$root.settings.payments.stripe.enabled||!e.paymentsSettings.stripe.enabled)||e.paymentsSettings.mollie.enabled&&(e.$root.settings.payments.mollie.enabled||!e.paymentsSettings.mollie.enabled)||e.paymentsSettings.square.enabled&&(e.$root.settings.payments.square.enabled||!e.paymentsSettings.square.enabled)||e.paymentsSettings.razorpay.enabled&&(e.$root.settings.payments.razorpay.enabled||!e.paymentsSettings.razorpay.enabled)?e._e():n("el-alert",{attrs:{type:"warning","show-icon":"",title:"",description:e.$root.labels.payment_warning,closable:!1}})],2),e._v(" "),n("LicenceBlock",{attrs:{licence:"starter"}})],1):e._e(),e._v(" "),e.zoomSettings||e.lessonSpaceSettings||e.googleMeetSettings||e.microsoftTeamsSettings?n("el-collapse",{class:e.licenceClass(),model:{value:e.integrationsSettingsCollapse,callback:function(t){e.integrationsSettingsCollapse=t},expression:"integrationsSettingsCollapse"}},[n("el-collapse-item",{staticClass:"am-setting-box",attrs:{disabled:e.notInLicence(),name:"integrationsSettings"}},[n("template",{slot:"title"},[n("img",{staticClass:"svg-amelia",staticStyle:{"margin-right":"10px"},attrs:{src:e.$root.getUrl+"public/img/web-hook.svg"}}),e._v(" "+e._s(e.$root.labels.integrations_settings)+"\n ")]),e._v(" "),e.zoomSettings?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[e._v("\n "+e._s(e.$root.labels.zoom)+"\n ")]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:e.zoomSettings.enabled,callback:function(t){e.$set(e.zoomSettings,"enabled",t)},expression:"zoomSettings.enabled"}})],1)],1)],1):e._e(),e._v(" "),e.zoomSettings&&e.zoomSettings.enabled&&!e.isZoomProvidersConnected?n("el-alert",{attrs:{type:"warning","show-icon":"",title:"",description:e.$root.labels.zoom_warning,closable:!1}}):e._e(),e._v(" "),e.googleMeetSettings?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[e._v("\n "+e._s(e.$root.labels.enable_google_meet)+"\n ")]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:e.googleMeetSettings.enabled,callback:function(t){e.$set(e.googleMeetSettings,"enabled",t)},expression:"googleMeetSettings.enabled"}})],1)],1)],1):e._e(),e._v(" "),e.microsoftTeamsSettings?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[e._v("\n "+e._s(e.$root.labels.enable_microsoft_teams)+"\n ")]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:e.microsoftTeamsSettings.enabled,callback:function(t){e.$set(e.microsoftTeamsSettings,"enabled",t)},expression:"microsoftTeamsSettings.enabled"}})],1)],1)],1):e._e(),e._v(" "),e.lessonSpaceSettings?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[e._v("\n "+e._s(e.$root.labels.lesson_space)+"\n ")]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:e.lessonSpaceSettings.enabled,callback:function(t){e.$set(e.lessonSpaceSettings,"enabled",t)},expression:"lessonSpaceSettings.enabled"}})],1)],1)],1):e._e()],2),e._v(" "),n("LicenceBlock")],1):e._e()],1)},staticRenderFns:[]}},881:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(91),o=n(654),a=n(733),s=n.n(a);t.default={mixins:[i.a,o.a],name:"DialogTranslate",props:{passedTranslations:null,name:"",allLanguagesData:null,usedLanguages:null,type:{required:!1,default:"name",type:String},tab:"",cfOptions:{required:!1,default:function(){return[]},type:Array},eventTickets:{required:!1,default:function(){return[]},type:Array},employeeBadges:{required:!1,default:function(){return[]},type:Array},hasQuill:!0},data:function(){return{translations:null,oldTranslations:null,newTranslations:[],settings:null,newLanguages:[],languageWidth:12,options:[],tickets:[],allLanguagesKeys:[],badges:[]}},mounted:function(){var e=this;this.translations=this.passedTranslations?JSON.parse(this.passedTranslations):{},this.oldTranslations=this.translations[this.type]?this.translations[this.type]:{},(this.oldTranslations?this.usedLanguages.filter(function(t){return!Object.keys(e.oldTranslations).includes(t)}):this.usedLanguages).forEach(function(t){e.oldTranslations[t]=""}),_.isEmpty(this.oldTranslations)&&this.addLanguage(),this.oldTranslations=JSON.parse(JSON.stringify(this.oldTranslations)),"description"!==this.type&&"cf"!==this.tab&&"tickets"!==this.tab&&"url"!==this.type&&"badges"!==this.type||(this.languageWidth=24);var t=JSON.parse(JSON.stringify(this.cfOptions));t.forEach(function(t){t.translations?t.translations=JSON.parse(t.translations):t.translations={},e.usedLanguages.forEach(function(e){t.translations[e]||(t.translations[e]="")})}),this.options=t;var n=JSON.parse(JSON.stringify(this.eventTickets));if(n.forEach(function(t){t.translations?t.translations=JSON.parse(t.translations):t.translations={},e.usedLanguages.forEach(function(e){t.translations[e]||(t.translations[e]="")})}),this.tickets=n,"badges"===this.type){var i=JSON.parse(JSON.stringify(this.employeeBadges));i.forEach(function(t){t.translations?t.translations=JSON.parse(t.translations):t.translations={},e.usedLanguages.forEach(function(e){t.translations[e]||(t.translations[e]="")})}),this.badges=i}this.allLanguagesKeys=Object.keys(this.allLanguagesData)},computed:{dialogStyle:function(){return"cf"!==this.tab&&"tickets"!==this.tab&&"category"!==this.tab&&"roles"!==this.tab&&"badges"!==this.tab?"margin-bottom: 0":""}},methods:{saveDialog:function(){var e=this;this.newTranslations.forEach(function(t){t.lan&&(e.usedLanguages.includes(t.lan)||e.newLanguages.push(t.lan),e.oldTranslations[t.lan]=t.value)}),this.translations[this.type]=this.oldTranslations,this.options.forEach(function(e){e.edited=!0,e.translations=JSON.stringify(e.translations)}),this.tickets.forEach(function(e){e.edited=!0,e.translations=JSON.stringify(e.translations)}),"badges"===this.type?this.badges.forEach(function(e){e.translations=JSON.stringify(e.translations)}):this.badges=null,this.$emit("saveDialogTranslate",JSON.stringify(this.translations),this.newLanguages,this.tab,this.options,this.tickets,this.badges)},closeDialog:function(){this.$emit("closeDialogTranslate")},addLanguage:function(){this.newTranslations.push({lan:"",value:""})},getLanguageLabel:function(e,t){return!t||"name"!==this.type&&"firstName"!==this.type&&"lastName"!==this.type||"cf"===this.tab||"tickets"===this.tab||"badges"===this.tab?this.allLanguagesData[e].name:this.allLanguagesData[e].name.substring(0,21)},getLanguageFlag:function(e){return e&&this.allLanguagesData[e]&&this.allLanguagesData[e].country_code?this.$root.getUrl+"public/img/flags/"+this.allLanguagesData[e].country_code+".png":this.$root.getUrl+"public/img/grey.svg"},goBack:function(){"cf"===this.tab||"tickets"===this.tab||"category"===this.tab||"badges"===this.type?this.closeDialog():this.saveDialog()},getHeaderTitle:function(){return"cf"===this.tab?this.$root.labels.translate+" "+this.$root.labels.custom_field:"tickets"===this.tab?this.$root.labels.translate+" "+this.$root.labels.event_tickets:"description"===this.type?this.$root.labels.translate+" "+this.$root.labels.description:"url"===this.type?this.$root.labels.url:"badges"===this.type?this.$root.labels.translate+" "+this.$root.labels.employee_badge:this.$root.labels.translate+" "+this.name}},components:{ContentBlock:s.a}}},882:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"am-dialog-translate"},[n("div",{staticClass:"am-dialog-scrollable",style:e.dialogStyle},[n("div",{staticClass:"am-dialog-header"},[n("el-row",[n("el-col",{attrs:{span:16}},[n("img",{staticClass:"am-dialog-translate-svg-back",attrs:{src:e.$root.getUrl+"public/img/arrow-back.svg"},on:{click:e.goBack}}),e._v(" "),n("h2",[e._v(e._s(e.getHeaderTitle()))])]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:e.closeDialog}})],1)],1)],1),e._v(" "),n("LicenceBlockHeader"),e._v(" "),e._l(e.oldTranslations,function(t,i){return n("div",{key:i,class:e.licenceClassDisabled()},[e.usedLanguages&&-1!==e.usedLanguages.indexOf(i)?n("el-row",{attrs:{gutter:28,type:"flex"}},[n("el-col",{staticStyle:{"padding-right":"0"},attrs:{xs:e.languageWidth,sm:e.languageWidth}},[n("div",{staticClass:"used-language"},[n("img",{staticClass:"am-dialog-translate-flag",attrs:{src:e.getLanguageFlag(i)}}),e._v("\n "+e._s(e.getLanguageLabel(i,!0))+"\n ")])]),e._v(" "),"name"!==e.type&&"firstName"!==e.type&&"lastName"!==e.type||"cf"===e.tab||"tickets"===e.tab?e._e():n("el-col",{staticStyle:{"padding-right":"0"},attrs:{xs:8,sm:14}},[n("el-input",{attrs:{type:"text",placeholder:e.$root.labels.translation},model:{value:e.oldTranslations[i],callback:function(t){e.$set(e.oldTranslations,i,t)},expression:"oldTranslations[key]"}})],1)],1):e._e(),e._v(" "),"description"===e.type&&e.usedLanguages&&-1!==e.usedLanguages.indexOf(i)?n("el-row",{staticClass:"am-dialog-translate-description",staticStyle:{"margin-bottom":"8px"},attrs:{gutter:24,type:"flex"}},[n("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:24}},[n("content-block",{attrs:{label:e.$root.labels.description,entity:e.oldTranslations,property:i,textProperty:i,htmlProperty:i+"Html",hasTranslation:!1,hasQuill:e.hasQuill,textModeProp:!0,allowImage:!1}})],1)],1):e._e(),e._v(" "),"url"===e.type&&e.usedLanguages&&-1!==e.usedLanguages.indexOf(i)?n("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:24,type:"flex"}},[n("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:24}},[n("el-input",{attrs:{value:t,placeholder:"https://test.site.com/customer-panel/"},model:{value:e.oldTranslations[i],callback:function(t){e.$set(e.oldTranslations,i,t)},expression:"oldTranslations[key]"}})],1)],1):e._e(),e._v(" "),"cf"===e.tab&&e.usedLanguages&&-1!==e.usedLanguages.indexOf(i)?n("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:26,type:"flex"}},[n("el-col",{attrs:{sm:5}},[n("div",{staticClass:"am-dialog-translate-cf"},[e._v(" "+e._s(e.$root.labels.label_name)+" ")])]),e._v(" "),n("el-col",{attrs:{sm:5}},[n("div",{staticClass:"am-dialog-translate-cf-label"},[n("i",[e._v(e._s(e.name))])])]),e._v(" "),n("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:14}},[n("el-input",{attrs:{value:t,type:"text",placeholder:" "},model:{value:e.oldTranslations[i],callback:function(t){e.$set(e.oldTranslations,i,t)},expression:"oldTranslations[key]"}})],1)],1):e._e(),e._v(" "),e._l(e.options,function(t,o){return e.cfOptions.length&&e.usedLanguages&&-1!==e.usedLanguages.indexOf(i)?n("div",[n("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:20,type:"flex"}},[n("el-col",{attrs:{sm:5}},[n("div",{staticClass:"am-dialog-translate-cf"},[e._v(" #"+e._s(o))])]),e._v(" "),n("el-col",{attrs:{sm:5}},[n("div",{staticClass:"am-dialog-translate-cf-label"},[n("i",[e._v(e._s(t.label))])])]),e._v(" "),n("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:14}},[n("el-input",{attrs:{type:"text",placeholder:" "},model:{value:t.translations[i],callback:function(n){e.$set(t.translations,i,n)},expression:"option['translations'][key]"}})],1)],1)],1):e._e()}),e._v(" "),e._l(e.tickets,function(t){return e.eventTickets.length&&e.usedLanguages&&-1!==e.usedLanguages.indexOf(i)?n("div",[n("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:20,type:"flex"}},[n("el-col",{attrs:{sm:5}},[n("div",{staticClass:"am-dialog-translate-cf-label"},[n("i",[e._v(e._s(t.name))])])]),e._v(" "),n("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:19}},[n("el-input",{attrs:{type:"text",placeholder:" "},model:{value:t.translations[i],callback:function(n){e.$set(t.translations,i,n)},expression:"item['translations'][key]"}})],1)],1)],1):e._e()}),e._v(" "),e._l(e.badges,function(t){return e.badges.length&&e.usedLanguages&&-1!==e.usedLanguages.indexOf(i)?n("div",[n("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:20,type:"flex"}},[n("el-col",{attrs:{sm:8}},[n("div",{staticClass:"am-dialog-translate-cf-label"},[n("i",[e._v(e._s(t.content))])])]),e._v(" "),n("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:16}},[n("el-input",{attrs:{type:"text",placeholder:" "},model:{value:t.translations[i],callback:function(n){e.$set(t.translations,i,n)},expression:"item['translations'][key]"}})],1)],1)],1):e._e()})],2)}),e._v(" "),e._l(e.newTranslations,function(t,i){return n("div",{key:i,class:e.licenceClassDisabled()},[n("el-row",{staticStyle:{"margin-right":"-15px"},attrs:{gutter:28,type:"flex"}},[n("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:e.languageWidth}},[n("el-select",{attrs:{placeholder:e.$root.labels.language,clearable:"",filterable:""},model:{value:e.newTranslations[i].lan,callback:function(t){e.$set(e.newTranslations[i],"lan",t)},expression:"newTranslations[index].lan"}},[n("template",{slot:"prefix"},[n("img",{staticClass:"am-dialog-translate-flag-selected",attrs:{src:e.getLanguageFlag(e.newTranslations[i].lan)}})]),e._v(" "),e._l(e.allLanguagesKeys,function(t,i){return n("el-option",{key:i,attrs:{label:e.getLanguageLabel(t,!1),value:t,disabled:t in e.oldTranslations||t===e.$root.locale}},[n("span",[n("img",{staticClass:"am-dialog-translate-flag",attrs:{src:e.getLanguageFlag(t)}}),e._v("\n "+e._s(e.getLanguageLabel(t,!1))+"\n ")])])})],2)],1),e._v(" "),"name"!==e.type&&"firstName"!==e.type&&"lastName"!==e.type||"cf"===e.tab||"tickets"===e.tab?e._e():n("el-col",{staticStyle:{"padding-right":"0"},attrs:{xs:14,sm:18}},[n("el-input",{attrs:{type:"text",name:t.name,placeholder:e.$root.labels.translation},model:{value:e.newTranslations[i].value,callback:function(t){e.$set(e.newTranslations[i],"value",t)},expression:"newTranslations[index].value"}})],1)],1),e._v(" "),"description"===e.type?n("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:24,type:"flex"}},[n("el-col",{attrs:{sm:24}},[n("el-input",{attrs:{value:t,type:"textarea",autosize:{minRows:4,maxRows:6}},model:{value:e.newTranslations[i].value,callback:function(t){e.$set(e.newTranslations[i],"value",t)},expression:"newTranslations[index].value"}})],1)],1):e._e(),e._v(" "),"url"===e.type?n("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:24,type:"flex"}},[n("el-col",{attrs:{sm:24}},[n("el-input",{attrs:{value:t,placeholder:"https://test.site.com/customer-panel/"},model:{value:e.newTranslations[i].value,callback:function(t){e.$set(e.newTranslations[i],"value",t)},expression:"newTranslations[index].value"}})],1)],1):e._e(),e._v(" "),"cf"===e.tab?n("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:20,type:"flex"}},[n("el-col",{attrs:{sm:5}},[n("div",{staticClass:"am-dialog-translate-cf"},[e._v(" "+e._s(e.$root.labels.label_name)+" ")])]),e._v(" "),n("el-col",{attrs:{sm:5}},[n("div",{staticClass:"am-dialog-translate-cf-label"},[n("i",[e._v(e._s(e.name))])])]),e._v(" "),n("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:14}},[n("el-input",{attrs:{type:"text",name:t.name},model:{value:e.newTranslations[i].value,callback:function(t){e.$set(e.newTranslations[i],"value",t)},expression:"newTranslations[index].value"}})],1)],1):e._e(),e._v(" "),e._l(e.options,function(t,o){return e.cfOptions.length?n("div",[n("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:24,type:"flex"}},[n("el-col",{attrs:{sm:5}},[n("div",{staticClass:"am-dialog-translate-cf"},[e._v(" #"+e._s(o))])]),e._v(" "),n("el-col",{attrs:{sm:5}},[n("div",{staticClass:"am-dialog-translate-cf-label"},[n("i",[e._v(e._s(t.label))])])]),e._v(" "),n("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:14}},[n("el-input",{attrs:{type:"text",placeholder:" "},model:{value:t.translations[e.newTranslations[i].lan],callback:function(n){e.$set(t.translations,e.newTranslations[i].lan,n)},expression:"option['translations'][newTranslations[index].lan]"}})],1)],1)],1):e._e()}),e._v(" "),e._l(e.tickets,function(t){return e.eventTickets.length?n("div",[n("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:24,type:"flex"}},[n("el-col",{attrs:{sm:5}},[n("div",{staticClass:"am-dialog-translate-cf-label"},[n("i",[e._v(e._s(t.name))])])]),e._v(" "),n("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:19}},[n("el-input",{attrs:{type:"text",placeholder:" "},model:{value:t.translations[e.newTranslations[i].lan],callback:function(n){e.$set(t.translations,e.newTranslations[i].lan,n)},expression:"item['translations'][newTranslations[index].lan]"}})],1)],1)],1):e._e()}),e._v(" "),e._l(e.badges,function(t){return e.badges.length?n("div",[n("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:24,type:"flex"}},[n("el-col",{attrs:{sm:8}},[n("div",{staticClass:"am-dialog-translate-cf-label"},[n("i",[e._v(e._s(t.content))])])]),e._v(" "),n("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:16}},[n("el-input",{attrs:{type:"text",placeholder:" "},model:{value:t.translations[e.newTranslations[i].lan],callback:function(n){e.$set(t.translations,e.newTranslations[i].lan,n)},expression:"item['translations'][newTranslations[index].lan]"}})],1)],1)],1):e._e()})],2)}),e._v(" "),"provider"!==e.$root.settings.role?n("div",{class:e.licenceClassDisabled()},[n("img",{staticClass:"am-dialog-translate-svg-plus",attrs:{src:e.$root.getUrl+"public/img/plus-circle.svg"},on:{click:e.addLanguage}}),e._v(" "),n("div",{staticClass:"add-language",on:{click:e.addLanguage}},[e._v(e._s(e.$root.labels.add_language))])]):e._e()],2),e._v(" "),"category"===e.tab||"cf"===e.tab||"tickets"===e.tab||"roles"===e.tab||"badges"===e.type?n("div",{staticClass:"am-dialog-footer"},[n("div",{staticClass:"am-dialog-footer-actions"},[n("el-row",[n("el-col",{staticClass:"align-right",attrs:{sm:24}},[n("el-button",{attrs:{type:""},on:{click:e.closeDialog}},[e._v(e._s(e.$root.labels.cancel))]),e._v(" "),n("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.saveDialog}},[e._v(e._s(e.$root.labels.save))])],1)],1)],1)]):e._e()])},staticRenderFns:[]}},883:function(e,t,n){"use strict";t.a={data:function(){return{freePeriodsInSeconds:[0,86400]}},methods:{startTimeChanged:function(e,t,n,i){if(null===e){i(null);var o=document.getElementsByClassName("time-select-item"),a=!0,s=!1,r=void 0;try{for(var l,c=o[Symbol.iterator]();!(a=(l=c.next()).done);a=!0)for(var u=l.value,d=this.getStringTimeInSeconds(u.innerHTML),p=0;p<n.length;p++)if(d>n[p][0]&&d<n[p][1]){u.style.pointerEvents="none",u.style.color="#DCDCDC";break}}catch(e){s=!0,r=e}finally{try{!a&&c.return&&c.return()}finally{if(s)throw r}}}},findFreePeriods:function(e){for(var t=[],n=0,i=0;i<e.length;i++)n!==e[i][0]&&t.push([n,e[i][0]]),n=e[i][1];86400!==n&&t.push([n,86400]),this.freePeriodsInSeconds=t},getBorderTime:function(e,t){return{start:"00:00",end:"24:00",step:this.secondsToTimeSelectStep(this.getTimeSlotLength()),minTime:e,maxTime:t}},getPeriodBorderTime:function(e,t,n){var i=null,o=null;if(null===e)return this.getBorderTime(i,o);for(var a=this.getStringTimeInSeconds(e),s=0;s<this.freePeriodsInSeconds.length;s++)if(a>=this.freePeriodsInSeconds[s][0]&&a<this.freePeriodsInSeconds[s][1]){n?(i=this.secondsToTimeSelectStep(this.freePeriodsInSeconds[s][0]-this.getTimeSlotLength()),o=null!==t?t:this.secondsToTimeSelectStep(this.freePeriodsInSeconds[s][1]+this.getTimeSlotLength())):(i=e,o=this.secondsToTimeSelectStep(this.freePeriodsInSeconds[s][1]+this.getTimeSlotLength()));break}return null===i&&null===o&&(i=o=e),this.getBorderTime(i,o)}}}},897:function(e,t,n){var i=n(90)(null,n(898),!1,null,null,null);e.exports=i.exports},898:function(e,t){e.exports={render:function(){var e=this.$createElement;return(this._self._c||e)("div")},staticRenderFns:[]}},899:function(e,t,n){var i=n(90)(n(900),n(901),!1,null,null,null);e.exports=i.exports},900:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(657),o=n(699);n.n(o);t.default={mixins:[i.a],name:"PersonPrice",props:{service:{},enabledDelete:!0,enabledRange:!0},methods:{personsSelected:function(e){this.service.customPricing.persons.length-1===e&&this.service.customPricing.persons[this.service.customPricing.persons.length-1].range!==this.service.maxCapacity&&this.addRange()},isRangeSelected:function(e,t){return 1!==this.service.customPricing.persons.length&&(0===t?e>=(this.service.customPricing.persons[t+1].range?this.service.customPricing.persons[t+1].range:this.service.maxCapacity):t===this.service.customPricing.persons.length-1?e<=this.service.customPricing.persons[t-1].range:e>=(this.service.customPricing.persons[t+1].range?this.service.customPricing.persons[t+1].range:this.service.maxCapacity)||e<=this.service.customPricing.persons[t-1].range)},addRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.service.customPricing.persons.push({range:null!==e?e:null,price:0,rules:[]})},deletePersonsRange:function(e){this.service.customPricing.persons.length-1===e&&(this.service.customPricing.persons[e-1].range=null),this.service.customPricing.persons.splice(e,1),this.service.customPricing.persons.length<=1&&(this.service.customPricing.enabled=null,this.service.customPricing.persons=[],this.$emit("disable"))}},mounted:function(){this.service.customPricing.persons.length||(this.addRange(1),this.addRange())},components:{Money:o.Money}}},901:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"am-service-custom-duration"},[n("div",[n("el-row",{staticClass:"zero-margin-bottom",attrs:{gutter:24}},[n("el-col",{attrs:{span:6}},[n("span",[e._v(e._s(e.$root.labels.from+":"))])]),e._v(" "),n("el-col",{attrs:{span:6}},[n("span",[e._v(e._s(e.$root.labels.to_upper+":"))])]),e._v(" "),n("el-col",{attrs:{span:10}},[n("span",[e._v(e._s(e.$root.labels.price+":"))])]),e._v(" "),n("el-col",{attrs:{span:2}})],1),e._v(" "),e._l(e.service.customPricing.persons,function(t,i){return e.enabledRange||!i||e.service.customPricing.persons[i-1].range+1<=e.service.maxCapacity?n("el-row",{key:i,staticClass:"small-margin-bottom am-service-custom-duration-item",attrs:{gutter:24,type:"flex"}},[n("el-col",{staticStyle:{"margin-bottom":"7px"},attrs:{span:6}},[e.enabledRange?n("el-select",{attrs:{value:i?e.service.customPricing.persons[i-1].range+1:1,placeholder:"",disabled:!0}}):n("el-input-number",{attrs:{controls:!1,value:i?e.service.customPricing.persons[i-1].range+1:1,disabled:!0}})],1),e._v(" "),n("el-col",{staticStyle:{"margin-bottom":"7px"},attrs:{span:6}},[e.enabledRange?n("el-select",{attrs:{placeholder:e.service.maxCapacity.toString()},on:{change:function(t){return e.personsSelected(i)}},model:{value:t.range,callback:function(n){e.$set(t,"range",n)},expression:"item.range"}},e._l(e.service.maxCapacity,function(t){return n("el-option",{key:t,attrs:{disabled:e.isRangeSelected(t,i),value:t}})}),1):n("el-input-number",{attrs:{controls:!1,value:e.service.maxCapacity<=t.range||i===e.service.customPricing.persons.length-1?e.service.maxCapacity:t.range,disabled:!0}})],1),e._v(" "),n("el-col",{staticStyle:{"margin-bottom":"7px"},attrs:{span:10}},[n("money",e._b({staticClass:"el-input el-input__inner",staticStyle:{height:"40px"},on:{input:function(n){0===i&&(e.service.price=t.price)}},model:{value:t.price,callback:function(n){e.$set(t,"price",n)},expression:"item.price"}},"money",e.moneyComponentData,!1))],1),e._v(" "),Object.keys(e.service.customPricing.persons).length>2?n("el-col",{staticStyle:{"margin-bottom":"7px"},attrs:{span:2}},[e.enabledDelete&&e.service.customPricing.persons.length>1?n("span",{on:{click:function(t){return e.deletePersonsRange(i)}}},[n("img",{staticClass:"svg-amelia",attrs:{width:"16px",src:e.$root.getUrl+"public/img/delete.svg"}})]):e._e()]):e._e()],1):e._e()})],2)])},staticRenderFns:[]}},902:function(e,t,n){var i=n(90)(n(903),n(904),!1,null,null,null);e.exports=i.exports},903:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(657),o=n(336),a=n(883),s=n(660),r=n(699);n.n(r);t.default={mixins:[o.a,s.a,a.a,i.a],name:"PeriodPrice",props:{service:{},enabledAdd:!0,enabledEdit:!0,enabledDelete:!0},data:function(){return{mode:"default",periods:[],weekDays:[]}},methods:{addPeriod:function(e){this.service.customPricing.periods[this.mode][e].ranges.push({from:this.service.customPricing.periods[this.mode][e].ranges[this.service.customPricing.periods[this.mode][e].ranges.length-1].to,to:null,price:0})},addDefaultDays:function(){var e=[];this.service.customPricing.periods[this.mode].forEach(function(t){e=e.concat(t.days)}),this.service.customPricing.periods[this.mode].push({days:[0,1,2,3,4,5,6].filter(function(t){return!e.includes(t)}),ranges:[{from:null,to:null,price:0}]})},addCustomDays:function(){this.service.customPricing.periods[this.mode].push({dates:{start:"",end:""},ranges:[{from:null,to:null,price:0}]})},deleteDays:function(e){this.service.customPricing.periods[this.mode].splice(e,1),0===this.service.customPricing.periods.default.length&&this.service.customPricing.periods.custom.length?this.mode="custom":0===this.service.customPricing.periods.custom.length&&this.service.customPricing.periods.default.length&&(this.mode="default")},deletePeriod:function(e,t){this.service.customPricing.periods[this.mode][e].ranges.splice(t,1)},getPreviousSlot:function(e){return this.getSecondsInStringTime(this.getStringTimeInSeconds(e)-this.$root.settings.general.timeSlotLength)},getNextSlot:function(e){return this.getSecondsInStringTime(this.getStringTimeInSeconds(e)+this.$root.settings.general.timeSlotLength)},disabledDates:function(e){var t=this,n=[];return this.service&&this.service.customPricing.periods.custom.forEach(function(i,o){if(e!==o&&i.dates.start&&i.dates.end){for(var a=t.$moment(i.dates.start),s=t.$moment(i.dates.end),r=[];a.isSameOrBefore(s);)r.push(t.$moment(a).toDate()),a.add(1,"days");n=n.concat(r)}}),n}},created:function(){for(var e=0;e<7;e++)this.weekDays.push({label:this.$moment().isoWeekday(e+1).format("dd"),enabled:!0});!this.service.customPricing.periods.default.length&&this.service.customPricing.periods.custom.length&&(this.mode="custom")},components:{Money:r.Money}}},904:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"am-service-periods",staticStyle:{"padding-bottom":"10px"}},[n("el-tabs",{model:{value:e.mode,callback:function(t){e.mode=t},expression:"mode"}},[e.service.customPricing.periods.default.length||e.enabledAdd?n("el-tab-pane",{attrs:{name:"default",label:e.$root.labels.week_days}}):e._e(),e._v(" "),e.service.customPricing.periods.custom.length||e.enabledAdd?n("el-tab-pane",{attrs:{name:"custom",label:e.$root.labels.custom_days}}):e._e()],1),e._v(" "),e._l(e.service.customPricing.periods[e.mode],function(t,i){return n("div",{staticClass:"am-service-periods-day"},["default"===e.mode?n("el-row",{staticStyle:{"margin-top":"15px"}},[n("el-col",{attrs:{sm:12,md:20}},["default"===e.mode?n("el-checkbox-group",{class:{"am-service-periods-day-disabled":!e.enabledEdit},staticStyle:{height:"45px"},attrs:{border:!0,size:"mini"},model:{value:t.days,callback:function(n){e.$set(t,"days",n)},expression:"item.days"}},e._l(e.weekDays,function(t,o){return n("el-checkbox-button",{key:o,attrs:{label:o,disabled:-1!==e.service.customPricing.periods[e.mode].reduce(function(e,t,n){return e.concat(i!==n?t.days:[])},[]).indexOf(o)}},[e._v("\n "+e._s(t.label)+"\n ")])}),1):e._e()],1),e._v(" "),n("el-col",{attrs:{sm:12,md:4}},[e.enabledDelete?n("div",{staticClass:"am-service-periods-day-remove"},[n("img",{staticClass:"svg-amelia",attrs:{width:"16px",src:e.$root.getUrl+"public/img/delete.svg"},on:{click:function(t){return e.deleteDays(i)}}})]):e._e()])],1):e._e(),e._v(" "),"custom"===e.mode?n("el-row",{staticStyle:{"margin-top":"15px"}},[n("el-col",{staticClass:"v-calendar-column",attrs:{sm:12,md:20}},[n("v-date-picker",{class:{"am-service-periods-day-disabled":!e.enabledEdit},staticStyle:{"margin-bottom":"16px",height:"45px"},attrs:{mode:"range","input-class":"el-input__inner","popover-visibility":"focus","popover-direction":"bottom",placeholder:e.$root.labels.pick_a_date_or_range,"popover-align":"center","show-day-popover":!1,"is-expanded":!1,"is-required":!1,"is-double-paned":!1,"is-read-only":!0,"tint-color":"#1A84EE","input-props":{class:"el-input__inner",readOnly:"readonly"},formats:e.vCalendarFormats,"disabled-dates":e.disabledDates(i)},scopedSlots:e._u([{key:"default",fn:function(i){i.inputValue;var o=i.inputEvents;return[n("input",e._g({staticClass:"el-input__inner",attrs:{placeholder:e.momentDateFormat+" - "+e.momentDateFormat},domProps:{value:t.dates.start&&t.dates.end?e.getFrontedFormattedDate(e.$moment(t.dates.start).format("YYYY-MM-DD"))+" - "+e.getFrontedFormattedDate(e.$moment(t.dates.end).format("YYYY-MM-DD")):""}},o))]}}],null,!0),model:{value:t.dates,callback:function(n){e.$set(t,"dates",n)},expression:"item.dates"}})],1),e._v(" "),n("el-col",{attrs:{sm:12,md:4}},[e.enabledDelete?n("div",{staticClass:"am-service-periods-day-remove"},[n("img",{staticClass:"svg-amelia",attrs:{width:"16px",src:e.$root.getUrl+"public/img/delete.svg"},on:{click:function(t){return e.deleteDays(i)}}})]):e._e()])],1):e._e(),e._v(" "),e._l(t.ranges,function(o,a){return n("el-row",{key:a,staticClass:"am-service-periods-day-time",attrs:{gutter:10}},[n("el-col",{attrs:{md:7}},[n("el-time-select",{attrs:{disabled:!e.enabledEdit,clearable:!1,placeholder:"00:00","picker-options":e.getTimeSelectOptionsWithLimits(0===a?null:e.getPreviousSlot(t.ranges[a-1].to),o.to),size:"medium"},model:{value:o.from,callback:function(t){e.$set(o,"from",t)},expression:"range.from"}})],1),e._v(" "),n("el-col",{attrs:{md:7}},[n("el-time-select",{attrs:{disabled:!e.enabledEdit,clearable:!1,placeholder:"24:00","picker-options":e.getTimeSelectOptionsWithLimits(o.from,a===t.ranges.length-1?null:e.getNextSlot(t.ranges[a+1].from)),size:"medium"},model:{value:o.to,callback:function(t){e.$set(o,"to",t)},expression:"range.to"}})],1),e._v(" "),n("el-col",{attrs:{md:10}},[n("money",e._b({staticClass:"el-input el-input__inner",staticStyle:{width:"70%"},model:{value:o.price,callback:function(t){e.$set(o,"price",t)},expression:"range.price"}},"money",e.moneyComponentData,!1)),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.enabledDelete&&e.service.customPricing.periods[e.mode][i].ranges.length>1,expression:"enabledDelete && service.customPricing.periods[mode][dayIndex].ranges.length > 1"}],staticClass:"am-service-periods-day-time-remove",staticStyle:{"margin-bottom":"auto","vertical-align":"text-bottom"},on:{click:function(t){return e.deletePeriod(i,a)}}},[n("i",{staticClass:"el-icon-close remove"})])],1)],1)}),e._v(" "),e.enabledAdd?n("el-button",{class:{"am-service-periods-day-time-remove-disabled":!t.ranges[t.ranges.length-1].to||"24:00"===t.ranges[t.ranges.length-1].to},attrs:{type:"primary",size:"mini",disabled:!t.ranges[t.ranges.length-1].to||"24:00"===t.ranges[t.ranges.length-1].to},on:{click:function(t){return e.addPeriod(i)}}},[e._v("\n "+e._s(e.$root.labels.add_period)+"\n ")]):e._e()],2)}),e._v(" "),e.enabledAdd?n("div",{staticClass:"am-service-periods-add"},[n("el-button",{class:{"am-service-periods-add-disabled":"default"===e.mode&&7===e.service.customPricing.periods[e.mode].reduce(function(e,t){return e+t.days.length},0)},attrs:{type:"primary",size:"mini",disabled:"default"===e.mode&&7===e.service.customPricing.periods[e.mode].reduce(function(e,t){return e+t.days.length},0)},on:{click:function(t){"default"===e.mode?e.addDefaultDays():e.addCustomDays()}}},[e._v("\n "+e._s(e.$root.labels.add_days)+"\n ")])],1):e._e()],2)},staticRenderFns:[]}}});
Save
Back