{"version":3,"sources":["webpack:///./src/graphql/queries.js","webpack:///./node_modules/moment-timezone/moment-timezone.js","webpack:///./node_modules/moment-timezone/index.js","webpack:///./src/classes/PreQuestions.js","webpack:///./src/classes/Booking.js"],"names":["getEventLocationLookup","getEventCompany","listEventCompanys","getEvent","getEventLocation","getEventSlotGroup","getEventCommsTemplate","listEventCommsTemplates","getEventClientAccess","root","factory","module","exports","this","moment","undefined","version","default","cachedGuess","VERSION","zones","links","countries","names","guesses","logError","momentVersion","split","major","minor","charCodeToInt","charCode","unpackBase60","string","num","i","parts","whole","fractional","multiplier","out","sign","charCodeAt","length","arrayToInt","array","intToUntil","Math","round","Infinity","mapIndices","source","indices","unpack","data","offsets","untils","name","abbrs","population","Zone","packedString","_set","Country","country_name","zone_names","OffsetAt","at","timeString","toTimeString","abbr","match","join","offset","getTimezoneOffset","ZoneScore","zone","offsetScore","abbrScore","findChange","low","high","mid","diff","Date","userOffsets","change","next","startYear","getFullYear","last","push","sortZoneScores","a","b","localeCompare","addToGuesses","guessesForUserOffsets","j","guessesOffset","offsetsLength","filteredGuesses","hasOwnProperty","rebuildGuess","intlName","Intl","DateTimeFormat","resolvedOptions","timeZone","normalizeName","e","zoneScore","zoneScores","getZone","scoreOffsetAt","sort","guess","ignoreCache","toLowerCase","replace","addZone","packed","normalized","caller","link","getNames","getCountryNames","Object","keys","addLink","aliases","alias","normal0","normal1","addCountries","country_code","country_zones","toUpperCase","getCountry","zonesForCountry","country","with_offset","map","zone_name","utcOffset","loadData","tz","dataVersion","zoneExists","didShowError","needsOffset","m","isUnixTimestamp","_f","_a","_tzm","message","console","error","input","args","Array","prototype","slice","call","arguments","utc","apply","isMoment","add","parse","unpacked","_index","timestamp","target","filter","indexOf","offsetNext","offsetPrev","max","moveAmbiguousForward","moveInvalidForward","mom","offsetAt","abs","_zones","_links","_names","_countries","load","fn","abbrWrap","old","_z","resetZoneWrap","resetZoneWrap2","defaultZone","updateOffset","keepTime","_isUTC","_d","z","Error","zoneName","zoneAbbr","local","setDefault","momentProperties","toString","fluQuestions","title","questions","id","question","validation","options","option","success","covidQuestions","disclaimer","Booking","_classCallCheck","_createClass","key","value","_getEvent","_asyncToGenerator","regeneratorRuntime","mark","_callee","code","date","eventByCode","eventObj","valid","wrap","_context","prev","subtract","concat","toISOString","API","graphql","query","variables","status","eq","isDeleted","authMode","sent","items","event","eventLocation","location","eventSlotGroup","abrupt","stop","_x","_getEventWithAllBookings","_callee2","_context2","getEventWithAllBookings","_x2","_getEventById","_callee3","_yield$API$graphql","events","_context3","graphqlOperation","getEventById","_x3","_checkAvailability","_callee4","availability","_yield$API$graphql2","getRegisterInterestEvent","_context4","registerInterest","notifyRegisterInterest","forEach","slotGroup","eventSlot","slot","type","eventBooking","booked","capacity","window","checkAvailability","_x4","customFields","preQuestionTemplate","step","steps","active","template","PreQuestions","preQuestions","field","questionType","premilinary","slots","contactdetails","preassessment","_createBookingWorkshop","_callee5","_ref","firstname","lastname","email","mobile","dob","customData","startTime","eventBookingEventSlotId","processBookingWorkshopQL","bookingResult","processBookingWorkshop","eventCompany","booking","_context5","trim","JSON","stringify","t0","log","createBookingWorkshop","_x5","_createBooking","_callee6","_ref2","processingBooking","updateEventSlot","processBooking","_context6","createBooking","_x6","_updateBooking","_callee7","_ref3","eventSlotResult","_context7","mutations","updateEventBooking","commsTemplateId","commsTemplate","company","updateBooking","_x7","_sendBookingEmail","_callee8","endTime","templates","attachments","templateAttachments","emailBody","eventDetails","txtMessage","sender","startObj","endObj","body","result","_context8","slotTime","substring","eventCommsTemplateAttachments","attachment","file","emailTemplate","eventDate","format","room","bloodDropStart","bloodDropEnd","urinePotLocation","commsLink","receiver","toAddresses","subject","emailSubject","dst","iCalendar","post","payload","browser","sendBookingEmail","_x8","_sendTextMessage","_callee9","internationalMobile","numbers","_context9","queries","smsTemplate","number","sendTextMessage","_x9","_cancelBooking","_callee10","_ref4","bookingId","slotId","deleteEventBooking","dEventBooking","customersBookedIn","start","end","_context10","origin","time","isDST","cancelBooking","_x10","collectUserDatas","rules","required","v","test","eventCollectUserData","collectUserData","internalUse","validationType","fieldName","label","hint","fieldType","eventCollectUserDataOptions","opts","text","_","orderBy","_searchBookingBySearchField","_callee11","_ref5","searchQuery","nextToken","bookingBySearchField","_yield$API$graphql3","_context11","searchField","searchBookingBySearchField","_x11","_searchBookingByField","_callee12","_ref6","listEventBookings","_yield$API$graphql4","_context12","searchBookingByField","_x12"],"mappings":"kHAAA,kTAGO,IAgCMA,EAAsC,ujBAoEtCC,EAA+B,qzCAqE/BC,EAAiC,ojBA8BjCC,EAAwB,28CAqMxBC,EAAgC,y0CAyVhCC,EAAiC,myCA4UjCC,EAAqC,4hBA6BrCC,EAAuC,qmBAiGvCC,EAAoC,8iB,uBClrCjD;;;;;CAMC,SAAUC,EAAMC,GAChB,aAGkCC,EAAOC,QACxCD,EAAOC,QAAUF,EAAQ,EAAQ,UAEjC,EAAO,CAAC,WAAW,EAAF,EAAS,mEAP5B,CAWEG,GAAM,SAAUC,GACjB,kBAGuBC,IAAnBD,EAAOE,SAAyBF,EAAOG,UAC1CH,EAASA,EAAOG,SASjB,IAMCC,EANGC,EAAU,SACbC,EAAQ,GACRC,EAAQ,GACRC,EAAY,GACZC,EAAQ,GACRC,EAAU,GAGNV,GAAoC,kBAAnBA,EAAOE,SAC5BS,EAAS,gGAGV,IAAIC,EAAgBZ,EAAOE,QAAQW,MAAM,KACxCC,GAASF,EAAc,GACvBG,GAASH,EAAc,GAWxB,SAASI,EAAcC,GACtB,OAAIA,EAAW,GACPA,EAAW,GACRA,EAAW,GACdA,EAAW,GAEZA,EAAW,GAGnB,SAASC,EAAaC,GACrB,IAKCC,EALGC,EAAI,EACPC,EAAQH,EAAON,MAAM,KACrBU,EAAQD,EAAM,GACdE,EAAaF,EAAM,IAAM,GACzBG,EAAa,EAEbC,EAAM,EACNC,EAAO,EASR,IAN6B,KAAzBR,EAAOS,WAAW,KACrBP,EAAI,EACJM,GAAQ,GAIJN,EAAGA,EAAIE,EAAMM,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N,EAAAzN,eAAAC,mBAAAC,MAAA,SAAAwN,EAAAC,GAAA,IAAA9Q,EAAAqQ,EAAAU,EAAAC,EAAArL,EAAA,OAAAvC,mBAAAQ,MAAA,SAAAqN,GAAA,eAAAA,EAAAnN,KAAAmN,EAAAzW,MAAA,OAIa,OADQwF,EAAM8Q,EAAN9Q,OAAQqQ,EAASS,EAATT,UACpCU,EAAiC,gpCAAbE,EAAAzW,KAAA,EAuDhB0J,OAAIC,QAAQ,CACpBC,MAAO2M,EACP1M,UAAW,CACTrE,SACAqQ,UAAWA,KAEb,OAPyB,OAOzBW,EAAAC,EAAAvM,KAP2BiB,EAAMqL,EAAjCzY,KAAQwY,kBAAiBE,EAAAjM,OAAA,SAQpBW,GAAM,wBAAAsL,EAAAhM,UAAA4L,OAAA,SAAAK,EAAAC,GAAA,OAAAP,EAAApR,MAAA,KAAAF,WAAA,OAAA4R,EAlEA,MAkEArO,EAhgDG","file":"js/chunk-0d815493.0d484cc3.js","sourcesContent":["/* eslint-disable */\n// this is an auto generated file. This will be overwritten\n\nexport const isClientPassword = /* GraphQL */ `\n query IsClientPassword($id: ID!, $clientPassword: String!) {\n isClientPassword(id: $id, clientPassword: $clientPassword) {\n id\n expiryDate\n clientPassword\n showPersonal\n description\n createdAt\n updatedAt\n eventCompany {\n id\n name\n createdAt\n logo\n logoFileName\n email\n isDeleted\n eventLocationLookup {\n nextToken\n }\n updatedAt\n event {\n nextToken\n }\n eventClientAccess {\n nextToken\n }\n }\n }\n }\n`;\nexport const getEventLocationLookup = /* GraphQL */ `\n query GetEventLocationLookup($id: ID!) {\n getEventLocationLookup(id: $id) {\n id\n addressLine1\n addressLine2\n town\n postcode\n createdAt\n isDeleted\n updatedAt\n eventCompany {\n id\n name\n createdAt\n logo\n logoFileName\n email\n isDeleted\n eventLocationLookup {\n nextToken\n }\n updatedAt\n event {\n nextToken\n }\n eventClientAccess {\n nextToken\n }\n }\n }\n }\n`;\nexport const listEventLocationLookups = /* GraphQL */ `\n query ListEventLocationLookups(\n $filter: ModelEventLocationLookupFilterInput\n $limit: Int\n $nextToken: String\n ) {\n listEventLocationLookups(\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n ) {\n items {\n id\n addressLine1\n addressLine2\n town\n postcode\n createdAt\n isDeleted\n updatedAt\n eventCompany {\n id\n name\n createdAt\n logo\n logoFileName\n email\n isDeleted\n updatedAt\n }\n }\n nextToken\n }\n }\n`;\nexport const getEventCompany = /* GraphQL */ `\n query GetEventCompany($id: ID!) {\n getEventCompany(id: $id) {\n id\n name\n createdAt\n logo\n logoFileName\n email\n isDeleted\n eventLocationLookup {\n items {\n id\n addressLine1\n addressLine2\n town\n postcode\n createdAt\n isDeleted\n updatedAt\n }\n nextToken\n }\n updatedAt\n event {\n items {\n id\n name\n code\n type\n requireDob\n iCalendar\n attendance\n status\n message\n description\n commsTemplate\n bloodDropStart\n bloodDropEnd\n urinePotLocation\n preQuestionTemplate\n clientPassword\n commsLink\n clientAccess\n registerInterest\n notifyRegisterInterest\n customAppointmentReminder\n reminderTime\n createdAt\n isDeleted\n updatedAt\n }\n nextToken\n }\n eventClientAccess {\n items {\n id\n expiryDate\n clientPassword\n showPersonal\n description\n createdAt\n updatedAt\n }\n nextToken\n }\n }\n }\n`;\nexport const listEventCompanys = /* GraphQL */ `\n query ListEventCompanys(\n $filter: ModelEventCompanyFilterInput\n $limit: Int\n $nextToken: String\n ) {\n listEventCompanys(filter: $filter, limit: $limit, nextToken: $nextToken) {\n items {\n id\n name\n createdAt\n logo\n logoFileName\n email\n isDeleted\n eventLocationLookup {\n nextToken\n }\n updatedAt\n event {\n nextToken\n }\n eventClientAccess {\n nextToken\n }\n }\n nextToken\n }\n }\n`;\nexport const getEvent = /* GraphQL */ `\n query GetEvent($id: ID!) {\n getEvent(id: $id) {\n id\n name\n code\n type\n requireDob\n iCalendar\n attendance\n status\n message\n description\n commsTemplate\n bloodDropStart\n bloodDropEnd\n urinePotLocation\n preQuestionTemplate\n clientPassword\n commsLink\n clientAccess\n registerInterest\n notifyRegisterInterest\n customAppointmentReminder\n reminderTime\n createdAt\n isDeleted\n updatedAt\n eventCompany {\n id\n name\n createdAt\n logo\n logoFileName\n email\n isDeleted\n eventLocationLookup {\n nextToken\n }\n updatedAt\n event {\n nextToken\n }\n eventClientAccess {\n nextToken\n }\n }\n eventLocation {\n items {\n id\n addressLine1\n addressLine2\n town\n postcode\n createdAt\n eventLocationLookupId\n isDeleted\n updatedAt\n }\n nextToken\n }\n eventCollectUserData {\n items {\n id\n label\n questionType\n validation\n fieldType\n internalUse\n createdAt\n success\n error\n hint\n isDeleted\n updatedAt\n }\n nextToken\n }\n }\n }\n`;\nexport const listEvents = /* GraphQL */ `\n query ListEvents(\n $filter: ModelEventFilterInput\n $limit: Int\n $nextToken: String\n ) {\n listEvents(filter: $filter, limit: $limit, nextToken: $nextToken) {\n items {\n id\n name\n code\n type\n requireDob\n iCalendar\n attendance\n status\n message\n description\n commsTemplate\n bloodDropStart\n bloodDropEnd\n urinePotLocation\n preQuestionTemplate\n clientPassword\n commsLink\n clientAccess\n registerInterest\n notifyRegisterInterest\n customAppointmentReminder\n reminderTime\n createdAt\n isDeleted\n updatedAt\n eventCompany {\n id\n name\n createdAt\n logo\n logoFileName\n email\n isDeleted\n updatedAt\n }\n eventLocation {\n nextToken\n }\n eventCollectUserData {\n nextToken\n }\n }\n nextToken\n }\n }\n`;\nexport const eventByCode = /* GraphQL */ `\n query EventByCode(\n $code: String\n $sortDirection: ModelSortDirection\n $filter: ModelEventFilterInput\n $limit: Int\n $nextToken: String\n ) {\n eventByCode(\n code: $code\n sortDirection: $sortDirection\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n ) {\n items {\n id\n name\n code\n type\n requireDob\n iCalendar\n attendance\n status\n message\n description\n commsTemplate\n bloodDropStart\n bloodDropEnd\n urinePotLocation\n preQuestionTemplate\n clientPassword\n commsLink\n clientAccess\n registerInterest\n notifyRegisterInterest\n customAppointmentReminder\n reminderTime\n createdAt\n isDeleted\n updatedAt\n eventCompany {\n id\n name\n createdAt\n logo\n logoFileName\n email\n isDeleted\n updatedAt\n }\n eventLocation {\n nextToken\n }\n eventCollectUserData {\n nextToken\n }\n }\n nextToken\n }\n }\n`;\nexport const getEventLocation = /* GraphQL */ `\n query GetEventLocation($id: ID!) {\n getEventLocation(id: $id) {\n id\n addressLine1\n addressLine2\n town\n postcode\n createdAt\n eventLocationLookupId\n isDeleted\n updatedAt\n event {\n id\n name\n code\n type\n requireDob\n iCalendar\n attendance\n status\n message\n description\n commsTemplate\n bloodDropStart\n bloodDropEnd\n urinePotLocation\n preQuestionTemplate\n clientPassword\n commsLink\n clientAccess\n registerInterest\n notifyRegisterInterest\n customAppointmentReminder\n reminderTime\n createdAt\n isDeleted\n updatedAt\n eventCompany {\n id\n name\n createdAt\n logo\n logoFileName\n email\n isDeleted\n updatedAt\n }\n eventLocation {\n nextToken\n }\n eventCollectUserData {\n nextToken\n }\n }\n eventSlotGroup {\n items {\n id\n room\n date\n capacity\n createdAt\n active\n isDeleted\n assignedTo\n updatedAt\n }\n nextToken\n }\n }\n }\n`;\nexport const listEventLocations = /* GraphQL */ `\n query ListEventLocations(\n $filter: ModelEventLocationFilterInput\n $limit: Int\n $nextToken: String\n ) {\n listEventLocations(filter: $filter, limit: $limit, nextToken: $nextToken) {\n items {\n id\n addressLine1\n addressLine2\n town\n postcode\n createdAt\n eventLocationLookupId\n isDeleted\n updatedAt\n event {\n id\n name\n code\n type\n requireDob\n iCalendar\n attendance\n status\n message\n description\n commsTemplate\n bloodDropStart\n bloodDropEnd\n urinePotLocation\n preQuestionTemplate\n clientPassword\n commsLink\n clientAccess\n registerInterest\n notifyRegisterInterest\n customAppointmentReminder\n reminderTime\n createdAt\n isDeleted\n updatedAt\n }\n eventSlotGroup {\n nextToken\n }\n }\n nextToken\n }\n }\n`;\nexport const getEventCollectUserData = /* GraphQL */ `\n query GetEventCollectUserData($id: ID!) {\n getEventCollectUserData(id: $id) {\n id\n label\n questionType\n validation\n fieldType\n internalUse\n createdAt\n success\n error\n hint\n isDeleted\n updatedAt\n event {\n id\n name\n code\n type\n requireDob\n iCalendar\n attendance\n status\n message\n description\n commsTemplate\n bloodDropStart\n bloodDropEnd\n urinePotLocation\n preQuestionTemplate\n clientPassword\n commsLink\n clientAccess\n registerInterest\n notifyRegisterInterest\n customAppointmentReminder\n reminderTime\n createdAt\n isDeleted\n updatedAt\n eventCompany {\n id\n name\n createdAt\n logo\n logoFileName\n email\n isDeleted\n updatedAt\n }\n eventLocation {\n nextToken\n }\n eventCollectUserData {\n nextToken\n }\n }\n eventCollectUserDataOptions {\n items {\n id\n options\n isDeleted\n createdAt\n updatedAt\n }\n nextToken\n }\n }\n }\n`;\nexport const listEventCollectUserDatas = /* GraphQL */ `\n query ListEventCollectUserDatas(\n $filter: ModelEventCollectUserDataFilterInput\n $limit: Int\n $nextToken: String\n ) {\n listEventCollectUserDatas(\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n ) {\n items {\n id\n label\n questionType\n validation\n fieldType\n internalUse\n createdAt\n success\n error\n hint\n isDeleted\n updatedAt\n event {\n id\n name\n code\n type\n requireDob\n iCalendar\n attendance\n status\n message\n description\n commsTemplate\n bloodDropStart\n bloodDropEnd\n urinePotLocation\n preQuestionTemplate\n clientPassword\n commsLink\n clientAccess\n registerInterest\n notifyRegisterInterest\n customAppointmentReminder\n reminderTime\n createdAt\n isDeleted\n updatedAt\n }\n eventCollectUserDataOptions {\n nextToken\n }\n }\n nextToken\n }\n }\n`;\nexport const getEventCollectUserDataOptions = /* GraphQL */ `\n query GetEventCollectUserDataOptions($id: ID!) {\n getEventCollectUserDataOptions(id: $id) {\n id\n options\n isDeleted\n createdAt\n updatedAt\n eventCollectUserData {\n id\n label\n questionType\n validation\n fieldType\n internalUse\n createdAt\n success\n error\n hint\n isDeleted\n updatedAt\n event {\n id\n name\n code\n type\n requireDob\n iCalendar\n attendance\n status\n message\n description\n commsTemplate\n bloodDropStart\n bloodDropEnd\n urinePotLocation\n preQuestionTemplate\n clientPassword\n commsLink\n clientAccess\n registerInterest\n notifyRegisterInterest\n customAppointmentReminder\n reminderTime\n createdAt\n isDeleted\n updatedAt\n }\n eventCollectUserDataOptions {\n nextToken\n }\n }\n }\n }\n`;\nexport const listEventCollectUserDataOptionss = /* GraphQL */ `\n query ListEventCollectUserDataOptionss(\n $filter: ModelEventCollectUserDataOptionsFilterInput\n $limit: Int\n $nextToken: String\n ) {\n listEventCollectUserDataOptionss(\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n ) {\n items {\n id\n options\n isDeleted\n createdAt\n updatedAt\n eventCollectUserData {\n id\n label\n questionType\n validation\n fieldType\n internalUse\n createdAt\n success\n error\n hint\n isDeleted\n updatedAt\n }\n }\n nextToken\n }\n }\n`;\nexport const getEventSlotGroup = /* GraphQL */ `\n query GetEventSlotGroup($id: ID!) {\n getEventSlotGroup(id: $id) {\n id\n room\n date\n capacity\n createdAt\n active\n isDeleted\n assignedTo\n updatedAt\n eventLocation {\n id\n addressLine1\n addressLine2\n town\n postcode\n createdAt\n eventLocationLookupId\n isDeleted\n updatedAt\n event {\n id\n name\n code\n type\n requireDob\n iCalendar\n attendance\n status\n message\n description\n commsTemplate\n bloodDropStart\n bloodDropEnd\n urinePotLocation\n preQuestionTemplate\n clientPassword\n commsLink\n clientAccess\n registerInterest\n notifyRegisterInterest\n customAppointmentReminder\n reminderTime\n createdAt\n isDeleted\n updatedAt\n }\n eventSlotGroup {\n nextToken\n }\n }\n eventSlot {\n items {\n id\n time\n length\n type\n booked\n isDeleted\n createdAt\n updatedAt\n }\n nextToken\n }\n }\n }\n`;\nexport const listEventSlotGroups = /* GraphQL */ `\n query ListEventSlotGroups(\n $filter: ModelEventSlotGroupFilterInput\n $limit: Int\n $nextToken: String\n ) {\n listEventSlotGroups(filter: $filter, limit: $limit, nextToken: $nextToken) {\n items {\n id\n room\n date\n capacity\n createdAt\n active\n isDeleted\n assignedTo\n updatedAt\n eventLocation {\n id\n addressLine1\n addressLine2\n town\n postcode\n createdAt\n eventLocationLookupId\n isDeleted\n updatedAt\n }\n eventSlot {\n nextToken\n }\n }\n nextToken\n }\n }\n`;\nexport const getEventSlot = /* GraphQL */ `\n query GetEventSlot($id: ID!) {\n getEventSlot(id: $id) {\n id\n time\n length\n type\n booked\n isDeleted\n createdAt\n updatedAt\n eventSlotGroup {\n id\n room\n date\n capacity\n createdAt\n active\n isDeleted\n assignedTo\n updatedAt\n eventLocation {\n id\n addressLine1\n addressLine2\n town\n postcode\n createdAt\n eventLocationLookupId\n isDeleted\n updatedAt\n }\n eventSlot {\n nextToken\n }\n }\n eventBooking {\n items {\n id\n firstname\n lastname\n email\n mobile\n dob\n customData\n createdAt\n startTime\n twentyFourHourReminder\n fortyEightHourReminder\n customReminder\n attendance\n searchField\n isDeleted\n updatedAt\n }\n nextToken\n }\n }\n }\n`;\nexport const listEventSlots = /* GraphQL */ `\n query ListEventSlots(\n $filter: ModelEventSlotFilterInput\n $limit: Int\n $nextToken: String\n ) {\n listEventSlots(filter: $filter, limit: $limit, nextToken: $nextToken) {\n items {\n id\n time\n length\n type\n booked\n isDeleted\n createdAt\n updatedAt\n eventSlotGroup {\n id\n room\n date\n capacity\n createdAt\n active\n isDeleted\n assignedTo\n updatedAt\n }\n eventBooking {\n nextToken\n }\n }\n nextToken\n }\n }\n`;\nexport const getEventBooking = /* GraphQL */ `\n query GetEventBooking($id: ID!) {\n getEventBooking(id: $id) {\n id\n firstname\n lastname\n email\n mobile\n dob\n customData\n createdAt\n startTime\n twentyFourHourReminder\n fortyEightHourReminder\n customReminder\n attendance\n searchField\n isDeleted\n updatedAt\n eventSlot {\n id\n time\n length\n type\n booked\n isDeleted\n createdAt\n updatedAt\n eventSlotGroup {\n id\n room\n date\n capacity\n createdAt\n active\n isDeleted\n assignedTo\n updatedAt\n }\n eventBooking {\n nextToken\n }\n }\n }\n }\n`;\nexport const listEventBookings = /* GraphQL */ `\n query ListEventBookings(\n $filter: ModelEventBookingFilterInput\n $limit: Int\n $nextToken: String\n ) {\n listEventBookings(filter: $filter, limit: $limit, nextToken: $nextToken) {\n items {\n id\n firstname\n lastname\n email\n mobile\n dob\n customData\n createdAt\n startTime\n twentyFourHourReminder\n fortyEightHourReminder\n customReminder\n attendance\n searchField\n isDeleted\n updatedAt\n eventSlot {\n id\n time\n length\n type\n booked\n isDeleted\n createdAt\n updatedAt\n }\n }\n nextToken\n }\n }\n`;\nexport const bookingBySearchField = /* GraphQL */ `\n query BookingBySearchField(\n $searchField: String\n $sortDirection: ModelSortDirection\n $filter: ModelEventBookingFilterInput\n $limit: Int\n $nextToken: String\n ) {\n bookingBySearchField(\n searchField: $searchField\n sortDirection: $sortDirection\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n ) {\n items {\n id\n firstname\n lastname\n email\n mobile\n dob\n customData\n createdAt\n startTime\n twentyFourHourReminder\n fortyEightHourReminder\n customReminder\n attendance\n searchField\n isDeleted\n updatedAt\n eventSlot {\n id\n time\n length\n type\n booked\n isDeleted\n createdAt\n updatedAt\n }\n }\n nextToken\n }\n }\n`;\nexport const getEventCommsTemplate = /* GraphQL */ `\n query GetEventCommsTemplate($id: ID!) {\n getEventCommsTemplate(id: $id) {\n id\n name\n emailSubject\n reminderEmailSubject\n emailTemplate\n reminderEmailTemplate\n smsReminderTemplate\n smsTemplate\n isDeleted\n createdAt\n updatedAt\n eventCommsTemplateAttachments {\n items {\n id\n attachment\n key\n name\n isDeleted\n createdAt\n updatedAt\n }\n nextToken\n }\n }\n }\n`;\nexport const listEventCommsTemplates = /* GraphQL */ `\n query ListEventCommsTemplates(\n $filter: ModelEventCommsTemplateFilterInput\n $limit: Int\n $nextToken: String\n ) {\n listEventCommsTemplates(\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n ) {\n items {\n id\n name\n emailSubject\n reminderEmailSubject\n emailTemplate\n reminderEmailTemplate\n smsReminderTemplate\n smsTemplate\n isDeleted\n createdAt\n updatedAt\n eventCommsTemplateAttachments {\n nextToken\n }\n }\n nextToken\n }\n }\n`;\nexport const getEventCommsTemplateAttachments = /* GraphQL */ `\n query GetEventCommsTemplateAttachments($id: ID!) {\n getEventCommsTemplateAttachments(id: $id) {\n id\n attachment\n key\n name\n isDeleted\n createdAt\n updatedAt\n EventCommsTemplate {\n id\n name\n emailSubject\n reminderEmailSubject\n emailTemplate\n reminderEmailTemplate\n smsReminderTemplate\n smsTemplate\n isDeleted\n createdAt\n updatedAt\n eventCommsTemplateAttachments {\n nextToken\n }\n }\n }\n }\n`;\nexport const listEventCommsTemplateAttachmentss = /* GraphQL */ `\n query ListEventCommsTemplateAttachmentss(\n $filter: ModelEventCommsTemplateAttachmentsFilterInput\n $limit: Int\n $nextToken: String\n ) {\n listEventCommsTemplateAttachmentss(\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n ) {\n items {\n id\n attachment\n key\n name\n isDeleted\n createdAt\n updatedAt\n EventCommsTemplate {\n id\n name\n emailSubject\n reminderEmailSubject\n emailTemplate\n reminderEmailTemplate\n smsReminderTemplate\n smsTemplate\n isDeleted\n createdAt\n updatedAt\n }\n }\n nextToken\n }\n }\n`;\nexport const getEventClientAccess = /* GraphQL */ `\n query GetEventClientAccess($id: ID!) {\n getEventClientAccess(id: $id) {\n id\n expiryDate\n clientPassword\n showPersonal\n description\n createdAt\n updatedAt\n eventCompany {\n id\n name\n createdAt\n logo\n logoFileName\n email\n isDeleted\n eventLocationLookup {\n nextToken\n }\n updatedAt\n event {\n nextToken\n }\n eventClientAccess {\n nextToken\n }\n }\n }\n }\n`;\nexport const listEventClientAccesss = /* GraphQL */ `\n query ListEventClientAccesss(\n $filter: ModelEventClientAccessFilterInput\n $limit: Int\n $nextToken: String\n ) {\n listEventClientAccesss(\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n ) {\n items {\n id\n expiryDate\n clientPassword\n showPersonal\n description\n createdAt\n updatedAt\n eventCompany {\n id\n name\n createdAt\n logo\n logoFileName\n email\n isDeleted\n updatedAt\n }\n }\n nextToken\n }\n }\n`;\nexport const getBookingError = /* GraphQL */ `\n query GetBookingError($id: ID!) {\n getBookingError(id: $id) {\n id\n error\n payload\n browser\n createdAt\n updatedAt\n }\n }\n`;\nexport const listBookingErrors = /* GraphQL */ `\n query ListBookingErrors(\n $filter: ModelBookingErrorFilterInput\n $limit: Int\n $nextToken: String\n ) {\n listBookingErrors(filter: $filter, limit: $limit, nextToken: $nextToken) {\n items {\n id\n error\n payload\n browser\n createdAt\n updatedAt\n }\n nextToken\n }\n }\n`;\n","//! moment-timezone.js\n//! version : 0.5.33\n//! Copyright (c) JS Foundation and other contributors\n//! license : MIT\n//! github.com/moment/moment-timezone\n\n(function (root, factory) {\n\t\"use strict\";\n\n\t/*global define*/\n\tif (typeof module === 'object' && module.exports) {\n\t\tmodule.exports = factory(require('moment')); // Node\n\t} else if (typeof define === 'function' && define.amd) {\n\t\tdefine(['moment'], factory); // AMD\n\t} else {\n\t\tfactory(root.moment); // Browser\n\t}\n}(this, function (moment) {\n\t\"use strict\";\n\n\t// Resolves es6 module loading issue\n\tif (moment.version === undefined && moment.default) {\n\t\tmoment = moment.default;\n\t}\n\n\t// Do not load moment-timezone a second time.\n\t// if (moment.tz !== undefined) {\n\t// \tlogError('Moment Timezone ' + moment.tz.version + ' was already loaded ' + (moment.tz.dataVersion ? 'with data from ' : 'without any data') + moment.tz.dataVersion);\n\t// \treturn moment;\n\t// }\n\n\tvar VERSION = \"0.5.33\",\n\t\tzones = {},\n\t\tlinks = {},\n\t\tcountries = {},\n\t\tnames = {},\n\t\tguesses = {},\n\t\tcachedGuess;\n\n\tif (!moment || typeof moment.version !== 'string') {\n\t\tlogError('Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/');\n\t}\n\n\tvar momentVersion = moment.version.split('.'),\n\t\tmajor = +momentVersion[0],\n\t\tminor = +momentVersion[1];\n\n\t// Moment.js version check\n\tif (major < 2 || (major === 2 && minor < 6)) {\n\t\tlogError('Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js ' + moment.version + '. See momentjs.com');\n\t}\n\n\t/************************************\n\t\tUnpacking\n\t************************************/\n\n\tfunction charCodeToInt(charCode) {\n\t\tif (charCode > 96) {\n\t\t\treturn charCode - 87;\n\t\t} else if (charCode > 64) {\n\t\t\treturn charCode - 29;\n\t\t}\n\t\treturn charCode - 48;\n\t}\n\n\tfunction unpackBase60(string) {\n\t\tvar i = 0,\n\t\t\tparts = string.split('.'),\n\t\t\twhole = parts[0],\n\t\t\tfractional = parts[1] || '',\n\t\t\tmultiplier = 1,\n\t\t\tnum,\n\t\t\tout = 0,\n\t\t\tsign = 1;\n\n\t\t// handle negative numbers\n\t\tif (string.charCodeAt(0) === 45) {\n\t\t\ti = 1;\n\t\t\tsign = -1;\n\t\t}\n\n\t\t// handle digits before the decimal\n\t\tfor (i; i < whole.length; i++) {\n\t\t\tnum = charCodeToInt(whole.charCodeAt(i));\n\t\t\tout = 60 * out + num;\n\t\t}\n\n\t\t// handle digits after the decimal\n\t\tfor (i = 0; i < fractional.length; i++) {\n\t\t\tmultiplier = multiplier / 60;\n\t\t\tnum = charCodeToInt(fractional.charCodeAt(i));\n\t\t\tout += num * multiplier;\n\t\t}\n\n\t\treturn out * sign;\n\t}\n\n\tfunction arrayToInt (array) {\n\t\tfor (var i = 0; i < array.length; i++) {\n\t\t\tarray[i] = unpackBase60(array[i]);\n\t\t}\n\t}\n\n\tfunction intToUntil (array, length) {\n\t\tfor (var i = 0; i < length; i++) {\n\t\t\tarray[i] = Math.round((array[i - 1] || 0) + (array[i] * 60000)); // minutes to milliseconds\n\t\t}\n\n\t\tarray[length - 1] = Infinity;\n\t}\n\n\tfunction mapIndices (source, indices) {\n\t\tvar out = [], i;\n\n\t\tfor (i = 0; i < indices.length; i++) {\n\t\t\tout[i] = source[indices[i]];\n\t\t}\n\n\t\treturn out;\n\t}\n\n\tfunction unpack (string) {\n\t\tvar data = string.split('|'),\n\t\t\toffsets = data[2].split(' '),\n\t\t\tindices = data[3].split(''),\n\t\t\tuntils = data[4].split(' ');\n\n\t\tarrayToInt(offsets);\n\t\tarrayToInt(indices);\n\t\tarrayToInt(untils);\n\n\t\tintToUntil(untils, indices.length);\n\n\t\treturn {\n\t\t\tname : data[0],\n\t\t\tabbrs : mapIndices(data[1].split(' '), indices),\n\t\t\toffsets : mapIndices(offsets, indices),\n\t\t\tuntils : untils,\n\t\t\tpopulation : data[5] | 0\n\t\t};\n\t}\n\n\t/************************************\n\t\tZone object\n\t************************************/\n\n\tfunction Zone (packedString) {\n\t\tif (packedString) {\n\t\t\tthis._set(unpack(packedString));\n\t\t}\n\t}\n\n\tZone.prototype = {\n\t\t_set : function (unpacked) {\n\t\t\tthis.name = unpacked.name;\n\t\t\tthis.abbrs = unpacked.abbrs;\n\t\t\tthis.untils = unpacked.untils;\n\t\t\tthis.offsets = unpacked.offsets;\n\t\t\tthis.population = unpacked.population;\n\t\t},\n\n\t\t_index : function (timestamp) {\n\t\t\tvar target = +timestamp,\n\t\t\t\tuntils = this.untils,\n\t\t\t\ti;\n\n\t\t\tfor (i = 0; i < untils.length; i++) {\n\t\t\t\tif (target < untils[i]) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tcountries : function () {\n\t\t\tvar zone_name = this.name;\n\t\t\treturn Object.keys(countries).filter(function (country_code) {\n\t\t\t\treturn countries[country_code].zones.indexOf(zone_name) !== -1;\n\t\t\t});\n\t\t},\n\n\t\tparse : function (timestamp) {\n\t\t\tvar target = +timestamp,\n\t\t\t\toffsets = this.offsets,\n\t\t\t\tuntils = this.untils,\n\t\t\t\tmax = untils.length - 1,\n\t\t\t\toffset, offsetNext, offsetPrev, i;\n\n\t\t\tfor (i = 0; i < max; i++) {\n\t\t\t\toffset = offsets[i];\n\t\t\t\toffsetNext = offsets[i + 1];\n\t\t\t\toffsetPrev = offsets[i ? i - 1 : i];\n\n\t\t\t\tif (offset < offsetNext && tz.moveAmbiguousForward) {\n\t\t\t\t\toffset = offsetNext;\n\t\t\t\t} else if (offset > offsetPrev && tz.moveInvalidForward) {\n\t\t\t\t\toffset = offsetPrev;\n\t\t\t\t}\n\n\t\t\t\tif (target < untils[i] - (offset * 60000)) {\n\t\t\t\t\treturn offsets[i];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn offsets[max];\n\t\t},\n\n\t\tabbr : function (mom) {\n\t\t\treturn this.abbrs[this._index(mom)];\n\t\t},\n\n\t\toffset : function (mom) {\n\t\t\tlogError(\"zone.offset has been deprecated in favor of zone.utcOffset\");\n\t\t\treturn this.offsets[this._index(mom)];\n\t\t},\n\n\t\tutcOffset : function (mom) {\n\t\t\treturn this.offsets[this._index(mom)];\n\t\t}\n\t};\n\n\t/************************************\n\t\tCountry object\n\t************************************/\n\n\tfunction Country (country_name, zone_names) {\n\t\tthis.name = country_name;\n\t\tthis.zones = zone_names;\n\t}\n\n\t/************************************\n\t\tCurrent Timezone\n\t************************************/\n\n\tfunction OffsetAt(at) {\n\t\tvar timeString = at.toTimeString();\n\t\tvar abbr = timeString.match(/\\([a-z ]+\\)/i);\n\t\tif (abbr && abbr[0]) {\n\t\t\t// 17:56:31 GMT-0600 (CST)\n\t\t\t// 17:56:31 GMT-0600 (Central Standard Time)\n\t\t\tabbr = abbr[0].match(/[A-Z]/g);\n\t\t\tabbr = abbr ? abbr.join('') : undefined;\n\t\t} else {\n\t\t\t// 17:56:31 CST\n\t\t\t// 17:56:31 GMT+0800 (台北標準時間)\n\t\t\tabbr = timeString.match(/[A-Z]{3,5}/g);\n\t\t\tabbr = abbr ? abbr[0] : undefined;\n\t\t}\n\n\t\tif (abbr === 'GMT') {\n\t\t\tabbr = undefined;\n\t\t}\n\n\t\tthis.at = +at;\n\t\tthis.abbr = abbr;\n\t\tthis.offset = at.getTimezoneOffset();\n\t}\n\n\tfunction ZoneScore(zone) {\n\t\tthis.zone = zone;\n\t\tthis.offsetScore = 0;\n\t\tthis.abbrScore = 0;\n\t}\n\n\tZoneScore.prototype.scoreOffsetAt = function (offsetAt) {\n\t\tthis.offsetScore += Math.abs(this.zone.utcOffset(offsetAt.at) - offsetAt.offset);\n\t\tif (this.zone.abbr(offsetAt.at).replace(/[^A-Z]/g, '') !== offsetAt.abbr) {\n\t\t\tthis.abbrScore++;\n\t\t}\n\t};\n\n\tfunction findChange(low, high) {\n\t\tvar mid, diff;\n\n\t\twhile ((diff = ((high.at - low.at) / 12e4 | 0) * 6e4)) {\n\t\t\tmid = new OffsetAt(new Date(low.at + diff));\n\t\t\tif (mid.offset === low.offset) {\n\t\t\t\tlow = mid;\n\t\t\t} else {\n\t\t\t\thigh = mid;\n\t\t\t}\n\t\t}\n\n\t\treturn low;\n\t}\n\n\tfunction userOffsets() {\n\t\tvar startYear = new Date().getFullYear() - 2,\n\t\t\tlast = new OffsetAt(new Date(startYear, 0, 1)),\n\t\t\toffsets = [last],\n\t\t\tchange, next, i;\n\n\t\tfor (i = 1; i < 48; i++) {\n\t\t\tnext = new OffsetAt(new Date(startYear, i, 1));\n\t\t\tif (next.offset !== last.offset) {\n\t\t\t\tchange = findChange(last, next);\n\t\t\t\toffsets.push(change);\n\t\t\t\toffsets.push(new OffsetAt(new Date(change.at + 6e4)));\n\t\t\t}\n\t\t\tlast = next;\n\t\t}\n\n\t\tfor (i = 0; i < 4; i++) {\n\t\t\toffsets.push(new OffsetAt(new Date(startYear + i, 0, 1)));\n\t\t\toffsets.push(new OffsetAt(new Date(startYear + i, 6, 1)));\n\t\t}\n\n\t\treturn offsets;\n\t}\n\n\tfunction sortZoneScores (a, b) {\n\t\tif (a.offsetScore !== b.offsetScore) {\n\t\t\treturn a.offsetScore - b.offsetScore;\n\t\t}\n\t\tif (a.abbrScore !== b.abbrScore) {\n\t\t\treturn a.abbrScore - b.abbrScore;\n\t\t}\n\t\tif (a.zone.population !== b.zone.population) {\n\t\t\treturn b.zone.population - a.zone.population;\n\t\t}\n\t\treturn b.zone.name.localeCompare(a.zone.name);\n\t}\n\n\tfunction addToGuesses (name, offsets) {\n\t\tvar i, offset;\n\t\tarrayToInt(offsets);\n\t\tfor (i = 0; i < offsets.length; i++) {\n\t\t\toffset = offsets[i];\n\t\t\tguesses[offset] = guesses[offset] || {};\n\t\t\tguesses[offset][name] = true;\n\t\t}\n\t}\n\n\tfunction guessesForUserOffsets (offsets) {\n\t\tvar offsetsLength = offsets.length,\n\t\t\tfilteredGuesses = {},\n\t\t\tout = [],\n\t\t\ti, j, guessesOffset;\n\n\t\tfor (i = 0; i < offsetsLength; i++) {\n\t\t\tguessesOffset = guesses[offsets[i].offset] || {};\n\t\t\tfor (j in guessesOffset) {\n\t\t\t\tif (guessesOffset.hasOwnProperty(j)) {\n\t\t\t\t\tfilteredGuesses[j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (i in filteredGuesses) {\n\t\t\tif (filteredGuesses.hasOwnProperty(i)) {\n\t\t\t\tout.push(names[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn out;\n\t}\n\n\tfunction rebuildGuess () {\n\n\t\t// use Intl API when available and returning valid time zone\n\t\ttry {\n\t\t\tvar intlName = Intl.DateTimeFormat().resolvedOptions().timeZone;\n\t\t\tif (intlName && intlName.length > 3) {\n\t\t\t\tvar name = names[normalizeName(intlName)];\n\t\t\t\tif (name) {\n\t\t\t\t\treturn name;\n\t\t\t\t}\n\t\t\t\tlogError(\"Moment Timezone found \" + intlName + \" from the Intl api, but did not have that data loaded.\");\n\t\t\t}\n\t\t} catch (e) {\n\t\t\t// Intl unavailable, fall back to manual guessing.\n\t\t}\n\n\t\tvar offsets = userOffsets(),\n\t\t\toffsetsLength = offsets.length,\n\t\t\tguesses = guessesForUserOffsets(offsets),\n\t\t\tzoneScores = [],\n\t\t\tzoneScore, i, j;\n\n\t\tfor (i = 0; i < guesses.length; i++) {\n\t\t\tzoneScore = new ZoneScore(getZone(guesses[i]), offsetsLength);\n\t\t\tfor (j = 0; j < offsetsLength; j++) {\n\t\t\t\tzoneScore.scoreOffsetAt(offsets[j]);\n\t\t\t}\n\t\t\tzoneScores.push(zoneScore);\n\t\t}\n\n\t\tzoneScores.sort(sortZoneScores);\n\n\t\treturn zoneScores.length > 0 ? zoneScores[0].zone.name : undefined;\n\t}\n\n\tfunction guess (ignoreCache) {\n\t\tif (!cachedGuess || ignoreCache) {\n\t\t\tcachedGuess = rebuildGuess();\n\t\t}\n\t\treturn cachedGuess;\n\t}\n\n\t/************************************\n\t\tGlobal Methods\n\t************************************/\n\n\tfunction normalizeName (name) {\n\t\treturn (name || '').toLowerCase().replace(/\\//g, '_');\n\t}\n\n\tfunction addZone (packed) {\n\t\tvar i, name, split, normalized;\n\n\t\tif (typeof packed === \"string\") {\n\t\t\tpacked = [packed];\n\t\t}\n\n\t\tfor (i = 0; i < packed.length; i++) {\n\t\t\tsplit = packed[i].split('|');\n\t\t\tname = split[0];\n\t\t\tnormalized = normalizeName(name);\n\t\t\tzones[normalized] = packed[i];\n\t\t\tnames[normalized] = name;\n\t\t\taddToGuesses(normalized, split[2].split(' '));\n\t\t}\n\t}\n\n\tfunction getZone (name, caller) {\n\n\t\tname = normalizeName(name);\n\n\t\tvar zone = zones[name];\n\t\tvar link;\n\n\t\tif (zone instanceof Zone) {\n\t\t\treturn zone;\n\t\t}\n\n\t\tif (typeof zone === 'string') {\n\t\t\tzone = new Zone(zone);\n\t\t\tzones[name] = zone;\n\t\t\treturn zone;\n\t\t}\n\n\t\t// Pass getZone to prevent recursion more than 1 level deep\n\t\tif (links[name] && caller !== getZone && (link = getZone(links[name], getZone))) {\n\t\t\tzone = zones[name] = new Zone();\n\t\t\tzone._set(link);\n\t\t\tzone.name = names[name];\n\t\t\treturn zone;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tfunction getNames () {\n\t\tvar i, out = [];\n\n\t\tfor (i in names) {\n\t\t\tif (names.hasOwnProperty(i) && (zones[i] || zones[links[i]]) && names[i]) {\n\t\t\t\tout.push(names[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn out.sort();\n\t}\n\n\tfunction getCountryNames () {\n\t\treturn Object.keys(countries);\n\t}\n\n\tfunction addLink (aliases) {\n\t\tvar i, alias, normal0, normal1;\n\n\t\tif (typeof aliases === \"string\") {\n\t\t\taliases = [aliases];\n\t\t}\n\n\t\tfor (i = 0; i < aliases.length; i++) {\n\t\t\talias = aliases[i].split('|');\n\n\t\t\tnormal0 = normalizeName(alias[0]);\n\t\t\tnormal1 = normalizeName(alias[1]);\n\n\t\t\tlinks[normal0] = normal1;\n\t\t\tnames[normal0] = alias[0];\n\n\t\t\tlinks[normal1] = normal0;\n\t\t\tnames[normal1] = alias[1];\n\t\t}\n\t}\n\n\tfunction addCountries (data) {\n\t\tvar i, country_code, country_zones, split;\n\t\tif (!data || !data.length) return;\n\t\tfor (i = 0; i < data.length; i++) {\n\t\t\tsplit = data[i].split('|');\n\t\t\tcountry_code = split[0].toUpperCase();\n\t\t\tcountry_zones = split[1].split(' ');\n\t\t\tcountries[country_code] = new Country(\n\t\t\t\tcountry_code,\n\t\t\t\tcountry_zones\n\t\t\t);\n\t\t}\n\t}\n\n\tfunction getCountry (name) {\n\t\tname = name.toUpperCase();\n\t\treturn countries[name] || null;\n\t}\n\n\tfunction zonesForCountry(country, with_offset) {\n\t\tcountry = getCountry(country);\n\n\t\tif (!country) return null;\n\n\t\tvar zones = country.zones.sort();\n\n\t\tif (with_offset) {\n\t\t\treturn zones.map(function (zone_name) {\n\t\t\t\tvar zone = getZone(zone_name);\n\t\t\t\treturn {\n\t\t\t\t\tname: zone_name,\n\t\t\t\t\toffset: zone.utcOffset(new Date())\n\t\t\t\t};\n\t\t\t});\n\t\t}\n\n\t\treturn zones;\n\t}\n\n\tfunction loadData (data) {\n\t\taddZone(data.zones);\n\t\taddLink(data.links);\n\t\taddCountries(data.countries);\n\t\ttz.dataVersion = data.version;\n\t}\n\n\tfunction zoneExists (name) {\n\t\tif (!zoneExists.didShowError) {\n\t\t\tzoneExists.didShowError = true;\n\t\t\t\tlogError(\"moment.tz.zoneExists('\" + name + \"') has been deprecated in favor of !moment.tz.zone('\" + name + \"')\");\n\t\t}\n\t\treturn !!getZone(name);\n\t}\n\n\tfunction needsOffset (m) {\n\t\tvar isUnixTimestamp = (m._f === 'X' || m._f === 'x');\n\t\treturn !!(m._a && (m._tzm === undefined) && !isUnixTimestamp);\n\t}\n\n\tfunction logError (message) {\n\t\tif (typeof console !== 'undefined' && typeof console.error === 'function') {\n\t\t\tconsole.error(message);\n\t\t}\n\t}\n\n\t/************************************\n\t\tmoment.tz namespace\n\t************************************/\n\n\tfunction tz (input) {\n\t\tvar args = Array.prototype.slice.call(arguments, 0, -1),\n\t\t\tname = arguments[arguments.length - 1],\n\t\t\tzone = getZone(name),\n\t\t\tout = moment.utc.apply(null, args);\n\n\t\tif (zone && !moment.isMoment(input) && needsOffset(out)) {\n\t\t\tout.add(zone.parse(out), 'minutes');\n\t\t}\n\n\t\tout.tz(name);\n\n\t\treturn out;\n\t}\n\n\ttz.version = VERSION;\n\ttz.dataVersion = '';\n\ttz._zones = zones;\n\ttz._links = links;\n\ttz._names = names;\n\ttz._countries\t= countries;\n\ttz.add = addZone;\n\ttz.link = addLink;\n\ttz.load = loadData;\n\ttz.zone = getZone;\n\ttz.zoneExists = zoneExists; // deprecated in 0.1.0\n\ttz.guess = guess;\n\ttz.names = getNames;\n\ttz.Zone = Zone;\n\ttz.unpack = unpack;\n\ttz.unpackBase60 = unpackBase60;\n\ttz.needsOffset = needsOffset;\n\ttz.moveInvalidForward = true;\n\ttz.moveAmbiguousForward = false;\n\ttz.countries = getCountryNames;\n\ttz.zonesForCountry = zonesForCountry;\n\n\t/************************************\n\t\tInterface with Moment.js\n\t************************************/\n\n\tvar fn = moment.fn;\n\n\tmoment.tz = tz;\n\n\tmoment.defaultZone = null;\n\n\tmoment.updateOffset = function (mom, keepTime) {\n\t\tvar zone = moment.defaultZone,\n\t\t\toffset;\n\n\t\tif (mom._z === undefined) {\n\t\t\tif (zone && needsOffset(mom) && !mom._isUTC) {\n\t\t\t\tmom._d = moment.utc(mom._a)._d;\n\t\t\t\tmom.utc().add(zone.parse(mom), 'minutes');\n\t\t\t}\n\t\t\tmom._z = zone;\n\t\t}\n\t\tif (mom._z) {\n\t\t\toffset = mom._z.utcOffset(mom);\n\t\t\tif (Math.abs(offset) < 16) {\n\t\t\t\toffset = offset / 60;\n\t\t\t}\n\t\t\tif (mom.utcOffset !== undefined) {\n\t\t\t\tvar z = mom._z;\n\t\t\t\tmom.utcOffset(-offset, keepTime);\n\t\t\t\tmom._z = z;\n\t\t\t} else {\n\t\t\t\tmom.zone(offset, keepTime);\n\t\t\t}\n\t\t}\n\t};\n\n\tfn.tz = function (name, keepTime) {\n\t\tif (name) {\n\t\t\tif (typeof name !== 'string') {\n\t\t\t\tthrow new Error('Time zone name must be a string, got ' + name + ' [' + typeof name + ']');\n\t\t\t}\n\t\t\tthis._z = getZone(name);\n\t\t\tif (this._z) {\n\t\t\t\tmoment.updateOffset(this, keepTime);\n\t\t\t} else {\n\t\t\t\tlogError(\"Moment Timezone has no data for \" + name + \". See http://momentjs.com/timezone/docs/#/data-loading/.\");\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif (this._z) { return this._z.name; }\n\t};\n\n\tfunction abbrWrap (old) {\n\t\treturn function () {\n\t\t\tif (this._z) { return this._z.abbr(this); }\n\t\t\treturn old.call(this);\n\t\t};\n\t}\n\n\tfunction resetZoneWrap (old) {\n\t\treturn function () {\n\t\t\tthis._z = null;\n\t\t\treturn old.apply(this, arguments);\n\t\t};\n\t}\n\n\tfunction resetZoneWrap2 (old) {\n\t\treturn function () {\n\t\t\tif (arguments.length > 0) this._z = null;\n\t\t\treturn old.apply(this, arguments);\n\t\t};\n\t}\n\n\tfn.zoneName = abbrWrap(fn.zoneName);\n\tfn.zoneAbbr = abbrWrap(fn.zoneAbbr);\n\tfn.utc = resetZoneWrap(fn.utc);\n\tfn.local = resetZoneWrap(fn.local);\n\tfn.utcOffset = resetZoneWrap2(fn.utcOffset);\n\n\tmoment.tz.setDefault = function(name) {\n\t\tif (major < 2 || (major === 2 && minor < 9)) {\n\t\t\tlogError('Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js ' + moment.version + '.');\n\t\t}\n\t\tmoment.defaultZone = name ? getZone(name) : null;\n\t\treturn moment;\n\t};\n\n\t// Cloning a moment should include the _z property.\n\tvar momentProperties = moment.momentProperties;\n\tif (Object.prototype.toString.call(momentProperties) === '[object Array]') {\n\t\t// moment 2.8.1+\n\t\tmomentProperties.push('_z');\n\t\tmomentProperties.push('_a');\n\t} else if (momentProperties) {\n\t\t// moment 2.7.0\n\t\tmomentProperties._z = null;\n\t}\n\n\t// INJECT DATA\n\n\treturn moment;\n}));\n","var moment = module.exports = require(\"./moment-timezone\");\nmoment.tz.load(require('./data/packed/latest.json'));\n","export const fluQuestions = {\n title: \"Flu vaccine questions\",\n message:\n \"Sorry, due to your responses, we would advise that you have your flu vaccination at your GP Surgery\",\n questions: [\n {\n id: \"liveVaccines\",\n question:\n \"Have you had any live vaccines in the last 3 weeks (yellow fever, polio etc)?\",\n validation: \"required\",\n options: [\n { id: 1, option: \"Yes\" },\n { id: 2, option: \"No\" },\n ],\n success: \"No\",\n },\n {\n id: \"allergicReaction\",\n question:\n \"Have you ever had an allergic reaction to EGGS or CHICKEN PROTEIN, or to GENTAMICIN, POLYMIXIN or NEOMYCIN (rarely used antibiotics)?\",\n validation: \"required\",\n options: [\n { id: 3, option: \"Yes\" },\n { id: 4, option: \"No\" },\n ],\n success: \"No\",\n },\n {\n id: \"fluImmunisationAbnormalReaction\",\n question:\n \"Have you had an abnormal reaction to any previous flu immunisation?\",\n validation: \"required\",\n options: [\n { id: 5, option: \"Yes\" },\n { id: 6, option: \"No\" },\n ],\n success: \"No\",\n },\n {\n id: \"seriousAllergicReaction\",\n question: \"Have you ever had ANY serious allergic reaction?\",\n validation: \"required\",\n options: [\n { id: 7, option: \"Yes\" },\n { id: 8, option: \"No\" },\n ],\n success: \"No\",\n },\n {\n id: \"over65\",\n question: \"Are you over 65?\",\n validation: \"required\",\n options: [\n { id: 9, option: \"Yes\" },\n { id: 10, option: \"No\" },\n ],\n success: \"No\",\n },\n {\n id: \"pregnant\",\n question: \"Is there any possibility that you might be pregnant?\",\n validation: \"required\",\n options: [\n { id: 11, option: \"Yes\" },\n { id: 12, option: \"No\" },\n ],\n success: \"No\",\n },\n ],\n};\n\nexport const covidQuestions = {\n title: \"Coronavirus symptoms\",\n disclaimer:\n \"By booking this appointment you are consenting to having the Covid-19 test, administered by a Healthy Performance health professional.\",\n message:\n \"Sorry, due to your responses, we would advise that you self-isolate and contact the NHS on 119, as soon as possible.\",\n questions: [\n {\n id: \"highTemperature\",\n question:\n \"Do you have a high temperature? This means you feel hot to touch on your chest or back (you do not need to measure your temperature).\",\n validation: \"required\",\n options: [\n { id: 1, option: \"Yes\" },\n { id: 2, option: \"No\" },\n ],\n success: \"No\",\n },\n {\n id: \"continousCough\",\n question:\n \"Do you have a new, continuous cough? This means coughing a lot for more than an hour, or 3 or more coughing episodes in 24 hours (if you usually have a cough, it may be worse than usual).\",\n validation: \"required\",\n options: [\n { id: 1, option: \"Yes\" },\n { id: 2, option: \"No\" },\n ],\n success: \"No\",\n },\n {\n id: \"tasteSmell\",\n question:\n \"Have you lost your sense of smell or taste? This means you've noticed you cannot smell or taste anything, or things smell or taste different to normal.\",\n validation: \"required\",\n options: [\n { id: 1, option: \"Yes\" },\n { id: 2, option: \"No\" },\n ],\n success: \"No\",\n },\n ],\n};\n","import { API, graphqlOperation } from \"aws-amplify\";\nimport * as mutations from \"./../graphql/mutations\";\nimport * as queries from \"./../graphql/queries\";\nimport moment from \"moment-timezone\";\nimport * as PreQuestions from \"./PreQuestions\";\nimport _ from \"lodash\";\nexport class Booking {\n constructor() {}\n\n static async getEvent(code) {\n let date = moment();\n date = date.subtract(1, \"days\");\n const eventByCode = /* GraphQL */ `\n query EventByCode(\n $sortDirection: ModelSortDirection\n $filter: ModelEventFilterInput\n $limit: Int\n $nextToken: String\n ) {\n eventByCode(\n code: \"${code}\"\n sortDirection: $sortDirection\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n ) {\n items {\n eventCompany {\n id\n name\n logo\n }\n id\n name\n code\n message\n description\n type\n iCalendar\n bloodDropStart\n bloodDropEnd\n urinePotLocation\n commsLink\n preQuestionTemplate\n registerInterest\n notifyRegisterInterest\n eventLocation(limit: 1000, filter: { isDeleted: { eq: 0 } }) {\n items {\n id\n addressLine1\n postcode\n town\n createdAt\n eventSlotGroup(limit: 1000, filter: { isDeleted: { eq: 0 }, active: { eq: true }, date: { gt: \"${date.toISOString()}\" }}) {\n items {\n id\n room\n createdAt\n date\n capacity\n eventSlot(limit: 1000) {\n items {\n id\n length\n time\n type\n booked\n eventBooking(limit: 1) {\n items {\n id\n isDeleted\n }\n }\n }\n }\n }\n }\n }\n }\n eventCollectUserData(filter: { isDeleted: { eq: 0 } }) {\n items {\n id\n label\n questionType\n validation\n fieldType\n internalUse\n createdAt\n isDeleted\n success\n error\n hint\n eventCollectUserDataOptions {\n items {\n id\n options\n }\n }\n }\n }\n }\n nextToken\n }\n }\n `;\n\n const eventObj = await API.graphql({\n query: eventByCode,\n variables: {\n // code: code,\n filter: {\n status: { eq: \"Live\" },\n isDeleted: { eq: 0 }\n }\n },\n authMode: \"API_KEY\"\n });\n\n // Check array has all elements needed\n let valid = false;\n eventObj.data.eventByCode.items.map(event => {\n event.eventLocation.items.map(location => {\n location.eventSlotGroup.items.map(() => {\n valid = true;\n });\n });\n });\n return valid ? eventObj.data.eventByCode.items : false;\n }\n\n static async getEventWithAllBookings(code) {\n const eventByCode = /* GraphQL */ `\n query EventByCode(\n $sortDirection: ModelSortDirection\n $filter: ModelEventFilterInput\n $limit: Int\n $nextToken: String\n ) {\n eventByCode(\n code: \"${code}\"\n sortDirection: $sortDirection\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n ) {\n items {\n eventCompany {\n id\n name\n logo\n }\n id\n name\n code\n message\n description\n type\n iCalendar\n bloodDropStart\n bloodDropEnd\n urinePotLocation\n commsLink\n preQuestionTemplate\n registerInterest\n notifyRegisterInterest\n eventLocation(limit: 1000, filter: { isDeleted: { eq: 0 } }) {\n items {\n id\n addressLine1\n postcode\n town\n createdAt\n eventSlotGroup(limit: 1000, filter: { isDeleted: { eq: 0 }, active: { eq: true } }) {\n items {\n id\n room\n createdAt\n date\n capacity\n eventSlot(limit: 1000) {\n items {\n id\n length\n time\n type\n booked\n eventBooking(limit: 1) {\n items {\n id\n firstname\n lastname\n email\n customData\n dob\n isDeleted\n }\n }\n }\n }\n }\n }\n }\n }\n eventCollectUserData(filter: { isDeleted: { eq: 0 } }) {\n items {\n id\n label\n questionType\n validation\n fieldType\n createdAt\n isDeleted\n success\n error\n hint\n eventCollectUserDataOptions {\n items {\n id\n options\n }\n }\n }\n }\n }\n nextToken\n }\n }\n `;\n\n const eventObj = await API.graphql({\n query: eventByCode,\n variables: {\n // code: code,\n filter: {\n status: { eq: \"Live\" },\n isDeleted: { eq: 0 }\n }\n },\n authMode: \"API_KEY\"\n });\n\n // Check array has all elements needed\n let valid = false;\n eventObj.data.eventByCode.items.map(event => {\n event.eventLocation.items.map(location => {\n location.eventSlotGroup.items.map(() => {\n valid = true;\n });\n });\n });\n return valid ? eventObj.data.eventByCode.items : false;\n }\n\n static async getEventById(id) {\n const getEvent = /* GraphQL */ `\n query GetEvent($id: ID!) {\n getEvent(id: $id) {\n eventCompany {\n id\n name\n }\n id\n name\n code\n status\n type\n iCalendar\n attendance\n eventLocation {\n items {\n id\n addressLine1\n postcode\n town\n createdAt\n eventSlotGroup {\n items {\n id\n room\n createdAt\n date\n capacity\n eventSlot {\n items {\n id\n length\n time\n type\n booked\n eventBooking {\n items {\n id\n firstname\n lastname\n email\n mobile\n dob\n attendance\n customData\n isDeleted\n }\n }\n }\n }\n }\n }\n }\n nextToken\n }\n eventCollectUserData {\n items {\n id\n label\n validation\n fieldType\n createdAt\n isDeleted\n eventCollectUserDataOptions {\n items {\n id\n options\n }\n }\n }\n nextToken\n }\n }\n }\n `;\n const { data: events } = await API.graphql(\n graphqlOperation(getEvent, {\n id: id\n })\n );\n return events.getEvent;\n }\n\n static async checkAvailability(event) {\n if (!event.registerInterest || !event.notifyRegisterInterest) {\n return true;\n }\n\n // Check availability\n let availability = false;\n event.eventLocation.items.forEach(function(location) {\n if (location.eventSlotGroup.items) {\n location.eventSlotGroup.items.forEach(function(slotGroup) {\n if (slotGroup.eventSlot.items) {\n slotGroup.eventSlot.items.forEach(function(slot) {\n if (slot.type === \"SLOT\") {\n if (slot.eventBooking.items.length === 0) {\n availability = true;\n }\n }\n if (slot.type === \"workshop\") {\n if (slot.booked < slotGroup.capacity) {\n availability = true;\n }\n }\n });\n }\n });\n }\n });\n\n if (!availability) {\n const getEvent = /* GraphQL */ `\n query GetEvent($id: ID!) {\n getEvent(id: $id) {\n id\n code\n isDeleted\n status\n }\n }\n `;\n const {\n data: { getEvent: getRegisterInterestEvent }\n } = await API.graphql({\n query: getEvent,\n variables: { id: event.registerInterest },\n authMode: \"API_KEY\"\n });\n\n if (\n getRegisterInterestEvent.isDeleted === 0 &&\n getRegisterInterestEvent.status === \"Live\"\n ) {\n if (event.notifyRegisterInterest === \"redirect\") {\n window.location = `/booking/${getRegisterInterestEvent.code.toLowerCase()}`;\n }\n return `This event is currently fully booked, you can register your interest for further events by visiting www.healthyevents.co.uk and entering event code ${getRegisterInterestEvent.code.toLowerCase()}`;\n }\n }\n return true;\n }\n\n static bookingSteps(customFields, preQuestionTemplate) {\n let step = 0;\n let steps = {};\n\n steps.fluQuestions = {\n title: \"\",\n active: false,\n step: 0\n };\n steps.covidQuestions = {\n title: \"\",\n active: false,\n step: 0\n };\n\n if (preQuestionTemplate) {\n preQuestionTemplate.forEach(function(template) {\n step++;\n steps[template] = {\n title: PreQuestions[template].title,\n active: true,\n step: step\n };\n });\n }\n\n const preQuestions = customFields.filter(\n field => field.questionType === \"PREQUESTION\"\n );\n steps.premilinary = {\n title: \"\",\n active: false,\n step: 0\n };\n if (preQuestions.length > 0) {\n step++;\n steps.premilinary = {\n title: \"Preliminary questions\",\n active: true,\n step: step\n };\n }\n\n if (preQuestions.length > 0) {\n step++;\n steps.slots = {\n title: \"Select time\",\n active: true,\n step: step++\n };\n\n steps.contactdetails = {\n title: \"Contact details\",\n active: true,\n step: step++\n };\n\n steps.preassessment = {\n title: \"Complete\",\n active: true,\n step: step++\n };\n } else {\n steps.premilinary = {\n title: \"\",\n active: false,\n step: step++\n };\n\n steps.slots = {\n title: \"Select location, date and time\",\n active: true,\n step: step++\n };\n\n steps.contactdetails = {\n title: \"Enter contact details\",\n active: true,\n step: step++\n };\n\n steps.preassessment = {\n title: \"Pre-assessment questions\",\n active: true,\n step: step++\n };\n }\n return steps;\n }\n\n static async createBookingWorkshop({\n firstname,\n lastname,\n email,\n mobile,\n dob,\n capacity,\n customData,\n startTime,\n eventBookingEventSlotId\n }) {\n let input = {\n firstname: firstname.trim(),\n lastname: lastname.trim(),\n email: email.trim(),\n dob: dob,\n customData: JSON.stringify(customData),\n eventSlot: eventBookingEventSlotId,\n startTime: startTime,\n capacity: capacity\n };\n\n if (mobile) {\n input.mobile = mobile;\n }\n\n const processBookingWorkshopQL = `mutation ProcessBookingWorkshop(\n $input: CreateBookingWorkshopInput!\n ) {\n processBookingWorkshop(input: $input){\n id\n firstname\n lastname\n email\n mobile\n dob\n customData\n createdAt\n twentyFourHourReminder\n fortyEightHourReminder\n searchField\n isDeleted\n eventSlot {\n id\n time\n length\n type\n booked\n isDeleted\n eventSlotGroup {\n id\n room\n date\n createdAt\n isDeleted\n assignedTo\n eventLocation {\n event {\n name\n commsTemplate\n commsLink\n iCalendar\n preQuestionTemplate\n eventCompany {\n name\n }\n }\n }\n } \n }\n }\n }`;\n\n try {\n // success\n const bookingResult = await API.graphql({\n query: processBookingWorkshopQL,\n variables: {\n input\n },\n authMode: \"API_KEY\"\n });\n const {\n data: { processBookingWorkshop }\n } = bookingResult;\n const {\n data: {\n processBookingWorkshop: { eventSlot }\n }\n } = bookingResult;\n const {\n data: {\n processBookingWorkshop: {\n eventSlot: { eventSlotGroup }\n }\n }\n } = bookingResult;\n const {\n data: {\n processBookingWorkshop: {\n eventSlot: {\n eventSlotGroup: { eventLocation }\n }\n }\n }\n } = bookingResult;\n const {\n data: {\n processBookingWorkshop: {\n eventSlot: {\n eventSlotGroup: {\n eventLocation: { event }\n }\n }\n }\n }\n } = bookingResult;\n const {\n data: {\n processBookingWorkshop: {\n eventSlot: {\n eventSlotGroup: {\n eventLocation: {\n event: { eventCompany }\n }\n }\n }\n }\n }\n } = bookingResult;\n\n let booking = {\n firstname: processBookingWorkshop.firstname,\n lastname: processBookingWorkshop.lastname,\n email: processBookingWorkshop.email,\n mobile: processBookingWorkshop.mobile,\n event: event,\n eventSlotGroup: eventSlotGroup,\n eventLocation: eventLocation,\n eventSlot: eventSlot,\n eventCompany: eventCompany\n };\n\n // booking.eventSlotGroup = booking.eventSlot.eventSlotGroup;\n // booking.event = booking.eventSlot.eventSlotGroup.eventLocation.event.name;\n // booking.commsTemplateId =\n // booking.eventSlot.eventSlotGroup.eventLocation.event.commsTemplate;\n // booking.company =\n // booking.eventSlot.eventSlotGroup.eventLocation.event.eventCompany.name;\n return booking;\n } catch (err) {\n // eslint-disable-next-line no-console\n console.log(err, \"err\");\n return false;\n }\n }\n\n static async createBooking({\n firstname,\n lastname,\n email,\n mobile,\n dob,\n customData,\n startTime,\n eventBookingEventSlotId\n }) {\n let input = {\n firstname: firstname.trim(),\n lastname: lastname.trim(),\n email: email.trim(),\n dob: dob,\n customData: JSON.stringify(customData),\n startTime: startTime.toISOString(),\n eventSlot: eventBookingEventSlotId\n };\n\n if (mobile) {\n input.mobile = mobile;\n }\n\n const processingBooking = `mutation ProcessingBooking(\n $input: CreateBookingInput!\n ) {\n processBooking(input: $input){\n id\n firstname\n lastname\n email\n mobile\n dob\n customData\n createdAt\n twentyFourHourReminder\n fortyEightHourReminder\n searchField\n isDeleted\n eventSlot {\n id\n time\n length\n type\n booked\n isDeleted\n eventSlotGroup {\n id\n room\n date\n createdAt\n isDeleted\n assignedTo\n eventLocation {\n event {\n name\n commsTemplate\n preQuestionTemplate\n commsLink\n iCalendar\n bloodDropStart\n bloodDropEnd\n urinePotLocation\n eventCompany {\n name\n }\n }\n }\n } \n }\n }\n }`;\n\n const updateEventSlot = `mutation UpdateEventSlot(\n $input: UpdateEventSlotInput!\n $condition: ModelEventSlotConditionInput\n ) {\n updateEventSlot(input: $input, condition: $condition) {\n id\n time\n length\n type\n booked\n createdAt\n updatedAt\n isDeleted\n eventSlotGroup {\n id\n room\n date\n createdAt\n isDeleted\n assignedTo\n eventLocation {\n event {\n name\n commsTemplate\n eventCompany {\n name\n }\n }\n }\n } \n }\n }\n `;\n\n try {\n // success\n const bookingResult = await API.graphql({\n query: processingBooking,\n variables: {\n input\n },\n authMode: \"API_KEY\"\n });\n const {\n data: { processBooking }\n } = bookingResult;\n const {\n data: {\n processBooking: { eventSlot }\n }\n } = bookingResult;\n const {\n data: {\n processBooking: {\n eventSlot: { eventSlotGroup }\n }\n }\n } = bookingResult;\n const {\n data: {\n processBooking: {\n eventSlot: {\n eventSlotGroup: { eventLocation }\n }\n }\n }\n } = bookingResult;\n const {\n data: {\n processBooking: {\n eventSlot: {\n eventSlotGroup: {\n eventLocation: { event }\n }\n }\n }\n }\n } = bookingResult;\n const {\n data: {\n processBooking: {\n eventSlot: {\n eventSlotGroup: {\n eventLocation: {\n event: { eventCompany }\n }\n }\n }\n }\n }\n } = bookingResult;\n\n // Need to do this to trigger subscription event and make slot unavailable\n await API.graphql({\n query: updateEventSlot,\n variables: { input: { id: eventSlot.id, booked: 1 } },\n authMode: \"API_KEY\"\n });\n\n let booking = {\n firstname: processBooking.firstname,\n lastname: processBooking.lastname,\n email: processBooking.email,\n mobile: processBooking.mobile,\n event: event,\n eventSlotGroup: eventSlotGroup,\n eventLocation: eventLocation,\n eventSlot: eventSlot,\n eventCompany: eventCompany\n };\n return booking;\n } catch (err) {\n return false;\n }\n }\n\n static async updateBooking({\n id,\n firstname,\n lastname,\n email,\n mobile,\n dob,\n isDeleted,\n eventBookingEventSlotId,\n customData\n }) {\n const bookingResult = await API.graphql({\n query: mutations.updateEventBooking,\n variables: {\n input: {\n id: id,\n firstname: firstname,\n lastname: lastname,\n email: email,\n mobile: mobile,\n dob: dob,\n customData: JSON.stringify(customData),\n isDeleted: isDeleted,\n eventBookingEventSlotId: eventBookingEventSlotId\n }\n },\n authMode: \"AMAZON_COGNITO_USER_POOLS\"\n });\n const booking = bookingResult.data.updateEventBooking;\n\n const updateEventSlot = `mutation UpdateEventSlot(\n $input: UpdateEventSlotInput!\n $condition: ModelEventSlotConditionInput\n ) {\n updateEventSlot(input: $input, condition: $condition) {\n id\n time\n length\n type\n booked\n isDeleted\n eventSlotGroup {\n id\n room\n date\n createdAt\n isDeleted\n assignedTo\n eventLocation {\n event {\n name\n commsTemplate\n eventCompany {\n name\n }\n }\n }\n } \n }\n }\n `;\n\n const eventSlotResult = await API.graphql({\n query: updateEventSlot,\n variables: { input: { id: booking.eventSlot.id, booked: 1 } },\n authMode: \"API_KEY\"\n });\n\n booking.eventSlotGroup =\n eventSlotResult.data.updateEventSlot.eventSlotGroup;\n booking.event =\n eventSlotResult.data.updateEventSlot.eventSlotGroup.eventLocation.event.name;\n booking.commsTemplateId =\n eventSlotResult.data.updateEventSlot.eventSlotGroup.eventLocation.event.commsTemplate;\n booking.company =\n eventSlotResult.data.updateEventSlot.eventSlotGroup.eventLocation.event.eventCompany.name;\n return booking;\n }\n\n static async sendBookingEmail(input) {\n const startTime = input.slotTime.substring(0, 5);\n const endTime = input.slotTime.substring(8, 13);\n\n const getEventCommsTemplate = /* GraphQL */ `\n query GetEventCommsTemplate($id: ID!) {\n getEventCommsTemplate(id: $id) {\n id\n name\n emailSubject\n reminderEmailSubject\n emailTemplate\n reminderEmailTemplate\n smsReminderTemplate\n smsTemplate\n eventCommsTemplateAttachments(\n filter: { attachment: { eq: \"booking\" } }\n ) {\n items {\n id\n attachment\n name\n key\n isDeleted\n }\n }\n isDeleted\n }\n }\n `;\n\n const templates = await API.graphql({\n query: getEventCommsTemplate,\n variables: { id: input.commsTemplateId },\n authMode: \"API_KEY\"\n });\n\n let attachments = [];\n const templateAttachments =\n templates.data.getEventCommsTemplate.eventCommsTemplateAttachments.items;\n templateAttachments.forEach(function(attachment) {\n attachments.push({\n file: attachment.name,\n key: \"public/\" + attachment.key // eu-west-2:65d471cf-d67f-4f53-954a-3fa11331d276\n });\n });\n\n let emailBody = templates.data.getEventCommsTemplate.emailTemplate;\n emailBody = emailBody.replace(\n \"[user_fullname]\",\n input.firstname + \" \" + input.lastname\n );\n emailBody = emailBody.replace(\"[user_firstname]\", input.firstname);\n emailBody = emailBody.replace(\"[user_surname]\", input.lastname);\n emailBody = emailBody.replace(\"[event_name]\", input.event);\n emailBody = emailBody.replace(\"[event_start_time]\", startTime);\n emailBody = emailBody.replace(\"[event_end_time]\", endTime);\n emailBody = emailBody.replace(\n \"[event_date]\",\n moment(input.eventDate).format(\"DD/MM/YYYY\")\n );\n emailBody = emailBody.replace(\"[event_room_name]\", input.room);\n emailBody = emailBody.replace(\n \"[event_blood_start_time]\",\n input.bloodDropStart\n );\n emailBody = emailBody.replace(\"[event_blood_end_time]\", input.bloodDropEnd);\n emailBody = emailBody.replace(\n \"[event_urine_pot_location]\",\n input.urinePotLocation\n );\n emailBody = emailBody.replace(\"[event_link]\", input.commsLink);\n\n let eventDetails =\n `Date ` +\n moment(input.eventDate).format(\"DD/MM/YYYY\") +\n `
` +\n `Event ` +\n input.event +\n `
` +\n `Room ` +\n input.room +\n `
` +\n `Start ` +\n startTime +\n `
` +\n `End ` +\n endTime;\n\n emailBody = emailBody.replace(\"[event_details_table]\", eventDetails);\n emailBody = emailBody.replace(/\\n/g, \"
\");\n\n const txtMessage =\n \"Hi \" +\n input.firstname +\n \", your health assessment is at \" +\n startTime +\n \" on \" +\n moment(input.eventDate).format(\"DD/MM/YYYY\") +\n \" in \" +\n input.room +\n \". Please read your confirmation email for more details. Call 0800 170 17777 if you have any questions.\";\n\n const sender = \"HPTeam\";\n // const start = input.eventDate + \"T\" + startTime + \":00Z\";\n // const end = input.eventDate + \"T\" + endTime + \":00Z\";\n\n const tz = moment.tz.guess();\n const startObj = moment.tz(`${input.eventDate} ${startTime}`, tz);\n const endObj = moment.tz(`${input.eventDate} ${endTime}`, tz);\n // console.log(start, moment(start).tz(tz).format('Z'), startObj.toISOString(), startObj.isDST(),\"start\");\n // console.log(end, moment(end).tz(tz).format('Z'), endObj.toISOString(), endObj.isDST(),\"end\");\n\n const body = {\n receiver: \"\", //this.internationalMobile,\n sender: sender,\n message: txtMessage,\n toAddresses: [input.email],\n body: emailBody,\n subject: templates.data.getEventCommsTemplate.emailSubject,\n source: \"team@healthyperformance.co.uk\",\n dst: false, //startObj.isDST(),\n startTime: startObj.toISOString(),\n endTime: endObj.toISOString(),\n company: input.company,\n event: input.event,\n iCalendar: input.iCalendar,\n attachments: attachments\n };\n try {\n const result = await API.post(\n \"hpLambdaNotifyUserOfEventApi\",\n \"/events/sendEventEmail/\",\n {\n body\n }\n );\n return result;\n } catch (err) {\n await API.graphql({\n query: mutations.createBookingError,\n variables: {\n input: {\n error: `${err}`,\n payload: JSON.stringify(body),\n browser: JSON.stringify(input.browser)\n }\n },\n authMode: \"API_KEY\"\n });\n return false;\n }\n }\n\n static async sendTextMessage(input) {\n if (!input.mobile) {\n return false;\n }\n\n const internationalMobile = \"44\" + input.mobile.replace(/^0+/, \"\");\n const startTime = input.slotTime.substring(0, 5);\n const endTime = input.slotTime.substring(8, 13);\n\n const templates = await API.graphql({\n query: queries.getEventCommsTemplate,\n variables: { id: input.commsTemplateId },\n authMode: \"API_KEY\"\n });\n\n let txtMessage = templates.data.getEventCommsTemplate.smsTemplate;\n txtMessage = txtMessage.replace(\n \"[user_fullname]\",\n input.firstname + \" \" + input.lastname\n );\n txtMessage = txtMessage.replace(\"[user_firstname]\", input.firstname);\n txtMessage = txtMessage.replace(\"[user_surname]\", input.lastname);\n txtMessage = txtMessage.replace(\"[event_start_time]\", startTime);\n txtMessage = txtMessage.replace(\"[event_end_time]\", endTime);\n txtMessage = txtMessage.replace(\n \"[event_date]\",\n moment(input.eventDate).format(\"DD/MM/YYYY\")\n );\n txtMessage = txtMessage.replace(\"[event_name]\", input.event);\n txtMessage = txtMessage.replace(\"[event_room_name]\", input.room);\n\n // Send an SMS\n const numbers = [internationalMobile];\n\n const body = {\n message: txtMessage,\n number: numbers\n };\n\n API.post(\"hpLambdaNotifyUserOfEventApi\", \"/events/sendSmsMessage/\", {\n body\n });\n }\n\n static async cancelBooking({ bookingId, slotId, iCalendar }) {\n const deleteEventBooking = `mutation DeleteEventBooking(\n $input: DeleteEventBookingInput!\n $condition: ModelEventBookingConditionInput\n ) {\n deleteEventBooking(input: $input, condition: $condition) {\n id\n firstname\n lastname\n email\n mobile\n dob\n isDeleted\n eventSlot {\n id\n time\n length\n type\n booked\n isDeleted\n eventSlotGroup {\n id\n room\n date\n createdAt\n isDeleted\n eventLocation {\n id\n postcode\n event {\n id\n name\n eventCompany {\n id\n name\n }\n }\n }\n } \n }\n }\n }\n `;\n\n const dEventBooking = await API.graphql({\n query: deleteEventBooking,\n variables: { input: { id: bookingId } },\n authMode: \"API_KEY\"\n });\n\n if (slotId) {\n const updateEventSlot = `mutation UpdateEventSlot(\n $input: UpdateEventSlotInput!\n $condition: ModelEventSlotConditionInput\n ) {\n updateEventSlot(input: $input, condition: $condition) {\n id\n time\n length\n type\n booked\n isDeleted\n eventSlotGroup {\n id\n room\n date\n createdAt\n isDeleted\n assignedTo\n eventLocation {\n event {\n name\n eventCompany {\n name\n }\n }\n }\n } \n }\n }\n `;\n\n // If workshop\n let customersBookedIn = 0;\n if (dEventBooking.data.deleteEventBooking.eventSlot.type === \"workshop\") {\n customersBookedIn =\n dEventBooking.data.deleteEventBooking.eventSlot.booked;\n customersBookedIn--;\n }\n\n await API.graphql({\n query: updateEventSlot,\n variables: { input: { id: slotId, booked: customersBookedIn } },\n authMode: \"API_KEY\"\n });\n }\n\n if (dEventBooking.data.deleteEventBooking.id) {\n const eventBooking = dEventBooking.data.deleteEventBooking;\n\n let emailBody = `Dear [user_firstname]

\n \n Please accept this email as confirmation of your cancelled appointment.

\n \n [event_details_table]
\n \n If you would like to rebook another appointment please click here: ${window.location.origin} .

\n \n Healthy regards

\n Healthy Performance Team
\n 0800 170 1777
\n team@healthyperformance.co.uk
\n `;\n\n emailBody = emailBody.replace(\"[user_firstname]\", eventBooking.firstname);\n\n const startTime = eventBooking.eventSlot.time.substring(0, 5);\n const endTime = eventBooking.eventSlot.time.substring(8, 13);\n\n let eventDetails =\n `Date ` +\n moment(eventBooking.eventSlot.eventSlotGroup.date).format(\n \"DD/MM/YYYY\"\n ) +\n `
` +\n `Event ` +\n eventBooking.eventSlot.eventSlotGroup.eventLocation.event.name +\n `
` +\n `Room ` +\n eventBooking.eventSlot.eventSlotGroup.room +\n `
` +\n `Start ` +\n startTime +\n `
` +\n `End ` +\n endTime +\n `
`;\n\n emailBody = emailBody.replace(\"[event_details_table]\", eventDetails);\n const start =\n eventBooking.eventSlot.eventSlotGroup.date + \" \" + startTime;\n const end = eventBooking.eventSlot.eventSlotGroup.date + \" \" + endTime;\n\n const body = {\n toAddresses: [dEventBooking.data.deleteEventBooking.email],\n body: emailBody,\n subject: \"Booking Cancellation\",\n source: \"team@healthyperformance.co.uk\",\n company:\n eventBooking.eventSlot.eventSlotGroup.eventLocation.event.eventCompany\n .name,\n event: eventBooking.eventSlot.eventSlotGroup.eventLocation.event.name,\n dst: moment(start).isDST(),\n startTime: start,\n endTime: end,\n iCalendar: iCalendar\n };\n\n const result = await API.post(\n \"hpLambdaNotifyUserOfEventApi\",\n \"/events/sendCancelBookingEmail\",\n {\n body\n }\n );\n\n return result;\n }\n }\n\n static customFields(event) {\n let collectUserDatas = [];\n const rules = {\n required: v => !!v || \"This field is required.\",\n email: v => /.+@.+/.test(v) || \"E-mail must be valid\"\n };\n if (event) {\n event.eventCollectUserData.items.forEach(function(collectUserData) {\n // Validation\n let validation = [];\n // Check if custom field is only for custom use\n if (collectUserData.internalUse !== true) {\n collectUserData.validation.forEach(function(validationType) {\n if (validationType === \"required\") {\n validation.push(rules.required);\n }\n if (validationType === \"email\") {\n validation.push(rules.email);\n }\n });\n\n let fieldName = collectUserData.label\n .trim() //might need polyfill if you need to support older browsers\n .toLowerCase() //lower case everything\n .replace(\n /([^A-Z0-9]+)(.?)/gi, //match multiple non-letter/numbers followed by any character\n function() {\n return arguments[2].toUpperCase(); //3rd index is the character we need to transform uppercase\n }\n );\n\n if (collectUserData.questionType === \"EMPLOYEE\") {\n fieldName = \"employeeNumber\";\n }\n\n // Build custom fields\n collectUserDatas.push({\n id: collectUserData.id,\n label: collectUserData.label,\n fieldName: fieldName,\n success: collectUserData.success,\n error: collectUserData.error,\n hint: collectUserData.hint,\n questionType: collectUserData.questionType,\n fieldType: collectUserData.fieldType,\n validation: validation,\n options: []\n });\n\n // If select box get select options\n if (collectUserData.fieldType === \"select\") {\n if (collectUserData.eventCollectUserDataOptions.items.length > 0) {\n let opts = collectUserData.eventCollectUserDataOptions.items.map(\n function(option) {\n return {\n text: option.options,\n value: option.options\n };\n }\n );\n opts = _.orderBy(opts, \"text\", \"asc\");\n collectUserDatas[collectUserDatas.length - 1].options = opts;\n }\n }\n }\n });\n return collectUserDatas;\n }\n }\n\n static allCustomFields(event) {\n let collectUserDatas = [];\n const rules = {\n required: v => !!v || \"This field is required.\",\n email: v => /.+@.+/.test(v) || \"E-mail must be valid\"\n };\n if (event) {\n event.eventCollectUserData.items.forEach(function(collectUserData) {\n // Validation\n let validation = [];\n collectUserData.validation.forEach(function(validationType) {\n if (validationType === \"required\") {\n validation.push(rules.required);\n }\n if (validationType === \"email\") {\n validation.push(rules.email);\n }\n });\n\n let fieldName = collectUserData.label\n .trim() //might need polyfill if you need to support older browsers\n .toLowerCase() //lower case everything\n .replace(\n /([^A-Z0-9]+)(.?)/gi, //match multiple non-letter/numbers followed by any character\n function() {\n return arguments[2].toUpperCase(); //3rd index is the character we need to transform uppercase\n }\n );\n\n if (collectUserData.questionType === \"EMPLOYEE\") {\n fieldName = \"employeeNumber\";\n }\n\n // Build custom fields\n collectUserDatas.push({\n id: collectUserData.id,\n label: collectUserData.label,\n fieldName: fieldName,\n success: collectUserData.success,\n error: collectUserData.error,\n hint: collectUserData.hint,\n questionType: collectUserData.questionType,\n fieldType: collectUserData.fieldType,\n validation: validation,\n options: []\n });\n\n // If select box get select options\n if (collectUserData.fieldType === \"select\") {\n if (collectUserData.eventCollectUserDataOptions.items.length > 0) {\n let opts = collectUserData.eventCollectUserDataOptions.items.map(\n function(option) {\n return {\n text: option.options,\n value: option.options\n };\n }\n );\n opts = _.orderBy(opts, \"text\", \"asc\");\n collectUserDatas[collectUserDatas.length - 1].options = opts;\n }\n }\n });\n return collectUserDatas;\n }\n }\n\n static async searchBookingBySearchField({ searchQuery, nextToken }) {\n const bookingBySearchField = /* GraphQL */ `\n query BookingBySearchField(\n $searchField: String\n $sortDirection: ModelSortDirection\n $filter: ModelEventBookingFilterInput\n $limit: Int\n $nextToken: String\n ) {\n bookingBySearchField(\n searchField: $searchField\n sortDirection: $sortDirection\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n ) {\n items {\n id\n firstname\n lastname\n email\n mobile\n attendance\n dob\n isDeleted\n eventSlot {\n id\n time\n type\n length\n booked\n eventSlotGroup {\n room\n date\n eventLocation {\n event {\n id\n iCalendar\n type\n }\n }\n }\n }\n }\n nextToken\n }\n }\n `;\n\n const {\n data: { bookingBySearchField: events }\n } = await API.graphql({\n query: bookingBySearchField,\n variables: {\n searchField: searchQuery.toLowerCase(),\n nextToken: nextToken\n }\n });\n return events;\n }\n\n static async searchBookingByField({ filter, nextToken }) {\n const listEventBookings = /* GraphQL */ `\n query ListEventBookings(\n $filter: ModelEventBookingFilterInput\n $limit: Int\n $nextToken: String\n ) {\n listEventBookings(\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n ) {\n items {\n id\n firstname\n lastname\n email\n mobile\n dob\n customData\n createdAt\n startTime\n twentyFourHourReminder\n fortyEightHourReminder\n searchField\n isDeleted\n updatedAt\n eventSlot {\n id\n time\n length\n type\n booked\n isDeleted\n createdAt\n updatedAt\n eventSlotGroup {\n room\n date\n eventLocation {\n event {\n id\n iCalendar\n type\n }\n }\n }\n }\n }\n nextToken\n }\n }\n `;\n\n const {\n data: { listEventBookings: events }\n } = await API.graphql({\n query: listEventBookings,\n variables: {\n filter,\n nextToken: nextToken\n }\n });\n return events;\n }\n}\n"],"sourceRoot":""}