1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2765],{1219:e=>{e.exports={inputPanel:"CalculatorInputArea_inputPanel__BlbOs",withError:"CalculatorInputArea_withError__0WUgT",spaceBelowButton:"CalculatorInputArea_spaceBelowButton__w2Pps",open:"CalculatorInputArea_open__H9peh"}},9173:(e,t,l)=>{"use strict";l.d(t,{Cn:()=>c,QC:()=>o,Qr:()=>r,b0:()=>s,e4:()=>p});var a=l(99511),n=l(68880);let r={[n.jS.FullCoverage]:"AutoInsuranceCalculator.inputs.coverage.options.fullCoverage",[n.jS.LiabilityOnly]:"AutoInsuranceCalculator.inputs.coverage.options.liabilityOnly"},s={[a.z.VehicleType]:"AutoInsuranceCalculator.inputs.factors.vehicleType.label",[a.z.VehicleYear]:"AutoInsuranceCalculator.inputs.factors.modelYear.label",[a.z.CreditScore]:"AutoInsuranceCalculator.inputs.factors.creditScore.label",[a.z.Gender]:"AutoInsuranceCalculator.inputs.factors.gender.label",[a.z.Age]:"AutoInsuranceCalculator.inputs.factors.age.label",[a.z.DriverHistory]:"AutoInsuranceCalculator.inputs.factors.driverHistory.label"},o={DEFAULT:null,NUMERIC:(e,t)=>Number.parseInt(e.value,10)-Number.parseInt(t.value,10),ALPHABETICAL:(e,t)=>e.value.localeCompare(t.value)},c={[a.z.VehicleType]:"lt-col lt-span-7 lt-span-2-sm",[a.z.VehicleYear]:"lt-col lt-span-5 lt-span-2-sm lt-gutter-y-0",[a.z.CreditScore]:"lt-col lt-span-12",[a.z.Gender]:"lt-col lt-span-7 lt-span-2-sm",[a.z.Age]:"lt-col lt-span-5 lt-span-2-sm lt-gutter-y-0",[a.z.DriverHistory]:""},i={M:"AutoInsuranceCalculator.inputs.factors.gender.options.male",F:"AutoInsuranceCalculator.inputs.factors.gender.options.female"},u={accident:"AutoInsuranceCalculator.inputs.factors.driverHistory.options.accident",dui:"AutoInsuranceCalculator.inputs.factors.driverHistory.options.dui",ticket:"AutoInsuranceCalculator.inputs.factors.driverHistory.options.ticket"},p={[a.z.Age]:e=>"90"===e?"90+":e,[a.z.Gender]:e=>i[e]??e,[a.z.DriverHistory]:e=>u[e]??e,default:e=>e}},42765:(e,t,l)=>{"use strict";l.a(e,async(e,a)=>{try{l.r(t),l.d(t,{CalculatorInputArea:()=>A});var n=l(95155),r=l(48969),s=l(32855),o=l(69730),c=l.n(o),i=l(12115),u=l(9173),p=l(94669),d=l(71747),m=l(49388),h=l(52095),v=l(71992),b=l(4461),C=l(12492),_=l(1219),x=l.n(_),f=l(99511),g=l(56195),y=l(53261),I=l(68880),j=e([s,d,v]);[s,d,v]=j.then?(await j)():j;let A=({zipCode:e,zipCodeIsValid:t,coverage:l,currentMonthlyPremium:a,factorChoices:o,factorOptions:_,setZipCode:j,setCurrentMonthlyPremium:A,setFactorChoices:S,setCoverage:z})=>{let{t:N}=(0,C.Bd)("components"),[k,E]=(0,i.useState)(!1),w=(0,i.useCallback)(e=>t=>{(0,v.reportEvent)(b.vl.AutoInsuranceCalculator,"optional_field_interaction",{field_name:e,field_value:"string"==typeof t?t:t.join(",")}),S(l=>({...l,[e]:"string"==typeof t?[t]:t}))},[S]),B=_&&Object.keys(_).length>0;return(0,n.jsx)("div",{className:c()("lt-col","lt-span-5","lt-span-8-md","lt-span-4-sm",x().inputPanel),children:(0,n.jsxs)("div",{className:"lt-row",children:[(0,n.jsxs)("fieldset",{className:"lt-col lt-span-12 lt-span-2-sm lt-gutter-y-0",children:[(0,n.jsx)("label",{htmlFor:"zipcode-input",children:N("AutoInsuranceCalculator.inputs.zipCode.label")}),(0,n.jsx)("input",{type:"tel",id:"zipcode-input",name:"zipcode",maxLength:5,className:c()({[x().withError]:5===e.length&&!t}),value:e,placeholder:N("AutoInsuranceCalculator.inputs.zipCode.placeholder"),title:N("AutoInsuranceCalculator.inputs.zipCode.title"),onChange:e=>j(e.target.value)})]}),(0,n.jsxs)("fieldset",{className:"lt-col lt-span-12 lt-span-2-sm lt-gutter-y-0",children:[(0,n.jsxs)("label",{htmlFor:"coverage-select",children:[N("AutoInsuranceCalculator.inputs.coverage.label"),(0,n.jsx)(s.Tooltip,{tooltipHint:(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:N("AutoInsuranceCalculator.inputs.coverage.tooltip")}}),tooltipIndexable:!0,tooltipIcon:(0,n.jsx)(p.C,{size:16})})]}),(0,n.jsx)(r.l,{id:"coverage-select",name:"coverage",value:l,onChange:e=>{z(e),(0,v.reportEvent)(b.vl.AutoInsuranceCalculator,"coverage_change",{coverage_level:e})},options:Object.values(I.jS).map(e=>({label:N(u.Qr[e]),value:e}))})]}),(0,n.jsxs)("fieldset",{className:"lt-col lt-span-12 lt-span-2-sm lt-gutter-y-0",children:[(0,n.jsx)("label",{htmlFor:"current-monthly-premium-input",children:N("AutoInsuranceCalculator.inputs.currentPremium.label")}),(0,n.jsx)("input",{type:"number",id:"current-monthly-premium-input",n
1ame:"current-monthly-premium",value:a??"",placeholder:N("AutoInsuranceCalculator.inputs.currentPremium.placeholder"),pattern:"\\d*",onChange:e=>{let t=e.target.value?Number.parseFloat(e.target.value):null;A(t),t&&(0,v.reportEvent)(b.vl.AutoInsuranceCalculator,"current__monthly_premium_interaction",{premium_value:t})}})]}),(0,n.jsx)("div",{className:"lt-col lt-span-12 lt-span-2-sm lt-gutter-y-0",children:(0,n.jsxs)(d.Button,{buttonType:m.V.Secondary,className:c()({[x().spaceBelowButton]:!k}),onClick:()=>{let e=!k;E(e),(0,v.reportEvent)(b.vl.AutoInsuranceCalculator,"optional_info_click",{action:e?"open":"close"})},children:[N("AutoInsuranceCalculator.inputs.optionalInfo.button")," ",(0,n.jsx)(h.e,{size:24,className:c()({[x().open]:k})})]})}),k&&B&&(0,n.jsxs)(n.Fragment,{children:[Object.values(f.z).filter(e=>e!==f.z.DriverHistory).map(e=>(0,n.jsxs)("fieldset",{className:u.Cn[e],children:[(0,n.jsx)("label",{htmlFor:`${e}-select`,children:N(u.b0[e])}),(0,n.jsx)(r.l,{id:`${e}-select`,name:e,value:o[e][0],onChange:w(e),options:(0,y.$)(N,e,_,N(u.b0[e]),[f.z.VehicleType,f.z.VehicleYear,f.z.Age].includes(e)?u.QC.NUMERIC:void 0)})]},e)),(0,n.jsx)(i.Suspense,{children:(0,n.jsx)(g.$,{title:N("AutoInsuranceCalculator.inputs.factors.driverHistory.title"),factorName:f.z.DriverHistory,factorOptions:_[f.z.DriverHistory]??[],selectedValues:o[f.z.DriverHistory],handleChange:w(f.z.DriverHistory)})})]})]})})};a()}catch(e){a(e)}})},48969:(e,t,l)=>{"use strict";l.d(t,{l:()=>p});var a=l(95155),n=l(12115),r=l(69730),s=l.n(r),o=l(52095),c=l(63583),i=l(73863),u=l.n(i);let p=({value:e,options:t,disabled:l=!1,onChange:r,...i})=>{let[p,d]=(0,n.useState)(!1),[m,h]=(0,n.useState)(-1),v=(0,n.useRef)(null),b=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(p&&b.current){let e=b.current.getBoundingClientRect();b.current.parentElement?.style.setProperty("--custom-select-list-top",`${e.bottom+2}px`)}},[p]),(0,n.useEffect)(()=>{let e=e=>{v.current?.contains(e.target)||d(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let C=e=>{let{key:l}=e;if(!p&&("ArrowDown"===l||"Enter"===l||" "===l)){d(!0),h(0),e.preventDefault();return}if(p)switch(l){case"ArrowDown":h(e=>Math.min(e+1,t.length-1)),e.preventDefault();break;case"ArrowUp":h(e=>Math.max(e-1,0)),e.preventDefault();break;case"Enter":case" ":m>=0&&!t[m].disabled&&(r?.(t[m].value),d(!1)),e.preventDefault();break;case"Escape":d(!1),e.preventDefault()}},_=t.find(t=>t.value===e);return(0,a.jsxs)("div",{className:s()(u().customSelectWrapper,{[u().disabled]:l}),tabIndex:l?-1:0,onKeyDown:C,ref:v,"aria-haspopup":"listbox","aria-expanded":p,"aria-disabled":l,role:"combobox","aria-activedescendant":p&&m>=0?`option-${m}`:void 0,"aria-controls":p?"select-list":void 0,...i,children:[(0,a.jsxs)("button",{id:i.id,name:i.name,type:"button",ref:b,className:u().customSelectButton,onClick:()=>!l&&d(e=>!e),disabled:l,"aria-haspopup":"listbox","aria-expanded":p,children:[_?_.label:"...",(0,a.jsx)("span",{className:u().customSelectIcon,"aria-hidden":!0,children:(0,a.jsx)(o.e,{size:24})})]}),p&&(0,a.jsx)("ul",{className:u().customSelectList,role:"listbox",children:t.map((t,l)=>(0,a.jsxs)("li",{id:`option-${l}`,role:"option","aria-selected":t.value===e,className:s()(u().customSelectOption,{[u().selected]:t.value===e,[u().highlighted]:l===m,[u().disabled]:t.disabled}),onClick:()=>{t.disabled||(r&&r(t.value),d(!1))},onKeyDown:C,onMouseEnter:()=>h(l),tabIndex:-1,"aria-disabled":t.disabled,children:[(0,a.jsx)("span",{children:t.label}),(0,a.jsx)("span",{className:u().optionCheckBox,children:(0,a.jsx)(c.s,{size:20})})]},`${t.label}-${t.value}-${l}`))})]})}},53261:(e,t,l)=>{"use strict";l.d(t,{$:()=>n});var a=l(9173);let n=(e,t,l,n="",r=a.QC.DEFAULT,s=!0)=>{let o=(l[t]??[]).map(l=>({label:e((a.e4[t]??a.e4.default)(l)),value:l}));return r&&o.sort(r),s&&o.unshift({label:n,value:""}),o}},56195:(e,t,l)=>{"use strict";l.d(t,{$:()=>o});var a=l(95155),n=l(12115),r=l(12492),s=l(9173);let o=({title:e,factorName:t,factorOptions:l,selectedValues:o=[],handleChange:c})=>{let{t:i}=(0,r.Bd)("components"),u=(0,n.useMemo)(()=>l.map(e=>({label:i(s.e4[t]?.(e))??s.e4.default(e),value:e})),[l,t,i]),p=e=>{let t=e.target.value,l=e.target.checked;c?.(l?[...o,t]:o.filter(e=>e!==t))};return(0,a.jsxs)("fieldset",{children:[(0,a.jsx)("label",{children:e}),u.map(({label:e,value:l})=>(0,a.jsxs)("div",{children:[(0,a.jsx)("input",{type:"checkbox",id:`${t}-${l}-checkbox`,name:`${t}`,value:l,checked:o.includes(l),onChange:p}),(0,a.jsx)("label",{htmlFor:`${t}-${l}-checkbox`,children:e})]},`${t}-${l}-checkbox`))]})}},73863:e=>{e.exports={customSelectWrapper:"Select_customSelectWrapper__pXcN9",customSelectButton:"Select_customSelectButton__I4fkB",customSelectIcon:"Select_customSelectIcon__Wz_Tp",customSelectList:"Select_customSelectList__LqBLR",customSelectOption:"Select_customSelectOption___6fMo",optionCheckBox:"Select_optionCheckBox__kfVwi",selected:"Select_selected__fL6Yx",highlighted:"Select_highlighted__lNYen",disabled:"Select_disabled__yNBBC"}}}]);
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.