1!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"2.2.531"}}catch(e){}}(),function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];if(null!=r)for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:funnel-rootpage-code":!0})}catch(e){}}();try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5c917a68-85b4-48cd-8b3a-cd3377c3fbd4",e._sentryDebugIdIdentifier="sentry-dbid-5c917a68-85b4-48cd-8b3a-cd3377c3fbd4")}()}catch(e){}(self.webpackChunkrootpage=self.webpackChunkrootpage||[]).push([[7791],{21112(e,t,r){r.d(t,{A:()=>i});const i={Allstate:"static/img/providers/icons/allstate.png","American Family":"static/img/providers/icons/amfam.png",Farmers:"static/img/providers/icons/farmers.png","Farmers Ins":"static/img/providers/icons/farmers.png",GEICO:"static/img/providers/icons/geico.png","The General":"static/img/providers/icons/general.png","Liberty Mutual":"static/img/providers/icons/liberty.png",Nationwide:"static/img/providers/icons/nationwide.png",Progressive:"static/img/providers/icons/progressive.png",Root:"static/img/providers/icons/root.png","State Farm":"static/img/providers/icons/statefarm.png",Travelers:"static/img/providers/icons/travelers.png",USAA:"static/img/providers/icons/usaa.png","Erie Insurance":"static/img/providers/icons/erie.png"}},27994(e,t,r){r.r(t),r.d(t,{default:()=>k});var i=r(20641),n=r(53751),s=r(90033),a={class:"wrapper page"},o={class:"innerWrapper"},l={id:"current_carrier",class:"picker twoWide"},u=["id","value","disabled","onClickOnce"],d={key:0,for:"other"},c={key:1,class:"select-wrapper"},f=["value"],p={class:"nav-footer-section"};var h=r(82870),m=r(80423),v=r(55968),g=r(92263),y=r(5e4),b=r(94983),C=r(21112);function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function I(e){return function(e){if(Array.isArray(e))return T(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return T(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?T(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}const E={components:{NavigationFooter:h.A,StepHeader:m.A,TileGrid:v.A,SelectInput:g.A},data:function(){var e;return{items:[],otherCarriersSelected:"default",isRestoringOtherCarrier:!1,otherCarriers:[],selectedItemValue:"",show:!1,submit:!1,slideName:"CurrentCarrierHome",DesignRefreshQ2Test:null===(e=window.tests)||void 0===e?void 0:e.DesignRefreshQ2Test,carrierIcons:C.A}},created:function(){this.init(),this.otherCarriers=[{name:"AAA",value:"AAA Insurance Co.",class:""},{name:"Amica",value:"Amica",class:""},{name:"Chubb",value:"Chubb",class:""},{name:"Country Financial",value:"Country Financial",class:""},{name:"Hartford",value:"Hartford",class:""},{name:"Mercury",value:"Mercury Ins Co",class:""},{name:"Other",value:"Other",class:""}],this.getData(),console.log("Loading: CurrentCarrierHome"),window.slideCreated(),y.A.setPartialSessionCookies()},mounted:function(){this.show=!0},computed:{currentCarrierHomePrefill:function(){var e=this;if(!this.selectedItemValue)return!1;var t=this.items.some(function(t){return t.value===e.selectedItemValue||t.name===e.selectedItemValue}),r=this.otherCarriers.some(function(t){return t.value===e.selectedItemValue||t.name===e.selectedItemValue});return t||r},tileGridItems:function(){var e=this;return this.items.filter(function(e){return"none"!==e.value}).filter(function(e){return window.formerInsurersHome.some(function(t){return t.value===e.value})}).map(function(t){return"Not Insured"===t.name?{label:t.name,value:t.value,type:"icon",icon:"x",disabled:t.disabled||!1}:{label:t.name,value:t.value,image:e.carrierIcons[t.name],disabled:t.disabled||!1}})},otherCarrierOptions:function(){return this.otherCarriers.map(function(e){return{name:e.name,value:e.name}})}},watch:{otherCarriersSelected:function(e){if(this.isRestoringOtherCarrier)this.isRestoringOtherCarrier=!1;else if(e){this.selectedItemValue=e;for(var t={},r=0;r<(null===(i=this.otherCarriers)||void 0===i?void 0:i.length);r++){var i,n;(null===(n=this.otherCarriers[r])||void 0===n?void 0:n.name)===this.otherCarriersSelected&&(t=this.otherCarriers[r]),this.otherCarriers[r].class=""}t.class="selected",nextSlide(t)}}},methods:{isMobile:b.Ay.isMobile,getData:function(){var e=this;if(0===this.items.length){var t=window.formerInsurersHome,r=I(t);if(this.selectedItemValue){var i=this.otherCarriers.find(function(t){return t.value===e.selectedItemValue||t.name===e.selectedItemValue});i&&!t.some(function(t){return t.value===e.selectedItemValue||t.name===e.selectedItemValue})&&(r.push({name:i.name,value:i.value}),r.sort(function(e,t){return e.name.localeCompare(t.name)}),this.DesignRefreshQ2Test&&(this.isRestoringOtherCarrier=!0,this.otherCarriersSelected=i.name),this.otherCarriers=this.otherCarriers.filter(function(t){return t.value!==e.selectedItemValue&&t.name!==e.selectedItemValue}))}for(var n=0;n<r.length;n++){var s,a,o;this.items.push({name:null===(s=r[n])||void 0===s?void 0:s.name,value:null===(a=r[n])||void 0===a?void 0:a.value,class:(null===(o=r[n])||void 0===o?void 0:o.value)===this.selectedItemValue?"selected":"",disabled:!1})}}},updateProp:function(e){var t;
1this.submit||(this.items.forEach(function(e){e.class="",e.disabled=!0}),e.class="selected",this.show=!1,this.submit=!0,e.homeowner="own"===(null===(t=sessionData.contact)||void 0===t?void 0:t.own_or_rent),nextSlide(e))},init:function(){var e;(null===(e=sessionData.coverage)||void 0===e||null===(e=e.former_insurer)||void 0===e?void 0:e.length)>0?this.selectedItemValue=sessionData.coverage.former_insurer:this.selectedItemValue=null,this.items&&this.items.forEach(function(e){e.class=e.value===this.selectedItemValue?"selected":""})},complete:function(e){if(e&&(sessionData.coverage.former_insurer=e.value,e.value))if("None"!=e.value&&e.value){var t=e.value;"string"==typeof t?t=t.toLowerCase():window.console.log("userInput.value not a string "+w(t)),sessionData.coverage.has_coverage="YES"}else sessionData.coverage.has_coverage="NO"},handleTileGridSelect:function(e){var t=this.items.find(function(t){return t.value===e});t&&this.updateProp(t)},continueFn:function(){var e=this;if(this.selectedItemValue){var t=this.items.find(function(t){return t.value===e.selectedItemValue||t.name===e.selectedItemValue});t||(t=this.otherCarriers.find(function(t){return t.value===e.selectedItemValue||t.name===e.selectedItemValue})),t&&this.updateProp(t)}}}};const k=(0,r(66262).A)(E,[["render",function(e,t,r,h,m,v){var g=(0,i.g2)("StepHeader"),y=(0,i.g2)("TileGrid"),b=(0,i.g2)("SelectInput"),C=(0,i.g2)("NavigationFooter");return(0,i.uX)(),(0,i.CE)("div",a,[(0,i.bF)(n.eB,{name:"slide-fade",persisted:""},{default:(0,i.k6)(function(){return[(0,i.bo)((0,i.Lk)("div",o,[(0,i.bF)(g,{text:"Current Insurer"}),(0,i.Q3)(" DesignRefreshQ2Test -- start "),e.DesignRefreshQ2Test?((0,i.uX)(),(0,i.Wv)(y,{key:0,"button-size":e.isMobile()?"small":"large",columns:e.isMobile()?"single":"max",type:"image","image-width":e.isMobile()?32:48,"image-height":e.isMobile()?32:48,items:e.tileGridItems,"model-value":e.selectedItemValue,"onUpdate:modelValue":e.handleTileGridSelect},null,8,["button-size","columns","image-width","image-height","items","model-value","onUpdate:modelValue"])):((0,i.uX)(),(0,i.CE)(i.FK,{key:1},[(0,i.Q3)(" DesignRefreshQ2Test -- end "),(0,i.Lk)("ul",l,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(e.items,function(t){return(0,i.uX)(),(0,i.CE)("li",{id:"insurer_"+t.value.toLowerCase().replace(/\s/g,"_"),key:t.value,value:t.value,class:(0,s.C4)(t.class),disabled:t.disabled||null,onClickOnce:function(r){return e.updateProp(t)}},(0,s.v_)(t.name),43,u)}),128))])],2112)),(0,i.Q3)(" DesignRefreshQ2Test -- start "),e.DesignRefreshQ2Test&&e.otherCarrierOptions.length?((0,i.uX)(),(0,i.Wv)(b,{key:2,label:"Other Carriers","select-options":e.otherCarrierOptions,input:"default"===e.otherCarriersSelected?null:e.otherCarriersSelected,"onUpdate:input":t[0]||(t[0]=function(t){return e.otherCarriersSelected=t})},null,8,["select-options","input"])):((0,i.uX)(),(0,i.CE)(i.FK,{key:3},[(0,i.Q3)(" DesignRefreshQ2Test -- end "),e.otherCarriers&&e.otherCarriers.length>=1?((0,i.uX)(),(0,i.CE)("label",d," Browse Other Carriers ")):(0,i.Q3)("v-if",!0),e.otherCarriers&&e.otherCarriers.length>=1?((0,i.uX)(),(0,i.CE)("div",c,[(0,i.bo)((0,i.Lk)("select",{"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.otherCarriersSelected=t})},[t[2]||(t[2]=(0,i.Lk)("option",{disabled:"",value:"default"}," Select other carrier ",-1)),((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(e.otherCarriers,function(e){return(0,i.uX)(),(0,i.CE)("option",{key:e.value,value:e.name,class:(0,s.C4)(e.class)},(0,s.v_)(e.name),11,f)}),128))],512),[[n.u1,e.otherCarriersSelected]])])):(0,i.Q3)("v-if",!0)],64)),(0,i.Lk)("div",p,[(0,i.bF)(C,{"continue-fn":e.continueFn,"continue-disabled":!e.currentCarrierHomePrefill||e.submit},null,8,["continue-fn","continue-disabled"])])],512),[[n.aG,e.show]])]}),_:1})])}]])},92263(e,t,r){r.d(t,{A:()=>b});var i=r(20641),n=r(90033),s=r(53751),a=["for"],o={class:"text-label-bold"},l=["onClick"],u={class:"text-body-m-regular input-select-display","aria-hidden":"true"},d={class:"input-units-container"},c={key:0,class:"text-body-m-regular"},f=["id","value","disabled","onChange","onKeydown"],p={key:0,value:"",disabled:""},h=["value"],m={class:"input-icon-container"},v={key:0,class:"text-body-xs-regular input-error-text"},g={key:1,class:"text-body-xs-regular input-helper-text"};const y={components:{Icon:r(34477).A},inheritAttrs:!1,props:{label:{type:String,required:!0},size:{type:String,default:"large",validator:function(e){return["small","medium","large"].includes(e)}},input:{type:String,default:null},inputTwo:{type:String,default:null},selectOptions:{type:Array,default:function(){return[]}},selectOptionsTwo:{type:Array,default:function(){return[]}},units:{type:String,default:null},unitsTwo:{type:String,default:null},numFields:{type:Number,default:1,validator:function(e){return[1,2].includes(e)}},helperText:{type:String,default:null},errorText:{type:String,default:"Please select an option"},errorTextTwo:{type:String,default:"Please select an option"},isDisabled:{type:Boolean,default:!1},isError:{type:Boolean,default:!1},isErrorTwo:{type:Boolean,default:!1},hidePlaceholderText:{type:Boolean,default:!1}},emits:["update:input","update:inputTwo"],computed:{fields:function(){var e=[{id:this.label+"-select",value:this.input,selectOptions:this.selectOptions,units:this.units,isError:this.isError,errorText:this.errorText,emit:"update:input"}];return 2===this.numFields&&e.push({id:this.label+"-select-two",value:this.inputTwo,selectOptions:this.selectOptionsTwo,units:this.unitsTwo,isError:this.isErrorTwo,errorText:this.errorTextTwo,emit:"update:inputTwo"}),e},hasError:function(){return this.fields.some(function(e){return e.isError})},displayErrorText:function(){var e,t;return null!==(e=null===(t=this.fields.find(function(e){return e.isError}))||void 0===t?void 0:t.errorText)&&void 0!==e?e:""}},created:function(){this.inputRefs=[]},methods:{setInputRef:function(e){var t=this;return function(r){t.inputRefs[e]=r}},selectedLabel:function(e){if(!e.value)return this.isDisabled||this.hidePlaceholderText?"":"Choose...";var t=e.selectOptions.find(function(t){return t.value===e.value});return t?t.name:e.value},focusField:function(e,t){var r=this.inputRefs[e];t.target!==r&&r.focus()},openPicker:function(e,t){var r=this.inputRefs[e];"function"==typeof r.showPicker&&(t.preventDefault(),r.showPicker())},handleInput:function(e,t){this.$emit(this.fields[e].emit,t.target.value)}}};const b=(0,r(66262).A)(y,[["render",function(e,t,r,y,b,C){var w=(0,i.g2)("Icon");return(0,i.uX)(),(0,i.CE)("div",{class:(0,n.C4)(["general-input-container",["input-".concat(r.size),{"input-danger":C.hasError,"input-disabled":r.
1isDisabled}]])},[(0,i.Lk)("label",{for:C.fields[0].id},[(0,i.Lk)("span",o,(0,n.v_)(r.label),1)],8,a),(0,i.Lk)("div",{class:(0,n.C4)(["input-fields-container",{"input-fields-row":2===C.fields.length}])},[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(C.fields,function(t,a){return(0,i.uX)(),(0,i.CE)("div",{key:t.id,class:(0,n.C4)(["input-field-wrapper",{"input-field-error":t.isError}]),onClick:function(e){return C.focusField(a,e)}},[(0,i.Lk)("span",u,(0,n.v_)(C.selectedLabel(t)),1),(0,i.Lk)("div",d,[t.units?((0,i.uX)(),(0,i.CE)("span",c,(0,n.v_)(t.units),1)):(0,i.Q3)("v-if",!0)]),(0,i.Lk)("select",(0,i.v6)({id:t.id,ref_for:!0,ref:C.setInputRef(a),class:"text-body-m-regular input-field input-select-overlay",value:t.value,disabled:r.isDisabled},{ref_for:!0},e.$attrs,{onChange:function(e){return C.handleInput(a,e)},onKeydown:(0,s.jR)(function(e){return C.openPicker(a,e)},["enter"])}),[r.hidePlaceholderText?(0,i.Q3)("v-if",!0):((0,i.uX)(),(0,i.CE)("option",p," Choose... ")),((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(t.selectOptions,function(e){return(0,i.uX)(),(0,i.CE)("option",{key:e.value,value:e.value},(0,n.v_)(e.name),9,h)}),128))],16,f),(0,i.Lk)("div",m,[t.isError?((0,i.uX)(),(0,i.Wv)(w,{key:0,icon:"exclamationCircle",size:16,class:"input-error-icon"})):(0,i.Q3)("v-if",!0),(0,i.bF)(w,{icon:"chevronDown",size:16})])],10,l)}),128))],2),C.hasError?((0,i.uX)(),(0,i.CE)("span",v,(0,n.v_)(C.displayErrorText),1)):r.helperText?((0,i.uX)(),(0,i.CE)("span",g,(0,n.v_)(r.helperText),1)):(0,i.Q3)("v-if",!0)],2)}]])}}]); 2//# sourceMappingURL=CurrentCarrierHome.5a8fd609d11893453391.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.