@getcredify/credify-insurance-widget 1.5.8 → 1.5.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,14 +1,14 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(`@import"https://fonts.googleapis.com/css2?family=Spline+Sans:wght@400;500;700&display=swap";/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */@layer properties,theme,base,components,utilities;@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-blue-50:oklch(97% .014 254.604);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-900:oklch(20.8% .042 265.755);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-900:oklch(21% .034 264.665);--color-white:#fff;--spacing:.25rem;--container-2xl:42rem;--container-4xl:56rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.top-4{top:calc(var(--spacing)*4)}.right-4{right:calc(var(--spacing)*4)}.z-0{z-index:0}.z-50{z-index:50}.z-\\[9999\\]{z-index:9999}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.-mt-4{margin-top:calc(var(--spacing)*-4)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-8{margin-top:calc(var(--spacing)*8)}.mt-auto{margin-top:auto}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-1{margin-left:calc(var(--spacing)*1)}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.h-5{height:calc(var(--spacing)*5)}.h-12{height:calc(var(--spacing)*12)}.max-h-60{max-height:calc(var(--spacing)*60)}.max-h-\\[90vh\\]{max-height:90vh}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-screen{min-height:100vh}.w-5{width:calc(var(--spacing)*5)}.w-12{width:calc(var(--spacing)*12)}.w-auto{width:auto}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.flex-1{flex:1}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-l-lg{border-top-left-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.rounded-r-lg{border-top-right-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-\\[var\\(--accent-color\\)\\]{border-color:var(--accent-color)}.border-blue-600{border-color:var(--color-blue-600)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-red-500{border-color:var(--color-red-500)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-200{border-color:var(--color-slate-200)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.object-contain{object-fit:contain}.p-3{padding:calc(var(--spacing)*3)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-12{padding-block:calc(var(--spacing)*12)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-6{padding-top:calc(var(--spacing)*6)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.text-center{text-align:center}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\\[var\\(--text-primary\\)\\]{color:var(--text-primary)}.text-blue-600{color:var(--color-blue-600)}.text-emerald-600{color:var(--color-emerald-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-900{color:var(--color-gray-900)}.text-red-600{color:var(--color-red-600)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.lowercase{text-transform:lowercase}.underline{text-decoration-line:underline}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}.focus-within\\:border-\\[var\\(--primary-color\\)\\]:focus-within{border-color:var(--primary-color)}@media (hover:hover){.hover\\:bg-blue-600\\/90:hover{background-color:#155dfce6}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-blue-600\\/90:hover{background-color:color-mix(in oklab,var(--color-blue-600)90%,transparent)}}.hover\\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\\:text-blue-700:hover{color:var(--color-blue-700)}.hover\\:text-slate-600:hover{color:var(--color-slate-600)}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-blue-600\\/40:focus-visible{--tw-ring-color:#155dfc66}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-blue-600\\/40:focus-visible{--tw-ring-color:color-mix(in oklab,var(--color-blue-600)40%,transparent)}}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-slate-300:disabled{background-color:var(--color-slate-300)}.disabled\\:text-slate-500:disabled{color:var(--color-slate-500)}.disabled\\:opacity-50:disabled{opacity:.5}@media (min-width:40rem){.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:64rem){.lg\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}}:root{--primary-color:#006aff;--secondary-color:#f0f4ff;--background-color:#fff;--text-primary:#1a202c;--text-secondary:#718096;--accent-color:#e2e8f0;--radius-sm:.25rem;--radius-md:.5rem;--radius-lg:.75rem;--radius-xl:1rem;--radius-2xl:1.25rem;--radius-3xl:1.75rem;--radius-full:9999px;--radio-dot-svg:url("data:image/svg+xml,%3csvg viewBox=%270 0 16 16%27 fill=%27%23006aff%27 xmlns=%27http://www.w3.org/2000/svg%27%3e%3ccircle cx=%278%27 cy=%278%27 r=%274%27/%3e%3c/svg%3e");--select-button-svg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24px' height='24px' fill='%23718096' viewBox='0 0 256 256'%3e%3cpath d='m215.39 92.94-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 1 1 11.32-11.32L128 154.06l74.07-72.44a8 8 0 0 1 11.32 11.32Z'/%3e%3c/svg%3e")}#insurance-widget-root,#root{color:var(--text-primary);font-family:Spline Sans,ui-sans-serif,system-ui,sans-serif}#insurance-widget-root .backdrop,#root .backdrop{background:#00000080;position:fixed;inset:0}#insurance-widget-root .modal-panel,#root .modal-panel{border-radius:var(--radius-2xl);padding:1.5rem;box-shadow:0 24px 64px -20px #00000059;background:#fff!important}@media (min-width:640px){#insurance-widget-root .modal-panel,#root .modal-panel{padding:2rem}}@media (min-width:768px){#insurance-widget-root .modal-panel,#root .modal-panel{padding:2.5rem}}#insurance-widget-root .h1-title,#root .h1-title{letter-spacing:-.01em;color:var(--text-primary);font-size:1.875rem;font-weight:700;line-height:2.25rem}@media (min-width:640px){#insurance-widget-root .h1-title,#root .h1-title{font-size:2.25rem;line-height:2.5rem}}#insurance-widget-root .p-subtitle,#root .p-subtitle{color:var(--text-secondary);margin-top:.5rem}#insurance-widget-root .form-label,#root .form-label{color:var(--text-secondary);margin-bottom:.5rem;font-size:.875rem;font-weight:500;display:block}#insurance-widget-root .form-input,#root .form-input{border-radius:var(--radius-lg);border:1px solid var(--accent-color);width:100%;color:var(--text-primary);background:#fff;outline:none;padding:.75rem 1rem;font-size:1rem;transition:box-shadow .15s,border-color .15s}#insurance-widget-root .form-input::placeholder,#root .form-input::placeholder{color:#94a3b8}#insurance-widget-root .form-input:focus,#root .form-input:focus{border-color:var(--primary-color);box-shadow:0 0 0 1px var(--primary-color)}#insurance-widget-root .select-caret,#root .select-caret{background-image:var(--select-button-svg);appearance:none;background-position:right .75rem center;background-repeat:no-repeat;background-size:1.25rem 1.25rem;padding-right:2.5rem}#insurance-widget-root .radio-card,#root .radio-card{border-radius:var(--radius-md);border:2px solid var(--accent-color);cursor:pointer;background:#fff;align-items:center;gap:.75rem;padding:1rem;transition:all .15s;display:flex}#insurance-widget-root .radio-card:hover,#root .radio-card:hover{border-color:#cfd8e3}#insurance-widget-root .radio-input,#root .radio-input{border:2px solid var(--accent-color);appearance:none;background:0 0;border-radius:9999px;outline:none;width:1.25rem;height:1.25rem}#insurance-widget-root .radio-input:checked,#root .radio-input:checked{border-color:var(--primary-color);background-image:var(--radio-dot-svg);background-position:50%;background-repeat:no-repeat}#insurance-widget-root .radio-card:has(.radio-input:checked),#root .radio-card:has(.radio-input:checked){border-color:var(--primary-color);box-shadow:0 0 0 2px var(--primary-color)}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root .radio-card:has(.radio-input:checked),#root .radio-card:has(.radio-input:checked){box-shadow:0 0 0 2px color-mix(in oklab,var(--primary-color)20%,transparent)}}#insurance-widget-root .radio-label,#root .radio-label{color:var(--text-primary);font-size:1rem;font-weight:600}#insurance-widget-root .btn-primary,#root .btn-primary{border-radius:var(--radius-full);background:var(--primary-color);color:#fff;letter-spacing:.02em;justify-content:center;align-items:center;width:100%;height:3rem;font-weight:700;transition:opacity .15s;display:flex}#insurance-widget-root .btn-primary:hover,#root .btn-primary:hover{opacity:.9}#insurance-widget-root .btn-outline,#root .btn-outline{border-radius:var(--radius-full);width:100%;height:3rem;color:var(--text-primary);border:1px solid var(--accent-color);letter-spacing:.02em;background:#fff;justify-content:center;align-items:center;font-weight:700;transition:background .15s,color .15s,border-color .15s,opacity .15s;display:flex}#insurance-widget-root .btn-outline:hover,#root .btn-outline:hover{border-color:#cfd8e3}#insurance-widget-root .btn-primary,#root .btn-primary,#insurance-widget-root .btn-outline,#root .btn-outline{cursor:pointer}#insurance-widget-root .btn-primary:disabled,#root .btn-primary:disabled,#insurance-widget-root .btn-outline:disabled,#root .btn-outline:disabled{opacity:.5;cursor:not-allowed;filter:grayscale(20%)}#insurance-widget-root .btn-primary:not(:disabled):hover,#root .btn-primary:not(:disabled):hover{opacity:.95}#insurance-widget-root .btn-outline:not(:disabled):hover,#root .btn-outline:not(:disabled):hover{border-color:#cfd8e3}#insurance-widget-root .quote-btn,#root .quote-btn{background-color:var(--color-blue-600);padding-inline:calc(var(--spacing)*6);padding-block:calc(var(--spacing)*3);--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-white);--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration));border-radius:3.40282e38px}@media (hover:hover){:is(#insurance-widget-root .quote-btn,#root .quote-btn):hover{background-color:var(--color-blue-700)}}#insurance-widget-root .input-error,#root .input-error{border-color:#dc2626!important;box-shadow:0 0 0 1px #dc2626!important}#insurance-widget-root .checkbox-card,#root .checkbox-card{border-radius:var(--radius-md);border:2px solid var(--accent-color);cursor:pointer;background:#fff;align-items:center;gap:.75rem;padding:1rem;transition:all .15s;display:flex}#insurance-widget-root .checkbox-card:hover,#root .checkbox-card:hover{border-color:#cfd8e3}#insurance-widget-root .checkbox-input,#root .checkbox-input{border:2px solid var(--accent-color);appearance:none;background:#fff;border-radius:.375rem;outline:none;place-items:center;width:1.25rem;height:1.25rem;display:grid}#insurance-widget-root .checkbox-input:checked,#root .checkbox-input:checked{border-color:var(--primary-color);background-color:var(--primary-color);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 24 24'%3e%3cpath d='M20.285 6.709a1 1 0 0 1 0 1.414l-9.192 9.193a1 1 0 0 1-1.414 0L3.715 11.55a1 1 0 1 1 1.414-1.414l5.05 5.05 8.485-8.478a1 1 0 0 1 1.621.001z'/%3e%3c/svg%3e");background-position:50%;background-repeat:no-repeat}#insurance-widget-root .checkbox-card:has(.checkbox-input:checked),#root .checkbox-card:has(.checkbox-input:checked){border-color:var(--primary-color);box-shadow:0 0 0 2px var(--primary-color)}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root .checkbox-card:has(.checkbox-input:checked),#root .checkbox-card:has(.checkbox-input:checked){box-shadow:0 0 0 2px color-mix(in oklab,var(--primary-color)20%,transparent)}}#insurance-widget-root .checkbox-label,#root .checkbox-label{color:var(--text-primary);font-size:1rem;font-weight:600}#insurance-widget-root .modal-scroll,#root .modal-scroll{overscroll-behavior:contain;-webkit-overflow-scrolling:touch;max-height:min(90dvh,800px);overflow-y:auto}#insurance-widget-root .modal-scroll .h1-title,#root .modal-scroll .h1-title{z-index:1;background:#fff;padding-top:.25rem;padding-bottom:.75rem;position:sticky;top:0}#insurance-widget-root .panel-body,#root .panel-body{padding:4px;scroll-padding:4px}#insurance-widget-root .tel-input-wrapper:focus-within:not(.error),#root .tel-input-wrapper:focus-within:not(.error){outline:1px solid var(--primary-color);outline-offset:0px;z-index:1}#insurance-widget-root .tel-input-wrapper.error,#root .tel-input-wrapper.error{outline-offset:0px;z-index:1;outline:1px solid #ef4444}#insurance-widget-root .tel-input-wrapper:focus-within:after,#root .tel-input-wrapper:focus-within:after{content:"";border:1px solid var(--primary-color);pointer-events:none;z-index:10;border-radius:.75rem;position:absolute;inset:-1px}#insurance-widget-root .tel-input-wrapper.error:after,#root .tel-input-wrapper.error:after{content:"";pointer-events:none;z-index:10;border:1px solid #ef4444;border-radius:.75rem;position:absolute;inset:-1px}#insurance-widget-root .form-label:has(+input[aria-required=true]):after,#root .form-label:has(+input[aria-required=true]):after,#insurance-widget-root .form-label:has(+select[aria-required=true]):after,#root .form-label:has(+select[aria-required=true]):after,#insurance-widget-root .form-label:has(+textarea[aria-required=true]):after,#root .form-label:has(+textarea[aria-required=true]):after,#insurance-widget-root .legend-required:after,#root .legend-required:after{content:" *";color:#dc2626;margin-left:.25rem}#insurance-widget-root .scrollbar-hide,#root .scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}#insurance-widget-root .scrollbar-hide::-webkit-scrollbar{display:none}#root .scrollbar-hide::-webkit-scrollbar{display:none}#insurance-widget-root button.form-wizard-next-btn[data-widget-ctrl=next][type=button],#root button.form-wizard-next-btn[data-widget-ctrl=next][type=button],#insurance-widget-root button.form-wizard-next-btn[data-widget-ctrl=next][type=button]:disabled,#root button.form-wizard-next-btn[data-widget-ctrl=next][type=button]:disabled{visibility:visible!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important;min-height:3rem!important;display:flex!important;position:relative!important;overflow:visible!important}#insurance-widget-root button.form-wizard-next-btn[data-widget-ctrl=next][type=button]:disabled,#root button.form-wizard-next-btn[data-widget-ctrl=next][type=button]:disabled{opacity:.5!important}#insurance-widget-root .credify-link-underline,#root .credify-link-underline{color:var(--primary-color);text-decoration:underline}#insurance-widget-root .credify-link-underline:hover,#root .credify-link-underline:hover{color:#0052cc}#insurance-widget-root button.modal-close-btn[type=button],#root button.modal-close-btn[type=button]{appearance:none;background:0 0;border:none;padding:0;visibility:visible!important;opacity:1!important;cursor:pointer!important;clip-path:none!important;pointer-events:auto!important;display:inline-flex!important;overflow:visible!important}#insurance-widget-root button.credify-btn-back[type=button],#root button.credify-btn-back[type=button],#insurance-widget-root button.credify-btn-back[type=button]:disabled,#root button.credify-btn-back[type=button]:disabled{visibility:visible!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important;display:inline-flex!important;overflow:visible!important}#insurance-widget-root button.credify-btn-back[type=button]:disabled,#root button.credify-btn-back[type=button]:disabled{opacity:.5!important}#insurance-widget-root button.credify-retry-btn[type=button],#root button.credify-retry-btn[type=button]{color:var(--text-primary);cursor:pointer;font:inherit;background:0 0;border:none;text-decoration:underline;visibility:visible!important;clip-path:none!important;pointer-events:auto!important;display:inline!important;overflow:visible!important}#insurance-widget-root button.rates-bind-btn[type=button],#root button.rates-bind-btn[type=button],#insurance-widget-root button.rates-bind-btn[type=button]:disabled,#root button.rates-bind-btn[type=button]:disabled{visibility:visible!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important;min-height:2.5rem!important;display:inline-flex!important;overflow:visible!important}#insurance-widget-root button.rates-bind-btn[type=button]:disabled,#root button.rates-bind-btn[type=button]:disabled{opacity:.5!important}#insurance-widget-root button.quote-btn[type=button],#root button.quote-btn[type=button]{visibility:visible!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important;display:inline-flex!important;overflow:visible!important}#insurance-widget-root a.credify-link-underline[href],#root a.credify-link-underline[href]{color:var(--primary-color);visibility:visible!important;clip-path:none!important;pointer-events:auto!important;text-decoration:underline!important;display:inline!important;overflow:visible!important}#insurance-widget-root input.form-input,#root input.form-input,#insurance-widget-root select.form-input,#root select.form-input,#insurance-widget-root textarea.form-input,#root textarea.form-input{visibility:visible!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important;display:block!important;overflow:visible!important}#insurance-widget-root button.btn-primary[type=button],#root button.btn-primary[type=button],#insurance-widget-root button.btn-primary[type=submit],#root button.btn-primary[type=submit],#insurance-widget-root button.btn-outline[type=button],#root button.btn-outline[type=button],#insurance-widget-root button.btn-primary[type=button]:disabled,#root button.btn-primary[type=button]:disabled,#insurance-widget-root button.btn-outline[type=button]:disabled,#root button.btn-outline[type=button]:disabled{visibility:visible!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important;min-height:3rem!important;display:flex!important;overflow:visible!important}#insurance-widget-root button.btn-primary[type=button]:disabled,#root button.btn-primary[type=button]:disabled,#insurance-widget-root button.btn-outline[type=button]:disabled,#root button.btn-outline[type=button]:disabled{opacity:.5!important}#insurance-widget-root .form-wizard-steps-header,#root .form-wizard-steps-header{visibility:visible!important;display:flex!important}#insurance-widget-root .form-wizard-steps,#root .form-wizard-steps{flex:1;align-items:center;gap:.5rem;min-width:0;margin:0;padding:0;font-size:.75rem;line-height:1rem;list-style:none;overflow-x:auto;display:flex!important}#insurance-widget-root .form-wizard-step-pill,#root .form-wizard-step-pill{white-space:nowrap;border:1px solid;border-radius:9999px;flex-shrink:0;padding:.25rem .625rem;visibility:visible!important;display:inline-flex!important}#insurance-widget-root .form-wizard-step-arrow,#root .form-wizard-step-arrow{color:#94a3b8;flex-shrink:0;visibility:visible!important;display:inline-flex!important}#insurance-widget-root .form-wizard-step-counter,#root .form-wizard-step-counter{color:#64748b;flex-shrink:0;font-size:.875rem;line-height:1.25rem;visibility:visible!important;display:block!important}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@keyframes spin{to{transform:rotate(360deg)}}@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}`)),document.head.appendChild(t)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
- import { useState as M, useRef as O, useEffect as D, useMemo as se, useCallback as nt, createElement as rt } from "react";
3
- import { createRoot as it } from "react-dom/client";
4
- import { jsxs as b, jsx as o, Fragment as Oe } from "react/jsx-runtime";
2
+ import { useState as M, useRef as K, useEffect as D, useMemo as se, useCallback as rt, createElement as it } from "react";
3
+ import { createRoot as st } from "react-dom/client";
4
+ import { jsxs as v, jsx as o, Fragment as Pe } from "react/jsx-runtime";
5
5
  (function() {
6
6
  if (typeof e > "u")
7
7
  var e = { env: {} };
8
8
  })();
