PageSourceSearch

https://www.trainwithkickoff.com/_next/static/chunks/pages/coach-sign-up-156e9ebb4b454021.js

js trainwithkickoff.com collected 2026-10-04 00:04:41 UTC 14,000 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7328],{30896:function(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getCoachSurvey"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"coachId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"surveyId"}},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:"coachId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cmsSurveyQuestionResponses"},arguments:[{kind:"Argument",name:{kind:"Name",value:"surveyId"},value:{kind:"Variable",name:{kind:"Name",value:"surveyId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"surveyQuestionId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"surveyQuestionResponseId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"responseValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"responseText"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:298}};n.loc.source={body:"query getCoachSurvey($coachId: ID!, $surveyId: ID!) {\n    coach(id: $coachId) {\n        id\n        cmsSurveyQuestionResponses(surveyId: $surveyId) {\n            id\n            surveyQuestionId\n            surveyQuestionResponseId\n            responseValue\n            responseText\n        }\n    }\n}",name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function t(e,n){for(var r=0;r<e.definitions.length;r++){var t=e.definitions[r];if(t.name&&t.name.value==n)return t}}n.definitions.forEach(function(e){if(e.name){var n=new Set;(function e(n,r){if("FragmentSpread"===n.kind)r.add(n.name.value);else if("VariableDefinition"===n.kind){var t=n.type;"NamedType"===t.kind&&r.add(t.name.value)}n.selectionSet&&n.selectionSet.selections.forEach(function(n){e(n,r)}),n.variableDefinitions&&n.variableDefinitions.forEach(function(n){e(n,r)}),n.definitions&&n.definitions.forEach(function(n){e(n,r)})})(e,n),r[e.name.value]=n}}),e.exports=n,e.exports.getCoachSurvey=function(e,n){var i={kind:e.kind,definitions:[t(e,n)]};e.hasOwnProperty("loc")&&(i.loc=e.loc);var u=r[n]||new Set,o=new Set,a=new Set;for(u.forEach(function(e){a.add(e)});a.size>0;){var s=a;a=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(r[e]||new Set).forEach(function(e){a.add(e)}))})}return o.forEach(function(n){var r=t(e,n);r&&i.definitions.push(r)}),i}(n,"getCoachSurvey")},41617:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/coach-sign-up",function(){return r(81090)}])},77501:function(e,n,r){"use strict";r.d(n,{Bf:function(){return i},WI:function(){return t},e0:function(){return u},ux:function(){return o}});var t="coach-intro",i="rd-coach-opener",u="rd-kickoff-calendar-connected",o="p5bbakP01t9KXyOW7hfhK"},8609:function(e,n,r){"use strict";var t=r(78685),i=r(18740),u=r(5176),o=r(60615),a=r(13946),s=(0,t.Z)(function(e){return(0,i.Z)((0,a.Z)(u.Z,0,(0,o.Z)("length",e)),function(){for(var n=0,r=e.length;n<r;){if(!e[n].apply(this,arguments))return!1;n+=1}return!0})});n.Z=s},56697:function(e,n,r){"use strict";r.d(n,{Z:function(){return f}});var t=r(65957),i=r(16436),u=r(30768),o=r(69358),a=r(43208),s=r(87397),c=function(e){var n={"@@transducer/init":s.Z.init,"@@transducer/result":function(n){return e["@@transducer/result"](n)},"@@transducer/step":function(n,r){var t=e["@@transducer/step"](n,r);return t["@@transducer/reduced"]?{"@@transducer/value":t,"@@transducer/reduced":!0}:t}};return{"@@transducer/init":s.Z.init,"@@transducer/result":function(e){return n["@@transducer/result"](e)},"@@transducer/step":function(e,r){return(0,o.Z)(r)?(0,a.Z)(n,e,r):(0,a.Z)(n,e,[r])}}},d=r(71689),l=(0,t.Z)(function(e,n){return(0,d.Z)(e,c(n))}),f=(0,t.Z)((0,i.Z)(["fantasy-land/chain","chain"],l,function(e,n){return"function"==typeof n?function(r){return e(n(r))(r)}:(0,u.Z)(!1)((0,d.Z)(e,n))}))},66698:function(e,n,r){"use strict";var t=r(99627),i=(0,r(65957).Z)(t.Z);n.Z=i},77631:function(e,n,r){"use strict";var t=r(65957),i=r(72322),u=(0,t.Z)(function(e,n){for(var r=[],t=0,u=e.length,o=n.length,a=new i.Z,s=0;s<o;s+=1)a.add(n[s]);for(;t<u;)a.add(e[t])&&(r[r.length]=e[t]),t+=1;return r});n.Z=u}
1,17094:function(e,n,r){"use strict";var t=r(78685),i=r(18740),u=(0,t.Z)(function(e){return(0,i.Z)(e.length,function(n,r){var t=Array.prototype.slice.call(arguments,0);return t[0]=r,t[1]=n,e.apply(this,t)})});n.Z=u},81090:function(e,n,r){"use strict";r.r(n),r.d(n,{COACH_MARKETPLACE_SURVEY_ID:function(){return O},COACH_SURVEY_ID:function(){return A},RD_COACH_SURVEY_ID:function(){return F},default:function(){return U}});var t,i=r(30137),u=r(76341),o=r(67462),a=r(97582),s=r(85893),c=r(20726),d=r.n(c),l=r(44603),f=r(50194),v=r(30470),y=r(37977),h=r(13664),p=r(60248),m=r(43783),Z=r(39737),I=r(89007),k=r(89613),S=r(4095),g=r(71484),_=r(29033),N=r(42823),D=function(){function e(){(0,g._)(this,e)}return(0,_._)(e,null,[{key:"onViewQuestion",value:function(e){var n=e.coachId,r=e.surveySectionName,t=e.surveyQuestionIds,i=e.surveyQuestionDescriptions,u=e.location;N.o.logEvent("Coach Sign Up - ".concat(u||"View Survey Screen"),{"Coach ID":n,"Survey Section Name":r,"Survey Question IDs":t,"Survey Question Descriptions":i})}}]),e}(),T=function(e){var n=e.survey,r=e.coachId,t=e.isProfileReview;return(0,s.jsx)(S.Z,{coachId:r,survey:n,isCoach:!0,isProfileReview:t,onViewQuestion:function(e){var n=e.surveySectionName,t=e.surveyQuestionIds,i=e.analyticProps;return D.onViewQuestion({coachId:r,surveySectionName:n,surveyQuestionIds:t,location:(void 0===i?{location:""}:i).location})}})}
1,b=r(47915),w=r(60317),C=r(29254),E=r(77501),P=r(79930),Q=r.n(P),R=r(51869),V=r(83397),x=r(30896),q=r(65275),A=25,F=425,O=26,j=function(e){var n=e.survey,r=e.coachId,t=e.query,i=e.isProfileReview;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.Z.Provider,{value:t,children:(0,s.jsx)(R.V,{children:(0,s.jsx)(y.Z,{includeChat:!1,includeCloudinary:!0,applySafeAreaInsets:!1,children:(0,s.jsx)(b.Z,{children:(0,s.jsx)(h.Z,{children:(0,s.jsx)(T,{survey:n,coachId:r,isProfileReview:i})})})})})}),C.fC,(0,s.jsx)(d(),{id:"36eb46aa3261f965",dynamic:[Q().SILVER],children:"body{overflow:hidden;background-color:".concat(Q().SILVER,"}")})]})};j.getInitialProps=(0,I.Z)((t=(0,i._)(function(e){var n,r,t,i,s,c,d,v,y,h,p,I,S,g,_,N,D,T,b,C,P,Q,R,j,U,L;return(0,a.Jh)(this,function(a){switch(a.label){case 0:if(n=e.ctx,r=e.currentUserPayload.data.me,s=(i=n.query).coachId,c=i.isProfileReview,d=i.surveyId,v=i.questionId,y=n.apolloClient,h=l.Z(["user","coach","id"],r),p=f.Z(!1,["user","coach","isAdmin"],r)&&!!s,I=!!h,S=f.Z(!1,["user","coach","isProfileComplete"],r),g=f.Z(!1,["user","coach","isInsuranceDietitian"],r),_=f.Z(!1,["user","coach","nylasGrantId"],r),!I)return[2,(0,m.Z)(Z.ZP.signIn({redirect:n.asPath}),n)];if(!(!p&&I&&!d))return[3,2];return[4,(0,w.y)({me:r})];case 1:if(((N=a.sent())!==E.e0||_)&&N&&(N===E.WI||N===E.Bf||S))return D=Z.ZP.coachOnboarding({slug:N}).as,[2,(0,m.Z)(D,n)];a.label=2;case 2:if(!p&&I&&s&&h!==s)return[2,(0,m.Z)(Z.ZP.coachSignUpSurvey().as,n)];a.label=3;case 3:return a.trys.push([3,5,,6]),[4,k.Z.getEntries({content_type:"survey","fields.id[in]":d||(g?F:A),include:10})];case 4:return T=a.sent(),[3,6];case 5:return b=a.sent(),console.log("contentful error"),console.error(b),q.Z.notify(b,function(e){e.addMetadata("contentfulResponse",T),e.addMetadata("query",n.query),e.addMetadata("user",r)}),[3,6];case 6:return a.trys.push([6,8,,9]),[4,y.query({query:x.getCoachSurvey,variables:{coachId:s||h,surveyId:d||(g?F:A)}})];case 7:return C=a.sent(),[3,9];case 8:return P=a.sent(),console.log("apollo error"),console.error(P),q.Z.notify(P,function(e){e.addMetadata("apolloResponse",C),e.addMetadata("query",n.query),e.addMetadata("user",r)}),[3,9];case 9:if(Q=l.Z(["data","coach","cmsSurveyQuestionResponses"],C)||[],R=(0,V.s)({userSurveyQuestionResponses:Q,contentfulSurveyQuestions:T&&(null===(t=T.items)||void 0===t?void 0:t.length)>0?T.items[0]:[],specialQuestionsIds:[],useLastQuestionId:!1,surveyType:"coach"}
1),j=l.Z(["user","username"],r),g&&!p&&!S&&!d&&!v&&"marketplace-survey"===R&&j)return[2,(0,m.Z)(Z.ZP.coachProfileReview({username:j}).href,n)];if(!v&&R)return[2,(0,m.Z)(Z.ZP.coachSignUpSurvey((0,o._)((0,u._)({},n.query),{surveyId:d||(g?"marketplace-survey"===R?O:F:A),questionId:"marketplace-survey"===R?null:R})).href,n)];return U=T.items[0],g&&(L=U.fields.sections.filter(function(e){return e.sys.id!==E.ux}),U=(0,o._)((0,u._)({},U),{fields:(0,o._)((0,u._)({},U.fields),{sections:L})})),[2,{coachId:s||h,survey:U,query:n.query,isProfileReview:c}]}})}),function(e){return t.apply(this,arguments)}));var U=(0,v.C)(j)},51869:function(e,n,r){"use strict";r.d(n,{V:function(){return a}});var t=r(85893),i=r(35053),u=r.n(i),o=r(58961),a=function(e){var n=e.children;return(0,t.jsx)(o.Y,{font:u(),children:n})}},83397:function(e,n,r){"use strict";r.d(n,{s:function(){return _}});var t=r(53353),i=r(91642),u=r(17094),o=r(66698),a=r(86177),s=r(74178),c=r(77631),d=r(57903),l=r(56697),f=r(8609),v=r(17113),y=r(31885),h=r(7778),p=r(5782),m=r(32791),Z=r(71689),I=r(44603),k=r(43973),S=r(65275),g=r(82572),_=function(e){var n=e.userSurveyQuestionResponses,r=e.contentfulSurveyQuestions,d=e.specialQuestionsIds,l=void 0===d?[]:d,f=e.useLastQuestionId,v=e.surveyType;try{var y=N(void 0===n?[]:n),h=D(void 0===r?[]:r),p=T(h,y,l.map(function(e){return parseInt(e,10)})),m=i.Z(u.Z(o.Z)(p),(0,t._)(y).concat((0,t._)(l)));return a.Z(void 0!==f&&f?p[p.length-1]:"client"===(void 0===v?"client":v)?"matches":"marketplace-survey",s.Z(c.Z(p,m)))}catch(e){return S.Z.notify(Error("Failed to fetch next questionId: ".concat(e))),null}},N=function(e){return d.Z(l.Z(function(e){return f.Z([v.Z("surveyQuestionId","219"),v.Z("surveyQuestionResponseId","4")])(e)?[e.surveyQuestionId]:[e.surveyQuestionId,g.U8.EVENT]}),y.Z(h.Z),p.Z,m.Z,Z.Z(parseInt))(e)},D=function(e){var n=Array.isArray(e)?e[0]:e;return n?d.Z(I.Z(["fields","sections"]),b,Z.Z(I.Z(["fields","questions"])),w,y.Z(h.Z),p.Z,Z.Z(function(e){return{id:I.Z(["fields","id"],e),type:I.Z(["fields","type"],e)}}))(n):[]},T=function(e,n,r){var i=new Set((0,t._)(n).concat((0,t._)(r)));return e.map(function(n,r){return"freeFormSkip"!==n.type?n.id:e.slice(r+1).some(function(e){var n=e.id;return n!==g.U8.EVENT&&n!==g.U8.SAME_COACH&&i.has(n)})?null:n.id}).filter(function(e){return null!==e})},b=function(e){return!e||k.Z(e)?(S.Z.notify(Error("survey sections mapped to null or undefined")),[]):e},w=function(e){return!e||k.Z(e)?(S.Z.notify(Error("survey questions mapped to null or undefined")),[]):e}},60317:function(e,n,r){"use strict";r.d(n,{y:function(){return C}});var t,i,u,o=r(30137),a=r(97582),s=r(89613),c=r(65032),d=r(44603),l=r(57831),f=r(92442),v=r(17113),y=r(1748),h=function(e){var n=e.coachTutorials,r=e.tutorialId;return!!l.Z(!1,"completedAt",f.Z(v.Z("tutorialId",y.Z(r)))(n))},p=r(40546),m=r.n(p),Z=r(26836),I=function(e){var n=e.tutorialToCompleteBefore,r=e.coachTutorials,t=e.minutesSinceTutorialToCompleteBefore;if(n){var i=d.Z(["fields","id"],n);if(!h({coachTutorials:r,tutorialId:i}))return!1;if(t){var u=Z.Z("completedAt",f.Z(v.Z("tutorialId",y.Z(i)))(r));if(m().differenceInMinutes(new Date,u)<t)return!1}}return!0},k=r(18528),S=r(71689),g=r(7778),_=r(43973),N=function(e){var n=e.coach,r=e.coachLevelsToDisplayDuring;if(r){var t=n.levelId;if(!k.Z(parseInt(t),S.Z(d.Z(["fields","id"]),r)))return!1}else if(g.Z(r)||_.Z(r))return!1;return!0},D=r(77631),T=r(57903),b=function(e){var n=e.coachPrompts,r=e.coachPromptsToDisplayDuring;if(r){var t=D.Z(S.Z(T.Z(d.Z(["fields","id"]),y.Z),r),S.Z(Z.Z("coachPromptId"),n||[]));if(!_.Z(t))return!1}return!0},w=(t=(0,o._)(function(){return(0,a.Jh)(this,function(e){switch(e.label){case 0:if(u)return[3,2];if(!s.Z&&(0,c.XY)())return[2,u=[]];return[4,s.Z.getEntries({content_type:"tutorial","fields.isEnabled[ne]":!1,order:"fields.priority,fields.id",include:10})];case 1:u=e.sent().items,e.label=2;case 2:return[2,u]}})}),function(){return t.apply(this,arguments)}),C=(i=(0,o._)(function(e){var n,r,t,i,u,o,s,c,l,f,v,y,p,m,Z,k,S,g,_,D,T;return(0,a.Jh)(this,function(a){switch(a.label){case 0:return n=e.me,t=void 0===(r=e.isViewingClient)?void 0:r,u=void 0===(i=e.coachPrompts)?void 0:i,s=(o=d.Z(["user","coach"],n)).coachTutorials,[4,w()];case 1:c=a.sent(),l=!0,f=!1,v=void 0;try{for(y=c[Symbol.iterator]();!(l=(p=y.next()).done);l=!0)if(Z=(m=p.value.fields).id,k=m.slug,S=m.tutorialToCompleteBefore,g=m.minutesSinceTutorialToCompleteBefore,_=m.coachLevelsToDisplayDuring,D=m.shouldDisplayWhenViewingClient,T=m.coachPromptsToDisplayDuring,!h({coachTutorials:s,tutorialId:Z})&&(!D||t)&&N({coach:o,coachLevelsToDisplayDuring:_})&&I({coachTutorials:s,tutorialToCompleteBefore:S,minutesSinceTutorialToCompleteBefore:g})&&b({coachPrompts:u,coachPromptsToDisplayDuring:T}))return[2,k]}catch(e){f=!0,v=e}finally{try{l||null==y.return||y.return()}finally{if(f)throw v}}return[2,null]}})}),function(e){return i.apply(this,arguments)})},35053:function(e){e.exports={style:{fontFamily:"'__lato_e55e5b', '__lato_Fallback_e55e5b'"},className:"__className_e55e5b"}}},function(e){e.O(0,[9468,8523,2315,6664,1601,8051,296,5880,4853,8407,6025,984,54
16,7362,7844,8909,5675,945,2279,5121,5026,882,1182,8310,7536,6449,5351,6606,4551,8510,6024,2201,2964,9405,1137,3520,4658,9464,4765,344,7209,6483,453,6736,2888,9774,179],function(){return e(e.s=41617)}),_N_E=e.O()}]);
2//# sourceMappingURL=coach-sign-up-156e9ebb4b454021.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.