FileMaster
Search
Toggle Dark Mode
Home
/
.
/
wp-content
/
plugins
/
ameliabooking
/
public
/
js
/
chunks
Edit File: amelia-booking-cabinet-0d421e0e1e2bdd88e543.js
wpJsonpAmeliaBookingPlugin([2],{1037:function(e,t,n){"use strict";t.a={data:function(){return{}},methods:{}}},1556:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(814),o=n.n(i),a=n(1557),s=n.n(a),r=n(1560),l=n.n(r),c=n(1563),u=n.n(c),d=n(1566),p=n.n(d),m=n(1569),f=n.n(m),h=n(1598),g=n.n(h),v=n(1601),b=n.n(v),y=n(668),_=n(1604),k=n.n(_),C=n(932),w=n.n(C),x=n(336),S=n(660),P=n(877),T=n(659),$=n(655),E=n(654),D=n(673),O=n(0),A=n.n(O),I=n(658),L=n(710),N=n(334),F=n.n(N),B=n(633),j=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};function M(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){return function i(o,a){try{var s=t[o](a),r=s.value}catch(e){return void n(e)}if(!s.done)return Promise.resolve(r).then(function(e){i("next",e)},function(e){i("throw",e)});e(r)}("next")})}}t.default={name:"Cabinet",components:{CabinetAppointmentDialog:s.a,CabinetAttendeesDialog:l.a,CabinetAuth:u.a,CabinetCancelDialog:p.a,CabinetDashboard:f.a,CabinetDeleteProfileDialog:g.a,CabinetEventDialog:b.a,CabinetRescheduleDialog:k.a,CabinetSpinner:w.a},mixins:[y.a,x.a,S.a,P.a,T.a,$.a,E.a,D.a,I.a,L.a],props:{cabinetType:{type:String,default:"customer"}},created:function(){this.$store.commit("cabinet/setCabinetType",this.cabinetType),this.$store.commit("cabinet/setSettingsName",this.cabinetType+"Cabinet"),this.$store.commit("cabinet/setProfileProperty",{property:"email",value:F.a.get("ameliaUserEmail")}),this.$store.commit("cabinet/setActiveTab",this.isPanelActive("appointments")?"appointments":this.isPanelActive("events")?"events":"profile"),this.$store.commit("cabinet/setParams",{dates:this.getDateRange()}),"provider"===this.state.cabinetType&&(this.$root.settings.role="provider");var e=this.getUrlParams(window.location.href),t=F.a.get("ameliaToken");"token"in e&&(this.urlToken=e.token),this.googleCalendarSync(),this.outlookCalendarSync(),this.authenticateUser(t,"changePass"in e)},mounted:function(){this.inlineSVGCabinet()},data:function(){return{cancelType:"appointment",packagePurchaseId:null,packagePurchaseItems:null,bookingPackage:null,visibleSpinner:!1,options:{fetched:!1,availableEntitiesIds:{categories:[],employees:[],locations:[],services:[]},entities:{categories:[],customers:[],customFields:[],employees:[],locations:[],services:[]}},packagesAppointments:[],packagesAvailability:[],packagesData:[],appointment:{id:null,booking:[],bookingId:null,selectedDate:null,selectedPeriod:{},calendarTimeSlots:{},availableDates:[],disabledWeekdays:{},reservationType:null,dateTimeSlots:{}},appointments:{},events:{},checkUrlToken:!0,loadingTimeSlots:!1,urlToken:null,stripeLoading:!1,googleCalendar:null,googleCalendarId:"",outlookCalendarId:""}},computed:j({},Object(B.b)({state:function(e){return e.cabinet}})),methods:{changedTimeZone:function(){this.refreshReservations()},authenticateUser:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];setTimeout(function(){t.visibleSpinner=!0,e?t.authenticate(e,!1,!1):t.urlToken?t.authenticate(t.urlToken,!0,!1,n):t.authenticate("",!1,!0)},300)},googleCalendarSync:function(){if(this.$root.settings.googleCalendar.enabled&&"provider"===this.state.cabinetType){var e=this.getUrlQueryParams(window.location.href);e&&e.code&&e.scope&&this.fetchAccessTokenWithAuthCodeGoogle(e.code)}},fetchAccessTokenWithAuthCodeGoogle:function(e){var t=this,n=this.removeURLParameter(window.location.href,"code");n=this.removeURLParameter(n,"state"),n=this.removeURLParameter(n,"scope");var i=this.getUrlQueryParams(window.location.href).state;this.$http.post(this.$root.getAjaxUrl+"/google/authorization/token",{authCode:e,userId:i,redirectUri:n,isBackend:!1}).then(function(){history.pushState(null,null,n);var e=F.a.get("ameliaToken");t.authenticateUser(e)}).catch(function(e){console.log(e)})},outlookCalendarSync:function(){if(this.$root.settings.outlookCalendar.enabled&&"provider"===this.state.cabinetType){var e=this.getUrlQueryParams(window.location.href);e&&e.code&&!e.scope&&this.fetchAccessTokenWithAuthCodeOutlook(e.code)}},fetchAccessTokenWithAuthCodeOutlook:function(e){var t=this,n=this.getUrlQueryParams(window.location.href).state.split("amelia-outlook-calendar-auth-")[1];this.$http.post(this.$root.getAjaxUrl+"/outlook/authorization/token",{authCode:e,userId:n,redirectUri:window.location.href.split("?")[0]}).then(function(){var e=t.removeURLParameter(window.location.href,"code");e=t.removeURLParameter(e,"state"),e=t.removeURLParameter(e,"type"),history.pushState({},null,e);var n=F.a.get("ameliaToken");t.authenticateUser(n)}).catch(function(e){console.log(e.response.data.message),t.notify(t.$root.labels.error,e.response.data.message.split(".")[0],"error")})},authenticate:function(){var e=M(o.a.mark(function e(t,n,i){var a,s,r,l,c=this,u=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.$store.commit("cabinet/setLoadingAuthentication",!0),this.$store.commit("cabinet/setSubmitButtonSpinner",!0),a={cabinetType:this.cabinetType,changePass:u},i&&(a.checkIfWpUser=!0),!t&&this.state.login.password&&this.state.login.email&&(a.password=this.state.login.password,a.email=this.state.login.email),n&&(a.token=t),e.prev=6,e.next=9,this.$http.post(this.$root.getAjaxUrl+"/users/authenticate",a,null===t||this.disableAuthorizationHeader()?{}:{headers:{Authorization:"Bearer "+t}});case 9:if(!("authentication_required"in(s=e.sent).data.data)){e.next=14;break}return this.$root.settings.roles[this.state.settingsName].loginEnabled?this.$store.commit("cabinet/setDisplayProperty",{property:"login",value:!0}):this.$store.commit("cabinet/setDisplayProperty",{property:"forgotPassword",value:!0}),this.$store.commit("cabinet/setSubmitButtonSpinner",!1),e.abrupt("return");case 14:"is_wp_user"in s.data.data&&s.data.data.is_wp_user?this.$store.commit("cabinet/setIsWpUser",!0):this.$store.commit("cabinet/setIsWpUser",!1),"token"in s.data.data&&(F.a.set("ameliaToken",s.data.data.token,this.$root.settings.roles[this.state.settingsName].tokenValidTime,null,null,!0),F.a.set("ameliaUserEmail",s.data.data.user.email,this.$root.settings.roles[this.state.settingsName].tokenValidTime,null,null,!0),this.$store.commit("cabinet/setAmeliaToken",s.data.data.token)),this.urlToken&&(window.history.replaceState(null,null,this.removeURLParameter(window.location.href,"token")),this.urlToken=null),"provider"===(r=s.data.data.user).type&&this.$root.useTranslations&&r.serviceList.forEach(function(e){e.name=c.getNameTranslated(e),e.description=c.getDescriptionTranslated(e),e.extras.forEach(function(e){e.name=c.getNameTranslated(e),e.description=c.getDescriptionTranslated(e)})}),this.$store.commit("cabinet/setProfile",s.data.data.user),this.$store.commit("cabinet/setProfileProperty",{property:"birthday",value:s.data.data.user.birthday?A.a.utc(s.data.data.user.birthday.date,"YYYY-MM-DD HH:mm:ss").toDate():null}),this.$store.commit("cabinet/setClonedProfile",JSON.parse(JSON.stringify(this.state.profile))),this.$store.commit("cabinet/setHeaderErrorMessage",""),"set_password"in s.data.data&&s.data.data.set_password?(this.$store.commit("cabinet/setDisplayProperty",{property:"changePassword",value:!0}),this.$store.commit("cabinet/setDisplayProperty",{property:"cabinetDashboard",value:!1}),this.$store.commit("cabinet/setDisplayProperty",{property:"setPassword",value:!0}),this.$store.commit("cabinet/setSubmitButtonSpinner",!1)):"change_password"in s.data.data&&s.data.data.change_password?(this.$store.commit("cabinet/setDisplayProperty",{property:"changePassword",value:!0}),this.$store.commit("cabinet/setDisplayProperty",{property:"cabinetDashboard",value:!1}),this.$store.commit("cabinet/setDisplayProperty",{property:"setPassword",value:!1}),this.$store.commit("cabinet/setSubmitButtonSpinner",!1)):(this.$store.commit("cabinet/setDisplayProperty",{property:"cabinetDashboard",value:!0}),this.$store.commit("cabinet/setLoadingAuthentication",!1),this.$store.commit("cabinet/setIsUserAuthenticated",!0),this.$store.commit("cabinet/setSubmitButtonSpinner",!1),this.$store.commit("cabinet/setLoginPassword",""),this.$store.commit("cabinet/setDisplayProperty",{property:"changePassword",value:!1}),this.$store.commit("cabinet/setDisplayProperty",{property:"login",value:!1}),this.getOptions(),"ameliaUserLoggedIn"in window&&window.ameliaUserLoggedIn(s.data.data.user),"provider"!==this.state.cabinetType||!this.$root.settings.payments.stripe.enabled||!this.$root.settings.payments.stripe.connect.enabled||this.$root.licence.isLite||this.$root.licence.isStarter||this.$root.licence.isBasic||this.getStripeProvider(),(l="customer"===this.state.cabinetType?1e3*this.$root.settings.roles.customerCabinet.tokenValidTime:1e3*this.$root.settings.roles.providerCabinet.tokenValidTime)>0&&l<18144e5&&setTimeout(function(){c.$store.commit("cabinet/setFetchedEvents",!1),c.$store.commit("cabinet/setFetchedAppointments",!1),c.$store.commit("cabinet/setFetchedPackageAppointments",!1),c.$store.dispatch("cabinet/logout",c.$root.settings),c.$http.post(c.$root.getAjaxUrl+"/users/logout",{},{}),"ameliaUserLoggedOut"in window&&window.ameliaUserLoggedOut()},l)),e.next=29;break;case 26:e.prev=26,e.t0=e.catch(6),this.parseError(e.t0);case 29:case"end":return e.stop()}},e,this,[[6,26]])}));return function(t,n,i){return e.apply(this,arguments)}}(),getAppointments:function(){var e=this;this.$store.commit("cabinet/setFetchedAppointments",!1);var t=this.state.timeZone;this.$http.get(this.$root.getAjaxUrl+"/appointments",Object.assign(this.getAuthorizationHeaderObject(),{params:this.getAppropriateUrlParams(this.getSearchParams())})).then(function(n){e.setMissingServices(n.data.data.appointments),e.appointments=e.parseAppointments(n.data.data.appointments,t);var i=e.options.entities.customers.map(function(e){return parseInt(e.id)}),o=e.options.entities.customers;e.useSortedDateStrings(Object.keys(n.data.data.appointments)).forEach(function(e){n.data.data.appointments[e].appointments.forEach(function(e){e.checked=!1,e.bookings.forEach(function(e){-1===i.indexOf(parseInt(e.customer.id))&&(i.push(e.customer.id),o.push(e.customer))})})}),e.options.entities.customers=Object.values(o.sort(function(e,t){return e.firstName.toLowerCase()>t.firstName.toLowerCase()?1:-1})),e.$store.commit("cabinet/setFetchedAppointments",!0)}).catch(function(t){e.parseError(t),e.$store.commit("cabinet/setDisplayProperty",{property:"login",value:!0}),e.$store.commit("cabinet/setFetchedAppointments",!0)})},getPackageAppointments:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.$store.commit("cabinet/setFetchedPackageAppointments",!1);var i=this.state.timeZone;this.$http.get(this.$root.getAjaxUrl+"/appointments",Object.assign(this.getAuthorizationHeaderObject(),{params:this.getAppropriateUrlParams({packages:t,activePackages:n,source:"cabinet-"+this.state.cabinetType,timeZone:i})})).then(function(t){e.setMissingServices(t.data.data.appointments),e.parsePackageAppointments(t.data.data.availablePackageBookings,t.data.data.appointments,i),e.$store.commit("cabinet/setFetchedPackageAppointments",!0)}).catch(function(t){e.parseError(t),e.$store.commit("cabinet/setDisplayProperty",{property:"login",value:!0}),e.$store.commit("cabinet/setFetchedPackageAppointments",!0)})},getEvents:function(){var e=this;this.$store.commit("cabinet/setFetchedEvents",!1);var t=this.state.timeZone;this.$http.get(this.$root.getAjaxUrl+"/events",Object.assign(this.getAuthorizationHeaderObject(),{params:this.getAppropriateUrlParams(this.getSearchParams())})).then(function(n){e.events=e.parseEvents(n.data.data.events,t),e.$store.commit("cabinet/setFetchedEvents",!0)}).catch(function(t){e.parseError(t),e.$store.commit("cabinet/setDisplayProperty",{property:"login",value:!0}),e.$store.commit("cabinet/setFetchedEvents",!0)})},cancelBooking:function(){var e=M(o.a.mark(function e(){return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.$store.commit("cabinet/setDialogButtonSpinner",!0),e.prev=1,e.next=4,this.$http.post(this.$root.getAjaxUrl+"/bookings/cancel/"+this.appointment.bookingId,{type:this.appointment.reservationType},Object.assign(this.getAuthorizationHeaderObject(),{params:{source:"cabinet-"+this.state.cabinetType}}));case 4:e.t0=this.appointment.reservationType,e.next="appointment"===e.t0?7:"event"===e.t0?9:11;break;case 7:return this.notify(this.$root.labels.success,this.$root.labels.appointment_canceled,"success"),e.abrupt("break",11);case 9:return this.notify(this.$root.labels.success,this.$root.labels.event_canceled,"success"),e.abrupt("break",11);case 11:this.appointment.booking.status="canceled",this.appointment.booking.packageCustomerService&&"customer"===this.cabinetType&&(this.$root.licence.isPro||this.$root.licence.isDeveloper)&&this.getPackageAppointments([],0),this.$store.commit("cabinet/setDialogButtonSpinner",!1),this.$store.commit("cabinet/setDisplayProperty",{property:"dialogCancelAppointment",value:!1}),e.next=22;break;case 17:e.prev=17,e.t1=e.catch(1),this.parseError(e.t1),this.$store.commit("cabinet/setDialogButtonSpinner",!1),this.$store.commit("cabinet/setDisplayProperty",{property:"dialogCancelAppointment",value:!1});case 22:case"end":return e.stop()}},e,this,[[1,17]])}));return function(){return e.apply(this,arguments)}}(),cancelPackage:function(){var e=M(o.a.mark(function e(){var t,n=this;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.$store.commit("cabinet/setDialogButtonSpinner",!0),t="canceled",this.$http.post(this.$root.getAjaxUrl+"/packages/customers/"+this.packagePurchaseId,{status:t}).then(function(e){n.notify(n.$root.labels.success,n.$root.labels.package_purchase_canceled,"success"),Object.keys(n.packagePurchaseItems).forEach(function(e){var t=parseInt(e);if(n.packagePurchaseItems[t].packageCustomerId===n.packagePurchaseId){var i=n.bookingPackage.bookable.find(function(e){return e.service.id===n.packagePurchaseItems[t].serviceId});i&&void 0!==i&&(i.service.appointmentsAvailable=i.service.appointmentsAvailable-n.packagePurchaseItems[t].count),n.packagesData.forEach(function(e){e.id===n.bookingPackage.id&&(e.totalAvailableAppointments=e.totalAvailableAppointments-n.packagePurchaseItems[t].count)}),n.packagePurchaseItems[t].count=0,n.packagePurchaseItems[t].status="canceled"}}),"customer"===n.cabinetType&&(n.$root.licence.isPro||n.$root.licence.isDeveloper)&&n.getPackageAppointments([],0),n.$store.commit("cabinet/setDialogButtonSpinner",!1),n.$store.commit("cabinet/setDisplayProperty",{property:"dialogCancelAppointment",value:!1})}).catch(function(e){e.response&&n.notify(n.$root.labels.error,e.response.data.message,"error"),n.$store.commit("cabinet/setDialogButtonSpinner",!1),n.$store.commit("cabinet/setDisplayProperty",{property:"dialogCancelAppointment",value:!1})});case 3:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),rescheduleAppointment:function(){var e=M(o.a.mark(function e(){var t,n,i,a,s,r,l;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.$store.commit("cabinet/setDialogButtonSpinner",!0),t=Object.assign({},this.appointment),n=null,i=this.getStringFromDate(this.appointment.selectedDate)+" "+this.appointment.selectedPeriod.time,a=this.convertDateTimeRangeDifferenceToMomentDuration(t.bookingStart,t.bookingEnd),s=null,"UTC"!==(r=this.state.timeZone?this.state.timeZone:"UTC")||!this.$root.settings.general.showClientTimeZone&&"customer"!==this.cabinetType?s=i:(l=A()(i,"YYYY-MM-DD HH:mm").utc().format("YYYY-MM-DD HH:mm"),n=this.getClientUtcOffset(l),s=l),e.prev=8,e.next=11,this.$http.post(this.$root.getAjaxUrl+"/bookings/reassign/"+this.appointment.bookingId,{bookingStart:s,utcOffset:n,timeZone:r},Object.assign(this.getAuthorizationHeaderObject(),{params:{source:"cabinet-"+this.state.cabinetType}}));case 11:t.bookingStart=i+":00",t.bookingEnd=A()(i,"YYYY-MM-DD HH:mm").add(a.asMinutes(),"minutes").format("YYYY-MM-DD HH:mm")+":00",this.refreshReservations(),this.notify(this.$root.labels.success,this.$root.labels.appointment_rescheduled,"success"),this.$store.commit("cabinet/setDialogButtonSpinner",!1),this.$store.commit("cabinet/setDisplayProperty",{property:"dialogRescheduleAppointment",value:!1}),e.next=24;break;case 19:e.prev=19,e.t0=e.catch(8),this.parseError(e.t0),this.$store.commit("cabinet/setDialogButtonSpinner",!1),this.$store.commit("cabinet/setDisplayProperty",{property:"dialogRescheduleAppointment",value:!1});case 24:case"end":return e.stop()}},e,this,[[8,19]])}));return function(){return e.apply(this,arguments)}}(),getTimeSlots:function(){var e=M(o.a.mark(function e(t){var n,i,a,s,r,l,c,u;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=[],i=0,a=0,t.bookings.forEach(function(e){a+="approved"===e.status||"pending"===e.status?e.persons:0,e.extras.forEach(function(e){n.push({id:e.extraId,quantity:e.quantity})}),"duration"in e&&e.duration&&e.duration>i&&("approved"===e.status||"pending"===e.status)&&(i=e.duration)}),this.appointment.selectedDate=null,this.appointment.selectedPeriod={},this.appointment.dateTimeSlots={},this.loadingTimeSlots=!0,s=this.state.timeZone?this.state.timeZone:"UTC",e.prev=9,e.next=12,this.$http.get(this.$root.getAjaxUrl+"/slots",{params:this.getAppropriateUrlParams({serviceId:t.serviceId,serviceDuration:i,locationId:t.locationId,providerIds:[t.providerId],extras:JSON.stringify(n),excludeAppointmentId:t.isGroup?null:t.id,group:1,timeZone:s,page:"cabinet",persons:a})});case 12:r=e.sent,l="UTC"!==s||!this.$root.settings.general.showClientTimeZone&&"customer"!==this.cabinetType?r.data.data.slots:this.getConvertedTimeSlots(r.data.data.slots),this.appointment.calendarTimeSlots=l,c=[],u=null,this.useSortedDateStrings(Object.keys(l)).forEach(function(e){null===u&&(u=e),c.push(A()(e).toDate())}),this.showFirstEventMonth(u),this.appointment.id=t.id,this.appointment.bookingId=t.bookings[0].id,this.appointment.availableDates=c,this.appointment.disabledWeekdays={weekdays:[]},this.appointment.disabledWeekdays=0===this.appointment.availableDates.length?{weekdays:[1,2,3,4,5,6,7]}:null,t.loadingTimeSlots=!1,this.loadingTimeSlots=!1,this.$store.commit("cabinet/setDisplayProperty",{property:"dialogRescheduleAppointment",value:!0}),e.next=35;break;case 29:e.prev=29,e.t0=e.catch(9),console.log(e.t0),t.loadingTimeSlots=!1,this.loadingTimeSlots=!1,this.$store.commit("cabinet/setDisplayProperty",{property:"dialogRescheduleAppointment",value:!0});case 35:case"end":return e.stop()}},e,this,[[9,29]])}));return function(t){return e.apply(this,arguments)}}(),getFutureAppointments:function(){var e=this;this.$http.get(this.$root.getAjaxUrl+"/appointments",Object.assign(this.getAuthorizationHeaderObject(),{params:this.getAppropriateUrlParams({dates:[A()().format("YYYY-MM-DD")],source:"cabinet-"+this.state.cabinetType,timeZone:this.state.timeZone})})).then(function(t){e.setMissingServices(t.data.data.appointments);var n=t.data.data.appointments,i={};for(var o in n)for(var a=0;a<n[o].appointments.length;a++){var s=n[o].appointments[a].providerId,r=n[o].appointments[a].serviceId;s in i?-1===i[s].indexOf(r)&&i[s].push(r):(i[s]=[],i[s].push(r))}e.$store.commit("cabinet/setFutureAppointments",i)}).catch(function(t){e.parseError(t),e.$store.commit("cabinet/setDisplayProperty",{property:"login",value:!0})})},getSearchParams:function(){var e=JSON.parse(JSON.stringify(this.state.params)),t=[];e.dates&&(e.dates.start&&t.push(A()(e.dates.start).format("YYYY-MM-DD")),e.dates.end&&t.push(A()(e.dates.end).format("YYYY-MM-DD")),e.dates=t);var n={};return n.source="cabinet-"+this.state.cabinetType,2===e.dates.length&&(n.dates=[e.dates[0],e.dates[1]]),n.timeZone=this.state.timeZone,n},getStripeProvider:function(){var e=this;this.stripeLoading=!0,this.$store.commit("cabinet/setStripeProvider",null),this.$http.get(this.$root.getAjaxUrl+"/stripe/accounts/"+this.state.profile.id,{},Object.assign(this.getAuthorizationHeaderObject(),{})).then(function(t){t.data.data.account&&(e.stripeLoading=!1,e.$store.commit("cabinet/setStripeProvider",t.data.data.account))}).catch(function(e){})},getOptions:function(){var e=this;this.options.fetched=!1;var t=["employees","categories","locations","custom_fields","packages","lessonSpace_spaces","resources","taxes"];"provider"===this.state.cabinetType&&(t.push("tags"),t.push("settings"),t.push("coupons")),this.fetchEntities(function(){e.state.display.changePassword||"provider"===e.cabinetType&&(e.$store.commit("cabinet/setEditCategorizedServiceList",e.getParsedEditCategorizedServiceList(e.state.profile,e.options.entities.categories)),e.$store.commit("cabinet/setEditWeekDayList",e.getParsedEditWeekDayList(e.state.profile)));var t=[].concat(function(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)}(e.options.entities.tags));e.options.entities.tags=[],t.forEach(function(t){-1===e.options.entities.tags.indexOf(t.name)&&e.options.entities.tags.push(t.name)}),e.options.fetched=!0,"provider"===e.cabinetType&&e.setInitialCustomers(),e.getAppointments(),e.getEvents(),"provider"===e.cabinetType&&e.getFutureAppointments(),"customer"===e.cabinetType&&(e.$root.licence.isPro||e.$root.licence.isDeveloper)&&e.getPackageAppointments([],0)},{types:t,isFrontEnd:!1,isPanel:!0})},showFirstEventMonth:function(e){this.appointment.selectedDate=A()(e).toDate();var t=this;setTimeout(function(){t.appointment.selectedDate=null},100)},selectedDate:function(e){this.appointment.selectedDate=e;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),n.push({time:e,employees:i[e]})}),o||(this.appointment.selectedPeriod={})):(this.appointment.selectedDate=null,this.appointment.selectedPeriod={}),this.appointment.dateTimeSlots=n},selectedTime:function(e){this.appointment.selectedPeriod=e;var t=this,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])})},showDialogCancelBooking:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.cancelType=e.type,this.appointment.bookingId=e.bookings[t].id,this.appointment.id=e.id,this.appointment.reservationType=e.type,this.appointment.booking=e.bookings[t],this.$store.commit("cabinet/setDisplayProperty",{property:"dialogCancelAppointment",value:!0})},showDialogCancelPackage:function(e,t,n){this.cancelType="package",this.packagePurchaseId=e,this.packagePurchaseItems=t,this.bookingPackage=n,this.$store.commit("cabinet/setDisplayProperty",{property:"dialogCancelAppointment",value:!0})},getStringFromDate:function(e){return e.getFullYear()+"-"+"0".concat(e.getMonth()+1).slice(-2)+"-"+"0".concat(e.getDate()).slice(-2)},parseError:function(e){"data"in e.response.data&&"customerAlreadyBooked"in e.response.data.data&&e.response.data.data.customerAlreadyBooked?this.notify(this.$root.labels.error,this.$root.labels.customer_already_booked_app,"error"):"data"in e.response.data||!("message"in e.response.data)?("invalid_credentials"in e.response.data.data&&(this.$store.commit("cabinet/setSubmitButtonSpinner",!1),this.$store.commit("cabinet/setDisplayProperty",{property:"cabinetDashboard",value:!1}),this.$store.commit("cabinet/setDisplayProperty",{property:"changePassword",value:!1}),this.$store.commit("cabinet/setLoadingAuthentication",!1),this.$store.commit("cabinet/setIsUserAuthenticated",!1),this.$root.settings.roles[this.state.settingsName].loginEnabled?(this.$store.commit("cabinet/setHeaderErrorMessage",this.$root.labels.invalid_credentials),this.$store.commit("cabinet/setDisplayProperty",{property:"login",value:!0})):this.$store.commit("cabinet/setDisplayProperty",{property:"forgotPassword",value:!0})),"reauthorize"in e.response.data.data&&(F.a.remove("ameliaToken"),this.$store.commit("cabinet/setAmeliaToken",null),this.urlToken&&this.checkUrlToken?(this.checkUrlToken=!1,this.authenticate(this.urlToken,!0,!1)):(this.$store.commit("cabinet/setSubmitButtonSpinner",!1),this.$store.commit("cabinet/setDisplayProperty",{property:"cabinetDashboard",value:!1}),this.$store.commit("cabinet/setDisplayProperty",{property:"changePassword",value:!1}),this.$store.commit("cabinet/setLoadingAuthentication",!1),this.$store.commit("cabinet/setIsUserAuthenticated",!1),this.$root.settings.roles[this.state.settingsName].loginEnabled?this.$store.commit("cabinet/setDisplayProperty",{property:"login",value:!0}):this.$store.commit("cabinet/setDisplayProperty",{property:"forgotPassword",value:!0}))),"cancelBookingUnavailable"in e.response.data.data&&this.notify(this.$root.labels.error,this.$root.labels.booking_cancel_exception,"error"),"timeSlotUnavailable"in e.response.data.data&&!0===e.response.data.data.timeSlotUnavailable&&this.notify(this.$root.labels.error,this.$root.labels.time_slot_unavailable,"error"),"rescheduleBookingUnavailable"in e.response.data.data&&!0===e.response.data.data.rescheduleBookingUnavailable&&this.notify(this.$root.labels.error,this.$root.labels.booking_reschedule_exception,"error")):this.notify(this.$root.labels.error,e.response.data.message,"error")},getDateRange:function(){var e=this.getUrlParams(window.location.href),t="start"in e?e.start:null,n="end"in e?e.end:null;return t&&n?{start:A()(t).toDate(),end:A()(n).toDate()}:"ameliaBooking"in window&&"cabinet"in window.ameliaBooking&&"pastDays"in window.ameliaBooking.cabinet&&"futureDays"in window.ameliaBooking.cabinet?{start:A()().subtract(window.ameliaBooking.cabinet.pastDays,"days").toDate(),end:A()().add(window.ameliaBooking.cabinet.futureDays,"days").toDate()}:"customer"===this.state.cabinetType?{start:A()().toDate(),end:A()().add(this.$root.settings.general.numberOfDaysAvailableForBooking,"days").toDate()}:this.getDatePickerInitRange()},refreshReservations:function(){this.getAppointments(),this.getEvents(),"provider"===this.cabinetType&&this.getFutureAppointments(),"customer"===this.cabinetType&&(this.$root.licence.isPro||this.$root.licence.isDeveloper)&&this.getPackageAppointments([],0)},showDialogRescheduleAppointment:function(e){e.loadingTimeSlots=!0,this.getTimeSlots(e)},parseEvents:function(e,t){var n=this,i={};return e.forEach(function(e){""===t&&e.periods.forEach(function(e){e.periodStart=n.getConvertedUtcToLocalDateTime(e.periodStart),e.periodEnd=n.getConvertedUtcToLocalDateTime(e.periodEnd)});var o=A()(e.periods[0].periodStart,"YYYY-MM-DD HH:mm:ss").format("YYYY-MM-DD");n.$root.useTranslations&&(e.name=n.getNameTranslated(e)),o in i||(i[o]={date:o,events:[]}),e.full&&"approved"===e.status?e.status="full":e.upcoming&&"approved"===e.status&&(e.status="upcoming"),"customer"===n.state.cabinetType?e.bookings.forEach(function(t){var n=JSON.parse(JSON.stringify(e));n.bookings=[t],i[o].events.push(n)}):i[o].events.push(e)}),i}}}},1557:function(e,t,n){var i=n(90)(n(1558),n(1559),!1,null,null,null);e.exports=i.exports},1558:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(816),o=n(817),a=n.n(o),s=n(659),r=n(633),l=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.default={name:"CabinetAppointmentDialog",components:{DialogAppointment:a.a},mixins:[i.a,s.a],props:{optionsCabinet:{type:Object,default:function(){}}},data:function(){return{dialogAppointment:!1}},computed:l({},Object(r.b)({state:function(e){return e.cabinet}})),methods:{open:function(){this.options=Object.assign({},this.optionsCabinet),this.setBookings(0),this.$store.state.cabinet.editedAppointmentId?this.showDialogEditAppointment(this.$store.state.cabinet.editedAppointmentId):this.showDialogNewAppointment()},close:function(){var e=this;this.$store.commit("cabinet/setDisplayProperty",{property:"dialogAppointment",value:!1}),this.$store.commit("cabinet/setEditedAppointmentId",0),setTimeout(function(){e.closeDialogAppointment()},500)},openRecurringAppointment:function(e){var t=this;this.close(),setTimeout(function(){t.$store.commit("cabinet/setEditedAppointmentId",e),t.$store.commit("cabinet/setDisplayProperty",{property:"dialogAppointment",value:!0})},1e3)},saveAppointment:function(){this.$emit("saveAppointment")}}}},1559:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-dialog",{staticClass:"am-modal am-in-body",staticStyle:{width:"100000px"},attrs:{id:"am-modal",modal:!1,"modal-append-to-body":!1,"append-to-body":!0,visible:e.state.display.dialogAppointment},on:{open:e.open,close:e.close}},[n("div",{staticClass:"amelia-app-booking"},[n("div",{attrs:{id:"am-cabinet"}},[n("div",{staticClass:"am-dialog-appointment-wrapper"},[n("el-dialog",{attrs:{visible:e.state.display.dialogAppointment,title:null!==e.appointment&&0!==e.appointment.id?e.$root.labels.edit_appointment:e.$root.labels.new_appointment,"modal-append-to-body":!0},on:{close:e.close}},[e.dialogAppointment?n("dialog-appointment",{attrs:{appointment:e.appointment,recurringAppointments:e.recurringAppointments,savedAppointment:e.savedAppointment,bookings:e.bookings,options:e.options,customerCreatedCount:e.customerCreatedCount,packageCustomer:null,"show-header":!1,"have-duplicate":!1,"hide-attachment-custom-field":!1,"is-cabinet":!0,selectedTimeZone:e.state.timeZone?e.state.timeZone:"UTC"},on:{sortBookings:e.sortBookings,closeDialog:e.close,saveCallback:e.saveAppointment,openRecurringAppointment:e.openRecurringAppointment}}):e._e()],1)],1)])])])},staticRenderFns:[]}},1560:function(e,t,n){var i=n(90)(n(1561),n(1562),!1,null,null,null);e.exports=i.exports},1561:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(945),o=n.n(i),a=n(942),s=n.n(a),r=n(659),l=n(792),c=n(633),u=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.default={name:"CabinetAttendeesDialog",components:{DialogAttendee:o.a,DialogAttendees:s.a},mixins:[r.a,l.a],props:{optionsCabinet:{type:Object,default:function(){}},writeEvents:{type:Boolean,default:!0,required:!1}},data:function(){return{dialogAttendees:!1,dialogAttendee:!1,eventBooking:null,clonedEventBooking:null,paymentLinksEnabled:null,eventBookings:null,dialogExport:!1,customerCreatedCount:0}},computed:u({},Object(c.b)({state:function(e){return e.cabinet}})),methods:{open:function(){this.options=Object.assign({},this.optionsCabinet),this.showDialogAttendees(this.$store.state.cabinet.editedEventId)},close:function(){var e=this;this.$store.commit("cabinet/setDisplayProperty",{property:"dialogAttendees",value:!1}),this.$store.commit("cabinet/setEditedEventId",0),setTimeout(function(){e.dialogAttendee=!1,e.dialogAttendees=!1},500)},updateAttendeesCallback:function(){this.$emit("refreshReservations")},showDialogAttendee:function(e){this.eventBooking=e,this.clonedEventBooking=JSON.parse(JSON.stringify(e)),this.paymentLinksEnabled=!(!this.$root.settings.payments||!this.$root.settings.payments.paymentLinks)&&this.$root.settings.payments.paymentLinks.enabled;var t=this.event?this.event.settings:null;t&&t.payments&&t.payments.paymentLinks&&(this.paymentLinksEnabled=t.payments.paymentLinks.enabled),this.dialogAttendee=!0},closeDialogAttendee:function(){this.dialogAttendee=!1},showDialogNewCustomer:function(){},saveAttendeeCallback:function(e){this.$http.post(this.$root.getAjaxUrl+"/bookings/success/"+e.booking.id,{type:"event",appointmentStatusChanged:e.appointmentStatusChanged,paymentId:"paymentId"in e&&e.paymentId?e.paymentId:null}),this.getEvent(e.event.id),this.$emit("refreshReservations")},getTitle:function(){return this.dialogAttendee?this.$root.labels.event_edit_attendees:this.$root.labels.event_attendees}}}},1562:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-dialog",{staticClass:"am-modal am-in-body",staticStyle:{width:"100000px"},attrs:{id:"am-modal","modal-append-to-body":!1,"append-to-body":!0,visible:e.state.display.dialogAttendees,modal:!1},on:{open:e.open,close:e.close}},[n("div",{staticClass:"amelia-app-booking"},[n("div",{attrs:{id:"am-cabinet"}},[n("div",{staticClass:"am-dialog-attendees-wrapper"},[n("el-dialog",{attrs:{visible:e.state.display.dialogAttendees,title:e.getTitle(),"modal-append-to-body":!0},on:{close:e.close}},[e.dialogAttendees&&e.event&&e.eventBookings&&!e.dialogAttendee?n("dialog-attendees",{attrs:{eventBookings:e.eventBookings,eventStatus:e.event.status,customTickets:e.event.customTickets,"aggregated-price":e.event.aggregatedPrice,bookingCreatedCount:e.bookingCreatedCount,options:e.options,"show-header":!1,"show-export":!1,"write-events":e.$root.settings.roles.allowWriteEvents,"popper-append-to-body":!1,event:e.event},on:{closeDialog:e.close,updateAttendeesCallback:e.updateAttendeesCallback,showDialogAttendee:e.showDialogAttendee,openExportAttendeesDialog:function(t){e.dialogExport=!0}}}):e._e(),e._v(" "),e.dialogAttendee&&e.event&&e.eventBooking&&e.writeEvents?n("dialog-attendee",{attrs:{"cloned-event-booking":e.clonedEventBooking,"payment-links-enabled":e.paymentLinksEnabled,customTickets:e.event.customTickets,eventBooking:e.eventBooking,eventMaxCapacity:e.event.maxCapacity,eventCustomPricing:e.event.customPricing,eventId:e.event.id,options:e.options,customerCreatedCount:e.customerCreatedCount,"show-header":!1,"is-cabinet":!0,popperAppendToBody:!0,isWaitingList:e.event.settings.waitingList.enabled},on:{closeDialog:e.closeDialogAttendee,showDialogNewCustomer:e.showDialogNewCustomer,saveCallback:e.saveAttendeeCallback}}):e._e()],1)],1)])])])},staticRenderFns:[]}},1563:function(e,t,n){var i=n(90)(n(1564),n(1565),!1,null,null,null);e.exports=i.exports},1564:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(814),o=n.n(i),a=n(668),s=n(658),r=n(633),l=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.default={name:"CabinetAuth",props:{authenticate:{type:Function,default:function(){}}},mixins:[a.a,s.a],data:function(){var e=this;return{headerSuccessMessage:"",password:{newValue:"",retypedValue:""},loginRules:{email:[{required:!0,message:this.$root.labels.enter_email_warning,trigger:"submit"}],password:[{required:!0,message:this.$root.labels.enter_password_warning,trigger:"submit"}]},changePasswordRules:{newValue:[{required:!0,message:this.$root.labels.new_password_required,trigger:"submit"},{min:4,max:128,message:this.$root.labels.new_password_length,trigger:"blur"}],retypedValue:[{required:!0,message:this.$root.labels.re_type_requred,trigger:"submit"},{validator:function(t,n,i){n!==e.password.newValue&&i(new Error(e.$root.labels.passwords_do_not_match)),i()},trigger:"submit"}]}}},computed:l({},Object(r.b)({state:function(e){return e.cabinet}})),methods:{forgotPasswordAction:function(){var e=this;this.$refs.login.validate(function(t){t&&(e.authentication=!1,e.$store.commit("cabinet/setSubmitButtonSpinner",!0),e.$http.post(e.$root.getAjaxUrl+"/users/customers/reauthorize",{email:e.state.login.email,locale:window.localeLanguage[0],cabinetType:e.state.cabinetType}).then(function(){e.authentication=!1,e.$store.commit("cabinet/setSubmitButtonSpinner",!1),e.headerSuccessMessage=e.$root.labels.recovery_email_sent}).catch(function(){e.authentication=!1,e.$store.commit("cabinet/setSubmitButtonSpinner",!1)}))})},loginAction:function(){var e=this;this.$refs.login.validate(function(t){t&&e.authenticate(null,!1,!1)})},hideForgotPasswordForm:function(){this.$store.commit("cabinet/setDisplayProperty",{property:"forgotPassword",value:!1}),this.$store.commit("cabinet/setDisplayProperty",{property:"login",value:!0}),this.$store.commit("cabinet/setHeaderErrorMessage",""),this.headerSuccessMessage=""},showForgotPasswordForm:function(){this.$store.commit("cabinet/setDisplayProperty",{property:"forgotPassword",value:!0}),this.$store.commit("cabinet/setDisplayProperty",{property:"login",value:!1}),this.$store.commit("cabinet/setHeaderErrorMessage",""),this.headerSuccessMessage=""},changePasswordAction:function(){var e,t=(e=o.a.mark(function e(){return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,this.$store.commit("cabinet/setSubmitButtonSpinner",!0),e.next=4,this.$refs.password.validate();case 4:return e.prev=4,e.next=7,this.$http.post(this.$root.getAjaxUrl+"/users/"+this.state.cabinetType+"s/"+this.state.profile.id,{password:this.password.newValue},Object.assign(this.getAuthorizationHeaderObject(),{params:{source:"cabinet-"+this.state.cabinetType}}));case 7:this.$store.commit("cabinet/setSubmitButtonSpinner",!1),this.$store.commit("cabinet/setDisplayProperty",{property:"cabinetDashboard",value:!0}),this.password.newValue="",this.password.retypedValue="",this.state.display.setPassword?(this.notify(this.$root.labels.success,this.$root.labels.password_is_set,"success"),this.$emit("getOptions"),this.$store.commit("cabinet/setDisplayProperty",{property:"setPassword",value:!1}),this.$store.commit("cabinet/setDisplayProperty",{property:"changePassword",value:!1}),this.$store.commit("cabinet/setIsUserAuthenticated",!0)):this.state.display.changePassword&&(this.notify(this.$root.labels.success,this.$root.labels.password_has_been_changed,"success"),this.$emit("getOptions"),this.$store.commit("cabinet/setDisplayProperty",{property:"changePassword",value:!1}),this.$store.commit("cabinet/setIsUserAuthenticated",!0)),e.next=19;break;case 14:e.prev=14,e.t0=e.catch(4),console.log(e.t0),this.$store.commit("cabinet/setDisplayProperty",{property:"changePassword",value:!1}),this.$emit("parseError",e.t0);case 19:this.$store.commit("cabinet/setSubmitButtonSpinner",!1),e.next=26;break;case 22:return e.prev=22,e.t1=e.catch(0),this.$store.commit("cabinet/setSubmitButtonSpinner",!1),e.abrupt("return",!1);case 26:case"end":return e.stop()}},e,this,[[0,22],[4,14]])}),function(){var t=e.apply(this,arguments);return new Promise(function(e,n){return function i(o,a){try{var s=t[o](a),r=s.value}catch(e){return void n(e)}if(!s.done)return Promise.resolve(r).then(function(e){i("next",e)},function(e){i("throw",e)});e(r)}("next")})});return function(){return t.apply(this,arguments)}}(),hideChangePasswordForm:function(){this.$store.commit("cabinet/setDisplayProperty",{property:"cabinetDashboard",value:!0}),this.$store.commit("cabinet/setDisplayProperty",{property:"changePassword",value:!1})},clearValidation:function(e){this.$refs[e].clearValidate()},inputEmail:function(e){this.$store.commit("cabinet/setLoginEmail",e),this.clearValidation("login")},inputPassword:function(e){this.$store.commit("cabinet/setLoginPassword",e),this.clearValidation("login")}}}},1565:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"am-cabinet-auth"},[n("el-alert",{directives:[{name:"show",rawName:"v-show",value:""!==e.state.headerErrorMessage,expression:"state.headerErrorMessage !== ''"}],attrs:{title:e.state.headerErrorMessage,type:"error","show-icon":""}}),e._v(" "),n("el-alert",{directives:[{name:"show",rawName:"v-show",value:""!==e.headerSuccessMessage,expression:"headerSuccessMessage !== ''"}],attrs:{title:e.headerSuccessMessage,type:"success","show-icon":""}}),e._v(" "),n("div",{staticClass:"am-cabinet-auth-content"},[n("transition",{attrs:{name:"fade"}},[e.state.display.login?n("div",{staticClass:"am-cabinet-login"},[n("div",{staticClass:"am-cabinet-auth-title"},[e._v("\n "+e._s(e.$root.labels.sign_in)+"\n ")]),e._v(" "),n("el-form",{ref:"login",staticClass:"am-cabinet-auth-form",attrs:{rules:e.loginRules,model:e.state.login}},[n("el-form-item",{attrs:{label:e.$root.labels.email_or_username,prop:"email"}},[n("el-input",{attrs:{value:e.state.login.email,autocomplete:"new-password"},on:{input:e.inputEmail},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.loginAction(t)}}})],1),e._v(" "),n("el-form-item",{attrs:{label:e.$root.labels.password,type:"password",prop:"password"}},[n("el-input",{staticClass:"am-password-field",attrs:{value:e.state.login.password,autocomplete:"new-password",type:"password","show-password":""},on:{input:e.inputPassword},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.loginAction(t)}}})],1),e._v(" "),n("el-button",{staticClass:"am-w-100 am-m-0",attrs:{type:"primary",loading:e.state.submitButtonSpinner},on:{click:e.loginAction}},[e._v("\n "+e._s(e.$root.labels.sign_in)+"\n ")]),e._v(" "),n("p",[n("span",{on:{click:function(t){return e.showForgotPasswordForm()}}},[e._v("\n "+e._s(e.$root.labels.forgot_password)+"\n ")])])],1)],1):e._e()]),e._v(" "),n("transition",{attrs:{name:"fade"}},[e.state.display.forgotPassword?n("div",[n("div",{staticClass:"am-cabinet-auth-title"},[e._v("\n "+e._s(e.$root.labels.access_link_send)+"\n ")]),e._v(" "),n("div",{staticClass:"am-cabinet-subtitle"},[e._v("\n "+e._s(e.$root.labels.access_link_send_description)+"\n ")]),e._v(" "),n("el-form",{ref:"login",staticClass:"am-cabinet-auth-form",attrs:{model:e.state.login,rules:e.loginRules},nativeOn:{submit:function(e){e.preventDefault()}}},[n("el-form-item",{attrs:{label:e.$root.labels.email,prop:"email"}},[n("el-input",{attrs:{value:e.state.login.email,autocomplete:"new-password"},on:{input:e.inputEmail}})],1),e._v(" "),n("el-button",{staticClass:"am-w-100 am-m-0",attrs:{loading:e.state.submitButtonSpinner,type:"primary"},on:{click:function(t){return e.forgotPasswordAction()}}},[e._v("\n "+e._s(e.$root.labels.send)+"\n ")]),e._v(" "),e.$root.settings.roles[e.state.settingsName].loginEnabled?n("p",[n("span",{on:{click:function(t){return e.hideForgotPasswordForm()}}},[e._v("\n "+e._s(e.$root.labels.sign_in)+"\n ")])]):e._e()],1)],1):e._e()]),e._v(" "),e.$root.settings.roles[e.state.settingsName].loginEnabled?n("transition",{attrs:{name:"fade"}},[e.state.display.changePassword?n("div",{staticClass:"am-cabinet-reset-pass"},[n("div",{staticClass:"am-cabinet-auth-title"},[e._v("\n "+e._s(e.state.display.setPassword?e.$root.labels.new_password_set:e.$root.labels.change_password)+"\n ")]),e._v(" "),n("el-form",{ref:"password",staticClass:"am-cabinet-auth-form",attrs:{rules:e.changePasswordRules,model:e.password}},[n("el-form-item",{staticClass:"am-password",attrs:{type:"password",label:e.$root.labels.new_password_colon,prop:"newValue"}},[n("el-input",{staticClass:"am-password-field",attrs:{autocomplete:"new-password",type:"password","show-password":""},on:{input:function(t){return e.clearValidation("password")}},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.changePasswordAction()}},model:{value:e.password.newValue,callback:function(t){e.$set(e.password,"newValue",t)},expression:"password.newValue"}})],1),e._v(" "),n("el-form-item",{staticClass:"am-password",attrs:{type:"password",label:e.$root.labels.new_password_colon_retype,prop:"retypedValue"}},[n("el-input",{staticClass:"am-password-field",attrs:{autocomplete:"new-password",type:"password","show-password":""},on:{input:function(t){return e.clearValidation("password")}},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.changePasswordAction()}},model:{value:e.password.retypedValue,callback:function(t){e.$set(e.password,"retypedValue",t)},expression:"password.retypedValue"}})],1),e._v(" "),n("el-button",{staticClass:"am-w-100 am-m-0",attrs:{loading:e.state.submitButtonSpinner,type:"primary"},on:{click:function(t){return e.changePasswordAction()}}},[e._v("\n "+e._s(e.state.display.setPassword?e.$root.labels.new_password_set:e.$root.labels.change_password)+"\n ")]),e._v(" "),!e.state.display.setPassword&&e.state.isUserAuthenticated?n("p",[n("span",{on:{click:function(t){return e.hideChangePasswordForm()}}},[e._v(e._s(e.$root.labels.user_profile))])]):e._e()],1)],1):e._e()]):e._e()],1)],1)},staticRenderFns:[]}},1566:function(e,t,n){var i=n(90)(n(1567),n(1568),!1,null,null,null);e.exports=i.exports},1567:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(633),o=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.default={name:"CabinetCancelDialog",props:{type:{type:String,default:function(){return"appointment"}}},computed:o({},Object(i.b)({state:function(e){return e.cabinet}}))}},1568:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-dialog",{attrs:{modalAppendToBody:!1,title:e.$root.labels["cancel_"+e.type],visible:e.state.display.dialogCancelAppointment},on:{close:function(t){return e.$store.commit("cabinet/setDisplayProperty",{property:"dialogCancelAppointment",value:!1})}}},[n("div",{staticClass:"am-mb-16"},[e._v("\n "+e._s(e.$root.labels["confirm_cancel_"+e.type])+"\n ")]),e._v(" "),n("span",{attrs:{slot:"footer"},slot:"footer"},[n("el-button",{staticClass:"am-cabinet-action-button",on:{click:function(t){return e.$store.commit("cabinet/setDisplayProperty",{property:"dialogCancelAppointment",value:!1})}}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),n("el-button",{staticClass:"am-cabinet-action-button",attrs:{type:"primary",loading:e.state.dialogButtonSpinner},on:{click:function(t){"package"===e.type?e.$emit("cancelPackage"):e.$emit("cancelBooking")}}},[e._v("\n "+e._s(e.$root.labels.confirm)+"\n ")])],1)])},staticRenderFns:[]}},1569:function(e,t,n){var i=n(90)(n(1570),n(1597),!1,null,null,null);e.exports=i.exports},1570:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1571),o=n.n(i),a=n(1581),s=n.n(a),r=n(1584),l=n.n(r),c=n(1588),u=n.n(c),d=n(932),p=n.n(d),m=n(668),f=n(633),h=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.default={name:"CabinetDashboard",components:{CabinetDashboardAppointments:o.a,CabinetDashboardEvents:s.a,CabinetDashboardHeader:l.a,CabinetDashboardProfile:u.a,CabinetSpinner:p.a},props:{cabinetType:{type:String,default:"customer"},options:{type:Object,default:function(){}},packagesAvailability:{type:Array,default:function(){return[]}},packagesData:{type:Array,default:function(){return[]}},appointments:{type:Object,default:function(){}},events:{type:Object,default:function(){}},stripeLoading:{type:Boolean,default:function(){return!1}}},data:function(){return{timeZoneChangedCounter:0}},mixins:[m.a],computed:h({},Object(f.b)({state:function(e){return e.cabinet}})),methods:{changedTimeZone:function(){this.timeZoneChangedCounter++,this.$emit("changedTimeZone")}}}},1571:function(e,t,n){var i=n(90)(n(1572),n(1580),!1,null,null,null);e.exports=i.exports},1572:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(814),o=n.n(i),a=n(704),s=n(658),r=n(668),l=n(1037),c=n(932),u=n.n(c),d=n(336),p=n(660),m=n(659),f=n(678),h=n(696),g=n(654),v=n(0),b=n.n(v),y=n(657),_=n(664),k=n(663),C=n(633),w=n(1575),x=n.n(w),S=n(710),P=n(334),T=n.n(P),$=n(877),E=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};function D(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){return function i(o,a){try{var s=t[o](a),r=s.value}catch(e){return void n(e)}if(!s.done)return Promise.resolve(r).then(function(e){i("next",e)},function(e){i("throw",e)});e(r)}("next")})}}t.default={name:"CabinetDashboardAppointments",props:{packagesAvailability:{type:Array,default:function(){return[]}},options:{type:Object,default:function(){}},packagesData:{type:Array,default:function(){return[]}},appointments:{type:Object,default:function(){}},timeZoneChangedCounter:{type:Number,default:0},packagesPage:{type:Boolean,default:!1}},components:{CabinetSpinner:u.a,CabinetPackagesList:x.a},mixins:[a.a,s.a,r.a,l.a,d.a,p.a,m.a,h.a,g.a,y.a,k.a,_.a,f.a,S.a,$.a],computed:E({},Object(C.b)({state:function(e){return e.cabinet}})),mounted:function(){this.inlineSVGCabinet()},data:function(){return{lastBookedProviderId:null,timeZoneSelected:"",timeZones:[],canceling:!1,bookingData:{packageId:null,serviceId:null,packageCustomerServiceId:null},slotsData:{selectedDate:null,selectedTime:null,selectedPeriod:{},dateTimeSlots:{},calendarTimeSlots:[],availableDates:[],disabledWeekdays:{}},loadingTimeSlots:!1,loadingNewTimeSlots:!1,loadingBooking:!1,bookAppointmentPage:!1,packageAppointmentsTotal:null,bookingPackage:{},bookingPackageService:{},bookingPackageEmployee:null,activeTab:"",serviceTabContent:"",calendarModalVisible:!1,showCalendar:!0,showTimes:!1,showSuccess:!1,availableTimeSlots:[],bookingStartTime:"",bookingStart:"",backButtonText:""}},created:function(){if(this.timeZones=this.$root.timezones,!this.$store.state.cabinet.timeZone&&(this.$root.timezone&&!this.$root.settings.general.showClientTimeZone||"provider"===this.state.cabinetType)){var e="provider"===this.state.cabinetType&&this.state.clonedProfile.timeZone?this.state.clonedProfile.timeZone:this.$root.timezone;T.a.get("ameliaUserTimeZone")&&"customer"===this.state.cabinetType&&(e=T.a.get("ameliaUserTimeZone")),this.$store.commit("cabinet/setTimeZone",e),this.timeZoneSelected=e||""}this.$store.state.cabinet.timeZone&&(this.timeZoneSelected=this.$store.state.cabinet.timeZone)},watch:{timeZoneChangedCounter:function(){this.closeCalendarPopover()}},methods:{changeEmployee:function(e,t,n){this.getTimeSlots(t,n,e)},getPaymentMethodAndStatusString:function(e){switch(e){case"onSite":return this.$root.labels.on_site;case"partiallyPaid":return this.$root.labels.partially_paid;case"pending":return this.$root.labels.pending;case"paid":return this.$root.labels.paid;case"wc":return"WooCommerce";default:return e.charAt(0).toUpperCase()+e.slice(1)}},getGroupPaymentsStatusPackage:function(e){for(var t=0,n=!1,i=0;i<Object.keys(e.payments).length;i++){var o=Object.values(e.payments)[i];o.payments.every(function(e){return"refunded"===e.status})?t++:o.payments.filter(function(e){return"refunded"===e.status}).length>0&&(n=!0)}return Object.keys(e.payments).length===t?this.$root.labels.refunded:n?this.$root.labels.partially_refunded:this.$root.labels.paid},getPaymentsStatusPackage:function(e,t){var n=t||Object.keys(e.payments)[0],i=e.payments[n].payments;return this.getPaymentsStatus(i)},getPaymentsStatus:function(e){return e.every(function(e){return"refunded"===e.status})?this.$root.labels.refunded:e.filter(function(e){return"refunded"===e.status}).length>0?this.$root.labels.partially_refunded:this.$root.labels.paid},isPayable:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("package"===e.type){var n=t||Object.keys(e.payments)[0],i=this.getPackagePrice(e,n);return e.payments[n].payments.reduce(function(e,t){return e+t.amount},0)<i}return this.getBookingPrice(e.bookings[0],!!e.bookings[0].id,e.bookings[0].price,e.bookings[0].aggregatedPrice)>e.bookings[0].payments.reduce(function(e,t){return e+t.amount},0,e.serviceId)},isAllPaid:function(e){for(var t=0;t<Object.keys(e.payments).length;t++){var n=Object.keys(e.payments)[t];if(this.isPayable(e,n))return!1}return!0},changedTimeZone:function(e){this.$store.commit("cabinet/setTimeZone",e),T.a.set("ameliaUserTimeZone",e,this.$root.settings.roles[this.state.settingsName].tokenValidTime),this.$emit("changedTimeZone")},getCurrentTimeZone:function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},getPurchasesData:function(e){var t={};return Object.keys(e).forEach(function(n){t[e[n].packageCustomerId]=e[n]}),t},bookAppointment:function(){var e=D(o.a.mark(function e(t){var n,i,a,s,r,l,c=this;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.loadingBooking=!0,n=b()(this.slotsData.selectedDate).format("YYYY-MM-DD"),i=this.slotsData.calendarTimeSlots[n][this.slotsData.selectedTime],a=n+" "+this.slotsData.selectedTime,s=null,""===this.state.timeZone&&(a=b()(n+" "+this.slotsData.selectedTime,"YYYY-MM-DD HH:mm").utc().format("YYYY-MM-DD HH:mm"),s=this.getClientUtcOffset(a)),"roundRobin"===this.$root.settings.appointments.employeeSelection&&(i=this.sortEmployeesForRoundRobin(i)),r=this.bookingPackageEmployee?this.bookingPackageEmployee:i[0][0]?i[0][0]:null,e.prev=8,e.next=11,this.$http.post(this.$root.getAjaxUrl+"/bookings",{type:"appointment",bookings:[{packageCustomerService:{id:this.bookingData.packageCustomerServiceId},customer:{id:this.state.profile.id,firstName:this.state.profile.firstName,lastName:this.state.profile.lastName,email:this.state.profile.email,phone:this.state.profile.phone,countryPhoneIso:this.state.profile.countryPhoneIso,externalId:this.state.profile.externalId},customerId:this.state.profile.id,customFields:null,persons:1,extras:[],utcOffset:s,deposit:0}],bookingStart:a,notifyParticipants:this.$root.settings.notifications.notifyCustomers?1:0,locationId:i[0][1]?i[0][1]:null,providerId:r,serviceId:this.bookingData.serviceId,payment:null,recurring:[],package:[],timeZone:""===this.state.timeZone?Intl.DateTimeFormat().resolvedOptions().timeZone:this.state.timeZone,utc:""===this.state.timeZone,locale:window.localeLanguage[0]},this.getAuthorizationHeaderObject());case 11:l=e.sent,this.getAppointmentAddToCalendarData(l.data.data,this.$root.settings.general.runInstantPostBookingActions),this.showTimes=!1,this.showSuccess=!0,this.packagesAvailability.find(function(e){return e.packageId===c.bookingData.packageId}).services.find(function(e){return e.serviceId===c.bookingData.serviceId}).bookings.find(function(e){return e.id===c.bookingData.packageCustomerServiceId}).count--,t.service.appointmentsAvailable--,this.bookingPackageEmployee=null,this.lastBookedProviderId=r,this.$emit("getPackageAppointments"),this.loadingBooking=!1,e.next=29;break;case 23:e.prev=23,e.t0=e.catch(8),"customerAlreadyBooked"in e.t0.response.data.data&&!0===e.t0.response.data.data.customerAlreadyBooked&&this.notify(this.$root.labels.error,this.$root.labels.customer_already_booked_app,"error"),"timeSlotUnavailable"in e.t0.response.data.data&&!0===e.t0.response.data.data.timeSlotUnavailable&&this.notify(this.$root.labels.error,this.$root.labels.time_slot_unavailable,"error"),"packageBookingUnavailable"in e.t0.response.data.data&&!0===e.t0.response.data.data.packageBookingUnavailable&&this.notify(this.$root.labels.error,this.$root.labels.package_booking_unavailable,"error"),this.loadingBooking=!1;case 29:case"end":return e.stop()}},e,this,[[8,23]])}));return function(t){return e.apply(this,arguments)}}(),getTimeSlots:function(){var e=D(o.a.mark(function e(t,n){var i,a,s,r,l,c,u,d,p,m=this,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return null===f&&(this.bookingPackageEmployee=null),i=t.bookable.find(function(e){return e.service.id===n.service.id}),a=this.packagesAvailability.find(function(e){return e.packageId===t.id}).services.find(function(e){return e.serviceId===n.service.id}).bookings,s=(s=a.filter(function(e){return e.count>0&&"approved"===e.status})).length?s[0]:a[0],r=null,f?r=[f]:n.allowProviderSelection||(r=s.employeeId?[s.employeeId]:null),this.bookingData.packageId=t.id,this.bookingData.serviceId=n.service.id,this.bookingData.packageCustomerServiceId=s.id,this.slotsData.selectedDate=null,this.slotsData.selectedPeriod={},this.slotsData.dateTimeSlots={},this.loadingTimeSlots=!0,this.inlineSVGCabinet(),l=this.state.timeZone?this.state.timeZone:"UTC",e.prev=16,e.next=19,this.$http.get(this.$root.getAjaxUrl+"/slots",{params:this.getAppropriateUrlParams({serviceId:n.service.id,locationId:s.locationId?s.locationId:null,providerIds:r||(i?i.providers.map(function(e){return e.id}):[]),extras:JSON.stringify([]),excludeAppointmentId:null,group:1,timeZone:l,page:"cabinet",persons:1})});case 19:c=e.sent,u="UTC"===l&&this.$root.settings.general.showClientTimeZone?this.getConvertedTimeSlots(c.data.data.slots):c.data.data.slots,this.slotsData.calendarTimeSlots=u,d=[],p=null,this.useSortedDateStrings(Object.keys(u)).forEach(function(e){null===p&&(p=e),d.push(b()(e).toDate())}),this.slotsData.selectedDate=b()(p).toDate(),setTimeout(function(){m.slotsData.selectedDate=null},100),this.slotsData.availableDates=d,this.slotsData.disabledWeekdays={weekdays:[]},this.slotsData.disabledWeekdays=0===this.slotsData.availableDates.length?{weekdays:[1,2,3,4,5,6,7]}:null,this.calendarModalVisible=!0,this.showCalendar=!0,this.showSuccess=!1,this.showTimes=!1,"roundRobin"===this.$root.settings.appointments.employeeSelection&&(this.lastBookedProviderId=c.data.data.lastProvider),this.loadingTimeSlots=!1,this.loadingNewTimeSlots=!1,e.next=44;break;case 39:e.prev=39,e.t0=e.catch(16),console.log(e.t0),this.loadingTimeSlots=!1,this.loadingNewTimeSlots=!1;case 44:case"end":return e.stop()}},e,this,[[16,39]])}));return function(t,n){return e.apply(this,arguments)}}(),showFreeSlots:function(){var e=Object.keys(this.slotsData.calendarTimeSlots[b()(this.slotsData.selectedDate).format("YYYY-MM-DD")]);this.showCalendar=!1,this.backButtonText=b()(this.slotsData.selectedDate).format("DD MMM YYYY"),this.showTimes=!0,this.availableTimeSlots=e,this.slotsData.selectedTime=e[0]},backToCalendar:function(){this.showTimes=!1,this.showCalendar=!0,this.slotsData.selectedDate=null,this.slotsData.selectedTime=null},closeCalendarPopover:function(){this.calendarModalVisible=!1,this.showTimes=!1,this.showSuccess=!1,this.showCalendar=!0,this.slotsData.selectedDate=null,this.slotsData.selectedTime=null},continueBooking:function(e,t){this.loadingNewTimeSlots=!0,this.slotsData.selectedDate=null,this.slotsData.selectedTime=null,this.getTimeSlots(e,t)},changePackageService:function(e){this.serviceTabContent=parseInt(e.name.replace("service","")),this.changePackageBookingProviders()},sendToBookingPage:function(e){this.bookAppointmentPage=!0,this.bookingPackage=this.packagesData.find(function(t){return t.id===e});var t=null;this.bookingPackage.bookable.forEach(function(e,n){null===t&&e.service.appointmentsAvailable>0&&(t=n)}),null!==t&&(this.activeTab=this.bookingPackage.bookable[t].service.id+"service",this.serviceTabContent=this.bookingPackage.bookable[t].service.id),this.changePackageBookingProviders()},changePackageBookingProviders:function(){var e=this,t=Object.values(this.bookingPackage.purchases).filter(function(t){return t.count>0&&t.serviceId===e.serviceTabContent});this.bookingPackageService=t.length>0?t[0]:{};var n=this.bookingPackage.bookable.find(function(t){return t.service.id===e.bookingPackageService.serviceId}),i=n&&n.providers.length>0?n.providers:this.getServiceProviders(this.bookingPackageService.serviceId);this.bookingPackageService.providers=i.filter(function(e){return"visible"===e.status})},sendToAppointmentPage:function(){this.$emit("refreshReservations"),this.bookAppointmentPage=!1},handleAppointment:function(e,t){if("zoom"===e){var n="customer"===this.state.cabinetType?t.zoomMeeting.joinUrl:t.zoomMeeting.startUrl;window.open(n,"_blank").focus()}"edit"===e&&this.editAppointment(t),"reschedule"===e&&this.$emit("showDialogRescheduleAppointment",t),"cancel"===e&&this.$emit("showDialogCancelBooking",t)},handlePackage:function(e){this.$emit("showDialogCancelPackage",e.packageCustomerId,this.bookingPackage.purchases,this.bookingPackage)},getAppointmentEmployee:function(e){var t=this.getProviderById(e.providerId);return null!==t?t.firstName+" "+t.lastName:""},getCustomer:function(e){var t=this.getCustomerInfo(e);return void 0!==t&&t?t:e.customer},getAppointmentCustomer:function(e){for(var t="",n=0;n<e.bookings.length;n++){var i=this.getCustomer(e.bookings[n]);t+=i.firstName+" "+i.lastName+", "}return t.substring(0,t.length-2)},getTotalPrice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"customer"===this.state.cabinetType||t?this.getFormattedPrice(this.getBookingPrice(e.bookings[0],!e.bookings[0].id,e.bookings[0].price,e.bookings[0].aggregatedPrice,e.serviceId),!this.$root.settings.payments.hideCurrencySymbolFrontend):this.getAppointmentPrice(this.getAppointmentService(e),e.bookings)},getCustomerBookingPrice:function(e,t){return this.getFormattedPrice(this.getBookingPrice(e,!e.id,e.price,e.aggregatedPrice,t),!this.$root.settings.payments.hideCurrencySymbolFrontend)},getStatus:function(e){return"customer"===this.state.cabinetType?"approved"===e.bookings[0].status&&"pending"===e.status?"pending":e.bookings[0].status:e.status},getStatusLabel:function(e){return"customer"===this.state.cabinetType?"approved"===e.bookings[0].status&&"pending"===e.status?this.statusesCabinet.find(function(e){return"pending"===e.value}).label:this.statusesCabinet.find(function(t){return t.value===e.bookings[0].status}).label:this.statusesCabinet.find(function(t){return t.value===e.status}).label},getDuration:function(e){return this.momentDurationToNiceDurationWithUnit(this.convertDateTimeRangeDifferenceToMomentDuration(e.bookingStart,e.bookingEnd))},serviceDuration:function(e){return""+(b.a.duration(1e3*e).hours()?b.a.duration(1e3*e).hours()+"h":"")+(b.a.duration(1e3*e).minutes()?b.a.duration(1e3*e).minutes()+"min":"")},handleDateFormat:function(e){return e===b()().format("YYYY-MM-DD")?this.$root.labels.today:e===b()().add(1,"days").format("YYYY-MM-DD")?this.$root.labels.tomorrow:this.getFrontedFormattedDate(e)},showCustomField:function(e){return Array.isArray(e)?e.length>0:!!e},getCustomFieldLabel:function(e,t){var n=this.options.entities.customFields.find(function(e){return e.id===parseInt(t)});return void 0!==n?n.label.trim():e.label.trim()},getZoomLink:function(e){return"customer"===this.state.cabinetType?e.zoomMeeting.joinUrl:e.zoomMeeting.startUrl},getZoomLabel:function(){return"customer"===this.state.cabinetType?this.$root.labels.zoom_join:this.$root.labels.zoom_start},editAppointment:function(e){this.$store.commit("cabinet/setTimeZone",this.state.timeZone),this.$store.commit("cabinet/setEditedAppointmentId",e.id),this.$store.commit("cabinet/setDisplayProperty",{property:"dialogAppointment",value:!0})},getBookingDateCreated:function(e){return e.bookings[0].created?this.getFrontedFormattedDate(e.bookings[0].created):null}}}},1573:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"CabinetSpinner",props:{showSpinner:{type:Boolean,default:!1}}}},1574:function(e,t){e.exports={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{directives:[{name:"show",rawName:"v-show",value:this.showSpinner,expression:"showSpinner"}],staticClass:"am-spinner"},[t("img",{staticClass:"svg-cabinet am-spin",attrs:{src:this.$root.getUrl+"public/img/oval-spinner.svg",alt:""}}),this._v(" "),t("img",{staticClass:"svg-cabinet am-hourglass",attrs:{src:this.$root.getUrl+"public/img/hourglass.svg",alt:""}})])},staticRenderFns:[]}},1575:function(e,t,n){var i=n(90)(n(1578),n(1579),!1,function(e){n(1576)},"data-v-630cbe29",null);e.exports=i.exports},1576:function(e,t,n){var i=n(1577);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);n(681)("1de7d392",i,!0,{})},1577:function(e,t,n){(e.exports=n(676)(!1)).push([e.i,"",""])},1578:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(633),o=n(654),a=n(336),s=n(1037),r=n(0),l=n.n(r),c=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};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)}t.default={name:"CabinetPackagesList",props:{packagesAvailability:{type:Array,default:function(){return[]}},options:{type:Object,default:function(){}},packagesData:{type:Array,default:function(){return[]}},packagesPage:{type:Boolean,default:!1}},computed:c({},Object(i.b)({state:function(e){return e.cabinet}})),mixins:[o.a,a.a,s.a],methods:{handleDateFormat:function(e){return e===l()().format("YYYY-MM-DD")?this.$root.labels.today:e===l()().add(1,"days").format("YYYY-MM-DD")?this.$root.labels.tomorrow:this.getFrontedFormattedDate(e)},sendToBookingPage:function(e){this.$emit("sendToBookingPage",e)},isPackageBookedMoreThanOnce:function(e){var t=e.purchases,n=Object.keys(t).map(function(e){return t[e].packageCustomerId}),i=Object.keys(t).map(function(e){return t[e].end}),o=[].concat(u(new Set(n))),a=[].concat(u(new Set(i)));return o.length>1&&a.length>1}}}},1579:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.options.fetched&&e.state.fetchedPackageAppointments?n("el-row",e._l(e.packagesData,function(t){return n("el-col",{key:t.id,attrs:{xs:24}},[e.packagesPage||t.totalAvailableAppointments>0?n("div",{staticClass:"am-package"},[n("div",{staticClass:"am-package__left"},[n("div",{staticClass:"am-package__img-holder"},[n("img",{attrs:{src:e.pictureLoad(t,!1)},on:{error:function(n){return e.imageLoadError(t,!1)}}}),e._v(" "),n("span",{staticClass:"am-package__color",style:"background-color:"+t.color})]),e._v(" "),n("div",{staticClass:"am-package__text-holder"},[n("div",{staticClass:"am-package__heading"},[n("span",{staticClass:"am-package__name"},[e._v("\n "+e._s(t.name)+"\n ")]),e._v(" "),n("span",{staticClass:"am-package__type"},[e._v(e._s(e.$root.labels.package.toUpperCase()))])]),e._v(" "),n("div",{staticClass:"am-package__valid-date"},[t.expireDateString&&e.isPackageBookedMoreThanOnce(t)?n("div",{staticClass:"am-package__valid-date-text-holder"},[n("span",{staticClass:"am-package__expiration-text"},[e._v(e._s(e.$root.labels.package_book_multiple))]),e._v(" "),n("span",{staticClass:"am-package__expiration-text"},[e._v(e._s(e.$root.labels.package_book_first_pack_apps))])]):t.expireDateString?n("span",{staticClass:"am-package__expiration-text"},[e._v(e._s(e.$root.labels.package_book_expire))]):n("span",{staticClass:"am-package__expiration-text"},[e._v(e._s(e.$root.labels.package_book_expiration))]),e._v(" "),n("span",{staticClass:"am-package__expiration-date"},[e._v(e._s(t.expireDateString?e.handleDateFormat(t.expireDateString):e.$root.labels.package_book_unlimited))])])])]),e._v(" "),n("div",{staticClass:"am-package__right"},[n("div",{staticClass:"am-package__button",on:{click:function(n){return e.sendToBookingPage(t.id)}}},[t.totalAvailableAppointments>0?n("span",{staticClass:"am-package__button-text am-package__nowrap"},[e._v("\n "+e._s(t.totalAvailableAppointments+" "+e.$root.labels.package_left_appointments)+"\n ")]):e._e(),e._v(" "),n("i",{staticClass:"el-icon-arrow-right"})])])]):e._e()])}),1):e._e()},staticRenderFns:[]}},1580:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"am-cabinet-dashboard-appointments"},[n("transition-group",{attrs:{name:"fade",mode:"out-in",appear:""}},[e.bookAppointmentPage?e._e():n("div",{key:1},[e.packagesPage?e._e():n("el-row",{staticClass:"am-cabinet-filter"},[n("el-col",{attrs:{lg:"provider"===e.state.cabinetType&&e.$root.settings.roles.allowWriteAppointments?e.$root.licence.isLite||e.$root.licence.isStarter?14:19:24,md:"provider"===e.state.cabinetType&&e.$root.settings.roles.allowWriteAppointments?e.$root.licence.isLite||e.$root.licence.isStarter?14:18:24,sm:24,xs:24}},[n("div",{staticClass:"am-filter-fields"},[n("el-row",{attrs:{gutter:16}},[n("el-col",{staticClass:"v-calendar-column",attrs:{span:e.$root.licence.isLite||e.$root.licence.isStarter?24:16}},[n("v-date-picker",{attrs:{value:e.state.params.dates,mode:"range","popover-visibility":"focus","popover-direction":"bottom","input-class":"el-input__inner","is-required":!0,"is-expanded":!1,"is-double-paned":!1,"show-day-popover":!1,"popover-align":e.screenWidth<768?"center":"left","tint-color":e.$root.settings.customization.primaryColor,"input-props":{class:"el-input__inner",readOnly:"readonly"},formats:e.vCalendarFormats},on:{input:e.changeRange}})],1),e._v(" "),e.$root.licence.isLite||e.$root.licence.isStarter?e._e():n("el-col",{attrs:{span:8}},[n("div",{staticClass:"am-cabinet-timezone"},[n("el-select",{attrs:{filterable:"",clearable:"","popper-class":"am-cabinet-timezone-dropdown",placeholder:e.getCurrentTimeZone()},on:{change:e.changedTimeZone},model:{value:e.timeZoneSelected,callback:function(t){e.timeZoneSelected=t},expression:"timeZoneSelected"}},[n("template",{slot:"prefix"},[n("img",{attrs:{src:e.$root.getUrl+"public/img/am-globe.svg"}})]),e._v(" "),e._l(e.timeZones,function(e,t){return n("el-option",{key:t,attrs:{label:e,value:e}})})],2)],1)])],1)],1)]),e._v(" "),"provider"===e.state.cabinetType&&e.$root.settings.roles.allowWriteAppointments?n("el-col",{attrs:{lg:e.$root.licence.isLite||e.$root.licence.isStarter?10:5,md:e.$root.licence.isLite||e.$root.licence.isStarter?10:6,sm:24,xs:24}},[n("el-button",{staticClass:"am-add-new-button am-m-0 am-w-100",attrs:{type:"primary",disabled:!e.options.fetched},on:{click:function(t){return e.$store.commit("cabinet/setDisplayProperty",{property:"dialogAppointment",value:!0})}}},[n("i",{staticClass:"el-icon-plus"}),e._v(" "),n("span",[e._v(e._s(e.$root.labels.new_appointment))])])],1):e._e()],1),e._v(" "),n("cabinet-packages-list",{attrs:{options:e.options,"packages-availability":e.packagesAvailability,"packages-data":e.packagesData,packagesPage:e.packagesPage},on:{sendToBookingPage:e.sendToBookingPage}}),e._v(" "),e.options.fetched&&e.state.fetchedAppointments&&0===Object.keys(e.appointments).length?n("div",{staticClass:"am-empty-state"},[n("img",{attrs:{src:e.$root.getUrl+"public/img/emptystate.svg",alt:""}}),e._v(" "),n("div",[n("p",[e._v("\n "+e._s(e.$root.labels.no_results)+"\n ")])])]):e._e(),e._v(" "),!e.packagesPage&&e.options.fetched&&e.state.fetchedAppointments&&Object.keys(e.appointments).length>0?n("div",{staticClass:"am-cabinet-list-head"},[n("el-row",[n("el-col",{attrs:{lg:16}},[n("el-row",{staticClass:"am-cabinet-flex-row-middle-align"},[n("el-col",{attrs:{lg:6}}),e._v(" "),n("el-col",{attrs:{lg:9}},[n("p",[e._v(e._s(e.$root.labels.service)+":")])]),e._v(" "),"customer"===e.state.cabinetType?n("el-col",{attrs:{lg:9}},[n("p",[e._v(e._s(e.$root.labels.employee)+":")])]):e._e(),e._v(" "),"provider"===e.state.cabinetType?n("el-col",{attrs:{lg:9}},[n("p",[e._v(e._s(e.$root.labels.customer)+":")])]):e._e()],1)],1),e._v(" "),n("el-col",{attrs:{lg:8}},[n("el-row",{staticClass:"am-cabinet-flex-row-middle-align"},[n("el-col",{attrs:{lg:14}},[n("p",[e._v(e._s(e.$root.labels.status)+":")])])],1)],1)],1)],1):e._e(),e._v(" "),!e.packagesPage&&e.options.fetched&&e.state.fetchedAppointments&&Object.keys(e.appointments).length>0?n("div",{staticClass:"am-cabinet-list"},e._l(e.appointments,function(t,i){return n("div",{staticClass:"am-cabinet"},[n("div",{staticClass:"am-cabinet-list-day-title"},[n("el-row",[n("el-col",{attrs:{span:24}},[n("h4",[e._v("\n "+e._s(e.handleDateFormat(i))+"\n ")])])],1)],1),e._v(" "),n("el-collapse",e._l(t.appointments,function(i){return n("el-collapse-item",{key:t.date+i.id,attrs:{name:i.id}},[n("template",{slot:"title"},[n("el-row",{staticClass:"am-cabinet-row"},[n("el-col",{attrs:{lg:14}},[n("el-row",{staticClass:"am-cabinet-flex-row-middle-align"},[n("el-col",{attrs:{lg:5,sm:8}},[n("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.time))]),e._v(" "),n("h4",[e._v(e._s(e.getFrontedFormattedTimeFromDateTimeString(i.bookingStart)))])]),e._v(" "),n("el-col",{staticClass:"am-cabinet-limited-col",attrs:{lg:9,sm:8}},[n("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.service))]),e._v(" "),n("h4",{attrs:{title:e.getServiceById(i.serviceId).name}},[e._v("\n "+e._s(e.getServiceById(i.serviceId).name)+"\n ")])]),e._v(" "),"customer"===e.state.cabinetType?n("el-col",{staticClass:"am-cabinet-limited-col",attrs:{lg:10,sm:8}},[n("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.employee))]),e._v(" "),n("div",{staticClass:"am-assigned"},[n("img",{attrs:{src:e.pictureLoad(e.getProviderById(i.providerId),!0)},on:{error:function(t){e.imageLoadError(e.getProviderById(i.providerId),!0)}}}),e._v(" "),n("h4",[e._v("\n "+e._s(e.getAppointmentEmployee(i))+"\n ")])])]):e._e(),e._v(" "),"provider"===e.state.cabinetType?n("el-col",{staticClass:"am-cabinet-limited-col",attrs:{lg:9,sm:8}},[n("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.customer))]),e._v(" "),n("h4",{class:{"am-grouped":i.bookings.length>1}},[n("span",{attrs:{title:e.getAppointmentCustomer(i)}},[e._v("\n "+e._s(e.getAppointmentCustomer(i))+"\n ")])])]):e._e()],1)],1),e._v(" "),n("el-col",{attrs:{lg:10}},[n("el-row",{staticClass:"am-cabinet-flex-row-middle-align am-pb-0"},[n("el-col",{attrs:{lg:10,sm:8}},[n("p",{staticClass:"am-col-title"},[e._v("\n "+e._s(e.$root.labels.status)+":\n ")]),e._v(" "),n("div",{staticClass:"am-status"},[n("span",{class:"am-appointment-status-symbol am-relative am-appointment-status-symbol-"+e.getStatus(i)}),e._v(" "),n("h4",{staticClass:"am-pl-8"},[e._v("\n "+e._s(e.getStatusLabel(i))+"\n ")])])]),e._v(" "),"customer"===e.state.cabinetType?n("el-col",{attrs:{lg:0,sm:8}},[n("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.price)+":")]),e._v(" "),n("h4",[e._v("\n "+e._s(e.getTotalPrice(i))+"\n ")])]):e._e(),e._v(" "),"provider"===e.state.cabinetType?n("el-col",{attrs:{lg:0,sm:8}},[n("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.duration)+":")]),e._v(" "),n("h4",[e._v("\n "+e._s(e.getDuration(i))+"\n ")])]):e._e(),e._v(" "),i.locationId&&(e.location=e.getLocationById(i.locationId))?n("el-col",{attrs:{lg:0,sm:8}},[n("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.location)+":")]),e._v(" "),n("h4",[e._v("\n "+e._s(e.location.address?e.location.address:e.location.name)+"\n ")])]):e._e(),e._v(" "),n("el-col",{staticClass:"am-cabinet-buttons-align-all",style:"justify-content:"+("customer"===e.state.cabinetType?"start":"center"),attrs:{lg:14,sm:8}},["provider"===e.state.cabinetType&&e.$root.settings.roles.allowWriteAppointments?n("el-button",{staticClass:"am-m-0 am-mr-8",attrs:{icon:"el-icon-edit",size:"mini"},on:{click:[function(t){return e.editAppointment(i)},function(e){e.stopPropagation()}]}}):e._e(),e._v(" "),"customer"!==e.state.cabinetType||"approved"!==i.bookings[0].status&&"pending"!==i.bookings[0].status||!e.isBookingCancelable(i)&&!e.isBookingReschedulable(i)?e._e():n("el-dropdown",{attrs:{trigger:"click"},on:{command:function(t){return e.handleAppointment(t,i)}}},[n("el-button",{staticClass:"am-m-0 am-mr-8",attrs:{icon:"el-icon-edit",size:"mini"},on:{click:function(e){e.stopPropagation()}}}),e._v(" "),n("el-dropdown-menu",{staticClass:"am-cabinet-dropdown-menu",attrs:{slot:"dropdown"},slot:"dropdown"},[e.$root.settings.roles.allowCustomerReschedule&&"customer"===e.state.cabinetType?n("el-dropdown-item",{attrs:{command:"reschedule",disabled:!e.isBookingReschedulable(i)}},[e._v("\n "+e._s(e.$root.labels.reschedule)+"\n ")]):e._e(),e._v(" "),"customer"===e.state.cabinetType?n("el-dropdown-item",{attrs:{command:"cancel",disabled:!e.isBookingCancelable(i)}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]):e._e()],1)],1),e._v(" "),"customer"===e.state.cabinetType&&e.paymentFromCustomerPanel(i,i.service.settings)?n("div",[e.isPayable(i)?n("div",[e.paymentMethods(i.service.settings).length>1?n("el-dropdown",{on:{command:function(t){return e.getPaymentLink(t,i)}}},[n("el-button",{staticStyle:{"padding-right":"8px"},attrs:{type:"primary",size:"mini",loading:e.payBtnLoader===i.bookings[0].id},on:{click:function(e){e.stopPropagation()}}},[e._v("\n "+e._s(e.$root.labels.pay)+" "),n("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),n("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.paymentMethods(i.service.settings),function(t){return n("el-dropdown-item",{key:t.value,attrs:{command:t.value}},[e._v("\n "+e._s(t.label)+"\n ")])}),1)],1):e._e(),e._v(" "),1===e.paymentMethods(i.service.settings).length?n("el-button",{staticClass:"am-m-0 am-mr-8",attrs:{type:"primary",size:"mini",loading:e.payBtnLoader===i.bookings[0].id},on:{click:[function(t){e.getPaymentLink(e.paymentMethods(i.service.settings)[0].value,i)},function(e){e.stopPropagation()}]}},[e._v("\n "+e._s(e.$root.labels.pay_now)+"\n\n ")]):e._e()],1):n("div",[n("el-button",{staticStyle:{opacity:"0.5"},attrs:{disabled:!0,type:"primary",size:"mini"}},[e._v("\n "+e._s(e.getPaymentsStatus(i.bookings[0].payments))+"\n\n ")])],1)]):e._e()],1)],1)],1)],1)],1),e._v(" "),n("div",{staticClass:"am-cabinet-collapsed-content"},[n("el-row",[n("el-row",{staticClass:"am-has-divider"},[n("el-row",{directives:[{name:"show",rawName:"v-show",value:e.getBookingDateCreated(i),expression:"getBookingDateCreated(reservation)"}],class:{"am-hide-less-than-desktop":"customer"===e.state.cabinetType}},[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.created_on)+":\n ")]),e._v(" "),n("p",{staticClass:"am-value"},[e._v("\n "+e._s(e.getBookingDateCreated(i))+"\n ")])]),e._v(" "),n("el-row",{class:{"am-hide-less-than-desktop":"customer"===e.state.cabinetType}},[n("p",{staticClass:"am-data"},[e._v("\n "+e._s("provider"===e.state.cabinetType?e.$root.labels.total_price:e.$root.labels.price)+":\n ")]),e._v(" "),n("p",{staticClass:"am-value"},[e._v("\n "+e._s(e.getTotalPrice(i))+"\n ")])]),e._v(" "),n("el-row",{class:{"am-hide-less-than-desktop":"provider"===e.state.cabinetType,"am-has-divider":i.googleMeetUrl||i.zoomMeeting||i.lessonSpace||i.microsoftTeamsUrl}},[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.duration)+":\n ")]),e._v(" "),n("p",{staticClass:"am-value"},[e._v("\n "+e._s(e.getDuration(i))+"\n ")])]),e._v(" "),i.locationId&&(e.location=e.getLocationById(i.locationId))?n("el-row",{staticClass:"am-hide-less-than-desktop",class:{"am-has-divider":i.googleMeetUrl||i.zoomMeeting||i.lessonSpace||i.microsoftTeamsUrl}},[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.location)+":\n ")]),e._v(" "),n("p",{staticClass:"am-value"},[e._v("\n "+e._s(e.location.address?e.location.address:e.location.name)+"\n ")])]):e._e(),e._v(" "),i.googleMeetUrl?n("el-row",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.google_meet_link)+":\n ")]),e._v(" "),n("a",{staticClass:"am-value-link",attrs:{href:i.googleMeetUrl,target:"_blank"}},[e._v("\n "+e._s(e.$root.labels.google_meet_join)+"\n ")])]):e._e(),e._v(" "),i.microsoftTeamsUrl?n("el-row",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.microsoft_teams_link)+":\n ")]),e._v(" "),n("a",{staticClass:"am-value-link",attrs:{href:i.microsoftTeamsUrl,target:"_blank"}},[e._v("\n "+e._s(e.$root.labels.microsoft_teams_join)+"\n ")])]):e._e(),e._v(" "),i.zoomMeeting?n("el-row",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.zoom_link)+":\n ")]),e._v(" "),n("a",{staticClass:"am-value-link",attrs:{href:e.getZoomLink(i),target:"_blank"}},[e._v("\n "+e._s(e.getZoomLabel())+"\n ")])]):e._e(),e._v(" "),i.lessonSpace?n("el-row",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.lesson_space_link)+":\n ")]),e._v(" "),n("a",{staticClass:"am-value-link",attrs:{href:i.lessonSpace,target:"_blank"}},[e._v("\n "+e._s(e.$root.labels.lesson_space_join)+"\n ")])]):e._e(),e._v(" "),"customer"===e.state.cabinetType?n("div",e._l(i.bookings[0].extras,function(t){return n("div",[n("div",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.getServiceById(i.serviceId).extras.find(function(e){return e.id===t.extraId}).name+":")+"\n ")]),e._v(" "),n("p",{staticClass:"am-value"},[e._v("\n "+e._s(t.quantity)+"\n ")])])])}),0):e._e()],1),e._v(" "),"provider"===e.state.cabinetType?n("el-row",{staticClass:"am-has-divider"},[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.customers)+":\n ")]),e._v(" "),e._l(i.bookings,function(t,o){return n("el-row",{key:o},[n("h4",{staticClass:"am-customer-name"},[e._v("\n "+e._s(e.getCustomer(t).firstName+" "+e.getCustomer(t).lastName)+"\n ")]),e._v(" "),t.customer.email?n("div",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.email)+":\n ")]),e._v(" "),n("a",{staticClass:"am-value 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("div",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.phone)+":\n ")]),e._v(" "),n("a",{staticClass:"am-value am-customer-link",attrs:{href:"tel:"+t.customer.phone}},[e._v("\n "+e._s(t.customer.phone)+"\n ")])]):e._e(),e._v(" "),t.price?n("div",[n("p",{staticClass:"am-data am-customer-link"},[e._v("\n "+e._s(e.$root.labels.price)+":\n ")]),e._v(" "),n("p",{staticClass:"am-value"},[e._v("\n "+e._s(e.getCustomerBookingPrice(t,i.serviceId))+"\n ")])]):e._e(),e._v(" "),t.payments[0]?n("div",[n("p",{staticClass:"am-data am-customer-link"},[e._v("\n "+e._s(e.$root.labels.payment_status)+":\n ")]),e._v(" "),n("p",{staticClass:"am-value"},[e._v("\n "+e._s(e.getPaymentMethodAndStatusString(t.payments[0].status))+"\n ")])]):e._e(),e._v(" "),t.payments[0]?n("div",[n("p",{staticClass:"am-data am-customer-link"},[e._v("\n "+e._s(e.$root.labels.payment_method)+":\n ")]),e._v(" "),n("p",{staticClass:"am-value"},[e._v("\n "+e._s(e.getPaymentMethodAndStatusString(t.payments[0].gateway))+"\n ")])]):e._e(),e._v(" "),t.coupon?n("div",[n("p",{staticClass:"am-data am-customer-link"},[e._v("\n "+e._s(e.$root.labels.coupon_used)+":\n ")]),e._v(" "),n("p",{staticClass:"am-value"},[e._v("\n "+e._s(t.coupon.code)+"\n ")])]):e._e(),e._v(" "),e._l(JSON.parse(i.bookings[o].customFields),function(t,a){return n("div",[t&&e.showCustomField(t.value)?n("div",[n("p",{staticClass:"am-data",domProps:{innerHTML:e._s(e.getCustomFieldLabel(t,a)+":")}}),e._v(" "),"file"!==t.type&&"address"!==t.type?n("p",{staticClass:"am-value"},[e._v("\n "+e._s(t?e.getCustomFieldValue(t.value,t.type):"")+"\n ")]):e._e(),e._v(" "),"address"===t.type?n("p",{staticClass:"am-value"},[n("a",{staticClass:"am-link",attrs:{href:"https://maps.google.com/?q="+t.value,target:"_blank"}},[e._v(e._s(t.value))])]):n("p",{staticClass:"am-value"},e._l(t.value,function(t,s){return n("a",{staticClass:"am-value",attrs:{href:e.getCustomFieldFileURL(a,i.bookings[o].id,s),target:"_blank"}},[e._v("\n "+e._s(t.name)+"\n ")])}),0)]):e._e()])}),e._v(" "),e._l(i.bookings[o].extras,function(t){return n("div",[n("div",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.getServiceById(i.serviceId).extras.find(function(e){return e.id===t.extraId}).name+":")+"\n ")]),e._v(" "),n("p",{staticClass:"am-value"},[e._v("\n "+e._s(t.quantity)+"\n ")])])])})],2)})],2):e._e(),e._v(" "),"provider"===e.state.cabinetType&&i.internalNotes?n("el-row",{staticClass:"am-has-divider"},[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.note)+":\n ")]),e._v(" "),n("p",{staticClass:"am-value"},[e._v("\n "+e._s(i.internalNotes)+"\n ")])]):e._e()],1)],1)],2)}),1)],1)}),0):e._e()],1),e._v(" "),e.bookAppointmentPage?n("div",{key:2,staticClass:"am-booking-page"},[n("div",{staticClass:"am-booking-page__button-holder"},[e.packagesPage?e._e():n("div",{staticClass:"am-package__button",on:{click:function(t){return e.sendToAppointmentPage()}}},[n("i",{staticClass:"el-icon-arrow-left"}),e._v(" "),e.packagesPage?n("span",{staticClass:"am-package__button-text"},[e._v("\n "+e._s(e.$root.labels.package_back_to_packages)+"\n ")]):n("span",{staticClass:"am-package__button-text"},[e._v("\n "+e._s(e.$root.labels.package_back_to_appointments)+"\n ")])])]),e._v(" "),n("div",{staticClass:"am-booking-page__heading"},[n("div",{staticClass:"am-booking-page__left"},[n("div",{staticClass:"am-booking-page__heading-inner"},[n("div",{staticClass:"am-package__img-holder"},[n("img",{attrs:{src:e.pictureLoad(e.bookingPackage,!1)},on:{error:function(t){return e.imageLoadError(e.bookingPackage,!1)}}}),e._v(" "),n("span",{staticClass:"am-package__color",style:"background-color:"+e.bookingPackage.color})]),e._v(" "),n("div",{staticClass:"am-package__text-holder"},[n("div",{staticClass:"am-package__heading"},[n("span",{staticClass:"am-package__name"},[e._v("\n "+e._s(e.bookingPackage.name)+"\n ")]),e._v(" "),n("span",{staticClass:"am-package__type"},[e._v(e._s(e.$root.labels.package.toUpperCase()))])])])])]),e._v(" "),n("div",{staticClass:"am-booking-page__right"},[e.bookingPackage.expireDateString?n("div",{staticClass:"am-package__valid-date",staticStyle:{"text-align":"right"}},[n("span",[e._v("\n "+e._s(e.bookingPackage.expireDateString?e.$root.labels.package_book_expire:e.$root.labels.package_book_expiration)+"\n ")]),e._v(" "),n("span",{staticClass:"am-package__date-until"},[e._v("\n "+e._s(e.bookingPackage.expireDateString?e.handleDateFormat(e.bookingPackage.expireDateString):e.$root.labels.package_book_unlimited)+"\n ")])]):e._e(),e._v(" "),"customer"===e.state.cabinetType&&e.paymentFromCustomerPanel(e.bookingPackage,e.bookingPackage.settings)?n("div",[Object.keys(e.bookingPackage.payments).length>1?n("div",[n("el-dropdown",{attrs:{trigger:"click"}},[n("el-button",{staticStyle:{"padding-right":"8px","margin-bottom":"0"},attrs:{type:"primary",loading:e.payBtnLoader===e.bookingPackage.id}},[e._v("\n "+e._s(e.isAllPaid(e.bookingPackage)?e.getGroupPaymentsStatusPackage(e.bookingPackage):e.$root.labels.pay_now)+" "),n("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),n("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},e._l(Object.keys(e.bookingPackage.payments),function(t){return n("el-dropdown-item",{key:t},[n("el-row",{attrs:{gitter:5}},[n("el-col",{attrs:{span:16}},[e._v("\n "+e._s(e.getFrontedFormattedDateTime(e.bookingPackage.payments[t].packagePurchased))+"\n ")]),e._v(" "),1===e.paymentMethods(e.bookingPackage.settings).length&&e.isPayable(e.bookingPackage,t)?n("el-col",{attrs:{span:8}},[n("el-button",{attrs:{type:"primary",loading:e.payBtnLoader===e.bookingPackage.id,size:"mini"},on:{click:function(n){e.getPaymentLink(e.paymentMethods(e.bookingPackage.settings)[0].value,e.bookingPackage,t)}}},[e._v("\n "+e._s(e.$root.labels.pay)+"\n ")])],1):e.isPayable(e.bookingPackage,t)?n("el-col",{attrs:{span:7}},[n("el-dropdown",{on:{command:function(n){return e.getPaymentLink(n,e.bookingPackage,t)}}},[n("el-button",{staticStyle:{"padding-right":"3px"},attrs:{type:"primary",size:"mini",loading:e.payBtnLoader===e.bookingPackage.id},on:{click:function(e){e.stopPropagation()}}},[e._v("\n "+e._s(e.$root.labels.pay)+" "),n("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),n("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.paymentMethods(e.bookingPackage.settings),function(t){return n("el-dropdown-item",{key:t.value,attrs:{command:t.value}},[e._v("\n "+e._s(t.label)+"\n ")])}),1)],1)],1):n("el-col",{attrs:{span:7}},[n("el-button",{staticStyle:{opacity:"0.5"},attrs:{disabled:!0,type:"primary",size:"mini"}},[e._v("\n "+e._s(e.getPaymentsStatusPackage(e.bookingPackage,t))+"\n ")])],1)],1)],1)}),1)],1)],1):n("div",[e.isPayable(e.bookingPackage)?n("div",[e.paymentMethods(e.bookingPackage.settings).length>1?n("el-dropdown",{on:{command:function(t){return e.getPaymentLink(t,e.bookingPackage)}}},[n("el-button",{staticStyle:{"padding-right":"8px"},attrs:{type:"primary",loading:e.payBtnLoader===e.bookingPackage.id}},[e._v("\n "+e._s(e.$root.labels.pay_now)+" "),n("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),n("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.paymentMethods(e.bookingPackage.settings),function(t){return n("el-dropdown-item",{key:t.value,attrs:{command:t.value}},[e._v("\n "+e._s(t.label)+"\n ")])}),1)],1):e._e(),e._v(" "),1===e.paymentMethods(e.bookingPackage.settings).length?n("el-button",{staticClass:"am-m-0 am-mr-8",attrs:{type:"primary",loading:e.payBtnLoader===e.bookingPackage.id},on:{click:function(t){e.getPaymentLink(e.paymentMethods(e.bookingPackage.settings)[0].value,e.bookingPackage)}}},[e._v("\n "+e._s(e.$root.labels.pay_now)+"\n\n ")]):e._e()],1):n("div",[n("el-button",{staticStyle:{opacity:"0.5"},attrs:{disabled:!0,type:"primary"}},[e._v("\n "+e._s(e.getPaymentsStatusPackage(e.bookingPackage))+"\n\n ")])],1)])]):e._e(),e._v(" "),n("div",[n("el-dropdown",[n("el-dropdown-menu",{staticClass:"am-cabinet-dropdown-menu"},e._l(e.bookingPackage.purchases,function(t,i){return n("el-dropdown-item",{key:i,attrs:{disabled:"canceled"===t.status}},[e._v("\n "+e._s(e.getFrontedFormattedDateFromDateTimeString(t.purchased)+" - "+e.getFrontedFormattedTimeFromDateTimeString(t.purchased))+"\n ")])}),1)],1),e._v(" "),n("el-dropdown",{attrs:{trigger:"click"},on:{command:function(t){return e.handlePackage(t)}}},[n("el-button",{directives:[{name:"show",rawName:"v-show",value:e.$root.settings.roles.allowCustomerCancelPackages,expression:"$root.settings.roles.allowCustomerCancelPackages"}],staticClass:"am-m-0 am-mr-8",attrs:{loading:e.canceling,type:"danger"},on:{click:function(e){e.stopPropagation()}}},[e._v(e._s(e.$root.labels.cancel))]),e._v(" "),n("el-dropdown-menu",{staticClass:"am-cabinet-dropdown-menu",attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.getPurchasesData(e.bookingPackage.purchases),function(t,i){return"customer"===e.state.cabinetType?n("el-dropdown-item",{key:i,attrs:{command:t,disabled:"canceled"===t.status}},[e._v("\n "+e._s(e.$root.labels.purchased)+": "+e._s(e.getFrontedFormattedDateFromDateTimeString(t.purchased))+"\n ")]):e._e()}),1)],1)],1)])]),e._v(" "),n("el-tabs",{on:{"tab-click":e.changePackageService},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},e._l(e.bookingPackage.bookable,function(t){return"appointmentsAvailable"in t.service?n("el-tab-pane",{key:t.service.id,attrs:{label:t.service.name,name:t.service.id+"service"}}):e._e()}),1),e._v(" "),n("transition-group",{attrs:{name:"fade",mode:"out-in",appear:""}},e._l(e.bookingPackage.bookable,function(t){return"appointmentsAvailable"in t.service?n("div",{directives:[{name:"show",rawName:"v-show",value:e.serviceTabContent===t.service.id,expression:"serviceTabContent === item.service.id"}],key:t.service.id},[n("div",{staticClass:"am-booking-page__service-wrapper"},[n("div",{staticClass:"am-booking-page__service-info"},[n("p",[e._v("\n "+e._s(e.$root.labels.total)+" "),n("strong",[e._v(e._s(t.service.total))]),e._v(" "+e._s(e.bookingPackage.appointmentsSharable?e.$root.labels.package_total_appointments:e.$root.labels.package_total_appointments_service)+"\n ")]),e._v(" "),n("el-popover",{attrs:{"popper-class":"am-booking-page__service-info-popover",placement:"bottom","append-to-body":!1,"visible-arrow":!1}},[n("div",{staticClass:"am-booking-page__service-info-data"},[n("div",{staticClass:"am-package__img-holder"},[n("img",{attrs:{src:e.pictureLoad(t.service,!1)},on:{error:function(n){return e.imageLoadError(t.service,!1)}}}),e._v(" "),n("span",{staticClass:"am-package__color",style:"background-color:"+t.service.color})]),e._v("\n "+e._s(t.service.name)+"\n ")]),e._v(" "),n("div",{staticClass:"am-booking-page__service-info-content"},[t.providers.length>0?n("div",{staticClass:"am-booking-page__service-info-content-employees"},[n("p",[e._v("\n "+e._s(e.$root.labels.employee.charAt(0).toUpperCase()+e.$root.labels.employee.slice(1))+":\n ")]),e._v(" "),e._l(t.providers,function(t){return n("span",[e._v("\n "+e._s(t.firstName+" "+t.lastName)+"\n ")])})],2):e._e(),e._v(" "),n("div",{staticClass:"am-booking-page__service-info-content-duration"},[n("i",{staticClass:"el-icon-time"}),e._v(" "),n("span",[e._v(e._s(e.serviceDuration(t.service.duration)))])]),e._v(" "),t.locations.length>0?n("div",{staticClass:"am-booking-page__service-info-content-locations"},[n("i",{staticClass:"el-icon-location-outline"}),e._v(" "),e._l(t.locations,function(t){return n("span",[e._v("\n "+e._s(t.name)+"\n ")])})],2):e._e()]),e._v(" "),n("el-button",{staticClass:"am-booking-page__service-info-button",attrs:{slot:"reference"},slot:"reference"},[n("span",[e._v("\n i\n ")]),e._v(" "),n("p",[e._v("\n "+e._s(e.$root.labels.package_service_info)+"\n ")])])],1)],1),e._v(" "),n("div",{staticClass:"am-booking-page__appointment-booking"},[n("div",{staticClass:"am-booking-page__appointment-booking-left"},[n("div",{staticClass:"am-booking-page__appointment-booking-number"},[e._v("\n "+e._s(t.service.appointmentsAvailable+" "+e.$root.labels.package_left_appointments)+"\n ")])]),e._v(" "),n("div",{staticClass:"am-booking-page__appointment-booking-right"},[n("el-popover",{attrs:{"popper-class":"am-booking-page__calendar-popover",placement:"bottom","append-to-body":!1,"visible-arrow":!1},on:{"after-leave":e.closeCalendarPopover},model:{value:e.calendarModalVisible,callback:function(t){e.calendarModalVisible=t},expression:"calendarModalVisible"}},[n("div",{staticClass:"am-booking-page__calendar-block"},[n("div",{staticClass:"am-booking-page__calendar-header"},[n("p",[e._v("\n "+e._s(e.$root.labels.package_book_next_appointment)+"\n ")]),e._v(" "),n("el-button",{on:{click:e.closeCalendarPopover}},[n("i",{staticClass:"el-icon-close"})])],1),e._v(" "),t.allowProviderSelection&&t.service.appointmentsAvailable>0&&e.bookingPackageService.providers.length>1&&!e.showSuccess?n("el-select",{staticStyle:{"padding-left":"16px","padding-right":"16px"},attrs:{label:e.$root.labels.select_employee,clearable:!0,placeholder:e.$root.labels.any_employee},on:{change:function(n){return e.changeEmployee(n,e.bookingPackage,t)}},model:{value:e.bookingPackageEmployee,callback:function(t){e.bookingPackageEmployee=t},expression:"bookingPackageEmployee"}},e._l(e.bookingPackageService.providers,function(e){return n("el-option",{key:e.id,attrs:{label:e.firstName+" "+e.lastName,value:e.id}})}),1):e._e(),e._v(" "),n("cabinet-spinner",{attrs:{"show-spinner":e.loadingTimeSlots}}),e._v(" "),e.showCalendar&&!e.loadingTimeSlots?n("div",{staticClass:"am-booking-page__date-block"},[n("v-date-picker",{staticClass:"am-calendar-picker",style:{backgroundColor:"transparent",border:"none"},attrs:{id:"am-calendar-picker",mode:"single","is-inline":!0,"is-expanded":!0,"show-day-popover":!1,"available-dates":e.slotsData.availableDates,"disabled-dates":e.slotsData.disabledWeekdays,"disabled-attribute":{contentStyle:{color:"#ccc",opacity:.4,textDecoration:"line-through"}},formats:e.vCalendarFormats},on:{input:e.showFreeSlots},model:{value:e.slotsData.selectedDate,callback:function(t){e.$set(e.slotsData,"selectedDate",t)},expression:"slotsData.selectedDate"}})],1):e._e(),e._v(" "),e.showTimes&&!e.loadingTimeSlots?n("div",{staticClass:"am-booking-page__time-block"},[n("el-button",{staticClass:"am-booking-page__back-button",on:{click:e.backToCalendar}},[n("i",{staticClass:"el-icon-arrow-left"}),e._v("\n "+e._s(e.backButtonText)+"\n ")]),e._v(" "),n("div",{staticClass:"am-appointment-times am-scroll"},[n("el-radio-group",{attrs:{size:"medium"},model:{value:e.slotsData.selectedTime,callback:function(t){e.$set(e.slotsData,"selectedTime",t)},expression:"slotsData.selectedTime"}},e._l(e.availableTimeSlots,function(i,o){return n("el-radio-button",{key:o+1,attrs:{label:i}},[e._v("\n "+e._s(e.getFormattedTimeSlot(i,t.service.duration))+"\n ")])}),1)],1),e._v(" "),n("el-button",{staticClass:"am-booking-page__booking-button",attrs:{type:"primary",loading:e.loadingBooking},on:{click:function(n){return e.bookAppointment(t)}}},[e._v("\n "+e._s(e.$root.labels.book)+"\n ")])],1):e._e(),e._v(" "),e.showSuccess&&!e.loadingTimeSlots?n("div",{staticClass:"am-booking-page__success-block"},[n("div",{staticClass:"am-booking-page__success-images"},[n("img",{staticClass:"am-booking-page__success-images-first",attrs:{src:e.$root.getUrl+"public/img/am-package-appointment-success1.svg",alt:""}}),e._v(" "),n("img",{staticClass:"am-booking-page__success-images-second",attrs:{src:e.$root.getUrl+"public/img/am-package-appointment-success2.svg",alt:""}})]),e._v(" "),n("p",{staticClass:"am-booking-page__success-text"},[e._v("\n "+e._s(e.$root.labels.booking_completed_approved)+"\n ")]),e._v(" "),n("p",{staticClass:"am-booking-page__success-left-appointment"},[e._v("\n "+e._s(t.service.appointmentsAvailable+" "+e.$root.labels.package_left_appointments)+"\n ")]),e._v(" "),t.service.appointmentsAvailable>0?n("el-button",{staticClass:"am-booking-page__booking-button am-booking-page__success-button",attrs:{type:"primary",loading:e.loadingNewTimeSlots},on:{click:function(n){return e.continueBooking(e.bookingPackage,t)}}},[e._v("\n "+e._s(e.$root.labels.package_continue_booking)+"\n ")]):e._e()],1):e._e()],1),e._v(" "),t.service.appointmentsAvailable>0?n("el-button",{staticClass:"am-booking-page__appointment-booking-button-booking",attrs:{slot:"reference",type:"primary",disabled:e.calendarModalVisible||!e.bookingPackage.totalAvailableAppointments||e.canceling,loading:!e.loadingNewTimeSlots&&e.loadingTimeSlots},on:{click:function(n){return e.getTimeSlots(e.bookingPackage,t)}},slot:"reference"},[n("span",{staticClass:"am-booking-page__appointment-booking-button-text"},[e._v("\n "+e._s(e.$root.labels.book)+"\n ")])]):e._e()],1)],1)])]),e._v(" "),n("div",{staticClass:"am-cabinet-list am-cabinet-list-package"},[n("div",{staticClass:"am-cabinet"},[n("div",{staticClass:"am-cabinet-list-day-title"},[n("el-row",[n("el-col",{attrs:{span:24}},[n("h4",[e._v("\n "+e._s(e.$root.labels.package_booked_appointments)+"\n ")])])],1)],1),e._v(" "),0===t.service.bookedAppointments.length?n("div",{staticClass:"am-empty-state"},[n("img",{attrs:{src:e.$root.getUrl+"public/img/emptystate.svg",alt:""}}),e._v(" "),n("div",[n("p",[e._v("\n "+e._s(e.$root.labels.no_results)+"\n ")])])]):e._e(),e._v(" "),n("el-collapse",e._l(t.service.bookedAppointments,function(i,o){return n("el-collapse-item",{key:i.id,attrs:{name:i.id}},[n("template",{slot:"title"},[n("el-row",{staticClass:"am-cabinet-row"},[n("el-col",{attrs:{lg:16}},[n("el-row",{staticClass:"am-cabinet-flex-row-middle-align"},[n("el-col",{attrs:{lg:8,sm:8}},[n("p",{staticClass:"am-col-title"},[e._v("#")]),e._v(" "),n("el-tooltip",{attrs:{placement:"bottom"}},[n("div",{attrs:{slot:"content"},slot:"content"},[e._v(e._s(e.$root.labels.appointment)+" "+e._s(t.service.bookedAppointments.length-o))]),e._v(" "),n("h4",[e._v(e._s(e.$root.labels.appointment)+" "+e._s(t.service.bookedAppointments.length-o))])])],1),e._v(" "),n("el-col",{staticClass:"am-cabinet-limited-col",attrs:{lg:16,sm:8}},[n("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.time))]),e._v(" "),n("el-tooltip",{attrs:{placement:"bottom"}},[n("div",{attrs:{slot:"content"},slot:"content"},[e._v("\n "+e._s(e.getFrontedFormattedDateFromDateTimeString(i.bookingStart)+" - "+e.getFrontedFormattedTimeFromDateTimeString(i.bookingStart))+"\n ")]),e._v(" "),n("h4",[e._v("\n "+e._s(e.getFrontedFormattedDateFromDateTimeString(i.bookingStart)+" - "+e.getFrontedFormattedTimeFromDateTimeString(i.bookingStart))+"\n ")])])],1)],1)],1),e._v(" "),n("el-col",{attrs:{lg:8}},[n("el-row",{staticClass:"am-cabinet-flex-row-middle-align am-pb-0"},[n("el-col",{attrs:{lg:12,sm:8}},[n("p",{staticClass:"am-col-title"},[e._v("\n "+e._s(e.$root.labels.status)+":\n ")]),e._v(" "),n("el-tooltip",[n("div",{staticClass:"am-status",attrs:{slot:"content"},slot:"content"},[e._v("\n "+e._s(e.getStatusLabel(i))+"\n ")]),e._v(" "),n("div",{staticClass:"am-status"},[n("span",{class:"am-appointment-status-symbol am-relative am-appointment-status-symbol-"+e.getStatus(i)}),e._v(" "),n("h4",{staticClass:"am-pl-8"},[e._v("\n "+e._s(e.getStatusLabel(i))+"\n ")])])])],1),e._v(" "),"customer"===e.state.cabinetType?n("el-col",{attrs:{lg:0,sm:8}},[n("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.price)+":")]),e._v(" "),n("h4",[e._v("\n "+e._s(e.getTotalPrice(i))+"\n ")])]):e._e(),e._v(" "),"provider"===e.state.cabinetType?n("el-col",{attrs:{lg:0,sm:8}},[n("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.duration)+":")]),e._v(" "),n("h4",[e._v("\n "+e._s(e.getDuration(i))+"\n ")])]):e._e(),e._v(" "),i.locationId&&(e.location=e.getLocationById(i.locationId))?n("el-col",{attrs:{lg:0,sm:8}},[n("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.location)+":")]),e._v(" "),n("h4",[e._v("\n "+e._s(e.location.address?e.location.address:e.location.name)+"\n ")])]):e._e()],1)],1)],1)],1),e._v(" "),n("div",{staticClass:"am-cabinet-collapsed-content"},[n("el-row",[n("el-row",{staticClass:"am-has-divider"},[n("el-row",{class:{"am-hide-less-than-desktop":"customer"===e.state.cabinetType}},[n("p",{staticClass:"am-data"},[e._v("\n "+e._s("provider"===e.state.cabinetType?e.$root.labels.total_price:e.$root.labels.price)+":\n ")]),e._v(" "),n("p",{staticClass:"am-value"},[e._v("\n "+e._s(e.getTotalPrice(i))+"\n ")])]),e._v(" "),n("el-row",{class:{"am-hide-less-than-desktop":"provider"===e.state.cabinetType}},[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.duration)+":\n ")]),e._v(" "),n("p",{staticClass:"am-value"},[e._v("\n "+e._s(e.getDuration(i))+"\n ")])]),e._v(" "),i.locationId&&(e.location=e.getLocationById(i.locationId))?n("el-row",{staticClass:"am-hide-less-than-desktop"},[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.location)+":\n ")]),e._v(" "),n("p",{staticClass:"am-value"},[e._v("\n "+e._s(e.location.address?e.location.address:e.location.name)+"\n ")])]):e._e(),e._v(" "),i.zoomMeeting?n("el-row",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.zoom_link)+":\n ")]),e._v(" "),n("a",{staticClass:"am-value-link",attrs:{href:e.getZoomLink(i),target:"_blank"}},[e._v("\n "+e._s(e.getZoomLabel())+"\n ")])]):e._e(),e._v(" "),i.lessonSpace?n("el-row",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.lesson_space_link)+":\n ")]),e._v(" "),n("a",{staticClass:"am-value-link",attrs:{href:i.lessonSpace,target:"_blank"}},[e._v("\n "+e._s(e.$root.labels.lesson_space_join)+"\n ")])]):e._e(),e._v(" "),"customer"===e.state.cabinetType?n("div",e._l(i.bookings[0].extras,function(t){return n("div",[n("div",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.getServiceById(i.serviceId).extras.find(function(e){return e.id===t.extraId}).name+":")+"\n ")]),e._v(" "),n("p",{staticClass:"am-value"},[e._v("\n "+e._s(t.quantity)+"\n ")])])])}),0):e._e()],1),e._v(" "),"provider"===e.state.cabinetType?n("el-row",{staticClass:"am-has-divider"},[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.customers)+":\n ")]),e._v(" "),e._l(i.bookings,function(t,o){return n("el-row",{key:o},[n("h4",{staticClass:"am-customer-name"},[e._v("\n "+e._s(e.getCustomer(t).firstName+" "+e.getCustomer(t).lastName)+"\n ")]),e._v(" "),t.customer.email?n("div",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.email)+":\n ")]),e._v(" "),n("a",{staticClass:"am-value 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("div",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.phone)+":\n ")]),e._v(" "),n("a",{staticClass:"am-value am-customer-link",attrs:{href:"tel:"+t.customer.phone}},[e._v("\n "+e._s(t.customer.phone)+"\n ")])]):e._e(),e._v(" "),t.price?n("div",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.price)+":\n ")]),e._v(" "),n("p",{staticClass:"am-value"},[e._v("\n "+e._s(e.getCustomerBookingPrice(t,i.serviceId))+"\n ")])]):e._e(),e._v(" "),e._l(JSON.parse(i.bookings[o].customFields),function(t,i){return n("div",[t&&e.showCustomField(t.value)&&"file"!==t.type?n("div",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.getCustomFieldLabel(t,i))+":\n ")]),e._v(" "),n("p",{staticClass:"am-value"},[e._v("\n "+e._s(t?e.getCustomFieldValue(t.value,t.type):"")+"\n ")])]):e._e()])}),e._v(" "),e._l(i.bookings[o].extras,function(t){return n("div",[n("div",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.getServiceById(i.serviceId).extras.find(function(e){return e.id===t.extraId}).name+":")+"\n ")]),e._v(" "),n("p",{staticClass:"am-value"},[e._v("\n "+e._s(t.quantity)+"\n ")])])])})],2)})],2):e._e(),e._v(" "),"provider"===e.state.cabinetType&&i.internalNotes?n("el-row",{staticClass:"am-has-divider"},[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.note)+":\n ")]),e._v(" "),n("p",{staticClass:"am-value"},[e._v("\n "+e._s(i.internalNotes)+"\n ")])]):e._e()],1)],1)],2)}),1)],1)])]):e._e()}),0)],1):e._e()])],1)},staticRenderFns:[]}},1581:function(e,t,n){var i=n(90)(n(1582),n(1583),!1,null,null,null);e.exports=i.exports},1582:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(704),o=n(668),a=n(932),s=n.n(a),r=n(700),l=n(336),c=n(660),u=n(654),d=n(0),p=n.n(d),m=n(657),f=n(664),h=n(633),g=n(663),v=n(678),b=n(666),y=n(334),_=n.n(y),k="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},C=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.default={name:"CabinetDashboardEvents",props:{options:{type:Object,default:function(){}},events:{type:Object,default:function(){}}},components:{CabinetSpinner:s.a},mixins:[i.a,o.a,r.a,l.a,c.a,u.a,m.a,f.a,g.a,b.a,v.a],data:function(){return{timeZoneSelected:"",timeZones:[]}},mounted:function(){this.inlineSVGCabinet()},created:function(){if(this.timeZones=this.$root.timezones,!this.$store.state.cabinet.timeZone&&(this.$root.timezone&&!this.$root.settings.general.showClientTimeZone||"provider"===this.state.cabinetType)){var e="provider"===this.state.cabinetType&&this.state.clonedProfile.timeZone?this.state.clonedProfile.timeZone:this.$root.timezone;_.a.get("ameliaUserTimeZone")&&"customer"===this.state.cabinetType&&(e=_.a.get("ameliaUserTimeZone")),this.$store.commit("cabinet/setTimeZone",e),this.timeZoneSelected=e||""}this.$store.state.cabinet.timeZone&&(this.timeZoneSelected=this.$store.state.cabinet.timeZone)},computed:C({},Object(h.b)({state:function(e){return e.cabinet}})),methods:{isWaitingList:function(e){if(this.$root.settings.appointments.waitingListEvents.enabled&&e&&e.settings){var t=JSON.parse(e.settings);return t.waitingList&&t.waitingList.enabled}return!1},getPaymentsStatus:function(e){var t=e.bookings[0].payments;return t.every(function(e){return"refunded"===e.status})?this.$root.labels.refunded:t.filter(function(e){return"refunded"===e.status}).length>0?this.$root.labels.partially_refunded:this.$root.labels.paid},isPayable:function(e){return this.getPriceAmount(e)>e.bookings[0].payments.reduce(function(e,t){return e+t.amount},0)},changedTimeZone:function(e){this.$store.commit("cabinet/setTimeZone",e),_.a.set("ameliaUserTimeZone",e,this.$root.settings.roles[this.state.settingsName].tokenValidTime),this.$emit("changedTimeZone")},getCurrentTimeZone:function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},isLSenabled:function(e){if(e&&e.settings){var t=JSON.parse(e.settings);return t.lessonSpace&&t.lessonSpace.enabled}return!1},getCustomFieldLabel:function(e,t){var n=this.options.entities.customFields.find(function(e){return e.id===parseInt(t)});return void 0!==n?n.label.trim():e.label.trim()},getEventLocation:function(e){if(e.locationId&&this.options.entities.locations.length){var t=this.options.entities.locations.find(function(t){return t.id===e.locationId});return void 0!==t?t.name:""}return e.customLocation?e.customLocation:""},handleEvent:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;"zoom"===e&&(window.location.href=t.periods[0].zoomMeeting.joinUrl),"cancel"===e&&this.$emit("showDialogCancelBooking",t,n)},getTicketsPriceAmount:function(e){for(var t=0,n=e.bookings[0].ticketsData,i=0;i<n.length;i++)t+=(e.bookings[0].aggregatedPrice||0===n[i].persons?n[i].persons:1)*n[i].price;return t},getTicketsPrice:function(e){var t=this,n="";if("customer"!==this.state.cabinetType){for(var i=e.customTickets,o=0;o<i.length;o++)n+=i[o].name+" x "+i[o].price+(this.$root.settings.payments.hideCurrencySymbolFrontend?"":this.$root.settings.payments.currency),o<i.length-1&&(n+=" , ");return n}var a=function(){for(var i=e.bookings[0].ticketsData,o=function(o){n+=(e.bookings[0].aggregatedPrice?i[o].persons+" x ":"")+e.customTickets.filter(function(e){return e.id===i[o].eventTicketId})[0].name+" x "+i[o].price+(t.$root.settings.payments.hideCurrencySymbolFrontend?"":t.$root.settings.payments.currency),o<i.length-1&&(n+=" + ")},a=0;a<i.length;a++)o(a);return{v:n+" = "+e.bookings[0].price+(t.$root.settings.payments.hideCurrencySymbolFrontend?"":t.$root.settings.payments.currency)}}();if("object"===(void 0===a?"undefined":k(a)))return a.v},getPriceAmount:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if("customer"===this.state.cabinetType){var n=this.getEventBookingPriceAmount(e.bookings[t]);return n.total-n.discount+n.tax}return e.bookings.length&&e.bookings[t].ticketsData.length>0?this.getTicketsPriceAmount(e):e.price},getPrice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if("customer"===this.state.cabinetType){var n=this.getEventBookingPriceAmount(e.bookings[t]);return this.getFormattedPrice(n.total-n.discount+n.tax,!this.$root.settings.payments.hideCurrencySymbolFrontend)}return e.bookings.length&&e.bookings[t].ticketsData.length>0?this.getTicketsPrice(e):this.getFormattedPrice(e.price,!this.$root.settings.payments.hideCurrencySymbolFrontend)},getSpots:function(e){return e.maxCapacity-e.places+"/"+e.maxCapacity},getDate:function(e){return this.getFrontedFormattedTimeFromDateTimeString(e.periods[0].periodStart)},handleDateFormat:function(e){return e===p()().format("YYYY-MM-DD")?this.$root.labels.today:e===p()().add(1,"days").format("YYYY-MM-DD")?this.$root.labels.tomorrow:this.getFrontedFormattedDate(e)},getStatus:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.getEventStatus(e);return"customer"===this.state.cabinetType?"canceled"===n.class?n.class:this.statusesCabinet.find(function(n){return n.value===e.bookings[t].status}).value:n.class},getStatusLabel:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.getEventStatus(e);return"customer"===this.state.cabinetType?"canceled"===n.class?n.label:this.statusesCabinet.find(function(n){return n.value===e.bookings[t].status}).label:n.label},getBookingOpens:function(e){var t=e.bookingOpens?e.bookingOpens:e.created;return this.getFrontedFormattedDateFromDateTimeString(t)+" @ "+this.getFrontedFormattedTimeFromDateTimeString(t)},getBookingCloses:function(e){var t=e.bookingCloses?e.bookingCloses:e.periods[0].periodStart;return this.getFrontedFormattedDateFromDateTimeString(t)+" @ "+this.getFrontedFormattedTimeFromDateTimeString(t)},getPeriodTime:function(e){return this.getFrontedFormattedDateTime(e.periodStart)+" - "+this.getFrontedFormattedTimeFromDateTimeString(e.periodEnd)},getZoomLink:function(e){return"customer"===this.state.cabinetType?e.zoomMeeting.joinUrl:e.zoomMeeting.startUrl},getZoomLabel:function(){return"customer"===this.state.cabinetType?this.$root.labels.zoom_join:this.$root.labels.zoom_start},editEvent:function(e){this.$store.commit("cabinet/setTimeZone",this.state.timeZone),this.$store.commit("cabinet/setEditedEventId",e.id),this.$store.commit("cabinet/setDisplayProperty",{property:"dialogEvent",value:!0})},editAttendees:function(e){this.$store.commit("cabinet/setEditedEventId",e.id),this.$store.commit("cabinet/setDisplayProperty",{property:"dialogAttendees",value:!0})},showCustomField:function(e){return Array.isArray(e)?e.length>0:!!e}}}},1583:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"am-cabinet-dashboard-events"},[n("el-row",{staticClass:"am-cabinet-filter"},[n("el-col",{attrs:{lg:"provider"===e.state.cabinetType&&e.$root.settings.roles.allowWriteEvents?e.$root.licence.isLite||e.$root.licence.isStarter?14:19:24,md:"provider"===e.state.cabinetType&&e.$root.settings.roles.allowWriteEvents?e.$root.licence.isLite||e.$root.licence.isStarter?14:18:24,sm:24,xs:24}},[n("div",{staticClass:"am-filter-fields"},[n("el-row",{attrs:{gutter:16}},[n("el-col",{staticClass:"v-calendar-column",attrs:{span:e.$root.licence.isLite||e.$root.licence.isStarter?24:16}},[n("v-date-picker",{attrs:{value:e.state.params.dates,mode:"range","input-class":"el-input__inner","popover-visibility":"focus","popover-direction":"bottom","popover-align":e.screenWidth<768?"center":"left","is-required":!0,"is-expanded":!1,"is-double-paned":!1,"show-day-popover":!1,"tint-color":e.$root.settings.customization.primaryColor,"input-props":{class:"el-input__inner",readOnly:"readonly"},formats:e.vCalendarFormats},on:{input:e.changeRange}})],1),e._v(" "),e.$root.licence.isLite||e.$root.licence.isStarter?e._e():n("el-col",{attrs:{span:8}},[n("div",{staticClass:"am-cabinet-timezone"},[n("el-select",{attrs:{filterable:"",clearable:"","popper-class":"am-cabinet-timezone-dropdown",placeholder:e.getCurrentTimeZone()},on:{change:e.changedTimeZone},model:{value:e.timeZoneSelected,callback:function(t){e.timeZoneSelected=t},expression:"timeZoneSelected"}},[n("template",{slot:"prefix"},[n("img",{attrs:{src:e.$root.getUrl+"public/img/am-globe.svg"}})]),e._v(" "),e._l(e.timeZones,function(e,t){return n("el-option",{key:t,attrs:{label:e,value:e}})})],2)],1)])],1)],1)]),e._v(" "),"provider"===e.state.cabinetType&&e.$root.settings.roles.allowWriteEvents?n("el-col",{attrs:{lg:e.$root.licence.isLite||e.$root.licence.isStarter?10:5,md:e.$root.licence.isLite||e.$root.licence.isStarter?10:6,sm:24,xs:24}},[n("el-button",{staticClass:"am-add-new-button am-m-0 am-w-100",attrs:{type:"primary",disabled:!e.options.fetched},on:{click:function(t){return e.$store.commit("cabinet/setDisplayProperty",{property:"dialogEvent",value:!0})}}},[n("i",{staticClass:"el-icon-plus"}),e._v(" "),n("span",[e._v(e._s(e.$root.labels.new_event))])])],1):e._e()],1),e._v(" "),e.options.fetched&&e.state.fetchedEvents&&0===Object.keys(e.events).length?n("div",{staticClass:"am-empty-state"},[n("img",{attrs:{src:e.$root.getUrl+"public/img/emptystate.svg",alt:""}}),e._v(" "),n("div",[n("p",[e._v(e._s(e.$root.labels.no_results))])])]):e._e(),e._v(" "),e.options.fetched&&e.state.fetchedEvents&&Object.keys(e.events).length>0?n("div",{staticClass:"am-cabinet-list-head"},[n("el-row",[n("el-col",{attrs:{lg:16}},[n("el-row",{staticClass:"am-cabinet-flex-row-middle-align"},[n("el-col",{attrs:{lg:6}}),e._v(" "),n("el-col",{attrs:{lg:11}},[n("p",[e._v(e._s(e.$root.labels.name)+":")])]),e._v(" "),n("el-col",{attrs:{lg:7}},[n("p",[e._v(e._s(e.$root.labels.status)+":")])])],1)],1),e._v(" "),n("el-col",{attrs:{lg:8}},[n("el-row",{staticClass:"am-cabinet-flex-row-middle-align"},[n("el-col",{attrs:{lg:8}},[n("p",[e._v(e._s(e.$root.labels.periods)+":")])])],1)],1)],1)],1):e._e(),e._v(" "),e.options.fetched&&e.state.fetchedEvents&&Object.keys(e.events).length>0?n("div",{staticClass:"am-cabinet-list"},e._l(e.events,function(t,i){return n("div",{staticClass:"am-cabinet"},[n("div",{staticClass:"am-cabinet-list-day-title"},[n("el-row",[n("el-col",{attrs:{span:24}},[n("h4",[e._v("\n "+e._s(e.handleDateFormat(i))+"\n ")])])],1)],1),e._v(" "),n("el-collapse",e._l(t.events,function(t,i){return n("el-collapse-item",{key:i,attrs:{name:i}},[n("template",{slot:"title"},[n("el-row",{staticClass:"am-cabinet-row"},[n("el-col",{attrs:{lg:16}},[n("el-row",{staticClass:"am-cabinet-flex-row-middle-align"},[n("el-col",{staticClass:"am-cabinet-limited-col",attrs:{lg:6,sm:8}},[n("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.time))]),e._v(" "),n("h4",{attrs:{title:e.getDate(t)}},[e._v("\n "+e._s(e.getDate(t))+"\n ")])]),e._v(" "),n("el-col",{staticClass:"am-cabinet-limited-col",attrs:{lg:11,sm:8}},[n("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.name))]),e._v(" "),n("h4",{attrs:{title:t.name}},[e._v("\n "+e._s(t.name)+"\n ")])]),e._v(" "),n("el-col",{attrs:{lg:7,sm:8}},[n("p",{staticClass:"am-col-title"},[e._v("\n "+e._s(e.$root.labels.status)+"\n ")]),e._v(" "),n("div",{class:"am-status "+("provider"===e.state.cabinetType?"am-status-provider":"")},[n("span",{class:"am-appointment-status-symbol am-relative am-appointment-status-symbol-"+e.getStatus(t,0)}),e._v(" "),n("h4",{staticClass:"am-pl-8"},[e._v("\n "+e._s(e.getStatusLabel(t,0))+"\n ")]),e._v(" "),"provider"===e.state.cabinetType&&"full"===t.status&&e.isWaitingList(t)?n("h4",{staticClass:"am-pl-8"},[e._v("\n "+e._s(e.$root.labels.waiting_list)+"\n ")]):e._e()])])],1)],1),e._v(" "),n("el-col",{attrs:{lg:8}},[n("el-row",{staticClass:"am-cabinet-flex-row-middle-align am-pb-0"},[n("el-col",{attrs:{lg:8,sm:8}},[n("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.periods))]),e._v(" "),n("h4",[e._v(e._s(e.getExplodedPeriods(t.periods).length))])]),e._v(" "),n("el-col",{attrs:{lg:0,sm:8}},[n("p",{staticClass:"am-col-title"},[e._v("\n "+e._s("customer"===e.state.cabinetType?e.$root.labels.price:e.$root.labels.price_per_spot)+"\n ")]),e._v(" "),n("h4",[e._v("\n "+e._s(e.getPrice(t,0))+"\n ")])]),e._v(" "),n("el-col",{staticClass:"am-cabinet-buttons-align-all",attrs:{lg:"customer"===e.state.cabinetType?16:15,sm:8}},["provider"===e.state.cabinetType?n("el-button",{staticClass:"am-m-0 am-mr-8",attrs:{icon:"el-icon-user",size:"mini"},on:{click:[function(n){return e.editAttendees(t)},function(e){e.stopPropagation()}]}}):e._e(),e._v(" "),"provider"===e.state.cabinetType&&e.$root.settings.roles.allowWriteEvents?n("el-button",{staticClass:"am-m-0 am-mr-8",attrs:{icon:"el-icon-edit",size:"mini"},on:{click:[function(n){return e.editEvent(t)},function(e){e.stopPropagation()}]}}):e._e(),e._v(" "),"customer"!==e.state.cabinetType||"approved"!==t.bookings[0].status&&"pending"!==t.bookings[0].status||!e.isBookingCancelable(t,0)?e._e():n("el-dropdown",{attrs:{trigger:"click"},on:{command:function(n){return e.handleEvent(n,t,0)}}},[n("el-button",{staticClass:"am-m-0 am-mr-8",attrs:{icon:"el-icon-edit",size:"mini"},on:{click:function(e){e.stopPropagation()}}}),e._v(" "),n("el-dropdown-menu",{staticClass:"am-cabinet-dropdown-menu",attrs:{slot:"dropdown"},slot:"dropdown"},["customer"===e.state.cabinetType?n("el-dropdown-item",{attrs:{command:"cancel",disabled:!e.isBookingCancelable(t,0)}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]):e._e()],1)],1),e._v(" "),"customer"===e.state.cabinetType&&e.paymentFromCustomerPanel(t,t.settings)?n("div",{staticStyle:{"justify-content":"center"}},[e.isPayable(t)?n("div",[e.paymentMethods(t.settings).length>1?n("el-dropdown",{on:{command:function(n){return e.getPaymentLink(n,t)}}},[n("el-button",{staticStyle:{"padding-right":"8px"},attrs:{type:"primary",size:"mini",loading:e.payBtnLoader===t.bookings[0].id},on:{click:function(e){e.stopPropagation()}}},[e._v("\n "+e._s(e.$root.labels.pay)+" "),n("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),n("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.paymentMethods(t.settings),function(t){return n("el-dropdown-item",{key:t.value,attrs:{command:t.value}},[e._v("\n "+e._s(t.label)+"\n ")])}),1)],1):e._e(),e._v(" "),1===e.paymentMethods(t.settings).length?n("el-button",{staticClass:"am-m-0 am-mr-8",attrs:{type:"primary",size:"mini",loading:e.payBtnLoader===t.bookings[0].id},on:{click:[function(n){e.getPaymentLink(e.paymentMethods(t.settings)[0].value,t)},function(e){e.stopPropagation()}]}},[e._v("\n "+e._s(e.$root.labels.pay_now)+"\n ")]):e._e()],1):n("div",[n("el-button",{staticClass:"am-m-0 am-mr-8",staticStyle:{opacity:"0.5"},attrs:{disabled:!0,type:"primary",size:"mini"}},[e._v("\n "+e._s(e.getPaymentsStatus(t))+"\n\n ")])],1)]):e._e()],1)],1)],1)],1)],1),e._v(" "),n("div",{staticClass:"am-cabinet-collapsed-content"},[n("el-row",[n("el-row",{staticClass:"am-has-divider"},[n("el-row",{staticClass:"am-hide-less-than-desktop"},[n("p",{staticClass:"am-data"},[e._v("\n "+e._s("customer"===e.state.cabinetType?e.$root.labels.price:e.$root.labels.price_per_spot)+":\n ")]),e._v(" "),n("p",{staticClass:"am-value"},[e._v("\n "+e._s(e.getPrice(t,0))+"\n ")])]),e._v(" "),e.getEventLocation(t)?n("el-row",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.location)+":\n ")]),e._v(" "),n("p",{staticClass:"am-value"},[e._v("\n "+e._s(e.getEventLocation(t))+"\n ")])]):e._e(),e._v(" "),"provider"===e.state.cabinetType?n("el-row",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.spots)+":\n ")]),e._v(" "),n("p",{staticClass:"am-value"},[e._v("\n "+e._s(e.getSpots(t))+"\n ")])]):e._e(),e._v(" "),"provider"===e.state.cabinetType?n("el-row",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.recurring)+":\n ")]),e._v(" "),t.recurring?n("p",{staticClass:"am-recurring-label am-value"},[e._v("\n "+e._s(e.$root.labels.yes)+"\n ")]):n("p",{staticClass:"am-value"},[e._v(e._s(e.$root.labels.no))])]):e._e(),e._v(" "),"provider"===e.state.cabinetType?n("el-row",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.booking_opens)+":\n ")]),e._v(" "),n("p",{staticClass:"am-value",class:{"am-text-green":t.opened&&"approved"===t.status}},[e._v("\n "+e._s(e.getBookingOpens(t))+"\n ")])]):e._e(),e._v(" "),"provider"===e.state.cabinetType?n("el-row",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.booking_closes)+":\n ")]),e._v(" "),n("p",{staticClass:"am-value",class:{"am-text-red":t.closed&&"approved"===t.status}},[e._v("\n "+e._s(e.getBookingCloses(t))+"\n ")])]):e._e()],1),e._v(" "),t.zoomUserId?n("el-row",{staticClass:"am-has-divider"},[n("div",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.zoom_links)+":\n ")]),e._v(" "),e._l(e.getExplodedPeriods(t.periods),function(t){return n("div",[t.zoomMeeting?n("p",{staticClass:"am-value"},[e._v("\n "+e._s(e.getPeriodTime(t))+" -\n ")]):e._e(),e._v(" "),t.zoomMeeting?n("a",{staticClass:"am-value-link",attrs:{href:e.getZoomLink(t),target:"_blank"}},[e._v("\n "+e._s(e.getZoomLabel())+"\n ")]):e._e()])})],2)]):e._e(),e._v(" "),t.organizerId?n("el-row",{staticClass:"am-has-divider"},[n("div",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.google_meet_link)+":\n ")]),e._v(" "),e._l(e.getExplodedPeriods(t.periods),function(i){return n("div",[t.periods[0].googleMeetUrl?n("p",{staticClass:"am-value"},[e._v("\n "+e._s(e.getPeriodTime(i))+" -\n ")]):e._e(),e._v(" "),t.periods[0].googleMeetUrl?n("a",{staticClass:"am-value-link",attrs:{href:t.periods[0].googleMeetUrl,target:"_blank"}},[e._v("\n "+e._s(e.$root.labels.google_meet_join)+"\n ")]):e._e()])})],2)]):e._e(),e._v(" "),t.organizerId?n("el-row",{staticClass:"am-has-divider"},[n("div",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.microsoft_teams_link)+":\n ")]),e._v(" "),e._l(e.getExplodedPeriods(t.periods),function(i){return n("div",[t.periods[0].microsoftTeamsUrl?n("p",{staticClass:"am-value"},[e._v("\n "+e._s(e.getPeriodTime(i))+" -\n ")]):e._e(),e._v(" "),t.periods[0].microsoftTeamsUrl?n("a",{staticClass:"am-value-link",attrs:{href:t.periods[0].microsoftTeamsUrl,target:"_blank"}},[e._v("\n "+e._s(e.$root.labels.microsoft_teams_join)+"\n ")]):e._e()])})],2)]):e._e(),e._v(" "),e.isLSenabled(t)?n("el-row",{staticClass:"am-has-divider"},[n("div",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.lesson_space_links)+":\n ")]),e._v(" "),e._l(e.getExplodedPeriods(t.periods),function(t){return n("div",[t.lessonSpace?n("p",{staticClass:"am-value"},[e._v("\n "+e._s(e.getPeriodTime(t))+" -\n ")]):e._e(),e._v(" "),t.lessonSpace?n("a",{staticClass:"am-value-link",attrs:{href:t.lessonSpace,target:"_blank"}},[e._v("\n "+e._s(e.$root.labels.lesson_space_join)+"\n ")]):e._e()])})],2)]):e._e(),e._v(" "),n("el-row",{staticClass:"am-has-divider"},[n("div",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.periods)+":\n ")]),e._v(" "),e._l(e.getExplodedPeriods(t.periods),function(t){return n("div",[n("p",{staticClass:"am-value"},[e._v("\n "+e._s(e.getPeriodTime(t))+"\n ")])])})],2)]),e._v(" "),"provider"===e.state.cabinetType&&t.bookings.length>0?n("el-row",{staticClass:"am-has-divider"},[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.attendees)+":\n ")]),e._v(" "),e._l(t.bookings,function(i,o){return n("el-row",{key:o},[n("h4",{staticClass:"am-customer-name"},[e._v("\n "+e._s(i.customer.firstName+" "+i.customer.lastName)+"\n ")]),e._v(" "),i.customer.email?n("div",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.email)+":\n ")]),e._v(" "),n("a",{staticClass:"am-value am-customer-link",attrs:{href:"mailto:"+i.customer.email}},[e._v("\n "+e._s(i.customer.email)+"\n ")])]):e._e(),e._v(" "),i.customer.phone?n("div",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(e.$root.labels.phone)+":\n ")]),e._v(" "),n("a",{staticClass:"am-value am-customer-link",attrs:{href:"tel:"+i.customer.phone}},[e._v("\n "+e._s(i.customer.phone)+"\n ")])]):e._e(),e._v(" "),e._l(JSON.parse(t.bookings[o].customFields),function(i,a){return n("div",[i&&e.showCustomField(i.value)?n("div",[n("p",{staticClass:"am-data"},[e._v("\n "+e._s(i?e.getCustomFieldLabel(i,a):"")+":\n ")]),e._v(" "),"file"!==i.type&&"address"!==i.type?n("p",{staticClass:"am-value"},[e._v("\n "+e._s(i?e.getCustomFieldValue(i.value,i.type):"")+"\n ")]):e._e(),e._v(" "),"address"===i.type?n("p",{staticClass:"am-value"},[n("a",{staticClass:"am-link",attrs:{href:"https://maps.google.com/?q="+i.value,target:"_blank"}},[e._v(e._s(i.value))])]):n("p",{staticClass:"am-value"},e._l(i.value,function(i,s){return n("a",{staticClass:"am-value",attrs:{href:e.getCustomFieldFileURL(a,t.bookings[o].id,s),target:"_blank"}},[e._v("\n "+e._s(i.name)+"\n ")])}),0)]):e._e()])})],2)})],2):e._e()],1)],1)],2)}),1)],1)}),0):e._e()],1)},staticRenderFns:[]}},1584:function(e,t,n){var i=n(90)(n(1585),n(1587),!1,null,null,null);e.exports=i.exports},1585:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(654),o=n(668),a=n(1586),s=n.n(a),r=n(633),l=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.default={name:"CabinetDashboardHeader",props:{cabinetType:{type:String,default:"customer"}},created:function(){},data:function(){return{}},mixins:[i.a,o.a],components:{InlineSvg:s.a},computed:l({},Object(r.b)({state:function(e){return e.cabinet}})),methods:{getDropdownTriggerElementLabel:function(){return this.state.clonedProfile.email?this.state.clonedProfile.email:this.state.clonedProfile.firstName+" "+this.state.clonedProfile.lastName},handleCommand:function(e){"profile"!==e?(this.$store.commit("cabinet/setFetchedEvents",!1),this.$store.commit("cabinet/setFetchedAppointments",!1),this.$store.commit("cabinet/setFetchedPackageAppointments",!1),this.$store.dispatch("cabinet/logout",this.$root.settings),this.$http.post(this.$root.getAjaxUrl+"/users/logout",{},{}),"ameliaUserLoggedOut"in window&&window.ameliaUserLoggedOut()):this.$store.commit("cabinet/setActiveTab","profile")},getPictureSrc:function(){return this.state.profile.pictureThumbPath?this.state.profile.pictureThumbPath:this.$root.getUrl+"public/img/default-employee.svg"}}}},1586:function(e,t,n){(function(e){"use strict";var t={};var n={inheritAttrs:!1,render:function(e){return this.isLoaded?e("svg",{on:this.$listeners,attrs:Object.assign(this.svgAttrs,(t=this.$attrs,Object.keys(t).reduce(function(e,n){return!1!==t[n]&&null!==t[n]&&void 0!==t[n]&&(e[n]=t[n]),e},{}))),domProps:{innerHTML:this.svgContent}}):null;var t},props:{src:{type:String,required:!0},transformSource:{type:Function,default:function(e){return e}}},data:function(){return{isLoaded:!1,svgAttrs:{},svgContent:""}},watch:{src:function(e){this.inline(e)}},mounted:function(){this.inline(this.src)},methods:{inline:function(e){var n=this;t[e]||(this.isLoaded&&(this.isLoaded=!1,this.$emit("unloaded")),t[e]=this.download(e)),t[e].then(function(e){n.svgAttrs={};for(var t=e.attributes,i=t.length-1;i>=0;i--)n.svgAttrs[t[i].name]=t[i].value;n.svgContent=e.innerHTML,n.isLoaded=!0,n.$nextTick(function(){n.$emit("loaded",n.$el)})}).catch(function(i){delete t[e],n.$emit("error",i)})},download:function(e){var t=this;return new Promise(function(n,i){var o=new XMLHttpRequest;o.open("GET",e,!0),o.onload=function(){if(o.status>=200&&o.status<400)try{var e=(new DOMParser).parseFromString(o.responseText,"text/xml").getElementsByTagName("svg")[0];e?(e=t.transformSource(e),n(e)):i(new Error('Loaded file is not valid SVG"'))}catch(e){i(e)}else i(new Error("Error loading SVG"))},o.onerror=i,o.send()})}}},i={install:function(e){e.component("inline-svg",n)}};e.InlineSvgComponent=n,e.InlineSvgPlugin=i,e.default=n,Object.defineProperty(e,"__esModule",{value:!0})})(t)},1587:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"am-cabinet-dashboard-header"},[n("div",{staticClass:"am-cabinet-dashboard-user-data"},[n("div",{staticClass:"am-cabinet-user-initials"},[n("img",{attrs:{src:e.getPictureSrc(),alt:""}})]),e._v(" "),n("div",{staticClass:"am-cabinet-user"},[n("el-dropdown",{staticClass:"am-cabinet-user-email",attrs:{trigger:"click"},on:{command:e.handleCommand}},[n("span",{staticClass:"el-dropdown-link"},[e._v("\n "+e._s(e.getDropdownTriggerElementLabel())),n("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),n("el-dropdown-menu",{staticClass:"am-cabinet-profile-dropdown",attrs:{slot:"dropdown"},slot:"dropdown"},[n("div",{staticClass:"am-cabinet-profile-dropdown__info"},[n("span",{staticClass:"am-cabinet-profile-dropdown__name"},[e._v("\n "+e._s(e.state.clonedProfile.firstName+" "+e.state.clonedProfile.lastName)+"\n ")]),e._v(" "),n("span",{staticClass:"am-cabinet-profile-dropdown__email"},[e._v("\n "+e._s(e.state.clonedProfile.email?e.state.clonedProfile.email:"")+"\n ")])]),e._v(" "),"customer"===e.cabinetType||e.isPanelActive("profile")?n("el-dropdown-item",{attrs:{command:"profile"}},[n("inline-svg",{attrs:{src:e.$root.getUrl+"public/img/cabinet-profile.svg",width:"30",height:"30"}}),e._v("\n "+e._s(e.$root.labels.my_profile)+"\n ")],1):e._e(),e._v(" "),n("el-dropdown-item",{attrs:{command:"logout"}},[n("inline-svg",{attrs:{src:e.$root.getUrl+"public/img/cabinet-logout.svg",width:"30",height:"30"}}),e._v("\n "+e._s(e.$root.labels.logout)+"\n ")],1)],1)],1)],1)])])},staticRenderFns:[]}},1588:function(e,t,n){var i=n(90)(n(1589),n(1596),!1,null,null,null);e.exports=i.exports},1589:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(814),o=n.n(i),a=n(979),s=n.n(a),r=n(1590),l=n.n(r),c=n(668),u=n(336),d=n(928),p=n.n(d),m=n(877),f=n(672),h=n(655),g=n(0),v=n.n(g),b=n(658),y=n(984),_=n.n(y),k=n(334),C=n.n(k),w=n(929),x=n.n(w),S=n(705),P=n(633),T=n(1593),$=n.n(T),E=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};function D(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){return function i(o,a){try{var s=t[o](a),r=s.value}catch(e){return void n(e)}if(!s.done)return Promise.resolve(r).then(function(e){i("next",e)},function(e){i("throw",e)});e(r)}("next")})}}t.default={name:"CabinetDashboardProfile",components:{CabinetDashboardProfileAppleCalendar:$.a,AssignedServices:s.a,CabinetDashboardProfileDetails:l.a,DaysOff:p.a,SpecialDays:_.a,WorkingHours:x.a},props:{options:{type:Object,default:function(){}},stripeLoading:{type:Boolean,default:function(){return!1}}},mixins:[c.a,u.a,m.a,f.a,b.a,b.a,h.a,S.a],data:function(){return{timeZone:null,showWarning:!0,activeTab:"details",editCategorizedServiceList:null,editWeekDayList:[],editSpecialDayList:[],dayOffList:[],googleCalendar:"",outlookCalendar:"",datePickerVisible:!1,appleCalendarList:[]}},created:function(){"provider"===this.state.cabinetType?(this.editCategorizedServiceList=JSON.parse(JSON.stringify(this.state.editCategorizedServiceList)),this.editWeekDayList=JSON.parse(JSON.stringify(this.state.editWeekDayList)),this.editSpecialDayList=JSON.parse(JSON.stringify(this.state.profile.specialDayList)),this.dayOffList=JSON.parse(JSON.stringify(this.state.profile.dayOffList)),this.state.profile.googleCalendar&&(this.googleCalendar=this.state.profile.googleCalendar.calendarId),this.state.profile.outlookCalendar&&(this.outlookCalendar=this.state.profile.outlookCalendar.calendarId)):window.addEventListener("resize",this.handleResize)},mounted:function(){"provider"===this.state.cabinetType?this.timeZone=this.state.profile.timeZone:"details"===this.activeTab&&this.handleResize()},computed:E({},Object(P.b)({state:function(e){return e.cabinet}})),methods:{setTimeZone:function(){this.$store.commit("cabinet/setProfileProperty",{property:"timeZone",value:this.timeZone}),this.$store.commit("cabinet/setTimeZone",this.timeZone),this.$emit("changedTimeZone")},saveProfile:function(){var e=D(o.a.mark(function e(){var t,n,i,a=this;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.$store.commit("cabinet/setSubmitButtonSpinner",!0),e.prev=1,e.next=4,this.$refs.details.$refs.profile.validate();case 4:return t=this.state.profile.birthday?v()(this.state.profile.birthday).format("YYYY-MM-DD"):null,"provider"===this.state.cabinetType&&(this.$store.commit("cabinet/setProfileProperty",{property:"serviceList",value:JSON.parse(JSON.stringify(this.getParsedServiceList(this.editCategorizedServiceList)))}),this.$store.commit("cabinet/setProfileProperty",{property:"weekDayList",value:this.getParsedWeekDayList(this.editWeekDayList)}),this.$store.commit("cabinet/setProfileProperty",{property:"specialDayList",value:this.editSpecialDayList})),n=JSON.parse(JSON.stringify(this.state.profile)),"provider"===this.state.cabinetType&&n.serviceList.forEach(function(e){e.customPricing=a.getJsonCustomPricing(e)}),e.next=10,this.$http.post(this.$root.getAjaxUrl+"/users/"+this.state.cabinetType+"s/"+this.state.profile.id,Object.assign(n,{birthday:t}),this.getAuthorizationHeaderObject());case 10:i=e.sent,this.$store.commit("cabinet/setClonedProfile",JSON.parse(JSON.stringify(this.state.profile))),"token"in i.data.data&&(C.a.set("ameliaToken",i.data.data.token,this.$root.settings.roles[this.state.settingsName].tokenValidTime,null,null,!0),C.a.set("ameliaUserEmail",i.data.data.user.email,this.$root.settings.roles[this.state.settingsName].tokenValidTime,null,null,!0),this.$store.commit("cabinet/setAmeliaToken",i.data.data.token)),"provider"===this.state.cabinetType&&this.updateStashEntities(this.getAuthorizationHeaderObject()),this.notify(this.$root.labels.success,this.$root.labels.profile_saved,"success"),this.$store.commit("cabinet/setSubmitButtonSpinner",!1),e.next=23;break;case 18:return e.prev=18,e.t0=e.catch(1),console.log(e.t0.message),this.$store.commit("cabinet/setSubmitButtonSpinner",!1),e.abrupt("return",!1);case 23:case"end":return e.stop()}},e,this,[[1,18]])}));return function(){return e.apply(this,arguments)}}(),changeDaysOff:function(e){var t=JSON.parse(JSON.stringify(e));this.$store.commit("cabinet/setProfileProperty",{property:"dayOffList",value:t})},changeSpecialDays:function(e,t){var n=JSON.parse(JSON.stringify(this.state.profile.specialDayList));null===t?n.push(e):n[t]=e,n.sort(function(e,t){return new Date(e.startDate)-new Date(t.startDate)}),this.editSpecialDayList=n,this.$store.commit("cabinet/setProfileProperty",{property:"specialDayList",value:n})},showChangePasswordForm:function(){this.$store.commit("cabinet/setDisplayProperty",{property:"cabinetDashboard",value:!1}),this.$store.commit("cabinet/setDisplayProperty",{property:"changePassword",value:!0})},handleResize:function(){this.datePickerVisible=this.$refs.details.$el.offsetWidth>480},getAppleCalendarList:function(){var e=D(o.a.mark(function e(){var t=this;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.appleLoading=!0,e.next=3,this.$http.get(this.$root.getAjaxUrl+"/apple/calendar-list/"+this.state.profile.id).then(function(e){t.appleCalendarList=e.data.data.calendarList,t.$emit("refreshAppleCalendarList"),t.appleCalendarList.find(function(e){return e.id===t.state.profile.appleCalendarId})||t.$store.commit("cabinet/setProfileProperty",{property:"appleCalendarId",value:null}),t.appleLoading=!1}).catch(function(e){t.notify(t.$root.labels.error,e.message,"error"),t.appleLoading=!1});case 3:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()}}},1590:function(e,t,n){var i=n(90)(n(1591),n(1592),!1,null,null,null);e.exports=i.exports},1591:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(814),o=n.n(i),a=n(982),s=n.n(a),r=n(668),l=n(336),c=n(877),u=n(658),d=n(654),p=n(671),m=n.n(p),f=n(987),h=n(988),g=n(633),v=n(733),b=n.n(v),y=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.default={name:"CabinetDashboardProfileDetails",mixins:[r.a,l.a,c.a,u.a,d.a,f.a,h.a],components:{CabinetDashboardStripe:s.a,PhoneInput:m.a,ContentBlock:b.a},props:{options:{type:Object,default:function(){}},stripeLoading:{type:Boolean,default:function(){return!1}},googleCalendar:"",outlookCalendar:"",appleCalendarList:{type:Array,default:function(){return[]}}},data:function(){return{hideDescription:!0,userObject:null,countryPhoneIsoValue:null,profileRules:{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"}],locationId:[{required:this.options.entities.locations.filter(function(e){return"visible"===e.status}).length>0,message:this.$root.labels.enter_location_warning,trigger:"blur"}],phone:[{required:!1,message:this.$root.labels.enter_phone_warning,trigger:"submit"}]},zoomUsers:[],responsiveGrid:{profileInfo:24,cabinetForm:24,cabinetFormInput:24},googleLoading:!1,googleAuthURL:"",googleCalendarId:"",outlookAuthURL:"",outlookLoading:!1,outlookCalendarId:"",appleLoading:!1}},computed:y({},Object(g.b)({state:function(e){return e.cabinet}}),{visibleLocations:function(){return this.options.entities.locations.filter(function(e){return"visible"===e.status})}}),methods:{removeBirthday:function(){this.$store.commit("cabinet/setProfileProperty",{property:"birthday",value:null})},setCalendar:function(){var e=JSON.parse(JSON.stringify(this.state.profile.googleCalendar));e.calendarId=this.googleCalendarId,this.$store.commit("cabinet/setProfileProperty",{property:"googleCalendar",value:e});var t=JSON.parse(JSON.stringify(this.state.profile.outlookCalendar));t.calendarId=this.outlookCalendarId,this.$store.commit("cabinet/setProfileProperty",{property:"outlookCalendar",value:t})},getGoogleAuthURL:function(e){var t=this;this.state.profile.id&&this.$root.settings.googleCalendar.enabled&&this.$http.post(this.$root.getAjaxUrl+"/google/authorization/url/"+this.state.profile.id,{redirectUri:window.location.href.split("?")[0]}).then(function(n){t.googleAuthURL=n.data.data.authUrl,t.googleAuthURL=t.googleAuthURL.replace(/redirect_uri=.+?&/,"redirect_uri="+window.location.href+"&"),t.googleLoading=!1,e&&t.inlineDialogEmployeeSVG()}).catch(function(e){t.notify(t.$root.labels.error,e.message,"error")})},disconnectFromGoogleAccount:function(){var e=this;this.googleLoading=!0,this.$http.post(this.$root.getAjaxUrl+"/google/disconnect/"+this.state.profile.id).then(function(){e.$store.commit("cabinet/setProfileProperty",{property:"googleCalendar",value:{calendarId:null,calendarList:[],token:null}}),e.getGoogleAuthURL(!0)}).catch(function(t){e.notify(e.$root.labels.error,t.message,"error")})},inlineDialogEmployeeSVG:function(){var e=this;setTimeout(function(){e.inlineSVG()},10)},getOutlookAuthURL:function(e){var t=this;this.state.profile.id&&this.$root.settings.outlookCalendar.enabled&&this.$http.get(this.$root.getAjaxUrl+"/outlook/authorization/url/"+this.state.profile.id).then(function(n){t.outlookAuthURL=n.data.data.authUrl,t.outlookAuthURL=t.outlookAuthURL.replace(/redirect_uri=.+?&/,"redirect_uri="+window.location.href+"&"),t.outlookLoading=!1,t.dialogLoading=!1,e&&t.inlineDialogEmployeeSVG()}).catch(function(e){t.notify(t.$root.labels.error,e.message,"error")})},getZoomUsers:function(){var e,t=(e=o.a.mark(function e(){var t;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.$http.get(this.$root.getAjaxUrl+"/zoom/users",Object.assign(this.getAuthorizationHeaderObject(),{params:{source:"cabinet-"+this.state.cabinetType}}));case 3:"data"in(t=e.sent).data&&"users"in t.data.data&&(this.zoomUsers=t.data.data.users),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),this.notify(this.$root.labels.error,e.t0.message,"error");case 10:case"end":return e.stop()}},e,this,[[0,7]])}),function(){var t=e.apply(this,arguments);return new Promise(function(e,n){return function i(o,a){try{var s=t[o](a),r=s.value}catch(e){return void n(e)}if(!s.done)return Promise.resolve(r).then(function(e){i("next",e)},function(e){i("throw",e)});e(r)}("next")})});return function(){return t.apply(this,arguments)}}(),disconnectFromAppleAccount:function(){var e=this;this.appleLoading=!0,this.$http.post(this.$root.getAjaxUrl+"/apple/disconnect/"+this.state.profile.id).then(function(){e.$store.commit("cabinet/setProfileProperty",{property:"appleCalendarId",value:null}),e.appleLoading=!1}).catch(function(t){e.notify(e.$root.labels.error,t.message,"error"),e.appleLoading=!1})},disconnectEmployeeFromAppleAccount:function(){var e=this;this.$http.post(this.$root.getAjaxUrl+"/apple/disconnect-employee/"+this.state.profile.id).then(function(){e.$set(e.state.profile,"appleCalendarId",null),e.$set(e.state.profile.employeeAppleCalendar,"employeeAppleCalendar",null),e.state.profile.employeeAppleCalendar={iCloudId:null,appSpecificPassword:null},e.$emit("refreshAppleCalendarList")}).catch(function(t){e.notify(e.$root.labels.error,t.message,"error")})},disconnectFromOutlookAccount:function(){var e=this;this.outlookLoading=!0,this.$http.post(this.$root.getAjaxUrl+"/outlook/disconnect/"+this.state.profile.id,null,this.getAuthorizationHeaderObject()).then(function(){e.$store.commit("cabinet/setProfileProperty",{property:"outlookCalendar",value:{calendarId:null,calendarList:[],token:null}}),e.getOutlookAuthURL(!0)}).catch(function(t){e.notify(e.$root.labels.error,t.message,"error")})},disconnectFromStripeAccount:function(){this.$store.commit("cabinet/setStripeProvider",null),this.state.stripeProvider=null},storePhone:function(e,t){this.$store.commit("cabinet/setProfileProperty",{property:"phone",value:e}),this.countryPhoneIsoValue=t,this.$store.commit("cabinet/setProfileProperty",{property:"countryPhoneIso",value:this.countryPhoneIsoValue})},getPictureSrc:function(){return this.state.profile.pictureThumbPath?this.state.profile.pictureThumbPath:this.$root.getUrl+"public/img/default-employee.svg"},handleResize:function(){var e=this.$refs.profile.$el,t=this.$refs.profileInfo?this.$refs.profileInfo.$el:null;e.offsetWidth<481?(this.responsiveGrid.profileInfo=24,this.responsiveGrid.cabinetForm=24,this.responsiveGrid.cabinetFormInput=24,t&&t.classList.add("mobile")):e.offsetWidth<640?(this.responsiveGrid.profileInfo=24,this.responsiveGrid.cabinetForm=24,this.responsiveGrid.cabinetFormInput=12,t&&t.classList.add("mobile")):(this.responsiveGrid.profileInfo=9,this.responsiveGrid.cabinetForm=24,this.responsiveGrid.cabinetFormInput=12,t&&(this.responsiveGrid.cabinetForm=15,t.classList.remove("mobile")))},connectPersonalAppleCalendar:function(){this.$emit("changeActiveTab"),this.$refs.appleCalendarSelect.blur()}},created:function(){var e=this;"provider"!==this.state.cabinetType||!this.$root.settings.zoom.enabled||this.$root.licence.isLite||this.$root.licence.isStarter||this.getZoomUsers(),"customer"===this.state.cabinetType&&(this.profileRules.phone[0]=y({},this.profileRules.phone[0],{required:this.$root.settings.general.requiredPhoneNumberField}),this.profileRules.email[0]=y({},this.profileRules.email[0],{required:!0})),"provider"!==this.state.cabinetType||this.state.profile.outlookCalendar.token||this.$root.licence.isLite||this.$root.licence.isStarter||this.getOutlookAuthURL(!1),this.outlookCalendarId=this.outlookCalendar,"provider"!==this.state.cabinetType||this.state.profile.googleCalendar.token||this.$root.licence.isLite||this.$root.licence.isStarter||this.getGoogleAuthURL(!1),"provider"!==this.state.cabinetType||!this.$root.settings.appleCalendar||this.$root.licence.isLite||this.$root.licence.isStarter||this.$emit("refreshAppleCalendarList"),this.googleCalendarId=this.googleCalendar,this.userObject=JSON.parse(JSON.stringify(this.state.profile)),setTimeout(function(){e.hideDescription=!1},500),window.addEventListener("resize",this.handleResize)},updated:function(){"provider"!==this.state.cabinetType||this.state.profile.googleCalendar.token||this.$root.licence.isLite||this.$root.licence.isStarter||this.getGoogleAuthURL(!1)},watch:{"userObject.description":function(){this.$store.commit("cabinet/setProfileProperty",{property:"description",value:this.userObject.description})}},mounted:function(){this.handleResize()}}},1592:function(e,t){e.exports={render:function(){var e=this,t=this,n=t.$createElement,i=t._self._c||n;return i("el-form",{ref:"profile",attrs:{"label-position":"top",rules:t.profileRules,model:t.state.profile}},[i("el-row",{staticClass:"am-cabinet-profile-details",attrs:{gutter:16}},["provider"===t.state.cabinetType?i("el-col",{ref:"profileInfo",staticClass:"am-cabinet-profile-details-info",attrs:{span:t.responsiveGrid.profileInfo}},[i("div",[i("div",{staticClass:"am-cabinet-details-picture"},[i("img",{attrs:{src:t.getPictureSrc(),alt:""}})]),t._v(" "),i("p",{staticClass:"am-cabinet-details-name"},[t._v("\n "+t._s(t.state.clonedProfile.firstName)+" "+t._s(t.state.clonedProfile.lastName)+"\n ")]),t._v(" "),i("div",{staticClass:"am-cabinet-details-activity"},[void 0!==t.state.profile.activity?i("span",{staticClass:"am-employee-status-label",class:t.state.profile.activity},[t._v("\n "+t._s(t.getEmployeeActivityLabel(t.state.profile.activity))+"\n ")]):t._e()])])]):t._e(),t._v(" "),i("el-col",{attrs:{span:t.responsiveGrid.cabinetForm}},[i("el-row",{attrs:{gutter:16}},[i("el-col",{attrs:{span:t.responsiveGrid.cabinetFormInput}},[i("el-form-item",{attrs:{label:t.$root.labels.first_name_colon,prop:"firstName"}},[i("el-input",{ref:"amProfileFirstName",attrs:{value:t.state.profile.firstName},on:{input:function(e){return t.$store.commit("cabinet/setProfileProperty",{property:"firstName",value:e})}}})],1)],1),t._v(" "),i("el-col",{attrs:{span:t.responsiveGrid.cabinetFormInput}},[i("el-form-item",{attrs:{label:t.$root.labels.last_name_colon,prop:"lastName"}},[i("el-input",{attrs:{value:t.state.profile.lastName},on:{input:function(e){return t.$store.commit("cabinet/setProfileProperty",{property:"lastName",value:e})}}})],1)],1),t._v(" "),i("el-col",{attrs:{span:t.responsiveGrid.cabinetFormInput}},[i("el-form-item",{attrs:{label:t.$root.labels.email_colon,prop:"email"}},[i("el-input",{attrs:{value:t.state.profile.email,type:"email"},on:{input:function(e){return t.$store.commit("cabinet/setProfileProperty",{property:"email",value:e})}}})],1)],1),t._v(" "),i("el-col",{attrs:{span:t.responsiveGrid.cabinetFormInput}},["provider"===t.state.cabinetType&&t.options.entities.locations.length?i("el-form-item",{attrs:{label:t.$root.labels.location_colon,prop:"locationId"}},[i("el-select",{attrs:{value:t.state.profile.locationId,"popper-class":"am-dropdown-cabinet",placeholder:""},on:{change:function(e){return t.$store.commit("cabinet/setProfileProperty",{property:"locationId",value:e})}}},t._l(t.visibleLocations,function(e){return i("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1):t._e()],1),t._v(" "),i("el-col",{attrs:{span:t.responsiveGrid.cabinetFormInput}},[i("el-form-item",{attrs:{label:t.$root.labels.phone_colon,prop:"phone"}},[i("phone-input",{attrs:{"dropdown-class":"am-dropdown-cabinet-phone",countryPhoneIso:t.state.profile.countryPhoneIso,"saved-phone":t.state.profile.phone},on:{phoneFormatted:function(t,n){return e.storePhone(t,n)}}})],1)],1),t._v(" "),"provider"!==t.state.cabinetType||t.$root.licence.isLite||t.$root.licence.isStarter?t._e():i("el-col",{attrs:{span:t.responsiveGrid.cabinetFormInput}},[t.$root.settings.zoom.enabled?i("el-row",[i("el-form-item",{attrs:{label:"placeholder"}},[i("template",{slot:"label"},[t._v("\n "+t._s(t.$root.labels.zoom_user)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.zoom_user_tooltip)},slot:"content"}),t._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),t._v(" "),i("el-select",{attrs:{clearable:"",value:t.state.profile.zoomUserId,placeholder:t.$root.labels.zoom_user_placeholder,"popper-class":"am-dropdown-cabinet"},on:{change:function(e){return t.$store.commit("cabinet/setProfileProperty",{property:"zoomUserId",value:e})}}},t._l(t.zoomUsers,function(e){return i("el-option",{key:e.id,attrs:{label:e.first_name+" "+e.last_name+" ("+e.email+")",value:e.id}})}),1)],2)],1):t._e()],1),t._v(" "),i("el-col",{staticClass:"am-cabinet-profile__stripe"},[i("cabinet-dashboard-stripe",{attrs:{stripeProvider:t.state.stripeProvider,authorizationObject:Object.assign(t.getAuthorizationHeaderObject(),{}),profile:t.state.profile},on:{stripeDisconnect:function(e){return t.disconnectFromStripeAccount()}}})],1),t._v(" "),!t.$root.settings.outlookCalendar.enabled||"provider"!==t.state.cabinetType||t.$root.licence.isLite||t.$root.licence.isStarter?t._e():i("div",{staticClass:"am-cabinet-profile__outlook"},[i("el-col",{attrs:{span:t.responsiveGrid.cabinetFormInput}},[i("el-form-item",{attrs:{label:"placeholder"}},[i("template",{staticClass:"el-form-item__label",slot:"label"},[t._v("\n "+t._s(t.$root.labels.outlook_calendar)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.outlook_calendar_tooltip)},slot:"content"}),t._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),t._v(" "),i("el-select",{attrs:{clearable:"",value:t.state.profile.outlookCalendar.calendarId,placeholder:"","popper-class":"am-dropdown-cabinet",disabled:!t.state.profile.outlookCalendar.token||t.outlookLoading},on:{change:t.setCalendar},model:{value:t.outlookCalendarId,callback:function(e){t.outlookCalendarId=e},expression:"outlookCalendarId"}},t._l(t.state.profile.outlookCalendar.calendarList,function(e){return i("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],2)],1),t._v(" "),i("el-col",{attrs:{span:t.responsiveGrid.cabinetFormInput}},[i("el-row",[i("el-form-item",{attrs:{label:""}},[24!==t.responsiveGrid.cabinetFormInput?i("label",{staticClass:"el-form-item__label",attrs:{slot:"label"},slot:"label"},[i("span")]):t._e(),t._v(" "),i("el-button",{staticClass:"am-outlook-calendar-button",class:{connected:t.state.profile.outlookCalendar.token},staticStyle:{margin:"0"},attrs:{type:"primary"},on:{click:function(e){t.state.profile.outlookCalendar.token?t.disconnectFromOutlookAccount():t.redirectToOutlookAuthPage()}}},[i("div",{staticClass:"am-outlook-calendar-button-image"},[i("img",{attrs:{src:t.$root.getUrl+"public/img/outlook-calendar.png"}})]),t._v(" "),i("span",{staticClass:"am-outlook-calendar-button-text"},[t._v("\n "+t._s(t.state.profile.outlookCalendar.token?t.$root.labels.outlook_sign_out:t.$root.labels.outlook_sign_in)+"\n ")])])],1)],1)],1)],1),t._v(" "),!t.$root.settings.googleCalendar.enabled||"provider"!==t.state.cabinetType||t.$root.licence.isLite||t.$root.licence.isStarter?t._e():i("el-col",{staticClass:"am-cabinet-profile__zoom",attrs:{span:t.responsiveGrid.cabinetFormInput}},[i("el-form-item",{attrs:{label:"placeholder"}},[i("template",{staticClass:"el-form-item__label",slot:"label"},[t._v("\n "+t._s(t.$root.labels.google_calendar)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.google_calendar_tooltip)},slot:"content"}),t._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),t._v(" "),i("el-select",{attrs:{clearable:"",value:t.state.profile.googleCalendar.calendarId,placeholder:"","popper-class":"am-dropdown-cabinet",disabled:!t.state.profile.googleCalendar.token||t.googleLoading},on:{change:t.setCalendar},model:{value:t.googleCalendarId,callback:function(e){t.googleCalendarId=e},expression:"googleCalendarId"}},t._l(t.state.profile.googleCalendar.calendarList,function(e){return i("el-option",{key:e.id,attrs:{label:e.summary,value:e.id}})}),1)],2)],1),t._v(" "),!t.$root.settings.googleCalendar.enabled||"provider"!==t.state.cabinetType||t.$root.licence.isLite||t.$root.licence.isStarter?t._e():i("el-col",{attrs:{span:t.responsiveGrid.cabinetFormInput}},[i("el-form-item",[12===t.responsiveGrid.cabinetFormInput?i("label",{attrs:{slot:"label"},slot:"label"}):t._e(),t._v(" "),i("el-button",{staticClass:"am-google-calendar-button",class:{connected:t.state.profile.googleCalendar.token},attrs:{type:"primary"},on:{click:function(e){t.state.profile.googleCalendar.token?t.disconnectFromGoogleAccount():t.redirectToGoogleAuthPage()}}},[i("div",{staticClass:"am-google-calendar-button-image"},[i("img",{attrs:{src:t.$root.getUrl+"public/img/google-button.svg"}})]),t._v(" "),i("span",{staticClass:"am-google-calendar-button-text",class:{connected:t.state.profile.googleCalendar.token}},[t._v("\n "+t._s(t.state.profile.googleCalendar.token?t.$root.labels.google_sign_out:t.$root.labels.google_sign_in)+"\n ")])])],1)],1),t._v(" "),!t.$root.settings.appleCalendar||"provider"!==t.state.cabinetType||t.$root.licence.isLite||t.$root.licence.isStarter?t._e():i("div",{staticClass:"am-cabinet-profile__outlook"},[i("el-col",{attrs:{span:t.responsiveGrid.cabinetFormInput}},[i("el-form-item",{attrs:{label:"placeholder"}},[i("template",{staticClass:"el-form-item__label",slot:"label"},[t._v("\n "+t._s(t.$root.labels.apple_calendar)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.apple_calendar_tooltip)},slot:"content"}),t._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),t._v(" "),t.state.profile.employeeAppleCalendar.iCloudId?i("el-alert",{staticStyle:{height:"40px"},attrs:{title:t.$root.labels.apple_calendar_overridden_by_employee,type:"warning",closable:!1,"show-icon":""}}):i("el-select",{ref:"appleCalendarSelect",attrs:{clearable:"",value:t.state.profile.appleCalendarId,placeholder:"",disabled:!t.$root.settings.appleCalendar},on:{change:function(e){return t.$store.commit("cabinet/setProfileProperty",{property:"appleCalendarId",value:e})}}},[i("div",{staticClass:"am-drop"},[i("div",{staticClass:"am-drop-create-item",on:{click:t.connectPersonalAppleCalendar}},[t._v("\n "+t._s(t.$root.labels.apple_connect_employee_calendar)+"\n ")]),t._v(" "),t._l(t.appleCalendarList,function(e){return i("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})],2)])],2)],1),t._v(" "),t.state.profile.appleCalendarId&&null===t.state.profile.employeeAppleCalendar.iCloudId?i("el-col",{attrs:{span:t.responsiveGrid.cabinetFormInput}},[i("el-row",[i("el-form-item",{attrs:{label:""}},[24!==t.responsiveGrid.cabinetFormInput?i("label",{staticClass:"el-form-item__label",attrs:{slot:"label"},slot:"label"},[i("span")]):t._e(),t._v(" "),i("el-button",{staticClass:"am-google-calendar-button",attrs:{type:"primary"},on:{click:function(e){return t.disconnectFromAppleAccount()}}},[i("div",{staticClass:"am-google-calendar-button-image"},[i("img",{attrs:{src:t.$root.getUrl+"public/img/apple-button.svg"}})]),t._v(" "),i("span",{staticClass:"am-google-calendar-button-text"},[t._v("\n "+t._s(t.$root.labels.apple_disconnect)+"\n ")])])],1)],1)],1):t._e(),t._v(" "),null!==t.state.profile.employeeAppleCalendar.iCloudId?i("el-col",{attrs:{span:t.responsiveGrid.cabinetFormInput}},[i("el-row",[i("el-form-item",{attrs:{label:""}},[24!==t.responsiveGrid.cabinetFormInput?i("label",{staticClass:"el-form-item__label",attrs:{slot:"label"},slot:"label"},[i("span")]):t._e(),t._v(" "),i("el-button",{staticClass:"am-google-calendar-button",attrs:{type:"primary"},on:{click:function(e){return t.disconnectEmployeeFromAppleAccount()}}},[i("div",{staticClass:"am-google-calendar-button-image"},[i("img",{attrs:{src:t.$root.getUrl+"public/img/apple-button.svg"}})]),t._v(" "),i("span",{staticClass:"am-google-calendar-button-text"},[t._v("\n "+t._s(t.$root.labels.apple_calendar_disconnect_employee)+"\n ")])])],1)],1)],1):t._e()],1),t._v(" "),"customer"===t.state.cabinetType?i("el-col",{staticClass:"v-calendar-column",attrs:{span:t.responsiveGrid.cabinetFormInput}},[i("el-form-item",{attrs:{label:t.$root.labels.date_of_birth}},[i("v-date-picker",{attrs:{value:t.state.profile.birthday,mode:"single","input-class":"el-input__inner","popover-visibility":"focus","popover-direction":"top","is-required":!0,"is-expanded":!1,"is-double-paned":!1,"show-day-popover":!1,"tint-color":t.$root.settings.customization.primaryColor,"input-props":{class:"el-input__inner",readOnly:"readonly"},formats:t.vCalendarFormats},on:{input:function(e){return t.$store.commit("cabinet/setProfileProperty",{property:"birthday",value:e})}}}),t._v(" "),t.state.profile.birthday?i("span",{staticClass:"am-v-date-picker-suffix el-input__suffix-inner",on:{click:t.removeBirthday}},[i("i",{staticClass:"el-select__caret el-input__icon el-icon-circle-close"})]):t._e()],1)],1):t._e()],1)],1)],1),t._v(" "),"provider"===t.state.cabinetType?i("el-row",{directives:[{name:"show",rawName:"v-show",value:!t.hideDescription,expression:"!hideDescription"}]},[i("el-col",[i("content-block",{ref:"employeeDescription",staticClass:"am-cabinet-profile-details-description",attrs:{label:t.$root.labels.description,entity:t.userObject,textProperty:"description",htmlProperty:"descriptionHtml",hasTranslation:!1,hasQuill:!0,textModeProp:!0,allowImage:!1}})],1)],1):t._e()],1)},staticRenderFns:[]}},1593:function(e,t,n){var i=n(90)(n(1594),n(1595),!1,null,null,null);e.exports=i.exports},1594:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(668),o=n(877),a=n(658),s=n(633),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.default={name:"CabinetDashboardProfileAppleCalendar",mixins:[i.a,o.a,a.a],props:{options:{type:Object,default:function(){}},appleCalendarList:{type:Array,default:function(){return[]}}},data:function(){return{isEmployeeConnectedToPersonalAppleCalendar:!1,responsiveGrid:{profileInfo:24,cabinetForm:24,cabinetFormInput:24}}},computed:r({},Object(s.b)({state:function(e){return e.cabinet}})),created:function(){this.init(),window.addEventListener("resize",this.handleResize)},methods:{init:function(){this.isEmployeeConnectedToPersonalAppleCalendar=!0,this.state.profile.employeeAppleCalendar&&null!==this.state.profile.employeeAppleCalendar.iCloudId&&null!==this.state.profile.employeeAppleCalendar.appSpecificPassword||(this.isEmployeeConnectedToPersonalAppleCalendar=!1,this.state.profile.employeeAppleCalendar={iCloudId:null,appSpecificPassword:null})},connectEmployeeToAppleAccount:function(){var e=this;this.$http.post(this.$root.getAjaxUrl+"/apple/connect/"+this.state.profile.id,{employeeAppleCalendar:this.state.profile.employeeAppleCalendar}).then(function(t){e.isEmployeeConnectedToPersonalAppleCalendar=t.data.data.isEmployeeConnectedToPersonalAppleCalendar,e.$emit("refreshAppleCalendarList"),e.notify(e.$root.labels.success,t.data.message,"success")}).catch(function(t){t.response.data.message?e.notify(e.$root.labels.error,t.response.data.message,"error"):e.notify(e.$root.labels.error,t.message,"error")})},disconnectEmployeeFromAppleAccount:function(){var e=this;this.$http.post(this.$root.getAjaxUrl+"/apple/disconnect-employee/"+this.state.profile.id).then(function(t){e.$set(e.state.profile,"appleCalendarId",null),e.$set(e.state.profile.employeeAppleCalendar,"employeeAppleCalendar",null),e.state.profile.employeeAppleCalendar={iCloudId:null,appSpecificPassword:null},e.isEmployeeConnectedToPersonalAppleCalendar=t.data.data.isEmployeeConnectedToPersonalAppleCalendar,e.notify(e.$root.labels.success,t.data.message,"success")}).catch(function(t){e.notify(e.$root.labels.error,t.message,"error")})},handleResize:function(){var e=this.$refs.profile.$el;e.offsetWidth<481?(this.responsiveGrid.cabinetForm=24,this.responsiveGrid.cabinetFormInput=24):(e.offsetWidth,this.responsiveGrid.cabinetForm=24,this.responsiveGrid.cabinetFormInput=12)}},mounted:function(){this.handleResize()}}},1595:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-form",{ref:"profile",attrs:{"label-position":"top",model:e.state.profile}},[n("el-row",{staticClass:"am-cabinet-profile-details",attrs:{gutter:16}},[n("el-form-item",[n("label",{staticStyle:{padding:"0 8px"},attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.apple_calendar)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.apple_calendar_employee_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)]),e._v(" "),n("el-col",{attrs:{span:e.responsiveGrid.cabinetForm}},[n("el-row",{attrs:{gutter:16}},[n("el-col",{attrs:{span:e.responsiveGrid.cabinetFormInput}},[n("el-form-item",{attrs:{label:e.$root.labels.iCloud_id,prop:"iCloudId"}},[n("el-input",{attrs:{"auto-complete":"off",placeholder:e.$root.labels.enter_employee_icloud_id},model:{value:e.state.profile.employeeAppleCalendar.iCloudId,callback:function(t){e.$set(e.state.profile.employeeAppleCalendar,"iCloudId",t)},expression:"state.profile.employeeAppleCalendar.iCloudId"}})],1)],1),e._v(" "),n("el-col",{attrs:{span:e.responsiveGrid.cabinetFormInput}},[n("el-form-item",{attrs:{label:e.$root.labels.app_specific_password,prop:"appSpecificPassword"}},[n("el-input",{attrs:{"auto-complete":"off",placeholder:e.$root.labels.enter_employee_app_specific_pass},model:{value:e.state.profile.employeeAppleCalendar.appSpecificPassword,callback:function(t){e.$set(e.state.profile.employeeAppleCalendar,"appSpecificPassword",t)},expression:"state.profile.employeeAppleCalendar.appSpecificPassword"}})],1)],1)],1)],1),e._v(" "),n("el-col",{attrs:{span:e.responsiveGrid.cabinetForm}},[n("el-form-item",[12===e.responsiveGrid.cabinetFormInput?n("label",{attrs:{slot:"label"},slot:"label"}):e._e(),e._v(" "),n("el-button",{staticClass:"am-google-calendar-button",attrs:{type:"primary"},on:{click:function(t){e.isEmployeeConnectedToPersonalAppleCalendar&&e.state.profile.employeeAppleCalendar.iCloudId&&e.state.profile.employeeAppleCalendar.appSpecificPassword?e.disconnectEmployeeFromAppleAccount():e.connectEmployeeToAppleAccount()}}},[n("div",{staticClass:"am-google-calendar-button-image"},[n("img",{attrs:{src:e.$root.getUrl+"public/img/apple-button.svg"}})]),e._v(" "),n("span",{staticClass:"am-google-calendar-button-text"},[e._v("\n "+e._s(e.isEmployeeConnectedToPersonalAppleCalendar&&e.state.profile.employeeAppleCalendar.iCloudId&&e.state.profile.employeeAppleCalendar.appSpecificPassword?e.$root.labels.apple_disconnect:e.$root.labels.apple_connect)+"\n ")])])],1)],1),e._v(" "),n("el-col",{attrs:{span:e.responsiveGrid.cabinetForm}},[n("el-row",[n("el-select",{attrs:{placeholder:"","popper-class":"am-dropdown-cabinet",disabled:!e.isEmployeeConnectedToPersonalAppleCalendar},on:{change:function(t){return e.$store.commit("cabinet/setProfileProperty",{property:"appleCalendarId",value:t})}},model:{value:e.state.profile.appleCalendarId,callback:function(t){e.$set(e.state.profile,"appleCalendarId",t)},expression:"state.profile.appleCalendarId"}},[n("div",{staticClass:"am-drop"},e._l(e.appleCalendarList,function(e){return n("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)])],1)],1)],1)],1)},staticRenderFns:[]}},1596:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"am-cabinet-profile"},[n("el-row",{staticClass:"am-cabinet-profile__title"},[n("el-col",{attrs:{span:16}},[n("p",[e._v("\n "+e._s(e.$root.labels[e.state.cabinetType+"_profile"])+"\n ")])]),e._v(" "),n("el-col",{attrs:{span:8}},["provider"!==e.state.cabinetType||e.$root.licence.isLite||e.$root.licence.isStarter?e._e():n("div",{staticClass:"am-cabinet-timezone"},[n("el-select",{attrs:{filterable:"",clearable:"","popper-class":"am-cabinet-timezone-dropdown",placeholder:e.$root.timezone},on:{change:e.setTimeZone},model:{value:e.timeZone,callback:function(t){e.timeZone=t},expression:"timeZone"}},[n("template",{slot:"prefix"},[n("img",{attrs:{src:e.$root.getUrl+"public/img/am-globe.svg"}})]),e._v(" "),e._l(e.$root.timezones,function(e,t){return n("el-option",{key:t,attrs:{label:e,value:e}})})],2)],1)])],1),e._v(" "),n("el-tabs",{class:e.datePickerVisible?"customer-details":"",model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[n("el-tab-pane",{attrs:{label:e.$root.labels.details,name:"details"}},[n("cabinet-dashboard-profile-details",{ref:"details",attrs:{options:e.options,stripeLoading:e.stripeLoading,googleCalendar:e.googleCalendar,outlookCalendar:e.outlookCalendar,"apple-calendar-list":e.appleCalendarList},on:{refreshAppleCalendarList:e.getAppleCalendarList,changeActiveTab:function(t){e.activeTab="apple"}}})],1),e._v(" "),"provider"===e.state.cabinetType&&e.$root.settings.roles.allowConfigureServices?n("el-tab-pane",{attrs:{label:e.capitalizeFirstLetter(e.$root.labels.services),name:"assignedServices"}},["provider"===e.state.cabinetType&&e.$root.settings.roles.allowConfigureServices?n("assigned-services",{attrs:{"week-schedule":e.editWeekDayList,"special-days":e.editSpecialDayList,"categorized-service-list":e.editCategorizedServiceList,"future-appointments":e.state.futureAppointments,"employee-id":e.state.profile.id,"mandatory-services-ids":e.state.profile.mandatoryServicesIds}}):e._e()],1):e._e(),e._v(" "),"provider"===e.state.cabinetType&&e.$root.settings.roles.allowConfigureSchedule?n("el-tab-pane",{attrs:{label:e.$root.labels.working_hours,name:"workingHours"}},["provider"===e.state.cabinetType&&e.$root.settings.roles.allowConfigureSchedule?n("working-hours",{attrs:{"active-tab":e.activeTab,"week-schedule":e.editWeekDayList,"categorized-service-list":e.editCategorizedServiceList,locations:e.options.entities.locations}}):e._e()],1):e._e(),e._v(" "),"provider"===e.state.cabinetType&&e.$root.settings.roles.allowConfigureDaysOff?n("el-tab-pane",{attrs:{label:e.$root.labels.days_off,name:"daysOff"}},["provider"===e.state.cabinetType&&e.$root.settings.roles.allowConfigureDaysOff?n("days-off",{attrs:{"days-off":e.dayOffList,"listed-days-off":e.$root.settings.daysOff,"allow-edit-company-days-off":!1,"is-cabinet":!0},on:{changeDaysOff:e.changeDaysOff}}):e._e()],1):e._e(),e._v(" "),"provider"===e.state.cabinetType&&e.$root.settings.roles.allowConfigureSpecialDays?n("el-tab-pane",{attrs:{label:e.$root.labels.special_days,name:"specialDays"}},["provider"===e.state.cabinetType&&e.$root.settings.roles.allowConfigureSpecialDays?n("special-days",{attrs:{"active-tab":e.activeTab,"special-days":e.editSpecialDayList,locations:e.options.entities.locations,"categorized-service-list":e.editCategorizedServiceList,"should-scroll-view":!1,"is-cabinet":!0},on:{changeSpecialDays:e.changeSpecialDays}}):e._e()],1):e._e(),e._v(" "),!e.$root.settings.appleCalendar||"provider"!==e.state.cabinetType||e.$root.licence.isLite||e.$root.licence.isStarter?e._e():n("el-tab-pane",{attrs:{label:e.$root.labels.apple_calendar,name:"apple"}},[n("cabinet-dashboard-profile-apple-calendar",{ref:"apple",attrs:{"apple-calendar-list":e.appleCalendarList},on:{refreshAppleCalendarList:e.getAppleCalendarList}})],1)],1),e._v(" "),n("div",{staticClass:"am-cabinet-button"},[n("div",[n("el-button",{staticClass:"am-save-button",attrs:{type:"primary",loading:e.state.submitButtonSpinner},on:{click:e.saveProfile}},[e._v("\n "+e._s(e.$root.labels.save_changes)+"\n ")]),e._v(" "),"customer"===e.state.profile.type&&e.$root.settings.roles.allowCustomerDeleteProfile?n("el-button",{staticClass:"am-ml-32",attrs:{type:"danger"},on:{click:function(t){return e.$store.commit("cabinet/setDisplayProperty",{property:"dialogDeleteProfile",value:!0})}}},[e._v("\n "+e._s(e.$root.labels.delete_profile)+"\n ")]):e._e(),e._v(" "),"details"===e.activeTab&&this.$root.settings.roles[e.state.settingsName].loginEnabled?n("el-button",{class:{"am-ml-32":"provider"===e.state.cabinetType},on:{click:e.showChangePasswordForm}},[e._v("\n "+e._s(e.$root.labels.change_password)+"\n ")]):e._e()],1)])],1)},staticRenderFns:[]}},1597:function(e,t){e.exports={render:function(){var e=this,t=this,n=t.$createElement,i=t._self._c||n;return i("transition",{attrs:{name:"fade"}},[t.state.display.cabinetDashboard?i("div",{staticClass:"am-cabinet-dashboard"},[i("cabinet-dashboard-header",{attrs:{cabinetType:t.cabinetType}}),t._v(" "),i("div",{staticClass:"am-cabinet-menu"},[t.isPanelActive("appointments")?i("div",{staticClass:"am-cabinet-menu-item",class:{"am-active":"appointments"===t.state.activeTab},on:{click:function(e){return t.$store.commit("cabinet/setActiveTab","appointments")}}},[t._v("\n "+t._s(t.$root.labels.appointments)+"\n ")]):t._e(),t._v(" "),t.isPanelActive("events")?i("div",{staticClass:"am-cabinet-menu-item",class:{"am-active":"events"===t.state.activeTab},on:{click:function(e){return t.$store.commit("cabinet/setActiveTab","events")}}},[t._v("\n "+t._s(t.$root.labels.events)+"\n ")]):t._e()]),t._v(" "),i("div",{staticClass:"am-cabinet-content"},[i("transition-group",{attrs:{name:"fade",mode:"out-in",appear:""}},["appointments"===t.state.activeTab&&t.isPanelActive("appointments")?i("cabinet-dashboard-appointments",{key:1,attrs:{options:t.options,appointments:t.appointments,packagesData:t.packagesData,packagesAvailability:t.packagesAvailability,timeZoneChangedCounter:t.timeZoneChangedCounter,packagesPage:!1},on:{showDialogRescheduleAppointment:function(t){e.$emit("showDialogRescheduleAppointment",t)},showDialogCancelBooking:function(t){e.$emit("showDialogCancelBooking",t)},showDialogCancelPackage:function(t,n,i){e.$emit("showDialogCancelPackage",t,n,i)},refreshReservations:function(e){return t.$emit("refreshReservations")},getPackageAppointments:function(e){return t.$emit("getPackageAppointments")},changedTimeZone:t.changedTimeZone}}):t._e(),t._v(" "),"events"===t.state.activeTab&&t.isPanelActive("events")?i("cabinet-dashboard-events",{key:2,attrs:{options:t.options,events:t.events},on:{showDialogCancelBooking:function(t,n){e.$emit("showDialogCancelBooking",t,n)},refreshReservations:function(e){return t.$emit("refreshReservations")},changedTimeZone:t.changedTimeZone}}):t._e(),t._v(" "),"packages"===t.state.activeTab&&t.isPanelActive("packages")?i("cabinet-dashboard-appointments",{key:3,attrs:{options:t.options,appointments:t.appointments,packagesData:t.packagesData,packagesAvailability:t.packagesAvailability,timeZoneChangedCounter:t.timeZoneChangedCounter,packagesPage:!0},on:{showDialogRescheduleAppointment:function(t){e.$emit("showDialogRescheduleAppointment",t)},showDialogCancelBooking:function(t){e.$emit("showDialogCancelBooking",t)},showDialogCancelPackage:function(t,n,i){e.$emit("showDialogCancelPackage",t,n,i)},refreshReservations:function(e){return t.$emit("refreshReservations")},getPackageAppointments:function(e){return t.$emit("getPackageAppointments")}}}):t._e(),t._v(" "),"profile"===t.state.activeTab&&("customer"===t.cabinetType||t.isPanelActive("profile")&&t.options.fetched)?i("cabinet-dashboard-profile",{key:4,attrs:{options:t.options,stripeLoading:t.stripeLoading},on:{changedTimeZone:t.changedTimeZone}}):t._e(),t._v(" "),i("cabinet-spinner",{key:5,class:{"am-cabinet-content-profile-spinner":"profile"===t.state.activeTab},attrs:{"show-spinner":"events"===t.state.activeTab&&!t.state.fetchedEvents||"appointments"===t.state.activeTab&&!t.state.fetchedAppointments||"profile"===t.state.activeTab&&"customer"!==t.cabinetType&&t.isPanelActive("profile")&&!t.options.fetched}})],1)],1)],1):t._e()])},staticRenderFns:[]}},1598:function(e,t,n){var i=n(90)(n(1599),n(1600),!1,null,null,null);e.exports=i.exports},1599:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(814),o=n.n(i),a=n(668),s=n(658),r=n(334),l=n.n(r),c=n(633),u=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.default={name:"CabinetDeleteProfileDialog",mixins:[a.a,s.a],computed:u({},Object(c.b)({state:function(e){return e.cabinet}})),methods:{deleteProfile:function(){var e,t=(e=o.a.mark(function e(){return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.$store.commit("cabinet/setDialogButtonSpinner",!0),e.prev=1,e.next=4,this.$http.post(this.$root.getAjaxUrl+"/users/customers/"+this.state.profile.id,{email:"",firstName:this.$root.labels.customer,lastName:this.state.profile.id,phone:"",birthday:"",gender:"",externalId:"",password:""},this.getAuthorizationHeaderObject());case 4:return this.$store.commit("cabinet/setDisplayProperty",{property:"dialogDeleteProfile",value:!1}),this.$store.commit("cabinet/setProfile",{}),l.a.remove("ameliaUserEmail"),this.notify(this.$root.labels.success,this.$root.labels.profile_deleted,"success"),e.next=10,this.$store.dispatch("cabinet/logout",this.$root.settings);case 10:this.$http.post(this.$root.getAjaxUrl+"/users/logout",{},{}),this.$store.commit("cabinet/setDialogButtonSpinner",!1),e.next=19;break;case 14:e.prev=14,e.t0=e.catch(1),console.log(e.t0),this.notify(this.$root.labels.error,this.$root.labels.something_went_wrong,"error"),this.$store.commit("cabinet/setDialogButtonSpinner",!1);case 19:case"end":return e.stop()}},e,this,[[1,14]])}),function(){var t=e.apply(this,arguments);return new Promise(function(e,n){return function i(o,a){try{var s=t[o](a),r=s.value}catch(e){return void n(e)}if(!s.done)return Promise.resolve(r).then(function(e){i("next",e)},function(e){i("throw",e)});e(r)}("next")})});return function(){return t.apply(this,arguments)}}()}}},1600:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-dialog",{attrs:{modalAppendToBody:!1,title:e.$root.labels.delete_profile,visible:e.state.display.dialogDeleteProfile},on:{close:function(t){return e.$store.commit("cabinet/setDisplayProperty",{property:"dialogDeleteProfile",value:!1})}}},[n("div",{staticClass:"am-mb-16"},[e._v("\n "+e._s(e.$root.labels.delete_profile_description)+"\n ")]),e._v(" "),n("span",{attrs:{slot:"footer"},slot:"footer"},[n("el-button",{staticClass:"am-cabinet-action-button",on:{click:function(t){return e.$store.commit("cabinet/setDisplayProperty",{property:"dialogDeleteProfile",value:!1})}}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),n("el-button",{staticClass:"am-cabinet-action-button",attrs:{type:"primary",loading:e.state.dialogButtonSpinner},on:{click:e.deleteProfile}},[e._v("\n "+e._s(e.$root.labels.confirm)+"\n ")])],1)])},staticRenderFns:[]}},1601:function(e,t,n){var i=n(90)(n(1602),n(1603),!1,null,null,null);e.exports=i.exports},1602:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(891),o=n.n(i),a=n(659),s=n(792),r=n(633),l=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.default={name:"CabinetEventDialog",components:{DialogEvent:o.a},mixins:[a.a,s.a],props:{optionsCabinet:{type:Object,default:function(){}}},data:function(){return{dialogEvent:!1}},computed:l({},Object(r.b)({state:function(e){return e.cabinet}})),methods:{open:function(){this.options=Object.assign({},this.optionsCabinet),this.$store.state.cabinet.editedEventId?this.showDialogEditEvent(this.$store.state.cabinet.editedEventId):this.showDialogNewEvent()},duplicateEventCallback:function(e){this.$store.commit("cabinet/setDisplayProperty",{property:"dialogEvent",value:!0}),this.showDialogNewEvent(),this.event=e,this.event.id=0,this.event.duplicated=!0,this.event.periods.forEach(function(e){e.googleCalendarEventId=null,e.googleMeetUrl=null,e.outlookCalendarEventId=null,e.microsoftTeamsUrl=null,e.appleCalendarEventId=null})},close:function(){var e=this;this.$store.commit("cabinet/setDisplayProperty",{property:"dialogEvent",value:!1}),this.$store.commit("cabinet/setEditedEventId",0),setTimeout(function(){e.closeDialogEvent(),e.$refs.dialogEvent&&(e.$refs.dialogEvent.defaultEventTab="details")},500)},saveEvent:function(){this.$emit("saveEvent")}}}},1603:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-dialog",{staticClass:"am-modal am-in-body",staticStyle:{width:"100000px"},attrs:{id:"am-modal","modal-append-to-body":!1,"append-to-body":!0,visible:e.state.display.dialogEvent,modal:!1},on:{open:e.open,close:e.close}},[n("div",{staticClass:"amelia-app-booking"},[n("div",{attrs:{id:"am-cabinet"}},[n("div",{staticClass:"am-dialog-event-wrapper"},[n("el-dialog",{attrs:{visible:e.state.display.dialogEvent,title:null!==e.event&&0!==e.event.id?e.$root.labels.edit_event:e.$root.labels.new_event,"modal-append-to-body":!0},on:{close:e.close}},[e.state.display.dialogEvent?n("dialog-event",{ref:"dialogEvent",attrs:{event:e.event,employees:e.options.entities.employees,locations:e.options.entities.locations,tags:e.options.entities.tags,settings:e.options.entities.settings,"is-cabinet":!0,"show-header":!1,"show-gallery":!1,selectedTimeZone:e.state.timeZone?e.state.timeZone:"UTC"},on:{closeDialog:e.close,saveCallback:e.saveEvent,duplicateCallback:e.duplicateEventCallback}}):e._e()],1)],1)])])])},staticRenderFns:[]}},1604:function(e,t,n){var i=n(90)(n(1605),n(1606),!1,null,null,null);e.exports=i.exports},1605:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(633),o=n(336),a=n(664),s=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.default={name:"CabinetRescheduleDialog",mixins:[o.a,a.a],props:{appointment:{type:Object,default:function(){}},loadingTimeSlots:{type:Boolean,default:!1}},data:function(){return{model:{date:null,time:null},rules:{date:[{required:!0,message:this.$root.labels.choose_appointment_date,trigger:"submit"}],time:[{required:!0,message:this.$root.labels.choose_appointment_time,trigger:"submit"}]}}},methods:{cancel:function(){this.model.date=null,this.model.time=null,this.$refs.model.clearValidate(),this.$store.commit("cabinet/setDisplayProperty",{property:"dialogRescheduleAppointment",value:!1})},rescheduleAppointment:function(){var e=this;this.$refs.model.clearValidate(),this.$refs.model.validate(function(t){if(!t)return!1;e.$emit("rescheduleAppointment")})}},computed:s({},Object(i.b)({state:function(e){return e.cabinet}}))}},1606:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-dialog",{attrs:{modalAppendToBody:!1,title:e.$root.labels.reschedule,visible:e.state.display.dialogRescheduleAppointment},on:{close:e.cancel}},[n("div",{staticClass:"am-mb-16 am-reschedule-title"},[e._v("\n "+e._s(e.$root.labels.appointment_change_time)+"\n ")]),e._v(" "),n("el-form",{ref:"model",attrs:{"label-position":"top",model:e.model,rules:e.rules},on:{submit:function(t){return t.preventDefault(),e.rescheduleAppointment(t)}}},[n("el-row",{attrs:{gutter:16}},[n("el-col",{staticClass:"v-calendar-column",attrs:{md:12}},[n("el-form-item",{attrs:{label:e.$root.labels.date,prop:"date"}},[n("v-date-picker",{attrs:{value:e.appointment.selectedDate,mode:"single","popover-visibility":"focus","popover-direction":"bottom","is-expanded":!1,"is-required":!0,"show-day-popover":!1,"popover-align":e.screenWidth<768?"center":"left","tint-color":e.$root.settings.customization.primaryColor,"input-props":{class:"el-input__inner",readOnly:"readonly"},"available-dates":e.appointment.availableDates,"disabled-dates":e.appointment.disabledWeekdays,disabled:e.loadingTimeSlots,formats:e.vCalendarFormats},on:{input:function(t){return e.$emit("selectedDate",t)}},model:{value:e.model.date,callback:function(t){e.$set(e.model,"date",t)},expression:"model.date"}})],1)],1),e._v(" "),n("el-col",{attrs:{md:12}},[n("el-form-item",{attrs:{label:e.$root.labels.time,prop:"time"}},[n("el-select",{attrs:{filterable:"","value-key":"time","popper-class":"am-dropdown-cabinet",value:e.appointment.selectedPeriod,placeholder:e.$root.labels.select_time,disabled:e.loadingTimeSlots},on:{change:function(t){return e.$emit("selectedTime",t)}},model:{value:e.model.time,callback:function(t){e.$set(e.model,"time",t)},expression:"model.time"}},e._l(e.appointment.dateTimeSlots,function(t){return n("el-option",{key:t.time,attrs:{label:e.getFrontedFormattedTime(t.time+":00"),value:t}})}),1)],1)],1)],1)],1),e._v(" "),n("span",{attrs:{slot:"footer"},slot:"footer"},[n("el-button",{staticClass:"am-cabinet-action-button",on:{click:e.cancel}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),n("el-button",{staticClass:"am-cabinet-action-button",attrs:{type:"primary",loading:e.state.dialogButtonSpinner},on:{click:e.rescheduleAppointment}},[e._v("\n "+e._s(e.$root.labels.confirm)+"\n ")])],1)],1)},staticRenderFns:[]}},1607:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"am-wrap",attrs:{id:"amelia-booking-wrap"}},[n("div",{attrs:{id:"am-cabinet"}},[n("cabinet-spinner",{directives:[{name:"show",rawName:"v-show",value:e.visibleSpinner,expression:"visibleSpinner"}],attrs:{"show-spinner":!(e.state.display.login||e.state.display.forgotPassword||e.state.isUserAuthenticated||e.state.display.changePassword)}}),e._v(" "),e.state.display.login||e.state.display.forgotPassword||e.state.display.changePassword?n("cabinet-auth",{attrs:{authenticate:e.authenticate,googleCalendar:e.googleCalendar},on:{getOptions:e.getOptions,parseError:e.parseError}}):e._e(),e._v(" "),!1===e.state.display.login&&!1===e.state.display.forgotPassword&&!1===e.state.display.changePassword?n("cabinet-dashboard",{attrs:{"cabinet-type":e.cabinetType,options:e.options,appointments:e.appointments,packagesData:e.packagesData,packagesAvailability:e.packagesAvailability,events:e.events,stripeLoading:e.stripeLoading},on:{refreshReservations:e.refreshReservations,showDialogRescheduleAppointment:e.showDialogRescheduleAppointment,showDialogCancelBooking:e.showDialogCancelBooking,showDialogCancelPackage:e.showDialogCancelPackage,getPackageAppointments:e.getPackageAppointments,changedTimeZone:e.changedTimeZone}}):e._e(),e._v(" "),n("cabinet-reschedule-dialog",{attrs:{appointment:e.appointment,"loading-time-slots":e.loadingTimeSlots},on:{selectedDate:e.selectedDate,selectedTime:e.selectedTime,rescheduleAppointment:e.rescheduleAppointment}}),e._v(" "),n("cabinet-cancel-dialog",{attrs:{type:e.cancelType},on:{cancelBooking:e.cancelBooking,cancelPackage:e.cancelPackage}}),e._v(" "),n("cabinet-delete-profile-dialog"),e._v(" "),"provider"===e.state.cabinetType&&e.$root.settings.roles.allowWriteAppointments?n("cabinet-appointment-dialog",{attrs:{"options-cabinet":e.options,"modal-append-to-body":!1},on:{saveAppointment:e.refreshReservations}}):e._e(),e._v(" "),"provider"===e.state.cabinetType&&e.$root.settings.roles.allowWriteEvents?n("cabinet-event-dialog",{attrs:{"options-cabinet":e.options},on:{saveEvent:e.refreshReservations}}):e._e(),e._v(" "),"provider"===e.state.cabinetType?n("cabinet-attendees-dialog",{attrs:{"options-cabinet":e.options,"write-events":e.$root.settings.roles.allowWriteEvents},on:{refreshReservations:e.refreshReservations}}):e._e()],1)])},staticRenderFns:[]}},1627:function(e,t,n){var i=n(90)(n(1556),n(1607),!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 R(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 R(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(R(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 C(e,t,n,i){return U(q(t),e,n,i)}function w(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 x(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 E(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 $(this,t,n);case"base64":return x(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(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 C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(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,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(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+=M(e[a]);return o}function D(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 O(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 A(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 L(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 N(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 F(e,t,n,i,a){return a||N(e,0,n,4),o.write(e,t,n,i,23,4),n+4}function B(e,t,n,i,a){return a||N(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||O(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||O(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||O(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||O(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||O(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||O(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||O(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||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||O(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||O(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||O(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||O(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||O(e,4,this.length),o.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),o.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),o.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||O(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)||A(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)||A(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||A(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||A(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||A(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||A(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):L(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||A(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):L(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);A(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);A(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||A(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||A(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||A(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||A(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):L(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||A(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):L(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return F(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return F(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return B(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:R(new l(e,i).toString()),r=s.length;for(a=0;a<n-t;++a)this[a+t]=s[a%r]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function M(e){return e<16?"0"+e.toString(16):e.toString(16)}function R(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(j,"")).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"}]}}}},676:function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var o=(s=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(s))))+" */"),a=i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"});return[n].concat(a).concat([o]).join("\n")}var s;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var i={},o=0;o<this.length;o++){var a=this[o][0];"number"==typeof a&&(i[a]=!0)}for(o=0;o<e.length;o++){var s=e[o];"number"==typeof s[0]&&i[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),t.push(s))}},t}},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},681:function(e,t,n){var i="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!i)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var o=n(702),a={},s=i&&(document.head||document.getElementsByTagName("head")[0]),r=null,l=0,c=!1,u=function(){},d=null,p="data-vue-ssr-id",m="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function f(e){for(var t=0;t<e.length;t++){var n=e[t],i=a[n.id];if(i){i.refs++;for(var o=0;o<i.parts.length;o++)i.parts[o](n.parts[o]);for(;o<n.parts.length;o++)i.parts.push(g(n.parts[o]));i.parts.length>n.parts.length&&(i.parts.length=n.parts.length)}else{var s=[];for(o=0;o<n.parts.length;o++)s.push(g(n.parts[o]));a[n.id]={id:n.id,refs:1,parts:s}}}}function h(){var e=document.createElement("style");return e.type="text/css",s.appendChild(e),e}function g(e){var t,n,i=document.querySelector("style["+p+'~="'+e.id+'"]');if(i){if(c)return u;i.parentNode.removeChild(i)}if(m){var o=l++;i=r||(r=h()),t=y.bind(null,i,o,!1),n=y.bind(null,i,o,!0)}else i=h(),t=function(e,t){var n=t.css,i=t.media,o=t.sourceMap;i&&e.setAttribute("media",i);d.ssrId&&e.setAttribute(p,t.id);o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,i),n=function(){i.parentNode.removeChild(i)};return t(e),function(i){if(i){if(i.css===e.css&&i.media===e.media&&i.sourceMap===e.sourceMap)return;t(e=i)}else n()}}e.exports=function(e,t,n,i){c=n,d=i||{};var s=o(e,t);return f(s),function(t){for(var n=[],i=0;i<s.length;i++){var r=s[i];(l=a[r.id]).refs--,n.push(l)}t?f(s=o(e,t)):s=[];for(i=0;i<n.length;i++){var l;if(0===(l=n[i]).refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete a[l.id]}}}};var v,b=(v=[],function(e,t){return v[e]=t,v.filter(Boolean).join("\n")});function y(e,t,n,i){var o=n?"":i.css;if(e.styleSheet)e.styleSheet.cssText=b(t,o);else{var a=document.createTextNode(o),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(a,s[t]):e.appendChild(a)}}},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:[]}},696:function(e,t,n){"use strict";var i=n(0),o=n.n(i),a=n(711),s=n(661);function r(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)}t.a={mixins:[a.a,s.a],data:function(){return{phonePopulated:!1}},methods:{setDurationsPrices:function(e,t){return this.isDurationPricingEnabled(e.customPricing)&&(parseInt(e.duration)in t||(t[parseInt(e.duration)]=[],t[parseInt(e.duration)].push(e.price)),e.customPricing.durations.forEach(function(e){parseInt(e.duration)in t||(t[parseInt(e.duration)]=[]),t[parseInt(e.duration)].push(e.price)})),t},getDurations:function(){var e=this,t={};if(!this.appointment.providerId&&this.appointment.serviceId)this.getPossibleProvidersIfNoneSelected().forEach(function(n){var i=n.serviceList.find(function(t){return t.id===e.appointment.serviceId});t=e.setDurationsPrices(i,t)});else if(this.appointment.serviceId){var n=this.getProviderById(this.appointment.providerId).serviceList.find(function(t){return t.id===e.appointment.serviceId});t=this.setDurationsPrices(n,t)}var i=[];return Object.keys(t).sort(function(e,t){return e-t}).forEach(function(n){var o=Math.min.apply(Math,r(t[n])),a=Math.max.apply(Math,r(t[n]));i.push({duration:parseInt(n),priceLabel:o!==a?e.getFormattedPrice(o,!e.$root.settings.payments.hideCurrencySymbolFrontend)+" - "+e.getFormattedPrice(a,!e.$root.settings.payments.hideCurrencySymbolFrontend):e.getFormattedPrice(o,!e.$root.settings.payments.hideCurrencySymbolFrontend)})}),i},getAppointmentDuration:function(e,t){return e+t.filter(function(e){return e.selected}).map(function(e){return e.duration*e.quantity}).reduce(function(e,t){return e+t},0)},getFormattedTimeSlot:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?" - "+o()(e,"HH:mm:ss").add(t,"seconds").format(this.momentTimeFormat):"";return""+this.getFrontedFormattedTime(e)+n},handleCapacity:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this,o=!1,a=0,s=0,r=0;if(i.appointment.serviceId)if(i.appointment.providerId){var l=i.getProviderService(this.appointment.providerId,this.appointment.serviceId);r=l.minCapacity,o=l.maxCapacity>1&&(l.bringingAnyone||!this.$root.settings.appointments.allowBookingIfNotMin),a=l.maxCapacity,s=this.$root.settings.appointments.allowBookingIfNotMin?1:l.minCapacity}else this.options.entities.employees.forEach(function(e){e.serviceList.forEach(function(t){if(t.id===i.appointment.serviceId){var n=i.getProviderService(e.id,i.appointment.serviceId);r=n.minCapacity,n.maxCapacity>1&&(n.bringingAnyone||!i.$root.settings.appointments.allowBookingIfNotMin)&&(o=!0),(n.maxCapacity>a||0===a)&&(a=n.maxCapacity),s<n.minCapacity&&(s=i.$root.settings.appointments.allowBookingIfNotMin?1:n.minCapacity)}})});!e&&this.$root.settings.appointments.openedBookingAfterMin&&(s=r),this.group.options=[];for(var c=s-1;c<(null!==n&&n<a?n+1:a);c++)if(0!==c){var u="ameliaBooking"in window&&"form"in window.ameliaBooking&&window.ameliaBooking.form.allPersons?c+1:c;this.group.options.push({label:1===u?u+" "+this.$root.labels.person_upper:u+" "+this.$root.labels.persons_upper,value:c+1})}0!==a&&this.appointment.bookings[0].persons>a&&(this.appointment.bookings[0].persons=a),(this.group.enabled||o&&!this.$root.settings.appointments.allowBookingIfNotMin&&s>1)&&(this.group.enabled=o),o&&!this.$root.settings.appointments.allowBookingIfNotMin&&s>1&&(this.appointment.bookings[0].persons=s),this.group.allowed=o&&(this.$root.settings.appointments.allowBookingIfNotMin||1===s),!t&&this.$root.settings.appointments.allowBookingIfNotMin&&this.$root.settings.appointments.openedBookingAfterMin&&r>1&&(this.group.enabled=!0,this.appointment.bookings[0].persons=r)},getAppointmentAddToCalendarData:function(e,t){var n=0,i="",a=[],s=[],r=[];switch(e.type){case"appointment":e.recurring.forEach(function(e){s.push({type:"appointment",id:e.booking.id,appointmentStatusChanged:e.appointmentStatusChanged}),r.push(e.booking.id)}),e.utcTime.forEach(function(t){a.push({address:e.appointment.location?e.appointment.location.address:"",start:o.a.utc(t.start.replace(/ /g,"T")).toDate(),end:o.a.utc(t.end.replace(/ /g,"T")).toDate()})}),e.recurring.forEach(function(e){e.utcTime.forEach(function(t){a.push({address:e.appointment.location?e.appointment.location.address:"",start:o.a.utc(t.start.replace(/ /g,"T")).toDate(),end:o.a.utc(t.end.replace(/ /g,"T")).toDate()})})}),n=e.booking.id,i=e.booking.token;break;case"package":e.package.forEach(function(e,t){t>0?(s.push({type:"appointment",id:e.booking.id,appointmentStatusChanged:e.appointmentStatusChanged}),r.push(e.booking.id),e.utcTime.forEach(function(t){a.push({address:e.appointment.location?e.appointment.location.address:"",start:o.a.utc(t.start.replace(/ /g,"T")).toDate(),end:o.a.utc(t.end.replace(/ /g,"T")).toDate()})})):(n=e.booking.id,i=e.booking.token,e.utcTime.forEach(function(t){a.push({address:e.appointment.location?e.appointment.location.address:"",start:o.a.utc(t.start.replace(/ /g,"T")).toDate(),end:o.a.utc(t.end.replace(/ /g,"T")).toDate()})}))})}var l=e.packageId?e.packageId:null;t||this.$http.post(this.$root.getAjaxUrl+"/bookings/success/"+n+"&nocache="+(new Date).getTime(),{type:e.type,appointmentStatusChanged:e.appointmentStatusChanged,recurring:s,packageId:l,customer:e.customer,paymentId:"paymentId"in e&&e.paymentId?e.paymentId:null,packageCustomerId:"packageCustomerId"in e&&e.packageCustomerId?e.packageCustomerId:null}).then(function(e){}).catch(function(e){});var c={};switch(e.type){case"appointment":c={title:this.$root.useTranslations?this.getNameTranslated(e.bookable):e.bookable.name,dates:a,address:e.appointment.location?e.appointment.location.address:"",description:this.$root.useTranslations?this.getDescriptionTranslated(e.bookable):e.bookable.description,id:e.booking.id,status:e.booking.status,active:this.$root.settings.general.addToCalendar,color:e.color,type:e.type,bookableType:e.type,bookable:e.bookable,booking:e.booking,token:e.booking.token,recurringIds:r};break;case"package":c={title:this.$root.useTranslations?this.getNameTranslated(e.bookable):e.bookable.name,dates:a,address:"",description:this.$root.useTranslations?this.getDescriptionTranslated(e.bookable):e.bookable.description,id:n,status:"approved",active:this.$root.settings.general.addToCalendar&&a.length>0,color:e.color,type:"appointment",bookableType:"package",bookable:e.bookable,booking:e.booking,token:i,recurringIds:r}}return c}}}},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()},700:function(e,t,n){"use strict";var i=n(0),o=n.n(i);t.a={methods:{selectedTicketsCount:function(e){var t=0;return e.forEach(function(e){t+=e.persons}),t},entitiesLoaded:function(){return"ameliaEventEntities"in window||"ameliaEntities"in window},processEntities:function(e){this.getCurrentUser(),this.options.entities.locations=e.locations.filter(function(e){return"hidden"!==e.status}),this.options.entities.employees=e.employees.filter(function(e){return"hidden"!==e.status}),this.options.entities.customFields=e.customFields,this.options.entities.employees.forEach(function(e){e.serviceList.forEach(function(e){"name"in e||Object.assign(e,{extras:[]})})}),this.$root.useTranslations&&this.translateEntities(this.options.entities),this.setBookingCustomFields()},processCalendarEntities:function(e){this.processEntities(e),this.options.entities.tags=e.tags,this.options.entities.taxes="taxes"in e?e.taxes:[];var t=this.getPreselectedTag();if(t){var n=e.tags.find(function(e){return e.name===t});this.options.entities.tags=n?[n]:e.tags,this.eventFilterTag=n?[n.name]:[]}else this.options.entities.tags=e.tags;this.entitiesFetched=!0,this.getEvents()},processListEntities:function(e){this.processEntities(e),this.options.entities.tags=this.getPreselectedTag()?[]:e.tags,this.options.entities.taxes="taxes"in e?e.taxes:[]},getEntities:function(e){var t=this;if(this.$root.hasApiCall&&!this.entitiesLoaded())this.$http.get(this.$root.getAjaxUrl+"/entities",{params:this.getAppropriateUrlParams({lite:!0,types:["locations","tags","custom_fields","employees","taxes"]})}).then(function(t){window.ameliaEventEntities=JSON.parse(JSON.stringify(t.data.data)),e(window.ameliaEventEntities)}).catch(function(){});else var n=setInterval(function(){t.entitiesLoaded()&&(clearInterval(n),"ameliaEntities"in window?e(JSON.parse(JSON.stringify(window.ameliaEntities))):e(JSON.parse(JSON.stringify(window.ameliaEventEntities))))},1e3)},getPreselectedTag:function(){return"eventTag"in this.$root.shortcodeData.booking?this.$root.shortcodeData.booking.eventTag:null},getPreselectedEmployee:function(){return"eventTag"in this.$root.shortcodeData.booking?this.$root.shortcodeData.booking.employee:null},getPreselectedEventId:function(){return"eventId"in this.$root.shortcodeData.booking?this.$root.shortcodeData.booking.eventId:null},getPreselectedEventRecurring:function(){return"eventRecurring"in this.$root.shortcodeData.booking?this.$root.shortcodeData.booking.eventRecurring:null},getImplodedPeriods:function(e){var t=null,n=[],i=[];return e.forEach(function(o,a){var s=t&&t.periodEnd===o.periodStart;s&&n.pop(),t={periodStart:s?t.periodStart:o.periodStart,periodEnd:o.periodEnd,isConnected:s},n.push(t),(e.length===a+1||a+1 in e&&e[a+1].periodStart!==o.periodEnd)&&(i=i.concat(JSON.parse(JSON.stringify(n))),n=[])}),i},getExplodedPeriods:function(e){var t=[];return e.forEach(function(e){if(e.isConnected)t.push(e);else{var n=o()(e.periodStart.split(" ")[0],"YYYY-MM-DD"),i=o()(e.periodEnd.split(" ")[0],"YYYY-MM-DD"),a=e.periodStart.split(" ")[1],s=e.periodEnd.split(" ")[1];"00:00:00"===s&&(s="24:00:00",i.subtract(1,"days"));for(var r=[];n.isSameOrBefore(i);)r.push(n.format("YYYY-MM-DD")),n.add(1,"days");r.forEach(function(n){t.push({periodStart:n+" "+a,periodEnd:n+" "+s,zoomMeeting:e.zoomMeeting,lessonSpace:e.lessonSpace})})}}),t},getEventStatus:function(e){switch(e.status){case"rejected":case"canceled":return{label:this.$root.labels.canceled,class:"canceled"};case"full":return{label:this.$root.labels.full,class:"full"};case"upcoming":return{label:this.$root.labels.upcoming,class:"upcoming"};case"approved":if(e.closed)return{label:this.$root.labels.closed,class:"closed"};if(e.opened&&e.places>0)return{label:this.$root.labels.opened,class:"opened"}}return{label:"",class:""}},getEventAddToCalendarData:function(e,t){t||this.$http.post(this.$root.getAjaxUrl+"/bookings/success/"+e.booking.id,{type:"event",appointmentStatusChanged:e.appointmentStatusChanged,paymentId:"paymentId"in e&&e.paymentId?e.paymentId:null,packageCustomerId:null}).then(function(e){}).catch(function(e){});var n="";e.event.location?n=e.event.location.address:e.event.customLocation&&(n=e.event.customLocation);var i=[];return e.utcTime.forEach(function(e){i.push({address:n,start:o.a.utc(e.start.replace(/ /g,"T")).toDate(),end:o.a.utc(e.end.replace(/ /g,"T")).toDate()})}),{title:this.$root.useTranslations?this.getNameTranslated(e.event):e.event.name,dates:i,address:n,description:this.$root.useTranslations?this.getDescriptionTranslated(e.event):e.event.description,id:e.booking.id,status:e.booking.status,active:this.$root.settings.general.addToCalendar,color:e.color,type:e.type,bookableType:e.type,bookable:e.event,booking:e.booking,token:e.booking.token,recurringIds:[]}},getMaxTicketSelected:function(e,t,n){if(e.bringingAnyone){var i=t.spots-t.sold,o=this.selectedTicketsCount(n.filter(function(e){return e.eventTicketId!==t.id}));return e.maxCustomCapacity&&(i=e.maxCustomCapacity-this.getAllSoldTickets(e)-o),null!==e.maxExtraPeople?e.maxExtraPeople+1>o?i>e.maxExtraPeople+1-o?e.maxExtraPeople-o+1:i:0:i}return 1},setTicketsData:function(e){e.bookingToEventTickets=[];var t=[];return e.customTickets.forEach(function(e,n){t.push({id:Math.random(),customerBookingId:null,eventTicketId:e.id,persons:0,price:e.dateRangePrice?e.dateRangePrice:e.price})}),t},getAllSoldTickets:function(e){var t=0;return e.customTickets&&e.customTickets.forEach(function(e){t+=e.sold}),t},getMinTicketPrice:function(e){var t=e.customTickets.filter(function(e){return e.enabled}),n=t[0].price;return t.forEach(function(e){e.price<n&&(n=e.price),e.dateRangePrice&&e.dateRangePrice<n&&(n=e.dateRangePrice)}),n},disableTicketSelection:function(e,t,n,i){if(e.bringingAnyone)return this.getMaxTicketSelected(e,t,n)<=0;var o,a=[];return n.forEach(function(e){a.push(e.persons)}),o=-1!==a.indexOf(1)?1:0,e.maxCustomCapacity?o!==i:o!==i||t.spots===t.sold}}}},702:function(e,t){e.exports=function(e,t){for(var n=[],i={},o=0;o<t.length;o++){var a=t[o],s=a[0],r={id:e+":"+o,css:a[1],media:a[2],sourceMap:a[3]};i[s]?i[s].parts.push(r):n.push(i[s]={id:s,parts:[r]})}return n}},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}}}},711:function(e,t,n){"use strict";t.a={data:function(){return{}},methods:{getCurrentUser:function(){var e=this;if("ameliaUser"in window)var t=setInterval(function(){"ameliaUser"in window&&(clearInterval(t),e.setCurrentUser(JSON.parse(JSON.stringify(window.ameliaUser))))},1e3);else this.$http.get(this.$root.getAjaxUrl+"/users/current").then(function(t){window.ameliaUser=t.data.data.user?JSON.parse(JSON.stringify(t.data.data.user)):null,e.setCurrentUser(window.ameliaUser)}).catch(function(e){console.log("getCurrentUser fail")})},setCurrentUser:function(e){this.currentUser=e,this.currentUser&&this.appointment&&(this.appointment.bookings[0].customerId=this.currentUser.id,this.appointment.bookings[0].customer.id=this.currentUser.id,this.appointment.bookings[0].customer.externalId=this.currentUser.externalId,this.appointment.bookings[0].customer.email=this.currentUser.email,this.appointment.bookings[0].customer.firstName=this.currentUser.firstName,this.appointment.bookings[0].customer.lastName=this.currentUser.lastName,this.appointment.bookings[0].customer.phone=this.currentUser.phone||"",this.appointment.bookings[0].customer.countryPhoneIso=this.currentUser.countryPhoneIso,this.appointment.bookings[0].customer.translations=this.currentUser.translations,this.phonePopulated=!!this.currentUser.phone&&""!==this.currentUser.phone.trim())}}}},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:{}}},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:[]}},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,C,w=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)}},x=t+" Iterator",S=v==f,P=!1,T=e.prototype,$=T[d]||T["@@iterator"]||v&&T[v],E=$||w(v),D=v?S?w("entries"):E:void 0,O="Array"==t&&T.entries||$;if(O&&((C=u(O.call(new e)))!==Object.prototype&&C.next&&(c(C,x,!0),i||"function"==typeof C[d]||s(C,d,h))),S&&$&&$.name!==f&&(P=!0,E=function(){return $.call(this)}),i&&!y||!p&&!P&&T[d]||s(T,d,E),r[t]=E,r[x]=h,v)if(_={values:S?E:w(f),keys:b?E:w(m),entries:D},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="",C=0,w=0;w<y.length;w++){_=y[w];for(var x=String(_[0]),S=c(u(s(_.index),p.length),0),P=[],T=1;T<_.length;T++)P.push(f(_[T]));var $=_.groups;if(m){var E=[x].concat(P,S,p);void 0!==$&&E.push($);var D=String(t.apply(void 0,E))}else D=g(x,p,S,P,$,t);S>=C&&(k+=p.slice(C,S)+D,C=S+x.length)}return k+p.slice(C)}];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 C(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 w=["Start","Add","Remove","Update","End"],x=["Choose","Sort","Filter","Clone"],S=["Move"].concat(w,x).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=C(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={};w.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)}),x.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 $=T;t.default=$}}).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=C(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=C(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=C(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=C(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=C(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=C(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=C(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=C(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=w(o,r,t):0!==i&&(o=w(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 C(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 w(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=C,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 C=Object.keys(s.insert)[0];if(null==C)return e;t.scroll.insertAt(e,C,s.insert[C])}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 C=k[y];(!(x=Object.getOwnPropertyDescriptor(c,C))||x.enumerable||d)&&(g[C]=s(c[C],h-1),x.enumerable||Object.defineProperty(g,C,{enumerable:!1}))}}if(d){var w=Object.getOwnPropertyNames(c);for(y=0;y<w.length;y++){var x,S=w[y];(x=Object.getOwnPropertyDescriptor(c,S))&&x.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},x),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},C)):(i.addBinding({key:t.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},k),i.addBinding({key:t.keys.DELETE},{collapsed:!0,suffix:/^.?$/},C)),i.addBinding({key:t.keys.BACKSPACE},{collapsed:!1},w),i.addBinding({key:t.keys.DELETE},{collapsed:!1},w),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],C=g instanceof d.default.Text?g.value().slice(0,v):"",w=_ instanceof d.default.Text?_.value().slice(k):"",x={collapsed:0===l.length,empty:0===l.length&&p.length()<=1,format:e.quill.getFormat(l),offset:m,prefix:C,suffix:w};s.some(function(t){if(null!=t.collapsed&&t.collapsed!==x.collapsed)return!1;if(null!=t.empty&&t.empty!==x.empty)return!1;if(null!=t.offset&&t.offset!==x.offset)return!1;if(Array.isArray(t.format)){if(t.format.every(function(e){return null==x.format[e]}))return!1}else if("object"===i(t.format)&&!Object.keys(t.format).every(function(e){return!0===t.format[e]?null!=x.format[e]:!1===t.format[e]?null==x.format[e]:(0,r.default)(t.format[e],x.format[e])}))return!1;return!(null!=t.prefix&&!t.prefix.test(x.prefix))&&(!(null!=t.suffix&&!t.suffix.test(x.suffix))&&!0!==t.handler.call(e,l,x))})&&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 C(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 w(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 x(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"],C=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")&&x(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")&&x(e,b,"background"===n?"#ffffff":"#000000"),new c.default(e,t[n])}return null==e.querySelector("option")&&(e.classList.contains("ql-font")?x(e,y):e.classList.contains("ql-header")?x(e,_):e.classList.contains("ql-size")&&x(e,k)),new d.default(e)});this.quill.on(s.default.events.EDITOR_CHANGE,function(){n.pickers.forEach(function(e){e.update()})})}}]),t}();C.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 w=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 x(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=w,t.default=C},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+_,C=(T=_==-y||_!=y&&u[k-1]<u[k+1]?u[k+1]:u[k-1]+1)-_;T<o&&C<a&&e.charAt(T)==t.charAt(C);)T++,C++;if(u[k]=T,T>o)g+=2;else if(C>a)h+=2;else if(f){var w=l+m-_;if(w>=0&&w<c&&-1!=d[w]){var x=o-d[w];if(T>=x)return s(e,t,T,C)}}}for(var S=-y+v;S<=y-b;S+=2){for(var w=l+S,P=(x=S==-y||S!=y&&d[w-1]<d[w+1]?d[w+1]:d[w-1]+1)-S;x<o&&P<a&&e.charAt(o-x-1)==t.charAt(a-P-1);)x++,P++;if(d[w]=x,x>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],C=l+T-k;if(T>=(x=o-x))return s(e,t,T,C)}}}}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"),C="__ql-matcher",w=[[Node.TEXT_NODE,F],[Node.TEXT_NODE,L],["br",function(e,t){E(t,"\n")||t.insert("\n");return t}],[Node.ELEMENT_NODE,L],[Node.ELEMENT_NODE,I],[Node.ELEMENT_NODE,N],[Node.ELEMENT_NODE,A],[Node.ELEMENT_NODE,function(e,t){var n={},i=e.style||{};i.fontStyle&&"italic"===$(e).fontStyle&&(n.italic=!0);i.fontWeight&&($(e).fontWeight.startsWith("bold")||parseInt($(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||!E(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",O.bind(O,"bold")],["i",O.bind(O,"italic")],["style",function(){return new r.default}]],x=[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=[],w.concat(i.options.matchers).forEach(function(e){var t=o(e,2),a=t[0],s=t[1];(n.matchVisual||s!==N)&&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[C]||[]).reduce(function(e,t){return t(a,e)},s)),o.concat(s)},new r.default):new r.default}(this.container,s,l);return E(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[C]=e[C]||[],e[C].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){if(e.nodeType!==Node.ELEMENT_NODE)return{};return e["__ql-computed-style"]||(e["__ql-computed-style"]=window.getComputedStyle(e))}function E(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 D(e){if(0===e.childNodes.length)return!1;var t=$(e);return["block","list-item"].indexOf(t.display)>-1}function O(e,t,n){return T(n,e,!0)}function A(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=x[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 L(e,t){return E(t,"\n")||(D(e)||t.length()>0&&e.nextSibling&&D(e.nextSibling))&&t.insert("\n"),t}function N(e,t){if(D(e)&&null!=e.nextElementSibling&&!E(t,"\n\n")){var n=e.offsetHeight+parseFloat($(e).marginTop)+parseFloat($(e).marginBottom);e.nextElementSibling.offsetTop>e.offsetTop+1.5*n&&t.insert("\n")}return t}function F(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.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&&D(e.parentNode)||null!=e.previousSibling&&D(e.previousSibling))&&(n=n.replace(/^\s+/,i.bind(i,!1))),(null==e.nextSibling&&D(e.parentNode)||null!=e.nextSibling&&D(e.nextSibling))&&(n=n.replace(/\s+$/,i.bind(i,!1)))}return t.insert(n)}P.DEFAULTS={matchers:[],matchVisual:!0},t.default=P,t.matchAttributor=A,t.matchBlot=I,t.matchNewline=L,t.matchSpacing=N,t.matchText=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=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=N(n(29)),o=n(36),a=n(38),s=n(64),r=N(n(65)),l=N(n(66)),c=n(67),u=N(c),d=n(37),p=n(26),m=n(39),f=n(40),h=N(n(56)),g=N(n(68)),v=N(n(27)),b=N(n(69)),y=N(n(70)),_=N(n(71)),k=N(n(72)),C=N(n(73)),w=n(13),x=N(w),S=N(n(74)),P=N(n(75)),T=N(n(57)),$=N(n(41)),E=N(n(28)),D=N(n(59)),O=N(n(60)),A=N(n(61)),I=N(n(108)),L=N(n(62));function N(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":x.default,"formats/header":l.default,"formats/list":u.default,"formats/bold":h.default,"formats/code":w.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":C.default,"formats/list/item":c.ListItem,"modules/formula":S.default,"modules/syntax":P.default,"modules/toolbar":T.default,"themes/bubble":I.default,"themes/snow":L.default,"ui/icons":$.default,"ui/picker":E.default,"ui/icon-picker":O.default,"ui/color-picker":D.default,"ui/tooltip":A.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},792:function(e,t,n){"use strict";var i=n(668),o=n(0),a=n.n(o),s=n(678),r=n(336);t.a={mixins:[s.a,i.a,r.a],data:function(){return{event:null,bookingCreatedCount:0,attributes:[{highlight:{backgroundColor:"#ddd"},dates:[]}],selectedRecurringDate:null,recurringDates:null,updateStatusDisabled:!1,recurringPeriods:[{label:this.$root.labels.recurring_type_weekly,value:"weekly"},{label:this.$root.labels.recurring_type_monthly,value:"monthly"},{label:this.$root.labels.recurring_type_yearly,value:"yearly"}],colors:["#1788FB","#4BBEC6","#FBC22D","#FA3C52","#D696B8","#689BCA","#26CC2B","#FD7E35","#E38587","#774DFB"],options:{fetched:!1,entities:{settings:{payments:{wc:null},general:{usedLanguages:[]}},employees:[],locations:[],tags:[]}},searchCounter:0,loadingEvents:!1,searchEventsTimer:null,searchedEvents:[],searchEventsQuery:""}},methods:{showDialogEditEvent:function(e){this.dialogEvent=!0,this.event=null,this.getEvent(e)},closeDialogEvent:function(){this.dialogEvent=!1},getInitEventObject:function(){return{id:0,parentId:null,name:"",periods:[{id:null,eventId:null,range:null,startTime:null,endTime:null,bookings:[]}],bookingStartsNow:!0,bookingStartsDate:null,bookingStartsTime:null,bookingEndsAfter:!0,bookingEndsDate:null,bookingEndsTime:null,bookingOpensRec:"same",bookingClosesRec:"same",ticketRangeRec:"calculate",isRecurring:!1,recurring:{cycle:null,order:null,until:null,cycleInterval:null},bringingAnyone:!0,bookMultipleTimes:!0,maxCapacity:null,maxCustomCapacity:null,maxExtraPeople:null,price:0,locationId:null,customLocation:null,providers:this.getInitEventProviders(),tags:[],description:null,gallery:[],colorType:2,selectedColor:"#1788FB",customColor:"#1788FB",show:!0,places:0,addToCalendarData:null,showAddToCalendar:!1,showEventDetails:!1,showEventBooking:!1,translations:null,canceling:!1,deleting:!1,bookable:!0,deposit:0,depositPayment:"disabled",depositPerPerson:1,customTickets:[],settings:this.getInitEntitySettings("event"),closeAfterMin:null,closeAfterMinBookings:!1,aggregatedPrice:!0}},showDialogNewEvent:function(){this.event=this.getInitEventObject(),this.dialogEvent=!0},getEvent:function(e){var t=this,n=null,i="";void 0!==this.$store&&void 0!==this.$store.state.cabinet&&"provider"===this.$store.state.cabinet.cabinetType&&(i=""===this.$store.state.cabinet.timeZone?"UTC":this.$store.state.cabinet.timeZone,n=Object.assign(this.getAuthorizationHeaderObject(),{params:{source:"cabinet-"+this.$store.state.cabinet.cabinetType,timeZone:i}})),void 0===this.$store&&"provider"===this.$root.settings.role&&1===this.options.entities.employees.length&&this.options.entities.employees[0].timeZone&&(n=Object.assign({params:{timeZone:this.options.entities.employees[0].timeZone}})),this.$http.get(this.$root.getAjaxUrl+"/events/"+e,n).then(function(e){var n=Object.assign(t.getInitEventObject(),e.data.data.event),o=[],s=t;e.data.data.event.periods.forEach(function(e){"UTC"===i&&(e.periodStart=s.getConvertedUtcToLocalDateTime(e.periodStart),e.periodEnd=s.getConvertedUtcToLocalDateTime(e.periodEnd));var t=a()(e.periodStart,"YYYY-MM-DD HH:mm:ss"),n=a()(e.periodEnd,"YYYY-MM-DD HH:mm:ss"),r=e.periodStart.split(" ")[1].substring(0,5),l=e.periodEnd.split(" ")[1].substring(0,5);"00:00"===l&&(n.subtract(1,"days"),l="24:00"),o.push({id:e.id?e.id:null,eventId:e.eventId?e.eventId:null,range:{start:t.toDate(),end:n.toDate()},startTime:r,endTime:l,bookings:e.bookings,zoomMeeting:e.zoomMeeting,lessonSpace:e.lessonSpace,googleCalendarEventId:e.googleCalendarEventId,googleMeetUrl:e.googleMeetUrl,outlookCalendarEventId:e.outlookCalendarEventId,microsoftTeamsUrl:e.microsoftTeamsUrl,appleCalendarEventId:e.appleCalendarEventId})}),n.periods=o;var r=[];n.tags.forEach(function(e){r.push(e.name)}),n.tags=r,null===n.recurring?n.recurring={cycle:null,until:null,order:null}:(n.isRecurring=!0,n.recurring.cycleInterval=null===e.data.data.event.recurring.cycleInterval?1:e.data.data.event.recurring.cycleInterval,n.recurring.until=e.data.data.event.recurring.until?a()(e.data.data.event.recurring.until).toDate():null),n.bookingStartsNow=null===e.data.data.event.bookingOpens,n.bookingStartsDate=e.data.data.event.bookingOpens?a()(e.data.data.event.bookingOpens).toDate():null,n.bookingStartsTime=e.data.data.event.bookingOpens?e.data.data.event.bookingOpens.split(" ")[1].substring(0,5):null,n.bookingEndsAfter=null===e.data.data.event.bookingCloses,n.bookingEndsDate=e.data.data.event.bookingCloses?a()(e.data.data.event.bookingCloses).toDate():null,n.bookingEndsTime=e.data.data.event.bookingCloses?e.data.data.event.bookingCloses.split(" ")[1].substring(0,5):null,n.zoomUserId=e.data.data.event.zoomUserId,n.organizerId=e.data.data.event.organizerId,n.closeAfterMin=e.data.data.event.closeAfterMin,n.closeAfterMinBookings=e.data.data.event.closeAfterMinBookings,n.aggregatedPrice=e.data.data.event.aggregatedPrice;var l=n.bookings;l.forEach(function(e){if(e.info){var t=JSON.parse(e.info);e.customer.firstName=t.firstName,e.customer.lastName=t.lastName,e.customer.phone=t.phone}else{var n=s.getCustomerById(e.customerId);e.customer.firstName=n?n.firstName:s.$root.labels.customer+" "+e.customerId,e.customer.lastName=n?n.lastName:"",e.customer.phone=n?n.phone:""}e.show=!0,e.removing=!1,e.checked=!1,"[]"!==e.customFields&&null!==e.customFields||(e.customFields="{}"),e.payments=e.payments.sort(function(e,t){return new Date(e.dateTime)-new Date(t.dateTime)}),e.customFields=JSON.parse(e.customFields)});var c=!1;t.colors.forEach(function(e){e===n.color&&(n.colorType=1,n.selectedColor=e,n.customColor=e,c=!0)}),c||(n.colorType=2,n.selectedColor=null,n.customColor=n.color),n.gallery=n.gallery.sort(function(e,t){return e.position>t.position?1:-1}),t.eventBookings=l,t.setEntitySettings(n,"event"),null===n.deposit&&(n.deposit=0),t.event=n,t.bookingCreatedCount++}).catch(function(e){console.log(e.message)})},getInitEventProviders:function(){return"provider"===this.$root.settings.role&&this.$root.settings.roles.allowWriteEvents?this.options.entities.employees:[]},handleDateTimeFormat:function(e){return[this.getFrontedFormattedDate(e.split(" ")[0]),this.getFrontedFormattedTime(e.split(" ")[1])]},showDialogAttendees:function(e){this.eventBookings=null,this.dialogAttendees=!0,this.getEvent(e)},searchEvents:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!e||i.length<this.$root.settings.general.eventsFilterLimit)return this.loadingEvents=!0,this.searchedEvents=i,void setTimeout(function(){t.loadingEvents=!1},500);this.searchEventsQuery=e,clearTimeout(this.searchEventsTimer),this.loadingEvents=!0,this.searchCounter++,this.searchEventsTimer=setTimeout(function(){var i=t.searchCounter;t.$http.get(t.$root.getAjaxUrl+"/events",{params:{search:e,page:1,limit:t.$root.settings.general.eventsFilterLimit,skipCount:1,dates:[a()().format("YYYY-MM-DD")]}}).then(function(e){i>=t.searchCounter&&(t.searchedEvents=n?t.groupRecurringEvents(e.data.data.events):e.data.data.events),t.loadingEvents=!1}).catch(function(e){t.loadingEvents=!1})},500)},getNotRetrievedEvents:function(e,t,n){var i=e.map(function(e){return e.id}),o=[];return t.forEach(function(e){o=o.concat(e[n].filter(function(e){return-1===i.indexOf(e.id)}))}),o},groupRecurringEvents:function(e){var t=this,n=[];if(e)for(var i=function(i){var o=e[i];if("approved"!==o.status)return"continue";if(n.find(function(e){return(e.id===o.parentId||e.parentId===o.parentId)&&null!==o.parentId}))return"continue";var a=n.find(function(e){return e.name===o.name&&e.id!==o.id});a?(o.displayName=o.name+" ("+t.getFrontedFormattedDateTime(o.periods[0].periodStart)+")",a.displayName=a.name+" ("+t.getFrontedFormattedDateTime(a.periods[0].periodStart)+")",n.push(o)):n.push(o)},o=0;o<e.length;o++)i(o);return n}},watch:{}}},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:[]}},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,C,w,x,S,P,T,$=[],E=!1,D=!1,O=!1,A=[],I=!1,L=!1,N=[],F=/\s+/g,B="Sortable"+(new Date).getTime(),j=window,M=j.document,R=j.parseInt,q=j.setTimeout,U=j.jQuery||j.Zepto,z=j.Polymer,Y={capture:!1,passive:!1},H=!!navigator.userAgent.match(/(?:Trident.*rv[ :]?11\.|msie|iemobile)/i),V=!!navigator.userAgent.match(/Edge/i),G=!!navigator.userAgent.match(/firefox/i),Z=!(!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=V||H?"cssFloat":"float",K="draggable"in M.createElement("div"),X=function(){if(H)return!1;var e=M.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=we(e),i=R(n.width)-R(n.paddingLeft)-R(n.paddingRight)-R(n.borderLeftWidth)-R(n.borderRightWidth),o=De(e,0,t),a=De(e,1,t),s=o&&we(o),r=a&&we(a),l=s&&R(s.marginLeft)+R(s.marginRight)+qe(o).width,c=r&&R(r.marginLeft)+R(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=we(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===M.body)return re();if(i||t)return n;i=!0}}}while(n=n.parentNode);return re()},re=function(){return H?M.documentElement:M.scrollingElement},le=function(e,t,n){e.scrollLeft+=t,e.scrollTop+=n},ce=Fe(function(e,t,n,i){if(t.scroll){var o=n?n[B]: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,C,w,x,S,P=h,T=qe(P),D=T.top,O=T.bottom,A=T.left,I=T.right,L=T.width,N=T.height;if(g=P.scrollWidth,v=P.scrollHeight,b=we(P),x=P.scrollLeft,S=P.scrollTop,P===p?(C=L<g&&("auto"===b.overflowX||"scroll"===b.overflowX||"visible"===b.overflowX),w=N<v&&("auto"===b.overflowY||"scroll"===b.overflowY||"visible"===b.overflowY)):(C=L<g&&("auto"===b.overflowX||"scroll"===b.overflowX),w=N<v&&("auto"===b.overflowY||"scroll"===b.overflowY)),y=C&&(te(I-u)<=a&&x+L<g)-(te(A-u)<=a&&!!x),k=w&&(te(O-d)<=a&&S+N<v)-(te(D-d)<=a&&!!S),!$[f])for(var F=0;F<=f;F++)$[F]||($[F]={});$[f].vx==y&&$[f].vy==k&&$[f].el===P||($[f].el=P,$[f].vx=y,$[f].vy=k,clearInterval($[f].pid),!P||0==y&&0==k||(m=!0,$[f].pid=setInterval(function(){i&&0===this.layer&&(ve.active._emulateDragOver(!0),ve.active._onTouchMove(_,!0));var t=$[this.layer].vy?$[this.layer].vy*s:0,n=$[this.layer].vx?$[this.layer].vx*s:0;"function"==typeof c&&"continue"!==c.call(o,n,t,e,_,$[this.layer].el)||le($[this.layer].el,n,t)}.bind({layer:f}),24))),f++}while(t.bubbleScroll&&h!==p&&(h=se(h,!1)));E=m}},30),ue=function(){$.forEach(function(e){clearInterval(e.pid)}),$=[]},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[B]&&e.parentNode[B]._computeIsAligned(t)},me=function(){!X&&n&&we(n,"display","none")},fe=function(){!X&&n&&we(n,"display","")};M.addEventListener("click",function(e){if(O)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),O=!1,!1},!0);var he,ge=function(t){if(e){var n=function(e,t){for(var n=0;n<A.length;n++)if(!Oe(A[n])){var i=qe(A[n]),o=A[n][B].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 A[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[B]._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=Be({},t),e[B]=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:R(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&&K,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)),A.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[])}function be(e,t,n,i){if(e){n=n||M;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&Ne(e,t):Ne(e,t))||i&&e===n)return e;if(e===n)break}while(e=ye(e))}return null}function ye(e){return e.host&&e!==M&&e.host.nodeType?e.host:e.parentNode}function _e(e,t,n){e.addEventListener(t,n,!H&&Y)}function ke(e,t,n){e.removeEventListener(t,n,!H&&Y)}function Ce(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(F," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(F," ")}}function we(e,t,n){var i=e&&e.style;if(i){if(void 0===n)return M.defaultView&&M.defaultView.getComputedStyle?n=M.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 xe(e){var t="";do{var n=we(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[B]).options,f="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||H||V?(p=M.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[B],d=u.options.onMove;return!window.CustomEvent||H||V?(l=M.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 $e(e){e.draggable=!1}function Ee(){Q=!1}function De(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 Oe(e){for(var t=e.lastElementChild;t&&(t===n||"none"===we(t,"display"));)t=t.previousElementSibling;return t||null}function Ae(t){return Le(e)<Le(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 Le(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e&&(e=e.previousElementSibling);)"TEMPLATE"===e.nodeName.toUpperCase()||e===i||t&&!Ne(e,t)||n++;return n}function Ne(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 Fe(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 Be(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function je(e){return z&&z.dom?z.dom(e).cloneNode(!0):U?U(e).clone(!0)[0]:e.cloneNode(!0)}function Me(e){return q(e,0)}function Re(e){return clearTimeout(e)}function qe(e,t,n,i){if(e.getBoundingClientRect||e===j){var o,a,s,r,l,c,u;if(e!==j&&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!==j&&(n=n||e.parentNode,!H))do{if(n&&n.getBoundingClientRect&&"none"!==we(n,"transform")){var d=n.getBoundingClientRect();a-=d.top+R(we(n,"border-top-width")),s-=d.left+R(we(n,"border-left-width")),r=a+o.height,l=s+o.width;break}}while(n=n.parentNode);if(t&&e!==j){var p=xe(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=xe(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=M.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)||(C=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=Le(d),i=Le(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=M.elementFromPoint(i,o),s=this;if(n||V||H||Z){ce(t,s.options,a,n);var r=se(a,!0);!E||g&&i===v&&o===b||(g&&clearInterval(g),g=setInterval(function(){if(e){var a=se(M.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),Ce(e,g.chosenClass,!0)},g.ignore.split(",").forEach(function(t){Se(e,t.trim(),$e)}),_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&&(V||H)?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&&$e(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(M,"pointermove",this._onTouchMove):_e(M,n?"touchmove":"mousemove",this._onTouchMove):(_e(e,"dragend",this),_e(o,"dragstart",this._onDragStart));try{M.selection?Me(function(){M.selection.empty()}):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(t,n){if(D=!1,o&&e){this.nativeDraggable&&(_e(M,"dragover",this._handleAutoScroll),_e(M,"dragover",pe));var i=this.options;!t&&Ce(e,i.dragClass,!1),Ce(e,i.ghostClass,!0),we(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=M.elementFromPoint(_.clientX,_.clientY),i=n;n&&n.shadowRoot&&(n=n.shadowRoot.elementFromPoint(_.clientX,_.clientY))!==i;)i=n;if(i)do{if(i[B])if(i[B]._onDragOver({clientX:_.clientX,clientY:_.clientY,target:n,rootEl:i})&&!this.options.dragoverBubble)break;n=i}while(i=i.parentNode);e.parentNode[B]._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&&xe(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]-N[0]:0)/(l||1),p=(s.clientY-y.clientY+a.y)/(c||1)+(u?u[1]-N[1]:0)/(c||1),m=e.touches?"translate3d("+d+"px,"+p+"px,0)":"translate("+d+"px,"+p+"px)";if(!ve.active&&!D){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,we(n,"webkitTransform",m),we(n,"mozTransform",m),we(n,"msTransform",m),we(n,"transform",m),e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!n){var t=this.options.fallbackOnBody?M.body:o,i=qe(e,!0,t,!W),a=(we(e),this.options);if(W){for(P=t;"static"===we(P,"position")&&"none"===we(P,"transform")&&P!==M;)P=P.parentNode;if(P!==M){var s=qe(P,!0);i.top-=s.top,i.left-=s.left}P!==M.body&&P!==M.documentElement?(P===M&&(P=re()),i.top+=P.scrollTop,i.left+=P.scrollLeft):P=re(),N=ze(P)}Ce(n=e.cloneNode(!0),a.ghostClass,!1),Ce(n,a.fallbackClass,!0),Ce(n,a.dragClass,!0),we(n,"box-sizing","border-box"),we(n,"margin",0),we(n,"top",i.top),we(n,"left",i.left),we(n,"width",i.width),we(n,"height",i.height),we(n,"opacity","0.8"),we(n,"position",W?"absolute":"fixed"),we(n,"zIndex","100000"),we(n,"pointerEvents","none"),t.appendChild(n)}},_onDragStart:function(t,n){var a=this,s=t.dataTransfer,r=a.options;(i=je(e)).draggable=!1,i.style["will-change"]="",this._hideClone(),Ce(i,a.options.chosenClass,!1),a._cloneId=Me(function(){a.options.removeCloneOnHide||o.insertBefore(i,e),Pe(a,o,"clone",e)}),!n&&Ce(e,r.dragClass,!0),n?(O=!0,a._loopId=setInterval(a._emulateDragOver,50)):(ke(M,"mouseup",a._onDrop),ke(M,"touchend",a._onDrop),ke(M,"touchcancel",a._onDrop),s&&(s.effectAllowed="move",r.setData&&r.setData.call(a,s,e)),_e(M,"drop",a),we(e,"transform","translateZ(0)")),D=!0,a._dragStartId=Me(a._dragStarted.bind(a,n,t)),_e(M,"selectstart",a),Z&&we(M.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 Y(!1);if(c!==e&&(O=!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),Y(!0);var P=Oe(l);if(!P||function(e,t,n){var i=qe(Oe(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,H(),Y(!0)}else if(c&&c!==e&&c.parentNode===l){var $,E=0,D=c.sortableMouseAligned,A=e.parentNode!==l,N="vertical"===_?"top":"left",F=Ue(c,"top")||Ue(e,"top"),j=F?F.scrollTop:void 0;if(C!==c&&(x=null,$=qe(c)[N],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,_)&&D||A||F||d.invertSwap||"insert"===x||"swap"===x?("swap"!==x&&(L=d.invertSwap||A),E=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===w?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===w?c<d+S:c>p-S)return-1*w}else if(c>d+u*(1-o)/2&&c<p-u*(1-o)/2)return Ae(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,L,C===c),x="swap"):(E=Ae(c),x="insert"),0===E)return Y(!1);T=null,C=c,w=E,s=qe(c);var R=c.nextElementSibling,U=!1,z=Te(o,l,e,i,c,s,n,U=1===E);if(!1!==z)return 1!==z&&-1!==z||(U=1===z),Q=!0,q(Ee,30),v?g._hideClone():g._showClone(this),U&&!R?l.appendChild(e):c.parentNode.insertBefore(e,U?R:c),F&&le(F,0,j-F.scrollTop),t=e.parentNode,void 0===$||L||(S=te($-qe(c)[N])),H(),Y(!0)}if(l.contains(e))return Y(!1)}return!1}function Y(t){return t&&(v?g._hideClone():g._showClone(y),g&&(Ce(e,h?h.options.ghostClass:g.options.ghostClass,!1),Ce(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)&&(C=null),d.dragoverBubble||n.rootEl||c===M||(y._handleAutoScroll(n),e.parentNode[B]._computeIsAligned(n),!t&&ge(n)),!d.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),!0}function H(){Pe(y,o,"change",c,l,o,u,Le(e),p,Le(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=xe(this.el),s=a&&a.a,r=a&&a.d;we(n,"transition","none"),we(n,"transform","translate3d("+(t.left-o.left)/(s||1)+"px,"+(t.top-o.top)/(r||1)+"px,0)"),this._repaint(n),we(n,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),we(n,"transform","translate3d(0,0,0)")}"number"==typeof n.animated&&clearTimeout(n.animated),n.animated=q(function(){we(n,"transition",""),we(n,"transform",""),n.animated=!1},i)}},_repaint:function(e){return e.offsetWidth},_offMoveEvents:function(){ke(M,"touchmove",this._onTouchMove),ke(M,"pointermove",this._onTouchMove),ke(M,"dragover",ge),ke(M,"mousemove",ge),ke(M,"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(M,"selectstart",this)},_onDrop:function(s){var r=this.el,l=this.options;D=!1,E=!1,L=!1,I=!1,clearInterval(this._loopId),clearInterval(g),ue(),clearTimeout(he),he=void 0,clearTimeout(this._dragStartTimer),Re(this._cloneId),Re(this._dragStartId),ke(M,"mousemove",this._onTouchMove),this.nativeDraggable&&(ke(M,"drop",this),ke(r,"dragstart",this._onDragStart),ke(M,"dragover",this._handleAutoScroll),ke(M,"dragover",pe)),Z&&we(M.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),$e(e),e.style["will-change"]="",Ce(e,h?h.options.ghostClass:this.options.ghostClass,!1),Ce(e,this.options.chosenClass,!1),Pe(this,o,"unchoose",e,t,o,u,null,p,null,s),o!==t?(d=Le(e),m=Le(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=Le(e),m=Le(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=$.length=g=v=b=y=_=k=d=u=C=w=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[B]=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(),A.splice(A.indexOf(this.el),1),this.el=e=null},_hideClone:function(){i.cloneHidden||(we(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),we(i,"display",""),i.cloneHidden=!1):this._hideClone()}},_e(M,"touchmove",function(e){(ve.active||D)&&e.cancelable&&e.preventDefault()}),ve.utils={on:_e,off:ke,css:we,find:Se,is:function(e,t){return!!be(e,t,e,!1)},extend:Be,throttle:Fe,closest:be,toggleClass:Ce,clone:je,index:Le,nextTick:Me,cancelNextTick:Re,detectDirection:ae,getChild:De},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},814:function(e,t,n){e.exports=n(960)},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),C=n(657),w=n(661),x=n(706),S=n.n(x),P=n(698),T=n(708),$=n.n(T),E=n(664),D=n(673),O=n(337),A=n.n(O);t.default={mixins:[i.a,o.a,D.a,g.a,b.a,l.a,c.a,k.a,C.a,w.a,r.a,s.a,P.a,v.a,E.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:$.a,RecurringDates:S.a,DialogActions:d.a,LicenceBlockHeader:A.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:[]}},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:[]}},874:function(e,t,n){var i=n(90)(n(878),n(879),!1,null,null,null);e.exports=i.exports},877:function(e,t,n){"use strict";var i=n(660),o=n(672);t.a={mixins:[o.a,i.a],methods:{getInitEmployeeObject:function(){return{id:0,type:"provider",status:"visible",firstName:"",lastName:"",email:"",externalId:"",locationId:"",phone:"",countryPhoneIso:"",googleCalendar:[],outlookCalendar:[],note:"",description:"",pictureFullPath:"",pictureThumbPath:"",stripeConnect:null,serviceList:[],weekDayList:this.getSettingsSchedule(),specialDayList:[],dayOffList:[],show:!0}},getSettingsSchedule:function(){var e=[];return this.$root.settings.weekSchedule.forEach(function(t,n){var i=[];t.breaks.forEach(function(e){i.push({id:null,startTime:e.time[0]+":00",endTime:e.time[1]+":00"})});var o=[];null!==t.time[0]&&null!==t.time[1]&&("periods"in t?t.periods.forEach(function(e){o.push({id:null,startTime:e.time[0]+":00",endTime:e.time[1]+":00",locationIds:[],serviceIds:[],locationId:null,periodLocationList:[],periodServiceList:[],savedPeriodServiceList:[]})}):o.push({id:null,startTime:t.time[0]+":00",endTime:t.time[1]+":00",locationIds:[],serviceIds:[],locationId:null,periodLocationList:[],periodServiceList:[],savedPeriodServiceList:[]})),t.time[0]&&t.time[1]&&e.push({dayIndex:n+1,id:null,startTime:t.time[0]+":00",endTime:t.time[1]+":00",periodList:o,timeOutList:i})}),e},getEmployeeActivityLabel:function(e){switch(e){case"available":return this.$root.labels.available;case"away":return this.$root.labels.away;case"break":return this.$root.labels.break;case"busy":return this.$root.labels.busy;case"dayoff":return this.$root.labels.dayoff}},getParsedEditCategorizedServiceList:function(e,t){var n=this,i=[];return t.forEach(function(t){var o=[];t.serviceList.filter(function(t){return"visible"===t.status||"hidden"===t.status&&-1!==e.serviceList.map(function(e){return e.id}).indexOf(t.id)}).forEach(function(t){var i=null;if(e&&e.serviceList.forEach(function(e){e.id===t.id&&((i=Object.assign({},e)).customPricing=n.getArrayCustomPricing(e),i.state=!0)}),i)o.push(i);else{var a=Object.assign({},t);a.customPricing=n.getArrayCustomPricing(a),a.state=!1,o.push(a)}}),i.push({id:t.id,name:t.name,serviceList:o})}),i},getParsedServiceList:function(e){var t=[];return e.forEach(function(e){e.serviceList.forEach(function(e){e.state&&t.push(Object.assign({},e))})}),t},getParsedEditWeekDayList:function(e){for(var t=[],n=this,i=[this.$root.labels.weekday_monday,this.$root.labels.weekday_tuesday,this.$root.labels.weekday_wednesday,this.$root.labels.weekday_thursday,this.$root.labels.weekday_friday,this.$root.labels.weekday_saturday,this.$root.labels.weekday_sunday],o=0;o<7;o++)t.push({id:null,form:{type:null,isNew:null,index:null,show:!1,data:{}},day:i[o],time:[],breaks:[],periods:[]});return e&&e.weekDayList.forEach(function(e){var o=e.dayIndex-1;e.timeOutList.forEach(function(e){t[o].breaks.push({id:e.id,time:[e.startTime.substring(0,e.startTime.length-3),e.endTime.substring(0,e.endTime.length-3)]})}),t[o].periods=n.getParsedWeekDayPeriods(e),t[o].time=[e.startTime.substring(0,e.startTime.length-3),e.endTime.substring(0,e.endTime.length-3)],t[o].day=i[e.dayIndex-1],t[o].id=e.id}),t},getParsedWeekDayPeriods:function(e){var t=[];return e.periodList.forEach(function(e){t.push({time:[e.startTime.substring(0,e.startTime.length-3),e.endTime.substring(0,e.endTime.length-3)],id:e.id,locationIds:e.periodLocationList.length?e.periodLocationList.map(function(e){return e.locationId}):e.locationId?[e.locationId]:[],serviceIds:e.periodServiceList.map(function(e){return e.serviceId}),locationId:e.locationId,periodLocationList:e.periodLocationList,periodServiceList:e.periodServiceList,savedPeriodServiceList:JSON.parse(JSON.stringify(e.periodServiceList))})}),!t.length&&e.startTime&&e.endTime&&t.push({time:[e.startTime.substring(0,e.startTime.length-3),e.endTime.substring(0,e.endTime.length-3)],id:null,locationIds:[],serviceIds:[],locationId:null,periodLocationList:[],periodServiceList:[],savedPeriodServiceList:[]}),t},getParsedWeekDayList:function(e){var t=[],n=this;return e.forEach(function(e,i){var o=[];e.breaks.forEach(function(e){e.time&&e.time.length&&e.time[0]&&e.time[1]&&o.push({id:e.id,startTime:e.time[0]+":00",endTime:e.time[1]+":00"})});var a=[],s=86400,r=0;e.periods.forEach(function(e){if(e.time&&e.time.length&&e.time[0]&&e.time[1]){var t=n.getStringTimeInSeconds(e.time[0]),i=n.getStringTimeInSeconds(e.time[1]);s=t<s?t:s,r=i>r?i:r;var o=[];e.locationIds.forEach(function(t){var n=e.periodLocationList.find(function(e){return e.locationId===t});o.push({id:n?n.id:null,locationId:t})});var l=[];e.serviceIds.forEach(function(t){var n=e.periodServiceList.find(function(e){return e.serviceId===t});l.push({id:n?n.id:null,serviceId:t})}),a.push({id:e.id,startTime:e.time[0]+":00",endTime:e.time[1]+":00",locationId:e.locationId,periodLocationList:o,periodServiceList:l})}}),a.length&&t.push({id:e.id,dayIndex:i+1,startTime:n.secondsToTimeSelectStep(s)+":00",endTime:n.secondsToTimeSelectStep(r)+":00",timeOutList:o,periodList:a})}),t},sortEmployeesForRoundRobin:function(e){e=e.sort(function(e,t){return parseInt(e[0])-parseInt(t[0])});var t=!0,n=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){o.value;if(parseInt(e[0][0])>parseInt(this.lastBookedProviderId))break;e.push(e.shift())}}catch(e){n=!0,i=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw i}}return e}}}},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:[]}},880:function(e,t,n){"use strict";t.a={data:function(){return{count:{success:0,error:0}}},methods:{deleteEntities:function(e,t,n,i){var o=this;e.forEach(function(a){o.$http.post(o.$root.getAjaxUrl+"/"+o.name+"/delete/"+a).then(function(){o.deleteEntityResult(e,!0,t),n(a)}).catch(function(){o.deleteEntityResult(e,!1,t),i(a)})})},deleteEntityResult:function(e,t,n){e.pop(),t?this.count.success++:this.count.error++,0===e.length&&(this.count.success&&this.notify(this.$root.labels.success,this.count.success+" "+(this.count.success>1?this.successMessage.multiple:this.successMessage.single),"success"),this.count.error&&this.notify(this.$root.labels.error,this.count.error+" "+(this.count.error>1?this.errorMessage.multiple:this.errorMessage.single),"error"),this.count.success=0,this.count.error=0,n())}}}},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)}}}},891:function(e,t,n){var i=n(90)(n(892),n(896),!1,null,null,null);e.exports=i.exports},892:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(91),o=n(668),a=n(336),s=n(338),r=n.n(s),l=n(337),c=n.n(l),u=n(697),d=n.n(u),p=n(660),m=n(874),f=n.n(m),h=n(893),g=n.n(h),v=n(654),b=n(658),y=n(657),_=n(664),k=n(655),C=n(678),w=n(698),x=n(711),S=n(699),P=(n.n(S),n(0)),T=n.n(P),$=n(733),E=n.n($);function D(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)}t.default={mixins:[i.a,o.a,a.a,p.a,v.a,b.a,y.a,_.a,k.a,C.a,w.a,x.a],props:{selectedTimeZone:"",event:null,employees:null,locations:null,tags:null,settings:null,isCabinet:{required:!1,default:!1,type:Boolean},showHeader:{required:!1,default:!0,type:Boolean},showGallery:{required:!1,default:!0,type:Boolean}},data:function(){var e=this;return{maxExtraPeopleEnabled:!1,closeAfterMin:!1,currentUser:null,customPrice:0,calendarConflict:{enabled:!1},checkCalendarEvents:!1,customPricingEnabled:!1,customPricingByDateRangeEnabled:!1,customTickets:[],maxCustomCapacity:!1,maxCustomCapacityNum:1,soldTicketsIds:[],customTicketsDateRange:[],customTicketsDateRangesDisabledDates:[],customTicketsDateRangesSelected:[],monthDate:null,monthlyOnRepeat:"first",monthlyOnDay:"monday",monthlyRepeat:"each",weekDays:[{label:this.$root.labels.weekday_monday,value:"monday"},{label:this.$root.labels.weekday_tuesday,value:"tuesday"},{label:this.$root.labels.weekday_wednesday,value:"wednesday"},{label:this.$root.labels.weekday_thursday,value:"thursday"},{label:this.$root.labels.weekday_friday,value:"friday"},{label:this.$root.labels.weekday_saturday,value:"saturday"},{label:this.$root.labels.weekday_sunday,value:"sunday"}],activeColor:"white",depositEnabled:!1,depositPayment:"fixed",depositOptions:[{value:"fixed",label:this.$root.labels.amount_fixed},{value:"percentage",label:this.$root.labels.amount_percentage}],originRecurring:null,originPeriods:null,colors:["#1788FB","#4BBEC6","#FBC22D","#FA3C52","#D696B8","#689BCA","#26CC2B","#FD7E35","#E38587","#774DFB"],monthlyWeekDayRepeat:[{label:this.$root.labels.recurring_date_first,value:"first"},{label:this.$root.labels.recurring_date_second,value:"second"},{label:this.$root.labels.recurring_date_third,value:"third"},{label:this.$root.labels.recurring_date_fourth,value:"fourth"},{label:this.$root.labels.recurring_date_fifth,value:"fifth"},{label:this.$root.labels.recurring_date_last,value:"last"}],recurringPeriods:[{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"},{label:this.$root.labels.recurring_type_yearly,value:"yearly"}],zoomUsers:[],dialogLoading:!0,executeUpdate:!0,mounted:!1,rules:{name:[{required:!0,message:this.$root.labels.enter_name_warning,trigger:"submit"}],price:[{validator:function(t,n,i){n<0?i(new Error(e.$root.labels.enter_non_negative_price_warning)):i()},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.defaultEventTab="pricing",i(new Error(e.$root.labels.enter_positive_price_warning))):i()},trigger:"submit"}],range:[{required:!0,message:this.$root.labels.select_date_warning,trigger:"submit"}],startTime:[{required:!0,message:this.$root.labels.select_time_warning,trigger:"submit"}],endTime:[{required:!0,message:this.$root.labels.select_time_warning,trigger:"submit"}],bookingStartsDate:[{validator:function(t,n,i){e.event.bookingStartsNow||n?i():i(new Error(e.$root.labels.select_date_warning))},trigger:"submit"}],bookingStartsTime:[{validator:function(t,n,i){e.event.bookingStartsNow||n?i():i(new Error(e.$root.labels.select_time_warning))},trigger:"submit"}],bookingEndsDate:[{validator:function(t,n,i){e.event.bookingEndsAfter||n?i():i(new Error(e.$root.labels.select_date_warning))},trigger:"submit"}],bookingEndsTime:[{validator:function(t,n,i){e.event.bookingEndsAfter||n?i():i(new Error(e.$root.labels.select_time_warning))},trigger:"submit"}],recurringUntilDate:[{validator:function(t,n,i){e.event.recurring.until||n?i():i(new Error(e.$root.labels.select_date_warning))},trigger:"submit"}],recurringCycle:[{validator:function(t,n,i){e.event.recurring.cycle||n?i():i(new Error(e.$root.labels.select_cycle_warning))},trigger:"submit"}],recurringInterval:[{validator:function(t,n,i){e.event.recurring.cycleInterval||n?i():i(new Error(e.$root.labels.select_interval_warning))},trigger:"submit"}]},defaultEventTab:"details"}},methods:{hasPassed:function(){return this.event&&0!==this.event.id&&T()(this.event.periods[this.event.periods.length-1].range.end,"YYYY-MM-DD HH:mm:ss").isBefore(T()())},changeRecurringCycle:function(e){null!==this.event.recurring.cycleInterval&&void 0!==this.event.recurring.cycleInterval||(this.event.recurring.cycleInterval=1)},changeMaxExtraPeople:function(){this.maxExtraPeopleEnabled&&null===this.event.maxExtraPeople&&(this.event.maxExtraPeople=this.event.minCapacity-1)},createEventPeriods:function(){var e=this,t=[];return this.event.periods.forEach(function(n,i){var o=e.getDateString(n.range.start)+" "+n.startTime+":00",a=e.getDateString(n.range.end)+" "+n.endTime+":00";"UTC"===e.selectedTimeZone&&(o=T()(o,"YYYY-MM-DD HH:mm").utc().format("YYYY-MM-DD HH:mm"),a=T()(a,"YYYY-MM-DD HH:mm").utc().format("YYYY-MM-DD HH:mm")),void 0!==e.originPeriods[i]&&(n.id=e.originPeriods[i].id,n.eventId=e.originPeriods[i].eventId),t.push({id:n.id,eventId:e.event.id?e.event.id:null,periodStart:o,periodEnd:a,googleCalendarEventId:n.googleCalendarEventId,googleMeetUrl:n.googleMeetUrl,outlookCalendarEventId:n.outlookCalendarEventId,microsoftTeamsUrl:n.microsoftTeamsUrl,appleCalendarEventId:n.appleCalendarEventId})}),t},assignOrganizer:function(e){this.event.organizerId=e?this.currentUser.id:null,this.$forceUpdate()},confirmCalendarConflict:function(){this.$set(this.calendarConflict,"enabled",!1)},getTicketsSpots:function(){var e=0;return this.customTickets&&this.customTickets.forEach(function(t){e+=t.spots}),e},getMaxCapacity:function(){return this.maxCustomCapacity?this.maxCustomCapacityNum:this.customPricingEnabled?this.getTicketsSpots():this.event.maxCapacity},isTicketDisabled:function(e){var t=!1;return this.customTickets.filter(function(e){return e.enabled}).length<=1&&this.customTickets.forEach(function(n,i){e===i&&n.enabled&&(t=!0)}),t},customTicketNameChanged:function(e,t){if(this.customTicketsDateRange.length)for(var n=0;n<this.customTicketsDateRange.length;n++)this.customTicketsDateRange[n].tickets.map(function(n,i){n.name=i!==t?n.name:e})},switchTicketing:function(e){this.customPricingEnabled=e,e&&(this.setDisabledTicketRangeDates(null,!1),0===this.event.customTickets.length&&0===this.customTickets.length&&this.addCustomTicket())},ticketIsBooked:function(e){return!this.soldTicketsIds.includes(e)},deleteCustomTicket:function(e){if(this.customTickets=this.customTickets.filter(function(t,n){return n!==e}),this.customTicketsDateRange.length){for(var t=0;t<this.customTicketsDateRange.length;t++)this.customTicketsDateRange[t].tickets=this.customTicketsDateRange[t].tickets.filter(function(t,n){return n!==e}),this.customTicketsDateRange[t].tickets.length||(this.customTicketsDateRange=this.customTicketsDateRange.splice(t-1,1));this.customTickets.length||(this.customTicketsDateRange=[]);var n=!1;this.customTickets.filter(function(e){return e.enabled}).length<=1&&this.customTickets.forEach(function(e,t){e.enabled&&(n=!0)}),n||(this.customTickets[this.customTickets.length-1].enabled=!0)}},getStartTicketRangeDate:function(e,t){var n=this.event.bookingStartsDate?T()(this.event.bookingStartsDate):T()();if(t)return T()(n).format("YYYY-MM-DD").split("-");switch(e){case"date":return T()(n).toDate();case"moment":return T()(n);case"string":return T()(n).format("YYYY-MM-DD")}},getEndTicketRangeDate:function(e,t){var n=this.event.bookingEndsDate?T()(this.event.bookingEndsDate):T()(this.event.periods[0].range.start,"YYYY-MM-DD");if(t)return T()(n).format("YYYY-MM-DD").split("-");switch(e){case"date":return T()(n).toDate();case"moment":return T()(n);case"string":return T()(n).format("YYYY-MM-DD")}},getPeriodDates:function(e,t,n){for(var i=[];e.isSameOrBefore(t);){switch(n){case"date":i.push(T()(e).toDate());break;case"moment":i.push(T()(e));break;case"string":i.push(T()(e).format("YYYY-MM-DD"))}e.add(1,"days")}return i},clearRange:function(e){this.customTicketsDateRange[e].range=null,this.setDisabledTicketRangeDates(null,!1)},setDisabledTicketRangeDates:function(e,t){var n=this,i=[];this.customTicketsDateRange.forEach(function(t,o){if(t.range&&(null===e||e!==o)){var a=T()(t.range.start),s=T()(t.range.end);i=i.concat(n.getPeriodDates(a,s,"date"))}}),t?i.length&&this.customTicketsDateRange.length>=e&&this.customTicketsDateRange[e].range&&setTimeout(function(){n.customTicketsDateRangesSelected=i},200):this.customTicketsDateRangesSelected=i},deleteCustomTicketDateRange:function(e){this.customTicketsDateRange.splice(e,1),this.setDisabledTicketRangeDates(null,!1)},addCustomTicketDateRange:function(){for(var e=[],t=0;t<this.customTickets.length;t++)e.push({id:this.customTickets[t].id,name:this.customTickets[t].name,price:this.customTickets[t].price,enabled:this.customTickets[t].enabled});this.customTicketsDateRange.push({range:null,tickets:e}),this.setDisabledTicketRangeDates(null,!1)},addCustomTicket:function(){var e={id:0,enabled:!0,name:"",spots:1,waitingListSpots:0,price:0};this.customTickets.push(e),this.customTicketsDateRange.forEach(function(t){t.tickets.push(JSON.parse(JSON.stringify(e)))})},getCalendarEvents:function(){var e=this;return new Promise(function(t,n){if(e.event.organizerId&&e.event.periods&&e.event.name){var i=e.employees.find(function(t){return t.id===e.event.organizerId});if(i&&(i.googleCalendar||i.outlookCalendar)){var o=e.event.providers.concat(i);e.checkCalendarEvents=!0;var a=null;e.isCabinet&&(a=Object.assign(e.getAuthorizationHeaderObject(),{params:{source:"cabinet-"+e.$store.state.cabinet.cabinetType}})),e.$http.post(e.$root.getAjaxUrl+"/events/calendar",{providers:o,periods:e.createEventPeriods(),eventIds:[e.event.id,e.event.parentId],recurring:e.event.recurring},a).then(function(n){e.$set(e.calendarConflict,"enabled",!1),t(n)}).catch(function(n){e.$set(e.calendarConflict,"enabled",!0),t(n)}).finally(function(){e.checkCalendarEvents=!1})}else t(!0)}else t(!0)})},getMaxEndPeriod:function(){var e=this.event.periods.map(function(e){return e.range&&e.range.end}).filter(function(e){return e instanceof Date&&!isNaN(e)});return e.length>0?new Date(Math.max.apply(Math,D(e))):null},calculateMinDate:function(){if(this.event&&this.event.periods&&this.event.periods[0]&&this.event.periods[0].range){var e=this.event.periods[0].range.start;return new Date(e.getFullYear(),e.getMonth(),1)}},calculateMaxDate:function(){if(this.event&&this.event.periods&&this.event.periods[0]&&this.event.periods[0].range){var e=this.event.periods[0].range.start;return new Date(e.getFullYear(),e.getMonth()+1,0)}},depositEnabledChanged:function(){this.depositEnabled?this.event.depositPayment=this.depositPayment:this.event.depositPayment="disabled"},getTicketsMaxPrice:function(e){return e.length?Math.max.apply(Math,D(e.map(function(e){return e.price}))):0},depositChanged:function(){this.customPricingEnabled&&this.event.deposit>this.getTicketsMaxPrice(this.customTickets)&&"fixed"===this.depositPayment&&(this.event.deposit=this.getTicketsMaxPrice(this.customTickets)),!this.customPricingEnabled&&this.event.deposit>this.event.price&&"fixed"===this.depositPayment&&(this.event.deposit=this.event.price)},priceChanged:function(){this.customPricingEnabled&&this.event.deposit>this.getTicketsMaxPrice(this.customTickets)&&"fixed"===this.depositPayment&&(this.event.deposit=this.getTicketsMaxPrice(this.customTickets)),!this.customPricingEnabled&&this.event.deposit>this.event.price&&"fixed"===this.depositPayment&&(this.event.deposit=this.event.price)},canManage:function(){return"admin"===this.$root.settings.role||"manager"===this.$root.settings.role},galleryUpdated:function(e){this.event.gallery=e},validationFailCallback:function(){"disabled"!==this.event.depositPayment&&this.event.deposit<=0?this.defaultEventTab="pricing":this.defaultEventTab="details"},tagsChanged:function(e){var t=e[e.length-1];-1===this.tags.indexOf(t)&&this.tags.push(t)},haveSaveConfirmation:function(){return 0!==this.event.id&&this.originRecurring.until||this.calendarConflict.enabled},changeBookingStartsDate:function(){null===this.event.bookingStartsTime&&(this.event.bookingStartsTime="00:00")},changeBookingEndsDate:function(){null===this.event.bookingEndsTime&&(this.event.bookingEndsTime="00:00")},mergeTicketsWithSameDateRange:function(e){for(var t=e,n=0;n<t.length;n++)for(var i=n+1;i<t.length;i++)JSON.stringify(t[n].range)===JSON.stringify(t[i].range)&&(t[n].tickets.push(t[i].tickets[0]),t.splice(i,1),i--);return t},instantiateDialog:function(){var e=this;null!==this.event&&!0===this.executeUpdate&&(this.maxCustomCapacity=null!==this.event.maxCustomCapacity,this.maxCustomCapacityNum=this.maxCustomCapacity?this.event.maxCustomCapacity:1,this.maxExtraPeopleEnabled=null!==this.event.maxExtraPeople,this.event.notifyParticipants=!!this.event.notifyParticipants,this.event.customTickets&&this.event.customTickets.forEach(function(t){var n=JSON.parse(t.dateRanges);e.customTickets.push({id:t.id,enabled:t.enabled,name:t.name,spots:t.spots,waitingListSpots:t.waitingListSpots,price:t.price,translations:t.translations?t.translations:""}),n.length&&n.forEach(function(n){e.customTicketsDateRange.push({tickets:[{id:t.id,name:t.name,price:n.price,enabled:t.enabled}],range:{start:T()(n.startDate).toDate(),end:T()(n.endDate).toDate()}})}),e.setDisabledTicketRangeDates(null,!1)}),this.event.customPricing&&(this.customPricingEnabled=!0),this.customTickets.length&&this.event.bookings.forEach(function(t){t.ticketsData.forEach(function(t){-1===e.soldTicketsIds.indexOf(t.eventTicketId)&&e.soldTicketsIds.push(t.eventTicketId)})}),this.customTicketsDateRange.length&&(this.customTicketsDateRange=this.mergeTicketsWithSameDateRange(this.customTicketsDateRange),this.customPricingByDateRangeEnabled=!0),this.originPeriods=JSON.parse(JSON.stringify(this.event.periods)),this.originRecurring=JSON.parse(JSON.stringify(this.event.recurring)),this.event.recurring&&"monthly"===this.event.recurring.cycle&&this.event.recurring.monthlyRepeat&&(this.monthlyRepeat=this.event.recurring.monthlyRepeat),this.event.recurring&&"monthly"===this.event.recurring.cycle&&this.event.recurring.monthlyOnRepeat&&(this.monthlyOnRepeat=this.event.recurring.monthlyOnRepeat),this.event.recurring&&"monthly"===this.event.recurring.cycle&&this.event.recurring.monthlyOnDay&&(this.monthlyOnDay=this.event.recurring.monthlyOnDay),this.event.recurring&&"monthly"===this.event.recurring.cycle&&"each"===this.event.recurring.monthlyRepeat&&(this.event.recurring.monthDate?this.event.recurring.monthDate=T()(this.event.recurring.monthDate).toDate():this.event.recurring.monthDate=T()(this.event.periods[0].range.start).toDate()),this.event.periods[0].range&&T()(this.event.periods[0].range.start).format("YYYY-MM-DD HH:mm:ss")===this.event.bookingCloses&&(this.event.bookingEndsAfter=!0),this.closeAfterMin=null!==this.event.closeAfterMin,"disabled"===this.event.depositPayment?this.depositEnabled=!1:(this.depositEnabled=!0,this.depositPayment=this.event.depositPayment),null!==this.event.description&&this.event.description.startsWith("\x3c!-- Content --\x3e")&&(this.event.descriptionHtml=this.event.description),this.mounted=!0,this.executeUpdate=!1,this.dialogLoading=!1,this.isCabinet&&(this.activeColor="transparent"))},getZoomUsers:function(){var e=this,t=null;this.isCabinet&&(t=Object.assign(this.getAuthorizationHeaderObject(),{params:{source:"cabinet-"+this.$store.state.cabinet.cabinetType}})),this.$http.get(this.$root.getAjaxUrl+"/zoom/users",t).then(function(t){"data"in t.data&&"users"in t.data.data&&(e.zoomUsers=t.data.data.users)}).catch(function(t){e.notify(e.$root.labels.error,t.message,"error")})},clearValidation:function(){void 0!==this.$refs.event&&this.$refs.event.clearValidate()},getParsedEntity:function(e){var t=this,n=this.createEventPeriods();!this.originRecurring.until&&this.event.isRecurring&&(e=!0);var i=[];this.event.tags.forEach(function(e){i.push({name:e})});var o=this.prepareBookableEntityPaymentsForSave(JSON.parse(JSON.stringify(this.event.settings)));this.depositEnabled?this.event.depositPayment=this.depositPayment:this.event.depositPayment="disabled";for(var a=this.monthDate?this.monthDate:this.event.recurring.monthDate?this.event.recurring.monthDate:null,s=this.customTickets.map(function(e){return{id:e.id%1!=0?null:e.id,name:e.name,price:e.price,spots:e.spots,waitingListSpots:e.waitingListSpots,enabled:e.enabled,dateRanges:[],translations:e.translations}}),r=function(e){for(var n=0;n<t.customTicketsDateRange.length;n++)if(t.customTicketsDateRange[n].tickets.map(function(e){return e.name}).includes(s[e].name)){var i=t.customTicketsDateRange[n].tickets.filter(function(t){return t.name===s[e].name});t.customTicketsDateRange[n].range&&t.customTicketsDateRange[n].range.end&&t.customTicketsDateRange[n].range.start&&s[e].dateRanges.push({enabled:i[0].enabled,endDate:T()(t.customTicketsDateRange[n].range.end).format("YYYY-MM-DD"),startDate:T()(t.customTicketsDateRange[n].range.start).format("YYYY-MM-DD"),price:i[0].price})}},l=0;l<s.length;l++)r(l);s.forEach(function(e){e.dateRanges=JSON.stringify(e.dateRanges)});var c=JSON.parse(JSON.stringify(this.event.providers));if(this.currentUser&&"provider"===this.currentUser.type)if(this.event.organizerId===this.currentUser.id){var u=c.map(function(e){return e.id}).indexOf(this.event.organizerId);u>-1&&c.splice(u,1)}else if(!c.find(function(e){return e.id===t.currentUser.id})){var d=this.employees.find(function(e){return e.id===t.currentUser.id});c.push(d)}return{id:this.event.id,parentId:this.event.parentId,name:this.event.name,periods:n,utc:"UTC"===this.selectedTimeZone,timeZone:"UTC"===this.selectedTimeZone?null:this.selectedTimeZone,bookingOpens:this.event.bookingStartsNow?null:this.getDateString(this.event.bookingStartsDate)+" "+this.event.bookingStartsTime+":00",bookingCloses:this.event.bookingEndsAfter?null:this.getDateString(this.event.bookingEndsDate)+" "+this.event.bookingEndsTime+":00",bookingOpensRec:this.event.bookingOpensRec,bookingClosesRec:this.event.bookingClosesRec,recurring:this.event.isRecurring&&this.event.recurring?{monthlyRepeat:this.monthlyRepeat,monthDate:"each"===this.monthlyRepeat&&a?this.getDateString(a)+" "+this.getTimeString(n[0].periodStart)+":00":null,monthlyOnRepeat:"on"===this.monthlyRepeat?this.monthlyOnRepeat:null,monthlyOnDay:"on"===this.monthlyRepeat?this.monthlyOnDay:null,cycleInterval:this.event.recurring.cycleInterval,cycle:this.event.recurring.cycle,order:this.event.recurring.order,until:this.event.recurring.until?this.getDateString(this.event.recurring.until)+" "+this.getTimeString(this.event.recurring.until)+":00":null}:null,bringingAnyone:this.event.bringingAnyone,bookMultipleTimes:this.event.bookMultipleTimes,maxCapacity:this.event.maxCapacity,maxCustomCapacity:this.maxCustomCapacity?this.maxCustomCapacityNum:null,maxExtraPeople:this.maxExtraPeopleEnabled?this.event.maxExtraPeople:null,price:this.event.price,tags:i,providers:c,description:this.event.description,gallery:this.event.gallery,color:1===this.event.colorType?this.event.selectedColor:this.event.customColor,show:this.event.show,locationId:null!==this.event.locationId?this.event.locationId:null,customLocation:null===this.event.locationId?this.event.customLocation:null,applyGlobally:e,settings:JSON.stringify(o),zoomUserId:this.event.zoomUserId,translations:this.event.translations,deposit:this.event.deposit,depositPayment:this.event.depositPayment,depositPerPerson:this.event.depositPerPerson,fullPayment:this.event.fullPayment,customPricing:this.customPricingEnabled,organizerId:this.event.organizerId,closeAfterMin:this.closeAfterMin?this.event.closeAfterMin:null,closeAfterMinBookings:this.event.closeAfterMinBookings,customTickets:s,notifyParticipants:this.event.notifyParticipants,aggregatedPrice:this.event.aggregatedPrice}},errorCallback:function(e){var t=this;setTimeout(function(){"message"in e&&t.notify(t.$root.labels.error,e.message,"error")},200)},closeDialog:function(){this.$emit("closeDialog")},addEventDate:function(){this.event.periods.push({id:null,eventId:null,range:{start:new Date,end:new Date},startTime:null,endTime:null,bookings:[]})},deleteEventDate:function(e){this.event.periods.splice(e,1)},changeEventColor:function(e){this.event.colorType=1,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.event.selectedColor=e.target.getAttribute("data-color")},showDialogTranslate:function(e,t){this.$emit("showDialogTranslate",e,void 0!==t?t:[])},getCycleLabels:function(){var e="";switch(this.event.recurring.cycle){case"daily":e="day";break;case"weekly":e="week";break;case"monthly":e="month";break;case"yearly":e="year"}return this.event.recurring.cycleInterval&&e?this.event.recurring.cycleInterval>1?this.$root.labels[e+"s"].toLowerCase():this.$root.labels[e].toLowerCase():""}},mounted:function(){this.isCabinet?this.currentUser=this.$store.state.cabinet.clonedProfile:this.getCurrentUser(),this.instantiateDialog(),!this.$root.settings.zoom.enabled||this.$root.licence.isLite||this.$root.licence.isStarter||this.getZoomUsers()},updated:function(){this.instantiateDialog()},components:{LicenceBlock:r.a,LicenceBlockHeader:c.a,EntitySettings:f.a,DialogActions:d.a,ContentBlock:E.a,Money:S.Money,Gallery:g.a},computed:{monthDateComp:{get:function(){return this.event.recurring.monthDate?this.event.recurring.monthDate:(this.monthDate||this.event&&this.event.periods&&this.event.periods[0]&&this.event.periods[0].range&&(this.monthDate=this.event.periods[0].range.start),this.monthDate)},set:function(e){this.monthDate=e}}}}},893:function(e,t,n){var i=n(90)(n(894),n(895),!1,null,null,null);e.exports=i.exports},894:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(654),o=n(749),a=n.n(o),s=n(806),r=n.n(s);t.default={mixins:[i.a],props:{label:null,gallery:null},data:function(){return{clonedGallery:null,draggableOptions:{animation:150,group:"people",handle:".am-drag-handle"}}},mounted:function(){this.clonedGallery=JSON.parse(JSON.stringify(this.gallery))},methods:{galleryPictureSelected:function(e,t){this.clonedGallery.push({id:0,pictureFullPath:e,pictureThumbPath:t,position:this.clonedGallery.length+1}),this.$emit("galleryUpdated",this.clonedGallery)},deleteGalleryImage:function(e){this.clonedGallery.splice(e,1);for(var t=0;t<this.clonedGallery.length;t++)this.clonedGallery[t].position=t+1;this.$emit("galleryUpdated",this.clonedGallery)},dropGalleryImage:function(e){if(e.newIndex!==e.oldIndex){var t=this;this.clonedGallery.forEach(function(e){e.position=t.clonedGallery.indexOf(e)+1})}this.$emit("galleryUpdated",this.clonedGallery)}},components:{PictureUpload:r.a,Draggable:a.a}}},895:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"am-gallery-images"},[n("div",{staticClass:"am-event-section-title"},[e._v(e._s(e.label))]),e._v(" "),n("el-row",{attrs:{gutter:24}},[n("draggable",{attrs:{options:e.draggableOptions},on:{end:e.dropGalleryImage},model:{value:e.clonedGallery,callback:function(t){e.clonedGallery=t},expression:"clonedGallery"}},e._l(e.clonedGallery,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)},staticRenderFns:[]}},896:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"am-dialog-event-inner"},[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.event&&!e.dialogLoading?n("div",{staticClass:"am-dialog-scrollable",class:{"am-edit":0!==e.event.id}},[e.showHeader?n("div",{staticClass:"am-dialog-header"},[n("el-row",[n("el-col",{attrs:{span:18}},[e.event&&0!==e.event.id?n("h2",[e._v(e._s(e.$root.labels.edit_event))]):n("h2",[e._v(e._s(e.$root.labels.new_event))])]),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?n("el-form",{ref:"event",attrs:{model:e.event,"label-position":"top"}},[n("el-tabs",{model:{value:e.defaultEventTab,callback:function(t){e.defaultEventTab=t},expression:"defaultEventTab"}},[n("el-tab-pane",{attrs:{label:e.$root.labels.event_details,name:"details"}},[n("el-form-item",{attrs:{prop:"name",rules:e.rules.name},on:{input:function(t){return e.clearValidation()}}},[e._v("\n "+e._s(e.$root.labels.event_name)+"\n "),e.isCabinet?e._e():n("div",{staticClass:"am-event-translate",on:{click:function(t){return e.showDialogTranslate("name")}}},[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",{staticStyle:{"margin-top":"5px !important"},attrs:{placeholder:e.$root.labels.enter_event_name},on:{change:function(t){return e.trimProperty(e.event,"name")}},model:{value:e.event.name,callback:function(t){e.$set(e.event,"name",t)},expression:"event.name"}})],1),e._v(" "),n("div",{staticClass:"am-event-dates am-section-grey"},[e._l(e.event.periods,function(t,i){return n("div",{key:i,staticClass:"am-event-date"},[n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{sm:6}},[n("p",[e._v(e._s(e.$root.labels.event_period_dates))])]),e._v(" "),n("el-col",{staticClass:"v-calendar-column",attrs:{sm:16}},[n("el-form-item",{attrs:{prop:"periods."+i+".range",rules:e.rules.range}},[n("v-date-picker",{staticStyle:{"margin-bottom":"16px"},attrs:{mode:"range","input-class":"el-input__inner","popover-visibility":"focus","popover-direction":"bottom","popover-align":e.screenWidth<768?"center":"right","show-day-popover":!1,attributes:[{dates:{start:e.getNowDate()},eventDateIndex:i}],"is-expanded":!1,"is-required":!1,"is-read-only":!0,"is-double-paned":!1,"tint-color":e.isCabinet?e.$root.settings.customization.primaryColor:"#1A84EE","input-props":{class:"el-input__inner",readOnly:"readonly"},formats:e.vCalendarFormats,"available-dates":{start:e.getNowDate()}},on:{input:function(t){return e.setDisabledTicketRangeDates(null,!1)}},model:{value:t.range,callback:function(n){e.$set(t,"range",n)},expression:"period.range"}})],1)],1)],1),e._v(" "),n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{sm:6}},[n("p",[e._v(e._s(e.$root.labels.event_period_time))])]),e._v(" "),n("el-col",{staticClass:"am-event-period-start",attrs:{sm:8}},[n("el-form-item",{attrs:{prop:"periods."+i+".startTime",rules:e.rules.startTime}},[n("el-time-select",{attrs:{"picker-options":e.getTimeSelectOptionsWithLimits(null,t.endTime),"popper-class":"am-dropdown-cabinet",size:"large"},model:{value:t.startTime,callback:function(n){e.$set(t,"startTime",n)},expression:"period.startTime"}})],1)],1),e._v(" "),n("el-col",{attrs:{sm:8}},[n("el-form-item",{attrs:{prop:"periods."+i+".endTime",rules:e.rules.endTime}},[n("el-time-select",{attrs:{"picker-options":e.getTimeSelectOptionsWithLimits(t.startTime,null),"popper-class":"am-dropdown-cabinet",size:"large"},model:{value:t.endTime,callback:function(n){e.$set(t,"endTime",n)},expression:"period.endTime"}})],1)],1)],1),e._v(" "),e.$root.settings.zoom.enabled&&t.zoomMeeting&&!e.$root.licence.isLite&&!e.$root.licence.isStarter?n("el-row",{attrs:{gutter:10}},["customer"!==e.$root.settings.role?n("el-col",{attrs:{sm:12}},[n("p",[e._v(e._s(e.$root.labels.zoom_start_link))])]):e._e(),e._v(" "),"customer"!==e.$root.settings.role?n("el-col",{attrs:{sm:12}},[n("p",[n("a",{staticClass:"am-link",attrs:{href:t.zoomMeeting.startUrl}},[e._v(e._s(e.$root.labels.zoom_click_to_start))])])]):e._e(),e._v(" "),n("el-col",{attrs:{sm:12}},[n("p",[e._v(e._s(e.$root.labels.zoom_join_link))])]),e._v(" "),n("el-col",{attrs:{sm:12}},[n("p",[n("a",{staticClass:"am-link",attrs:{href:t.zoomMeeting.joinUrl}},[e._v(e._s(e.$root.labels.zoom_click_to_join))])])])],1):e._e(),e._v(" "),e.$root.settings.googleCalendar.googleMeetEnabled&&t.googleMeetUrl&&!e.$root.licence.isLite&&!e.$root.licence.isStarter?n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{sm:12}},[n("p",[e._v(e._s(e.$root.labels.google_meet_link))])]),e._v(" "),n("el-col",{attrs:{sm:12}},[n("p",[n("a",{staticClass:"am-link",attrs:{href:t.googleMeetUrl}},[e._v(e._s(e.$root.labels.google_meet_join))])])])],1):e._e(),e._v(" "),e.$root.settings.outlookCalendar.microsoftTeamsEnabled&&t.microsoftTeamsUrl&&!e.$root.licence.isLite&&!e.$root.licence.isStarter?n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{sm:12}},[n("p",[e._v(e._s(e.$root.labels.microsoft_teams_link))])]),e._v(" "),n("el-col",{attrs:{sm:12}},[n("p",[n("a",{staticClass:"am-link",attrs:{href:t.microsoftTeamsUrl}},[e._v(e._s(e.$root.labels.microsoft_teams_join))])])])],1):e._e(),e._v(" "),e.$root.settings.lessonSpace.enabled&&t.lessonSpace?n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{sm:12}},[n("p",[e._v(e._s(e.$root.labels.lesson_space_link))])]),e._v(" "),n("el-col",{attrs:{sm:12}},[n("p",[n("a",{staticClass:"am-link",attrs:{href:t.lessonSpace}},[e._v(e._s(e.$root.labels.lesson_space_join))])])])],1):e._e(),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.event.periods.length>1&&0===t.bookings.length,expression:"event.periods.length > 1 && period.bookings.length === 0"}],staticClass:"am-delete-element disabled",on:{click:function(t){return e.deleteEventDate(i)}}},[n("i",{staticClass:"el-icon-minus"})])],1)}),e._v(" "),n("div",{staticClass:"am-add-event-date"},[n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.addEventDate()}}},[e._v(e._s(e.$root.labels.add_date))])],1)],2),e._v(" "),e.isCabinet&&e.notInLicence()?e._e():n("div",{staticClass:"am-section-grey",class:e.licenceClass()},[n("el-checkbox",{attrs:{disabled:e.notInLicence()},on:{change:e.changeRecurringCycle},model:{value:e.event.isRecurring,callback:function(t){e.$set(e.event,"isRecurring",t)},expression:"event.isRecurring"}},[e._v("\n "+e._s(e.$root.labels.event_recurring_enabled)+"\n ")]),e._v(" "),e.event.isRecurring?n("div",{staticClass:"am-recurring-event"},[n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:10,md:10,sm:24}},[n("p",[e._v(e._s(e.$root.labels.event_recurring_period))])]),e._v(" "),n("el-col",{attrs:{lg:14,md:14,sm:24}},[n("el-form-item",{attrs:{prop:"recurringCycle",rules:e.rules.recurringCycle}},[n("el-select",{attrs:{clearable:"",filterable:"",placeholder:e.$root.labels.select_repeat_period,"popper-class":"am-dropdown-cabinet",disabled:!(0===e.event.id||0!==e.event.id&&null===e.originRecurring.cycle)},model:{value:e.event.recurring.cycle,callback:function(t){e.$set(e.event.recurring,"cycle",t)},expression:"event.recurring.cycle"}},e._l(e.recurringPeriods,function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1)],1)],1),e._v(" "),n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:10,md:10,sm:24}},[n("p",[e._v(e._s(e.$root.labels.recurring_every))])]),e._v(" "),n("el-col",{attrs:{lg:14,md:14,sm:24}},[n("el-form-item",{attrs:{prop:"recurringInterval",rules:e.rules.recurringInterval}},[n("div",{staticClass:"am-recurring-event-interval"},[n("el-input-number",{staticStyle:{width:"150px"},attrs:{min:1,disabled:0!==e.event.id&&null!==e.originRecurring.cycle},model:{value:e.event.recurring.cycleInterval,callback:function(t){e.$set(e.event.recurring,"cycleInterval",t)},expression:"event.recurring.cycleInterval"}}),e._v(" "),n("span",{staticStyle:{"margin-left":"16px"}},[e._v(e._s(e.getCycleLabels()))])],1)])],1)],1),e._v(" "),0===e.event.id&&"monthly"===e.event.recurring.cycle||0!==e.event.id&&"each"===e.originRecurring.monthlyRepeat&&"monthly"===e.originRecurring.cycle?n("el-row",{attrs:{gutter:10}},[n("el-col",{staticClass:"text-center",attrs:{lg:10,md:10,sm:24}},[0===e.event.id||0!==e.event.id&&null===e.originRecurring.cycle?n("el-radio",{attrs:{label:"each"},model:{value:e.monthlyRepeat,callback:function(t){e.monthlyRepeat=t},expression:"monthlyRepeat"}},[e._v("\n "+e._s(e.$root.labels.recurring_each)+"\n ")]):n("p",[e._v("\n "+e._s(e.$root.labels.recurring_each)+"\n ")])],1),e._v(" "),n("el-col",{staticClass:"v-calendar-column",attrs:{lg:14,md:14,sm:24}},[n("el-form-item",["each"===e.monthlyRepeat&&(0===e.event.id||0!==e.event.id&&null===e.originRecurring.cycle)?n("v-date-picker",{attrs:{mode:"single","input-class":"el-input__inner","popover-visibility":"focus","popover-direction":e.screenWidth<768?"bottom":"top","popover-align":(e.screenWidth,"center"),"tint-color":e.isCabinet?e.$root.settings.customization.primaryColor:"#1A84EE","is-expanded":!1,"is-required":!1,"is-double-paned":!1,"show-day-popover":!1,"input-props":{class:"el-input__inner",readOnly:"readonly"},formats:e.vCalendarFormats,"min-date":e.calculateMinDate(),"max-date":e.calculateMaxDate()},model:{value:e.monthDateComp,callback:function(t){e.monthDateComp=t},expression:"monthDateComp"}}):n("el-input",{attrs:{disabled:!0,value:e.event.recurring&&e.event.recurring.monthDate?e.getFrontedFormattedDate(e.getDatabaseFormattedDate(e.event.recurring.monthDate)):""}})],1)],1)],1):e._e(),e._v(" "),0===e.event.id&&"monthly"===e.event.recurring.cycle||0!==e.event.id&&"on"===e.originRecurring.monthlyRepeat&&"monthly"===e.originRecurring.cycle?n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:10,md:10,sm:24}},[0===e.event.id||0!==e.event.id&&null===e.originRecurring.cycle?n("el-radio",{attrs:{label:"on"},model:{value:e.monthlyRepeat,callback:function(t){e.monthlyRepeat=t},expression:"monthlyRepeat"}},[e._v("\n "+e._s(e.$root.labels.recurring_on)+"\n ")]):n("p",[e._v(e._s(e.$root.labels.recurring_on))])],1),e._v(" "),n("el-col",{staticClass:"text-center",attrs:{lg:14,md:14,sm:24}},[n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("el-form-item",[n("el-select",{attrs:{clearable:"",filterable:"",placeholder:e.monthlyWeekDayRepeat[0].label,"popper-class":"am-dropdown-cabinet",disabled:"each"===e.monthlyRepeat||!(0===e.event.id||0!==e.event.id&&null===e.originRecurring.cycle)},model:{value:e.monthlyOnRepeat,callback:function(t){e.monthlyOnRepeat=t},expression:"monthlyOnRepeat"}},e._l(e.monthlyWeekDayRepeat,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:{lg:12,md:12,sm:24}},[n("el-form-item",[n("el-select",{attrs:{clearable:"",filterable:"",placeholder:e.weekDays[0].label,"popper-class":"am-dropdown-cabinet",disabled:"each"===e.monthlyRepeat||!(0===e.event.id||0!==e.event.id&&null===e.originRecurring.cycle)},model:{value:e.monthlyOnDay,callback:function(t){e.monthlyOnDay=t},expression:"monthlyOnDay"}},e._l(e.weekDays,function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1)],1)],1)],1)],1):e._e(),e._v(" "),n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:10,md:10,sm:24}},[n("p",[e._v(e._s(e.$root.labels.event_recurring_until))])]),e._v(" "),n("el-col",{staticClass:"v-calendar-column",attrs:{lg:14,md:14,sm:24}},[n("el-form-item",{attrs:{prop:"recurringUntilDate",rules:e.rules.recurringUntilDate}},[n("v-date-picker",{attrs:{mode:"single","input-class":"el-input__inner","popover-visibility":"focus","is-expanded":!1,"is-required":!1,"is-double-paned":!1,"show-day-popover":!1,"popover-direction":e.screenWidth<768?"bottom":"top","popover-align":(e.screenWidth,"center"),"tint-color":e.isCabinet?e.$root.settings.customization.primaryColor:"#1A84EE","input-props":{class:"el-input__inner",readOnly:"readonly"},formats:e.vCalendarFormats,"available-dates":{start:0===e.event.id?e.getNowDate():e.originRecurring.until}},on:{dayclick:e.changeBookingEndsDate},model:{value:e.event.recurring.until,callback:function(t){e.$set(e.event.recurring,"until",t)},expression:"event.recurring.until"}})],1)],1)],1)],1):e._e(),e._v(" "),n("LicenceBlock")],1),e._v(" "),n("div",{staticClass:"am-section-grey"},[n("el-checkbox",{model:{value:e.event.bookingStartsNow,callback:function(t){e.$set(e.event,"bookingStartsNow",t)},expression:"event.bookingStartsNow"}},[e._v(e._s(e.$root.labels.event_booking_opens_now))]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.event.bookingStartsNow,expression:"!event.bookingStartsNow"}],staticClass:"am-booking-starts"},[n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{sm:24}},[n("label",{staticClass:"el-form-item__label"},[e._v(e._s(e.$root.labels.event_booking_opens_on))])]),e._v(" "),n("el-col",{staticClass:"v-calendar-column",attrs:{sm:15}},[n("el-form-item",{attrs:{prop:"bookingStartsDate",rules:e.rules.bookingStartsDate}},[n("v-date-picker",{attrs:{"is-double-paned":!1,mode:"single","input-class":"el-input__inner","popover-visibility":"focus","popover-direction":"bottom","popover-align":e.screenWidth<768?"center":"left","is-expanded":!1,"is-required":!1,"show-day-popover":!1,"tint-color":e.isCabinet?e.$root.settings.customization.primaryColor:"#1A84EE","input-props":{class:"el-input__inner",readOnly:"readonly"},formats:e.vCalendarFormats,"available-dates":{start:e.getNowDate(),end:e.getMaxEndPeriod()}},on:{dayclick:e.changeBookingStartsDate},model:{value:e.event.bookingStartsDate,callback:function(t){e.$set(e.event,"bookingStartsDate",t)},expression:"event.bookingStartsDate"}})],1)],1),e._v(" "),n("el-col",{attrs:{sm:9}},[n("el-form-item",{attrs:{prop:"bookingStartsTime",rules:e.rules.bookingStartsTime}},[n("el-time-select",{attrs:{size:"large","popper-class":"am-dropdown-cabinet","picker-options":e.getTimeSelectOptionsWithLimits(null,null)},model:{value:e.event.bookingStartsTime,callback:function(t){e.$set(e.event,"bookingStartsTime",t)},expression:"event.bookingStartsTime"}})],1)],1)],1)],1),e._v(" "),e.event.isRecurring?n("div",[n("el-checkbox",{attrs:{"true-label":"same","false-label":"calculate"},model:{value:e.event.bookingOpensRec,callback:function(t){e.$set(e.event,"bookingOpensRec",t)},expression:"event.bookingOpensRec"}},[e._v("\n "+e._s(e.$root.labels.apply_to_all)+"\n ")]),e._v(" "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.event_booking_opens_apply)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1):e._e()],1),e._v(" "),n("div",{staticClass:"am-section-grey"},[n("el-checkbox",{model:{value:e.event.bookingEndsAfter,callback:function(t){e.$set(e.event,"bookingEndsAfter",t)},expression:"event.bookingEndsAfter"}},[e._v(e._s(e.$root.labels.event_booking_closes_after))]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.event.bookingEndsAfter,expression:"!event.bookingEndsAfter"}],staticClass:"am-booking-ends"},[n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{sm:24}},[n("label",{staticClass:"el-form-item__label"},[e._v(e._s(e.$root.labels.event_booking_closes_on))])]),e._v(" "),n("el-col",{staticClass:"v-calendar-column",attrs:{sm:15}},[n("el-form-item",{attrs:{prop:"bookingEndsDate",rules:e.rules.bookingEndsDate}},[n("v-date-picker",{attrs:{mode:"single","input-class":"el-input__inner","popover-visibility":"focus","popover-direction":"bottom","popover-align":e.screenWidth<768?"center":"left","is-double-paned":!1,"is-required":!1,"is-expanded":!1,"show-day-popover":!1,"tint-color":e.isCabinet?e.$root.settings.customization.primaryColor:"#1A84EE","input-props":{class:"el-input__inner",readOnly:"readonly"},formats:e.vCalendarFormats,"available-dates":{start:e.getNowDate(),end:e.getMaxEndPeriod()}},on:{dayclick:e.changeBookingEndsDate},model:{value:e.event.bookingEndsDate,callback:function(t){e.$set(e.event,"bookingEndsDate",t)},expression:"event.bookingEndsDate"}})],1)],1),e._v(" "),n("el-col",{attrs:{sm:9}},[n("el-form-item",{attrs:{prop:"bookingEndsTime",rules:e.rules.bookingEndsTime}},[n("el-time-select",{attrs:{"popper-class":"am-dropdown-cabinet","picker-options":e.getTimeSelectOptionsWithLimits(null,null),size:"large"},model:{value:e.event.bookingEndsTime,callback:function(t){e.$set(e.event,"bookingEndsTime",t)},expression:"event.bookingEndsTime"}})],1)],1)],1)],1),e._v(" "),e.event.isRecurring?n("div",[n("el-checkbox",{attrs:{"true-label":"same","false-label":"calculate"},model:{value:e.event.bookingClosesRec,callback:function(t){e.$set(e.event,"bookingClosesRec",t)},expression:"event.bookingClosesRec"}},[e._v("\n "+e._s(e.$root.labels.apply_to_all)+"\n ")]),e._v(" "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.event_booking_closes_apply)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1):e._e()],1),e._v(" "),n("div",{staticClass:"am-border-bottom"},[e.locations.length?n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("p",[e._v(e._s(e.$root.labels.event_select_address))])]),e._v(" "),n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("el-select",{attrs:{placeholder:e.$root.labels.select,"popper-class":"am-dropdown-cabinet",clearable:!0,filterable:!0,value:null},model:{value:e.event.locationId,callback:function(t){e.$set(e.event,"locationId",t)},expression:"event.locationId"}},[n("el-option",{key:null,attrs:{label:this.$root.labels.event_custom_address,value:null}}),e._v(" "),e._l(e.locations,function(e){return n("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})],2)],1)],1):e._e(),e._v(" "),n("el-row",{directives:[{name:"show",rawName:"v-show",value:!e.event.locationId,expression:"!event.locationId"}],attrs:{gutter:10}},[n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("p",[e._v(e._s(e.$root.labels.event_custom_address))])]),e._v(" "),n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("el-input",{attrs:{placeholder:e.$root.labels.enter_address},model:{value:e.event.customLocation,callback:function(t){e.$set(e.event,"customLocation",t)},expression:"event.customLocation"}})],1)],1)],1),e._v(" "),n("div",{staticClass:"am-border-bottom"},[!e.$root.settings.zoom.enabled||e.$root.licence.isLite||e.$root.licence.isStarter?e._e():n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("p",[e._v(e._s(e.$root.labels.zoom_user))])]),e._v(" "),n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("el-select",{attrs:{clearable:"",filterable:"",placeholder:e.$root.labels.zoom_user_placeholder,"popper-class":"am-dropdown-cabinet"},on:{change:function(t){return e.clearValidation()}},model:{value:e.event.zoomUserId,callback:function(t){e.$set(e.event,"zoomUserId",t)},expression:"event.zoomUserId"}},e._l(e.zoomUsers,function(e,t){return n("el-option",{key:t,attrs:{label:e.first_name+" "+e.last_name+" ("+e.email+")",value:e.id}})}),1)],1)],1),e._v(" "),!e.canManage()||e.$root.licence.isLite||e.$root.licence.isStarter?e._e():n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("span",{staticStyle:{"line-height":"40px"}},[e._v("\n "+e._s(e.$root.labels.event_organizer)+"\n ")]),e._v(" "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.event_organizer_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("el-select",{attrs:{"value-key":"id",clearable:"",placeholder:e.$root.labels.select,"popper-class":"am-dropdown-cabinet"},model:{value:e.event.organizerId,callback:function(t){e.$set(e.event,"organizerId",t)},expression:"event.organizerId"}},e._l(e.employees,function(e){return n("el-option",{key:e.id,attrs:{label:e.firstName+" "+e.lastName,value:e.id}})}),1)],1)],1),e._v(" "),!e.currentUser||"provider"!==e.currentUser.type||e.$root.licence.isLite||e.$root.licence.isStarter?e._e():n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("span",{staticStyle:{"line-height":"40px"}},[e._v("\n "+e._s(e.$root.labels.event_organizer)+"\n ")]),e._v(" "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.event_organizer_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("el-checkbox",{staticStyle:{"line-height":"40px"},attrs:{value:e.event.organizerId===e.currentUser.id,disabled:0!==e.event.id&&e.event.organizerId&&e.event.organizerId!==e.currentUser.id},on:{change:function(t){return e.assignOrganizer(t)}}})],1)],1),e._v(" "),e.canManage()?n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("p",[e._v(e._s(e.$root.labels.event_staff))])]),e._v(" "),n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("el-select",{attrs:{multiple:"","value-key":"id",placeholder:e.$root.labels.select,"popper-class":"am-dropdown-cabinet"},model:{value:e.event.providers,callback:function(t){e.$set(e.event,"providers",t)},expression:"event.providers"}},e._l(e.employees,function(e){return n("el-option",{key:e.id,attrs:{label:e.firstName+" "+e.lastName,value:e}})}),1)],1)],1):e._e(),e._v(" "),e.isCabinet&&e.notInLicence("starter")?e._e():n("div",{class:e.licenceClass("starter"),style:{marginLeft:e.notInLicence("starter")?"":"0px;",marginRight:e.notInLicence("starter")?"":"0px;"}},[n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("p",[e._v(e._s(e.$root.labels.event_tags))])]),e._v(" "),n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("el-select",{attrs:{disabled:e.notInLicence("starter"),multiple:"",filterable:"","allow-create":"","default-first-option":"",placeholder:e.$root.labels.event_tags_select_or_create,"popper-class":"am-dropdown-cabinet","no-data-text":e.$root.labels.event_tags_create,"collapse-tags":""},on:{change:e.tagsChanged},model:{value:e.event.tags,callback:function(t){e.$set(e.event,"tags",t)},expression:"event.tags"}},e._l(e.tags,function(t,i){return t?n("el-option",{key:i,attrs:{label:t,value:t}}):e._e()}),1)],1)],1),e._v(" "),n("LicenceBlock",{attrs:{licence:"starter"}})],1)],1),e._v(" "),"customer"!==this.$root.settings.role&&0!==e.event.id?n("el-form-item",{staticStyle:{"margin-top":"20px"}},[n("el-checkbox",{on:{change:function(t){return e.clearValidation()}},model:{value:e.event.notifyParticipants,callback:function(t){e.$set(e.event,"notifyParticipants",t)},expression:"event.notifyParticipants"}},[e._v("\n "+e._s(e.$root.labels.notify_attendees)+"\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.notify_attendees_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)],1):e._e(),e._v(" "),n("content-block",{staticStyle:{"margin-top":"20px"},attrs:{label:e.$root.labels.description,entity:e.event,textProperty:"description",htmlProperty:"descriptionHtml",hasTranslation:!e.isCabinet,hasQuill:!0,textModeProp:!0,allowImage:!1},on:{showDialogTranslate:function(t){return e.showDialogTranslate("description")}}})],1),e._v(" "),n("el-tab-pane",{attrs:{label:e.$root.labels.pricing,name:"pricing"}},[0!==e.event.id&&e.event.bookings.length&&!e.$root.licence.isLite?n("el-row",{style:{wordBreak:"break-word"}},[n("div",{staticClass:"am-setting"},[n("el-alert",{attrs:{type:"warning","show-icon":"",title:"",description:e.$root.labels.custom_pricing_adjustment,closable:!1}})],1)]):e._e(),e._v(" "),n("div",{staticClass:"am-pricing"},[n("el-row",{style:{padding:0},attrs:{gutter:10}},[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.price)+":\n ")]),e._v(" "),n("div",{staticClass:"el-input",class:{"is-disabled":e.customPricingEnabled},style:{marginBottom:"0px"}},[e.customPricingEnabled?n("money",e._b({staticClass:"el-input el-input__inner",on:{input:e.priceChanged},model:{value:e.customPrice,callback:function(t){e.customPrice=t},expression:"customPrice"}},"money",e.moneyComponentData,!1)):n("money",e._b({staticClass:"el-input el-input__inner",on:{input:e.priceChanged},model:{value:e.event.price,callback:function(t){e.$set(e.event,"price",t)},expression:"event.price"}},"money",e.moneyComponentData,!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.event_max_capacity)+":\n ")]),e._v(" "),n("el-input-number",{attrs:{min:1,disabled:e.customPricingEnabled},model:{value:e.event.maxCapacity,callback:function(t){e.$set(e.event,"maxCapacity",t)},expression:"event.maxCapacity"}})],1)],1)],1),e._v(" "),e.event.maxCapacity>1||e.getTicketsSpots()>1||e.maxCustomCapacityNum>1?n("div",[n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:24,md:24,sm:24}},[n("el-checkbox",{model:{value:e.event.bringingAnyone,callback:function(t){e.$set(e.event,"bringingAnyone",t)},expression:"event.bringingAnyone"}},[e._v(e._s(e.$root.labels.event_bringing_anyone))])],1)],1),e._v(" "),e.event.bringingAnyone?n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:24,md:24,sm:24}},[n("el-checkbox",{model:{value:e.event.aggregatedPrice,callback:function(t){e.$set(e.event,"aggregatedPrice",t)},expression:"event.aggregatedPrice"}},[e._v(e._s(e.$root.labels.event_aggregated_price))])],1)],1):e._e(),e._v(" "),n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:24,md:24,sm:24}},[n("el-checkbox",{model:{value:e.event.bookMultipleTimes,callback:function(t){e.$set(e.event,"bookMultipleTimes",t)},expression:"event.bookMultipleTimes"}},[e._v(e._s(e.$root.labels.event_book_more_than_once))])],1)],1)],1):e._e(),e._v(" "),n("div",[e.isCabinet&&e.notInLicence()?e._e():n("div",{staticClass:"am-setting-box am-switch-box",class:e.licenceClass(),staticStyle:{"margin-top":"20px"}},[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:"","popper-class":"am-dropdown-cabinet"},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:{prop:"deposit",rules:e.rules.deposit}},[n("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.deposit_amount+("fixed"===e.depositPayment?" ("+e.getCurrencySymbol()+")":"")+("percentage"===e.depositPayment?" (%)":"")+":")+"\n ")]),e._v(" "),"fixed"===e.depositPayment?n("div",{staticClass:"el-input"},[n("money",e._b({staticClass:"el-input__inner",on:{input:e.depositChanged},model:{value:e.event.deposit,callback:function(t){e.$set(e.event,"deposit",t)},expression:"event.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.event.deposit,callback:function(t){e.$set(e.event,"deposit",t)},expression:"event.deposit"}}):e._e()],1)],1)],1):e._e(),e._v(" "),(e.event.maxCapacity>1||e.getTicketsSpots()>1||e.maxCustomCapacityNum>1)&&"fixed"===e.depositPayment&&e.depositEnabled&&e.event.aggregatedPrice?n("el-row",[n("el-col",[n("el-checkbox",{model:{value:e.event.depositPerPerson,callback:function(t){e.$set(e.event,"depositPerPerson",t)},expression:"event.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",{attrs:{span:24}},[n("el-checkbox",{model:{value:e.event.fullPayment,callback:function(t){e.$set(e.event,"fullPayment",t)},expression:"event.fullPayment"}},[e._v("\n "+e._s(e.$root.labels.allow_total_event_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)],1)],1):e._e(),e._v(" "),n("LicenceBlock")],1)]),e._v(" "),e.isCabinet&&e.notInLicence()?e._e():n("div",{staticClass:"am-setting-box am-switch-box",class:e.licenceClass(),style:{marginTop:"24px",overflow:"visible",cursor:0!==e.event.id&&e.event.bookings.length?"not-allowed":"auto"}},[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_pricing_enabled)+"\n ")]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:5}},[n("el-switch",{style:0!==e.event.id&&e.event.bookings.length&&{cursor:"not-allowed",pointerEvents:"none"},attrs:{disabled:e.notInLicence(),"active-text":"","inactive-text":""},on:{change:e.switchTicketing},model:{value:e.customPricingEnabled,callback:function(t){e.customPricingEnabled=t},expression:"customPricingEnabled"}})],1)],1),e._v(" "),e.customPricingEnabled?n("el-form-item",[n("el-row",{style:{flexWrap:"wrap"}},[n("el-col",{staticClass:"am-event-ticket-row",style:{marginBottom:"12px"}},[n("el-row",{style:{borderBottom:"1px solid #E2E6EC",padding:"12px",marginBottom:"8px",wordBreak:"break-word"},attrs:{type:"flex",gutter:24}},[n("el-col",{attrs:{span:2}}),e._v(" "),n("el-col",{attrs:{span:7}},[n("div",[e._v("\n "+e._s(e.$root.labels.name)+"\n "),n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.$root.labels.translate,placement:"top"}},[e.isCabinet?e._e():n("span",{staticClass:"am-event-translate-ticket",on:{click:function(t){return e.showDialogTranslate("name",e.customTickets)}}},[n("img",{staticClass:"am-dialog-translate-svg",attrs:{width:"16px",src:e.$root.getUrl+"public/img/translate.svg"}})])])],1)]),e._v(" "),n("el-col",{attrs:{span:6}},[e._v(e._s(e.$root.labels.price))]),e._v(" "),n("el-col",{attrs:{span:7}},[e._v(e._s(e.$root.labels.event_spots))])],1),e._v(" "),e._l(e.customTickets,function(t,i){return n("el-row",{key:i,staticClass:"am-section-grey",style:{padding:"12px",background:"#F9FAFB",marginBottom:"12px"},attrs:{type:"flex",align:"middle",gutter:24},model:{value:e.customTickets[i],callback:function(t){e.$set(e.customTickets,i,t)},expression:"customTickets[index]"}},[n("el-col",{attrs:{span:2}},[n("el-checkbox",{style:{marginBottom:"0px"},attrs:{disabled:e.isTicketDisabled(i)},model:{value:t.enabled,callback:function(n){e.$set(t,"enabled",n)},expression:"ticket.enabled"}})],1),e._v(" "),n("el-col",{attrs:{span:7}},[n("el-input",{style:{marginBottom:"0px"},attrs:{size:"small"},on:{input:function(t){return e.customTicketNameChanged(t,i)}},model:{value:t.name,callback:function(n){e.$set(t,"name",n)},expression:"ticket.name"}})],1),e._v(" "),n("el-col",{attrs:{span:6}},[n("money",e._b({staticClass:"el-input el-input__inner",style:{marginBottom:"0px",padding:"0 6px",textAlign:"center",height:"auto"},on:{input:e.priceChanged},model:{value:t.price,callback:function(n){e.$set(t,"price",n)},expression:"ticket.price"}},"money",e.moneyComponentData,!1))],1),e._v(" "),n("el-col",{attrs:{span:7}},[n("el-input-number",{style:{marginBottom:"0px",textAlign:"center"},attrs:{size:"small",min:1,disabled:e.maxCustomCapacity},on:{change:function(e){t.spots=t.spots<=0?1:t.spots}},model:{value:t.spots,callback:function(n){e.$set(t,"spots",n)},expression:"ticket.spots"}})],1),e._v(" "),e.customTickets.length>1?n("el-col",{style:{display:"flex",justifyContent:"center"},attrs:{span:2}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.ticketIsBooked(t.id),expression:"ticketIsBooked(ticket.id)"}],staticClass:"am-delete-element",on:{click:function(t){return e.deleteCustomTicket(i)}}},[n("i",{staticClass:"el-icon-minus"})])]):e._e()],1)}),e._v(" "),n("el-row",{style:{padding:"12px 0"}},[n("el-col",[n("div",{staticClass:"am-add-element",on:{click:e.addCustomTicket}},[n("i",{staticClass:"el-icon-plus"}),e._v(" "),n("span",[e._v("\n "+e._s(e.$root.labels.add_ticket_category)+"\n ")])])])],1),e._v(" "),e.customTickets.length?n("el-row",{staticStyle:{padding:"12px 0"},attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:13}},[n("el-checkbox",{model:{value:e.maxCustomCapacity,callback:function(t){e.maxCustomCapacity=t},expression:"maxCustomCapacity"}},[e._v("\n "+e._s(e.$root.labels.event_max_capacity)+":\n ")])],1),e._v(" "),n("el-col",{attrs:{span:11}},[n("el-input-number",{staticStyle:{"text-align":"center"},attrs:{min:1,disabled:!e.maxCustomCapacity,size:"small"},model:{value:e.maxCustomCapacityNum,callback:function(t){e.maxCustomCapacityNum=t},expression:"maxCustomCapacityNum"}})],1)],1):e._e(),e._v(" "),e.maxCustomCapacity?e._e():n("el-row",{style:{borderBottom:e.customTickets.length?"1px solid #E2E6EC":"",marginBottom:"12px",wordBreak:"break-word"}},[n("div",{staticClass:"am-setting"},[n("el-alert",{attrs:{type:"warning","show-icon":"",title:"",description:e.$root.labels.custom_pricing_warning,closable:!1}})],1)])],2)],1),e._v(" "),e.customTickets.length?n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:19}},[e._v("\n "+e._s(e.$root.labels.pricing_by_date_enabled)+"\n ")]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:5}},[n("el-switch",{attrs:{"active-text":"","inactive-text":"",disabled:!e.event.periods[0].range},model:{value:e.customPricingByDateRangeEnabled,callback:function(t){e.customPricingByDateRangeEnabled=t},expression:"customPricingByDateRangeEnabled"}})],1)],1):e._e(),e._v(" "),e.event.periods[0].range?e._e():n("el-row",{style:{borderBottom:e.customTickets.length?"1px solid #E2E6EC":"",marginBottom:"12px",marginTop:"12px",wordBreak:"break-word"}},[n("div",{staticClass:"am-setting"},[n("el-alert",{attrs:{type:"warning","show-icon":"",title:"",description:e.$root.labels.custom_pricing_date_warning,closable:!1}})],1)]),e._v(" "),e.customPricingByDateRangeEnabled?n("el-row",{staticStyle:{"margin-bottom":"50px"}},[e._l(e.customTicketsDateRange,function(t,i){return n("el-col",{key:i,staticClass:"am-section-grey",style:{background:"#F9FAFB",padding:"8px 12px",marginTop:0===i?"10px":"12px",overflow:"visible"}},[n("el-row",{style:{minHeight:"50px",borderBottom:"1px solid #E2E6EC",display:"flex",alignItems:"baseline",padding:"8px 0"}},[n("el-col",{style:{marginBottom:0,fontWeight:500},attrs:{span:5}},[e._v(e._s(e.$root.labels.event_date_range))]),e._v(" "),n("el-col",{staticClass:"v-calendar-column",staticStyle:{overflow:"visible"},attrs:{span:17}},[n("el-form-item",[n("v-date-picker",{staticStyle:{"margin-bottom":"0"},attrs:{"is-double-paned":!1,mode:"range","popover-visibility":"focus","popover-direction":"bottom","popover-align":e.screenWidth<768?"center":"right","tint-color":e.isCabinet?e.$root.settings.customization.primaryColor:"#1A84EE","show-day-popover":!1,"input-props":{class:"el-input__inner",readOnly:"readonly"},"is-expanded":!1,"is-required":!1,"is-read-only":!0,"input-class":"el-input__inner",formats:e.vCalendarFormats,"min-date":e.getStartTicketRangeDate("date",!1),"max-date":e.getEndTicketRangeDate("date",!1),"disabled-dates":e.customTicketsDateRangesSelected},on:{input:function(t){return e.setDisabledTicketRangeDates(null,!1)}},model:{value:e.customTicketsDateRange[i].range,callback:function(t){e.$set(e.customTicketsDateRange[i],"range",t)},expression:"customTicketsDateRange[i].range"}}),e._v(" "),n("span",{staticClass:"am-v-date-picker-suffix el-input__suffix-inner",on:{click:function(t){return e.clearRange(i)}}},[n("i",{staticClass:"el-select__caret el-input__icon el-icon-circle-close"})])],1)],1),e._v(" "),n("el-col",{attrs:{span:2}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.ticketIsBooked(t.id),expression:"ticketIsBooked(ticket.id)"}],staticClass:"am-delete-element",staticStyle:{"margin-left":"10px"},on:{click:function(t){return e.deleteCustomTicketDateRange(i)}}},[n("i",{staticClass:"el-icon-minus"})])])],1),e._v(" "),e._l(e.customTicketsDateRange[i].tickets,function(t,o){return n("el-row",{key:i+""+o,style:{minHeight:"50px",borderBottom:o<e.customTicketsDateRange[i].tickets.length-1?"1px solid #E2E6EC":"",display:"flex",alignItems:"center",padding:"8px 0"}},[n("el-col",{attrs:{span:5}},[e._v(e._s(t.name))]),e._v(" "),n("el-col",{attrs:{span:12}}),e._v(" "),n("el-col",{attrs:{span:5}},[n("money",e._b({staticClass:"el-input el-input__inner",style:{marginBottom:"0px",padding:"0 6px"},model:{value:e.customTicketsDateRange[i].tickets[o].price,callback:function(t){e.$set(e.customTicketsDateRange[i].tickets[o],"price",t)},expression:"customTicketsDateRange[i].tickets[index].price"}},"money",e.moneyComponentData,!1),[e._v("\n >\n ")])],1),e._v(" "),n("el-col",{attrs:{span:2}})],1)})],2)}),e._v(" "),n("el-col",{style:{marginTop:"18px"},attrs:{span:24}},[n("div",{staticClass:"am-add-element",on:{click:e.addCustomTicketDateRange}},[n("i",{staticClass:"el-icon-plus"}),e._v(" "),n("span",[e._v("\n "+e._s(e.$root.labels.event_add_date_range)+"\n ")])])]),e._v(" "),n("el-col",{style:{marginTop:"14px",wordBreak:"break-word"},attrs:{span:24}},[n("div",{staticClass:"am-tickets-warning"},[n("el-alert",{attrs:{type:"warning","show-icon":"",title:"",description:e.$root.labels.event_date_range_warning,closable:!1}})],1)])],2):e._e()],1):e._e(),e._v(" "),n("LicenceBlock")],1),e._v(" "),e.event.maxCapacity>1||e.getTicketsSpots()>1||e.maxCustomCapacityNum>1?n("div",[n("div",{staticClass:"am-setting-box am-switch-box am-event-close-after",staticStyle:{"margin-top":"20px"}},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:19}},[e._v("\n "+e._s(e.$root.labels.event_close_after_min)+"\n ")]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:5}},[n("el-switch",{model:{value:e.closeAfterMin,callback:function(t){e.closeAfterMin=t},expression:"closeAfterMin"}})],1)],1),e._v(" "),e.closeAfterMin?n("el-row",{staticStyle:{"margin-top":"16px"},attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",[n("el-radio",{attrs:{label:!1},on:{change:function(t){return e.clearValidation()}},model:{value:e.event.closeAfterMinBookings,callback:function(t){e.$set(e.event,"closeAfterMinBookings",t)},expression:"event.closeAfterMinBookings"}},[e._v("\n "+e._s(e.$root.labels.event_close_min_total)+"\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.event_close_min_total_tt)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)],1)],1):e._e(),e._v(" "),e.closeAfterMin?n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",[n("el-radio",{attrs:{label:!0},on:{change:function(t){return e.clearValidation()}},model:{value:e.event.closeAfterMinBookings,callback:function(t){e.$set(e.event,"closeAfterMinBookings",t)},expression:"event.closeAfterMinBookings"}},[e._v("\n "+e._s(e.$root.labels.event_close_min_bookings)+"\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.event_close_min_bookings_tt)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)],1)],1):e._e(),e._v(" "),e.closeAfterMin?n("el-row",{staticClass:"am-service-deposit",attrs:{gutter:24}},[n("el-col",{attrs:{span:24}},[n("el-form-item",{attrs:{label:e.$root.labels.event_close_minimum+":"}},[n("el-input-number",{attrs:{min:1,max:e.getMaxCapacity(e.event)},on:{input:function(t){return e.clearValidation()}},model:{value:e.event.closeAfterMin,callback:function(t){e.$set(e.event,"closeAfterMin",t)},expression:"event.closeAfterMin"}})],1)],1)],1):e._e()],1)]):e._e(),e._v(" "),e.event.maxCapacity>1||e.getTicketsSpots()>1||e.maxCustomCapacityNum>1?n("div",[n("div",{staticClass:"am-setting-box am-switch-box am-event-close-after",staticStyle:{"margin-top":"20px"}},[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",{attrs:{type:"flex"}},[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:0,max:e.getMaxCapacity()-1},on:{input:function(t){return e.clearValidation()}},model:{value:e.event.maxExtraPeople,callback:function(t){e.$set(e.event,"maxExtraPeople",t)},expression:"event.maxExtraPeople"}})],1)],1)],1):e._e()],1)]):e._e()],1)],1),e._v(" "),!e.notInLicence("starter")||e.licenceVisible()?n("el-tab-pane",{attrs:{label:e.$root.labels.customize,name:"customize"}},[n("LicenceBlockHeader",{attrs:{licence:"starter"}}),e._v(" "),e.showGallery?n("gallery",{class:e.licenceClassDisabled("starter"),attrs:{gallery:e.event.gallery,label:e.$root.labels.event_gallery},on:{galleryUpdated:e.galleryUpdated}}):e._e(),e._v(" "),n("div",{staticClass:"am-event-colors",class:e.licenceClassDisabled("starter")},[n("div",{staticClass:"am-event-section-title"},[e._v("\n "+e._s(e.$root.labels.event_colors)+"\n ")]),e._v(" "),n("div",{staticClass:"am-event-color-selection"},[n("div",[n("el-radio",{attrs:{label:1,value:"1"},model:{value:e.event.colorType,callback:function(t){e.$set(e.event,"colorType",t)},expression:"event.colorType"}},[e._v(e._s(e.$root.labels.event_colors_preset))]),e._v(" "),n("div",{staticClass:"am-event-swatches am-event-swatches-first"},e._l(e.colors,function(t){return n("span",{key:t,class:{"color-active":t===e.event.selectedColor},style:"background-color: "+t,attrs:{"data-color":t},on:{click:e.changeEventColor}})}),0)],1),e._v(" "),n("div",[n("el-radio",{attrs:{label:2,value:"2"},model:{value:e.event.colorType,callback:function(t){e.$set(e.event,"colorType",t)},expression:"event.colorType"}},[e._v(e._s(e.$root.labels.event_colors_custom))]),e._v(" "),n("el-input",{staticClass:"am-event-custom-color",attrs:{disabled:1===e.event.colorType||e.notInLicence("starter"),placeholder:"000000"},model:{value:e.event.customColor,callback:function(t){e.$set(e.event,"customColor",t)},expression:"event.customColor"}}),e._v(" "),n("div",{staticClass:"am-event-swatches"},[n("span",{style:"background-color: "+e.event.customColor,attrs:{"data-color":e.event.customColor}})])],1)])]),e._v(" "),n("div",{class:e.licenceClassDisabled("starter")},[n("el-checkbox",{attrs:{disabled:e.notInLicence("starter")},model:{value:e.event.show,callback:function(t){e.$set(e.event,"show",t)},expression:"event.show"}},[e._v("\n "+e._s(e.$root.labels.event_show_on_site)+"\n ")])],1)],1):e._e(),e._v(" "),(e.notInLicence("pro")?e.licenceVisible():e.$root.settings.appointments.waitingListEvents.enabled)?n("el-tab-pane",{attrs:{label:e.$root.labels.waiting_list,name:"waitingList"}},[n("LicenceBlockHeader",{attrs:{licence:"pro"}}),e._v(" "),n("div",{staticClass:"am-setting-box am-switch-box",class:e.licenceClassDisabled("pro")},[n("el-row",{staticStyle:{display:"flex"},attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:20}},[n("span",{staticStyle:{"line-height":"1"}},[e._v(e._s(e.$root.labels.events_show_waiting_list_booking_full))])]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:4}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:e.event.settings.waitingList.enabled,callback:function(t){e.$set(e.event.settings.waitingList,"enabled",t)},expression:"event.settings.waitingList.enabled"}})],1)],1),e._v(" "),e.event.settings.waitingList.enabled?n("el-row",{staticStyle:{"margin-top":"24px"},attrs:{align:"middle",gutter:24}},[n("el-col",{staticStyle:{"margin-top":"24px"},attrs:{span:24}},[e._v("\n "+e._s(e.$root.labels.maximum_capacity)+":\n ")]),e._v(" "),n("el-col",{staticStyle:{"margin-top":"8px"},attrs:{span:24}},[n("el-input-number",{attrs:{min:1,"auto-complete":"off",disabled:e.customPricingEnabled&&!e.maxCustomCapacity},model:{value:e.event.settings.waitingList.maxCapacity,callback:function(t){e.$set(e.event.settings.waitingList,"maxCapacity",t)},expression:"event.settings.waitingList.maxCapacity"}})],1),e._v(" "),(e.isCabinet?!e.notInLicence():e.customPricingEnabled)?n("div",{class:e.licenceClass(),style:{padding:"12px",display:"flex",flexDirection:"column"}},[e.customPricingEnabled?n("el-form-item",[n("el-row",{style:{flexWrap:"wrap"}},[n("el-col",{staticClass:"am-event-ticket-row",style:{marginBottom:"12px"}},[n("el-row",{style:{borderBottom:"1px solid #E2E6EC",padding:"12px",marginBottom:"8px",wordBreak:"break-word"},attrs:{type:"flex",gutter:24}},[n("el-col",{attrs:{span:7}},[n("div",[e._v("\n "+e._s(e.$root.labels.name)+"\n ")])]),e._v(" "),n("el-col",{attrs:{span:10}}),e._v(" "),n("el-col",{attrs:{span:7}},[e._v(e._s(e.$root.labels.event_spots))])],1),e._v(" "),e._l(e.customTickets,function(t,i){return n("el-row",{key:i,staticClass:"am-section-grey",style:{padding:"12px",background:"#F9FAFB",marginBottom:"12px"},attrs:{type:"flex",align:"middle",gutter:24},model:{value:e.customTickets[i],callback:function(t){e.$set(e.customTickets,i,t)},expression:"customTickets[index]"}},[n("el-col",{attrs:{span:7}},[n("el-input",{style:{marginBottom:"0px"},attrs:{disabled:!0,size:"small"},model:{value:t.name,callback:function(n){e.$set(t,"name",n)},expression:"ticket.name"}})],1),e._v(" "),n("el-col",{attrs:{span:10}}),e._v(" "),n("el-col",{attrs:{span:7}},[n("el-input-number",{style:{marginBottom:"0px",textAlign:"center"},attrs:{size:"small",min:0,disabled:!t.enabled||e.maxCustomCapacity},model:{value:t.waitingListSpots,callback:function(n){e.$set(t,"waitingListSpots",n)},expression:"ticket.waitingListSpots"}})],1)],1)})],2)],1)],1):e._e()],1):e._e(),e._v(" "),n("div",{staticClass:"am-waiting-list-limit-per-ticket-box"},[n("el-col",{attrs:{span:15}},[n("el-checkbox",{model:{value:e.event.settings.waitingList.maxExtraPeopleEnabled,callback:function(t){e.$set(e.event.settings.waitingList,"maxExtraPeopleEnabled",t)},expression:"event.settings.waitingList.maxExtraPeopleEnabled"}},[e._v("\n "+e._s(e.$root.labels.limit_extra_people)+"\n ")])],1),e._v(" "),n("el-col",{attrs:{span:9}},[n("el-input-number",{attrs:{disabled:!e.event.settings.waitingList.maxExtraPeopleEnabled,min:0,size:"small","auto-complete":"off"},model:{value:e.event.settings.waitingList.maxExtraPeople,callback:function(t){e.$set(e.event.settings.waitingList,"maxExtraPeople",t)},expression:"event.settings.waitingList.maxExtraPeople"}})],1)],1)],1):e._e()],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.event.settings.payments,generalSettings:e.event.settings.general,lessonSpaceSettings:e.event.settings.lessonSpace,"google-meet-settings":e.event.settings.googleMeet,"microsoft-teams-settings":e.event.settings.microsoftTeams}})],1)],1)],1):e._e()],1):e._e(),e._v(" "),e.event&&!e.dialogLoading&&"customer"!==this.$root.settings.role?n("dialog-actions",{attrs:{formName:"event",urlName:"events",isNew:0===e.event.id,entity:e.event,getParsedEntity:e.getParsedEntity,haveSaveConfirmation:e.haveSaveConfirmation,getCalendarEvents:e.getCalendarEvents,loadSaveButton:e.checkCalendarEvents,calendarConflict:e.calendarConflict,hasIcons:!1,updateStash:!0,hasApplyGloballyVisibility:e.originRecurring.until,hasApplyGloballyDeletion:e.originRecurring.until&&("rejected"===e.event.status||e.hasPassed()),status:{on:"approved",off:"rejected"},buttonType:{status:"approved"===e.event.status?"danger":"primary",remove:"danger",duplicate:"primary"},buttonText:{action:{remove:e.$root.labels.event_delete,status:"approved"===e.event.status?e.$root.labels.event_cancel:e.$root.labels.event_open,duplicate:e.$root.labels.event_duplicate},confirm:{save:e.calendarConflict.enabled?{yes:e.$root.labels.confirm,no:e.$root.labels.cancel}:e.originRecurring.until?{yes:e.$root.labels.update_following,no:e.$root.labels.save_single}:null,status:e.originRecurring.until?{yes:"rejected"===e.event.status?e.$root.labels.open_following:e.$root.labels.cancel_following,no:e.$root.labels.save_single}:"rejected"===e.event.status?{yes:e.$root.labels.open,no:e.$root.labels.open}:null,remove:e.originRecurring.until?{yes:e.$root.labels.delete_following,no:e.$root.labels.save_single}:null}},action:{haveAdd:!0,haveEdit:!0,haveStatus:e.canManage()&&!e.hasPassed(),haveRemove:!0===e.$root.settings.capabilities.canDelete&&("rejected"===e.event.status||e.hasPassed()),haveRemoveEffect:"rejected"!==e.event.status&&!e.hasPassed(),haveDuplicate:"approved"===e.event.status},message:{success:{save:e.$root.labels.event_saved,remove:e.$root.labels.event_deleted,show:e.$root.labels.event_opened,hide:e.$root.labels.event_canceled},confirm:{save:e.calendarConflict.enabled?e.$root.labels.confirm_save_conflict:e.originRecurring.until?e.$root.labels.confirm_save_following:null,saveDetails:!e.calendarConflict.enabled&&e.customPricingEnabled?e.$root.labels.confirm_save_following_2:null,remove:e.originRecurring.until?e.$root.labels.confirm_delete_following:e.$root.labels.confirm_delete,show:e.originRecurring.until?e.$root.labels.confirm_open_following:e.$root.labels.confirm_open,hide:e.originRecurring.until?e.$root.labels.confirm_cancel_following:e.$root.labels.confirm_cancel,duplicate:e.$root.labels.confirm_duplicate_event}}},on:{validationFailCallback:e.validationFailCallback,errorCallback:e.errorCallback,confirmCalendarConflict:e.confirmCalendarConflict}}):e._e()],1)},staticRenderFns:[]}},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:[]}},928:function(e,t,n){var i=n(90)(n(975),n(976),!1,null,null,null);e.exports=i.exports},929:function(e,t,n){var i=n(90)(n(977),n(978),!1,null,null,null);e.exports=i.exports},932:function(e,t,n){var i=n(90)(n(1573),n(1574),!1,null,null,null);e.exports=i.exports},942:function(e,t,n){var i=n(90)(n(943),n(944),!1,null,null,null);e.exports=i.exports},943:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(336),o=n(880),a=n(659),s=n(654),r=n(658),l=n(684),c=n(673);t.default={mixins:[s.a,i.a,a.a,l.a,r.a,o.a,c.a],props:{event:null,eventStatus:null,customTickets:null,options:null,eventBookings:null,aggregatedPrice:!0,bookingCreatedCount:0,newBooking:null,showHeader:{required:!1,default:!0,type:Boolean},showExport:{required:!1,default:!0,type:Boolean},writeEvents:{type:Boolean,default:!0,required:!1},popperAppendToBody:{type:Boolean,default:!0,required:!1},customersNoShowCount:{type:Array,default:function(){return[]},required:!1}},data:function(){return{dialogExport:!1,bookings:[],name:"events/bookings",successMessage:{single:this.$root.labels.event_attendee_deleted,multiple:this.$root.labels.event_attendees_deleted},errorMessage:{single:this.$root.labels.event_attendee_not_deleted,multiple:this.$root.labels.event_attendees_not_deleted},search:"",hasResult:!0,dialogLoading:!0,showDeleteConfirmation:!1,statuses:[{value:"approved",label:this.$root.labels.approved},{value:"rejected",label:this.$root.labels.rejected},{value:"no-show",label:this.$root.labels["no-show"]}],activeTab:"Approved"}},methods:{getBookingStatus:function(e){return"rejected"===this.eventStatus||"canceled"===this.eventStatus?"canceled":"rejected"===e.status?"canceled":e.status},getInitAttendeeObject:function(){return{id:0,customer:null,status:"approved",persons:1,added:!1,info:null,aggregatedPrice:this.aggregatedPrice,customFields:{}}},addAttendee:function(){this.$emit("showDialogAttendee",this.getInitAttendeeObject())},hasCapacity:function(e){var t=0;if(this.event.customPricing&&!this.event.maxCustomCapacity){var n=!0,i={};return this.event.customTickets.forEach(function(e){i[e.id]=e.spots}),this.event.bookings.forEach(function(e){"approved"===e.status&&e.ticketsData.forEach(function(e){i[e.eventTicketId]-=e.persons})}),e.ticketsData.forEach(function(e){i[e.eventTicketId]<e.persons&&(n=!1)}),n}return this.event.maxCustomCapacity?(this.event.bookings.forEach(function(e){"approved"===e.status&&e.ticketsData.forEach(function(e){t+=e.persons})}),this.event.maxCustomCapacity>t):(this.event.bookings.forEach(function(e){"approved"===e.status&&(t+=e.persons)}),this.event.maxCapacity>t)},updateBookingStatus:function(e,t){var n=this,i=!1,o=!1;"waiting"===e.status&&"approved"===t&&(i=!this.hasCapacity(e),o=!0),this.$http.post(this.$root.getAjaxUrl+"/events/bookings/"+e.id,{status:t,bookings:[{status:t}],createPaymentLinks:o}).then(function(){i&&n.notify(n.$root.labels.warning,n.$root.labels.waiting_list_capacity_warning,"warning"),n.notify(n.$root.labels.success,n.$root.labels.event_status_changed+n.$root.labels[t].toLowerCase(),"success");var o=e.status;if(e.status=t,"no-show"===t||"no-show"===o){var a=n.options.entities.customers.map(function(e){return e.id});if(a.includes(e.customer.id)){var s=a.indexOf(e.customer.id),r=n.options.entities.customers[s].noShowCount;n.options.entities.customers[s].noShowCount=r+("no-show"===t?1:-1)}}n.$emit("updateAttendeesCallback")}).catch(function(e){n.notify(n.$root.labels.error,e.message,"error")})},getCustomer:function(e){return e.info?JSON.parse(e.info):e.customer},getTicketsSoldString:function(e){var t=this.customTickets.filter(function(t){return t.id===e.eventTicketId})[0].name;return e.persons+" x "+t},instantiateDialog:function(){this.eventBookings&&(this.bookings=this.eventBookings,this.bookings.tickets=[],this.dialogLoading=!1),this.$root.settings.appointments.waitingListEvents.enabled&&this.event.settings.waitingList.enabled&&this.statuses.push({value:"waiting",label:this.$root.labels.waiting_list})},closeDialog:function(){this.$emit("closeDialog")},removeAttendee:function(e){var t=this,n=[];this.bookings[e].removing=!0,this.deleteEntities([this.bookings[e].id],function(){setTimeout(function(){for(var e=t.bookings.length-1;e>=0;e--)-1!==n.indexOf(t.bookings[e].id)&&t.bookings.splice(e,1);t.$emit("updateAttendeesCallback"),0===t.bookings.length&&t.$emit("closeDialog")},500)},function(e){n.push(e)},function(e){})},editAttendee:function(e){this.$emit("showDialogAttendee",this.bookings[e])},removeAttendees:function(){var e=this,t=[];e.dialogLoading=!0,e.showDeleteConfirmation=!1,this.deleteEntities(e.bookings.filter(function(e){return e.checked}).map(function(e){return e.id}),function(){setTimeout(function(){for(var n=e.bookings.length-1;n>=0;n--)-1!==t.indexOf(e.bookings[n].id)&&e.bookings.splice(n,1);e.dialogLoading=!1,e.$emit("updateAttendeesCallback"),0===e.bookings.length&&e.$emit("closeDialog")},500)},function(e){t.push(e)},function(e){})},searchAttendees:function(){var e=this;this.bookings.forEach(function(t){t.show=t.customer.firstName.toLowerCase().startsWith(e.search.toLowerCase())||t.customer.lastName.toLowerCase().startsWith(e.search.toLowerCase())||(t.customer.firstName+" "+t.customer.lastName).toLowerCase().startsWith(e.search.toLowerCase())||(t.customer.lastName+" "+t.customer.firstName).toLowerCase().startsWith(e.search.toLowerCase())||null!==t.customer.email&&t.customer.email.toLowerCase().startsWith(e.search.toLowerCase())||null!==t.customer.phone&&t.customer.phone.toLowerCase().startsWith(e.search.toLowerCase())||null!==t.token&&t.token.toLowerCase().substring(0,5).startsWith(e.search.toLowerCase())||t.customer.firstName.split(" ").map(function(t){return t.toLowerCase().startsWith(e.search.toLowerCase())}).includes(!0)||t.customer.lastName.split(" ").map(function(t){return t.toLowerCase().startsWith(e.search.toLowerCase())}).includes(!0)}),this.hasResult=this.bookings.filter(function(e){return!0===e.show}).length>0,this.hasResult&&(this.activeTab="waiting"===this.bookings.filter(function(e){return!0===e.show})[0].status?"WaitingList":"Approved")},openExportAttendeesDialog:function(){this.$emit("openExportAttendeesDialog")}},mounted:function(){this.instantiateDialog()},watch:{bookingCreatedCount:function(){this.bookings=this.eventBookings,this.bookings.sort(function(e,t){return(e.customer.firstName+" "+e.customer.lastName).localeCompare(t.customer.firstName+" "+t.customer.lastName)}),this.hasResult=!0,this.search=""}}}},944:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"am-dialog-attendees-inner"},[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.bookings&&!e.dialogLoading?n("div",{staticClass:"am-dialog-scrollable"},[e.showHeader?n("div",{staticClass:"am-dialog-header",staticStyle:{"border-bottom":"none"}},[n("el-row",[n("el-col",{attrs:{span:18}},[n("h2",[e._v(e._s(e.$root.labels.event_attendees))])]),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.writeEvents?n("el-button",{staticClass:"am-dialog-create",staticStyle:{width:"100%"},attrs:{size:"large",type:"primary"},on:{click:e.addAttendee}},[n("i",{staticClass:"el-icon-plus"}),e._v(" "),n("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.event_add_attendee))])]):e._e(),e._v(" "),n("div",{staticClass:"am-search"},[n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:e.showExport?20:24}},[n("el-input",{attrs:{placeholder:e.$root.labels.event_attendees_search},on:{input:function(t){return e.searchAttendees()}},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}})],1),e._v(" "),e.showExport?n("el-col",{attrs:{lg:4}},[n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.export_tooltip_attendees)},slot:"content"}),e._v(" "),n("el-button",{staticClass:"button-export am-button-icon",on:{click:e.openExportAttendeesDialog}},[n("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.export,src:e.$root.getUrl+"public/img/export.svg"}})])],1)],1):e._e()],1)],1),e._v(" "),n("el-tabs",{model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[n("el-tab-pane",{attrs:{label:e.$root.labels.event_attendees,name:"Approved"}},[n("div",{staticClass:"am-attendees"},[n("el-collapse",e._l(e.bookings,function(t,i){return n("el-collapse-item",{directives:[{name:"show",rawName:"v-show",value:t.show&&"waiting"!==t.status,expression:"booking.show && booking.status !== 'waiting'"}],key:i,staticClass:"am-attendee",attrs:{name:t.id}},[n("template",{slot:"title"},[n("div",{staticClass:"am-attendee-data",staticStyle:{width:"100%"}},[n("el-row",{attrs:{gutter:10}},[!0===e.$root.settings.capabilities.canDelete?n("el-col",{attrs:{sm:2}},[n("span",{staticClass:"am-attendee-checkbox",on:{click:function(e){e.stopPropagation()}}},[!0===e.$root.settings.capabilities.canDelete?n("el-checkbox",{model:{value:t.checked,callback:function(n){e.$set(t,"checked",n)},expression:"booking.checked"}}):e._e()],1)]):e._e(),e._v(" "),n("el-col",{attrs:{sm:!0===e.$root.settings.capabilities.canDelete?17:19}},[n("div",{staticClass:"am-attendee-name"},[n("h3",{class:e.showExport?e.getNoShowClass(0!==t.customerId?t.customerId:t.customer.id,e.customersNoShowCount,null,t.customer.status):""},[e._v("\n "+e._s((null!==(e.user=e.getCustomer(t))?e.user.firstName+" "+e.user.lastName:"")+(t.token?" ("+t.token.substring(0,5)+")":""))+"\n "),t.persons>1?n("span",{staticClass:"am-attendees-plus"},[e._v("+"+e._s(t.persons-1))]):e._e()]),e._v(" "),n("a",{staticClass:"am-attendee-email",attrs:{href:"mailto:"+t.customer.email}},[e._v(e._s(t.customer.email))]),e._v(" "),n("a",{staticClass:"am-attendee-phone",attrs:{href:"tel:"+(null!==(e.user=e.getCustomer(t))?e.user.phone:"")}},[e._v(e._s(null!==(e.user=e.getCustomer(t))?e.user.phone:""))]),e._v(" "),e._l(t.ticketsData,function(t){return e.customTickets.length?n("span",{staticClass:"am-attendees-plus",style:{marginLeft:0}},[e._v("\n "+e._s(e.getTicketsSoldString(t))+"\n ")]):e._e()})],2)]),e._v(" "),n("el-col",{attrs:{sm:5}},[n("div",{staticClass:"am-appointment-status small"},[n("span",{class:"am-appointment-status-symbol am-appointment-status-symbol-"+e.getBookingStatus(t)}),e._v(" "),n("el-select",{attrs:{value:t.status,"popper-append-to-body":e.popperAppendToBody,disabled:!e.writeEvents},on:{change:function(n){return e.updateBookingStatus(t,n)}}},e._l(e.statuses,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-"+("rejected"===e.value?"canceled":e.value)})])}),1)],1)])],1)],1)]),e._v(" "),n("div",{staticClass:"am-attendee-collapse"},[t.payments.length?n("el-row",{staticClass:"am-attendee-collapse-payments",attrs:{gutter:10}},[n("el-col",{attrs:{span:6}},[n("span",[e._v(e._s(e.$root.labels.payment))])]),e._v(" "),n("el-col",{attrs:{span:18}},e._l(t.payments,function(t){return n("p",[n("span",{staticStyle:{display:"flex","align-items":"center"}},[n("img",{staticClass:"svg-amelia",style:{width:e.getPaymentIconWidth(t.gateway)},attrs:{src:e.$root.getUrl+"public/img/payments/"+t.gateway+".svg"}}),e._v("\n "+e._s(e.getPaymentGatewayNiceName(t.gateway))+"\n "),n("span",{staticClass:"am-semi-strong am-payment-status",staticStyle:{"padding-left":"15px"}},[n("span",{class:"am-payment-status-symbol am-payment-status-symbol-"+t.status}),e._v("\n "+e._s(e.getPaymentStatusNiceName(t.status))+"\n ")])])])}),0)],1):e._e(),e._v(" "),t.payments.filter(function(e){return e.wcOrderId}).length>0?n("el-row",{staticClass:"am-attendee-collapse-payments",attrs:{gutter:10}},[n("el-col",{attrs:{span:6}},[n("span",[e._v(e._s(e.$root.labels.wc_order)+":")])]),e._v(" "),n("el-col",{attrs:{span:18}},e._l(t.payments,function(t){return n("p",{key:t.id},[n("a",{attrs:{href:t.wcOrderUrl,target:"_blank"}},[e._v("\n #"+e._s(t.wcOrderId)+"\n ")])])}),0)],1):e._e(),e._v(" "),n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{span:12}},[n("div",{},[e.writeEvents?n("el-button",{attrs:{loading:t.removing},on:{click:function(t){return e.removeAttendee(i)}}},[e._v("\n "+e._s(e.$root.labels.event_attendee_remove)+"\n ")]):e._e()],1)]),e._v(" "),n("el-col",{attrs:{span:12}},[n("div",{},[e.writeEvents?n("el-button",{on:{click:function(t){return e.editAttendee(i)}}},[e._v("\n "+e._s(e.$root.labels.event_edit_attendee)+"\n ")]):e._e()],1)])],1)],1)],2)}),1)],1),e._v(" "),0===e.bookings.filter(function(e){return"waiting"!==e.status}).length?n("div",{staticClass:"am-empty-state am-section"},[n("img",{attrs:{src:e.$root.getUrl+"public/img/emptystate.svg"}}),e._v(" "),n("h2",[e._v(e._s(e.$root.labels.no_attendees_yet))])]):e._e(),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.hasResult&&e.bookings.filter(function(e){return"waiting"!==e.status}).length>0,expression:"!hasResult && bookings.filter(b => b.status !== 'waiting').length > 0"}],staticClass:"am-empty-state am-section"},[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(" "),e.event.settings.waitingList.enabled&&e.$root.settings.appointments.waitingListEvents.enabled?n("el-tab-pane",{attrs:{label:e.$root.labels.waiting_list,name:"WaitingList"}},[n("div",{staticClass:"am-attendees"},[n("el-collapse",e._l(e.bookings,function(t,i){return n("el-collapse-item",{directives:[{name:"show",rawName:"v-show",value:t.show&&"waiting"===t.status,expression:"booking.show && booking.status === 'waiting'"}],key:i,staticClass:"am-attendee",attrs:{name:t.id}},[n("template",{slot:"title"},[n("div",{staticClass:"am-attendee-data",staticStyle:{width:"100%"}},[n("el-row",{attrs:{gutter:10}},[!0===e.$root.settings.capabilities.canDelete?n("el-col",{attrs:{sm:2}},[n("span",{staticClass:"am-attendee-checkbox",on:{click:function(e){e.stopPropagation()}}},[!0===e.$root.settings.capabilities.canDelete?n("el-checkbox",{model:{value:t.checked,callback:function(n){e.$set(t,"checked",n)},expression:"booking.checked"}}):e._e()],1)]):e._e(),e._v(" "),n("el-col",{attrs:{sm:!0===e.$root.settings.capabilities.canDelete?17:19}},[n("div",{staticClass:"am-attendee-name"},[n("h3",[e._v("\n "+e._s((null!==(e.user=e.getCustomer(t))?e.user.firstName+" "+e.user.lastName:"")+(t.token?" ("+t.token.substring(0,5)+")":""))+"\n "),t.persons>1?n("span",{staticClass:"am-attendees-plus"},[e._v("+"+e._s(t.persons-1))]):e._e()]),e._v(" "),n("a",{staticClass:"am-attendee-email",attrs:{href:"mailto:"+t.customer.email}},[e._v(e._s(t.customer.email))]),e._v(" "),n("a",{staticClass:"am-attendee-phone",attrs:{href:"tel:"+(null!==(e.user=e.getCustomer(t))?e.user.phone:"")}},[e._v(e._s(null!==(e.user=e.getCustomer(t))?e.user.phone:""))]),e._v(" "),e._l(t.ticketsData,function(t){return e.customTickets.length?n("span",{staticClass:"am-attendees-plus",style:{marginLeft:0}},[e._v("\n "+e._s(e.getTicketsSoldString(t))+"\n ")]):e._e()})],2)]),e._v(" "),n("el-col",{attrs:{sm:5}},[n("div",{staticClass:"am-appointment-status small"},[n("span",{class:"am-appointment-status-symbol am-appointment-status-symbol-"+e.getBookingStatus(t)}),e._v(" "),n("el-select",{attrs:{value:t.status,"popper-append-to-body":e.popperAppendToBody,disabled:!e.writeEvents},on:{change:function(n){return e.updateBookingStatus(t,n)}}},e._l(e.statuses,function(e){return n("el-option",{directives:[{name:"show",rawName:"v-show",value:"no-show"!==e.value,expression:"item.value !== 'no-show'"}],key:e.value,staticClass:"am-appointment-dialog-status-option",attrs:{value:e.value}},[n("span",{class:"am-appointment-status-symbol am-appointment-status-symbol-"+("rejected"===e.value?"canceled":e.value)})])}),1)],1)])],1)],1)]),e._v(" "),n("div",{staticClass:"am-attendee-collapse"},[t.payments.length?n("el-row",{staticClass:"am-attendee-collapse-payments",attrs:{gutter:10}},[n("el-col",{attrs:{span:6}},[n("span",[e._v(e._s(e.$root.labels.payment))])]),e._v(" "),n("el-col",{attrs:{span:18}},e._l(t.payments,function(t){return n("p",[n("img",{staticClass:"svg-amelia",style:{width:e.getPaymentIconWidth(t.gateway)},attrs:{src:e.$root.getUrl+"public/img/payments/"+t.gateway+".svg"}}),e._v("\n "+e._s(e.getPaymentGatewayNiceName(t.gateway))+"\n ")])}),0)],1):e._e(),e._v(" "),t.payments.filter(function(e){return e.wcOrderId}).length>0?n("el-row",{staticClass:"am-attendee-collapse-payments",attrs:{gutter:10}},[n("el-col",{attrs:{span:6}},[n("span",[e._v(e._s(e.$root.labels.wc_order)+":")])]),e._v(" "),n("el-col",{attrs:{span:18}},e._l(t.payments,function(t){return n("p",{key:t.id},[n("a",{attrs:{href:t.wcOrderUrl,target:"_blank"}},[e._v("\n #"+e._s(t.wcOrderId)+"\n ")])])}),0)],1):e._e(),e._v(" "),n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{span:12}},[n("div",{},[e.writeEvents?n("el-button",{attrs:{loading:t.removing},on:{click:function(t){return e.removeAttendee(i)}}},[e._v("\n "+e._s(e.$root.labels.event_attendee_remove)+"\n ")]):e._e()],1)]),e._v(" "),n("el-col",{attrs:{span:12}},[n("div",{},[e.writeEvents?n("el-button",{on:{click:function(t){return e.editAttendee(i)}}},[e._v("\n "+e._s(e.$root.labels.event_edit_attendee)+"\n ")]):e._e()],1)])],1)],1)],2)}),1)],1),e._v(" "),0===e.bookings.filter(function(e){return"waiting"===e.status}).length?n("div",{staticClass:"am-empty-state am-section"},[n("img",{attrs:{src:e.$root.getUrl+"public/img/emptystate.svg"}}),e._v(" "),n("h2",[e._v(e._s(e.$root.labels.waiting_list_empty))])]):e._e(),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.hasResult&&e.bookings.filter(function(e){return"waiting"===e.status}).length>0,expression:"!hasResult && bookings.filter(b => b.status === 'waiting').length > 0"}],staticClass:"am-empty-state am-section"},[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._e()],1)],1):e._e(),e._v(" "),n("transition",{attrs:{name:"slide-vertical"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:!e.dialogLoading&&e.bookings.length>0&&e.bookings.filter(function(e){return e.checked}).length>0,expression:"!dialogLoading && bookings.length > 0 && bookings.filter(booking => booking.checked).length > 0"}]},[n("div",{staticClass:"am-dialog-footer"},[n("div",{staticClass:"am-dialog-footer-actions"},[n("el-row",[n("el-col",{staticClass:"align-left",attrs:{sm:12}},[n("el-button",{staticClass:"am-button-icon",on:{click:function(t){e.showDeleteConfirmation=!e.showDeleteConfirmation}}},[n("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.delete,src:e.$root.getUrl+"public/img/delete.svg"}})])],1)],1)],1)])])]),e._v(" "),n("transition",{attrs:{name:"slide-vertical"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:!e.dialogLoading&&e.showDeleteConfirmation,expression:"!dialogLoading && showDeleteConfirmation"}],staticClass:"am-dialog-confirmation"},[n("h3",[e._v(e._s(e.bookings.filter(function(e){return e.checked}).length>1?e.$root.labels.confirm_delete_attendees:e.$root.labels.confirm_delete_attendee))]),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(" "),e.writeEvents?n("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.removeAttendees}},[e._v("\n "+e._s(e.$root.labels.delete)+"\n ")]):e._e()],1)])])],1)},staticRenderFns:[]}},945:function(e,t,n){var i=n(90)(n(946),n(947),!1,null,null,null);e.exports=i.exports},946:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(697),o=n.n(i),a=n(654),s=n(336),r=n(658),l=n(659),c=n(704),u=n(657),d=n(791),p=n.n(d),m=n(663),f=n(673),h=n(700);t.default={mixins:[l.a,a.a,s.a,r.a,u.a,m.a,c.a,f.a,h.a],props:{clonedEventBooking:null,paymentLinksEnabled:null,customTickets:null,eventBooking:null,eventCustomPricing:null,eventId:null,eventMaxCapacity:null,eventCustomerIds:null,eventBookMultipleTimes:{required:!1,default:!0,type:Boolean},options:null,customerCreatedCount:0,showHeader:{required:!1,default:!0,type:Boolean},isCabinet:{type:Boolean,default:!1,required:!1},popperAppendToBody:{type:Boolean,default:!0,required:!1},writeEvents:{type:Boolean,default:!0,required:!1},isWaitingList:{type:Boolean,default:!0,required:!1}},data:function(){var e=this;return{ticketsData:null,showCoupon:!1,customers:[],appointment:null,dialogLoading:!0,executeUpdate:!0,mounted:!1,statusMessage:"",rules:{bookings:[{required:!0,message:this.$root.labels.select_single_customer_warning,trigger:"submit",type:"array"},{validator:function(t,n,i){e.eventBooking.customerId?i():i(new Error(e.$root.labels.select_single_customer_warning))},trigger:"submit"}]},statuses:[{value:"approved",label:this.$root.labels.approved},{value:"waiting",label:this.$root.labels.waiting_list}]}},mounted:function(){var e=this;if(this.appointment={bookings:[this.eventBooking]},(this.eventCustomPricing&&this.customTickets||this.eventBooking.id&&this.eventBooking.ticketsData&&this.eventBooking.ticketsData.length)&&(this.createTicketsBooking(this.customTickets),this.eventBooking.id))for(var t=function(t){var n=e.eventBooking.ticketsData.find(function(n){return e.ticketsData[t].eventTicketId===n.eventTicketId});void 0!==n&&(e.ticketsData[t].id=n.id,e.ticketsData[t].persons=n.persons,e.ticketsData[t].eventTicketId=n.eventTicketId,e.ticketsData[t].price=n.price,e.ticketsData[t].customerBookingId=n.customerBookingId)},n=0;n<this.ticketsData.length;n++)t(n);this.instantiateDialog(),this.setBookingCustomFields(),this.addCustomFieldsValidationRules(),this.$nextTick(function(){e.$refs.customerSelect.$el.children[0].children[0].removeAttribute("readonly")})},updated:function(){this.instantiateDialog()},methods:{dropDownVisible:function(e){var t=this;e||setTimeout(function(){t.$refs.customerSelect&&t.$refs.customerSelect.$el.children[0].children[0].removeAttribute("readonly")},200)},haveSaveConfirmation:function(){if(0!==this.eventBooking.id&&this.paymentLinksEnabled){if(this.eventCustomPricing)return this.clonedEventBooking.ticketsData.reduce(function(e,t){return e+t.price*t.persons},0)<this.ticketsData.reduce(function(e,t){return e+t.price*t.persons},0);var e=this.eventBooking.persons*this.eventBooking.price;return this.clonedEventBooking.persons*this.clonedEventBooking.price<e}return!1},changeTicketsCount:function(e){if(0===this.selectedTicketsCount(this.ticketsData))for(var t=0;t<this.ticketsData.length;t++)if(t!==e){this.ticketsData[t].persons=1;break}},selectedTicketsCount:function(e){var t=0;return e.forEach(function(e){t+=e.persons}),t},createTicketsBooking:function(e){var t=this,n=[];e.forEach(function(e,i){n.push({id:0,eventTicketId:e.id,persons:0!==i||t.eventBooking.id?0:1,customerBookingId:null,price:e.dateRangePrice?e.dateRangePrice:e.price})}),this.ticketsData=n},getTicketName:function(e){return this.customTickets.filter(function(t){return t.id===e.eventTicketId})[0].name},customersFetched:function(){this.customers=this.searchedCustomers},searchExistingCustomers:function(e){e?this.searchCustomers(e,this.customersFetched):this.customers=this.options.entities.customers},showDialogNewCustomer:function(){this.$emit("showDialogNewCustomer")},instantiateDialog:function(){var e=this;null!==this.eventBooking&&!0===this.executeUpdate&&(this.mounted=!0,this.executeUpdate=!1,this.dialogLoading=!1,0!==parseInt(this.eventBooking.id)?this.customers=this.options.entities.customers:(this.showCoupon=!0,this.eventBookMultipleTimes?this.customers=this.options.entities.customers:this.customers=this.options.entities.customers.filter(function(t){return-1===e.eventCustomerIds.indexOf(t.id)})))},closeDialog:function(){this.$emit("closeDialog")},getParsedEntity:function(e){var t=this;for(var n in this.eventBooking.customFields)"datepicker"===this.eventBooking.customFields[n].type&&this.eventBooking.customFields[n].value&&(this.eventBooking.customFields[n].value=this.getStringFromDate(this.eventBooking.customFields[n].value));var i=this.showCoupon?this.eventBooking.coupon:this.eventBooking.coupon?this.eventBooking.coupon.id:null,o=this.options.entities.coupons?this.options.entities.coupons.find(function(e){return e.id===i}):null,a=this.isWaitingList?this.eventBooking.status:"approved";return{type:"event",eventId:this.eventId,bookings:[{customFields:this.getAllowedCustomFields(this.eventBooking.customFields,"events",this.eventId),persons:this.eventBooking.persons,customerId:this.eventBooking.customerId,customer:this.customers.find(function(e){return e.id===t.eventBooking.customerId}),coupon:o,deposit:0,ticketsData:this.ticketsData,status:a}],couponCode:o?o.code:null,validateCoupon:!1,locale:"",timeZone:"",payment:{gateway:"onSite"},isBackendOrCabinet:!0,createPaymentLinks:e}},clearValidation:function(){void 0!==this.$refs.eventBooking&&this.$refs.eventBooking.clearValidate()},errorCallback:function(e){var t=this;setTimeout(function(){"message"in e?t.notify(t.$root.labels.error,e.message,"error"):"timeSlotUnavailable"in e&&!0===e.timeSlotUnavailable?t.notify(t.$root.labels.error,t.$root.labels.maximum_capacity_reached,"error"):e.data&&"timeSlotUnavailable"in e.data&&!0===e.data.timeSlotUnavailable?t.notify(t.$root.labels.error,t.$root.labels.maximum_capacity_reached,"error"):"customerAlreadyBooked"in e&&!0===e.customerAlreadyBooked?t.notify(t.$root.labels.error,t.$root.labels.customer_already_booked_ev,"error"):"couponUnknown"in e&&!0===e.couponUnknown&&t.notify(t.$root.labels.error,t.$root.labels.coupon_unknown,"error")},200)},addCustomFieldsValidationRules:function(){for(var e=0;e<this.options.entities.customFields.length;e++)this.isCustomFieldVisible(this.options.entities.customFields[e],"event",this.eventId)&&(void 0===this.rules.bookings[0]&&this.$set(this.rules.bookings,0,{type:"array"}),void 0===this.rules.bookings[0].customFields&&this.$set(this.rules.bookings[0],"customFields",{}),this.rules.bookings[0].customFields[this.options.entities.customFields[e].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.events.map(function(e){return e.id})}));return this.options.entities.customFields.length>0&&null!==this.booking&&this.eventId&&e.includes(this.eventId)},validationTabFailCallback:function(){}},watch:{customerCreatedCount:function(){this.customers=this.options.entities.customers,this.eventBooking.customerId=this.customers[this.customers.length-1].id,this.customers.sort(function(e,t){return(e.firstName+" "+e.lastName).localeCompare(t.firstName+" "+t.lastName)})}},components:{DialogCustomFields:p.a,DialogActions:o.a}}},947:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"am-dialog-attendees-inner"},[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.eventBooking&&!e.dialogLoading?n("div",{staticClass:"am-dialog-scrollable",class:{"am-edit":0!==e.eventBooking.id},staticStyle:{"overflow-x":"hidden"}},[e.showHeader?n("div",{staticClass:"am-dialog-header"},[n("el-row",[n("el-col",{attrs:{span:18}},[e.eventBooking.customer?n("h2",[e._v(e._s(e.$root.labels.event_edit_attendee))]):e._e(),e._v(" "),e.eventBooking.customer?e._e():n("h2",[e._v(e._s(e.$root.labels.event_add_attendee))])]),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?n("el-form",{ref:"appointment",attrs:{model:{bookings:[e.eventBooking]},rules:e.rules,"label-position":"top"}},[n("el-form-item",{attrs:{label:e.$root.labels.customer+":",prop:"bookings"}},[n("el-select",{ref:"customerSelect",attrs:{remote:"",filterable:"",clearable:"","remote-method":e.searchExistingCustomers,disabled:!1!==e.eventBooking.added,placeholder:e.$root.labels.customer,"popper-class":"am-dropdown-cabinet",loading:e.loadingCustomers},on:{clear:e.searchExistingCustomers,"visible-change":e.dropDownVisible},model:{value:e.eventBooking.customerId,callback:function(t){e.$set(e.eventBooking,"customerId",t)},expression:"eventBooking.customerId"}},[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.customers,function(t){return n("el-option",{key:t.id,staticClass:"am-has-option-meta",attrs:{label:t.firstName+" "+t.lastName,value:t.id}},[n("span",{class:e.getOptionClass(t,null,t.status)},[e._v(e._s(t.firstName)+" "+e._s(t.lastName))]),e._v(" "),t.email?n("span",{staticClass:"am-drop-item-meta"},[e._v(e._s(t.email))]):e._e()])}),e._v(" "),e._l([{customer:{id:0,firstName:"",lastName:"",email:"",info:JSON.stringify({firstName:"",lastName:"",email:"",phone:""})}}],function(t){return 0===e.customers.length?n("el-option",{key:t.customer.id,staticClass:"am-has-option-meta",style:{display:"none"},attrs:{label:t.firstName+" "+t.lastName,value:t}}):e._e()})],2)])],1),e._v(" "),(e.eventBooking.id?e.eventBooking.ticketsData&&e.eventBooking.ticketsData.length:e.eventCustomPricing)?e._e():n("el-form-item",{attrs:{label:e.$root.labels.event_book_persons+":"}},[n("el-input-number",{attrs:{min:1},model:{value:e.eventBooking.persons,callback:function(t){e.$set(e.eventBooking,"persons",t)},expression:"eventBooking.persons"}})],1),e._v(" "),(e.eventBooking.id?e.eventBooking.ticketsData&&e.eventBooking.ticketsData.length:e.eventCustomPricing)?n("el-form-item",{attrs:{label:e.$root.labels.event_book_tickets+":"}},[n("div",{staticClass:"am-ticket-box",style:{flexWrap:"wrap"}},e._l(e.ticketsData,function(t,i){return n("div",{key:i,staticClass:"am-ticket"},[n("el-row",[n("el-col",{staticClass:"am-ticket-info",attrs:{sm:16,lg:16}},[n("span",{staticClass:"am-ticket-name",style:{fontWeight:500}},[e._v("\n "+e._s(e.getTicketName(t))+"\n ")])]),e._v(" "),n("el-col",{staticClass:"am-ticket-number-of-people",attrs:{sm:8,lg:8}},[n("el-input-number",{style:{maxHeight:"32px",lineHeight:"32px",overflow:"hidden"},attrs:{size:"mini",min:0,type:"number"},on:{change:function(t){return e.changeTicketsCount(i)}},model:{value:t.persons,callback:function(n){e.$set(t,"persons",n)},expression:"booking.persons"}})],1)],1)],1)}),0)]):e._e(),e._v(" "),e.isWaitingList&&0===e.eventBooking.id?n("el-form-item",{attrs:{label:e.$root.labels.status+":"}},[n("el-select",{attrs:{"popper-append-to-body":e.popperAppendToBody,disabled:!e.writeEvents},model:{value:e.eventBooking.status,callback:function(t){e.$set(e.eventBooking,"status",t)},expression:"eventBooking.status"}},e._l(e.statuses,function(t){return n("el-option",{key:t.value,staticClass:"am-appointment-dialog-status-option",attrs:{value:t.value,label:t.label}},[n("span",{class:"am-appointment-status-symbol-wl-status am-appointment-status-symbol am-appointment-status-symbol-"+("rejected"===t.value?"canceled":t.value)},[e._v("\n "+e._s(t.label)+"\n ")])])}),1)],1):e._e(),e._v(" "),e.couponsFilteredEvent.length>0&&e.showCoupon&&("admin"===e.$root.settings.role||"manager"===e.$root.settings.role)?n("el-form-item",{attrs:{label:e.$root.labels.coupon}},[n("el-select",{attrs:{filterable:"",clearable:"",placeholder:e.$root.labels.select_coupon,"popper-class":"am-dropdown-cabinet",disabled:"customer"===e.$root.settings.role},model:{value:e.eventBooking.coupon,callback:function(t){e.$set(e.eventBooking,"coupon",t)},expression:"eventBooking.coupon"}},e._l(e.couponsFilteredEvent,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._e(),e._v(" "),n("dialog-custom-fields",{attrs:{entityType:"event",appointment:{bookings:[e.eventBooking]},entityId:e.eventId,customFields:e.options.entities.customFields,"is-cabinet":e.isCabinet,showCustomerInfo:!1},on:{clearValidation:e.clearValidation}})],1):e._e()],1):e._e(),e._v(" "),e.eventBooking&&!e.dialogLoading?n("dialog-actions",{attrs:{formName:"appointment",urlName:0!==e.eventBooking.id?"events/bookings":"bookings",isNew:0===e.eventBooking.id,entity:e.eventBooking,getParsedEntity:e.getParsedEntity,hasIcons:!0,haveSaveConfirmation:e.haveSaveConfirmation,buttonText:{confirm:{save:{yes:e.$root.labels.yes,no:e.$root.labels.no}}},status:{on:"visible",off:"hidden"},action:{haveAdd:!0,haveEdit:!0,haveStatus:!1,haveRemove:!1,haveRemoveEffect:!1,haveDuplicate:!1},message:{success:{save:e.$root.labels.event_attendee_saved,remove:"",show:"",hide:""},confirm:{remove:"",show:"",hide:"",duplicate:"",save:e.$root.labels.price_changed_message}}},on:{errorCallback:e.errorCallback,validationTabFailCallback:e.validationTabFailCallback}}):e._e(),e._v(" "),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))])])])])],1)},staticRenderFns:[]}},960:function(e,t,n){var i=function(){return this}()||Function("return this")(),o=i.regeneratorRuntime&&Object.getOwnPropertyNames(i).indexOf("regeneratorRuntime")>=0,a=o&&i.regeneratorRuntime;if(i.regeneratorRuntime=void 0,e.exports=n(961),o)i.regeneratorRuntime=a;else try{delete i.regeneratorRuntime}catch(e){i.regeneratorRuntime=void 0}},961:function(e,t){!function(t){"use strict";var n,i=Object.prototype,o=i.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",r=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag",c="object"==typeof e,u=t.regeneratorRuntime;if(u)c&&(e.exports=u);else{(u=t.regeneratorRuntime=c?e.exports:{}).wrap=_;var d="suspendedStart",p="suspendedYield",m="executing",f="completed",h={},g={};g[s]=function(){return this};var v=Object.getPrototypeOf,b=v&&v(v(O([])));b&&b!==i&&o.call(b,s)&&(g=b);var y=x.prototype=C.prototype=Object.create(g);w.prototype=y.constructor=x,x.constructor=w,x[l]=w.displayName="GeneratorFunction",u.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},u.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,l in e||(e[l]="GeneratorFunction")),e.prototype=Object.create(y),e},u.awrap=function(e){return{__await:e}},S(P.prototype),P.prototype[r]=function(){return this},u.AsyncIterator=P,u.async=function(e,t,n,i){var o=new P(_(e,t,n,i));return u.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},S(y),y[l]="Generator",y[s]=function(){return this},y.toString=function(){return"[object Generator]"},u.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var i=t.pop();if(i in e)return n.value=i,n.done=!1,n}return n.done=!0,n}},u.values=O,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function i(i,o){return r.type="throw",r.arg=e,t.next=i,o&&(t.method="next",t.arg=n),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],r=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var l=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(l&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=e,s.arg=t,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,i){return this.delegate={iterator:O(e),resultName:t,nextLoc:i},"next"===this.method&&(this.arg=n),h}}}function _(e,t,n,i){var o=t&&t.prototype instanceof C?t:C,a=Object.create(o.prototype),s=new D(i||[]);return a._invoke=function(e,t,n){var i=d;return function(o,a){if(i===m)throw new Error("Generator is already running");if(i===f){if("throw"===o)throw a;return A()}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var r=T(s,n);if(r){if(r===h)continue;return r}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var l=k(e,t,n);if("normal"===l.type){if(i=n.done?f:p,l.arg===h)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=f,n.method="throw",n.arg=l.arg)}}}(e,n,s),a}function k(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function C(){}function w(){}function x(){}function S(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function P(e){var t;this._invoke=function(n,i){function a(){return new Promise(function(t,a){!function t(n,i,a,s){var r=k(e[n],e,i);if("throw"!==r.type){var l=r.arg,c=l.value;return c&&"object"==typeof c&&o.call(c,"__await")?Promise.resolve(c.__await).then(function(e){t("next",e,a,s)},function(e){t("throw",e,a,s)}):Promise.resolve(c).then(function(e){l.value=e,a(l)},s)}s(r.arg)}(n,i,t,a)})}return t=t?t.then(a,a):a()}}function T(e,t){var i=e.iterator[t.method];if(i===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,T(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=k(i,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,h):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function $(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach($,this),this.reset(!0)}function O(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function t(){for(;++i<e.length;)if(o.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=n,t.done=!0,t};return a.next=a}}return{next:A}}function A(){return{value:n,done:!0}}}(function(){return this}()||Function("return this")())},975:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(336),o=n(654),a=n(664);t.default={mixins:[o.a,i.a,a.a],props:{daysOff:{type:Array},listedDaysOff:{default:function(){return[]},type:Array},allowEditCompanyDaysOff:{type:Boolean,default:!0,required:!1},isCabinet:{type:Boolean,default:!1,required:!1}},data:function(){return{editedDayOffIndex:-1,filterDate:this.$moment(),model:{dayOffDates:null,dayOffId:0,dayOffName:"",dayOffRepeat:0},rules:{dayOffName:[{required:!0,message:this.$root.labels.days_off_name_warning,trigger:"submit"}],dayOffDates:[{required:!0,message:this.$root.labels.days_off_date_warning,trigger:"submit"}]},settings:this.daysOff.slice(0),showDayOffForm:!1,yearDaysOff:[],yearListedDaysOff:[]}},mounted:function(){this.filterDaysOff()},methods:{editDayOff:function(e){this.model.dayOffId=e.hasOwnProperty("id")?e.id:0,this.model.dayOffName=e.name,this.model.dayOffDates={start:this.$moment(e.startDate,"YYYY-MM-DD").toDate(),end:this.$moment(e.endDate,"YYYY-MM-DD").toDate()},this.model.dayOffRepeat=e.repeat,this.showDayOffForm=!0,this.editedDayOffIndex=this.settings.indexOf(e)},addDayOff:function(){this.editedDayOffIndex=-1,this.model.dayOffId=0,this.model.dayOffName="",this.model.dayOffRepeat=0,this.model.dayOffDates=null,this.showDayOffForm=!0},saveDayOff:function(){var e=this;this.$refs.model.validate(function(t){if(!t)return!1;-1!==e.editedDayOffIndex?e.settings.splice(e.editedDayOffIndex,1,e.dayOff):e.settings.push(e.dayOff),e.$refs.model.clearValidate(),e.showDayOffForm=!1,e.filterDate=e.$moment(e.dayOff.startDate,"YYYY-MM-DD").toDate(),e.filterDaysOff(),e.$emit("changeDaysOff",e.settings)})},deleteDayOff:function(e){var t=this.settings.indexOf(e);this.settings.splice(t,1),this.filterDaysOff(),this.$emit("changeDaysOff",this.settings)},filter:function(e){var t=this,n=e.filter(function(e){return t.$moment(e.startDate,"YYYY-MM-DD").year()===t.filterYear&&!e.repeat}),i=e.filter(function(e){return e.repeat});return i.forEach(function(e,n){t.$moment(e.startDate,"YYYY-MM-DD").year()===t.$moment(e.endDate,"YYYY-MM-DD").year()?i[n].endDate=t.$moment(e.endDate,"YYYY-MM-DD").year(t.filterYear).format("YYYY-MM-DD"):i[n].endDate=t.$moment(e.endDate,"YYYY-MM-DD").year(t.filterYear+1).format("YYYY-MM-DD"),i[n].startDate=t.$moment(e.startDate,"YYYY-MM-DD").year(t.filterYear).format("YYYY-MM-DD")}),i.concat(n).sort(function(e,n){return t.$moment(e.startDate).diff(n.startDate)})},editCompanyDaysOffSettings:function(){this.$emit("showCompanyDaysOffSettingsDialog")},filterDaysOff:function(){this.yearDaysOff=this.filter(this.settings),this.yearListedDaysOff=this.filter(this.listedDaysOff)}},computed:{filterYear:function(){return this.$moment(this.filterDate,"YYYY-MM-DD").year()},dayOff:function(){return{id:this.model.dayOffId,name:this.model.dayOffName,startDate:this.$moment(this.model.dayOffDates.start).format("YYYY-MM-DD"),endDate:this.$moment(this.model.dayOffDates.end).format("YYYY-MM-DD"),repeat:this.model.dayOffRepeat}}},watch:{settings:function(){this.yearDaysOff=this.filter(this.settings)},listedDaysOff:function(){this.yearListedDaysOff=this.filter(this.listedDaysOff)}}}},976:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"am-days-off"},[n("div",{staticClass:"am-dialog-table"},[n("el-row",{staticStyle:{"flex-wrap":"wrap"},attrs:{gutter:20,type:"flex",align:"middle"}},[n("el-col",{staticClass:"am-days-off__header"},[n("el-date-picker",{attrs:{type:"year",clearable:!1,placeholder:e.$root.labels.pick_a_year},on:{change:e.filterDaysOff},model:{value:e.filterDate,callback:function(t){e.filterDate=t},expression:"filterDate"}}),e._v(" "),n("div",{staticClass:"am-days-off__legend"},[n("div",{staticClass:"am-legend-repeat"},[n("span",{staticClass:"type repeat"}),e._v(e._s(e.$root.labels.repeat_every_year))]),e._v(" "),n("div",{staticClass:"am-legend-once"},[n("span",{staticClass:"type once"}),e._v(e._s(e.$root.labels.once_off))])])],1)],1)],1),e._v(" "),n("div",{staticClass:"am-employee-days-off"},[n("div",{staticClass:"am-dialog-table"},[e.listedDaysOff.length>0?n("h4",[e._v(e._s(e.$root.labels.employee_days_off))]):e._e(),e._v(" "),n("el-row",{staticClass:"am-dialog-table-head days",attrs:{gutter:20}},[n("el-col",{attrs:{span:12}},[n("span",[e._v(e._s(e.$root.labels.date))])]),e._v(" "),n("el-col",{attrs:{span:12}},[n("span",[e._v(e._s(e.$root.labels.day_off_name))])])],1),e._v(" "),e._l(e.yearDaysOff,function(t,i){return n("el-row",{key:i,staticClass:"am-day-off",staticStyle:{"flex-wrap":"wrap"},attrs:{gutter:20,type:"flex",align:"middle"}},[n("el-col",{attrs:{xs:12,sm:12,md:12}},[n("span",{staticClass:"type",class:{repeat:t.repeat,once:!t.repeat}}),e._v(" "),n("el-tooltip",{attrs:{effect:"dark",content:t.startDate===t.endDate?e.getFrontedFormattedDate(t.startDate):e.getFrontedFormattedDate(t.startDate)+" - "+e.getFrontedFormattedDate(t.endDate),placement:"top-start"}},[n("span",[e._v("\n "+e._s(t.startDate===t.endDate?e.getFrontedFormattedDate(t.startDate):e.getFrontedFormattedDate(t.startDate)+" - "+e.getFrontedFormattedDate(t.endDate))+"\n ")])])],1),e._v(" "),n("el-col",{staticClass:"am-day-off__name-column",attrs:{xs:12,sm:12,md:8}},[n("span",{attrs:{title:t.name}},[e._v(e._s(t.name))])]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{xs:24,sm:24,md:4}},[n("div",{staticClass:"am-edit-element",on:{click:function(n){return e.editDayOff(t)}}},[n("img",{attrs:{src:e.$root.getUrl+"public/img/edit-pen.svg"}})]),e._v(" "),n("div",{staticClass:"am-delete-element",on:{click:function(n){return e.deleteDayOff(t)}}},[n("i",{staticClass:"el-icon-minus"})])])],1)}),e._v(" "),n("el-row",[n("el-col",[n("div",{staticClass:"am-add-element",on:{click:e.addDayOff}},[n("i",{staticClass:"el-icon-plus"}),n("span",{staticClass:"am-add-day-off"},[e._v(e._s(e.$root.labels.add_day_off))])])])],1)],2),e._v(" "),n("transition",{attrs:{name:"fade"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.showDayOffForm,expression:"showDayOffForm"}],staticClass:"am-day-off-add"},[n("el-form",{ref:"model",attrs:{model:e.model,rules:e.rules,"label-position":"top"},on:{submit:function(t){return t.preventDefault(),e.saveDayOff(t)}}},[n("el-form-item",{attrs:{label:e.$root.labels.day_off_name+":",prop:"dayOffName"}},[n("el-input",{attrs:{"auto-complete":"off",placeholder:e.$root.labels.add_day_off_placeholder},model:{value:e.model.dayOffName,callback:function(t){e.$set(e.model,"dayOffName",t)},expression:"model.dayOffName"}})],1),e._v(" "),n("el-row",{attrs:{gutter:20}},[n("el-col",{staticClass:"v-calendar-column",attrs:{sm:24}},[n("el-form-item",{attrs:{label:e.$root.labels.date+":",prop:"dayOffDates"}},[n("v-date-picker",{attrs:{mode:"range","input-class":"el-input__inner","popover-visibility":"focus","popover-direction":"top","popover-align":e.screenWidth<768?"center":"left","is-required":!0,"is-expanded":!1,"show-day-popover":!1,"tint-color":e.isCabinet?e.$root.settings.customization.primaryColor:"#1A84EE","input-props":{class:"el-input__inner",readOnly:"readonly"},placeholder:e.$root.labels.pick_a_date_or_range,formats:e.vCalendarFormats},model:{value:e.model.dayOffDates,callback:function(t){e.$set(e.model,"dayOffDates",t)},expression:"model.dayOffDates"}})],1)],1)],1),e._v(" "),n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{sm:12}},[n("el-checkbox",{staticClass:"am-semi-strong",model:{value:e.model.dayOffRepeat,callback:function(t){e.$set(e.model,"dayOffRepeat",t)},expression:"model.dayOffRepeat"}},[e._v("\n "+e._s(e.$root.labels.days_off_repeat_yearly)+"\n ")])],1),e._v(" "),n("el-col",{staticClass:"align-right am-day-off-add-buttons",attrs:{sm:12}},[n("el-button",{attrs:{size:"small"},on:{click:function(t){e.showDayOffForm=!e.showDayOffForm}}},[e._v(e._s(e.$root.labels.cancel))]),e._v(" "),n("el-button",{staticClass:"am-dialog-create",attrs:{size:"small",type:"primary"},on:{click:e.saveDayOff}},[e._v("\n "+e._s(e.$root.labels.days_off_add)+"\n ")])],1)],1)],1)],1)])],1),e._v(" "),e.listedDaysOff.length>0?n("div",{staticClass:"am-company-days-off"},[n("div",{staticClass:"am-dialog-table"},[n("h4",[e._v(e._s(e.$root.labels.company_days_off))]),e._v(" "),n("el-row",{staticClass:"am-dialog-table-head days",attrs:{gutter:20}},[n("el-col",{attrs:{span:12}},[n("span",[e._v(e._s(e.$root.labels.date))])]),e._v(" "),n("el-col",{attrs:{span:12}},[n("span",[e._v(e._s(e.$root.labels.day_off_name))])])],1),e._v(" "),e._l(e.yearListedDaysOff,function(t,i){return n("el-row",{key:i,staticClass:"am-day-off",attrs:{gutter:20,type:"flex",align:"middle"}},[n("el-col",{attrs:{span:12}},[n("span",{staticClass:"type",class:{repeat:t.repeat,once:!t.repeat}}),e._v(" "),n("span",[e._v("\n "+e._s(t.startDate===t.endDate?e.getFrontedFormattedDate(t.startDate):e.getFrontedFormattedDate(t.startDate)+" - "+e.getFrontedFormattedDate(t.endDate))+"\n ")])]),e._v(" "),n("el-col",{attrs:{span:8}},[n("span",[e._v(e._s(t.name))])])],1)}),e._v(" "),e.allowEditCompanyDaysOff?n("el-row",[n("el-col",{attrs:{span:24}},[n("div",{staticClass:"am-add-element",on:{click:e.editCompanyDaysOffSettings}},[e._v(e._s(e.$root.labels.edit_company_days_off)+"\n ")])])],1):e._e()],2)]):e._e()])},staticRenderFns:[]}},977:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(654),o=n(336),a=n(660),s=n(883);t.default={mixins:[s.a,i.a,o.a,a.a],props:{activeTab:"",weekSchedule:null,categorizedServiceList:null,locations:null},data:function(){return{rules:{startTime:[{required:!0,message:this.$root.labels.select_time_warning,trigger:"submit"}],endTime:[{required:!0,message:this.$root.labels.select_time_warning,trigger:"submit"}]},responsiveGrid:{editHours:{workHours:24,hour:24,services:24,location:24},periods:{hours:this.categorizedServiceList?4:6,services:this.categorizedServiceList?12:10,locations:5,edit:3}}}},methods:{getWorkingPeriodsInSeconds:function(e){var t=[],n=this;return this.getDayHours(e).filter(function(e){return"Work"===e.type}).map(function(e){return e.data}).map(function(e){return e.time}).forEach(function(i){e.form.data.time[0]===i[0]&&e.form.data.time[1]===i[1]||t.push([n.getStringTimeInSeconds(i[0]),n.getStringTimeInSeconds(i[1])])}),t},getDayHours:function(e){var t=this,n=[];return e.periods.forEach(function(e,t){n.push({index:t,type:"Work",data:e})}),e.breaks.forEach(function(e,t){n.push({index:t,type:"Break",data:e})}),n.sort(function(e,n){return t.$moment("2000-01-01 "+e.data.time[0]+":00","YYYY-MM-DD HH:mm:ss").diff(t.$moment("2000-01-01 "+n.data.time[0]+":00","YYYY-MM-DD HH:mm:ss"))})},getServicesNames:function(e){var t=[];return this.categorizedServiceList&&this.categorizedServiceList.forEach(function(n){n.serviceList.forEach(function(n){-1!==e.indexOf(n.id)&&t.push(n.name)})}),t},selectAllInCategory:function(e,t){var n=this.categorizedServiceList.find(function(e){return e.id===t}).serviceList.filter(function(e){return e.state}).map(function(e){return e.id});_.isEqual(_.intersection(n,e.serviceIds),n)?e.serviceIds=_.difference(e.serviceIds,n):e.serviceIds=_.uniq(e.serviceIds.concat(n))},getTimeSelectOptionsForBreaks:function(e,t,n,i){return{start:"00:00",end:"24:00",step:this.secondsToTimeSelectStep(this.getTimeSlotLength()),minTime:n||e,maxTime:i||t}},editHours:function(e,t,n){var i=this;switch(t){case"Work":e.form.show=!1,setTimeout(function(){e.form={data:e.periods[n],oldData:JSON.parse(JSON.stringify(e.periods[n])),isNew:!1,type:"Work",show:!0,index:n},i.findFreePeriods(i.getWorkingPeriodsInSeconds(e))},200);break;case"Break":e.form.show=!1,setTimeout(function(){e.form={data:e.breaks[n],oldData:JSON.parse(JSON.stringify(e.breaks[n])),isNew:!1,type:"Break",show:!0,index:n}},200)}},deleteHours:function(e,t,n){switch(t){case"Work":e.periods.splice(n,1);break;case"Break":e.breaks.splice(n,1)}},showNewHoursForm:function(e){e.form={data:{time:"Work"===e.form.type?[e.periods.length?e.periods[e.periods.length-1].time[1]:"",""]:["",""],id:null,locationId:null,locationIds:[],serviceIds:[],periodLocationList:[],periodServiceList:[]},isNew:!0,type:"Work",show:!0,index:null},this.findFreePeriods(this.getWorkingPeriodsInSeconds(e))},hideHoursForm:function(e){switch(e.form.show=!1,e.form.type){case"Work":e.form.isNew||(e.periods[e.form.index]=e.form.oldData);break;case"Break":e.form.isNew||(e.breaks[e.form.index]=e.form.oldData)}},saveHoursForm:function(e){this.$refs.workDay[0].validate(function(t){if(!t)return!1;switch(e.form.type){case"Work":e.form.isNew?e.periods.push({id:null,time:e.form.data.time,locationIds:e.form.data.locationIds,serviceIds:e.form.data.serviceIds,locationId:e.form.data.locationId,periodLocationList:e.form.data.periodLocationList,periodServiceList:e.form.data.periodServiceList}):e.periods[e.form.index]=e.form.data;break;case"Break":e.form.isNew?e.breaks.push({id:null,time:e.form.data.time}):e.breaks[e.form.index]=e.form.data}e.form.show=!1})},applyToAllDays:function(e){var t=JSON.parse(JSON.stringify(e.periods));t.forEach(function(e){e.id=null,e.periodLocationList=[],e.periodServiceList=[],e.savedPeriodServiceList=[]});var n=JSON.parse(JSON.stringify(e.breaks));n.forEach(function(e){e.id=null}),this.weekSchedule.forEach(function(i){i.id=null,i.periods=JSON.parse(JSON.stringify(t)),i.breaks=JSON.parse(JSON.stringify(n)),i.time=JSON.parse(JSON.stringify(e.time))})},getPeriodLocationsIds:function(e){return e.locationIds.length?e.locationIds:e.locationId?[e.locationId]:[]},getLocationsNames:function(e){var t=this,n=[];return e.forEach(function(e){var i=t.locations.find(function(t){return t.id===e});i&&n.push(i.name)}),n},getColumnLength:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.categorizedServiceList&&this.servicesCount>1&&this.locations&&this.locations.length>1?"mini"===e?{workHours:24,hour:24,services:24,location:24}:"mobile"===e?{workHours:24,hour:12,services:24,location:24}:{workHours:8,hour:12,services:8,location:8}:this.categorizedServiceList&&this.servicesCount>1?"mini"===e?{workHours:24,hour:24,services:24,location:0}:"mobile"===e?{workHours:24,hour:12,services:24,location:0}:{workHours:10,hour:12,services:14,location:0}:this.locations&&this.locations.length>1?"mini"===e?{workHours:24,hour:24,services:0,location:24}:"mobile"===e?{workHours:24,hour:12,services:0,location:24}:{workHours:10,hour:12,services:0,location:14}:"mini"===e?{workHours:24,hour:24,services:0,location:0}:{workHours:24,hour:12,services:0,location:0}},handleResize:function(){if("workingHours"===this.activeTab||"hours"===this.activeTab){var e=this.$refs.workingHours;void 0!==e&&e.offsetWidth<320?(this.responsiveGrid.periods={hours:24,services:24,locations:24,edit:24},this.responsiveGrid.editHours=this.getColumnLength("mini")):void 0!==e&&e.offsetWidth<650?(this.responsiveGrid.periods={hours:24,services:24,locations:24,edit:24},this.responsiveGrid.editHours=this.getColumnLength("mobile")):(this.responsiveGrid.periods={hours:this.categorizedServiceList?4:6,services:this.categorizedServiceList?12:10,locations:5,edit:3},this.responsiveGrid.editHours=this.getColumnLength())}}},created:function(){window.addEventListener("resize",this.handleResize)},computed:{servicesCount:function(){var e=0;return this.categorizedServiceList.forEach(function(t){e+=t.serviceList.length}),e}},watch:{activeTab:function(){"workingHours"!==this.activeTab&&"hours"!==this.activeTab||this.handleResize()}}}},978:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"workingHours",staticClass:"am-working-hours"},e._l(e.weekSchedule,function(t,i){return n("div",{key:t.id,staticClass:"am-dialog-table"},[n("el-row",{staticClass:"am-dialog-table-head hours"},[n("el-col",{attrs:{span:12}},[n("span",[e._v(e._s(t.day))])]),e._v(" "),n("el-col",{staticClass:"am-align-right",attrs:{span:12}},[0===i?n("span",{staticClass:"am-add-element",on:{click:function(n){return e.applyToAllDays(t)}}},[e._v("\n "+e._s(e.$root.labels.apply_to_all_days)+"\n ")]):e._e(),e._v(" "),n("div",{staticClass:"am-add-element",on:{click:function(n){return e.showNewHoursForm(t)}}},[n("i",{staticClass:"el-icon-plus"})])])],1),e._v(" "),n("transition",{attrs:{name:"fade"}},[t.form.show?n("div",{staticClass:"am-add-period"},[n("el-form",{ref:"workDay",refInFor:!0,attrs:{"label-position":"top",model:t}},[t.form.isNew?n("el-row",{staticClass:"am-add-period-type",attrs:{gutter:10}},[n("el-col",[n("el-radio",{attrs:{label:"Work"},model:{value:t.form.type,callback:function(n){e.$set(t.form,"type",n)},expression:"workDay.form.type"}},[e._v(e._s(e.$root.labels.work_hours))]),e._v(" "),n("el-radio",{attrs:{label:"Break"},model:{value:t.form.type,callback:function(n){e.$set(t.form,"type",n)},expression:"workDay.form.type"}},[e._v(e._s(e.$root.labels.breaks))])],1)],1):e._e(),e._v(" "),"Work"===t.form.type?n("el-row",{staticStyle:{"flex-wrap":"wrap"},attrs:{gutter:10,type:"flex"}},[n("el-col",{attrs:{span:e.responsiveGrid.editHours.workHours}},[n("el-row",{staticStyle:{"flex-wrap":"wrap"},attrs:{gutter:10,type:"flex"}},[n("el-col",{staticStyle:{"margin-bottom":"4px"},attrs:{span:24}},[n("span",[e._v(e._s(e.$root.labels.work_hours))])]),e._v(" "),n("el-col",{attrs:{span:e.responsiveGrid.editHours.hour}},[n("el-form-item",{attrs:{rules:e.rules.startTime,prop:"form.data.time.0"}},[n("el-time-select",{staticStyle:{"margin-bottom":"12px"},attrs:{"picker-options":e.getPeriodBorderTime(t.form.data.time[0],t.form.data.time[1],!0),size:"mini","popper-class":"am-dropdown-cabinet"},on:{change:function(n){e.startTimeChanged(t.form.data.time[0],t.form.data.time[1],e.getWorkingPeriodsInSeconds(t),function(e){t.form.data.time[1]=e})},focus:function(n){e.startTimeChanged(t.form.data.time[0],t.form.data.time[1],e.getWorkingPeriodsInSeconds(t),function(e){t.form.data.time[1]=e})}},model:{value:t.form.data.time[0],callback:function(n){e.$set(t.form.data.time,0,n)},expression:"workDay.form.data.time[0]"}})],1)],1),e._v(" "),n("el-col",{attrs:{span:e.responsiveGrid.editHours.hour}},[n("el-form-item",{attrs:{rules:e.rules.endTime,prop:"form.data.time.1"}},[n("el-time-select",{staticStyle:{"margin-bottom":"12px"},attrs:{"picker-options":e.getPeriodBorderTime(t.form.data.time[0],t.form.data.time[1],!1),size:"mini","popper-class":"am-dropdown-cabinet",disabled:null===t.form.data.time[0]},model:{value:t.form.data.time[1],callback:function(n){e.$set(t.form.data.time,1,n)},expression:"workDay.form.data.time[1]"}})],1)],1)],1)],1),e._v(" "),e.categorizedServiceList&&e.servicesCount>1?n("el-col",{attrs:{span:e.responsiveGrid.editHours.services}},[n("el-row",{staticStyle:{"flex-wrap":"wrap"},attrs:{gutter:10,type:"flex"}},[n("el-col",{staticStyle:{"margin-bottom":"4px"},attrs:{span:24}},[n("span",[e._v(e._s(e.$root.labels.services.charAt(0).toUpperCase()+e.$root.labels.services.slice(1)))]),e._v(" "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.period_services_filter1_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-col",{attrs:{span:24}},[n("el-select",{staticClass:"am-select-service",attrs:{multiple:"",filterable:"",placeholder:e.$root.labels.period_services_filter,"popper-class":"am-dropdown-cabinet","collapse-tags":"",size:"mini"},model:{value:t.form.data.serviceIds,callback:function(n){e.$set(t.form.data,"serviceIds",n)},expression:"workDay.form.data.serviceIds"}},e._l(e.categorizedServiceList,function(i){return i.serviceList.filter(function(e){return e.state}).length>0?n("div",{key:i.id},[n("div",{staticClass:"am-drop-parent",on:{click:function(n){return e.selectAllInCategory(t.form.data,i.id)}}},[n("span",[e._v(e._s(i.name))])]),e._v(" "),e._l(i.serviceList,function(t){return t.state?n("el-option",{key:t.id,staticClass:"am-drop-child",attrs:{label:t.name,value:t.id}}):e._e()})],2):e._e()}),0)],1)],1)],1):e._e(),e._v(" "),e.locations&&e.locations.length>1?n("el-col",{attrs:{span:e.responsiveGrid.editHours.location}},[n("el-row",{staticStyle:{"flex-wrap":"wrap"},attrs:{gutter:10,type:"flex"}},[n("el-col",{staticStyle:{"margin-bottom":"4px"},attrs:{span:24}},[n("span",[e._v(e._s(e.$root.labels.location))]),e._v(" "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.period_location_filter1_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-col",{attrs:{span:24}},[n("el-select",{staticClass:"am-select-service",attrs:{multiple:"",size:"mini",filterable:"",clearable:"","collapse-tags":"",placeholder:e.$root.labels.location,"popper-class":"am-dropdown-cabinet"},model:{value:t.form.data.locationIds,callback:function(n){e.$set(t.form.data,"locationIds",n)},expression:"workDay.form.data.locationIds"}},e._l(e.locations,function(e){return n("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1)],1):e._e()],1):"Break"===t.form.type?n("el-row",{attrs:{gutter:10}},[n("el-col",{staticStyle:{"margin-bottom":"4px"},attrs:{span:24}},[n("span",[e._v(e._s(e.$root.labels.break_hours))])]),e._v(" "),n("p",{staticStyle:{display:"none"}},[e._v(e._s(e.$root.labels.break_hours))]),e._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{rules:e.rules.startTime,prop:"form.data.time.0"}},[n("el-time-select",{staticStyle:{"margin-bottom":"14px"},attrs:{"picker-options":e.getTimeSelectOptionsForBreaks(t.periods.length?t.periods[0].time[0]:"00:00",t.periods.length?t.periods[t.periods.length-1].time[1]:"24:00","",t.form.data.time[1]),size:"mini","popper-class":"am-dropdown-cabinet"},model:{value:t.form.data.time[0],callback:function(n){e.$set(t.form.data.time,0,n)},expression:"workDay.form.data.time[0]"}})],1)],1),e._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{rules:e.rules.endTime,prop:"form.data.time.1"}},[n("el-time-select",{staticStyle:{"margin-bottom":"14px"},attrs:{"picker-options":e.getTimeSelectOptionsForBreaks(t.periods.length?t.periods[0].time[0]:"00:00",t.periods.length?t.periods[t.periods.length-1].time[1]:"24:00",t.form.data.time[0],""),size:"mini","popper-class":"am-dropdown-cabinet"},model:{value:t.form.data.time[1],callback:function(n){e.$set(t.form.data.time,1,n)},expression:"workDay.form.data.time[1]"}})],1)],1)],1):e._e(),e._v(" "),n("div",{staticClass:"am-working-hours-buttons"},[n("div",{staticClass:"align-left"},[n("el-button",{attrs:{size:"small"},on:{click:function(n){return e.hideHoursForm(t)}}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(n){return e.saveHoursForm(t)}}},[e._v("\n "+e._s(e.$root.labels.save)+"\n ")])],1)])],1)],1):e._e()]),e._v(" "),n("transition-group",{attrs:{name:"fade",tag:"div"}},e._l(e.getDayHours(t),function(o,a){return n("div",{key:a+1,staticClass:"am-period"},[n("el-row",{attrs:{gutter:10,type:"flex"}},[n("el-col",{staticClass:"am-period__services",attrs:{span:e.responsiveGrid.periods.hours}},[n("span",{staticClass:"am-overflow-ellipsis"},[n("span",{class:{"am-period-break":"Break"===o.type}},[e._v(e._s(o.data.time[0])+" - "+e._s(o.data.time[1]))])])]),e._v(" "),n("el-col",{staticClass:"am-flexed2 am-period__services",attrs:{span:e.responsiveGrid.periods.services}},["Work"===o.type&&o.data.serviceIds.length>0?n("span",{staticClass:"am-overflow-ellipsis"},[n("span",{ref:"serviceName-"+i+"-"+a,refInFor:!0,attrs:{title:e.getServicesNames(o.data.serviceIds).join(", ")}},[e._v("\n "+e._s(e.getServicesNames(o.data.serviceIds).join(", "))+"\n ")])]):e._e()]),e._v(" "),n("el-col",{staticClass:"am-flexed2 am-period__locations",attrs:{span:e.responsiveGrid.periods.locations}},["Work"===o.type&&e.getPeriodLocationsIds(o.data).length>0?n("span",{staticClass:"am-overflow-ellipsis",attrs:{title:e.getLocationsNames(e.getPeriodLocationsIds(o.data)).join(", ")}},[e._v("\n "+e._s(e.getLocationsNames(e.getPeriodLocationsIds(o.data)).join(", "))+"\n ")]):e._e()]),e._v(" "),n("el-col",{staticClass:"am-flexed2 am-period__services",class:{mobile:24===e.responsiveGrid.periods.edit},staticStyle:{margin:"auto"},attrs:{span:e.responsiveGrid.periods.edit}},[n("div",{staticClass:"am-edit-element",on:{click:function(n){return e.editHours(t,o.type,o.index)}}},[n("img",{attrs:{src:e.$root.getUrl+"public/img/edit-pen.svg"}})]),e._v(" "),n("div",{staticClass:"am-delete-element",on:{click:function(n){return e.deleteHours(t,o.type,o.index)}}},[n("img",{attrs:{src:e.$root.getUrl+"public/img/delete.svg"}})])])],1)],1)}),0)],1)}),0)},staticRenderFns:[]}},979:function(e,t,n){var i=n(90)(n(980),n(981),!1,null,null,null);e.exports=i.exports},980:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(897),o=n.n(i),a=n(899),s=n.n(a),r=n(902),l=n.n(r),c=n(658),u=n(657),d=n(661),p=n(699);n.n(p);t.default={name:"AssignedServices",components:{CustomDuration:o.a,PersonPrice:s.a,PeriodPrice:l.a,Money:p.Money},mixins:[c.a,d.a,u.a],props:{categorizedServiceList:{type:Array,default:function(){return[]}},weekSchedule:{type:Array,default:function(){return[]}},specialDays:{type:Array,default:function(){return[]}},futureAppointments:{type:Object,default:function(){return{}}},employeeId:{type:Number,default:0},mandatoryServicesIds:{type:Array,default:function(){return[]}}},data:function(){return{editedDurationsService:null,editedPersonsService:null,editedPeriodsService:null,showDurations:!1,showPersons:!1,showPeriods:!1}},created:function(){var e=this;this.categorizedServiceList.forEach(function(t){e.handleCheckSingleInCategory(t)})},methods:{toggleDurations:function(e){var t=this.editedDurationsService&&this.editedDurationsService.id!==e.id||!this.editedDurationsService?e:null;this.editedDurationsService=t,this.showDurations=!!t},togglePersons:function(e){var t=this.editedPersonsService&&this.editedPersonsService.id!==e.id||!this.editedPersonsService?e:null;this.editedPersonsService=t,this.showPersons=!!t},togglePeriods:function(e){var t=this.editedPeriodsService&&this.editedPeriodsService.id!==e.id||!this.editedPeriodsService?e:null;this.editedPeriodsService=t,this.showPeriods=!!t},priceChanged:function(e){e.customPricing.persons.length&&(e.customPricing.persons[0].price=e.price)},changeCategory:function(e){var t=this,n=this.categorizedServiceList.find(function(t){return t.id===e});n.serviceList.forEach(function(e){0!==Object.keys(t.futureAppointments).length&&void 0!==t.futureAppointments[t.employeeId]&&-1!==t.futureAppointments[t.employeeId].indexOf(e.id)&&!1===n.state?t.notify(t.$root.labels.error,t.$root.labels.service_provider_remove_fail_all+" "+e.name+" "+t.$root.labels.service,"error"):t.mandatoryServicesIds.length&&t.mandatoryServicesIds.includes(e.id)&&!1===n.state?t.notify(t.$root.labels.error,t.$root.labels.mandatory_service_remove_fail_all+" "+e.name+" "+t.$root.labels.service,"error"):(e.state=n.state,t.changeSelectedPeriodServices(e))}),this.handleCheckSingleInCategory(n)},changeService:function(e,t){0!==Object.keys(this.futureAppointments).length&&void 0!==this.futureAppointments[this.employeeId]&&-1!==this.futureAppointments[this.employeeId].indexOf(t.id)?(t.state=!0,this.notify(this.$root.labels.error,this.$root.labels.service_provider_remove_fail,"error")):this.mandatoryServicesIds.length&&this.mandatoryServicesIds.includes(t.id)&&(t.state=!0,this.notify(this.$root.labels.error,this.$root.labels.mandatory_service_remove_fail,"error")),this.changeSelectedPeriodServices(t),this.handleCheckSingleInCategory(e)},handleCheckSingleInCategory:function(e){e.state=e.serviceList.filter(function(e){return!0===e.state}).length===e.serviceList.length},checkCapacityLimits:function(e){e.minCapacity>e.maxCapacity&&(e.maxCapacity=e.minCapacity)},changeSelectedPeriodServices:function(e){e.state?this.weekSchedule.forEach(function(t){t.periods.forEach(function(t){"savedPeriodServiceList"in t&&t.savedPeriodServiceList.forEach(function(n){n.serviceId===e.id&&(t.periodServiceList.push(n),t.serviceIds.push(e.id))})})}):(this.weekSchedule.forEach(function(t){t.periods.forEach(function(t){t.periodServiceList.forEach(function(n,i){n.serviceId===e.id&&t.periodServiceList.splice(i,1)}),t.serviceIds.forEach(function(n,i){n===e.id&&t.serviceIds.splice(i,1)})})}),this.specialDays.forEach(function(t){t.periodList.forEach(function(t){t.periodServiceList.forEach(function(n,i){n.serviceId===e.id&&t.periodServiceList.splice(i,1)})})}))}}}},981:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",e._l(e.categorizedServiceList,function(t){return t.serviceList.length>0?n("div",{key:t.id,staticClass:"am-dialog-table am-assigned-services"},[n("el-row",{staticClass:"am-dialog-table-head",attrs:{gutter:24}},[n("el-col",{staticClass:"am-three-dots",attrs:{span:12}},[n("el-checkbox",{on:{change:function(n){return e.changeCategory(t.id)}},model:{value:t.state,callback:function(n){e.$set(t,"state",n)},expression:"category.state"}}),e._v(" "),n("span",[e._v("\n "+e._s(t.name)+"\n ")])],1),e._v(" "),n("el-col",{attrs:{span:6}},[e._v("\n "+e._s(e.$root.labels.capacity)+"\n ")]),e._v(" "),n("el-col",{attrs:{span:6}},[e._v("\n "+e._s(e.$root.labels.price)+"\n ")])],1),e._v(" "),e._l(t.serviceList,function(i){return n("div",{key:i.value},[n("el-row",{staticClass:"am-assigned-services__service-row",attrs:{gutter:10,type:"flex",align:"middle"}},[n("el-col",{staticClass:"am-assigned-services__service-row__name",attrs:{span:12}},[n("el-checkbox",{on:{change:function(n){return e.changeService(t,i)}},model:{value:i.state,callback:function(t){e.$set(i,"state",t)},expression:"item.state"}}),e._v(" "),n("span",{attrs:{title:i.name}},[e._v(e._s(i.name))])],1),e._v(" "),n("el-col",{attrs:{span:3}},[n("p",{staticStyle:{display:"none"}},[e._v("\n "+e._s(e.$root.labels.minimum_capacity)+"\n ")]),e._v(" "),n("el-input-number",{attrs:{disabled:!i.state,value:i.minCapacity,min:1,controls:!1},on:{input:function(t){return e.checkCapacityLimits(i)}},model:{value:i.minCapacity,callback:function(t){e.$set(i,"minCapacity",t)},expression:"item.minCapacity"}})],1),e._v(" "),n("el-col",{attrs:{span:3}},[n("p",{staticStyle:{display:"none"}},[e._v("\n "+e._s(e.$root.labels.maximum_capacity)+"\n ")]),e._v(" "),n("el-input-number",{attrs:{disabled:!i.state,value:i.maxCapacity,min:i.minCapacity,controls:!1},on:{input:function(t){return e.checkCapacityLimits(i)}},model:{value:i.maxCapacity,callback:function(t){e.$set(i,"maxCapacity",t)},expression:"item.maxCapacity"}})],1),e._v(" "),n("el-col",{attrs:{span:4}},[n("p",{staticStyle:{display:"none"}},[e._v("\n "+e._s(e.$root.labels.price)+"\n ")]),e._v(" "),n("money",e._b({staticClass:"el-input__inner",attrs:{disabled:!i.state},on:{input:function(t){return e.priceChanged(i)}},model:{value:i.price,callback:function(t){e.$set(i,"price",t)},expression:"item.price"}},"money",e.moneyComponentData,!1))],1),e._v(" "),e.isDurationPricingEnabled(i.customPricing)?n("el-col",{attrs:{span:2}},[n("span",{on:{click:function(t){return e.toggleDurations(i)}}},[n("img",{staticClass:"svg-amelia edit",staticStyle:{cursor:"pointer"},attrs:{width:"16px",src:e.$root.getUrl+"public/img/edit.svg"}})])]):e._e(),e._v(" "),e.isPersonPricingEnabled(i.customPricing)?n("el-col",{attrs:{span:2}},[n("span",{on:{click:function(t){return e.togglePersons(i)}}},[n("img",{staticClass:"svg-amelia edit",staticStyle:{cursor:"pointer"},attrs:{width:"16px",src:e.$root.getUrl+"public/img/edit.svg"}})])]):e._e(),e._v(" "),e.isPeriodPricingEnabled(i.customPricing)?n("el-col",{attrs:{span:2}},[n("span",{on:{click:function(t){return e.togglePeriods(i)}}},[n("img",{staticClass:"svg-amelia edit",staticStyle:{cursor:"pointer"},attrs:{width:"16px",src:e.$root.getUrl+"public/img/edit.svg"}})])]):e._e()],1),e._v(" "),e.isDurationPricingEnabled(i.customPricing)?n("el-row",{staticStyle:{"margin-bottom":"0"}},[n("div",{staticClass:"am-extra-item"},[n("el-collapse-transition",[e.showDurations&&e.editedDurationsService.id===i.id?n("div",[n("custom-duration",{attrs:{service:i,enabledDelete:!1,enabledAdd:!1,enabledDuration:!1}})],1):e._e()])],1)]):e._e(),e._v(" "),e.isPersonPricingEnabled(i.customPricing)?n("el-row",{staticStyle:{"margin-bottom":"0"}},[n("div",{staticClass:"am-extra-item"},[n("el-collapse-transition",[e.showPersons&&e.editedPersonsService.id===i.id?n("div",[n("person-price",{attrs:{service:i,enabledDelete:!1,enabledRange:!1}})],1):e._e()])],1)]):e._e(),e._v(" "),e.isPeriodPricingEnabled(i.customPricing)?n("el-row",{staticStyle:{"margin-bottom":"0"}},[n("div",{staticClass:"am-extra-item"},[n("el-collapse-transition",[e.showPeriods&&e.editedPeriodsService.id===i.id?n("div",[n("period-price",{attrs:{service:i,enabledAdd:!1,enabledEdit:!1,enabledDelete:!1}})],1):e._e()])],1)]):e._e()],1)})],2):e._e()}),0)},staticRenderFns:[]}},982:function(e,t,n){var i=n(90)(null,n(983),!1,null,null,null);e.exports=i.exports},983:function(e,t){e.exports={render:function(){var e=this.$createElement;return(this._self._c||e)("div")},staticRenderFns:[]}},984:function(e,t,n){var i=n(90)(n(985),n(986),!1,null,null,null);e.exports=i.exports},985:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(654),o=n(336),a=n(660),s=n(655),r=n(664);t.default={mixins:[i.a,o.a,a.a,s.a,r.a],props:{activeTab:"",categorizedServiceList:null,locations:null,specialDays:null,shouldScrollView:{type:Boolean,default:!0,required:!1},isCabinet:{type:Boolean,default:!1,required:!1}},data:function(){return{model:{},rules:{dateRange:[{required:!0,message:this.$root.labels.special_day_date_warning,trigger:"submit"}],startTime:[{required:!0,message:this.$root.labels.special_day_start_time_warning,trigger:"submit"}],endTime:[{required:!0,message:this.$root.labels.special_day_end_time_warning,trigger:"submit"}]},specialDayModel:this.getInitSpecialDayModel(),showSpecialDayForm:!1,responsiveGrid:{editHours:{workHours:24,hour:24,services:24,location:24}}}},created:function(){window.addEventListener("resize",this.handleResize)},mounted:function(){this.sortSpecialDays()},methods:{sortSpecialDays:function(){this.specialDays.sort(function(e,t){return new Date(e.startDate)-new Date(t.startDate)})},getColumnLength:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.categorizedServiceList&&this.servicesCount>1&&this.locations&&this.locations.length>1?"mini"===e?{workHours:22,hour:24,services:22,location:22}:"mobile"===e?{workHours:22,hour:12,services:22,location:22}:{workHours:8,hour:12,services:8,location:8}:this.categorizedServiceList&&this.servicesCount>1?"mini"===e?{workHours:22,hour:24,services:22,location:0}:"mobile"===e?{workHours:22,hour:12,services:22,location:0}:{workHours:10,hour:12,services:12,location:0}:this.locations&&this.locations.length>1?"mini"===e?{workHours:22,hour:24,services:0,location:22}:"mobile"===e?{workHours:22,hour:12,services:0,location:22}:{workHours:10,hour:12,services:0,location:14}:"mini"===e?{workHours:22,hour:24,services:0,location:0}:{workHours:22,hour:12,services:0,location:0}},handleResize:function(){if("specialDays"===this.activeTab||"specialDays"===this.activeTab){var e=this.$refs.specialDays;e.offsetWidth<320?this.responsiveGrid.editHours=this.getColumnLength("mini"):e.offsetWidth<650?this.responsiveGrid.editHours=this.getColumnLength("mobile"):this.responsiveGrid.editHours=this.getColumnLength()}},getInitSpecialDayModel:function(){return{index:null,id:null,dateRange:null,periodList:[{id:null,startTime:"",endTime:"",locationId:null,locationIds:[],serviceIds:[],periodLocationList:[],periodServiceList:[]}]}},addSpecialDay:function(){this.specialDayModel=this.getInitSpecialDayModel(),this.showSpecialDayForm=!0,!0===this.shouldScrollView&&this.scrollViewInModal("specialDay")},cloneSpecialDay:function(e){var t=this;this.specialDayModel=this.getInitSpecialDayModel(),this.specialDayModel.periodList=[],this.specialDays[e].periodList.forEach(function(e){var n=[],i=[];e.periodServiceList.forEach(function(e){n.push({id:null,serviceId:e.serviceId})}),e.periodLocationList.forEach(function(e){i.push({id:null,locationId:e.locationId})}),t.specialDayModel.periodList.push({id:null,startTime:e.startTime.substr(0,5),endTime:e.endTime.substr(0,5),locationId:i.length?i[0]:null,locationIds:i.map(function(e){return e.locationId}),serviceIds:n.map(function(e){return e.serviceId}),periodLocationList:i,periodServiceList:n})}),this.showSpecialDayForm=!0,!0===this.shouldScrollView&&this.scrollViewInModal("specialDay")},editSpecialDay:function(e){var t={index:e,id:this.specialDays[e].id,dateRange:{start:this.$moment(this.specialDays[e].startDate).toDate(),end:this.$moment(this.specialDays[e].endDate).toDate()},periodList:[]};this.specialDays[e].periodList.forEach(function(e){var n=[];e.periodLocationList.length?e.periodLocationList.forEach(function(e){n.push(e.locationId)}):e.locationId&&n.push(e.locationId);var i=[];e.periodServiceList.forEach(function(e){i.push(e.serviceId)}),t.periodList.push({id:e.id,startTime:e.startTime.slice(0,-3),endTime:e.endTime.slice(0,-3),periodLocationList:e.periodLocationList,periodServiceList:e.periodServiceList,locationId:e.locationId,locationIds:n,serviceIds:i})}),this.specialDayModel=t,this.showSpecialDayForm=!0,!0===this.shouldScrollView&&this.scrollViewInModal("specialDay")},deleteSpecialDay:function(e){this.specialDays.splice(e,1)},saveSpecialDay:function(){var e=this;this.$refs.specialDayModel.validate(function(t){if(!t)return!1;var n={id:e.specialDayModel.id,startDate:e.$moment(e.specialDayModel.dateRange.start).format("YYYY-MM-DD"),endDate:e.$moment(e.specialDayModel.dateRange.end).format("YYYY-MM-DD"),periodList:[]};e.specialDayModel.periodList.forEach(function(e){var t=[];e.locationIds.forEach(function(n){var i=e.periodLocationList.find(function(e){return e.locationId===n});t.push({id:i?i.id:null,locationId:n})});var i=[];e.serviceIds.forEach(function(t){var n=e.periodServiceList.find(function(e){return e.serviceId===t});i.push({id:n?n.id:null,serviceId:t})}),n.periodList.push({id:e.id,startTime:e.startTime+":00",endTime:e.endTime+":00",locationId:e.locationId,periodLocationList:t,periodServiceList:i})}),e.$emit("changeSpecialDays",n,e.specialDayModel.index),e.clearValidation(),e.showSpecialDayForm=!1}),this.sortSpecialDays()},getSpecialDayServices:function(e){var t=[],n=[],i=[];return e.periodList.forEach(function(e){t=_.uniq(t.concat(e.periodLocationList.map(function(e){return e.locationId}))),n=_.uniq(n.concat(e.periodServiceList.map(function(e){return e.serviceId})))}),this.categorizedServiceList.forEach(function(e){e.serviceList.forEach(function(e){!e.state||0!==n.length&&-1===n.indexOf(e.id)||i.push(e.name)})}),i.join(", ")},selectAllInCategory:function(e,t){var n=this.categorizedServiceList.find(function(e){return e.id===t}).serviceList.filter(function(e){return e.state}).map(function(e){return e.id});_.isEqual(_.intersection(n,e.serviceIds),n)?e.serviceIds=_.difference(e.serviceIds,n):e.serviceIds=_.uniq(e.serviceIds.concat(n))},getPeriodBorderTime:function(e,t){var n="24:00",i="00:00";return e.periodList.forEach(function(e,o){t===o-1&&(n=e.startTime),t===o+1&&(i=e.endTime)}),[this.secondsToTimeSelectStep(this.getStringTimeInSeconds(i)-this.getTimeSlotLength()),this.secondsToTimeSelectStep(this.getStringTimeInSeconds(n)+this.getTimeSlotLength())]},addPeriod:function(){this.specialDayModel.periodList.push({startTime:this.specialDayModel.periodList.length?this.specialDayModel.periodList[this.specialDayModel.periodList.length-1].endTime:"",endTime:"",id:null,locationIds:[],serviceIds:[],locationId:null,periodLocationList:[],periodServiceList:[]})},deletePeriod:function(e){this.specialDayModel.periodList.splice(e,1)},clearValidation:function(){void 0!==this.$refs.specialDayModel&&this.$refs.specialDayModel.clearValidate()}},computed:{servicesCount:function(){var e=0;return this.categorizedServiceList.forEach(function(t){e+=t.serviceList.length}),e}},watch:{activeTab:function(){"specialDays"!==this.activeTab&&"special"!==this.activeTab||this.handleResize()}}}},986:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"specialDays",staticClass:"am-employee-special-days"},[n("div",{staticClass:"am-dialog-table"},[n("el-row",{staticClass:"am-dialog-table-head days",attrs:{gutter:20}},[n("el-col",{attrs:{span:24}},[n("span",[e._v("\n "+e._s(e.$root.labels.special_days)+"\n ")])])],1),e._v(" "),e._l(e.specialDays,function(t,i){return n("div",{key:i+1,staticClass:"am-special-day"},[n("el-row",[n("el-col",{attrs:{span:20}},[n("div",{staticClass:"am-special-day-data"},[n("span",{staticClass:"am-strong"},[e._v("\n "+e._s(e.$root.labels.date+": ")+"\n ")]),e._v(" "),n("span",[e._v("\n "+e._s(e.getFrontedFormattedDate(t.startDate)+" - "+e.getFrontedFormattedDate(t.endDate))+"\n ")])]),e._v(" "),n("div",{staticClass:"am-special-day-data"},[n("span",{staticClass:"am-strong"},[e._v(e._s(e.$root.labels.work_hours)+": ")]),e._v(" "),e._l(t.periodList,function(t,i){return n("span",{key:i+1},[e._v("\n ("+e._s(e.getFrontedFormattedTime(t.startTime))+" - "+e._s(e.getFrontedFormattedTime(t.endTime))+")\n "+e._s(i!==t.length-1&&t.length>1?"; ":"")+"\n ")])})],2),e._v(" "),n("div",{staticClass:"am-special-day-data"},[n("span",{staticClass:"am-strong"},[e._v(e._s(e.$root.labels.special_days_reflect_services)+": ")]),e._v(" "),n("span",{staticClass:"am-special-day-services"},[n("span",{staticClass:"am-special-day-service"},[e._v("\n "+e._s(e.getSpecialDayServices(t))+"\n ")])])])]),e._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:4}},[n("div",{staticClass:"am-copy-element",on:{click:function(t){return e.cloneSpecialDay(i)}}},[n("img",{attrs:{src:e.$root.getUrl+"public/img/copy.svg"}})]),e._v(" "),n("div",{staticClass:"am-edit-element",on:{click:function(t){return e.editSpecialDay(i)}}},[n("img",{attrs:{src:e.$root.getUrl+"public/img/edit-pen.svg"}})]),e._v(" "),n("div",{staticClass:"am-delete-element",on:{click:function(t){return e.deleteSpecialDay(i)}}},[n("img",{attrs:{src:e.$root.getUrl+"public/img/delete.svg"}})])])],1)],1)}),e._v(" "),n("el-row",[n("el-col",[n("div",{staticClass:"am-add-element",on:{click:e.addSpecialDay}},[n("i",{staticClass:"el-icon-plus"}),e._v(" "),n("span",[e._v("\n "+e._s(e.$root.labels.add_special_day)+"\n ")])])])],1)],2),e._v(" "),n("transition",{attrs:{name:"fade"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.showSpecialDayForm,expression:"showSpecialDayForm"}],staticClass:"am-special-day-add"},[n("el-form",{ref:"specialDayModel",attrs:{model:e.specialDayModel,"label-position":"top",id:"specialDay"},on:{submit:function(e){e.preventDefault()}}},[n("el-row",{attrs:{gutter:20}},[n("el-col",{staticClass:"v-calendar-column",staticStyle:{overflow:"visible"},attrs:{sm:24}},[n("el-form-item",{attrs:{label:e.$root.labels.date+":",prop:"dateRange",rules:e.rules.dateRange}},[n("v-date-picker",{staticStyle:{"margin-bottom":"20px"},attrs:{mode:"range","popover-visibility":"focus","popover-direction":"bottom","input-class":"el-input__inner","is-required":!0,"is-expanded":!1,"show-day-popover":!1,"tint-color":e.isCabinet?e.$root.settings.customization.primaryColor:"#1A84EE","input-props":{class:"el-input__inner",readOnly:"readonly"},"popover-align":e.screenWidth<768?"center":"left",placeholder:e.$root.labels.pick_a_date_or_range,formats:e.vCalendarFormats,"available-dates":{start:this.$moment().subtract(1,"days").toDate()}},on:{input:e.clearValidation},model:{value:e.specialDayModel.dateRange,callback:function(t){e.$set(e.specialDayModel,"dateRange",t)},expression:"specialDayModel.dateRange"}})],1)],1)],1),e._v(" "),n("transition-group",{attrs:{name:"fade"}},e._l(e.specialDayModel.periodList,function(t,i){return n("div",{key:i+1,staticClass:"am-period"},[n("el-row",{staticStyle:{"flex-wrap":"wrap"},attrs:{gutter:10,type:"flex"}},[n("el-col",{attrs:{span:e.responsiveGrid.editHours.workHours}},[n("el-row",{attrs:{gutter:10}},[n("el-col",{staticStyle:{"margin-bottom":"4px"},attrs:{span:24}},[n("span",[e._v(e._s(e.$root.labels.work_hours))])]),e._v(" "),n("el-col",{attrs:{span:e.responsiveGrid.editHours.hour}},[n("el-form-item",{attrs:{prop:"periodList."+i+".startTime",rules:e.rules.startTime}},[n("el-time-select",{staticStyle:{"margin-bottom":"12px"},attrs:{size:"mini","is-required":!0,"popper-class":"am-dropdown-cabinet","picker-options":e.getTimeSelectOptionsWithLimits(e.getPeriodBorderTime(e.specialDayModel,i)[0],t.endTime)},on:{change:e.clearValidation},model:{value:t.startTime,callback:function(n){e.$set(t,"startTime",n)},expression:"period.startTime"}})],1)],1),e._v(" "),n("el-col",{attrs:{span:e.responsiveGrid.editHours.hour}},[n("el-form-item",{attrs:{prop:"periodList."+i+".endTime",rules:e.rules.endTime}},[n("el-time-select",{staticStyle:{"margin-bottom":"12px"},attrs:{"picker-options":e.getTimeSelectOptionsWithLimits(t.startTime,e.getPeriodBorderTime(e.specialDayModel,i)[1]),size:"mini","is-required":!0,"popper-class":"am-dropdown-cabinet"},on:{change:e.clearValidation},model:{value:t.endTime,callback:function(n){e.$set(t,"endTime",n)},expression:"period.endTime"}})],1)],1)],1)],1),e._v(" "),e.categorizedServiceList&&e.servicesCount>1?n("el-col",{attrs:{span:e.responsiveGrid.editHours.services}},[n("el-row",{staticStyle:{"flex-wrap":"wrap"},attrs:{gutter:10,type:"flex"}},[n("el-col",{staticStyle:{"margin-bottom":"4px"},attrs:{span:24}},[n("span",[e._v(e._s(e.$root.labels.services.charAt(0).toUpperCase()+e.$root.labels.services.slice(1)))]),e._v(" "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.period_services_filter2_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-col",{attrs:{span:24}},[e.categorizedServiceList?n("el-select",{staticClass:"am-select-service",staticStyle:{"margin-bottom":"12px"},attrs:{multiple:"",filterable:"","collapse-tags":"",size:"mini","popper-class":"am-dropdown-cabinet",placeholder:e.$root.labels.period_services_filter},on:{change:function(t){return e.clearValidation()}},model:{value:t.serviceIds,callback:function(n){e.$set(t,"serviceIds",n)},expression:"period.serviceIds"}},e._l(e.categorizedServiceList,function(i){return i.serviceList.filter(function(e){return e.state}).length>0?n("div",{key:i.id},[n("div",{staticClass:"am-drop-parent",on:{click:function(n){return e.selectAllInCategory(t,i.id)}}},[n("span",[e._v(e._s(i.name))])]),e._v(" "),e._l(i.serviceList,function(t){return t.state?n("el-option",{key:t.id,staticClass:"am-drop-child",attrs:{label:t.name,value:t.id}}):e._e()})],2):e._e()}),0):e._e()],1)],1)],1):e._e(),e._v(" "),e.locations&&e.locations.length>1?n("el-col",{attrs:{span:e.responsiveGrid.editHours.location}},[n("el-row",{staticStyle:{"flex-wrap":"wrap"},attrs:{gutter:10,type:"flex"}},[n("el-col",{staticStyle:{"margin-bottom":"4px"},attrs:{span:24}},[n("span",[e._v(e._s(e.$root.labels.location))]),e._v(" "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.period_location_filter2_tooltip)},slot:"content"}),e._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),n("el-col",{attrs:{span:24}},[e.locations.length?n("el-select",{staticClass:"am-select-service",staticStyle:{"margin-bottom":"12px"},attrs:{multiple:"",filterable:"",clearable:"",placeholder:e.$root.labels.location,"collapse-tags":"",size:"mini","popper-class":"am-dropdown-cabinet"},model:{value:t.locationIds,callback:function(n){e.$set(t,"locationIds",n)},expression:"period.locationIds"}},e._l(e.locations,function(e){return n("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1):e._e()],1)],1)],1):e._e(),e._v(" "),e.specialDayModel.periodList.length>1?n("el-col",{attrs:{span:2}},[n("div",{staticClass:"am-delete-element",on:{click:function(t){return e.deletePeriod(i)}}},[n("i",{staticClass:"el-icon-minus"})])]):e._e()],1)],1)}),0),e._v(" "),n("el-row",[n("el-col",{staticClass:"align-left",attrs:{sm:24}},[n("div",{staticClass:"am-add-elements"},[n("div",{staticClass:"am-add-element",on:{click:e.addPeriod}},[n("i",{staticClass:"el-icon-plus"}),e._v(" "+e._s(e.$root.labels.add_period)+"\n ")])])])],1),e._v(" "),n("el-row",{staticClass:"am-special-day-buttons"},[n("el-col",{staticClass:"align-right",attrs:{sm:24}},[n("el-button",{attrs:{size:"small"},on:{click:function(t){e.showSpecialDayForm=!e.showSpecialDayForm}}},[e._v(e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),n("el-button",{staticClass:"am-dialog-create",attrs:{size:"small",type:"primary"},on:{click:e.saveSpecialDay}},[e._v("\n "+e._s(e.$root.labels.save_special_day)+"\n ")])],1)],1)],1)],1)])],1)},staticRenderFns:[]}},987:function(e,t,n){"use strict";var i=n(654);t.a={mixins:[i.a],methods:{redirectToGoogleAuthPage:function(){this.googleLoading=!0,window.location.href=this.googleAuthURL},inlineDialogEmployeeSVG:function(){var e=this;setTimeout(function(){e.inlineSVG()},10)}}}},988:function(e,t,n){"use strict";var i=n(654);t.a={mixins:[i.a],methods:{redirectToOutlookAuthPage:function(){this.outlookLoading=!0,window.location.href=this.outlookAuthURL},inlineDialogEmployeeSVG:function(){var e=this;setTimeout(function(){e.inlineSVG()},10)}}}}});
Save
Back