9
9
  function U({ id: e, label: t, hint: r, error: i, required: n, className: s, children: l }) {
10
- return /* @__PURE__ */ b("div", { className: s, children: [
11
- /* @__PURE__ */ b("label", { htmlFor: e, className: "form-label", children: [
10
+ return /* @__PURE__ */ v("div", { className: s, children: [
11
+ /* @__PURE__ */ v("label", { htmlFor: e, className: "form-label", children: [
12
12
  t,
13
13
  " ",
14
14
  n && /* @__PURE__ */ o("span", { className: "text-red-600", children: "*" })
@@ -18,7 +18,7 @@ function U({ id: e, label: t, hint: r, error: i, required: n, className: s, chil
18
18
  i && /* @__PURE__ */ o("p", { id: `${e}-error`, className: "mt-1 text-sm text-red-600", children: i })
19
19
  ] });
20
20
  }
21
- function st({ id: e, label: t, hint: r, error: i, required: n, className: s, ...l }) {
21
+ function at({ id: e, label: t, hint: r, error: i, required: n, className: s, ...l }) {
22
22
  return /* @__PURE__ */ o(U, { id: e, label: t, hint: r, error: i, required: n, className: s, children: /* @__PURE__ */ o(
23
23
  "input",
24
24
  {
@@ -32,7 +32,7 @@ function st({ id: e, label: t, hint: r, error: i, required: n, className: s, ...
32
32
  }
33
33
  ) });
34
34
  }
35
- function at({ id: e, label: t, hint: r, error: i, required: n, className: s, ...l }) {
35
+ function ot({ id: e, label: t, hint: r, error: i, required: n, className: s, ...l }) {
36
36
  return /* @__PURE__ */ o(U, { id: e, label: t, hint: r, error: i, required: n, className: s, children: /* @__PURE__ */ o(
37
37
  "input",
38
38
  {
@@ -46,7 +46,7 @@ function at({ id: e, label: t, hint: r, error: i, required: n, className: s, ...
46
46
  }
47
47
  ) });
48
48
  }
49
- function ot({ id: e, label: t, hint: r, error: i, required: n, className: s, ...l }) {
49
+ function lt({ id: e, label: t, hint: r, error: i, required: n, className: s, ...l }) {
50
50
  return /* @__PURE__ */ o(U, { id: e, label: t, hint: r, error: i, required: n, className: s, children: /* @__PURE__ */ o(
51
51
  "input",
52
52
  {
@@ -75,8 +75,8 @@ function be(e) {
75
75
  function ve(e) {
76
76
  return e.replace(/\D/g, "");
77
77
  }
78
- function lt({ id: e, label: t, hint: r, error: i, required: n, className: s, value: l = "", onChange: a, ...u }) {
79
- const [v, k] = M(""), m = O(null), A = O(0);
78
+ function ct({ id: e, label: t, hint: r, error: i, required: n, className: s, value: l = "", onChange: a, ...u }) {
79
+ const [p, k] = M(""), _ = K(null), A = K(0);
80
80
  D(() => {
81
81
  if (!l) {
82
82
  k("");
@@ -90,9 +90,9 @@ function lt({ id: e, label: t, hint: r, error: i, required: n, className: s, val
90
90
  const I = (R) => {
91
91
  const Q = R.target, E = Q.value;
92
92
  A.current = Q.selectionStart || 0;
93
- const d = ve(E).slice(0, 10), p = be(d);
94
- k(p);
95
- const c = d.length === 10 ? `+1${d}` : d, y = {
93
+ const d = ve(E).slice(0, 10), y = be(d);
94
+ k(y);
95
+ const c = d.length === 10 ? `+1${d}` : d, b = {
96
96
  ...R,
97
97
  currentTarget: {
98
98
  ...R.currentTarget,
@@ -103,14 +103,14 @@ function lt({ id: e, label: t, hint: r, error: i, required: n, className: s, val
103
103
  value: c
104
104
  }
105
105
  };
106
- a?.(y), setTimeout(() => {
107
- if (m.current) {
108
- const w = E.slice(0, A.current), $ = ve(w), S = be($), _ = Math.min(S.length, p.length);
109
- m.current.setSelectionRange(_, _);
106
+ a?.(b), setTimeout(() => {
107
+ if (_.current) {
108
+ const w = E.slice(0, A.current), $ = ve(w), S = be($), f = Math.min(S.length, y.length);
109
+ _.current.setSelectionRange(f, f);
110
110
  }
111
111
  }, 0);
112
112
  };
113
- return /* @__PURE__ */ o(U, { id: e, label: t, hint: r, error: i, required: n, className: s, children: /* @__PURE__ */ b(
113
+ return /* @__PURE__ */ o(U, { id: e, label: t, hint: r, error: i, required: n, className: s, children: /* @__PURE__ */ v(
114
114
  "div",
115
115
  {
116
116
  className: `tel-input-wrapper flex items-center border rounded-lg transition-colors w-full relative ${i ? "border-red-500 error" : "border-[var(--accent-color)] focus-within:border-[var(--primary-color)]"}`,
@@ -126,7 +126,7 @@ function lt({ id: e, label: t, hint: r, error: i, required: n, className: s, val
126
126
  /* @__PURE__ */ o(
127
127
  "input",
128
128
  {
129
- ref: m,
129
+ ref: _,
130
130
  id: e,
131
131
  type: "tel",
132
132
  className: `flex-1 px-4 py-3 border-0 rounded-r-lg outline-none bg-transparent text-[var(--text-primary)] text-base ${i ? "input-error" : ""}`,
@@ -135,7 +135,7 @@ function lt({ id: e, label: t, hint: r, error: i, required: n, className: s, val
135
135
  required: n,
136
136
  "aria-invalid": !!i,
137
137
  "aria-describedby": [r ? `${e}-hint` : null, i ? `${e}-error` : null].filter(Boolean).join(" ") || void 0,
138
- value: v,
138
+ value: p,
139
139
  onChange: I,
140
140
  ...u
141
141
  }
@@ -144,7 +144,7 @@ function lt({ id: e, label: t, hint: r, error: i, required: n, className: s, val
144
144
  }
145
145
  ) });
146
146
  }
147
- function ct({ id: e, label: t, hint: r, error: i, required: n, className: s, ...l }) {
147
+ function dt({ id: e, label: t, hint: r, error: i, required: n, className: s, ...l }) {
148
148
  return /* @__PURE__ */ o(U, { id: e, label: t, hint: r, error: i, required: n, className: s, children: /* @__PURE__ */ o(
149
149
  "input",
150
150
  {
@@ -160,7 +160,7 @@ function ct({ id: e, label: t, hint: r, error: i, required: n, className: s, ...
160
160
  }
161
161
  ) });
162
162
  }
163
- function dt({ id: e, label: t, hint: r, error: i, required: n, className: s, ...l }) {
163
+ function ut({ id: e, label: t, hint: r, error: i, required: n, className: s, ...l }) {
164
164
  return /* @__PURE__ */ o(U, { id: e, label: t, hint: r, error: i, required: n, className: s, children: /* @__PURE__ */ o(
165
165
  "input",
166
166
  {
@@ -175,7 +175,7 @@ function dt({ id: e, label: t, hint: r, error: i, required: n, className: s, ...
175
175
  }
176
176
  ) });
177
177
  }
178
- function ut({ id: e, label: t, hint: r, error: i, required: n, className: s, rows: l = 4, ...a }) {
178
+ function _t({ id: e, label: t, hint: r, error: i, required: n, className: s, rows: l = 4, ...a }) {
179
179
  return /* @__PURE__ */ o(U, { id: e, label: t, hint: r, error: i, required: n, className: s, children: /* @__PURE__ */ o(
180
180
  "textarea",
181
181
  {
@@ -189,7 +189,7 @@ function ut({ id: e, label: t, hint: r, error: i, required: n, className: s, row
189
189
  }
190
190
  ) });
191
191
  }
192
- function _t({ id: e, label: t, hint: r, error: i, required: n, className: s, ...l }) {
192
+ function ft({ id: e, label: t, hint: r, error: i, required: n, className: s, ...l }) {
193
193
  return /* @__PURE__ */ o(U, { id: e, label: t, hint: r, error: i, required: n, className: s, children: /* @__PURE__ */ o(
194
194
  "input",
195
195
  {
@@ -203,39 +203,39 @@ function _t({ id: e, label: t, hint: r, error: i, required: n, className: s, ...
203
203
  }
204
204
  ) });
205
205
  }
206
- function Re({ id: e, label: t, className: r, ...i }) {
207
- return /* @__PURE__ */ b("label", { className: `checkbox-card ${r || ""}`, htmlFor: e, children: [
206
+ function Qe({ id: e, label: t, className: r, ...i }) {
207
+ return /* @__PURE__ */ v("label", { className: `checkbox-card ${r || ""}`, htmlFor: e, children: [
208
208
  /* @__PURE__ */ o("input", { id: e, type: "checkbox", className: "checkbox-input", ...i }),
209
209
  /* @__PURE__ */ o("span", { className: "checkbox-label", children: t })
210
210
  ] });
211
211
  }
212
- function ft({
212
+ function mt({
213
213
  name: e,
214
214
  value: t,
215
215
  checked: r,
216
216
  onChange: i,
217
217
  children: n
218
218
  }) {
219
- return /* @__PURE__ */ b("label", { className: "radio-card", children: [
219
+ return /* @__PURE__ */ v("label", { className: "radio-card", children: [
220
220
  /* @__PURE__ */ o("input", { className: "radio-input", type: "radio", name: e, value: t, checked: r, onChange: i }),
221
221
  /* @__PURE__ */ o("span", { className: "radio-label", children: n })
222
222
  ] });
223
223
  }
224
- function mt({
224
+ function pt({
225
225
  legend: e,
226
226
  children: t,
227
227
  className: r,
228
228
  legendClassName: i
229
229
  // NEW
230
230
  }) {
231
- return /* @__PURE__ */ b("fieldset", { className: r, children: [
231
+ return /* @__PURE__ */ v("fieldset", { className: r, children: [
232
232
  /* @__PURE__ */ o("legend", { className: `mb-4 text-base font-medium ${i || ""}`, style: { color: "var(--text-primary)" }, children: e }),
233
233
  /* @__PURE__ */ o("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: t })
234
234
  ] });
235
235
  }
236
- function pt({ id: e, label: t, hint: r, error: i, required: n, className: s, placeholder: l, options: a, children: u, ...v }) {
237
- const k = [r ? `${e}-hint` : null, i ? `${e}-error` : null].filter(Boolean).join(" ") || void 0, m = !!u;
238
- return /* @__PURE__ */ o(U, { id: e, label: t, hint: r, error: i, required: n, className: s, children: /* @__PURE__ */ b(
236
+ function yt({ id: e, label: t, hint: r, error: i, required: n, className: s, placeholder: l, options: a, children: u, ...p }) {
237
+ const k = [r ? `${e}-hint` : null, i ? `${e}-error` : null].filter(Boolean).join(" ") || void 0, _ = !!u;
238
+ return /* @__PURE__ */ o(U, { id: e, label: t, hint: r, error: i, required: n, className: s, children: /* @__PURE__ */ v(
239
239
  "select",
240
240
  {
241
241
  id: e,
@@ -243,10 +243,10 @@ function pt({ id: e, label: t, hint: r, error: i, required: n, className: s, pla
243
243
  "aria-invalid": !!i,
244
244
  "aria-describedby": k,
245
245
  required: n,
246
- ...v,
246
+ ...p,
247
247
  children: [
248
- l && /* @__PURE__ */ o("option", { value: "", disabled: !0, selected: !("value" in v), children: l }),
249
- m ? u : a?.map((A) => /* @__PURE__ */ o("option", { value: A.value, disabled: A.disabled, children: A.label }, A.value))
248
+ l && /* @__PURE__ */ o("option", { value: "", disabled: !0, selected: !("value" in p), children: l }),
249
+ _ ? u : a?.map((A) => /* @__PURE__ */ o("option", { value: A.value, disabled: A.disabled, children: A.label }, A.value))
250
250
  ]
251
251
  }
252
252
  ) });
@@ -267,7 +267,7 @@ function ht() {
267
267
  i.src = `https://maps.googleapis.com/maps/api/js?key=${gt}&libraries=places`, i.async = !0, i.defer = !0, i.onload = () => e(), i.onerror = () => t(new Error("Failed to load Google Maps script")), document.head.appendChild(i);
268
268
  });
269
269
  }
270
- function yt(e) {
270
+ function bt(e) {
271
271
  const t = {
272
272
  fullAddress: e.formatted_address
273
273
  };
@@ -276,23 +276,23 @@ function yt(e) {
276
276
  i.includes("street_number") && (t.streetNumber = r.long_name), i.includes("route") && (t.streetName = r.long_name), i.includes("locality") && (t.city = r.long_name), i.includes("administrative_area_level_1") && (t.state = r.short_name), i.includes("postal_code") && (t.zipCode = r.long_name), i.includes("country") && (t.country = r.short_name);
277
277
  }), t;
278
278
  }
279
- function bt({ id: e, label: t, hint: r, error: i, required: n, className: s, onChange: l, onPlaceSelect: a, value: u, ...v }) {
280
- const k = O(null), m = O(null), A = O(null), I = O(null), [R, Q] = M(!0), [E, T] = M(u || ""), [d, p] = M([]), [c, y] = M(!1), [w, $] = M(-1), S = O([]), _ = O(!1), f = O(-1);
279
+ function vt({ id: e, label: t, hint: r, error: i, required: n, className: s, onChange: l, onPlaceSelect: a, value: u, ...p }) {
280
+ const k = K(null), _ = K(null), A = K(null), I = K(null), [R, Q] = M(!0), [E, T] = M(u || ""), [d, y] = M([]), [c, b] = M(!1), [w, $] = M(-1), S = K([]), f = K(!1), m = K(-1);
281
281
  D(() => {
282
282
  S.current = d;
283
283
  }, [d]), D(() => {
284
- _.current = c;
284
+ f.current = c;
285
285
  }, [c]), D(() => {
286
- f.current = w;
286
+ m.current = w;
287
287
  }, [w]), D(() => {
288
288
  u !== void 0 && T(String(u));
289
289
  }, [u]);
290
- const g = O(null);
290
+ const g = K(null);
291
291
  D(() => {
292
292
  if (!k.current) return;
293
293
  let N = !0;
294
294
  return ht().then(() => {
295
- !N || !k.current || (m.current = new google.maps.places.AutocompleteService(), A.current = new google.maps.places.PlacesService(document.createElement("div")), Q(!1));
295
+ !N || !k.current || (_.current = new google.maps.places.AutocompleteService(), A.current = new google.maps.places.PlacesService(document.createElement("div")), Q(!1));
296
296
  }).catch((x) => {
297
297
  console.error("Error loading Google Maps:", x), Q(!1);
298
298
  }), () => {
@@ -302,49 +302,49 @@ function bt({ id: e, label: t, hint: r, error: i, required: n, className: s, onC
302
302
  const h = (N) => {
303
303
  const x = N.target.value;
304
304
  if (T(x), l?.(x), g.current && clearTimeout(g.current), x.length < 3) {
305
- p([]), y(!1);
305
+ y([]), b(!1);
306
306
  return;
307
307
  }
308
308
  g.current = setTimeout(() => {
309
- m.current && m.current.getPlacePredictions(
309
+ _.current && _.current.getPlacePredictions(
310
310
  {
311
311
  input: x,
312
312
  types: ["address"]
313
313
  },
314
314
  (F, z) => {
315
- z === google.maps.places.PlacesServiceStatus.OK && F ? (p(F), y(!0), $(-1)) : (p([]), y(!1));
315
+ z === google.maps.places.PlacesServiceStatus.OK && F ? (y(F), b(!0), $(-1)) : (y([]), b(!1));
316
316
  }
317
317
  );
318
318
  }, 300);
319
319
  }, B = (N) => {
320
- if (!_.current || S.current.length === 0) {
321
- N.key === "Escape" && (y(!1), _.current = !1);
320
+ if (!f.current || S.current.length === 0) {
321
+ N.key === "Escape" && (b(!1), f.current = !1);
322
322
  return;
323
323
  }
324
324
  switch (N.key) {
325
325
  case "ArrowDown":
326
326
  N.preventDefault(), $((x) => {
327
327
  const F = x < S.current.length - 1 ? x + 1 : x;
328
- return f.current = F, F;
328
+ return m.current = F, F;
329
329
  });
330
330
  break;
331
331
  case "ArrowUp":
332
332
  N.preventDefault(), $((x) => {
333
333
  const F = x > 0 ? x - 1 : -1;
334
- return f.current = F, F;
334
+ return m.current = F, F;
335
335
  });
336
336
  break;
337
337
  case "Enter":
338
- N.preventDefault(), f.current >= 0 && f.current < S.current.length && C(S.current[f.current]);
338
+ N.preventDefault(), m.current >= 0 && m.current < S.current.length && C(S.current[m.current]);
339
339
  break;
340
340
  case "Escape":
341
- N.preventDefault(), y(!1), _.current = !1;
341
+ N.preventDefault(), b(!1), f.current = !1;
342
342
  break;
343
343
  }
344
344
  };
345
345
  D(() => {
346
346
  const N = (x) => {
347
- I.current && !I.current.contains(x.target) && k.current && !k.current.contains(x.target) && (y(!1), _.current = !1);
347
+ I.current && !I.current.contains(x.target) && k.current && !k.current.contains(x.target) && (b(!1), f.current = !1);
348
348
  };
349
349
  if (c)
350
350
  return document.addEventListener("mousedown", N), () => {
@@ -360,14 +360,14 @@ function bt({ id: e, label: t, hint: r, error: i, required: n, className: s, onC
360
360
  (x, F) => {
361
361
  if (F === google.maps.places.PlacesServiceStatus.OK && x) {
362
362
  const z = x.formatted_address || "";
363
- T(z), y(!1), p([]), _.current = !1;
364
- const Z = yt(x);
363
+ T(z), b(!1), y([]), f.current = !1;
364
+ const Z = bt(x);
365
365
  l?.(z, Z), a?.(x);
366
366
  }
367
367
  }
368
368
  );
369
369
  };
370
- return /* @__PURE__ */ o(U, { id: e, label: t, hint: r, error: i, required: n, className: s, children: /* @__PURE__ */ b("div", { className: "relative", children: [
370
+ return /* @__PURE__ */ o(U, { id: e, label: t, hint: r, error: i, required: n, className: s, children: /* @__PURE__ */ v("div", { className: "relative", children: [
371
371
  /* @__PURE__ */ o(
372
372
  "input",
373
373
  {
@@ -382,9 +382,9 @@ function bt({ id: e, label: t, hint: r, error: i, required: n, className: s, onC
382
382
  "aria-describedby": [r ? `${e}-hint` : null, i ? `${e}-error` : null].filter(Boolean).join(" ") || void 0,
383
383
  required: n,
384
384
  autoComplete: "street-address",
385
- placeholder: v.placeholder || "Enter an address",
386
- disabled: R || v.disabled,
387
- ...v
385
+ placeholder: p.placeholder || "Enter an address",
386
+ disabled: R || p.disabled,
387
+ ...p
388
388
  }
389
389
  ),
390
390
  R && /* @__PURE__ */ o("p", { className: "mt-1 text-sm text-slate-500", children: "Loading address suggestions..." }),
@@ -394,7 +394,7 @@ function bt({ id: e, label: t, hint: r, error: i, required: n, className: s, onC
394
394
  ref: I,
395
395
  className: "absolute z-50 w-full mt-1 bg-white border border-slate-200 rounded-lg shadow-lg max-h-60 overflow-y-auto",
396
396
  role: "listbox",
397
- children: d.map((N, x) => /* @__PURE__ */ b(
397
+ children: d.map((N, x) => /* @__PURE__ */ v(
398
398
  "div",
399
399
  {
400
400
  className: `px-4 py-3 cursor-pointer transition-colors ${x === w ? "bg-blue-50 text-slate-900" : "bg-white text-slate-900 hover:bg-slate-50"} ${x < d.length - 1 ? "border-b border-slate-100" : ""}`,
@@ -416,13 +416,13 @@ function bt({ id: e, label: t, hint: r, error: i, required: n, className: s, onC
416
416
  function Ne(e) {
417
417
  return e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "");
418
418
  }
419
- function Pe(e, t) {
419
+ function Ue(e, t) {
420
420
  return e.key ?? `${Ne(e.question)}-${t}`;
421
421
  }
422
- function ge(e, t) {
422
+ function ye(e, t) {
423
423
  const r = {}, i = (n) => n == null || typeof n == "string" && n.trim() === "";
424
424
  return e.forEach((n, s) => {
425
- const l = Pe(n, s), a = t[l];
425
+ const l = Ue(n, s), a = t[l];
426
426
  if (n.required)
427
427
  switch (n.inputType) {
428
428
  case "checkbox":
@@ -449,15 +449,15 @@ function ge(e, t) {
449
449
  }
450
450
  }), r;
451
451
  }
452
- function vt(e) {
452
+ function wt(e) {
453
453
  if (e === "" || e === null || e === void 0) return;
454
454
  const t = Number(e);
455
455
  return Number.isNaN(t) ? void 0 : t;
456
456
  }
457
- function Qe(e) {
457
+ function je(e) {
458
458
  return typeof e == "number" && Number.isFinite(e) ? e : typeof e == "string" && e.trim() !== "" && !Number.isNaN(Number(e)) ? Number(e) : null;
459
459
  }
460
- function je(e) {
460
+ function Me(e) {
461
461
  if (e instanceof Date && !Number.isNaN(e.getTime())) return e.getTime();
462
462
  if (typeof e == "string") {
463
463
  const t = Date.parse(e);
@@ -465,13 +465,13 @@ function je(e) {
465
465
  }
466
466
  return null;
467
467
  }
468
- function Me(e, t) {
469
- const r = Qe(e), i = Qe(t);
468
+ function Be(e, t) {
469
+ const r = je(e), i = je(t);
470
470
  if (r != null && i != null) return r - i;
471
- const n = je(e), s = je(t);
471
+ const n = Me(e), s = Me(t);
472
472
  return n != null && s != null ? n - s : e == null || t == null ? null : String(e).localeCompare(String(t));
473
473
  }
474
- function wt(e, t) {
474
+ function xt(e, t) {
475
475
  return Array.isArray(e) ? e.some((r) => r === t) : typeof e == "string" ? t != null && e.includes(String(t)) : !1;
476
476
  }
477
477
  function oe(e, t, r) {
@@ -479,15 +479,15 @@ function oe(e, t, r) {
479
479
  case "equals":
480
480
  return e === r;
481
481
  case "lessThan": {
482
- const i = Me(e, r);
482
+ const i = Be(e, r);
483
483
  return i != null && i < 0;
484
484
  }
485
485
  case "greaterThan": {
486
- const i = Me(e, r);
486
+ const i = Be(e, r);
487
487
  return i != null && i > 0;
488
488
  }
489
489
  case "contains":
490
- return wt(e, r);
490
+ return xt(e, r);
491
491
  case "startsWith":
492
492
  return e != null && r != null && String(e).startsWith(String(r));
493
493
  case "endsWith":
@@ -496,114 +496,114 @@ function oe(e, t, r) {
496
496
  return !1;
497
497
  }
498
498
  }
499
- function ke(e, t) {
499
+ function Se(e, t) {
500
500
  return t.reduce((r, i) => r?.[i], e);
501
501
  }
502
- function X(e, t, r) {
502
+ function J(e, t, r) {
503
503
  if (t.length === 0) return e;
504
504
  const [i, ...n] = t;
505
505
  if (n.length === 0) {
506
506
  if (typeof i == "number") {
507
- const v = (Array.isArray(e) ? e : []).slice();
508
- return v[i] = r, v;
507
+ const p = (Array.isArray(e) ? e : []).slice();
508
+ return p[i] = r, p;
509
509
  }
510
510
  return { ...e, [i]: r };
511
511
  }
512
- const s = e?.[i], l = typeof n[0] == "number" ? Array.isArray(s) ? s : [] : s && typeof s == "object" ? s : {}, a = X(l, n, r);
512
+ const s = e?.[i], l = typeof n[0] == "number" ? Array.isArray(s) ? s : [] : s && typeof s == "object" ? s : {}, a = J(l, n, r);
513
513
  if (typeof i == "number") {
514
- const v = (Array.isArray(e) ? e : []).slice();
515
- return v[i] = a, v;
514
+ const p = (Array.isArray(e) ? e : []).slice();
515
+ return p[i] = a, p;
516
516
  }
517
517
  return { ...e, [i]: a };
518
518
  }
519
519
  function le(e, t, r) {
520
- return ke(e, [...t ?? [], r]);
520
+ return Se(e, [...t ?? [], r]);
521
521
  }
522
- function xt(e, t, r, i) {
523
- return X(e, [...t ?? [], r], i);
522
+ function kt(e, t, r, i) {
523
+ return J(e, [...t ?? [], r], i);
524
524
  }
525
525
  const Nt = "__items", fe = (e) => `${e}${Nt}`;
526
- function kt(e) {
526
+ function St(e) {
527
527
  const t = (r, i) => r.map((n, s) => {
528
- const l = i.length ? i.join("__") : "root", a = n.key ?? `${l}__q${s}_${String(n.question).slice(0, 24).replace(/\W+/g, "-") || "field"}`, v = (n.conditionals ?? []).map((k, m) => {
529
- const A = k.conditionalQuestions ? t(k.conditionalQuestions, [...i, `${a}__c${m}`]) : void 0;
528
+ const l = i.length ? i.join("__") : "root", a = n.key ?? `${l}__q${s}_${String(n.question).slice(0, 24).replace(/\W+/g, "-") || "field"}`, p = (n.conditionals ?? []).map((k, _) => {
529
+ const A = k.conditionalQuestions ? t(k.conditionalQuestions, [...i, `${a}__c${_}`]) : void 0;
530
530
  return { ...k, conditionalQuestions: A };
531
531
  });
532
- return { ...n, key: a, conditionals: v };
532
+ return { ...n, key: a, conditionals: p };
533
533
  });
534
534
  return t(e, []);
535
535
  }
536
- function J(e) {
536
+ function X(e) {
537
537
  return e == null ? "" : typeof e == "string" ? e : String(e);
538
538
  }
539
- function St(e) {
539
+ function $t(e) {
540
540
  return e == null ? "" : typeof e == "number" && Number.isFinite(e) || typeof e == "string" ? e : "";
541
541
  }
542
- function $t(e) {
542
+ function At(e) {
543
543
  return e == null ? "" : typeof e == "string" || typeof e == "number" ? e : String(e);
544
544
  }
545
- function At({
545
+ function Et({
546
546
  questions: e,
547
547
  initialValues: t,
548
548
  controlledValues: r,
549
549
  onChangeValues: i,
550
550
  onSubmit: n
551
551
  }) {
552
- const s = se(() => kt(e), [e]), l = se(() => {
552
+ const s = se(() => St(e), [e]), l = se(() => {
553
553
  const d = {};
554
554
  return t && Object.assign(d, t), d;
555
555
  }, [t]), [a, u] = M(l);
556
556
  D(() => {
557
557
  u(l);
558
558
  }, [l]);
559
- const [v, k] = M({}), m = se(
560
- () => ({ ...v, ...r ?? a }),
561
- [v, r, a]
559
+ const [p, k] = M({}), _ = se(
560
+ () => ({ ...p, ...r ?? a }),
561
+ [p, r, a]
562
562
  );
563
563
  D(() => {
564
564
  r && k((d) => ({ ...d, ...r }));
565
565
  }, [r]);
566
566
  const [A, I] = M({});
567
- function R(d, p) {
568
- const c = d.key, y = d.question, w = le(m, p, c), $ = A[c], S = (_) => {
569
- let f = xt(m, p, c, _);
567
+ function R(d, y) {
568
+ const c = d.key, b = d.question, w = le(_, y, c), $ = A[c], S = (f) => {
569
+ let m = kt(_, y, c, f);
570
570
  if (d.inputType === "radio" && d.conditionals) {
571
571
  const g = d.conditionals ?? [];
572
572
  for (const h of g) {
573
- const B = le(m, p, c), C = oe(B, h.conditionalType, h.conditionalValue), N = oe(_, h.conditionalType, h.conditionalValue);
573
+ const B = le(_, y, c), C = oe(B, h.conditionalType, h.conditionalValue), N = oe(f, h.conditionalType, h.conditionalValue);
574
574
  if (C && !N && h.conditionalQuestionsAllowMultiple) {
575
575
  const x = h.conditionalQuestions ?? [];
576
576
  if (x.length > 0) {
577
577
  const F = fe(c);
578
- f = X(f, [...p ?? [], F], []);
578
+ m = J(m, [...y ?? [], F], []);
579
579
  const z = (Z, q) => {
580
- Z.forEach((L) => {
581
- (L.conditionals ?? []).forEach((K) => {
582
- if (K.conditionalQuestionsAllowMultiple) {
583
- const ee = fe(L.key);
584
- f = X(f, [...q, ee], []);
580
+ Z.forEach((O) => {
581
+ (O.conditionals ?? []).forEach((L) => {
582
+ if (L.conditionalQuestionsAllowMultiple) {
583
+ const ee = fe(O.key);
584
+ m = J(m, [...q, ee], []);
585
585
  }
586
- const W = K.conditionalQuestions ?? [];
586
+ const W = L.conditionalQuestions ?? [];
587
587
  W.length > 0 && z(W, q);
588
588
  });
589
589
  });
590
590
  };
591
- z(x, [...p ?? [], F]);
591
+ z(x, [...y ?? [], F]);
592
592
  }
593
593
  }
594
594
  }
595
595
  }
596
- r && i ? i(f) : u(f), k(f);
596
+ r && i ? i(m) : u(m), k(m);
597
597
  };
598
598
  switch (d.inputType) {
599
599
  case "text":
600
600
  return /* @__PURE__ */ o(
601
- st,
601
+ at,
602
602
  {
603
603
  id: c,
604
- label: y,
605
- value: J(w),
606
- onChange: (_) => S(_.currentTarget.value),
604
+ label: b,
605
+ value: X(w),
606
+ onChange: (f) => S(f.currentTarget.value),
607
607
  "aria-required": d.required || void 0,
608
608
  error: $
609
609
  },
@@ -611,12 +611,12 @@ function At({
611
611
  );
612
612
  case "email":
613
613
  return /* @__PURE__ */ o(
614
- ot,
614
+ lt,
615
615
  {
616
616
  id: c,
617
- label: y,
618
- value: J(w),
619
- onChange: (_) => S(_.currentTarget.value),
617
+ label: b,
618
+ value: X(w),
619
+ onChange: (f) => S(f.currentTarget.value),
620
620
  "aria-required": d.required || void 0,
621
621
  error: $
622
622
  },
@@ -624,35 +624,35 @@ function At({
624
624
  );
625
625
  case "password":
626
626
  return /* @__PURE__ */ o(
627
- dt,
627
+ ut,
628
628
  {
629
629
  id: c,
630
- label: y,
631
- value: J(w),
632
- onChange: (_) => S(_.currentTarget.value),
630
+ label: b,
631
+ value: X(w),
632
+ onChange: (f) => S(f.currentTarget.value),
633
633
  "aria-required": d.required || void 0,
634
634
  error: $
635
635
  },
636
636
  c
637
637
  );
638
638
  case "tel":
639
- return /* @__PURE__ */ b(Oe, { children: [
639
+ return /* @__PURE__ */ v(Pe, { children: [
640
640
  /* @__PURE__ */ o(
641
- lt,
641
+ ct,
642
642
  {
643
643
  id: c,
644
- label: y,
645
- value: J(w),
646
- onChange: (_) => S(_.currentTarget.value),
644
+ label: b,
645
+ value: X(w),
646
+ onChange: (f) => S(f.currentTarget.value),
647
647
  "aria-required": d.required || void 0,
648
648
  error: $
649
649
  },
650
650
  c
651
651
  ),
652
- c === "phone" && /* @__PURE__ */ b("div", { className: "mt-3 text-xs text-slate-600 space-y-1", children: [
652
+ c === "phone" && /* @__PURE__ */ v("div", { className: "mt-3 text-xs text-slate-600 space-y-1", children: [
653
653
  /* @__PURE__ */ o("p", { children: "By entering your phone number, you agree to receive a one-time SMS from Credify Insurance with a verification code." }),
654
654
  /* @__PURE__ */ o("p", { children: "Message & data rates may apply. One message per request." }),
655
- /* @__PURE__ */ b("p", { children: [
655
+ /* @__PURE__ */ v("p", { children: [
656
656
  "See our",
657
657
  " ",
658
658
  /* @__PURE__ */ o("a", { href: "https://getcredify.com", target: "_blank", rel: "noopener noreferrer", className: "credify-link-underline", children: "Privacy Policy" }),
@@ -666,12 +666,12 @@ function At({
666
666
  ] });
667
667
  case "url":
668
668
  return /* @__PURE__ */ o(
669
- ct,
669
+ dt,
670
670
  {
671
671
  id: c,
672
- label: y,
673
- value: J(w),
674
- onChange: (_) => S(_.currentTarget.value),
672
+ label: b,
673
+ value: X(w),
674
+ onChange: (f) => S(f.currentTarget.value),
675
675
  "aria-required": d.required || void 0,
676
676
  error: $
677
677
  },
@@ -679,12 +679,12 @@ function At({
679
679
  );
680
680
  case "number":
681
681
  return /* @__PURE__ */ o(
682
- at,
682
+ ot,
683
683
  {
684
684
  id: c,
685
- label: y,
686
- value: St(w),
687
- onChange: (_) => S(vt(_.currentTarget.value)),
685
+ label: b,
686
+ value: $t(w),
687
+ onChange: (f) => S(wt(f.currentTarget.value)),
688
688
  "aria-required": d.required || void 0,
689
689
  error: $
690
690
  },
@@ -692,12 +692,12 @@ function At({
692
692
  );
693
693
  case "textarea":
694
694
  return /* @__PURE__ */ o(
695
- ut,
695
+ _t,
696
696
  {
697
697
  id: c,
698
- label: y,
699
- value: J(w),
700
- onChange: (_) => S(_.currentTarget.value),
698
+ label: b,
699
+ value: X(w),
700
+ onChange: (f) => S(f.currentTarget.value),
701
701
  "aria-required": d.required || void 0,
702
702
  error: $,
703
703
  rows: 4
@@ -706,12 +706,12 @@ function At({
706
706
  );
707
707
  case "date":
708
708
  return /* @__PURE__ */ o(
709
- _t,
709
+ ft,
710
710
  {
711
711
  id: c,
712
- label: y,
713
- value: J(w),
714
- onChange: (_) => S(_.currentTarget.value),
712
+ label: b,
713
+ value: X(w),
714
+ onChange: (f) => S(f.currentTarget.value),
715
715
  "aria-required": d.required || void 0,
716
716
  error: $
717
717
  },
@@ -719,23 +719,23 @@ function At({
719
719
  );
720
720
  case "checkbox": {
721
721
  if (d.options) {
722
- const _ = Array.isArray(w) ? w : [];
723
- return /* @__PURE__ */ b("div", { className: "space-y-2", children: [
724
- /* @__PURE__ */ b("div", { className: "form-label", children: [
725
- y,
722
+ const f = Array.isArray(w) ? w : [];
723
+ return /* @__PURE__ */ v("div", { className: "space-y-2", children: [
724
+ /* @__PURE__ */ v("div", { className: "form-label", children: [
725
+ b,
726
726
  d.required && /* @__PURE__ */ o("span", { className: "text-red-600 ml-1", children: "*" })
727
727
  ] }),
728
- /* @__PURE__ */ o("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: d.options.map((f) => {
729
- const g = `${c}-${Ne(f)}`, h = _.includes(f);
728
+ /* @__PURE__ */ o("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: d.options.map((m) => {
729
+ const g = `${c}-${Ne(m)}`, h = f.includes(m);
730
730
  return /* @__PURE__ */ o(
731
- Re,
731
+ Qe,
732
732
  {
733
733
  id: g,
734
- label: f,
734
+ label: m,
735
735
  checked: h,
736
736
  onChange: (B) => {
737
- const C = new Set(_);
738
- B.currentTarget.checked ? C.add(f) : C.delete(f), S(Array.from(C));
737
+ const C = new Set(f);
738
+ B.currentTarget.checked ? C.add(m) : C.delete(m), S(Array.from(C));
739
739
  },
740
740
  "aria-required": d.required || void 0
741
741
  },
@@ -746,46 +746,46 @@ function At({
746
746
  ] }, c);
747
747
  }
748
748
  return /* @__PURE__ */ o(
749
- Re,
749
+ Qe,
750
750
  {
751
751
  id: c,
752
- label: d.required ? `${y} *` : y,
752
+ label: d.required ? `${b} *` : b,
753
753
  checked: !!w,
754
- onChange: (_) => S(_.currentTarget.checked),
754
+ onChange: (f) => S(f.currentTarget.checked),
755
755
  "aria-required": d.required || void 0
756
756
  },
757
757
  c
758
758
  );
759
759
  }
760
760
  case "radio": {
761
- const _ = d.options ?? [], f = p && p.length > 0 ? `${c}__${p.join("__")}` : c;
762
- return /* @__PURE__ */ o(mt, { legend: y, legendClassName: d.required ? "legend-required" : void 0, children: _.map((g) => /* @__PURE__ */ o(ft, { name: f, value: g, checked: w === g, onChange: () => S(g), children: g }, `${c}-${Ne(g)}`)) }, c);
761
+ const f = d.options ?? [], m = y && y.length > 0 ? `${c}__${y.join("__")}` : c;
762
+ return /* @__PURE__ */ o(pt, { legend: b, legendClassName: d.required ? "legend-required" : void 0, children: f.map((g) => /* @__PURE__ */ o(mt, { name: m, value: g, checked: w === g, onChange: () => S(g), children: g }, `${c}-${Ne(g)}`)) }, c);
763
763
  }
764
764
  case "select": {
765
- let _ = d.options ?? [];
766
- return c === "quote_vehicle_id" && (_ = r?.vehicles__items?.map((f) => f.vin) ?? []), /* @__PURE__ */ o(
767
- pt,
765
+ let f = d.options ?? [];
766
+ return c === "quote_vehicle_id" && (f = r?.vehicles__items?.map((m) => m.vin) ?? []), /* @__PURE__ */ o(
767
+ yt,
768
768
  {
769
769
  id: c,
770
- label: y,
770
+ label: b,
771
771
  "aria-required": d.required || void 0,
772
772
  error: $,
773
- value: $t(w),
774
- onChange: (f) => S(f.currentTarget.value),
773
+ value: At(w),
774
+ onChange: (m) => S(m.currentTarget.value),
775
775
  placeholder: "Select an option",
776
- options: _.map((f) => ({ value: f, label: f }))
776
+ options: f.map((m) => ({ value: m, label: m }))
777
777
  },
778
778
  c
779
779
  );
780
780
  }
781
781
  case "address":
782
782
  return /* @__PURE__ */ o(
783
- bt,
783
+ vt,
784
784
  {
785
785
  id: c,
786
- label: y,
787
- value: J(w),
788
- onChange: (_) => S(_),
786
+ label: b,
787
+ value: X(w),
788
+ onChange: (f) => S(f),
789
789
  "aria-required": d.required || void 0,
790
790
  error: $
791
791
  },
@@ -795,77 +795,77 @@ function At({
795
795
  return null;
796
796
  }
797
797
  }
798
- function Q(d, p) {
799
- return d.map((c, y) => {
800
- const w = String(c.key), $ = R(c, p), S = c.conditionals ?? [];
801
- if (!S.length) return /* @__PURE__ */ o("div", { children: $ }, `wrap-${w}-${y}`);
802
- const _ = le(m, p, w), f = S.filter((h) => oe(_, h.conditionalType, h.conditionalValue)), g = f.length > 1 && !f.some((h) => h.conditionalQuestionsAllowMultiple) ? f.slice(0, 1) : f;
803
- return /* @__PURE__ */ b("div", { children: [
798
+ function Q(d, y) {
799
+ return d.map((c, b) => {
800
+ const w = String(c.key), $ = R(c, y), S = c.conditionals ?? [];
801
+ if (!S.length) return /* @__PURE__ */ o("div", { children: $ }, `wrap-${w}-${b}`);
802
+ const f = le(_, y, w), m = S.filter((h) => oe(f, h.conditionalType, h.conditionalValue)), g = m.length > 1 && !m.some((h) => h.conditionalQuestionsAllowMultiple) ? m.slice(0, 1) : m;
803
+ return /* @__PURE__ */ v("div", { children: [
804
804
  $,
805
805
  g.map((h, B) => {
806
806
  const C = h.conditionalQuestions ?? [];
807
807
  if (!C.length) return null;
808
808
  if (!h.conditionalQuestionsAllowMultiple)
809
- return /* @__PURE__ */ o("div", { className: "mt-3", children: Q(C, p) }, `branch-${w}-${B}`);
810
- const N = fe(w), x = ke(m, [...p ?? [], N]) ?? [], F = Math.max(1, x.length || 1), z = () => {
811
- const L = X(m, [...p ?? [], N, x.length], {});
812
- r && i ? i(L) : u(L), k(L);
809
+ return /* @__PURE__ */ o("div", { className: "mt-3", children: Q(C, y) }, `branch-${w}-${B}`);
810
+ const N = fe(w), x = Se(_, [...y ?? [], N]) ?? [], F = Math.max(1, x.length || 1), z = () => {
811
+ const O = J(_, [...y ?? [], N, x.length], {});
812
+ r && i ? i(O) : u(O), k(O);
813
813
  }, Z = () => {
814
- const L = x.slice(0, Math.max(0, x.length - 1)), V = X(m, [...p ?? [], N], L);
814
+ const O = x.slice(0, Math.max(0, x.length - 1)), V = J(_, [...y ?? [], N], O);
815
815
  r && i ? i(V) : u(V), k(V);
816
816
  }, q = `${w}__c${B}`;
817
- return /* @__PURE__ */ b("div", { className: "mt-3", children: [
818
- /* @__PURE__ */ b("div", { className: "flex items-center justify-between mb-2", children: [
817
+ return /* @__PURE__ */ v("div", { className: "mt-3", children: [
818
+ /* @__PURE__ */ v("div", { className: "flex items-center justify-between mb-2", children: [
819
819
  /* @__PURE__ */ o("div", { className: "text-sm font-medium opacity-75", children: "Add one or more entries" }),
820
- /* @__PURE__ */ b("div", { className: "space-x-2", children: [
820
+ /* @__PURE__ */ v("div", { className: "space-x-2", children: [
821
821
  /* @__PURE__ */ o("button", { type: "button", className: "btn-outline px-3 py-1", onClick: z, children: "Add another" }),
822
822
  F > 1 && /* @__PURE__ */ o("button", { type: "button", className: "btn-outline px-3 py-1", onClick: Z, children: "Remove last" })
823
823
  ] })
824
824
  ] }),
825
- Array.from({ length: F }).map((L, V) => {
826
- const K = [...p ?? [], N, V], W = `${q}__i${V}`;
827
- return /* @__PURE__ */ b("div", { className: "rounded-lg border p-3 mb-3", children: [
828
- /* @__PURE__ */ b("div", { className: "text-sm font-semibold mb-2", children: [
825
+ Array.from({ length: F }).map((O, V) => {
826
+ const L = [...y ?? [], N, V], W = `${q}__i${V}`;
827
+ return /* @__PURE__ */ v("div", { className: "rounded-lg border p-3 mb-3", children: [
828
+ /* @__PURE__ */ v("div", { className: "text-sm font-semibold mb-2", children: [
829
829
  "Entry #",
830
830
  V + 1
831
831
  ] }),
832
- C.map((ee) => /* @__PURE__ */ b("div", { className: "mt-3", children: [
833
- R(ee, K),
832
+ C.map((ee) => /* @__PURE__ */ v("div", { className: "mt-3", children: [
833
+ R(ee, L),
834
834
  (() => {
835
- const Te = ee.conditionals ?? [];
836
- if (!Te.length) return null;
837
- const Ze = le(m, K, ee.key), de = Te.filter((te) => oe(Ze, te.conditionalType, te.conditionalValue));
838
- return (de.length > 1 && !de.some((te) => te.conditionalQuestionsAllowMultiple) ? de.slice(0, 1) : de).map((te, he) => {
839
- const ye = te.conditionalQuestions ?? [];
840
- if (!ye.length) return null;
835
+ const Ie = ee.conditionals ?? [];
836
+ if (!Ie.length) return null;
837
+ const qe = le(_, L, ee.key), de = Ie.filter((te) => oe(qe, te.conditionalType, te.conditionalValue));
838
+ return (de.length > 1 && !de.some((te) => te.conditionalQuestionsAllowMultiple) ? de.slice(0, 1) : de).map((te, ge) => {
839
+ const he = te.conditionalQuestions ?? [];
840
+ if (!he.length) return null;
841
841
  if (!te.conditionalQuestionsAllowMultiple)
842
- return /* @__PURE__ */ o("div", { className: "mt-3", children: Q(ye, K) }, `nested-${W}-${he}`);
843
- const ue = fe(ee.key), _e = ke(m, [...K, ue]) ?? [], Ie = Math.max(1, _e.length || 1), qe = () => {
844
- const ie = X(m, [...K, ue, _e.length], {});
842
+ return /* @__PURE__ */ o("div", { className: "mt-3", children: Q(he, L) }, `nested-${W}-${ge}`);
843
+ const ue = fe(ee.key), _e = Se(_, [...L, ue]) ?? [], Re = Math.max(1, _e.length || 1), et = () => {
844
+ const ie = J(_, [...L, ue, _e.length], {});
845
845
  r && i ? i(ie) : u(ie), k(ie);
846
- }, et = () => {
847
- const ie = _e.slice(0, Math.max(0, _e.length - 1)), ne = X(m, [...K, ue], ie);
846
+ }, tt = () => {
847
+ const ie = _e.slice(0, Math.max(0, _e.length - 1)), ne = J(_, [...L, ue], ie);
848
848
  r && i ? i(ne) : u(ne), k(ne);
849
849
  };
850
- return /* @__PURE__ */ b("div", { className: "mt-3", children: [
851
- /* @__PURE__ */ b("div", { className: "flex items-center justify-between mb-2", children: [
850
+ return /* @__PURE__ */ v("div", { className: "mt-3", children: [
851
+ /* @__PURE__ */ v("div", { className: "flex items-center justify-between mb-2", children: [
852
852
  /* @__PURE__ */ o("div", { className: "text-sm font-medium opacity-75", children: "Add one or more entries" }),
853
- /* @__PURE__ */ b("div", { className: "space-x-2", children: [
854
- /* @__PURE__ */ o("button", { type: "button", className: "btn-outline px-3 py-1", onClick: qe, children: "Add another" }),
855
- Ie > 1 && /* @__PURE__ */ o("button", { type: "button", className: "btn-outline px-3 py-1", onClick: et, children: "Remove last" })
853
+ /* @__PURE__ */ v("div", { className: "space-x-2", children: [
854
+ /* @__PURE__ */ o("button", { type: "button", className: "btn-outline px-3 py-1", onClick: et, children: "Add another" }),
855
+ Re > 1 && /* @__PURE__ */ o("button", { type: "button", className: "btn-outline px-3 py-1", onClick: tt, children: "Remove last" })
856
856
  ] })
857
857
  ] }),
858
- Array.from({ length: Ie }).map((ie, ne) => {
859
- const tt = [...K, ue, ne];
860
- return /* @__PURE__ */ b("div", { className: "rounded-lg border p-3 mb-3", children: [
861
- /* @__PURE__ */ b("div", { className: "text-sm font-semibold mb-2", children: [
858
+ Array.from({ length: Re }).map((ie, ne) => {
859
+ const nt = [...L, ue, ne];
860
+ return /* @__PURE__ */ v("div", { className: "rounded-lg border p-3 mb-3", children: [
861
+ /* @__PURE__ */ v("div", { className: "text-sm font-semibold mb-2", children: [
862
862
  "Entry #",
863
863
  ne + 1
864
864
  ] }),
865
- Q(ye, tt)
866
- ] }, `nested-item-${W}-${he}-${ne}`);
865
+ Q(he, nt)
866
+ ] }, `nested-item-${W}-${ge}-${ne}`);
867
867
  })
868
- ] }, `nested-repeat-${W}-${he}`);
868
+ ] }, `nested-repeat-${W}-${ge}`);
869
869
  });
870
870
  })()
871
871
  ] }, `${W}-${String(ee.key)}`))
@@ -873,40 +873,40 @@ function At({
873
873
  })
874
874
  ] }, `branch-${w}-${B}`);
875
875
  })
876
- ] }, `wrap-${w}-${y}`);
876
+ ] }, `wrap-${w}-${b}`);
877
877
  });
878
878
  }
879
879
  const E = se(() => {
880
- const d = [], p = (c, y) => {
880
+ const d = [], y = (c, b) => {
881
881
  c.forEach((w) => {
882
882
  d.push(w);
883
883
  const $ = String(w.key), S = w.conditionals ?? [];
884
884
  if (!S.length) return;
885
- const _ = le(m, y, $), f = S.filter((h) => oe(_, h.conditionalType, h.conditionalValue));
886
- (f.length > 1 && !f.some((h) => h.conditionalQuestionsAllowMultiple) ? f.slice(0, 1) : f).forEach((h) => {
885
+ const f = le(_, b, $), m = S.filter((h) => oe(f, h.conditionalType, h.conditionalValue));
886
+ (m.length > 1 && !m.some((h) => h.conditionalQuestionsAllowMultiple) ? m.slice(0, 1) : m).forEach((h) => {
887
887
  const B = h.conditionalQuestions ?? [];
888
- B.length && (h.conditionalQuestionsAllowMultiple || p(B, y));
888
+ B.length && (h.conditionalQuestionsAllowMultiple || y(B, b));
889
889
  });
890
890
  });
891
891
  };
892
- return p(s), d;
893
- }, [s, m]);
892
+ return y(s), d;
893
+ }, [s, _]);
894
894
  function T(d) {
895
895
  d.preventDefault();
896
- const p = ge(E, m);
897
- if (I(p), Object.keys(p).length > 0) {
898
- const c = E.findIndex((y) => p[y.key]);
896
+ const y = ye(E, _);
897
+ if (I(y), Object.keys(y).length > 0) {
898
+ const c = E.findIndex((b) => y[b.key]);
899
899
  c >= 0 && document.getElementById(E[c].key)?.focus();
900
900
  return;
901
901
  }
902
- n(m);
902
+ n(_);
903
903
  }
904
904
  return /* @__PURE__ */ o("form", { className: "space-y-6 px-1", onSubmit: T, noValidate: !0, children: Q(s) });
905
905
  }
906
- function Be(e) {
906
+ function Fe(e) {
907
907
  return typeof e == "number" && Number.isFinite(e) ? e : typeof e == "string" && e.trim() !== "" && !Number.isNaN(Number(e)) ? Number(e) : null;
908
908
  }
909
- function Fe(e) {
909
+ function De(e) {
910
910
  if (e instanceof Date && !Number.isNaN(e.getTime())) return e.getTime();
911
911
  if (typeof e == "string") {
912
912
  const t = Date.parse(e);
@@ -914,29 +914,29 @@ function Fe(e) {
914
914
  }
915
915
  return null;
916
916
  }
917
- function De(e, t) {
918
- const r = Be(e), i = Be(t);
917
+ function ze(e, t) {
918
+ const r = Fe(e), i = Fe(t);
919
919
  if (r != null && i != null) return r - i;
920
- const n = Fe(e), s = Fe(t);
920
+ const n = De(e), s = De(t);
921
921
  return n != null && s != null ? n - s : e == null || t == null ? null : String(e).localeCompare(String(t));
922
922
  }
923
- function Et(e, t) {
923
+ function Ct(e, t) {
924
924
  return Array.isArray(e) ? e.some((r) => r === t) : typeof e == "string" ? t != null && e.includes(String(t)) : !1;
925
925
  }
926
- function Ue(e, t, r) {
926
+ function Ve(e, t, r) {
927
927
  switch (t) {
928
928
  case "equals":
929
929
  return e === r;
930
930
  case "lessThan": {
931
- const i = De(e, r);
931
+ const i = ze(e, r);
932
932
  return i != null && i < 0;
933
933
  }
934
934
  case "greaterThan": {
935
- const i = De(e, r);
935
+ const i = ze(e, r);
936
936
  return i != null && i > 0;
937
937
  }
938
938
  case "contains":
939
- return Et(e, r);
939
+ return Ct(e, r);
940
940
  case "startsWith":
941
941
  return e != null && r != null && String(e).startsWith(String(r));
942
942
  case "endsWith":
@@ -945,55 +945,128 @@ function Ue(e, t, r) {
945
945
  return !1;
946
946
  }
947
947
  }
948
- function ze(e, t) {
948
+ function Ke(e, t) {
949
949
  const r = [];
950
950
  return ((n) => {
951
951
  n.forEach((s) => {
952
952
  r.push(s);
953
953
  const l = String(s.key), a = t[l], u = s.conditionals ?? [];
954
954
  if (!u.length) return;
955
- const v = u.filter((m) => Ue(a, m.conditionalType, m.conditionalValue));
956
- (v.length > 1 && !v.some((m) => m.conditionalQuestionsAllowMultiple) ? v.slice(0, 1) : v).forEach((m) => {
957
- const A = m.conditionalQuestions ?? [];
958
- A.length && (m.conditionalQuestionsAllowMultiple || A.forEach((I) => r.push(I)));
955
+ const p = u.filter((_) => Ve(a, _.conditionalType, _.conditionalValue));
956
+ (p.length > 1 && !p.some((_) => _.conditionalQuestionsAllowMultiple) ? p.slice(0, 1) : p).forEach((_) => {
957
+ const A = _.conditionalQuestions ?? [];
958
+ A.length && (_.conditionalQuestionsAllowMultiple || A.forEach((I) => r.push(I)));
959
959
  });
960
960
  });
961
961
  })(e), r;
962
962
  }
963
- const Ve = "__items", Ye = (e) => `${e}${Ve}`;
964
- function Se(e, t) {
963
+ const Ye = "__items", Ge = (e) => `${e}${Ye}`;
964
+ function $e(e, t) {
965
965
  for (const r of e) {
966
966
  const i = String(r.key), n = t[i], s = r.conditionals ?? [];
967
967
  if (!s.length) continue;
968
- const l = s.filter((u) => Ue(n, u.conditionalType, u.conditionalValue)), a = l.length > 1 && !l.some((u) => u.conditionalQuestionsAllowMultiple) ? l.slice(0, 1) : l;
968
+ const l = s.filter((u) => Ve(n, u.conditionalType, u.conditionalValue)), a = l.length > 1 && !l.some((u) => u.conditionalQuestionsAllowMultiple) ? l.slice(0, 1) : l;
969
969
  for (const u of a) {
970
- const v = u.conditionalQuestions ?? [];
971
- if (!v.length) continue;
970
+ const p = u.conditionalQuestions ?? [];
971
+ if (!p.length) continue;
972
972
  if (!u.conditionalQuestionsAllowMultiple) {
973
- if (Se(v, t)) return !0;
973
+ if ($e(p, t)) return !0;
974
974
  continue;
975
975
  }
976
- const k = t[Ye(i)] ?? [];
976
+ const k = t[Ge(i)] ?? [];
977
977
  if (k.length === 0) return !0;
978
- for (const m of k) {
979
- const A = ge(v, m);
980
- if (Object.values(A).some(Boolean) || Se(v, m)) return !0;
978
+ for (const _ of k) {
979
+ const A = ye(p, _);
980
+ if (Object.values(A).some(Boolean) || $e(p, _)) return !0;
981
981
  }
982
982
  }
983
983
  }
984
984
  return !1;
985
985
  }
986
- function Ke(e, t) {
987
- return Se(e, t);
986
+ function Le(e, t) {
987
+ return $e(e, t);
988
+ }
989
+ const Tt = [
990
+ ["display", "flex"],
991
+ ["visibility", "visible"],
992
+ ["min-height", "3rem"],
993
+ ["clip-path", "none"],
994
+ ["overflow", "visible"],
995
+ ["position", "relative"],
996
+ ["pointer-events", "auto"]
997
+ ];
998
+ function we(e, t, r) {
999
+ for (const [i, n] of Tt)
1000
+ e.style.setProperty(i, n, "important");
1001
+ e.style.setProperty("opacity", t, "important"), e.style.setProperty("cursor", r ? "not-allowed" : "pointer", "important");
1002
+ }
1003
+ function It({
1004
+ active: e,
1005
+ stagesLength: t,
1006
+ disableNext: r,
1007
+ isSubmitting: i,
1008
+ onGoNext: n
1009
+ }) {
1010
+ const s = K(null), l = K(null);
1011
+ D(() => {
1012
+ const u = s.current, p = l.current;
1013
+ if (!u) return;
1014
+ we(u, r ? "0.5" : "1", r), p && (p.style.setProperty("display", "flex", "important"), p.style.setProperty("visibility", "visible", "important"), p.style.setProperty("opacity", "1", "important"));
1015
+ const _ = new MutationObserver(() => {
1016
+ u.isConnected && (we(u, r ? "0.5" : "1", r), p && (p.style.setProperty("display", "flex", "important"), p.style.setProperty("visibility", "visible", "important")));
1017
+ });
1018
+ _.observe(u, { attributes: !0, attributeFilter: ["style", "class"] });
1019
+ const A = window.setInterval(() => {
1020
+ u.isConnected && we(u, r ? "0.5" : "1", r);
1021
+ }, 150);
1022
+ return () => {
1023
+ _.disconnect(), window.clearInterval(A);
1024
+ };
1025
+ }, [r]);
1026
+ const a = () => {
1027
+ r || n();
1028
+ };
1029
+ return /* @__PURE__ */ o("div", { ref: l, className: e > 0 ? "" : "w-full", style: { minHeight: 0 }, children: /* @__PURE__ */ v(
1030
+ "button",
1031
+ {
1032
+ ref: s,
1033
+ type: "button",
1034
+ "data-widget-ctrl": "next",
1035
+ "aria-disabled": r,
1036
+ onClick: a,
1037
+ className: [
1038
+ "form-wizard-next-btn",
1039
+ e > 0 ? "" : "w-full",
1040
+ "h-12 rounded-full text-white transition",
1041
+ "disabled:opacity-50 disabled:cursor-not-allowed",
1042
+ "flex items-center justify-center gap-2",
1043
+ r ? "bg-gray-300" : "bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40"
1044
+ ].join(" "),
1045
+ children: [
1046
+ i && /* @__PURE__ */ v("svg", { className: "animate-spin h-5 w-5 text-white", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
1047
+ /* @__PURE__ */ o("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
1048
+ /* @__PURE__ */ o(
1049
+ "path",
1050
+ {
1051
+ className: "opacity-75",
1052
+ fill: "currentColor",
1053
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
1054
+ }
1055
+ )
1056
+ ] }),
1057
+ e === t - 1 ? "Finish" : "Next"
1058
+ ]
1059
+ }
1060
+ ) });
988
1061
  }
989
- function Ct({
1062
+ function Rt({
990
1063
  stages: e,
991
1064
  onStageComplete: t,
992
1065
  onComplete: r,
993
1066
  initialValues: i,
994
1067
  initialActive: n
995
1068
  }) {
996
- const [s, l] = M(n ?? 0), [a, u] = M(i ?? {}), [v, k] = M({}), [m, A] = M(!1), [I, R] = M(!1), [Q, E] = M(null), T = O([]), d = Array.isArray(e) && e.length > 0, p = d ? e[Math.min(s, e.length - 1)] : null, c = p?.key ?? null;
1069
+ const [s, l] = M(n ?? 0), [a, u] = M(i ?? {}), [p, k] = M({}), [_, A] = M(!1), [I, R] = M(!1), [Q, E] = M(null), T = K([]), d = Array.isArray(e) && e.length > 0, y = d ? e[Math.min(s, e.length - 1)] : null, c = y?.key ?? null;
997
1070
  D(() => {
998
1071
  n !== void 0 && l(n);
999
1072
  }, [n]), D(() => {
@@ -1002,57 +1075,57 @@ function Ct({
1002
1075
  }, [s]), D(() => {
1003
1076
  i !== void 0 && u(i);
1004
1077
  }, [i]), D(() => {
1005
- if (!p || !c) {
1078
+ if (!y || !c) {
1006
1079
  A(!1), E(null);
1007
1080
  return;
1008
1081
  }
1009
- if (v[c]) {
1082
+ if (p[c]) {
1010
1083
  A(!1), E(null);
1011
1084
  return;
1012
1085
  }
1013
1086
  let g = !1;
1014
- return A(!0), E(null), Promise.resolve(p.loadQuestions()).then((h) => {
1087
+ return A(!0), E(null), Promise.resolve(y.loadQuestions()).then((h) => {
1015
1088
  if (!g) {
1016
1089
  if (!Array.isArray(h)) throw new Error(`loadQuestions("${c}") did not return an array`);
1017
1090
  k((B) => ({ ...B, [c]: h }));
1018
1091
  }
1019
1092
  }).catch((h) => {
1020
- g || E(`Failed to load stage "${p?.title ?? ""}": ${h?.message ?? "Unknown error"}`);
1093
+ g || E(`Failed to load stage "${y?.title ?? ""}": ${h?.message ?? "Unknown error"}`);
1021
1094
  }).finally(() => {
1022
1095
  g || A(!1);
1023
1096
  }), () => {
1024
1097
  g = !0;
1025
1098
  };
1026
- }, [p, c, v]);
1027
- const y = c ? v[c] : void 0, w = se(() => {
1028
- if (!y) return {};
1099
+ }, [y, c, p]);
1100
+ const b = c ? p[c] : void 0, w = se(() => {
1101
+ if (!b) return {};
1029
1102
  const g = {};
1030
1103
  ((C) => {
1031
1104
  const N = [], x = (F) => {
1032
1105
  F.forEach((z, Z) => {
1033
- const q = Pe(z, Z);
1106
+ const q = Ue(z, Z);
1034
1107
  N.push(q);
1035
- const L = Ye(q);
1036
- N.push(L), (z.conditionals ?? []).forEach((K) => {
1037
- const W = K.conditionalQuestions ?? [];
1108
+ const O = Ge(q);
1109
+ N.push(O), (z.conditionals ?? []).forEach((L) => {
1110
+ const W = L.conditionalQuestions ?? [];
1038
1111
  W.length > 0 && x(W);
1039
1112
  });
1040
1113
  });
1041
1114
  };
1042
1115
  return x(C), N;
1043
- })(y).forEach((C) => {
1116
+ })(b).forEach((C) => {
1044
1117
  C in a && (g[C] = a[C]);
1045
1118
  });
1046
1119
  for (const [C, N] of Object.entries(a))
1047
- C.endsWith(Ve) && !(C in g) && (g[C] = N);
1120
+ C.endsWith(Ye) && !(C in g) && (g[C] = N);
1048
1121
  return g;
1049
- }, [y, a]), $ = (g) => {
1122
+ }, [b, a]), $ = (g) => {
1050
1123
  u((h) => ({ ...h, ...g }));
1051
1124
  }, S = () => {
1052
1125
  l((g) => g > 0 ? g - 1 : 0), document.querySelector(".panel-body")?.scrollTo({ top: 0, behavior: "instant" });
1053
- }, _ = async () => {
1054
- if (!y || !p || m || Q || I) return;
1055
- const g = ze(y, a), h = ge(g, a), B = Object.values(h).some(Boolean), C = Ke(y, a);
1126
+ }, f = async () => {
1127
+ if (!b || !y || _ || Q || I) return;
1128
+ const g = Ke(b, a), h = ye(g, a), B = Object.values(h).some(Boolean), C = Le(b, a);
1056
1129
  if (!(B || C)) {
1057
1130
  R(!0);
1058
1131
  try {
@@ -1066,13 +1139,13 @@ function Ct({
1066
1139
  R(!1);
1067
1140
  }
1068
1141
  }
1069
- }, f = se(() => {
1070
- if (!y || m || Q || I) return !0;
1071
- const g = ze(y, a), h = ge(g, a), B = Object.values(h).some(Boolean), C = Ke(y, a);
1142
+ }, m = se(() => {
1143
+ if (!b || _ || Q || I) return !0;
1144
+ const g = Ke(b, a), h = ye(g, a), B = Object.values(h).some(Boolean), C = Le(b, a);
1072
1145
  return B || C;
1073
- }, [y, a, m, Q, I]);
1074
- return d ? /* @__PURE__ */ b("div", { className: "space-y-6", children: [
1075
- /* @__PURE__ */ b("div", { className: "form-wizard-steps-header flex items-center justify-between gap-4", children: [
1146
+ }, [b, a, _, Q, I]);
1147
+ return d ? /* @__PURE__ */ v("div", { className: "space-y-6", children: [
1148
+ /* @__PURE__ */ v("div", { className: "form-wizard-steps-header flex items-center justify-between gap-4", children: [
1076
1149
  /* @__PURE__ */ o(
1077
1150
  "ol",
1078
1151
  {
@@ -1096,28 +1169,28 @@ function Ct({
1096
1169
  ])
1097
1170
  }
1098
1171
  ),
1099
- /* @__PURE__ */ b("div", { className: "form-wizard-step-counter text-sm text-slate-500 flex-shrink-0", children: [
1172
+ /* @__PURE__ */ v("div", { className: "form-wizard-step-counter text-sm text-slate-500 flex-shrink-0", children: [
1100
1173
  Math.min(s + 1, e.length),
1101
1174
  " / ",
1102
1175
  e.length
1103
1176
  ] })
1104
1177
  ] }),
1105
- /* @__PURE__ */ b("div", { children: [
1106
- m && /* @__PURE__ */ o("div", { className: "text-slate-500", children: "Loading…" }),
1107
- p && /* @__PURE__ */ o(
1108
- At,
1178
+ /* @__PURE__ */ v("div", { children: [
1179
+ _ && /* @__PURE__ */ o("div", { className: "text-slate-500", children: "Loading…" }),
1180
+ y && /* @__PURE__ */ o(
1181
+ Et,
1109
1182
  {
1110
- questions: y ?? [],
1183
+ questions: b ?? [],
1111
1184
  controlledValues: w,
1112
1185
  onChangeValues: $,
1113
- onSubmit: () => _()
1186
+ onSubmit: () => f()
1114
1187
  },
1115
- p.key
1188
+ y.key
1116
1189
  )
1117
1190
  ] }),
1118
- !m && Q && /* @__PURE__ */ b("div", { className: "text-red-600 text-sm -mt-4", children: [
1191
+ !_ && Q && /* @__PURE__ */ v("div", { className: "text-red-600 text-sm -mt-4", children: [
1119
1192
  /* @__PURE__ */ o("div", { children: Q }),
1120
- p && /* @__PURE__ */ o(
1193
+ y && /* @__PURE__ */ o(
1121
1194
  "button",
1122
1195
  {
1123
1196
  type: "button",
@@ -1133,111 +1206,81 @@ function Ct({
1133
1206
  }
1134
1207
  )
1135
1208
  ] }),
1136
- /* @__PURE__ */ b("div", { className: s > 0 ? "grid grid-cols-2 gap-3" : "", children: [
1209
+ /* @__PURE__ */ v("div", { className: s > 0 ? "grid grid-cols-2 gap-3" : "", children: [
1137
1210
  s > 0 && /* @__PURE__ */ o(
1138
1211
  "button",
1139
1212
  {
1140
1213
  type: "button",
1141
1214
  onClick: S,
1142
- disabled: m,
1215
+ disabled: _,
1143
1216
  className: "credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition",
1144
1217
  children: "Back"
1145
1218
  }
1146
1219
  ),
1147
- /* @__PURE__ */ b(
1148
- "button",
1149
- {
1150
- type: "button",
1151
- "data-widget-ctrl": "next",
1152
- onClick: _,
1153
- disabled: f,
1154
- className: [
1155
- "form-wizard-next-btn",
1156
- s > 0 ? "" : "w-full",
1157
- "h-12 rounded-full text-white transition",
1158
- "disabled:opacity-50 disabled:cursor-not-allowed",
1159
- "flex items-center justify-center gap-2",
1160
- f ? "bg-gray-300" : "bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40"
1161
- ].join(" "),
1162
- children: [
1163
- I && /* @__PURE__ */ b("svg", { className: "animate-spin h-5 w-5 text-white", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
1164
- /* @__PURE__ */ o("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
1165
- /* @__PURE__ */ o(
1166
- "path",
1167
- {
1168
- className: "opacity-75",
1169
- fill: "currentColor",
1170
- d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
1171
- }
1172
- )
1173
- ] }),
1174
- s === e.length - 1 ? "Finish" : "Next"
1175
- ]
1176
- }
1177
- )
1220
+ /* @__PURE__ */ o(It, { active: s, stagesLength: e.length, disableNext: m, isSubmitting: I, onGoNext: f })
1178
1221
  ] })
1179
1222
  ] }) : /* @__PURE__ */ o("div", { className: "text-slate-600", children: "Loading..." });
1180
1223
  }
1181
- const Ee = "credify_quote_id", Ce = "credify_auth_token";
1182
- function Tt(e) {
1224
+ const Ce = "credify_quote_id", Te = "credify_auth_token";
1225
+ function Qt(e) {
1183
1226
  try {
1184
- localStorage.setItem(Ee, e);
1227
+ localStorage.setItem(Ce, e);
1185
1228
  } catch (t) {
1186
1229
  console.error("Failed to save quoteId to localStorage:", t);
1187
1230
  }
1188
1231
  }
1189
- function It() {
1232
+ function jt() {
1190
1233
  try {
1191
- return localStorage.getItem(Ee);
1234
+ return localStorage.getItem(Ce);
1192
1235
  } catch (e) {
1193
1236
  return console.error("Failed to load quoteId from localStorage:", e), null;
1194
1237
  }
1195
1238
  }
1196
- function Ge() {
1239
+ function He() {
1197
1240
  try {
1198
- localStorage.removeItem(Ee);
1241
+ localStorage.removeItem(Ce);
1199
1242
  } catch (e) {
1200
1243
  console.error("Failed to clear quoteId from localStorage:", e);
1201
1244
  }
1202
1245
  }
1203
- function Rt(e) {
1246
+ function Mt(e) {
1204
1247
  try {
1205
- localStorage.setItem(Ce, e);
1248
+ localStorage.setItem(Te, e);
1206
1249
  } catch (t) {
1207
1250
  console.error("Failed to save authToken to localStorage:", t);
1208
1251
  }
1209
1252
  }
1210
- function Qt() {
1253
+ function Bt() {
1211
1254
  try {
1212
- return localStorage.getItem(Ce);
1255
+ return localStorage.getItem(Te);
1213
1256
  } catch (e) {
1214
1257
  return console.error("Failed to load authToken from localStorage:", e), null;
1215
1258
  }
1216
1259
  }
1217
- function He() {
1260
+ function Xe() {
1218
1261
  try {
1219
- localStorage.removeItem(Ce);
1262
+ localStorage.removeItem(Te);
1220
1263
  } catch (e) {
1221
1264
  console.error("Failed to clear authToken from localStorage:", e);
1222
1265
  }
1223
1266
  }
1224
- function jt() {
1225
- Ge(), He();
1267
+ function Ft() {
1268
+ He(), Xe();
1226
1269
  }
1227
1270
  const G = "https://api.getcredify.com";
1228
1271
  let ae = null;
1229
- function Mt(e) {
1230
- ae = e, Rt(e);
1272
+ function Dt(e) {
1273
+ ae = e, Mt(e);
1231
1274
  }
1232
1275
  function me() {
1233
1276
  return ae;
1234
1277
  }
1235
- function $e() {
1236
- const e = Qt();
1278
+ function Ae() {
1279
+ const e = Bt();
1237
1280
  e && (ae = e);
1238
1281
  }
1239
1282
  function Je() {
1240
- ae = null, He();
1283
+ ae = null, Xe();
1241
1284
  }
1242
1285
  async function H(e, t) {
1243
1286
  const r = {
@@ -1261,13 +1304,13 @@ async function H(e, t) {
1261
1304
  }
1262
1305
  return i;
1263
1306
  }
1264
- async function Bt(e) {
1307
+ async function zt(e) {
1265
1308
  return await (await H(`${G}/get-questions-by-stage`, { stage: e })).json();
1266
1309
  }
1267
- async function we() {
1310
+ async function xe() {
1268
1311
  return await (await H(`${G}/get-stages-for-quote`, {})).json();
1269
1312
  }
1270
- async function Ft(e) {
1313
+ async function Kt(e) {
1271
1314
  const r = await (await H(`${G}/create-quote`, { phone: e })).json();
1272
1315
  if (!r || typeof r != "object" || !r.quoteId)
1273
1316
  throw new Error(`Invalid createQuote response: ${JSON.stringify(r)}`);
@@ -1277,28 +1320,28 @@ async function ce(e, t, r) {
1277
1320
  const i = { payload: e, getRates: t };
1278
1321
  return r && typeof r == "string" && r.trim() !== "" && (i.quoteId = r), await (await H(`${G}/update-quote`, i)).json();
1279
1322
  }
1280
- async function Dt(e, t) {
1323
+ async function Lt(e, t) {
1281
1324
  return await (await H(`${G}/verify-quote`, { quoteId: e, smsCode: t })).json();
1282
1325
  }
1283
- async function zt(e) {
1326
+ async function Ot(e) {
1284
1327
  return await (await H(`${G}/is-supported-state`, { state: e })).json();
1285
1328
  }
1286
- async function Kt() {
1329
+ async function Wt() {
1287
1330
  return await (await H(`${G}/get-rates`, {})).json();
1288
1331
  }
1289
- async function Lt(e) {
1332
+ async function Pt(e) {
1290
1333
  const t = e ? { quoteId: e } : {};
1291
1334
  return await (await H(`${G}/get-quote`, t)).json();
1292
1335
  }
1293
- async function Wt(e) {
1336
+ async function Ut(e) {
1294
1337
  const r = await (await H(`${G}/request-bind`, { quoteRateId: e })).json();
1295
1338
  return r && typeof r == "object" && "success" in r ? r : { success: !0 };
1296
1339
  }
1297
- const Ot = new Intl.NumberFormat("en-US", {
1340
+ const Vt = new Intl.NumberFormat("en-US", {
1298
1341
  style: "currency",
1299
1342
  currency: "USD"
1300
1343
  });
1301
- function Le({ onBack: e }) {
1344
+ function Oe({ onBack: e }) {
1302
1345
  return /* @__PURE__ */ o(
1303
1346
  "button",
1304
1347
  {
@@ -1309,65 +1352,65 @@ function Le({ onBack: e }) {
1309
1352
  }
1310
1353
  );
1311
1354
  }
1312
- function Pt({ rates: e, onBack: t }) {
1355
+ function Yt({ rates: e, onBack: t }) {
1313
1356
  const r = Array.isArray(e) && e.length > 0, [i, n] = M({});
1314
1357
  return D(() => {
1315
- $e();
1316
- }, []), r ? /* @__PURE__ */ b("section", { className: "mt-8", children: [
1358
+ Ae();
1359
+ }, []), r ? /* @__PURE__ */ v("section", { className: "mt-8", children: [
1317
1360
  /* @__PURE__ */ o("h3", { className: "text-lg font-semibold text-slate-900", children: "Rates" }),
1318
1361
  /* @__PURE__ */ o("div", { className: "mt-4 grid gap-4 sm:grid-cols-2 lg:grid-cols-3", children: e.map((s) => {
1319
- const l = s.premium_cents / 100, a = Ot.format(l), u = s.quote_rate_id, v = i[u] ?? "idle", k = v === "loading", m = v === "success", A = async () => {
1362
+ const l = s.premium_cents / 100, a = Vt.format(l), u = s.quote_rate_id, p = i[u] ?? "idle", k = p === "loading", _ = p === "success", A = async () => {
1320
1363
  n((I) => ({ ...I, [u]: "loading" }));
1321
1364
  try {
1322
- if ($e(), !me())
1365
+ if (Ae(), !me())
1323
1366
  throw new Error("Authentication required. Please verify your phone number first.");
1324
- if (!((await Wt(s.quote_rate_id))?.success !== !1)) throw new Error("Request failed");
1325
- jt(), Je(), n((E) => ({ ...E, [u]: "success" }));
1367
+ if (!((await Ut(s.quote_rate_id))?.success !== !1)) throw new Error("Request failed");
1368
+ Ft(), Je(), n((E) => ({ ...E, [u]: "success" }));
1326
1369
  } catch {
1327
1370
  n((I) => ({ ...I, [u]: "error" }));
1328
1371
  }
1329
1372
  };
1330
- return /* @__PURE__ */ b("div", { className: "flex flex-col rounded-xl border border-slate-200 bg-white p-6 shadow-sm transition hover:shadow-md", children: [
1331
- /* @__PURE__ */ b("div", { className: "mb-4 flex items-center gap-3", children: [
1373
+ return /* @__PURE__ */ v("div", { className: "flex flex-col rounded-xl border border-slate-200 bg-white p-6 shadow-sm transition hover:shadow-md", children: [
1374
+ /* @__PURE__ */ v("div", { className: "mb-4 flex items-center gap-3", children: [
1332
1375
  s.carrier_logo_base64 ? /* @__PURE__ */ o("img", { src: `data:image/png;base64,${s.carrier_logo_base64}`, alt: s.carrier_name, className: "h-12 w-auto object-contain" }) : /* @__PURE__ */ o("div", { className: "flex h-12 w-12 items-center justify-center rounded-md bg-slate-100 text-sm font-semibold text-slate-500", children: s.carrier_name.charAt(0).toUpperCase() }),
1333
1376
  /* @__PURE__ */ o("div", { className: "flex-1", children: /* @__PURE__ */ o("h4", { className: "font-semibold text-slate-900", children: s.carrier_name }) })
1334
1377
  ] }),
1335
- /* @__PURE__ */ b("div", { className: "mb-2", children: [
1378
+ /* @__PURE__ */ v("div", { className: "mb-2", children: [
1336
1379
  /* @__PURE__ */ o("p", { className: "text-sm text-slate-500", children: "Premium" }),
1337
1380
  /* @__PURE__ */ o("p", { className: "text-2xl font-bold text-slate-900", children: a })
1338
1381
  ] }),
1339
- /* @__PURE__ */ b("div", { className: "mb-4", children: [
1382
+ /* @__PURE__ */ v("div", { className: "mb-4", children: [
1340
1383
  /* @__PURE__ */ o("p", { className: "text-sm text-slate-500", children: "Term" }),
1341
- /* @__PURE__ */ b("p", { className: "font-medium text-slate-700", children: [
1384
+ /* @__PURE__ */ v("p", { className: "font-medium text-slate-700", children: [
1342
1385
  s.term_months,
1343
1386
  " months"
1344
1387
  ] })
1345
1388
  ] }),
1346
- s.carrier_quote_id && /* @__PURE__ */ o("div", { className: "mb-4", children: /* @__PURE__ */ b("p", { className: "text-xs text-slate-400", children: [
1389
+ s.carrier_quote_id && /* @__PURE__ */ o("div", { className: "mb-4", children: /* @__PURE__ */ v("p", { className: "text-xs text-slate-400", children: [
1347
1390
  "Quote ID: ",
1348
1391
  s.carrier_quote_id
1349
1392
  ] }) }),
1350
- /* @__PURE__ */ b("div", { className: "mt-auto pt-4", children: [
1393
+ /* @__PURE__ */ v("div", { className: "mt-auto pt-4", children: [
1351
1394
  /* @__PURE__ */ o(
1352
1395
  "button",
1353
1396
  {
1354
1397
  type: "button",
1355
1398
  onClick: A,
1356
- disabled: k || m,
1357
- className: `rates-bind-btn w-full rounded-full px-4 py-2.5 text-sm font-semibold transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 ${m ? "bg-emerald-500 text-white" : "bg-blue-600 text-white hover:bg-blue-600/90 disabled:bg-slate-300 disabled:text-slate-500 disabled:cursor-not-allowed"}`,
1358
- children: k ? "Requesting…" : m ? "Requested" : "Request Bind"
1399
+ disabled: k || _,
1400
+ className: `rates-bind-btn w-full rounded-full px-4 py-2.5 text-sm font-semibold transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 ${_ ? "bg-emerald-500 text-white" : "bg-blue-600 text-white hover:bg-blue-600/90 disabled:bg-slate-300 disabled:text-slate-500 disabled:cursor-not-allowed"}`,
1401
+ children: k ? "Requesting…" : _ ? "Requested" : "Request Bind"
1359
1402
  }
1360
1403
  ),
1361
- v === "error" && /* @__PURE__ */ o("p", { className: "mt-2 text-xs text-red-600", children: "Something went wrong. Please try again." }),
1362
- v === "success" && /* @__PURE__ */ o("p", { className: "mt-2 text-xs text-emerald-600", children: "We received your bind request." })
1404
+ p === "error" && /* @__PURE__ */ o("p", { className: "mt-2 text-xs text-red-600", children: "Something went wrong. Please try again." }),
1405
+ p === "success" && /* @__PURE__ */ o("p", { className: "mt-2 text-xs text-emerald-600", children: "We received your bind request." })
1363
1406
  ] })
1364
1407
  ] }, u);
1365
1408
  }) }),
1366
- t && /* @__PURE__ */ o(Le, { onBack: t })
1367
- ] }) : /* @__PURE__ */ b("section", { className: "mt-8", children: [
1409
+ t && /* @__PURE__ */ o(Oe, { onBack: t })
1410
+ ] }) : /* @__PURE__ */ v("section", { className: "mt-8", children: [
1368
1411
  /* @__PURE__ */ o("h3", { className: "text-lg font-semibold text-slate-900", children: "Rates" }),
1369
1412
  /* @__PURE__ */ o("p", { className: "mt-2 text-sm text-slate-500", children: "No rates are available at this time." }),
1370
- t && /* @__PURE__ */ o(Le, { onBack: t })
1413
+ t && /* @__PURE__ */ o(Oe, { onBack: t })
1371
1414
  ] });
1372
1415
  }
1373
1416
  function j(e) {
@@ -1383,7 +1426,7 @@ function P(e) {
1383
1426
  return;
1384
1427
  }
1385
1428
  }
1386
- function Ut(e) {
1429
+ function Gt(e) {
1387
1430
  const t = {};
1388
1431
  e.phone && (t.phone = e.phone), e.first_name && (t.first_name = e.first_name), e.last_name && (t.last_name = e.last_name), e.email && (t.email = e.email), e.date_of_birth && (t.date_of_birth = P(e.date_of_birth)), e.product && (t.product = e.product), e.state && (t.state = e.state);
1389
1432
  const r = [];
@@ -1417,7 +1460,7 @@ function Ut(e) {
1417
1460
  return n.description && (s.description = n.description), n.date_of_incident && (s.date_of_incident = P(n.date_of_incident)), n.amount_paid_cents !== null && n.amount_paid_cents !== void 0 && (s.amount_paid_cents = n.amount_paid_cents), s;
1418
1461
  })), t;
1419
1462
  }
1420
- function Ae(e) {
1463
+ function Ee(e) {
1421
1464
  const t = {}, r = (s) => {
1422
1465
  if (typeof s == "string") {
1423
1466
  if (s === "Yes") return !0;
@@ -1435,14 +1478,14 @@ function Ae(e) {
1435
1478
  if (s.endsWith("__items")) {
1436
1479
  const a = s.replace("__items", "");
1437
1480
  if (i.includes(a)) {
1438
- const v = Array.isArray(l) ? l.map((k) => Ae(k)) : l;
1439
- t[a] = v;
1481
+ const p = Array.isArray(l) ? l.map((k) => Ee(k)) : l;
1482
+ t[a] = p;
1440
1483
  }
1441
1484
  } else s.includes("__items") || n.has(s) || (t[s] = r(l));
1442
1485
  return t;
1443
1486
  }
1444
- function Vt({ isOpen: e, onClose: t }) {
1445
- const [r, i] = M([]), [n, s] = M(null), [l, a] = M(null), [u, v] = M(null), [k, m] = M(void 0), [A, I] = M(!1);
1487
+ function Ht({ isOpen: e, onClose: t }) {
1488
+ const [r, i] = M([]), [n, s] = M(null), [l, a] = M(null), [u, p] = M(null), [k, _] = M(void 0), [A, I] = M(!1);
1446
1489
  function R(E) {
1447
1490
  const T = {
1448
1491
  SMSVerification: "Verify",
@@ -1452,39 +1495,39 @@ function Vt({ isOpen: e, onClose: t }) {
1452
1495
  return E.map((d) => ({
1453
1496
  key: d,
1454
1497
  title: T[d] || d,
1455
- loadQuestions: async () => (await Bt(d)).questions
1498
+ loadQuestions: async () => (await zt(d)).questions
1456
1499
  }));
1457
1500
  }
1458
1501
  D(() => {
1459
1502
  e && (async () => {
1460
1503
  try {
1461
- const T = It();
1462
- if ($e(), T) {
1504
+ const T = jt();
1505
+ if (Ae(), T) {
1463
1506
  I(!0), s(T);
1464
1507
  try {
1465
- const d = me(), p = await Lt(d ? void 0 : T);
1466
- if (!p || !p.quote)
1508
+ const d = me(), y = await Pt(d ? void 0 : T);
1509
+ if (!y || !y.quote)
1467
1510
  throw new Error("Invalid response from getQuote: missing quote data");
1468
- const { quote: c } = p, { stages: y } = await we(), w = R(y);
1511
+ const { quote: c } = y, { stages: b } = await xe(), w = R(b);
1469
1512
  i(w);
1470
1513
  try {
1471
- const $ = Ut(c);
1472
- v($);
1514
+ const $ = Gt(c);
1515
+ p($);
1473
1516
  } catch ($) {
1474
1517
  throw new Error(`Failed to transform quote data: ${$ instanceof Error ? $.message : "Unknown error"}`);
1475
1518
  }
1476
1519
  if (c.current_stage) {
1477
1520
  const $ = w.findIndex((S) => S.key === c.current_stage);
1478
- $ >= 0 ? m($) : m(w.length - 1);
1521
+ $ >= 0 ? _($) : _(w.length - 1);
1479
1522
  } else
1480
- m(w.length - 1);
1523
+ _(w.length - 1);
1481
1524
  } catch (d) {
1482
- d.statusCode === 404 ? (Ge(), s(null)) : Je();
1525
+ d.statusCode === 404 ? (He(), s(null)) : Je();
1483
1526
  } finally {
1484
1527
  I(!1);
1485
1528
  }
1486
1529
  } else {
1487
- const { stages: d } = await we();
1530
+ const { stages: d } = await xe();
1488
1531
  i(R(d));
1489
1532
  }
1490
1533
  } catch {
@@ -1498,7 +1541,7 @@ function Vt({ isOpen: e, onClose: t }) {
1498
1541
  document.body.style.overflow = E;
1499
1542
  };
1500
1543
  }, [e]);
1501
- const Q = nt(
1544
+ const Q = rt(
1502
1545
  (E) => {
1503
1546
  E.key === "Escape" && t();
1504
1547
  },
@@ -1508,10 +1551,10 @@ function Vt({ isOpen: e, onClose: t }) {
1508
1551
  if (e)
1509
1552
  return window.addEventListener("keydown", Q), () => window.removeEventListener("keydown", Q);
1510
1553
  }, [e, Q]), D(() => {
1511
- e || (v(null), m(void 0), I(!1));
1512
- }, [e]), e ? /* @__PURE__ */ b("div", { className: "fixed inset-0 z-[9999] flex items-center justify-center", role: "dialog", "aria-modal": "true", "aria-labelledby": "insurance-modal-title", children: [
1554
+ e || (p(null), _(void 0), I(!1));
1555
+ }, [e]), e ? /* @__PURE__ */ v("div", { className: "fixed inset-0 z-[9999] flex items-center justify-center", role: "dialog", "aria-modal": "true", "aria-labelledby": "insurance-modal-title", children: [
1513
1556
  /* @__PURE__ */ o("div", { className: "backdrop", onClick: t, "aria-hidden": "true" }),
1514
- /* @__PURE__ */ b("div", { className: "modal-panel bg-white relative w-full max-w-2xl flex flex-col max-h-[90vh] overflow-hidden", role: "document", children: [
1557
+ /* @__PURE__ */ v("div", { className: "modal-panel bg-white relative w-full max-w-2xl flex flex-col max-h-[90vh] overflow-hidden", role: "document", children: [
1515
1558
  /* @__PURE__ */ o(
1516
1559
  "button",
1517
1560
  {
@@ -1522,43 +1565,43 @@ function Vt({ isOpen: e, onClose: t }) {
1522
1565
  children: "×"
1523
1566
  }
1524
1567
  ),
1525
- /* @__PURE__ */ b("div", { className: "text-center mb-6", children: [
1568
+ /* @__PURE__ */ v("div", { className: "text-center mb-6", children: [
1526
1569
  /* @__PURE__ */ o("h2", { id: "insurance-modal-title", className: "h1-title", children: "Let's get you the best insurance rates." }),
1527
1570
  /* @__PURE__ */ o("p", { className: "p-subtitle", children: "This should only take a few minutes." })
1528
1571
  ] }),
1529
- /* @__PURE__ */ b("div", { className: "panel-body flex-1 min-h-0 overflow-y-auto", children: [
1530
- !l && /* @__PURE__ */ o(Oe, { children: A || r.length === 0 ? /* @__PURE__ */ o("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ o("div", { className: "text-slate-600", children: "Loading..." }) }) : /* @__PURE__ */ o(
1531
- Ct,
1572
+ /* @__PURE__ */ v("div", { className: "panel-body flex-1 min-h-0 overflow-y-auto", children: [
1573
+ !l && /* @__PURE__ */ o(Pe, { children: A || r.length === 0 ? /* @__PURE__ */ o("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ o("div", { className: "text-slate-600", children: "Loading..." }) }) : /* @__PURE__ */ o(
1574
+ Rt,
1532
1575
  {
1533
1576
  stages: r,
1534
1577
  initialValues: u ?? void 0,
1535
1578
  initialActive: k,
1536
1579
  onStageComplete: async (E, T) => {
1537
1580
  try {
1538
- const d = Ae(E), { stages: p } = await we(), c = R(p);
1581
+ const d = Ee(E), { stages: y } = await xe(), c = R(y);
1539
1582
  i(c);
1540
- const w = c.findIndex((_) => _.key === T) + 1, S = (w < c.length ? c[w] : null)?.key || T;
1583
+ const w = c.findIndex((f) => f.key === T) + 1, S = (w < c.length ? c[w] : null)?.key || T;
1541
1584
  if (n)
1542
1585
  if (T === "SMSVerification") {
1543
- const { isVerified: _, token: f } = await Dt(n, d.sms_code);
1544
- if (!_)
1586
+ const { isVerified: f, token: m } = await Lt(n, d.sms_code);
1587
+ if (!f)
1545
1588
  throw new Error("Invalid SMS code");
1546
- f && Mt(f), await ce({ current_stage: S }, !1);
1589
+ m && Dt(m), await ce({ current_stage: S }, !1);
1547
1590
  } else if (T === "State") {
1548
- const { isSupported: _ } = await zt(d.state);
1549
- if (!_)
1591
+ const { isSupported: f } = await Ot(d.state);
1592
+ if (!f)
1550
1593
  throw new Error("State is not supported");
1551
- const f = me();
1552
- await ce({ ...d, current_stage: S }, !1, f ? void 0 : n);
1594
+ const m = me();
1595
+ await ce({ ...d, current_stage: S }, !1, m ? void 0 : n);
1553
1596
  } else {
1554
- const _ = me();
1555
- await ce({ ...d, current_stage: S }, !1, _ ? void 0 : n || void 0);
1597
+ const f = me();
1598
+ await ce({ ...d, current_stage: S }, !1, f ? void 0 : n || void 0);
1556
1599
  }
1557
1600
  else {
1558
- const f = (await Ft(d.phone))?.quoteId;
1559
- if (!f || typeof f != "string" || f.trim() === "")
1560
- throw new Error(`Failed to create quote - invalid quoteId returned: ${f}`);
1561
- s(f), Tt(f), await ce({ current_stage: S }, !1, f);
1601
+ const m = (await Kt(d.phone))?.quoteId;
1602
+ if (!m || typeof m != "string" || m.trim() === "")
1603
+ throw new Error(`Failed to create quote - invalid quoteId returned: ${m}`);
1604
+ s(m), Qt(m), await ce({ current_stage: S }, !1, m);
1562
1605
  }
1563
1606
  return { success: !0 };
1564
1607
  } catch (d) {
@@ -1567,11 +1610,11 @@ function Vt({ isOpen: e, onClose: t }) {
1567
1610
  },
1568
1611
  onComplete: async (E) => {
1569
1612
  try {
1570
- const T = Ae(E);
1613
+ const T = Ee(E);
1571
1614
  if (!n)
1572
1615
  throw new Error("Quote ID is required");
1573
- await ce(T, !0), v(E);
1574
- const { rates: d } = await Kt();
1616
+ await ce(T, !0), p(E);
1617
+ const { rates: d } = await Wt();
1575
1618
  return a(d), { success: !0 };
1576
1619
  } catch (T) {
1577
1620
  return { success: !1, error: T instanceof Error ? T.message : "An error occurred" };
@@ -1580,54 +1623,54 @@ function Vt({ isOpen: e, onClose: t }) {
1580
1623
  }
1581
1624
  ) }),
1582
1625
  " ",
1583
- l && n && /* @__PURE__ */ o(Pt, { rates: l, onBack: () => a(null) })
1626
+ l && n && /* @__PURE__ */ o(Yt, { rates: l, onBack: () => a(null) })
1584
1627
  ] }),
1585
1628
  /* @__PURE__ */ o("div", { className: "mt-4 pt-4 border-t border-slate-200", children: /* @__PURE__ */ o("p", { className: "text-center text-sm text-slate-500", children: "Insurance products offered through Credify Corporation, a licensed insurance agency." }) })
1586
1629
  ] })
1587
1630
  ] }) : null;
1588
1631
  }
1589
- function Yt({ isOpen: e }) {
1632
+ function Xt({ isOpen: e }) {
1590
1633
  return /* @__PURE__ */ o(
1591
- Vt,
1634
+ Ht,
1592
1635
  {
1593
1636
  isOpen: e,
1594
1637
  onClose: () => {
1595
- Xe.close();
1638
+ Ze.close();
1596
1639
  }
1597
1640
  }
1598
1641
  );
1599
1642
  }
1600
1643
  let Y = null, re = null, pe = !1;
1601
1644
  const We = "credify-insurance-widget-overrides";
1602
- function Gt() {
1645
+ function Jt() {
1603
1646
  if (typeof document > "u" || document.getElementById(We)) return;
1604
1647
  const e = document.body ?? document.documentElement, t = document.createElement("style");
1605
1648
  t.id = We, t.textContent = '#insurance-widget-root button.form-wizard-next-btn[data-widget-ctrl="next"][type="button"],#insurance-widget-root button.form-wizard-next-btn[data-widget-ctrl="next"][type="button"]:disabled{display:flex!important;visibility:visible!important;opacity:1!important;min-height:3rem!important;clip-path:none!important;overflow:visible!important;position:relative!important;pointer-events:auto!important}#insurance-widget-root button.form-wizard-next-btn[data-widget-ctrl="next"][type="button"]:disabled{opacity:.5!important}', e.appendChild(t);
1606
1649
  }
1607
- function Ht() {
1608
- Y || (Y = document.createElement("div"), Y.id = "insurance-widget-root", document.documentElement.appendChild(Y)), !re && Y && (re = it(Y)), Gt();
1650
+ function Zt() {
1651
+ Y || (Y = document.createElement("div"), Y.id = "insurance-widget-root", document.documentElement.appendChild(Y)), !re && Y && (re = st(Y)), Jt();
1609
1652
  }
1610
- function xe() {
1611
- Ht(), re && re.render(rt(Yt, { isOpen: pe }));
1653
+ function ke() {
1654
+ Zt(), re && re.render(it(Xt, { isOpen: pe }));
1612
1655
  }
1613
- function Jt() {
1656
+ function qt() {
1614
1657
  re && Y && (re.unmount(), Y.remove()), re = null, Y = null;
1615
1658
  }
1616
- const Xe = {
1659
+ const Ze = {
1617
1660
  init: (e) => {
1618
- pe = !!e?.autoOpen, xe();
1661
+ pe = !!e?.autoOpen, ke();
1619
1662
  },
1620
1663
  open: () => {
1621
- pe = !0, xe();
1664
+ pe = !0, ke();
1622
1665
  },
1623
1666
  close: () => {
1624
- pe = !1, xe();
1667
+ pe = !1, ke();
1625
1668
  },
1626
- destroy: Jt
1669
+ destroy: qt
1627
1670
  };
1628
- typeof window < "u" && (window.CredifyInsuranceWidget = Xe);
1671
+ typeof window < "u" && (window.CredifyInsuranceWidget = Ze);
1629
1672
  export {
1630
- Xe as CredifyInsuranceWidget,
1631
- Xe as default
1673
+ Ze as CredifyInsuranceWidget,
1674
+ Ze as default
1632
1675
  };
1633
1676
  //# sourceMappingURL=index.es.js.map