PageSourceSearch

https://app.opus1.io/releases/20261001T232935Z-57ecc7b471fc/async/22540.d8fd3f09.js

js opus1.io collected 2026-10-03 21:43:34 UTC 98,983 bytes, 2 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ef7716fb-6e63-4f65-80fd-fa15f7fa7b05",e._sentryDebugIdIdentifier="sentry-dbid-ef7716fb-6e63-4f65-80fd-fa15f7fa7b05")}catch(e){}}();var _global="u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{};_global.SENTRY_RELEASE={id:"57ecc7b471fce630a9a83e03af7702d6977a38be"};"use strict";(self.webpackChunkopus1io=self.webpackChunkopus1io||[]).push([["22540"],{35979:function(e,t,i){i.d(t,{w:function(){return eC},o:function(){return ey}});var a=i(71893),l=i(55456),n=i(84577);i(45336),i(79936),i(23446),i(93632);var s=i(74848),o=i(96540),r=i(17378),d=i(6251),c=i(62193),u=i.n(c),p=i(55179),m=i(26999),f=i(53323),h=i(3326),v=i(20452),C=i(79756),y=i(15755),b=i(84552),g=i(54996),S=i(70980),w=i(90089),A=i(70973),T=i(96733),N=i(53444),x=i(39343);i(60726),i(13467),i(91625);var k=i(5556),V=i.n(k),D=i(55482),I=i(31399),E=i(16517),M=i(6683);function O(){var e=(0,n._)(["\n    width: 100%;\n    display: flex;\n    gap: 1rem;\n    flex-wrap: wrap;\n    align-items: center;\n"]);return O=function(){return e},e}function R(){var e=(0,n._)(["\n    width: fit-content;\n"]);return R=function(){return e},e}function _(){var e=(0,n._)(["\n    margin-top: 8px !important;\n"]);return _=function(){return e},e}function L(){var e=(0,n._)(["\n    max-width: 100px !important;\n    min-width: 90px !important;\n    border-radius: 4px !important;\n    .react-time-picker__inputGroup__hour {\n        max-width: 2ch !important;\n        min-width: 2ch !important;\n    }\n    .react-time-picker__inputGroup__minute {\n        max-width: 2ch !important;\n        min-width: 2ch !important;\n    }\n"]);return L=function(){return e},e}function q(){var e=(0,n._)(["\n    width: 180px; !important;\n    min-width: 180px;\n"]);return q=function(){return e},e}var P=r.Ay.div(O()),j=r.Ay.div(R()),W=(0,r.Ay)(D.A)(_()),B=(0,r.Ay)(I.T)(L()),F=(0,r.Ay)(d.Ay)(q()),U=e=>e&&Array.isArray(e)?E.j_.map(t=>[t,e.includes(t)]):E.j_.map(e=>[e,!1]),H={[M.Yc]:"appointments",[M.fW]:"scheduled dates"},Y=e=>{var t,i,l,n,o,r,{uiSchema:d,idSchema:c,errorSchema:u,formData:p,onChange:m,rawErrors:f,formContext:h}=e,v=(e,t)=>{var i=(0,a._)({},p);if("days"===e){var l,n=U(i[e]),{checked:s,name:o}=t.target,r=o.replace("repeat.weekly.days[","").replace("]","");i[e]=(l=n.map(e=>e[0]===r?[e[0],s]:e)).length?l.filter(e=>e[1]).map(e=>e[0]):""}else i[e]=t;m(i)},C=null!=(t=H[h.serviceType])?t:"scheduled dates";return(0,s.jsxs)(P,{className:"last-hour-cancellation-days",children:[(0,s.jsxs)("span",{children:["For ",C," on"]}),(0,s.jsx)(W,{id:null!=(i=c.$id)?i:"1",daysArray:U(p.days),handleChange:e=>v("days",e)}),(0,s.jsx)("span",{children:"if cancelled the"}),(0,s.jsx)(F,{isSearchable:!1,classNamePrefix:"react-select",id:"react-select-late-cancellation-type-of",instanceId:null!=(l=null==c||null==(o=c.cancellationType)?void 0:o.$id)?l:"type-late-cancellation",value:d.options.find(e=>e.value===p.cancellationType),onChange:e=>v("cancellationType",e.value),options:d.options}),(0,s.jsx)("span",{children:"after"}),(0,s.jsx)(j,{id:null!=(n=null==c||null==(r=c.time)?void 0:r.$id)?n:"hours-form-start-time",className:"input-row w-full",children:(0,s.jsx)(B,{className:"w-full",onChange:e=>v("timeOfDay",e),value:p.timeOfDay,disableClock:!0,clearIcon:null,amPmAriaLabel:"Select AM/PM",maxDetail:"minute"})})]})};Y.defaultProps={formData:{}},Y.propTypes={formData:V().shape({days:V().arrayOf(V().string),time:V().string,timezone:V().string,type:V().string}),onChange:V().func.isRequired,uiSchema:V().object.isRequired};var z=i(48689),G=i(7091),K=i(77999),J=i(44123),$=i(88055),Q=i.n($);function Z(){var e=(0,n._)(["\n    margin-left: 12px;\n    margin-right: -13px;\n"]);return Z=function(){return e},e}var X=r.Ay.div(Z()),ee=i(6884),et=i(91575);i(12172);var ei=i(27045),ea=i(50926);function el(){var e=(0,n._)(["\n    font-size: 12px;\n    color: #999;\n    text-align: right;\n    margin-top: 5px;\n"]);return el=function(){return e},e}var en=r.Ay.div(el()),es=e=>{var{schema:t,uiSchema:i,required:a,formData:l,disabled:n,onChange:o}=e,{id:r,infoMessages:d,allowedPlaceholders:c,params:{rows:u}}=(i||{})["ui:options"]||{},p=e=>{o(e.target.value.substring(0,1e3))},m=(0,ea.fP)({content:l,allowedMergeTags:c,strictMatch:!0}),f=new et.SegmentedMessage(l||"");return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"pb-2",children:[t.title,a&&"*"]}),(0,s.jsx)("div",{className:"mb-1",children:(0,s.jsx)("textarea",{id:r,placeholder:(null==i?void 0:i.placeholder)||"",className:"form-control with-icon",name:"sms-reminder-template-field",value:l,onBlur:p,onChange:p,disabled:n,rows:u})}),(0,s.jsxs)(en,{children:[(l||"").length,"/",1e3]}),m.length>0&&(0,s.jsx)(ei.c,{className:"mb-2",text:"The following placeholders are not valid: ".concat(m.join(", ")),iconColorClassName:"text-danger"}),(0,s.jsx)(ei.c,{className:"mb-2",text:"The following placeholders are available to be used in the template: ".concat(c.map(e=>"{{".concat(e,"}}")).join(", "),". These placeholders will be automatically replaced with the relative information when the reminders are sent."),iconColorClassName:"text-info"}),null==d?void 0:d.map(e=>(0,s.jsx)(ei.c,{className:"mb-2",text:e,iconColorClassName:"text-info"},e)),(0,s.jsx)(ei.c,{className:"mb-2",text:(null==f?void 0:f.segmentsCount)&&"This SMS will count as a minimum estimated of ".concat(f.segmentsCount," segment(s).")})]})};es.propTypes={formData:V().string.isRequired,onChange:V().func.isRequired,required:V().bool,schema:V().object.isRequired,uiSchema:V().object},es.defaultProps={required:!1,uiSchema:{"ui:options":{}}};var eo=i(18398),er=i(59769),ed=i(92349),ec=i(60469),eu=i(12163),ep=i(82119),em=e=>{var{schema:t,uiSchema:i,required:a,formData:l,disabled:n,onChange:r}=e,[d,c]=(0,o.useState)(l,""),{id:u,infoMessages:p,allowedPlaceholders:m}=(i||{})["ui:options"]||{},f=(0,ea.fP)({content:(0,ea.$J)(l),allowedMergeTags:m,strictMatch:!0});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"pb-2",children:[t.title,a&&"*"]}),(0,s.jsx)("div",{className:"mb-1",children:(0,s.jsx)(ep.A,{id:u,placeholder:(null==i?void 0:i.placeholder)||"",value:d,onChange:e=>{var t=(0,ea.L4)({content:e});c(t),r(t)},disabled:n,spellCheckEnabled:!0})}),f.length>0&&(0,s.jsx)(ei.c,{className:"mb-2",text:"The following placeholders are not valid: ".concat(f.join(", ")),iconColorClassName:"text-danger"}),(0,s.jsx)(ei.c,{className:"mb-2",text:"The following placeholders are available to be used in the template: ".concat(m.map(e=>"{{".concat(e,"}}")).join(", "),". These placeholders will be automatically replaced with the relative information when the reminders are sent."),iconColorClassName:"text-info"}),null==p?void 0:p.map(e=>(0,s.jsx)(ei.c,{className:"mb-2",text:e,iconColorClassName:"text-info"},e))]})};em.propTypes={formData:V().string.isRequired,onChange:V().func.isRequired,required:V().bool,schema:V().object.isRequired,uiSchema:V().object},em.defaultProps={required:!1,uiSchema:{"ui:options":{}}};var ef=i(17265);function eh(){var e=(0,n._)(["\n    background: none;\n    border: 0;\n    padding: 0;\n    color: #4752a9 !important;\n    font-weight: 600;\n    cursor: pointer;\n    text-decoration: none;\n\n    &:hover {\n        text-decoration: underline;\n    }\n"]);return eh=function(){return e},e}var ev=(0,r.Ay)(ec.A)(eh()),eC={title:"New Service",type:"object",required:["name","description","shortDe
1scription","calendarColor"],properties:{name:{type:"string",title:"Name"},mainPhoto:{type:"string",title:"Main Photo",subtitle:"Note: Service photos should have about a 4 (width) by 3 (height) aspect ratio and can be any size, preferably high enough resolution (e.g. 1200pixels wide is a decent size). It is recommended not to have text at the very top and bottom of those images as in some views (especially on mobile) the 4:3 aspect ration is not exactly maintained and part of the top and bottom may be cropped out. Also load time matters (for self-booking for example) https://squoosh.app is a good tool to help optimize and reduce image sizes"},photos:{type:"array",title:"Additional Photos",default:[],items:{type:"string",default:""}},shortDescription:{type:"string",title:"Short Description",default:"",minLength:1},description:{type:"string",title:"Description",default:"",minLength:1},tags:{type:"array",title:"Tags",default:[],items:{}},spotlight:{type:"boolean",title:"Should appointments or class date of that service be spotlighted on Today's dashboard?",subtitle:"Today's dashboard spotlights certain services that may be scheduled on the current day"},calendarColor:{type:"string",title:"Which color should this service be displayed under in the calendar?",subtitle:"Note: changes will not be reflected immediately for already booked appointments or classes",default:"#CCCCFF"},durationMinutes:{type:"number",default:30,title:"What is the duration of each appointment or class?",subtitle:"NOTE: changing an existing service duration will update all future appointments and classes of this service to the new duration"},requiresBooking:{resource:G.RESOURCE_SERVICE_REQUIRE_BOOKING,action:z.ACTION_CREATE,type:"boolean",title:"Does this service require booking?",default:!0},hasSessions:{type:"boolean",title:"Is the service a Group Class? (Course/Class)"},allowsJoinOnline:{type:"boolean",title:"Appointment/Class can be attended online (e.g. via Zoom)",subtitle:'This enables the "Join Online" button, for services not booked for the Online location'},slotIntervalMinutes:{type:"number",title:"How many minutes apart should available appointment slots be offered?",subtitle:"This affects self-booking slots primarily. Example, if set to 15, appointments will be available every 15 mins: 2:00, 2:15, 2:30, 2:45 etc.",default:15},slotStartSnap:{type:"number",title:"Should slots from availabilities with uneven start times be snapped to the nearest start time?",subtitle:"For example if the slot interval is 15 minutes, and the start time is 2:10, the slot will be snapped to 2:15, thus ensuring that only :00, :15, :30, :45 slots are ever offered.",default:15},setupDurationMinutes:{type:"number",title:"How many minutes before service are the staff and room unavailable?",default:0},cleanupDurationMinutes:{type:"number",title:"How many minutes after service are the staff and room unavailable?",default:0},maximumClients:{type:"number",title:"How many clients can attend a class or appointment of this service?",default:0},maximumWaitlistClients:{type:"number",title:"How many clients can be on the waitlist for a class of this service?",default:0},requiresPaymentMethodForWaitlist:{type:"boolean",title:"Is payment method required to join the waitlist?",default:!1,subtitle:"If enabled, clients will be required to add a payment method to join the waitlist (if not already set)"},waitlistPolicy:{type:"string",title:"What would you like the waitlist policy for this service to be?",default:"",subtitle:"Waitlist policy is displayed to clients when self-enrolling into a class waitlist (i.e when the class is full)"},clientLifecycleStatusOnWaitlistAdded:{type:"object",title:"Client lifecycle status after being added to waitlist",properties:{},default:void 0,subtitle:'This status will be set automatically to clients who have been added/enrolled to this class waitlist. Note that "Member" / "Member Lost" statuses are set automatically based on active subscription.'},clientLifecycleStatusOnWaitlistRemoved:{type:"object",title:"Client lifecycle status after being removed from waitlist",properties:{},default:void 0,subtitle:'This status will be set automatically to clients who have been removed/unenrolled from this class waitlist. Note that "Member" / "Member Lost" statuses are set automatically based on active subscription.'},notAfterAgeMonths:{type:"number",title:"Is there an age limit after which clients are too old for this service?",default:0,subtitle:"This will be enforced at self-booking"},notBeforeAgeMonths:{type:"number",title:"Is there a specific age below which clients are too young for this service?",default:0,subtitle:"This will be enforced at self-booking"},enrollmentWindowGracePeriodDays:{type:"number",default:15,title:"How many days after the start of the class can a client have their first scheduled date of the class?",subtitle:"For example: for classes with a specific start and end date, set to 1 if students cannot join after the first date. Alternatively if you have a class with weekly dates, and you want to allow students to join up to and including the 3rd date for example, set this to 21. If not set students can join any date "},advancedSettings:{type:"boolean",default:!1,title:"Advanced settings"},selfBookingAvailabilityMode:{type:"string",default:"AVAILABILITY_MODE_DEFAULT",title:"(Beta) Availability mode for self-booking",subt
1itle:"Warning: this functionality is in beta and behavior may change. Use Staff Availability."},weeklyCheckShortTermToleranceThresholdDays:{type:"number",default:30,minimum:1,maximum:90,title:"For weekly on going conflict checks, what period of time constitutes the short term tolerance threshold?",subtitle:"You can determine a short term (example 30 day) and long term threshold for conflicts tolerance for weekly staff availability. For example: you may not want a client to self enroll if within 30 days there are any conflicts (due to staff absence or other conflicting appointment), but may have a different tolerance past 30 days."},weeklyCheckShortTermToleranceThresholdMaxCount:{type:"number",default:0,minimum:0,maximum:99,title:"How many staff conflicts (absence or appointment) are acceptable within the short term period?"},weeklyCheckLongTermToleranceThresholdMaxCount:{type:"number",default:4,minimum:0,maximum:99,title:"How many staff conflicts (absence or appointment) are acceptable within the long term period (up to 90 days)?",subtitle:"Warning: this value shouldn't be set too high or the system will not detect a new weekly enrollment as a conflict"},clientLifecycleStatusOnBook:{type:"object",title:"Client lifecycle status after booking",properties:{},default:void 0,subtitle:'This status will be set automatically to clients who have booked this service at booking time. Note that "Member" / "Member Lost" statuses are set automatically based on active subscription.'},clientLifecycleStatusOnAttended:{type:"object",title:"Client lifecycle status after attending",properties:{},default:void 0,subtitle:'This status will be set automatically to clients who have booked this service when the appointment / class is marked as attended. Note that "Member" / "Member Lost" statuses are set automatically based on active subscription.'},clientLifecycleStatusOnCancel:{type:"object",title:"Client lifecycle status after cancellation / no show",properties:{},default:void 0,subtitle:'This status will be set automatically to clients who have booked this service if/when canceled or attendance is marked as No Show. Note that "Member" / "Member Lost" statuses are set automatically based on active subscription.'},notificationPeriodHours:{type:"number",default:28,minimum:1,maximum:72,title:"How many hours before the scheduled appointment / event / class time should clients be reminded by email?"},smsNotificationPeriodHours:{type:"number",default:4,minimum:2,maximum:72,title:"How many hours before the scheduled appointment / event / class time should clients be reminded by SMS?"},enrollmentWindowNotBeforeMinutes:{type:"object",properties:{days:{type:"number",minimum:0},hours:{type:"number",minimum:0,maximum:23}},default:{days:0,hours:0},title:"How much time ahead of the first appointment / class can clients self-enroll - minimum limit?",subtitle:"Example, clients may not enroll less than 1 day ahead of time (for classes: from start of the class if not yet started)"},enrollmentWindowNotAfterMinutes:{type:"object",properties:{days:{type:"number",minimum:0},hours:{type:"number",minimum:0,maximum:23}},default:{days:0,hours:0},title:"How much time ahead of the first appointment / class can clients self-enroll - maximum limit?",subtitle:"Example, clients may not enroll more than 15 days ahead of time (for classes: from start of the class if not yet started)"},scheduleOptimizationStrategy:{type:"string",default:E.bw,title:"Schedule optimization strategy",subtitle:"Minimize Gaps strategy will help ensure that consecutive appointment slots are identified and prioritized"},enforceScheduleOptimizationForSelfBooking:{type:"boolean",default:!0,title:"Enforce schedule optimization for self-booking",subtitle:"If enabled, only prioritized appointment slots will be available for self-booking"},maxSchedulingGapMinutes:{type:"number",default:0,title:"Max scheduling gap"},plans:{type:"array",title:"Plans",default:[],items:N.wQ},termsAndConditions:{type:"string",title:"What would you like the Terms and Conditions for this service be?",subtitle:"Terms and conditions are displayed and required to be accepted at self-booking time. If enabled in the Payment Plan, subscribers will be prompted to review and accept terms and conditions every 5 days until accepted. You may use %%SECTION_BREAK%% to separate sections"},termsAndConditionsRevision:{type:"object",title:"Terms and conditions version",subtitle:"Terms and conditions are displayed and required to be accepted at self-booking time. If enabled in the Payment Plan, subscribers will be prompted to review and accept terms and conditions every 5 days until accepted.",properties:{}},cancellationWindowHours:{type:"number",default:24,title:"Under how many hours before the appointment are cancellations considered late?"},lateCancellationType:{type:["string","null"],title:"Handle late cancellations differently than regular cancellations",default:E.eu},lateCancellationCriteria:{title:"Cancellation will be considered late",type:"array",items:{type:"object",properties:{days:{type:"array",title:"Days"},timeOfDay:{type:"string",title:"Time",default:"08:00"},cancellationType:{type:"string",title:"Type",default:E.TK}}},default:[]},visitCancellationConsequence:{type:"string",default:"VISIT_CANCELLATION_FORFEIT",title:"What should happen when a client requests an appointment or class date cancellation?"},visitCancellationCashCredit:{type:"number",title:"Visit cancellation - Refund amount (not supported)"},visitCancellationServiceCreditName:{type:"string",title:"How should the issued service credit be labeled?",default:"Make up"},visitCancellationServiceCreditService:{type:["object","null"],title:"Should the service for the credit issued be a different service than the one canceled?",properties:{},default:{}},visitCancellationServiceCreditSubscriptionCap:{type:"number",title:"Should there be a per subscription cap on the number of service credits issued for regular client cancellations?",default:2},visitCancellationServiceCreditValidityDays:{type:"number",title:"Should a service credit issued for a regular client cancellation have a validity period?"},visitCancellationServiceCreditValidityFromOriginalDate:{type:"boolean",default:!1,title:"Should visit cancellation validity period be calculated from the date of the original appointment or class?",subtitle:"If enabled, val
1idity is calculated from the original appointment or class start date and time. If disabled, validity begins at the moment the regular client cancellation is made."},visitCancellationServiceCreditSubscriptionCapPeriod:{type:"object",properties:{cap:{type:"number"},days:{type:"number"}},title:"Should there be a per subscription cap on the number of service credits issued for regular client cancellations within a time period?"},lateVisitCancellationConsequence:{type:"string",default:"VISIT_CANCELLATION_FORFEIT",title:"What should happen when a client requests an appointment or class date cancellation late?"},lateVisitCancellationCashCredit:{type:"number",title:"Late Visit cancellation - Refund amount"},lateVisitCancellationServiceCreditName:{type:"string",title:"How should the issued service credit be labeled?"},lateVisitCancellationServiceCreditService:{type:["object","null"],title:"For late client cancellation - Should the service for the credit issued be a different service than the one canceled?",properties:{},default:{}},lateVisitCancellationServiceCreditSubscriptionCap:{type:"number",title:"Should there be a per subscription cap on the number of service credit issued for late client cancellations?"},lateVisitCancellationServiceCreditValidityDays:{type:"number",title:"Should a service credit issued for a late client cancellation have a validity period?"},lateVisitCancellationServiceCreditValidityFromOriginalDate:{type:"boolean",default:!1,title:"Should late visit cancellation validity period be calculated from the date of the original appointment or class?",subtitle:"If enabled, validity is calculated from the original appointment or class start date and time. If disabled, validity begins at the moment the late client cancellation is made."},staffVisitCancellationConsequence:{type:"string",default:"VISIT_CANCELLATION_FORFEIT",title:"What should happen when an appointment or class is canceled when a staff is unable to perform the service?"},staffVisitCancellationCashCredit:{type:"number",title:"Should an amount be credited back to the payer?"},staffVisitCancellationAutoApplyCreditToOpenInvoice:{type:"boolean",default:!1,title:"Automatically apply monetary credits to next open invoice for subscriptions to this service?"},staffVisitCancellationServiceCreditName:{type:"string",title:"How should the issued service credit be labeled?"},staffVisitCancellationServiceCreditService:{type:["object","null"],title:"For staff cancellation - Should the service for the credit issued be a different service than the one canceled?",properties:{},default:{}},staffVisitCancellationServiceCreditValidityDays:{type:"number",title:"Should a service credit issued for a staff cancellation have a validity period?"},trackConversionTo:{type:"array",title:"Which service(s) can this service convert to?",subtitle:"Conversion from this service to those listed will be tracked and reported - Additionally this list of applicable conversion service will be used to prompt user for automated conversion, based on staff availabilities"},automateConversion:{type:"boolean",title:"Automate service conversion?",subtitle:"If on and once the service taken, clients will be emailed automatically and offered to enroll in a applicable recurring service (if available) at the same time with the same staff"},autoHold:{type:"boolean",title:"Automatically hold weekly time slot for the client",subtitle:"If set, the same time weekly, will be reserved for the client, for the specified service and for a given time after the lesson occurred. This is usually set for Trial services. The hold will be removed automatically if the appointment is either cancelled or moved"},autoHoldDays:{type:"number",title:"How many days should the time slot be held for?",subt
1itle:"The number of days the time slot will be reserved for the client after the lesson occurred. If set to 0 the hold will expire within hours after the lesson. This is usually set for Trial services.",default:2},autoHoldService:{type:"object",title:"Which service should the time slot be held for?",subtitle:"The service to hold the time slot for. Note the client may enroll into another service.",properties:{}},alternativeBookingLink:{type:["object","null"],title:"Automated conversion alternate self booking link",subtitle:"Will provide an option for the client to pick a different time, staff, service, when prompted for conversion",properties:{}},cancellationPolicy:{type:"string",title:"What cancellation policy should be displayed to clients when they cancel appointments?"},disableSelfCancellation:{type:"boolean",title:"Disable ability for clients to self-cancel appointments or class dates",subtitle:"If disabled, clients will not see the cancel button. Staff can still perform client cancellations"},disableUseCredits:{type:"boolean",title:"Disable ability for clients to use credits",subtitle:"If disabled, clients will not see the 'use button and won't be able to self-book using credits",default:!1},disableLessonMateRequest:{type:"boolean",title:"Disable ability for clients to request a LessonMate",subtitle:"If disabled, clients will not see the Request LessonMate button. Staff can still set LessonMate attendance status."},allowStaffToClientCancelUnpaid:{type:"boolean",title:"Allow staff to client cancel unpaid appointments / class dates?",subtitle:"By default, appointments/class dates must be paid in order to be canceled or self-canceled by clients (and receive credits). Turning this on would allow staff to client cancel appointment / class dates without requiring payment",default:!0},allowClientToSelfCancelUnpaid:{type:"boolean",title:"Allow clients to self-cancel unpaid appointments / class dates?",subtitle:"By default, appointments/class dates must be paid in order to be canceled or self-canceled by clients (and receive credits). Turning this on would allow clients to self-cancel appointment / class dates without requiring payment",default:!0},creditOnlyValidOncePaid:{type:"boolean",title:"Only allow using service credit issued as a consequence of cancellation once corresponding appointment / class date invoice is paid?",subtitle:"Turning this off would make service credits usable even if the appointment / class date is unpaid",default:!0},restrictCreditUsageWithStaff:{type:"boolean",default:!1,title:"Should clients using a credit for this service be limited to the staff member(s) assigned to the credit?"},confirmationEmail:{type:"string",title:"Confirmation email template",subtitle:"This is sent to clients when they are enrolled in class or booked in an appointment"},reminderEmail:{type:"string",title:"Reminder email template",subtitle:"This is sent to clients before their scheduled appointment / class / event"},sessionEndEmail:{type:"string",title:"Class end email",subtitle:"This is sent to clients after the last class date, if enabled"},sendSessionEndEmail:{type:"boolean",title:"Should class end email be sent for this service?"},cancellationEmail:{type:"string",title:"Cancellation email template",subtitle:"This is sent to clients when appointments or class dates are canceled"},automateConversionEmail:{type:"string",title:"Automated conversion email template",subtitle:"This is sent to clients after attendance, if automated conversion is turned on"},sendFollowUpEmail:{type:"boolean",title:"Send follow up email",default:!1,subtitle:"If enabled a follow up email will be sent when attendance is taken"},followUpEmail:{type:"string",title:"Follow up email template",subtitle:"This is sent to clients after attendance (or if automated conversion is turned on and conflicts are detected)"},shouldRemindCreditUsage:{type:"boolean",title:"Send reminder for unused/expiring credit(s)",default:!1,subtitle:"Turn on to auto send email/sms to clients that has unused/expiring credits for this service"},usageCreditReminderTemplate:{type:"string",title:"Unused/Expiring credits email reminder template"},termsAcceptanceReminderTemplate:{type:"string",title:"Terms and conditions acceptance reminder template"},usageCreditReminderSmsTemplate:{type:"string",title:"Unused/Expiring credits SMS reminder template"}
1,smsReminderTemplate:{type:"string",title:"Appointment/Class SMS reminder template"},shouldRemindCreditUsageDays:{type:"number",default:15,title:"Reminder will be sent once every"},shouldRemindCreditUsageIntervalDays:{type:"number",default:5,title:"Send reminder for unused/expiring credits once every (in days)",subtitle:"Specify how often we should send reminders to clients about their unused/expiring credits"},shouldRemindCreditUsageExpirationBeforeDays:{type:"number",default:15,title:"Send reminder for unused/expiring credits before they expire (in days)",subtitle:"Set the number of days before credit expiration when we should send a reminder to clients"},visibleByVisitors:{type:"boolean",title:"Can visitors see this service?",subtitle:"Turn on to make this service visible to visitors on self-booking. If off, it will still be visible to client / staff / managers & owners, make sure you log out to see it take effect as a visitor."},visibleByClients:{type:"boolean",title:"Can clients see this service?",subtitle:"Turn on to make this service visible to clients on self-booking. If off, it will still be visible to staff / managers & owners, make sure you login as a client to see it take effect."},priority:{type:"number",title:"How should this service be prioritized on the self-booking interface?",subtitle:"Services in the self-booking interface are prioritized alphabetically by default, but a higher priority can be assigned to services that should show more prominently.",default:0},deactivated:{type:"boolean",title:"Deactivated",subtitle:"Only managers will be able to see this service"},selfBookingClientNoteRequired:{type:"boolean",title:"Require client note at self-booking",subtitle:"If enabled, clients will be required to provide a note when self-booking"},selfBookingClientNotePlaceholder:{type:"string",title:"Self-booking client note placeholder"}}},ey={name:{"ui:placeholder":"Name",classNames:"col"},mainPhoto:{classNames:"col","ui:field":T.A,"ui:options":{params:{singlePhoto:!0,includePicker:!0}}},photos:{classNames:"col","ui:field":T.A,"ui:options":{params:{minSize:2e4,includePicker:!0}}},requiresBooking:{classNames:"col","ui:field":S.A,"ui:options":{id:"requires-booking"}},description:{classNames:"col","ui:testid":"tiptap-long-description","ui:placeholder":"Description","ui:field":b.A,"ui:options":{params:{spellCheck:!0},id:"tiptap-description"}},shortDescription:{classNames:"col","ui:placeholder":"Short Description","ui:testid":"tiptap-short-description","ui:field":b.A,"ui:options":{plainText:!0,params:{spellCheck:!0}}},tags:{"ui:placeholder":"Tags",classNames:"col","ui:field":y.A,"ui:options":{ApolloSelect:w.ad,params:{icon:"more",isMulti:!0,withSelectAll:!0,isCreatable:!0,isValidNewOption:(e,t)=>!(t.filter(t=>t.label===e).length>0)}}},spotlight:{classNames:"col","ui:field":S.A,"ui:options":{id:"spotlight"}},calendarColor:{"ui:placeholder":"Calendar Color",classNames:"col","ui:field":f.A},maximumClients:{classNames:"col","ui:placeholder":"Max Clients","ui:field":p.A,"ui:options":{Field:v.A,disabledValue:0,minValue:1,enabledValue:1,label:"Clients",id:"maximum-clients",toggleId:"toggle-wrapper-maximum-clients"}},maximumWaitlistClients:{classNames:"col","ui:placeholder":"Maximum Waitlist Clients","ui:field":p.A,"ui:options":{Field:v.A,disabledValue:0,minValue:1,enabledValue:1,label:"Clients",id:"maximum-waitlist-clients",toggleId:"toggle-wrapper-maximum-waitlist-clients"}},requiresPaymentMethodForWaitlist:{classNames:"col","ui:field":S.A,"ui:options":{id:"requires-payment-method-for-waitlist"}},waitlistPolicy:{classNames:"col","ui:placeholder":"Waitlist policy","ui:field":b.A,"ui:options":{params:{spellCheck:!0},id:"tiptap-waitlist-policy"}},notAfterAgeMonths:{classNames:"col","ui:placeholder":"Max Age Requirement","ui:field":p.A,"ui:options":{Field:m.A,disabledValue:0,minValue:1,enabledValue:1,toggleId:"toggle-wrapper-max-age-limit",idYears:"not-after-age-years",idMonths:"not-after-age-months"}},notBeforeAgeMonths:{classNames:"col","ui:placeholder":"Min Age Requirement","ui:field":p.A,"ui:options":{Field:m.A,disabledValue:0,minValue:1,enabledValue:1,toggleId:"toggle-wrapper-min-age-limit",idYears:"not-before-age-years",idMonths:"not-before-age-months"}},hasSessions:{classNames:"col","ui:field":S.A,"ui:options":{id:"has-sessions"}},allowsJoinOnline:{classNames:"col","ui:field":S.A,"ui:options":{id:"allows-join-online"}},notificationPeriodHours:{classNames:"col","ui:field":v.A,"ui:options":{minValue:0,label:"Hours",id:"notification-period-hours"}},smsNotificationPeriodHours:{classNames:"col","ui:field":v.A,"ui:options":{minValue:0,label:"Hours",id:"sms-notification-period-hours"}},durationMinutes:{classNames:"col","ui:field":v.A,"ui:options":{minValue:5,label:"Minutes",id:"appointment-duration"}},setupDurationMinutes:{classNames:"col","ui:field":p.A,"ui:options":{minValue:0,label:"Minutes",disabledValue:0,Field:v.A,toggleId:"toggle-wrapper-setup-duration-minutes",id:"setup-duration-minutes"}},slotIntervalMinutes:{classNames:"col","ui:placeholder":"Slot interval in minutes","ui:field":C.A,"ui:options":{min:5,max:60,tipFormatter:e=>"".concat(e," minutes"),railStyle:{backgroundColor:"grey"},className:"w-75",dots:!0,noCol:!0,dotStyle:{borderColor:"grey",backgroundColor:"grey"},activeDotStyle:{borderColor:"blue",backgroundColor:"white"},marks:{5:"5",10:"10",15:"15",20:"20",30:"30",45:"45",60:"60"},step:null,tipProps:{overlayClassName:"p-1"}}},slotStartSnap:{classNames:"col","ui:placeholder":"Snap slot start time (0 for no snapping)","ui:field":C.A,"ui:options":{min:0,max:60,tipFormatter:e=>"".concat(e," minutes"),railStyle:{backgroundColor:"grey"},className:"w-75",dots:!0,noCol:!0,dotStyle:{borderColor:"grey",backgroundColor:"grey"},activeDotStyle:{borderColor:"blue",backgroundColor:"white"},marks:{0:"No snap",5:"5",10:"10",15:"15",20:"20",30:"30",45:"45",60:"60"},step:null,tipProps:{overlayClassName:"p-1"}}},cleanupDurationMinutes:{"ui:placeholder":"Cleanup Duration",classNames:"col","ui:field":p.A,"ui:options":{minValue:0,label:"Minutes",disabledValue:0,Field:v.A,toggleId:"toggle-wrapper-cleanup-duration-minutes",id:"cleanup-duration-minutes"}},enrollmentWindowNotBeforeMinutes:{classNames:"col","ui:field":p.A,"ui:options":{Field:h.A,enabledValue:{days:0,hours:0},disabledValue:{days:0,hours:0},toggleId:"toggle-wrapper-enrollment-window-not-before-minutes"}},enrollmentWindowNotAfterMinutes:{classNames:"col","ui:field":p.A,"ui:options":{Field:h.A,enabledValue:{days:0,hours:0},disabledValue:{days:0,hours:0},toggleId:"toggle-wrapper-enrollment-window-not-after-minutes"}},enrollmentWindowGracePeriodDays:{classNames:"col","ui:field":p.A,"ui:options":{minValue:0,disabledValue:0,label:"Days",Field:v.A,toggleId:"toggle-wrapper-appointment-enrollment-window-grace-period"}},advancedSettings:{"ui:field":S.A,classNames:"col","ui:options":{id:"advanced-settings"}},weeklyCheckShortTermToleranceThresholdDays:{classNames:"col","ui:field":v.A,"ui:options":{minValue:0,label:"Days",id:"weekly-check-short-term-tolerance-threshold-days"}},weeklyCheckShortTermToleranceThresholdMaxCount:{classNames:"col","ui:field":v.A,"ui:options":{minValue:0,label:"Tolerated conflicts",id:"weekly-check-short-term-tolerance-threshold-max-count"}},weeklyCheckLongTermToleranceThresholdMaxCount:{classNames:"col","ui:field":v.A,"ui:options":{minValue:0,label:"Tolerated conflicts",id:"weekly-check-long-term-tolerance-threshold-max-count"}},selfBookingAvailabilityMode:{classNames:"col-6","ui:field":y.A,"ui:placeholder":"Staff availability","ui:options":{ApolloSelect:d.Ay,params:{isClearable:!1,options:[{name:"Staff availability",value:"AVAILABILITY_MODE_DEFAULT"},{name:"Staff availability but only on canceled / late canceled appointments",value:"AVAILABILITY_MODE_CANCELED_ONLY"}],getOptionLabel:e=>e.name,getOptionValue:e=>e.value,styles:K.K6,id:"react-select-availability-mode",classNamePrefix:"react-select",iconClass:"fa fa-calendar"}}},scheduleOptimizationStrategy:{classNames:"col-6","ui:field":y.A,"ui:placeholder":"Schedule optimization strategy","ui:options":{ApolloSelect:d.Ay,params:{options:[E.bw,E.p5].map(e=>({name:E.Zh[e],value:e})),getOptionLabel:e=>e.name,getOptionValue:e=>e.value,styles:K.K6,id:"react-select-schedule-optimization-strategy",classNamePrefix:"react-select"}}
1},maxSchedulingGapMinutes:{classNames:"col","ui:placeholder":"Max scheduling gap","ui:field":C.A,"ui:options":{min:0,max:60,tipFormatter:e=>"".concat(e," minutes"),railStyle:{backgroundColor:"grey"},className:"w-75",dots:!0,dotStyle:{borderColor:"grey",backgroundColor:"grey"},activeDotStyle:{borderColor:"blue",backgroundColor:"white"},marks:{0:"0",5:"5",10:"10",15:"15",30:"30",45:"45",60:"60"},step:5,tipProps:{overlayClassName:"p-1"}}},enforceScheduleOptimizationForSelfBooking:{classNames:"col","ui:field":S.A,"ui:options":{id:"enforce-schedule-optimization-for-self-booking"}},clientLifecycleStatusOnWaitlistAdded:{classNames:"col","ui:placeholder":"Client lifecycle status after being added to waitlist","ui:field":y.A,"ui:options":{ApolloSelect:A.A,params:{instanceId:J.H2,styles:K.K6,iconClass:"far fa-user-tag"}}},clientLifecycleStatusOnWaitlistRemoved:{classNames:"col","ui:placeholder":"Client lifecycle status after being removed from waitlist","ui:field":y.A,"ui:options":{ApolloSelect:A.A,params:{instanceId:J.fZ,styles:K.K6,iconClass:"far fa-user-tag"}}},clientLifecycleStatusOnBook:{classNames:"col","ui:placeholder":"Client lifecycle status after booking","ui:field":y.A,"ui:options":{ApolloSelect:A.A,params:{instanceId:J.fK,styles:K.K6,iconClass:"far fa-user-tag"}}},clientLifecycleStatusOnAttended:{classNames:"col","ui:placeholder":"Client lifecycle status after attending","ui:field":y.A,"ui:options":{ApolloSelect:A.A,params:{instanceId:J.ef,styles:K.K6,iconClass:"far fa-user-tag"}}},clientLifecycleStatusOnCancel:{classNames:"col","ui:placeholder":"Client lifecycle status after cancellation / no show","ui:field":y.A,"ui:options":{ApolloSelect:A.A,params:{instanceId:J.Ml,styles:K.K6,iconClass:"far fa-user-tag"}}},plans:{classNames:"col pl-2","ui:field":g.Ay,"ui:options":{itemName:"Payment Plan",items:void 0}},termsAndConditions:{classNames:"col","ui:field":e=>{var{schema:t}=e;return(0,s.jsx)(eu.A,{field:{title:t.title},children:(0,s.jsxs)("span",{className:"px-2 py-4",children:["T&C has been moved to"," ",(0,s.jsx)(ev,{route:"/terms-and-conditions-policies",target:"_blank",children:"here"}),". For help migrating your services to T&C V2, see our article"," ",(0,s.jsx)(ev,{href:"https://kb.opus1.io/migrating-existing-terms-and-conditions-to-tc-policies",target:"_blank",children:"here"})]})})}},termsAndConditionsRevision:{classNames:"col","ui:placeholder":"Terms and conditions version","ui:field":y.A,"ui:options":{ApolloSelect:eo.A,params:{iconClass:"far fa-fw fa-file-contract",styles:eo.P,queryParams:{statuses:[ef.oy]},isSearchable:!1},ActionsComponent:e=>{var{formData:t}=e,[i,a]=(0,er.A)(!1);return u()(t)?(0,s.jsxs)("div",{children:[(0,s.jsx)(ev,{route:"/terms-and-conditions-policies",target:"_blank",children:"Manage policies"}),(0,s.jsx)("span",{className:"ml-1",children:"or select an existing policy above."})]}):(0,s.jsxs)("div",{children:[(0,s.jsx)(ev,{type:"button",onClick:a,children:"View policy details"}),(0,s.jsx)("span",{className:"mx-1",children:"or"}),(0,s.jsx)(ev,{route:"/terms-and-conditions-policies",target:"_blank",children:"manage policies"}),i&&(0,s.jsx)(ed.A,{readOnly:!0,toggle:a,termsAndConditionsRevisionId:null==t?void 0:t.id})]})},showRefreshButton:!0}},cancellationPolicy:{classNames:"col","ui:placeholder":"Cancellation policy","ui:field":b.A,"ui:options":{params:{spellCheck:!0},id:"tiptap-cancellation-policy"}},disableSelfCancellation:{"ui:field":S.A,classNames:"col","ui:options":{id:"disable-self-cancellation"}},disableUseCredits:{"ui:field":S.A,classNames:"col","ui:options":{id:"disable-use-credits"}},disableLessonMateRequest:{"ui:field":S.A,classNames:"col","ui:options":{id:"disable-lesson-mate-request"}},allowStaffToClientCancelUnpaid:{"ui:field":S.A,classNames:"col","ui:options":{id:"allow-staff-client-cancel-unpaid"}},allowClientToSelfCancelUnpaid:{"ui:field":S.A,classNames:"col","ui:options":{id:"allow-client-self-cancel-unpaid"}},creditOnlyValidOncePaid:{"ui:field":S.A,classNames:"col","ui:options":{id:"credit-only-valid-once-paid"}},restrictCreditUsageWithStaff:{"ui:field":S.A,classNames:"col","ui:options":{id:"restrict-credit-usage-with-staff"}},cancellationWindowHours:{classNames:"col","ui:field":v.A,"ui:options":{id:"cancellation-window-hour",label:"Hours",minValue:0}},lateCancellationType:{classNames:"col","ui:field":p.A,"ui:options":{Field:y.A,ApolloSelect:d.Ay,params:{isClearable:!1,isSearchable:!1,options:[E.eu,E.Pv].map(e=>(0,K.a9)(e,E.VM)),styles:{container:e=>(0,l._)((0,a._)({},e),{width:"180px"}),control:e=>(0,l._)((0,a._)({},e),{borderTopLeftRadius:"4px",borderBottomLeftRadius:"4px",borderTopRightRadius:"4px",borderBottomRightRadius:"4px"})},id:"react-select-late-cancellation-type",instanceId:"late-cancellation-type",classNamePrefix:"react-select"},toggleId:"toggle-wrapper-cancellation-window-hour-and-specific-time",disabledValue:E.By,enabledValue:E.eu}},lateCancellationCriteria:{classNames:"col-12","ui:options":{addButtonLabel:"Add criteria",addButtonIconClass:"fal fa-plus mr-1",deleteButtonIconClass:"far fa-trash-alt mr-1",deleteButtonClass:"mb-3 mt-3 align-self-start",deleteButtonLabel:"Remove",deleteButtonId:"lateCancellationDelete"},items:{"ui:field":Y,"ui:options":{idDay:"day-select",idType:"type-select"},options:[E.TK,E.nP].map(e=>(0,K.a9)(e,E.nt))}}
1,visitCancellationConsequence:{classNames:"col-12","ui:field":y.A,"ui:placeholder":"Appointment is forfeited","ui:options":{ApolloSelect:d.Ay,params:{options:[{name:"Automatically issue a service credit",value:"VISIT_CANCELLATION_SERVICE_CREDIT"}],getOptionLabel:e=>e.name,getOptionValue:e=>e.value,styles:K.K6,id:"react-select-visit-cancellation",classNamePrefix:"react-select",icon:"payment autorenew"}}},visitCancellationCashCredit:{classNames:"col-12","ui:field":x.Ay,"ui:options":{params:{icon:"attach_money"},id:"input-visit-cancellation-refund-amount"}},visitCancellationServiceCreditName:{classNames:"col-12","ui:placeholder":"Cancel Credit Name"},visitCancellationServiceCreditService:{classNames:"col","ui:placeholder":"Cancel Credit Service","ui:field":p.A,"ui:options":{Field:y.A,ApolloSelect:w.lS,disabledValue:{},enabledValue:null,params:{icon:"payment autorenew",styles:K.K6},toggleId:"toggle-wrapper-visit-cancellation-service-credit-service"}},visitCancellationServiceCreditSubscriptionCap:{classNames:"col","ui:placeholder":"Cancel Credit Cap","ui:field":p.A,"ui:options":{Field:v.A,disabledValue:0,minValue:0,label:"Credits",id:"visit-cancellation-service-credit-subscription-cap",toggleId:"toggle-wrapper-visit-cancellation-service-credit-subscription-cap"}},visitCancellationServiceCreditValidityDays:{classNames:"col","ui:field":p.A,"ui:options":{Field:v.A,disabledMessage:"Never Expires",disabledValue:0,enabledValue:30,minValue:1,label:"Days",id:"visit-cancellation-service-credit-validity-days",toggleId:"toggle-wrapper-visit-cancellation-service-credit-validity-days"}},visitCancellationServiceCreditValidityFromOriginalDate:{classNames:"col","ui:field":S.A,"ui:options":{id:"visit-cancellation-service-credit-validity-from-original-date"}},visitCancellationServiceCreditSubscriptionCapPeriod:{classNames:"col","ui:field":p.A,"ui:options":{toggleId:"toggle-wrapper-visit-cancellation-cap-period",Field:e=>{var[t,i]=(0,o.useState)((e.formData||{}).days||1),[n,r]=(0,o.useState)((e.formData||{}).cap||1),d=(0,l._)((0,a._)({},Q()(e)),{canBeNull:!0,onChange:(i,a)=>{r(i),e.onChange({cap:i,days:t},a)},formData:n});d.uiSchema["ui:options"].id="cancellation-cap-period";var c=(0,l._)((0,a._)({},Q()(e)),{canBeNull:!0,onChange:(t,a)=>{i(t),e.onChange({cap:n,days:t},a)},formData:t});return c.uiSchema["ui:options"].id="cancellation-cap-period-days",(0,s.jsxs)(s.Fragment,{children:["Allow",(0,s.jsx)(X,{children:(0,s.jsx)(v.A,(0,a._)({},d))}),"credit(s) within a",(0,s.jsx)(X,{children:(0,s.jsx)(v.A,(0,a._)({},c))}),"- day period."]})},minValue:1,disabledValue:{},enabledValue:{cap:2,days:90}}},lateVisitCancellationConsequence:{classNames:"col-12","ui:field":y.A,"ui:placeholder":"Appointment is forfeited","ui:options":{ApolloSelect:d.Ay,params:{options:[{name:"Automatically issue a service credit",value:"VISIT_CANCELLATION_SERVICE_CREDIT"}],getOptionLabel:e=>e.name,getOptionValue:e=>e.value,styles:K.K6,id:"react-select-late-visit-cancellation",icon:"payment autorenew",classNamePrefix:"react-select"}}},lateVisitCancellationCashCredit:{classNames:"col-12","ui:field":x.Ay,"ui:options":{params:{icon:"attach_money"},id:"input-late-visit-cancellation-refund-amount"}},lateVisitCancellationServiceCreditName:{classNames:"col-12","ui:placeholder":"Cancel Credit Name"},lateVisitCancellationServiceCreditService:{classNames:"col","ui:placeholder":"Late Cancel Credit Service","ui:field":p.A,"ui:options":{Field:y.A,ApolloSelect:w.lS,disabledValue:{},enabledValue:null,params:{icon:"payment autorenew"}}},lateVisitCancellationServiceCreditSubscriptionCap:{classNames:"col","ui:placeholder":"Late Cancel Credit Cap","ui:field":p.A,"ui:options":{Field:v.A,disabledValue:0,enabledValue:2,minValue:1,label:"Credits",id:"late-visit-cancellation-service-credit-subscription-cap",toggleId:"toggle-wrapper-late-visit-cancellation-service-credit-subscription-cap"}},lateVisitCancellationServiceCreditValidityDays:{classNames:"col","ui:field":p.A,"ui:options":{Field:v.A,disabledValue:0,enabledValue:30,minValue:0,label:"Days",disabledMessage:"Never Expires",id:"late-visit-cancellation-service-credit-validity-days",toggleId:"toggle-wrapper-late-visit-cancellation-service-credit-validity-days"}},lateVisitCancellationServiceCreditValidityFromOriginalDate:{classNames:"col","ui:field":S.A,"ui:options":{id:"late-visit-cancellation-service-credit-validity-from-original-date"}},staffVisitCancellationConsequence:{classNames:"col-12","ui:field":y.A,"ui:placeholder":"Appointment is forfeited","ui:options":{ApolloSelect:d.Ay,params:{options:[{name:"Automatically issue a service credit",value:"VISIT_CANCELLATION_SERVICE_CREDIT"},{name:"Automatically issue monetary credit (or recalculate invoice)",value:"VISIT_CANCELLATION_INVOICE_UPDATE"}],getOptionLabel:e=>e.name,getOptionValue:e=>e.value,styles:K.K6,id:"react-select-".concat(J._C),icon:"payment autorenew",classNamePrefix:"react-select"}}
1},staffVisitCancellationCashCredit:{classNames:"col-12","ui:field":p.A,"ui:options":{Field:x.Ay,disabledValue:0,params:{icon:"attach_money"},id:"input-staff-visit-cancellation-refund-amount"}},staffVisitCancellationAutoApplyCreditToOpenInvoice:{classNames:"col-12","ui:field":S.A,"ui:options":{id:"staff-visit-cancellation-auto-apply-credit-to-open-invoice"}},staffVisitCancellationServiceCreditName:{classNames:"col-12","ui:placeholder":"Cancel Credit Name"},staffVisitCancellationServiceCreditService:{classNames:"col","ui:placeholder":"Staff Cancel Credit Service","ui:field":p.A,"ui:options":{Field:y.A,ApolloSelect:w.lS,disabledValue:{},enabledValue:null,params:{icon:"payment autorenew"}}},staffVisitCancellationServiceCreditValidityDays:{classNames:"col","ui:field":p.A,"ui:options":{Field:v.A,disabledValue:0,enabledValue:30,minValue:1,label:"Days",disabledMessage:"Never Expires",id:"staff-visit-cancellation-service-credit-validity-days",toggleId:"toggle-wrapper-staff-visit-cancellation-service-credit-validity-days"}},trackConversionTo:{classNames:"col","ui:placeholder":"List of services this service can convert to","ui:field":y.A,"ui:options":{ApolloSelect:w.Ef,params:{queryParams:{appointmentOnly:!0},reactSelectId:"event-service",icon:"content_paste",isMulti:!0,withSelectAll:!0},hideAsterisk:!0,withTermDescriptions:!0}},automateConversion:{classNames:"col","ui:field":S.A,"ui:options":{id:"deactivated"}},autoHold:{classNames:"col","ui:field":S.A,"ui:options":{id:"auto-hold"}},autoHoldDays:{classNames:"col","ui:field":v.A,"ui:options":{minValue:0,label:"Days",id:"auto-hold-days"}},autoHoldService:{classNames:"col","ui:placeholder":"Select service the slot should be held for","ui:field":y.A,"ui:options":{ApolloSelect:w.Ef,params:{queryParams:{appointmentOnly:!0},reactSelectId:"auto-hold-service",iconClass:"far fa-clipboard",isClearable:!1}}},alternativeBookingLink:{classNames:"col","ui:placeholder":"Select a self booking link","ui:field":y.A,"ui:options":{ApolloSelect:ee.A,params:{iconClass:"fal fa-link",queryMiddleware:e=>e.filter(e=>e.widgetType===E.JJ)}}},confirmationEmail:{classNames:"col","ui:testid":"tiptap-confirmation-email","ui:placeholder":"Confirmation email","ui:field":b.A,"ui:options":{params:{spellCheck:!0},id:"tiptap-confirmation-email"}},reminderEmail:{classNames:"col","ui:testid":"tiptap-reminder-email","ui:placeholder":"Reminder email","ui:field":b.A,"ui:options":{params:{spellCheck:!0},id:"tiptap-reminder-email"}},sessionEndEmail:{classNames:"col","ui:placeholder":"Class end email","ui:field":b.A,"ui:options":{params:{spellCheck:!0},id:"tiptap-session-end-email"}},sendSessionEndEmail:{"ui:field":S.A,classNames:"col","ui:options":{id:"send-session-end-toggle"}},cancellationEmail:{classNames:"col","ui:placeholder":"Cancellation email","ui:field":b.A,"ui:options":{params:{spellCheck:!0},id:"tiptap-cancellation-email"}},automateConversionEmail:{classNames:"col","ui:placeholder":"Automated conversion email","ui:field":b.A,"ui:options":{params:{spellCheck:!0},id:"tiptap-automate-conversion-email"}},shouldRemindCreditUsage:{"ui:field":S.A,classNames:"col","ui:options":{id:"should-remind-usage"}},usageCreditReminderTemplate:{classNames:"col","ui:placeholder":"Unused/Expiring credits email reminder template","ui:field":b.A,"ui:options":{params:{spellCheck:!0},id:"tiptap-credit-usage"}},termsAcceptanceReminderTemplate:{classNames:"col","ui:placeholder":"Terms and conditions acceptance reminder template","ui:field":em,"ui:options":{id:"tiptap-terms-acceptance",infoMessages:[],allowedPlaceholders:["business_name","client_name","payer_name","plan_name"]}},usageCreditReminderSmsTemplate:{classNames:"col","ui:placeholder":"Unused/Expiring credits SMS reminder template","ui:field":es,"ui:options":{id:"credit-usage-sms",params:{rows:4},infoMessages:["The {{expiry_date}} placeholder will be replaced by the text ' expiring by MM/DD/YYYY'.","SMS reminders will not be sent between 9 PM and 8 AM in the recipient's local time."],allowedPlaceholders:["business_name","service_name","client_name","expiry_date","booking_link"]}},smsReminderTemplate:{classNames:"col","ui:field":es,"ui:options":{params:{rows:4},id:"tiptap-sms-reminder",infoMessages:["When staff members are assigned, the placeholder {{staff_name}} will be replaced by 'with' followed by the name(s) of the staff member(s).","The {{service_name}} placeholder will be replaced with the name of the service. In case of an event, it will display both the service and event name."],allowedPlaceholders:["business_name","service_name","location_name","room_name","staff_name","date_time"]}},shouldRemindCreditUsageDays:{classNames:"col","ui:field":v.A,"ui:options":{minValue:15,label:"Days",id:"credit-usage-reminder-duration"}},shouldRemindCreditUsageIntervalDays:{classNames:"col","ui:field":p.A,"ui:options":{Field:v.A,disabledValue:0,minValue:1,label:"Days",id:"credit-usage-reminder-interval"}},shouldRemindCreditUsageExpirationBeforeDays:{classNames:"col","ui:field":p.A,"ui:options":{Field:v.A,disabledValue:0,minValue:1,label:"Days",id:"credit-usage-reminder-expiration"}},sendFollowUpEmail:{"ui:field":S.A,classNames:"col","ui:options":{id:"send-follow-up-toggle"}},followUpEmail:{classNames:"col","ui:placeholder":"Follow up email","ui:field":b.A,"ui:options":{params:{spellCheck:!0},id:"tiptap-follow-up-email"}},visibleByVisitors:{"ui:field":S.A,classNames:"col","ui:options":{id:"visible-by-visitors"}},visibleByClients:{"ui:field":S.A,classNames:"col","ui:options":{id:"visible-by-clients"}},priority:{classNames:"col","ui:placeholder":"Display priority","ui:field":C.A,"ui:options":{min:0,max:5,railStyle:{backgroundColor:"grey"},className:"w-75",sliderStyle:"ml-5",dots:!0,noCol:!0,dotStyle:{borderColor:"grey",backgroundColor:"grey"},activeDotStyle:{borderColor:"blue",backgroundColor:"white"},marks:{0:"Not prioritized",1:"Very low",2:"Low",3:"Medium",4:"High",5:"Very high"},step:null,tipProps:{overlayClassName:"p-1"}}},deactivated:{"ui:field":S.A,classNames:"col","ui:options":{id:"deactivated"}},selfBookingClientNoteRequired:{"ui:field":S.A,classNames:"col","ui:options":{id:"self-booking-client-note-required"}},selfBookingClientNotePlaceholder:{"ui:placeholder":"Self-booking client note placeholder","ui:help":"The following placeholder is available to be used in the template: {{participant_name}}.","ui:options":{id:"tiptap-self-booking-client-note-placeholder"},classNames:"col"}}},43271:function(e,t,i){i.d(t,{kd:function(){return eo},Ay:function(){return ec},yj:function(){return el},BL:function(){return es}});var a=i(41374),l=i(71893),n=i(55456),s=i(84577);i(45336),i(23446),i(69861),i(60726),i(93632),i(43831),i(89773),i(5127),i(65857),i(33676),i(97857),i(4810),i(60865),i(3101),i(39112),i(75516),i(2070),i(96030),i(92167),i(47786),i(19808),i(56059),i(78736),i(68121),i(79389),i(75927),i(72859),i(15441),i(16028),i(3182),i(5409);var o=i(74848),r=i(96540),d=i(5556),c=i.n(d),u=i(17378),p=i(27140),m=i.n(p),f=i(29436),h=i(52956),v=i(11387),C=i.n(v),y=i(88055),b=i.n(y),g=i(62193),S=i.n(g),w=i(50926),A=i(22694),T=i(35979),N=i(61734),x=i(6683),k=i(37762),V=i(48810),D=i(89511),I=i(59334),E=i(68618),M=i(87936),O=i(16517),R=i(39343);i(12172),i(521);var _=i(70537),L=i(52556),q=i(25167),P=i(69348),j=i(57682),W=i(36596),B=i(60469),F=i(12163),U=i(86095),H=e=>
1{var{isOpen:t,toggle:i,originalName:l,onChange:n}=e,[s,d]=(0,r.useState)(l);return(0,o.jsxs)(W.A,{modalName:"rename-service",isOpen:t,toggle:i,wrapClassName:"modal-primary",size:"lg",children:[(0,o.jsx)(j.default,{toggle:i,children:"Rename Service"}),(0,o.jsxs)(q.default,{children:[(0,o.jsx)(F.A,{disabled:!0,field:{id:"original-value",title:"Original name",value:l}}),(0,o.jsx)(F.A,{field:{id:"new-value",title:"New name",value:s},onChange:e=>{d(e.target.value)},className:"mb-1"}),(0,o.jsx)(U.A,{className:"mb-2 mt-3",text:"Changing services names after clients are enrolled is NOT recommended.  This will affect clients currently enrolled with that service and may cause  discrepancies in how the service name will appear in the calendar, on the  clients schedule, subscription and invoices."})]}),(0,o.jsx)(P.default,{children:(0,o.jsx)(B.A,{id:"submit-rename-service",className:"btn btn-primary btn-rounded",onClick:()=>(0,a._)(function*(){n(s.trim()),i()})(),disabled:!s||s===l,children:"Rename Service"})})]})};function Y(){var e=(0,s._)(["\n    .rename-icon:hover {\n        cursor: pointer;\n    }\n"]);return Y=function(){return e},e}var z=u.Ay.div(Y()),G=e=>{var{formData:t,onChange:i}=e,[a,,l]=(0,L.A)(),[n,s]=(0,r.useState)(t);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"pb-2",children:"Service Name"}),(0,o.jsxs)(z,{className:"icon-field",children:[(0,o.jsx)("input",{className:"form-control with-icon service-original-name",value:n,disabled:!0}),(0,o.jsx)(_.A,{fasIcon:"edit",className:"mt-2 ml-3 rename-icon rename-service",onClick:()=>{l()},tooltip:"rename"})]}),a&&(0,o.jsx)(H,{isOpen:!0,toggle:l,originalName:n,onChange:e=>[s(e),i(e)]})]})};G.propTypes={onChange:c().func.isRequired};var K=i(77999),J=i(69530),$=i(53857),Q=i(38034);function Z(){var e=(0,s._)(["\n    display: flex;\n    @media (max-width: 768px) {\n        flex-direction: column;\n    }\n"]);return Z=function(){return e},e}function X(){var e=(0,s._)(["\n    &:not(:last-child) {\n        margin-right: 10px;\n    }\n    @media (max-width: 768px) {\n        margin: auto !important;\n        &:not(:first-child) {\n            margin-top: 10px !important;\n        }\n    }\n"]);return X=function(){return e},e}function ee(){var e=(0,s._)(["\n    margin-right: 0 !important;\n    i {\n        vertical-align: middle;\n        margin-right: 4px;\n    }\n    span {\n        vertical-align: middle;\n    }\n"]);return ee=function(){return e},e}var et=u.Ay.div(Z()),ei=u.Ay.button(X()),ea=(0,u.Ay)(B.A)(ee()),el={DEFAULT:["visitCancellationCashCredit","visitCancellationServiceCreditName","visitCancellationServiceCreditService","visitCancellationServiceCreditSubscriptionCap","visitCancellationServiceCreditValidityDays","visitCancellationServiceCreditValidityFromOriginalDate","visitCancellationServiceCreditSubscriptionCapPeriod"],VISIT_CANCELLATION_FORFEIT:["visitCancellationCashCredit","visitCancellationServiceCreditName","visitCancellationServiceCreditService","visitCancellationServiceCreditSubscriptionCap","visitCancellationServiceCreditValidityDays","visitCancellationServiceCreditValidityFromOriginalDate","visitCancellationServiceCreditSubscriptionCapPeriod"],VISIT_CANCELLATION_SERVICE_CREDIT:["visitCancellationCashCredit"],VISIT_CANCELLATION_INVOICE_UPDATE:["visitCancellationServiceCreditName","visitCancellationServiceCreditService","visitCancellationServiceCreditSubscriptionCap","visitCancellationServiceCreditValidityDays","visitCancellationServiceCreditValidityFromOriginalDate","visitCancellationServiceCreditSubscriptionCapPeriod"],VISIT_CANCELLATION_CASH_CREDIT:["visitCancellationServiceCreditService","visitCancellationServiceCreditSubscriptionCap"],VISIT_CANCELLATION_REFUND:["visitCancellationServiceCreditName","visitCancellationServiceCreditService","visitCancellationServiceCreditSubscriptionCap","visitCancellationServiceCreditValidityDays","visitCancellationServiceCreditValidityFromOriginalDate"]},en=(e,t,i,a)=>{for(var l=b()(e),n=el[e.visitCancellationConsequence]||el.DEFAULT,s=el[e.lateVisitCancellationConsequence]||el.DEFAULT,o=el[e.staffVisitCancellationConsequence]||el.DEFAULT,r=0;r<n.length;r+=1){var d=n[r];d in e&&delete l[d]}for(var c=0;c<s.length;c+=1){var u="late".concat(s[c].charAt(0).toUpperCase()).concat(s[c].slice(1));u in e&&delete l[u]}for(var p=0;p<o.length;p+=1){var m="staff".concat(o[p].charAt(0).toUpperCase()).concat(o[p].slice(1));m in e&&delete l[m]}return"VISIT_CANCELLATION_INVOICE_UPDATE"!==e.staffVisitCancellationConsequence&&delete l.staffVisitCancellationAutoApplyCreditToOpenInvoice,i.smsFeatureEnabled||(delete l.smsNotificationPeriodHours,delete l.smsReminderTemplate),i.lessonMateFeatureEnabled||delete l.disableLessonMateRequest,t===x.je?(delete l.durationMinutes,delete l.slotIntervalMinutes,delete l.slotStartSnap,delete l.enrollmentWindowNotBeforeMinutes,delete l.enrollmentWindowNotAfterMinutes,delete l.weeklyCheckShortTermToleranceThresholdDays,delete l.weeklyCheckShortTermToleranceThresholdMaxCount,delete l.weeklyCheckLongTermToleranceThresholdMaxCount,delete l.visitCancellationConsequence,delete l.lateVisitCancellationConsequence,delete l.staffVisitCancellationConsequence,delete l.maximumClients,delete l.maximumWaitlistClients,delete l.requiresPaymentMethodForWaitlist,delete l.waitlistPolicy,delete l.clientLifecycleStatusOnWaitlistAdded,delete l.clientLifecycleStatusOnWaitlistRemoved,delete l.notAfterAgeMonths,delete l.notBeforeAgeMonths,delete l.notificationPeriodHours,delete l.reminderEmail,delete l.sessionEndEmail,delete l.sendSessionEndEmail,delete l.cancellationEmail,delete l.cancellationWindowHours,delete l.lateCancellationCriteria,delete l.enrollmentWindowGracePeriodDays,delete l.allowsJoinOnline,delete l.calendarColor,delete l.setupDurationMinutes,delete l.cleanupDurationMinutes,delete l.trackConversionTo,delete l.automateConversion,delete l.automateConversionEmail,delete l.autoHold,delete l.autoHoldDays,delete l.autoHoldService,delete l.sendFollowUpEmail,delete l.followUpEmail,delete l.advancedSettings,delete l.selfBookingAvailabilityMode,delete l.allowStaffToClientCancelUnpaid,delete l.allowClientToSelfCancelUnpaid,delete l.creditOnlyValidOncePaid,delete l.restrictCreditUsageWithStaff,delete l.priority,delete l.shouldRemindCreditUsage,delete l.shouldRemindCreditUsageIntervalDays,delete l.shouldRemindCreditUsageExpirationBeforeDays,delete l.usageCreditReminderTemplate,delete l.usageCreditReminderSmsTemplate,l.hasSessions=!1,l.requiresBooking=!1):t===x.fW?(delete l.trackConversionTo,delete l.automateConversion,delete l.automateConversionEmail,delete l.autoHold,delete l.autoHoldDays,delete l.autoHoldService,delete l.sendFollowUpEmail,delete l.followUpEmail,delete l.advancedSettings,delete l.selfBookingAvailabilityMode,delete l.weeklyCheckShortTermToleranceThresholdDays,delete l.weeklyCheckShortTermToleranceThresholdMaxCount,delete l.weeklyCheckLongTermToleranceThresholdMaxCount,delete l.disableLessonMateRequest,delete l.restrictCreditUsageWithStaff,l.lateVisitCancellationServiceCreditSubscriptionCap||(l.lateVisitCancellationServiceCreditSubscriptionCap=0),l.lateVisitCancellationServiceCreditValidityDays||(l.lateVisitCancellationServiceCreditValidityDays=0),l.staffVisitCancellationServiceCreditValidityDays||(l.staffVisitCancellationServiceCreditValidityDays=0),l.hasSessions=!0,l.requiresBooking=!0):t===x.ll?(delete l.maximumWaitlistClients,delete l.requiresPaymentMethodForWaitlist,delete l.waitlistPolicy,delete l.clientLifecycleStatusOnWaitlistAdded,delete l.clientLifecycleStatusOnWaitlistRemoved,delete l.trackConversionTo,delete l.automateConversion,delete l.automateConversionEmail,delete l.autoHold,delete l.autoHoldDays,delete l.autoHoldService,delete l.sendFollowUpEmail,delete l.followUpEmail,delete l.advancedSettings,delete l.selfBookingAvailabilityMode,delete l.weeklyCheckShortTermToleranceThresholdDays,delete l.weeklyCheckShortTermToleranceThresholdMaxCount,delete l.weeklyCheckLongTermToleranceThresholdMaxCount,delete l.allowStaffToClientCancelUnpaid,delete l.allowClientToSelfCancelUnpaid,delete l.creditOnlyValidOncePaid,delete l.restrictCreditUsageWithStaff,delete l.shouldRemindCreditUsage,delete l.shouldRemindCreditUsageIntervalDays,delete l.shouldRemindCreditUsageExpirationBeforeDays,delete l.usageCreditReminderTemplate,delete l.usageCreditReminderSmsTemplate,l.hasSessions=!0,l.requiresBooking=!0,l.eventType=!0,delete l.durationMinutes):t===x.Yc&&
1(delete l.enrollmentWindowGracePeriodDays,delete l.maximumWaitlistClients,delete l.requiresPaymentMethodForWaitlist,delete l.waitlistPolicy,delete l.clientLifecycleStatusOnWaitlistAdded,delete l.clientLifecycleStatusOnWaitlistRemoved,l.hasSessions=!1,l.requiresBooking=!0,l.advancedSettings=a,l.staffVisitCancellationServiceCreditValidityDays||(l.staffVisitCancellationServiceCreditValidityDays=0),l.lateVisitCancellationServiceCreditSubscriptionCap||(l.lateVisitCancellationServiceCreditSubscriptionCap=0),l.lateVisitCancellationServiceCreditValidityDays||(l.lateVisitCancellationServiceCreditValidityDays=0)),l.autoHold||(delete l.autoHoldDays,delete l.autoHoldService),l.visitCancellationServiceCreditValidityDays||(l.visitCancellationServiceCreditValidityFromOriginalDate=!1),l.lateVisitCancellationServiceCreditValidityDays||(l.lateVisitCancellationServiceCreditValidityFromOriginalDate=!1),l.automateConversion||l.sendFollowUpEmail||delete l.alternativeBookingLink,l.visibleByVisitors&&(l.visibleByClients=!0),l.lateCancellationType===O.By?(l.cancellationWindowHours=0,l.lateCancellationCriteria=[]):l.lateCancellationType===O.Pv?l.cancellationWindowHours=0:l.lateCancellationType===O.eu&&(0===l.cancellationWindowHours&&(l.cancellationWindowHours=T.w.properties.cancellationWindowHours.default),l.lateCancellationCriteria=[]),l},es=(e,t)=>{var{defaultCurrency:i,isUpdateForm:a}=t,l=b()(e);a&&l.name&&(l.name["ui:field"]=G);var n=(0,R.PH)(i);return(null==l?void 0:l.visitCancellationCashCredit)&&(l.visitCancellationCashCredit["ui:options"].params.mask=n),(null==l?void 0:l.lateVisitCancellationCashCredit)&&(l.lateVisitCancellationCashCredit["ui:options"].params.mask=n),(null==l?void 0:l.staffVisitCancellationCashCredit)&&(l.staffVisitCancellationCashCredit["ui:options"].params.mask=n),l},eo=(e,t,i)=>{var a,n,s={variables:(0,l._)({},b()(e),t)},{tags:o,plans:r}=s.variables||{};return o&&"string"!=typeof o[0]&&(s.variables.tags=o.map(e=>e.label)),s.variables.plans&&(s.variables.plans=r.map(e=>{var t=(0,Q.eI)((0,l._)({},e));return delete t.hasSalesTax,delete t.__typename,delete t.enrollmentType,t.locations=(e.locations||[]).map(e=>e.id),delete t.hasSpecificLocations,delete t.hasLatePayment,delete t.autoPayDeltaDaysEnabled,["clientLifecycleStatusOnBook","clientLifecycleStatusOnAttended","clientLifecycleStatusOnCancel"].forEach(e=>{var i;t[e]=null==(i=t[e])?void 0:i.value}),t.assignedClientTags=(e.assignedClientTags||[]).map(e=>e.value),e.signupPrice||(t.signupPrice=0),e.householdDiscountType&&e.householdDiscountRate?t.discountPolicy={discountType:e.householdDiscountType,discountRate:e.householdDiscountRate,discountTarget:e.householdDiscountTarget,subscriptionScope:e.includeAccountManagersInHouseholdDiscount?"HOUSEHOLD":"SIBLING"}:delete t.discountPolicy,delete t.householdDiscountType,delete t.householdDiscountRate,delete t.householdDiscountTarget,delete t.includeAccountManagersInHouseholdDiscount,t})),s.variables.eventType=!1,e.clientLifecycleStatusOnBook&&(s.variables.clientLifecycleStatusOnBook=e.clientLifecycleStatusOnBook.value),e.clientLifecycleStatusOnAttended&&(s.variables.clientLifecycleStatusOnAttended=e.clientLifecycleStatusOnAttended.value),e.clientLifecycleStatusOnCancel&&(s.variables.clientLifecycleStatusOnCancel=e.clientLifecycleStatusOnCancel.value),e.clientLifecycleStatusOnWaitlistAdded&&(s.variables.clientLifecycleStatusOnWaitlistAdded=e.clientLifecycleStatusOnWaitlistAdded.value),e.clientLifecycleStatusOnWaitlistRemoved&&(s.variables.clientLifecycleStatusOnWaitlistRemoved=e.clientLifecycleStatusOnWaitlistRemoved.value),s.variables.visitCancellationServiceCreditService&&(s.variables.visitCancellationServiceCreditService=s.variables.visitCancellationServiceCreditService.id),s.variables.lateVisitCancellationServiceCreditService&&(s.variables.lateVisitCancellationServiceCreditService=s.variables.lateVisitCancellationServiceCreditService.id),s.variables.staffVisitCancellationServiceCreditService&&(s.variables.staffVisitCancellationServiceCreditService=s.variables.staffVisitCancellationServiceCreditService.id),s.variables.termsAndConditionsRevision&&(s.variables.termsAndConditionsRevisionId=s.variables.termsAndConditionsRevision.id),i===x.je?(s.variables.plans=s.variables.plans.map(e=>(delete e.onlyPayableWithCredit,delete e.visitInterval,delete e.visits,e)),s.variables.hasSessions=!1,s.variables.requiresBooking=!1):i===x.fW?(s.variables.hasSessions=!0,s.variables.requiresBooking=!0,delete s.variables.slotIntervalMinutes,delete s.variables.slotStartSnap):i===x.ll?(s.variables.hasSessions=!0,s.variables.requiresBooking=!0,s.variables.eventType=!0,delete s.variables.durationMinutes,delete s.variables.slotIntervalMinutes,delete s.variables.slotSnap,delete s.variables.slotStartSnap,delete s.variables.enrollmentWindowNotBeforeMinutes,delete s.variables.enrollmentWindowNotAfterMinutes,delete s.variables.visitCancellationConsequence,delete s.variables.lateVisitCancellationConsequence,delete s.variables.staffVisitCancellationConsequence):i===x.Yc&&
1(delete s.variables.enrollmentWindowGracePeriodDays,s.variables.hasSessions=!1,s.variables.requiresBooking=!0),"enrollmentWindowGracePeriodDays"in s.variables&&!s.variables.enrollmentWindowGracePeriodDays&&(s.variables.enrollmentWindowGracePeriodDays=0),s.variables.photos&&s.variables.photos.length>0&&(s.variables.photos=s.variables.photos.map(e=>e.split("/service_photos/")[1]||e),s.variables.photos[0]&&"None"!==s.variables.photos[0]||delete s.variables.photos),["enrollmentWindowNotAfterMinutes","enrollmentWindowNotBeforeMinutes"].forEach(e=>{if(s.variables[e]){var{days:t,hours:i,minutes:a}=s.variables[e];s.variables[e]=(0,M.HD)(t,i,a)}}),"visitCancellationServiceCreditSubscriptionCapPeriod"in s.variables&&(s.variables.visitCancellationServiceCreditSubscriptionPeriodCap=(s.variables.visitCancellationServiceCreditSubscriptionCapPeriod||{}).cap||0,s.variables.visitCancellationServiceCreditSubscriptionPeriodCapDays=(s.variables.visitCancellationServiceCreditSubscriptionCapPeriod||{}).days||0,delete s.variables.visitCancellationServiceCreditSubscriptionCapPeriod),s.variables.trackConversionTo&&(s.variables.trackConversionTo=s.variables.trackConversionTo.map(e=>e.id)),s.variables.autoHold?s.variables.autoHoldServiceId=null==(a=s.variables.autoHoldService)?void 0:a.id:(delete s.variables.autoHoldDays,delete s.variables.autoHoldServiceId),s.variables.alternativeBookingLink&&(s.variables.alternativeBookingLink=null==(n=s.variables.alternativeBookingLink)?void 0:n.link),s},er=e=>{console.log(e)},ed=e=>{var{serviceData:t,isUpdateForm:i,isLoading:s,updateService:d,createService:c,business:u,defaultCurrency:p}=e,{schema:m,formData:f,originalFormData:v,uiSchema:y,serviceType:g}=(0,h.useSelector)(e=>
1e.serviceEditor),A=(0,h.useDispatch)(),[R,_]=(0,r.useState)(!1),[L,q]=(0,r.useState)({}),[P,j]=(0,J.A)("service:showAdvancedSettings",!1),W=(0,h.useSelector)(e=>e.app.business);if((0,I.A)(),(0,r.useEffect)(()=>{var e;if(i){var{clientLifecycleStatusOnBook:a,clientLifecycleStatusOnAttended:n,clientLifecycleStatusOnCancel:s,clientLifecycleStatusOnWaitlistAdded:o,clientLifecycleStatusOnWaitlistRemoved:r}=t;e=(0,k.Y)(t);var d=(0,l._)({},t);a&&(d.clientLifecycleStatusOnBook={value:a,label:a}),n&&(d.clientLifecycleStatusOnAttended={value:n,label:n}),s&&(d.clientLifecycleStatusOnCancel={value:s,label:s}),o&&(d.clientLifecycleStatusOnWaitlistAdded={value:o,label:o}),r&&(d.clientLifecycleStatusOnWaitlistRemoved={value:r,label:r}),d.visitCancellationServiceCreditSubscriptionPeriodCap&&d.visitCancellationServiceCreditSubscriptionPeriodCapDays&&(d.visitCancellationServiceCreditSubscriptionCapPeriod={cap:d.visitCancellationServiceCreditSubscriptionPeriodCap,days:d.visitCancellationServiceCreditSubscriptionPeriodCapDays},delete d.visitCancellationServiceCreditSubscriptionPeriodCap,delete d.visitCancellationServiceCreditSubscriptionPeriodCapDays),d.trackConversionTo&&(d.trackConversionTo=d.trackConversionTo.map(e=>({id:e.id,name:e.name}))),d.autoHoldService&&(d.autoHoldService={id:d.autoHoldService.id,name:d.autoHoldService.name}),d.plans&&(d.plans=(d.plans||[]).map(e=>{var t=(0,l._)({},e);return["clientLifecycleStatusOnBook","clientLifecycleStatusOnAttended","clientLifecycleStatusOnCancel"].forEach(e=>{t[e]&&(console.log({mapping:e,value:t[e],option:(0,K.hJ)(t[e])}),t[e]=(0,K.hJ)(t[e]))}),t.assignedClientTags=(e.assignedClientTags||[]).map(K.hJ),e.discountPolicy&&(t.householdDiscountType=e.discountPolicy.discountType,t.householdDiscountRate=e.discountPolicy.discountRate,t.householdDiscountTarget=e.discountPolicy.discountTarget,t.includeAccountManagersInHouseholdDiscount="HOUSEHOLD"===e.discountPolicy.subscriptionScope),t})),q({serviceType:e,serviceId:null==t?void 0:t.id}),A({type:"serviceEditor@INIT_FORM_DATA",payload:{formData:en(d,e,W,P),serviceType:e}})}else{if(!g)return void(0,D.lC)();q({serviceType:g,serviceId:null==t?void 0:t.id}),A({type:"serviceEditor@INIT_FORM_DATA_AND_SCHEMA",payload:{formData:en({},e=g,W,P),schema:T.w,uiSchema:T.o,serviceType:e}})}},[t,A,g,i]),s||!f||!m)return(0,o.jsx)(N.A,{});var B=(e=>{var{schema:t,formData:i={},serviceType:a,isUpdateForm:l,business:n}=e;if(!t)return null;var s=b()(t),o=el[i.visitCancellationConsequence]||el.DEFAULT,r=el[i.lateVisitCancellationConsequence]||el.DEFAULT,d=el[i.staffVisitCancellationConsequence]||el.DEFAULT;n.smsFeatureEnabled||(delete s.properties.smsNotificationPeriodHours,delete s.properties.smsReminderTemplate),n.lessonMateFeatureEnabled?n.videoRecordingRequestEnabled&&s.properties.disableLessonMateRequest&&(s.properties.disableLessonMateRequest.title="Disable ability for clients to request a video recorded lesson",s.properties.disableLessonMateRequest.subtitle="If disabled, clients will not see the Request Recorded Lesson button. Staff can still set Recorded Lesson attendance status."):delete s.properties.disableLessonMateRequest,l||delete s.properties.termsAndConditions,i.advancedSettings?void 0!==s.properties.advancedSettings&&(s.properties.selfBookingAvailabilityMode=t.properties.selfBookingAvailabilityMode,s.properties.weeklyCheckShortTermToleranceThresholdDays=t.properties.weeklyCheckShortTermToleranceThresholdDays,s.properties.weeklyCheckLongTermToleranceThresholdMaxCount=t.properties.weeklyCheckLongTermToleranceThresholdMaxCount,s.properties.weeklyCheckShortTermToleranceThresholdMaxCount=t.properties.weeklyCheckShortTermToleranceThresholdMaxCount,s.properties.slotStartSnap=t.properties.slotStartSnap):(delete s.properties.selfBookingAvailabilityMode,delete s.properties.weeklyCheckShortTermToleranceThresholdDays,delete s.properties.weeklyCheckLongTermToleranceThresholdMaxCount,delete s.properties.weeklyCheckShortTermToleranceThresholdMaxCount,delete s.properties.slotStartSnap),a!==x.Yc&&(delete s.properties.clientLifecycleStatusOnBook,delete s.properties.clientLifecycleStatusOnAttended,delete s.properties.clientLifecycleStatusOnCancel,delete s.properties.weeklyCheckShortTermToleranceThresholdDays,delete s.properties.weeklyCheckShortTermToleranceThresholdMaxCount,delete s.properties.weeklyCheckLongTermToleranceThresholdMaxCount,delete s.properties.trackConversionTo,delete s.properties.autoHold,delete s.properties.autoHoldDays,delete s.properties.autoHoldService,delete s.properties.automateConversion,delete s.properties.automateConversionEmail,delete s.properties.alternativeBookingLink,delete s.properties.advancedSettings,delete s.properties.selfBookingAvailabilityMode,delete s.properties.sendFollowUpEmail,delete s.properties.followUpEmail,delete s.properties.restrictCreditUsageWithStaff,delete s.properties.selfBookingClientNoteRequired,delete s.properties.selfBookingClientNotePlaceholder),i.automateConversion||i.sendFollowUpEmail||delete s.properties.alternativeBookingLink,[x.fW,x.Yc].includes(a)||(delete s.properties.priority,delete s.properties.allowStaffToClientCancelUnpaid,delete s.properties.allowClientToSelfCancelUnpaid,delete s.properties.creditOnlyValidOncePaid),[x.fW].includes(a)?(delete s.properties.slotIntervalMinutes,delete s.properties.slotStartSnap,delete s.properties.scheduleOptimizationStrategy,delete s.properties.enforceScheduleOptimizationForSelfBooking,delete s.properties.maxSchedulingGapMinutes,delete s.properties.disableLessonMateRequest,s.required.includes("slotIntervalMinutes")&&s.required.splice(s.required.indexOf("slotIntervalMinutes"),1),s.required.includes("slotStartSnap")&&s.required.splice(s.required.indexOf("slotStartSnap"),1)):a===x.Yc&&
1(delete s.properties.maximumWaitlistClients,delete s.properties.requiresPaymentMethodForWaitlist,delete s.properties.waitlistPolicy,delete s.properties.clientLifecycleStatusOnWaitlistAdded,delete s.properties.clientLifecycleStatusOnWaitlistRemoved,delete s.properties.sessionEndEmail,delete s.properties.sendSessionEndEmail,i.scheduleOptimizationStrategy===O.bw&&(delete s.properties.enforceScheduleOptimizationForSelfBooking,delete s.properties.maxSchedulingGapMinutes)),a!==x.fW&&delete s.properties.enrollmentWindowGracePeriodDays,a===x.ll&&(delete s.properties.hasSessions,delete s.properties.requiresBooking,delete s.properties.allowsJoinOnline,delete s.properties.scheduleOptimizationStrategy,delete s.properties.enforceScheduleOptimizationForSelfBooking,delete s.properties.maxSchedulingGapMinutes,delete s.properties.lateCancellationType,delete s.properties.cancellationWindowHours,delete s.properties.lateCancellationCriteria,delete s.properties.visitCancellationConsequence,delete s.properties.visitCancellationCashCredit,delete s.properties.visitCancellationServiceCreditName,delete s.properties.visitCancellationServiceCreditService,delete s.properties.visitCancellationServiceCreditSubscriptionCap,delete s.properties.visitCancellationServiceCreditValidityDays,delete s.properties.visitCancellationServiceCreditSubscriptionCapPeriod,delete s.properties.lateVisitCancellationConsequence,delete s.properties.lateVisitCancellationCashCredit,delete s.properties.lateVisitCancellationServiceCreditName,delete s.properties.lateVisitCancellationServiceCreditService,delete s.properties.lateVisitCancellationServiceCreditSubscriptionCap,delete s.properties.lateVisitCancellationServiceCreditValidityDays,delete s.properties.staffVisitCancellationConsequence,delete s.properties.staffVisitCancellationCashCredit,delete s.properties.staffVisitCancellationServiceCreditName,delete s.properties.staffVisitCancellationServiceCreditService,delete s.properties.staffVisitCancellationServiceCreditValidityDays,delete s.properties.cancellationPolicy,delete s.properties.disableSelfCancellation,delete s.properties.disableUseCredits,delete s.properties.sessionEndEmail,delete s.properties.sendSessionEndEmail,delete s.properties.cancellationEmail,delete s.properties.visibleByVisitors,delete s.properties.visibleByClients,delete s.properties.durationMinutes,delete s.properties.slotIntervalMinutes,delete s.properties.slotStartSnap,delete s.properties.enrollmentWindowNotBeforeMinutes,delete s.properties.enrollmentWindowNotAfterMinutes,delete s.properties.visitCancellationConsequence,delete s.properties.lateVisitCancellationConsequence,delete s.properties.staffVisitCancellationConsequence,delete s.properties.maximumClients,delete s.properties.maximumWaitlistClients,delete s.properties.requiresPaymentMethodForWaitlist,delete s.properties.waitlistPolicy,delete s.properties.clientLifecycleStatusOnWaitlistAdded,delete s.properties.clientLifecycleStatusOnWaitlistRemoved,delete s.properties.notAfterAgeMonths,delete s.properties.notBeforeAgeMonths,delete s.properties.enrollmentWindowNotBeforeMinutes,delete s.properties.enrollmentWindowNotAfterMinutes,delete s.properties.visitCancellationConsequence,delete s.properties.lateVisitCancellationConsequence,delete s.properties.staffVisitCancellationConsequence,delete s.properties.maximumClients,delete s.properties.notAfterAgeMonths,delete s.properties.notBeforeAgeMonths,delete s.properties.enrollmentWindowGracePeriodDays,delete s.properties.visibleByVisitors,delete s.properties.visibleByClients,delete s.properties.shouldRemindCreditUsage,delete s.properties.shouldRemindCreditUsageDays,delete s.properties.usageCreditReminderTemplate,delete s.properties.usageCreditReminderSmsTemplate,delete s.properties.shouldRemindCreditUsageIntervalDays,delete s.properties.shouldRemindCreditUsageExpirationBeforeDays),a===x.je?(delete s.properties.durationMinutes,delete s.properties.slotIntervalMinutes,delete s.properties.slotStartSnap,delete s.properties.enrollmentWindowNotBeforeMinutes,delete s.properties.enrollmentWindowNotAfterMinutes,delete s.properties.visit
1CancellationConsequence,delete s.properties.lateVisitCancellationConsequence,delete s.properties.staffVisitCancellationConsequence,delete s.properties.maximumClients,delete s.properties.maximumWaitlistClients,delete s.properties.requiresPaymentMethodForWaitlist,delete s.properties.waitlistPolicy,delete s.properties.clientLifecycleStatusOnWaitlistAdded,delete s.properties.clientLifecycleStatusOnWaitlistRemoved,delete s.properties.notAfterAgeMonths,delete s.properties.notBeforeAgeMonths,delete s.properties.notificationPeriodHours,delete s.properties.reminderEmail,delete s.properties.sessionEndEmail,delete s.properties.sendSessionEndEmail,delete s.properties.cancellationEmail,delete s.properties.lateCancellationType,delete s.properties.cancellationWindowHours,delete s.properties.lateCancellationCriteria,delete s.properties.cancellationPolicy,delete s.properties.disableSelfCancellation,delete s.properties.disableUseCredits,delete s.properties.smsNotificationPeriodHours,delete s.properties.sendFollowUpEmail,delete s.properties.followUpEmail,delete s.properties.hasSe
1ssions,delete s.properties.allowsJoinOnline,delete s.properties.calendarColor,delete s.properties.setupDurationMinutes,delete s.properties.cleanupDurationMinutes,delete s.properties.scheduleOptimizationStrategy,delete s.properties.enforceScheduleOptimizationForSelfBooking,delete s.properties.maxSchedulingGapMinutes,delete s.properties.visibleByVisitors,delete s.properties.visibleByClients,delete s.properties.spotlight,delete s.properties.shouldRemindCreditUsage,delete s.properties.shouldRemindCreditUsageDays,delete s.properties.usageCreditReminderTemplate,delete s.properties.usageCreditReminderSmsTemplate,delete s.properties.shouldRemindCreditUsageIntervalDays,delete s.properties.shouldRemindCreditUsageExpirationBeforeDays,s.required.includes("durationMinutes")&&s.required.splice(s.required.indexOf("durationMinutes"),1),s.required.includes("slotIntervalMinutes")&&s.required.splice(s.required.indexOf("slotIntervalMinutes"),1),s.required.includes("slotStartSnap")&&s.required.splice(s.required.indexOf("slotStartSnap"),1),s.required.includes("calendarColor")&&s.required.splice(s.required.indexOf("calendarColor"),1),s.properties.plans&&(delete s.properties.plans.items.properties.onlyPayableWithCredit,delete s.properties.plans.items.properties.visits,delete s.properties.plans.items.properties.visitInterval),s.title=l?"":"New subscription only based service (e.g. Rental / Fees)"):a===x.Yc?s.title=l?"":"New appointment based service (e.g. Private Lessons)":a===x.fW?s.title=l?"":"New Group Class service (e.g. Group Lessons)":a===x.ll?s.title=l?"":"New event based service (e.g. Recital / Performing Events)":a===x.je&&(s.title=l?"":"New subscription only based service (e.g. Rental / Fees)"),[x.Yc,x.fW,x.je,x.ll].includes(a)&&(delete s.properties.requiresBooking,delete s.properties.hasSe
1ssions);for(var c=0;c<o.length;c+=1){var u=o[c];u in s.properties&&delete s.properties[u]}for(var p=0;p<r.length;p+=1){var m="late".concat(r[p].charAt(0).toUpperCase()).concat(r[p].slice(1));m in s.properties&&delete s.properties[m]}for(var f=0;f<d.length;f+=1){var h="staff".concat(d[f].charAt(0).toUpperCase()).concat(d[f].slice(1));h in s.properties&&delete s.properties[h]}return"VISIT_CANCELLATION_INVOICE_UPDATE"!==i.staffVisitCancellationConsequence&&s.properties.staffVisitCancellationAutoApplyCreditToOpenInvoice&&delete s.properties.staffVisitCancellationAutoApplyCreditToOpenInvoice,"VISIT_CANCELLATION_INVOICE_UPDATE"===i.staffVisitCancellationConsequence&&s.properties.staffVisitCancellationConsequence&&(s.properties.staffVisitCancellationConsequence.subtitle="For per-visit billing plans:            Currently matching and open subscription invoices will be recalculated. If the invoice is already closed, a monetary credit will be issued to the payer instead (if an amount is speficied).            For other plans:            A monetary credit will be issued to the subscription payer (if an amount is specified)"),"VISIT_CANCELLATION_SERVICE_CREDIT"===i.visitCancellationConsequence&&s.properties.visitCancellationConsequence&&(a===x.Yc&&(s.properties.visitCancellationConsequence.subtitle="The appointment will be cancelled, all parties notified and a credit will be issued to the client automatically"),a===x.fW&&(s.properties.visitCancellationConsequence.subtitle='The client will be marked as "No-Show" ahead of time, and a credit will be issued to the client automatically (applies to self-cancellation only)')),i.deactivated&&(delete s.properties.visibleByClients,delete s.properties.visibleByVisitors),i.autoHold||(delete s.properties.autoHoldDays,delete s.properties.autoHoldService),i.shouldRemindCreditUsage||(delete s.properties.shouldRemindCreditUsageExpirationBeforeDays,delete s.properties.shouldRemindCreditUsageIntervalDays),i.visitCancellationServiceCreditValidityDays||delete s.properties.visitCancellationServiceCreditValidityFromOriginalDate,i.lateVisitCancellationServiceCreditValidityDays||delete s.properties.lateVisitCancellationServiceCreditValidityFromOriginalDate,(null==i?void 0:i.lateCancellationType)===O.eu?delete s.properties.lateCancellationCriteria:(null==i?void 0:i.lateCancellationType)===O.Pv?delete s.properties.cancellationWindowHours:(null==i?void 0:i.lateCancellationType)===O.By&&(delete s.properties.lateCancellationCriteria,delete s.properties.cancellationWindowHours),s})({schema:m,formData:f,serviceType:g,isUpdateForm:i,business:W}),F=es(y,{defaultCurrency:p,isUpdateForm:i});return(0,o.jsx)(C(),{liveValidate:!0,id:"service-form",idPrefix:"form",schema:B,uiSchema:F,formData:f,showErrorList:!1,onChange:e=>{var t,i;j(!!(null==e||null==(t=e.formData)?void 0:t.advancedSettings)),A({type:"serviceEditor@SET_FORM_DATA",payload:{formData:en(e.formData,g,W,!!(null==e||null==(i=e.formData)?void 0:i.advancedSettings))}})},onSubmit:()=>(0,a._)(function*(){var e=b()((0,n._)((0,l._)({},f),{name:f.name.trim()}));if(_(!0),i)try{var t=eo(v,{business:u},g),a=eo(e,{business:u},g),s={variables:(0,E.H)(t.variables,a.variables,["business","id"])};s.variables.plans&&(s.update=(e,t)=>{var i,a;if((null==t||null==(a=t.data)||null==(i=a.updateService)?void 0:i.status)==="ok"){var l="Service:".concat(s.variables.id);e.evict({id:l,field:"plans",args:{}}),e.evict({id:l,field:"plans",args:{convertPreEnrollment:!0}}),e.evict({id:l,field:"plans",args:{convertPreEnrollment:!1}}),e.gc()}});var o=yield d(s);if("error"===o.data.updateService.status)throw Error(o.data.updateService.error);(0,V.me)({htmlId:"serviceUpdated",status:"info",title:"Service updated",dismissable:!0}),A({type:"serviceEditor@DONE_EDITING"})}catch(e){(0,V.UG)({title:"Error updating service",message:e.message}),e.message="error updating service: ".concat(e.message),(0,w.Fk)(e)}finally{_(!1)}else try{var r=eo(e,{business:u},g),p=yield c(r);if("error"===p.data.createService.status)throw Error(p.data.createService.error);(0,V.me)({htmlId:"serviceCreated",status:"info",title:"Service created",dismissable:!0}
1),_(!1),A({type:"serviceEditor@DONE_EDITING"}),(0,D.lC)()}catch(e){(0,V.UG)({title:"Error creating service",message:e.message||"There was a problem creating the service."}),e.message="error creating service: ".concat(e.message),(0,w.Fk)(e),_(!1)}})(),onError:er,validate:(e,t)=>{if(B.properties.enrollmentWindowNotBeforeMinutes&&B.properties.enrollmentWindowNotAfterMinutes){var i,a=e.enrollmentWindowNotBeforeMinutes,l=(0,M.HD)(a.days,a.hours),n=e.enrollmentWindowNotAfterMinutes,s=(0,M.HD)(n.days,n.hours);s>0&&l>0&&l>=s&&t.enrollmentWindowNotBeforeMinutes.addError("Minimum limit cannot be greater or equal than maximum limit")}if(B.properties.selfBookingClientNotePlaceholder){var o=(0,w.fP)({content:e.selfBookingClientNotePlaceholder,allowedMergeTags:["participant_name"],strictMatch:!0});o.length>0&&t.selfBookingClientNotePlaceholder.addError("The following placeholders are not valid: ".concat(o.join(", ")))}if(B.properties.autoHold&&B.properties.autoHoldService&&e.autoHold&&(!e.autoHoldService||S()(e.autoHoldService))&&t.autoHoldService.addError("Auto hold service is required"),B.properties.lateCancellationType&&e.lateCancellationType===O.Pv)if(null==(i=e.lateCancellationCriteria)?void 0:i.length){var r=new Set,d=[];e.lateCancellationCriteria.forEach((e,i)=>{var a,l;(null==e||null==(a=e.days)?void 0:a.length)||t.lateCancellationCriteria[i].addError("Day of week is required"),(null==e?void 0:e.timeOfDay)||t.lateCancellationCriteria[i].addError("Time is required"),null==e||null==(l=e.days)||l.forEach(e=>{r.has(e)?d.push(e):r.add(e)}),d.length>0&&t.lateCancellationCriteria[i].addError("Duplicate day of the week: ".concat(d.join(", ").toUpperCase()))})}else t.lateCancellationCriteria.addError("At least 1 criteria is required");return e.shouldRemindCreditUsage&&(e.shouldRemindCreditUsageIntervalDays&&e.shouldRemindCreditUsageExpirationBeforeDays&&e.shouldRemindCreditUsageIntervalDays>=e.shouldRemindCreditUsageExpirationBeforeDays&&t.shouldRemindCreditUsageIntervalDays.addError("Interval must be less than expiration days"),e.shouldRemindCreditUsageIntervalDays||e.shouldRemindCreditUsageExpirationBeforeDays||t.shouldRemindCreditUsage.addError("Interval or expiration days is required")),e.visitCancellationServiceCreditValidityFromOriginalDate&&(!e.visitCancellationServiceCreditValidityDays||e.visitCancellationServiceCreditValidityDays<1)&&t.visitCancellationServiceCreditValidityFromOriginalDate.addError("To use this option, enable regular cancellation validity and enter at least 1 day."),e.lateVisitCancellationServiceCreditValidityFromOriginalDate&&(!e.lateVisitCancellationServiceCreditValidityDays||e.lateVisitCancellationServiceCreditValidityDays<1)&&t.lateVisitCancellationServiceCreditValidityFromOriginalDate.addError("To use this option, enable late cancellation validity and enter at least 1 day."),t},formContext:L,ArrayFieldTemplate:$.A,children:(0,o.jsxs)(et,{children:[(0,o.jsx)(ei,{className:"btn btn-rounded btn-secondary btn-icon",type:"button",id:"go-back",onClick:()=>{A({type:"serviceEditor@DONE_EDITING"}),i||(0,D.lC)()},children:"Go Back"}),(0,o.jsxs)(ea,{className:"btn btn-primary rounded btn-icon center",type:"submit",id:"submit-service",disabled:s||R,loading:R,onMouseDown:e=>e.preventDefault(),children:[(0,o.jsx)("i",{className:"fal fa-gear"}),"".concat(i?"Update":"Create"," Service")]})]})})};ed.defaultProps={serviceData:void 0,isUpdateForm:!1,isLoading:!1},ed.propTypes={serviceData:c().object,isUpdateForm:c().bool,isLoading:c().bool,updateService:c().func.isRequired,createService:c().func.isRequired,business:c().string.isRequired};var ec=m()((0,h.connect)(e=>({business:e.app.business.name,defaultCurrency:e.app.business.defaultCurrency})),(0,f.U)(A.cf,{name:"updateService",options:{update:(e,t)=>{var{data:{updateService:i}}=t;(null==i?void 0:i.status)==="ok"&&(e.evict({id:"ROOT_QUERY",fieldName:"paginatedActivities"}),e.gc())}}}),(0,f.U)(A.Pf,{props:e=>{var{mutate:t}=e;return{createService:e=>t({variables:(0,l._)({},e.variables),update:(e,t)=>{var{data:{createService:i}}=t;try{if(i.error)return;e.evict({id:"ROOT_QUERY",fieldName:"services"}),e.evict({id:"ROOT_QUERY",fieldName:"businessProgress"}),e.gc()}catch(e){throw e.message="failed to update cache: ".concat(e.message),(0,w.Fk)(e),e}}})}}}))(ed)},18398:function(e,t,i){i.d(t,{P:function(){return w},A:function(){return A}});var a=i(71893),l=i(55456),n=i(84577);i(45336),i(91625),i(93632);var s=i(78258),o=i(95093),r=i.n(o),d=i(93229),c=i(44123),u=i(486);i(96540);var p=i(11205),m=i(17378),f=i(35368),h=i(53894);function v(){var e=(0,n._)(["\n    font-size: 12px;\n\n    "," {\n        margin-right: 0px;\n    }\n"]);return v=function(){return e},e}function C(){var e=(0,n._)(["\n    display: flex;\n    flex-direction: row;
1\n    align-items: center;\n    width: 100%;\n    overflow: hidden;\n\n    .option-icon {\n        margin-right: 4px;\n    }\n\n    .option-body {\n        flex-grow: 1;\n        font-size: 14px;\n        font-weight: inherit;\n        line-height: inherit;\n        color: inherit;\n\n        span {\n            overflow: hidden;\n            text-overflow: ellipsis;\n        }\n\n        span.name {\n            font-weight: 500;\n            line-height: 1rem;\n        }\n\n        span.number {\n            font-size: 10px;\n            line-height: 1rem;\n            /* line-height: 15px; */\n        }\n    }\n"]);return C=function(){return e},e}var y=(0,m.Ay)(f.A)(v(),f.A.styled.Icon),b=m.Ay.div(C());function g(){var e=(0,n._)(["\n    query termsAndConditionsRevisionsForApolloSelect(\n        $business: ID!\n        $policyId: ID\n        $statuses: [String]\n    ) {\n        termsAndConditionsRevisions(\n            business: $business\n            policyId: $policyId\n            statuses: $statuses\n        ) {\n            id\n            name\n            tags\n            status\n            createdAt\n            publishedAt\n            serviceCount\n            subscriptionCount\n            subscriptionPendingCount\n            subscriptionAcceptedCount\n        }\n    }\n"]);return g=function(){return e},e}var S=(0,s.J1)(g()),w={container:e=>(0,l._)((0,a._)({},e),{width:"100%"}),control:e=>(0,l._)((0,a._)({},e),{borderTopLeftRadius:"0px",borderBottomLeftRadius:"0px",borderTopRightRadius:"11px",borderBottomRightRadius:"11px"}),valueContainer:e=>(0,l._)((0,a._)({},e),{minHeight:"46px"}),menu:e=>(0,l._)((0,a._)({},e),{zIndex:10})},A=(0,d.A)({defaultVariables:{},query:S,dataLabel:"termsAndConditionsRevisions",customGetOptions:(e,t)=>{var i;return(null==t?void 0:t.currentRevision)?!(null==(i=null==t?void 0:t.canChangeRevision)||i)&&(null==t?void 0:t.currentRevision)?[t.currentRevision]:e.find(e=>e.id===t.currentRevision.id)?e:[...e,t.currentRevision]:e},selectProps:{instanceId:c.RM,styles:w,getOptionLabel:e=>"".concat(e.name," (published ").concat(r()(e.publishedAt||null).format("LLL"),")"),getOptionValue:e=>e.id,components:{Option:u.A,SingleValue:e=>{var{className:t,cx:i,getStyles:l,isDisabled:n,innerProps:s,data:o}=e,r=(0,h.A)();return(0,p.Y)("div",(0,a._)({css:l("singleValue",e),className:i({"single-value":!0,"single-value--is-disabled":n},"".concat(t," d-flex flex-row align-items-center"))},s),(0,p.Y)(b,{className:"policy-version-option"},(0,p.Y)("div",{className:"option-body d-flex flex-column"},(0,p.Y)("div",{className:"d-flex flex-row"},(0,p.Y)(y,{className:"option-icon",revision:o}),(0,p.Y)("span",{className:"name"},o.name)),(0,p.Y)("span",{className:"number"},"published"," ",r(o.publishedAt||null).format("LLL")))))}},cacheOptions:!1,sort:!1}})},26999:function(e,t,i){var a=i(50467),l=i(71893),n=i(55456),s=i(84577),o=i(74848),r=i(96540),d=i(5556),c=i.n(d);function u(){var e=(0,s._)(["\n    display: flex;\n    flex-direction: row;\n    align-items: center;\n    padding-right: 10px;\n    input {\n        width: 65px;\n    }\n    span {\n        margin-left: 10px;\n        padding-right: 5px;\n    }\n"]);return u=function(){return e},e}var p=i(17378).Ay.div(u());function m(e,t){return 12*(e||0)+(t||0)}class f extends r.Component{UNSAFE_componentWillReceiveProps(e){this.setStateMonths(e.formData)}render(){return(0,o.jsxs)("div",{className:"",children:[(0,o.jsxs)("div",{className:"pb-2",children:[this.props.schema.title,this.props.required&&"*"]}),(0,o.jsxs)("div",{className:"d-flex flex-row align-items-center",children:[(0,o.jsxs)(p,{children:[(0,o.jsx)("input",{id:this.props.uiSchema["ui:options"].idYears,className:"form-control",placeholder:"Years",type:"number",value:this.state.years,onChange:this.handleYearsChange,disabled:this.props.isDisabled}),(0,o.jsx)("span",{children:"Years"})]}),(0,o.jsxs)(p,{children:[(0,o.jsx)("input",{id:this.props.uiSchema["ui:options"].idMonths,className:"form-control",placeholder:"Months",type:"number",value:this.state.months,onChange:this.handleMonthsChange,disabled:this.props.isDisabled}),(0,o.jsx)("span",{children:"Months"})]})]})]})}constructor(e){super(e),(0,a._)(this,"setStateMonths",e=>{var t=Math.floor((e||0)/12),i=e||0;i%=12,this.setState({years:t,months:i})}),(0,a._)(this,"handleYearsChange",e=>{var{onChange:t}=this.props,{months:i}=this.state,a=Number(e.target.value);a<0||(this.setState(e=>(0>m(a,i)&&(a=e.years),(0,n._)((0,l._)({},e),{years:a}))),t(m(a,i)))}),(0,a._)(this,"handleMonthsChange",e=>{var{onChange:t}=this.props,{years:i}=this.state,a=Number(e.target.value);a>11?a=11:a<0&&(a=0),this.setState(e=>(0>m(i,a)&&(a=e.months),(0,n._)((0,l._)({},e),{months:a}))),t(m(i,a))});var{formData:t}=e;this.state={years:0,months:0},this.state.years=Math.floor((t||0)/12),this.state.months=t||0,this.state.months%=12}}f.defaultProps={formData:0}
1,f.propTypes={formData:c().number,onChange:c().func.isRequired},t.A=f},53857:function(e,t,i){var a=i(84577);i(45336),i(23446);var l=i(74848);i(96540);var n=i(5556),s=i.n(n),o=i(17378),r=i(20615),d=i(92739),c=i(60469),u=i(70537),p=i(65356);function m(){var e=(0,a._)(["\n        flex-wrap: wrap;\n    "]);return m=function(){return e},e}function f(){var e=(0,a._)(["\n    display: flex;\n    align-items: center;\n\n    ",";\n"]);return f=function(){return e},e}function h(){var e=(0,a._)(["\n        flex-grow: 1;\n    "]);return h=function(){return e},e}function v(){var e=(0,a._)(["\n        width: ",";\n    "]);return v=function(){return e},e}function C(){var e=(0,a._)(["\n    ","\n    ","\n"]);return C=function(){return e},e}function y(){var e=(0,a._)(["\n    padding: auto;\n\n    &:last-child > i {\n        margin: 0px !important;\n    }\n"]);return y=function(){return e},e}function b(){var e=(0,a._)(["\n    ",";\n"]);return b=function(){return e},e}function g(){var e=(0,a._)(["\n    height: fit-content;\n    margin-top: 2px;\n    margin-left: 20px;\n\n    ",";\n"]);return g=function(){return e},e}function S(){var e=(0,a._)(["\n    :not(:last-child) {\n        margin-bottom: 0.5rem;\n    }\n"]);return S=function(){return e},e}var w=o.Ay.div(f(),r.$_.tabletSm(m())),A=o.Ay.div(C(),e=>(0,r.wb)(e.fillWidth)(h()),e=>(0,r.wb)(e.setWidth)(v(),e.setWidth)),T=(0,o.Ay)(u.A)(y()),N=(0,o.Ay)(c.A)(g(),r.$_.tabletSm(b(),e=>"Staff Categorized Tags"===e.name&&"margin-top: -8px; \n        margin-left: unset;\n        margin-bottom: 17px;")),x=(0,o.Ay)(c.A)(S()),k=e=>{var{title:t,schema:i,uiSchema:a,items:n,required:s,canAdd:o,onAddClick:r,disabled:c}=e,{hideTitle:m=!1,orderable:f=!1,fillWidth:h=!1,setWidth:v,addButtonLabel:C="Add",addButtonIcon:y,addButtonIconClass:b,deleteButtonLabel:g="Delete",deleteButtonClass:S,deleteButtonIcon:k,deleteButtonIconClass:V,deleteButtonId:D=""}=a["ui:options"]||{};return(0,l.jsxs)("div",{className:"mb-2",children:[!m&&(0,l.jsxs)("div",{name:t,className:"pb-2",children:[i.title," ",s&&"*"]}),n.map(e=>{var{index:i,hasMoveUp:a,hasMoveDown:n,onReorderClick:s}=e;return(0,l.jsxs)(w,{children:[(0,l.jsx)(A,{name:t,fillWidth:h,setWidth:v,children:e.children}),f&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(N,{name:t,type:"button",className:"btn btn-rounded btn-primary btn-icon btn-sm",disabled:!(!c&&a),onClick:e=>s(i,i-1)(e),onMouseDown:e=>e.preventDefault(),children:(0,l.jsx)(T,{farIcon:"arrow-up"})}),(0,l.jsx)(N,{name:t,type:"button",className:"btn btn-rounded btn-primary btn-icon btn-sm",disabled:!(!c&&n),onClick:e=>s(i,i+1)(e),onMouseDown:e=>e.preventDefault(),children:(0,l.jsx)(T,{farIcon:"arrow-down"})})]}),!c&&(0,l.jsxs)(N,{name:t,id:"".concat(D||"del-btn","-").concat(i),type:"button",className:"btn btn-rounded btn-primary btn-icon btn-sm ".concat(S),onClick:e.onDropIndexClick(e.index),onMouseDown:e=>e.preventDefault(),children:[(0,l.jsx)(u.A,{farIcon:k,iconClass:V}),g]}),(0,l.jsx)("hr",{})]},t+i)}),o&&!c&&(0,l.jsxs)(x,{onMouseDown:e=>e.preventDefault(),isEmpty:0===n.length,className:"btn btn-rounded btn-primary btn-icon btn-sm",type:"button",onClick:r,id:"btn-".concat((0,d.io)(C)),children:[(0,l.jsx)(u.A,{farIcon:y,iconClass:b}),C]}),i.subtitle&&(0,l.jsx)(p.A,{children:i.subtitle})]})};k.propTypes={required:s().bool.isRequired,title:s().string.isRequired,uiSchema:s().object.isRequired,schema:s().object.isRequired,disabled:s().bool.isRequired,items:s().arrayOf(Object).isRequired,canAdd:s().bool.isRequired,onAddClick:s().func.isRequired},t.A=k},59334:function(e,t,i){var a=i(96540);t.A=()=>{(0,a.useEffect)(()=>{var e=e=>{13===e.keyCode&&e.preventDefault()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[])}},68618:function(e,t,i){i.d(t,{H:function(){return o}});var a=i(71893),l=i(2404),n=i.n(l),s=i(16517);function o(e,t,i){if(!e)return t;for(var l=(0,a._)({},t),o=Object.keys(e),r=0;r<o.length;r+=1)!(i&&i.includes(o[r]))&&n()(e[o[r]],t[o[r]])?delete l[o[r]]:void 0===t[o[r]]&&"string"==typeof e[o[r]]&&(l[o[r]]=s.M_);return l}}}]);
2//# sourceMappingURL=22540.d8fd3f09.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.