PageSourceSearch

https://projects.bravostudio.app/_next/static/chunks/978-fa3b48747a992840.js

js bravostudio.app collected 2026-10-02 05:10:06 UTC 17,550 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[978],{51266:function(e,t,n){"use strict";n.d(t,{Q:function(){return withAuth}});var r=n(59499),s=n(16835),a=n(11163),o=n(67294),i=n(47452),l=n(83820),c=n(30953),u=n(91547),d=n(85893);function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var WithAuth=function(e){var t=e.children,n=(0,a.useRouter)(),r=(0,c.Z)(i.Yc,i.x$),f=(0,s.Z)(r,2),m=f[0],x=f[1],p=u.Z.isAuthenticated(),v=u.Z.isInitialized();return(0,l.Z)(),(0,o.useEffect)(function(){v&&!p&&(x(n.asPath),n.push(i.x$))},[v,p,n,m,x]),p?t:(0,d.jsx)("div",{})},withAuth=function(e){var MyComp=function(t){return(0,d.jsx)(WithAuth,{children:(0,d.jsx)(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},t))})};return MyComp.displayName="withAuth",o.memo(MyComp)}},55338:function(e,t,n){"use strict";var r,s=n(50029),a=n(87794),o=n.n(a),i=n(5068),l=(r=(0,s.Z)(o().mark(function _callee(e){var t,n;return o().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,fetch("https://graphql.contentful.com/content/v1/spaces/".concat("2ljsuisypm25"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat("yxU_c7LfztHj3rXUKQkixeR-5e-qjsBh_FpJJSKYutE")},body:JSON.stringify({query:e})});case 3:if((t=r.sent).ok){r.next=6;break}throw Error("Failed to fetch data from Contentful");case 6:return r.next=8,t.json();case 8:return n=r.sent,r.abrupt("return",n.data);case 12:throw r.prev=12,r.t0=r.catch(0),Error("Failed to fetch data from Contentful");case 15:case"end":return r.stop()}},_callee,null,[[0,12]])})),function(e){return r.apply(this,arguments)});t.Z=function(e){var t=(0,i.ZP)(e,l),n=t.data,r=t.error;return{data:n,isLoading:!n&&!r,isError:r}}},30953:function(e,t,n){"use strict";var r=n(67294);t.Z=function(e,t){var n=(0,r.useState)(function(){try{var n=window.sessionStorage.getItem(e);if(n)return JSON.parse(n);return window.sessionStorage.setItem(e,JSON.stringify(t)),t}catch(e){return t}}),s=n[0],a=n[1];return[s,function(t){try{window.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){}a(t)}]}},90978:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return R}});var r=n(67294),s=n(54497),a=n(32089),o=n(95387),i=n(35827),l=n(13970),c=n(99264),u=n(89419),d=n(40150),f=n(77770),m=n(53627),x=n(41583),p=n(67357),v=n(60364),h=n(34355),y=n(3845),j=n(40204),g=n(85893),onboarding_ConsentContent=function(e){var t=e.setConsented,n=m.Z.BRAVO_TERMS,b=(0,r.useState)(""),w=b[0],S=b[1],N=(0,r.useState)(""),Z=N[0],C=N[1],O=(0,r.useState)(""),k=O[0],P=O[1],_=(0,x.Z)().handleSignupWithPlan,T=(0,s.TA)({initialValues:{terms:!1,"mailing-list":!1},onSubmit:function(e){h.Z.command({r:"user.metadata.update",data:{consent:e,first_name:w,last_name:Z,company:k}}).catch(function(e){var t;(0,y.y7)("user.metadata.update",e),j.Z.error({message:"Could not save user preferences",code:null===(t=e.response)||void 0===t?void 0:t.status,contentId:"PreferenceSaveError"})}),(0,v.ZP)().track("consent.submitted",{mailingConsent:T.values["mailing-list"]}),_()||t(!0)},validationSchema:a.Ry({terms:a.O7().required()})});return(0,r.useEffect)(function(){(0,v.ZP)().track("consent.viewed")},[]),(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"w-auto md:w-80 flex flex-col",children:[(0,g.jsx)("div",{className:"w-full flex",children:(0,g.jsx)(p.BQG,{className:"w-10 h-10"})}),(0,g.jsx)(l.Z,{className:"pt-2 w-full",children:(0,g.jsx)("div",{className:"flex flex-row justify-center text-bg-d01 pt-8 text-[38px] leading-tight text-left",children:"Welcome to Bravo"})}),(0,g.jsx)(l.Z,{className:"pb-5 w-full",children:(0,g.jsx)("div",{className:"flex flex-row justify-center pb-2 text-bg-d05 text-[18px] leading-tight text-left pt-4",children:"Help us personalize your experience"})}),(0,g.jsx)(u.Z,{className:"h-3"}),(0,g.jsx)("div",{className:"text-sm text-bg-d05",children:"What's your name?"}),(0,g.jsxs)(f.Z,{className:"mt-2 w-80",children:[(0,g.jsxs)("div",{className:"flex space-x-2",children:[(0,g.jsx)("div",{className:"w-1/2",children:(0,g.jsx)(d.ZP,{onChange:function(e){return S(e)},value:w,name:"first_name",placeholder:"Name",theme:"custom",className:"w-full border border-bg-l05 px-2 py-2 h-9 text-base font-light"})}),(0,g.jsx)("div",{className:"w-1/2",children:(0,g.jsx)(d.ZP,{onChange:function(e){return C(e)},value:Z,name:"last_name",placeholder:"Last Name",theme:"custom",className:"w-full border border-bg-l05 px-2 py-2 h-9 text-base font-light"})})]}),(0,g.jsx)("div",{className:"text-sm text-bg-d05 pt-4 pb-1",children:"Company name"}),(0,g.jsx)("div",{className:"w-full",children:(0,g.jsx)(d.ZP,{onChange:function(e){return P(e)},value:k,name:"company",placeholder:"Company",theme:"custom",className:"w-full border border-bg-l05 px-2 py-2 h-9 text-base font-light"})}),(0,g.jsxs)("label",{className:"mt-3 flex items-center text-text-l01 text-sm",children:[(0,g.jsx)(i.Z,{shape:"rectangle",className:"mr-2",onChange:function(e,t){return T.handleChange("mailing-list")(t)}}),"Send me the occasional email about features & updates."]}),(0,g.jsxs)("label",{className:"mt-3 flex items-center text-text-l01 text-sm",children:[(0,g.jsx)(i.Z,{shape:"rectangle",className:"mr-2",onChange:function(e,t){return T.handleChange("terms")(t)}})," ","I agree to the",(0,g.jsx)(c.Z,{className:"ml-1 underline",href:n,analytics:{linkPurpose:"terms & conditions"},children:"Terms & Privacy Policy"})]}),(0,g.jsx)(o.Z,{className:"w-full mt-8 text-base py-5 font-normal",disabled:!T.values.terms,onClick:function(){return T.handleSubmit()},text:"Continue",type:"primary"})]})]})})},b=n(64842),shared_Carousel=function(e){var t=e.children,n=e.interval,s=void 0===n?6e3:n,a=(0,r.useState)(0),o=a[0],i=a[1],l=(0,r.useRef)(null),c=(0,r.useRef)(null),u=r.Children.count(t),goToSlide=function(e){i(e)},handleNext=function(){clearTimeoutTimer(),goToSlide((o+1)%u),startTimer()},startTimer=function(){clearTimeoutTimer(),c.current=setTimeout(function(){handleNext()},s)},clearTimeoutTimer=function(){c.current&&clearTimeout(c.current)};return(0,r.useEffect)(function(){return startTimer(),function(){clearTimeoutTimer()}},[o]),(0,g.jsxs)("div",{className:"relative overflow-hidden",children:[(0,g.jsx)("div",{className:"carousel-slides flex transition-transform duration-500 ease-in-out",style:{transform:"translateX(-".concat(100*o,"%)")},ref:l,children:r.Children.map(t,function(e,t){return(0,g.jsx)("div",{className:"carousel-slide w-full flex-shrink-0",style:{width:"100%"},children:e},t)})}
1),(0,g.jsxs)("div",{className:"carousel-controls text-center mt-4 mb-2",children:[(0,g.jsx)("button",{className:"carousel-prev bg-bg-d03 hover:bg-gray-300 p-2 rounded-full transition-transform transform hover:scale-110 mr-2",onClick:function(){clearTimeoutTimer(),goToSlide((o-1+u)%u),startTimer()},children:(0,g.jsx)(p.Y4O,{className:"text-white w-2 h-2"})}),(0,g.jsx)("button",{className:"carousel-next bg-bg-d03 hover:bg-gray-300 p-2 rounded-full transition-transform transform hover:scale-110 ml-2",onClick:handleNext,children:(0,g.jsx)(p.LZ3,{className:"text-white w-2 h-2"})})]})]})},w=n(27812),S=n(59499),N=n(16835),Z=n(93967),C=n.n(Z),O=n(11163),k=n(97927),P=n(25070),_=n(74736),T=n(51335),E=n(13252),A=n(76575),q=n.n(A);function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){(0,S.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Question=function(e){var t=e.question,n=e.options,s=e.onClick,a=e.selectedOption,i=(0,r.useState)(""),l=i[0],c=i[1],f=(0,r.useState)(!1),m=f[0],x=f[1],p=(0,r.useContext)(_.Z);return(0,r.useEffect)(function(){(0,v.ZP)().track("survey.viewed",{page:t}),(0,v.ZP)().page({url:"".concat(p.rootUrl,"/survey/").concat(t),path:"/survey/".concat(t)})},[t,p.rootUrl]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(P.Z,{className:"text-text-l01 text-base text-left",children:t}),(0,g.jsx)(u.Z,{className:"h-3"}),(0,g.jsx)("div",{className:"flex flex-wrap w-full justify-left",children:n.map(function(e){var t=(null==e?void 0:e.toLowerCase())==="other";return(0,g.jsx)("span",{className:C()(q().answer,{"bg-accent-01 text-text-d01":a===e&&!m||m&&t}),onClick:function(){t?x(!0):(x(!1),s(e))},children:e},e)})}),n.some(function(e){return"other"===e.toLowerCase()})&&m&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{className:" text-text-l02 text-sm text-left pb-1 pt-3",children:"Other"}),(0,g.jsx)(d.ZP,{theme:"custom",value:l,onChange:c,onKeyDown:function(e,t){"Enter"===e.key&&13===e.keyCode&&(t.setFocused(!1),c(""),s(l))},onBlur:function(){l.trim()&&(c(""),s(l))},placeholder:"Type other",autoFocus:!0,className:"border border-accent-01 px-2 py-2 h-9 text-base outline outline-2 outline-accent-01/20"}),(0,g.jsx)(o.Z,{type:"primary",text:"Continue",className:"text-base mt-6 py-5 font-normal",disabled:""==l})]})]})},shared_SurveyContent=function(e){var t,n,s=e.setLoading,a=(0,O.useRouter)(),o=(0,T.Z)("SURVEY_V2").data,i=(0,E.Z)({r:"user.info"}).data,c=(0,r.useState)(0),d=c[0],f=c[1],m=(0,r.useState)([]),x=m[0],b=m[1],Z=(0,r.useState)([]),C=Z[0],P=Z[1],_=(0,r.useState)(!1),A=_[0],q=_[1],I=(0,r.useState)(""),L=I[0],B=I[1],K=(0,r.useState)(void 0),R=K[0],D=K[1],Q=(0,r.useState)([]),U=Q[0],W=Q[1],z=(0,r.useState)(null),J=z[0],H=z[1],M=(0,r.useState)(!1),V=(M[0],M[1]),Y=(null==i?void 0:null===(t=i.user_metadata)||void 0===t?void 0:t.survey)||{};(0,r.useEffect)(function(){if(null!=o&&o.records&&i){var e,t,n,r=o.records.sort(function(e,t){return(null==e?void 0:e.order)<(null==t?void 0:t.order)?-1:1}),s=null==i?void 0:null===(e=i.user_metadata)||void 0===e?void 0:e["current-question"];f(s?null==o?void 0:null===(t=o.records)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===s}):0);var a=r.map(function(e){if(null!=e&&null!==(t=e.fields)&&void 0!==t&&t["next-question"]){var t,n,r=e.fields["next-question"].split("\n"),s={},a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(e,t)}}(e))){n&&(e=n);var r=0,F=function(){};return{s:F,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:F}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw s}}}}(r);try{for(a.s();!(n=a.n()).done;){var o=n.value.split("-"),i=(0,N.Z)(o,2),l=i[0],c=i[1];s[l]=c}}catch(e){a.e(e)}finally{a.f()}return s}});J||H((null==i?void 0:null===(n=i.user_metadata)||void 0===n?void 0:n.surveyHistory)||[0]),W(a),b(r)}},[o,i,J]),(0,r.useEffect)(function(){!A&&x&&C.length?s(!1):s(!0)},[A,x,C,s]),(0,r.useEffect)(function(){var e,t=null===(e=x[d])||void 0===e?void 0:e.fields,n=null==t?void 0:t["answer-choices"];B((null==t?void 0:t.question)||""),P((n||"").split("\n").map(function(e){return e.replace(/^- /,"")})||[]),V((null==t?void 0:t["prevent-skip"])!==!0)},[d,o,x]);var completeSurvey=function(e){var t=e.skipped,n=void 0!==t&&t,r=e.extra,s=void 0===r?{}:r;q(!0);var o={recY2RdsZ36fUsfqr:"context",recVsq6ZhNBf19jZw:"orgSize",recuduFsvpt7Cop47:"role",recnPx63htOqKO5kx:"designExperience",recbjz85WW4MGnQqy:"devExperience",recWPxDQK8v1aBfRJ:"purpose"},l=s.survey||{},c=Object.keys(l).reduce(function(e,t){return o[t]?_objectSpread(_objectSpread({},e),{},(0,S.Z)({},o[t],l[t].answer)):e},{});n&&(0,v.ZP)().track("survey.skipped",{page:d,answers:c}),h.Z.command({r:"user.metadata.update",data:_objectSpread({"completed-survey?":!0,ftueState:"welcome"},s)}).then(function(){(0,k.j)("/me/info",null),n||(0,v.ZP)().track("survey.completed",{answers:c,email:i.email}),a.push("/apps")}
1).catch(function(e){var t;(0,y.y7)("user.metadata.update",e),j.Z.error({message:"Could not save survey",code:null===(t=e.response)||void 0===t?void 0:t.status,contentId:"SurveySaveError"})})};return(0,g.jsxs)("div",{className:"w-auto md:w-80 flex flex-col",children:[(0,g.jsx)("div",{className:"w-full flex",children:(0,g.jsx)(p.BQG,{className:"w-10 h-10"})}),(0,g.jsx)(l.Z,{className:"pb-4 w-full",children:(0,g.jsx)("div",{className:"flex flex-row justify-center pb-2 text-bg-d01 pt-8  text-[30px] md:text-[38px] leading-tight text-left",children:"Help us personalize your Bravo experience"})}),(0,g.jsx)(Question,{question:L,options:C,onClick:function(e){D(e),setTimeout(function(){var t,n,r,s,a={survey:_objectSpread(_objectSpread({},Y),{},(0,S.Z)({},null===(t=x[d])||void 0===t?void 0:t.id,{question:L,answer:e}))};if(!(null!==(n=x[d+1])&&void 0!==n&&n.fields))return completeSurvey({extra:a});var o=U[d];o&&(s=o[e.toLowerCase()]-1||1),s||(s=d+1),H([].concat((0,w.Z)(J),[d])),h.Z.command({r:"user.metadata.update",data:_objectSpread({"current-question":null===(r=x[s])||void 0===r?void 0:r.id,surveyHistory:J},a)}).catch(function(e){var t;(0,y.y7)("user.metadata.update",e),j.Z.error({message:"Could not save survey",code:null===(t=e.response)||void 0===t?void 0:t.status,contentId:"SurveySaveError"})})},250)},selectedOption:R}),(0,g.jsxs)(l.Z,{className:"space-between mt-auto pb-6 pt-8 w-full",children:[(0,g.jsx)("div",{className:"w-1/3 flex flex-row justify-start items-center text-label1 text-text-l03 cursor-pointer select-none",children:(null===(n=x[d-1])||void 0===n?void 0:n.fields)&&(0,g.jsxs)("div",{onClick:function(){var e,t=J.pop()||0,n=x[t];x[t]&&f(t),D(null===(e=Y[null==n?void 0:n.id])||void 0===e?void 0:e.answer),H(J),h.Z.command({r:"user.metadata.update",data:{"current-question":null==n?void 0:n.id,surveyHistory:J}}).catch(function(e){var t;(0,y.y7)("user.metadata.update",e),j.Z.error({message:"Could not save survey",code:null===(t=e.response)||void 0===t?void 0:t.status,contentId:"SurveySaveError"})})},className:"flex flex-row items-center",children:[(0,g.jsx)(p.pfV,{className:"text-text-d03"}),(0,g.jsx)("div",{className:"text-sm font-light pl-1 ",children:"Go Back"})]})}),(0,g.jsx)(u.Z,{className:"w-1/3"}),(0,g.jsxs)("div",{className:"w-1/3 text-right",children:[d+1,"/",x.length]})]})]})},I=n(51266),L=n(60971),B=n(55338),K=n(24939),Slide=function(e){var t=e.title,n=e.description,r=e.image;return(0,g.jsxs)("div",{className:"flex flex-col items-center justify-center overflow-hidden mx-auto px-4",children:[r&&r.url&&(0,g.jsx)("img",{className:"w-full h-full object-cover object-bottom",src:r.url,alt:"Interface mockup"}),(0,g.jsx)("div",{className:"w-full text-center mt-6",children:(0,g.jsx)("span",{className:"text-white pt-8 text-[32px] leading-tight",children:t})}),(0,g.jsx)("div",{className:"w-full text-center my-2",children:(0,g.jsx)("span",{className:"text-bg-d05 text-[18px]",children:n})})]})},R=(0,I.Q)(function(e){var t,n,s,a=e.isConsented,o=(0,r.useState)(!1),i=o[0],l=o[1],u=(0,r.useState)(void 0!==a&&a),d=u[0],f=u[1],m=(0,K.Z)(),x=null!==(t=null===(n=(0,B.Z)("{\n    loginSurveySlidesCollection(order: [position_ASC], preview:".concat(!0,") {\n      items {\n        title\n        description\n        image {\n          url\n        }\n        link\n      }\n    }\n  }")).data)||void 0===n?void 0:null===(s=n.loginSurveySlidesCollection)||void 0===s?void 0:s.items)&&void 0!==t?t:[];return(0,r.useEffect)(function(){m.userInfo&&m.termsAccepted&&f(!0)},[m]),(0,g.jsx)(L.Z.Provider,{value:{theme:"light"},children:(0,g.jsx)(b.Z,{title:"Start",loading:i,children:(0,g.jsxs)("div",{className:"flex h-screen",children:[(0,g.jsx)("div",{className:"sm:w-full lg:w-1/2 h-full flex flex-col p-6 pt-0 justify-center items-center min-h-[100vh] overflow-y-scroll",children:d?(0,g.jsx)(shared_SurveyContent,{setLoading:l}):(0,g.jsx)(onboarding_ConsentContent,{setConsented:f})}),(0,g.jsx)("div",{className:"hidden sm:w-1/2 h-full md:flex justify-center items-center bg-bg-d01 text-white",children:(0,g.jsx)("div",{className:"w-9/12 xl:w-8/12 flex flex-col",children:x.length>0&&(0,g.jsx)(shared_Carousel,{children:x.map(function(e,t){return e.url?(0,g.jsx)(c.Z,{href:e.url,children:(0,g.jsx)(Slide,{title:e.title,de
1scription:e.description,image:e.image})},t):(0,g.jsx)(Slide,{title:e.title,description:e.description,image:e.image},t)})})})})]})})})})},76575:function(e){e.exports={answer:"SurveyContent_answer__AUYnq"}}}]);

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.