-
Notifications
You must be signed in to change notification settings - Fork 0
/
1-es5.b568663655ceb1dc5f8d.js
1 lines (1 loc) · 50.8 KB
/
1-es5.b568663655ceb1dc5f8d.js
1
!function(){function e(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function n(){var e=u(["\n mutation AddUpsertPersonToSimpleBooking($personBookingUpsertObject: [Person_insert_input!]!) {\n insert_Person(objects: $personBookingUpsertObject) {\n affected_rows\n returning {\n randomUUID\n personFirstName\n PersonBookings {\n randomUUID\n Booking {\n randomUUID\n Event {\n randomUUID\n eventName\n }\n }\n }\n }\n }\n }\n"]);return n=function(){return e},e}function t(){var e=u(["\n subscription GetPersonBookings {\n PersonBooking {\n Person {\n randomUUID\n personFirstName\n }\n randomUUID\n checkInDateTime\n checkOutDateTime\n Booking {\n randomUUID\n Event {\n eventName\n eventStartDateTime\n eventEndDateTime\n }\n }\n }\n }\n"]);return t=function(){return e},e}function r(){var e=u(["\n subscription GetEventsBookedPeople {\n Event {\n randomUUID\n eventName\n eventStartDateTime\n eventEndDateTime\n eventDescription\n eventCapacity\n Bookings {\n PersonBookings {\n Person {\n randomUUID\n personFirstName\n }\n Booking {\n randomUUID\n }\n }\n }\n }\n }\n"]);return r=function(){return e},e}function i(){var e=u(["\n subscription GetPeopleBookedEvents {\n Person {\n personFirstName\n randomUUID\n PersonBookings {\n randomUUID\n checkInDateTime\n checkOutDateTime\n magicCode\n Booking {\n randomUUID\n Event {\n randomUUID\n eventName\n eventStartDateTime\n eventEndDateTime\n eventCapacity\n eventCategory\n eventDateTimeRange\n }\n }\n }\n }\n }\n"]);return i=function(){return e},e}function o(){var e=u(['\n mutation BookPersonByEventUUID(\n $eventUUIDEquals: uuid! = "d3287e4d-8712-4420-af63-7678a526cefa"\n $personEmailAddress: String! = "[email protected]"\n $personFirstName: String! = "test"\n $personLastName: String! = "test"\n $personPhoneNumber: String! = "123456789"\n ) {\n insert_Person_one(\n object: {\n personFirstName: $personFirstName\n personLastName: $personLastName\n personPhoneNumber: $personPhoneNumber\n personEmailAddress: $personEmailAddress\n PersonBookings: {\n data: {\n Booking: {\n data: {\n Event: {\n data: {\n bookingAvailableEndDateTime: "2001-06-28T15:05:34.336079+00:00"\n bookingAvailableStartDateTime: "2001-05-28T15:05:34.336079+00:00"\n eventEndDateTime: "2002-07-28T15:05:34.336079+00:00"\n eventStartDateTime: "2001-07-28T15:05:34.336079+00:00"\n eventDateTimeRange: "[2001-05-28T15:05:34.336079+00:00, 2001-06-28T15:05:34.336079+00:00]"\n bookingAvailabilityDateTimeRange: "[2001-05-28T15:05:34.336079+00:00, 2001-06-28T15:05:34.336079+00:00]"\n eventName: "churchEventTest"\n eventMedium: "In-person"\n eventCapacity: 40\n eventDescription: "churchEventTest"\n eventCategory: "churchEventTest"\n eventTopic: "churchEventTest"\n randomUUID: $eventUUIDEquals\n }\n on_conflict: { constraint: Event_randomUUID_key, update_columns: updated_at }\n }\n }\n on_conflict: { constraint: Booking_randomUUID_key, update_columns: updated_at }\n }\n }\n on_conflict: { constraint: PersonBooking_bookingID_personID_key, update_columns: updated_at }\n }\n }\n on_conflict: {\n constraint: Person_personFirstName_personLastName_personPhoneNumber_personE\n update_columns: updated_at\n }\n ) {\n personFirstName\n randomUUID\n PersonBookings {\n randomUUID\n Booking {\n randomUUID\n magicCode\n Event {\n randomUUID\n eventName\n eventStartDateTime\n eventEndDateTime\n bookingAvailableStartDateTime\n bookingAvailableEndDateTime\n eventCapacity\n eventDescription\n }\n }\n }\n PersonBookings_aggregate {\n aggregate {\n count(columns: randomUUID)\n }\n }\n }\n }\n']);return o=function(){return e},e}function a(){var e=u(['\n subscription GetPersonsRootEventUUID($eventUUIDEquals: uuid! = "2b2fe8d6-1460-4db3-ae4b-be7b9510c4a9") {\n Event(where: { randomUUID: { _eq: $eventUUIDEquals } }) {\n Bookings {\n PersonBookings {\n checkInDateTime\n checkOutDateTime\n Person {\n personFirstName\n randomUUID\n }\n }\n magicCode\n randomUUID\n PersonBookings_aggregate {\n aggregate {\n count(columns: updated_at)\n }\n }\n }\n Bookings_aggregate {\n aggregate {\n count(columns: randomUUID)\n }\n }\n eventName\n eventCapacity\n eventCategory\n eventStartDateTime\n eventEndDateTime\n bookingAvailableStartDateTime\n bookingAvailableEndDateTime\n eventTopic\n randomUUID\n created_at\n eventDescription\n eventDateTimeRange\n }\n }\n']);return a=function(){return e},e}function s(){var e=u(['\n subscription GetPersonsForEvent($eventUUIDEquals: uuid! = "2b2fe8d6-1460-4db3-ae4b-be7b9510c4a9") {\n PersonBooking(where: { Booking: { Event: { randomUUID: { _eq: $eventUUIDEquals } } } }) {\n checkInDateTime\n checkOutDateTime\n randomUUID\n Person {\n personFirstName\n randomUUID\n }\n Booking {\n Event {\n eventName\n eventStartDateTime\n eventEndDateTime\n bookingAvailableStartDateTime\n bookingAvailableEndDateTime\n EventRooms {\n roomName\n eventRoomUUID\n eventRoomDetails\n }\n Bookings_aggregate {\n aggregate {\n count(columns: magicCode)\n }\n }\n }\n }\n }\n }\n']);return s=function(){return e},e}function c(){var e=u(['\n # Number of people (primary + secondary). Rather than primary user bookings.\n subscription GetCountPersonBookingsForEvent($eventUUIDEquals: uuid! = "") {\n PersonBooking_aggregate(where: { Booking: { Event: { randomUUID: { _eq: $eventUUIDEquals } } } }) {\n aggregate {\n count\n }\n }\n }\n']);return c=function(){return e},e}function u(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{EMzn:function(e,n,t){"use strict";t.r(n),t.d(n,"parse",(function(){return C})),t.d(n,"parseValue",(function(){return S})),t.d(n,"parseType",(function(){return P}));var r=t("rWdj");function i(e,n){if(!Boolean(e))throw new Error(n)}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"function"==typeof Symbol&&Symbol,"function"==typeof Symbol&&Symbol;var a="function"==typeof Symbol?Symbol.toStringTag:"@@toStringTag";function s(e,n){for(var t,r=/\r\n|[\n\r]/g,i=1,o=n+1;(t=r.exec(e.body))&&t.index<n;)i+=1,o=n+1-(t.index+t[0].length);return{line:i,column:o}}function c(e,n){var t=e.locationOffset.column-1,r=l(t)+e.body,i=n.line-1,o=n.line+(e.locationOffset.line-1),a=n.column+(1===n.line?t:0),s="".concat(e.name,":").concat(o,":").concat(a,"\n"),c=r.split(/\r\n|[\n\r]/g),p=c[i];if(p.length>120){for(var d=Math.floor(a/80),h=a%80,v=[],m=0;m<p.length;m+=80)v.push(p.slice(m,m+80));return s+u([["".concat(o),v[0]]].concat(v.slice(1,d+1).map((function(e){return["",e]})),[[" ",l(h-1)+"^"],["",v[d+1]]]))}return s+u([["".concat(o-1),c[i-1]],["".concat(o),p],["",l(a-1)+"^"],["".concat(o+1),c[i+1]]])}function u(e){var n=e.filter((function(e){return void 0!==e[1]})),t=Math.max.apply(Math,n.map((function(e){return e[0].length})));return n.map((function(e){var n,r=e[1];return l(t-(n=e[0]).length)+n+(r?" | "+r:" |")})).join("\n")}function l(e){return Array(e+1).join(" ")}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,n){return!n||"object"!==p(n)&&"function"!=typeof n?h(e):n}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){var n="function"==typeof Map?new Map:void 0;return(v=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return m(e,arguments,D(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),_(t,e)})(e)}function m(e,n,t){return(m=f()?Reflect.construct:function(e,n,t){var r=[null];r.push.apply(r,n);var i=new(Function.bind.apply(e,r));return t&&_(i,t.prototype),i}).apply(null,arguments)}function f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _(e,n){return(_=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function D(e){return(D=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var k=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&_(e,n)}(u,e);var n,t,r,i=(n=u,t=f(),function(){var e,r=D(n);if(t){var i=D(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return d(this,e)});function u(e,n,t,r,a,c,l){var p,v,m,f,_;!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,u),_=i.call(this,e);var D,k=Array.isArray(n)?0!==n.length?n:void 0:n?[n]:void 0,I=t;!I&&k&&(I=null===(D=k[0].loc)||void 0===D?void 0:D.source);var g,y=r;!y&&k&&(y=k.reduce((function(e,n){return n.loc&&e.push(n.loc.start),e}),[])),y&&0===y.length&&(y=void 0),r&&t?g=r.map((function(e){return s(t,e)})):k&&(g=k.reduce((function(e,n){return n.loc&&e.push(s(n.loc.source,n.loc.start)),e}),[]));var E,T=l;if(null==T&&null!=c){var b=c.extensions;"object"==o(E=b)&&null!==E&&(T=b)}return Object.defineProperties(h(_),{name:{value:"GraphQLError"},message:{value:e,enumerable:!0,writable:!0},locations:{value:null!==(p=g)&&void 0!==p?p:void 0,enumerable:null!=g},path:{value:null!=a?a:void 0,enumerable:null!=a},nodes:{value:null!=k?k:void 0},source:{value:null!==(v=I)&&void 0!==v?v:void 0},positions:{value:null!==(m=y)&&void 0!==m?m:void 0},originalError:{value:c},extensions:{value:null!==(f=T)&&void 0!==f?f:void 0,enumerable:null!=T}}),(null==c?void 0:c.stack)?(Object.defineProperty(h(_),"stack",{value:c.stack,writable:!0,configurable:!0}),d(_)):(Error.captureStackTrace?Error.captureStackTrace(h(_),u):Object.defineProperty(h(_),"stack",{value:Error().stack,writable:!0,configurable:!0}),_)}return(r=[{key:"toString",value:function(){return function(e){var n,t=e.message;if(e.nodes)for(var r=0,i=e.nodes;r<i.length;r++){var o=i[r];o.loc&&(t+="\n\n"+c((n=o.loc).source,s(n.source,n.start)))}else if(e.source&&e.locations)for(var a=0,u=e.locations;a<u.length;a++)t+="\n\n"+c(e.source,u[a]);return t}(this)}},{key:a,get:function(){return"Object"}}])&&function(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(u.prototype,r),u}(v(Error));function I(e,n,t){return new k("Syntax Error: ".concat(t),void 0,e,[n])}var g=t("/jXB"),y=t("klf5"),E=function(){function e(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};this.body=e,this.name=n,this.locationOffset=t,this.locationOffset.line>0||i(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||i(0,"column in locationOffset is 1-indexed and must be positive.")}var n;return(n=[{key:a,get:function(){return"Source"}}])&&function(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,n),e}(),T=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"}),b=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"}),N=t("BLR7"),U=function(){function e(e){var n=new y.b(T.SOF,0,0,0,0,null);this.source=e,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}var n=e.prototype;return n.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},n.lookahead=function(){var e=this.token;if(e.kind!==T.EOF)do{var n;e=null!==(n=e.next)&&void 0!==n?n:e.next=O(this,e)}while(e.kind===T.COMMENT);return e},e}();function A(e){return isNaN(e)?T.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function O(e,n){var t=e.source,r=t.body,i=r.length,o=function(e,n,t){for(var r=e.length,i=n;i<r;){var o=e.charCodeAt(i);if(9===o||32===o||44===o||65279===o)++i;else if(10===o)++i,++t.line,t.lineStart=i;else{if(13!==o)break;10===e.charCodeAt(i+1)?i+=2:++i,++t.line,t.lineStart=i}}return i}(r,n.end,e),a=e.line,s=1+o-e.lineStart;if(o>=i)return new y.b(T.EOF,i,i,a,s,n);var c=r.charCodeAt(o);switch(c){case 33:return new y.b(T.BANG,o,o+1,a,s,n);case 35:return function(e,n,t,r,i){var o,a=e.body,s=n;do{o=a.charCodeAt(++s)}while(!isNaN(o)&&(o>31||9===o));return new y.b(T.COMMENT,n,s,t,r,i,a.slice(n+1,s))}(t,o,a,s,n);case 36:return new y.b(T.DOLLAR,o,o+1,a,s,n);case 38:return new y.b(T.AMP,o,o+1,a,s,n);case 40:return new y.b(T.PAREN_L,o,o+1,a,s,n);case 41:return new y.b(T.PAREN_R,o,o+1,a,s,n);case 46:if(46===r.charCodeAt(o+1)&&46===r.charCodeAt(o+2))return new y.b(T.SPREAD,o,o+3,a,s,n);break;case 58:return new y.b(T.COLON,o,o+1,a,s,n);case 61:return new y.b(T.EQUALS,o,o+1,a,s,n);case 64:return new y.b(T.AT,o,o+1,a,s,n);case 91:return new y.b(T.BRACKET_L,o,o+1,a,s,n);case 93:return new y.b(T.BRACKET_R,o,o+1,a,s,n);case 123:return new y.b(T.BRACE_L,o,o+1,a,s,n);case 124:return new y.b(T.PIPE,o,o+1,a,s,n);case 125:return new y.b(T.BRACE_R,o,o+1,a,s,n);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return function(e,n,t,r,i){for(var o=e.body,a=o.length,s=n+1,c=0;s!==a&&!isNaN(c=o.charCodeAt(s))&&(95===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122);)++s;return new y.b(T.NAME,n,s,t,r,i,o.slice(n,s))}(t,o,a,s,n);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return function(e,n,t,r,i,o){var a=e.body,s=t,c=n,u=!1;if(45===s&&(s=a.charCodeAt(++c)),48===s){if((s=a.charCodeAt(++c))>=48&&s<=57)throw I(e,c,"Invalid number, unexpected digit after 0: ".concat(A(s),"."))}else c=x(e,c,s),s=a.charCodeAt(c);if(46===s&&(u=!0,s=a.charCodeAt(++c),c=x(e,c,s),s=a.charCodeAt(c)),69!==s&&101!==s||(u=!0,43!==(s=a.charCodeAt(++c))&&45!==s||(s=a.charCodeAt(++c)),c=x(e,c,s),s=a.charCodeAt(c)),46===s||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(s))throw I(e,c,"Invalid number, expected digit but got: ".concat(A(s),"."));return new y.b(u?T.FLOAT:T.INT,n,c,r,i,o,a.slice(n,c))}(t,o,c,a,s,n);case 34:return 34===r.charCodeAt(o+1)&&34===r.charCodeAt(o+2)?function(e,n,t,r,i,o){for(var a=e.body,s=n+3,c=s,u=0,l="";s<a.length&&!isNaN(u=a.charCodeAt(s));){if(34===u&&34===a.charCodeAt(s+1)&&34===a.charCodeAt(s+2))return l+=a.slice(c,s),new y.b(T.BLOCK_STRING,n,s+3,t,r,i,Object(N.a)(l));if(u<32&&9!==u&&10!==u&&13!==u)throw I(e,s,"Invalid character within String: ".concat(A(u),"."));10===u?(++s,++o.line,o.lineStart=s):13===u?(10===a.charCodeAt(s+1)?s+=2:++s,++o.line,o.lineStart=s):92===u&&34===a.charCodeAt(s+1)&&34===a.charCodeAt(s+2)&&34===a.charCodeAt(s+3)?(l+=a.slice(c,s)+'"""',c=s+=4):++s}throw I(e,s,"Unterminated string.")}(t,o,a,s,n,e):function(e,n,t,r,i){for(var o,a,s,c,u=e.body,l=n+1,p=l,d=0,h="";l<u.length&&!isNaN(d=u.charCodeAt(l))&&10!==d&&13!==d;){if(34===d)return h+=u.slice(p,l),new y.b(T.STRING,n,l+1,t,r,i,h);if(d<32&&9!==d)throw I(e,l,"Invalid character within String: ".concat(A(d),"."));if(++l,92===d){switch(h+=u.slice(p,l-1),d=u.charCodeAt(l)){case 34:h+='"';break;case 47:h+="/";break;case 92:h+="\\";break;case 98:h+="\b";break;case 102:h+="\f";break;case 110:h+="\n";break;case 114:h+="\r";break;case 116:h+="\t";break;case 117:var v=(o=u.charCodeAt(l+1),a=u.charCodeAt(l+2),s=u.charCodeAt(l+3),c=u.charCodeAt(l+4),R(o)<<12|R(a)<<8|R(s)<<4|R(c));if(v<0){var m=u.slice(l+1,l+5);throw I(e,l,"Invalid character escape sequence: \\u".concat(m,"."))}h+=String.fromCharCode(v),l+=4;break;default:throw I(e,l,"Invalid character escape sequence: \\".concat(String.fromCharCode(d),"."))}p=++l}}throw I(e,l,"Unterminated string.")}(t,o,a,s,n)}throw I(t,o,function(e){return e<32&&9!==e&&10!==e&&13!==e?"Cannot contain the invalid character ".concat(A(e),"."):39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(A(e),".")}(c))}function x(e,n,t){var r=e.body,i=n,o=t;if(o>=48&&o<=57){do{o=r.charCodeAt(++i)}while(o>=48&&o<=57);return i}throw I(e,i,"Invalid number, expected digit but got: ".concat(A(o),"."))}function R(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function C(e,n){return new w(e,n).parseDocument()}function S(e,n){var t=new w(e,n);t.expectToken(T.SOF);var r=t.parseValueLiteral(!1);return t.expectToken(T.EOF),r}function P(e,n){var t=new w(e,n);t.expectToken(T.SOF);var r=t.parseTypeReference();return t.expectToken(T.EOF),r}var w=function(){function e(e,n){var t="string"==typeof e?new E(e):e;t instanceof E||i(0,"Must provide Source. Received: ".concat(Object(r.a)(t),".")),this._lexer=new U(t),this._options=n}var n=e.prototype;return n.parseName=function(){var e=this.expectToken(T.NAME);return{kind:g.a.NAME,value:e.value,loc:this.loc(e)}},n.parseDocument=function(){var e=this._lexer.token;return{kind:g.a.DOCUMENT,definitions:this.many(T.SOF,this.parseDefinition,T.EOF),loc:this.loc(e)}},n.parseDefinition=function(){if(this.peek(T.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(T.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},n.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(T.BRACE_L))return{kind:g.a.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var n,t=this.parseOperationType();return this.peek(T.NAME)&&(n=this.parseName()),{kind:g.a.OPERATION_DEFINITION,operation:t,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},n.parseOperationType=function(){var e=this.expectToken(T.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},n.parseVariableDefinitions=function(){return this.optionalMany(T.PAREN_L,this.parseVariableDefinition,T.PAREN_R)},n.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:g.a.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(T.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(T.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},n.parseVariable=function(){var e=this._lexer.token;return this.expectToken(T.DOLLAR),{kind:g.a.VARIABLE,name:this.parseName(),loc:this.loc(e)}},n.parseSelectionSet=function(){var e=this._lexer.token;return{kind:g.a.SELECTION_SET,selections:this.many(T.BRACE_L,this.parseSelection,T.BRACE_R),loc:this.loc(e)}},n.parseSelection=function(){return this.peek(T.SPREAD)?this.parseFragment():this.parseField()},n.parseField=function(){var e,n,t=this._lexer.token,r=this.parseName();return this.expectOptionalToken(T.COLON)?(e=r,n=this.parseName()):n=r,{kind:g.a.FIELD,alias:e,name:n,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(T.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(t)}},n.parseArguments=function(e){return this.optionalMany(T.PAREN_L,e?this.parseConstArgument:this.parseArgument,T.PAREN_R)},n.parseArgument=function(){var e=this._lexer.token,n=this.parseName();return this.expectToken(T.COLON),{kind:g.a.ARGUMENT,name:n,value:this.parseValueLiteral(!1),loc:this.loc(e)}},n.parseConstArgument=function(){var e=this._lexer.token;return{kind:g.a.ARGUMENT,name:this.parseName(),value:(this.expectToken(T.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},n.parseFragment=function(){var e=this._lexer.token;this.expectToken(T.SPREAD);var n=this.expectOptionalKeyword("on");return!n&&this.peek(T.NAME)?{kind:g.a.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:g.a.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},n.parseFragmentDefinition=function(){var e,n=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:g.a.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(n)}:{kind:g.a.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(n)}},n.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},n.parseValueLiteral=function(e){var n=this._lexer.token;switch(n.kind){case T.BRACKET_L:return this.parseList(e);case T.BRACE_L:return this.parseObject(e);case T.INT:return this._lexer.advance(),{kind:g.a.INT,value:n.value,loc:this.loc(n)};case T.FLOAT:return this._lexer.advance(),{kind:g.a.FLOAT,value:n.value,loc:this.loc(n)};case T.STRING:case T.BLOCK_STRING:return this.parseStringLiteral();case T.NAME:switch(this._lexer.advance(),n.value){case"true":return{kind:g.a.BOOLEAN,value:!0,loc:this.loc(n)};case"false":return{kind:g.a.BOOLEAN,value:!1,loc:this.loc(n)};case"null":return{kind:g.a.NULL,loc:this.loc(n)};default:return{kind:g.a.ENUM,value:n.value,loc:this.loc(n)}}case T.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},n.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:g.a.STRING,value:e.value,block:e.kind===T.BLOCK_STRING,loc:this.loc(e)}},n.parseList=function(e){var n=this,t=this._lexer.token;return{kind:g.a.LIST,values:this.any(T.BRACKET_L,(function(){return n.parseValueLiteral(e)}),T.BRACKET_R),loc:this.loc(t)}},n.parseObject=function(e){var n=this,t=this._lexer.token;return{kind:g.a.OBJECT,fields:this.any(T.BRACE_L,(function(){return n.parseObjectField(e)}),T.BRACE_R),loc:this.loc(t)}},n.parseObjectField=function(e){var n=this._lexer.token,t=this.parseName();return this.expectToken(T.COLON),{kind:g.a.OBJECT_FIELD,name:t,value:this.parseValueLiteral(e),loc:this.loc(n)}},n.parseDirectives=function(e){for(var n=[];this.peek(T.AT);)n.push(this.parseDirective(e));return n},n.parseDirective=function(e){var n=this._lexer.token;return this.expectToken(T.AT),{kind:g.a.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(n)}},n.parseTypeReference=function(){var e,n=this._lexer.token;return this.expectOptionalToken(T.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(T.BRACKET_R),e={kind:g.a.LIST_TYPE,type:e,loc:this.loc(n)}):e=this.parseNamedType(),this.expectOptionalToken(T.BANG)?{kind:g.a.NON_NULL_TYPE,type:e,loc:this.loc(n)}:e},n.parseNamedType=function(){var e=this._lexer.token;return{kind:g.a.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},n.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===T.NAME)switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(e)},n.peekDescription=function(){return this.peek(T.STRING)||this.peek(T.BLOCK_STRING)},n.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},n.parseSchemaDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");var t=this.parseDirectives(!0),r=this.many(T.BRACE_L,this.parseOperationTypeDefinition,T.BRACE_R);return{kind:g.a.SCHEMA_DEFINITION,description:n,directives:t,operationTypes:r,loc:this.loc(e)}},n.parseOperationTypeDefinition=function(){var e=this._lexer.token,n=this.parseOperationType();this.expectToken(T.COLON);var t=this.parseNamedType();return{kind:g.a.OPERATION_TYPE_DEFINITION,operation:n,type:t,loc:this.loc(e)}},n.parseScalarTypeDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");var t=this.parseName(),r=this.parseDirectives(!0);return{kind:g.a.SCALAR_TYPE_DEFINITION,description:n,name:t,directives:r,loc:this.loc(e)}},n.parseObjectTypeDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");var t=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:g.a.OBJECT_TYPE_DEFINITION,description:n,name:t,interfaces:r,directives:i,fields:o,loc:this.loc(e)}},n.parseImplementsInterfaces=function(){var e=[];if(this.expectOptionalKeyword("implements")){this.expectOptionalToken(T.AMP);do{var n;e.push(this.parseNamedType())}while(this.expectOptionalToken(T.AMP)||!0===(null===(n=this._options)||void 0===n?void 0:n.allowLegacySDLImplementsInterfaces)&&this.peek(T.NAME))}return e},n.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(T.BRACE_L)&&this._lexer.lookahead().kind===T.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(T.BRACE_L,this.parseFieldDefinition,T.BRACE_R)},n.parseFieldDefinition=function(){var e=this._lexer.token,n=this.parseDescription(),t=this.parseName(),r=this.parseArgumentDefs();this.expectToken(T.COLON);var i=this.parseTypeReference(),o=this.parseDirectives(!0);return{kind:g.a.FIELD_DEFINITION,description:n,name:t,arguments:r,type:i,directives:o,loc:this.loc(e)}},n.parseArgumentDefs=function(){return this.optionalMany(T.PAREN_L,this.parseInputValueDef,T.PAREN_R)},n.parseInputValueDef=function(){var e=this._lexer.token,n=this.parseDescription(),t=this.parseName();this.expectToken(T.COLON);var r,i=this.parseTypeReference();this.expectOptionalToken(T.EQUALS)&&(r=this.parseValueLiteral(!0));var o=this.parseDirectives(!0);return{kind:g.a.INPUT_VALUE_DEFINITION,description:n,name:t,type:i,defaultValue:r,directives:o,loc:this.loc(e)}},n.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");var t=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:g.a.INTERFACE_TYPE_DEFINITION,description:n,name:t,interfaces:r,directives:i,fields:o,loc:this.loc(e)}},n.parseUnionTypeDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");var t=this.parseName(),r=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:g.a.UNION_TYPE_DEFINITION,description:n,name:t,directives:r,types:i,loc:this.loc(e)}},n.parseUnionMemberTypes=function(){var e=[];if(this.expectOptionalToken(T.EQUALS)){this.expectOptionalToken(T.PIPE);do{e.push(this.parseNamedType())}while(this.expectOptionalToken(T.PIPE))}return e},n.parseEnumTypeDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");var t=this.parseName(),r=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:g.a.ENUM_TYPE_DEFINITION,description:n,name:t,directives:r,values:i,loc:this.loc(e)}},n.parseEnumValuesDefinition=function(){return this.optionalMany(T.BRACE_L,this.parseEnumValueDefinition,T.BRACE_R)},n.parseEnumValueDefinition=function(){var e=this._lexer.token,n=this.parseDescription(),t=this.parseName(),r=this.parseDirectives(!0);return{kind:g.a.ENUM_VALUE_DEFINITION,description:n,name:t,directives:r,loc:this.loc(e)}},n.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");var t=this.parseName(),r=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:g.a.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:t,directives:r,fields:i,loc:this.loc(e)}},n.parseInputFieldsDefinition=function(){return this.optionalMany(T.BRACE_L,this.parseInputValueDef,T.BRACE_R)},n.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===T.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},n.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var n=this.parseDirectives(!0),t=this.optionalMany(T.BRACE_L,this.parseOperationTypeDefinition,T.BRACE_R);if(0===n.length&&0===t.length)throw this.unexpected();return{kind:g.a.SCHEMA_EXTENSION,directives:n,operationTypes:t,loc:this.loc(e)}},n.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var n=this.parseName(),t=this.parseDirectives(!0);if(0===t.length)throw this.unexpected();return{kind:g.a.SCALAR_TYPE_EXTENSION,name:n,directives:t,loc:this.loc(e)}},n.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var n=this.parseName(),t=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===t.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:g.a.OBJECT_TYPE_EXTENSION,name:n,interfaces:t,directives:r,fields:i,loc:this.loc(e)}},n.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var n=this.parseName(),t=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===t.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:g.a.INTERFACE_TYPE_EXTENSION,name:n,interfaces:t,directives:r,fields:i,loc:this.loc(e)}},n.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var n=this.parseName(),t=this.parseDirectives(!0),r=this.parseUnionMemberTypes();if(0===t.length&&0===r.length)throw this.unexpected();return{kind:g.a.UNION_TYPE_EXTENSION,name:n,directives:t,types:r,loc:this.loc(e)}},n.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var n=this.parseName(),t=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();if(0===t.length&&0===r.length)throw this.unexpected();return{kind:g.a.ENUM_TYPE_EXTENSION,name:n,directives:t,values:r,loc:this.loc(e)}},n.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var n=this.parseName(),t=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();if(0===t.length&&0===r.length)throw this.unexpected();return{kind:g.a.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:t,fields:r,loc:this.loc(e)}},n.parseDirectiveDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(T.AT);var t=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var o=this.parseDirectiveLocations();return{kind:g.a.DIRECTIVE_DEFINITION,description:n,name:t,arguments:r,repeatable:i,locations:o,loc:this.loc(e)}},n.parseDirectiveLocations=function(){this.expectOptionalToken(T.PIPE);var e=[];do{e.push(this.parseDirectiveLocation())}while(this.expectOptionalToken(T.PIPE));return e},n.parseDirectiveLocation=function(){var e=this._lexer.token,n=this.parseName();if(void 0!==b[n.value])return n;throw this.unexpected(e)},n.loc=function(e){var n;if(!0!==(null===(n=this._options)||void 0===n?void 0:n.noLocation))return new y.a(e,this._lexer.lastToken,this._lexer.source)},n.peek=function(e){return this._lexer.token.kind===e},n.expectToken=function(e){var n=this._lexer.token;if(n.kind===e)return this._lexer.advance(),n;throw I(this._lexer.source,n.start,"Expected ".concat(L(e),", found ").concat(B(n),"."))},n.expectOptionalToken=function(e){var n=this._lexer.token;if(n.kind===e)return this._lexer.advance(),n},n.expectKeyword=function(e){var n=this._lexer.token;if(n.kind!==T.NAME||n.value!==e)throw I(this._lexer.source,n.start,'Expected "'.concat(e,'", found ').concat(B(n),"."));this._lexer.advance()},n.expectOptionalKeyword=function(e){var n=this._lexer.token;return n.kind===T.NAME&&n.value===e&&(this._lexer.advance(),!0)},n.unexpected=function(e){var n=null!=e?e:this._lexer.token;return I(this._lexer.source,n.start,"Unexpected ".concat(B(n),"."))},n.any=function(e,n,t){this.expectToken(e);for(var r=[];!this.expectOptionalToken(t);)r.push(n.call(this));return r},n.optionalMany=function(e,n,t){if(this.expectOptionalToken(e)){var r=[];do{r.push(n.call(this))}while(!this.expectOptionalToken(t));return r}return[]},n.many=function(e,n,t){this.expectToken(e);var r=[];do{r.push(n.call(this))}while(!this.expectOptionalToken(t));return r},e}();function B(e){var n=e.value;return L(e.kind)+(null!=n?' "'.concat(n,'"'):"")}function L(e){return function(e){return e===T.BANG||e===T.DOLLAR||e===T.AMP||e===T.PAREN_L||e===T.PAREN_R||e===T.SPREAD||e===T.COLON||e===T.EQUALS||e===T.AT||e===T.BRACKET_L||e===T.BRACKET_R||e===T.BRACE_L||e===T.PIPE||e===T.BRACE_R}(e)?'"'.concat(e,'"'):e}},IxO4:function(e,n,t){"use strict";t.d(n,"a",(function(){return r})),t.d(n,"d",(function(){return i})),t.d(n,"b",(function(){return a})),t.d(n,"e",(function(){return s})),t.d(n,"c",(function(){return c}));var r="EEEE d MMMM HH:mm 'UTC'ZZZ";function i(e,n,t,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:10,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:6048e5;return Array.from({length:i},(function(i,s){var c=s,u=e.getTime(),l=n.getTime(),p=t.getTime(),d=r.getTime(),h=a*c,v=p+h,m=d+h;return{eventStartEndDateTime:o(u+h,l+h),bookingStartEndDateTime:o(v,m)}}))}function o(e,n){var t=new Date(e),r=new Date(n);return{startDateTime:t,endDateTime:r,startEndDateTimeRangeTstzRangeText:c(t,r)}}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;return 864e5*e}function s(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=new Date;o.setDate(o.getDate()+(e+(7-o.getDay()))%7);var a=o.setHours(n,t,r,i);return new Date(a)}function c(e,n){return'[\\"'.concat(e.toISOString(),'\\", \\"').concat(n.toISOString(),'\\"]')}},Ok9p:function(e,n,t){"use strict";t.d(n,"a",(function(){return r})),t.d(n,"b",(function(){return i})),t.d(n,"c",(function(){return o})),t.d(n,"d",(function(){return a})),t.d(n,"e",(function(){return s})),t.d(n,"f",(function(){return c})),t.d(n,"g",(function(){return u})),t.d(n,"h",(function(){return l})),t.d(n,"i",(function(){return p})),t.d(n,"j",(function(){return d})),t.d(n,"k",(function(){return h})),t.d(n,"l",(function(){return v})),t.d(n,"m",(function(){return m})),t.d(n,"n",(function(){return f})),t.d(n,"o",(function(){return _})),t.d(n,"p",(function(){return D}));var r=function(e){return e.Booking_bookingID_eventID_key="Booking_bookingID_eventID_key",e.Booking_bookingID_eventID_userID_created_at_updated_at_key="Booking_bookingID_eventID_userID_created_at_updated_at_key",e.Booking_bookingID_eventID_userID_key="Booking_bookingID_eventID_userID_key",e.Booking_pkey="Booking_pkey",e.Booking_randomUUID_key="Booking_randomUUID_key",e}({}),i=function(e){return e.bookingID="bookingID",e.created_at="created_at",e.eventID="eventID",e.magicCode="magicCode",e.randomUUID="randomUUID",e.updated_at="updated_at",e.userID="userID",e}({}),o=function(e){return e.EventRoom_eventID_roomID_key="EventRoom_eventID_roomID_key",e.EventRoom_eventID_roomID_venueID_key="EventRoom_eventID_roomID_venueID_key",e.EventRoom_eventRoomID_eventID_roomID_venueID_roomName_event_key="EventRoom_eventRoomID_eventID_roomID_venueID_roomName_event_key",e.EventRoom_eventRoomUUID_key="EventRoom_eventRoomUUID_key",e.EventRoom_pkey="EventRoom_pkey",e}({}),a=function(e){return e.created_at="created_at",e.eventID="eventID",e.eventRoomDetails="eventRoomDetails",e.eventRoomID="eventRoomID",e.eventRoomUUID="eventRoomUUID",e.roomID="roomID",e.roomName="roomName",e.updated_at="updated_at",e.venueID="venueID",e}({}),s=function(e){return e.Event_eventID_organiserID_eventName_eventStartDateTime_even_key="Event_eventID_organiserID_eventName_eventStartDateTime_even_key",e.Event_pkey="Event_pkey",e.Event_randomUUID_key="Event_randomUUID_key",e}({}),c=function(e){return e.bookingAvailabilityDateTimeRange="bookingAvailabilityDateTimeRange",e.bookingAvailableEndDateTime="bookingAvailableEndDateTime",e.bookingAvailableStartDateTime="bookingAvailableStartDateTime",e.created_at="created_at",e.eventCapacity="eventCapacity",e.eventCategory="eventCategory",e.eventDateTimeRange="eventDateTimeRange",e.eventDescription="eventDescription",e.eventEndDateTime="eventEndDateTime",e.eventID="eventID",e.eventMedium="eventMedium",e.eventName="eventName",e.eventStartDateTime="eventStartDateTime",e.eventTopic="eventTopic",e.organiserID="organiserID",e.randomUUID="randomUUID",e.updated_at="updated_at",e}({}),u=function(e){return e.Organiser_organiserID_organiserDetails_userID_created_at_up_key="Organiser_organiserID_organiserDetails_userID_created_at_up_key",e.Organiser_pkey="Organiser_pkey",e.Organiser_randomUUID_key="Organiser_randomUUID_key",e}({}),l=function(e){return e.created_at="created_at",e.organiserDetails="organiserDetails",e.organiserID="organiserID",e.randomUUID="randomUUID",e.updated_at="updated_at",e.userID="userID",e}({}),p=function(e){return e.PersonBooking_bookingID_personID_key="PersonBooking_bookingID_personID_key",e.PersonBooking_personBookingID_personID_bookingID_checkInDat_key="PersonBooking_personBookingID_personID_bookingID_checkInDat_key",e.PersonBooking_pkey="PersonBooking_pkey",e.PersonBooking_randomUUID_key="PersonBooking_randomUUID_key",e}({}),d=function(e){return e.bookingID="bookingID",e.checkInDateTime="checkInDateTime",e.checkOutDateTime="checkOutDateTime",e.created_at="created_at",e.magicCode="magicCode",e.personBookingID="personBookingID",e.personID="personID",e.randomUUID="randomUUID",e.updated_at="updated_at",e}({}),h=function(e){return e.Room_pkey="Room_pkey",e.Room_randomUUID_key="Room_randomUUID_key",e.Room_roomID_venueID_roomName_key="Room_roomID_venueID_roomName_key",e.Room_roomID_venueID_roomName_roomType_roomCapacity_roomAvai_key="Room_roomID_venueID_roomName_roomType_roomCapacity_roomAvai_key",e.Room_venueID_roomName_key="Room_venueID_roomName_key",e}({}),v=function(e){return e.created_at="created_at",e.randomUUID="randomUUID",e.roomAvailableOperationalFloorArea="roomAvailableOperationalFloorArea",e.roomCapacity="roomCapacity",e.roomID="roomID",e.roomName="roomName",e.roomType="roomType",e.roomVenueFloorLevel="roomVenueFloorLevel",e.updated_at="updated_at",e.venueID="venueID",e}({}),m=function(e){return e.User_emailAddress_key="User_emailAddress_key",e.User_pkey="User_pkey",e.User_randomUUID_key="User_randomUUID_key",e.User_userID_username_emailAddress_created_at_updated_at_key="User_userID_username_emailAddress_created_at_updated_at_key",e.User_username_key="User_username_key",e}({}),f=function(e){return e.created_at="created_at",e.emailAddress="emailAddress",e.randomUUID="randomUUID",e.updated_at="updated_at",e.userID="userID",e.username="username",e}({}),_=function(e){return e.Venue_pkey="Venue_pkey",e.Venue_randomUUID_key="Venue_randomUUID_key",e.Venue_venueID_venueName_venueDescription_venueContact_locat_key="Venue_venueID_venueName_venueDescription_venueContact_locat_key",e}({}),D=function(e){return e.created_at="created_at",e.locationID="locationID",e.randomUUID="randomUUID",e.updated_at="updated_at",e.venueContact="venueContact",e.venueDescription="venueDescription",e.venueID="venueID",e.venueName="venueName",e}({})},lTCR:function(e,n,t){var r=t("EMzn").parse;function i(e){return e.replace(/[\s,]+/g," ").trim()}var o={},a={},s=!0,c=!1;function u(e){var n=i(e);if(o[n])return o[n];var t=r(e,{experimentalFragmentVariables:c});if(!t||"Document"!==t.kind)throw new Error("Not a valid GraphQL document.");return t=function e(n,t){var r=Object.prototype.toString.call(n);if("[object Array]"===r)return n.map((function(n){return e(n,t)}));if("[object Object]"!==r)throw new Error("Unexpected input.");t&&n.loc&&delete n.loc,n.loc&&(delete n.loc.startToken,delete n.loc.endToken);var i,o,a,s=Object.keys(n);for(i in s)s.hasOwnProperty(i)&&(o=n[s[i]],"[object Object]"!==(a=Object.prototype.toString.call(o))&&"[object Array]"!==a||(n[s[i]]=e(o,!0)));return n}(t=function(e){for(var n,t={},r=[],o=0;o<e.definitions.length;o++){var c=e.definitions[o];if("FragmentDefinition"===c.kind){var u=c.name.value,l=i((n=c.loc).source.body.substring(n.start,n.end));a.hasOwnProperty(u)&&!a[u][l]?(s&&console.warn("Warning: fragment with name "+u+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"),a[u][l]=!0):a.hasOwnProperty(u)||(a[u]={},a[u][l]=!0),t[l]||(t[l]=!0,r.push(c))}else r.push(c)}return e.definitions=r,e}(t),!1),o[n]=t,t}function l(){for(var e=Array.prototype.slice.call(arguments),n=e[0],t="string"==typeof n?n:n[0],r=1;r<e.length;r++)t+=e[r]&&e[r].kind&&"Document"===e[r].kind?e[r].loc.source.body:e[r],t+=n[r];return u(t)}l.default=l,l.resetCaches=function(){o={},a={}},l.disableFragmentWarnings=function(){s=!1},l.enableExperimentalFragmentVariables=function(){c=!0},l.disableExperimentalFragmentVariables=function(){c=!1},e.exports=l},t0hA:function(u,l,p){"use strict";p.d(l,"a",(function(){return N})),p.d(l,"b",(function(){return U}));var d=p("lTCR"),h=p.n(d),v=p("pLZG"),m=p("lJxs"),f=p("IxO4"),_=p("Ok9p"),D=p("8Y7J"),k=p("nbgS"),I="[email protected]",g=h.a(c()),y=h.a(s()),E=(h.a(a()),h.a(o())),T=h.a(i()),b=(h.a(r()),h.a(t()),h.a(n())),N=function(){var n=function(){function n(e){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),this.apollo=e}var t,r,i;return t=n,(r=[{key:"getLatestPersonCountForEventUUID",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"667c1a54-3c59-4eff-a507-b55a80094249";return arguments.length>1&&void 0!==arguments[1]||this.apollo,this.getNumberOfPersonBookingsForEvent(e).pipe(Object(v.a)((function(e){var n,t,r=e.data;return void 0!==(null===(t=null===(n=null==r?void 0:r.PersonBooking_aggregate)||void 0===n?void 0:n.aggregate)||void 0===t?void 0:t.count)})),Object(m.a)((function(e){return e.data.PersonBooking_aggregate.aggregate.count})))}},{key:"getNumberOfPersonBookingsForEvent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"667c1a54-3c59-4eff-a507-b55a80094249",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.apollo;return n.subscribe({query:g,fetchPolicy:"cache-first",variables:{eventUUIDEquals:e}})}},{key:"getPersonsBookedByEventUUID",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.apollo;return n.subscribe({query:y,fetchPolicy:"cache-first",variables:{eventUUIDEquals:e}})}},{key:"getPersonsByRootEventUUID",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.apollo;return n.subscribe({query:g,fetchPolicy:"cache-first",variables:{eventUUIDEquals:e}})}},{key:"getPeopleBookedEvents",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.apollo;return e.subscribe({query:T,fetchPolicy:"cache-first"})}},{key:"getPersonsFromBookingUUID",value:function(e){arguments.length>1&&void 0!==arguments[1]||this.apollo}},{key:"addPersonToBookingByUUID",value:function(e,n){var t=n.personFirstName,r=n.personLastName,i=n.personPhoneNumber,o=n.personEmailAddress,a=n.randomUUID,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.apollo;return s.mutate({mutation:b,variables:{personBookingUpsertObject:[{personFirstName:t,personLastName:r,personPhoneNumber:i,personEmailAddress:o,randomUUID:a,PersonBookings:{data:[{Booking:{data:{randomUUID:e},on_conflict:{constraint:_.a.Booking_randomUUID_key,update_columns:[_.b.updated_at]}}}],on_conflict:{constraint:_.i.PersonBooking_randomUUID_key,update_columns:[_.j.updated_at]}}}]}})}},{key:"bookPersonByEventUUID",value:function(e,n){var t=n.personFirstName,r=n.personLastName,i=n.personPhoneNumber,o=n.personEmailAddress,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.apollo;return a.mutate({mutation:E,variables:{eventUUIDEquals:e,personFirstName:t,personLastName:r,personPhoneNumber:i,personEmailAddress:o}})}},{key:"addPersonToSimpleBookingEvent",value:function(e){var n=e.personFirstName,t=e.personLastName,r=e.personPhoneNumber,i=e.personEmailAddress,o=e.randomUUID,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.apollo;return this.getPersonBookingsDefaultedPlacehoilder(),a.mutate({mutation:b,variables:{personBookingUpsertObject:[{personFirstName:n,personLastName:t,personPhoneNumber:r,personEmailAddress:i,randomUUID:o,PersonBookings:{data:[{Booking:{data:{User:{data:{username:"bookee",emailAddress:"[email protected]"},on_conflict:{constraint:_.m.User_username_key,update_columns:[_.n.updated_at]}}},on_conflict:{constraint:_.a.Booking_randomUUID_key,update_columns:[_.b.updated_at]}}}],on_conflict:{constraint:_.i.PersonBooking_randomUUID_key,update_columns:[_.j.updated_at]}}}]}})}},{key:"getPersonBookingsDefaultedPlacehoilder",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getEventPlaceholder();return{data:[{magicCode:"nobody",Booking:{data:{Event:e,User:this.getUserPlaceholder(),magicCode:"nobody"},on_conflict:{constraint:_.a.Booking_randomUUID_key,update_columns:[_.b.updated_at]}}}],on_conflict:{constraint:_.i.PersonBooking_randomUUID_key,update_columns:[_.j.updated_at]}}}},{key:"getEventPlaceholder",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"667c1a54-3c59-4eff-a507-b55a80094249",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"nobody",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:I,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.getOrganiserPlaceholder(n,t),i=new Date,o=new Date(i.getTime()-Object(f.b)(2)),a=new Date(i.getTime()+Object(f.b)(7)),s=new Date(i.getTime()+Object(f.b)(9)),c=new Date(i.getTime()+Object(f.b)(10));return new Date(i.getTime()+Object(f.b)(10)),{data:{randomUUID:e,bookingAvailableStartDateTime:o,bookingAvailableEndDateTime:a,eventStartDateTime:s,eventEndDateTime:c,bookingAvailabilityDateTimeRange:"('2020-07-22T09:27:53.667Z', '2020-08-14T09:27:53.667Z']",eventDateTimeRange:"('2020-07-22T09:27:53.667Z', '2020-08-14T09:27:53.667Z']",eventName:"Sunday service",eventTopic:"Topic ",eventMedium:"In-person",eventCategory:"ChurchCategory",eventCapacity:49,eventDescription:"Description of community event",Organiser:r},on_conflict:{constraint:_.e.Event_randomUUID_key,update_columns:[_.f.updated_at]}}}},{key:"getOrganiserPlaceholder",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"nobody";return{data:{organiserDetails:e,User:this.getUserPlaceholder()},on_conflict:{constraint:_.g.Organiser_randomUUID_key,update_columns:[_.h.updated_at]}}}},{key:"getUserPlaceholder",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"nobody",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:I;return{data:{username:e,emailAddress:n},on_conflict:{constraint:_.m.User_username_key,update_columns:[_.n.updated_at]}}}}])&&e(t.prototype,r),i&&e(t,i),n}();return n.\u0275fac=function(e){return new(e||n)(D.Tb(k.b))},n.\u0275prov=D.Fb({token:n,factory:n.\u0275fac,providedIn:"root"}),n}();function U(e){return e.pipe(Object(v.a)((function(e){var n=e.errors;return void 0===n||0===n.length})),Object(m.a)((function(e){return e.data.PersonBooking_aggregate.aggregate.count})))}}}])}();