PageSourceSearch

https://jerry.ai/signup/_next/static/chunks/pages/confirmlicenseage-155bb67322d07d70.js

js jerry.ai collected 2026-10-02 10:35:49 UTC 9,176 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7089],{98936:function(e,n,t){e.exports=t(95718)},95718:function(e){e.exports=function(e){return e&&e.length?e[0]:void 0}},12850:function(e,n,t){var r=t(99835);e.exports=function(e){return r(e).toUpperCase()}},71791:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/confirmlicenseage",function(){return t(8758)}])},67415:function(e,n,t){"use strict";t.d(n,{P:function(){return b}});var r=t(60947),i=t(36690),a=t(93089),o=t(99758),s=t(64062),c=t(78055),u=t(40599),l=t(32268),d=t(93011),f=t(69204),v=t(29884),m=t(55898),g=t(18141),h=t(57901),p=t(28759),_=t(43765),b=function(e){var n=e.stepName,t=e.skipNextSteps,b=(0,f.zI)(n),y=b.isLastChallengeStep,C=b.goNext,Z=(0,o.Z)((0,u.D)(v.qd,{client:(0,h.s3)()}),2),x=Z[0],S=Z[1],w=(0,c.useCallback)(function(){var e=(0,r.Z)((function(e){var n,r,o;return(0,s.__generator)(this,(function(s){switch(s.label){case 0:if(!y(e)&&!t)return[3,5];n=function(e){var n={currentCarrier:e.currentCarrier||void 0,requestFinalPrice:e.getMoreAccurateRates||!1,email:e.email||void 0,address:e.address&&(0,p.oZ)(e.address),isHomeowner:e.isHomeowner};if(e.signupParams){var t=!0,r=!1,i=void 0;try{for(var a,o=v.lz[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){var s=a.value;n[s]=e.signupParams[s]}}catch(l){r=!0,i=l}finally{try{t||null==o.return||o.return()}finally{if(r)throw i}}}if(e.challengeSectionChanges){var c,u;e.challengeSectionChanges.cars&&(n.cars=(0,m.Ki)({cars:(null===(c=e.cars)||void 0===c?void 0:c.filter((function(e){return!e.isArchived})))||[],maintenanceReminderData:void 0,MaintenanceReminderSettledCars:void 0})),e.challengeSectionChanges.drivers&&(n.drivers=(0,g.do)({drivers:(null===(u=e.drivers)||void 0===u?void 0:u.filter((function(e){return!e.isArchived})))||[],driverViolations:void 0}))}return n}(e),r=(0,_.SI)(e),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,x({variables:{input:n}})];case 2:return s.sent(),[3,4];case 3:return o=s.sent(),(0,l.Tb)(o,{extra:{input:n}}),r!==d.b6.Finished?[2]:[3,4];case 4:return C((0,a.Z)((0,i.Z)({},e),{stepSection:r})),[3,6];case 5:C(e),s.label=6;case 6:return[2]}}
1))}));return function(n){return e.apply(this,arguments)}}(),[x,C,y,t]);return{confirmInfoContinue:w,confirmInfoMutObj:S}}},8758:function(e,n,t){"use strict";t.r(n);var r=t(60947),i=t(37705),a=t(36690),o=t(93089),s=t(64062),c=t(5349),u=t(78055),l=t(64663),d=t.n(l),f=t(21061),v=t.n(f),m=t(69107),g=t.n(m),h=t(34922),p=t(88561),_=t(52078),b=t(29040),y=t.n(b),C=t(45346),Z=t.n(C),x=t(6494),S=t.n(x),w=t(26969),L=t.n(w),M=t(29787),D=t.n(M),P=t(49281),j=t(64539),k=t(69204),I=t(51578),E=t(3938),N=t(12509),A=t(93011),R=t(67415),B=t(18236),O=t(35995),H=t(59933),z=t(30832),V=t(91606),T="confirmlicenseage",q=function(e,n){return!e&&n?V.yN:(0,E.tE)(e)};n.default=function(){var e,n=(0,k.zI)(T),t=n.appData,l=n.direction,f=n.stepIdx,m=n.stepCnt,b=n.goNext,C=n.goBack,x=n.canGoBack,w=n.stepIndicatorData,M=(0,u.useMemo)((function(){return(0,I.i)(C,x)}),[C,x]),F=null===(e=t.address)||void 0===e?void 0:e.state,U=(0,V.fS)(t),X=(0,u.useState)((function(){return d()(t.drivers,(function(e){return(0,E.V9)(e)&&!e.isArchived}))}))[0],J=(0,u.useMemo)((function(){return(0,V.yB)(t)}),[t]),W=U?J:X,G=(0,u.useState)((function(){return v()(g()(W,(function(e){return[e.id,e.ageLicensed||q(e.driverLicenseState||F,U)]})))})),K=G[0],Q=G[1];(0,u.useEffect)((function(){U&&W.length&&Q((function(e){return(0,a.Z)({},v()(g()(W,(function(e){return[e.id,e.ageLicensed||q(e.driverLicenseState||F,U)]}))),e)}))}),[W,U,F]);var Y=(0,u.useCallback)((function(e,n){Q((function(t){return(0,o.Z)((0,a.Z)({},t),(0,i.Z)({},e,n))}))}),[]),$=(0,u.useMemo)((function(){return v()(g()(W,(function(e){var n=q(e.driverLicenseState||F,U),t=e.age||100,r=K[e.id];return r?r<n?[e.id,"Cannot accept a value below ".concat(n,".")]:r>t?[e.id,"Cannot accept a value above ".concat(t,".")]:[e.id,""]:[e.id,"Please enter a valid age."]})))}),[W,U,K,F]),ee=y()($,(function(e){return!!e})),ne=(0,u.useMemo)((function(){var e=function(e){return g()(e,(function(e){return Z()(K,e.id)?(0,o.Z)((0,a.Z)({},e),{ageLicensed:K[e.id]}):e}))};return(0,o.Z)((0,a.Z)((0,o.Z)((0,a.Z)({},t),{drivers:e(t.drivers)}),t.tempDrivers?{tempDrivers:e(t.tempDrivers)}:{},U?{isEditingMotorcycleRiderQuestions:!0}:{}),{challengeSectionChanges:(0,o.Z)((0,a.Z)({},t.challengeSectionChanges),{drivers:!0})})}),[t,U,K]),te=(0,u.useState)(void 0),re=te[0],ie=te[1],ae=t.stepSection===A.b6.Onboarding,oe=(0,R.P)({stepName:T}),se=oe.confirmInfoContinue,ce=oe.confirmInfoMutObj,ue=(0,B.qV)(t,t.selectedCars||[],void 0,P.pX.Drivers),le=ue.confirmCarsWithMergedAppData,de=ue.updating,fe=ue.error,ve=ce.loading||de,me=(0,z.Z)((function(){var e=S()(g()(W,(function(e){var n=L()(ne.drivers,(function(n){return n.id===e.id}));if(!n)return null;var t={};return e.ageLicensed!==n.ageLicensed&&(t.ageLicensed=n.ageLicensed),D()(t)?null:{driverID:e.id,change:t}})));D()(e)||(0,H.L9)("ConfirmLicenseAge",{eventLabel:"Change",eventMetadata:{changes:e}})})),ge=(0,u.useCallback)((0,r.Z)((function(){var e;return(0,s.__generator)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,4,,5]),me(),ie(void 0),ae?(le(ne,function(){var e=(0,r.Z)((function(e){return(0,s.__generator)(this,(function(n){return b((0,O.JY)(e||null,(0,o.Z)((0,a.Z)({},ne),{syncedPolicyData:!0}))),[2]}))}));return function(n){return e.apply(this,arguments)}}()),[3,3]):[3,1];case 1:return[4,se(ne)];case 2:n.sent(),n.label=3;case 3:return(0,H.L9)("ConfirmLicenseAge",{eventLabel:"Finish"}),[3,5];case 4:return e=n.sent(),ie(e.message||"Something went wrong, please try again."),[3,5];case 5:return[2]}}
1))})),[le,se,b,ae,ne,me]),he=1===W.length?"Confirm the age you were first licensed":"Confirm the age that each driver was first licensed";return(0,c.jsx)(j.o,{route:T,direction:l,goBack:M,stepIdx:f,stepCnt:m,isMobile:t.isMobileAgent,showLoader:ve,title:he,subtitle:"This helps insurers understand your driving experience.",noBottomContent:!0,stepIndicatorData:w,children:(0,c.jsxs)(h.Z,{children:[g()(W,(function(e,n){var t=1===W.length?"Age first licensed in US/Canada":e.name;return(0,c.jsxs)(h.Z,{mt:n?1:0,children:[(0,c.jsx)(N.n,{label:t,value:K[e.id],onChange:function(n){return Y(e.id,n)}}),!!$[e.id]&&(0,c.jsx)(h.Z,{mt:2,children:(0,c.jsx)(p.Z,{severity:"error",children:$[e.id]})})]},e.id)})),(0,c.jsxs)(h.Z,{mt:2,alignSelf:"stretch",children:[(fe||re)&&(0,c.jsx)(h.Z,{mb:2,children:(0,c.jsx)(p.Z,{severity:"error",children:fe||re})}),(0,c.jsx)(_.Z,{color:"primary",variant:"contained",disableElevation:!0,fullWidth:!0,disabled:ee||ve,onClick:ge,children:"Continue"})]})]})})}},28759:function(e,n,t){"use strict";t.d(n,{R6:function(){return P},VM:function(){return M},oZ:function(){return j},uD:function(){return D},xJ:function(){return r}});var r,i,a=t(37705),o=t(6494),s=t.n(o),c=t(20678),u=t.n(c),l=t(98936),d=t.n(l),f=t(11198),v=t.n(f),m=t(73352),g=t.n(m),h=t(12850),p=t.n(h),_=t(69977),b=t.n(_),y=t(59659),C=t.n(y),Z=t(45225),x=t(59933);!function(e){e.Home="Home",e.MotorcycleRegistration="MotorcycleRegistration"}(r||(r={}));var S=(i={},(0,a.Z)(i,r.Home,"current home address"),(0,a.Z)(i,r.MotorcycleRegistration,"motorcycle registration address"),i),w=function(e){return"USPS reports that this is a PO Box. Please provide your ".concat(S[e],".")};function L(e){return/^\s*(((box|bin)[-. /\\]?\d+)|(.*p[ .]? ?(o|0)[-. /\\]? *-?((box|bin)|b\b|(#|n|num|number)?\d+))|(p(ost|ostal)? *(o(ff(ice)?)?)? *((box|bin)|b\b)? *(#|n|num|number)*\d+)|(p *-?\/?(o)? *-?box)|post office box|(box|bin) *(#|n|num|number)? *\d+)/i.test(e)}var M=function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=s()([e.street,n&&e.line2,e.city]).map(b()).map(C());return t.push(p()(e.state)),s()(t).join(", ")},D=function(e){var n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.Home,i={street_number:"short_name",route:"long_name",locality:"long_name",sublocality:"long_name",sublocality_level_1:"long_name",administrative_area_level_1:"short_name",administrative_area_level_2:"long_name",administrative_area_level_3:"long_name",neighborhood:"long_name",country:"long_name",postal_code:"short_name"},a={};u()(e.address_components,(function(e){var n=d()(e.types);n&&i[n]&&(a[n]=e[i[n]])}));var o,s=a.locality||a.sublocality_level_1||a.sublocality||a.administrative_area_level_3||a.neighborhood;if(a.street_number?a.route?a.postal_code||(o="Postal code"):o="Route":o="Street",o)throw new Error("".concat(o," is missing or incorrect."));if(L(a.street_number)||L(a.route))throw(0,x.L9)("OnboardingAddressValidate",{eventLabel:"DetectPoBox",eventMetadata:a}),new Error(w(t));return{street:"".concat(a.street_number||""," ").concat(a.route),line2:"",city:s,state:(0,Z.a7)(a.administrative_area_level_1)||"",county:a.administrative_area_level_2,zip:null===(n=a.postal_code)||void 0===n?void 0:n.slice(0,5)}},P=function(e,n){return v()(["street","line2","city","state","zip"],(function(t){return e[t]===n[t]}))},j=function(e){return g()(e,["id","__typename"])}}},function(e){e.O(0,[5910,9438,8256,3568,4539,4349,9774,2888,179],(function(){return n=71791,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
2//# sourceMappingURL=confirmlicenseage-155bb67322d07d70.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.