1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6171],{25487:function(e){function n(e){return Promise.resolve().then(function(){var n=Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n})}n.keys=function(){return[]},n.resolve=n,n.id=25487,e.exports=n},57832:function(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getNylasGrantByCoachId"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"coachId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nylasGrantByCoachId"},arguments:[{kind:"Argument",name:{kind:"Name",value:"coachId"},value:{kind:"Variable",name:{kind:"Name",value:"coachId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getNylasAccessToken"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nylasAccessToken"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getCoach"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"coach"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"nylasGrantId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"schedulerConfigurations"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nylasConfigurationId"},arguments:[],directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateCoachTimeZone"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"timeZone"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"timeZone"},value:{kind:"Variable",name:{kind:"Name",value:"timeZone"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"timeZone"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:493}};n.loc.source={body:"query getNylasGrantByCoachId($coachId: ID!) {\n nylasGrantByCoachId(coachId: $coachId) {\n id\n }\n}\n\nquery getNylasAccessToken {\n nylasAccessToken\n}\n\nquery getCoach($id: ID!) {\n coach(id: $id) {\n id\n nylasGrantId\n user {\n id\n firstName\n lastName\n email\n }\n schedulerConfigurations {\n nylasConfigurationId\n }\n }\n}\n\nmutation updateCoachTimeZone($id: ID!, $timeZone: String) {\n updateUser(id: $id, timeZone: $timeZone) {\n id\n timeZone\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var i={};function t(e,n){for(var i=0;i<e.definitions.length;i++){var t=e.definitions[i];if(t.name&&t.name.value==n)return t}}function a(e,n){var a={kind:e.kind,definitions:[t(e,n)]};e.hasOwnProperty("loc")&&(a.loc=e.loc);var r=i[n]||new Set,o=new Set,s=new Set;for(r.forEach(function(e){s.add(e)});s.size>0;){var l=s;s=new Set,l.forEach(function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach(function(e){s.add(e)}))})}return o.forEach(function(n){var i=t(e,n);i&&a.definitions.push(i)}),a}n.definitions.forEach(function(e){if(e.name){var n=new Set;(function e(n,i){if("FragmentSpread"===n.kind)i.add(n.name.value);
1else if("VariableDefinition"===n.kind){var t=n.type;"NamedType"===t.kind&&i.add(t.name.value)}n.selectionSet&&n.selectionSet.selections.forEach(function(n){e(n,i)}),n.variableDefinitions&&n.variableDefinitions.forEach(function(n){e(n,i)}),n.definitions&&n.definitions.forEach(function(n){e(n,i)})})(e,n),i[e.name.value]=n}}),e.exports=n,e.exports.getNylasGrantByCoachId=a(n,"getNylasGrantByCoachId"),e.exports.getNylasAccessToken=a(n,"getNylasAccessToken"),e.exports.getCoach=a(n,"getCoach"),e.exports.updateCoachTimeZone=a(n,"updateCoachTimeZone")},55681:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/scheduler",function(){return i(44399)}])},63953:function(e,n,i){"use strict";i.d(n,{I:function(){return t},R:function(){return a}});var t="session-token",a="payment-token"},80319:function(e,n,i){"use strict";i.d(n,{EN:function(){return w}});var t,a=i(30137),r=i(76341),o=i(67462),s=i(32207),l=i(93128),d=i(97582),c=i(85893),u=i(67294),v=i(56429),m=i(48702),f=i(48216),k=i(23795),h=i(99066),g=i(53768),y=i(63144),p=i.n(y),_=i(62286),C=i(65275),N=i(63953),S=i(82964),b=i(65032),T=i(2147),x=null,I=(null===(t=C.Z.getPlugin("react"))||void 0===t?void 0:t.createErrorBoundary(u))||u.Component,A=function(e){var n,i={current:e},t=(n=(0,a._)(function(e){var n,t,a;return(0,d.Jh)(this,function(s){return n=null,(t=i.current)&&(n=t.overrideCookies&&t.overrideCookies[N.I]||(0,_.parseCookies)(t)[N.I]),n||(n=localStorage.getItem(N.I)),n||(n=document.cookie.split(";").reduce(function(e,n){var i=(0,l._)(n.trim().split("="),2),t=i[0],a=i[1];return e[t]=a,e},{})[N.I]||null),a=e.getContext().headers||{},e.setContext({headers:(0,o._)((0,r._)({},a),{"Cache-Control":"no-cache",authorization:n?"Bearer ".concat(n):"",local_utc_offset:(0,S.k_)()})}),[2,e]})}),function(e){return n.apply(this,arguments)}),s=new v.u({uri:b.gJ.production,fetch:p()}),c=new m.i(function(e,n){return new f.y(function(i){var a;return Promise.resolve(e).then(t).then(function(e){a=n(e).subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)})}).catch(i.error.bind(i)),function(){a&&a.unsubscribe()}})}),u=new k.f({link:c.concat(s),cache:new h.h({possibleTypes:T,typePolicies:{Query:{fields:{workout:{keyArgs:["id"],read:function(e,n){var i=n.args,t=n.toReference;return(null==i?void 0:i.id)?t({__typename:"Workout",id:i.id}):void 0}},client:{keyArgs:["id"],read:function(e,n){var i=n.args,t=n.toReference;return(null==i?void 0:i.id)?t({__typename:"Client",id:i.id}):void 0}}}},BridgePayer:{keyFields:["name"]}}}),ssrMode:!0,defaultOptions:{watchQuery:{errorPolicy:"all"},query:{errorPolicy:"all"}}});return u.__contextRef=i,u},D=function(e){var n=(x||(x=A()),x);if(e){var i=n.extract(),t=(0,r._)({},i,e);n.cache.restore(t)}return n};function w(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.ssr,function(n){var i=n.apolloState,t=(0,s._)(n,["apolloState"]),a=D(i);return(0,c.jsx)(I,{children:(0,c.jsx)(g.e,{client:a,children:(0,c.jsx)(e,(0,r._)({},t))})})}}},44399:function(e,n,i){"use strict";i.r(n),i.d(n,{__N_SSP:function(){return U},default:function(){return L}});var t=i(85893),a=i(37977),r=i(93128),o=i(67294),s=i(55835),l=i(50319),d=i(5152),c=i.n(d),u=i(11163),v=i(25675),m=i.n(v),f=i(77113),k=i.n(f),h=i(30137),g=i(71484),y=i(76341),p=i(67462),_=i(97582),C=i(62286),N=i(39737),S=i(53353),b=/^scheduling\/configurations(\/[^/?]+)?$/,T=["POST","PUT","PATCH"],x=function(e){var n=e.method,i=e.path;return T.includes(String(n).toUpperCase())&&b.test(null!=i?i:"")},I=function(e,n){return"primary"===e||"string"==typeof n&&e.toLowerCase()===n.toLowerCase()},A=function(){function e(n){var i,t=n.accessToken,a=n.domain,r=n.user;(0,g._)(this,e);var o=(0,C.parseCookies)();this.accessToken=t,this.domain=a,this.grantId=null==r?void 0:null===(i=r.coach)||void 0===i?void 0:i.nylasGrantId,this.idToken=o["nylas-id-token"],this.email=null==r?void 0:r.email}var n=e.prototype;return n.request=function(e){var n=this;return(0,h._)(function(){var i,t,a,r,o;return(0,_.Jh)(this,function(s){switch(s.label){case 0:i=x(e)?function(e){var n=null==e?void 0:e.participants;if(!Array.isArray(n))return e;var i=!1,t=n.map(function(e){var n,t=null==e?void 0:null===(n=e.booking)||void 0===n?void 0:n.calendar_id;if("string"!=typeof t||!t)return e;var a=e.availability;if(null!=a&&!("object"==typeof a&&null!==a&&!Array.isArray(a)))return e;var r=null==a?void 0:a.calendar_ids;if(null!=r&&!(Array.isArray(r)&&r.every(function(e){return"string"==typeof e})))return e;var o=(null==r?void 0:r.length)?r:["primary"];return o.some(function(n){var i;return i=e.email,n===t||I(n,i)&&I(t,i)})?e:(i=!0,(0,p._)((0,y._)({},e),{availability:(0,p._)((0,y._)({},e.availability),{calendar_ids:(0,S._)(o).concat([t])})}))});return i?(0,p._)((0,y._)({},e),{participants:t}):e}(e.body):e.body,s.label=1;case 1:return s.trys.push([1,6,,7]),[4,fetch("".concat(n.domain,"/grants/").concat(n.grantId,"/").concat(e.path),{method:e.method,body:JSON.stringify(i),headers:(0,p._)((0,y._)({},e.headers),{Authorization:"Bearer ".concat(n.accessToken),"Content-Type":"application/json"})})];case 2:if((t=s.sent()).ok)return[3,4];return[4,t.json()];case 3:return console.log("Error message: ",null==(r=s.sent())?void 0:null===(a=r.error)||void 0===a?void 0:a.message),[2,[null,r.error]];case 4:return[4,t.json()];case 5:return[2,[s.sent(),null]];case 6:return console.error("Fetch error:",o=s.sent()),[2,{error:"An error occurred",details:o instanceof Error?o.message:String(o)}];case 7:return[2]}})})()},n.currentUser=function(){var e=this;return(0,h._)(function(){return(0,_.Jh)(this,function(n){return[2,{id:e.idToken,email:e.email,provider:"google"}]})})()},n.setDefaultAuthArgs=function(e){return(0,h._)(function(){return(0,_.Jh)(this,function(n){return[2,e]})})()},n.authenticationUrl=function(){return(0,h._)(function(){return(0,_.Jh)(this,function(e){return[2,"".concat(N.LB,"/oauth/nylas")]})})()},e}(),D=i(2280),w=i.n(D),j=i(58612),F=i(57832),E=c()(function(){return Promise.resolve(s.n1)},{ssr:!1}),B=function(e){var n,i,a,d,c=e.accessToken,v=e.currentUser,f=(0,u.useRouter)(),h=(0,r._)((0,o.useState)(!1),2),g=h[0],y=h[1],p=(0,r._)((0,l.D)(F.updateCoachTimeZone),1)[0],_=null==v?void 0:null===(n=v.user)||void 0===n?void 0:n.id,C=new A({accessToken:c,domain:j.Z.apiUri,user:null==v?void 0:v.user}),S=null==v?void 0:null===(d=v.user)||void 0===d?void 0:null===(a=d.coach)||void 0===a?void 0:null===(i=a.schedulerConfigurations)||void 0===i?void 0:i[0];return(0,t.jsxs)("div",{className:w().page,children:[(0,t.jsx)("header",{className:w().header,children:(0,t.jsxs)("div",{className:w().headerContainer,children:[(0,t.jsx)("button",{onClick:function(){f.push("/account")},className:w().backButton,"aria-label":"Go back",children:(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M19 12H5M12 19L5 12L12 5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,t.jsx)("div",{className:w().logoContainer,children:(0,t.jsx)(m(),{src:k(),alt:"Kickoff",width:120,height:40,className:w().logo})})]})}),(0,t.jsx)("main",{className:w().content,children:(0,t.jsxs)("div",{className:w().contentWrapper,children:[(0,t.jsx)("h1",{className:w().title,children:"Kickoff Call Settings"}),(0,t.jsx)("p",{className:w().description,children:"Use the editor below to configure your Kickoff Call settings."}),(0,t.jsxs)(E,{configurationId:null==S?void 0:S.nylasConfigurationId,mode:"composable",schedulerPreviewLink:"".concat(N.LB,"/booking/{slug}"),nylasApiRequest:C,eventOverrides:{schedulerConfigChanged:function(e){var n,i,t,a,r=null===(a=e.detail)||void 0===a?void 0:null===(t=a.config)||void 0===t?void 0:null===(i=t.participants)||void 0===i?void 0:null===(n=i[0])||void 0===n?void 0:n.timezone;r&&_&&p({variables:{id:_,timeZone:r}})}},className:w().schedulerEditor,children:[(0,t.jsx)(s.LV,{}),(0,t.jsx)(s.Cw,{}),(0,t.jsxs)("div",{className:w().advancedSettingsContainer,children:[g&&(0,t.jsxs)("div",{className:w().advancedSettings,children:[(0,t.jsx)(s.Jp,{}),(0,t.jsx)(s.UM,{children:(0,t.jsx)("div",{slot:"inputs",children:(0,t.jsx)(s.GV,{})})})]}),(0,t.jsxs)("button",{type:"button",onClick:function(){return y(!g)},className:w().advancedSettingsToggle,children:[g?"Hide":"Show"," Advanced Settings"]})]})]})]})})]})},P=i(80319),V=i(47915),O=i(23897),U=!0,L=(0,P.EN)(function(e){var n=e.accessToken,i=e.currentUserPayload;return(0,t.jsx)(O.t,{children:(0,t.jsx)(a.Z,{children:(0,t.jsx)(V.Z,{children:(0,t.jsx)(B,{accessToken:n,currentUser:i})})})})})},58961:function(e,n,i){"use strict";i.d(n,{Y:function(){return o}});var t=i(85893),a=i(20726),r=i.n(a),o=function(e){var n=e.font,i=e.children;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r(),{id:"56a506ffc98e56a8",dynamic:[n.style.fontFamily],children:"html{font-family:".concat(n.style.fontFamily,"}")}),i]})}},23897:function(e,n,i){"use strict";i.d(n,{t:function(){return s}});var t=i(85893),a=i(32033),r=i.n(a),o=i(58961),s=function(e){var n=e.children;return(0,t.jsx)(o.Y,{font:r(),children:n})}},2280:function(e){e.exports={colors:"'styles/colors.module.css'",SHADES_WHITE:"#FFFFFF",SHADES_BLACK:"#212121",NEUTRAL_GRAY_200:"#E2E8F0",breakpoints:"'styles/breakpoints.module.css'",TABLET_WIDTH:"768px",MOBILE_WIDTH:"576px",page:"styles_page__Y5DGT",header:"styles_header__7JqcD",headerContainer:"styles_headerContainer__zsjJh",backButton:"styles_backButton__JsOGO",logoContainer:"styles_logoContainer__9bK1E",logo:"styles_logo__1nkyx",content:"styles_content__NAvgG",contentWrapper:"styles_contentWrapper__ovIrD",title:"styles_title__I9EE7",description:"styles_description__XkYm8",schedulerEditor:"styles_schedulerEditor__URj69",advancedSettingsContainer:"styles_advancedSettingsContainer__KCzbM",advancedSettingsToggle:"styles_advancedSettingsToggle__B6eaD",advancedSettings:"styles_advancedSettings__6P6Mg",schedulerContainer:"styles_schedulerContainer__CCU7V"}},77113:function(e){e.exports="/_next/static/images/kickoff-logo-standard-56fb22563530e082e8cfa0a9eeefee0b.svg"},2147:function(e){"use strict";e.exports=JSON.parse('{"IFile":["File","FileWithWorkoutPreviews"],"BaseClientActivityItem":["GenericClientActivityItem","ProgressPictureClientActivityItem","SurveyResponseClientActivityItem","WorkoutClientActivityItem"],"ClientFeedItem":["ClientTaskPreferencesChangedCl
1ientFeedItem","HabitCompletedClientFeedItem","DailyTasksCompletedClientFeedItem","ClientLeadClaimedClientFeedItem"],"ClientToDo":["ClientEventToDo","MissedWorkoutToDo","UnreviewedWorkoutToDo","UnsentWorkoutToDo","WeeklyReviewToDo","NutritionReviewToDo"],"BaseClientTask":["WorkoutClientTask","LoggedMealClientTask","HabitClientTask"],"ProcessingBioImage":["File","BioImage"],"PagedResponse":[],"AggregateValueChange":["AggregateIntegerValueChange","AggregateBooleanValueChange","AggregateTextValueChange","AggregateWeeklyScheduleValueChange"]}')}},function(e){e.O(0,[9468,5880,4853,8407,6025,984,546,7362,7844,8909,5675,8898,2201,2964,9405,7977,2888,9774,179],function(){return e(e.s=55681)}),_N_E=e.O()}]); 2//# sourceMappingURL=scheduler-b2f16148906b905a.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.