@getcredify/credify-insurance-widget 1.18.3 → 1.27.0

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.umd.js CHANGED
@@ -1,43 +1,66 @@
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-50:oklch(97.1% .013 17.38);--color-red-200:oklch(88.5% .062 18.334);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-emerald-600:oklch(59.6% .145 163.225);--color-cyan-500:oklch(71.5% .143 215.221);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-300:oklch(80.9% .105 251.813);--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-800:oklch(27.9% .041 260.031);--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-md:28rem;--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;--tracking-wide:.025em;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-in-out:cubic-bezier(.4,0,.2,1);--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{.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.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}.col-span-full{grid-column:1/-1}.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-5{margin-top:calc(var(--spacing)*5)}.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)}.h-full{height:100%}.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-auto{width:auto!important}.w-5{width:calc(var(--spacing)*5)}.w-12{width:calc(var(--spacing)*12)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-full{max-width:100%}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[8\\.5rem\\]{min-width:8.5rem}.flex-1{flex:1}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.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}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-items-center{justify-items:center}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}: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)))}.self-end{align-self:flex-end}.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-2{border-style:var(--tw-border-style);border-width:2px}.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-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-\\[var\\(--accent-color\\)\\]{border-color:var(--accent-color)}.border-blue-300{border-color:var(--color-blue-300)}.border-blue-600{border-color:var(--color-blue-600)}.border-cyan-500{border-color:var(--color-cyan-500)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-red-200{border-color:var(--color-red-200)}.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)}.border-transparent{border-color:#0000}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-50\\/30{background-color:#eff6ff4d}@supports (color:color-mix(in lab,red,red)){.bg-blue-50\\/30{background-color:color-mix(in oklab,var(--color-blue-50)30%,transparent)}}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-600{background-color:var(--color-blue-600)}.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-red-50{background-color:var(--color-red-50)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-400{background-color:var(--color-slate-400)}.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-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.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{padding-block:calc(var(--spacing)*2)}.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}.text-left{text-align:left}.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)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.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-blue-700{color:var(--color-blue-700)}.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-red-700{color:var(--color-red-700)}.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-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.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)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + 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)}.shadow-blue-100\\/60{--tw-shadow-color:#dbeafe99}@supports (color:color-mix(in lab,red,red)){.shadow-blue-100\\/60{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-blue-100)60%,transparent)var(--tw-shadow-alpha),transparent)}}.ring-blue-100{--tw-ring-color:var(--color-blue-100)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-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))}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.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\\:text-slate-800:hover{color:var(--color-slate-800)}.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\\:max-w-\\[calc\\(\\(100\\%-1rem\\)\\/2\\)\\]{max-width:calc(50% - .5rem)}.sm\\:grid-cols-2{grid-template-columns:repeat(2,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}}@media (max-width:767px){#insurance-widget-root .modal-panel,#root .modal-panel{width:100%;max-width:none;height:100%;max-height:none;box-shadow:none;border-radius:0;position:fixed;inset:0}}#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 input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}#insurance-widget-root input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}#root input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}#root input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}#insurance-widget-root input[type=number],#root input[type=number]{-moz-appearance:textfield}#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 .communications-consent-checkbox.checkbox-card,#root .communications-consent-checkbox.checkbox-card{border-width:2px;border-color:var(--primary-color);background:var(--primary-color);align-items:flex-start;gap:.875rem;padding:1rem 1.125rem}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root .communications-consent-checkbox.checkbox-card,#root .communications-consent-checkbox.checkbox-card{background:color-mix(in oklab,var(--primary-color)7%,#fff)}}#insurance-widget-root .communications-consent-checkbox.checkbox-card,#root .communications-consent-checkbox.checkbox-card{box-shadow:0 0 0 1px var(--primary-color)}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root .communications-consent-checkbox.checkbox-card,#root .communications-consent-checkbox.checkbox-card{box-shadow:0 0 0 1px color-mix(in oklab,var(--primary-color)20%,transparent)}}#insurance-widget-root .communications-consent-checkbox.checkbox-card:hover,#root .communications-consent-checkbox.checkbox-card:hover{border-color:var(--primary-color);background:var(--primary-color)}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root .communications-consent-checkbox.checkbox-card:hover,#root .communications-consent-checkbox.checkbox-card:hover{background:color-mix(in oklab,var(--primary-color)11%,#fff)}}#insurance-widget-root .communications-consent-checkbox .checkbox-input,#root .communications-consent-checkbox .checkbox-input{border-width:3px;border-color:var(--primary-color);flex-shrink:0;width:1.625rem;height:1.625rem;margin-top:.0625rem}#insurance-widget-root .communications-consent-checkbox .checkbox-input:checked,#root .communications-consent-checkbox .checkbox-input:checked{background-size:1.125rem 1.125rem}#insurance-widget-root .communications-consent-checkbox .checkbox-label,#root .communications-consent-checkbox .checkbox-label{font-size:.875rem;font-weight:400;line-height:1.4}#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;color:#fff!important;background-color:#2563eb!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;background-color:#d1d5db!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}@media (max-width:767px){#insurance-widget-root button.modal-close-btn[type=button],#root button.modal-close-btn[type=button]{visibility:hidden!important;pointer-events:none!important;display:none!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{transition:border-color .15s,background-color .15s;visibility:visible!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important;box-sizing:border-box!important;border-radius:var(--radius-full)!important;color:#1a202c!important;text-align:center!important;cursor:pointer!important;background-color:#fff!important;border:1px solid #e2e8f0!important;place-content:center!important;place-items:center!important;height:3rem!important;min-height:3rem!important;margin:0!important;padding:0!important;font-size:1rem!important;font-weight:600!important;line-height:1!important;display:grid!important;overflow:visible!important}#insurance-widget-root button.credify-btn-back[type=button]:not(:disabled):hover,#root button.credify-btn-back[type=button]:not(:disabled):hover{background-color:#f9fafb!important;border-color:#cbd5e1!important}#insurance-widget-root button.credify-btn-back[type=button]:disabled,#root button.credify-btn-back[type=button]:disabled{opacity:.5!important;cursor:not-allowed!important;background-color:#f3f4f6!important}#insurance-widget-root button.credify-btn-back[type=button][data-testid=communications-consent-decline],#root button.credify-btn-back[type=button][data-testid=communications-consent-decline]{font-weight:400!important}#insurance-widget-root button.credify-btn-back-rates[type=button],#root button.credify-btn-back-rates[type=button]{margin-top:2rem!important}#insurance-widget-root button.credify-retry-btn[type=button],#root button.credify-retry-btn[type=button]{cursor:pointer;font:inherit;border:none;visibility:visible!important;color:var(--text-primary)!important;clip-path:none!important;pointer-events:auto!important;background:0 0!important;text-decoration:underline!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;box-sizing:border-box!important;text-align:center!important;color:#fff!important;background-color:#2563eb!important;place-content:center!important;place-items:center!important;min-height:2.5rem!important;padding:0 1rem!important;line-height:1!important;display:grid!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;background-color:#cbd5e1!important}#insurance-widget-root button.rates-bind-btn.rates-bind-btn-requested,#root button.rates-bind-btn.rates-bind-btn-requested{color:#fff!important;background-color:#10b981!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;color:#fff!important;background-color:#2563eb!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],#root button.btn-primary[type=button],#insurance-widget-root button.btn-primary[type=submit],#root button.btn-primary[type=submit]{color:#fff!important;background-color:#2563eb!important}#insurance-widget-root button.btn-outline[type=button],#root button.btn-outline[type=button]{color:var(--text-primary)!important;border:1px solid var(--accent-color)!important;background-color:#fff!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 button.btn-primary[type=button]:disabled,#root button.btn-primary[type=button]:disabled{color:#fff!important;background-color:#d1d5db!important}#insurance-widget-root button.btn-outline[type=button]:disabled,#root button.btn-outline[type=button]:disabled{color:var(--text-primary)!important;background-color:#f1f5f9!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-tracking{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}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@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-tracking: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;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-ease:initial}}}`)),document.head.appendChild(t)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
- (function(){if(typeof $e>"u")var $e={env:{}}})();(function($e,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("react"),require("react-dom/client"),require("react/jsx-runtime")):typeof define=="function"&&define.amd?define(["exports","react","react-dom/client","react/jsx-runtime"],f):($e=typeof globalThis<"u"?globalThis:$e||self,f($e.CredifyInsuranceWidget={},$e.React,$e.ReactDOM,$e.React))})(this,(function($e,f,Jo,c){"use strict";function De({id:e,label:t,hint:r,error:n,required:o,className:i,children:a}){return c.jsxs("div",{className:i,children:[c.jsxs("label",{htmlFor:e,className:"form-label",children:[t," ",o&&c.jsx("span",{className:"text-red-600",children:"*"})]}),a,r&&!n&&c.jsx("p",{id:`${e}-hint`,className:"mt-1 text-sm text-slate-500",children:r}),n&&c.jsx("p",{id:`${e}-error`,className:"mt-1 text-sm text-red-600",children:n})]})}function rr({id:e,label:t,hint:r,error:n,required:o,className:i,...a}){return c.jsx(De,{id:e,label:t,hint:r,error:n,required:o,className:i,children:c.jsx("input",{id:e,className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,...a,type:"text"})})}function Ur(e,t){if(!e)return"";const r=parseInt(e,10);if(isNaN(r))return"";const n=r.toLocaleString("en-US");return t?`$${n}`:n}function Qo({id:e,label:t,hint:r,error:n,required:o,className:i,value:a,onChange:s,onKeyDown:l,isCurrency:u=!1,maxDigits:d,...p}){const[v,h]=f.useState(""),C=f.useRef(null);f.useEffect(()=>{if(a==null||a===""){h("");return}const H=String(a).replace(/\D/g,"");h(Ur(H,u))},[a,u]);const m=H=>{let j=H.target.value.replace(/\D/g,"");d!==void 0&&(j=j.slice(0,d)),h(Ur(j,u));const R={...H,currentTarget:{...H.currentTarget,value:j},target:{...H.target,value:j}};s?.(R)},q=H=>{if(["-","+",".","e","E"].includes(H.key)){H.preventDefault();return}if(d!==void 0&&/^\d$/.test(H.key)&&H.currentTarget.value.replace(/\D/g,"").length>=d){H.preventDefault();return}l?.(H)};return c.jsx(De,{id:e,label:t,hint:r,error:n,required:o,className:i,children:c.jsx("input",{ref:C,id:e,type:"text",inputMode:"numeric",className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,value:v,onChange:m,onKeyDown:q,...p})})}function Zr(e){return e.length<=3?e:e.length<=5?`${e.slice(0,3)}-${e.slice(3)}`:`${e.slice(0,3)}-${e.slice(3,5)}-${e.slice(5,9)}`}function Xo({id:e,label:t,hint:r,error:n,required:o,className:i,value:a="",onChange:s,...l}){const[u,d]=f.useState(""),p=f.useRef(null);f.useEffect(()=>{const h=a.replace(/\D/g,"").slice(0,9);d(Zr(h))},[a]);const v=h=>{const C=h.target.value,m=h.target.selectionStart??0,q=C.replace(/\D/g,"").slice(0,9),H=Zr(q);d(H);const j={...h,currentTarget:{...h.currentTarget,value:H},target:{...h.target,value:H}};s?.(j),setTimeout(()=>{if(p.current){const R=C.slice(0,m).replace(/\D/g,"").length;let Z=R;R>5?Z+=2:R>3&&(Z+=1),p.current.setSelectionRange(Z,Z)}},0)};return c.jsx(De,{id:e,label:t,hint:r,error:n,required:o,className:i,children:c.jsx("input",{ref:p,id:e,type:"text",inputMode:"numeric",className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,maxLength:11,placeholder:"XXX-XX-XXXX",autoComplete:"off",value:u,onChange:v,...l})})}function nr({id:e,label:t,hint:r,error:n,required:o,className:i,...a}){return c.jsx(De,{id:e,label:t,hint:r,error:n,required:o,className:i,children:c.jsx("input",{id:e,type:"number",className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,...a})})}function ei({id:e,label:t,hint:r,error:n,required:o,className:i,...a}){return c.jsx(De,{id:e,label:t,hint:r,error:n,required:o,className:i,children:c.jsx("input",{id:e,type:"email",className:`form-input ${n?"input-error":""}`,inputMode:"email",autoComplete:"email",required:o,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...a})})}function or(e){const t=e.replace(/\D/g,"");if(t.length===10)return`(${t.slice(0,3)}) ${t.slice(3,6)} - ${t.slice(6)}`;if(t.length>10){const r=t.slice(0,10);return`(${r.slice(0,3)}) ${r.slice(3,6)} - ${r.slice(6)}`}return t.length>=6?`(${t.slice(0,3)}) ${t.slice(3,6)} - ${t.slice(6)}`:t.length>=3?`(${t.slice(0,3)}) ${t.slice(3)}`:t.length>0?`(${t}`:t}function ir(e){return e.replace(/\D/g,"")}function ti({id:e,label:t,hint:r,error:n,required:o,className:i,value:a="",onChange:s,...l}){const[u,d]=f.useState(""),p=f.useRef(null),v=f.useRef(0);f.useEffect(()=>{if(!a){d("");return}let C=ir(a);C.length===11&&C.startsWith("1")&&(C=C.slice(1));const m=C.slice(0,10);d(or(m))},[a]);const h=C=>{const m=C.target,q=m.value;v.current=m.selectionStart||0;const j=ir(q).slice(0,10),R=or(j);d(R);const Z=j.length===10?`+1${j}`:j,V={...C,currentTarget:{...C.currentTarget,value:Z},target:{...C.target,value:Z}};s?.(V),setTimeout(()=>{if(p.current){const W=q.slice(0,v.current),K=ir(W),z=or(K),Y=Math.min(z.length,R.length);p.current.setSelectionRange(Y,Y)}},0)};return c.jsx(De,{id:e,label:t,hint:r,error:n,required:o,className:i,children:c.jsxs("div",{className:`tel-input-wrapper flex items-center border rounded-lg transition-colors w-full relative ${n?"border-red-500 error":"border-[var(--accent-color)] focus-within:border-[var(--primary-color)]"}`,children:[c.jsx("label",{htmlFor:e,className:"px-3 py-3 text-slate-700 font-medium border-r border-[var(--accent-color)] bg-slate-50 flex-shrink-0 relative z-0 rounded-l-lg",children:"+1"}),c.jsx("input",{ref:p,id:e,type:"tel",className:`flex-1 px-4 py-3 border-0 rounded-r-lg outline-none bg-transparent text-[var(--text-primary)] text-base ${n?"input-error":""}`,inputMode:"tel",autoComplete:"tel",required:o,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,value:u,onChange:h,...l})]})})}function ri({id:e,label:t,hint:r,error:n,required:o,className:i,...a}){return c.jsx(De,{id:e,label:t,hint:r,error:n,required:o,className:i,children:c.jsx("input",{id:e,type:"url",className:`form-input ${n?"input-error":""}`,inputMode:"url",autoComplete:"url",required:o,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...a})})}function ni({id:e,label:t,hint:r,error:n,required:o,className:i,...a}){return c.jsx(De,{id:e,label:t,hint:r,error:n,required:o,className:i,children:c.jsx("input",{id:e,type:"password",className:`form-input ${n?"input-error":""}`,autoComplete:"current-password",required:o,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...a})})}function oi({id:e,label:t,hint:r,error:n,required:o,className:i,rows:a=4,...s}){return c.jsx(De,{id:e,label:t,hint:r,error:n,required:o,className:i,children:c.jsx("textarea",{id:e,rows:a,className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,...s})})}function ii({id:e,label:t,hint:r,error:n,required:o,className:i,...a}){return c.jsx(De,{id:e,label:t,hint:r,error:n,required:o,className:i,children:c.jsx("input",{id:e,type:"date",className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,...a})})}function ar({id:e,label:t,className:r,...n}){return c.jsxs("label",{className:`checkbox-card ${r||""}`,htmlFor:e,children:[c.jsx("input",{id:e,type:"checkbox",className:"checkbox-input",...n}),c.jsx("span",{className:"checkbox-label",children:t})]})}function ai({onChoose:e,isSubmitting:t=!1}){const[r,n]=f.useState(!1),o=!r||t;return c.jsxs("div",{className:"communications-consent","data-testid":"communications-consent",children:[c.jsx("h3",{className:"text-lg font-semibold text-text-primary mb-3",children:"Communications Consent"}),c.jsx(ar,{id:"communications-consent-checkbox",className:"communications-consent-checkbox",checked:r,onChange:i=>n(i.target.checked),disabled:t,label:"I consent to communications from Credify Corporation (licensed insurance agency) and my selected carrier(s) at the phone number and email address I provided. This covers: support (including AI agents), carrier quote and service contact, automated rate shopping at or before renewal, policy renewal notifications, claims management, and Credify's newsletter (which we may send by email, or by text message with a link to read it)."}),c.jsxs("div",{className:"text-sm text-slate-600 mt-4 space-y-2",children:[c.jsx("p",{children:"These may use automated systems, emails or texts. Message frequency varies. Message & data rates may apply. Reply STOP to opt out of SMS; Reply HELP for help."}),c.jsx("p",{children:"Consent is not required to receive quotes or purchase insurance."}),c.jsxs("p",{children:["Credify Corporation – Texas #3309669."," ",c.jsx("a",{href:"https://getcredify.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})," ","|"," ",c.jsx("a",{href:"https://getcredify.com/terms-of-service",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Terms of Service"})]})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-3 mt-6",children:[c.jsxs("button",{type:"button","data-testid":"communications-consent-accept",onClick:()=>e(!0),disabled:o,className:["form-wizard-next-btn","h-12 rounded-full text-white font-bold transition","disabled:cursor-not-allowed","flex items-center justify-center gap-2",o?"bg-slate-400":"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"].join(" "),children:[t&&c.jsxs("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:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.jsx("path",{className:"opacity-75",fill:"currentColor",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"})]}),"I Consent"]}),c.jsx("button",{type:"button","data-testid":"communications-consent-decline",onClick:()=>e(!1),disabled:t,className:"credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition disabled:opacity-50 disabled:cursor-not-allowed",children:"I Do Not Consent"})]})]})}function si({name:e,value:t,checked:r,onChange:n,children:o}){return c.jsxs("label",{className:"radio-card",children:[c.jsx("input",{className:"radio-input",type:"radio",name:e,value:t,checked:r,onChange:n}),c.jsx("span",{className:"radio-label",children:o})]})}function ci({legend:e,children:t,className:r,legendClassName:n}){return c.jsxs("fieldset",{className:r,children:[c.jsx("legend",{className:`form-label mb-4 ${n||""}`,children:e}),c.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:t})]})}function pt({id:e,label:t,hint:r,error:n,required:o,className:i,placeholder:a,options:s,children:l,...u}){const d=[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,p=!!l;return c.jsx(De,{id:e,label:t,hint:r,error:n,required:o,className:i,children:c.jsxs("select",{id:e,className:`form-input select-caret ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":d,required:o,...u,children:[a&&c.jsx("option",{value:"",disabled:!0,selected:!("value"in u),children:a}),p?l:s?.map(v=>c.jsx("option",{value:v.value,disabled:v.disabled,children:v.label},v.value))]})})}const li="AIzaSyDjLdKLxoa-maLNGAyq_I_2r_Fe_TzFikw";function ui(){return new Promise((e,t)=>{if(window.google?.maps?.places){e();return}const r=document.querySelector('script[src*="maps.googleapis.com"]');if(r){r.addEventListener("load",()=>e()),r.addEventListener("error",()=>t(new Error("Failed to load Google Maps script")));return}const n=document.createElement("script");n.src=`https://maps.googleapis.com/maps/api/js?key=${li}&libraries=places`,n.async=!0,n.defer=!0,n.onload=()=>e(),n.onerror=()=>t(new Error("Failed to load Google Maps script")),document.head.appendChild(n)})}function di(e){const t={fullAddress:e.formatted_address};return e.address_components&&e.address_components.forEach(r=>{const n=r.types;n.includes("street_number")&&(t.streetNumber=r.long_name),n.includes("route")&&(t.streetName=r.long_name),n.includes("locality")&&(t.city=r.long_name),n.includes("administrative_area_level_1")&&(t.state=r.short_name),n.includes("postal_code")&&(t.zipCode=r.long_name),n.includes("country")&&(t.country=r.short_name)}),t}function _i({id:e,label:t,hint:r,error:n,required:o,className:i,onChange:a,onPlaceSelect:s,value:l,...u}){const d=f.useRef(null),p=f.useRef(null),v=f.useRef(null),h=f.useRef(null),[C,m]=f.useState(!0),[q,H]=f.useState(l||""),[j,R]=f.useState([]),[Z,V]=f.useState(!1),[W,K]=f.useState(-1),z=f.useRef([]),Y=f.useRef(!1),Q=f.useRef(-1);f.useEffect(()=>{z.current=j},[j]),f.useEffect(()=>{Y.current=Z},[Z]),f.useEffect(()=>{Q.current=W},[W]),f.useEffect(()=>{l!==void 0&&H(String(l))},[l]);const ne=f.useRef(null);f.useEffect(()=>{if(!d.current)return;let X=!0;return ui().then(()=>{!X||!d.current||(p.current=new google.maps.places.AutocompleteService,v.current=new google.maps.places.PlacesService(document.createElement("div")),m(!1))}).catch(A=>{console.error("Error loading Google Maps:",A),m(!1)}),()=>{X=!1,ne.current&&clearTimeout(ne.current)}},[]);const me=X=>{const A=X.target.value;if(H(A),a?.(A),ne.current&&clearTimeout(ne.current),A.length<3){R([]),V(!1);return}ne.current=setTimeout(()=>{p.current&&p.current.getPlacePredictions({input:A,types:["address"]},(w,O)=>{O===google.maps.places.PlacesServiceStatus.OK&&w?(R(w),V(!0),K(-1)):(R([]),V(!1))})},300)},be=X=>{if(!Y.current||z.current.length===0){X.key==="Escape"&&(V(!1),Y.current=!1);return}switch(X.key){case"ArrowDown":X.preventDefault(),K(A=>{const w=A<z.current.length-1?A+1:A;return Q.current=w,w});break;case"ArrowUp":X.preventDefault(),K(A=>{const w=A>0?A-1:-1;return Q.current=w,w});break;case"Enter":X.preventDefault(),Q.current>=0&&Q.current<z.current.length&&Ne(z.current[Q.current]);break;case"Escape":X.preventDefault(),V(!1),Y.current=!1;break}};f.useEffect(()=>{const X=A=>{h.current&&!h.current.contains(A.target)&&d.current&&!d.current.contains(A.target)&&(V(!1),Y.current=!1)};if(Z)return document.addEventListener("mousedown",X),()=>{document.removeEventListener("mousedown",X)}},[Z]);const Ne=X=>{v.current&&v.current.getDetails({placeId:X.place_id,fields:["address_components","formatted_address","geometry"]},(A,w)=>{if(w===google.maps.places.PlacesServiceStatus.OK&&A){const O=A.formatted_address||"";H(O),V(!1),R([]),Y.current=!1;const I=di(A);a?.(O,I),s?.(A)}})};return c.jsx(De,{id:e,label:t,hint:r,error:n,required:o,className:i,children:c.jsxs("div",{className:"relative",children:[c.jsx("input",{ref:d,id:e,type:"text",className:`form-input ${n?"input-error":""}`,value:q,onChange:me,onKeyDown:be,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,autoComplete:"street-address",placeholder:u.placeholder||"Enter an address",disabled:C||u.disabled,...u}),C&&c.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"Loading address suggestions..."}),Z&&j.length>0&&c.jsx("div",{ref:h,className:"absolute z-50 w-full mt-1 bg-white border border-slate-200 rounded-lg shadow-lg max-h-60 overflow-y-auto",role:"listbox",children:j.map((X,A)=>c.jsxs("div",{className:`px-4 py-3 cursor-pointer transition-colors ${A===W?"bg-blue-50 text-slate-900":"bg-white text-slate-900 hover:bg-slate-50"} ${A<j.length-1?"border-b border-slate-100":""}`,role:"option","aria-selected":A===W,onClick:()=>Ne(X),onMouseEnter:()=>K(A),children:[c.jsx("div",{className:"font-medium text-slate-900",children:X.structured_formatting.main_text}),X.structured_formatting.secondary_text&&c.jsx("div",{className:"text-sm text-slate-500 mt-0.5",children:X.structured_formatting.secondary_text})]},X.place_id))})]})})}function sr(e){const t=(r,n)=>r.map((o,i)=>{const a=n.length?n.join("__"):"root",s=o.key??`${a}__q${i}_${String(o.question).slice(0,24).replace(/\W+/g,"-")||"field"}`,u=(o.conditionals??[]).map((d,p)=>{const v=d.conditionalQuestions?t(d.conditionalQuestions,[...n,`${s}__c${p}`]):void 0;return{...d,conditionalQuestions:v}});return{...o,key:s,conditionals:u}});return t(e,[])}function b(e,t,r){function n(s,l){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:l,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,l);const u=a.prototype,d=Object.keys(u);for(let p=0;p<d.length;p++){const v=d[p];v in s||(s[v]=u[v].bind(s))}}const o=r?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function a(s){var l;const u=r?.Parent?new i:this;n(u,s),(l=u._zod).deferred??(l.deferred=[]);for(const d of u._zod.deferred)d();return u}return Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}class ot extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Wr extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Gr={};function Ke(e){return Gr}function jr(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function cr(e,t){return typeof t=="bigint"?t.toString():t}function lr(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ur(e){return e==null}function dr(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function fi(e,t){const r=(e.toString().split(".")[1]||"").length,n=t.toString();let o=(n.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(n)){const l=n.match(/\d?e-(\d?)/);l?.[1]&&(o=Number.parseInt(l[1]))}const i=r>o?r:o,a=Number.parseInt(e.toFixed(i).replace(".","")),s=Number.parseInt(t.toFixed(i).replace(".",""));return a%s/10**i}const Vr=Symbol("evaluating");function ae(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Vr)return n===void 0&&(n=Vr,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function qe(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Ze(...e){const t={};for(const r of e){const n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function Yr(e){return JSON.stringify(e)}function mi(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Kr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Tt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const pi=lr(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function ht(e){if(Tt(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(Tt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function qr(e){return ht(e)?{...e}:Array.isArray(e)?[...e]:e}const hi=new Set(["string","number","symbol"]);function it(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function We(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function $(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function gi(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const yi={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function bi(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=Ze(e._zod.def,{get shape(){const a={};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(a[s]=r.shape[s])}return qe(this,"shape",a),a},checks:[]});return We(e,i)}function vi(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=Ze(e._zod.def,{get shape(){const a={...e._zod.def.shape};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete a[s]}return qe(this,"shape",a),a},checks:[]});return We(e,i)}function Si(e,t){if(!ht(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const i=e._zod.def.shape;for(const a in t)if(Object.getOwnPropertyDescriptor(i,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=Ze(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return qe(this,"shape",i),i}});return We(e,o)}function Ai(e,t){if(!ht(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=Ze(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return qe(this,"shape",n),n}});return We(e,r)}function Ci(e,t){const r=Ze(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return qe(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return We(e,r)}function wi(e,t,r){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const a=Ze(t._zod.def,{get shape(){const s=t._zod.def.shape,l={...s};if(r)for(const u in r){if(!(u in s))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(l[u]=e?new e({type:"optional",innerType:s[u]}):s[u])}else for(const u in s)l[u]=e?new e({type:"optional",innerType:s[u]}):s[u];return qe(this,"shape",l),l},checks:[]});return We(t,a)}function Ei(e,t,r){const n=Ze(t._zod.def,{get shape(){const o=t._zod.def.shape,i={...o};if(r)for(const a in r){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(i[a]=new e({type:"nonoptional",innerType:o[a]}))}else for(const a in o)i[a]=new e({type:"nonoptional",innerType:o[a]});return qe(this,"shape",i),i}});return We(t,n)}function at(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Jr(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function kt(e){return typeof e=="string"?e:e?.message}function Je(e,t,r){const n={...e,path:e.path??[]};if(!e.message){const o=kt(e.inst?._zod.def?.error?.(e))??kt(t?.error?.(e))??kt(r.customError?.(e))??kt(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function _r(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function gt(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}const Qr=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,cr,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Xr=b("$ZodError",Qr),en=b("$ZodError",Qr,{Parent:Error});function Ni(e,t=r=>r.message){const r={},n=[];for(const o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}function Ti(e,t=r=>r.message){const r={_errors:[]},n=o=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>n({issues:a}));else if(i.code==="invalid_key")n({issues:i.issues});else if(i.code==="invalid_element")n({issues:i.issues});else if(i.path.length===0)r._errors.push(t(i));else{let a=r,s=0;for(;s<i.path.length;){const l=i.path[s];s===i.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(t(i))):a[l]=a[l]||{_errors:[]},a=a[l],s++}}};return n(e),r}const fr=e=>(t,r,n,o)=>{const i=n?Object.assign(n,{async:!1}):{async:!1},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new ot;if(a.issues.length){const s=new(o?.Err??e)(a.issues.map(l=>Je(l,i,Ke())));throw Kr(s,o?.callee),s}return a.value},mr=e=>async(t,r,n,o)=>{const i=n?Object.assign(n,{async:!0}):{async:!0};let a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){const s=new(o?.Err??e)(a.issues.map(l=>Je(l,i,Ke())));throw Kr(s,o?.callee),s}return a.value},Ot=e=>(t,r,n)=>{const o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new ot;return i.issues.length?{success:!1,error:new(e??Xr)(i.issues.map(a=>Je(a,o,Ke())))}:{success:!0,data:i.value}},ki=Ot(en),It=e=>async(t,r,n)=>{const o=n?Object.assign(n,{async:!0}):{async:!0};let i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>Je(a,o,Ke())))}:{success:!0,data:i.value}},Oi=It(en),Ii=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return fr(e)(t,r,o)},Mi=e=>(t,r,n)=>fr(e)(t,r,n),Li=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return mr(e)(t,r,o)},Di=e=>async(t,r,n)=>mr(e)(t,r,n),Pi=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Ot(e)(t,r,o)},Fi=e=>(t,r,n)=>Ot(e)(t,r,n),$i=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return It(e)(t,r,o)},xi=e=>async(t,r,n)=>It(e)(t,r,n),Bi=/^[cC][^\s-]{8,}$/,zi=/^[0-9a-z]+$/,Hi=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ri=/^[0-9a-vA-V]{20}$/,Ui=/^[A-Za-z0-9]{27}$/,Zi=/^[a-zA-Z0-9_-]{21}$/,Wi=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Gi=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,tn=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,ji=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Vi="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Yi(){return new RegExp(Vi,"u")}const Ki=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,qi=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Ji=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Qi=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Xi=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,rn=/^[A-Za-z0-9_-]*$/,ea=/^\+[1-9]\d{6,14}$/,nn="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",ta=new RegExp(`^${nn}$`);function on(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ra(e){return new RegExp(`^${on(e)}$`)}function na(e){const t=on({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${nn}T(?:${n})$`)}const oa=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},ia=/^-?\d+$/,aa=/^-?\d+(?:\.\d+)?$/,sa=/^(?:true|false)$/i,ca=/^[^A-Z]*$/,la=/^[^a-z]*$/,Oe=b("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),an={number:"number",bigint:"bigint",object:"date"},sn=b("$ZodCheckLessThan",(e,t)=>{Oe.init(e,t);const r=an[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,i=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),cn=b("$ZodCheckGreaterThan",(e,t)=>{Oe.init(e,t);const r=an[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ua=b("$ZodCheckMultipleOf",(e,t)=>{Oe.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):fi(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),da=b("$ZodCheckNumberFormat",(e,t)=>{Oe.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[o,i]=yi[t.format];e._zod.onattach.push(a=>{const s=a._zod.bag;s.format=t.format,s.minimum=o,s.maximum=i,r&&(s.pattern=ia)}),e._zod.check=a=>{const s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}s<o&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),_a=b("$ZodCheckMaxLength",(e,t)=>{var r;Oe.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!ur(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const o=n.value;if(o.length<=t.maximum)return;const a=_r(o);n.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),fa=b("$ZodCheckMinLength",(e,t)=>{var r;Oe.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!ur(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const o=n.value;if(o.length>=t.minimum)return;const a=_r(o);n.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),ma=b("$ZodCheckLengthEquals",(e,t)=>{var r;Oe.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!ur(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=n=>{const o=n.value,i=o.length;if(i===t.length)return;const a=_r(o),s=i>t.length;n.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Mt=b("$ZodCheckStringFormat",(e,t)=>{var r,n;Oe.init(e,t),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),pa=b("$ZodCheckRegex",(e,t)=>{Mt.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ha=b("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ca),Mt.init(e,t)}),ga=b("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=la),Mt.init(e,t)}),ya=b("$ZodCheckIncludes",(e,t)=>{Oe.init(e,t);const r=it(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),ba=b("$ZodCheckStartsWith",(e,t)=>{Oe.init(e,t);const r=new RegExp(`^${it(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),va=b("$ZodCheckEndsWith",(e,t)=>{Oe.init(e,t);const r=new RegExp(`.*${it(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Sa=b("$ZodCheckOverwrite",(e,t)=>{Oe.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class Aa{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(`
3
- `).filter(a=>a),o=Math.min(...n.map(a=>a.length-a.trimStart().length)),i=n.map(a=>a.slice(o)).map(a=>" ".repeat(this.indent*2)+a);for(const a of i)this.content.push(a)}compile(){const t=Function,r=this?.args,o=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,o.join(`
4
- `))}}const Ca={major:4,minor:3,patch:6},_e=b("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ca;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const o of n)for(const i of o._zod.onattach)i(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(a,s,l)=>{let u=at(a),d;for(const p of s){if(p._zod.def.when){if(!p._zod.def.when(a))continue}else if(u)continue;const v=a.issues.length,h=p._zod.check(a);if(h instanceof Promise&&l?.async===!1)throw new ot;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,a.issues.length!==v&&(u||(u=at(a,v)))});else{if(a.issues.length===v)continue;u||(u=at(a,v))}}return d?d.then(()=>a):a},i=(a,s,l)=>{if(at(a))return a.aborted=!0,a;const u=o(s,n,l);if(u instanceof Promise){if(l.async===!1)throw new ot;return u.then(d=>e._zod.parse(d,l))}return e._zod.parse(u,l)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){const u=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return u instanceof Promise?u.then(d=>i(d,a,s)):i(u,a,s)}const l=e._zod.parse(a,s);if(l instanceof Promise){if(s.async===!1)throw new ot;return l.then(u=>o(u,n,s))}return o(l,n,s)}}ae(e,"~standard",()=>({validate:o=>{try{const i=ki(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Oi(e,o).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),pr=b("$ZodString",(e,t)=>{_e.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??oa(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),le=b("$ZodStringFormat",(e,t)=>{Mt.init(e,t),pr.init(e,t)}),wa=b("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Gi),le.init(e,t)}),Ea=b("$ZodUUID",(e,t)=>{if(t.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=tn(n))}else t.pattern??(t.pattern=tn());le.init(e,t)}),Na=b("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=ji),le.init(e,t)}),Ta=b("$ZodURL",(e,t)=>{le.init(e,t),e._zod.check=r=>{try{const n=r.value.trim(),o=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),ka=b("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Yi()),le.init(e,t)}),Oa=b("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Zi),le.init(e,t)}),Ia=b("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Bi),le.init(e,t)}),Ma=b("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=zi),le.init(e,t)}),La=b("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Hi),le.init(e,t)}),Da=b("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Ri),le.init(e,t)}),Pa=b("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Ui),le.init(e,t)}),Fa=b("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=na(t)),le.init(e,t)}),$a=b("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=ta),le.init(e,t)}),xa=b("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=ra(t)),le.init(e,t)}),Ba=b("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Wi),le.init(e,t)}),za=b("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Ki),le.init(e,t),e._zod.bag.format="ipv4"}),Ha=b("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=qi),le.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Ra=b("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Ji),le.init(e,t)}),Ua=b("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Qi),le.init(e,t),e._zod.check=r=>{const n=r.value.split("/");try{if(n.length!==2)throw new Error;const[o,i]=n;if(!i)throw new Error;const a=Number(i);if(`${a}`!==i)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${o}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function ln(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Za=b("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Xi),le.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{ln(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function Wa(e){if(!rn.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return ln(r)}const Ga=b("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=rn),le.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{Wa(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),ja=b("$ZodE164",(e,t)=>{t.pattern??(t.pattern=ea),le.init(e,t)});function Va(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const Ya=b("$ZodJWT",(e,t)=>{le.init(e,t),e._zod.check=r=>{Va(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),un=b("$ZodNumber",(e,t)=>{_e.init(e,t),e._zod.pattern=e._zod.bag.pattern??aa,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;const i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),r}}),Ka=b("$ZodNumberFormat",(e,t)=>{da.init(e,t),un.init(e,t)}),qa=b("$ZodBoolean",(e,t)=>{_e.init(e,t),e._zod.pattern=sa,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}const o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),Ja=b("$ZodUnknown",(e,t)=>{_e.init(e,t),e._zod.parse=r=>r}),Qa=b("$ZodNever",(e,t)=>{_e.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function dn(e,t,r){e.issues.length&&t.issues.push(...Jr(r,e.issues)),t.value[r]=e.value}const Xa=b("$ZodArray",(e,t)=>{_e.init(e,t),e._zod.parse=(r,n)=>{const o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);const i=[];for(let a=0;a<o.length;a++){const s=o[a],l=t.element._zod.run({value:s,issues:[]},n);l instanceof Promise?i.push(l.then(u=>dn(u,r,a))):dn(l,r,a)}return i.length?Promise.all(i).then(()=>r):r}});function Lt(e,t,r,n,o){if(e.issues.length){if(o&&!(r in n))return;t.issues.push(...Jr(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function _n(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const r=gi(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function fn(e,t,r,n,o,i){const a=[],s=o.keySet,l=o.catchall._zod,u=l.def.type,d=l.optout==="optional";for(const p in t){if(s.has(p))continue;if(u==="never"){a.push(p);continue}const v=l.run({value:t[p],issues:[]},n);v instanceof Promise?e.push(v.then(h=>Lt(h,r,p,t,d))):Lt(v,r,p,t,d)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}const es=b("$ZodObject",(e,t)=>{if(_e.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const s=t.shape;Object.defineProperty(t,"shape",{get:()=>{const l={...s};return Object.defineProperty(t,"shape",{value:l}),l}})}const n=lr(()=>_n(t));ae(e._zod,"propValues",()=>{const s=t.shape,l={};for(const u in s){const d=s[u]._zod;if(d.values){l[u]??(l[u]=new Set);for(const p of d.values)l[u].add(p)}}return l});const o=Tt,i=t.catchall;let a;e._zod.parse=(s,l)=>{a??(a=n.value);const u=s.value;if(!o(u))return s.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),s;s.value={};const d=[],p=a.shape;for(const v of a.keys){const h=p[v],C=h._zod.optout==="optional",m=h._zod.run({value:u[v],issues:[]},l);m instanceof Promise?d.push(m.then(q=>Lt(q,s,v,u,C))):Lt(m,s,v,u,C)}return i?fn(d,u,s,l,n.value,e):d.length?Promise.all(d).then(()=>s):s}}),ts=b("$ZodObjectJIT",(e,t)=>{es.init(e,t);const r=e._zod.parse,n=lr(()=>_n(t)),o=v=>{const h=new Aa(["shape","payload","ctx"]),C=n.value,m=R=>{const Z=Yr(R);return`shape[${Z}]._zod.run({ value: input[${Z}], issues: [] }, ctx)`};h.write("const input = payload.value;");const q=Object.create(null);let H=0;for(const R of C.keys)q[R]=`key_${H++}`;h.write("const newResult = {};");for(const R of C.keys){const Z=q[R],V=Yr(R),K=v[R]?._zod?.optout==="optional";h.write(`const ${Z} = ${m(R)};`),K?h.write(`
5
- if (${Z}.issues.length) {
6
- if (${V} in input) {
7
- payload.issues = payload.issues.concat(${Z}.issues.map(iss => ({
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-50:oklch(97.1% .013 17.38);--color-red-200:oklch(88.5% .062 18.334);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-emerald-600:oklch(59.6% .145 163.225);--color-cyan-500:oklch(71.5% .143 215.221);--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-800:oklch(27.9% .041 260.031);--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-md:28rem;--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;--tracking-wide:.025em;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-in-out:cubic-bezier(.4,0,.2,1);--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-5{margin-top:calc(var(--spacing)*5)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-8{margin-top:calc(var(--spacing)*8)}.mt-auto{margin-top:auto}.mb-1{margin-bottom:calc(var(--spacing)*1)}.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-auto{width:auto!important}.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)}.max-w-full{max-width:100%}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[8\\.5rem\\]{min-width:8.5rem}.flex-1{flex:1}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.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}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.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)}.gap-6{gap:calc(var(--spacing)*6)}: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)))}.self-end{align-self:flex-end}.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-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-\\[var\\(--accent-color\\)\\]{border-color:var(--accent-color)}.border-amber-300{border-color:var(--color-amber-300)}.border-blue-600{border-color:var(--color-blue-600)}.border-cyan-500{border-color:var(--color-cyan-500)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-red-200{border-color:var(--color-red-200)}.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)}.border-transparent{border-color:#0000}.bg-amber-50{background-color:var(--color-amber-50)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-600{background-color:var(--color-blue-600)}.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-red-50{background-color:var(--color-red-50)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-400{background-color:var(--color-slate-400)}.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-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.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{padding-block:calc(var(--spacing)*2)}.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}.text-left{text-align:left}.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)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\\[var\\(--text-primary\\)\\]{color:var(--text-primary)}.text-amber-800{color:var(--color-amber-800)}.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-red-700{color:var(--color-red-700)}.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-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.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)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + 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)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-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))}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.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-amber-900:hover{color:var(--color-amber-900)}.hover\\:text-blue-700:hover{color:var(--color-blue-700)}.hover\\:text-slate-600:hover{color:var(--color-slate-600)}.hover\\:text-slate-800:hover{color:var(--color-slate-800)}}.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))}}}: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}}@media (max-width:767px){#insurance-widget-root .modal-panel,#root .modal-panel{width:100%;max-width:none;height:100%;max-height:none;box-shadow:none;border-radius:0;position:fixed;inset:0}}#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 input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}#insurance-widget-root input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}#root input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}#root input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}#insurance-widget-root input[type=number],#root input[type=number]{-moz-appearance:textfield}#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 .communications-consent-checkbox.checkbox-card,#root .communications-consent-checkbox.checkbox-card{border-width:2px;border-color:var(--primary-color);background:var(--primary-color);align-items:flex-start;gap:.875rem;padding:1rem 1.125rem}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root .communications-consent-checkbox.checkbox-card,#root .communications-consent-checkbox.checkbox-card{background:color-mix(in oklab,var(--primary-color)7%,#fff)}}#insurance-widget-root .communications-consent-checkbox.checkbox-card,#root .communications-consent-checkbox.checkbox-card{box-shadow:0 0 0 1px var(--primary-color)}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root .communications-consent-checkbox.checkbox-card,#root .communications-consent-checkbox.checkbox-card{box-shadow:0 0 0 1px color-mix(in oklab,var(--primary-color)20%,transparent)}}#insurance-widget-root .communications-consent-checkbox.checkbox-card:hover,#root .communications-consent-checkbox.checkbox-card:hover{border-color:var(--primary-color);background:var(--primary-color)}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root .communications-consent-checkbox.checkbox-card:hover,#root .communications-consent-checkbox.checkbox-card:hover{background:color-mix(in oklab,var(--primary-color)11%,#fff)}}#insurance-widget-root .communications-consent-checkbox .checkbox-input,#root .communications-consent-checkbox .checkbox-input{border-width:3px;border-color:var(--primary-color);flex-shrink:0;width:1.625rem;height:1.625rem;margin-top:.0625rem}#insurance-widget-root .communications-consent-checkbox .checkbox-input:checked,#root .communications-consent-checkbox .checkbox-input:checked{background-size:1.125rem 1.125rem}#insurance-widget-root .communications-consent-checkbox .checkbox-label,#root .communications-consent-checkbox .checkbox-label{font-size:.875rem;font-weight:400;line-height:1.4}#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;color:#fff!important;background-color:#2563eb!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;background-color:#d1d5db!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}@media (max-width:767px){#insurance-widget-root button.modal-close-btn[type=button],#root button.modal-close-btn[type=button]{visibility:hidden!important;pointer-events:none!important;display:none!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{transition:border-color .15s,background-color .15s;visibility:visible!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important;box-sizing:border-box!important;border-radius:var(--radius-full)!important;color:#1a202c!important;text-align:center!important;cursor:pointer!important;background-color:#fff!important;border:1px solid #e2e8f0!important;place-content:center!important;place-items:center!important;height:3rem!important;min-height:3rem!important;margin:0!important;padding:0!important;font-size:1rem!important;font-weight:600!important;line-height:1!important;display:grid!important;overflow:visible!important}#insurance-widget-root button.credify-btn-back[type=button]:not(:disabled):hover,#root button.credify-btn-back[type=button]:not(:disabled):hover{background-color:#f9fafb!important;border-color:#cbd5e1!important}#insurance-widget-root button.credify-btn-back[type=button]:disabled,#root button.credify-btn-back[type=button]:disabled{opacity:.5!important;cursor:not-allowed!important;background-color:#f3f4f6!important}#insurance-widget-root button.credify-btn-back[type=button][data-testid=communications-consent-decline],#root button.credify-btn-back[type=button][data-testid=communications-consent-decline]{font-weight:400!important}#insurance-widget-root button.credify-btn-back-rates[type=button],#root button.credify-btn-back-rates[type=button]{margin-top:2rem!important}#insurance-widget-root button.credify-retry-btn[type=button],#root button.credify-retry-btn[type=button]{cursor:pointer;font:inherit;border:none;visibility:visible!important;color:var(--text-primary)!important;clip-path:none!important;pointer-events:auto!important;background:0 0!important;text-decoration:underline!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;box-sizing:border-box!important;text-align:center!important;color:#fff!important;background-color:#2563eb!important;place-content:center!important;place-items:center!important;min-height:2.5rem!important;padding:0 1rem!important;line-height:1!important;display:grid!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;background-color:#cbd5e1!important}#insurance-widget-root button.rates-bind-btn.rates-bind-btn-requested,#root button.rates-bind-btn.rates-bind-btn-requested{color:#fff!important;background-color:#10b981!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;color:#fff!important;background-color:#2563eb!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],#root button.btn-primary[type=button],#insurance-widget-root button.btn-primary[type=submit],#root button.btn-primary[type=submit]{color:#fff!important;background-color:#2563eb!important}#insurance-widget-root button.btn-outline[type=button],#root button.btn-outline[type=button]{color:var(--text-primary)!important;border:1px solid var(--accent-color)!important;background-color:#fff!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 button.btn-primary[type=button]:disabled,#root button.btn-primary[type=button]:disabled{color:#fff!important;background-color:#d1d5db!important}#insurance-widget-root button.btn-outline[type=button]:disabled,#root button.btn-outline[type=button]:disabled{color:var(--text-primary)!important;background-color:#f1f5f9!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-tracking{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}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@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-tracking: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;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-ease:initial}}}`)),document.head.appendChild(t)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
+ (function(){if(typeof Ye>"u")var Ye={env:{}}})();(function(Ye,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react"),require("react-dom/client"),require("react/jsx-runtime")):typeof define=="function"&&define.amd?define(["exports","react","react-dom/client","react/jsx-runtime"],y):(Ye=typeof globalThis<"u"?globalThis:Ye||self,y(Ye.CredifyInsuranceWidget={},Ye.React,Ye.ReactDOM,Ye.React))})(this,(function(Ye,y,zc,u){"use strict";function jc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Sn=jc(y),ue=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,lt="8.55.2",ie=globalThis;function Sr(e,t,r){const n=r||ie,o=n.__SENTRY__=n.__SENTRY__||{},i=o[lt]=o[lt]||{};return i[e]||(i[e]=t())}const Ct=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Wc="Sentry Logger ",En=["debug","info","warn","error","log","assert","trace"],Er={};function At(e){if(!("console"in ie))return e();const t=ie.console,r={},n=Object.keys(Er);n.forEach(o=>{const i=Er[o];r[o]=t[o],t[o]=i});try{return e()}finally{n.forEach(o=>{t[o]=r[o]})}}function Gc(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Ct?En.forEach(r=>{t[r]=(...n)=>{e&&At(()=>{ie.console[r](`${Wc}[${r}]:`,...n)})}}):En.forEach(r=>{t[r]=()=>{}}),t}const W=Sr("logger",Gc),qo=50,wt="?",Jo=/\(error: (.*)\)/,Qo=/captureMessage|captureException/;function Xo(...e){const t=e.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0,o=0)=>{const i=[],s=r.split(`
3
+ `);for(let a=n;a<s.length;a++){const c=s[a];if(c.length>1024)continue;const l=Jo.test(c)?c.replace(Jo,"$1"):c;if(!l.match(/\S*Error: /)){for(const d of t){const f=d(l);if(f){i.push(f);break}}if(i.length>=qo+o)break}}return Yc(i.slice(o))}}function Zc(e){return Array.isArray(e)?Xo(...e):e}function Yc(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Cr(t).function||"")&&t.pop(),t.reverse(),Qo.test(Cr(t).function||"")&&(t.pop(),Qo.test(Cr(t).function||"")&&t.pop()),t.slice(0,qo).map(r=>({...r,filename:r.filename||Cr(t).filename,function:r.function||wt}))}function Cr(e){return e[e.length-1]||{}}const Cn="<anonymous>";function ut(e){try{return!e||typeof e!="function"?Cn:e.name||Cn}catch{return Cn}}function ei(e){const t=e.exception;if(t){const r=[];try{return t.values.forEach(n=>{n.stacktrace.frames&&r.push(...n.stacktrace.frames)}),r}catch{return}}}const Ar={},ti={};function Tt(e,t){Ar[e]=Ar[e]||[],Ar[e].push(t)}function It(e,t){if(!ti[e]){ti[e]=!0;try{t()}catch(r){Ct&&W.error(`Error while instrumenting ${e}`,r)}}}function Qe(e,t){const r=e&&Ar[e];if(r)for(const n of r)try{n(t)}catch(o){Ct&&W.error(`Error while triggering instrumentation handler.
4
+ Type: ${e}
5
+ Name: ${ut(n)}
6
+ Error:`,o)}}let An=null;function Vc(e){const t="error";Tt(t,e),It(t,Kc)}function Kc(){An=ie.onerror,ie.onerror=function(e,t,r,n,o){return Qe("error",{column:n,error:o,line:r,msg:e,url:t}),An?An.apply(this,arguments):!1},ie.onerror.__SENTRY_INSTRUMENTED__=!0}let wn=null;function qc(e){const t="unhandledrejection";Tt(t,e),It(t,Jc)}function Jc(){wn=ie.onunhandledrejection,ie.onunhandledrejection=function(e){return Qe("unhandledrejection",e),wn?wn.apply(this,arguments):!0},ie.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function wr(){return Tn(ie),ie}function Tn(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||lt,t[lt]=t[lt]||{}}const ri=Object.prototype.toString;function Tr(e){switch(ri.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return kt(e,Error)}}function Ut(e,t){return ri.call(e)===`[object ${t}]`}function ni(e){return Ut(e,"ErrorEvent")}function oi(e){return Ut(e,"DOMError")}function Qc(e){return Ut(e,"DOMException")}function ot(e){return Ut(e,"String")}function In(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function kn(e){return e===null||In(e)||typeof e!="object"&&typeof e!="function"}function Ht(e){return Ut(e,"Object")}function Ir(e){return typeof Event<"u"&&kt(e,Event)}function Xc(e){return typeof Element<"u"&&kt(e,Element)}function el(e){return Ut(e,"RegExp")}function kr(e){return!!(e&&e.then&&typeof e.then=="function")}function tl(e){return Ht(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function kt(e,t){try{return e instanceof t}catch{return!1}}function ii(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}const Nn=ie,rl=80;function si(e,t={}){if(!e)return"<unknown>";try{let r=e;const n=5,o=[];let i=0,s=0;const a=" > ",c=a.length;let l;const d=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||rl;for(;r&&i++<n&&(l=nl(r,d),!(l==="html"||i>1&&s+o.length*c+l.length>=f));)o.push(l),s+=l.length,r=r.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function nl(e,t){const r=e,n=[];if(!r||!r.tagName)return"";if(Nn.HTMLElement&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}n.push(r.tagName.toLowerCase());const o=t&&t.length?t.filter(s=>r.getAttribute(s)).map(s=>[s,r.getAttribute(s)]):null;if(o&&o.length)o.forEach(s=>{n.push(`[${s[0]}="${s[1]}"]`)});else{r.id&&n.push(`#${r.id}`);const s=r.className;if(s&&ot(s)){const a=s.split(/\s+/);for(const c of a)n.push(`.${c}`)}}const i=["aria-label","type","name","title","alt"];for(const s of i){const a=r.getAttribute(s);a&&n.push(`[${s}="${a}"]`)}return n.join("")}function ol(){try{return Nn.document.location.href}catch{return""}}function il(e){if(!Nn.HTMLElement)return null;let t=e;const r=5;for(let n=0;n<r;n++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function zt(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function ai(e,t){if(!Array.isArray(e))return"";const r=[];for(let n=0;n<e.length;n++){const o=e[n];try{ii(o)?r.push("[VueViewModel]"):r.push(String(o))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function sl(e,t,r=!1){return ot(e)?el(t)?t.test(e):ot(t)?r?e===t:e.includes(t):!1:!1}function Nr(e,t=[],r=!1){return t.some(n=>sl(e,n,r))}function He(e,t,r){if(!(t in e))return;const n=e[t],o=r(n);typeof o=="function"&&ci(o,n);try{e[t]=o}catch{Ct&&W.log(`Failed to replace method "${t}" in object`,e)}}function Nt(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{Ct&&W.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function ci(e,t){try{const r=t.prototype||{};e.prototype=t.prototype=r,Nt(e,"__sentry_original__",t)}catch{}}function On(e){return e.__sentry_original__}function li(e){if(Tr(e))return{message:e.message,name:e.name,stack:e.stack,...di(e)};if(Ir(e)){const t={type:e.type,target:ui(e.target),currentTarget:ui(e.currentTarget),...di(e)};return typeof CustomEvent<"u"&&kt(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function ui(e){try{return Xc(e)?si(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function di(e){if(typeof e=="object"&&e!==null){const t={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}else return{}}function al(e,t=40){const r=Object.keys(li(e));r.sort();const n=r[0];if(!n)return"[object has no keys]";if(n.length>=t)return zt(n,t);for(let o=r.length;o>0;o--){const i=r.slice(0,o).join(", ");if(!(i.length>t))return o===r.length?i:zt(i,t)}return""}function Ve(e){return Mn(e,new Map)}function Mn(e,t){if(cl(e)){const r=t.get(e);if(r!==void 0)return r;const n={};t.set(e,n);for(const o of Object.getOwnPropertyNames(e))typeof e[o]<"u"&&(n[o]=Mn(e[o],t));return n}if(Array.isArray(e)){const r=t.get(e);if(r!==void 0)return r;const n=[];return t.set(e,n),e.forEach(o=>{n.push(Mn(o,t))}),n}return e}function cl(e){if(!Ht(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const fi=1e3;function sr(){return Date.now()/fi}function ll(){const{performance:e}=ie;if(!e||!e.now)return sr;const t=Date.now()-e.now(),r=e.timeOrigin==null?t:e.timeOrigin;return()=>(r+e.now())/fi}const it=ll();(()=>{const{performance:e}=ie;if(!e||!e.now)return;const t=3600*1e3,r=e.now(),n=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+r-n):t,i=o<t,s=e.timing&&e.timing.navigationStart,c=typeof s=="number"?Math.abs(s+r-n):t,l=c<t;return i||l?o<=c?e.timeOrigin:s:n})();function Ke(){const e=ie,t=e.crypto||e.msCrypto;let r=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(r=()=>{const n=new Uint8Array(1);return t.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(r()&15)>>n/4).toString(16))}function pi(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function dt(e){const{message:t,event_id:r}=e;if(t)return t;const n=pi(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function Dn(e,t,r){const n=e.exception=e.exception||{},o=n.values=n.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type="Error")}function jt(e,t){const r=pi(e);if(!r)return;const n={type:"generic",handled:!0},o=r.mechanism;if(r.mechanism={...n,...o,...t},t&&"data"in t){const i={...o&&o.data,...t.data};r.mechanism.data=i}}function _i(e){if(ul(e))return!0;try{Nt(e,"__sentry_captured__",!0)}catch{}return!1}function ul(e){try{return e.__sentry_captured__}catch{}}var st;(function(e){e[e.PENDING=0]="PENDING";const r=1;e[e.RESOLVED=r]="RESOLVED";const n=2;e[e.REJECTED=n]="REJECTED"})(st||(st={}));function Ot(e){return new qe(t=>{t(e)})}function Or(e){return new qe((t,r)=>{r(e)})}class qe{constructor(t){qe.prototype.__init.call(this),qe.prototype.__init2.call(this),qe.prototype.__init3.call(this),qe.prototype.__init4.call(this),this._state=st.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(r){this._reject(r)}}then(t,r){return new qe((n,o)=>{this._handlers.push([!1,i=>{if(!t)n(i);else try{n(t(i))}catch(s){o(s)}},i=>{if(!r)o(i);else try{n(r(i))}catch(s){o(s)}}]),this._executeHandlers()})}catch(t){return this.then(r=>r,t)}finally(t){return new qe((r,n)=>{let o,i;return this.then(s=>{i=!1,o=s,t&&t()},s=>{i=!0,o=s,t&&t()}).then(()=>{if(i){n(o);return}r(o)})})}__init(){this._resolve=t=>{this._setResult(st.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(st.REJECTED,t)}}__init3(){this._setResult=(t,r)=>{if(this._state===st.PENDING){if(kr(r)){r.then(this._resolve,this._reject);return}this._state=t,this._value=r,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===st.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(r=>{r[0]||(this._state===st.RESOLVED&&r[1](this._value),this._state===st.REJECTED&&r[2](this._value),r[0]=!0)})}}}function dl(e){const t=it(),r={sid:Ke(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>pl(r)};return e&&Wt(r,e),r}function Wt(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||it(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Ke()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const r=e.timestamp-e.started;e.duration=r>=0?r:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function fl(e,t){let r={};e.status==="ok"&&(r={status:"exited"}),Wt(e,r)}function pl(e){return Ve({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}function mi(){return Ke()}function Pn(){return Ke().substring(16)}function Mr(e,t,r=2){if(!t||typeof t!="object"||r<=0)return t;if(e&&t&&Object.keys(t).length===0)return e;const n={...e};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=Mr(n[o],t[o],r-1));return n}const Ln="_sentrySpan";function hi(e,t){t?Nt(e,Ln,t):delete e[Ln]}function gi(e){return e[Ln]}const _l=100;class xn{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:mi(),spanId:Pn()}}clone(){const t=new xn;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,hi(t,gi(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Wt(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,r){return this._tags={...this._tags,[t]:r},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,r){return this._extra={...this._extra,[t]:r},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,r){return r===null?delete this._contexts[t]:this._contexts[t]=r,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const r=typeof t=="function"?t(this):t,[n,o]=r instanceof ft?[r.getScopeData(),r.getRequestSession()]:Ht(r)?[t,t.requestSession]:[],{tags:i,extra:s,user:a,contexts:c,level:l,fingerprint:d=[],propagationContext:f}=n||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...s},this._contexts={...this._contexts,...c},a&&Object.keys(a).length&&(this._user=a),l&&(this._level=l),d.length&&(this._fingerprint=d),f&&(this._propagationContext=f),o&&(this._requestSession=o),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,hi(this,void 0),this._attachments=[],this.setPropagationContext({traceId:mi()}),this._notifyScopeListeners(),this}addBreadcrumb(t,r){const n=typeof r=="number"?r:_l;if(n<=0)return this;const o={timestamp:sr(),...t};return this._breadcrumbs.push(o),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client&&this._client.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:gi(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Mr(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext={spanId:Pn(),...t},this}getPropagationContext(){return this._propagationContext}captureException(t,r){const n=r&&r.event_id?r.event_id:Ke();if(!this._client)return W.warn("No client configured on scope - will not capture exception!"),n;const o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...r,event_id:n},this),n}captureMessage(t,r,n){const o=n&&n.event_id?n.event_id:Ke();if(!this._client)return W.warn("No client configured on scope - will not capture message!"),o;const i=new Error(t);return this._client.captureMessage(t,r,{originalException:t,syntheticException:i,...n,event_id:o},this),o}captureEvent(t,r){const n=r&&r.event_id?r.event_id:Ke();return this._client?(this._client.captureEvent(t,{...r,event_id:n},this),n):(W.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}const ft=xn;function ml(){return Sr("defaultCurrentScope",()=>new ft)}function hl(){return Sr("defaultIsolationScope",()=>new ft)}class gl{constructor(t,r){let n;t?n=t:n=new ft;let o;r?o=r:o=new ft,this._stack=[{scope:n}],this._isolationScope=o}withScope(t){const r=this._pushScope();let n;try{n=t(r)}catch(o){throw this._popScope(),o}return kr(n)?n.then(o=>(this._popScope(),o),o=>{throw this._popScope(),o}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Gt(){const e=wr(),t=Tn(e);return t.stack=t.stack||new gl(ml(),hl())}function yl(e){return Gt().withScope(e)}function bl(e,t){const r=Gt();return r.withScope(()=>(r.getStackTop().scope=e,t(e)))}function yi(e){return Gt().withScope(()=>e(Gt().getIsolationScope()))}function vl(){return{withIsolationScope:yi,withScope:yl,withSetScope:bl,withSetIsolationScope:(e,t)=>yi(t),getCurrentScope:()=>Gt().getScope(),getIsolationScope:()=>Gt().getIsolationScope()}}function Fn(e){const t=Tn(e);return t.acs?t.acs:vl()}function rt(){const e=wr();return Fn(e).getCurrentScope()}function Mt(){const e=wr();return Fn(e).getIsolationScope()}function Sl(){return Sr("globalScope",()=>new ft)}function $n(...e){const t=wr(),r=Fn(t);if(e.length===2){const[n,o]=e;return n?r.withSetScope(n,o):r.withScope(o)}return r.withScope(e[0])}function Ee(){return rt().getClient()}function El(e){const t=e.getPropagationContext(),{traceId:r,spanId:n,parentSpanId:o}=t;return Ve({trace_id:r,span_id:n,parent_span_id:o})}const Cl="_sentryMetrics";function Al(e){const t=e[Cl];if(!t)return;const r={};for(const[,[n,o]]of t)(r[n]||(r[n]=[])).push(Ve(o));return r}const wl="sentry.source",Tl="sentry.sample_rate",Il="sentry.op",kl="sentry.origin",Nl=0,Ol=1,Ml="sentry-",Dl=/^sentry-/;function Pl(e){const t=Ll(e);if(!t)return;const r=Object.entries(t).reduce((n,[o,i])=>{if(o.match(Dl)){const s=o.slice(Ml.length);n[s]=i}return n},{});if(Object.keys(r).length>0)return r}function Ll(e){if(!(!e||!ot(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,r)=>{const n=bi(r);return Object.entries(n).forEach(([o,i])=>{t[o]=i}),t},{}):bi(e)}function bi(e){return e.split(",").map(t=>t.split("=").map(r=>decodeURIComponent(r.trim()))).reduce((t,[r,n])=>(r&&n&&(t[r]=n),t),{})}const xl=1;let vi=!1;function Fl(e){const{spanId:t,traceId:r,isRemote:n}=e.spanContext(),o=n?t:Bn(e).parent_span_id,i=n?Pn():t;return Ve({parent_span_id:o,span_id:i,trace_id:r})}function Si(e){return typeof e=="number"?Ei(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Ei(e.getTime()):it()}function Ei(e){return e>9999999999?e/1e3:e}function Bn(e){if(Bl(e))return e.getSpanJSON();try{const{spanId:t,traceId:r}=e.spanContext();if($l(e)){const{attributes:n,startTime:o,name:i,endTime:s,parentSpanId:a,status:c}=e;return Ve({span_id:t,trace_id:r,data:n,description:i,parent_span_id:a,start_timestamp:Si(o),timestamp:Si(s)||void 0,status:Ul(c),op:n[Il],origin:n[kl],_metrics_summary:Al(e)})}return{span_id:t,trace_id:r}}catch{return{}}}function $l(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Bl(e){return typeof e.getSpanJSON=="function"}function Rl(e){const{traceFlags:t}=e.spanContext();return t===xl}function Ul(e){if(!(!e||e.code===Nl))return e.code===Ol?"ok":e.message||"unknown_error"}const Hl="_sentryRootSpan";function Ci(e){return e[Hl]||e}function zl(){vi||(At(()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")}),vi=!0)}function jl(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=Ee(),r=t&&t.getOptions();return!!r&&(r.enableTracing||"tracesSampleRate"in r||"tracesSampler"in r)}const Rn="production",Wl="_frozenDsc";function Ai(e,t){const r=t.getOptions(),{publicKey:n}=t.getDsn()||{},o=Ve({environment:r.environment||Rn,release:r.release,public_key:n,trace_id:e});return t.emit("createDsc",o),o}function Gl(e,t){const r=t.getPropagationContext();return r.dsc||Ai(r.traceId,e)}function Zl(e){const t=Ee();if(!t)return{};const r=Ci(e),n=r[Wl];if(n)return n;const o=r.spanContext().traceState,i=o&&o.get("sentry.dsc"),s=i&&Pl(i);if(s)return s;const a=Ai(e.spanContext().traceId,t),c=Bn(r),l=c.data||{},d=l[Tl];d!=null&&(a.sample_rate=`${d}`);const f=l[wl],_=c.description;return f!=="url"&&_&&(a.transaction=_),jl()&&(a.sampled=String(Rl(r))),t.emit("createDsc",a,r),a}function Yl(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(typeof t!="number"||isNaN(t)||t<0||t>1){ue&&W.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`);return}return t}const Vl=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Kl(e){return e==="http"||e==="https"}function ar(e,t=!1){const{host:r,path:n,pass:o,port:i,projectId:s,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${r}${i?`:${i}`:""}/${n&&`${n}/`}${s}`}function ql(e){const t=Vl.exec(e);if(!t){At(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[r,n,o="",i="",s="",a=""]=t.slice(1);let c="",l=a;const d=l.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),l=d.pop()),l){const f=l.match(/^\d+/);f&&(l=f[0])}return wi({host:i,pass:o,path:c,projectId:l,port:s,protocol:r,publicKey:n})}function wi(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Jl(e){if(!Ct)return!0;const{port:t,projectId:r,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(W.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:r.match(/^\d+$/)?Kl(n)?t&&isNaN(parseInt(t,10))?(W.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(W.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(W.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function Ti(e){const t=typeof e=="string"?ql(e):wi(e);if(!(!t||!Jl(t)))return t}function Ql(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function r(o){if(e)return t.has(o)?!0:(t.add(o),!1);for(let i=0;i<t.length;i++)if(t[i]===o)return!0;return t.push(o),!1}function n(o){if(e)t.delete(o);else for(let i=0;i<t.length;i++)if(t[i]===o){t.splice(i,1);break}}return[r,n]}function at(e,t=100,r=1/0){try{return Un("",e,t,r)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function Ii(e,t=3,r=100*1024){const n=at(e,t);return ru(n)>r?Ii(e,t-1,r):n}function Un(e,t,r=1/0,n=1/0,o=Ql()){const[i,s]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=Xl(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:r;if(c===0)return a.replace("object ","");if(i(t))return"[Circular ~]";const l=t;if(l&&typeof l.toJSON=="function")try{const m=l.toJSON();return Un("",m,c-1,n,o)}catch{}const d=Array.isArray(t)?[]:{};let f=0;const _=li(t);for(const m in _){if(!Object.prototype.hasOwnProperty.call(_,m))continue;if(f>=n){d[m]="[MaxProperties ~]";break}const g=_[m];d[m]=Un(m,g,c-1,n,o),f++}return s(t),d}function Xl(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(ii(t))return"[VueViewModel]";if(tl(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${ut(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const r=eu(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}}function eu(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function tu(e){return~-encodeURI(e).split(/%..|./).length}function ru(e){return tu(JSON.stringify(e))}function cr(e,t=[]){return[e,t]}function nu(e,t){const[r,n]=e;return[r,[...n,t]]}function ki(e,t){const r=e[1];for(const n of r){const o=n[0].type;if(t(n,o))return!0}return!1}function Hn(e){return ie.__SENTRY__&&ie.__SENTRY__.encodePolyfill?ie.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function ou(e){const[t,r]=e;let n=JSON.stringify(t);function o(i){typeof n=="string"?n=typeof i=="string"?n+i:[Hn(n),i]:n.push(typeof i=="string"?Hn(i):i)}for(const i of r){const[s,a]=i;if(o(`
7
+ ${JSON.stringify(s)}
8
+ `),typeof a=="string"||a instanceof Uint8Array)o(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(at(a))}o(c)}}return typeof n=="string"?n:iu(n)}function iu(e){const t=e.reduce((o,i)=>o+i.length,0),r=new Uint8Array(t);let n=0;for(const o of e)r.set(o,n),n+=o.length;return r}function su(e){const t=typeof e.data=="string"?Hn(e.data):e.data;return[Ve({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const au={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};function Ni(e){return au[e]}function Oi(e){if(!e||!e.sdk)return;const{name:t,version:r}=e.sdk;return{name:t,version:r}}function cu(e,t,r,n){const o=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!r&&n&&{dsn:ar(n)},...o&&{trace:Ve({...o})}}}function lu(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function uu(e,t,r,n){const o=Oi(r),i={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!n&&t&&{dsn:ar(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return cr(i,[s])}function du(e,t,r,n){const o=Oi(r),i=e.type&&e.type!=="replay_event"?e.type:"event";lu(e,r&&r.sdk);const s=cu(e,o,n,t);return delete e.sdkProcessingMetadata,cr(s,[[{type:i},e]])}function zn(e,t,r,n=0){return new qe((o,i)=>{const s=e[n];if(t===null||typeof s!="function")o(t);else{const a=s({...t},r);ue&&s.id&&a===null&&W.log(`Event processor "${s.id}" dropped event`),kr(a)?a.then(c=>zn(e,c,r,n+1).then(o)).then(null,i):zn(e,a,r,n+1).then(o).then(null,i)}})}let Dr,Mi,Pr;function fu(e){const t=ie._sentryDebugIds;if(!t)return{};const r=Object.keys(t);return Pr&&r.length===Mi||(Mi=r.length,Pr=r.reduce((n,o)=>{Dr||(Dr={});const i=Dr[o];if(i)n[i[0]]=i[1];else{const s=e(o);for(let a=s.length-1;a>=0;a--){const c=s[a],l=c&&c.filename,d=t[o];if(l&&d){n[l]=d,Dr[o]=[l,d];break}}}return n},{})),Pr}function pu(e,t){const{fingerprint:r,span:n,breadcrumbs:o,sdkProcessingMetadata:i}=t;_u(e,t),n&&gu(e,n),yu(e,r),mu(e,o),hu(e,i)}function Di(e,t){const{extra:r,tags:n,user:o,contexts:i,level:s,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:l,eventProcessors:d,attachments:f,propagationContext:_,transactionName:m,span:g}=t;Lr(e,"extra",r),Lr(e,"tags",n),Lr(e,"user",o),Lr(e,"contexts",i),e.sdkProcessingMetadata=Mr(e.sdkProcessingMetadata,a,2),s&&(e.level=s),m&&(e.transactionName=m),g&&(e.span=g),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,..._}}function Lr(e,t,r){e[t]=Mr(e[t],r,1)}function _u(e,t){const{extra:r,tags:n,user:o,contexts:i,level:s,transactionName:a}=t,c=Ve(r);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const l=Ve(n);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const d=Ve(o);d&&Object.keys(d).length&&(e.user={...d,...e.user});const f=Ve(i);f&&Object.keys(f).length&&(e.contexts={...f,...e.contexts}),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function mu(e,t){const r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function hu(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function gu(e,t){e.contexts={trace:Fl(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Zl(t),...e.sdkProcessingMetadata};const r=Ci(t),n=Bn(r).description;n&&!e.transaction&&e.type==="transaction"&&(e.transaction=n)}function yu(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function bu(e,t,r,n,o,i){const{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||r.event_id||Ke(),timestamp:t.timestamp||sr()},l=r.integrations||e.integrations.map(G=>G.name);vu(c,e),Cu(c,l),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&Su(c,e.stackParser);const d=wu(n,r.captureContext);r.mechanism&&jt(c,r.mechanism);const f=o?o.getEventProcessors():[],_=Sl().getScopeData();if(i){const G=i.getScopeData();Di(_,G)}if(d){const G=d.getScopeData();Di(_,G)}const m=[...r.attachments||[],..._.attachments];m.length&&(r.attachments=m),pu(c,_);const g=[...f,..._.eventProcessors];return zn(g,c,r).then(G=>(G&&Eu(G),typeof s=="number"&&s>0?Au(G,s,a):G))}function vu(e,t){const{environment:r,release:n,dist:o,maxValueLength:i=250}=t;e.environment=e.environment||r||Rn,!e.release&&n&&(e.release=n),!e.dist&&o&&(e.dist=o),e.message&&(e.message=zt(e.message,i));const s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=zt(s.value,i));const a=e.request;a&&a.url&&(a.url=zt(a.url,i))}function Su(e,t){const r=fu(t);try{e.exception.values.forEach(n=>{n.stacktrace.frames.forEach(o=>{r&&o.filename&&(o.debug_id=r[o.filename])})})}catch{}}function Eu(e){const t={};try{e.exception.values.forEach(n=>{n.stacktrace.frames.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const r=e.debug_meta.images;Object.entries(t).forEach(([n,o])=>{r.push({type:"sourcemap",code_file:n,debug_id:o})})}function Cu(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Au(e,t,r){if(!e)return null;const n={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:at(o.data,t,r)}}))},...e.user&&{user:at(e.user,t,r)},...e.contexts&&{contexts:at(e.contexts,t,r)},...e.extra&&{extra:at(e.extra,t,r)}};return e.contexts&&e.contexts.trace&&n.contexts&&(n.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(n.contexts.trace.data=at(e.contexts.trace.data,t,r))),e.spans&&(n.spans=e.spans.map(o=>({...o,...o.data&&{data:at(o.data,t,r)}}))),e.contexts&&e.contexts.flags&&n.contexts&&(n.contexts.flags=at(e.contexts.flags,3,r)),n}function wu(e,t){if(!t)return e;const r=e?e.clone():new ft;return r.update(t),r}function Tu(e){if(e)return Iu(e)?{captureContext:e}:Nu(e)?{captureContext:e}:e}function Iu(e){return e instanceof ft||typeof e=="function"}const ku=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function Nu(e){return Object.keys(e).some(t=>ku.includes(t))}function xr(e,t){return rt().captureException(e,Tu(t))}function Pi(e,t){return rt().captureEvent(e,t)}function Ou(e,t){Mt().setContext(e,t)}function Mu(){return Mt().lastEventId()}function Li(e){const t=Ee(),r=Mt(),n=rt(),{release:o,environment:i=Rn}=t&&t.getOptions()||{},{userAgent:s}=ie.navigator||{},a=dl({release:o,environment:i,user:n.getUser()||r.getUser(),...s&&{userAgent:s},...e}),c=r.getSession();return c&&c.status==="ok"&&Wt(c,{status:"exited"}),xi(),r.setSession(a),n.setSession(a),a}function xi(){const e=Mt(),t=rt(),r=t.getSession()||e.getSession();r&&fl(r),Fi(),e.setSession(),t.setSession()}function Fi(){const e=Mt(),t=rt(),r=Ee(),n=t.getSession()||e.getSession();n&&r&&r.captureSession(n)}function $i(e=!1){if(e){xi();return}Fi()}const Du="7";function Bi(e){const t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}function Pu(e){return`${Bi(e)}${e.projectId}/envelope/`}function Lu(e,t){const r={sentry_version:Du};return e.publicKey&&(r.sentry_key=e.publicKey),t&&(r.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(r).toString()}function xu(e,t,r){return t||`${Pu(e)}?${Lu(e,r)}`}function Fu(e,t){const r=Ti(e);if(!r)return"";const n=`${Bi(r)}embed/error-page/`;let o=`dsn=${ar(r)}`;for(const i in t)if(i!=="dsn"&&i!=="onClose")if(i==="user"){const s=t.user;if(!s)continue;s.name&&(o+=`&name=${encodeURIComponent(s.name)}`),s.email&&(o+=`&email=${encodeURIComponent(s.email)}`)}else o+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${n}?${o}`}const Ri=[];function $u(e){const t={};return e.forEach(r=>{const{name:n}=r,o=t[n];o&&!o.isDefaultInstance&&r.isDefaultInstance||(t[n]=r)}),Object.values(t)}function Bu(e){const t=e.defaultIntegrations||[],r=e.integrations;t.forEach(s=>{s.isDefaultInstance=!0});let n;if(Array.isArray(r))n=[...t,...r];else if(typeof r=="function"){const s=r(t);n=Array.isArray(s)?s:[s]}else n=t;const o=$u(n),i=o.findIndex(s=>s.name==="Debug");if(i>-1){const[s]=o.splice(i,1);o.push(s)}return o}function Ru(e,t){const r={};return t.forEach(n=>{n&&Hi(e,n,r)}),r}function Ui(e,t){for(const r of t)r&&r.afterAllSetup&&r.afterAllSetup(e)}function Hi(e,t,r){if(r[t.name]){ue&&W.log(`Integration skipped because it was already installed: ${t.name}`);return}if(r[t.name]=t,Ri.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),Ri.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,i)=>n(o,i,e))}if(typeof t.processEvent=="function"){const n=t.processEvent.bind(t),o=Object.assign((i,s)=>n(i,s,e),{id:t.name});e.addEventProcessor(o)}ue&&W.log(`Integration installed: ${t.name}`)}function Uu(e){const t=Ee();if(!t){ue&&W.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function Qb(e){return e}function Hu(e,t,r){const n=[{type:"client_report"},{timestamp:sr(),discarded_events:e}];return cr(t?{dsn:t}:{},[n])}class Xe extends Error{constructor(t,r="warn"){super(t),this.message=t,this.logLevel=r}}const zi="Not capturing exception because it's already been captured.";class zu{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Ti(t.dsn):ue&&W.warn("No DSN provided, client will not send events."),this._dsn){const o=xu(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:o})}const n=["enableTracing","tracesSampleRate","tracesSampler"].find(o=>o in t&&t[o]==null);n&&At(()=>{console.warn(`[Sentry] Deprecation warning: \`${n}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)})}captureException(t,r,n){const o=Ke();if(_i(t))return ue&&W.log(zi),o;const i={event_id:o,...r};return this._process(this.eventFromException(t,i).then(s=>this._captureEvent(s,i,n))),i.event_id}captureMessage(t,r,n,o){const i={event_id:Ke(),...n},s=In(t)?t:String(t),a=kn(t)?this.eventFromMessage(s,r,i):this.eventFromException(t,i);return this._process(a.then(c=>this._captureEvent(c,i,o))),i.event_id}captureEvent(t,r,n){const o=Ke();if(r&&r.originalException&&_i(r.originalException))return ue&&W.log(zi),o;const i={event_id:o,...r},a=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,i,a||n)),i.event_id}captureSession(t){typeof t.release!="string"?ue&&W.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Wt(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const r=this._transport;return r?(this.emit("flush"),this._isClientDoneProcessing(t).then(n=>r.flush(t).then(o=>n&&o))):Ot(!0)}close(t){return this.flush(t).then(r=>(this.getOptions().enabled=!1,this.emit("close"),r))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const r=this._integrations[t.name];Hi(this,t,this._integrations),r||Ui(this,[t])}sendEvent(t,r={}){this.emit("beforeSendEvent",t,r);let n=du(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of r.attachments||[])n=nu(n,su(i));const o=this.sendEnvelope(n);o&&o.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){const r=uu(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(t,r,n){if(this._options.sendClientReports){const o=typeof n=="number"?n:1,i=`${t}:${r}`;ue&&W.log(`Recording outcome: "${i}"${o>1?` (${o} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+o}}on(t,r){const n=this._hooks[t]=this._hooks[t]||[];return n.push(r),()=>{const o=n.indexOf(r);o>-1&&n.splice(o,1)}}emit(t,...r){const n=this._hooks[t];n&&n.forEach(o=>o(...r))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,r=>(ue&&W.error("Error while sending envelope:",r),r)):(ue&&W.error("Transport disabled"),Ot({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=Ru(this,t),Ui(this,t)}_updateSessionFromEvent(t,r){let n=r.level==="fatal",o=!1;const i=r.exception&&r.exception.values;if(i){o=!0;for(const c of i){const l=c.mechanism;if(l&&l.handled===!1){n=!0;break}}}const s=t.status==="ok";(s&&t.errors===0||s&&n)&&(Wt(t,{...n&&{status:"crashed"},errors:t.errors||Number(o||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new qe(r=>{let n=0;const o=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),r(!0)):(n+=o,t&&n>=t&&(clearInterval(i),r(!1)))},o)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,r,n=rt(),o=Mt()){const i=this.getOptions(),s=Object.keys(this._integrations);return!r.integrations&&s.length>0&&(r.integrations=s),this.emit("preprocessEvent",t,r),t.type||o.setLastEventId(t.event_id||r.event_id),bu(i,t,r,n,this,o).then(a=>{if(a===null)return a;a.contexts={trace:El(n),...a.contexts};const c=Gl(this,n);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,r={},n){return this._processEvent(t,r,n).then(o=>o.event_id,o=>{ue&&(o instanceof Xe&&o.logLevel==="log"?W.log(o.message):W.warn(o))})}_processEvent(t,r,n){const o=this.getOptions(),{sampleRate:i}=o,s=Wi(t),a=ji(t),c=t.type||"error",l=`before send for type \`${c}\``,d=typeof i>"u"?void 0:Yl(i);if(a&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error",t),Or(new Xe(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const f=c==="replay_event"?"replay":c,m=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,r,n,m).then(g=>{if(g===null)throw this.recordDroppedEvent("event_processor",f,t),new Xe("An event processor returned `null`, will not send event.","log");if(r.data&&r.data.__sentry__===!0)return g;const G=Wu(this,o,g,r);return ju(G,l)}).then(g=>{if(g===null){if(this.recordDroppedEvent("before_send",f,t),s){const B=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",B)}throw new Xe(`${l} returned \`null\`, will not send event.`,"log")}const b=n&&n.getSession();if(!s&&b&&this._updateSessionFromEvent(b,g),s){const x=g.sdkProcessingMetadata&&g.sdkProcessingMetadata.spanCountBeforeProcessing||0,B=g.spans?g.spans.length:0,D=x-B;D>0&&this.recordDroppedEvent("before_send","span",D)}const G=g.transaction_info;if(s&&G&&g.transaction!==t.transaction){const x="custom";g.transaction_info={...G,source:x}}return this.sendEvent(g,r),g}).then(null,g=>{throw g instanceof Xe?g:(this.captureException(g,{data:{__sentry__:!0},originalException:g}),new Xe(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
9
+ Reason: ${g}`))})}_process(t){this._numProcessing++,t.then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([r,n])=>{const[o,i]=r.split(":");return{reason:o,category:i,quantity:n}})}_flushOutcomes(){ue&&W.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){ue&&W.log("No outcomes to send");return}if(!this._dsn){ue&&W.log("No dsn provided, will not send outcomes");return}ue&&W.log("Sending outcomes:",t);const r=Hu(t,this._options.tunnel&&ar(this._dsn));this.sendEnvelope(r)}}function ju(e,t){const r=`${t} must return \`null\` or a valid event.`;if(kr(e))return e.then(n=>{if(!Ht(n)&&n!==null)throw new Xe(r);return n},n=>{throw new Xe(`${t} rejected with ${n}`)});if(!Ht(e)&&e!==null)throw new Xe(r);return e}function Wu(e,t,r,n){const{beforeSend:o,beforeSendTransaction:i,beforeSendSpan:s}=t;if(ji(r)&&o)return o(r,n);if(Wi(r)){if(r.spans&&s){const a=[];for(const c of r.spans){const l=s(c);l?a.push(l):(zl(),e.recordDroppedEvent("before_send","span"))}r.spans=a}if(i){if(r.spans){const a=r.spans.length;r.sdkProcessingMetadata={...r.sdkProcessingMetadata,spanCountBeforeProcessing:a}}return i(r,n)}}return r}function ji(e){return e.type===void 0}function Wi(e){return e.type==="transaction"}function Gu(e,t){t.debug===!0&&(ue?W.enable():At(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),rt().update(t.initialScope);const n=new e(t);return Zu(n),n.init(),n}function Zu(e){rt().setClient(e)}function Yu(e){const t=[];function r(){return e===void 0||t.length<e}function n(s){return t.splice(t.indexOf(s),1)[0]||Promise.resolve(void 0)}function o(s){if(!r())return Or(new Xe("Not adding Promise because buffer limit was reached."));const a=s();return t.indexOf(a)===-1&&t.push(a),a.then(()=>n(a)).then(null,()=>n(a).then(null,()=>{})),a}function i(s){return new qe((a,c)=>{let l=t.length;if(!l)return a(!0);const d=setTimeout(()=>{s&&s>0&&a(!1)},s);t.forEach(f=>{Ot(f).then(()=>{--l||(clearTimeout(d),a(!0))},c)})})}return{$:t,add:o,drain:i}}const Vu=60*1e3;function Ku(e,t=Date.now()){const r=parseInt(`${e}`,10);if(!isNaN(r))return r*1e3;const n=Date.parse(`${e}`);return isNaN(n)?Vu:n-t}function qu(e,t){return e[t]||e.all||0}function Ju(e,t,r=Date.now()){return qu(e,t)>r}function Qu(e,{statusCode:t,headers:r},n=Date.now()){const o={...e},i=r&&r["x-sentry-rate-limits"],s=r&&r["retry-after"];if(i)for(const a of i.trim().split(",")){const[c,l,,,d]=a.split(":",5),f=parseInt(c,10),_=(isNaN(f)?60:f)*1e3;if(!l)o.all=n+_;else for(const m of l.split(";"))m==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(o[m]=n+_):o[m]=n+_}else s?o.all=n+Ku(s,n):t===429&&(o.all=n+60*1e3);return o}const Xu=64;function ed(e,t,r=Yu(e.bufferSize||Xu)){let n={};const o=s=>r.drain(s);function i(s){const a=[];if(ki(s,(f,_)=>{const m=Ni(_);if(Ju(n,m)){const g=Gi(f,_);e.recordDroppedEvent("ratelimit_backoff",m,g)}else a.push(f)}),a.length===0)return Ot({});const c=cr(s[0],a),l=f=>{ki(c,(_,m)=>{const g=Gi(_,m);e.recordDroppedEvent(f,Ni(m),g)})},d=()=>t({body:ou(c)}).then(f=>(f.statusCode!==void 0&&(f.statusCode<200||f.statusCode>=300)&&ue&&W.warn(`Sentry responded with status code ${f.statusCode} to sent event.`),n=Qu(n,f),f),f=>{throw l("network_error"),f});return r.add(d).then(f=>f,f=>{if(f instanceof Xe)return ue&&W.error("Skipped sending event because buffer is full."),l("queue_overflow"),Ot({});throw f})}return{send:i,flush:o}}function Gi(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function Zi(e,t,r=[t],n="npm"){const o=e._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${t}`,packages:r.map(i=>({name:`${n}:@sentry/${i}`,version:lt})),version:lt}),e._metadata=o}const td=100;function Dt(e,t){const r=Ee(),n=Mt();if(!r)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:i=td}=r.getOptions();if(i<=0)return;const a={timestamp:sr(),...e},c=o?At(()=>o(a,t)):a;c!==null&&(r.emit&&r.emit("beforeAddBreadcrumb",c,t),n.addBreadcrumb(c,i))}let Yi;const rd="FunctionToString",Vi=new WeakMap,nd=(()=>({name:rd,setupOnce(){Yi=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=On(this),r=Vi.has(Ee())&&t!==void 0?t:this;return Yi.apply(r,e)}}catch{}},setup(e){Vi.set(e,!0)}})),od=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],id="InboundFilters",sd=((e={})=>({name:id,processEvent(t,r,n){const o=n.getOptions(),i=ad(e,o);return cd(t,i)?null:t}}));function ad(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:od],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function cd(e,t){return t.ignoreInternal&&_d(e)?(ue&&W.warn(`Event dropped due to being internal Sentry Error.
10
+ Event: ${dt(e)}`),!0):ld(e,t.ignoreErrors)?(ue&&W.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
11
+ Event: ${dt(e)}`),!0):hd(e)?(ue&&W.warn(`Event dropped due to not having an error message, error type or stacktrace.
12
+ Event: ${dt(e)}`),!0):ud(e,t.ignoreTransactions)?(ue&&W.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
13
+ Event: ${dt(e)}`),!0):dd(e,t.denyUrls)?(ue&&W.warn(`Event dropped due to being matched by \`denyUrls\` option.
14
+ Event: ${dt(e)}.
15
+ Url: ${Fr(e)}`),!0):fd(e,t.allowUrls)?!1:(ue&&W.warn(`Event dropped due to not being matched by \`allowUrls\` option.
16
+ Event: ${dt(e)}.
17
+ Url: ${Fr(e)}`),!0)}function ld(e,t){return e.type||!t||!t.length?!1:pd(e).some(r=>Nr(r,t))}function ud(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const r=e.transaction;return r?Nr(r,t):!1}function dd(e,t){if(!t||!t.length)return!1;const r=Fr(e);return r?Nr(r,t):!1}function fd(e,t){if(!t||!t.length)return!0;const r=Fr(e);return r?Nr(r,t):!0}function pd(e){const t=[];e.message&&t.push(e.message);let r;try{r=e.exception.values[e.exception.values.length-1]}catch{}return r&&r.value&&(t.push(r.value),r.type&&t.push(`${r.type}: ${r.value}`)),t}function _d(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function md(e=[]){for(let t=e.length-1;t>=0;t--){const r=e[t];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function Fr(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?md(t):null}catch{return ue&&W.error(`Cannot extract url for event ${dt(e)}`),null}}function hd(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value)}function gd(e,t,r=250,n,o,i,s){if(!i.exception||!i.exception.values||!s||!kt(s.originalException,Error))return;const a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;a&&(i.exception.values=yd(jn(e,t,o,s.originalException,n,i.exception.values,a,0),r))}function jn(e,t,r,n,o,i,s,a){if(i.length>=r+1)return i;let c=[...i];if(kt(n[o],Error)){Ki(s,a);const l=e(t,n[o]),d=c.length;qi(l,o,d,a),c=jn(e,t,r,n[o],o,[l,...c],l,d)}return Array.isArray(n.errors)&&n.errors.forEach((l,d)=>{if(kt(l,Error)){Ki(s,a);const f=e(t,l),_=c.length;qi(f,`errors[${d}]`,_,a),c=jn(e,t,r,l,o,[f,...c],f,_)}}),c}function Ki(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function qi(e,t,r,n){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:n}}function yd(e,t){return e.map(r=>(r.value&&(r.value=zt(r.value,t)),r))}function Wn(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const r=t[6]||"",n=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:r,hash:n,relative:t[5]+r+n}}function bd(e){const t="console";Tt(t,e),It(t,vd)}function vd(){"console"in ie&&En.forEach(function(e){e in ie.console&&He(ie.console,e,function(t){return Er[e]=t,function(...r){Qe("console",{args:r,level:e});const o=Er[e];o&&o.apply(ie.console,r)}})})}function Sd(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const Ed="Dedupe",Cd=(()=>{let e;return{name:Ed,processEvent(t){if(t.type)return t;try{if(Ad(t,e))return ue&&W.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}});function Ad(e,t){return t?!!(wd(e,t)||Td(e,t)):!1}function wd(e,t){const r=e.message,n=t.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!Qi(e,t)||!Ji(e,t))}function Td(e,t){const r=Xi(t),n=Xi(e);return!(!r||!n||r.type!==n.type||r.value!==n.value||!Qi(e,t)||!Ji(e,t))}function Ji(e,t){let r=ei(e),n=ei(t);if(!r&&!n)return!0;if(r&&!n||!r&&n||(r=r,n=n,n.length!==r.length))return!1;for(let o=0;o<n.length;o++){const i=n[o],s=r[o];if(i.filename!==s.filename||i.lineno!==s.lineno||i.colno!==s.colno||i.function!==s.function)return!1}return!0}function Qi(e,t){let r=e.fingerprint,n=t.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;r=r,n=n;try{return r.join("")===n.join("")}catch{return!1}}function Xi(e){return e.exception&&e.exception.values&&e.exception.values[0]}function es(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const Gn=ie;function ts(){if(!("fetch"in Gn))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Zn(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Id(){if(typeof EdgeRuntime=="string")return!0;if(!ts())return!1;if(Zn(Gn.fetch))return!0;let e=!1;const t=Gn.document;if(t&&typeof t.createElement=="function")try{const r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(e=Zn(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){Ct&&W.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function kd(e,t){const r="fetch";Tt(r,e),It(r,()=>Nd(void 0,t))}function Nd(e,t=!1){t&&!Id()||He(ie,"fetch",function(r){return function(...n){const o=new Error,{method:i,url:s}=Od(n),a={args:n,fetchData:{method:i,url:s},startTimestamp:it()*1e3,virtualError:o};return Qe("fetch",{...a}),r.apply(ie,n).then(async c=>(Qe("fetch",{...a,endTimestamp:it()*1e3,response:c}),c),c=>{throw Qe("fetch",{...a,endTimestamp:it()*1e3,error:c}),Tr(c)&&c.stack===void 0&&(c.stack=o.stack,Nt(c,"framesToPop",1)),c})}})}function Yn(e,t){return!!e&&typeof e=="object"&&!!e[t]}function rs(e){return typeof e=="string"?e:e?Yn(e,"url")?e.url:e.toString?e.toString():"":""}function Od(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[r,n]=e;return{url:rs(r),method:Yn(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:rs(t),method:Yn(t,"method")?String(t.method).toUpperCase():"GET"}}function Md(){return"npm"}const $r=ie;function Dd(){const e=$r.chrome,t=e&&e.app&&e.app.runtime,r="history"in $r&&!!$r.history.pushState&&!!$r.history.replaceState;return!t&&r}const re=ie;let Vn=0;function ns(){return Vn>0}function Pd(){Vn++,setTimeout(()=>{Vn--})}function Zt(e,t={}){function r(o){return typeof o=="function"}if(!r(e))return e;try{const o=e.__sentry_wrapped__;if(o)return typeof o=="function"?o:e;if(On(e))return e}catch{return e}const n=function(...o){try{const i=o.map(s=>Zt(s,t));return e.apply(this,i)}catch(i){throw Pd(),$n(s=>{s.addEventProcessor(a=>(t.mechanism&&(Dn(a,void 0),jt(a,t.mechanism)),a.extra={...a.extra,arguments:o},a)),xr(i)}),i}};try{for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}catch{}ci(n,e),Nt(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return e.name}})}catch{}return n}const pt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Kn(e,t){const r=Jn(e,t),n={type:Bd(t),value:Rd(t)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function Ld(e,t,r,n){const o=Ee(),i=o&&o.getOptions().normalizeDepth,s=Wd(t),a={__serialized__:Ii(t,i)};if(s)return{exception:{values:[Kn(e,s)]},extra:a};const c={exception:{values:[{type:Ir(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:zd(t,{isUnhandledRejection:n})}]},extra:a};if(r){const l=Jn(e,r);l.length&&(c.exception.values[0].stacktrace={frames:l})}return c}function qn(e,t){return{exception:{values:[Kn(e,t)]}}}function Jn(e,t){const r=t.stacktrace||t.stack||"",n=Fd(t),o=$d(t);try{return e(r,n,o)}catch{}return[]}const xd=/Minified React error #\d+;/i;function Fd(e){return e&&xd.test(e.message)?1:0}function $d(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function os(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Bd(e){const t=e&&e.name;return!t&&os(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function Rd(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:os(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:"No error message"}function Ud(e,t,r,n){const o=r&&r.syntheticException||void 0,i=Qn(e,t,o,n);return jt(i),i.level="error",r&&r.event_id&&(i.event_id=r.event_id),Ot(i)}function Hd(e,t,r="info",n,o){const i=n&&n.syntheticException||void 0,s=Xn(e,t,i,o);return s.level=r,n&&n.event_id&&(s.event_id=n.event_id),Ot(s)}function Qn(e,t,r,n,o){let i;if(ni(t)&&t.error)return qn(e,t.error);if(oi(t)||Qc(t)){const s=t;if("stack"in t)i=qn(e,t);else{const a=s.name||(oi(s)?"DOMError":"DOMException"),c=s.message?`${a}: ${s.message}`:a;i=Xn(e,c,r,n),Dn(i,c)}return"code"in s&&(i.tags={...i.tags,"DOMException.code":`${s.code}`}),i}return Tr(t)?qn(e,t):Ht(t)||Ir(t)?(i=Ld(e,t,r,o),jt(i,{synthetic:!0}),i):(i=Xn(e,t,r,n),Dn(i,`${t}`),jt(i,{synthetic:!0}),i)}function Xn(e,t,r,n){const o={};if(n&&r){const i=Jn(e,r);i.length&&(o.exception={values:[{value:t,stacktrace:{frames:i}}]}),jt(o,{synthetic:!0})}if(In(t)){const{__sentry_template_string__:i,__sentry_template_values__:s}=t;return o.logentry={message:i,params:s},o}return o.message=t,o}function zd(e,{isUnhandledRejection:t}){const r=al(e),n=t?"promise rejection":"exception";return ni(e)?`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``:Ir(e)?`Event \`${jd(e)}\` (type=${e.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function jd(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Wd(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const r=e[t];if(r instanceof Error)return r}}function Gd(e,{metadata:t,tunnel:r,dsn:n}){const o={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!r&&!!n&&{dsn:ar(n)}},i=Zd(e);return cr(o,[i])}function Zd(e){return[{type:"user_report"},e]}class Yd extends zu{constructor(t){const r={parentSpanIsAlwaysRootSpan:!0,...t},n=re.SENTRY_SDK_SOURCE||Md();Zi(r,"browser",["browser"],n),super(r),r.sendClientReports&&re.document&&re.document.addEventListener("visibilitychange",()=>{re.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,r){return Ud(this._options.stackParser,t,r,this._options.attachStacktrace)}eventFromMessage(t,r="info",n){return Hd(this._options.stackParser,t,r,n,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){pt&&W.warn("SDK not enabled, will not capture user feedback.");return}const r=Gd(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(r)}_prepareEvent(t,r,n){return t.platform=t.platform||"javascript",super._prepareEvent(t,r,n)}}const Vd=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Le=ie,Kd=1e3;let is,eo,to;function qd(e){Tt("dom",e),It("dom",Jd)}function Jd(){if(!Le.document)return;const e=Qe.bind(null,"dom"),t=ss(e,!0);Le.document.addEventListener("click",t,!1),Le.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(r=>{const o=Le[r],i=o&&o.prototype;!i||!i.hasOwnProperty||!i.hasOwnProperty("addEventListener")||(He(i,"addEventListener",function(s){return function(a,c,l){if(a==="click"||a=="keypress")try{const d=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},f=d[a]=d[a]||{refCount:0};if(!f.handler){const _=ss(e);f.handler=_,s.call(this,a,_,l)}f.refCount++}catch{}return s.call(this,a,c,l)}}),He(i,"removeEventListener",function(s){return function(a,c,l){if(a==="click"||a=="keypress")try{const d=this.__sentry_instrumentation_handlers__||{},f=d[a];f&&(f.refCount--,f.refCount<=0&&(s.call(this,a,f.handler,l),f.handler=void 0,delete d[a]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return s.call(this,a,c,l)}}))})}function Qd(e){if(e.type!==eo)return!1;try{if(!e.target||e.target._sentryId!==to)return!1}catch{}return!0}function Xd(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function ss(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;const n=ef(r);if(Xd(r.type,n))return;Nt(r,"_sentryCaptured",!0),n&&!n._sentryId&&Nt(n,"_sentryId",Ke());const o=r.type==="keypress"?"input":r.type;Qd(r)||(e({event:r,name:o,global:t}),eo=r.type,to=n?n._sentryId:void 0),clearTimeout(is),is=Le.setTimeout(()=>{to=void 0,eo=void 0},Kd)}}function ef(e){try{return e.target}catch{return null}}let Br;function as(e){const t="history";Tt(t,e),It(t,tf)}function tf(){if(!Dd())return;const e=Le.onpopstate;Le.onpopstate=function(...r){const n=Le.location.href,o=Br;if(Br=n,Qe("history",{from:o,to:n}),e)try{return e.apply(this,r)}catch{}};function t(r){return function(...n){const o=n.length>2?n[2]:void 0;if(o){const i=Br,s=String(o);Br=s,Qe("history",{from:i,to:s})}return r.apply(this,n)}}He(Le.history,"pushState",t),He(Le.history,"replaceState",t)}const Rr={};function rf(e){const t=Rr[e];if(t)return t;let r=Le[e];if(Zn(r))return Rr[e]=r.bind(Le);const n=Le.document;if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const i=o.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(o)}catch(o){Vd&&W.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return r&&(Rr[e]=r.bind(Le))}function cs(e){Rr[e]=void 0}const lr="__sentry_xhr_v3__";function nf(e){Tt("xhr",e),It("xhr",of)}function of(){if(!Le.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,r,n){const o=new Error,i=it()*1e3,s=ot(n[0])?n[0].toUpperCase():void 0,a=sf(n[1]);if(!s||!a)return t.apply(r,n);r[lr]={method:s,url:a,request_headers:{}},s==="POST"&&a.match(/sentry_key/)&&(r.__sentry_own_request__=!0);const c=()=>{const l=r[lr];if(l&&r.readyState===4){try{l.status_code=r.status}catch{}const d={endTimestamp:it()*1e3,startTimestamp:i,xhr:r,virtualError:o};Qe("xhr",d)}};return"onreadystatechange"in r&&typeof r.onreadystatechange=="function"?r.onreadystatechange=new Proxy(r.onreadystatechange,{apply(l,d,f){return c(),l.apply(d,f)}}):r.addEventListener("readystatechange",c),r.setRequestHeader=new Proxy(r.setRequestHeader,{apply(l,d,f){const[_,m]=f,g=d[lr];return g&&ot(_)&&ot(m)&&(g.request_headers[_.toLowerCase()]=m),l.apply(d,f)}}),t.apply(r,n)}}),e.send=new Proxy(e.send,{apply(t,r,n){const o=r[lr];if(!o)return t.apply(r,n);n[0]!==void 0&&(o.body=n[0]);const i={startTimestamp:it()*1e3,xhr:r};return Qe("xhr",i),t.apply(r,n)}})}function sf(e){if(ot(e))return e;try{return e.toString()}catch{}}function af(e,t=rf("fetch")){let r=0,n=0;function o(i){const s=i.body.length;r+=s,n++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:r<=6e4&&n<15,...e.fetchOptions};if(!t)return cs("fetch"),Or("No fetch implementation available");try{return t(e.url,a).then(c=>(r-=s,n--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return cs("fetch"),r-=s,n--,Or(c)}}return ed(e,o)}const cf=30,lf=50;function ro(e,t,r,n){const o={filename:e,function:t==="<anonymous>"?wt:t,in_app:!0};return r!==void 0&&(o.lineno=r),n!==void 0&&(o.colno=n),o}const uf=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,df=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ff=/\((\S*)(?::(\d+))(?::(\d+))\)/,pf=[cf,e=>{const t=uf.exec(e);if(t){const[,n,o,i]=t;return ro(n,wt,+o,+i)}const r=df.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){const s=ff.exec(r[2]);s&&(r[2]=s[1],r[3]=s[2],r[4]=s[3])}const[o,i]=ls(r[1]||wt,r[2]);return ro(i,o,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],_f=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,mf=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,hf=Xo(...[pf,[lf,e=>{const t=_f.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=mf.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let n=t[3],o=t[1]||wt;return[o,n]=ls(o,n),ro(n,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),ls=(e,t)=>{const r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:wt,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Ur=1024,gf="Breadcrumbs",yf=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:gf,setup(r){t.console&&bd(Sf(r)),t.dom&&qd(vf(r,t.dom)),t.xhr&&nf(Ef(r)),t.fetch&&kd(Cf(r)),t.history&&as(Af(r)),t.sentry&&r.on("beforeSendEvent",bf(r))}}});function bf(e){return function(r){Ee()===e&&Dt({category:`sentry.${r.type==="transaction"?"transaction":"event"}`,event_id:r.event_id,level:r.level,message:dt(r)},{event:r})}}function vf(e,t){return function(n){if(Ee()!==e)return;let o,i,s=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Ur&&(pt&&W.warn(`\`dom.maxStringLength\` cannot exceed ${Ur}, but a value of ${a} was configured. Sentry will use ${Ur} instead.`),a=Ur),typeof s=="string"&&(s=[s]);try{const l=n.event,d=wf(l)?l.target:l;o=si(d,{keyAttrs:s,maxStringLength:a}),i=il(d)}catch{o="<unknown>"}if(o.length===0)return;const c={category:`ui.${n.name}`,message:o};i&&(c.data={"ui.component_name":i}),Dt(c,{event:n.event,name:n.name,global:n.global})}}function Sf(e){return function(r){if(Ee()!==e)return;const n={category:"console",data:{arguments:r.args,logger:"console"},level:Sd(r.level),message:ai(r.args," ")};if(r.level==="assert")if(r.args[0]===!1)n.message=`Assertion failed: ${ai(r.args.slice(1)," ")||"console.assert"}`,n.data.arguments=r.args.slice(1);else return;Dt(n,{input:r.args,level:r.level})}}function Ef(e){return function(r){if(Ee()!==e)return;const{startTimestamp:n,endTimestamp:o}=r,i=r.xhr[lr];if(!n||!o||!i)return;const{method:s,url:a,status_code:c,body:l}=i,d={method:s,url:a,status_code:c},f={xhr:r.xhr,input:l,startTimestamp:n,endTimestamp:o},_=es(c);Dt({category:"xhr",data:d,type:"http",level:_},f)}}function Cf(e){return function(r){if(Ee()!==e)return;const{startTimestamp:n,endTimestamp:o}=r;if(o&&!(r.fetchData.url.match(/sentry_key/)&&r.fetchData.method==="POST"))if(r.error){const i=r.fetchData,s={data:r.error,input:r.args,startTimestamp:n,endTimestamp:o};Dt({category:"fetch",data:i,level:"error",type:"http"},s)}else{const i=r.response,s={...r.fetchData,status_code:i&&i.status},a={input:r.args,response:i,startTimestamp:n,endTimestamp:o},c=es(s.status_code);Dt({category:"fetch",data:s,type:"http",level:c},a)}}}function Af(e){return function(r){if(Ee()!==e)return;let n=r.from,o=r.to;const i=Wn(re.location.href);let s=n?Wn(n):void 0;const a=Wn(o);(!s||!s.path)&&(s=i),i.protocol===a.protocol&&i.host===a.host&&(o=a.relative),i.protocol===s.protocol&&i.host===s.host&&(n=s.relative),Dt({category:"navigation",data:{from:n,to:o}})}}function wf(e){return!!e&&!!e.target}const Tf=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],If="BrowserApiErrors",kf=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:If,setupOnce(){t.setTimeout&&He(re,"setTimeout",us),t.setInterval&&He(re,"setInterval",us),t.requestAnimationFrame&&He(re,"requestAnimationFrame",Nf),t.XMLHttpRequest&&"XMLHttpRequest"in re&&He(XMLHttpRequest.prototype,"send",Of);const r=t.eventTarget;r&&(Array.isArray(r)?r:Tf).forEach(Mf)}}});function us(e){return function(...t){const r=t[0];return t[0]=Zt(r,{mechanism:{data:{function:ut(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Nf(e){return function(t){return e.apply(this,[Zt(t,{mechanism:{data:{function:"requestAnimationFrame",handler:ut(e)},handled:!1,type:"instrument"}})])}}function Of(e){return function(...t){const r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in r&&typeof r[o]=="function"&&He(r,o,function(i){const s={mechanism:{data:{function:o,handler:ut(i)},handled:!1,type:"instrument"}},a=On(i);return a&&(s.mechanism.data.handler=ut(a)),Zt(i,s)})}),e.apply(this,t)}}function Mf(e){const r=re[e],n=r&&r.prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(He(n,"addEventListener",function(o){return function(i,s,a){try{Df(s)&&(s.handleEvent=Zt(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ut(s),target:e},handled:!1,type:"instrument"}}))}catch{}return o.apply(this,[i,Zt(s,{mechanism:{data:{function:"addEventListener",handler:ut(s),target:e},handled:!1,type:"instrument"}}),a])}}),He(n,"removeEventListener",function(o){return function(i,s,a){try{const c=s.__sentry_wrapped__;c&&o.call(this,i,c,a)}catch{}return o.call(this,i,s,a)}}))}function Df(e){return typeof e.handleEvent=="function"}const Pf=()=>({name:"BrowserSession",setupOnce(){if(typeof re.document>"u"){pt&&W.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Li({ignoreDuration:!0}),$i(),as(({from:e,to:t})=>{e!==void 0&&e!==t&&(Li({ignoreDuration:!0}),$i())})}}),Lf="GlobalHandlers",xf=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:Lf,setupOnce(){Error.stackTraceLimit=50},setup(r){t.onerror&&(Ff(r),ds("onerror")),t.onunhandledrejection&&($f(r),ds("onunhandledrejection"))}}});function Ff(e){Vc(t=>{const{stackParser:r,attachStacktrace:n}=fs();if(Ee()!==e||ns())return;const{msg:o,url:i,line:s,column:a,error:c}=t,l=Uf(Qn(r,c||o,void 0,n,!1),i,s,a);l.level="error",Pi(l,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function $f(e){qc(t=>{const{stackParser:r,attachStacktrace:n}=fs();if(Ee()!==e||ns())return;const o=Bf(t),i=kn(o)?Rf(o):Qn(r,o,void 0,n,!0);i.level="error",Pi(i,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Bf(e){if(kn(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function Rf(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Uf(e,t,r,n){const o=e.exception=e.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[],l=n,d=r,f=ot(t)&&t.length>0?t:ol();return c.length===0&&c.push({colno:l,filename:f,function:wt,in_app:!0,lineno:d}),e}function ds(e){pt&&W.log(`Global Handler attached: ${e}`)}function fs(){const e=Ee();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Hf=()=>({name:"HttpContext",preprocessEvent(e){if(!re.navigator&&!re.location&&!re.document)return;const t=e.request&&e.request.url||re.location&&re.location.href,{referrer:r}=re.document||{},{userAgent:n}=re.navigator||{},o={...e.request&&e.request.headers,...r&&{Referer:r},...n&&{"User-Agent":n}},i={...e.request,...t&&{url:t},headers:o};e.request=i}}),zf="cause",jf=5,Wf="LinkedErrors",Gf=((e={})=>{const t=e.limit||jf,r=e.key||zf;return{name:Wf,preprocessEvent(n,o,i){const s=i.getOptions();gd(Kn,s.stackParser,s.maxValueLength,r,t,n,o)}}});function Zf(e){const t=[sd(),nd(),kf(),yf(),xf(),Gf(),Cd(),Hf()];return e.autoSessionTracking!==!1&&t.push(Pf()),t}function Yf(e={}){const t={defaultIntegrations:Zf(e),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:re.SENTRY_RELEASE&&re.SENTRY_RELEASE.id?re.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return e.defaultIntegrations==null&&delete e.defaultIntegrations,{...t,...e}}function Vf(){const e=typeof re.window<"u"&&re;if(!e)return!1;const t=e.chrome?"chrome":"browser",r=e[t],n=r&&r.runtime&&r.runtime.id,o=re.location&&re.location.href||"",i=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],s=!!n&&re===re.top&&i.some(c=>o.startsWith(`${c}//`)),a=typeof e.nw<"u";return!!n&&!s&&!a}function Kf(e={}){const t=Yf(e);if(!t.skipBrowserExtensionCheck&&Vf()){At(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}pt&&(ts()||W.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const r={...t,stackParser:Zc(t.stackParser||hf),integrations:Bu(t),transport:t.transport||af};return Gu(Yd,r)}function ps(e={}){if(!re.document){pt&&W.error("Global document not defined in showReportDialog call");return}const t=rt(),r=t.getClient(),n=r&&r.getDsn();if(!n){pt&&W.error("DSN not configured for showReportDialog call");return}if(t&&(e.user={...t.getUser(),...e.user}),!e.eventId){const a=Mu();a&&(e.eventId=a)}const o=re.document.createElement("script");o.async=!0,o.crossOrigin="anonymous",o.src=Fu(n,e),e.onLoad&&(o.onload=e.onLoad);const{onClose:i}=e;if(i){const a=c=>{if(c.data==="__sentry_reportdialog_closed__")try{i()}finally{re.removeEventListener("message",a)}};re.addEventListener("message",a)}const s=re.document.head||re.document.body;s?s.appendChild(o):pt&&W.error("Not injecting report dialog. No injection point found in HTML")}const qf={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",debugIntegration:"debug",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",sessionTimingIntegration:"sessiontiming",browserProfilingIntegration:"browserprofiling",moduleMetadataIntegration:"modulemetadata"},_s=re;async function Jf(e,t){const r=qf[e],n=_s.Sentry=_s.Sentry||{},o=n[e];if(typeof o=="function"&&!("_isShim"in o))return o;const i=Qf(r),s=re.document.createElement("script");s.src=i,s.crossOrigin="anonymous",s.referrerPolicy="origin";const a=new Promise((f,_)=>{s.addEventListener("load",()=>f()),s.addEventListener("error",_)}),c=re.document.currentScript,l=re.document.body||re.document.head||c&&c.parentElement;if(l)l.appendChild(s);else throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await a}catch{throw new Error(`Error when loading integration: ${e}`)}const d=n[e];if(typeof d!="function")throw new Error(`Could not load integration: ${e}`);return d}function Qf(e){const t=Ee(),r=t&&t.getOptions(),n=r&&r.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${lt}/${e}.min.js`,n).toString()}function Xf(e){const t={...e};return Zi(t,"react"),Ou("react",{version:y.version}),Kf(t)}function ep(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function tp(e,t){const r=new WeakSet;function n(o,i){if(!r.has(o)){if(o.cause)return r.add(o),n(o.cause,i);o.cause=i}}n(e,t)}function rp(e,{componentStack:t},r){if(ep(y.version)&&Tr(e)&&t){const n=new Error(e.message);n.name=`React ErrorBoundary ${e.name}`,n.stack=t,tp(e,n)}return xr(e,{...r,captureContext:{contexts:{react:{componentStack:t}}}})}var no={exports:{}},ae={};/** @license React v16.13.1
18
+ * react-is.production.min.js
19
+ *
20
+ * Copyright (c) Facebook, Inc. and its affiliates.
21
+ *
22
+ * This source code is licensed under the MIT license found in the
23
+ * LICENSE file in the root directory of this source tree.
24
+ */var ms;function np(){if(ms)return ae;ms=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,G=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,B=e?Symbol.for("react.scope"):60119;function D(E){if(typeof E=="object"&&E!==null){var j=E.$$typeof;switch(j){case t:switch(E=E.type,E){case c:case l:case n:case i:case o:case f:return E;default:switch(E=E&&E.$$typeof,E){case a:case d:case g:case m:case s:return E;default:return j}}case r:return j}}}function z(E){return D(E)===l}return ae.AsyncMode=c,ae.ConcurrentMode=l,ae.ContextConsumer=a,ae.ContextProvider=s,ae.Element=t,ae.ForwardRef=d,ae.Fragment=n,ae.Lazy=g,ae.Memo=m,ae.Portal=r,ae.Profiler=i,ae.StrictMode=o,ae.Suspense=f,ae.isAsyncMode=function(E){return z(E)||D(E)===c},ae.isConcurrentMode=z,ae.isContextConsumer=function(E){return D(E)===a},ae.isContextProvider=function(E){return D(E)===s},ae.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},ae.isForwardRef=function(E){return D(E)===d},ae.isFragment=function(E){return D(E)===n},ae.isLazy=function(E){return D(E)===g},ae.isMemo=function(E){return D(E)===m},ae.isPortal=function(E){return D(E)===r},ae.isProfiler=function(E){return D(E)===i},ae.isStrictMode=function(E){return D(E)===o},ae.isSuspense=function(E){return D(E)===f},ae.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===n||E===l||E===i||E===o||E===f||E===_||typeof E=="object"&&E!==null&&(E.$$typeof===g||E.$$typeof===m||E.$$typeof===s||E.$$typeof===a||E.$$typeof===d||E.$$typeof===G||E.$$typeof===x||E.$$typeof===B||E.$$typeof===b)},ae.typeOf=D,ae}var hs;function op(){return hs||(hs=1,no.exports=np()),no.exports}var oo,gs;function ip(){if(gs)return oo;gs=1;var e=op(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};i[e.ForwardRef]=n,i[e.Memo]=o;function s(g){return e.isMemo(g)?o:i[g.$$typeof]||t}var a=Object.defineProperty,c=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,_=Object.prototype;function m(g,b,G){if(typeof b!="string"){if(_){var x=f(b);x&&x!==_&&m(g,x,G)}var B=c(b);l&&(B=B.concat(l(b)));for(var D=s(g),z=s(b),E=0;E<B.length;++E){var j=B[E];if(!r[j]&&!(G&&G[j])&&!(z&&z[j])&&!(D&&D[j])){var K=d(b,j);try{a(g,j,K)}catch{}}}}return g}return oo=m,oo}ip();const sp=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ys={componentStack:null,error:null,eventId:null};class io extends Sn.Component{constructor(t){super(t),io.prototype.__init.call(this),this.state=ys,this._openFallbackReportDialog=!0;const r=Ee();r&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=r.on("afterSendEvent",n=>{!n.type&&this._lastEventId&&n.event_id===this._lastEventId&&ps({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,r){const{componentStack:n}=r,o=n??void 0,{beforeCapture:i,onError:s,showDialog:a,dialogOptions:c}=this.props;$n(l=>{i&&i(l,t,o);const d=this.props.handled!=null?this.props.handled:!!this.props.fallback,f=rp(t,r,{mechanism:{handled:d}});s&&s(t,o,f),a&&(this._lastEventId=f,this._openFallbackReportDialog&&ps({...c,eventId:f})),this.setState({error:t,componentStack:n,eventId:f})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:r,eventId:n}=this.state,{onUnmount:o}=this.props;o&&o(t,r,n),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}__init(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:r,componentStack:n,eventId:o}=this.state;t&&t(r,n,o),this.setState(ys)}}render(){const{fallback:t,children:r}=this.props,n=this.state;if(n.error){let o;return typeof t=="function"?o=Sn.createElement(t,{error:n.error,componentStack:n.componentStack,resetError:this.resetErrorBoundary,eventId:n.eventId}):o=t,Sn.isValidElement(o)?o:(t&&sp&&W.warn("fallback did not produce a valid ReactElement"),null)}return typeof r=="function"?r():r}}function ze({id:e,label:t,hint:r,error:n,required:o,className:i,children:s}){return u.jsxs("div",{className:i,children:[u.jsxs("label",{htmlFor:e,className:"form-label",children:[t," ",o&&u.jsx("span",{className:"text-red-600",children:"*"})]}),s,r&&!n&&u.jsx("p",{id:`${e}-hint`,className:"mt-1 text-sm text-slate-500",children:r}),n&&u.jsx("p",{id:`${e}-error`,className:"mt-1 text-sm text-red-600",children:n})]})}function so({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return u.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("input",{id:e,className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,...s,type:"text"})})}function bs(e,t){if(!e)return"";const r=parseInt(e,10);if(isNaN(r))return"";const n=r.toLocaleString("en-US");return t?`$${n}`:n}function ap({id:e,label:t,hint:r,error:n,required:o,className:i,value:s,onChange:a,onKeyDown:c,isCurrency:l=!1,maxDigits:d,...f}){const[_,m]=y.useState(""),g=y.useRef(null);y.useEffect(()=>{if(s==null||s===""){m("");return}const x=String(s).replace(/\D/g,"");m(bs(x,l))},[s,l]);const b=x=>{let B=x.target.value.replace(/\D/g,"");d!==void 0&&(B=B.slice(0,d)),m(bs(B,l));const D={...x,currentTarget:{...x.currentTarget,value:B},target:{...x.target,value:B}};a?.(D)},G=x=>{if(["-","+",".","e","E"].includes(x.key)){x.preventDefault();return}if(d!==void 0&&/^\d$/.test(x.key)&&x.currentTarget.value.replace(/\D/g,"").length>=d){x.preventDefault();return}c?.(x)};return u.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("input",{ref:g,id:e,type:"text",inputMode:"numeric",className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,value:_,onChange:b,onKeyDown:G,...f})})}function vs(e){return e.length<=3?e:e.length<=5?`${e.slice(0,3)}-${e.slice(3)}`:`${e.slice(0,3)}-${e.slice(3,5)}-${e.slice(5,9)}`}function cp({id:e,label:t,hint:r,error:n,required:o,className:i,value:s="",onChange:a,...c}){const[l,d]=y.useState(""),f=y.useRef(null);y.useEffect(()=>{const m=s.replace(/\D/g,"").slice(0,9);d(vs(m))},[s]);const _=m=>{const g=m.target.value,b=m.target.selectionStart??0,G=g.replace(/\D/g,"").slice(0,9),x=vs(G);d(x);const B={...m,currentTarget:{...m.currentTarget,value:x},target:{...m.target,value:x}};a?.(B),setTimeout(()=>{if(f.current){const D=g.slice(0,b).replace(/\D/g,"").length;let z=D;D>5?z+=2:D>3&&(z+=1),f.current.setSelectionRange(z,z)}},0)};return u.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("input",{ref:f,id:e,type:"text",inputMode:"numeric",className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,maxLength:11,placeholder:"XXX-XX-XXXX",autoComplete:"off",value:l,onChange:_,...c})})}function ao({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return u.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("input",{id:e,type:"number",className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,...s})})}function lp({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return u.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("input",{id:e,type:"email",className:`form-input ${n?"input-error":""}`,inputMode:"email",autoComplete:"email",required:o,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...s})})}function co(e){const t=e.replace(/\D/g,"");if(t.length===10)return`(${t.slice(0,3)}) ${t.slice(3,6)} - ${t.slice(6)}`;if(t.length>10){const r=t.slice(0,10);return`(${r.slice(0,3)}) ${r.slice(3,6)} - ${r.slice(6)}`}return t.length>=6?`(${t.slice(0,3)}) ${t.slice(3,6)} - ${t.slice(6)}`:t.length>=3?`(${t.slice(0,3)}) ${t.slice(3)}`:t.length>0?`(${t}`:t}function lo(e){return e.replace(/\D/g,"")}function up({id:e,label:t,hint:r,error:n,required:o,className:i,value:s="",onChange:a,...c}){const[l,d]=y.useState(""),f=y.useRef(null),_=y.useRef(0);y.useEffect(()=>{if(!s){d("");return}let g=lo(s);g.length===11&&g.startsWith("1")&&(g=g.slice(1));const b=g.slice(0,10);d(co(b))},[s]);const m=g=>{const b=g.target,G=b.value;_.current=b.selectionStart||0;const B=lo(G).slice(0,10),D=co(B);d(D);const z=B.length===10?`+1${B}`:B,E={...g,currentTarget:{...g.currentTarget,value:z},target:{...g.target,value:z}};a?.(E),setTimeout(()=>{if(f.current){const j=G.slice(0,_.current),K=lo(j),R=co(K),ee=Math.min(R.length,D.length);f.current.setSelectionRange(ee,ee)}},0)};return u.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsxs("div",{className:`tel-input-wrapper flex items-center border rounded-lg transition-colors w-full relative ${n?"border-red-500 error":"border-[var(--accent-color)] focus-within:border-[var(--primary-color)]"}`,children:[u.jsx("label",{htmlFor:e,className:"px-3 py-3 text-slate-700 font-medium border-r border-[var(--accent-color)] bg-slate-50 flex-shrink-0 relative z-0 rounded-l-lg",children:"+1"}),u.jsx("input",{ref:f,id:e,type:"tel",className:`flex-1 px-4 py-3 border-0 rounded-r-lg outline-none bg-transparent text-[var(--text-primary)] text-base ${n?"input-error":""}`,inputMode:"tel",autoComplete:"tel",required:o,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,value:l,onChange:m,...c})]})})}function dp({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return u.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("input",{id:e,type:"url",className:`form-input ${n?"input-error":""}`,inputMode:"url",autoComplete:"url",required:o,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...s})})}function fp({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return u.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("input",{id:e,type:"password",className:`form-input ${n?"input-error":""}`,autoComplete:"current-password",required:o,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...s})})}function pp({id:e,label:t,hint:r,error:n,required:o,className:i,rows:s=4,...a}){return u.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("textarea",{id:e,rows:s,className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,...a})})}function _p({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return u.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("input",{id:e,type:"date",className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,...s})})}function Hr({id:e,label:t,className:r,...n}){return u.jsxs("label",{className:`checkbox-card ${r||""}`,htmlFor:e,children:[u.jsx("input",{id:e,type:"checkbox",className:"checkbox-input",...n}),u.jsx("span",{className:"checkbox-label",children:t})]})}function mp({onChoose:e,isSubmitting:t=!1}){const[r,n]=y.useState(!1),o=!r||t;return u.jsxs("div",{className:"communications-consent","data-testid":"communications-consent",children:[u.jsx("h3",{className:"text-lg font-semibold text-text-primary mb-3",children:"Communications Consent"}),u.jsx(Hr,{id:"communications-consent-checkbox",className:"communications-consent-checkbox",checked:r,onChange:i=>n(i.target.checked),disabled:t,label:"I consent to communications from Credify Corporation (licensed insurance agency) and my selected carrier(s) at the phone number and email address I provided. This covers: support (including AI agents), carrier quote and service contact, automated rate shopping at or before renewal, policy renewal notifications, claims management, and Credify's newsletter (which we may send by email, or by text message with a link to read it)."}),u.jsxs("div",{className:"text-sm text-slate-600 mt-4 space-y-2",children:[u.jsx("p",{children:"These may use automated systems, emails or texts. Message frequency varies. Message & data rates may apply. Reply STOP to opt out of SMS; Reply HELP for help."}),u.jsx("p",{children:"Consent is not required to receive quotes or purchase insurance."}),u.jsxs("p",{children:["Credify Corporation – Texas #3309669."," ",u.jsx("a",{href:"https://getcredify.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})," ","|"," ",u.jsx("a",{href:"https://getcredify.com/terms-of-service",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Terms of Service"})]})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3 mt-6",children:[u.jsxs("button",{type:"button","data-testid":"communications-consent-accept",onClick:()=>e(!0),disabled:o,className:["form-wizard-next-btn","h-12 rounded-full text-white font-bold transition","disabled:cursor-not-allowed","flex items-center justify-center gap-2",o?"bg-slate-400":"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"].join(" "),children:[t&&u.jsxs("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:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",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"})]}),"I Consent"]}),u.jsx("button",{type:"button","data-testid":"communications-consent-decline",onClick:()=>e(!1),disabled:t,className:"credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition disabled:opacity-50 disabled:cursor-not-allowed",children:"I Do Not Consent"})]})]})}function hp({name:e,value:t,checked:r,onChange:n,children:o}){return u.jsxs("label",{className:"radio-card",children:[u.jsx("input",{className:"radio-input",type:"radio",name:e,value:t,checked:r,onChange:n}),u.jsx("span",{className:"radio-label",children:o})]})}function gp({legend:e,children:t,className:r,legendClassName:n}){return u.jsxs("fieldset",{className:r,children:[u.jsx("legend",{className:`form-label mb-4 ${n||""}`,children:e}),u.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:t})]})}function ur({id:e,label:t,hint:r,error:n,required:o,className:i,placeholder:s,options:a,children:c,...l}){const d=[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,f=!!c;return u.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsxs("select",{id:e,className:`form-input select-caret ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":d,required:o,...l,children:[s&&u.jsx("option",{value:"",disabled:!0,selected:!("value"in l),children:s}),f?c:a?.map(_=>u.jsx("option",{value:_.value,disabled:_.disabled,children:_.label},_.value))]})})}const yp="AIzaSyDjLdKLxoa-maLNGAyq_I_2r_Fe_TzFikw";function bp(){return new Promise((e,t)=>{if(window.google?.maps?.places){e();return}const r=document.querySelector('script[src*="maps.googleapis.com"]');if(r){r.addEventListener("load",()=>e()),r.addEventListener("error",()=>t(new Error("Failed to load Google Maps script")));return}const n=document.createElement("script");n.src=`https://maps.googleapis.com/maps/api/js?key=${yp}&libraries=places`,n.async=!0,n.defer=!0,n.onload=()=>e(),n.onerror=()=>t(new Error("Failed to load Google Maps script")),document.head.appendChild(n)})}function vp(e){const t={fullAddress:e.formatted_address};return e.address_components&&e.address_components.forEach(r=>{const n=r.types;n.includes("street_number")&&(t.streetNumber=r.long_name),n.includes("route")&&(t.streetName=r.long_name),n.includes("locality")&&(t.city=r.long_name),n.includes("administrative_area_level_1")&&(t.state=r.short_name),n.includes("postal_code")&&(t.zipCode=r.long_name),n.includes("country")&&(t.country=r.short_name)}),t}function Sp({id:e,label:t,hint:r,error:n,required:o,className:i,onChange:s,onPlaceSelect:a,value:c,...l}){const d=y.useRef(null),f=y.useRef(null),_=y.useRef(null),m=y.useRef(null),[g,b]=y.useState(!0),[G,x]=y.useState(c||""),[B,D]=y.useState([]),[z,E]=y.useState(!1),[j,K]=y.useState(-1),R=y.useRef([]),ee=y.useRef(!1),te=y.useRef(-1);y.useEffect(()=>{R.current=B},[B]),y.useEffect(()=>{ee.current=z},[z]),y.useEffect(()=>{te.current=j},[j]),y.useEffect(()=>{c!==void 0&&x(String(c))},[c]);const ce=y.useRef(null);y.useEffect(()=>{if(!d.current)return;let Q=!0;return bp().then(()=>{!Q||!d.current||(f.current=new google.maps.places.AutocompleteService,_.current=new google.maps.places.PlacesService(document.createElement("div")),b(!1))}).catch(O=>{console.error("Error loading Google Maps:",O),b(!1)}),()=>{Q=!1,ce.current&&clearTimeout(ce.current)}},[]);const Se=Q=>{const O=Q.target.value;if(x(O),s?.(O),ce.current&&clearTimeout(ce.current),O.length<3){D([]),E(!1);return}ce.current=setTimeout(()=>{f.current&&f.current.getPlacePredictions({input:O,types:["address"]},(T,V)=>{V===google.maps.places.PlacesServiceStatus.OK&&T?(D(T),E(!0),K(-1)):(D([]),E(!1))})},300)},De=Q=>{if(!ee.current||R.current.length===0){Q.key==="Escape"&&(E(!1),ee.current=!1);return}switch(Q.key){case"ArrowDown":Q.preventDefault(),K(O=>{const T=O<R.current.length-1?O+1:O;return te.current=T,T});break;case"ArrowUp":Q.preventDefault(),K(O=>{const T=O>0?O-1:-1;return te.current=T,T});break;case"Enter":Q.preventDefault(),te.current>=0&&te.current<R.current.length&&Re(R.current[te.current]);break;case"Escape":Q.preventDefault(),E(!1),ee.current=!1;break}};y.useEffect(()=>{const Q=O=>{m.current&&!m.current.contains(O.target)&&d.current&&!d.current.contains(O.target)&&(E(!1),ee.current=!1)};if(z)return document.addEventListener("mousedown",Q),()=>{document.removeEventListener("mousedown",Q)}},[z]);const Re=Q=>{_.current&&_.current.getDetails({placeId:Q.place_id,fields:["address_components","formatted_address","geometry"]},(O,T)=>{if(T===google.maps.places.PlacesServiceStatus.OK&&O){const V=O.formatted_address||"";x(V),E(!1),D([]),ee.current=!1;const X=vp(O);s?.(V,X),a?.(O)}})};return u.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsxs("div",{className:"relative",children:[u.jsx("input",{ref:d,id:e,type:"text",className:`form-input ${n?"input-error":""}`,value:G,onChange:Se,onKeyDown:De,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,autoComplete:"street-address",placeholder:l.placeholder||"Enter an address",disabled:g||l.disabled,...l}),g&&u.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"Loading address suggestions..."}),z&&B.length>0&&u.jsx("div",{ref:m,className:"absolute z-50 w-full mt-1 bg-white border border-slate-200 rounded-lg shadow-lg max-h-60 overflow-y-auto",role:"listbox",children:B.map((Q,O)=>u.jsxs("div",{className:`px-4 py-3 cursor-pointer transition-colors ${O===j?"bg-blue-50 text-slate-900":"bg-white text-slate-900 hover:bg-slate-50"} ${O<B.length-1?"border-b border-slate-100":""}`,role:"option","aria-selected":O===j,onClick:()=>Re(Q),onMouseEnter:()=>K(O),children:[u.jsx("div",{className:"font-medium text-slate-900",children:Q.structured_formatting.main_text}),Q.structured_formatting.secondary_text&&u.jsx("div",{className:"text-sm text-slate-500 mt-0.5",children:Q.structured_formatting.secondary_text})]},Q.place_id))})]})})}function uo(e){const t=(r,n)=>r.map((o,i)=>{const s=n.length?n.join("__"):"root",a=o.key??`${s}__q${i}_${String(o.question).slice(0,24).replace(/\W+/g,"-")||"field"}`,l=(o.conditionals??[]).map((d,f)=>{const _=d.conditionalQuestions?t(d.conditionalQuestions,[...n,`${a}__c${f}`]):void 0;return{...d,conditionalQuestions:_}});return{...o,key:a,conditionals:l}});return t(e,[])}function v(e,t,r){function n(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);const l=s.prototype,d=Object.keys(l);for(let f=0;f<d.length;f++){const _=d[f];_ in a||(a[_]=l[_].bind(a))}}const o=r?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(a){var c;const l=r?.Parent?new i:this;n(l,a),(c=l._zod).deferred??(c.deferred=[]);for(const d of l._zod.deferred)d();return l}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}class Yt extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Ss extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Es={};function Pt(e){return Es}function Cs(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function fo(e,t){return typeof t=="bigint"?t.toString():t}function po(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function _o(e){return e==null}function mo(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Ep(e,t){const r=(e.toString().split(".")[1]||"").length,n=t.toString();let o=(n.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(n)){const c=n.match(/\d?e-(\d?)/);c?.[1]&&(o=Number.parseInt(c[1]))}const i=r>o?r:o,s=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return s%a/10**i}const As=Symbol("evaluating");function le(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==As)return n===void 0&&(n=As,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Lt(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function _t(...e){const t={};for(const r of e){const n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function ws(e){return JSON.stringify(e)}function Cp(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ts="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function zr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Ap=po(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function dr(e){if(zr(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(zr(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Is(e){return dr(e)?{...e}:Array.isArray(e)?[...e]:e}const wp=new Set(["string","number","symbol"]);function Vt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function mt(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function U(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Tp(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Ip={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function kp(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=_t(e._zod.def,{get shape(){const s={};for(const a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(s[a]=r.shape[a])}return Lt(this,"shape",s),s},checks:[]});return mt(e,i)}function Np(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=_t(e._zod.def,{get shape(){const s={...e._zod.def.shape};for(const a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete s[a]}return Lt(this,"shape",s),s},checks:[]});return mt(e,i)}function Op(e,t){if(!dr(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const i=e._zod.def.shape;for(const s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=_t(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Lt(this,"shape",i),i}});return mt(e,o)}function Mp(e,t){if(!dr(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=_t(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Lt(this,"shape",n),n}});return mt(e,r)}function Dp(e,t){const r=_t(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return Lt(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return mt(e,r)}function Pp(e,t,r){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const s=_t(t._zod.def,{get shape(){const a=t._zod.def.shape,c={...a};if(r)for(const l in r){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(c[l]=e?new e({type:"optional",innerType:a[l]}):a[l])}else for(const l in a)c[l]=e?new e({type:"optional",innerType:a[l]}):a[l];return Lt(this,"shape",c),c},checks:[]});return mt(t,s)}function Lp(e,t,r){const n=_t(t._zod.def,{get shape(){const o=t._zod.def.shape,i={...o};if(r)for(const s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=new e({type:"nonoptional",innerType:o[s]}))}else for(const s in o)i[s]=new e({type:"nonoptional",innerType:o[s]});return Lt(this,"shape",i),i}});return mt(t,n)}function Kt(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function ks(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function jr(e){return typeof e=="string"?e:e?.message}function xt(e,t,r){const n={...e,path:e.path??[]};if(!e.message){const o=jr(e.inst?._zod.def?.error?.(e))??jr(t?.error?.(e))??jr(r.customError?.(e))??jr(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function ho(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function fr(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}const Ns=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,fo,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Os=v("$ZodError",Ns),Ms=v("$ZodError",Ns,{Parent:Error});function xp(e,t=r=>r.message){const r={},n=[];for(const o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}function Fp(e,t=r=>r.message){const r={_errors:[]},n=o=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>n({issues:s}));else if(i.code==="invalid_key")n({issues:i.issues});else if(i.code==="invalid_element")n({issues:i.issues});else if(i.path.length===0)r._errors.push(t(i));else{let s=r,a=0;for(;a<i.path.length;){const c=i.path[a];a===i.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(t(i))):s[c]=s[c]||{_errors:[]},s=s[c],a++}}};return n(e),r}const go=e=>(t,r,n,o)=>{const i=n?Object.assign(n,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new Yt;if(s.issues.length){const a=new(o?.Err??e)(s.issues.map(c=>xt(c,i,Pt())));throw Ts(a,o?.callee),a}return s.value},yo=e=>async(t,r,n,o)=>{const i=n?Object.assign(n,{async:!0}):{async:!0};let s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){const a=new(o?.Err??e)(s.issues.map(c=>xt(c,i,Pt())));throw Ts(a,o?.callee),a}return s.value},Wr=e=>(t,r,n)=>{const o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new Yt;return i.issues.length?{success:!1,error:new(e??Os)(i.issues.map(s=>xt(s,o,Pt())))}:{success:!0,data:i.value}},$p=Wr(Ms),Gr=e=>async(t,r,n)=>{const o=n?Object.assign(n,{async:!0}):{async:!0};let i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>xt(s,o,Pt())))}:{success:!0,data:i.value}},Bp=Gr(Ms),Rp=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return go(e)(t,r,o)},Up=e=>(t,r,n)=>go(e)(t,r,n),Hp=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return yo(e)(t,r,o)},zp=e=>async(t,r,n)=>yo(e)(t,r,n),jp=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Wr(e)(t,r,o)},Wp=e=>(t,r,n)=>Wr(e)(t,r,n),Gp=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Gr(e)(t,r,o)},Zp=e=>async(t,r,n)=>Gr(e)(t,r,n),Yp=/^[cC][^\s-]{8,}$/,Vp=/^[0-9a-z]+$/,Kp=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,qp=/^[0-9a-vA-V]{20}$/,Jp=/^[A-Za-z0-9]{27}$/,Qp=/^[a-zA-Z0-9_-]{21}$/,Xp=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,e_=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ds=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,t_=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,r_="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function n_(){return new RegExp(r_,"u")}const o_=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,i_=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,s_=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,a_=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,c_=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ps=/^[A-Za-z0-9_-]*$/,l_=/^\+[1-9]\d{6,14}$/,Ls="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",u_=new RegExp(`^${Ls}$`);function xs(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function d_(e){return new RegExp(`^${xs(e)}$`)}function f_(e){const t=xs({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${Ls}T(?:${n})$`)}const p_=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},__=/^-?\d+$/,m_=/^-?\d+(?:\.\d+)?$/,h_=/^(?:true|false)$/i,g_=/^[^A-Z]*$/,y_=/^[^a-z]*$/,Fe=v("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Fs={number:"number",bigint:"bigint",object:"date"},$s=v("$ZodCheckLessThan",(e,t)=>{Fe.init(e,t);const r=Fs[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,i=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Bs=v("$ZodCheckGreaterThan",(e,t)=>{Fe.init(e,t);const r=Fs[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),b_=v("$ZodCheckMultipleOf",(e,t)=>{Fe.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Ep(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),v_=v("$ZodCheckNumberFormat",(e,t)=>{Fe.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[o,i]=Ip[t.format];e._zod.onattach.push(s=>{const a=s._zod.bag;a.format=t.format,a.minimum=o,a.maximum=i,r&&(a.pattern=__)}),e._zod.check=s=>{const a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}a<o&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),S_=v("$ZodCheckMaxLength",(e,t)=>{var r;Fe.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!_o(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const o=n.value;if(o.length<=t.maximum)return;const s=ho(o);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),E_=v("$ZodCheckMinLength",(e,t)=>{var r;Fe.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!_o(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const o=n.value;if(o.length>=t.minimum)return;const s=ho(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),C_=v("$ZodCheckLengthEquals",(e,t)=>{var r;Fe.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!_o(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=n=>{const o=n.value,i=o.length;if(i===t.length)return;const s=ho(o),a=i>t.length;n.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Zr=v("$ZodCheckStringFormat",(e,t)=>{var r,n;Fe.init(e,t),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),A_=v("$ZodCheckRegex",(e,t)=>{Zr.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),w_=v("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=g_),Zr.init(e,t)}),T_=v("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=y_),Zr.init(e,t)}),I_=v("$ZodCheckIncludes",(e,t)=>{Fe.init(e,t);const r=Vt(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),k_=v("$ZodCheckStartsWith",(e,t)=>{Fe.init(e,t);const r=new RegExp(`^${Vt(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),N_=v("$ZodCheckEndsWith",(e,t)=>{Fe.init(e,t);const r=new RegExp(`.*${Vt(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),O_=v("$ZodCheckOverwrite",(e,t)=>{Fe.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class M_{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(`
25
+ `).filter(s=>s),o=Math.min(...n.map(s=>s.length-s.trimStart().length)),i=n.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(const s of i)this.content.push(s)}compile(){const t=Function,r=this?.args,o=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,o.join(`
26
+ `))}}const D_={major:4,minor:3,patch:6},ge=v("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=D_;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const o of n)for(const i of o._zod.onattach)i(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(s,a,c)=>{let l=Kt(s),d;for(const f of a){if(f._zod.def.when){if(!f._zod.def.when(s))continue}else if(l)continue;const _=s.issues.length,m=f._zod.check(s);if(m instanceof Promise&&c?.async===!1)throw new Yt;if(d||m instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await m,s.issues.length!==_&&(l||(l=Kt(s,_)))});else{if(s.issues.length===_)continue;l||(l=Kt(s,_))}}return d?d.then(()=>s):s},i=(s,a,c)=>{if(Kt(s))return s.aborted=!0,s;const l=o(a,n,c);if(l instanceof Promise){if(c.async===!1)throw new Yt;return l.then(d=>e._zod.parse(d,c))}return e._zod.parse(l,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){const l=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return l instanceof Promise?l.then(d=>i(d,s,a)):i(l,s,a)}const c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new Yt;return c.then(l=>o(l,n,a))}return o(c,n,a)}}le(e,"~standard",()=>({validate:o=>{try{const i=$p(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Bp(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),bo=v("$ZodString",(e,t)=>{ge.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??p_(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),_e=v("$ZodStringFormat",(e,t)=>{Zr.init(e,t),bo.init(e,t)}),P_=v("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=e_),_e.init(e,t)}),L_=v("$ZodUUID",(e,t)=>{if(t.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ds(n))}else t.pattern??(t.pattern=Ds());_e.init(e,t)}),x_=v("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=t_),_e.init(e,t)}),F_=v("$ZodURL",(e,t)=>{_e.init(e,t),e._zod.check=r=>{try{const n=r.value.trim(),o=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),$_=v("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=n_()),_e.init(e,t)}),B_=v("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Qp),_e.init(e,t)}),R_=v("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Yp),_e.init(e,t)}),U_=v("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Vp),_e.init(e,t)}),H_=v("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Kp),_e.init(e,t)}),z_=v("$ZodXID",(e,t)=>{t.pattern??(t.pattern=qp),_e.init(e,t)}),j_=v("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Jp),_e.init(e,t)}),W_=v("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=f_(t)),_e.init(e,t)}),G_=v("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=u_),_e.init(e,t)}),Z_=v("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=d_(t)),_e.init(e,t)}),Y_=v("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Xp),_e.init(e,t)}),V_=v("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=o_),_e.init(e,t),e._zod.bag.format="ipv4"}),K_=v("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=i_),_e.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),q_=v("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=s_),_e.init(e,t)}),J_=v("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=a_),_e.init(e,t),e._zod.check=r=>{const n=r.value.split("/");try{if(n.length!==2)throw new Error;const[o,i]=n;if(!i)throw new Error;const s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${o}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Rs(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Q_=v("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=c_),_e.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Rs(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function X_(e){if(!Ps.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Rs(r)}const em=v("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ps),_e.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{X_(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),tm=v("$ZodE164",(e,t)=>{t.pattern??(t.pattern=l_),_e.init(e,t)});function rm(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const nm=v("$ZodJWT",(e,t)=>{_e.init(e,t),e._zod.check=r=>{rm(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Us=v("$ZodNumber",(e,t)=>{ge.init(e,t),e._zod.pattern=e._zod.bag.pattern??m_,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;const i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),r}}),om=v("$ZodNumberFormat",(e,t)=>{v_.init(e,t),Us.init(e,t)}),im=v("$ZodBoolean",(e,t)=>{ge.init(e,t),e._zod.pattern=h_,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}const o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),sm=v("$ZodUnknown",(e,t)=>{ge.init(e,t),e._zod.parse=r=>r}),am=v("$ZodNever",(e,t)=>{ge.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function Hs(e,t,r){e.issues.length&&t.issues.push(...ks(r,e.issues)),t.value[r]=e.value}const cm=v("$ZodArray",(e,t)=>{ge.init(e,t),e._zod.parse=(r,n)=>{const o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);const i=[];for(let s=0;s<o.length;s++){const a=o[s],c=t.element._zod.run({value:a,issues:[]},n);c instanceof Promise?i.push(c.then(l=>Hs(l,r,s))):Hs(c,r,s)}return i.length?Promise.all(i).then(()=>r):r}});function Yr(e,t,r,n,o){if(e.issues.length){if(o&&!(r in n))return;t.issues.push(...ks(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function zs(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const r=Tp(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function js(e,t,r,n,o,i){const s=[],a=o.keySet,c=o.catchall._zod,l=c.def.type,d=c.optout==="optional";for(const f in t){if(a.has(f))continue;if(l==="never"){s.push(f);continue}const _=c.run({value:t[f],issues:[]},n);_ instanceof Promise?e.push(_.then(m=>Yr(m,r,f,t,d))):Yr(_,r,f,t,d)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}const lm=v("$ZodObject",(e,t)=>{if(ge.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}const n=po(()=>zs(t));le(e._zod,"propValues",()=>{const a=t.shape,c={};for(const l in a){const d=a[l]._zod;if(d.values){c[l]??(c[l]=new Set);for(const f of d.values)c[l].add(f)}}return c});const o=zr,i=t.catchall;let s;e._zod.parse=(a,c)=>{s??(s=n.value);const l=a.value;if(!o(l))return a.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),a;a.value={};const d=[],f=s.shape;for(const _ of s.keys){const m=f[_],g=m._zod.optout==="optional",b=m._zod.run({value:l[_],issues:[]},c);b instanceof Promise?d.push(b.then(G=>Yr(G,a,_,l,g))):Yr(b,a,_,l,g)}return i?js(d,l,a,c,n.value,e):d.length?Promise.all(d).then(()=>a):a}}),um=v("$ZodObjectJIT",(e,t)=>{lm.init(e,t);const r=e._zod.parse,n=po(()=>zs(t)),o=_=>{const m=new M_(["shape","payload","ctx"]),g=n.value,b=D=>{const z=ws(D);return`shape[${z}]._zod.run({ value: input[${z}], issues: [] }, ctx)`};m.write("const input = payload.value;");const G=Object.create(null);let x=0;for(const D of g.keys)G[D]=`key_${x++}`;m.write("const newResult = {};");for(const D of g.keys){const z=G[D],E=ws(D),K=_[D]?._zod?.optout==="optional";m.write(`const ${z} = ${b(D)};`),K?m.write(`
27
+ if (${z}.issues.length) {
28
+ if (${E} in input) {
29
+ payload.issues = payload.issues.concat(${z}.issues.map(iss => ({
8
30
  ...iss,
9
- path: iss.path ? [${V}, ...iss.path] : [${V}]
31
+ path: iss.path ? [${E}, ...iss.path] : [${E}]
10
32
  })));
11
33
  }
12
34
  }
13
35
 
14
- if (${Z}.value === undefined) {
15
- if (${V} in input) {
16
- newResult[${V}] = undefined;
36
+ if (${z}.value === undefined) {
37
+ if (${E} in input) {
38
+ newResult[${E}] = undefined;
17
39
  }
18
40
  } else {
19
- newResult[${V}] = ${Z}.value;
41
+ newResult[${E}] = ${z}.value;
20
42
  }
21
43
 
22
- `):h.write(`
23
- if (${Z}.issues.length) {
24
- payload.issues = payload.issues.concat(${Z}.issues.map(iss => ({
44
+ `):m.write(`
45
+ if (${z}.issues.length) {
46
+ payload.issues = payload.issues.concat(${z}.issues.map(iss => ({
25
47
  ...iss,
26
- path: iss.path ? [${V}, ...iss.path] : [${V}]
48
+ path: iss.path ? [${E}, ...iss.path] : [${E}]
27
49
  })));
28
50
  }
29
51
 
30
- if (${Z}.value === undefined) {
31
- if (${V} in input) {
32
- newResult[${V}] = undefined;
52
+ if (${z}.value === undefined) {
53
+ if (${E} in input) {
54
+ newResult[${E}] = undefined;
33
55
  }
34
56
  } else {
35
- newResult[${V}] = ${Z}.value;
57
+ newResult[${E}] = ${z}.value;
36
58
  }
37
59
 
38
- `)}h.write("payload.value = newResult;"),h.write("return payload;");const j=h.compile();return(R,Z)=>j(v,R,Z)};let i;const a=Tt,s=!Gr.jitless,u=s&&pi.value,d=t.catchall;let p;e._zod.parse=(v,h)=>{p??(p=n.value);const C=v.value;return a(C)?s&&u&&h?.async===!1&&h.jitless!==!0?(i||(i=o(t.shape)),v=i(v,h),d?fn([],C,v,h,p,e):v):r(v,h):(v.issues.push({expected:"object",code:"invalid_type",input:C,inst:e}),v)}});function mn(e,t,r,n){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!at(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>Je(a,n,Ke())))}),t)}const rs=b("$ZodUnion",(e,t)=>{_e.init(e,t),ae(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),ae(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ae(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),ae(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>dr(i.source)).join("|")})$`)}});const r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(r)return n(o,i);let a=!1;const s=[];for(const l of t.options){const u=l._zod.run({value:o.value,issues:[]},i);if(u instanceof Promise)s.push(u),a=!0;else{if(u.issues.length===0)return u;s.push(u)}}return a?Promise.all(s).then(l=>mn(l,o,e,i)):mn(s,o,e,i)}}),ns=b("$ZodIntersection",(e,t)=>{_e.init(e,t),e._zod.parse=(r,n)=>{const o=r.value,i=t.left._zod.run({value:o,issues:[]},n),a=t.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([l,u])=>pn(r,l,u)):pn(r,i,a)}});function hr(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ht(e)&&ht(t)){const r=Object.keys(t),n=Object.keys(e).filter(i=>r.indexOf(i)!==-1),o={...e,...t};for(const i of n){const a=hr(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};o[i]=a.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const o=e[n],i=t[n],a=hr(o,i);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function pn(e,t,r){const n=new Map;let o;for(const s of t.issues)if(s.code==="unrecognized_keys"){o??(o=s);for(const l of s.keys)n.has(l)||n.set(l,{}),n.get(l).l=!0}else e.issues.push(s);for(const s of r.issues)if(s.code==="unrecognized_keys")for(const l of s.keys)n.has(l)||n.set(l,{}),n.get(l).r=!0;else e.issues.push(s);const i=[...n].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(i.length&&o&&e.issues.push({...o,keys:i}),at(e))return e;const a=hr(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const os=b("$ZodEnum",(e,t)=>{_e.init(e,t);const r=jr(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>hi.has(typeof o)).map(o=>typeof o=="string"?it(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const a=o.value;return n.has(a)||o.issues.push({code:"invalid_value",values:r,input:a,inst:e}),o}}),is=b("$ZodLiteral",(e,t)=>{if(_e.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?it(n):n?it(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,o)=>{const i=n.value;return r.has(i)||n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n}}),as=b("$ZodTransform",(e,t)=>{_e.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Wr(e.constructor.name);const o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(a=>(r.value=a,r));if(o instanceof Promise)throw new ot;return r.value=o,r}});function hn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const gn=b("$ZodOptional",(e,t)=>{_e.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ae(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ae(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${dr(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>hn(i,r.value)):hn(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),ss=b("$ZodExactOptional",(e,t)=>{gn.init(e,t),ae(e._zod,"values",()=>t.innerType._zod.values),ae(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),cs=b("$ZodNullable",(e,t)=>{_e.init(e,t),ae(e._zod,"optin",()=>t.innerType._zod.optin),ae(e._zod,"optout",()=>t.innerType._zod.optout),ae(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${dr(r.source)}|null)$`):void 0}),ae(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),ls=b("$ZodDefault",(e,t)=>{_e.init(e,t),e._zod.optin="optional",ae(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>yn(i,t)):yn(o,t)}});function yn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const us=b("$ZodPrefault",(e,t)=>{_e.init(e,t),e._zod.optin="optional",ae(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),ds=b("$ZodNonOptional",(e,t)=>{_e.init(e,t),ae(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>bn(i,e)):bn(o,e)}});function bn(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const _s=b("$ZodCatch",(e,t)=>{_e.init(e,t),ae(e._zod,"optin",()=>t.innerType._zod.optin),ae(e._zod,"optout",()=>t.innerType._zod.optout),ae(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(a=>Je(a,n,Ke()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(i=>Je(i,n,Ke()))},input:r.value}),r.issues=[]),r)}}),fs=b("$ZodPipe",(e,t)=>{_e.init(e,t),ae(e._zod,"values",()=>t.in._zod.values),ae(e._zod,"optin",()=>t.in._zod.optin),ae(e._zod,"optout",()=>t.out._zod.optout),ae(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const i=t.out._zod.run(r,n);return i instanceof Promise?i.then(a=>Dt(a,t.in,n)):Dt(i,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>Dt(i,t.out,n)):Dt(o,t.out,n)}});function Dt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const ms=b("$ZodReadonly",(e,t)=>{_e.init(e,t),ae(e._zod,"propValues",()=>t.innerType._zod.propValues),ae(e._zod,"values",()=>t.innerType._zod.values),ae(e._zod,"optin",()=>t.innerType?._zod?.optin),ae(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(vn):vn(o)}});function vn(e){return e.value=Object.freeze(e.value),e}const ps=b("$ZodCustom",(e,t)=>{Oe.init(e,t),_e.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>Sn(i,r,n,e));Sn(o,r,n,e)}});function Sn(e,t,r,n){if(!e){const o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(gt(o))}}var An;class hs{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function gs(){return new hs}(An=globalThis).__zod_globalRegistry??(An.__zod_globalRegistry=gs());const yt=globalThis.__zod_globalRegistry;function ys(e,t){return new e({type:"string",...$(t)})}function bs(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...$(t)})}function Cn(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...$(t)})}function vs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...$(t)})}function Ss(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...$(t)})}function As(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...$(t)})}function Cs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...$(t)})}function ws(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...$(t)})}function Es(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...$(t)})}function Ns(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...$(t)})}function Ts(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...$(t)})}function ks(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...$(t)})}function Os(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...$(t)})}function Is(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...$(t)})}function Ms(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...$(t)})}function Ls(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...$(t)})}function Ds(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...$(t)})}function Ps(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...$(t)})}function Fs(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...$(t)})}function $s(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...$(t)})}function xs(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...$(t)})}function Bs(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...$(t)})}function zs(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...$(t)})}function Hs(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...$(t)})}function Rs(e,t){return new e({type:"string",format:"date",check:"string_format",...$(t)})}function Us(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...$(t)})}function Zs(e,t){return new e({type:"string",format:"duration",check:"string_format",...$(t)})}function Ws(e,t){return new e({type:"number",coerce:!0,checks:[],...$(t)})}function Gs(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...$(t)})}function js(e,t){return new e({type:"boolean",...$(t)})}function Vs(e){return new e({type:"unknown"})}function Ys(e,t){return new e({type:"never",...$(t)})}function wn(e,t){return new sn({check:"less_than",...$(t),value:e,inclusive:!1})}function gr(e,t){return new sn({check:"less_than",...$(t),value:e,inclusive:!0})}function En(e,t){return new cn({check:"greater_than",...$(t),value:e,inclusive:!1})}function yr(e,t){return new cn({check:"greater_than",...$(t),value:e,inclusive:!0})}function Nn(e,t){return new ua({check:"multiple_of",...$(t),value:e})}function Tn(e,t){return new _a({check:"max_length",...$(t),maximum:e})}function Pt(e,t){return new fa({check:"min_length",...$(t),minimum:e})}function kn(e,t){return new ma({check:"length_equals",...$(t),length:e})}function Ks(e,t){return new pa({check:"string_format",format:"regex",...$(t),pattern:e})}function qs(e){return new ha({check:"string_format",format:"lowercase",...$(e)})}function Js(e){return new ga({check:"string_format",format:"uppercase",...$(e)})}function Qs(e,t){return new ya({check:"string_format",format:"includes",...$(t),includes:e})}function Xs(e,t){return new ba({check:"string_format",format:"starts_with",...$(t),prefix:e})}function ec(e,t){return new va({check:"string_format",format:"ends_with",...$(t),suffix:e})}function st(e){return new Sa({check:"overwrite",tx:e})}function tc(e){return st(t=>t.normalize(e))}function rc(){return st(e=>e.trim())}function nc(){return st(e=>e.toLowerCase())}function oc(){return st(e=>e.toUpperCase())}function ic(){return st(e=>mi(e))}function ac(e,t,r){return new e({type:"array",element:t,...$(r)})}function sc(e,t,r){return new e({type:"custom",check:"custom",fn:t,...$(r)})}function cc(e){const t=lc(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(gt(n,r.value,t._zod.def));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),r.issues.push(gt(o))}},e(r.value,r)));return t}function lc(e,t){const r=new Oe({check:"custom",...$(t)});return r._zod.check=e,r}function On(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??yt,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Se(e,t,r={path:[],schemaPath:[]}){var n;const o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;const a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);const s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{const d={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,d);else{const v=a.schema,h=t.processors[o.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);h(e,t,v,d)}const p=e._zod.parent;p&&(a.ref||(a.ref=p),Se(p,t,d),t.seen.get(p).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(a.schema,l),t.io==="input"&&Te(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&a.schema._prefault&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function In(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const a of e.seen.entries()){const s=e.metadataRegistry.get(a[0])?.id;if(s){const l=n.get(s);if(l&&l!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(s,a[0])}}const o=a=>{const s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const p=e.external.registry.get(a[0])?.id,v=e.external.uri??(C=>C);if(p)return{ref:v(p)};const h=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=h,{defId:h,ref:`${v("__shared")}#/${s}/${h}`}}if(a[1]===r)return{ref:"#"};const u=`#/${s}/`,d=a[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:u+d}},i=a=>{if(a[1].schema.$ref)return;const s=a[1],{ref:l,defId:u}=o(a);s.def={...s.schema},u&&(s.defId=u);const d=s.schema;for(const p in d)delete d[p];d.$ref=l};if(e.cycles==="throw")for(const a of e.seen.entries()){const s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
60
+ `)}m.write("payload.value = newResult;"),m.write("return payload;");const B=m.compile();return(D,z)=>B(_,D,z)};let i;const s=zr,a=!Es.jitless,l=a&&Ap.value,d=t.catchall;let f;e._zod.parse=(_,m)=>{f??(f=n.value);const g=_.value;return s(g)?a&&l&&m?.async===!1&&m.jitless!==!0?(i||(i=o(t.shape)),_=i(_,m),d?js([],g,_,m,f,e):_):r(_,m):(_.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),_)}});function Ws(e,t,r,n){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!Kt(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>xt(s,n,Pt())))}),t)}const dm=v("$ZodUnion",(e,t)=>{ge.init(e,t),le(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),le(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),le(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),le(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>mo(i.source)).join("|")})$`)}});const r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(r)return n(o,i);let s=!1;const a=[];for(const c of t.options){const l=c._zod.run({value:o.value,issues:[]},i);if(l instanceof Promise)a.push(l),s=!0;else{if(l.issues.length===0)return l;a.push(l)}}return s?Promise.all(a).then(c=>Ws(c,o,e,i)):Ws(a,o,e,i)}}),fm=v("$ZodIntersection",(e,t)=>{ge.init(e,t),e._zod.parse=(r,n)=>{const o=r.value,i=t.left._zod.run({value:o,issues:[]},n),s=t.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,l])=>Gs(r,c,l)):Gs(r,i,s)}});function vo(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(dr(e)&&dr(t)){const r=Object.keys(t),n=Object.keys(e).filter(i=>r.indexOf(i)!==-1),o={...e,...t};for(const i of n){const s=vo(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const o=e[n],i=t[n],s=vo(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Gs(e,t,r){const n=new Map;let o;for(const a of t.issues)if(a.code==="unrecognized_keys"){o??(o=a);for(const c of a.keys)n.has(c)||n.set(c,{}),n.get(c).l=!0}else e.issues.push(a);for(const a of r.issues)if(a.code==="unrecognized_keys")for(const c of a.keys)n.has(c)||n.set(c,{}),n.get(c).r=!0;else e.issues.push(a);const i=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(i.length&&o&&e.issues.push({...o,keys:i}),Kt(e))return e;const s=vo(t.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}const pm=v("$ZodEnum",(e,t)=>{ge.init(e,t);const r=Cs(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>wp.has(typeof o)).map(o=>typeof o=="string"?Vt(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const s=o.value;return n.has(s)||o.issues.push({code:"invalid_value",values:r,input:s,inst:e}),o}}),_m=v("$ZodLiteral",(e,t)=>{if(ge.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?Vt(n):n?Vt(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,o)=>{const i=n.value;return r.has(i)||n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n}}),mm=v("$ZodTransform",(e,t)=>{ge.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Ss(e.constructor.name);const o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(r.value=s,r));if(o instanceof Promise)throw new Yt;return r.value=o,r}});function Zs(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Ys=v("$ZodOptional",(e,t)=>{ge.init(e,t),e._zod.optin="optional",e._zod.optout="optional",le(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),le(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${mo(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>Zs(i,r.value)):Zs(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),hm=v("$ZodExactOptional",(e,t)=>{Ys.init(e,t),le(e._zod,"values",()=>t.innerType._zod.values),le(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),gm=v("$ZodNullable",(e,t)=>{ge.init(e,t),le(e._zod,"optin",()=>t.innerType._zod.optin),le(e._zod,"optout",()=>t.innerType._zod.optout),le(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${mo(r.source)}|null)$`):void 0}),le(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),ym=v("$ZodDefault",(e,t)=>{ge.init(e,t),e._zod.optin="optional",le(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>Vs(i,t)):Vs(o,t)}});function Vs(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const bm=v("$ZodPrefault",(e,t)=>{ge.init(e,t),e._zod.optin="optional",le(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),vm=v("$ZodNonOptional",(e,t)=>{ge.init(e,t),le(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>Ks(i,e)):Ks(o,e)}});function Ks(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Sm=v("$ZodCatch",(e,t)=>{ge.init(e,t),le(e._zod,"optin",()=>t.innerType._zod.optin),le(e._zod,"optout",()=>t.innerType._zod.optout),le(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>xt(s,n,Pt()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(i=>xt(i,n,Pt()))},input:r.value}),r.issues=[]),r)}}),Em=v("$ZodPipe",(e,t)=>{ge.init(e,t),le(e._zod,"values",()=>t.in._zod.values),le(e._zod,"optin",()=>t.in._zod.optin),le(e._zod,"optout",()=>t.out._zod.optout),le(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const i=t.out._zod.run(r,n);return i instanceof Promise?i.then(s=>Vr(s,t.in,n)):Vr(i,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>Vr(i,t.out,n)):Vr(o,t.out,n)}});function Vr(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const Cm=v("$ZodReadonly",(e,t)=>{ge.init(e,t),le(e._zod,"propValues",()=>t.innerType._zod.propValues),le(e._zod,"values",()=>t.innerType._zod.values),le(e._zod,"optin",()=>t.innerType?._zod?.optin),le(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(qs):qs(o)}});function qs(e){return e.value=Object.freeze(e.value),e}const Am=v("$ZodCustom",(e,t)=>{Fe.init(e,t),ge.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>Js(i,r,n,e));Js(o,r,n,e)}});function Js(e,t,r,n){if(!e){const o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(fr(o))}}var Qs;class wm{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Tm(){return new wm}(Qs=globalThis).__zod_globalRegistry??(Qs.__zod_globalRegistry=Tm());const pr=globalThis.__zod_globalRegistry;function Im(e,t){return new e({type:"string",...U(t)})}function km(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...U(t)})}function Xs(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...U(t)})}function Nm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...U(t)})}function Om(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...U(t)})}function Mm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...U(t)})}function Dm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...U(t)})}function Pm(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...U(t)})}function Lm(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...U(t)})}function xm(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...U(t)})}function Fm(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...U(t)})}function $m(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...U(t)})}function Bm(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...U(t)})}function Rm(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...U(t)})}function Um(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...U(t)})}function Hm(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...U(t)})}function zm(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...U(t)})}function jm(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...U(t)})}function Wm(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...U(t)})}function Gm(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...U(t)})}function Zm(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...U(t)})}function Ym(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...U(t)})}function Vm(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...U(t)})}function Km(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...U(t)})}function qm(e,t){return new e({type:"string",format:"date",check:"string_format",...U(t)})}function Jm(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...U(t)})}function Qm(e,t){return new e({type:"string",format:"duration",check:"string_format",...U(t)})}function Xm(e,t){return new e({type:"number",coerce:!0,checks:[],...U(t)})}function eh(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...U(t)})}function th(e,t){return new e({type:"boolean",...U(t)})}function rh(e){return new e({type:"unknown"})}function nh(e,t){return new e({type:"never",...U(t)})}function ea(e,t){return new $s({check:"less_than",...U(t),value:e,inclusive:!1})}function So(e,t){return new $s({check:"less_than",...U(t),value:e,inclusive:!0})}function ta(e,t){return new Bs({check:"greater_than",...U(t),value:e,inclusive:!1})}function Eo(e,t){return new Bs({check:"greater_than",...U(t),value:e,inclusive:!0})}function ra(e,t){return new b_({check:"multiple_of",...U(t),value:e})}function na(e,t){return new S_({check:"max_length",...U(t),maximum:e})}function Kr(e,t){return new E_({check:"min_length",...U(t),minimum:e})}function oa(e,t){return new C_({check:"length_equals",...U(t),length:e})}function oh(e,t){return new A_({check:"string_format",format:"regex",...U(t),pattern:e})}function ih(e){return new w_({check:"string_format",format:"lowercase",...U(e)})}function sh(e){return new T_({check:"string_format",format:"uppercase",...U(e)})}function ah(e,t){return new I_({check:"string_format",format:"includes",...U(t),includes:e})}function ch(e,t){return new k_({check:"string_format",format:"starts_with",...U(t),prefix:e})}function lh(e,t){return new N_({check:"string_format",format:"ends_with",...U(t),suffix:e})}function qt(e){return new O_({check:"overwrite",tx:e})}function uh(e){return qt(t=>t.normalize(e))}function dh(){return qt(e=>e.trim())}function fh(){return qt(e=>e.toLowerCase())}function ph(){return qt(e=>e.toUpperCase())}function _h(){return qt(e=>Cp(e))}function mh(e,t,r){return new e({type:"array",element:t,...U(r)})}function hh(e,t,r){return new e({type:"custom",check:"custom",fn:t,...U(r)})}function gh(e){const t=yh(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(fr(n,r.value,t._zod.def));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),r.issues.push(fr(o))}},e(r.value,r)));return t}function yh(e,t){const r=new Fe({check:"custom",...U(t)});return r._zod.check=e,r}function ia(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??pr,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Ie(e,t,r={path:[],schemaPath:[]}){var n;const o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;const s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);const a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{const d={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,d);else{const _=s.schema,m=t.processors[o.type];if(!m)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);m(e,t,_,d)}const f=e._zod.parent;f&&(s.ref||(s.ref=f),Ie(f,t,d),t.seen.get(f).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(s.schema,c),t.io==="input"&&xe(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function sa(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const s of e.seen.entries()){const a=e.metadataRegistry.get(s[0])?.id;if(a){const c=n.get(a);if(c&&c!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(a,s[0])}}const o=s=>{const a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(s[0])?.id,_=e.external.uri??(g=>g);if(f)return{ref:_(f)};const m=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=m,{defId:m,ref:`${_("__shared")}#/${a}/${m}`}}if(s[1]===r)return{ref:"#"};const l=`#/${a}/`,d=s[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:l+d}},i=s=>{if(s[1].schema.$ref)return;const a=s[1],{ref:c,defId:l}=o(s);a.def={...a.schema},l&&(a.defId=l);const d=a.schema;for(const f in d)delete d[f];d.$ref=c};if(e.cycles==="throw")for(const s of e.seen.entries()){const a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
39
61
 
40
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const a of e.seen.entries()){const s=a[1];if(t===a[0]){i(a);continue}if(e.external){const u=e.external.registry.get(a[0])?.id;if(t!==a[0]&&u){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}if(s.count>1&&e.reused==="ref"){i(a);continue}}}function Mn(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=a=>{const s=e.seen.get(a);if(s.ref===null)return;const l=s.def??s.schema,u={...l},d=s.ref;if(s.ref=null,d){n(d);const v=e.seen.get(d),h=v.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(h)):Object.assign(l,h),Object.assign(l,u),a._zod.parent===d)for(const m in l)m==="$ref"||m==="allOf"||m in u||delete l[m];if(h.$ref&&v.def)for(const m in l)m==="$ref"||m==="allOf"||m in v.def&&JSON.stringify(l[m])===JSON.stringify(v.def[m])&&delete l[m]}const p=a._zod.parent;if(p&&p!==d){n(p);const v=e.seen.get(p);if(v?.schema.$ref&&(l.$ref=v.schema.$ref,v.def))for(const h in l)h==="$ref"||h==="allOf"||h in v.def&&JSON.stringify(l[h])===JSON.stringify(v.def[h])&&delete l[h]}e.override({zodSchema:a,jsonSchema:l,path:s.path??[]})};for(const a of[...e.seen.entries()].reverse())n(a[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(a)}Object.assign(o,r.def??r.schema);const i=e.external?.defs??{};for(const a of e.seen.entries()){const s=a[1];s.def&&s.defId&&(i[s.defId]=s.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const a=JSON.parse(JSON.stringify(o));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ft(t,"input",e.processors),output:Ft(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function Te(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return Te(n.element,r);if(n.type==="set")return Te(n.valueType,r);if(n.type==="lazy")return Te(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return Te(n.innerType,r);if(n.type==="intersection")return Te(n.left,r)||Te(n.right,r);if(n.type==="record"||n.type==="map")return Te(n.keyType,r)||Te(n.valueType,r);if(n.type==="pipe")return Te(n.in,r)||Te(n.out,r);if(n.type==="object"){for(const o in n.shape)if(Te(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(const o of n.options)if(Te(o,r))return!0;return!1}if(n.type==="tuple"){for(const o of n.items)if(Te(o,r))return!0;return!!(n.rest&&Te(n.rest,r))}return!1}const uc=(e,t={})=>r=>{const n=On({...r,processors:t});return Se(e,n),In(n,e),Mn(n,e)},Ft=(e,t,r={})=>n=>{const{libraryOptions:o,target:i}=n??{},a=On({...o??{},target:i,io:t,processors:r});return Se(e,a),In(a,e),Mn(a,e)},dc={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},_c=(e,t,r,n)=>{const o=r;o.type="string";const{minimum:i,maximum:a,format:s,patterns:l,contentEncoding:u}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof a=="number"&&(o.maxLength=a),s&&(o.format=dc[s]??s,o.format===""&&delete o.format,s==="time"&&delete o.format),u&&(o.contentEncoding=u),l&&l.size>0){const d=[...l];d.length===1?o.pattern=d[0].source:d.length>1&&(o.allOf=[...d.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},fc=(e,t,r,n)=>{const o=r,{minimum:i,maximum:a,format:s,multipleOf:l,exclusiveMaximum:u,exclusiveMinimum:d}=e._zod.bag;typeof s=="string"&&s.includes("int")?o.type="integer":o.type="number",typeof d=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=d,o.exclusiveMinimum=!0):o.exclusiveMinimum=d),typeof i=="number"&&(o.minimum=i,typeof d=="number"&&t.target!=="draft-04"&&(d>=i?delete o.minimum:delete o.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=u,o.exclusiveMaximum=!0):o.exclusiveMaximum=u),typeof a=="number"&&(o.maximum=a,typeof u=="number"&&t.target!=="draft-04"&&(u<=a?delete o.maximum:delete o.exclusiveMaximum)),typeof l=="number"&&(o.multipleOf=l)},mc=(e,t,r,n)=>{r.type="boolean"},pc=(e,t,r,n)=>{r.not={}},hc=(e,t,r,n)=>{},gc=(e,t,r,n)=>{const o=e._zod.def,i=jr(o.entries);i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),r.enum=i},yc=(e,t,r,n)=>{const o=e._zod.def,i=[];for(const a of o.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){const a=i[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),i.every(a=>typeof a=="boolean")&&(r.type="boolean"),i.every(a=>a===null)&&(r.type="null"),r.enum=i},bc=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},vc=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Sc=(e,t,r,n)=>{const o=r,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(o.minItems=a),typeof s=="number"&&(o.maxItems=s),o.type="array",o.items=Se(i.element,t,{...n,path:[...n.path,"items"]})},Ac=(e,t,r,n)=>{const o=r,i=e._zod.def;o.type="object",o.properties={};const a=i.shape;for(const u in a)o.properties[u]=Se(a[u],t,{...n,path:[...n.path,"properties",u]});const s=new Set(Object.keys(a)),l=new Set([...s].filter(u=>{const d=i.shape[u]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));l.size>0&&(o.required=Array.from(l)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=Se(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},Cc=(e,t,r,n)=>{const o=e._zod.def,i=o.inclusive===!1,a=o.options.map((s,l)=>Se(s,t,{...n,path:[...n.path,i?"oneOf":"anyOf",l]}));i?r.oneOf=a:r.anyOf=a},wc=(e,t,r,n)=>{const o=e._zod.def,i=Se(o.left,t,{...n,path:[...n.path,"allOf",0]}),a=Se(o.right,t,{...n,path:[...n.path,"allOf",1]}),s=u=>"allOf"in u&&Object.keys(u).length===1,l=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];r.allOf=l},Ec=(e,t,r,n)=>{const o=e._zod.def,i=Se(o.innerType,t,n),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=o.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},Nc=(e,t,r,n)=>{const o=e._zod.def;Se(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},Tc=(e,t,r,n)=>{const o=e._zod.def;Se(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType,r.default=JSON.parse(JSON.stringify(o.defaultValue))},kc=(e,t,r,n)=>{const o=e._zod.def;Se(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},Oc=(e,t,r,n)=>{const o=e._zod.def;Se(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType;let a;try{a=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},Ic=(e,t,r,n)=>{const o=e._zod.def,i=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;Se(i,t,n);const a=t.seen.get(e);a.ref=i},Mc=(e,t,r,n)=>{const o=e._zod.def;Se(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType,r.readOnly=!0},Ln=(e,t,r,n)=>{const o=e._zod.def;Se(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},Lc=b("ZodISODateTime",(e,t)=>{Fa.init(e,t),de.init(e,t)});function Dc(e){return Hs(Lc,e)}const Pc=b("ZodISODate",(e,t)=>{$a.init(e,t),de.init(e,t)});function Fc(e){return Rs(Pc,e)}const $c=b("ZodISOTime",(e,t)=>{xa.init(e,t),de.init(e,t)});function xc(e){return Us($c,e)}const Bc=b("ZodISODuration",(e,t)=>{Ba.init(e,t),de.init(e,t)});function zc(e){return Zs(Bc,e)}const xe=b("ZodError",(e,t)=>{Xr.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Ti(e,r)},flatten:{value:r=>Ni(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,cr,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,cr,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Hc=fr(xe),Rc=mr(xe),Uc=Ot(xe),Zc=It(xe),Wc=Ii(xe),Gc=Mi(xe),jc=Li(xe),Vc=Di(xe),Yc=Pi(xe),Kc=Fi(xe),qc=$i(xe),Jc=xi(xe),fe=b("ZodType",(e,t)=>(_e.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ft(e,"input"),output:Ft(e,"output")}}),e.toJSONSchema=uc(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(Ze(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),e.with=e.check,e.clone=(r,n)=>We(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>Hc(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Uc(e,r,n),e.parseAsync=async(r,n)=>Rc(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Zc(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>Wc(e,r,n),e.decode=(r,n)=>Gc(e,r,n),e.encodeAsync=async(r,n)=>jc(e,r,n),e.decodeAsync=async(r,n)=>Vc(e,r,n),e.safeEncode=(r,n)=>Yc(e,r,n),e.safeDecode=(r,n)=>Kc(e,r,n),e.safeEncodeAsync=async(r,n)=>qc(e,r,n),e.safeDecodeAsync=async(r,n)=>Jc(e,r,n),e.refine=(r,n)=>e.check(Vl(r,n)),e.superRefine=r=>e.check(Yl(r)),e.overwrite=r=>e.check(st(r)),e.optional=()=>Hn(e),e.exactOptional=()=>Pl(e),e.nullable=()=>Rn(e),e.nullish=()=>Hn(Rn(e)),e.nonoptional=r=>Hl(e,r),e.array=()=>Cl(e),e.or=r=>Bn([e,r]),e.and=r=>kl(e,r),e.transform=r=>Zn(e,Ll(r)),e.default=r=>xl(e,r),e.prefault=r=>zl(e,r),e.catch=r=>Ul(e,r),e.pipe=r=>Zn(e,r),e.readonly=()=>Gl(e),e.describe=r=>{const n=e.clone();return yt.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return yt.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return yt.get(e);const n=e.clone();return yt.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),Dn=b("_ZodString",(e,t)=>{pr.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,o,i)=>_c(e,n,o);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(Ks(...n)),e.includes=(...n)=>e.check(Qs(...n)),e.startsWith=(...n)=>e.check(Xs(...n)),e.endsWith=(...n)=>e.check(ec(...n)),e.min=(...n)=>e.check(Pt(...n)),e.max=(...n)=>e.check(Tn(...n)),e.length=(...n)=>e.check(kn(...n)),e.nonempty=(...n)=>e.check(Pt(1,...n)),e.lowercase=n=>e.check(qs(n)),e.uppercase=n=>e.check(Js(n)),e.trim=()=>e.check(rc()),e.normalize=(...n)=>e.check(tc(...n)),e.toLowerCase=()=>e.check(nc()),e.toUpperCase=()=>e.check(oc()),e.slugify=()=>e.check(ic())}),Qc=b("ZodString",(e,t)=>{pr.init(e,t),Dn.init(e,t),e.email=r=>e.check(bs(Xc,r)),e.url=r=>e.check(ws(el,r)),e.jwt=r=>e.check(zs(pl,r)),e.emoji=r=>e.check(Es(tl,r)),e.guid=r=>e.check(Cn(Pn,r)),e.uuid=r=>e.check(vs($t,r)),e.uuidv4=r=>e.check(Ss($t,r)),e.uuidv6=r=>e.check(As($t,r)),e.uuidv7=r=>e.check(Cs($t,r)),e.nanoid=r=>e.check(Ns(rl,r)),e.guid=r=>e.check(Cn(Pn,r)),e.cuid=r=>e.check(Ts(nl,r)),e.cuid2=r=>e.check(ks(ol,r)),e.ulid=r=>e.check(Os(il,r)),e.base64=r=>e.check($s(_l,r)),e.base64url=r=>e.check(xs(fl,r)),e.xid=r=>e.check(Is(al,r)),e.ksuid=r=>e.check(Ms(sl,r)),e.ipv4=r=>e.check(Ls(cl,r)),e.ipv6=r=>e.check(Ds(ll,r)),e.cidrv4=r=>e.check(Ps(ul,r)),e.cidrv6=r=>e.check(Fs(dl,r)),e.e164=r=>e.check(Bs(ml,r)),e.datetime=r=>e.check(Dc(r)),e.date=r=>e.check(Fc(r)),e.time=r=>e.check(xc(r)),e.duration=r=>e.check(zc(r))});function Ge(e){return ys(Qc,e)}const de=b("ZodStringFormat",(e,t)=>{le.init(e,t),Dn.init(e,t)}),Xc=b("ZodEmail",(e,t)=>{Na.init(e,t),de.init(e,t)}),Pn=b("ZodGUID",(e,t)=>{wa.init(e,t),de.init(e,t)}),$t=b("ZodUUID",(e,t)=>{Ea.init(e,t),de.init(e,t)}),el=b("ZodURL",(e,t)=>{Ta.init(e,t),de.init(e,t)}),tl=b("ZodEmoji",(e,t)=>{ka.init(e,t),de.init(e,t)}),rl=b("ZodNanoID",(e,t)=>{Oa.init(e,t),de.init(e,t)}),nl=b("ZodCUID",(e,t)=>{Ia.init(e,t),de.init(e,t)}),ol=b("ZodCUID2",(e,t)=>{Ma.init(e,t),de.init(e,t)}),il=b("ZodULID",(e,t)=>{La.init(e,t),de.init(e,t)}),al=b("ZodXID",(e,t)=>{Da.init(e,t),de.init(e,t)}),sl=b("ZodKSUID",(e,t)=>{Pa.init(e,t),de.init(e,t)}),cl=b("ZodIPv4",(e,t)=>{za.init(e,t),de.init(e,t)}),ll=b("ZodIPv6",(e,t)=>{Ha.init(e,t),de.init(e,t)}),ul=b("ZodCIDRv4",(e,t)=>{Ra.init(e,t),de.init(e,t)}),dl=b("ZodCIDRv6",(e,t)=>{Ua.init(e,t),de.init(e,t)}),_l=b("ZodBase64",(e,t)=>{Za.init(e,t),de.init(e,t)}),fl=b("ZodBase64URL",(e,t)=>{Ga.init(e,t),de.init(e,t)}),ml=b("ZodE164",(e,t)=>{ja.init(e,t),de.init(e,t)}),pl=b("ZodJWT",(e,t)=>{Ya.init(e,t),de.init(e,t)}),Fn=b("ZodNumber",(e,t)=>{un.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,o,i)=>fc(e,n,o),e.gt=(n,o)=>e.check(En(n,o)),e.gte=(n,o)=>e.check(yr(n,o)),e.min=(n,o)=>e.check(yr(n,o)),e.lt=(n,o)=>e.check(wn(n,o)),e.lte=(n,o)=>e.check(gr(n,o)),e.max=(n,o)=>e.check(gr(n,o)),e.int=n=>e.check($n(n)),e.safe=n=>e.check($n(n)),e.positive=n=>e.check(En(0,n)),e.nonnegative=n=>e.check(yr(0,n)),e.negative=n=>e.check(wn(0,n)),e.nonpositive=n=>e.check(gr(0,n)),e.multipleOf=(n,o)=>e.check(Nn(n,o)),e.step=(n,o)=>e.check(Nn(n,o)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null}),hl=b("ZodNumberFormat",(e,t)=>{Ka.init(e,t),Fn.init(e,t)});function $n(e){return Gs(hl,e)}const gl=b("ZodBoolean",(e,t)=>{qa.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>mc(e,r,n)});function yl(e){return js(gl,e)}const bl=b("ZodUnknown",(e,t)=>{Ja.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>hc()});function xn(){return Vs(bl)}const vl=b("ZodNever",(e,t)=>{Qa.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>pc(e,r,n)});function Sl(e){return Ys(vl,e)}const Al=b("ZodArray",(e,t)=>{Xa.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Sc(e,r,n,o),e.element=t.element,e.min=(r,n)=>e.check(Pt(r,n)),e.nonempty=r=>e.check(Pt(1,r)),e.max=(r,n)=>e.check(Tn(r,n)),e.length=(r,n)=>e.check(kn(r,n)),e.unwrap=()=>e.element});function Cl(e,t){return ac(Al,e,t)}const wl=b("ZodObject",(e,t)=>{ts.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ac(e,r,n,o),ae(e,"shape",()=>t.shape),e.keyof=()=>ct(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:xn()}),e.loose=()=>e.clone({...e._zod.def,catchall:xn()}),e.strict=()=>e.clone({...e._zod.def,catchall:Sl()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>Si(e,r),e.safeExtend=r=>Ai(e,r),e.merge=r=>Ci(e,r),e.pick=r=>bi(e,r),e.omit=r=>vi(e,r),e.partial=(...r)=>wi(zn,e,r[0]),e.required=(...r)=>Ei(Un,e,r[0])});function El(e,t){const r={type:"object",shape:e??{},...$(t)};return new wl(r)}const Nl=b("ZodUnion",(e,t)=>{rs.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Cc(e,r,n,o),e.options=t.options});function Bn(e,t){return new Nl({type:"union",options:e,...$(t)})}const Tl=b("ZodIntersection",(e,t)=>{ns.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>wc(e,r,n,o)});function kl(e,t){return new Tl({type:"intersection",left:e,right:t})}const br=b("ZodEnum",(e,t)=>{os.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(n,o,i)=>gc(e,n,o),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{const i={};for(const a of n)if(r.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new br({...t,checks:[],...$(o),entries:i})},e.exclude=(n,o)=>{const i={...t.entries};for(const a of n)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new br({...t,checks:[],...$(o),entries:i})}});function ct(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new br({type:"enum",entries:r,...$(t)})}const Ol=b("ZodLiteral",(e,t)=>{is.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>yc(e,r,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Il(e,t){return new Ol({type:"literal",values:Array.isArray(e)?e:[e],...$(t)})}const Ml=b("ZodTransform",(e,t)=>{as.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>vc(e,r),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Wr(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(gt(i,r.value,t));else{const a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(gt(a))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function Ll(e){return new Ml({type:"transform",transform:e})}const zn=b("ZodOptional",(e,t)=>{gn.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ln(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Hn(e){return new zn({type:"optional",innerType:e})}const Dl=b("ZodExactOptional",(e,t)=>{ss.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ln(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Pl(e){return new Dl({type:"optional",innerType:e})}const Fl=b("ZodNullable",(e,t)=>{cs.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ec(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Rn(e){return new Fl({type:"nullable",innerType:e})}const $l=b("ZodDefault",(e,t)=>{ls.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Tc(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function xl(e,t){return new $l({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():qr(t)}})}const Bl=b("ZodPrefault",(e,t)=>{us.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>kc(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function zl(e,t){return new Bl({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():qr(t)}})}const Un=b("ZodNonOptional",(e,t)=>{ds.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Nc(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Hl(e,t){return new Un({type:"nonoptional",innerType:e,...$(t)})}const Rl=b("ZodCatch",(e,t)=>{_s.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Oc(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ul(e,t){return new Rl({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Zl=b("ZodPipe",(e,t)=>{fs.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ic(e,r,n,o),e.in=t.in,e.out=t.out});function Zn(e,t){return new Zl({type:"pipe",in:e,out:t})}const Wl=b("ZodReadonly",(e,t)=>{ms.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Mc(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Gl(e){return new Wl({type:"readonly",innerType:e})}const jl=b("ZodCustom",(e,t)=>{ps.init(e,t),fe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>bc(e,r)});function Vl(e,t={}){return sc(jl,e,t)}function Yl(e){return cc(e)}const vr={custom:"custom"};function ge(e){return Ws(Fn,e)}const Kl=["additional_pip","tort_threshold","pip_coverage_type","extended_medical","policy_pip_deductible"],ql=new Set([...Kl,"is_corporation"]);El({additional_pip:ct(["cov100_10400_LIMITED","cov125_13000_LIMITED","cov175_18200_LIMITED","cov250_26000_LIMITED","cov400_41600_LIMITED","cov500_52000_LIMITED","cov600_62400_LIMITED","cov700_72800_LIMITED","cov100_UNLIMITED","cov125_UNLIMITED","cov175_UNLIMITED","cov250_UNLIMITED","cov400_UNLIMITED","cov500_UNLIMITED","cov600_UNLIMITED","cov700_UNLIMITED"]),tort_threshold:ct(["Verbal_Threshold","Zero_Threshold"]),pip_coverage_type:ct(["Primary","Secondary"]),extended_medical:ct(["cov1000","cov10000"]),policy_pip_deductible:ct(["cov250","cov500","cov1000","cov2000","cov2500"]),has_health_insurance_auto_accident:yl().nullable().optional()}).superRefine((e,t)=>{e.pip_coverage_type==="Secondary"&&e.has_health_insurance_auto_accident!==!0&&t.addIssue({code:vr.custom,path:["pip_coverage_type"],message:"Secondary PIP coverage requires health insurance that covers auto accidents."})});const Jl=new Set(["Home","HomeConstruction","HomeFeatures","Demographics"]),Ql=new Set(["HomePolicy","BundlePolicy"]),Xl=new Set(["HomeCustomer","BundleCustomer","Demographics"]);function xt(e){if(typeof e!="string"||!e.trim())return!1;const t=e.trim().toLowerCase();return t==="nj"||t==="n.j."||t==="n.j"||t==="new jersey"}function Wn(e){return e?xt(e.state??e.State):!1}function Gn(e,t,r){return e==="has_health_insurance_auto_accident"?t==="BundleCustomer"||t==="Demographics"?!1:!Wn(r):ql.has(e)?!Wn(r):e==="household_size"?!(t&&Jl.has(t)):e==="number_of_mortgagees"?!(t&&Ql.has(t)):(e==="has_co_applicant"||e==="co_applicant_middle_name"||e==="co_applicant_relationship")&&t&&Xl.has(t)?!1:e==="multi_policy_discount"&&t==="HomePolicy"?!0:eu.has(e)}const eu=new Set(["anti_theft_type","passive_restraint_type","anti_lock_brakes","daytime_running_lights","vehicle_full_glass","vehicle_loan_lease","percent_to_work","stated_value_amount_cents","vehicle_comp_deductible","vehicle_coll_deductible","vehicle_towing_and_labor","vehicle_transportation_expense","accident_prevention_course","driver_accidents","driver_violations","losses","middle_name","ssn_display","auto_current_annual_premium_cents","has_co_applicant","co_applicant_middle_name","co_applicant_relationship"]),jn=new Date().getUTCFullYear(),Bt=Ge().trim().min(1,"Required").regex(/^[A-Za-z\s]+$/,"Only alphabetic characters are allowed."),Vn=Bn([Il(""),Ge().trim().regex(/^[A-Za-z\s]*$/,"Only alphabetic characters are allowed.")]).optional(),tu=(e,t,r)=>ge({error:`${e} must be a number.`}).min(t,`${e} must be between ${t.toLocaleString()} and ${r.toLocaleString()}.`).max(r,`${e} must be between ${t.toLocaleString()} and ${r.toLocaleString()}.`).int(`${e} must be a whole number.`),lt=(e,t)=>ge({error:`${e} must be a number.`}).min(0,`${e} must be between 0 and ${t.toLocaleString()}.`).max(t,`${e} must be between 0 and ${t.toLocaleString()}.`).int(`${e} must be a whole number.`),zt=(e,t=1600)=>ge({error:`${e} must be a valid 4-digit year.`}).int(`${e} must be a whole number.`).min(t,`${e} should be between ${t} and the current year.`).max(jn,`${e} cannot be in the future.`),Ht=e=>ge({error:`${e} must be a number.`}).int(`${e} must be a whole number.`).min(0,`${e} must be between 0 and 99.`).max(99,`${e} must be between 0 and 99.`),bt=(e,t,r=0)=>{const n=Math.pow(10,t)-1,o=n.toLocaleString("en-US"),i=r.toLocaleString("en-US");return ge({error:`${e} must be a number.`}).min(r,`${e}: Value must be between ${i} and ${o}.`).max(n,`${e}: Value must be between ${i} and ${o}.`).int(`${e} must be a whole number.`)},ru={email:Ge().trim().min(1,"Required").email("Please enter a valid email address."),phone:Ge().trim().min(1,"Required").refine(e=>{let t=e.replace(/\D/g,"");return t.length===11&&t.startsWith("1")&&(t=t.slice(1)),t.length===10},"Please enter a valid 10-digit US phone number."),social_security_number:Ge().trim().refine(e=>e===""||/^\d{3}-\d{2}-\d{4}$/.test(e),"Social Security Number must be in the format XXX-XX-XXXX.").optional(),sms_code:Ge().trim().min(1,"Required").regex(/^\d{6}$/,"Please enter the 6-digit code."),first_name:Bt,last_name:Bt,middle_name:Vn,co_applicant_first_name:Bt,co_applicant_last_name:Bt,co_applicant_middle_name:Vn,year_built:zt("Year built",1800),year_roof_updated:ge({error:"Please enter a valid 4-digit year."}).int("Year must be a whole number.").min(1e3,"Please enter a valid 4-digit year.").max(9999,"Please enter a valid 4-digit year."),heating_update_year:zt("Heating update year"),plumbing_update_year:zt("Plumbing update year"),electrical_update_year:zt("Electrical update year"),total_area_sq_ft:tu("Square footage",1,999999),sale_price_cents:ge({error:"Purchase Price must be a number."}).min(1,"Purchase Price must be between 1 and 21,474,836.").max(21474836,"Purchase Price must be between 1 and 21,474,836.").int("Purchase Price must be a whole number."),home_prior_years:Ht("Number of years with your prior carrier"),home_continuous_coverage_years:Ht("How long you have had continuous home coverage"),household_size:ge({error:"Household size must be a number."}).min(1,"Occupants must be between 1 and 8.").max(8,"Occupants must be between 1 and 8.").int("Occupants must be between 1 and 8."),number_of_mortgagees:ge({error:"Number of mortgagees must be a number."}).int().min(0,"Number of mortgagees cannot be negative.").max(3,"Number of mortgagees must be between 0 and 3."),dwelling_replacement_cost:bt("Replacement cost",9,1),other_structures_coverage:bt("Other structures",9),personal_property_coverage:bt("Personal property",7),loss_of_use_coverage:bt("Loss of use coverage",8),years_at_address:ge({error:"Years at address must be a number."}).int().min(0,"Years at address cannot be negative.").max(100,"Years at address must be 100 or less."),months_at_address:ge({error:"Months at address must be a number."}).int().min(0,"Months at address cannot be negative.").max(11,"Months at address must be between 0 and 11."),years_at_prior_address:ge({error:"Years at prior address must be a number."}).int().min(0,"Years at prior address cannot be negative.").max(100,"Years at prior address must be 100 or less."),number_of_units:ge({error:"Number of units must be a number."}).int().min(1,"Number of units/apartments should be greater than 0.").max(99,"Number of units/apartments must be between 1 and 99."),number_of_families:ge({error:"Number of families must be a number."}).int("Number of families must be a whole number.").refine(e=>e>=1&&e<=5,{message:"Number of families must be between 1 and 5."}),number_of_dogs:ge({error:"Number of dogs must be a number."}).int().min(0,"Number of dogs must be between 0 and 99.").max(99,"Number of dogs must be between 0 and 99."),distance_to_coast_miles:ge({error:"Distance to coast must be a number."}).int().min(0,"Distance to coast cannot be negative.").max(9999,"Distance to coast must be at most 4 digits."),amount_paid_cents:bt("Amount paid",7),license_number:Ge().trim().min(1,"Required").max(20,"License number must be 20 characters or fewer.").regex(/^[A-Z0-9]+$/i,"License number must contain only letters and numbers."),vin:Ge().superRefine((e,t)=>{if(typeof e!="string"||e.trim()==="")return;if(/\s/.test(e)){t.addIssue({code:vr.custom,message:"VIN cannot contain spaces."});return}const r=e.trim();/^[A-HJ-NPR-Z0-9]{17}$/i.test(r)||t.addIssue({code:vr.custom,message:"VIN must be exactly 17 letters and numbers (excluding I, O, and Q)."})}),annual_mileage:ge({error:"Annual mileage must be a number."}).int("Annual mileage must be a whole number.").min(1e3,"Vehicle annual use should be between 1,000 & 100,000 miles.").max(1e5,"Vehicle annual use should be between 1,000 & 100,000 miles."),miles_to_work:ge({error:"Miles driven to work/school must be a number."}).int("Miles driven to work/school must be a whole number.").min(1,"Please enter a value greater than 0.").max(9999,"Miles driven to work/school must be between 1 and 9,999."),custom_equipment_value_cents:lt("Modifications value",9999999),cost_new_value_cents:lt("Cost new value",9999999),stated_value_amount_cents:lt("Stated Value Amount",9999999),property_damage_amount_paid_cents:lt("Property damage amount paid",9999999),personal_injury_amount_paid_cents:lt("Personal injury amount paid",9999999),auto_current_annual_premium_cents:lt("Current annual premium",9999999),auto_prior_years:Ht("Years with prior auto carrier"),auto_prior_months:ge({error:"Months with prior carrier must be a number."}).int().min(0,"Months with prior carrier must be between 0 and 11.").max(11,"Months with prior carrier must be between 0 and 11."),auto_continuous_coverage_years:Ht("Years with continuous auto coverage")};function pe(e){return new Date(`${e}T00:00:00Z`)}function Ae(){const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))}function je(e,t){let r=t.getUTCFullYear()-e.getUTCFullYear();const n=t.getUTCMonth()-e.getUTCMonth();return(n<0||n===0&&t.getUTCDate()<e.getUTCDate())&&r--,r}const Yn=[{targetKey:"social_security_number",dependsOn:["social_security_number","state"],validate:e=>{if(!("social_security_number"in e)||!xt(e.state))return;const t=e.social_security_number;return(typeof t=="string"?t.trim():"")===""?"Social Security Number is required in New Jersey.":void 0}},{targetKey:"date_of_birth",dependsOn:["date_of_birth"],validate:e=>{const t=e.date_of_birth;if(!t||typeof t!="string")return;const r=pe(t);return isNaN(r.getTime())?"Invalid date.":r.getUTCFullYear()<1900?"Date of birth year can't be earlier than 1900.":je(r,Ae())<18?"Applicant can't be under the age of 18.":void 0}},{targetKey:"co_applicant_date_of_birth",dependsOn:["co_applicant_date_of_birth"],validate:e=>{const t=e.co_applicant_date_of_birth;if(!t||typeof t!="string")return;const r=pe(t);return isNaN(r.getTime())?"Invalid date.":r.getUTCFullYear()<1900?"Date of birth year can't be earlier than 1900.":je(r,Ae())<16?"Co-applicant can't be under the age of 16.":void 0}},{targetKey:"year_roof_updated",dependsOn:["year_roof_updated","year_built"],validate:e=>{const t=Number(e.year_roof_updated),r=Number(e.year_built);if(isNaN(t))return;const n=isNaN(r)?1e3:r;if(t<n||t>jn)return"Roof renovation/replacement year must be between the home's build year and the current year."}},{targetKey:"move_in_date",dependsOn:["move_in_date","year_built"],validate:e=>{const t=e.move_in_date,r=e.year_built;if(!t||r==null)return;const n=pe(String(t));if(isNaN(n.getTime()))return;const o=Number(r);if(!isNaN(o))return n.getUTCFullYear()<o?"Purchase date cannot be prior to the year the building was originally constructed.":void 0}},{targetKey:"date_first_licensed",dependsOn:["date_first_licensed"],validate:e=>{const t=e.date_first_licensed;if(!t||typeof t!="string")return;const r=pe(t);return isNaN(r.getTime())?"Invalid date.":r>Ae()?"Date first licensed cannot be in the future.":void 0}},{targetKey:"date_first_licensed",dependsOn:["date_first_licensed","date_of_birth"],validate:e=>{const t=e.date_first_licensed,r=e.date_of_birth;if(!t||typeof t!="string"||!r||typeof r!="string")return;const n=pe(r),o=pe(t);if(isNaN(n.getTime())||isNaN(o.getTime()))return;if(o<n)return"Date licensed cannot be before driver date of birth.";const i=new Date(Date.UTC(n.getUTCFullYear()+18,n.getUTCMonth(),n.getUTCDate()));return o<i?"Driver can't be licensed to drive before the age of 18.":void 0}},{targetKey:"occurred_at",dependsOn:["occurred_at"],validate:e=>{const t=e.occurred_at;if(!t||typeof t!="string")return;const r=pe(t);return isNaN(r.getTime())?"Invalid date.":r>Ae()?"Incident date cannot be in the future.":void 0}},{targetKey:"accident_prevention_course_date",dependsOn:["accident_prevention_course_date"],validate:e=>{const t=e.accident_prevention_course_date;if(!t||typeof t!="string")return;const r=pe(t);return isNaN(r.getTime())?"Invalid date.":r>Ae()?"Course date cannot be in the future.":void 0}},{targetKey:"effective_date",dependsOn:["effective_date"],validate:e=>{const t=e.effective_date;if(!t||typeof t!="string")return;const r=pe(t);if(isNaN(r.getTime()))return"Invalid date.";const n=Ae(),o=new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth()+3,n.getUTCDate()));if(r<n)return"Insurance start date cannot be in the past.";if(r>o)return"Insurance must begin within 3 months from today."}},{targetKey:"years_at_address",dependsOn:["years_at_address","date_of_birth"],validate:e=>{const t=e.years_at_address,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const o=pe(r);if(isNaN(o.getTime()))return;const i=je(o,Ae());return n>i?"Time at address cannot be greater than the applicant age.":void 0}},{targetKey:"years_at_prior_address",dependsOn:["years_at_prior_address","date_of_birth"],validate:e=>{const t=e.years_at_prior_address,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const o=pe(r);if(isNaN(o.getTime()))return;const i=je(o,Ae());return n>i?"Years at prior address cannot be greater than the applicant age.":void 0}},{targetKey:"home_prior_years",dependsOn:["home_prior_years","home_continuous_coverage_years"],validate:e=>{const t=e.home_prior_years,r=e.home_continuous_coverage_years;if(t==null||r==null)return;const n=Number(t),o=Number(r);if(!(isNaN(n)||isNaN(o)))return n>o?"Years with prior carrier cannot be higher than years with continuous coverage.":void 0}},{targetKey:"home_prior_years",dependsOn:["home_prior_years","date_of_birth"],validate:e=>{const t=e.home_prior_years,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const o=pe(r);if(isNaN(o.getTime()))return;const i=je(o,Ae());return n>i?"Years with prior carrier cannot be greater than the Applicant's age.":void 0}},{targetKey:"home_continuous_coverage_years",dependsOn:["home_continuous_coverage_years","date_of_birth"],validate:e=>{const t=e.home_continuous_coverage_years,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const o=pe(r);if(isNaN(o.getTime()))return;const i=je(o,Ae());return n>i?"Years with continuous home coverage cannot be greater than the Applicant's age.":void 0}},{targetKey:"move_in_date",dependsOn:["move_in_date"],validate:e=>{const t=e.move_in_date;if(!t||typeof t!="string")return;const r=pe(t);return isNaN(r.getTime())?"Invalid date.":r>Ae()?"Purchase date cannot be in the future.":void 0}},{targetKey:"date_of_incident",dependsOn:["date_of_incident"],validate:e=>{const t=e.date_of_incident;if(!t||typeof t!="string")return;const r=pe(t);if(isNaN(r.getTime()))return"Invalid date.";const n=Ae();return r>n?"Loss date cannot be in the future.":void 0}},{targetKey:"home_prior_expiration_date",dependsOn:["home_prior_expiration_date"],validate:e=>{const t=e.home_prior_expiration_date;if(!t||typeof t!="string")return;const r=pe(t);if(isNaN(r.getTime()))return"Invalid date.";const n=Ae(),o=new Date(Date.UTC(n.getUTCFullYear()-1,n.getUTCMonth(),n.getUTCDate())),i=new Date(Date.UTC(n.getUTCFullYear()+1,n.getUTCMonth(),n.getUTCDate()));if(r<o||r>i)return"Policy expiration date must be between 1 year ago and 1 year from now."}},{targetKey:"purchase_date",dependsOn:["purchase_date"],validate:e=>{const t=e.purchase_date;if(!t||typeof t!="string")return;const r=pe(t);return isNaN(r.getTime())?"Invalid date.":r>Ae()?"Vehicle purchase date cannot be in the future.":void 0}},{targetKey:"purchase_date",dependsOn:["purchase_date","year"],validate:e=>{const t=e.purchase_date,r=e.year;if(!t||typeof t!="string"||r==null)return;const n=pe(t);if(isNaN(n.getTime()))return;const o=Number(r);if(!isNaN(o))return n.getUTCFullYear()<o?"The year the vehicle was purchased is not valid with the model year.":void 0}},{targetKey:"auto_prior_expiration_date",dependsOn:["auto_prior_expiration_date"],validate:e=>{const t=e.auto_prior_expiration_date;if(!t||typeof t!="string")return;const r=pe(t);if(isNaN(r.getTime()))return"Invalid date.";const n=Ae(),o=new Date(Date.UTC(n.getUTCFullYear()-1,n.getUTCMonth(),n.getUTCDate())),i=new Date(Date.UTC(n.getUTCFullYear()+1,n.getUTCMonth(),n.getUTCDate()));if(r<o||r>i)return"Auto policy expiration date must be between 1 year ago and 1 year from now."}},{targetKey:"auto_prior_years",dependsOn:["auto_prior_years","auto_continuous_coverage_years"],validate:e=>{const t=e.auto_prior_years,r=e.auto_continuous_coverage_years;if(t==null||r==null)return;const n=Number(t),o=Number(r);if(!(isNaN(n)||isNaN(o)))return n>o?"Years with prior auto carrier cannot be higher than years with continuous coverage.":void 0}},{targetKey:"auto_prior_years",dependsOn:["auto_prior_years","date_of_birth"],validate:e=>{const t=e.auto_prior_years,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const o=pe(r);if(isNaN(o.getTime()))return;const i=je(o,Ae());return n>i?"Years with prior auto carrier cannot be greater than the Applicant's age.":void 0}},{targetKey:"auto_continuous_coverage_years",dependsOn:["auto_continuous_coverage_years","date_of_birth"],validate:e=>{const t=e.auto_continuous_coverage_years,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const o=pe(r);if(isNaN(o.getTime()))return;const i=je(o,Ae());return n>i?"Years with continuous auto coverage cannot be greater than the Applicant's age.":void 0}},{targetKey:"vehicle_coll_deductible",dependsOn:["vehicle_coll_deductible","vehicle_comp_deductible"],validate:e=>{const t=e.vehicle_coll_deductible,r=e.vehicle_comp_deductible;if(!(!t||typeof t!="string"||!r||typeof r!="string")&&r==="NoCoverage"&&t!=="NoCoverage")return"Collision Coverage cannot be chosen if Comprehensive is No Coverage."}},{targetKey:"policy_um",dependsOn:["policy_um","policy_bi"],validate:e=>{const t=e.policy_um,r=e.policy_bi;if(!t||typeof t!="string"||!r||typeof r!="string"||t==="Reject"||r==="Dontknow")return;const n=u=>u.endsWith("CSL"),o=n(t),i=n(r);if(o&&!i)return"A Combined Single Limit cannot be selected for Uninsured/Underinsured Motorist unless a Combined Single Limit has also been selected for Liability.";const a={cov30to60:30,cov50to100:50,cov100to100:100,cov100to300:100,cov250to500:250,cov300to300:300,cov500to500:500,cov100CSL:100,cov300CSL:300,cov500CSL:500},s=a[t],l=a[r];if(s!=null&&l!=null&&s>l)return"Uninsured/Underinsured Motorist Limit value cannot be greater than Bodily Injury Limit value."}},{targetKey:"policy_umpd",dependsOn:["policy_umpd","policy_pd"],validate:e=>{const t=e.policy_umpd,r=e.policy_pd;if(!t||typeof t!="string"||!r||typeof r!="string"||t==="NoCoverage"||r==="Dontknow")return;const n=a=>{if(!a.startsWith("cov"))return null;const s=parseInt(a.replace("cov",""),10);return isNaN(s)?null:s},o=n(t),i=n(r);if(o!=null&&i!=null&&o>i)return"Uninsured Motorist Property Damage Limit value cannot be greater than Liability Property Damage Limit value."}},{targetKey:"custom_equipment_value_cents",dependsOn:["custom_equipment_value_cents","stated_value_amount_cents"],validate:e=>{const t=e.custom_equipment_value_cents,r=e.stated_value_amount_cents;if(t==null||r==null)return;const n=Number(t),o=Number(r);if(!(isNaN(n)||isNaN(o))&&o>0&&n>0)return"Modifications should be included in the stated value of the vehicle. If a stated value quote is not required, remove the stated value."}}];function Sr(e,t){const r=ru[e];if(!r)return;const n=r.safeParse(t);return n.success?void 0:n.error.issues[0].message}function Kn(e){if(/\s/.test(e))return!1;const t=e.trim();return t.length===17&&/^[A-HJ-NPR-Z0-9]{17}$/i.test(t)}function nu(e,t){const r={};for(const n of Yn){if(t?.has(n.targetKey))continue;const o=n.validate(e);o&&(r[n.targetKey]=o)}return r}function Ar(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function vt(e,t){return e.key??`${Ar(e.question)}-${t}`}function Ve(e,t){return t==="number"?e==null||typeof e=="string"&&e.trim()==="":t==="checkbox"?e!==!0:e==null||typeof e=="string"&&e.trim()===""}function Rt(e,t){const r={};e.forEach((a,s)=>{const l=vt(a,s),u=t[l];if(a.required&&Ve(u,a.inputType)){r[l]="Required";return}if(!Ve(u,a.inputType)){const d=Sr(l,u);if(d){r[l]=d;return}}});const n={...t};e.forEach((a,s)=>{const l=vt(a,s);l in n||(n[l]="")});const o=new Set(Object.keys(r).filter(a=>r[a])),i=nu(n,o);for(const[a,s]of Object.entries(i))r[a]=s;return r}function ou(e){if(e===""||e===null||e===void 0)return;const t=Number(e);return Number.isNaN(t)?void 0:t}const iu={NoPriorInsurance:"No Prior Insurance",TwentyFirstCentury:"21st Century",ACentral:"A.Central",AAA:"AAA",AARP:"AARP",Acadia:"Acadia",Ace:"Ace",Acuity:"Acuity",AdirondackInsExchange:"Adirondack Ins Exchange",Aegis:"Aegis",AIC:"AIC",AIG:"AIG",AlfaAlliance:"Alfa Alliance",Allied:"Allied",Allstate:"Allstate",AmericaFirst:"America First",AmericanCommerce:"American Commerce",AmericanFamily:"American Family",Amica:"Amica",ASILloyds:"ASI Lloyds",AustinMutual:"Austin Mutual",Autoone:"Autoone",AutoOwners:"Auto-Owners",BadgerMutual:"Badger Mutual",Balboa:"Balboa",Bankers:"Bankers",BeaconNational:"Beacon National",BrethernMutual:"Brethern Mutual",BristolWest:"Bristol West",CapitalInsuranceGroup:"Capital Insurance Group",Celina:"Celina",CentralMutualOfOH:"Central Mutual of OH",Chubb:"Chubb",Cincinnati:"Cincinnati",Clearcover:"Clearcover",CNA:"CNA",ColonialPenn:"Colonial Penn",ColoradoCasualty:"Colorado Casualty",Columbia:"Columbia",CommerceWest:"Commerce West",CommonwealthCasualty:"Commonwealth Casualty",Ameriprise:"CONNECT",ConstitutionalCasualty:"Constitutional Casualty",Cornerstone:"Cornerstone",Countrywide:"Countrywide",CSE:"CSE",Cumberland:"Cumberland",Dairyland:"Dairyland",Deerbrook:"Deerbrook",Direct:"Direct",Donegal:"Donegal",Drive:"Drive",Electric:"Electric",EMC:"EMC",Encompass:"Encompass",Erie:"Erie",Esurance:"Esurance",Explorer:"Explorer",FarmBureau:"Farm Bureau",Farmers:"Farmers",FiremansFund:"Firemans Fund",FirstAmerican:"First American",Foremost:"Foremost",Geico:"Geico",GeneralCasualty:"General Casualty",GermantownMutual:"Germantown Mutual",GMAC:"GMAC",Grange:"Grange",GreatAmerican:"Great American",Grinnell:"Grinnell",GuideOne:"Guide One",Hanover:"Hanover",Harbor:"Harbor",Harleysville:"Harleysville",HartfordOMNI:"Hartford OMNI",Hartford:"Hartford",HastingsMutual:"Hastings Mutual",HawkeyeSecurity:"Hawkeye Security",HDI:"HDI",HoraceMann:"Horace Mann",HoustonGeneral:"Houston General",IFA:"IFA",ImperialCasualty:"Imperial Casualty",IndianaFarmers:"Indiana Farmers",Indiana:"Indiana",Infinity:"Infinity",Insurequest:"Insurequest",Integon:"Integon",Integrity:"Integrity",Kemper:"Kemper",LibertyMutual:"Liberty Mutual",LibertyNorthwest:"Liberty Northwest",MainStreetAmerica:"Main Street America",Mapfre:"Mapfre",Mendota:"Mendota",MerchantsGroup:"Merchants Group",Mercury:"Mercury",Metlife:"MetLife",Metropolitan:"Metropolitan",MidContinent:"Mid-Continent",MidwesternIndemnity:"Midwestern Indemnity",Montgomery:"Montgomery",MSA:"MSA",MtWashington:"Mt. Washington",MutualBenefit:"Mutual Benefit",NationalGeneral:"National General",Nationwide:"Nationwide",NewYorkCentralMutual:"New York Central Mutual",NJManufacturers:"NJ Manufacturers",NJSkylands:"NJ Skylands",Northstar:"Northstar",Occidental:"Occidental",OhioCasualty:"Ohio Casualty",OmahaPC:"Omaha P/C",OneBeacon:"One Beacon",OregonMutual:"Oregon Mutual",Palisades:"Palisades",PeerlessMontgomery:"Peerless/Montgomery",Pekin:"Pekin",Pemco:"Pemco",PennNational:"Penn National",PlymouthRock:"Plymouth Rock",PreferredMutual:"Preferred Mutual",Proformance:"Proformance",Progressive:"Progressive",Prudential:"Prudential",Republic:"Republic",RockfordMutual:"Rockford Mutual",RoyalAndSunAlliance:"Royal and Sun Alliance",Safeco:"Safeco",SECURA:"SECURA",Selective:"Selective",SouthernCounty:"Southern County",SouthernMutual:"Southern Mutual",SouthernTrust:"Southern Trust",StPaulTravelers:"St. Paul/Travelers",StandardMutual:"Standard Mutual",StarCasualty:"Star Casualty",StateAuto:"State Auto",StateFarm:"State Farm",Fidelity:"Stillwater",Travelers:"Travelers",TWFG:"TWFG",Unigard:"Unigard",UnitedFireAndCasualty:"United Fire and Casualty",Unitrin:"Unitrin",Universal:"Universal",USAA:"USAA",UticaNational:"Utica National",Victoria:"Victoria",WestBend:"West Bend",WesternNational:"Western National",WesternReserveGroup:"Western Reserve Group",Westfield:"Westfield",WhiteMountains:"White Mountains",WilsonMutual:"Wilson Mutual",Windsor:"Windsor",Zurich:"Zurich",OtherStandard:"Other Standard",OtherNonStandard:"Other Non-Standard"},au={OwnHome:"Own Home",OwnCondo:"Own Condo",RentHome:"Rent Home",RentCondo:"Rent Condo",RentApartment:"Rent Apartment",LiveWithParents:"Live With Parents"},su={TwentyFirstCentury:"21st Century",AAA:"AAA",Acuity:"Acuity",AdirondackInsExchange:"Adirondack Ins Exchange",AIG:"AIG",AlfaAlliance:"Alfa Alliance",AllianzOfAmerica:"Allianz of America",AllianzOfAmericaJefferson:"Allianz of America-Jefferson",Allied:"Allied",Allmerica:"Allmerica",Allstate:"Allstate",AmericaFirst:"America First",AmericanFamily:"American Family",AmericanCommerce:"American Commerce",Amica:"Amica",ASILloyds:"ASI Lloyds",Assurant:"Assurant",AtlasGeneralAgency:"Atlas General Agency",AustinMutual:"Austin Mutual",AutoOwners:"Auto-Owners",BadgerMutual:"Badger Mutual",Balboa:"Balboa",Bamboo:"Bamboo",BeaconNational:"Beacon National",BunkerHill:"Bunker Hill",CapitalInsuranceGroup:"Capital Insurance Group",CentralMutualOfOH:"Central Mutual of OH",ChubbInsurance:"Chubb",Cincinnati:"Cincinnati",Citizens:"Citizens",ColoradoCasualty:"Colorado Casualty",Ameriprise:"CONNECT",CSE:"CSE",Cumberland:"Cumberland",Cypress:"Cypress",Dairyland:"Dairyland",Donegal:"Donegal",Electric:"Electric",EMC:"EMC",Encompass:"Encompass",Erie:"Erie",Esurance:"Esurance",ExcelsiorInsuranceCompany:"Excelsior Insurance Company",FairPlan:"Fair Plan",FarmBureau:"Farm Bureau",Farmers:"Farmers",FiremansFund:"Firemans Fund",FirstAmerican:"First American",ForemostInsuranceCompany:"Foremost Insurance Company",Geico:"Geico",GeneralCasualty:"General Casualty",GermantownMutual:"Germantown Mutual",GMAC:"GMAC",Grange:"Grange",Grinnell:"Grinnell",GuideOne:"Guide One",Hanover:"Hanover",Harleysville:"Harleysville",Hartford:"Hartford",HartfordOMNI:"Hartford OMNI",HawkeyeSecurity:"Hawkeye Security",HippoInsuranceCompany:"Hippo Insurance Company",HomeownersOfAmerica:"Homeowners of America",Homesite:"Homesite",HoraceMann:"Horace Mann",HoustonGeneral:"Houston General",Indiana:"Indiana",IndianaFarmers:"Indiana Farmers",Integrity:"Integrity",Kemper:"Kemper",LibertyMutual:"Liberty Mutual",LibertyNorthwest:"Liberty Northwest",Lloyds:"Lloyds",MainStreetAmerica:"Main Street America",MarkelInsuranceCompany:"Markel Insurance Company",MerchantsGroup:"Merchants Group",Mercury:"Mercury",Metlife:"MetLife",MidwesternIndemnity:"Midwestern Indemnity",Montgomery:"Montgomery",MSA:"MSA",MutualBenefit:"Mutual Benefit",Tower:"National General",NatGenPremier:"NatGen Premier",Nationwide:"Nationwide",NationwideScottsdale:"Nationwide-Scottsdale",NewYorkCentralMutual:"New York Central Mutual",NJSkylands:"NJ Skylands",Northstar:"Northstar",OhioCasualty:"Ohio Casualty",OneBeacon:"One Beacon",OregonMutual:"Oregon Mutual",PeerlessMontgomery:"Peerless/Montgomery",Pekin:"Pekin",PennNational:"Penn National",PlymouthRock:"Plymouth Rock",PreferredMutual:"Preferred Mutual",Prudential:"Prudential",PureHighValue:"Pure High Value",Republic:"Republic",RoyalAndSunAlliance:"Royal and Sun Alliance",Safeco:"Safeco",SECURA:"SECURA",SouthernMutual:"Southern Mutual",SouthernTrust:"Southern Trust",StPaulTravelers:"St. Paul/Travelers",StandardMutual:"Standard Mutual",StateAuto:"State Auto",StateFarm:"State Farm",StateFarmFloridaInsuranceCompany:"State Farm Florida Insurance Company",Fidelity:"Stillwater",SunshineStateInsuranceCompany:"Sunshine State Insurance Company",Travelers:"Travelers",TWFG:"TWFG",Unigard:"Unigard",UnitedFireAndCasualty:"United Fire and Casualty",Unitrin:"Unitrin",Universal:"Universal",USAA:"USAA",UticaNational:"Utica National",Wellington:"Wellington",WestBend:"West Bend",WesternNational:"Western National",WesternReserveGroup:"Western Reserve Group",Westfield:"Westfield",WhiteMountains:"White Mountains",WilsonMutual:"Wilson Mutual",Zurich:"Zurich",Other:"Other",OtherNonStandard:"Other Non-Standard",OtherStandard:"Other Standard"},cu={Business:"Business",Pleasure:"Pleasure",Farming:"Farming",To_FromWork:"To/From Work",To_FromSchool:"To/From School"},lu={Dontknow:"Don't Know",ThirtyToSixty:"30/60",FiftyToHundred:"50/100",HundredToHundred:"100/100",HundredToThreeHundred:"100/300",TwoHundredFiftyToFiveHundred:"250/500",ThreeHundredToThreeHundred:"300/300",FiveHundredToFiveHundred:"500/500",HundredCSL:"100CSL",ThreeHundredCSL:"300CSL",FiveHundredCSL:"500CSL"},uu={ActiveMilitaryDuty:"Active Military Duty",DrivingCompanyCar:"Driving A Company Car",DrivingCarOwnedByRelative:"Driving A Car Owned By A Relative",HasNotOwnedOrOperatedVehicle:"Has Not Owned Or Operated A Vehicle",OwnedVehParkedStoredOffRoadNotDriven:"Owned Veh Parked/Stored Off Road/Not Driven",NonPayment:"Non-Payment",Other:"Other"},du={Dontknow:"Don't Know",cov30to60:"30/60",cov35to70:"35/70",cov50to100:"50/100",cov100to100:"100/100",cov100to300:"100/300",cov250to500:"250/500",cov300to300:"300/300",cov500to500:"500/500",cov100CSL:"100 CSL",cov300CSL:"300 CSL",cov500CSL:"500 CSL"},_u={Reject:"Reject",cov30to60:"30/60",cov35to70:"35/70",cov50to100:"50/100",cov100to100:"100/100",cov100to300:"100/300",cov250to500:"250/500",cov300to300:"300/300",cov500to500:"500/500",cov100CSL:"100 CSL",cov300CSL:"300 CSL",cov500CSL:"500 CSL"},fu={Dontknow:"Don't know",cov25000:"25,000",cov50000:"50,000",cov100000:"100,000",cov250000:"250,000",cov500000:"500,000"},mu={None:"None",cov500:"500",cov1000:"1,000",cov2000:"2,000",cov2500:"2,500",cov5000:"5,000",cov10000:"10,000",cov15000:"15,000",cov25000:"25,000",cov50000:"50,000",cov100000:"100,000"},pu={cov25000:"25,000",cov35000:"35,000",cov50000:"50,000",cov100000:"100,000",cov200000:"200,000",cov250000:"250,000",cov300000:"300,000",cov500000:"500,000"},hu={cov15000:"15,000",cov2500:"2,500",cov5000:"5,000",cov10000:"10,000",cov25000:"25,000",cov50000:"50,000",cov100000:"100,000",cov250000:"250,000",cov75000:"75,000",cov150000:"150,000"},gu={NoCoverage:"No Coverage",cov5000:"5,000",cov10000:"10,000"},Cr={NoCoverage:"No Coverage",Zero:"0",Fifty:"50",Hundred:"100",TwoHunderd:"200",TwoHundredfifty:"250",FiveHundred:"500",SeventyFiveHundred:"750",Thousand:"1,000",TwoThousand:"2,000"},yu=["NoCoverage","Zero","Fifty","Hundred","TwoHunderd","TwoHundredfifty","FiveHundred","SeventyFiveHundred","Thousand","TwoThousand"],bu=["NoCoverage","Zero","Fifty","Hundred","TwoHunderd","TwoHundredfifty","FiveHundred","Thousand","TwoThousand"],wr={NoCoverage:"No Coverage",TwentyFive:"25",Forty:"40",Fifty:"50",SeventyFive:"75",Eighty:"80",Hundred:"100",TwelveHundred:"120",TwoHundred:"200",Unlimited:"Unlimited"},vu=["NoCoverage","TwentyFive","Fifty","SeventyFive","Hundred","TwoHundred","Unlimited"],qn={NoCoverage:"No Coverage",cov20to600:"20/600",cov25to750:"25/750",cov30to900:"30/900",cov40to1200:"40/1,200",cov50to1500:"50/1,500",cov100to3000:"100/3,000"},Su=["NoCoverage","cov20to600","cov25to750","cov30to900","cov40to1200","cov50to1500","cov100to3000"],Au=["NoCoverage","cov20to600","cov30to900","cov40to1200","cov50to1500"],Jn={NoHighSchoolDiploma:"No High School Diploma",HighSchoolDiploma:"High School Diploma",SomeCollegeNoDegree:"Some College - No Degree",VocationalTechnicalDegree:"Vocational Technical Degree",AssociatesDegree:"Associates Degree",Bachelors:"Bachelors",Masters:"Masters",Phd:"Phd",MedicalDegree:"Medical Degree",LawDegree:"Law Degree"},Cu={TwoFamilyHome:"2-Family Home",American4square:"American 4-square",Basic:"Basic",BiLevel:"Bi-Level",Bungalow:"Bungalow",CapeCod:"Cape Cod",Colonial:"Colonial",ColonialSpanish:"Colonial - Spanish",CompletelyCustom:"Completely Custom",Contemporary:"Contemporary",ContractorModern:"Contractor Modern",Farmhouse:"Farmhouse",Folk:"Folk",Log:"Log",Mediterranean:"Mediterranean",Ranch:"Ranch",TriLevel:"Tri-Level",Tudor:"Tudor",Vernacular:"Vernacular",Victorian:"Victorian"},wu={SingleFamilyHouse:"Single Family House",Townhouse:"Townhouse",Rowhouse:"Rowhouse",Duplex:"Duplex/Two Family Unit",Triplex:"Tri-plex/Three Family Unit",Fourplex:"Four-plex/Four Family Unit",MultFamily:"Multi-family (more than four units)"},Eu={OwnerPrimary:"Owner Primary",OwnerSecondary:"Owner Secondary",OwnerSeasonal:"Owner Seasonal"},Nu={Basic:"Basic",Modest:"Modest",Average:"Average",AboveAverage:"Above Average",Expensive:"Expensive",VeryExpensive:"Very Expensive",Opulent:"Opulent"},Tu={Frame:"Frame",Masonry:"Masonry",MasonryVeneer:"Masonry Veneer",Log:"Log",Asbestos:"Asbestos",EFIS:"EFIS",HardiPlank:"HardiPlank",SuperiorFireResistive:"Superior Fire Resistive",SuperiorMasonryNonCombustible:"Superior Masonry Non Combustible",SuperiorNonCombustible:"Superior Non Combustible"},ku={Slab:"Slab",Basement:"Basement",CrawlSpace:"Crawl Space",PartialBasement:"Partial Basement",PiersPostsPiles:"Piers / Posts / Piles",Open:"Open"},Ou={NotOverWater:"No",PartiallyOverWater:"Partially Over Water",FullyOrEntirelyOverWater:"Fully or Entirely Over Water"},Iu={One:"1",OneHalf:"1.5",Two:"2",TwoHalf:"2.5",Three:"3",ThreeHalf:"3.5",Four:"4",BiLevel:"Bi-Level",TriLevel:"Tri-Level"},Mu={VinylSiding:"Vinyl Siding",WoodFraming:"Wood Framing",BrickVeneer:"Brick Veneer",Stucco:"Stucco",AdobeBlock:"Adobe Block",AluminumSiding:"Aluminum Siding",CementFiberShingles:"Cement Fiber Shingles",Clapboard:"Clapboard",ConcreteBlock:"Concrete Block",HardboardSiding:"Hardboard Siding",InsulatedConcreteForms:"Insulated Concrete Forms",LightGaugeSteelFraming:"Light Gauge Steel Framing",LogsSolid:"Logs (Solid)",MasoniteSiding:"Masonite Siding",PreEngineeredMetal:"Pre-Engineered Metal",SolidBrickConstruction:"Solid Brick Construction",SolidConcrete:"Solid Concrete",StandardPoleFramed:"Standard Pole Framed",Stone:"Stone",StructuralInsulatedPanels:"Structural Insulated Panels",TimberFraming:"Timber Framing"},Lu={ASPHALT_SHINGLES:"Asphalt Shingles",ARCHITECTURAL_SHINGLES:"Architectural Shingles",METAL:"Metal",TILE_CONCRETE:"Tile (Concrete)",ASBESTOS:"Asbestos",BUILT_UP:"Built-Up",COMPOSITION:"Composition",CONCRETE:"Concrete",COPPER:"Copper",CORRUGATED_STEEL:"Corrugated Steel",FIBERGLASS:"Fiberglass",FOAM:"Foam",GRAVEL:"Gravel",MEMBRANE:"Membrane",MINERAL_FIBER_SHAKE:"Mineral Fiber Shake",PLASTIC:"Plastic",ROCK:"Rock",ROLLED_PAPER:"Rolled Paper",RUBBER:"Rubber",SLATE:"Slate",TAR:"Tar",TAR_GRAVEL:"Tar and Gravel",TILE_CLAY:"Tile (Clay)",TILE_MISSION:"Tile (Mission)",TILE_SPANISH:"Tile (Spanish)",TIN:"Tin",WOOD_FIBERGLASS_SHINGLES:"Wood/Fiberglass Shingles",WOOD_SHAKE:"Wood Shake",WOOD_SHINGLES:"Wood Shingles",OTHER:"Other"},Du={B_Gable:"Gable",C_Hip:"Hip",A_Flat:"Flat",D_Other:"Other"},Pu={NotUpdated:"Not Updated",PartialUpdate:"Partial Update",CompleteUpdate:"Complete Update"},Fu={Electric:"Electric",Gas:"Gas",GasForcedAir:"Gas - Forced Air",GasHotWater:"Gas - Hot Water",Oil:"Oil",OilForcedAir:"Oil - Forced Air",OilHotWater:"Oil - Hot Water",SolidFuel:"Solid Fuel",HeatPump:"Heat Pump",Other:"Other"},$u={AboveGround:"Above Ground",BelowGround:"Below Ground"},xu={Basement:"Below Grade Basement",SplitLevelBasement:"Split Level Basement",WalkoutBasement:"Walkout Basement"},Bu={EntirelyCopper:"Entirely Copper",EntirelyGalvanized:"Entirely Galvanized",EntirelyPEX:"Entirely PEX",EntirelyPVC:"Entirely PVC",Polybutylene:"Polybutylene"},zu={TwentyFive:"$25,000",Fifty:"$50,000",OneHundred:"$100,000",TwoHundred:"$200,000",ThreeHundred:"$300,000",FourHundred:"$400,000",FiveHundred:"$500,000"},Hu={cov1000:"$1,000",cov2000:"$2,000",cov3000:"$3,000",cov4000:"$4,000",cov5000:"$5,000"},Ru={TwoHundredFifty:"$250",FiveHundred:"$500",SevenHundredFifty:"$750",OneThousand:"$1,000",OneThousandFiveHundred:"$1,500",TwoThousand:"$2,000",TwoThousandFiveHundred:"$2,500",ThreeThousands:"$3,000",FourThousands:"$4,000",FiveThousands:"$5,000",OnePercent:"1%",TwoPercent:"2%",ThreePercent:"3%",FourPercent:"4%",FivePercent:"5%"},Uu={None:"None",OnePercent:"1%",TwoPercent:"2%",FivePercent:"5%",TenPercent:"10%"},Zu={_0_500ft:"0-500 Feet",_501_1000ft:"501-1000 Feet",_1001ftAndGreater:"1001 Feet And Greater"},Wu={Lessthan5miles:"Less Than 5 Miles",Over5miles:"Over 5 Miles",NotAvailable:"Not Available"},Qn={"Agriclt/Forestry/Fish":"Agriculture/Forestry/Fishing","Art/Design/Media":"Art/Design/Media","Banking/Finance/RE":"Banking/Finance/Real Estate","Business/Sales/Offi":"Business/Sales/Office","Construct/EnrgyTrds":"Construction/Energy Trades",Disabled:"Disabled","Education/Library":"Education/Library","Engr/Archt/Sci/Math":"Engineer/Architect/Science/Math","Government/Military":"Government/Military","Homemaker/Houseprsn":"Homemaker/House Person","Info Tech":"Information Technology",Insurance:"Insurance","Lgl/Law Enfcmt/Sec":"Legal/Law Enforcement/Security","Maint/Rpr/Hsekeep":"Maintenance/Repair/Housekeeping","Mfg/Production":"Manufacturing/Production","Med/Soc Svcs/Relig":"Medical/Social Services/Religion",Other:"Other","Person.Care/Service":"Personal Care/Service","Rest/Hotel Services":"Restaurant/Hotel Services",Retired:"Retired","Sports/Recreation":"Sports/Recreation",Student:"Student","Trvl/Trnsprt/Warehs":"Travel/Transportation/Warehousing",Unemployed:"Unemployed"},Xn={Single:"Single",Married:"Married",Seperated:"Separated",Divorced:"Divorced",Widowed:"Widowed",DomesticPartner:"Domestic Partner"},eo={Female:"Female",Male:"Male"},to={"Agriclt/Forestry/Fish":"Agriculture/Forestry/Fishing","Art/Design/Media":"Art/Design/Media","Banking/Finance/RE":"Banking/Finance/Real Estate","Business/Sales/Offi":"Business/Sales/Office","Construct/EnrgyTrds":"Construction/Energy Trades",Disabled:"Disabled","Education/Library":"Education/Library","Engr/Archt/Sci/Math":"Engineer/Architect/Science/Math","Government/Military":"Government/Military","Homemaker/Houseprsn":"Homemaker/House person","Info Tech":"Information Technology",Insurance:"Insurance","Lgl/Law Enfcmt/Sec":"Legal/Law Enforcement/Security","Maint/Rpr/Hsekeep":"Maintenance/Repair/Housekeeping","Mfg/Production":"Manufacturing/Production","Med/Soc Svcs/Relig":"Medical/Social Services/Religion",Other:"Other","Person.Care/Service":"Personal Care/Service","Rest/Hotel Services":"Restaurant/Hotel Services",Retired:"Retired","Sports/Recreation":"Sports/Recreation",Student:"Student","Trvl/Trnsprt/Warehs":"Travel/Transportation/Warehousing",Unemployed:"Unemployed"},Gu={CONTAMINATION:"Contamination",CREDITCARD:"Credit Card",DAMAGETOPROPERTYOFOTHERS:"Damage To Property Of Others",DOGBITELIABILITY:"Dog Bite",EARTHMOVEMENT:"Earth Movement",EARTHQUAKE:"Earthquake",EXTENDEDCOVERAGEPERILS:"Extended Coverage Perils",FIRE:"Fire",FLOOD:"Flood",FREEZINGWATERINCLUDINGBURSTPIPES:"Freezing Water",HAIL:"Hail",HURRICANE:"Hurricane",LIABILITYALLOTHER:"Liability",LIGHTNING:"Lightning",MEDICALPAYMENTS:"Medical Payments",MYSTERIOUSDISAPPEARANCE:"Mysterious Disappearance",MYSTERIOUSDISAPPEARANCESCHEDULEDPROPERTY:"Mysterious Disappearance - Scheduled Property",PHYSICALDAMAGEALLOTHER:"Physical Damage",SINKHOLE:"Sinkhole",SLIPFALLLIABILITY:"Slip/Fall",SMOKE:"Smoke",THEFTSCHEDULEDPROPERTY:"Theft - Scheduled Property",THEFTBURGLARY:"Theft - Burglary",TORNADO:"Tornado",VANDALISMMALICIOUSMISCHIEF:"Vandalism",WATERDAMAGE:"Water Damage",WIND:"Wind",WORKERSCOMPENSATION:"Workers Compensation",ALLOTHER:"All Other"},ju={Verbal_Threshold:"Limited right to sue",Zero_Threshold:"Unlimited right to sue"},Vu={Primary:"Primary",Secondary:"Secondary"},Yu={cov1000:"$1,000",cov10000:"$10,000"},Ku={cov100_10400_LIMITED:"100 - 10,400/ LIMITED",cov125_13000_LIMITED:"125 - 13,000/ LIMITED",cov175_18200_LIMITED:"175 - 18,200/ LIMITED",cov250_26000_LIMITED:"250 - 26,000/ LIMITED",cov400_41600_LIMITED:"400 - 41,600/ LIMITED",cov500_52000_LIMITED:"500 - 52,000/ LIMITED",cov600_62400_LIMITED:"600 - 62,400/ LIMITED",cov700_72800_LIMITED:"700 - 72,800/ LIMITED",cov100_UNLIMITED:"100/UNLIMITED",cov125_UNLIMITED:"125/UNLIMITED",cov175_UNLIMITED:"175/UNLIMITED",cov250_UNLIMITED:"250/UNLIMITED",cov400_UNLIMITED:"400/UNLIMITED",cov500_UNLIMITED:"500/UNLIMITED",cov600_UNLIMITED:"600/UNLIMITED",cov700_UNLIMITED:"700/UNLIMITED"},qu={cov250:"$250",cov500:"$500",cov1000:"$1,000",cov2000:"$2,000",cov2500:"$2,500"},Ju={"Agriclt/Forestry/Fish":["Agr Inspect/Grader","Arborist","Clerk","Equip. Operator","Farm/Ranch Owner","Farm/Ranch Worker","Fisherman","Florist","Laborer/Worker","Landscape/NursryWkr","Landscaper","Logger","Millworker","Other","Ranger","Supervisor","Timber Grader/Scale"],"Art/Design/Media":["Actor","Admin Assist","Announcer/Broadcstr","Artist/Animator","Author/Writer","Choreography/Dancer","Clerk","Composer/Director","Curator","Designer","Editor","Journalist/Reporter","Musician/Singer","Other","Printer","Producer","Production Crew","Projectionist","Receptionist/Sec","Ticket Sales/Usher"],"Banking/Finance/RE":["Accountant/Auditor","Admin Assist","Analyst/Broker","Bookkeeper","Branch Manager","Clerk","Collections","Consultant","Controller","CSR/Teller","Director/Administr","Executive","Financial Advisor","Investment Banker","Investor","Loan/EscrowProcess","Mgr-Credit/Loan","Mgr-Portfolio/Prod.","Mgr-Property","Other","Realtor","Receptionist/Sec","SalesAgt/Represent.","Trader,Finan Instru","Underwriter"],"Business/Sales/Offi":["Account Executive","Admin Assist","Buyer","Clerk-Office","Consultant","CSR","Director/Administr","Executive","H.R. Representative","Marketing Researchr","Messenger/Courier","Mgr - District","Mgr - Finance","Mgr-Dept/Store","Mgr-General Opers","Mgr-H.R./PublicRel","Mgr-Mkt/Sales","Mgr/Supervisr-Offic","Other","Receptionist/Sec","Sales-Counter/Rentl","Sales-Home Based","Sales-Mfg Rep","Sales-Retail/Whlsle","Sales-Route/Vendor"],"Construct/EnrgyTrds":["Boiler Oper/Maker","Bricklayer/Mason","Carpenter","Carpet Installer","Concrete Worker","Constrct Proj Mgr","Contractor","Crane Operator","Electrician/Linesmn","ElevatorTech/Instl","Equip. Operator","FloorLayer/Finisher","Foreman/Supervisor","Handyman","Heat/Air Technician","Inspector","Laborer/Worker","Metalworker","Miner","Oil/GasDril/RigOpr","Other","Painter","Plstr/Drywall/Stuc","Plumber","Roofer"],Disabled:["Disabled"],"Education/Library":["Admin Assist","Audio-Visual Tech.","Child/DayCare Wrker","Clerk","Counselor","Grad. Teaching/Asst","Instructor-Vocation","Librarian/Curator","Other","Professor, College","Receptionist/Sec","Superintendent","Teacher, College","Teacher, K-12","Teaching Asst/Aide","Tutor"],"Engr/Archt/Sci/Math":["Actuary","Admin Assist","Analyst","Architect","Clerk","Clinical Data Coord.","Drafter","Engineer","Manager-Project","Manager-R&D","Mathematician","Other","Receptionist/Sec","Research Prog. Dir.","Researcher","Scientist","Sociologist","Surveyor/Mapmaker","Technician"],"Government/Military":["Accountant/Auditor","Admin Assist","Analyst","Attorney","Chief Executive","Clerk","Commissioner","Council member","Director/Administr","Enlst Mil Prsnl E1-4","Legislator","Mayor/City Manager","Meter Reader","NCO (E5-9)","Officer-Commissiond","Officer-Warrant","Other","Park Ranger","Planner","Postmaster","Receptionist/Sec","Regulator","US Postal Worker"],"Homemaker/Houseprsn":["Homemaker/Houseprsn"],"Info Tech":["Admin Assist","Analyst","Clerk","Director/Administr","Engineer-Hardware","Engineer-Software","Engineer-Systems","Executive","Manager-Systems","Network Admin","Other","Programmer","Project Coordinator","Receptionist/Sec","Support Technician","Systems Security","Technical Writer","Web Developer"],Insurance:["Accountant/Auditor","Actuarial Clerk","Actuary","Admin Assist","Agent/Broker","Analyst","Attorney","Claims Adjuster","Clerk","Commissioner","CSR","Director/Administr","Executive","Other","Product Manager","Receptionist/Sec","Sales Rep","Underwriter"],"Lgl/Law Enfcmt/Sec":["Airport Sec Ofcr","Animal Control Ofcr","Attorney","Bailiff","Corrections Officer","Court Clrk/Reporter","Deputy Sheriff","Dispatcher","Examiner","Fed Agt/Marshall","Fire Chief","Fire Fighter/Supv.","Gaming Ofcr/Invest","Highway Patrol Ofcr","Judge/Hearing Ofcr","Legal Asst./Sec","Other","Paralegal/Law Clerk","Police Chief","Police Det/Investgr","Police Offcr/Supvr","Process Server","Prvt Invest/Detec.","Security Guard","Sheriff"],"Maint/Rpr/Hsekeep":["Bldg Maint Engineer","Custodian/Janitor","Electrician","Field Service Tech.","Handyman","Heat/AirCond Repair","Housekeeper/Maid","Lndscpe/Grnds Maint","Maint Mechanic","Mechanic","Other"],"Mfg/Production":["Admin Assist","Clerk","Factory Worker","Foreman/Supervisor","Furniture Finisher","Inspector","Jeweler","Machine Operator","Other","Packer","Plant Manager","Printer/Bookbinder","Quality Control","Receptionist/Sec","Refining Operator","Shoemaker","Tailor/Custom Sewer","Textile Worker","Upholsterer"],"Med/Soc Svcs/Relig":["Admin Assist","Assist-Med/Dent/Vet","Clergy","Clerk","Client Care Worker","Dental Hygenist","Dentist","Doctor","Hospice Volunteer","Mortician","Nurse - C.N.A.","Nurse - LPN","Nurse - RN","Nurse Practitioner","Optometrist","Other","Paramedic/EM Tech","Pharmacist","Receptionist/Sec","Social Worker","Support Services","Technician","Therapist","Veterinarian"],Other:["Other"],"Person.Care/Service":["Caregiver","Dry Cleaner/Laundry","Hair Stylist/Barber","Housekeeper","Manicurist","Masseuse","Nanny","Other","Pet Services","Receptionist/Sec"],"Rest/Hotel Services":["Baker","Bartender","Bellhop","Bus Person","Caterer","Chef","Concessionaire","Concierge","Cook-Rest/Cafeteria","Cook/Wrkr-Fast Food","Delivery Person","Desk Clerk","Dishwasher","Food Prod/Packing","Host/Maitre d","Housekeeper/Maid","Manager","Other","Valet","Waiter/Waitress","Wine Steward"],Retired:["Retired"],"Sports/Recreation":["Activity/Recre.Asst","Admin Assist","Agent","Athlete","CampCounselor/Lead","Clerk","Coach","Concessionaire","Director, Program","Event Mgr/Promoter","Life Guard","Mgr - Fitness Club","Other","Park Ranger","Receptionist/Sec","Sales-Tkt/Mmbrshp","SportsBrdcstr/Journ","Trainer/Instructor","Umpire/Referee"],Student:["Graduate Student","High school","Other","Undergraduate"],"Trvl/Trnsprt/Warehs":["Admin Assist","Air Traffic Control","Airport Ops Crew","Bellhop/Porter","Clerk","Crane Loader/Oper","Dispatcher","Driver-Bus/Strcar","Driver-Taxi/Limo","Driver-Truck/Delvry","Flight Attendant","Forklift Operator","Laborer","Longshoreman","Mate/Sailor","Mgr Warehse/Dist","Other","Parking Lot Attend","Pilot/Capt/Eng","Railroad Worker","Receptionist/Sec","Shipping/RecClk","Subway/LgtRail Oper","Ticket Agent","Transportation Spec"],Unemployed:["Unemployed"]},Qu={"Agr Inspect/Grader":"Agriculture Inspector/Grader",Arborist:"Arborist",Clerk:"Clerk","Equip. Operator":"Equipment Operator","Farm/Ranch Owner":"Farm/Ranch Owner","Farm/Ranch Worker":"Farm/Ranch Worker",Fisherman:"Fisherman",Florist:"Florist","Laborer/Worker":"Laborer/Worker","Landscape/NursryWkr":"Landscaper/Nursery Worker",Landscaper:"Landscaper",Logger:"Logger",Millworker:"Mill worker",Other:"Other",Ranger:"Ranger",Supervisor:"Supervisor","Timber Grader/Scale":"Timber Grader/Scale",Actor:"Actor","Admin Assist":"Administrative Assistant","Announcer/Broadcstr":"Announcer/Broadcaster","Artist/Animator":"Artist/Animator","Author/Writer":"Author/Writer","Choreography/Dancer":"Choreography/Dancer","Composer/Director":"Composer/Director",Curator:"Curator",Designer:"Designer",Editor:"Editor","Journalist/Reporter":"Journalist/Reporter","Musician/Singer":"Musician/Singer",Printer:"Printer",Producer:"Producer","Production Crew":"Production Crew",Projectionist:"Projectionist","Receptionist/Sec":"Receptionist/Secretary","Ticket Sales/Usher":"Ticket Sales/Usher","Accountant/Auditor":"Accountant/Auditor","Analyst/Broker":"Analyst/Broker",Bookkeeper:"Bookkeeper","Branch Manager":"Branch Manager",Collections:"Collections",Consultant:"Consultant",Controller:"Controller","CSR/Teller":"CSR/Teller","Director/Administr":"Director/Administrator",Executive:"Executive","Financial Advisor":"Financial Advisor","Investment Banker":"Investment Banker",Investor:"Investor","Loan/EscrowProcess":"Loan/Escrow Processor","Mgr-Credit/Loan":"Manager-Credit/Loan","Mgr-Portfolio/Prod.":"Manager-Portfolio/Production","Mgr-Property":"Manager-Property",Realtor:"Realtor","SalesAgt/Represent.":"Sales Agent/Representative","Trader,Finan Instru":"Trader, Financial Instruments",Underwriter:"Underwriter","Account Executive":"Account Executive",Buyer:"Buyer","Clerk-Office":"Clerk-Office",CSR:"Customer Service Representative","H.R. Representative":"H.R. Representative","Marketing Researchr":"Marketing Researcher","Messenger/Courier":"Messenger/Courier","Mgr - District":"Manager - District","Mgr - Finance":"Manager - Finance","Mgr-Dept/Store":"Manager - Department/Store","Mgr-General Opers":"Manager - General Operations","Mgr-H.R./PublicRel":"Manager - H.R./Public Relations","Mgr-Mkt/Sales":"Manager - Marketing/Sales","Mgr/Supervisr-Offic":"Manager/Supervisor - Office","Sales-Counter/Rentl":"Sales-Counter/Rental","Sales-Home Based":"Sales-Home Based","Sales-Mfg Rep":"Sales-Manufacture Rep","Sales-Retail/Whlsle":"Sales-Retail/Wholesale","Sales-Route/Vendor":"Sales-Route/Vendor","Boiler Oper/Maker":"Boiler Operator/Maker","Bricklayer/Mason":"Bricklayer/Mason",Carpenter:"Carpenter","Carpet Installer":"Carpet Installer","Concrete Worker":"Concrete Worker","Constrct Proj Mgr":"Construction - Project Manager",Contractor:"Contractor","Crane Operator":"Crane Operator","Electrician/Linesmn":"Electrician/Linesman","ElevatorTech/Instl":"Elevator Technician/Installer","FloorLayer/Finisher":"Floor Layer/Finisher","Foreman/Supervisor":"Foreman/Supervisor",Handyman:"Handyman","Heat/Air Technician":"Heat/Air Technician",Inspector:"Inspector",Metalworker:"Metalworker",Miner:"Miner","Oil/GasDril/RigOpr":"Oil/Gas Driller/Rig Operator",Painter:"Painter","Plstr/Drywall/Stuc":"Plaster/Drywall/Stucco",Plumber:"Plumber",Roofer:"Roofer",Disabled:"Disabled","Audio-Visual Tech.":"Audio-Visual Tech.","Child/DayCare Wrker":"Child/Daycare Worker",Counselor:"Counselor","Grad. Teaching/Asst":"Graduate Teaching Assistant","Instructor-Vocation":"Instructor-Vocation","Librarian/Curator":"Librarian/Curator","Professor, College":"Professor, College",Superintendent:"Superintendent","Teacher, College":"Teacher, College","Teacher, K-12":"Teacher, K-12","Teaching Asst/Aide":"Teaching Assistant/Aide",Tutor:"Tutor",Actuary:"Actuary",Analyst:"Analyst",Architect:"Architect","Clinical Data Coord.":"Clinical Data Coordinator",Drafter:"Drafter",Engineer:"Engineer","Manager-Project":"Manager-Project","Manager-R&D":"Manager-R&D",Mathematician:"Mathematician","Research Prog. Dir.":"Research Program Director",Researcher:"Researcher",Scientist:"Scientist",Sociologist:"Sociologist","Surveyor/Mapmaker":"Surveyor/Mapmaker",Technician:"Technician",Attorney:"Attorney","Chief Executive":"Chief Executive",Commissioner:"Commissioner","Council member":"Council member","Enlst Mil Prsnl E1-4":"Enlisted Military Personnel (E1-4)",Legislator:"Legislator","Mayor/City Manager":"Mayor/City Manager","Meter Reader":"Meter Reader","NCO (E5-9)":"NCO (E5-9)","Officer-Commissiond":"Officer-Commissioned","Officer-Warrant":"Officer-Warrant","Park Ranger":"Park Ranger",Planner:"Planner",Postmaster:"Postmaster",Regulator:"Regulator","US Postal Worker":"US Postal Worker","Homemaker/Houseprsn":"Homemaker/House person","Engineer-Hardware":"Engineer-Hardware","Engineer-Software":"Engineer-Software","Engineer-Systems":"Engineer-Systems","Manager-Systems":"Manager-Systems","Network Admin":"Network Administrator",Programmer:"Programmer","Project Coordinator":"Project Coordinator","Support Technician":"Support Technician","Systems Security":"Systems Security","Technical Writer":"Technical Writer","Web Developer":"Web Developer","Actuarial Clerk":"Actuarial Clerk","Agent/Broker":"Agent/Broker","Claims Adjuster":"Claims Adjuster","Product Manager":"Product Manager","Sales Rep":"Sales Representative","Airport Sec Ofcr":"Airport Security Officer","Animal Control Ofcr":"Animal Control Officer",Bailiff:"Bailiff","Corrections Officer":"Corrections Officer","Court Clrk/Reporter":"Court Clerk/Reporter","Deputy Sheriff":"Deputy Sheriff",Dispatcher:"Dispatcher",Examiner:"Examiner","Fed Agt/Marshall":"Federal Agent/Marshall","Fire Chief":"Fire Chief","Fire Fighter/Supv.":"Fire Fighter/Supervisor","Gaming Ofcr/Invest":"Gaming Officer/Investigator","Highway Patrol Ofcr":"Highway Patrol Officer","Judge/Hearing Ofcr":"Judge/Hearing Officer","Legal Asst./Sec":"Legal Assistant/Secretary","Paralegal/Law Clerk":"Paralegal/Law Clerk","Police Chief":"Police Chief","Police Det/Investgr":"Police Detective/Investigator","Police Offcr/Supvr":"Police Officer/Supervisor","Process Server":"Process Server","Prvt Invest/Detec.":"Private Investigator/Detective","Security Guard":"Security Guard",Sheriff:"Sheriff","Bldg Maint Engineer":"Building Maintenance Engineer","Custodian/Janitor":"Custodian/Janitor",Electrician:"Electrician","Field Service Tech.":"Field Service Technician","Heat/AirCond Repair":"Heat/Air Conditioner Repairman","Housekeeper/Maid":"Housekeeper/Maid","Lndscpe/Grnds Maint":"Landscape/Grounds Maintenance","Maint Mechanic":"Maintenance Mechanic",Mechanic:"Mechanic","Factory Worker":"Factory Worker","Furniture Finisher":"Furniture Finisher",Jeweler:"Jeweler","Machine Operator":"Machine Operator",Packer:"Packer","Plant Manager":"Plant Manager","Printer/Bookbinder":"Printer/Bookbinder","Quality Control":"Quality Control","Refining Operator":"Refining Operator",Shoemaker:"Shoemaker","Tailor/Custom Sewer":"Tailor/Custom Sewer","Textile Worker":"Textile Worker",Upholsterer:"Upholsterer","Assist-Med/Dent/Vet":"Assistant - Medic/Dent/Vet",Clergy:"Clergy","Client Care Worker":"Client Care Worker","Dental Hygenist":"Dental Hygienist",Dentist:"Dentist",Doctor:"Doctor","Hospice Volunteer":"Hospice Volunteer",Mortician:"Mortician","Nurse - C.N.A.":"Nurse - C.N.A.","Nurse - LPN":"Nurse - LPN","Nurse - RN":"Nurse - RN","Nurse Practitioner":"Nurse Practitioner",Optometrist:"Optometrist","Paramedic/EM Tech":"Paramedic/E.M. Technician",Pharmacist:"Pharmacist","Social Worker":"Social Worker","Support Services":"Support Services",Therapist:"Therapist",Veterinarian:"Veterinarian",Caregiver:"Caregiver","Dry Cleaner/Laundry":"Dry Cleaner/Laundry","Hair Stylist/Barber":"Hair Stylist/Barber",Housekeeper:"Housekeeper",Manicurist:"Manicurist",Masseuse:"Masseuse",Nanny:"Nanny","Pet Services":"Pet Services",Baker:"Baker",Bartender:"Bartender",Bellhop:"Bellhop","Bus Person":"Bus Person",Caterer:"Caterer",Chef:"Chef",Concessionaire:"Concessionaire",Concierge:"Concierge","Cook-Rest/Cafeteria":"Cook - Restaurant/Cafeteria","Cook/Wrkr-Fast Food":"Cook/Worker-Fast Food","Delivery Person":"Delivery Person","Desk Clerk":"Desk Clerk",Dishwasher:"Dishwasher","Food Prod/Packing":"Food Production/Packing","Host/Maitre d":"Host/Maitre d",Manager:"Manager",Valet:"Valet","Waiter/Waitress":"Waiter/Waitress","Wine Steward":"Wine Steward",Retired:"Retired","Activity/Recre.Asst":"Activity/Recreational Assistant",Agent:"Agent",Athlete:"Athlete","CampCounselor/Lead":"Camp Counselor/Lead",Coach:"Coach","Director, Program":"Director, Program","Event Mgr/Promoter":"Event Manager/Promoter","Life Guard":"Life Guard","Mgr - Fitness Club":"Manager - Fitness Club","Sales-Tkt/Mmbrshp":"Sales-Ticket/Membership","SportsBrdcstr/Journ":"Sports Broadcaster/Journalist","Trainer/Instructor":"Trainer/Instructor","Umpire/Referee":"Umpire/Referee","Graduate Student":"Graduate Student","High school":"High school",Undergraduate:"Undergraduate","Air Traffic Control":"Air Traffic Control","Airport Ops Crew":"Airport Operations Crew","Bellhop/Porter":"Bellhop/Porter","Crane Loader/Oper":"Crane Loader/Operator","Driver-Bus/Strcar":"Driver - Bus/Streetcar","Driver-Taxi/Limo":"Driver-Taxi/Limo","Driver-Truck/Delvry":"Driver-Truck/Delivery","Flight Attendant":"Flight Attendant","Forklift Operator":"Forklift Operator",Laborer:"Laborer",Longshoreman:"Longshoreman","Mate/Sailor":"Mate/Sailor","Mgr Warehse/Dist":"Manager - Warehouse/District","Parking Lot Attend":"Parking Lot Attendant","Pilot/Capt/Eng":"Pilot/Captain/Engineer","Railroad Worker":"Railroad Worker","Shipping/RecClk":"Shipping/Receiving Clerk","Subway/LgtRail Oper":"Subway/Light Rail Operator","Ticket Agent":"Ticket Agent","Transportation Spec":"Transportation Specialist",Unemployed:"Unemployed"},ro=Ju,no=Qu;function Er(e,t){if(typeof e!="string")return e;const r=e.trim();if(!r)return e;if(t[r])return r;const n=r.toLowerCase();return Object.keys(t).find(i=>i.toLowerCase()===n||t[i]?.toLowerCase()===n)??e}function Ut(e){return Er(e,to)}function oo(e){return Er(e,Jn)}function io(e){return Er(e,no)}function Xu(e){return e.trim().toLowerCase()}function ao(e){if(typeof e!="string")return null;const t=e.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!t)return null;const r=Number(t[1]),n=Number(t[2]),o=Number(t[3]);if(!Number.isFinite(r)||!Number.isFinite(n)||!Number.isFinite(o)||n<1||n>12||o<1||o>31)return null;const i=new Date(Date.UTC(r,n-1,o));return i.getUTCFullYear()!==r||i.getUTCMonth()!==n-1||i.getUTCDate()!==o?null:i.getTime()}function ut(e,t){if(!t.effectiveDateKey||!t.expirationDateKey)return!1;const r=ao(e[t.expirationDateKey]),n=ao(e[t.effectiveDateKey]);return r==null||n==null?!1:r<n}const ed=new Set(["HomePolicy","BundlePolicy"]);function Zt(e,t,r){return String(e.key??"")!=="lapse_in_coverage"||!r||!ed.has(r)?!0:t.home_prior_carrier_name!=="NoPriorInsurance"}function Nr(e){let t=null,r=null,n=null;const o=new Set,i=new Set,a=l=>{const u=String(l.key??""),d=Xu(String(l.question??""));!t&&(u==="auto_prior_carrier_name"||u==="home_prior_carrier_name"||d.includes("current auto insurance company"))&&(t=u),!r&&(u==="effective_date"||d.includes("when do you need your insurance to begin"))&&(r=u),!n&&(u==="auto_prior_expiration_date"||u==="home_prior_expiration_date"||d.includes("when does the current policy expire"))&&(n=u),(u==="auto_reason_for_no_insurance"||d.includes("reason you are not currently insured")||d.includes("reason for lapse in coverage"))&&o.add(u),(u==="auto_prior_years"||u==="auto_prior_months"||u==="auto_continuous_coverage_years"||u==="auto_prior_expiration_date"||u==="auto_current_annual_premium_cents"||u==="auto_prior_liability_limit")&&i.add(u)};e.forEach(a);const s=l=>{l.forEach(u=>{(u.conditionals??[]).forEach(d=>{const p=d.conditionalQuestions??[];p.forEach(a),s(p)})})};return s(e),{currentCarrierKey:t,effectiveDateKey:r,expirationDateKey:n,noInsuranceReasonKeys:o,hideWhenNoPriorInsuranceKeys:i}}function St(e,t){return t.currentCarrierKey==="home_prior_carrier_name"&&e.home_prior_carrier_name==="NoPriorInsurance"&&e.auto_prior_carrier_name!=="NoPriorInsurance"?!1:(t.currentCarrierKey?e[t.currentCarrierKey]:void 0)==="NoPriorInsurance"?!0:!t.effectiveDateKey||!t.expirationDateKey||t.expirationDateKey==="home_prior_expiration_date"&&ut(e,t)?!1:ut(e,t)}function Wt(e,t,r){const n=String(e.key??"");if(r.noInsuranceReasonKeys.has(n)&&r.currentCarrierKey==="home_prior_carrier_name"&&t.home_prior_carrier_name==="NoPriorInsurance"&&t.auto_prior_carrier_name!=="NoPriorInsurance")return!1;const i=(r.currentCarrierKey?t[r.currentCarrierKey]:void 0)==="NoPriorInsurance";return i&&r.hideWhenNoPriorInsuranceKeys.has(n)?!1:!r.noInsuranceReasonKeys.has(n)||i?!0:St(t,r)}function Gt(e,t){const r=String(e.key??"");return t.noInsuranceReasonKeys.has(r)}const td=["ACURA","ALFA ROMEO","ASTON MARTIN","AUDI","BENTLEY","BMW","BUGATTI","BUICK","CADILLAC","CHEVROLET","CHRYSLER","CRUISE","DODGE","FERRARI","FIAT","FORD","FREIGHTLINER","GENESIS","GLOBAL ELECTRIC MOTORS","GMC","HONDA","HYUNDAI","INFINITI","JAGUAR","JEEP","KARMA AUTOMOTIVE","KIA","LAMBORGHINI","LAND ROVER","LEXUS","LINCOLN","LOTUS","MASERATI","MAZDA","MCLAREN AUTOMOTIVE","MERCEDES-BENZ","MINI","MITSUBISHI","NISSAN","POLESTAR","PORSCHE","RAM","ROLLS-ROYCE","SUBARU","TESLA","TOYOTA","VOLKSWAGEN","VOLVO"],Tr="credify_quote_id",kr="credify_auth_token";function rd(e){try{localStorage.setItem(Tr,e)}catch(t){console.error("Failed to save quoteId to localStorage:",t)}}function nd(){try{return localStorage.getItem(Tr)}catch(e){return console.error("Failed to load quoteId from localStorage:",e),null}}function so(){try{localStorage.removeItem(Tr)}catch(e){console.error("Failed to clear quoteId from localStorage:",e)}}function od(e){try{localStorage.setItem(kr,e)}catch(t){console.error("Failed to save authToken to localStorage:",t)}}function id(){try{return localStorage.getItem(kr)}catch(e){return console.error("Failed to load authToken from localStorage:",e),null}}function co(){try{localStorage.removeItem(kr)}catch(e){console.error("Failed to clear authToken from localStorage:",e)}}function ad(){so(),co()}const Be="https://api.getcredify.com";let dt=null;function lo(e){dt=e,od(e)}function At(){return dt}function Or(){const e=id();e&&(dt=e)}function uo(){dt=null,co()}async function ze(e,t){const r={"Content-Type":"application/json"};dt&&(r.Authorization=`Bearer ${dt}`);const n=await fetch(e,{method:"POST",headers:r,body:JSON.stringify(t)});if(!n.ok){let o=`Request failed with status ${n.status}`;try{o=(await n.json()).error||o}catch{o=n.statusText||o}const i=new Error(o);throw i.statusCode=n.status,i}return n}async function sd(e){try{return await e.json()}catch{return{}}}async function cd(e,t){const r=t?{stage:e,quoteId:t}:{stage:e};return await(await ze(`${Be}/get-questions-by-stage`,r)).json()}async function jt(e){const t=e?{quoteId:e}:{};return await(await ze(`${Be}/get-stages-for-quote`,t)).json()}async function ld(e){const r=await(await ze(`${Be}/create-quote`,{postal_code:e})).json();if(!r||typeof r!="object"||!r.quoteId)throw new Error(`Invalid createQuote response: ${JSON.stringify(r)}`);return r}async function ud(e,t){return await(await ze(`${Be}/verify-quote`,{action:"send",quoteId:e,phone:t})).json()}async function _t(e,t,r){const n={payload:e,getRates:t};r&&typeof r=="string"&&r.trim()!==""&&(n.quoteId=r);const o=await ze(`${Be}/update-quote`,n),i=await sd(o);return!i||typeof i!="object"||!("status"in i)||i.status==null?{status:"success"}:i}async function _o(e,t){return await(await ze(`${Be}/verify-quote`,{quoteId:e,smsCode:t})).json()}async function dd(e,t){const r={state:e};return t&&typeof t=="string"&&t.trim()!==""&&(r.quoteId=t),await(await ze(`${Be}/is-supported-state`,r)).json()}async function fo(){return await(await ze(`${Be}/get-rates`,{})).json()}async function mo(e){const t=e?{quoteId:e}:{};return await(await ze(`${Be}/get-quote`,t)).json()}async function po(e){return(await ze(`${Be}/get-vehicle-options`,e)).json()}async function _d(e){return(await ze(`${Be}/get-vehicle-options`,{...e,action:"vinDecode"})).json()}async function fd(e){const r=await(await ze(`${Be}/request-bind`,{quoteRateId:e})).json();return r&&typeof r=="object"&&"success"in r?r:{success:!0}}const Ir=new Set(["auto_prior_years","auto_prior_months","auto_continuous_coverage_years"]),md={None:"None","30000/60000/25000":"30/60k","30000/60000/30000":"30/60k","50000/100000/30000":"50/100k","50000/100000/50000":"50/100k","100000/300000/50000":"100/300k","100000/300000/100000":"100/300k","250000/500000/100000":"250/500k","250000/500000/250000":"250/500k","300000/500000/250000":"300/500k","300000/500000/300000":"300/500k","500000/500000/300000":"500k CSL","500000/500000/500000":"500k CSL","500000/1000000/300000":"500k/1M","500000/1000000/500000":"500k/1M"},ho={auto_prior_carrier_name:iu,auto_prior_liability_limit:lu,auto_reason_for_no_insurance:uu,residence_type:au,home_prior_carrier_name:su,policy_bi:du,policy_um:_u,policy_pd:fu,policy_mp:mu,policy_umpd:pu,policy_pip:hu,policy_auto_death_indemnity:gu,vehicle_comp_deductible:Cr,vehicle_coll_deductible:Cr,vehicle_towing_and_labor:wr,vehicle_transportation_expense:qn,education_level:Jn,industry:to,occupation:no,usage:cu,architectural_style:Cu,dwelling_type:wu,occupancy_type:Eu,construction_quality:Nu,construction_type:Tu,foundation_type:ku,located_over_water:Ou,number_of_stories:Iu,exterior_wall_type:Mu,roof_material_type:Lu,roof_shape:Du,roof_updated_type:Pu,heating_type:Fu,oil_tank_location:$u,basement_type:xu,plumbing_type:Bu,personal_liability:zu,dwelling_medical_payments:Hu,all_perils_deductible:Ru,windstorm_deductible:Uu,distance_from_fire_hydrant_ft:Zu,distance_from_fire_station_miles:Wu,employment_industry:Qn,marital_status:Xn,gender:eo,co_applicant_employment_industry:Qn,co_applicant_marital_status:Xn,co_applicant_gender:eo,description:Gu,tort_threshold:ju,pip_coverage_type:Vu,extended_medical:Yu,additional_pip:Ku,policy_pip_deductible:qu},pd=["OTHER / NOT LISTED"],hd=["SEDAN","SUV","COUPE","HATCHBACK","PICKUP","VAN","WAGON","OTHER"],gd=["Other"];function Pe(e){const t=e.getUTCFullYear(),r=String(e.getUTCMonth()+1).padStart(2,"0"),n=String(e.getUTCDate()).padStart(2,"0");return`${t}-${r}-${n}`}function go(e){const t=e.replace(/\D+/g,"");if(t!=="")return ou(t)}function yd(e){return e==="-"||e==="+"||e==="."||e==="e"||e==="E"}const bd={year_built:4,year_roof_updated:4,heating_update_year:4,plumbing_update_year:4,electrical_update_year:4,total_area_sq_ft:6,sale_price_cents:9,dwelling_replacement_cost:9,other_structures_coverage:9,personal_property_coverage:7,amount_paid_cents:7,loss_of_use_coverage:8,home_prior_years:2,home_continuous_coverage_years:2,number_of_dogs:2,number_of_units:2,months_at_address:2,years_at_address:3,years_at_prior_address:3,distance_to_coast_miles:4,household_size:1,number_of_families:1,number_of_mortgagees:1,annual_mileage:6,miles_to_work:4,custom_equipment_value_cents:7,cost_new_value_cents:7,stated_value_amount_cents:7,property_damage_amount_paid_cents:7,personal_injury_amount_paid_cents:7,auto_current_annual_premium_cents:7,auto_prior_years:2,auto_prior_months:2,auto_continuous_coverage_years:2},yo=new Set(["sale_price_cents","dwelling_replacement_cost","other_structures_coverage","personal_property_coverage","loss_of_use_coverage","custom_equipment_value_cents","cost_new_value_cents","stated_value_amount_cents","property_damage_amount_paid_cents","personal_injury_amount_paid_cents","auto_current_annual_premium_cents","amount_paid_cents"]),vd=new Set(["total_area_sq_ft","annual_mileage","miles_to_work","distance_to_coast_miles"]),Vt={first_name:"given-name",last_name:"family-name",co_applicant_first_name:"given-name",co_applicant_last_name:"family-name",date_of_birth:"bday",co_applicant_date_of_birth:"bday",sms_code:"one-time-code",vin:"off",license_number:"off",effective_date:"off"},Sd={license_number:20};function Ad(e){const t=new Date,r=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()));if(e==="effective_date"){const n=new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth()+3,r.getUTCDate()));return{min:Pe(r),max:Pe(n)}}if(e==="home_prior_expiration_date"){const n=new Date(Date.UTC(r.getUTCFullYear()-1,r.getUTCMonth(),r.getUTCDate())),o=new Date(Date.UTC(r.getUTCFullYear()+1,r.getUTCMonth(),r.getUTCDate()));return{min:Pe(n),max:Pe(o)}}if(e==="date_of_incident")return{max:Pe(r)};if(e==="move_in_date")return{max:Pe(r)};if(e==="purchase_date")return{max:Pe(r)};if(e==="date_of_birth")return{max:Pe(r)};if(e==="date_first_licensed")return{max:Pe(r)};if(e==="occurred_at")return{max:Pe(r)};if(e==="accident_prevention_course_date")return{max:Pe(r)};if(e==="auto_prior_expiration_date"){const n=new Date(Date.UTC(r.getUTCFullYear()-1,r.getUTCMonth(),r.getUTCDate())),o=new Date(Date.UTC(r.getUTCFullYear()+1,r.getUTCMonth(),r.getUTCDate()));return{min:Pe(n),max:Pe(o)}}return{}}const Cd=new Set(["Disabled","Retired","Unemployed","Other"]);function Mr(e,t,r){const n=String(e.key??"");if(n!=="occupation"&&n!=="co_applicant_occupation"||n==="co_applicant_occupation")return!0;const o=Ce(t,r,"industry"),i=Ce(t,r,"employment_industry"),a=String(o??i??"").trim();return!Cd.has(a)}function Lr(e,t,r,n){return Gn(e,n,r)}function Yt(e){return e.inputType!=="radio"||!e.options||e.options.length!==1||e.options[0]!=="Yes"?!1:(e.conditionals??[]).some(r=>r.conditionalQuestionsAllowMultiple&&r.conditionalType==="equals"&&r.conditionalValue==="Yes")}function bo(e,t){return Yt(e)?"Yes":t}function vo(e){return typeof e=="number"&&Number.isFinite(e)?e:typeof e=="string"&&e.trim()!==""&&!Number.isNaN(Number(e))?Number(e):null}function So(e){if(e instanceof Date&&!Number.isNaN(e.getTime()))return e.getTime();if(typeof e=="string"){const t=Date.parse(e);return Number.isNaN(t)?null:t}return null}function Ao(e,t){const r=vo(e),n=vo(t);if(r!=null&&n!=null)return r-n;const o=So(e),i=So(t);return o!=null&&i!=null?o-i:e==null||t==null?null:String(e).localeCompare(String(t))}function wd(e,t){return Array.isArray(e)?e.some(r=>r===t):typeof e=="string"?t!=null&&e.includes(String(t)):!1}function Ct(e,t,r){switch(t){case"equals":return e===r;case"notEquals":return e!==r&&e!==""&&e!=null;case"lessThan":{const n=Ao(e,r);return n!=null&&n<0}case"greaterThan":{const n=Ao(e,r);return n!=null&&n>0}case"contains":return wd(e,r);case"startsWith":return e!=null&&r!=null&&String(e).startsWith(String(r));case"endsWith":return e!=null&&r!=null&&String(e).endsWith(String(r));default:return!1}}function wt(e,t){return t.reduce((r,n)=>r?.[n],e)}function He(e,t,r){if(t.length===0)return e;const[n,...o]=t;if(o.length===0){if(typeof n=="number"){const u=(Array.isArray(e)?e:[]).slice();return u[n]=r,u}return{...e,[n]:r}}const i=e?.[n],a=typeof o[0]=="number"?Array.isArray(i)?i:[]:i&&typeof i=="object"?i:{},s=He(a,o,r);if(typeof n=="number"){const u=(Array.isArray(e)?e:[]).slice();return u[n]=s,u}return{...e,[n]:s}}function Ce(e,t,r){return wt(e,[...t??[],r])}function Ee(e,t,r,n){return He(e,[...t??[],r],n)}function Ed(e,t){return e?.length?`${e.join("-")}-${t}`:t}const Nd="__items",Kt=e=>`${e}${Nd}`;function Ie(e){return e==null?"":typeof e=="string"?e:String(e)}function Co(e){return e==null?"":typeof e=="number"&&Number.isFinite(e)||typeof e=="string"?e:""}function Td(e){return e==null?"":typeof e=="string"||typeof e=="number"?e:String(e)}function kd({questions:e,initialValues:t,controlledValues:r,onChangeValues:n,onSubmit:o,quoteId:i,widgetStageKey:a}){const s=f.useMemo(()=>sr(e),[e]),l=f.useMemo(()=>Nr(s),[s]),u=f.useMemo(()=>a==="BundlePolicy"?!0:s.some(y=>String(y.key)==="home_prior_carrier_name")&&s.some(y=>String(y.key)==="driver_vehicle_assignments"),[a,s]),d=f.useMemo(()=>{const y={};return t&&Object.assign(y,t),y},[t]),[p,v]=f.useState(d);f.useEffect(()=>{v(d)},[d]);const[h,C]=f.useState({}),m=f.useMemo(()=>({...h,...r??p}),[h,r,p]);f.useEffect(()=>{r&&C(y=>({...y,...r}))},[r]);const[q,H]=f.useState({}),j=f.useRef(new Map),R=f.useRef(new Set),[,Z]=f.useState({}),[V,W]=f.useState({}),K=f.useRef(!1);f.useEffect(()=>{!i||K.current||!s.some(g=>g.key==="year"||g.key==="make"||g.key==="model"||g.key==="body_style")||(K.current=!0,po({quoteId:i}).catch(()=>{}))},[i,s]);const[z,Y]=f.useState({}),[Q,ne]=f.useState({}),me=f.useCallback(async(y,g)=>{if(!i||!Kn(g))return;const _=y?y.join("-"):"_root";Y(E=>({...E,[_]:!0})),ne(E=>({...E,[_]:null}));try{const E=await _d({quoteId:i,vin:g});if(E.error){ne(k=>({...k,[_]:E.error}));return}let S=m;E.year&&(S=Ee(S,y,"year",String(E.year))),E.make&&(S=Ee(S,y,"make",E.make)),E.model&&(S=Ee(S,y,"model",E.model)),E.bodyStyle&&(S=Ee(S,y,"body_style",E.bodyStyle)),r&&n?n(S):v(S),C(S),j.current.clear(),R.current.clear(),Z({})}catch{ne(E=>({...E,[_]:"VIN lookup failed — please enter vehicle details manually"}))}finally{Y(E=>({...E,[_]:!1}))}},[i,m,r,n]),be=f.useCallback(y=>{const g=`${y.year}|${y.make??""}|${y.model??""}`,_=y.model?"bodyStyles":y.make?"models":"makes",E=j.current.get(g);return E?E[_]??[]:void 0},[]),Ne=f.useCallback((y,g)=>{if(!i)return;const _=`${g.year}|${g.make??""}|${g.model??""}`,E=g.model?"bodyStyles":g.make?"models":"makes",S=`${y}:${E}`;j.current.has(_)||R.current.has(_)||(R.current.add(_),W(k=>({...k,[S]:!0})),po({quoteId:i,...g}).then(k=>{j.current.set(_,k),Z(F=>({...F,[S]:k[E]??[]}))}).catch(()=>{j.current.set(_,{}),Z(k=>({...k,[S]:[]}))}).finally(()=>{R.current.delete(_),W(k=>({...k,[S]:!1}))}))},[i]);function X(y,g,_){const E=m,S=y?wt(m,y)??{}:E;return y?{state:E.state,...S,[g]:_}:{...S,[g]:_}}function A(y,g){const _=Yn.filter(S=>S.targetKey===y||S.dependsOn.includes(y)),E={[y]:void 0};for(const S of _){const k=S.validate(g);S.targetKey in E?k!==void 0&&(E[S.targetKey]=k):E[S.targetKey]=k}H(S=>({...S,...E}))}const w=(y,g,_)=>{const E=Ce(m,_,y);if(Ve(E,g)){q[y]&&H(k=>({...k,[y]:void 0}));return}const S=Sr(y,E);if(S){H(k=>({...k,[y]:S}));return}A(y,X(_,y,E))};f.useEffect(()=>{let y=m,g=!1;s.forEach(_=>{if(!Yt(_))return;const E=String(_.key);Ce(y,void 0,E)!=="Yes"&&(y=Ee(y,void 0,E,"Yes"),g=!0)}),g&&(r&&n?n(y):v(y),C(y))},[s,m,r,n]);function O(y,g){const _=y.key;if((_==="relationship_to_insured"||_==="is_registered_owner")&&g){const T=g[g.length-1];if(typeof T=="number"&&T===0)return null}if((_==="purchase_date"||_==="cost_new_value_cents")&&g)return null;if(_==="custom_equipment_value_cents"&&g){const T=Ce(m,g,"vehicle_has_modifications");if(T!=="Yes"&&T!==!0)return null}const E=_==="auto_reason_for_no_insurance"&&l.currentCarrierKey?m[l.currentCarrierKey]==="NoPriorInsurance"?"Reason you are not currently insured":"Reason for lapse in coverage":y.question,S=y.hint,k=Ce(m,g,_),F=Gt(y,l)?St(m,l):_==="social_security_number"&&xt(m.state??m.State)?!0:y.required,P=q[_],B=T=>{let N=Ee(m,g,_,T);if(y.inputType==="radio"&&y.conditionals){const M=y.conditionals??[];for(const G of M){const ee=Ce(m,g,_),re=Ct(ee,G.conditionalType,G.conditionalValue),J=Ct(T,G.conditionalType,G.conditionalValue);if(re&&!J&&G.conditionalQuestionsAllowMultiple){const ue=G.conditionalQuestions??[];if(ue.length>0){const x=Kt(_);N=He(N,[...g??[],x],[]);const ce=(te,ie)=>{te.forEach(he=>{(he.conditionals??[]).forEach(Re=>{if(Re.conditionalQuestionsAllowMultiple){const ye=Kt(he.key);N=He(N,[...ie,ye],[])}const et=Re.conditionalQuestions??[];et.length>0&&ce(et,ie)})})};ce(ue,[...g??[],x])}}}}r&&n?n(N):v(N),C(N)};if(_==="vehicle_policy_selections"){const T=m.vehicles__items??[],N=m.drivers__items??[];if(T.length===0)return c.jsx("p",{style:{color:"#666",fontStyle:"italic"},children:"Add vehicles first to configure coverage selections."},_);const M=m.driver_vehicle_assignments??{},G=N.length>1,ee=ye=>Object.entries(ye).map(([se,we])=>({value:se,label:we})),re=xt(m.state??m.State),J=(ye,se)=>Object.fromEntries(ye.filter(we=>we in se).map(we=>[we,se[we]])),x=ee(J(re?yu:bu,Cr)),ce=re?J(vu,wr):wr,te=ee(ce),he=ee(J(re?Su:Au,qn)),ke=(ye,se,we)=>{const ve=He(m,["vehicles__items",ye,se],we);r&&n?n(ve):v(ve),C(ve)},Re=(ye,se,we)=>{const ve={...M},Le=`v${ye}`;ve[Le]={...ve[Le]??{}},ve[Le][`d${se}`]=we;const oe=He(m,["driver_vehicle_assignments"],ve);r&&n?n(oe):v(oe),C(oe)},et=ye=>{if(!G)return null;const se=M[`v${ye}`];if(!se)return null;const we=N.map((oe,Fe)=>se[`d${Fe}`]??0),ve=we.filter(oe=>oe>0);if(ve.length>=2&&ve.every(oe=>oe===ve[0])&&ve[0]===50)return`Assignments for Vehicle ${ye+1} cannot be 50 percent for both Drivers.`;const Le=we.reduce((oe,Fe)=>oe+Fe,0);return Le>0&&Le!==100?`Driver percentages for this vehicle must add up to 100% (currently ${Le}%).`:null};return c.jsx("div",{children:T.map((ye,se)=>{const we=[ye.year,ye.make,ye.model].filter(Boolean).join(" ")||`Vehicle ${se+1}`,ve=et(se),Le=oe=>typeof ye[oe]=="string"?ye[oe]:"";return c.jsxs("fieldset",{style:{border:`1px solid ${ve?"#dc3545":"#ddd"}`,borderRadius:"8px",padding:"16px",marginBottom:"16px"},children:[c.jsx("legend",{style:{fontWeight:600,padding:"0 8px"},children:we}),c.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:"12px"},children:[c.jsx(pt,{id:`veh-${se}-comp`,label:"Comprehensive deductible",required:!0,placeholder:"Select...",options:x,value:Le("vehicle_comp_deductible"),onChange:oe=>ke(se,"vehicle_comp_deductible",oe.currentTarget.value)}),c.jsx(pt,{id:`veh-${se}-coll`,label:"Collision deductible",required:!0,placeholder:"Select...",options:x,value:Le("vehicle_coll_deductible"),onChange:oe=>ke(se,"vehicle_coll_deductible",oe.currentTarget.value)}),c.jsx(pt,{id:`veh-${se}-tow`,label:"Towing and Labor",required:!0,placeholder:"Select...",options:te,value:Le("vehicle_towing_and_labor"),onChange:oe=>ke(se,"vehicle_towing_and_labor",oe.currentTarget.value)}),c.jsx(pt,{id:`veh-${se}-trans`,label:"Transportation expense",required:!0,placeholder:"Select...",options:he,value:Le("vehicle_transportation_expense"),onChange:oe=>ke(se,"vehicle_transportation_expense",oe.currentTarget.value)})]}),G&&c.jsxs("div",{style:{marginTop:"16px"},children:[c.jsx("p",{style:{fontWeight:600,margin:"0 0 8px"},children:"Drivers usage (%)"}),c.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px"},children:N.map((oe,Fe)=>{const tt=[oe.first_name,oe.last_name].filter(Boolean).join(" ")||`Driver ${Fe+1}`,Xt=M[`v${se}`]?.[`d${Fe}`];return c.jsx("div",{style:{flex:"0 0 140px"},children:c.jsx(nr,{id:`assignment-v${se}-d${Fe}`,label:`${tt} %`,value:Xt??"",min:0,max:100,step:1,inputMode:"numeric",onChange:ft=>{const zr=ft.currentTarget.value.replace(/\D+/g,"");Re(se,Fe,zr===""?0:Math.min(100,parseInt(zr,10)))}})},`${se}-${Fe}`)})}),ve&&c.jsx("p",{style:{color:"#dc3545",fontSize:"0.85rem",marginTop:"8px",marginBottom:0},children:ve})]})]},se)})},_)}if(_==="driver_vehicle_assignments"){const T=m.vehicles__items??[],N=m.drivers__items??[];if(u&&N.length<=1)return null;if(T.length===0||N.length===0)return c.jsx("p",{style:{color:"#666",fontStyle:"italic"},children:"Add vehicles and drivers first to configure driver usage percentages."},_);const M=m.driver_vehicle_assignments??{},G=(re,J,ue)=>{const x={...M},ce=`v${re}`;x[ce]={...x[ce]??{}},x[ce][`d${J}`]=ue,B(x)},ee=re=>{if(N.length<2)return null;const J=M[`v${re}`];if(!J)return null;const ue=N.map((te,ie)=>J[`d${ie}`]??0),x=ue.filter(te=>te>0);if(x.length>=2&&x.every(te=>te===x[0])&&x[0]===50)return`Assignments for Vehicle ${re+1} cannot be 50 percent for both Drivers.`;const ce=ue.reduce((te,ie)=>te+ie,0);return ce>0&&ce!==100?`Driver percentages for this vehicle must add up to 100% (currently ${ce}%).`:null};return c.jsxs("div",{children:[c.jsx("h4",{style:{marginBottom:"12px"},children:E}),T.map((re,J)=>{const ue=[re.year,re.make,re.model].filter(Boolean).join(" ")||`Vehicle ${J+1}`,x=ee(J);return c.jsxs("fieldset",{style:{border:`1px solid ${x?"#dc3545":"#ddd"}`,borderRadius:"8px",padding:"16px",marginBottom:"16px"},children:[c.jsx("legend",{style:{fontWeight:600,padding:"0 8px"},children:ue}),c.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px"},children:N.map((ce,te)=>{const ie=[ce.first_name,ce.last_name].filter(Boolean).join(" ")||`Driver ${te+1}`,he=M[`v${J}`]?.[`d${te}`];return c.jsx("div",{style:{flex:"0 0 140px"},children:c.jsx(nr,{id:`assignment-v${J}-d${te}`,label:`${ie} %`,value:he??"",min:0,max:100,step:1,inputMode:"numeric",onChange:ke=>{const Re=ke.currentTarget.value.replace(/\D+/g,"");G(J,te,Re===""?0:Math.min(100,parseInt(Re,10)))}})},`${J}-${te}`)})}),x&&c.jsx("p",{style:{color:"#dc3545",fontSize:"0.85rem",marginTop:"8px",marginBottom:0},children:x})]},J)})]},_)}switch(y.inputType){case"text":{if(_==="vin"&&i){const T=g?g.join("-"):"_root",N=z[T]??!1,M=Q[T]??null,G=[S?`${_}-hint`:null,P?`${_}-error`:null,M?`${_}-vin-error`:null].filter(Boolean).join(" ");return c.jsxs("div",{children:[c.jsx(De,{id:_,label:E,hint:S,error:P,required:F,children:c.jsxs("div",{className:"flex items-end gap-2",children:[c.jsx("div",{className:"flex-1 min-w-0",children:c.jsx("input",{id:_,className:`form-input ${P?"input-error":""}`,"aria-invalid":!!P,"aria-describedby":G||void 0,"aria-required":F||void 0,required:F,value:Ie(k),maxLength:17,onChange:ee=>B(ee.currentTarget.value),onBlur:()=>w(_,"text",g),autoComplete:Vt[_],type:"text"})}),c.jsx("button",{type:"button",disabled:N||!Kn(Ie(k)),className:"btn btn-outline shrink-0 self-end !w-auto min-w-[8.5rem] px-4 whitespace-nowrap disabled:opacity-50",onClick:()=>me(g,Ie(k)),children:N?"Looking up...":"Verify VIN"})]})}),M&&c.jsx("p",{id:`${_}-vin-error`,className:"text-sm text-red-600 mt-1",children:M})]},_)}if(_==="sms_code"){const T=Ie(k);return c.jsx(rr,{id:_,label:E,hint:S,value:T,inputMode:"numeric",pattern:"[0-9]*",maxLength:6,onChange:N=>{const M=N.currentTarget.value.replace(/\D+/g,"").slice(0,6);B(M)},onBlur:()=>w(_,"text",g),"aria-required":F||void 0,error:P,autoComplete:Vt[_]},_)}if(_==="license_number")return c.jsx(rr,{id:_,label:E,hint:S,value:Ie(k),onChange:T=>B(T.currentTarget.value.replace(/[^A-Z0-9]/gi,"").slice(0,20)),onBlur:()=>w(_,"text",g),"aria-required":F||void 0,error:P,autoComplete:"off",maxLength:20},_);if(_==="social_security_number"){const T=Ce(m,g,"ssn_display"),N=typeof T=="string"?T:"",M=N?`${N}. Re-enter to update.${S?` ${S}`:""}`:S;return c.jsx(Xo,{id:_,label:E,hint:M,value:Ie(k),onChange:G=>B(G.currentTarget.value),onBlur:()=>w(_,"text",g),"aria-required":F||void 0,error:P},_)}return c.jsx(rr,{id:_,label:E,hint:S,value:Ie(k),onChange:T=>B(T.currentTarget.value),onBlur:()=>w(_,"text",g),"aria-required":F||void 0,error:P,autoComplete:Vt[_],maxLength:Sd[_]},_)}case"email":return c.jsx(ei,{id:_,label:E,value:Ie(k),onChange:T=>B(T.currentTarget.value),onBlur:()=>w(_,"email",g),"aria-required":F||void 0,error:P},_);case"password":return c.jsx(ni,{id:_,label:E,value:Ie(k),onChange:T=>B(T.currentTarget.value),onBlur:()=>w(_,"password",g),"aria-required":F||void 0,error:P},_);case"tel":return c.jsxs(c.Fragment,{children:[c.jsx(ti,{id:_,label:E,value:Ie(k),onChange:T=>B(T.currentTarget.value),onBlur:()=>w(_,"tel",g),"aria-required":F||void 0,error:P},_),_==="phone"&&c.jsxs("div",{className:"mt-3 text-xs text-slate-600 space-y-1",children:[c.jsx("p",{children:"We verify your number before showing your quotes — you'll get a 6-digit code next. This is just to confirm your number, not a sales call."}),c.jsx("p",{children:"Message & data rates may apply. One message per request."}),c.jsxs("p",{children:["See our"," ",c.jsx("a",{href:"https://getcredify.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})," ","and"," ",c.jsx("a",{href:"https://getcredify.com/terms-of-service",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Terms of Service"}),"."]})]})]});case"url":return c.jsx(ri,{id:_,label:E,value:Ie(k),onChange:T=>B(T.currentTarget.value),onBlur:()=>w(_,"url",g),"aria-required":F||void 0,error:P},_);case"number":{const T=bd[_];return yo.has(_)||vd.has(_)?c.jsx(Qo,{id:_,label:E,hint:S,value:Co(k),isCurrency:yo.has(_),maxDigits:T,onChange:N=>B(go(N.currentTarget.value)),onBlur:()=>w(_,"number",g),"aria-required":F||void 0,error:P},_):c.jsx(nr,{id:_,label:E,hint:S,value:Co(k),inputMode:"numeric",pattern:"[0-9]*",onKeyDown:N=>{if(yd(N.key)){N.preventDefault();return}T!==void 0&&/^\d$/.test(N.key)&&String(N.currentTarget.value).replace(/\D/g,"").length>=T&&N.preventDefault()},onChange:N=>{let M=N.currentTarget.value;T!==void 0&&(M=M.slice(0,T)),B(go(M))},onBlur:()=>w(_,"number",g),"aria-required":F||void 0,error:P},_)}case"textarea":return c.jsx(oi,{id:_,label:E,value:Ie(k),onChange:T=>B(T.currentTarget.value),onBlur:()=>w(_,"textarea",g),"aria-required":F||void 0,error:P,rows:4},_);case"date":{const{min:T,max:N}=Ad(_);return c.jsx(ii,{id:_,label:E,hint:S,value:Ie(k),min:T,max:N,onChange:M=>{const G=M.currentTarget.value;B(G),!Ve(G,"date")&&!Sr(_,G)&&A(_,X(g,_,G))},onBlur:()=>w(_,"date",g),"aria-required":F||void 0,error:P,autoComplete:Vt[_]},_)}case"checkbox":{if(y.options){const T=Array.isArray(k)?k:[];return c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"form-label",children:[E,F&&c.jsx("span",{className:"text-red-600 ml-1",children:"*"})]}),c.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:y.options.map(N=>{const M=`${_}-${Ar(N)}`,G=T.includes(N);return c.jsx(ar,{id:M,label:N,checked:G,onChange:ee=>{const re=new Set(T);ee.currentTarget.checked?re.add(N):re.delete(N),B(Array.from(re))},"aria-required":F||void 0},M)})}),P&&c.jsx("p",{className:"mt-1 text-sm text-red-600",children:P})]},_)}return c.jsx(ar,{id:_,label:F?`${E} *`:E,checked:!!k,onChange:T=>B(T.currentTarget.checked),"aria-required":F||void 0},_)}case"radio":{if(Yt(y))return null;const T=y.options??[],N=g&&g.length>0?`${_}__${g.join("__")}`:_;return c.jsx(ci,{legend:E,legendClassName:F?"legend-required":void 0,children:T.map(M=>c.jsx(si,{name:N,value:M,checked:k===M,onChange:()=>{B(M),A(_,X(g,_,M))},children:ho[_]?.[M]??M},`${_}-${Ar(M)}`))},_)}case"select":{let T=y.options??[];_==="quote_vehicle_id"&&(T=r?.vehicles__items?.map(J=>J.vin)??[]);let N=!1,M,G,ee;if(_==="year"||_==="make"||_==="model"||_==="body_style"){const J=g?g.join("-"):"_root";z[J]&&(N=!0,M="Looking up VIN...")}if(!N&&(_==="make"||_==="model"||_==="body_style")){const J=g?g.join("-"):"_root";ee=J;const ue=Ce(m,g,"year"),x=typeof ue=="number"?ue:Number(ue);if(_==="make"){const ce=`${J}:makes`;if(!x||!Number.isFinite(x))N=!0,M="Select a year first";else{G={year:x};const te=be(G);te&&te.length>0?T=te:V[ce]?(N=!0,M="Loading makes..."):T=[...td]}}else if(_==="model"){const ce=`${J}:models`,te=String(Ce(m,g,"make")??"");if(!te)N=!0,M="Select a make first";else if(x&&Number.isFinite(x)){G={year:x,make:te};const ie=be(G);ie&&ie.length>0?T=ie:V[ce]?(N=!0,M="Loading models..."):T=[...pd]}typeof k=="string"&&k&&!T.includes(k)&&(T=[k,...T])}else{const ce=`${J}:bodyStyles`,te=String(Ce(m,g,"make")??""),ie=String(Ce(m,g,"model")??"");if(!ie)N=!0,M="Select a model first";else if(x&&Number.isFinite(x)&&te){G={year:x,make:te,model:ie};const he=be(G);he&&he.length>0?T=he:V[ce]?(N=!0,M="Loading body styles..."):T=[...hd]}typeof k=="string"&&k&&!T.includes(k)&&(T=[k,...T])}}if(_==="occupation"||_==="co_applicant_occupation"){const J=_==="co_applicant_occupation"?"co_applicant_employment_industry":void 0,ue=J?void 0:Ce(m,g,"industry"),x=Ce(m,g,J??"employment_industry"),te=String(Ut(ue??x)??"").trim();T=[...ro[te]??gd],typeof k=="string"&&k&&!T.includes(k)&&(T=[k,...T])}const re=Ed(g,_);return c.jsx(pt,{id:re,label:M?`${E} — ${M}`:E,"aria-required":F||void 0,error:P,disabled:N,value:Td(k),onChange:J=>{const ue=J.currentTarget.value;if(_!=="year"&&_!=="make"&&_!=="model"&&_!=="industry"&&_!=="employment_industry"&&_!=="co_applicant_employment_industry"){B(ue),A(_,X(g,_,ue));return}let x=Ee(m,g,_,ue);if(_==="year")x=Ee(x,g,"make",""),x=Ee(x,g,"model",""),x=Ee(x,g,"body_style","");else if(_==="make")x=Ee(x,g,"model",""),x=Ee(x,g,"body_style","");else if(_==="model")x=Ee(x,g,"body_style","");else if(_==="industry"||_==="employment_industry")x=Ee(x,g,"occupation","");else if(_==="co_applicant_employment_industry"){const te=String(Ut(ue)??"").trim(),ie=ro[te]??[],he=ie.find(ke=>ke===te)??ie[0]??"";x=Ee(x,g,"co_applicant_occupation",he??"")}r&&n?n(x):v(x),C(x);const ce=g?wt(x,g)??{}:x;A(_,{...ce,[_]:ue})},placeholder:M??"Select an option",onFocus:G&&ee?()=>Ne(ee,G):void 0,options:T.map(J=>({value:J,label:ho[_]?.[J]??md[J]??J}))},re)}case"address":return c.jsx(_i,{id:_,label:E,value:Ie(k),onChange:(T,N)=>{let M=Ee(m,g,_,T);const G=N?.state??(typeof T=="string"?T.match(/,\s*([A-Z]{2})\s+\d{5}\b/)?.[1]:void 0);if(G){const ee=g?[...g,"state"]:["state"];M=He(M,ee,G)}r&&n?n(M):v(M),C(M)},onBlur:()=>w(_,"address",g),required:F,"aria-required":F||void 0,error:P},_);default:return null}}function I(y,g){return y.map((_,E)=>{const S=String(_.key);if(!Wt(_,m,l)||!Mr(_,m,g)||!Zt(_,m,a))return null;if(Lr(S,_,m,a)){const N=l.currentCarrierKey?m[l.currentCarrierKey]:void 0;if(!(N&&N!=="NoPriorInsurance"&&ut(m,l)&&Ir.has(S)))return null}const k=O(_,g),F=_.conditionals??[];if(!F.length)return a==="BundlePolicy"&&S==="policy_bi"?c.jsxs("div",{children:[c.jsx("h3",{className:"text-lg font-semibold mt-6 mb-3",children:"Vehicle Coverage Information"}),k]},`wrap-${S}-${E}`):c.jsx("div",{children:k},`wrap-${S}-${E}`);const P=bo(_,Ce(m,g,S)),B=F.filter(N=>Ct(P,N.conditionalType,N.conditionalValue)),T=B.length>1&&!B.some(N=>N.conditionalQuestionsAllowMultiple)?B.slice(0,1):B;return c.jsxs("div",{children:[k,T.map((N,M)=>{const G=N.conditionalQuestions??[];if(!G.length)return null;if(!N.conditionalQuestionsAllowMultiple)return c.jsx("div",{className:"mt-3",children:I(G,g)},`branch-${S}-${M}`);const ee=Kt(S),re=wt(m,[...g??[],ee])??[],J=Math.max(1,re.length||1),ue=()=>{const te=He(m,[...g??[],ee,re.length],{});r&&n?n(te):v(te),C(te)},x=()=>{const te=re.slice(0,Math.max(0,re.length-1)),ie=He(m,[...g??[],ee],te);r&&n?n(ie):v(ie),C(ie)},ce=`${S}__c${M}`;return c.jsxs("div",{className:"mt-3",children:[c.jsxs("div",{className:"flex items-center justify-between mb-2",children:[c.jsx("div",{className:"text-sm font-medium opacity-75",children:"Add one or more entries"}),c.jsxs("div",{className:"space-x-2",children:[c.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:ue,children:"Add another"}),J>1&&c.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:x,children:"Remove last"})]})]}),Array.from({length:J}).map((te,ie)=>{const he=[...g??[],ee,ie],ke=`${ce}__i${ie}`,Re=re[ie]??{},et=S==="drivers",we=et?`Driver #${ie+1}`:S==="vehicles"?`Vehicle #${ie+1}`:S==="home_losses"||S==="losses"?`Loss #${ie+1}`:`Entry #${ie+1}`,Le=et&&typeof Re.ssn_display=="string"&&Re.ssn_display?` — ${Re.ssn_display}`:"";return c.jsxs("div",{className:"rounded-lg border p-3 mb-3",children:[c.jsxs("div",{className:"text-sm font-semibold mb-2",children:[we,Le]}),G.map(oe=>{const Fe=String(oe.key);if(!Wt(oe,m,l)||!Mr(oe,m,he)||!Zt(oe,m,a))return null;if(Lr(Fe,oe,m,a)){const tt=l.currentCarrierKey?m[l.currentCarrierKey]:void 0;if(!(tt&&tt!=="NoPriorInsurance"&&ut(m,l)&&Ir.has(Fe)))return null}return c.jsxs("div",{className:"mt-3",children:[O(oe,he),(()=>{const tt=oe.conditionals??[];if(!tt.length)return null;const Xt=Ce(m,he,oe.key),ft=tt.filter(rt=>Ct(Xt,rt.conditionalType,rt.conditionalValue));return(ft.length>1&&!ft.some(rt=>rt.conditionalQuestionsAllowMultiple)?ft.slice(0,1):ft).map((rt,Hr)=>{const Rr=rt.conditionalQuestions??[];if(!Rr.length)return null;if(!rt.conditionalQuestionsAllowMultiple)return c.jsx("div",{className:"mt-3",children:I(Rr,he)},`nested-${ke}-${Hr}`);const er=Kt(oe.key),tr=wt(m,[...he,er])??[],qo=Math.max(1,tr.length||1),__=()=>{const mt=He(m,[...he,er,tr.length],{});r&&n?n(mt):v(mt),C(mt)},f_=()=>{const mt=tr.slice(0,Math.max(0,tr.length-1)),nt=He(m,[...he,er],mt);r&&n?n(nt):v(nt),C(nt)};return c.jsxs("div",{className:"mt-3",children:[c.jsxs("div",{className:"flex items-center justify-between mb-2",children:[c.jsx("div",{className:"text-sm font-medium opacity-75",children:"Add one or more entries"}),c.jsxs("div",{className:"space-x-2",children:[c.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:__,children:"Add another"}),qo>1&&c.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:f_,children:"Remove last"})]})]}),Array.from({length:qo}).map((mt,nt)=>{const m_=[...he,er,nt];return c.jsxs("div",{className:"rounded-lg border p-3 mb-3",children:[c.jsxs("div",{className:"text-sm font-semibold mb-2",children:["Entry #",nt+1]}),I(Rr,m_)]},`nested-item-${ke}-${Hr}-${nt}`)})]},`nested-repeat-${ke}-${Hr}`)})})()]},`${ke}-${Fe}`)})]},`group-${ke}`)})]},`branch-${S}-${M}`)})]},`wrap-${S}-${E}`)})}const D=f.useMemo(()=>{const y=[],g=(_,E)=>{_.forEach(S=>{if(!Wt(S,m,l)||!Mr(S,m,E)||!Zt(S,m,a))return;const k=String(S.key);if(Lr(k,S,m,a)){const N=l.currentCarrierKey?m[l.currentCarrierKey]:void 0;if(!(N&&N!=="NoPriorInsurance"&&ut(m,l)&&Ir.has(k)))return}Yt(S)||y.push(S);const F=S.conditionals??[];if(!F.length)return;const P=bo(S,Ce(m,E,k)),B=F.filter(N=>Ct(P,N.conditionalType,N.conditionalValue));(B.length>1&&!B.some(N=>N.conditionalQuestionsAllowMultiple)?B.slice(0,1):B).forEach(N=>{const M=N.conditionalQuestions??[];M.length&&(N.conditionalQuestionsAllowMultiple||g(M,E))})})};return g(s),y},[s,m,l,a]);function L(y){y.preventDefault();const g=St(m,l),_=D.map(S=>Gt(S,l)?{...S,required:g}:S),E=Rt(_,m);if(H(E),Object.keys(E).length>0){const S=D.findIndex(k=>E[k.key]);S>=0&&document.getElementById(D[S].key)?.focus();return}o(m)}return c.jsx("form",{className:"space-y-6 px-1",onSubmit:L,noValidate:!0,children:I(s)})}const Od="https://getcredify.com/privacy-policy";function Id(){return c.jsx("a",{href:Od,target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})}function wo(){return c.jsxs(c.Fragment,{children:["See our ",c.jsx(Id,{})," for how we use your information."]})}const Md=new Set(["Product","Name","Home","HomeConstruction","HomeFeatures","Vehicle","Driver","Demographics","Customer","HomeCustomer","BundleCustomer"]),Ld=new Set(["AutoCurrentCarrier","HomeCurrentCarrier","HomePolicy","BundlePolicy","AutoPolicy"]);function Dd({stageKey:e}){return e?e==="Zip"?c.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:"No credit card required."}):e==="Email"?c.jsxs("div",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left space-y-1",children:[c.jsx("p",{children:"We'll send your quotes and updates here, and save your progress so you can return anytime."}),c.jsx("p",{children:c.jsx(wo,{})})]}):Ld.has(e)?c.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:"Tell us about your current coverage. Carriers ask about your coverage history to put together accurate quotes — it's a standard step on any application. Coverage gaps are common, so just enter things as they are. You're almost there: your quotes are almost ready."}):e==="Ssn"?c.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:"Your SSN is required by some carriers for fraud prevention, underwriting and to generate a quote. It's entered directly into our secure, encrypted form."}):e==="SMSVerification"?c.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:"You'll receive a text from Credify shortly."}):Md.has(e)?c.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:c.jsx(wo,{})}):null:null}const Pd="GTM-NK8LGHTQ";function Fd(){return typeof window>"u"?[]:(window.dataLayer=window.dataLayer??[],window.dataLayer)}function Qe(e,t={}){Fd().push({event:e,credifyWidget:{...t,containerId:Pd}})}function $d(){Qe("credify_widget_opened")}function Eo(){Qe("credify_widget_closed")}function xd(e){Qe("credify_widget_stage_viewed",e)}function No(e){Qe("credify_widget_stage_completed",e)}function Bd(){Qe("credify_widget_flow_completed")}function zd(e){Qe("credify_widget_rates_viewed",e??{})}function Hd(){Qe("credify_widget_rates_back")}const To=new Set(["Disabled","Retired","Unemployed","Other"]);function Rd(e,t){const r=String(e.key??"");if(r==="co_applicant_occupation"||r!=="occupation")return!0;const n=t.industry,o=t.employment_industry,i=String(n??o??"").trim();return!To.has(i)}function Ud(e,t){const r=String(e.key??"");if(r==="co_applicant_occupation"||r!=="occupation")return!0;const n=t.industry,o=t.employment_industry,i=String(n??o??"").trim();return!To.has(i)}function ko(e){return e.inputType!=="radio"||!e.options||e.options.length!==1||e.options[0]!=="Yes"?!1:(e.conditionals??[]).some(r=>r.conditionalQuestionsAllowMultiple&&r.conditionalType==="equals"&&r.conditionalValue==="Yes")}function Oo(e,t){return ko(e)?"Yes":t}function Io(e){return typeof e=="number"&&Number.isFinite(e)?e:typeof e=="string"&&e.trim()!==""&&!Number.isNaN(Number(e))?Number(e):null}function Mo(e){if(e instanceof Date&&!Number.isNaN(e.getTime()))return e.getTime();if(typeof e=="string"){const t=Date.parse(e);return Number.isNaN(t)?null:t}return null}function Lo(e,t){const r=Io(e),n=Io(t);if(r!=null&&n!=null)return r-n;const o=Mo(e),i=Mo(t);return o!=null&&i!=null?o-i:e==null||t==null?null:String(e).localeCompare(String(t))}function Zd(e,t){return Array.isArray(e)?e.some(r=>r===t):typeof e=="string"?t!=null&&e.includes(String(t)):!1}function Do(e,t,r){switch(t){case"equals":return e===r;case"notEquals":return e!==r&&e!==""&&e!=null;case"lessThan":{const n=Lo(e,r);return n!=null&&n<0}case"greaterThan":{const n=Lo(e,r);return n!=null&&n>0}case"contains":return Zd(e,r);case"startsWith":return e!=null&&r!=null&&String(e).startsWith(String(r));case"endsWith":return e!=null&&r!=null&&String(e).endsWith(String(r));default:return!1}}const Wd=new Set(["auto_prior_years","auto_prior_months","auto_continuous_coverage_years"]);function Dr(e,t,r){const n=sr([...e]),o=Nr(n),i=[],a=s=>{s.forEach(l=>{if(!Wt(l,t,o)||!Rd(l,t)||!Zt(l,t,r))return;const u=String(l.key);if(Gn(u,r,t)){const C=o.currentCarrierKey?t[o.currentCarrierKey]:void 0;if(!(C&&C!=="NoPriorInsurance"&&ut(t,o)&&Wd.has(u)))return}ko(l)||i.push(l);const d=Oo(l,t[u]),p=l.conditionals??[];if(!p.length)return;const v=p.filter(C=>Do(d,C.conditionalType,C.conditionalValue));(v.length>1&&!v.some(C=>C.conditionalQuestionsAllowMultiple)?v.slice(0,1):v).forEach(C=>{const m=C.conditionalQuestions??[];m.length&&(C.conditionalQuestionsAllowMultiple||a(m))})})};return a(n),i}const Po="__items",Pr=e=>`${e}${Po}`;function Gd(e,t){if(e.key==="relationship_to_insured"||e.key==="is_registered_owner"){const r=t[t.length-1];return typeof r=="number"&&r===0}return!1}function Fr(e,t,r=[],n=void 0,o=t){for(const i of e){const a=String(i.key),s=Oo(i,t[a]),l=i.conditionals??[];if(!l.length)continue;const u=l.filter(p=>Do(s,p.conditionalType,p.conditionalValue)),d=u.length>1&&!u.some(p=>p.conditionalQuestionsAllowMultiple)?u.slice(0,1):u;for(const p of d){const v=p.conditionalQuestions??[];if(!v.length)continue;if(!p.conditionalQuestionsAllowMultiple){if(Fr(v,t,r,n,o))return!0;continue}const h=t[Pr(a)]??[];if(h.length===0)return!0;for(const[C,m]of h.entries()){const q=[...r,Pr(a),C],H=Dr(v,m,n).filter(Z=>!(Gd(Z,q)||!Ud(Z,m))),j={state:o.state,...m},R=Rt(H,j);if(Object.values(R).some(Boolean)||Fr(v,m,q,n,o))return!0}}}return!1}function Fo(e,t,r){return Fr(e,t,[],r,t)}function $o(e){const t=e.vehicles__items??[];if(!Array.isArray(t)||t.length===0)return!1;for(const r of t)if(Ve(r.vehicle_comp_deductible,"select")||Ve(r.vehicle_coll_deductible,"select")||Ve(r.vehicle_towing_and_labor,"select")||Ve(r.vehicle_transportation_expense,"select"))return!0;return!1}function jd({stages:e,onStageComplete:t,onComplete:r,initialValues:n,initialActive:o,quoteId:i,nonTerminalStageKeys:a}){const[s,l]=f.useState(o??0),[u,d]=f.useState(n??{}),[p,v]=f.useState({}),[h,C]=f.useState(!1),[m,q]=f.useState(!1),[H,j]=f.useState(null),R=f.useRef([]),Z=f.useRef(e),V=Array.isArray(e)&&e.length>0,W=V?Math.min(s,e.length-1):0,K=V?e[W]:null,z=K?.key??null;f.useEffect(()=>{o!==void 0&&l(o)},[o]),Z.current=e;const Y=f.useMemo(()=>{const w=W>=e.length-1;return w&&z&&a?.has(z)?!1:!!(w||e.slice(W+1).every(I=>I.key==="AutoPolicy")&&(u.drivers__items??[]).length<=1)},[W,e,u,z,a]);f.useEffect(()=>{V&&s>=e.length&&l(e.length-1)},[s,e.length,V]),f.useEffect(()=>{const w=R.current[W];w&&w.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[W]),f.useEffect(()=>{n!==void 0&&d(n)},[n]),f.useEffect(()=>{if(!K||!z){C(!1),j(null);return}if(p[z]){C(!1),j(null);return}let w=!1;return C(!0),j(null),Promise.resolve(K.loadQuestions()).then(O=>{if(!w){if(!Array.isArray(O))throw new Error(`loadQuestions("${z}") did not return an array`);v(I=>({...I,[z]:O}))}}).catch(O=>{w||j(`Failed to load stage "${K?.title??""}": ${O?.message??"Unknown error"}`)}).finally(()=>{w||C(!1)}),()=>{w=!0}},[K,z,p]);const Q=z?p[z]:void 0,ne=f.useMemo(()=>Nr(sr(Q??[])),[Q]);f.useEffect(()=>{K&&z&&Q&&xd({stageKey:z,stageTitle:K.title??z,stepIndex:s+1,totalSteps:e.length})},[z,s,e.length,K,Q]);const me=f.useMemo(()=>{if(!Q)return{};const w={};(D=>{const L=[],y=g=>{g.forEach((_,E)=>{const S=vt(_,E);L.push(S);const k=Pr(S);L.push(k),(_.conditionals??[]).forEach(P=>{const B=P.conditionalQuestions??[];B.length>0&&y(B)})})};return y(D),L})(Q).forEach(D=>{D in u&&(w[D]=u[D])});for(const D of["state","State","address","product"])D in u&&(w[D]=u[D]);for(const[D,L]of Object.entries(u))D.endsWith(Po)&&!(D in w)&&(w[D]=L);return w},[Q,u]),be=w=>{d(O=>({...O,...w}))},Ne=()=>{l(w=>w>0?w-1:0),document.querySelector(".panel-body")?.scrollTo({top:0,behavior:"instant"})},X=async()=>{if(!Q||!K||h||H||m)return;const w=Dr(Q,me,z??void 0),O=St(u,ne),I=w.map(P=>Gt(P,ne)?{...P,required:O}:P),D=Rt(I,me),L=new Set(I.map((P,B)=>vt(P,B))),y=Object.entries(D).some(([P,B])=>B&&L.has(P)),g=Fo(Q,u,z??void 0),E=w.some(P=>String(P.key??"")==="vehicle_policy_selections")?$o(u):!1,S=u.driver_vehicle_assignments,k=u.drivers__items??[];let F=!1;if(S&&k.length>=2){const P=u.vehicles__items??[];for(let B=0;B<P.length;B++){const T=S[`v${B}`];if(!T)continue;const N=k.map((ee,re)=>T[`d${re}`]??0),M=N.filter(ee=>ee>0);if(M.length>=2&&M.every(ee=>ee===50)){F=!0;break}const G=N.reduce((ee,re)=>ee+re,0);if(G>0&&G!==100){F=!0;break}}}if(!(y||g||E||F)){q(!0);try{const P=Y,B=P?await r(u,z??""):await t(me,z??""),{success:T,error:N}=B;if(!T){j(N??"An error occurred");return}if(!P){const M=B.latestStages??Z.current,G=M.findIndex(re=>re.key===z),ee=G>=0?Math.min(G+1,M.length-1):Math.min(s+1,M.length-1);l(ee)}}finally{q(!1)}}},A=f.useMemo(()=>{if(!Q||h||H||m)return!0;const w=Dr(Q,me,z??void 0),O=St(u,ne),I=w.map(P=>Gt(P,ne)?{...P,required:O}:P),D=Rt(I,me),L=new Set(I.map((P,B)=>vt(P,B))),y=Object.entries(D).some(([P,B])=>B&&L.has(P)),g=Fo(Q,u,z??void 0),E=w.some(P=>String(P.key??"")==="vehicle_policy_selections")?$o(u):!1,S=u.driver_vehicle_assignments,k=u.drivers__items??[];let F=!1;if(S&&k.length>=2){const P=u.vehicles__items??[];for(let B=0;B<P.length;B++){const T=S[`v${B}`];if(!T)continue;const N=k.map((ee,re)=>T[`d${re}`]??0),M=N.filter(ee=>ee>0);if(M.length>=2&&M.every(ee=>ee===50)){F=!0;break}const G=N.reduce((ee,re)=>ee+re,0);if(G>0&&G!==100){F=!0;break}}}return y||g||E||F},[Q,me,u,h,H,m,ne,z]);return V?c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"form-wizard-steps-header flex items-center justify-between gap-4",children:[c.jsx("ol",{className:"form-wizard-steps flex gap-2 text-xs overflow-x-auto flex-1 pb-1 scrollbar-hide items-center",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:e.flatMap((w,O)=>[c.jsx("li",{ref:I=>{R.current[O]=I},className:`form-wizard-step-pill px-2.5 py-1 rounded-full border whitespace-nowrap flex-shrink-0 ${O<W?"bg-blue-600 text-white border-blue-600":O===W?"border-blue-600 text-blue-600 bg-white":"border-slate-200 text-slate-600"}`,children:w.title},w.key??`stage-${O}`),...O<e.length-1?[c.jsx("li",{className:"form-wizard-step-arrow text-slate-400 flex-shrink-0",children:"→"},`arrow-${w.key??O}`)]:[]])}),c.jsxs("div",{className:"form-wizard-step-counter text-sm text-slate-500 flex-shrink-0",children:[W+1," / ",e.length]})]}),c.jsxs("div",{children:[h&&c.jsx("div",{className:"text-slate-500",children:"Loading…"}),K&&c.jsx(kd,{questions:Q??[],controlledValues:me,onChangeValues:be,onSubmit:()=>X(),quoteId:i,widgetStageKey:z??void 0},K.key)]}),!h&&H&&c.jsxs("div",{className:"text-red-600 text-sm -mt-4",children:[c.jsx("div",{children:H}),K&&c.jsx("button",{type:"button",className:"credify-retry-btn underline mt-1 font-bold",onClick:()=>{v(w=>{if(!z)return w;const O={...w};return delete O[z],O})},children:"Retry"})]}),c.jsx(Dd,{stageKey:z}),c.jsxs("div",{className:W>0?"grid grid-cols-2 gap-3":"",children:[W>0&&c.jsx("button",{type:"button",onClick:Ne,disabled:h,className:"credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition",children:"Back"}),c.jsxs("button",{type:"button","data-widget-ctrl":"next",onClick:X,disabled:A,className:["form-wizard-next-btn",W>0?"":"w-full","h-12 rounded-full text-white transition","disabled:opacity-50 disabled:cursor-not-allowed","flex items-center justify-center gap-2",A?"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"].join(" "),children:[m&&c.jsxs("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:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.jsx("path",{className:"opacity-75",fill:"currentColor",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"})]}),Y?"Finish":"Next"]})]})]}):c.jsx("div",{className:"text-slate-600",children:"Loading..."})}const xo={SafecoPersonal:{name:"Safeco",abbr:"SFC",color:"#0F337A"},SafecoPersoanl:{name:"Safeco",abbr:"SFC",color:"#0F337A"},AssuranceAmerica:{name:"Assurance America",abbr:"AA",color:"#2768B5"},CommonWealthCasualty:{name:"Commonwealth Casualty",abbr:"CW",color:"#2D69EC"},Alinsco:{name:"Alinsco",abbr:"AL",color:"#20395D"},ACORDBOLTPersonalAuto:{name:"Bolt Auto",abbr:"BLT",color:"#1F2937"},ACORDBOLTPersonalHome:{name:"Bolt Home",abbr:"BLT",color:"#1F2937"},TwentyFirstCentury:{name:"21st Century",abbr:"21C",color:"#B2392A"},ACentral:{name:"A-Central",abbr:"ACT",color:"#EAAD1D"},AAA:{name:"AAA",abbr:"AAA",color:"#DB461C"},AARP:{name:"AARP",abbr:"ARP",color:"#DB4724"},Acadia:{name:"Acadia",abbr:"ACD",color:"#386B61"},Ace:{name:"ACE",abbr:"ACE",color:"#457D48"},Acuity:{name:"Acuity",abbr:"ACU",color:"#D74630"},AdirondackInsExchange:{name:"Adirondack",abbr:"ADK",color:"#1F5490"},Aegis:{name:"Aegis",abbr:"AEG",color:"#1A4675"},AIC:{name:"AIC",abbr:"AIC",color:"#508F47"},AIG:{name:"AIG",abbr:"AIG",color:"#223572"},AlfaAlliance:{name:"Alfa Alliance",abbr:"ALF",color:"#C13D17"},AllianzOfAmerica:{name:"Allianz",abbr:"ALZ",color:"#003781"},AllianzOfAmericaJefferson:{name:"Allianz Jefferson",abbr:"ALZ",color:"#003781"},Allied:{name:"Allied",abbr:"ALD",color:"#0047BB"},Allmerica:{name:"Allmerica",abbr:"ALM",color:"#003DA5"},Allstate:{name:"Allstate",abbr:"ALS",color:"#002F87"},AmericaFirst:{name:"America First",abbr:"AMF",color:"#003DA5"},AmericanCommerce:{name:"American Commerce",abbr:"ACM",color:"#003DA5"},AmericanFamily:{name:"American Family",abbr:"AMF",color:"#0033A0"},Amica:{name:"Amica",abbr:"AMI",color:"#003DA5"},Ameriprise:{name:"Ameriprise",abbr:"AMP",color:"#003DA5"},ASILloyds:{name:"ASI Lloyds",abbr:"ASI",color:"#003DA5"},Assurant:{name:"Assurant",abbr:"ASR",color:"#0033A0"},AtlasGeneralAgency:{name:"Atlas General",abbr:"ATL",color:"#1F3864"},AustinMutual:{name:"Austin Mutual",abbr:"AUS",color:"#1F3864"},Autoone:{name:"AutoOne",abbr:"AON",color:"#003DA5"},AutoOwners:{name:"Auto-Owners",abbr:"AO",color:"#C8102E"},BadgerMutual:{name:"Badger Mutual",abbr:"BDG",color:"#003DA5"},Balboa:{name:"Balboa",abbr:"BAL",color:"#1F3864"},Bamboo:{name:"Bamboo",abbr:"BMB",color:"#0F4C3A"},Bankers:{name:"Bankers",abbr:"BNK",color:"#1F3864"},BeaconNational:{name:"Beacon National",abbr:"BCN",color:"#003DA5"},BrethernMutual:{name:"Brethren Mutual",abbr:"BRT",color:"#1F3864"},BristolWest:{name:"Bristol West",abbr:"BW",color:"#003DA5"},BunkerHill:{name:"Bunker Hill",abbr:"BHL",color:"#1F3864"},CapitalInsuranceGroup:{name:"Capital Insurance",abbr:"CIG",color:"#003DA5"},Celina:{name:"Celina",abbr:"CEL",color:"#1F3864"},CentralMutualOfOH:{name:"Central Mutual",abbr:"CMO",color:"#003DA5"},Chubb:{name:"Chubb",abbr:"CHB",color:"#000000"},ChubbInsurance:{name:"Chubb",abbr:"CHB",color:"#000000"},Cincinnati:{name:"Cincinnati",abbr:"CIN",color:"#003DA5"},Citizens:{name:"Citizens",abbr:"CTZ",color:"#003DA5"},Clearcover:{name:"Clearcover",abbr:"CC",color:"#00B5E2"},CNA:{name:"CNA",abbr:"CNA",color:"#CC3232"},ColonialPenn:{name:"Colonial Penn",abbr:"CPN",color:"#0072CE"},ColoradoCasualty:{name:"Colorado Casualty",abbr:"COC",color:"#1F3864"},Columbia:{name:"Columbia",abbr:"CLM",color:"#003DA5"},CommerceWest:{name:"Commerce West",abbr:"CMW",color:"#003DA5"},CommonwealthCasualty:{name:"Commonwealth Casualty",abbr:"CW",color:"#1F3864"},ConstitutionalCasualty:{name:"Constitutional Casualty",abbr:"CON",color:"#1F3864"},Cornerstone:{name:"Cornerstone",abbr:"CRN",color:"#1F3864"},Countrywide:{name:"Countrywide",abbr:"CTW",color:"#003DA5"},CSE:{name:"CSE",abbr:"CSE",color:"#003DA5"},Cumberland:{name:"Cumberland",abbr:"CMB",color:"#1F3864"},Cypress:{name:"Cypress",abbr:"CYP",color:"#0F4C3A"},Dairyland:{name:"Dairyland",abbr:"DL",color:"#0072CE"},Deerbrook:{name:"Deerbrook",abbr:"DBK",color:"#1F3864"},Direct:{name:"Direct",abbr:"DIR",color:"#D52B1E"},Donegal:{name:"Donegal",abbr:"DON",color:"#003DA5"},Drive:{name:"Drive",abbr:"DRV",color:"#1F3864"},Electric:{name:"Electric",abbr:"ELC",color:"#003DA5"},EMC:{name:"EMC",abbr:"EMC",color:"#003DA5"},Encompass:{name:"Encompass",abbr:"ENC",color:"#002F87"},Erie:{name:"Erie",abbr:"ERI",color:"#005FAC"},Esurance:{name:"Esurance",abbr:"ESU",color:"#00A6CE"},ExcelsiorInsuranceCompany:{name:"Excelsior",abbr:"EXC",color:"#1F3864"},Explorer:{name:"Explorer",abbr:"EXP",color:"#1F3864"},FairPlan:{name:"FAIR Plan",abbr:"FPN",color:"#1F3864"},FarmBureau:{name:"Farm Bureau",abbr:"FB",color:"#00843D"},Farmers:{name:"Farmers",abbr:"FRM",color:"#1C428B"},Fidelity:{name:"Fidelity",abbr:"FID",color:"#00833F"},FiremansFund:{name:"Fireman's Fund",abbr:"FF",color:"#E31837"},FirstAmerican:{name:"First American",abbr:"FAM",color:"#003DA5"},Foremost:{name:"Foremost",abbr:"FOR",color:"#E31837"},ForemostInsuranceCompany:{name:"Foremost",abbr:"FOR",color:"#E31837"},Geico:{name:"GEICO",abbr:"GEI",color:"#0F4293"},GeneralCasualty:{name:"General Casualty",abbr:"GC",color:"#1F3864"},GermantownMutual:{name:"Germantown Mutual",abbr:"GTM",color:"#1F3864"},GMAC:{name:"GMAC",abbr:"GMA",color:"#003DA5"},Grange:{name:"Grange",abbr:"GRG",color:"#003DA5"},GreatAmerican:{name:"Great American",abbr:"GA",color:"#003DA5"},Grinnell:{name:"Grinnell Mutual",abbr:"GRN",color:"#E31837"},GuideOne:{name:"GuideOne",abbr:"GO",color:"#0072CE"},Hanover:{name:"Hanover",abbr:"HAN",color:"#003DA5"},Harbor:{name:"Harbor",abbr:"HBR",color:"#1F3864"},Harleysville:{name:"Harleysville",abbr:"HRL",color:"#003DA5"},Hartford:{name:"The Hartford",abbr:"HFD",color:"#7F1734"},HartfordOMNI:{name:"Hartford OMNI",abbr:"HOM",color:"#7F1734"},HastingsMutual:{name:"Hastings Mutual",abbr:"HST",color:"#1F3864"},HawkeyeSecurity:{name:"Hawkeye Security",abbr:"HWK",color:"#1F3864"},HDI:{name:"HDI",abbr:"HDI",color:"#00563F"},HippoInsuranceCompany:{name:"Hippo",abbr:"HPO",color:"#00C9A7"},HomeownersOfAmerica:{name:"Homeowners of America",abbr:"HOA",color:"#003DA5"},Homesite:{name:"Homesite",abbr:"HMS",color:"#0033A0"},HoraceMann:{name:"Horace Mann",abbr:"HM",color:"#003DA5"},HoustonGeneral:{name:"Houston General",abbr:"HG",color:"#1F3864"},IFA:{name:"IFA",abbr:"IFA",color:"#003DA5"},ImperialCasualty:{name:"Imperial Casualty",abbr:"IMP",color:"#1F3864"},Indiana:{name:"Indiana Insurance",abbr:"IND",color:"#003DA5"},IndianaFarmers:{name:"Indiana Farmers",abbr:"IFM",color:"#00843D"},Infinity:{name:"Infinity",abbr:"INF",color:"#E31837"},Insurequest:{name:"Insurequest",abbr:"INQ",color:"#1F3864"},Integon:{name:"Integon",abbr:"ITG",color:"#003DA5"},Integrity:{name:"Integrity",abbr:"ITY",color:"#1F3864"},Kemper:{name:"Kemper",abbr:"KMP",color:"#0033A0"},LibertyMutual:{name:"Liberty Mutual",abbr:"LM",color:"#FFD000"},LibertyNorthwest:{name:"Liberty Northwest",abbr:"LNW",color:"#FFD000"},Lloyds:{name:"Lloyd's",abbr:"LLY",color:"#003DA5"},MainStreetAmerica:{name:"Main Street America",abbr:"MSA",color:"#003DA5"},Mapfre:{name:"MAPFRE",abbr:"MAP",color:"#E31837"},MarkelInsuranceCompany:{name:"Markel",abbr:"MKL",color:"#003DA5"},Mendota:{name:"Mendota",abbr:"MND",color:"#1F3864"},MerchantsGroup:{name:"Merchants Group",abbr:"MRC",color:"#003DA5"},Mercury:{name:"Mercury",abbr:"MER",color:"#ED1C24"},Metlife:{name:"MetLife",abbr:"MET",color:"#0090DA"},Metropolitan:{name:"Metropolitan",abbr:"MTP",color:"#0090DA"},MidContinent:{name:"Mid-Continent",abbr:"MC",color:"#003DA5"},MidwesternIndemnity:{name:"Midwestern Indemnity",abbr:"MWI",color:"#003DA5"},Montgomery:{name:"Montgomery",abbr:"MTG",color:"#1F3864"},MSA:{name:"MSA",abbr:"MSA",color:"#003DA5"},MtWashington:{name:"Mt. Washington",abbr:"MTW",color:"#1F3864"},MutualBenefit:{name:"Mutual Benefit",abbr:"MB",color:"#1F3864"},NatGenPremier:{name:"NatGen Premier",abbr:"NGP",color:"#0033A0"},NationalGeneral:{name:"National General",abbr:"NG",color:"#0033A0"},Nationwide:{name:"Nationwide",abbr:"NW",color:"#204D9B"},NationwideScottsdale:{name:"Nationwide Scottsdale",abbr:"NWS",color:"#204D9B"},NewYorkCentralMutual:{name:"NY Central Mutual",abbr:"NYC",color:"#003DA5"},NJManufacturers:{name:"NJM Insurance",abbr:"NJM",color:"#003DA5"},NJSkylands:{name:"NJ Skylands",abbr:"NJS",color:"#003DA5"},Northstar:{name:"Northstar",abbr:"NST",color:"#1F3864"},Occidental:{name:"Occidental",abbr:"OCC",color:"#1F3864"},OhioCasualty:{name:"Ohio Casualty",abbr:"OHC",color:"#003DA5"},OmahaPC:{name:"Omaha P&C",abbr:"OMA",color:"#003DA5"},OneBeacon:{name:"OneBeacon",abbr:"OB",color:"#003DA5"},OregonMutual:{name:"Oregon Mutual",abbr:"ORE",color:"#003DA5"},Palisades:{name:"Palisades",abbr:"PAL",color:"#1F3864"},PeerlessMontgomery:{name:"Peerless Montgomery",abbr:"PRM",color:"#1F3864"},Pekin:{name:"Pekin",abbr:"PEK",color:"#003DA5"},Pemco:{name:"PEMCO",abbr:"PMC",color:"#0072CE"},PennNational:{name:"Penn National",abbr:"PN",color:"#003DA5"},PlymouthRock:{name:"Plymouth Rock",abbr:"PLR",color:"#003DA5"},PreferredMutual:{name:"Preferred Mutual",abbr:"PFM",color:"#003DA5"},Proformance:{name:"Proformance",abbr:"PRF",color:"#1F3864"},Progressive:{name:"Progressive",abbr:"PRG",color:"#0053BA"},Prudential:{name:"Prudential",abbr:"PRU",color:"#0033A0"},PureHighValue:{name:"PURE",abbr:"PUR",color:"#003DA5"},Republic:{name:"Republic",abbr:"REP",color:"#003DA5"},RockfordMutual:{name:"Rockford Mutual",abbr:"RKF",color:"#1F3864"},RoyalAndSunAlliance:{name:"Royal & SunAlliance",abbr:"RSA",color:"#003DA5"},Safeco:{name:"Safeco",abbr:"SFC",color:"#E4002B"},SECURA:{name:"SECURA",abbr:"SEC",color:"#003DA5"},Selective:{name:"Selective",abbr:"SEL",color:"#003DA5"},SouthernCounty:{name:"Southern County",abbr:"SCM",color:"#1F3864"},SouthernMutual:{name:"Southern Mutual",abbr:"SM",color:"#1F3864"},SouthernTrust:{name:"Southern Trust",abbr:"ST",color:"#1F3864"},StPaulTravelers:{name:"St. Paul Travelers",abbr:"SPT",color:"#C8102E"},StandardMutual:{name:"Standard Mutual",abbr:"STM",color:"#1F3864"},StarCasualty:{name:"Star Casualty",abbr:"SC",color:"#1F3864"},StateAuto:{name:"State Auto",abbr:"SA",color:"#003DA5"},StateFarm:{name:"State Farm",abbr:"SF",color:"#CC0717"},StateFarmFloridaInsuranceCompany:{name:"State Farm Florida",abbr:"SFF",color:"#CC0717"},SunshineStateInsuranceCompany:{name:"Sunshine State",abbr:"SSS",color:"#FFC72C"},Travelers:{name:"Travelers",abbr:"TRV",color:"#C8102E"},Tower:{name:"Tower",abbr:"TWR",color:"#1F3864"},TWFG:{name:"TWFG",abbr:"TWF",color:"#003DA5"},Unigard:{name:"Unigard",abbr:"UNG",color:"#1F3864"},UnitedFireAndCasualty:{name:"United Fire & Casualty",abbr:"UFC",color:"#003DA5"},Unitrin:{name:"Unitrin",abbr:"UTN",color:"#003DA5"},Universal:{name:"Universal",abbr:"UNV",color:"#003DA5"},USAA:{name:"USAA",abbr:"USA",color:"#1A3258"},UticaNational:{name:"Utica National",abbr:"UTC",color:"#003DA5"},Victoria:{name:"Victoria",abbr:"VIC",color:"#1F3864"},Wellington:{name:"Wellington",abbr:"WLG",color:"#1F3864"},WestBend:{name:"West Bend",abbr:"WB",color:"#003DA5"},WesternNational:{name:"Western National",abbr:"WN",color:"#003DA5"},WesternReserveGroup:{name:"Western Reserve",abbr:"WR",color:"#003DA5"},Westfield:{name:"Westfield",abbr:"WF",color:"#F05136"},WhiteMountains:{name:"White Mountains",abbr:"WM",color:"#1F3864"},WilsonMutual:{name:"Wilson Mutual",abbr:"WLM",color:"#1F3864"},Windsor:{name:"Windsor",abbr:"WIN",color:"#1F3864"},Zurich:{name:"Zurich",abbr:"ZUR",color:"#003399"}},Bo=["#0369A1","#1D4ED8","#0F766E","#7C3AED","#B45309","#DC2626","#0891B2","#9333EA"];function Vd(e){return e.replace(/[^A-Za-z0-9]/g,"").slice(0,3).toUpperCase()||"CAR"}function zo(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/_/g," ").trim()}function $r(e){if(!e)return e;const t=xo[e];return t?t.name:zo(e)}function Yd(e){const t=new Set,r=[];return e.forEach((n,o)=>{const a=xo[n]??{name:zo(n),abbr:Vd(n),color:Bo[o%Bo.length]};t.has(a.name)||(t.add(a.name),r.push(a))}),r}function Kd(e,t){if(!e)return[];const r=[];return(t==="Auto"||t==="Bundle")&&Array.isArray(e.PersonalAuto)&&r.push(...e.PersonalAuto),(t==="Home"||t==="Bundle")&&Array.isArray(e.PersonalHome)&&r.push(...e.PersonalHome),Yd(r)}const qd=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}),Ho={PersonalHome:"Homeowners",PersonalAuto:"Personal Auto",Flood:"Flood",ExcessFlood:"Excess Flood",_other:"Other"},Ro=["PersonalHome","PersonalAuto","Flood","ExcessFlood"],Et="rounded-2xl border-2 border-blue-300 bg-blue-50/30 p-4 shadow-blue-100/60 ring-1 ring-blue-100",Nt="mb-3 inline-flex w-fit items-center rounded-full bg-blue-100 px-2.5 py-1 text-xs font-semibold text-blue-700",Uo="w-full max-w-md min-w-0 sm:max-w-[calc((100%-1rem)/2)]",Jd="rounded-2xl border-2 border-transparent p-4";function Zo({onBack:e}){const t=()=>{Hd(),e?.()};return c.jsx("button",{type:"button",onClick:t,className:"credify-btn-back credify-btn-back-rates h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition w-full",children:"Back"})}function Ye({rate:e,status:t,onRequestBind:r,disabled:n,featured:o=!1,showLobLabel:i=!0,showFeaturedBadge:a,className:s}){const l=Number.isFinite(e.term_months)&&e.term_months>0?e.term_months:1,d=(e.monthly_premium_cents!=null?e.monthly_premium_cents:Math.round((e.premium_cents||0)/l))/100,p=qd.format(d),v=t==="loading",h=t==="success",C=!!n||v||h,m=!!(e.effective_date&&e.policy_end_date),q=e.lob?Ho[e.lob]||e.lob:null,H=a??o;return c.jsxs("div",{className:`flex w-full flex-col rounded-xl bg-white p-6 shadow-sm transition hover:shadow-md ${o?"border-2 border-blue-300 shadow-blue-100/60 ring-1 ring-blue-100":"border border-slate-200"}${s?` ${s}`:""}`,children:[i&&q&&c.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-slate-500",children:q}),H&&c.jsx("div",{className:"mb-3 inline-flex w-fit items-center rounded-full bg-blue-50 px-2.5 py-1 text-xs font-semibold text-blue-700",children:"Featured"}),c.jsxs("div",{className:"mb-4 flex flex-col items-start gap-2",children:[e.carrier_logo_base64?c.jsx("img",{src:`data:image/png;base64,${e.carrier_logo_base64}`,alt:$r(e.carrier_name),className:"h-12 w-auto max-w-full object-contain"}):c.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-md bg-slate-100 text-sm font-semibold text-slate-500",children:$r(e.carrier_name).charAt(0).toUpperCase()}),c.jsx("h4",{className:"w-full break-words text-left font-semibold text-slate-900",children:$r(e.carrier_name)})]}),c.jsx("div",{className:"mb-2",children:c.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:[p,c.jsx("span",{className:"ml-1 text-sm font-medium text-slate-500",children:"/month"})]})}),m&&c.jsx("div",{className:"mb-2",children:c.jsxs("p",{className:"text-xs text-slate-500",children:["Effective ",e.effective_date," - ",e.policy_end_date]})}),e.carrier_quote_id&&c.jsx("div",{className:"mb-4",children:c.jsxs("p",{className:"text-xs text-slate-400",children:["Quote ID: ",e.carrier_quote_id]})}),c.jsxs("div",{className:"mt-auto pt-4",children:[c.jsx("button",{type:"button",onClick:r,disabled:C,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 disabled:cursor-not-allowed ${h?"rates-bind-btn-requested":"hover:bg-blue-600/90 disabled:bg-slate-300 disabled:text-slate-500"}`,children:v?"Requesting…":h?"Requested":"Request Bind"}),t==="error"&&c.jsx("p",{className:"mt-2 text-xs text-red-600",children:"Something went wrong. Please try again."}),t==="success"&&c.jsx("p",{className:"mt-2 text-xs text-emerald-600",children:"We received your bind request."})]})]})}function Qd({rates:e,onBack:t,isBundleFlow:r=!1}){const n=Array.isArray(e)?e:[],o=n.length>0,[i,a]=f.useState({}),[s,l]=f.useState("admitted"),[u,d]=f.useState(!1),p=f.useMemo(()=>n.some(A=>A.lob==="PersonalAuto"),[n]),v=f.useMemo(()=>n.some(A=>A.lob==="PersonalHome"),[n]),h=f.useMemo(()=>{if(!r)return[];const A=[];return p&&A.push("PersonalAuto"),v&&A.push("PersonalHome"),A},[r,p,v]),C=f.useMemo(()=>{const A=new Set;for(const w of n){const O=w.lob??null;O&&i[w.quote_rate_id]==="success"&&A.add(O)}return A},[n,i]),m=f.useMemo(()=>Object.values(i).some(A=>A==="success"),[i]),q=f.useMemo(()=>u?!0:!r||h.length===0?m:h.every(A=>C.has(A)),[u,r,m,h,C]),H=f.useMemo(()=>o?n.filter(A=>(A.admitted_status??"admitted")==="admitted"):[],[n,o]),j=f.useMemo(()=>o?n.filter(A=>A.admitted_status==="non_admitted"):[],[n,o]),R=H.length,Z=j.length,V=R+Z>0;f.useEffect(()=>{V&&s==="admitted"&&R===0&&Z>0&&l("non_admitted")},[s,R,Z,V]);const W=f.useMemo(()=>V?s==="admitted"?H:j:[],[V,s,H,j]);f.useEffect(()=>{Or()},[]),f.useEffect(()=>{!q||u||(ad(),uo(),d(!0))},[q,u]);const K=f.useMemo(()=>{if(W.length===0)return[];if(!W.some(I=>I.lob))return[{lob:null,title:"Rates",rates:[...W].sort((D,L)=>{const y=Number.isFinite(D.term_months)&&D.term_months>0?D.term_months:1,g=Number.isFinite(L.term_months)&&L.term_months>0?L.term_months:1,_=D.monthly_premium_cents??Math.round((D.premium_cents||0)/y),E=L.monthly_premium_cents??Math.round((L.premium_cents||0)/g);return _-E})}];const w=new Map;for(const I of W){const D=I.lob||"_other",L=w.get(D);L?L.push(I):w.set(D,[I])}return[...w.entries()].sort(([I],[D])=>{const L=Ro.indexOf(I),y=Ro.indexOf(D);return(L===-1?999:L)-(y===-1?999:y)}).map(([I,D])=>({lob:I,title:Ho[I]??I,rates:[...D].sort((L,y)=>{const g=Number.isFinite(L.term_months)&&L.term_months>0?L.term_months:1,_=Number.isFinite(y.term_months)&&y.term_months>0?y.term_months:1,E=L.monthly_premium_cents??Math.round((L.premium_cents||0)/g),S=y.monthly_premium_cents??Math.round((y.premium_cents||0)/_);return E-S})}))},[W]),z=f.useMemo(()=>{if(!r)return[];const A=n.some(I=>I.lob==="PersonalAuto"),w=n.some(I=>I.lob==="PersonalHome"),O=[];return A||O.push("Sorry, no rates found for Personal Auto."),w||O.push("Sorry, no rates found for Homeowners."),O},[r,n]);if(!V)return c.jsxs("section",{className:"mt-8",children:[c.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Rates"}),c.jsx("p",{className:"mt-2 text-sm text-slate-500",children:"Sorry, no rates are available at this time."}),t&&c.jsx(Zo,{onBack:t})]});const Y=async A=>{a(w=>({...w,[A]:"loading"}));try{if(Or(),!At())throw new Error("Authentication required. Please verify your phone number first.");if(!((await fd(A))?.success!==!1))throw new Error("Request failed");a(D=>({...D,[A]:"success"}))}catch{a(w=>({...w,[A]:"error"}))}},Q=K.find(A=>A.lob==="PersonalAuto"),ne=K.find(A=>A.lob==="PersonalHome"),me=!!(Q?.rates.length&&ne?.rates.length),be=K.filter(A=>!me||A.lob!=="PersonalAuto"&&A.lob!=="PersonalHome"),Ne=me&&Q&&ne?[{rate:Q.rates[0]},{rate:ne.rates[0]}]:[],X=Ne.length===1;return c.jsxs("section",{className:"mt-8",children:[c.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Rates"}),z.length>0&&c.jsx("div",{className:"mt-3 space-y-1",children:z.map(A=>c.jsx("p",{className:"text-sm text-slate-600",children:A},A))}),c.jsx("div",{className:"mt-4 border-b border-slate-200",children:c.jsxs("div",{className:"flex items-center gap-6",children:[c.jsxs("button",{type:"button",onClick:()=>l("admitted"),className:`border-b-2 px-1 py-2 text-sm font-semibold transition ${s==="admitted"?"border-cyan-500 text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Admitted (",R,")"]}),c.jsxs("button",{type:"button",onClick:()=>l("non_admitted"),className:`border-b-2 px-1 py-2 text-sm font-semibold transition ${s==="non_admitted"?"border-cyan-500 text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Non-admitted (",Z,")"]})]})}),W.length===0&&c.jsx("p",{className:"mt-4 text-sm text-slate-500",children:s==="admitted"?"Sorry, no admitted rates are available at this time.":"Sorry, no non-admitted rates are available at this time."}),W.length>0&&me&&Q&&ne&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:X?"mt-6 flex justify-center":"mt-6",children:c.jsxs("div",{className:X?`w-full max-w-md ${Et}`:Et,children:[c.jsx("div",{className:Nt,children:"Featured Bundle"}),c.jsx("div",{className:X?"grid justify-items-center gap-4":"grid gap-4 sm:grid-cols-2",children:Ne.map(({rate:A})=>c.jsx("div",{className:"mx-auto w-full min-w-0 max-w-md",children:c.jsx(Ye,{rate:A,featured:!1,showLobLabel:!0,showFeaturedBadge:!1,status:i[A.quote_rate_id]??"idle",disabled:q||(r?!!(A.lob&&h.includes(A.lob)&&C.has(A.lob)):m),onRequestBind:()=>Y(A.quote_rate_id)})},A.quote_rate_id))})]})}),Q.rates.length>1&&c.jsxs("div",{className:"mt-6",children:[c.jsxs("h4",{className:"mb-3 text-base font-semibold text-slate-800",children:["More ",Q.title," Options"]}),c.jsx("div",{className:"grid gap-4 sm:grid-cols-2",children:Q.rates.slice(1).map(A=>c.jsx("div",{className:"mx-auto w-full min-w-0 max-w-md",children:c.jsx(Ye,{rate:A,featured:!1,showLobLabel:!0,showFeaturedBadge:!1,status:i[A.quote_rate_id]??"idle",disabled:q||(r?!!(A.lob&&h.includes(A.lob)&&C.has(A.lob)):m),onRequestBind:()=>Y(A.quote_rate_id)})},A.quote_rate_id))})]}),ne.rates.length>1&&c.jsxs("div",{className:"mt-6",children:[c.jsxs("h4",{className:"mb-3 text-base font-semibold text-slate-800",children:["More ",ne.title," Options"]}),c.jsx("div",{className:"grid gap-4 sm:grid-cols-2",children:ne.rates.slice(1).map(A=>c.jsx("div",{className:"mx-auto w-full min-w-0 max-w-md",children:c.jsx(Ye,{rate:A,featured:!1,showLobLabel:!0,showFeaturedBadge:!1,status:i[A.quote_rate_id]??"idle",disabled:q||(r?!!(A.lob&&h.includes(A.lob)&&C.has(A.lob)):m),onRequestBind:()=>Y(A.quote_rate_id)})},A.quote_rate_id))})]})]}),W.length>0&&be.map(A=>{const[w,...O]=A.rates;return c.jsxs("div",{className:"mt-6",children:[c.jsx("h4",{className:"mb-3 text-base font-semibold text-slate-800",children:A.title}),O.length===0?c.jsx("div",{className:"grid gap-4 sm:grid-cols-2",children:c.jsx("div",{className:"col-span-full flex justify-center",children:c.jsxs("div",{className:`${Uo} ${Et}`,children:[c.jsx("div",{className:Nt,children:"Featured"}),c.jsx(Ye,{rate:w,featured:!1,showLobLabel:A.lob==null,showFeaturedBadge:!1,status:i[w.quote_rate_id]??"idle",disabled:q||(r?!!(w.lob&&h.includes(w.lob)&&C.has(w.lob)):m),onRequestBind:()=>Y(w.quote_rate_id)})]})})}):O.length===1?c.jsxs("div",{className:"grid items-stretch gap-4 sm:grid-cols-2",children:[c.jsxs("div",{className:`flex h-full min-h-0 w-full min-w-0 flex-col ${Et}`,children:[c.jsx("div",{className:Nt,children:"Featured"}),c.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:c.jsx(Ye,{rate:w,featured:!1,showLobLabel:A.lob==null,showFeaturedBadge:!1,status:i[w.quote_rate_id]??"idle",onRequestBind:()=>Y(w.quote_rate_id),disabled:q||(r?!!(w.lob&&h.includes(w.lob)&&C.has(w.lob)):m),className:"h-full min-h-0"})})]}),c.jsxs("div",{className:`flex h-full min-h-0 w-full min-w-0 flex-col ${Jd}`,children:[c.jsx("div",{className:`${Nt} pointer-events-none invisible shrink-0`,"aria-hidden":!0,children:"Featured"}),c.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:c.jsx(Ye,{rate:O[0],featured:!1,showLobLabel:A.lob==null,showFeaturedBadge:!1,status:i[O[0].quote_rate_id]??"idle",onRequestBind:()=>Y(O[0].quote_rate_id),disabled:q||(r?!!(O[0].lob&&h.includes(O[0].lob)&&C.has(O[0].lob)):m),className:"h-full min-h-0"})})]})]}):c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"grid gap-4 sm:grid-cols-2",children:c.jsx("div",{className:"col-span-full flex justify-center",children:c.jsxs("div",{className:`${Uo} ${Et}`,children:[c.jsx("div",{className:Nt,children:"Featured"}),c.jsx(Ye,{rate:w,featured:!1,showLobLabel:A.lob==null,showFeaturedBadge:!1,status:i[w.quote_rate_id]??"idle",disabled:q||(r?!!(w.lob&&h.includes(w.lob)&&C.has(w.lob)):m),onRequestBind:()=>Y(w.quote_rate_id)})]})})}),c.jsx("div",{className:"mt-6 grid gap-4 sm:grid-cols-2",children:O.map(I=>c.jsx("div",{className:"mx-auto w-full min-w-0 max-w-md",children:c.jsx(Ye,{rate:I,featured:!1,showLobLabel:A.lob==null,showFeaturedBadge:!1,status:i[I.quote_rate_id]??"idle",disabled:q||(r?!!(I.lob&&h.includes(I.lob)&&C.has(I.lob)):m),onRequestBind:()=>Y(I.quote_rate_id)})},I.quote_rate_id))})]})]},A.lob??"all")}),t&&c.jsx(Zo,{onBack:t})]})}const xr=["Validating your details...","Checking underwriting rules...","Applying eligible discounts...","Reviewing your risk profile...","Calculating premium...","Check complete"],Wo={Auto:{label:"Auto Policy",icon:"🚗",accent:"#0369A1"},Home:{label:"Home Policy",icon:"🏠",accent:"#059669"},Bundle:{label:"Home + Auto Bundle",icon:"🔗",accent:"#7C3AED"}},Go={Auto:6e4,Home:9e4,Bundle:12e4};function Xd({progress:e,color:t,size:r=80}){const n=(r-10)/2,o=2*Math.PI*n,i=o-e/100*o;return c.jsxs("svg",{width:r,height:r,style:{transform:"rotate(-90deg)"},children:[c.jsx("circle",{cx:r/2,cy:r/2,r:n,fill:"none",stroke:"#F1F5F9",strokeWidth:6}),c.jsx("circle",{cx:r/2,cy:r/2,r:n,fill:"none",stroke:t,strokeWidth:6,strokeLinecap:"round",strokeDasharray:o,strokeDashoffset:i,style:{transition:"stroke-dashoffset 0.2s linear"}})]})}function e_({providers:e=[],totalTime:t=6e4,flow:r="Auto",isComplete:n=!1,onComplete:o}){const i=Wo[r]??Wo.Auto,a=Go[r]??Go.Auto,s=e.length>0?Math.floor(a/e.length):t,[l,u]=f.useState(0),[d,p]=f.useState(0),[v,h]=f.useState(0),[C,m]=f.useState(0),[q,H]=f.useState(!0),j=f.useRef(n),R=f.useRef(o),Z=f.useRef(l),V=f.useRef(e.length),W=f.useRef(!1),K=f.useRef(!1);f.useEffect(()=>{j.current=n,n&&e.length===0&&!W.current&&(W.current=!0,R.current?.())},[n,e.length]),f.useEffect(()=>{R.current=o},[o]),f.useEffect(()=>{Z.current=l},[l]),f.useEffect(()=>{V.current=e.length,e.length>0&&(K.current=!1,u(0),p(0),h(0),m(0),H(!0))},[e.length]),f.useEffect(()=>{if(e.length===0){j.current&&!W.current&&(W.current=!0,R.current?.());return}K.current=!1;const ne=100,me=100/(s/ne),be=setInterval(()=>{h(Ne=>{if(K.current||W.current)return Ne;const X=Ne+me;return X<100?X:(K.current=!0,setTimeout(()=>{if(j.current){if(W.current)return;W.current=!0,R.current?.();return}const w=Z.current===V.current-1;H(!1),setTimeout(()=>{w?(u(0),p(O=>O+1)):u(O=>O+1),h(0),m(0),H(!0)},300)},400),100)})},ne);return()=>clearInterval(be)},[l,s,e.length]),f.useEffect(()=>{if(e.length===0)return;const ne=Math.floor(s/xr.length),me=setInterval(()=>m(be=>Math.min(be+1,xr.length-1)),ne);return()=>clearInterval(me)},[l,s,e.length]);const z=e.length===0,Y=z?null:e[Math.min(l,e.length-1)],Q=d>0;return c.jsxs(c.Fragment,{children:[c.jsx("style",{children:`
62
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const s of e.seen.entries()){const a=s[1];if(t===s[0]){i(s);continue}if(e.external){const l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}if(a.count>1&&e.reused==="ref"){i(s);continue}}}function aa(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=s=>{const a=e.seen.get(s);if(a.ref===null)return;const c=a.def??a.schema,l={...c},d=a.ref;if(a.ref=null,d){n(d);const _=e.seen.get(d),m=_.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(m)):Object.assign(c,m),Object.assign(c,l),s._zod.parent===d)for(const b in c)b==="$ref"||b==="allOf"||b in l||delete c[b];if(m.$ref&&_.def)for(const b in c)b==="$ref"||b==="allOf"||b in _.def&&JSON.stringify(c[b])===JSON.stringify(_.def[b])&&delete c[b]}const f=s._zod.parent;if(f&&f!==d){n(f);const _=e.seen.get(f);if(_?.schema.$ref&&(c.$ref=_.schema.$ref,_.def))for(const m in c)m==="$ref"||m==="allOf"||m in _.def&&JSON.stringify(c[m])===JSON.stringify(_.def[m])&&delete c[m]}e.override({zodSchema:s,jsonSchema:c,path:a.path??[]})};for(const s of[...e.seen.entries()].reverse())n(s[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(s)}Object.assign(o,r.def??r.schema);const i=e.external?.defs??{};for(const s of e.seen.entries()){const a=s[1];a.def&&a.defId&&(i[a.defId]=a.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const s=JSON.parse(JSON.stringify(o));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:qr(t,"input",e.processors),output:qr(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function xe(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return xe(n.element,r);if(n.type==="set")return xe(n.valueType,r);if(n.type==="lazy")return xe(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return xe(n.innerType,r);if(n.type==="intersection")return xe(n.left,r)||xe(n.right,r);if(n.type==="record"||n.type==="map")return xe(n.keyType,r)||xe(n.valueType,r);if(n.type==="pipe")return xe(n.in,r)||xe(n.out,r);if(n.type==="object"){for(const o in n.shape)if(xe(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(const o of n.options)if(xe(o,r))return!0;return!1}if(n.type==="tuple"){for(const o of n.items)if(xe(o,r))return!0;return!!(n.rest&&xe(n.rest,r))}return!1}const bh=(e,t={})=>r=>{const n=ia({...r,processors:t});return Ie(e,n),sa(n,e),aa(n,e)},qr=(e,t,r={})=>n=>{const{libraryOptions:o,target:i}=n??{},s=ia({...o??{},target:i,io:t,processors:r});return Ie(e,s),sa(s,e),aa(s,e)},vh={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Sh=(e,t,r,n)=>{const o=r;o.type="string";const{minimum:i,maximum:s,format:a,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),a&&(o.format=vh[a]??a,o.format===""&&delete o.format,a==="time"&&delete o.format),l&&(o.contentEncoding=l),c&&c.size>0){const d=[...c];d.length===1?o.pattern=d[0].source:d.length>1&&(o.allOf=[...d.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},Eh=(e,t,r,n)=>{const o=r,{minimum:i,maximum:s,format:a,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:d}=e._zod.bag;typeof a=="string"&&a.includes("int")?o.type="integer":o.type="number",typeof d=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=d,o.exclusiveMinimum=!0):o.exclusiveMinimum=d),typeof i=="number"&&(o.minimum=i,typeof d=="number"&&t.target!=="draft-04"&&(d>=i?delete o.minimum:delete o.exclusiveMinimum)),typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=l,o.exclusiveMaximum=!0):o.exclusiveMaximum=l),typeof s=="number"&&(o.maximum=s,typeof l=="number"&&t.target!=="draft-04"&&(l<=s?delete o.maximum:delete o.exclusiveMaximum)),typeof c=="number"&&(o.multipleOf=c)},Ch=(e,t,r,n)=>{r.type="boolean"},Ah=(e,t,r,n)=>{r.not={}},wh=(e,t,r,n)=>{},Th=(e,t,r,n)=>{const o=e._zod.def,i=Cs(o.entries);i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),r.enum=i},Ih=(e,t,r,n)=>{const o=e._zod.def,i=[];for(const s of o.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){const s=i[0];r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[s]:r.const=s}else i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),i.every(s=>typeof s=="boolean")&&(r.type="boolean"),i.every(s=>s===null)&&(r.type="null"),r.enum=i},kh=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Nh=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Oh=(e,t,r,n)=>{const o=r,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(o.minItems=s),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=Ie(i.element,t,{...n,path:[...n.path,"items"]})},Mh=(e,t,r,n)=>{const o=r,i=e._zod.def;o.type="object",o.properties={};const s=i.shape;for(const l in s)o.properties[l]=Ie(s[l],t,{...n,path:[...n.path,"properties",l]});const a=new Set(Object.keys(s)),c=new Set([...a].filter(l=>{const d=i.shape[l]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));c.size>0&&(o.required=Array.from(c)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=Ie(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},Dh=(e,t,r,n)=>{const o=e._zod.def,i=o.inclusive===!1,s=o.options.map((a,c)=>Ie(a,t,{...n,path:[...n.path,i?"oneOf":"anyOf",c]}));i?r.oneOf=s:r.anyOf=s},Ph=(e,t,r,n)=>{const o=e._zod.def,i=Ie(o.left,t,{...n,path:[...n.path,"allOf",0]}),s=Ie(o.right,t,{...n,path:[...n.path,"allOf",1]}),a=l=>"allOf"in l&&Object.keys(l).length===1,c=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];r.allOf=c},Lh=(e,t,r,n)=>{const o=e._zod.def,i=Ie(o.innerType,t,n),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},xh=(e,t,r,n)=>{const o=e._zod.def;Ie(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},Fh=(e,t,r,n)=>{const o=e._zod.def;Ie(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType,r.default=JSON.parse(JSON.stringify(o.defaultValue))},$h=(e,t,r,n)=>{const o=e._zod.def;Ie(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},Bh=(e,t,r,n)=>{const o=e._zod.def;Ie(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},Rh=(e,t,r,n)=>{const o=e._zod.def,i=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;Ie(i,t,n);const s=t.seen.get(e);s.ref=i},Uh=(e,t,r,n)=>{const o=e._zod.def;Ie(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType,r.readOnly=!0},ca=(e,t,r,n)=>{const o=e._zod.def;Ie(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},Hh=v("ZodISODateTime",(e,t)=>{W_.init(e,t),he.init(e,t)});function zh(e){return Km(Hh,e)}const jh=v("ZodISODate",(e,t)=>{G_.init(e,t),he.init(e,t)});function Wh(e){return qm(jh,e)}const Gh=v("ZodISOTime",(e,t)=>{Z_.init(e,t),he.init(e,t)});function Zh(e){return Jm(Gh,e)}const Yh=v("ZodISODuration",(e,t)=>{Y_.init(e,t),he.init(e,t)});function Vh(e){return Qm(Yh,e)}const Je=v("ZodError",(e,t)=>{Os.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Fp(e,r)},flatten:{value:r=>xp(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,fo,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,fo,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Kh=go(Je),qh=yo(Je),Jh=Wr(Je),Qh=Gr(Je),Xh=Rp(Je),eg=Up(Je),tg=Hp(Je),rg=zp(Je),ng=jp(Je),og=Wp(Je),ig=Gp(Je),sg=Zp(Je),ye=v("ZodType",(e,t)=>(ge.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:qr(e,"input"),output:qr(e,"output")}}),e.toJSONSchema=bh(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(_t(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),e.with=e.check,e.clone=(r,n)=>mt(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>Kh(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Jh(e,r,n),e.parseAsync=async(r,n)=>qh(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Qh(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>Xh(e,r,n),e.decode=(r,n)=>eg(e,r,n),e.encodeAsync=async(r,n)=>tg(e,r,n),e.decodeAsync=async(r,n)=>rg(e,r,n),e.safeEncode=(r,n)=>ng(e,r,n),e.safeDecode=(r,n)=>og(e,r,n),e.safeEncodeAsync=async(r,n)=>ig(e,r,n),e.safeDecodeAsync=async(r,n)=>sg(e,r,n),e.refine=(r,n)=>e.check(ry(r,n)),e.superRefine=r=>e.check(ny(r)),e.overwrite=r=>e.check(qt(r)),e.optional=()=>ha(e),e.exactOptional=()=>jg(e),e.nullable=()=>ga(e),e.nullish=()=>ha(ga(e)),e.nonoptional=r=>Kg(e,r),e.array=()=>Dg(e),e.or=r=>_a([e,r]),e.and=r=>$g(e,r),e.transform=r=>ba(e,Hg(r)),e.default=r=>Zg(e,r),e.prefault=r=>Vg(e,r),e.catch=r=>Jg(e,r),e.pipe=r=>ba(e,r),e.readonly=()=>ey(e),e.describe=r=>{const n=e.clone();return pr.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return pr.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return pr.get(e);const n=e.clone();return pr.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),la=v("_ZodString",(e,t)=>{bo.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Sh(e,n,o);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(oh(...n)),e.includes=(...n)=>e.check(ah(...n)),e.startsWith=(...n)=>e.check(ch(...n)),e.endsWith=(...n)=>e.check(lh(...n)),e.min=(...n)=>e.check(Kr(...n)),e.max=(...n)=>e.check(na(...n)),e.length=(...n)=>e.check(oa(...n)),e.nonempty=(...n)=>e.check(Kr(1,...n)),e.lowercase=n=>e.check(ih(n)),e.uppercase=n=>e.check(sh(n)),e.trim=()=>e.check(dh()),e.normalize=(...n)=>e.check(uh(...n)),e.toLowerCase=()=>e.check(fh()),e.toUpperCase=()=>e.check(ph()),e.slugify=()=>e.check(_h())}),ag=v("ZodString",(e,t)=>{bo.init(e,t),la.init(e,t),e.email=r=>e.check(km(cg,r)),e.url=r=>e.check(Pm(lg,r)),e.jwt=r=>e.check(Vm(Ag,r)),e.emoji=r=>e.check(Lm(ug,r)),e.guid=r=>e.check(Xs(ua,r)),e.uuid=r=>e.check(Nm(Jr,r)),e.uuidv4=r=>e.check(Om(Jr,r)),e.uuidv6=r=>e.check(Mm(Jr,r)),e.uuidv7=r=>e.check(Dm(Jr,r)),e.nanoid=r=>e.check(xm(dg,r)),e.guid=r=>e.check(Xs(ua,r)),e.cuid=r=>e.check(Fm(fg,r)),e.cuid2=r=>e.check($m(pg,r)),e.ulid=r=>e.check(Bm(_g,r)),e.base64=r=>e.check(Gm(Sg,r)),e.base64url=r=>e.check(Zm(Eg,r)),e.xid=r=>e.check(Rm(mg,r)),e.ksuid=r=>e.check(Um(hg,r)),e.ipv4=r=>e.check(Hm(gg,r)),e.ipv6=r=>e.check(zm(yg,r)),e.cidrv4=r=>e.check(jm(bg,r)),e.cidrv6=r=>e.check(Wm(vg,r)),e.e164=r=>e.check(Ym(Cg,r)),e.datetime=r=>e.check(zh(r)),e.date=r=>e.check(Wh(r)),e.time=r=>e.check(Zh(r)),e.duration=r=>e.check(Vh(r))});function ht(e){return Im(ag,e)}const he=v("ZodStringFormat",(e,t)=>{_e.init(e,t),la.init(e,t)}),cg=v("ZodEmail",(e,t)=>{x_.init(e,t),he.init(e,t)}),ua=v("ZodGUID",(e,t)=>{P_.init(e,t),he.init(e,t)}),Jr=v("ZodUUID",(e,t)=>{L_.init(e,t),he.init(e,t)}),lg=v("ZodURL",(e,t)=>{F_.init(e,t),he.init(e,t)}),ug=v("ZodEmoji",(e,t)=>{$_.init(e,t),he.init(e,t)}),dg=v("ZodNanoID",(e,t)=>{B_.init(e,t),he.init(e,t)}),fg=v("ZodCUID",(e,t)=>{R_.init(e,t),he.init(e,t)}),pg=v("ZodCUID2",(e,t)=>{U_.init(e,t),he.init(e,t)}),_g=v("ZodULID",(e,t)=>{H_.init(e,t),he.init(e,t)}),mg=v("ZodXID",(e,t)=>{z_.init(e,t),he.init(e,t)}),hg=v("ZodKSUID",(e,t)=>{j_.init(e,t),he.init(e,t)}),gg=v("ZodIPv4",(e,t)=>{V_.init(e,t),he.init(e,t)}),yg=v("ZodIPv6",(e,t)=>{K_.init(e,t),he.init(e,t)}),bg=v("ZodCIDRv4",(e,t)=>{q_.init(e,t),he.init(e,t)}),vg=v("ZodCIDRv6",(e,t)=>{J_.init(e,t),he.init(e,t)}),Sg=v("ZodBase64",(e,t)=>{Q_.init(e,t),he.init(e,t)}),Eg=v("ZodBase64URL",(e,t)=>{em.init(e,t),he.init(e,t)}),Cg=v("ZodE164",(e,t)=>{tm.init(e,t),he.init(e,t)}),Ag=v("ZodJWT",(e,t)=>{nm.init(e,t),he.init(e,t)}),da=v("ZodNumber",(e,t)=>{Us.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Eh(e,n,o),e.gt=(n,o)=>e.check(ta(n,o)),e.gte=(n,o)=>e.check(Eo(n,o)),e.min=(n,o)=>e.check(Eo(n,o)),e.lt=(n,o)=>e.check(ea(n,o)),e.lte=(n,o)=>e.check(So(n,o)),e.max=(n,o)=>e.check(So(n,o)),e.int=n=>e.check(fa(n)),e.safe=n=>e.check(fa(n)),e.positive=n=>e.check(ta(0,n)),e.nonnegative=n=>e.check(Eo(0,n)),e.negative=n=>e.check(ea(0,n)),e.nonpositive=n=>e.check(So(0,n)),e.multipleOf=(n,o)=>e.check(ra(n,o)),e.step=(n,o)=>e.check(ra(n,o)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null}),wg=v("ZodNumberFormat",(e,t)=>{om.init(e,t),da.init(e,t)});function fa(e){return eh(wg,e)}const Tg=v("ZodBoolean",(e,t)=>{im.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ch(e,r,n)});function Ig(e){return th(Tg,e)}const kg=v("ZodUnknown",(e,t)=>{sm.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>wh()});function pa(){return rh(kg)}const Ng=v("ZodNever",(e,t)=>{am.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ah(e,r,n)});function Og(e){return nh(Ng,e)}const Mg=v("ZodArray",(e,t)=>{cm.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Oh(e,r,n,o),e.element=t.element,e.min=(r,n)=>e.check(Kr(r,n)),e.nonempty=r=>e.check(Kr(1,r)),e.max=(r,n)=>e.check(na(r,n)),e.length=(r,n)=>e.check(oa(r,n)),e.unwrap=()=>e.element});function Dg(e,t){return mh(Mg,e,t)}const Pg=v("ZodObject",(e,t)=>{um.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Mh(e,r,n,o),le(e,"shape",()=>t.shape),e.keyof=()=>Jt(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:pa()}),e.loose=()=>e.clone({...e._zod.def,catchall:pa()}),e.strict=()=>e.clone({...e._zod.def,catchall:Og()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>Op(e,r),e.safeExtend=r=>Mp(e,r),e.merge=r=>Dp(e,r),e.pick=r=>kp(e,r),e.omit=r=>Np(e,r),e.partial=(...r)=>Pp(ma,e,r[0]),e.required=(...r)=>Lp(ya,e,r[0])});function Lg(e,t){const r={type:"object",shape:e??{},...U(t)};return new Pg(r)}const xg=v("ZodUnion",(e,t)=>{dm.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Dh(e,r,n,o),e.options=t.options});function _a(e,t){return new xg({type:"union",options:e,...U(t)})}const Fg=v("ZodIntersection",(e,t)=>{fm.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ph(e,r,n,o)});function $g(e,t){return new Fg({type:"intersection",left:e,right:t})}const Co=v("ZodEnum",(e,t)=>{pm.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Th(e,n,o),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{const i={};for(const s of n)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Co({...t,checks:[],...U(o),entries:i})},e.exclude=(n,o)=>{const i={...t.entries};for(const s of n)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Co({...t,checks:[],...U(o),entries:i})}});function Jt(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Co({type:"enum",entries:r,...U(t)})}const Bg=v("ZodLiteral",(e,t)=>{_m.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ih(e,r,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Rg(e,t){return new Bg({type:"literal",values:Array.isArray(e)?e:[e],...U(t)})}const Ug=v("ZodTransform",(e,t)=>{mm.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Nh(e,r),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Ss(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(fr(i,r.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(fr(s))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function Hg(e){return new Ug({type:"transform",transform:e})}const ma=v("ZodOptional",(e,t)=>{Ys.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ca(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function ha(e){return new ma({type:"optional",innerType:e})}const zg=v("ZodExactOptional",(e,t)=>{hm.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ca(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function jg(e){return new zg({type:"optional",innerType:e})}const Wg=v("ZodNullable",(e,t)=>{gm.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Lh(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function ga(e){return new Wg({type:"nullable",innerType:e})}const Gg=v("ZodDefault",(e,t)=>{ym.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Fh(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Zg(e,t){return new Gg({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Is(t)}})}const Yg=v("ZodPrefault",(e,t)=>{bm.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>$h(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Vg(e,t){return new Yg({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Is(t)}})}const ya=v("ZodNonOptional",(e,t)=>{vm.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>xh(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Kg(e,t){return new ya({type:"nonoptional",innerType:e,...U(t)})}const qg=v("ZodCatch",(e,t)=>{Sm.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Bh(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Jg(e,t){return new qg({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Qg=v("ZodPipe",(e,t)=>{Em.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Rh(e,r,n,o),e.in=t.in,e.out=t.out});function ba(e,t){return new Qg({type:"pipe",in:e,out:t})}const Xg=v("ZodReadonly",(e,t)=>{Cm.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Uh(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function ey(e){return new Xg({type:"readonly",innerType:e})}const ty=v("ZodCustom",(e,t)=>{Am.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>kh(e,r)});function ry(e,t={}){return hh(ty,e,t)}function ny(e){return gh(e)}const Ao={custom:"custom"};function Ce(e){return Xm(da,e)}const oy=["additional_pip","tort_threshold","pip_coverage_type","extended_medical","policy_pip_deductible"],iy=new Set([...oy,"is_corporation"]);Lg({additional_pip:Jt(["cov100_10400_LIMITED","cov125_13000_LIMITED","cov175_18200_LIMITED","cov250_26000_LIMITED","cov400_41600_LIMITED","cov500_52000_LIMITED","cov600_62400_LIMITED","cov700_72800_LIMITED","cov100_UNLIMITED","cov125_UNLIMITED","cov175_UNLIMITED","cov250_UNLIMITED","cov400_UNLIMITED","cov500_UNLIMITED","cov600_UNLIMITED","cov700_UNLIMITED"]),tort_threshold:Jt(["Verbal_Threshold","Zero_Threshold"]),pip_coverage_type:Jt(["Primary","Secondary"]),extended_medical:Jt(["cov1000","cov10000"]),policy_pip_deductible:Jt(["cov250","cov500","cov1000","cov2000","cov2500"]),has_health_insurance_auto_accident:Ig().nullable().optional()}).superRefine((e,t)=>{e.pip_coverage_type==="Secondary"&&e.has_health_insurance_auto_accident!==!0&&t.addIssue({code:Ao.custom,path:["pip_coverage_type"],message:"Secondary PIP coverage requires health insurance that covers auto accidents."})});const sy=new Set(["Home","HomeConstruction","HomeFeatures","Demographics"]),ay=new Set(["HomePolicy","BundlePolicy"]),cy=new Set(["HomeCustomer","BundleCustomer","Demographics"]);function Qr(e){if(typeof e!="string"||!e.trim())return!1;const t=e.trim().toLowerCase();return t==="nj"||t==="n.j."||t==="n.j"||t==="new jersey"}function va(e){return e?Qr(e.state??e.State):!1}function Sa(e,t,r){return e==="has_health_insurance_auto_accident"?t==="BundleCustomer"||t==="Demographics"?!1:!va(r):iy.has(e)?!va(r):e==="household_size"?!(t&&sy.has(t)):e==="number_of_mortgagees"?!(t&&ay.has(t)):(e==="has_co_applicant"||e==="co_applicant_middle_name"||e==="co_applicant_relationship")&&t&&cy.has(t)?!1:e==="multi_policy_discount"&&t==="HomePolicy"?!0:ly.has(e)}const ly=new Set(["anti_theft_type","passive_restraint_type","anti_lock_brakes","daytime_running_lights","vehicle_full_glass","vehicle_loan_lease","percent_to_work","stated_value_amount_cents","vehicle_comp_deductible","vehicle_coll_deductible","vehicle_towing_and_labor","vehicle_transportation_expense","accident_prevention_course","driver_accidents","driver_violations","losses","middle_name","ssn_display","auto_current_annual_premium_cents","has_co_applicant","co_applicant_middle_name","co_applicant_relationship"]),Ea=new Date().getUTCFullYear(),Xr=ht().trim().min(1,"Required").regex(/^[A-Za-z\s]+$/,"Only alphabetic characters are allowed."),Ca=_a([Rg(""),ht().trim().regex(/^[A-Za-z\s]*$/,"Only alphabetic characters are allowed.")]).optional(),uy=(e,t,r)=>Ce({error:`${e} must be a number.`}).min(t,`${e} must be between ${t.toLocaleString()} and ${r.toLocaleString()}.`).max(r,`${e} must be between ${t.toLocaleString()} and ${r.toLocaleString()}.`).int(`${e} must be a whole number.`),Qt=(e,t)=>Ce({error:`${e} must be a number.`}).min(0,`${e} must be between 0 and ${t.toLocaleString()}.`).max(t,`${e} must be between 0 and ${t.toLocaleString()}.`).int(`${e} must be a whole number.`),en=(e,t=1600)=>Ce({error:`${e} must be a valid 4-digit year.`}).int(`${e} must be a whole number.`).min(t,`${e} should be between ${t} and the current year.`).max(Ea,`${e} cannot be in the future.`),tn=e=>Ce({error:`${e} must be a number.`}).int(`${e} must be a whole number.`).min(0,`${e} must be between 0 and 99.`).max(99,`${e} must be between 0 and 99.`),_r=(e,t,r=0)=>{const n=Math.pow(10,t)-1,o=n.toLocaleString("en-US"),i=r.toLocaleString("en-US");return Ce({error:`${e} must be a number.`}).min(r,`${e}: Value must be between ${i} and ${o}.`).max(n,`${e}: Value must be between ${i} and ${o}.`).int(`${e} must be a whole number.`)},dy={email:ht().trim().min(1,"Required").email("Please enter a valid email address."),phone:ht().trim().min(1,"Required").refine(e=>{let t=e.replace(/\D/g,"");return t.length===11&&t.startsWith("1")&&(t=t.slice(1)),t.length===10},"Please enter a valid 10-digit US phone number."),social_security_number:ht().trim().refine(e=>e===""||/^\d{3}-\d{2}-\d{4}$/.test(e),"Social Security Number must be in the format XXX-XX-XXXX.").optional(),sms_code:ht().trim().min(1,"Required").regex(/^\d{6}$/,"Please enter the 6-digit code."),first_name:Xr,last_name:Xr,middle_name:Ca,co_applicant_first_name:Xr,co_applicant_last_name:Xr,co_applicant_middle_name:Ca,year_built:en("Year built",1800),year_roof_updated:Ce({error:"Please enter a valid 4-digit year."}).int("Year must be a whole number.").min(1e3,"Please enter a valid 4-digit year.").max(9999,"Please enter a valid 4-digit year."),heating_update_year:en("Heating update year"),plumbing_update_year:en("Plumbing update year"),electrical_update_year:en("Electrical update year"),total_area_sq_ft:uy("Square footage",1,999999),sale_price_cents:Ce({error:"Purchase Price must be a number."}).min(1,"Purchase Price must be between 1 and 21,474,836.").max(21474836,"Purchase Price must be between 1 and 21,474,836.").int("Purchase Price must be a whole number."),home_prior_years:tn("Number of years with your prior carrier"),home_continuous_coverage_years:tn("How long you have had continuous home coverage"),household_size:Ce({error:"Household size must be a number."}).min(1,"Occupants must be between 1 and 8.").max(8,"Occupants must be between 1 and 8.").int("Occupants must be between 1 and 8."),number_of_mortgagees:Ce({error:"Number of mortgagees must be a number."}).int().min(0,"Number of mortgagees cannot be negative.").max(3,"Number of mortgagees must be between 0 and 3."),dwelling_replacement_cost:_r("Replacement cost",9,1),other_structures_coverage:_r("Other structures",9),personal_property_coverage:_r("Personal property",7),loss_of_use_coverage:_r("Loss of use coverage",8),years_at_address:Ce({error:"Years at address must be a number."}).int().min(0,"Years at address cannot be negative.").max(100,"Years at address must be 100 or less."),months_at_address:Ce({error:"Months at address must be a number."}).int().min(0,"Months at address cannot be negative.").max(11,"Months at address must be between 0 and 11."),years_at_prior_address:Ce({error:"Years at prior address must be a number."}).int().min(0,"Years at prior address cannot be negative.").max(100,"Years at prior address must be 100 or less."),number_of_units:Ce({error:"Number of units must be a number."}).int().min(1,"Number of units/apartments should be greater than 0.").max(99,"Number of units/apartments must be between 1 and 99."),number_of_families:Ce({error:"Number of families must be a number."}).int("Number of families must be a whole number.").refine(e=>e>=1&&e<=5,{message:"Number of families must be between 1 and 5."}),number_of_dogs:Ce({error:"Number of dogs must be a number."}).int().min(0,"Number of dogs must be between 0 and 99.").max(99,"Number of dogs must be between 0 and 99."),distance_to_coast_miles:Ce({error:"Distance to coast must be a number."}).int().min(0,"Distance to coast cannot be negative.").max(9999,"Distance to coast must be at most 4 digits."),amount_paid_cents:_r("Amount paid",7),license_number:ht().trim().min(1,"Required").max(20,"License number must be 20 characters or fewer.").regex(/^[A-Z0-9]+$/i,"License number must contain only letters and numbers."),vin:ht().superRefine((e,t)=>{if(typeof e!="string"||e.trim()==="")return;if(/\s/.test(e)){t.addIssue({code:Ao.custom,message:"VIN cannot contain spaces."});return}const r=e.trim();/^[A-HJ-NPR-Z0-9]{17}$/i.test(r)||t.addIssue({code:Ao.custom,message:"VIN must be exactly 17 letters and numbers (excluding I, O, and Q)."})}),annual_mileage:Ce({error:"Annual mileage must be a number."}).int("Annual mileage must be a whole number.").min(1e3,"Vehicle annual use should be between 1,000 & 100,000 miles.").max(1e5,"Vehicle annual use should be between 1,000 & 100,000 miles."),miles_to_work:Ce({error:"Miles driven to work/school must be a number."}).int("Miles driven to work/school must be a whole number.").min(1,"Please enter a value greater than 0.").max(9999,"Miles driven to work/school must be between 1 and 9,999."),custom_equipment_value_cents:Qt("Modifications value",9999999),cost_new_value_cents:Qt("Cost new value",9999999),stated_value_amount_cents:Qt("Stated Value Amount",9999999),property_damage_amount_paid_cents:Qt("Property damage amount paid",9999999),personal_injury_amount_paid_cents:Qt("Personal injury amount paid",9999999),auto_current_annual_premium_cents:Qt("Current annual premium",9999999),auto_prior_years:tn("Years with prior auto carrier"),auto_prior_months:Ce({error:"Months with prior carrier must be a number."}).int().min(0,"Months with prior carrier must be between 0 and 11.").max(11,"Months with prior carrier must be between 0 and 11."),auto_continuous_coverage_years:tn("Years with continuous auto coverage")};function be(e){return new Date(`${e}T00:00:00Z`)}function ke(){const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))}function gt(e,t){let r=t.getUTCFullYear()-e.getUTCFullYear();const n=t.getUTCMonth()-e.getUTCMonth();return(n<0||n===0&&t.getUTCDate()<e.getUTCDate())&&r--,r}const Aa=[{targetKey:"social_security_number",dependsOn:["social_security_number","state"],validate:e=>{if(!("social_security_number"in e)||!Qr(e.state))return;const t=e.social_security_number;return(typeof t=="string"?t.trim():"")===""?"Social Security Number is required in New Jersey.":void 0}},{targetKey:"date_of_birth",dependsOn:["date_of_birth"],validate:e=>{const t=e.date_of_birth;if(!t||typeof t!="string")return;const r=be(t);return isNaN(r.getTime())?"Invalid date.":r.getUTCFullYear()<1900?"Date of birth year can't be earlier than 1900.":gt(r,ke())<18?"Applicant can't be under the age of 18.":void 0}},{targetKey:"co_applicant_date_of_birth",dependsOn:["co_applicant_date_of_birth"],validate:e=>{const t=e.co_applicant_date_of_birth;if(!t||typeof t!="string")return;const r=be(t);return isNaN(r.getTime())?"Invalid date.":r.getUTCFullYear()<1900?"Date of birth year can't be earlier than 1900.":gt(r,ke())<16?"Co-applicant can't be under the age of 16.":void 0}},{targetKey:"year_roof_updated",dependsOn:["year_roof_updated","year_built"],validate:e=>{const t=Number(e.year_roof_updated),r=Number(e.year_built);if(isNaN(t))return;const n=isNaN(r)?1e3:r;if(t<n||t>Ea)return"Roof renovation/replacement year must be between the home's build year and the current year."}},{targetKey:"move_in_date",dependsOn:["move_in_date","year_built"],validate:e=>{const t=e.move_in_date,r=e.year_built;if(!t||r==null)return;const n=be(String(t));if(isNaN(n.getTime()))return;const o=Number(r);if(!isNaN(o))return n.getUTCFullYear()<o?"Purchase date cannot be prior to the year the building was originally constructed.":void 0}},{targetKey:"date_first_licensed",dependsOn:["date_first_licensed"],validate:e=>{const t=e.date_first_licensed;if(!t||typeof t!="string")return;const r=be(t);return isNaN(r.getTime())?"Invalid date.":r>ke()?"Date first licensed cannot be in the future.":void 0}},{targetKey:"date_first_licensed",dependsOn:["date_first_licensed","date_of_birth"],validate:e=>{const t=e.date_first_licensed,r=e.date_of_birth;if(!t||typeof t!="string"||!r||typeof r!="string")return;const n=be(r),o=be(t);if(isNaN(n.getTime())||isNaN(o.getTime()))return;if(o<n)return"Date licensed cannot be before driver date of birth.";const i=new Date(Date.UTC(n.getUTCFullYear()+18,n.getUTCMonth(),n.getUTCDate()));return o<i?"Driver can't be licensed to drive before the age of 18.":void 0}},{targetKey:"occurred_at",dependsOn:["occurred_at"],validate:e=>{const t=e.occurred_at;if(!t||typeof t!="string")return;const r=be(t);return isNaN(r.getTime())?"Invalid date.":r>ke()?"Incident date cannot be in the future.":void 0}},{targetKey:"accident_prevention_course_date",dependsOn:["accident_prevention_course_date"],validate:e=>{const t=e.accident_prevention_course_date;if(!t||typeof t!="string")return;const r=be(t);return isNaN(r.getTime())?"Invalid date.":r>ke()?"Course date cannot be in the future.":void 0}},{targetKey:"effective_date",dependsOn:["effective_date"],validate:e=>{const t=e.effective_date;if(!t||typeof t!="string")return;const r=be(t);if(isNaN(r.getTime()))return"Invalid date.";const n=ke(),o=new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth()+3,n.getUTCDate()));if(r<n)return"Insurance start date cannot be in the past.";if(r>o)return"Insurance must begin within 3 months from today."}},{targetKey:"years_at_address",dependsOn:["years_at_address","date_of_birth"],validate:e=>{const t=e.years_at_address,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const o=be(r);if(isNaN(o.getTime()))return;const i=gt(o,ke());return n>i?"Time at address cannot be greater than the applicant age.":void 0}},{targetKey:"years_at_prior_address",dependsOn:["years_at_prior_address","date_of_birth"],validate:e=>{const t=e.years_at_prior_address,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const o=be(r);if(isNaN(o.getTime()))return;const i=gt(o,ke());return n>i?"Years at prior address cannot be greater than the applicant age.":void 0}},{targetKey:"home_prior_years",dependsOn:["home_prior_years","home_continuous_coverage_years"],validate:e=>{const t=e.home_prior_years,r=e.home_continuous_coverage_years;if(t==null||r==null)return;const n=Number(t),o=Number(r);if(!(isNaN(n)||isNaN(o)))return n>o?"Years with prior carrier cannot be higher than years with continuous coverage.":void 0}},{targetKey:"home_prior_years",dependsOn:["home_prior_years","date_of_birth"],validate:e=>{const t=e.home_prior_years,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const o=be(r);if(isNaN(o.getTime()))return;const i=gt(o,ke());return n>i?"Years with prior carrier cannot be greater than the Applicant's age.":void 0}},{targetKey:"home_continuous_coverage_years",dependsOn:["home_continuous_coverage_years","date_of_birth"],validate:e=>{const t=e.home_continuous_coverage_years,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const o=be(r);if(isNaN(o.getTime()))return;const i=gt(o,ke());return n>i?"Years with continuous home coverage cannot be greater than the Applicant's age.":void 0}},{targetKey:"move_in_date",dependsOn:["move_in_date"],validate:e=>{const t=e.move_in_date;if(!t||typeof t!="string")return;const r=be(t);return isNaN(r.getTime())?"Invalid date.":r>ke()?"Purchase date cannot be in the future.":void 0}},{targetKey:"date_of_incident",dependsOn:["date_of_incident"],validate:e=>{const t=e.date_of_incident;if(!t||typeof t!="string")return;const r=be(t);if(isNaN(r.getTime()))return"Invalid date.";const n=ke();return r>n?"Loss date cannot be in the future.":void 0}},{targetKey:"home_prior_expiration_date",dependsOn:["home_prior_expiration_date"],validate:e=>{const t=e.home_prior_expiration_date;if(!t||typeof t!="string")return;const r=be(t);if(isNaN(r.getTime()))return"Invalid date.";const n=ke(),o=new Date(Date.UTC(n.getUTCFullYear()-1,n.getUTCMonth(),n.getUTCDate())),i=new Date(Date.UTC(n.getUTCFullYear()+1,n.getUTCMonth(),n.getUTCDate()));if(r<o||r>i)return"Policy expiration date must be between 1 year ago and 1 year from now."}},{targetKey:"purchase_date",dependsOn:["purchase_date"],validate:e=>{const t=e.purchase_date;if(!t||typeof t!="string")return;const r=be(t);return isNaN(r.getTime())?"Invalid date.":r>ke()?"Vehicle purchase date cannot be in the future.":void 0}},{targetKey:"purchase_date",dependsOn:["purchase_date","year"],validate:e=>{const t=e.purchase_date,r=e.year;if(!t||typeof t!="string"||r==null)return;const n=be(t);if(isNaN(n.getTime()))return;const o=Number(r);if(!isNaN(o))return n.getUTCFullYear()<o?"The year the vehicle was purchased is not valid with the model year.":void 0}},{targetKey:"auto_prior_expiration_date",dependsOn:["auto_prior_expiration_date"],validate:e=>{const t=e.auto_prior_expiration_date;if(!t||typeof t!="string")return;const r=be(t);if(isNaN(r.getTime()))return"Invalid date.";const n=ke(),o=new Date(Date.UTC(n.getUTCFullYear()-1,n.getUTCMonth(),n.getUTCDate())),i=new Date(Date.UTC(n.getUTCFullYear()+1,n.getUTCMonth(),n.getUTCDate()));if(r<o||r>i)return"Auto policy expiration date must be between 1 year ago and 1 year from now."}},{targetKey:"auto_prior_years",dependsOn:["auto_prior_years","auto_continuous_coverage_years"],validate:e=>{const t=e.auto_prior_years,r=e.auto_continuous_coverage_years;if(t==null||r==null)return;const n=Number(t),o=Number(r);if(!(isNaN(n)||isNaN(o)))return n>o?"Years with prior auto carrier cannot be higher than years with continuous coverage.":void 0}},{targetKey:"auto_prior_years",dependsOn:["auto_prior_years","date_of_birth"],validate:e=>{const t=e.auto_prior_years,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const o=be(r);if(isNaN(o.getTime()))return;const i=gt(o,ke());return n>i?"Years with prior auto carrier cannot be greater than the Applicant's age.":void 0}},{targetKey:"auto_continuous_coverage_years",dependsOn:["auto_continuous_coverage_years","date_of_birth"],validate:e=>{const t=e.auto_continuous_coverage_years,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const o=be(r);if(isNaN(o.getTime()))return;const i=gt(o,ke());return n>i?"Years with continuous auto coverage cannot be greater than the Applicant's age.":void 0}},{targetKey:"vehicle_coll_deductible",dependsOn:["vehicle_coll_deductible","vehicle_comp_deductible"],validate:e=>{const t=e.vehicle_coll_deductible,r=e.vehicle_comp_deductible;if(!(!t||typeof t!="string"||!r||typeof r!="string")&&r==="NoCoverage"&&t!=="NoCoverage")return"Collision Coverage cannot be chosen if Comprehensive is No Coverage."}},{targetKey:"policy_um",dependsOn:["policy_um","policy_bi"],validate:e=>{const t=e.policy_um,r=e.policy_bi;if(!t||typeof t!="string"||!r||typeof r!="string"||t==="Reject"||r==="Dontknow")return;const n=l=>l.endsWith("CSL"),o=n(t),i=n(r);if(o&&!i)return"A Combined Single Limit cannot be selected for Uninsured/Underinsured Motorist unless a Combined Single Limit has also been selected for Liability.";const s={cov30to60:30,cov50to100:50,cov100to100:100,cov100to300:100,cov250to500:250,cov300to300:300,cov500to500:500,cov100CSL:100,cov300CSL:300,cov500CSL:500},a=s[t],c=s[r];if(a!=null&&c!=null&&a>c)return"Uninsured/Underinsured Motorist Limit value cannot be greater than Bodily Injury Limit value."}},{targetKey:"policy_umpd",dependsOn:["policy_umpd","policy_pd"],validate:e=>{const t=e.policy_umpd,r=e.policy_pd;if(!t||typeof t!="string"||!r||typeof r!="string"||t==="NoCoverage"||r==="Dontknow")return;const n=s=>{if(!s.startsWith("cov"))return null;const a=parseInt(s.replace("cov",""),10);return isNaN(a)?null:a},o=n(t),i=n(r);if(o!=null&&i!=null&&o>i)return"Uninsured Motorist Property Damage Limit value cannot be greater than Liability Property Damage Limit value."}},{targetKey:"custom_equipment_value_cents",dependsOn:["custom_equipment_value_cents","stated_value_amount_cents"],validate:e=>{const t=e.custom_equipment_value_cents,r=e.stated_value_amount_cents;if(t==null||r==null)return;const n=Number(t),o=Number(r);if(!(isNaN(n)||isNaN(o))&&o>0&&n>0)return"Modifications should be included in the stated value of the vehicle. If a stated value quote is not required, remove the stated value."}}];function wo(e,t){const r=dy[e];if(!r)return;const n=r.safeParse(t);return n.success?void 0:n.error.issues[0].message}function wa(e){if(/\s/.test(e))return!1;const t=e.trim();return t.length===17&&/^[A-HJ-NPR-Z0-9]{17}$/i.test(t)}function fy(e,t){const r={};for(const n of Aa){if(t?.has(n.targetKey))continue;const o=n.validate(e);o&&(r[n.targetKey]=o)}return r}function To(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function mr(e,t){return e.key??`${To(e.question)}-${t}`}function yt(e,t){return t==="number"?e==null||typeof e=="string"&&e.trim()==="":t==="checkbox"?e!==!0:e==null||typeof e=="string"&&e.trim()===""}function rn(e,t){const r={};e.forEach((s,a)=>{const c=mr(s,a),l=t[c];if(s.required&&yt(l,s.inputType)){r[c]="Required";return}if(!yt(l,s.inputType)){const d=wo(c,l);if(d){r[c]=d;return}}});const n={...t};e.forEach((s,a)=>{const c=mr(s,a);c in n||(n[c]="")});const o=new Set(Object.keys(r).filter(s=>r[s])),i=fy(n,o);for(const[s,a]of Object.entries(i))r[s]=a;return r}function py(e){if(e===""||e===null||e===void 0)return;const t=Number(e);return Number.isNaN(t)?void 0:t}const _y={NoPriorInsurance:"No Prior Insurance",TwentyFirstCentury:"21st Century",ACentral:"A.Central",AAA:"AAA",AARP:"AARP",Acadia:"Acadia",Ace:"Ace",Acuity:"Acuity",AdirondackInsExchange:"Adirondack Ins Exchange",Aegis:"Aegis",AIC:"AIC",AIG:"AIG",AlfaAlliance:"Alfa Alliance",Allied:"Allied",Allstate:"Allstate",AmericaFirst:"America First",AmericanCommerce:"American Commerce",AmericanFamily:"American Family",Amica:"Amica",ASILloyds:"ASI Lloyds",AustinMutual:"Austin Mutual",Autoone:"Autoone",AutoOwners:"Auto-Owners",BadgerMutual:"Badger Mutual",Balboa:"Balboa",Bankers:"Bankers",BeaconNational:"Beacon National",BrethernMutual:"Brethern Mutual",BristolWest:"Bristol West",CapitalInsuranceGroup:"Capital Insurance Group",Celina:"Celina",CentralMutualOfOH:"Central Mutual of OH",Chubb:"Chubb",Cincinnati:"Cincinnati",Clearcover:"Clearcover",CNA:"CNA",ColonialPenn:"Colonial Penn",ColoradoCasualty:"Colorado Casualty",Columbia:"Columbia",CommerceWest:"Commerce West",CommonwealthCasualty:"Commonwealth Casualty",Ameriprise:"CONNECT",ConstitutionalCasualty:"Constitutional Casualty",Cornerstone:"Cornerstone",Countrywide:"Countrywide",CSE:"CSE",Cumberland:"Cumberland",Dairyland:"Dairyland",Deerbrook:"Deerbrook",Direct:"Direct",Donegal:"Donegal",Drive:"Drive",Electric:"Electric",EMC:"EMC",Encompass:"Encompass",Erie:"Erie",Esurance:"Esurance",Explorer:"Explorer",FarmBureau:"Farm Bureau",Farmers:"Farmers",FiremansFund:"Firemans Fund",FirstAmerican:"First American",Foremost:"Foremost",Geico:"Geico",GeneralCasualty:"General Casualty",GermantownMutual:"Germantown Mutual",GMAC:"GMAC",Grange:"Grange",GreatAmerican:"Great American",Grinnell:"Grinnell",GuideOne:"Guide One",Hanover:"Hanover",Harbor:"Harbor",Harleysville:"Harleysville",HartfordOMNI:"Hartford OMNI",Hartford:"Hartford",HastingsMutual:"Hastings Mutual",HawkeyeSecurity:"Hawkeye Security",HDI:"HDI",HoraceMann:"Horace Mann",HoustonGeneral:"Houston General",IFA:"IFA",ImperialCasualty:"Imperial Casualty",IndianaFarmers:"Indiana Farmers",Indiana:"Indiana",Infinity:"Infinity",Insurequest:"Insurequest",Integon:"Integon",Integrity:"Integrity",Kemper:"Kemper",LibertyMutual:"Liberty Mutual",LibertyNorthwest:"Liberty Northwest",MainStreetAmerica:"Main Street America",Mapfre:"Mapfre",Mendota:"Mendota",MerchantsGroup:"Merchants Group",Mercury:"Mercury",Metlife:"MetLife",Metropolitan:"Metropolitan",MidContinent:"Mid-Continent",MidwesternIndemnity:"Midwestern Indemnity",Montgomery:"Montgomery",MSA:"MSA",MtWashington:"Mt. Washington",MutualBenefit:"Mutual Benefit",NationalGeneral:"National General",Nationwide:"Nationwide",NewYorkCentralMutual:"New York Central Mutual",NJManufacturers:"NJ Manufacturers",NJSkylands:"NJ Skylands",Northstar:"Northstar",Occidental:"Occidental",OhioCasualty:"Ohio Casualty",OmahaPC:"Omaha P/C",OneBeacon:"One Beacon",OregonMutual:"Oregon Mutual",Palisades:"Palisades",PeerlessMontgomery:"Peerless/Montgomery",Pekin:"Pekin",Pemco:"Pemco",PennNational:"Penn National",PlymouthRock:"Plymouth Rock",PreferredMutual:"Preferred Mutual",Proformance:"Proformance",Progressive:"Progressive",Prudential:"Prudential",Republic:"Republic",RockfordMutual:"Rockford Mutual",RoyalAndSunAlliance:"Royal and Sun Alliance",Safeco:"Safeco",SECURA:"SECURA",Selective:"Selective",SouthernCounty:"Southern County",SouthernMutual:"Southern Mutual",SouthernTrust:"Southern Trust",StPaulTravelers:"St. Paul/Travelers",StandardMutual:"Standard Mutual",StarCasualty:"Star Casualty",StateAuto:"State Auto",StateFarm:"State Farm",Fidelity:"Stillwater",Travelers:"Travelers",TWFG:"TWFG",Unigard:"Unigard",UnitedFireAndCasualty:"United Fire and Casualty",Unitrin:"Unitrin",Universal:"Universal",USAA:"USAA",UticaNational:"Utica National",Victoria:"Victoria",WestBend:"West Bend",WesternNational:"Western National",WesternReserveGroup:"Western Reserve Group",Westfield:"Westfield",WhiteMountains:"White Mountains",WilsonMutual:"Wilson Mutual",Windsor:"Windsor",Zurich:"Zurich",OtherStandard:"Other Standard",OtherNonStandard:"Other Non-Standard"},my={OwnHome:"Own Home",OwnCondo:"Own Condo",RentHome:"Rent Home",RentCondo:"Rent Condo",RentApartment:"Rent Apartment",LiveWithParents:"Live With Parents"},hy={TwentyFirstCentury:"21st Century",AAA:"AAA",Acuity:"Acuity",AdirondackInsExchange:"Adirondack Ins Exchange",AIG:"AIG",AlfaAlliance:"Alfa Alliance",AllianzOfAmerica:"Allianz of America",AllianzOfAmericaJefferson:"Allianz of America-Jefferson",Allied:"Allied",Allmerica:"Allmerica",Allstate:"Allstate",AmericaFirst:"America First",AmericanFamily:"American Family",AmericanCommerce:"American Commerce",Amica:"Amica",ASILloyds:"ASI Lloyds",Assurant:"Assurant",AtlasGeneralAgency:"Atlas General Agency",AustinMutual:"Austin Mutual",AutoOwners:"Auto-Owners",BadgerMutual:"Badger Mutual",Balboa:"Balboa",Bamboo:"Bamboo",BeaconNational:"Beacon National",BunkerHill:"Bunker Hill",CapitalInsuranceGroup:"Capital Insurance Group",CentralMutualOfOH:"Central Mutual of OH",ChubbInsurance:"Chubb",Cincinnati:"Cincinnati",Citizens:"Citizens",ColoradoCasualty:"Colorado Casualty",Ameriprise:"CONNECT",CSE:"CSE",Cumberland:"Cumberland",Cypress:"Cypress",Dairyland:"Dairyland",Donegal:"Donegal",Electric:"Electric",EMC:"EMC",Encompass:"Encompass",Erie:"Erie",Esurance:"Esurance",ExcelsiorInsuranceCompany:"Excelsior Insurance Company",FairPlan:"Fair Plan",FarmBureau:"Farm Bureau",Farmers:"Farmers",FiremansFund:"Firemans Fund",FirstAmerican:"First American",ForemostInsuranceCompany:"Foremost Insurance Company",Geico:"Geico",GeneralCasualty:"General Casualty",GermantownMutual:"Germantown Mutual",GMAC:"GMAC",Grange:"Grange",Grinnell:"Grinnell",GuideOne:"Guide One",Hanover:"Hanover",Harleysville:"Harleysville",Hartford:"Hartford",HartfordOMNI:"Hartford OMNI",HawkeyeSecurity:"Hawkeye Security",HippoInsuranceCompany:"Hippo Insurance Company",HomeownersOfAmerica:"Homeowners of America",Homesite:"Homesite",HoraceMann:"Horace Mann",HoustonGeneral:"Houston General",Indiana:"Indiana",IndianaFarmers:"Indiana Farmers",Integrity:"Integrity",Kemper:"Kemper",LibertyMutual:"Liberty Mutual",LibertyNorthwest:"Liberty Northwest",Lloyds:"Lloyds",MainStreetAmerica:"Main Street America",MarkelInsuranceCompany:"Markel Insurance Company",MerchantsGroup:"Merchants Group",Mercury:"Mercury",Metlife:"MetLife",MidwesternIndemnity:"Midwestern Indemnity",Montgomery:"Montgomery",MSA:"MSA",MutualBenefit:"Mutual Benefit",Tower:"National General",NatGenPremier:"NatGen Premier",Nationwide:"Nationwide",NationwideScottsdale:"Nationwide-Scottsdale",NewYorkCentralMutual:"New York Central Mutual",NJSkylands:"NJ Skylands",Northstar:"Northstar",OhioCasualty:"Ohio Casualty",OneBeacon:"One Beacon",OregonMutual:"Oregon Mutual",PeerlessMontgomery:"Peerless/Montgomery",Pekin:"Pekin",PennNational:"Penn National",PlymouthRock:"Plymouth Rock",PreferredMutual:"Preferred Mutual",Prudential:"Prudential",PureHighValue:"Pure High Value",Republic:"Republic",RoyalAndSunAlliance:"Royal and Sun Alliance",Safeco:"Safeco",SECURA:"SECURA",SouthernMutual:"Southern Mutual",SouthernTrust:"Southern Trust",StPaulTravelers:"St. Paul/Travelers",StandardMutual:"Standard Mutual",StateAuto:"State Auto",StateFarm:"State Farm",StateFarmFloridaInsuranceCompany:"State Farm Florida Insurance Company",Fidelity:"Stillwater",SunshineStateInsuranceCompany:"Sunshine State Insurance Company",Travelers:"Travelers",TWFG:"TWFG",Unigard:"Unigard",UnitedFireAndCasualty:"United Fire and Casualty",Unitrin:"Unitrin",Universal:"Universal",USAA:"USAA",UticaNational:"Utica National",Wellington:"Wellington",WestBend:"West Bend",WesternNational:"Western National",WesternReserveGroup:"Western Reserve Group",Westfield:"Westfield",WhiteMountains:"White Mountains",WilsonMutual:"Wilson Mutual",Zurich:"Zurich",Other:"Other",OtherNonStandard:"Other Non-Standard",OtherStandard:"Other Standard"},gy={Business:"Business",Pleasure:"Pleasure",Farming:"Farming",To_FromWork:"To/From Work",To_FromSchool:"To/From School"},yy={Dontknow:"Don't Know",ThirtyToSixty:"30/60",FiftyToHundred:"50/100",HundredToHundred:"100/100",HundredToThreeHundred:"100/300",TwoHundredFiftyToFiveHundred:"250/500",ThreeHundredToThreeHundred:"300/300",FiveHundredToFiveHundred:"500/500",HundredCSL:"100CSL",ThreeHundredCSL:"300CSL",FiveHundredCSL:"500CSL"},by={ActiveMilitaryDuty:"Active Military Duty",DrivingCompanyCar:"Driving A Company Car",DrivingCarOwnedByRelative:"Driving A Car Owned By A Relative",HasNotOwnedOrOperatedVehicle:"Has Not Owned Or Operated A Vehicle",OwnedVehParkedStoredOffRoadNotDriven:"Owned Veh Parked/Stored Off Road/Not Driven",NonPayment:"Non-Payment",Other:"Other"},vy={Dontknow:"Don't Know",cov30to60:"30/60",cov35to70:"35/70",cov50to100:"50/100",cov100to100:"100/100",cov100to300:"100/300",cov250to500:"250/500",cov300to300:"300/300",cov500to500:"500/500",cov100CSL:"100 CSL",cov300CSL:"300 CSL",cov500CSL:"500 CSL"},Sy={Reject:"Reject",cov30to60:"30/60",cov35to70:"35/70",cov50to100:"50/100",cov100to100:"100/100",cov100to300:"100/300",cov250to500:"250/500",cov300to300:"300/300",cov500to500:"500/500",cov100CSL:"100 CSL",cov300CSL:"300 CSL",cov500CSL:"500 CSL"},Ey={Dontknow:"Don't know",cov25000:"25,000",cov50000:"50,000",cov100000:"100,000",cov250000:"250,000",cov500000:"500,000"},Cy={None:"None",cov500:"500",cov1000:"1,000",cov2000:"2,000",cov2500:"2,500",cov5000:"5,000",cov10000:"10,000",cov15000:"15,000",cov25000:"25,000",cov50000:"50,000",cov100000:"100,000"},Ay={cov25000:"25,000",cov35000:"35,000",cov50000:"50,000",cov100000:"100,000",cov200000:"200,000",cov250000:"250,000",cov300000:"300,000",cov500000:"500,000"},wy={cov15000:"15,000",cov2500:"2,500",cov5000:"5,000",cov10000:"10,000",cov25000:"25,000",cov50000:"50,000",cov100000:"100,000",cov250000:"250,000",cov75000:"75,000",cov150000:"150,000"},Ty={NoCoverage:"No Coverage",cov5000:"5,000",cov10000:"10,000"},Io={NoCoverage:"No Coverage",Zero:"0",Fifty:"50",Hundred:"100",TwoHunderd:"200",TwoHundredfifty:"250",FiveHundred:"500",SeventyFiveHundred:"750",Thousand:"1,000",TwoThousand:"2,000"},Iy=["NoCoverage","Zero","Fifty","Hundred","TwoHunderd","TwoHundredfifty","FiveHundred","SeventyFiveHundred","Thousand","TwoThousand"],ky=["NoCoverage","Zero","Fifty","Hundred","TwoHunderd","TwoHundredfifty","FiveHundred","Thousand","TwoThousand"],ko={NoCoverage:"No Coverage",TwentyFive:"25",Forty:"40",Fifty:"50",SeventyFive:"75",Eighty:"80",Hundred:"100",TwelveHundred:"120",TwoHundred:"200",Unlimited:"Unlimited"},Ny=["NoCoverage","TwentyFive","Fifty","SeventyFive","Hundred","TwoHundred","Unlimited"],Ta={NoCoverage:"No Coverage",cov20to600:"20/600",cov25to750:"25/750",cov30to900:"30/900",cov40to1200:"40/1,200",cov50to1500:"50/1,500",cov100to3000:"100/3,000"},Oy=["NoCoverage","cov20to600","cov25to750","cov30to900","cov40to1200","cov50to1500","cov100to3000"],My=["NoCoverage","cov20to600","cov30to900","cov40to1200","cov50to1500"],Ia={NoHighSchoolDiploma:"No High School Diploma",HighSchoolDiploma:"High School Diploma",SomeCollegeNoDegree:"Some College - No Degree",VocationalTechnicalDegree:"Vocational Technical Degree",AssociatesDegree:"Associates Degree",Bachelors:"Bachelors",Masters:"Masters",Phd:"Phd",MedicalDegree:"Medical Degree",LawDegree:"Law Degree"},Dy={TwoFamilyHome:"2-Family Home",American4square:"American 4-square",Basic:"Basic",BiLevel:"Bi-Level",Bungalow:"Bungalow",CapeCod:"Cape Cod",Colonial:"Colonial",ColonialSpanish:"Colonial - Spanish",CompletelyCustom:"Completely Custom",Contemporary:"Contemporary",ContractorModern:"Contractor Modern",Farmhouse:"Farmhouse",Folk:"Folk",Log:"Log",Mediterranean:"Mediterranean",Ranch:"Ranch",TriLevel:"Tri-Level",Tudor:"Tudor",Vernacular:"Vernacular",Victorian:"Victorian"},Py={SingleFamilyHouse:"Single Family House",Townhouse:"Townhouse",Rowhouse:"Rowhouse",Duplex:"Duplex/Two Family Unit",Triplex:"Tri-plex/Three Family Unit",Fourplex:"Four-plex/Four Family Unit",MultFamily:"Multi-family (more than four units)"},Ly={OwnerPrimary:"Owner Primary",OwnerSecondary:"Owner Secondary",OwnerSeasonal:"Owner Seasonal"},xy={Basic:"Basic",Modest:"Modest",Average:"Average",AboveAverage:"Above Average",Expensive:"Expensive",VeryExpensive:"Very Expensive",Opulent:"Opulent"},Fy={Frame:"Frame",Masonry:"Masonry",MasonryVeneer:"Masonry Veneer",Log:"Log",Asbestos:"Asbestos",EFIS:"EFIS",HardiPlank:"HardiPlank",SuperiorFireResistive:"Superior Fire Resistive",SuperiorMasonryNonCombustible:"Superior Masonry Non Combustible",SuperiorNonCombustible:"Superior Non Combustible"},$y={Slab:"Slab",Basement:"Basement",CrawlSpace:"Crawl Space",PartialBasement:"Partial Basement",PiersPostsPiles:"Piers / Posts / Piles",Open:"Open"},By={NotOverWater:"No",PartiallyOverWater:"Partially Over Water",FullyOrEntirelyOverWater:"Fully or Entirely Over Water"},Ry={One:"1",OneHalf:"1.5",Two:"2",TwoHalf:"2.5",Three:"3",ThreeHalf:"3.5",Four:"4",BiLevel:"Bi-Level",TriLevel:"Tri-Level"},Uy={VinylSiding:"Vinyl Siding",WoodFraming:"Wood Framing",BrickVeneer:"Brick Veneer",Stucco:"Stucco",AdobeBlock:"Adobe Block",AluminumSiding:"Aluminum Siding",CementFiberShingles:"Cement Fiber Shingles",Clapboard:"Clapboard",ConcreteBlock:"Concrete Block",HardboardSiding:"Hardboard Siding",InsulatedConcreteForms:"Insulated Concrete Forms",LightGaugeSteelFraming:"Light Gauge Steel Framing",LogsSolid:"Logs (Solid)",MasoniteSiding:"Masonite Siding",PreEngineeredMetal:"Pre-Engineered Metal",SolidBrickConstruction:"Solid Brick Construction",SolidConcrete:"Solid Concrete",StandardPoleFramed:"Standard Pole Framed",Stone:"Stone",StructuralInsulatedPanels:"Structural Insulated Panels",TimberFraming:"Timber Framing"},Hy={ASPHALT_SHINGLES:"Asphalt Shingles",ARCHITECTURAL_SHINGLES:"Architectural Shingles",METAL:"Metal",TILE_CONCRETE:"Tile (Concrete)",ASBESTOS:"Asbestos",BUILT_UP:"Built-Up",COMPOSITION:"Composition",CONCRETE:"Concrete",COPPER:"Copper",CORRUGATED_STEEL:"Corrugated Steel",FIBERGLASS:"Fiberglass",FOAM:"Foam",GRAVEL:"Gravel",MEMBRANE:"Membrane",MINERAL_FIBER_SHAKE:"Mineral Fiber Shake",PLASTIC:"Plastic",ROCK:"Rock",ROLLED_PAPER:"Rolled Paper",RUBBER:"Rubber",SLATE:"Slate",TAR:"Tar",TAR_GRAVEL:"Tar and Gravel",TILE_CLAY:"Tile (Clay)",TILE_MISSION:"Tile (Mission)",TILE_SPANISH:"Tile (Spanish)",TIN:"Tin",WOOD_FIBERGLASS_SHINGLES:"Wood/Fiberglass Shingles",WOOD_SHAKE:"Wood Shake",WOOD_SHINGLES:"Wood Shingles",OTHER:"Other"},zy={B_Gable:"Gable",C_Hip:"Hip",A_Flat:"Flat",D_Other:"Other"},jy={NotUpdated:"Not Updated",PartialUpdate:"Partial Update",CompleteUpdate:"Complete Update"},Wy={Electric:"Electric",Gas:"Gas",GasForcedAir:"Gas - Forced Air",GasHotWater:"Gas - Hot Water",Oil:"Oil",OilForcedAir:"Oil - Forced Air",OilHotWater:"Oil - Hot Water",SolidFuel:"Solid Fuel",HeatPump:"Heat Pump",Other:"Other"},Gy={AboveGround:"Above Ground",BelowGround:"Below Ground"},Zy={Basement:"Below Grade Basement",SplitLevelBasement:"Split Level Basement",WalkoutBasement:"Walkout Basement"},Yy={EntirelyCopper:"Entirely Copper",EntirelyGalvanized:"Entirely Galvanized",EntirelyPEX:"Entirely PEX",EntirelyPVC:"Entirely PVC",Polybutylene:"Polybutylene"},Vy={TwentyFive:"$25,000",Fifty:"$50,000",OneHundred:"$100,000",TwoHundred:"$200,000",ThreeHundred:"$300,000",FourHundred:"$400,000",FiveHundred:"$500,000"},Ky={cov1000:"$1,000",cov2000:"$2,000",cov3000:"$3,000",cov4000:"$4,000",cov5000:"$5,000"},qy={TwoHundredFifty:"$250",FiveHundred:"$500",SevenHundredFifty:"$750",OneThousand:"$1,000",OneThousandFiveHundred:"$1,500",TwoThousand:"$2,000",TwoThousandFiveHundred:"$2,500",ThreeThousands:"$3,000",FourThousands:"$4,000",FiveThousands:"$5,000",OnePercent:"1%",TwoPercent:"2%",ThreePercent:"3%",FourPercent:"4%",FivePercent:"5%"},Jy={None:"None",OnePercent:"1%",TwoPercent:"2%",FivePercent:"5%",TenPercent:"10%"},Qy={_0_500ft:"0-500 Feet",_501_1000ft:"501-1000 Feet",_1001ftAndGreater:"1001 Feet And Greater"},Xy={Lessthan5miles:"Less Than 5 Miles",Over5miles:"Over 5 Miles",NotAvailable:"Not Available"},ka={"Agriclt/Forestry/Fish":"Agriculture/Forestry/Fishing","Art/Design/Media":"Art/Design/Media","Banking/Finance/RE":"Banking/Finance/Real Estate","Business/Sales/Offi":"Business/Sales/Office","Construct/EnrgyTrds":"Construction/Energy Trades",Disabled:"Disabled","Education/Library":"Education/Library","Engr/Archt/Sci/Math":"Engineer/Architect/Science/Math","Government/Military":"Government/Military","Homemaker/Houseprsn":"Homemaker/House Person","Info Tech":"Information Technology",Insurance:"Insurance","Lgl/Law Enfcmt/Sec":"Legal/Law Enforcement/Security","Maint/Rpr/Hsekeep":"Maintenance/Repair/Housekeeping","Mfg/Production":"Manufacturing/Production","Med/Soc Svcs/Relig":"Medical/Social Services/Religion",Other:"Other","Person.Care/Service":"Personal Care/Service","Rest/Hotel Services":"Restaurant/Hotel Services",Retired:"Retired","Sports/Recreation":"Sports/Recreation",Student:"Student","Trvl/Trnsprt/Warehs":"Travel/Transportation/Warehousing",Unemployed:"Unemployed"},Na={Single:"Single",Married:"Married",Seperated:"Separated",Divorced:"Divorced",Widowed:"Widowed",DomesticPartner:"Domestic Partner"},Oa={Female:"Female",Male:"Male"},Ma={"Agriclt/Forestry/Fish":"Agriculture/Forestry/Fishing","Art/Design/Media":"Art/Design/Media","Banking/Finance/RE":"Banking/Finance/Real Estate","Business/Sales/Offi":"Business/Sales/Office","Construct/EnrgyTrds":"Construction/Energy Trades",Disabled:"Disabled","Education/Library":"Education/Library","Engr/Archt/Sci/Math":"Engineer/Architect/Science/Math","Government/Military":"Government/Military","Homemaker/Houseprsn":"Homemaker/House person","Info Tech":"Information Technology",Insurance:"Insurance","Lgl/Law Enfcmt/Sec":"Legal/Law Enforcement/Security","Maint/Rpr/Hsekeep":"Maintenance/Repair/Housekeeping","Mfg/Production":"Manufacturing/Production","Med/Soc Svcs/Relig":"Medical/Social Services/Religion",Other:"Other","Person.Care/Service":"Personal Care/Service","Rest/Hotel Services":"Restaurant/Hotel Services",Retired:"Retired","Sports/Recreation":"Sports/Recreation",Student:"Student","Trvl/Trnsprt/Warehs":"Travel/Transportation/Warehousing",Unemployed:"Unemployed"},e0={CONTAMINATION:"Contamination",CREDITCARD:"Credit Card",DAMAGETOPROPERTYOFOTHERS:"Damage To Property Of Others",DOGBITELIABILITY:"Dog Bite",EARTHMOVEMENT:"Earth Movement",EARTHQUAKE:"Earthquake",EXTENDEDCOVERAGEPERILS:"Extended Coverage Perils",FIRE:"Fire",FLOOD:"Flood",FREEZINGWATERINCLUDINGBURSTPIPES:"Freezing Water",HAIL:"Hail",HURRICANE:"Hurricane",LIABILITYALLOTHER:"Liability",LIGHTNING:"Lightning",MEDICALPAYMENTS:"Medical Payments",MYSTERIOUSDISAPPEARANCE:"Mysterious Disappearance",MYSTERIOUSDISAPPEARANCESCHEDULEDPROPERTY:"Mysterious Disappearance - Scheduled Property",PHYSICALDAMAGEALLOTHER:"Physical Damage",SINKHOLE:"Sinkhole",SLIPFALLLIABILITY:"Slip/Fall",SMOKE:"Smoke",THEFTSCHEDULEDPROPERTY:"Theft - Scheduled Property",THEFTBURGLARY:"Theft - Burglary",TORNADO:"Tornado",VANDALISMMALICIOUSMISCHIEF:"Vandalism",WATERDAMAGE:"Water Damage",WIND:"Wind",WORKERSCOMPENSATION:"Workers Compensation",ALLOTHER:"All Other"},t0={Verbal_Threshold:"Limited right to sue",Zero_Threshold:"Unlimited right to sue"},r0={Primary:"Primary",Secondary:"Secondary"},n0={cov1000:"$1,000",cov10000:"$10,000"},o0={cov100_10400_LIMITED:"100 - 10,400/ LIMITED",cov125_13000_LIMITED:"125 - 13,000/ LIMITED",cov175_18200_LIMITED:"175 - 18,200/ LIMITED",cov250_26000_LIMITED:"250 - 26,000/ LIMITED",cov400_41600_LIMITED:"400 - 41,600/ LIMITED",cov500_52000_LIMITED:"500 - 52,000/ LIMITED",cov600_62400_LIMITED:"600 - 62,400/ LIMITED",cov700_72800_LIMITED:"700 - 72,800/ LIMITED",cov100_UNLIMITED:"100/UNLIMITED",cov125_UNLIMITED:"125/UNLIMITED",cov175_UNLIMITED:"175/UNLIMITED",cov250_UNLIMITED:"250/UNLIMITED",cov400_UNLIMITED:"400/UNLIMITED",cov500_UNLIMITED:"500/UNLIMITED",cov600_UNLIMITED:"600/UNLIMITED",cov700_UNLIMITED:"700/UNLIMITED"},i0={cov250:"$250",cov500:"$500",cov1000:"$1,000",cov2000:"$2,000",cov2500:"$2,500"},s0={"Agriclt/Forestry/Fish":["Agr Inspect/Grader","Arborist","Clerk","Equip. Operator","Farm/Ranch Owner","Farm/Ranch Worker","Fisherman","Florist","Laborer/Worker","Landscape/NursryWkr","Landscaper","Logger","Millworker","Other","Ranger","Supervisor","Timber Grader/Scale"],"Art/Design/Media":["Actor","Admin Assist","Announcer/Broadcstr","Artist/Animator","Author/Writer","Choreography/Dancer","Clerk","Composer/Director","Curator","Designer","Editor","Journalist/Reporter","Musician/Singer","Other","Printer","Producer","Production Crew","Projectionist","Receptionist/Sec","Ticket Sales/Usher"],"Banking/Finance/RE":["Accountant/Auditor","Admin Assist","Analyst/Broker","Bookkeeper","Branch Manager","Clerk","Collections","Consultant","Controller","CSR/Teller","Director/Administr","Executive","Financial Advisor","Investment Banker","Investor","Loan/EscrowProcess","Mgr-Credit/Loan","Mgr-Portfolio/Prod.","Mgr-Property","Other","Realtor","Receptionist/Sec","SalesAgt/Represent.","Trader,Finan Instru","Underwriter"],"Business/Sales/Offi":["Account Executive","Admin Assist","Buyer","Clerk-Office","Consultant","CSR","Director/Administr","Executive","H.R. Representative","Marketing Researchr","Messenger/Courier","Mgr - District","Mgr - Finance","Mgr-Dept/Store","Mgr-General Opers","Mgr-H.R./PublicRel","Mgr-Mkt/Sales","Mgr/Supervisr-Offic","Other","Receptionist/Sec","Sales-Counter/Rentl","Sales-Home Based","Sales-Mfg Rep","Sales-Retail/Whlsle","Sales-Route/Vendor"],"Construct/EnrgyTrds":["Boiler Oper/Maker","Bricklayer/Mason","Carpenter","Carpet Installer","Concrete Worker","Constrct Proj Mgr","Contractor","Crane Operator","Electrician/Linesmn","ElevatorTech/Instl","Equip. Operator","FloorLayer/Finisher","Foreman/Supervisor","Handyman","Heat/Air Technician","Inspector","Laborer/Worker","Metalworker","Miner","Oil/GasDril/RigOpr","Other","Painter","Plstr/Drywall/Stuc","Plumber","Roofer"],Disabled:["Disabled"],"Education/Library":["Admin Assist","Audio-Visual Tech.","Child/DayCare Wrker","Clerk","Counselor","Grad. Teaching/Asst","Instructor-Vocation","Librarian/Curator","Other","Professor, College","Receptionist/Sec","Superintendent","Teacher, College","Teacher, K-12","Teaching Asst/Aide","Tutor"],"Engr/Archt/Sci/Math":["Actuary","Admin Assist","Analyst","Architect","Clerk","Clinical Data Coord.","Drafter","Engineer","Manager-Project","Manager-R&D","Mathematician","Other","Receptionist/Sec","Research Prog. Dir.","Researcher","Scientist","Sociologist","Surveyor/Mapmaker","Technician"],"Government/Military":["Accountant/Auditor","Admin Assist","Analyst","Attorney","Chief Executive","Clerk","Commissioner","Council member","Director/Administr","Enlst Mil Prsnl E1-4","Legislator","Mayor/City Manager","Meter Reader","NCO (E5-9)","Officer-Commissiond","Officer-Warrant","Other","Park Ranger","Planner","Postmaster","Receptionist/Sec","Regulator","US Postal Worker"],"Homemaker/Houseprsn":["Homemaker/Houseprsn"],"Info Tech":["Admin Assist","Analyst","Clerk","Director/Administr","Engineer-Hardware","Engineer-Software","Engineer-Systems","Executive","Manager-Systems","Network Admin","Other","Programmer","Project Coordinator","Receptionist/Sec","Support Technician","Systems Security","Technical Writer","Web Developer"],Insurance:["Accountant/Auditor","Actuarial Clerk","Actuary","Admin Assist","Agent/Broker","Analyst","Attorney","Claims Adjuster","Clerk","Commissioner","CSR","Director/Administr","Executive","Other","Product Manager","Receptionist/Sec","Sales Rep","Underwriter"],"Lgl/Law Enfcmt/Sec":["Airport Sec Ofcr","Animal Control Ofcr","Attorney","Bailiff","Corrections Officer","Court Clrk/Reporter","Deputy Sheriff","Dispatcher","Examiner","Fed Agt/Marshall","Fire Chief","Fire Fighter/Supv.","Gaming Ofcr/Invest","Highway Patrol Ofcr","Judge/Hearing Ofcr","Legal Asst./Sec","Other","Paralegal/Law Clerk","Police Chief","Police Det/Investgr","Police Offcr/Supvr","Process Server","Prvt Invest/Detec.","Security Guard","Sheriff"],"Maint/Rpr/Hsekeep":["Bldg Maint Engineer","Custodian/Janitor","Electrician","Field Service Tech.","Handyman","Heat/AirCond Repair","Housekeeper/Maid","Lndscpe/Grnds Maint","Maint Mechanic","Mechanic","Other"],"Mfg/Production":["Admin Assist","Clerk","Factory Worker","Foreman/Supervisor","Furniture Finisher","Inspector","Jeweler","Machine Operator","Other","Packer","Plant Manager","Printer/Bookbinder","Quality Control","Receptionist/Sec","Refining Operator","Shoemaker","Tailor/Custom Sewer","Textile Worker","Upholsterer"],"Med/Soc Svcs/Relig":["Admin Assist","Assist-Med/Dent/Vet","Clergy","Clerk","Client Care Worker","Dental Hygenist","Dentist","Doctor","Hospice Volunteer","Mortician","Nurse - C.N.A.","Nurse - LPN","Nurse - RN","Nurse Practitioner","Optometrist","Other","Paramedic/EM Tech","Pharmacist","Receptionist/Sec","Social Worker","Support Services","Technician","Therapist","Veterinarian"],Other:["Other"],"Person.Care/Service":["Caregiver","Dry Cleaner/Laundry","Hair Stylist/Barber","Housekeeper","Manicurist","Masseuse","Nanny","Other","Pet Services","Receptionist/Sec"],"Rest/Hotel Services":["Baker","Bartender","Bellhop","Bus Person","Caterer","Chef","Concessionaire","Concierge","Cook-Rest/Cafeteria","Cook/Wrkr-Fast Food","Delivery Person","Desk Clerk","Dishwasher","Food Prod/Packing","Host/Maitre d","Housekeeper/Maid","Manager","Other","Valet","Waiter/Waitress","Wine Steward"],Retired:["Retired"],"Sports/Recreation":["Activity/Recre.Asst","Admin Assist","Agent","Athlete","CampCounselor/Lead","Clerk","Coach","Concessionaire","Director, Program","Event Mgr/Promoter","Life Guard","Mgr - Fitness Club","Other","Park Ranger","Receptionist/Sec","Sales-Tkt/Mmbrshp","SportsBrdcstr/Journ","Trainer/Instructor","Umpire/Referee"],Student:["Graduate Student","High school","Other","Undergraduate"],"Trvl/Trnsprt/Warehs":["Admin Assist","Air Traffic Control","Airport Ops Crew","Bellhop/Porter","Clerk","Crane Loader/Oper","Dispatcher","Driver-Bus/Strcar","Driver-Taxi/Limo","Driver-Truck/Delvry","Flight Attendant","Forklift Operator","Laborer","Longshoreman","Mate/Sailor","Mgr Warehse/Dist","Other","Parking Lot Attend","Pilot/Capt/Eng","Railroad Worker","Receptionist/Sec","Shipping/RecClk","Subway/LgtRail Oper","Ticket Agent","Transportation Spec"],Unemployed:["Unemployed"]},a0={"Agr Inspect/Grader":"Agriculture Inspector/Grader",Arborist:"Arborist",Clerk:"Clerk","Equip. Operator":"Equipment Operator","Farm/Ranch Owner":"Farm/Ranch Owner","Farm/Ranch Worker":"Farm/Ranch Worker",Fisherman:"Fisherman",Florist:"Florist","Laborer/Worker":"Laborer/Worker","Landscape/NursryWkr":"Landscaper/Nursery Worker",Landscaper:"Landscaper",Logger:"Logger",Millworker:"Mill worker",Other:"Other",Ranger:"Ranger",Supervisor:"Supervisor","Timber Grader/Scale":"Timber Grader/Scale",Actor:"Actor","Admin Assist":"Administrative Assistant","Announcer/Broadcstr":"Announcer/Broadcaster","Artist/Animator":"Artist/Animator","Author/Writer":"Author/Writer","Choreography/Dancer":"Choreography/Dancer","Composer/Director":"Composer/Director",Curator:"Curator",Designer:"Designer",Editor:"Editor","Journalist/Reporter":"Journalist/Reporter","Musician/Singer":"Musician/Singer",Printer:"Printer",Producer:"Producer","Production Crew":"Production Crew",Projectionist:"Projectionist","Receptionist/Sec":"Receptionist/Secretary","Ticket Sales/Usher":"Ticket Sales/Usher","Accountant/Auditor":"Accountant/Auditor","Analyst/Broker":"Analyst/Broker",Bookkeeper:"Bookkeeper","Branch Manager":"Branch Manager",Collections:"Collections",Consultant:"Consultant",Controller:"Controller","CSR/Teller":"CSR/Teller","Director/Administr":"Director/Administrator",Executive:"Executive","Financial Advisor":"Financial Advisor","Investment Banker":"Investment Banker",Investor:"Investor","Loan/EscrowProcess":"Loan/Escrow Processor","Mgr-Credit/Loan":"Manager-Credit/Loan","Mgr-Portfolio/Prod.":"Manager-Portfolio/Production","Mgr-Property":"Manager-Property",Realtor:"Realtor","SalesAgt/Represent.":"Sales Agent/Representative","Trader,Finan Instru":"Trader, Financial Instruments",Underwriter:"Underwriter","Account Executive":"Account Executive",Buyer:"Buyer","Clerk-Office":"Clerk-Office",CSR:"Customer Service Representative","H.R. Representative":"H.R. Representative","Marketing Researchr":"Marketing Researcher","Messenger/Courier":"Messenger/Courier","Mgr - District":"Manager - District","Mgr - Finance":"Manager - Finance","Mgr-Dept/Store":"Manager - Department/Store","Mgr-General Opers":"Manager - General Operations","Mgr-H.R./PublicRel":"Manager - H.R./Public Relations","Mgr-Mkt/Sales":"Manager - Marketing/Sales","Mgr/Supervisr-Offic":"Manager/Supervisor - Office","Sales-Counter/Rentl":"Sales-Counter/Rental","Sales-Home Based":"Sales-Home Based","Sales-Mfg Rep":"Sales-Manufacture Rep","Sales-Retail/Whlsle":"Sales-Retail/Wholesale","Sales-Route/Vendor":"Sales-Route/Vendor","Boiler Oper/Maker":"Boiler Operator/Maker","Bricklayer/Mason":"Bricklayer/Mason",Carpenter:"Carpenter","Carpet Installer":"Carpet Installer","Concrete Worker":"Concrete Worker","Constrct Proj Mgr":"Construction - Project Manager",Contractor:"Contractor","Crane Operator":"Crane Operator","Electrician/Linesmn":"Electrician/Linesman","ElevatorTech/Instl":"Elevator Technician/Installer","FloorLayer/Finisher":"Floor Layer/Finisher","Foreman/Supervisor":"Foreman/Supervisor",Handyman:"Handyman","Heat/Air Technician":"Heat/Air Technician",Inspector:"Inspector",Metalworker:"Metalworker",Miner:"Miner","Oil/GasDril/RigOpr":"Oil/Gas Driller/Rig Operator",Painter:"Painter","Plstr/Drywall/Stuc":"Plaster/Drywall/Stucco",Plumber:"Plumber",Roofer:"Roofer",Disabled:"Disabled","Audio-Visual Tech.":"Audio-Visual Tech.","Child/DayCare Wrker":"Child/Daycare Worker",Counselor:"Counselor","Grad. Teaching/Asst":"Graduate Teaching Assistant","Instructor-Vocation":"Instructor-Vocation","Librarian/Curator":"Librarian/Curator","Professor, College":"Professor, College",Superintendent:"Superintendent","Teacher, College":"Teacher, College","Teacher, K-12":"Teacher, K-12","Teaching Asst/Aide":"Teaching Assistant/Aide",Tutor:"Tutor",Actuary:"Actuary",Analyst:"Analyst",Architect:"Architect","Clinical Data Coord.":"Clinical Data Coordinator",Drafter:"Drafter",Engineer:"Engineer","Manager-Project":"Manager-Project","Manager-R&D":"Manager-R&D",Mathematician:"Mathematician","Research Prog. Dir.":"Research Program Director",Researcher:"Researcher",Scientist:"Scientist",Sociologist:"Sociologist","Surveyor/Mapmaker":"Surveyor/Mapmaker",Technician:"Technician",Attorney:"Attorney","Chief Executive":"Chief Executive",Commissioner:"Commissioner","Council member":"Council member","Enlst Mil Prsnl E1-4":"Enlisted Military Personnel (E1-4)",Legislator:"Legislator","Mayor/City Manager":"Mayor/City Manager","Meter Reader":"Meter Reader","NCO (E5-9)":"NCO (E5-9)","Officer-Commissiond":"Officer-Commissioned","Officer-Warrant":"Officer-Warrant","Park Ranger":"Park Ranger",Planner:"Planner",Postmaster:"Postmaster",Regulator:"Regulator","US Postal Worker":"US Postal Worker","Homemaker/Houseprsn":"Homemaker/House person","Engineer-Hardware":"Engineer-Hardware","Engineer-Software":"Engineer-Software","Engineer-Systems":"Engineer-Systems","Manager-Systems":"Manager-Systems","Network Admin":"Network Administrator",Programmer:"Programmer","Project Coordinator":"Project Coordinator","Support Technician":"Support Technician","Systems Security":"Systems Security","Technical Writer":"Technical Writer","Web Developer":"Web Developer","Actuarial Clerk":"Actuarial Clerk","Agent/Broker":"Agent/Broker","Claims Adjuster":"Claims Adjuster","Product Manager":"Product Manager","Sales Rep":"Sales Representative","Airport Sec Ofcr":"Airport Security Officer","Animal Control Ofcr":"Animal Control Officer",Bailiff:"Bailiff","Corrections Officer":"Corrections Officer","Court Clrk/Reporter":"Court Clerk/Reporter","Deputy Sheriff":"Deputy Sheriff",Dispatcher:"Dispatcher",Examiner:"Examiner","Fed Agt/Marshall":"Federal Agent/Marshall","Fire Chief":"Fire Chief","Fire Fighter/Supv.":"Fire Fighter/Supervisor","Gaming Ofcr/Invest":"Gaming Officer/Investigator","Highway Patrol Ofcr":"Highway Patrol Officer","Judge/Hearing Ofcr":"Judge/Hearing Officer","Legal Asst./Sec":"Legal Assistant/Secretary","Paralegal/Law Clerk":"Paralegal/Law Clerk","Police Chief":"Police Chief","Police Det/Investgr":"Police Detective/Investigator","Police Offcr/Supvr":"Police Officer/Supervisor","Process Server":"Process Server","Prvt Invest/Detec.":"Private Investigator/Detective","Security Guard":"Security Guard",Sheriff:"Sheriff","Bldg Maint Engineer":"Building Maintenance Engineer","Custodian/Janitor":"Custodian/Janitor",Electrician:"Electrician","Field Service Tech.":"Field Service Technician","Heat/AirCond Repair":"Heat/Air Conditioner Repairman","Housekeeper/Maid":"Housekeeper/Maid","Lndscpe/Grnds Maint":"Landscape/Grounds Maintenance","Maint Mechanic":"Maintenance Mechanic",Mechanic:"Mechanic","Factory Worker":"Factory Worker","Furniture Finisher":"Furniture Finisher",Jeweler:"Jeweler","Machine Operator":"Machine Operator",Packer:"Packer","Plant Manager":"Plant Manager","Printer/Bookbinder":"Printer/Bookbinder","Quality Control":"Quality Control","Refining Operator":"Refining Operator",Shoemaker:"Shoemaker","Tailor/Custom Sewer":"Tailor/Custom Sewer","Textile Worker":"Textile Worker",Upholsterer:"Upholsterer","Assist-Med/Dent/Vet":"Assistant - Medic/Dent/Vet",Clergy:"Clergy","Client Care Worker":"Client Care Worker","Dental Hygenist":"Dental Hygienist",Dentist:"Dentist",Doctor:"Doctor","Hospice Volunteer":"Hospice Volunteer",Mortician:"Mortician","Nurse - C.N.A.":"Nurse - C.N.A.","Nurse - LPN":"Nurse - LPN","Nurse - RN":"Nurse - RN","Nurse Practitioner":"Nurse Practitioner",Optometrist:"Optometrist","Paramedic/EM Tech":"Paramedic/E.M. Technician",Pharmacist:"Pharmacist","Social Worker":"Social Worker","Support Services":"Support Services",Therapist:"Therapist",Veterinarian:"Veterinarian",Caregiver:"Caregiver","Dry Cleaner/Laundry":"Dry Cleaner/Laundry","Hair Stylist/Barber":"Hair Stylist/Barber",Housekeeper:"Housekeeper",Manicurist:"Manicurist",Masseuse:"Masseuse",Nanny:"Nanny","Pet Services":"Pet Services",Baker:"Baker",Bartender:"Bartender",Bellhop:"Bellhop","Bus Person":"Bus Person",Caterer:"Caterer",Chef:"Chef",Concessionaire:"Concessionaire",Concierge:"Concierge","Cook-Rest/Cafeteria":"Cook - Restaurant/Cafeteria","Cook/Wrkr-Fast Food":"Cook/Worker-Fast Food","Delivery Person":"Delivery Person","Desk Clerk":"Desk Clerk",Dishwasher:"Dishwasher","Food Prod/Packing":"Food Production/Packing","Host/Maitre d":"Host/Maitre d",Manager:"Manager",Valet:"Valet","Waiter/Waitress":"Waiter/Waitress","Wine Steward":"Wine Steward",Retired:"Retired","Activity/Recre.Asst":"Activity/Recreational Assistant",Agent:"Agent",Athlete:"Athlete","CampCounselor/Lead":"Camp Counselor/Lead",Coach:"Coach","Director, Program":"Director, Program","Event Mgr/Promoter":"Event Manager/Promoter","Life Guard":"Life Guard","Mgr - Fitness Club":"Manager - Fitness Club","Sales-Tkt/Mmbrshp":"Sales-Ticket/Membership","SportsBrdcstr/Journ":"Sports Broadcaster/Journalist","Trainer/Instructor":"Trainer/Instructor","Umpire/Referee":"Umpire/Referee","Graduate Student":"Graduate Student","High school":"High school",Undergraduate:"Undergraduate","Air Traffic Control":"Air Traffic Control","Airport Ops Crew":"Airport Operations Crew","Bellhop/Porter":"Bellhop/Porter","Crane Loader/Oper":"Crane Loader/Operator","Driver-Bus/Strcar":"Driver - Bus/Streetcar","Driver-Taxi/Limo":"Driver-Taxi/Limo","Driver-Truck/Delvry":"Driver-Truck/Delivery","Flight Attendant":"Flight Attendant","Forklift Operator":"Forklift Operator",Laborer:"Laborer",Longshoreman:"Longshoreman","Mate/Sailor":"Mate/Sailor","Mgr Warehse/Dist":"Manager - Warehouse/District","Parking Lot Attend":"Parking Lot Attendant","Pilot/Capt/Eng":"Pilot/Captain/Engineer","Railroad Worker":"Railroad Worker","Shipping/RecClk":"Shipping/Receiving Clerk","Subway/LgtRail Oper":"Subway/Light Rail Operator","Ticket Agent":"Ticket Agent","Transportation Spec":"Transportation Specialist",Unemployed:"Unemployed"},Da=s0,Pa=a0;function No(e,t){if(typeof e!="string")return e;const r=e.trim();if(!r)return e;if(t[r])return r;const n=r.toLowerCase();return Object.keys(t).find(i=>i.toLowerCase()===n||t[i]?.toLowerCase()===n)??e}function nn(e){return No(e,Ma)}function La(e){return No(e,Ia)}function xa(e){return No(e,Pa)}function c0(e){return e.trim().toLowerCase()}function Fa(e){if(typeof e!="string")return null;const t=e.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!t)return null;const r=Number(t[1]),n=Number(t[2]),o=Number(t[3]);if(!Number.isFinite(r)||!Number.isFinite(n)||!Number.isFinite(o)||n<1||n>12||o<1||o>31)return null;const i=new Date(Date.UTC(r,n-1,o));return i.getUTCFullYear()!==r||i.getUTCMonth()!==n-1||i.getUTCDate()!==o?null:i.getTime()}function Xt(e,t){if(!t.effectiveDateKey||!t.expirationDateKey)return!1;const r=Fa(e[t.expirationDateKey]),n=Fa(e[t.effectiveDateKey]);return r==null||n==null?!1:r<n}const l0=new Set(["HomePolicy","BundlePolicy"]);function on(e,t,r){return String(e.key??"")!=="lapse_in_coverage"||!r||!l0.has(r)?!0:t.home_prior_carrier_name!=="NoPriorInsurance"}function Oo(e){let t=null,r=null,n=null;const o=new Set,i=new Set,s=c=>{const l=String(c.key??""),d=c0(String(c.question??""));!t&&(l==="auto_prior_carrier_name"||l==="home_prior_carrier_name"||d.includes("current auto insurance company"))&&(t=l),!r&&(l==="effective_date"||d.includes("when do you need your insurance to begin"))&&(r=l),!n&&(l==="auto_prior_expiration_date"||l==="home_prior_expiration_date"||d.includes("when does the current policy expire"))&&(n=l),(l==="auto_reason_for_no_insurance"||d.includes("reason you are not currently insured")||d.includes("reason for lapse in coverage"))&&o.add(l),(l==="auto_prior_years"||l==="auto_prior_months"||l==="auto_continuous_coverage_years"||l==="auto_prior_expiration_date"||l==="auto_current_annual_premium_cents"||l==="auto_prior_liability_limit")&&i.add(l)};e.forEach(s);const a=c=>{c.forEach(l=>{(l.conditionals??[]).forEach(d=>{const f=d.conditionalQuestions??[];f.forEach(s),a(f)})})};return a(e),{currentCarrierKey:t,effectiveDateKey:r,expirationDateKey:n,noInsuranceReasonKeys:o,hideWhenNoPriorInsuranceKeys:i}}function hr(e,t){return t.currentCarrierKey==="home_prior_carrier_name"&&e.home_prior_carrier_name==="NoPriorInsurance"&&e.auto_prior_carrier_name!=="NoPriorInsurance"?!1:(t.currentCarrierKey?e[t.currentCarrierKey]:void 0)==="NoPriorInsurance"?!0:!t.effectiveDateKey||!t.expirationDateKey||t.expirationDateKey==="home_prior_expiration_date"&&Xt(e,t)?!1:Xt(e,t)}function sn(e,t,r){const n=String(e.key??"");if(r.noInsuranceReasonKeys.has(n)&&r.currentCarrierKey==="home_prior_carrier_name"&&t.home_prior_carrier_name==="NoPriorInsurance"&&t.auto_prior_carrier_name!=="NoPriorInsurance")return!1;const i=(r.currentCarrierKey?t[r.currentCarrierKey]:void 0)==="NoPriorInsurance";return i&&r.hideWhenNoPriorInsuranceKeys.has(n)?!1:!r.noInsuranceReasonKeys.has(n)||i?!0:hr(t,r)}function an(e,t){const r=String(e.key??"");return t.noInsuranceReasonKeys.has(r)}const u0=["ACURA","ALFA ROMEO","ASTON MARTIN","AUDI","BENTLEY","BMW","BUGATTI","BUICK","CADILLAC","CHEVROLET","CHRYSLER","CRUISE","DODGE","FERRARI","FIAT","FORD","FREIGHTLINER","GENESIS","GLOBAL ELECTRIC MOTORS","GMC","HONDA","HYUNDAI","INFINITI","JAGUAR","JEEP","KARMA AUTOMOTIVE","KIA","LAMBORGHINI","LAND ROVER","LEXUS","LINCOLN","LOTUS","MASERATI","MAZDA","MCLAREN AUTOMOTIVE","MERCEDES-BENZ","MINI","MITSUBISHI","NISSAN","POLESTAR","PORSCHE","RAM","ROLLS-ROYCE","SUBARU","TESLA","TOYOTA","VOLKSWAGEN","VOLVO"],Mo="credify_quote_id",Do="credify_auth_token";function $a(e){try{localStorage.setItem(Mo,e)}catch(t){console.error("Failed to save quoteId to localStorage:",t)}}function Ba(){try{return localStorage.getItem(Mo)}catch(e){return console.error("Failed to load quoteId from localStorage:",e),null}}function Ra(){try{localStorage.removeItem(Mo)}catch(e){console.error("Failed to clear quoteId from localStorage:",e)}}function d0(e){try{localStorage.setItem(Do,e)}catch(t){console.error("Failed to save authToken to localStorage:",t)}}function f0(){try{return localStorage.getItem(Do)}catch(e){return console.error("Failed to load authToken from localStorage:",e),null}}function Ua(){try{localStorage.removeItem(Do)}catch(e){console.error("Failed to clear authToken from localStorage:",e)}}function p0(){Ra(),Ua()}const _0="credify-insurance-widget",m0="1.0",Ha=25,za=64*1024,h0=`
63
+ …[truncated]`;let ja=!1,Wa=null,Ga="",Za=Ha,Po=za,gr=[];function g0(e){return typeof e=="string"?e:e instanceof URL?e.href:e.url}function y0(e,t){return t?.method?t.method.toUpperCase():typeof e!="string"&&!(e instanceof URL)&&e.method?e.method.toUpperCase():"GET"}function Ya(e){if(!e)return[];const t=[];if(Array.isArray(e))for(const[r,n]of e)t.push({name:r,value:String(n)});else if(typeof e.forEach=="function")e.forEach((r,n)=>t.push({name:n,value:r}));else for(const[r,n]of Object.entries(e))t.push({name:r,value:String(n)});return t}function b0(e){try{const t=[];return new URL(e).searchParams.forEach((r,n)=>t.push({name:n,value:r})),t}catch{return[]}}function v0(e,t){const r=t?.body;return typeof r!="string"||r.length===0?void 0:{mimeType:e.find(o=>o.name.toLowerCase()==="content-type")?.value??"application/json",text:r}}function S0(e){const t=e.length;return t<=Po?{text:e,size:t}:{text:e.slice(0,Po)+h0,size:t}}function E0(e){gr.push(e),gr.length>Za&&gr.shift()}function C0(e){if(ja)return!0;if(typeof window>"u"||typeof window.fetch!="function")return!1;Ga=e.baseUrl,Za=e.maxEntries??Ha,Po=e.maxBodyBytes??za,Wa=window.fetch.bind(window);const t=Wa;return window.fetch=async(r,n)=>{let o;try{o=g0(r)}catch{return t(r,n)}if(!o.startsWith(Ga))return t(r,n);const i=Ya(n?.headers??(typeof r!="string"&&!(r instanceof URL)?r.headers:void 0)),s={startedDateTime:new Date().toISOString(),time:-1,request:{method:y0(r,n),url:o,httpVersion:"HTTP/1.1",headers:i,queryString:b0(o),cookies:[],headersSize:-1,bodySize:typeof n?.body=="string"?n.body.length:-1,postData:v0(i,n)},response:A0(),cache:{},timings:{send:0,wait:-1,receive:0}};E0(s);const a=typeof performance<"u"?performance.now():0;let c;try{c=await t(r,n)}catch(d){const f=(typeof performance<"u"?performance.now():0)-a;throw s.time=Math.round(f),s.timings.wait=Math.round(f),s.response._error=d instanceof Error?d.message:String(d),d}const l=(typeof performance<"u"?performance.now():0)-a;s.time=Math.round(l),s.timings.wait=Math.round(l),s.response.status=c.status,s.response.statusText=c.statusText,s.response.headers=Ya(c.headers),s.response.content.mimeType=typeof c.headers?.get=="function"&&c.headers.get("content-type")||"";try{c.clone().text().then(f=>{const{text:_,size:m}=S0(f);s.response.content.text=_,s.response.content.size=m,s.response.bodySize=m}).catch(()=>{})}catch{}return c},ja=!0,!0}function A0(){return{status:0,statusText:"",httpVersion:"HTTP/1.1",headers:[],cookies:[],content:{size:0,mimeType:""},redirectURL:"",headersSize:-1,bodySize:-1}}function w0(){return{log:{version:"1.2",creator:{name:_0,version:m0},entries:gr.map(e=>({...e}))}}}function T0(){return gr.length}const I0=[/ssn/i,/social.?security/i,/(driver.?licen[cs]e|^dln$|^dl$)/i,/(date.?of.?birth|^dob$)/i,/^vin$/i,/(sms.?code|^otp$|^code$|verification.?code)/i,/phone/i,/^email$/i,/(first.?name|last.?name|full.?name)/i,/(^address$|street|^zip$|postal)/i,/(jwt|^token$|authorization|^auth$|api.?key|secret|password|credential)/i,/cookie/i],k0=[/\b\d{3}-?\d{2}-?\d{4}\b/g,/\b[A-HJ-NPR-Z0-9]{17}\b/g,/eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g,/\bsk_[A-Za-z0-9]{16,}\b/g,/\bBearer\s+[A-Za-z0-9._-]+/gi],bt="[REDACTED]",N0=8;function cn(e){for(const t of I0)if(t.test(e))return!0;return!1}function vt(e){let t=e;for(const r of k0)t=t.replace(r,bt);return t}function St(e,t=0,r=new WeakSet){if(t>N0)return bt;if(e==null)return e;if(typeof e=="string")return vt(e);if(typeof e!="object")return e;if(r.has(e))return bt;if(r.add(e),Array.isArray(e))return e.map(i=>St(i,t+1,r));const n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)return e;const o={};for(const[i,s]of Object.entries(e)){if(cn(i)){o[i]=bt;continue}o[i]=St(s,t+1,r)}return o}function Va(e){if(e.request&&(e.request.data!==void 0&&(e.request.data=St(e.request.data)),e.request.cookies!==void 0&&(e.request.cookies=bt),e.request.headers)){const t=e.request.headers;for(const r of Object.keys(t))cn(r)&&(t[r]=bt)}if(e.extra&&(e.extra=St(e.extra)),e.contexts&&(e.contexts=St(e.contexts)),e.tags&&(e.tags=St(e.tags)),e.user){const{id:t,email:r,username:n}=e.user;e.user={...typeof t=="string"?{id:t}:{},...typeof r=="string"?{email:r}:{},...typeof n=="string"?{username:n}:{}}}if(Array.isArray(e.breadcrumbs))for(const t of e.breadcrumbs)t.data!==void 0&&(t.data=St(t.data)),typeof t.message=="string"&&(t.message=vt(t.message));return typeof e.message=="string"&&(e.message=vt(e.message)),e}function Ka(e){for(const t of e)t.value=cn(t.name)?bt:vt(t.value)}function qa(e){try{return JSON.stringify(St(JSON.parse(e)))}catch{return vt(e)}}function O0(e){const t=JSON.parse(JSON.stringify(e));for(const r of t.log.entries){Ka(r.request.headers),Ka(r.response.headers);for(const n of r.request.queryString)n.value=cn(n.name)?bt:vt(n.value);r.request.postData?.text&&(r.request.postData.text=qa(r.request.postData.text)),r.response.content.text&&(r.response.content.text=qa(r.response.content.text)),r.request.url=vt(r.request.url),r.response._error&&(r.response._error=vt(r.response._error))}return t}function er(e,t={}){try{$n(r=>{r.setTag("failure_type","quote"),t.stage&&r.setTag("stage",t.stage),t.quoteId&&r.setTag("quote_id",t.quoteId),t.phase&&r.setTag("phase",t.phase),t.endpoint&&r.setTag("endpoint",t.endpoint),typeof t.statusCode=="number"&&r.setTag("status_code",String(t.statusCode));try{T0()>0&&r.addAttachment({filename:"quote-failure.har",data:JSON.stringify(O0(w0())),contentType:"application/json"})}catch{}const n=e instanceof Error?e:new Error(t.message??"Quote failed");xr(n)})}catch{}}const Oe="https://api.getcredify.com";let tr=null;const M0=6e4,Ja=new Map;function D0(e){try{return new URL(e).pathname}catch{return e}}function Qa(e,t,r){if(!(r>=500&&r<600)&&!(r===0))return;e.__sentryReported=!0;const i=D0(t),s=`${i}:${r}`,a=Date.now(),c=Ja.get(s);c&&a-c<M0||(Ja.set(s,a),er(e,{phase:"api_request",endpoint:i,statusCode:r}))}function Lo(e){tr=e,d0(e)}function rr(){return tr}function xo(){const e=f0();e&&(tr=e)}function Xa(){tr=null,Ua()}async function je(e,t){const r={"Content-Type":"application/json"};tr&&(r.Authorization=`Bearer ${tr}`);let n;try{n=await fetch(e,{method:"POST",headers:r,body:JSON.stringify(t)})}catch(o){const i=o instanceof Error?o:new Error(String(o));throw Qa(i,e,0),o}if(!n.ok){let o=`Request failed with status ${n.status}`;try{o=(await n.json()).error||o}catch{o=n.statusText||o}const i=new Error(o);throw i.statusCode=n.status,Qa(i,e,n.status),i}return n}async function P0(e){try{return await e.json()}catch{return{}}}async function L0(e,t){const r=t?{stage:e,quoteId:t}:{stage:e};return await(await je(`${Oe}/get-questions-by-stage`,r)).json()}async function ln(e){const t=e?{quoteId:e}:{};return await(await je(`${Oe}/get-stages-for-quote`,t)).json()}async function x0(e){const r=await(await je(`${Oe}/create-quote`,{postal_code:e})).json();if(!r||typeof r!="object"||!r.quoteId)throw new Error(`Invalid createQuote response: ${JSON.stringify(r)}`);return r}async function F0(e,t){return await(await je(`${Oe}/verify-quote`,{action:"send",quoteId:e,phone:t})).json()}async function nr(e,t,r){const n={payload:e,getRates:t};r&&typeof r=="string"&&r.trim()!==""&&(n.quoteId=r);const o=await je(`${Oe}/update-quote`,n),i=await P0(o);return!i||typeof i!="object"||!("status"in i)||i.status==null?{status:"success"}:i}async function ec(e,t){return await(await je(`${Oe}/verify-quote`,{quoteId:e,smsCode:t})).json()}async function $0(e){return await(await je(`${Oe}/verify-quote`,{action:"resume",resumeToken:e})).json()}async function B0(e,t){const r={state:e};return t&&typeof t=="string"&&t.trim()!==""&&(r.quoteId=t),await(await je(`${Oe}/is-supported-state`,r)).json()}async function Fo(){return await(await je(`${Oe}/get-rates`,{})).json()}async function tc(e){const t=e?{quoteId:e}:{};return await(await je(`${Oe}/get-quote`,t)).json()}async function rc(e){return(await je(`${Oe}/get-vehicle-options`,e)).json()}async function R0(e){return(await je(`${Oe}/get-vehicle-options`,{...e,action:"vinDecode"})).json()}async function U0(e,t){const n=await(await je(`${Oe}/request-bind`,{quoteRateId:e,privacyNoticeAcknowledged:t})).json();return n&&typeof n=="object"&&"success"in n?n:{success:!0}}const $o=new Set(["auto_prior_years","auto_prior_months","auto_continuous_coverage_years"]),H0={None:"None","30000/60000/25000":"30/60k","30000/60000/30000":"30/60k","50000/100000/30000":"50/100k","50000/100000/50000":"50/100k","100000/300000/50000":"100/300k","100000/300000/100000":"100/300k","250000/500000/100000":"250/500k","250000/500000/250000":"250/500k","300000/500000/250000":"300/500k","300000/500000/300000":"300/500k","500000/500000/300000":"500k CSL","500000/500000/500000":"500k CSL","500000/1000000/300000":"500k/1M","500000/1000000/500000":"500k/1M"},nc={auto_prior_carrier_name:_y,auto_prior_liability_limit:yy,auto_reason_for_no_insurance:by,residence_type:my,home_prior_carrier_name:hy,policy_bi:vy,policy_um:Sy,policy_pd:Ey,policy_mp:Cy,policy_umpd:Ay,policy_pip:wy,policy_auto_death_indemnity:Ty,vehicle_comp_deductible:Io,vehicle_coll_deductible:Io,vehicle_towing_and_labor:ko,vehicle_transportation_expense:Ta,education_level:Ia,industry:Ma,occupation:Pa,usage:gy,architectural_style:Dy,dwelling_type:Py,occupancy_type:Ly,construction_quality:xy,construction_type:Fy,foundation_type:$y,located_over_water:By,number_of_stories:Ry,exterior_wall_type:Uy,roof_material_type:Hy,roof_shape:zy,roof_updated_type:jy,heating_type:Wy,oil_tank_location:Gy,basement_type:Zy,plumbing_type:Yy,personal_liability:Vy,dwelling_medical_payments:Ky,all_perils_deductible:qy,windstorm_deductible:Jy,distance_from_fire_hydrant_ft:Qy,distance_from_fire_station_miles:Xy,employment_industry:ka,marital_status:Na,gender:Oa,co_applicant_employment_industry:ka,co_applicant_marital_status:Na,co_applicant_gender:Oa,description:e0,tort_threshold:t0,pip_coverage_type:r0,extended_medical:n0,additional_pip:o0,policy_pip_deductible:i0},z0=["OTHER / NOT LISTED"],j0=["SEDAN","SUV","COUPE","HATCHBACK","PICKUP","VAN","WAGON","OTHER"],W0=["Other"];function We(e){const t=e.getUTCFullYear(),r=String(e.getUTCMonth()+1).padStart(2,"0"),n=String(e.getUTCDate()).padStart(2,"0");return`${t}-${r}-${n}`}function oc(e){const t=e.replace(/\D+/g,"");if(t!=="")return py(t)}function G0(e){return e==="-"||e==="+"||e==="."||e==="e"||e==="E"}const Z0={year_built:4,year_roof_updated:4,heating_update_year:4,plumbing_update_year:4,electrical_update_year:4,total_area_sq_ft:6,sale_price_cents:9,dwelling_replacement_cost:9,other_structures_coverage:9,personal_property_coverage:7,amount_paid_cents:7,loss_of_use_coverage:8,home_prior_years:2,home_continuous_coverage_years:2,number_of_dogs:2,number_of_units:2,months_at_address:2,years_at_address:3,years_at_prior_address:3,distance_to_coast_miles:4,household_size:1,number_of_families:1,number_of_mortgagees:1,annual_mileage:6,miles_to_work:4,custom_equipment_value_cents:7,cost_new_value_cents:7,stated_value_amount_cents:7,property_damage_amount_paid_cents:7,personal_injury_amount_paid_cents:7,auto_current_annual_premium_cents:7,auto_prior_years:2,auto_prior_months:2,auto_continuous_coverage_years:2},ic=new Set(["sale_price_cents","dwelling_replacement_cost","other_structures_coverage","personal_property_coverage","loss_of_use_coverage","custom_equipment_value_cents","cost_new_value_cents","stated_value_amount_cents","property_damage_amount_paid_cents","personal_injury_amount_paid_cents","auto_current_annual_premium_cents","amount_paid_cents"]),Y0=new Set(["total_area_sq_ft","annual_mileage","miles_to_work","distance_to_coast_miles"]),un={first_name:"given-name",last_name:"family-name",co_applicant_first_name:"given-name",co_applicant_last_name:"family-name",date_of_birth:"bday",co_applicant_date_of_birth:"bday",sms_code:"one-time-code",vin:"off",license_number:"off",effective_date:"off"},V0={license_number:20};function K0(e){const t=new Date,r=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()));if(e==="effective_date"){const n=new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth()+3,r.getUTCDate()));return{min:We(r),max:We(n)}}if(e==="home_prior_expiration_date"){const n=new Date(Date.UTC(r.getUTCFullYear()-1,r.getUTCMonth(),r.getUTCDate())),o=new Date(Date.UTC(r.getUTCFullYear()+1,r.getUTCMonth(),r.getUTCDate()));return{min:We(n),max:We(o)}}if(e==="date_of_incident")return{max:We(r)};if(e==="move_in_date")return{max:We(r)};if(e==="purchase_date")return{max:We(r)};if(e==="date_of_birth")return{max:We(r)};if(e==="date_first_licensed")return{max:We(r)};if(e==="occurred_at")return{max:We(r)};if(e==="accident_prevention_course_date")return{max:We(r)};if(e==="auto_prior_expiration_date"){const n=new Date(Date.UTC(r.getUTCFullYear()-1,r.getUTCMonth(),r.getUTCDate())),o=new Date(Date.UTC(r.getUTCFullYear()+1,r.getUTCMonth(),r.getUTCDate()));return{min:We(n),max:We(o)}}return{}}const q0=new Set(["Disabled","Retired","Unemployed","Other"]);function Bo(e,t,r){const n=String(e.key??"");if(n!=="occupation"&&n!=="co_applicant_occupation"||n==="co_applicant_occupation")return!0;const o=Ne(t,r,"industry"),i=Ne(t,r,"employment_industry"),s=String(o??i??"").trim();return!q0.has(s)}function Ro(e,t,r,n){return Sa(e,n,r)}function dn(e){return e.inputType!=="radio"||!e.options||e.options.length!==1||e.options[0]!=="Yes"?!1:(e.conditionals??[]).some(r=>r.conditionalQuestionsAllowMultiple&&r.conditionalType==="equals"&&r.conditionalValue==="Yes")}function sc(e,t){return dn(e)?"Yes":t}function ac(e){return typeof e=="number"&&Number.isFinite(e)?e:typeof e=="string"&&e.trim()!==""&&!Number.isNaN(Number(e))?Number(e):null}function cc(e){if(e instanceof Date&&!Number.isNaN(e.getTime()))return e.getTime();if(typeof e=="string"){const t=Date.parse(e);return Number.isNaN(t)?null:t}return null}function lc(e,t){const r=ac(e),n=ac(t);if(r!=null&&n!=null)return r-n;const o=cc(e),i=cc(t);return o!=null&&i!=null?o-i:e==null||t==null?null:String(e).localeCompare(String(t))}function J0(e,t){return Array.isArray(e)?e.some(r=>r===t):typeof e=="string"?t!=null&&e.includes(String(t)):!1}function yr(e,t,r){switch(t){case"equals":return e===r;case"notEquals":return e!==r&&e!==""&&e!=null;case"lessThan":{const n=lc(e,r);return n!=null&&n<0}case"greaterThan":{const n=lc(e,r);return n!=null&&n>0}case"contains":return J0(e,r);case"startsWith":return e!=null&&r!=null&&String(e).startsWith(String(r));case"endsWith":return e!=null&&r!=null&&String(e).endsWith(String(r));default:return!1}}function br(e,t){return t.reduce((r,n)=>r?.[n],e)}function et(e,t,r){if(t.length===0)return e;const[n,...o]=t;if(o.length===0){if(typeof n=="number"){const l=(Array.isArray(e)?e:[]).slice();return l[n]=r,l}return{...e,[n]:r}}const i=e?.[n],s=typeof o[0]=="number"?Array.isArray(i)?i:[]:i&&typeof i=="object"?i:{},a=et(s,o,r);if(typeof n=="number"){const l=(Array.isArray(e)?e:[]).slice();return l[n]=a,l}return{...e,[n]:a}}function Ne(e,t,r){return br(e,[...t??[],r])}function Me(e,t,r,n){return et(e,[...t??[],r],n)}function Q0(e,t){return e?.length?`${e.join("-")}-${t}`:t}const X0="__items",fn=e=>`${e}${X0}`;function $e(e){return e==null?"":typeof e=="string"?e:String(e)}function uc(e){return e==null?"":typeof e=="number"&&Number.isFinite(e)||typeof e=="string"?e:""}function eb(e){return e==null?"":typeof e=="string"||typeof e=="number"?e:String(e)}function tb({questions:e,initialValues:t,controlledValues:r,onChangeValues:n,onSubmit:o,quoteId:i,widgetStageKey:s}){const a=y.useMemo(()=>uo(e),[e]),c=y.useMemo(()=>Oo(a),[a]),l=y.useMemo(()=>s==="BundlePolicy"?!0:a.some(S=>String(S.key)==="home_prior_carrier_name")&&a.some(S=>String(S.key)==="driver_vehicle_assignments"),[s,a]),d=y.useMemo(()=>{const S={};return t&&Object.assign(S,t),S},[t]),[f,_]=y.useState(d);y.useEffect(()=>{_(d)},[d]);const[m,g]=y.useState({}),b=y.useMemo(()=>({...m,...r??f}),[m,r,f]);y.useEffect(()=>{r&&g(S=>({...S,...r}))},[r]);const[G,x]=y.useState({}),B=y.useRef(new Map),D=y.useRef(new Set),[,z]=y.useState({}),[E,j]=y.useState({}),K=y.useRef(!1);y.useEffect(()=>{!i||K.current||!a.some(h=>h.key==="year"||h.key==="make"||h.key==="model"||h.key==="body_style")||(K.current=!0,rc({quoteId:i}).catch(()=>{}))},[i,a]);const[R,ee]=y.useState({}),[te,ce]=y.useState({}),Se=y.useCallback(async(S,h)=>{if(!i||!wa(h))return;const p=S?S.join("-"):"_root";ee(C=>({...C,[p]:!0})),ce(C=>({...C,[p]:null}));try{const C=await R0({quoteId:i,vin:h});if(C.error){ce(k=>({...k,[p]:C.error}));return}let A=b;C.year&&(A=Me(A,S,"year",String(C.year))),C.make&&(A=Me(A,S,"make",C.make)),C.model&&(A=Me(A,S,"model",C.model)),C.bodyStyle&&(A=Me(A,S,"body_style",C.bodyStyle)),r&&n?n(A):_(A),g(A),B.current.clear(),D.current.clear(),z({})}catch{ce(C=>({...C,[p]:"VIN lookup failed — please enter vehicle details manually"}))}finally{ee(C=>({...C,[p]:!1}))}},[i,b,r,n]),De=y.useCallback(S=>{const h=`${S.year}|${S.make??""}|${S.model??""}`,p=S.model?"bodyStyles":S.make?"models":"makes",C=B.current.get(h);return C?C[p]??[]:void 0},[]),Re=y.useCallback((S,h)=>{if(!i)return;const p=`${h.year}|${h.make??""}|${h.model??""}`,C=h.model?"bodyStyles":h.make?"models":"makes",A=`${S}:${C}`;B.current.has(p)||D.current.has(p)||(D.current.add(p),j(k=>({...k,[A]:!0})),rc({quoteId:i,...h}).then(k=>{B.current.set(p,k),z(N=>({...N,[A]:k[C]??[]}))}).catch(()=>{B.current.set(p,{}),z(k=>({...k,[A]:[]}))}).finally(()=>{D.current.delete(p),j(k=>({...k,[A]:!1}))}))},[i]);function Q(S,h,p){const C=b,A=S?br(b,S)??{}:C;return S?{state:C.state,...A,[h]:p}:{...A,[h]:p}}function O(S,h){const p=Aa.filter(A=>A.targetKey===S||A.dependsOn.includes(S)),C={[S]:void 0};for(const A of p){const k=A.validate(h);A.targetKey in C?k!==void 0&&(C[A.targetKey]=k):C[A.targetKey]=k}x(A=>({...A,...C}))}const T=(S,h,p)=>{const C=Ne(b,p,S);if(yt(C,h)){G[S]&&x(k=>({...k,[S]:void 0}));return}const A=wo(S,C);if(A){x(k=>({...k,[S]:A}));return}O(S,Q(p,S,C))};y.useEffect(()=>{let S=b,h=!1;a.forEach(p=>{if(!dn(p))return;const C=String(p.key);Ne(S,void 0,C)!=="Yes"&&(S=Me(S,void 0,C,"Yes"),h=!0)}),h&&(r&&n?n(S):_(S),g(S))},[a,b,r,n]);function V(S,h){const p=S.key;if((p==="relationship_to_insured"||p==="is_registered_owner")&&h){const w=h[h.length-1];if(typeof w=="number"&&w===0)return null}if((p==="purchase_date"||p==="cost_new_value_cents")&&h)return null;if(p==="custom_equipment_value_cents"&&h){const w=Ne(b,h,"vehicle_has_modifications");if(w!=="Yes"&&w!==!0)return null}const C=p==="auto_reason_for_no_insurance"&&c.currentCarrierKey?b[c.currentCarrierKey]==="NoPriorInsurance"?"Reason you are not currently insured":"Reason for lapse in coverage":S.question,A=S.hint,k=Ne(b,h,p),N=an(S,c)?hr(b,c):p==="social_security_number"&&Qr(b.state??b.State)?!0:S.required,P=G[p],L=w=>{let I=Me(b,h,p,w);if(S.inputType==="radio"&&S.conditionals){const M=S.conditionals??[];for(const Y of M){const q=Ne(b,h,p),ne=yr(q,Y.conditionalType,Y.conditionalValue),J=yr(w,Y.conditionalType,Y.conditionalValue);if(ne&&!J&&Y.conditionalQuestionsAllowMultiple){const de=Y.conditionalQuestions??[];if(de.length>0){const $=fn(p);I=et(I,[...h??[],$],[]);const fe=(oe,ve)=>{oe.forEach(Ue=>{(Ue.conditionals??[]).forEach(Ae=>{if(Ae.conditionalQuestionsAllowMultiple){const me=fn(Ue.key);I=et(I,[...ve,me],[])}const Ge=Ae.conditionalQuestions??[];Ge.length>0&&fe(Ge,ve)})})};fe(de,[...h??[],$])}}}}r&&n?n(I):_(I),g(I)};if(p==="vehicle_policy_selections"){const w=b.vehicles__items??[],I=b.drivers__items??[];if(w.length===0)return u.jsx("p",{style:{color:"#666",fontStyle:"italic"},children:"Add vehicles first to configure coverage selections."},p);const M=b.driver_vehicle_assignments??{},Y=I.length>1,q=me=>Object.entries(me).map(([se,we])=>({value:se,label:we})),ne=Qr(b.state??b.State),J=(me,se)=>Object.fromEntries(me.filter(we=>we in se).map(we=>[we,se[we]])),$=q(J(ne?Iy:ky,Io)),fe=ne?J(Ny,ko):ko,oe=q(fe),Ue=q(J(ne?Oy:My,Ta)),Pe=(me,se,we)=>{const Te=et(b,["vehicles__items",me,se],we);r&&n?n(Te):_(Te),g(Te)},Ae=(me,se,we)=>{const Te={...M},Ze=`v${me}`;Te[Ze]={...Te[Ze]??{}},Te[Ze][`d${se}`]=we;const pe=et(b,["driver_vehicle_assignments"],Te);r&&n?n(pe):_(pe),g(pe)},Ge=me=>{if(!Y)return null;const se=M[`v${me}`];if(!se)return null;const we=I.map((pe,nt)=>se[`d${nt}`]??0),Te=we.filter(pe=>pe>0);if(Te.length>=2&&Te.every(pe=>pe===Te[0])&&Te[0]===50)return`Assignments for Vehicle ${me+1} cannot be 50 percent for both Drivers.`;const Ze=we.reduce((pe,nt)=>pe+nt,0);return Ze>0&&Ze!==100?`Driver percentages for this vehicle must add up to 100% (currently ${Ze}%).`:null};return u.jsx("div",{children:w.map((me,se)=>{const we=[me.year,me.make,me.model].filter(Boolean).join(" ")||`Vehicle ${se+1}`,Te=Ge(se),Ze=pe=>typeof me[pe]=="string"?me[pe]:"";return u.jsxs("fieldset",{style:{border:`1px solid ${Te?"#dc3545":"#ddd"}`,borderRadius:"8px",padding:"16px",marginBottom:"16px"},children:[u.jsx("legend",{style:{fontWeight:600,padding:"0 8px"},children:we}),u.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:"12px"},children:[u.jsx(ur,{id:`veh-${se}-comp`,label:"Comprehensive deductible",required:!0,placeholder:"Select...",options:$,value:Ze("vehicle_comp_deductible"),onChange:pe=>Pe(se,"vehicle_comp_deductible",pe.currentTarget.value)}),u.jsx(ur,{id:`veh-${se}-coll`,label:"Collision deductible",required:!0,placeholder:"Select...",options:$,value:Ze("vehicle_coll_deductible"),onChange:pe=>Pe(se,"vehicle_coll_deductible",pe.currentTarget.value)}),u.jsx(ur,{id:`veh-${se}-tow`,label:"Towing and Labor",required:!0,placeholder:"Select...",options:oe,value:Ze("vehicle_towing_and_labor"),onChange:pe=>Pe(se,"vehicle_towing_and_labor",pe.currentTarget.value)}),u.jsx(ur,{id:`veh-${se}-trans`,label:"Transportation expense",required:!0,placeholder:"Select...",options:Ue,value:Ze("vehicle_transportation_expense"),onChange:pe=>Pe(se,"vehicle_transportation_expense",pe.currentTarget.value)})]}),Y&&u.jsxs("div",{style:{marginTop:"16px"},children:[u.jsx("p",{style:{fontWeight:600,margin:"0 0 8px"},children:"Drivers usage (%)"}),u.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px"},children:I.map((pe,nt)=>{const Yo=[pe.first_name,pe.last_name].filter(Boolean).join(" ")||`Driver ${nt+1}`,tt=M[`v${se}`]?.[`d${nt}`];return u.jsx("div",{style:{flex:"0 0 140px"},children:u.jsx(ao,{id:`assignment-v${se}-d${nt}`,label:`${Yo} %`,value:tt??"",min:0,max:100,step:1,inputMode:"numeric",onChange:vr=>{const Et=vr.currentTarget.value.replace(/\D+/g,"");Ae(se,nt,Et===""?0:Math.min(100,parseInt(Et,10)))}})},`${se}-${nt}`)})}),Te&&u.jsx("p",{style:{color:"#dc3545",fontSize:"0.85rem",marginTop:"8px",marginBottom:0},children:Te})]})]},se)})},p)}if(p==="driver_vehicle_assignments"){const w=b.vehicles__items??[],I=b.drivers__items??[];if(l&&I.length<=1)return null;if(w.length===0||I.length===0)return u.jsx("p",{style:{color:"#666",fontStyle:"italic"},children:"Add vehicles and drivers first to configure driver usage percentages."},p);const M=b.driver_vehicle_assignments??{},Y=(ne,J,de)=>{const $={...M},fe=`v${ne}`;$[fe]={...$[fe]??{}},$[fe][`d${J}`]=de,L($)},q=ne=>{if(I.length<2)return null;const J=M[`v${ne}`];if(!J)return null;const de=I.map((oe,ve)=>J[`d${ve}`]??0),$=de.filter(oe=>oe>0);if($.length>=2&&$.every(oe=>oe===$[0])&&$[0]===50)return`Assignments for Vehicle ${ne+1} cannot be 50 percent for both Drivers.`;const fe=de.reduce((oe,ve)=>oe+ve,0);return fe>0&&fe!==100?`Driver percentages for this vehicle must add up to 100% (currently ${fe}%).`:null};return u.jsxs("div",{children:[u.jsx("h4",{style:{marginBottom:"12px"},children:C}),w.map((ne,J)=>{const de=[ne.year,ne.make,ne.model].filter(Boolean).join(" ")||`Vehicle ${J+1}`,$=q(J);return u.jsxs("fieldset",{style:{border:`1px solid ${$?"#dc3545":"#ddd"}`,borderRadius:"8px",padding:"16px",marginBottom:"16px"},children:[u.jsx("legend",{style:{fontWeight:600,padding:"0 8px"},children:de}),u.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px"},children:I.map((fe,oe)=>{const ve=[fe.first_name,fe.last_name].filter(Boolean).join(" ")||`Driver ${oe+1}`,Ue=M[`v${J}`]?.[`d${oe}`];return u.jsx("div",{style:{flex:"0 0 140px"},children:u.jsx(ao,{id:`assignment-v${J}-d${oe}`,label:`${ve} %`,value:Ue??"",min:0,max:100,step:1,inputMode:"numeric",onChange:Pe=>{const Ae=Pe.currentTarget.value.replace(/\D+/g,"");Y(J,oe,Ae===""?0:Math.min(100,parseInt(Ae,10)))}})},`${J}-${oe}`)})}),$&&u.jsx("p",{style:{color:"#dc3545",fontSize:"0.85rem",marginTop:"8px",marginBottom:0},children:$})]},J)})]},p)}switch(S.inputType){case"text":{if(p==="vin"&&i){const w=h?h.join("-"):"_root",I=R[w]??!1,M=te[w]??null,Y=[A?`${p}-hint`:null,P?`${p}-error`:null,M?`${p}-vin-error`:null].filter(Boolean).join(" ");return u.jsxs("div",{children:[u.jsx(ze,{id:p,label:C,hint:A,error:P,required:N,children:u.jsxs("div",{className:"flex items-end gap-2",children:[u.jsx("div",{className:"flex-1 min-w-0",children:u.jsx("input",{id:p,className:`form-input ${P?"input-error":""}`,"aria-invalid":!!P,"aria-describedby":Y||void 0,"aria-required":N||void 0,required:N,value:$e(k),maxLength:17,onChange:q=>L(q.currentTarget.value),onBlur:()=>T(p,"text",h),autoComplete:un[p],type:"text"})}),u.jsx("button",{type:"button",disabled:I||!wa($e(k)),className:"btn btn-outline shrink-0 self-end !w-auto min-w-[8.5rem] px-4 whitespace-nowrap disabled:opacity-50",onClick:()=>Se(h,$e(k)),children:I?"Looking up...":"Verify VIN"})]})}),M&&u.jsx("p",{id:`${p}-vin-error`,className:"text-sm text-red-600 mt-1",children:M})]},p)}if(p==="sms_code"){const w=$e(k);return u.jsx(so,{id:p,label:C,hint:A,value:w,inputMode:"numeric",pattern:"[0-9]*",maxLength:6,onChange:I=>{const M=I.currentTarget.value.replace(/\D+/g,"").slice(0,6);L(M)},onBlur:()=>T(p,"text",h),"aria-required":N||void 0,error:P,autoComplete:un[p]},p)}if(p==="license_number")return u.jsx(so,{id:p,label:C,hint:A,value:$e(k),onChange:w=>L(w.currentTarget.value.replace(/[^A-Z0-9]/gi,"").slice(0,20)),onBlur:()=>T(p,"text",h),"aria-required":N||void 0,error:P,autoComplete:"off",maxLength:20},p);if(p==="social_security_number"){const w=Ne(b,h,"ssn_display"),I=typeof w=="string"?w:"",M=I?`${I}. Re-enter to update.${A?` ${A}`:""}`:A;return u.jsx(cp,{id:p,label:C,hint:M,value:$e(k),onChange:Y=>L(Y.currentTarget.value),onBlur:()=>T(p,"text",h),"aria-required":N||void 0,error:P},p)}return u.jsx(so,{id:p,label:C,hint:A,value:$e(k),onChange:w=>L(w.currentTarget.value),onBlur:()=>T(p,"text",h),"aria-required":N||void 0,error:P,autoComplete:un[p],maxLength:V0[p]},p)}case"email":return u.jsx(lp,{id:p,label:C,value:$e(k),onChange:w=>L(w.currentTarget.value),onBlur:()=>T(p,"email",h),"aria-required":N||void 0,error:P},p);case"password":return u.jsx(fp,{id:p,label:C,value:$e(k),onChange:w=>L(w.currentTarget.value),onBlur:()=>T(p,"password",h),"aria-required":N||void 0,error:P},p);case"tel":return u.jsxs(u.Fragment,{children:[u.jsx(up,{id:p,label:C,value:$e(k),onChange:w=>L(w.currentTarget.value),onBlur:()=>T(p,"tel",h),"aria-required":N||void 0,error:P},p),p==="phone"&&u.jsxs("div",{className:"mt-3 text-xs text-slate-600 space-y-1",children:[u.jsx("p",{children:"We verify your number before showing your quotes — you'll get a 6-digit code next. This is just to confirm your number, not a sales call."}),u.jsx("p",{children:"Message & data rates may apply. One message per request."}),u.jsxs("p",{children:["See our"," ",u.jsx("a",{href:"https://getcredify.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})," ","and"," ",u.jsx("a",{href:"https://getcredify.com/terms-of-service",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Terms of Service"}),"."]})]})]});case"url":return u.jsx(dp,{id:p,label:C,value:$e(k),onChange:w=>L(w.currentTarget.value),onBlur:()=>T(p,"url",h),"aria-required":N||void 0,error:P},p);case"number":{const w=Z0[p];return ic.has(p)||Y0.has(p)?u.jsx(ap,{id:p,label:C,hint:A,value:uc(k),isCurrency:ic.has(p),maxDigits:w,onChange:I=>L(oc(I.currentTarget.value)),onBlur:()=>T(p,"number",h),"aria-required":N||void 0,error:P},p):u.jsx(ao,{id:p,label:C,hint:A,value:uc(k),inputMode:"numeric",pattern:"[0-9]*",onKeyDown:I=>{if(G0(I.key)){I.preventDefault();return}w!==void 0&&/^\d$/.test(I.key)&&String(I.currentTarget.value).replace(/\D/g,"").length>=w&&I.preventDefault()},onChange:I=>{let M=I.currentTarget.value;w!==void 0&&(M=M.slice(0,w)),L(oc(M))},onBlur:()=>T(p,"number",h),"aria-required":N||void 0,error:P},p)}case"textarea":return u.jsx(pp,{id:p,label:C,value:$e(k),onChange:w=>L(w.currentTarget.value),onBlur:()=>T(p,"textarea",h),"aria-required":N||void 0,error:P,rows:4},p);case"date":{const{min:w,max:I}=K0(p);return u.jsx(_p,{id:p,label:C,hint:A,value:$e(k),min:w,max:I,onChange:M=>{const Y=M.currentTarget.value;L(Y),!yt(Y,"date")&&!wo(p,Y)&&O(p,Q(h,p,Y))},onBlur:()=>T(p,"date",h),"aria-required":N||void 0,error:P,autoComplete:un[p]},p)}case"checkbox":{if(S.options){const w=Array.isArray(k)?k:[];return u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"form-label",children:[C,N&&u.jsx("span",{className:"text-red-600 ml-1",children:"*"})]}),u.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:S.options.map(I=>{const M=`${p}-${To(I)}`,Y=w.includes(I);return u.jsx(Hr,{id:M,label:I,checked:Y,onChange:q=>{const ne=new Set(w);q.currentTarget.checked?ne.add(I):ne.delete(I),L(Array.from(ne))},"aria-required":N||void 0},M)})}),P&&u.jsx("p",{className:"mt-1 text-sm text-red-600",children:P})]},p)}return u.jsx(Hr,{id:p,label:N?`${C} *`:C,checked:!!k,onChange:w=>L(w.currentTarget.checked),"aria-required":N||void 0},p)}case"radio":{if(dn(S))return null;const w=S.options??[],I=h&&h.length>0?`${p}__${h.join("__")}`:p;return u.jsx(gp,{legend:C,legendClassName:N?"legend-required":void 0,children:w.map(M=>u.jsx(hp,{name:I,value:M,checked:k===M,onChange:()=>{L(M),O(p,Q(h,p,M))},children:nc[p]?.[M]??M},`${p}-${To(M)}`))},p)}case"select":{let w=S.options??[];p==="quote_vehicle_id"&&(w=r?.vehicles__items?.map(J=>J.vin)??[]);let I=!1,M,Y,q;if(p==="year"||p==="make"||p==="model"||p==="body_style"){const J=h?h.join("-"):"_root";R[J]&&(I=!0,M="Looking up VIN...")}if(!I&&(p==="make"||p==="model"||p==="body_style")){const J=h?h.join("-"):"_root";q=J;const de=Ne(b,h,"year"),$=typeof de=="number"?de:Number(de);if(p==="make"){const fe=`${J}:makes`;if(!$||!Number.isFinite($))I=!0,M="Select a year first";else{Y={year:$};const oe=De(Y);oe&&oe.length>0?w=oe:E[fe]?(I=!0,M="Loading makes..."):w=[...u0]}}else if(p==="model"){const fe=`${J}:models`,oe=String(Ne(b,h,"make")??"");if(!oe)I=!0,M="Select a make first";else if($&&Number.isFinite($)){Y={year:$,make:oe};const ve=De(Y);ve&&ve.length>0?w=ve:E[fe]?(I=!0,M="Loading models..."):w=[...z0]}typeof k=="string"&&k&&!w.includes(k)&&(w=[k,...w])}else{const fe=`${J}:bodyStyles`,oe=String(Ne(b,h,"make")??""),ve=String(Ne(b,h,"model")??"");if(!ve)I=!0,M="Select a model first";else if($&&Number.isFinite($)&&oe){Y={year:$,make:oe,model:ve};const Ue=De(Y);Ue&&Ue.length>0?w=Ue:E[fe]?(I=!0,M="Loading body styles..."):w=[...j0]}typeof k=="string"&&k&&!w.includes(k)&&(w=[k,...w])}}if(p==="occupation"||p==="co_applicant_occupation"){const J=p==="co_applicant_occupation"?"co_applicant_employment_industry":void 0,de=J?void 0:Ne(b,h,"industry"),$=Ne(b,h,J??"employment_industry"),oe=String(nn(de??$)??"").trim();w=[...Da[oe]??W0],typeof k=="string"&&k&&!w.includes(k)&&(w=[k,...w])}const ne=Q0(h,p);return u.jsx(ur,{id:ne,label:M?`${C} — ${M}`:C,"aria-required":N||void 0,error:P,disabled:I,value:eb(k),onChange:J=>{const de=J.currentTarget.value;if(p!=="year"&&p!=="make"&&p!=="model"&&p!=="industry"&&p!=="employment_industry"&&p!=="co_applicant_employment_industry"){L(de),O(p,Q(h,p,de));return}let $=Me(b,h,p,de);if(p==="year")$=Me($,h,"make",""),$=Me($,h,"model",""),$=Me($,h,"body_style","");else if(p==="make")$=Me($,h,"model",""),$=Me($,h,"body_style","");else if(p==="model")$=Me($,h,"body_style","");else if(p==="industry"||p==="employment_industry")$=Me($,h,"occupation","");else if(p==="co_applicant_employment_industry"){const oe=String(nn(de)??"").trim(),ve=Da[oe]??[],Ue=ve.find(Pe=>Pe===oe)??ve[0]??"";$=Me($,h,"co_applicant_occupation",Ue??"")}r&&n?n($):_($),g($);const fe=h?br($,h)??{}:$;O(p,{...fe,[p]:de})},placeholder:M??"Select an option",onFocus:Y&&q?()=>Re(q,Y):void 0,options:w.map(J=>({value:J,label:nc[p]?.[J]??H0[J]??J}))},ne)}case"address":return u.jsx(Sp,{id:p,label:C,value:$e(k),onChange:(w,I)=>{let M=Me(b,h,p,w);const Y=I?.state??(typeof w=="string"?w.match(/,\s*([A-Z]{2})\s+\d{5}\b/)?.[1]:void 0);if(Y){const q=h?[...h,"state"]:["state"];M=et(M,q,Y)}r&&n?n(M):_(M),g(M)},onBlur:()=>T(p,"address",h),required:N,"aria-required":N||void 0,error:P},p);default:return null}}function X(S,h){const p=S.some(A=>String(A.key)==="years_at_address"),C=S.find(A=>String(A.key)==="months_at_address");return S.map((A,k)=>{const N=String(A.key);if(N==="months_at_address"&&p||!sn(A,b,c)||!Bo(A,b,h)||!on(A,b,s))return null;if(Ro(N,A,b,s)){const q=c.currentCarrierKey?b[c.currentCarrierKey]:void 0;if(!(q&&q!=="NoPriorInsurance"&&Xt(b,c)&&$o.has(N)))return null}const P=V(A,h),L=N==="years_at_address"&&C?V(C,h):null,w=A.conditionals??[];if(!w.length)return s==="BundlePolicy"&&N==="policy_bi"?u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-semibold mt-6 mb-3",children:"Vehicle Coverage Information"}),P]},`wrap-${N}-${k}`):u.jsxs("div",{children:[P,L]},`wrap-${N}-${k}`);const I=sc(A,Ne(b,h,N)),M=w.filter(q=>yr(I,q.conditionalType,q.conditionalValue)),Y=M.length>1&&!M.some(q=>q.conditionalQuestionsAllowMultiple)?M.slice(0,1):M;return u.jsxs("div",{children:[P,L,Y.map((q,ne)=>{const J=q.conditionalQuestions??[];if(!J.length)return null;if(!q.conditionalQuestionsAllowMultiple)return u.jsx("div",{className:"mt-3",children:X(J,h)},`branch-${N}-${ne}`);const de=fn(N),$=br(b,[...h??[],de])??[],fe=Math.max(1,$.length||1),oe=()=>{const Pe=et(b,[...h??[],de,$.length],{});r&&n?n(Pe):_(Pe),g(Pe)},ve=()=>{const Pe=$.slice(0,Math.max(0,$.length-1)),Ae=et(b,[...h??[],de],Pe);r&&n?n(Ae):_(Ae),g(Ae)},Ue=`${N}__c${ne}`;return u.jsxs("div",{className:"mt-3",children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsx("div",{className:"text-sm font-medium opacity-75",children:"Add one or more entries"}),u.jsxs("div",{className:"space-x-2",children:[u.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:oe,children:"Add another"}),fe>1&&u.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:ve,children:"Remove last"})]})]}),Array.from({length:fe}).map((Pe,Ae)=>{const Ge=[...h??[],de,Ae],me=`${Ue}__i${Ae}`,se=$[Ae]??{},we=N==="drivers",pe=we?`Driver #${Ae+1}`:N==="vehicles"?`Vehicle #${Ae+1}`:N==="home_losses"||N==="losses"?`Loss #${Ae+1}`:`Entry #${Ae+1}`,Yo=we&&typeof se.ssn_display=="string"&&se.ssn_display?` — ${se.ssn_display}`:"";return u.jsxs("div",{className:"rounded-lg border p-3 mb-3",children:[u.jsxs("div",{className:"text-sm font-semibold mb-2",children:[pe,Yo]}),J.map(tt=>{const vr=String(tt.key);if(!sn(tt,b,c)||!Bo(tt,b,Ge)||!on(tt,b,s))return null;if(Ro(vr,tt,b,s)){const Et=c.currentCarrierKey?b[c.currentCarrierKey]:void 0;if(!(Et&&Et!=="NoPriorInsurance"&&Xt(b,c)&&$o.has(vr)))return null}return u.jsxs("div",{className:"mt-3",children:[V(tt,Ge),(()=>{const Et=tt.conditionals??[];if(!Et.length)return null;const Uc=Ne(b,Ge,tt.key),yn=Et.filter(Bt=>yr(Uc,Bt.conditionalType,Bt.conditionalValue));return(yn.length>1&&!yn.some(Bt=>Bt.conditionalQuestionsAllowMultiple)?yn.slice(0,1):yn).map((Bt,Vo)=>{const Ko=Bt.conditionalQuestions??[];if(!Ko.length)return null;if(!Bt.conditionalQuestionsAllowMultiple)return u.jsx("div",{className:"mt-3",children:X(Ko,Ge)},`nested-${me}-${Vo}`);const bn=fn(tt.key),vn=br(b,[...Ge,bn])??[],Hc=Math.max(1,vn.length||1),Kb=()=>{const ir=et(b,[...Ge,bn,vn.length],{});r&&n?n(ir):_(ir),g(ir)},qb=()=>{const ir=vn.slice(0,Math.max(0,vn.length-1)),Rt=et(b,[...Ge,bn],ir);r&&n?n(Rt):_(Rt),g(Rt)};return u.jsxs("div",{className:"mt-3",children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsx("div",{className:"text-sm font-medium opacity-75",children:"Add one or more entries"}),u.jsxs("div",{className:"space-x-2",children:[u.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:Kb,children:"Add another"}),Hc>1&&u.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:qb,children:"Remove last"})]})]}),Array.from({length:Hc}).map((ir,Rt)=>{const Jb=[...Ge,bn,Rt];return u.jsxs("div",{className:"rounded-lg border p-3 mb-3",children:[u.jsxs("div",{className:"text-sm font-semibold mb-2",children:["Entry #",Rt+1]}),X(Ko,Jb)]},`nested-item-${me}-${Vo}-${Rt}`)})]},`nested-repeat-${me}-${Vo}`)})})()]},`${me}-${vr}`)})]},`group-${me}`)})]},`branch-${N}-${ne}`)})]},`wrap-${N}-${k}`)})}const F=y.useMemo(()=>{const S=[],h=(p,C)=>{p.forEach(A=>{if(!sn(A,b,c)||!Bo(A,b,C)||!on(A,b,s))return;const k=String(A.key);if(Ro(k,A,b,s)){const I=c.currentCarrierKey?b[c.currentCarrierKey]:void 0;if(!(I&&I!=="NoPriorInsurance"&&Xt(b,c)&&$o.has(k)))return}dn(A)||S.push(A);const N=A.conditionals??[];if(!N.length)return;const P=sc(A,Ne(b,C,k)),L=N.filter(I=>yr(P,I.conditionalType,I.conditionalValue));(L.length>1&&!L.some(I=>I.conditionalQuestionsAllowMultiple)?L.slice(0,1):L).forEach(I=>{const M=I.conditionalQuestions??[];M.length&&(I.conditionalQuestionsAllowMultiple||h(M,C))})})};return h(a),S},[a,b,c,s]);function H(S){S.preventDefault();const h=hr(b,c),p=F.map(A=>an(A,c)?{...A,required:h}:A),C=rn(p,b);if(x(C),Object.keys(C).length>0){const A=F.findIndex(k=>C[k.key]);A>=0&&document.getElementById(F[A].key)?.focus();return}o(b)}return u.jsx("form",{className:"space-y-6 px-1",onSubmit:H,noValidate:!0,children:X(a)})}const rb="https://getcredify.com/privacy-policy";function nb(){return u.jsx("a",{href:rb,target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})}function dc(){return u.jsxs(u.Fragment,{children:["See our ",u.jsx(nb,{})," for how we use your information."]})}const ob=new Set(["Product","Name","Home","HomeConstruction","HomeFeatures","Vehicle","Driver","Demographics","Customer","HomeCustomer","BundleCustomer"]),ib=new Set(["AutoCurrentCarrier","HomeCurrentCarrier","HomePolicy","BundlePolicy","AutoPolicy"]);function sb({stageKey:e}){return e?e==="Zip"?u.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:"No credit card required."}):e==="Email"?u.jsxs("div",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left space-y-1",children:[u.jsx("p",{children:"We'll send your quotes and updates here, and save your progress so you can return anytime."}),u.jsx("p",{children:u.jsx(dc,{})})]}):ib.has(e)?u.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:"Tell us about your current coverage. Carriers ask about your coverage history to put together accurate quotes — it's a standard step on any application. Coverage gaps are common, so just enter things as they are. You're almost there: your quotes are almost ready."}):e==="Ssn"?u.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:"Your SSN is required by some carriers for fraud prevention, underwriting and to generate a quote. It's entered directly into our secure, encrypted form."}):e==="SMSVerification"?u.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:"You'll receive a text from Credify shortly."}):ob.has(e)?u.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:u.jsx(dc,{})}):null:null}const or={};function ab(e){let t=or[e];return t||(t=new Set,or[e]=t),t}function cb(e,t){ab(e).add(t)}function lb(e,t){or[e]?.delete(t)}function Ft(e,...t){const r=or[e];if(!r||r.size===0)return;const n=t[0],o={quoteId:Ba(),timestamp:Date.now()};for(const i of[...r])try{i(n,o)}catch(s){xr(s,{tags:{source:"widget-event-listener",event:e}})}}function ub(){for(const e of Object.keys(or))delete or[e]}function db(){Ft("widgetOpened")}function fc(){Ft("widgetClosed")}function fb(e){Ft("stageViewed",e)}function pc(e){Ft("stageCompleted",e)}function pb(){Ft("flowCompleted")}function _b(e){Ft("ratesViewed",e)}function mb(){Ft("ratesBack")}const _c=new Set(["Disabled","Retired","Unemployed","Other"]);function hb(e,t){const r=String(e.key??"");if(r==="co_applicant_occupation"||r!=="occupation")return!0;const n=t.industry,o=t.employment_industry,i=String(n??o??"").trim();return!_c.has(i)}function gb(e,t){const r=String(e.key??"");if(r==="co_applicant_occupation"||r!=="occupation")return!0;const n=t.industry,o=t.employment_industry,i=String(n??o??"").trim();return!_c.has(i)}function mc(e){return e.inputType!=="radio"||!e.options||e.options.length!==1||e.options[0]!=="Yes"?!1:(e.conditionals??[]).some(r=>r.conditionalQuestionsAllowMultiple&&r.conditionalType==="equals"&&r.conditionalValue==="Yes")}function hc(e,t){return mc(e)?"Yes":t}function gc(e){return typeof e=="number"&&Number.isFinite(e)?e:typeof e=="string"&&e.trim()!==""&&!Number.isNaN(Number(e))?Number(e):null}function yc(e){if(e instanceof Date&&!Number.isNaN(e.getTime()))return e.getTime();if(typeof e=="string"){const t=Date.parse(e);return Number.isNaN(t)?null:t}return null}function bc(e,t){const r=gc(e),n=gc(t);if(r!=null&&n!=null)return r-n;const o=yc(e),i=yc(t);return o!=null&&i!=null?o-i:e==null||t==null?null:String(e).localeCompare(String(t))}function yb(e,t){return Array.isArray(e)?e.some(r=>r===t):typeof e=="string"?t!=null&&e.includes(String(t)):!1}function vc(e,t,r){switch(t){case"equals":return e===r;case"notEquals":return e!==r&&e!==""&&e!=null;case"lessThan":{const n=bc(e,r);return n!=null&&n<0}case"greaterThan":{const n=bc(e,r);return n!=null&&n>0}case"contains":return yb(e,r);case"startsWith":return e!=null&&r!=null&&String(e).startsWith(String(r));case"endsWith":return e!=null&&r!=null&&String(e).endsWith(String(r));default:return!1}}const bb=new Set(["auto_prior_years","auto_prior_months","auto_continuous_coverage_years"]);function Uo(e,t,r){const n=uo([...e]),o=Oo(n),i=[],s=a=>{a.forEach(c=>{if(!sn(c,t,o)||!hb(c,t)||!on(c,t,r))return;const l=String(c.key);if(Sa(l,r,t)){const g=o.currentCarrierKey?t[o.currentCarrierKey]:void 0;if(!(g&&g!=="NoPriorInsurance"&&Xt(t,o)&&bb.has(l)))return}mc(c)||i.push(c);const d=hc(c,t[l]),f=c.conditionals??[];if(!f.length)return;const _=f.filter(g=>vc(d,g.conditionalType,g.conditionalValue));(_.length>1&&!_.some(g=>g.conditionalQuestionsAllowMultiple)?_.slice(0,1):_).forEach(g=>{const b=g.conditionalQuestions??[];b.length&&(g.conditionalQuestionsAllowMultiple||s(b))})})};return s(n),i}const Sc="__items",Ho=e=>`${e}${Sc}`;function vb(e,t){if(e.key==="relationship_to_insured"||e.key==="is_registered_owner"){const r=t[t.length-1];return typeof r=="number"&&r===0}return!1}function zo(e,t,r=[],n=void 0,o=t){for(const i of e){const s=String(i.key),a=hc(i,t[s]),c=i.conditionals??[];if(!c.length)continue;const l=c.filter(f=>vc(a,f.conditionalType,f.conditionalValue)),d=l.length>1&&!l.some(f=>f.conditionalQuestionsAllowMultiple)?l.slice(0,1):l;for(const f of d){const _=f.conditionalQuestions??[];if(!_.length)continue;if(!f.conditionalQuestionsAllowMultiple){if(zo(_,t,r,n,o))return!0;continue}const m=t[Ho(s)]??[];if(m.length===0)return!0;for(const[g,b]of m.entries()){const G=[...r,Ho(s),g],x=Uo(_,b,n).filter(z=>!(vb(z,G)||!gb(z,b))),B={state:o.state,...b},D=rn(x,B);if(Object.values(D).some(Boolean)||zo(_,b,G,n,o))return!0}}}return!1}function Ec(e,t,r){return zo(e,t,[],r,t)}function Cc(e){const t=e.vehicles__items??[];if(!Array.isArray(t)||t.length===0)return!1;for(const r of t)if(yt(r.vehicle_comp_deductible,"select")||yt(r.vehicle_coll_deductible,"select")||yt(r.vehicle_towing_and_labor,"select")||yt(r.vehicle_transportation_expense,"select"))return!0;return!1}function Sb({stages:e,onStageComplete:t,onComplete:r,initialValues:n,initialActive:o,quoteId:i,nonTerminalStageKeys:s}){const[a,c]=y.useState(o??0),[l,d]=y.useState(n??{}),[f,_]=y.useState({}),[m,g]=y.useState(!1),[b,G]=y.useState(!1),[x,B]=y.useState(null),D=y.useRef([]),z=y.useRef(e),E=Array.isArray(e)&&e.length>0,j=E?Math.min(a,e.length-1):0,K=E?e[j]:null,R=K?.key??null;y.useEffect(()=>{o!==void 0&&c(o)},[o]),z.current=e;const ee=y.useMemo(()=>{const T=j>=e.length-1;return T&&R&&s?.has(R)?!1:!!(T||e.slice(j+1).every(X=>X.key==="AutoPolicy")&&(l.drivers__items??[]).length<=1)},[j,e,l,R,s]);y.useEffect(()=>{E&&a>=e.length&&c(e.length-1)},[a,e.length,E]),y.useEffect(()=>{const T=D.current[j];T&&T.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[j]),y.useEffect(()=>{n!==void 0&&d(n)},[n]),y.useEffect(()=>{if(!K||!R){g(!1),B(null);return}if(f[R]){g(!1),B(null);return}let T=!1;return g(!0),B(null),Promise.resolve(K.loadQuestions()).then(V=>{if(!T){if(!Array.isArray(V))throw new Error(`loadQuestions("${R}") did not return an array`);_(X=>({...X,[R]:V}))}}).catch(V=>{T||B(`Failed to load stage "${K?.title??""}": ${V?.message??"Unknown error"}`)}).finally(()=>{T||g(!1)}),()=>{T=!0}},[K,R,f]);const te=R?f[R]:void 0,ce=y.useMemo(()=>Oo(uo(te??[])),[te]);y.useEffect(()=>{K&&R&&te&&fb({stageKey:R,stageTitle:K.title??R,stepIndex:a+1,totalSteps:e.length})},[R,a,e.length,K,te]);const Se=y.useMemo(()=>{if(!te)return{};const T={};(F=>{const H=[],S=h=>{h.forEach((p,C)=>{const A=mr(p,C);H.push(A);const k=Ho(A);H.push(k),(p.conditionals??[]).forEach(P=>{const L=P.conditionalQuestions??[];L.length>0&&S(L)})})};return S(F),H})(te).forEach(F=>{F in l&&(T[F]=l[F])});for(const F of["state","State","address","product"])F in l&&(T[F]=l[F]);for(const[F,H]of Object.entries(l))F.endsWith(Sc)&&!(F in T)&&(T[F]=H);return T},[te,l]),De=T=>{d(V=>({...V,...T}))},Re=()=>{c(T=>T>0?T-1:0),document.querySelector(".panel-body")?.scrollTo({top:0,behavior:"instant"})},Q=async()=>{if(!te||!K||m||x||b)return;const T=Uo(te,Se,R??void 0),V=hr(l,ce),X=T.map(P=>an(P,ce)?{...P,required:V}:P),F=rn(X,Se),H=new Set(X.map((P,L)=>mr(P,L))),S=Object.entries(F).some(([P,L])=>L&&H.has(P)),h=Ec(te,l,R??void 0),C=T.some(P=>String(P.key??"")==="vehicle_policy_selections")?Cc(l):!1,A=l.driver_vehicle_assignments,k=l.drivers__items??[];let N=!1;if(A&&k.length>=2){const P=l.vehicles__items??[];for(let L=0;L<P.length;L++){const w=A[`v${L}`];if(!w)continue;const I=k.map((q,ne)=>w[`d${ne}`]??0),M=I.filter(q=>q>0);if(M.length>=2&&M.every(q=>q===50)){N=!0;break}const Y=I.reduce((q,ne)=>q+ne,0);if(Y>0&&Y!==100){N=!0;break}}}if(!(S||h||C||N)){G(!0);try{const P=ee,L=P?await r(l,R??""):await t(Se,R??""),{success:w,error:I}=L;if(!w){B(I??"An error occurred");return}if(!P){const M=L.latestStages??z.current,Y=M.findIndex(ne=>ne.key===R),q=Y>=0?Math.min(Y+1,M.length-1):Math.min(a+1,M.length-1);c(q)}}finally{G(!1)}}},O=y.useMemo(()=>{if(!te||m||x||b)return!0;const T=Uo(te,Se,R??void 0),V=hr(l,ce),X=T.map(P=>an(P,ce)?{...P,required:V}:P),F=rn(X,Se),H=new Set(X.map((P,L)=>mr(P,L))),S=Object.entries(F).some(([P,L])=>L&&H.has(P)),h=Ec(te,l,R??void 0),C=T.some(P=>String(P.key??"")==="vehicle_policy_selections")?Cc(l):!1,A=l.driver_vehicle_assignments,k=l.drivers__items??[];let N=!1;if(A&&k.length>=2){const P=l.vehicles__items??[];for(let L=0;L<P.length;L++){const w=A[`v${L}`];if(!w)continue;const I=k.map((q,ne)=>w[`d${ne}`]??0),M=I.filter(q=>q>0);if(M.length>=2&&M.every(q=>q===50)){N=!0;break}const Y=I.reduce((q,ne)=>q+ne,0);if(Y>0&&Y!==100){N=!0;break}}}return S||h||C||N},[te,Se,l,m,x,b,ce,R]);return E?u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"form-wizard-steps-header flex items-center justify-between gap-4",children:[u.jsx("ol",{className:"form-wizard-steps flex gap-2 text-xs overflow-x-auto flex-1 pb-1 scrollbar-hide items-center",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:e.flatMap((T,V)=>[u.jsx("li",{ref:X=>{D.current[V]=X},className:`form-wizard-step-pill px-2.5 py-1 rounded-full border whitespace-nowrap flex-shrink-0 ${V<j?"bg-blue-600 text-white border-blue-600":V===j?"border-blue-600 text-blue-600 bg-white":"border-slate-200 text-slate-600"}`,children:T.title},T.key??`stage-${V}`),...V<e.length-1?[u.jsx("li",{className:"form-wizard-step-arrow text-slate-400 flex-shrink-0",children:"→"},`arrow-${T.key??V}`)]:[]])}),u.jsxs("div",{className:"form-wizard-step-counter text-sm text-slate-500 flex-shrink-0",children:[j+1," / ",e.length]})]}),u.jsxs("div",{children:[m&&u.jsx("div",{className:"text-slate-500",children:"Loading…"}),K&&u.jsx(tb,{questions:te??[],controlledValues:Se,onChangeValues:De,onSubmit:()=>Q(),quoteId:i,widgetStageKey:R??void 0},K.key)]}),!m&&x&&u.jsxs("div",{className:"text-red-600 text-sm -mt-4",children:[u.jsx("div",{children:x}),K&&u.jsx("button",{type:"button",className:"credify-retry-btn underline mt-1 font-bold",onClick:()=>{_(T=>{if(!R)return T;const V={...T};return delete V[R],V})},children:"Retry"})]}),u.jsx(sb,{stageKey:R}),u.jsxs("div",{className:j>0?"grid grid-cols-2 gap-3":"",children:[j>0&&u.jsx("button",{type:"button",onClick:Re,disabled:m,className:"credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition",children:"Back"}),u.jsxs("button",{type:"button","data-widget-ctrl":"next",onClick:Q,disabled:O,className:["form-wizard-next-btn",j>0?"":"w-full","h-12 rounded-full text-white transition","disabled:opacity-50 disabled:cursor-not-allowed","flex items-center justify-center gap-2",O?"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"].join(" "),children:[b&&u.jsxs("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:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",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"})]}),ee?"Finish":"Next"]})]})]}):u.jsx("div",{className:"text-slate-600",children:"Loading..."})}const Ac={SafecoPersonal:{name:"Safeco",abbr:"SFC",color:"#0F337A"},SafecoPersoanl:{name:"Safeco",abbr:"SFC",color:"#0F337A"},AssuranceAmerica:{name:"Assurance America",abbr:"AA",color:"#2768B5"},CommonWealthCasualty:{name:"Commonwealth Casualty",abbr:"CW",color:"#2D69EC"},Alinsco:{name:"Alinsco",abbr:"AL",color:"#20395D"},ACORDBOLTPersonalAuto:{name:"Bolt Auto",abbr:"BLT",color:"#1F2937"},ACORDBOLTPersonalHome:{name:"Bolt Home",abbr:"BLT",color:"#1F2937"},TwentyFirstCentury:{name:"21st Century",abbr:"21C",color:"#B2392A"},ACentral:{name:"A-Central",abbr:"ACT",color:"#EAAD1D"},AAA:{name:"AAA",abbr:"AAA",color:"#DB461C"},AARP:{name:"AARP",abbr:"ARP",color:"#DB4724"},Acadia:{name:"Acadia",abbr:"ACD",color:"#386B61"},Ace:{name:"ACE",abbr:"ACE",color:"#457D48"},Acuity:{name:"Acuity",abbr:"ACU",color:"#D74630"},AdirondackInsExchange:{name:"Adirondack",abbr:"ADK",color:"#1F5490"},Aegis:{name:"Aegis",abbr:"AEG",color:"#1A4675"},AIC:{name:"AIC",abbr:"AIC",color:"#508F47"},AIG:{name:"AIG",abbr:"AIG",color:"#223572"},AlfaAlliance:{name:"Alfa Alliance",abbr:"ALF",color:"#C13D17"},AllianzOfAmerica:{name:"Allianz",abbr:"ALZ",color:"#003781"},AllianzOfAmericaJefferson:{name:"Allianz Jefferson",abbr:"ALZ",color:"#003781"},Allied:{name:"Allied",abbr:"ALD",color:"#0047BB"},Allmerica:{name:"Allmerica",abbr:"ALM",color:"#003DA5"},Allstate:{name:"Allstate",abbr:"ALS",color:"#002F87"},AmericaFirst:{name:"America First",abbr:"AMF",color:"#003DA5"},AmericanCommerce:{name:"American Commerce",abbr:"ACM",color:"#003DA5"},AmericanFamily:{name:"American Family",abbr:"AMF",color:"#0033A0"},Amica:{name:"Amica",abbr:"AMI",color:"#003DA5"},Ameriprise:{name:"Ameriprise",abbr:"AMP",color:"#003DA5"},ASILloyds:{name:"ASI Lloyds",abbr:"ASI",color:"#003DA5"},Assurant:{name:"Assurant",abbr:"ASR",color:"#0033A0"},AtlasGeneralAgency:{name:"Atlas General",abbr:"ATL",color:"#1F3864"},AustinMutual:{name:"Austin Mutual",abbr:"AUS",color:"#1F3864"},Autoone:{name:"AutoOne",abbr:"AON",color:"#003DA5"},AutoOwners:{name:"Auto-Owners",abbr:"AO",color:"#C8102E"},BadgerMutual:{name:"Badger Mutual",abbr:"BDG",color:"#003DA5"},Balboa:{name:"Balboa",abbr:"BAL",color:"#1F3864"},Bamboo:{name:"Bamboo",abbr:"BMB",color:"#0F4C3A"},Bankers:{name:"Bankers",abbr:"BNK",color:"#1F3864"},BeaconNational:{name:"Beacon National",abbr:"BCN",color:"#003DA5"},BrethernMutual:{name:"Brethren Mutual",abbr:"BRT",color:"#1F3864"},BristolWest:{name:"Bristol West",abbr:"BW",color:"#003DA5"},BunkerHill:{name:"Bunker Hill",abbr:"BHL",color:"#1F3864"},CapitalInsuranceGroup:{name:"Capital Insurance",abbr:"CIG",color:"#003DA5"},Celina:{name:"Celina",abbr:"CEL",color:"#1F3864"},CentralMutualOfOH:{name:"Central Mutual",abbr:"CMO",color:"#003DA5"},Chubb:{name:"Chubb",abbr:"CHB",color:"#000000"},ChubbInsurance:{name:"Chubb",abbr:"CHB",color:"#000000"},Cincinnati:{name:"Cincinnati",abbr:"CIN",color:"#003DA5"},Citizens:{name:"Citizens",abbr:"CTZ",color:"#003DA5"},Clearcover:{name:"Clearcover",abbr:"CC",color:"#00B5E2"},CNA:{name:"CNA",abbr:"CNA",color:"#CC3232"},ColonialPenn:{name:"Colonial Penn",abbr:"CPN",color:"#0072CE"},ColoradoCasualty:{name:"Colorado Casualty",abbr:"COC",color:"#1F3864"},Columbia:{name:"Columbia",abbr:"CLM",color:"#003DA5"},CommerceWest:{name:"Commerce West",abbr:"CMW",color:"#003DA5"},CommonwealthCasualty:{name:"Commonwealth Casualty",abbr:"CW",color:"#1F3864"},ConstitutionalCasualty:{name:"Constitutional Casualty",abbr:"CON",color:"#1F3864"},Cornerstone:{name:"Cornerstone",abbr:"CRN",color:"#1F3864"},Countrywide:{name:"Countrywide",abbr:"CTW",color:"#003DA5"},CSE:{name:"CSE",abbr:"CSE",color:"#003DA5"},Cumberland:{name:"Cumberland",abbr:"CMB",color:"#1F3864"},Cypress:{name:"Cypress",abbr:"CYP",color:"#0F4C3A"},Dairyland:{name:"Dairyland",abbr:"DL",color:"#0072CE"},Deerbrook:{name:"Deerbrook",abbr:"DBK",color:"#1F3864"},Direct:{name:"Direct",abbr:"DIR",color:"#D52B1E"},Donegal:{name:"Donegal",abbr:"DON",color:"#003DA5"},Drive:{name:"Drive",abbr:"DRV",color:"#1F3864"},Electric:{name:"Electric",abbr:"ELC",color:"#003DA5"},EMC:{name:"EMC",abbr:"EMC",color:"#003DA5"},Encompass:{name:"Encompass",abbr:"ENC",color:"#002F87"},Erie:{name:"Erie",abbr:"ERI",color:"#005FAC"},Esurance:{name:"Esurance",abbr:"ESU",color:"#00A6CE"},ExcelsiorInsuranceCompany:{name:"Excelsior",abbr:"EXC",color:"#1F3864"},Explorer:{name:"Explorer",abbr:"EXP",color:"#1F3864"},FairPlan:{name:"FAIR Plan",abbr:"FPN",color:"#1F3864"},FarmBureau:{name:"Farm Bureau",abbr:"FB",color:"#00843D"},Farmers:{name:"Farmers",abbr:"FRM",color:"#1C428B"},Fidelity:{name:"Fidelity",abbr:"FID",color:"#00833F"},FiremansFund:{name:"Fireman's Fund",abbr:"FF",color:"#E31837"},FirstAmerican:{name:"First American",abbr:"FAM",color:"#003DA5"},Foremost:{name:"Foremost",abbr:"FOR",color:"#E31837"},ForemostInsuranceCompany:{name:"Foremost",abbr:"FOR",color:"#E31837"},Geico:{name:"GEICO",abbr:"GEI",color:"#0F4293"},GeneralCasualty:{name:"General Casualty",abbr:"GC",color:"#1F3864"},GermantownMutual:{name:"Germantown Mutual",abbr:"GTM",color:"#1F3864"},GMAC:{name:"GMAC",abbr:"GMA",color:"#003DA5"},Grange:{name:"Grange",abbr:"GRG",color:"#003DA5"},GreatAmerican:{name:"Great American",abbr:"GA",color:"#003DA5"},Grinnell:{name:"Grinnell Mutual",abbr:"GRN",color:"#E31837"},GuideOne:{name:"GuideOne",abbr:"GO",color:"#0072CE"},Hanover:{name:"Hanover",abbr:"HAN",color:"#003DA5"},Harbor:{name:"Harbor",abbr:"HBR",color:"#1F3864"},Harleysville:{name:"Harleysville",abbr:"HRL",color:"#003DA5"},Hartford:{name:"The Hartford",abbr:"HFD",color:"#7F1734"},HartfordOMNI:{name:"Hartford OMNI",abbr:"HOM",color:"#7F1734"},HastingsMutual:{name:"Hastings Mutual",abbr:"HST",color:"#1F3864"},HawkeyeSecurity:{name:"Hawkeye Security",abbr:"HWK",color:"#1F3864"},HDI:{name:"HDI",abbr:"HDI",color:"#00563F"},HippoInsuranceCompany:{name:"Hippo",abbr:"HPO",color:"#00C9A7"},HomeownersOfAmerica:{name:"Homeowners of America",abbr:"HOA",color:"#003DA5"},Homesite:{name:"Homesite",abbr:"HMS",color:"#0033A0"},HoraceMann:{name:"Horace Mann",abbr:"HM",color:"#003DA5"},HoustonGeneral:{name:"Houston General",abbr:"HG",color:"#1F3864"},IFA:{name:"IFA",abbr:"IFA",color:"#003DA5"},ImperialCasualty:{name:"Imperial Casualty",abbr:"IMP",color:"#1F3864"},Indiana:{name:"Indiana Insurance",abbr:"IND",color:"#003DA5"},IndianaFarmers:{name:"Indiana Farmers",abbr:"IFM",color:"#00843D"},Infinity:{name:"Infinity",abbr:"INF",color:"#E31837"},Insurequest:{name:"Insurequest",abbr:"INQ",color:"#1F3864"},Integon:{name:"Integon",abbr:"ITG",color:"#003DA5"},Integrity:{name:"Integrity",abbr:"ITY",color:"#1F3864"},Kemper:{name:"Kemper",abbr:"KMP",color:"#0033A0"},LibertyMutual:{name:"Liberty Mutual",abbr:"LM",color:"#FFD000"},LibertyNorthwest:{name:"Liberty Northwest",abbr:"LNW",color:"#FFD000"},Lloyds:{name:"Lloyd's",abbr:"LLY",color:"#003DA5"},MainStreetAmerica:{name:"Main Street America",abbr:"MSA",color:"#003DA5"},Mapfre:{name:"MAPFRE",abbr:"MAP",color:"#E31837"},MarkelInsuranceCompany:{name:"Markel",abbr:"MKL",color:"#003DA5"},Mendota:{name:"Mendota",abbr:"MND",color:"#1F3864"},MerchantsGroup:{name:"Merchants Group",abbr:"MRC",color:"#003DA5"},Mercury:{name:"Mercury",abbr:"MER",color:"#ED1C24"},Metlife:{name:"MetLife",abbr:"MET",color:"#0090DA"},Metropolitan:{name:"Metropolitan",abbr:"MTP",color:"#0090DA"},MidContinent:{name:"Mid-Continent",abbr:"MC",color:"#003DA5"},MidwesternIndemnity:{name:"Midwestern Indemnity",abbr:"MWI",color:"#003DA5"},Montgomery:{name:"Montgomery",abbr:"MTG",color:"#1F3864"},MSA:{name:"MSA",abbr:"MSA",color:"#003DA5"},MtWashington:{name:"Mt. Washington",abbr:"MTW",color:"#1F3864"},MutualBenefit:{name:"Mutual Benefit",abbr:"MB",color:"#1F3864"},NatGenPremier:{name:"NatGen Premier",abbr:"NGP",color:"#0033A0"},NationalGeneral:{name:"National General",abbr:"NG",color:"#0033A0"},Nationwide:{name:"Nationwide",abbr:"NW",color:"#204D9B"},NationwideScottsdale:{name:"Nationwide Scottsdale",abbr:"NWS",color:"#204D9B"},NewYorkCentralMutual:{name:"NY Central Mutual",abbr:"NYC",color:"#003DA5"},NJManufacturers:{name:"NJM Insurance",abbr:"NJM",color:"#003DA5"},NJSkylands:{name:"NJ Skylands",abbr:"NJS",color:"#003DA5"},Northstar:{name:"Northstar",abbr:"NST",color:"#1F3864"},Occidental:{name:"Occidental",abbr:"OCC",color:"#1F3864"},OhioCasualty:{name:"Ohio Casualty",abbr:"OHC",color:"#003DA5"},OmahaPC:{name:"Omaha P&C",abbr:"OMA",color:"#003DA5"},OneBeacon:{name:"OneBeacon",abbr:"OB",color:"#003DA5"},OregonMutual:{name:"Oregon Mutual",abbr:"ORE",color:"#003DA5"},Palisades:{name:"Palisades",abbr:"PAL",color:"#1F3864"},PeerlessMontgomery:{name:"Peerless Montgomery",abbr:"PRM",color:"#1F3864"},Pekin:{name:"Pekin",abbr:"PEK",color:"#003DA5"},Pemco:{name:"PEMCO",abbr:"PMC",color:"#0072CE"},PennNational:{name:"Penn National",abbr:"PN",color:"#003DA5"},PlymouthRock:{name:"Plymouth Rock",abbr:"PLR",color:"#003DA5"},PreferredMutual:{name:"Preferred Mutual",abbr:"PFM",color:"#003DA5"},Proformance:{name:"Proformance",abbr:"PRF",color:"#1F3864"},Progressive:{name:"Progressive",abbr:"PRG",color:"#0053BA"},Prudential:{name:"Prudential",abbr:"PRU",color:"#0033A0"},PureHighValue:{name:"PURE",abbr:"PUR",color:"#003DA5"},Republic:{name:"Republic",abbr:"REP",color:"#003DA5"},RockfordMutual:{name:"Rockford Mutual",abbr:"RKF",color:"#1F3864"},RoyalAndSunAlliance:{name:"Royal & SunAlliance",abbr:"RSA",color:"#003DA5"},Safeco:{name:"Safeco",abbr:"SFC",color:"#E4002B"},SECURA:{name:"SECURA",abbr:"SEC",color:"#003DA5"},Selective:{name:"Selective",abbr:"SEL",color:"#003DA5"},SouthernCounty:{name:"Southern County",abbr:"SCM",color:"#1F3864"},SouthernMutual:{name:"Southern Mutual",abbr:"SM",color:"#1F3864"},SouthernTrust:{name:"Southern Trust",abbr:"ST",color:"#1F3864"},StPaulTravelers:{name:"St. Paul Travelers",abbr:"SPT",color:"#C8102E"},StandardMutual:{name:"Standard Mutual",abbr:"STM",color:"#1F3864"},StarCasualty:{name:"Star Casualty",abbr:"SC",color:"#1F3864"},StateAuto:{name:"State Auto",abbr:"SA",color:"#003DA5"},StateFarm:{name:"State Farm",abbr:"SF",color:"#CC0717"},StateFarmFloridaInsuranceCompany:{name:"State Farm Florida",abbr:"SFF",color:"#CC0717"},SunshineStateInsuranceCompany:{name:"Sunshine State",abbr:"SSS",color:"#FFC72C"},Travelers:{name:"Travelers",abbr:"TRV",color:"#C8102E"},Tower:{name:"Tower",abbr:"TWR",color:"#1F3864"},TWFG:{name:"TWFG",abbr:"TWF",color:"#003DA5"},Unigard:{name:"Unigard",abbr:"UNG",color:"#1F3864"},UnitedFireAndCasualty:{name:"United Fire & Casualty",abbr:"UFC",color:"#003DA5"},Unitrin:{name:"Unitrin",abbr:"UTN",color:"#003DA5"},Universal:{name:"Universal",abbr:"UNV",color:"#003DA5"},USAA:{name:"USAA",abbr:"USA",color:"#1A3258"},UticaNational:{name:"Utica National",abbr:"UTC",color:"#003DA5"},Victoria:{name:"Victoria",abbr:"VIC",color:"#1F3864"},Wellington:{name:"Wellington",abbr:"WLG",color:"#1F3864"},WestBend:{name:"West Bend",abbr:"WB",color:"#003DA5"},WesternNational:{name:"Western National",abbr:"WN",color:"#003DA5"},WesternReserveGroup:{name:"Western Reserve",abbr:"WR",color:"#003DA5"},Westfield:{name:"Westfield",abbr:"WF",color:"#F05136"},WhiteMountains:{name:"White Mountains",abbr:"WM",color:"#1F3864"},WilsonMutual:{name:"Wilson Mutual",abbr:"WLM",color:"#1F3864"},Windsor:{name:"Windsor",abbr:"WIN",color:"#1F3864"},Zurich:{name:"Zurich",abbr:"ZUR",color:"#003399"}},wc=["#0369A1","#1D4ED8","#0F766E","#7C3AED","#B45309","#DC2626","#0891B2","#9333EA"];function Eb(e){return e.replace(/[^A-Za-z0-9]/g,"").slice(0,3).toUpperCase()||"CAR"}function Tc(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/_/g," ").trim()}function pn(e){if(!e)return e;const t=Ac[e];return t?t.name:Tc(e)}function Cb(e){const t=new Set,r=[];return e.forEach((n,o)=>{const s=Ac[n]??{name:Tc(n),abbr:Eb(n),color:wc[o%wc.length]};t.has(s.name)||(t.add(s.name),r.push(s))}),r}function Ab(e,t){if(!e)return[];const r=[];return(t==="Auto"||t==="Bundle")&&Array.isArray(e.PersonalAuto)&&r.push(...e.PersonalAuto),(t==="Home"||t==="Bundle")&&Array.isArray(e.PersonalHome)&&r.push(...e.PersonalHome),Cb(r)}const wb="https://getcredify.com/privacy-policy";function Tb({acknowledged:e,onChange:t,disabled:r=!1}){return u.jsx("div",{className:"privacy-notice-ack rounded-xl border border-slate-200 bg-slate-50 p-4","data-testid":"privacy-notice-acknowledgment",children:u.jsx(Hr,{id:"privacy-notice-ack-checkbox",className:"privacy-notice-ack-checkbox",checked:e,onChange:n=>t(n.target.checked),disabled:r,label:u.jsxs(u.Fragment,{children:["I acknowledge I have received Credify’s"," ",u.jsx("a",{href:wb,target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Notice"}),"."]})})})}function Ib({carrierName:e,formattedPremium:t,lobLabel:r,acknowledged:n,onAcknowledgeChange:o,onCancel:i,onProceed:s,isProcessing:a,hasError:c}){const l=!n||a;return u.jsxs("div",{className:"bind-confirmation","data-testid":"bind-confirmation",role:"group","aria-label":"Confirm your bind request",children:[u.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Confirm your bind request"}),u.jsxs("div",{className:"mt-4 rounded-xl border border-slate-200 bg-white p-4",children:[r&&u.jsx("div",{className:"mb-1 text-xs font-semibold uppercase tracking-wide text-slate-500",children:r}),u.jsx("p",{className:"font-semibold text-slate-900",children:e}),u.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:[t,u.jsx("span",{className:"ml-1 text-sm font-medium text-slate-500",children:"/month"})]})]}),u.jsx("div",{className:"mt-4",children:u.jsx(Tb,{acknowledged:n,onChange:o,disabled:a})}),c&&u.jsx("p",{className:"mt-3 text-sm text-red-600",role:"alert",children:"Something went wrong while processing your bind request. Please try again."}),u.jsxs("div",{className:"mt-6 grid grid-cols-2 gap-3",children:[u.jsx("button",{type:"button","data-testid":"bind-confirmation-cancel",onClick:i,disabled:a,className:"credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition disabled:opacity-50 disabled:cursor-not-allowed",children:"Cancel"}),u.jsxs("button",{type:"button","data-testid":"bind-confirmation-proceed",onClick:s,disabled:l,className:["h-12 rounded-full text-white font-bold transition","flex items-center justify-center gap-2","disabled:cursor-not-allowed",l?"bg-slate-400":"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"].join(" "),children:[a&&u.jsxs("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:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",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"})]}),a?"Processing…":"Proceed"]})]})]})}const Ic=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"});function kc(e){const t=Number.isFinite(e.term_months)&&e.term_months>0?e.term_months:1;return e.monthly_premium_cents!=null?e.monthly_premium_cents:Math.round((e.premium_cents||0)/t)}const jo={PersonalHome:"Homeowners",PersonalAuto:"Personal Auto",Flood:"Flood",ExcessFlood:"Excess Flood",_other:"Other"},Nc=["PersonalHome","PersonalAuto","Flood","ExcessFlood"];function Oc({onBack:e}){const t=()=>{mb(),e?.()};return u.jsx("button",{type:"button",onClick:t,className:"credify-btn-back credify-btn-back-rates h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition w-full",children:"Back"})}function kb({rate:e,status:t,onRequestBind:r,disabled:n,showLobLabel:o=!0,className:i}){const s=kc(e)/100,a=Ic.format(s),c=t==="loading",l=t==="success",d=!!n||c||l,f=!!(e.effective_date&&e.policy_end_date),_=e.lob?jo[e.lob]||e.lob:null;return u.jsxs("div",{className:`flex w-full flex-col rounded-xl border border-slate-200 bg-white p-6 shadow-sm transition hover:shadow-md${i?` ${i}`:""}`,children:[o&&_&&u.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-slate-500",children:_}),u.jsxs("div",{className:"mb-4 flex flex-col items-start gap-2",children:[e.carrier_logo_base64?u.jsx("img",{src:`data:image/png;base64,${e.carrier_logo_base64}`,alt:pn(e.carrier_name),className:"h-12 w-auto max-w-full object-contain"}):u.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-md bg-slate-100 text-sm font-semibold text-slate-500",children:pn(e.carrier_name).charAt(0).toUpperCase()}),u.jsx("h4",{className:"w-full break-words text-left font-semibold text-slate-900",children:pn(e.carrier_name)})]}),u.jsx("div",{className:"mb-2",children:u.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:[a,u.jsx("span",{className:"ml-1 text-sm font-medium text-slate-500",children:"/month"})]})}),f&&u.jsx("div",{className:"mb-2",children:u.jsxs("p",{className:"text-xs text-slate-500",children:["Effective ",e.effective_date," - ",e.policy_end_date]})}),e.carrier_quote_id&&u.jsx("div",{className:"mb-4",children:u.jsxs("p",{className:"text-xs text-slate-400",children:["Quote ID: ",e.carrier_quote_id]})}),u.jsxs("div",{className:"mt-auto pt-4",children:[u.jsx("button",{type:"button",onClick:r,disabled:d,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 disabled:cursor-not-allowed ${l?"rates-bind-btn-requested":"hover:bg-blue-600/90 disabled:bg-slate-300 disabled:text-slate-500"}`,children:c?"Requesting…":l?"Requested":"Request Bind"}),t==="error"&&u.jsx("p",{className:"mt-2 text-xs text-red-600",children:"Something went wrong. Please try again."}),t==="success"&&u.jsx("p",{className:"mt-2 text-xs text-emerald-600",children:"We received your bind request."})]})]})}function Nb({rates:e,onBack:t,isBundleFlow:r=!1}){const n=Array.isArray(e)?e:[],o=n.length>0,[i,s]=y.useState({}),[a,c]=y.useState("admitted"),[l,d]=y.useState(!1),[f,_]=y.useState(null),[m,g]=y.useState(!1),b=y.useMemo(()=>n.some(O=>O.lob==="PersonalAuto"),[n]),G=y.useMemo(()=>n.some(O=>O.lob==="PersonalHome"),[n]),x=y.useMemo(()=>{if(!r)return[];const O=[];return b&&O.push("PersonalAuto"),G&&O.push("PersonalHome"),O},[r,b,G]),B=y.useMemo(()=>{const O=new Set;for(const T of n){const V=T.lob??null;V&&i[T.quote_rate_id]==="success"&&O.add(V)}return O},[n,i]),D=y.useMemo(()=>Object.values(i).some(O=>O==="success"),[i]),z=y.useMemo(()=>l?!0:!r||x.length===0?D:x.every(O=>B.has(O)),[l,r,D,x,B]),E=y.useMemo(()=>o?n.filter(O=>(O.admitted_status??"admitted")==="admitted"):[],[n,o]),j=y.useMemo(()=>o?n.filter(O=>O.admitted_status==="non_admitted"):[],[n,o]),K=E.length,R=j.length,ee=K+R>0;y.useEffect(()=>{ee&&a==="admitted"&&K===0&&R>0&&c("non_admitted")},[a,K,R,ee]);const te=y.useMemo(()=>ee?a==="admitted"?E:j:[],[ee,a,E,j]);y.useEffect(()=>{xo()},[]),y.useEffect(()=>{!z||l||(p0(),Xa(),d(!0))},[z,l]);const ce=y.useMemo(()=>{if(te.length===0)return[];if(!te.some(X=>X.lob))return[{lob:null,title:"Rates",rates:[...te].sort((F,H)=>{const S=Number.isFinite(F.term_months)&&F.term_months>0?F.term_months:1,h=Number.isFinite(H.term_months)&&H.term_months>0?H.term_months:1,p=F.monthly_premium_cents??Math.round((F.premium_cents||0)/S),C=H.monthly_premium_cents??Math.round((H.premium_cents||0)/h);return p-C})}];const T=new Map;for(const X of te){const F=X.lob||"_other",H=T.get(F);H?H.push(X):T.set(F,[X])}return[...T.entries()].sort(([X],[F])=>{const H=Nc.indexOf(X),S=Nc.indexOf(F);return(H===-1?999:H)-(S===-1?999:S)}).map(([X,F])=>({lob:X,title:jo[X]??X,rates:[...F].sort((H,S)=>{const h=Number.isFinite(H.term_months)&&H.term_months>0?H.term_months:1,p=Number.isFinite(S.term_months)&&S.term_months>0?S.term_months:1,C=H.monthly_premium_cents??Math.round((H.premium_cents||0)/h),A=S.monthly_premium_cents??Math.round((S.premium_cents||0)/p);return C-A})}))},[te]),Se=y.useMemo(()=>{if(!r)return[];const O=n.some(X=>X.lob==="PersonalAuto"),T=n.some(X=>X.lob==="PersonalHome"),V=[];return O||V.push("Sorry, no rates found for Personal Auto."),T||V.push("Sorry, no rates found for Homeowners."),V},[r,n]);if(!ee)return u.jsxs("section",{className:"mt-8",children:[u.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Rates"}),u.jsx("p",{className:"mt-2 text-sm text-slate-500",children:"Sorry, no rates are available at this time."}),t&&u.jsx(Oc,{onBack:t})]});const De=O=>{s(T=>({...T,[O.quote_rate_id]:"idle"})),g(!1),_({cardKey:O.quote_rate_id,rate:O})},Re=()=>{_(null),g(!1)},Q=async()=>{if(!f||!m)return;const O=f.cardKey;s(T=>({...T,[O]:"loading"}));try{if(xo(),!rr())throw new Error("Authentication required. Please verify your phone number first.");if(!((await U0(O,!0))?.success!==!1))throw new Error("Request failed");s(F=>({...F,[O]:"success"})),_(null),g(!1)}catch{s(T=>({...T,[O]:"error"}))}};if(f){const O=f.rate.lob?jo[f.rate.lob]||f.rate.lob:null;return u.jsx("section",{className:"mt-8",children:u.jsx(Ib,{carrierName:pn(f.rate.carrier_name),formattedPremium:Ic.format(kc(f.rate)/100),lobLabel:O,acknowledged:m,onAcknowledgeChange:g,onCancel:Re,onProceed:Q,isProcessing:i[f.cardKey]==="loading",hasError:i[f.cardKey]==="error"})})}return u.jsxs("section",{className:"mt-8",children:[u.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Rates"}),Se.length>0&&u.jsx("div",{className:"mt-3 space-y-1",children:Se.map(O=>u.jsx("p",{className:"text-sm text-slate-600",children:O},O))}),u.jsx("div",{className:"mt-4 border-b border-slate-200",children:u.jsxs("div",{className:"flex items-center gap-6",children:[u.jsxs("button",{type:"button",onClick:()=>c("admitted"),className:`border-b-2 px-1 py-2 text-sm font-semibold transition ${a==="admitted"?"border-cyan-500 text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Admitted (",K,")"]}),u.jsxs("button",{type:"button",onClick:()=>c("non_admitted"),className:`border-b-2 px-1 py-2 text-sm font-semibold transition ${a==="non_admitted"?"border-cyan-500 text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Non-admitted (",R,")"]})]})}),te.length===0&&u.jsx("p",{className:"mt-4 text-sm text-slate-500",children:a==="admitted"?"Sorry, no admitted rates are available at this time.":"Sorry, no non-admitted rates are available at this time."}),te.length>0&&ce.map(O=>u.jsxs("div",{className:"mt-6",children:[u.jsx("h4",{className:"mb-3 text-base font-semibold text-slate-800",children:O.title}),u.jsx("div",{className:"grid gap-4 sm:grid-cols-2",children:O.rates.map(T=>u.jsx("div",{className:"mx-auto w-full min-w-0 max-w-md",children:u.jsx(kb,{rate:T,showLobLabel:O.lob==null,status:i[T.quote_rate_id]??"idle",disabled:z||(r?!!(T.lob&&x.includes(T.lob)&&B.has(T.lob)):D),onRequestBind:()=>De(T)})},T.quote_rate_id))})]},O.lob??"all")),t&&u.jsx(Oc,{onBack:t})]})}const Wo=["Validating your details...","Checking underwriting rules...","Applying eligible discounts...","Reviewing your risk profile...","Calculating premium...","Check complete"],Mc={Auto:{label:"Auto Policy",icon:"🚗",accent:"#0369A1"},Home:{label:"Home Policy",icon:"🏠",accent:"#059669"},Bundle:{label:"Home + Auto Bundle",icon:"🔗",accent:"#7C3AED"}},Dc={Auto:6e4,Home:9e4,Bundle:12e4};function Ob({progress:e,color:t,size:r=80}){const n=(r-10)/2,o=2*Math.PI*n,i=o-e/100*o;return u.jsxs("svg",{width:r,height:r,style:{transform:"rotate(-90deg)"},children:[u.jsx("circle",{cx:r/2,cy:r/2,r:n,fill:"none",stroke:"#F1F5F9",strokeWidth:6}),u.jsx("circle",{cx:r/2,cy:r/2,r:n,fill:"none",stroke:t,strokeWidth:6,strokeLinecap:"round",strokeDasharray:o,strokeDashoffset:i,style:{transition:"stroke-dashoffset 0.2s linear"}})]})}function Mb({providers:e=[],totalTime:t=6e4,flow:r="Auto",isComplete:n=!1,onComplete:o}){const i=Mc[r]??Mc.Auto,s=Dc[r]??Dc.Auto,a=e.length>0?Math.floor(s/e.length):t,[c,l]=y.useState(0),[d,f]=y.useState(0),[_,m]=y.useState(0),[g,b]=y.useState(0),[G,x]=y.useState(!0),B=y.useRef(n),D=y.useRef(o),z=y.useRef(c),E=y.useRef(e.length),j=y.useRef(!1),K=y.useRef(!1);y.useEffect(()=>{B.current=n,n&&e.length===0&&!j.current&&(j.current=!0,D.current?.())},[n,e.length]),y.useEffect(()=>{D.current=o},[o]),y.useEffect(()=>{z.current=c},[c]),y.useEffect(()=>{E.current=e.length,e.length>0&&(K.current=!1,l(0),f(0),m(0),b(0),x(!0))},[e.length]),y.useEffect(()=>{if(e.length===0){B.current&&!j.current&&(j.current=!0,D.current?.());return}K.current=!1;const ce=100,Se=100/(a/ce),De=setInterval(()=>{m(Re=>{if(K.current||j.current)return Re;const Q=Re+Se;return Q<100?Q:(K.current=!0,setTimeout(()=>{if(B.current){if(j.current)return;j.current=!0,D.current?.();return}const T=z.current===E.current-1;x(!1),setTimeout(()=>{T?(l(0),f(V=>V+1)):l(V=>V+1),m(0),b(0),x(!0)},300)},400),100)})},ce);return()=>clearInterval(De)},[c,a,e.length]),y.useEffect(()=>{if(e.length===0)return;const ce=Math.floor(a/Wo.length),Se=setInterval(()=>b(De=>Math.min(De+1,Wo.length-1)),ce);return()=>clearInterval(Se)},[c,a,e.length]);const R=e.length===0,ee=R?null:e[Math.min(c,e.length-1)],te=d>0;return u.jsxs(u.Fragment,{children:[u.jsx("style",{children:`
41
64
  @keyframes providerPulse {
42
65
  0%, 100% { transform: scale(1); }
43
66
  50% { transform: scale(1.05); }
@@ -72,5 +95,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
72
95
  .iq-status-text {
73
96
  animation: statusFadeIn 0.25s ease forwards;
74
97
  }
75
- `}),c.jsx("div",{style:{background:"#F8FAFC",display:"flex",alignItems:"center",justifyContent:"center",padding:"2rem",fontFamily:"'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",height:"100%",minHeight:400,overflowY:"auto"},children:c.jsxs("div",{style:{width:"100%",maxWidth:560},children:[c.jsxs("div",{style:{textAlign:"center",marginBottom:40},children:[c.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:8,background:i.accent+"12",border:`1px solid ${i.accent}30`,borderRadius:100,padding:"6px 16px",marginBottom:16},children:[c.jsx("span",{style:{fontSize:14},children:i.icon}),c.jsx("span",{style:{fontSize:12,fontWeight:700,color:i.accent,letterSpacing:"0.1em",textTransform:"uppercase"},children:i.label})]}),c.jsx("h1",{style:{fontSize:26,fontWeight:700,color:"#0F172A",margin:0,letterSpacing:"-0.02em",lineHeight:1.3},children:z?"Connecting to top carriers":"Fetching your best rates"}),c.jsx("p",{style:{fontSize:14,color:"#64748B",marginTop:8,marginBottom:0},children:z?"Identifying the carriers eligible for your quote...":Q?"Still gathering — a few carriers are taking a little longer...":"We're reaching out to multiple insurers on your behalf"})]}),c.jsx("div",{style:{display:"flex",justifyContent:"center",marginBottom:32},children:z?c.jsx("div",{style:{display:"flex",gap:20},children:[0,1,2,3,4].map(ne=>c.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:6},children:[c.jsx("div",{style:{width:48,height:48,borderRadius:14,background:"#E2E8F0",animation:"skeletonPulse 1.4s ease-in-out infinite",animationDelay:`${ne*.12}s`}}),c.jsx("div",{style:{width:40,height:8,borderRadius:4,background:"#E2E8F0",animation:"skeletonPulse 1.4s ease-in-out infinite",animationDelay:`${ne*.12}s`}})]},`skeleton-${ne}`))}):Y?c.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:8},children:[c.jsxs("div",{style:{width:64,height:64,borderRadius:18,background:Y.color+"18",border:`2px solid ${Y.color}`,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700,fontSize:16,color:Y.color,position:"relative",animation:"providerPulse 1.8s ease-in-out infinite"},children:[Y.abbr,c.jsx("div",{style:{position:"absolute",inset:-5,borderRadius:22,border:`2px solid ${Y.color}`,pointerEvents:"none",animation:"ringPulse 1.6s ease-in-out infinite"}})]}),c.jsx("span",{style:{fontSize:13,fontWeight:600,color:Y.color,letterSpacing:"0.04em"},children:Y.name})]}):null}),c.jsxs("div",{className:`iq-card-fade ${q?"iq-card-visible":"iq-card-hidden"}`,style:{background:"#FFFFFF",borderRadius:24,border:"1px solid #E2E8F0",padding:32},children:[c.jsx("div",{style:{display:"flex",alignItems:"center",gap:20,marginBottom:28},children:z||!Y?c.jsxs("div",{style:{flex:1,textAlign:"center",padding:"8px 0"},children:[c.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.1em",textTransform:"uppercase",margin:"0 0 6px"},children:"Please wait"}),c.jsx("h2",{style:{fontSize:18,fontWeight:700,color:"#0F172A",margin:"0 0 6px",letterSpacing:"-0.02em"},children:"Checking eligible providers"}),c.jsx("p",{style:{fontSize:13,color:"#64748B",margin:0},children:"Reviewing your details against our carrier network"})]}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{style:{position:"relative",flexShrink:0},children:[c.jsx(Xd,{progress:v,color:Y.color,size:80}),c.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:c.jsxs("span",{style:{fontSize:14,fontWeight:700,color:Y.color},children:[Math.round(v),"%"]})})]}),c.jsxs("div",{style:{flex:1},children:[c.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.1em",textTransform:"uppercase",margin:"0 0 4px"},children:Q?"Still checking":"Now checking"}),c.jsx("h2",{style:{fontSize:20,fontWeight:700,color:"#0F172A",margin:"0 0 6px",letterSpacing:"-0.02em"},children:Y.name}),c.jsx("p",{className:"iq-status-text",style:{fontSize:13,color:"#64748B",margin:0},children:xr[C]},`${l}-${C}`)]})]})}),c.jsxs("div",{children:[c.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.08em",textTransform:"uppercase",margin:"0 0 8px"},children:z?"Initializing":"Gathering quotes"}),c.jsx("div",{style:{height:6,background:"#F1F5F9",borderRadius:100,overflow:"hidden"},children:c.jsx("div",{style:{height:"100%",width:"35%",background:i.accent,borderRadius:100,animation:"shimmerSlide 1.4s ease-in-out infinite"}})})]})]})]})})]})}function t_({onGoBack:e}){return c.jsxs("section",{className:"mt-4",children:[c.jsxs("div",{className:"rounded-xl border border-red-200 bg-red-50 p-5",children:[c.jsx("h3",{className:"text-base font-semibold text-red-700",children:"Sorry, quote submission failed"}),c.jsx("p",{className:"mt-2 text-sm text-red-700",children:"We ran into an issue submitting your quote. Our team will investigate and get back to you soon."})]}),c.jsx("div",{className:"mt-5",children:c.jsx("button",{type:"button",onClick:e,className:"h-12 w-full rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition",children:"Go back"})})]})}function U(e){if(e===!0)return"Yes";if(e===!1)return"No"}function Me(e){if(e)try{const t=typeof e=="string"?new Date(e):e;return isNaN(t.getTime())?void 0:t.toISOString().split("T")[0]}catch{return}}function r_(e){const t=e,r={};t.phone&&(r.phone=t.phone),t.first_name&&(r.first_name=t.first_name),t.last_name&&(r.last_name=t.last_name),t.email&&(r.email=t.email),t.date_of_birth&&(r.date_of_birth=Me(t.date_of_birth)),t.product&&(r.product=t.product),t.state&&(r.state=t.state),t.postal_code&&(r.postal_code=t.postal_code);const n=[];t.line_1&&n.push(t.line_1),t.line_2&&n.push(t.line_2),t.city&&n.push(t.city),t.state&&n.push(t.state),t.postal_code&&n.push(t.postal_code),n.length>0&&(r.address=n.join(", ")),typeof t.ssn_display=="string"&&(r.ssn_display=t.ssn_display),t.years_at_address!==null&&t.years_at_address!==void 0&&(r.years_at_address=t.years_at_address),t.months_at_address!==null&&t.months_at_address!==void 0&&(r.months_at_address=t.months_at_address),t.move_in_date&&(r.move_in_date=Me(t.move_in_date));const o=[];t.prior_line_1&&o.push(t.prior_line_1),t.prior_line_2&&o.push(t.prior_line_2),t.prior_city&&o.push(t.prior_city),t.prior_state&&o.push(t.prior_state),t.prior_postal_code&&o.push(t.prior_postal_code),o.length>0&&(r.prior_address=o.join(", ")),t.years_at_prior_address!==null&&t.years_at_prior_address!==void 0&&(r.years_at_prior_address=t.years_at_prior_address),t.is_mailing_address_different!==null&&t.is_mailing_address_different!==void 0&&(r.is_mailing_address_different=U(t.is_mailing_address_different)),t.mailing_address&&(r.mailing_address=t.mailing_address),t.effective_date&&(r.effective_date=Me(t.effective_date)),t.auto_has_prior_insurance!==null&&t.auto_has_prior_insurance!==void 0&&(r.auto_has_prior_insurance=U(t.auto_has_prior_insurance)),t.auto_prior_expiration_date&&(r.auto_prior_expiration_date=Me(t.auto_prior_expiration_date)),t.auto_prior_carrier_name&&(r.auto_prior_carrier_name=t.auto_prior_carrier_name),t.auto_prior_liability_limit&&(r.auto_prior_liability_limit=t.auto_prior_liability_limit),t.auto_reason_for_no_insurance&&(r.auto_reason_for_no_insurance=t.auto_reason_for_no_insurance),t.auto_prior_years!==null&&t.auto_prior_years!==void 0&&(r.auto_prior_years=t.auto_prior_years),t.auto_prior_months!==null&&t.auto_prior_months!==void 0&&(r.auto_prior_months=t.auto_prior_months),t.auto_continuous_coverage_years!==null&&t.auto_continuous_coverage_years!==void 0&&(r.auto_continuous_coverage_years=t.auto_continuous_coverage_years),t.auto_cancelled_declined_refused_to_renew!==null&&t.auto_cancelled_declined_refused_to_renew!==void 0&&(r.auto_cancelled_declined_refused_to_renew=U(t.auto_cancelled_declined_refused_to_renew)),t.auto_current_annual_premium_cents!==null&&t.auto_current_annual_premium_cents!==void 0&&(r.auto_current_annual_premium_cents=t.auto_current_annual_premium_cents),t.policy_bi&&(r.policy_bi=t.policy_bi),t.policy_um&&(r.policy_um=t.policy_um),t.policy_pd&&(r.policy_pd=t.policy_pd),t.policy_mp&&(r.policy_mp=t.policy_mp),t.policy_umpd&&(r.policy_umpd=t.policy_umpd),t.policy_pip&&(r.policy_pip=t.policy_pip),t.policy_auto_death_indemnity&&(r.policy_auto_death_indemnity=t.policy_auto_death_indemnity),t.driver_vehicle_assignments&&(r.driver_vehicle_assignments=t.driver_vehicle_assignments),t.home_has_prior_insurance!==null&&t.home_has_prior_insurance!==void 0&&(r.home_has_prior_insurance=U(t.home_has_prior_insurance)),t.home_prior_expiration_date&&(r.home_prior_expiration_date=Me(t.home_prior_expiration_date)),t.home_prior_carrier_name&&(r.home_prior_carrier_name=t.home_prior_carrier_name),t.home_prior_years!==null&&t.home_prior_years!==void 0&&(r.home_prior_years=t.home_prior_years),t.home_continuous_coverage_years!==null&&t.home_continuous_coverage_years!==void 0&&(r.home_continuous_coverage_years=t.home_continuous_coverage_years),t.property_insurance_cancelled!==null&&t.property_insurance_cancelled!==void 0&&(r.property_insurance_cancelled=U(t.property_insurance_cancelled)),t.lapse_in_coverage!==null&&t.lapse_in_coverage!==void 0&&(r.lapse_in_coverage=U(t.lapse_in_coverage)),t.year_built!==null&&t.year_built!==void 0&&(r.year_built=t.year_built),t.number_of_units!==null&&t.number_of_units!==void 0&&(r.number_of_units=t.number_of_units),t.number_of_stories!==null&&t.number_of_stories!==void 0&&(r.number_of_stories=t.number_of_stories),t.number_of_beds!==null&&t.number_of_beds!==void 0&&(r.number_of_beds=t.number_of_beds),t.number_of_full_baths!==null&&t.number_of_full_baths!==void 0&&(r.number_of_full_baths=t.number_of_full_baths),t.number_of_partial_baths!==null&&t.number_of_partial_baths!==void 0&&(r.number_of_partial_baths=t.number_of_partial_baths),t.under_construction!==null&&t.under_construction!==void 0&&(r.under_construction=U(t.under_construction)),t.distance_from_fire_hydrant_ft&&(r.distance_from_fire_hydrant_ft=t.distance_from_fire_hydrant_ft),t.distance_from_fire_station_miles&&(r.distance_from_fire_station_miles=t.distance_from_fire_station_miles),t.architectural_style&&(r.architectural_style=t.architectural_style),t.dwelling_type&&(r.dwelling_type=t.dwelling_type),t.construction_quality&&(r.construction_quality=t.construction_quality),t.located_over_water!==null&&t.located_over_water!==void 0&&(r.located_over_water=t.located_over_water),t.construction_type&&(r.construction_type=t.construction_type),t.exterior_wall_type&&(r.exterior_wall_type=t.exterior_wall_type),t.foundation_type&&(r.foundation_type=t.foundation_type),t.roof_material_type&&(r.roof_material_type=t.roof_material_type),t.roof_shape&&(r.roof_shape=t.roof_shape),t.roof_updated_type&&(r.roof_updated_type=t.roof_updated_type),t.year_roof_updated!==null&&t.year_roof_updated!==void 0&&(r.year_roof_updated=t.year_roof_updated),t.mit_credit_form!==null&&t.mit_credit_form!==void 0&&(r.mit_credit_form=U(t.mit_credit_form)),t.storm_shutters!==null&&t.storm_shutters!==void 0&&(r.storm_shutters=U(t.storm_shutters)),t.heating_type&&(r.heating_type=t.heating_type),t.oil_tank_location&&(r.oil_tank_location=t.oil_tank_location),t.heating_fuel_type&&(r.heating_fuel_type=t.heating_fuel_type),t.number_of_fireplaces!==null&&t.number_of_fireplaces!==void 0&&(r.number_of_fireplaces=t.number_of_fireplaces),t.basement_type&&(r.basement_type=t.basement_type),t.parking_type&&(r.parking_type=t.parking_type),t.number_of_parking_spaces!==null&&t.number_of_parking_spaces!==void 0&&(r.number_of_parking_spaces=t.number_of_parking_spaces),t.plumbing_type&&(r.plumbing_type=t.plumbing_type),t.pool_type&&(r.pool_type=t.pool_type),t.total_area_sq_ft!==null&&t.total_area_sq_ft!==void 0&&(r.total_area_sq_ft=t.total_area_sq_ft),t.parcel_area_sq_ft!==null&&t.parcel_area_sq_ft!==void 0&&(r.parcel_area_sq_ft=t.parcel_area_sq_ft),t.residence_type&&(r.residence_type=t.residence_type),t.usage_type&&(r.usage_type=t.usage_type),t.household_size!==null&&t.household_size!==void 0&&(r.household_size=t.household_size),t.number_of_mortgagees!==null&&t.number_of_mortgagees!==void 0&&(r.number_of_mortgagees=t.number_of_mortgagees),t.has_dog!==null&&t.has_dog!==void 0&&(r.has_dog=U(t.has_dog)),t.dog_breed_type&&(r.dog_breed_type=t.dog_breed_type),t.number_of_dogs!==null&&t.number_of_dogs!==void 0&&(r.number_of_dogs=t.number_of_dogs),t.has_vicious_animals!==null&&t.has_vicious_animals!==void 0&&(r.has_vicious_animals=U(t.has_vicious_animals)),t.has_business_on_premises!==null&&t.has_business_on_premises!==void 0&&(r.has_business_on_premises=U(t.has_business_on_premises)),t.business_class&&(r.business_class=t.business_class),t.occupancy_type&&(r.occupancy_type=t.occupancy_type),t.short_term_rental!==null&&t.short_term_rental!==void 0&&(r.short_term_rental=U(t.short_term_rental)),t.sale_price_cents!==null&&t.sale_price_cents!==void 0&&(r.sale_price_cents=Math.round(Number(t.sale_price_cents)/100)),t.number_of_families!==null&&t.number_of_families!==void 0&&(r.number_of_families=t.number_of_families),t.number_of_units_in_firewall!==null&&t.number_of_units_in_firewall!==void 0&&(r.number_of_units_in_firewall=t.number_of_units_in_firewall),t.heating_update_yn!==null&&t.heating_update_yn!==void 0&&(r.heating_update_yn=U(t.heating_update_yn)),t.heating_update_type&&(r.heating_update_type=t.heating_update_type),t.heating_update_year!==null&&t.heating_update_year!==void 0&&(r.heating_update_year=t.heating_update_year),t.plumbing_update_yn!==null&&t.plumbing_update_yn!==void 0&&(r.plumbing_update_yn=U(t.plumbing_update_yn)),t.plumbing_update_type&&(r.plumbing_update_type=t.plumbing_update_type),t.plumbing_update_year!==null&&t.plumbing_update_year!==void 0&&(r.plumbing_update_year=t.plumbing_update_year),t.electrical_update_yn!==null&&t.electrical_update_yn!==void 0&&(r.electrical_update_yn=U(t.electrical_update_yn)),t.electrical_update_type&&(r.electrical_update_type=t.electrical_update_type),t.electrical_update_year!==null&&t.electrical_update_year!==void 0&&(r.electrical_update_year=t.electrical_update_year),t.electric_circuit_breaker!==null&&t.electric_circuit_breaker!==void 0&&(r.electric_circuit_breaker=U(t.electric_circuit_breaker)),t.dwelling_replacement_cost!==null&&t.dwelling_replacement_cost!==void 0&&(r.dwelling_replacement_cost=t.dwelling_replacement_cost),t.other_structures_coverage!==null&&t.other_structures_coverage!==void 0&&(r.other_structures_coverage=t.other_structures_coverage),t.personal_property_coverage!==null&&t.personal_property_coverage!==void 0&&(r.personal_property_coverage=t.personal_property_coverage),t.loss_of_use_coverage!==null&&t.loss_of_use_coverage!==void 0&&(r.loss_of_use_coverage=t.loss_of_use_coverage),t.personal_liability&&(r.personal_liability=t.personal_liability),t.dwelling_medical_payments&&(r.dwelling_medical_payments=t.dwelling_medical_payments),t.all_perils_deductible&&(r.all_perils_deductible=t.all_perils_deductible),t.windstorm_deductible&&(r.windstorm_deductible=t.windstorm_deductible),t.has_garage!==null&&t.has_garage!==void 0&&(r.has_garage=U(t.has_garage)),t.has_pool!==null&&t.has_pool!==void 0&&(r.has_pool=U(t.has_pool)),t.has_trampoline!==null&&t.has_trampoline!==void 0&&(r.has_trampoline=U(t.has_trampoline)),t.gender&&(r.gender=t.gender),t.marital_status&&(r.marital_status=t.marital_status),t.employment_industry&&(r.employment_industry=t.employment_industry),t.occupation&&(r.occupation=t.occupation),t.has_co_applicant!==null&&t.has_co_applicant!==void 0&&(r.has_co_applicant=U(t.has_co_applicant)),t.co_applicant_first_name&&(r.co_applicant_first_name=t.co_applicant_first_name),t.co_applicant_middle_name&&(r.co_applicant_middle_name=t.co_applicant_middle_name),t.co_applicant_last_name&&(r.co_applicant_last_name=t.co_applicant_last_name),t.co_applicant_gender&&(r.co_applicant_gender=t.co_applicant_gender),t.co_applicant_marital_status&&(r.co_applicant_marital_status=t.co_applicant_marital_status),t.co_applicant_relationship&&(r.co_applicant_relationship=t.co_applicant_relationship),t.co_applicant_date_of_birth&&(r.co_applicant_date_of_birth=Me(t.co_applicant_date_of_birth)),t.co_applicant_employment_industry&&(r.co_applicant_employment_industry=t.co_applicant_employment_industry),t.co_applicant_occupation&&(r.co_applicant_occupation=t.co_applicant_occupation),t.retiree_discount!==null&&t.retiree_discount!==void 0&&(r.retiree_discount=U(t.retiree_discount)),t.gated_community_discount!==null&&t.gated_community_discount!==void 0&&(r.gated_community_discount=U(t.gated_community_discount)),t.multi_policy_discount!==null&&t.multi_policy_discount!==void 0&&(r.multi_policy_discount=U(t.multi_policy_discount)),t.non_smoker_discount!==null&&t.non_smoker_discount!==void 0&&(r.non_smoker_discount=U(t.non_smoker_discount)),t.first_time_buyer_discount!==null&&t.first_time_buyer_discount!==void 0&&(r.first_time_buyer_discount=U(t.first_time_buyer_discount)),t.fire_detection_system!==null&&t.fire_detection_system!==void 0&&(r.fire_detection_system=U(t.fire_detection_system)),t.burglar_alarm_system!==null&&t.burglar_alarm_system!==void 0&&(r.burglar_alarm_system=U(t.burglar_alarm_system)),t.burglar_alarm_system_type&&(r.burglar_alarm_system_type=t.burglar_alarm_system_type),t.smoke_detectors!==null&&t.smoke_detectors!==void 0&&(r.smoke_detectors=U(t.smoke_detectors)),t.sprinkler_system!==null&&t.sprinkler_system!==void 0&&(r.sprinkler_system=U(t.sprinkler_system)),t.sprinkler_system_type&&(r.sprinkler_system_type=t.sprinkler_system_type),t.gas_leakage_detector!==null&&t.gas_leakage_detector!==void 0&&(r.gas_leakage_detector=U(t.gas_leakage_detector)),t.deadbolt_locks!==null&&t.deadbolt_locks!==void 0&&(r.deadbolt_locks=U(t.deadbolt_locks)),t.fire_extinguisher!==null&&t.fire_extinguisher!==void 0&&(r.fire_extinguisher=U(t.fire_extinguisher)),t.order_credit_authorized!==null&&t.order_credit_authorized!==void 0&&(r.order_credit_authorized=U(t.order_credit_authorized)),t.has_health_insurance_auto_accident!==null&&t.has_health_insurance_auto_accident!==void 0&&(r.has_health_insurance_auto_accident=U(t.has_health_insurance_auto_accident)),t.is_corporation!==null&&t.is_corporation!==void 0&&(r.is_corporation=U(t.is_corporation)),t.named_insured_foreclosure_repo_bankruptcy!==null&&t.named_insured_foreclosure_repo_bankruptcy!==void 0&&(r.named_insured_foreclosure_repo_bankruptcy=U(t.named_insured_foreclosure_repo_bankruptcy)),t.named_insured_convicted_insurance_fraud!==null&&t.named_insured_convicted_insurance_fraud!==void 0&&(r.named_insured_convicted_insurance_fraud=U(t.named_insured_convicted_insurance_fraud));const i={};if(t.vehicles)for(const a of t.vehicles)a.quote_vehicle_id&&a.vin&&(i[a.quote_vehicle_id]=a.vin);return t.drivers&&t.drivers.length>0?(r.drivers="Yes",r.drivers__items=t.drivers.map(a=>{const s=a,l={};s.first_name&&(l.first_name=s.first_name),s.middle_name&&(l.middle_name=s.middle_name),s.last_name&&(l.last_name=s.last_name),s.date_of_birth&&(l.date_of_birth=Me(s.date_of_birth)),s.gender&&(l.gender=s.gender),s.marital_status&&(l.marital_status=s.marital_status),s.relationship_to_insured&&(l.relationship_to_insured=s.relationship_to_insured),s.is_registered_owner!==null&&s.is_registered_owner!==void 0&&(l.is_registered_owner=s.is_registered_owner?"Yes":"No"),s.license_state&&(l.license_state=s.license_state),s.license_status&&(l.license_status=s.license_status),s.license_number&&(l.license_number=s.license_number),s.date_first_licensed&&(l.date_first_licensed=Me(s.date_first_licensed)),s.education_level&&(l.education_level=oo(s.education_level)),s.occupation&&(l.occupation=io(s.occupation)),s.industry&&(l.industry=Ut(s.industry)),s.employment_status&&(l.employment_status=s.employment_status),s.last_5_years_license_suspended_or_revoked!==null&&s.last_5_years_license_suspended_or_revoked!==void 0&&(l.last_5_years_license_suspended_or_revoked=U(s.last_5_years_license_suspended_or_revoked)),s.accident_prevention_course!==null&&s.accident_prevention_course!==void 0&&(l.accident_prevention_course=U(s.accident_prevention_course)),s.accident_prevention_course_date&&(l.accident_prevention_course_date=Me(s.accident_prevention_course_date)),s.sr22!==null&&s.sr22!==void 0&&(l.sr22=U(s.sr22));const u=s.ssn_display;typeof u=="string"&&(l.ssn_display=u);const d=s.driver_violations;d&&d.length>0&&(l.driver_violations="Yes",l.driver_violations__items=d.map(h=>{const C={};return h.code&&(C.code=h.code),h.occurred_at&&(C.occurred_at=Me(h.occurred_at)),C}));const p=s.driver_accidents;p&&p.length>0&&(l.driver_accidents="Yes",l.driver_accidents__items=p.map(h=>{const C={};return h.occurred_at&&(C.occurred_at=Me(h.occurred_at)),h.description&&(C.description=h.description),h.quote_vehicle_id&&(C.quote_vehicle_id=i[h.quote_vehicle_id]??h.quote_vehicle_id),h.property_damage_amount_paid_cents!==null&&h.property_damage_amount_paid_cents!==void 0&&(C.property_damage_amount_paid_cents=h.property_damage_amount_paid_cents),h.personal_injury_amount_paid_cents!==null&&h.personal_injury_amount_paid_cents!==void 0&&(C.personal_injury_amount_paid_cents=h.personal_injury_amount_paid_cents),C}));const v=s.losses;return v&&v.length>0&&(l.losses="Yes",l.losses__items=v.map(h=>{const C={};return h.description&&(C.description=h.description),h.date_of_incident&&(C.date_of_incident=Me(h.date_of_incident)),h.amount_paid_cents!==null&&h.amount_paid_cents!==void 0&&(C.amount_paid_cents=h.amount_paid_cents),h.quote_vehicle_id&&(C.quote_vehicle_id=i[h.quote_vehicle_id]??h.quote_vehicle_id),C})),l})):r.drivers="No",t.vehicles&&t.vehicles.length>0?(r.vehicles="Yes",r.vehicles__items=t.vehicles.map(a=>{const s=a,l={};s.vin&&(l.vin=s.vin),s.year!==null&&s.year!==void 0&&(l.year=String(s.year)),s.make&&(l.make=s.make),s.model&&(l.model=s.model),s.body_style&&(l.body_style=s.body_style),s.ownership_type&&(l.ownership_type=s.ownership_type),s.usage&&(l.usage=s.usage),s.annual_mileage!==null&&s.annual_mileage!==void 0&&(l.annual_mileage=s.annual_mileage),s.miles_to_work!==null&&s.miles_to_work!==void 0&&(l.miles_to_work=s.miles_to_work),s.percent_to_work!==null&&s.percent_to_work!==void 0&&(l.percent_to_work=s.percent_to_work);const u=[];return s.garaging_address_line_1&&u.push(s.garaging_address_line_1),s.garaging_address_line_2&&u.push(s.garaging_address_line_2),s.garaging_address_city&&u.push(s.garaging_address_city),s.garaging_address_state&&u.push(s.garaging_address_state),s.garaging_address_postal_code&&u.push(s.garaging_address_postal_code),u.length>0&&(l.garaging_address=u.join(", ")),s.new_when_purchased!==null&&s.new_when_purchased!==void 0&&(l.new_when_purchased=U(s.new_when_purchased)),s.purchase_date&&(l.purchase_date=Me(s.purchase_date)),s.anti_theft_type&&(l.anti_theft_type=s.anti_theft_type),s.passive_restraint_type&&(l.passive_restraint_type=s.passive_restraint_type),s.anti_lock_brakes!==null&&s.anti_lock_brakes!==void 0&&(l.anti_lock_brakes=U(s.anti_lock_brakes)),s.daytime_running_lights!==null&&s.daytime_running_lights!==void 0&&(l.daytime_running_lights=U(s.daytime_running_lights)),s.custom_equipment_value_cents!==null&&s.custom_equipment_value_cents!==void 0&&(l.custom_equipment_value_cents=s.custom_equipment_value_cents),s.cost_new_value_cents!==null&&s.cost_new_value_cents!==void 0&&(l.cost_new_value_cents=s.cost_new_value_cents),s.stated_value_amount_cents!==null&&s.stated_value_amount_cents!==void 0&&(l.stated_value_amount_cents=s.stated_value_amount_cents),s.vehicle_has_modifications!==null&&s.vehicle_has_modifications!==void 0&&(l.vehicle_has_modifications=U(s.vehicle_has_modifications)),s.vehicle_garaged_at_residence!==null&&s.vehicle_garaged_at_residence!==void 0&&(l.vehicle_garaged_at_residence=U(s.vehicle_garaged_at_residence)),s.vehicle_comp_deductible&&(l.vehicle_comp_deductible=s.vehicle_comp_deductible),s.vehicle_coll_deductible&&(l.vehicle_coll_deductible=s.vehicle_coll_deductible),s.vehicle_towing_and_labor&&(l.vehicle_towing_and_labor=s.vehicle_towing_and_labor),s.vehicle_transportation_expense&&(l.vehicle_transportation_expense=s.vehicle_transportation_expense),s.vehicle_full_glass!==null&&s.vehicle_full_glass!==void 0&&(l.vehicle_full_glass=U(s.vehicle_full_glass)),s.vehicle_loan_lease!==null&&s.vehicle_loan_lease!==void 0&&(l.vehicle_loan_lease=U(s.vehicle_loan_lease)),s.coverages&&s.coverages.length>0&&(l.coverages__items=s.coverages.map(d=>{const p={};return d.type&&(p.type=d.type),d.per_person_limit_cents!==null&&d.per_person_limit_cents!==void 0&&(p.per_person_limit_cents=d.per_person_limit_cents),d.per_incident_limit_cents!==null&&d.per_incident_limit_cents!==void 0&&(p.per_incident_limit_cents=d.per_incident_limit_cents),d.per_incident_limit_percent!==null&&d.per_incident_limit_percent!==void 0&&(p.per_incident_limit_percent=d.per_incident_limit_percent),d.per_day_limit_cents!==null&&d.per_day_limit_cents!==void 0&&(p.per_day_limit_cents=d.per_day_limit_cents),d.deductible_cents!==null&&d.deductible_cents!==void 0&&(p.deductible_cents=d.deductible_cents),d.is_declined!==null&&d.is_declined!==void 0&&(p.is_declined=U(d.is_declined)),p})),s.vehicle_lienholders&&s.vehicle_lienholders.length>0&&(l.vehicle_lienholders__items=s.vehicle_lienholders.map(d=>{const p={};return d.name&&(p.name=d.name),d.type&&(p.type=d.type),d.line_1&&(p.line_1=d.line_1),d.line_2&&(p.line_2=d.line_2),d.city&&(p.city=d.city),d.state&&(p.state=d.state),d.postal_code&&(p.postal_code=d.postal_code),d.phone&&(p.phone=d.phone),d.fax&&(p.fax=d.fax),p})),l})):r.vehicles="No",t.losses&&t.losses.length>0?(r.home_losses="Yes",r.home_losses__items=t.losses.map(a=>{const s={};return a.description&&(s.description=a.description),a.date_of_incident&&(s.date_of_incident=Me(a.date_of_incident)),a.amount_paid_cents!==null&&a.amount_paid_cents!==void 0&&(s.amount_paid_cents=Math.round(Number(a.amount_paid_cents)/100)),s})):r.home_losses="No",r}const jo=new Set(["Zip","Product","Driver","Vehicle"]);function n_(e){return e?Array.isArray(e.drivers__items)?e.drivers__items.length:Array.isArray(e.drivers)?e.drivers.length:null:null}function Vo(e,t){const r=n_(t),n=e.filter(i=>i.key!=="AutoPolicy"),o=n.length>0?n:e;return o}function qt(e){const t={},r=u=>{if(typeof u=="string"){if(u==="Yes")return!0;if(u==="No")return!1}return u},n=Object.keys(e).filter(u=>!u.includes("__items")),o=new Set,i=new Set;for(const[u,d]of Object.entries(e))if(u.endsWith("__items")&&Array.isArray(d)){const p=u.replace("__items","");i.add(p),n.includes(p)&&d.forEach(v=>{typeof v=="object"&&v!==null&&Object.keys(v).forEach(h=>{o.add(h)})})}for(const[u,d]of Object.entries(e))if(u.endsWith("__items")){const p=u.replace("__items","");if(n.includes(p)){const h=Array.isArray(d)?d.map(C=>qt(C)):d;t[p]=h}}else if(!u.includes("__items")){if(i.has(u))continue;o.has(u)||(t[u]=r(d))}const a=t.auto_prior_carrier_name;if(typeof a=="string"&&a.trim()!==""){const u=a==="NoPriorInsurance";t.auto_has_prior_insurance=!u,u&&(delete t.auto_prior_years,delete t.auto_prior_months,delete t.auto_prior_expiration_date,delete t.auto_prior_liability_limit,delete t.auto_continuous_coverage_years,delete t.auto_cancelled_declined_refused_to_renew,delete t.auto_current_annual_premium_cents)}const s=t.home_prior_carrier_name;if(typeof s=="string"&&s.trim()!==""){const u=s==="NoPriorInsurance";t.home_has_prior_insurance=!u,u&&(delete t.home_prior_years,delete t.home_continuous_coverage_years,delete t.home_prior_expiration_date,delete t.property_insurance_cancelled)}Array.isArray(t.drivers)&&(t.drivers=t.drivers.map(u=>{if(!u||typeof u!="object")return u;const d={...u};return d.industry=Ut(d.industry),d.education_level=oo(d.education_level),d.occupation=io(d.occupation),d})),console.log("[DEBUG_TRANSFORM] transformed.drivers type:",typeof t.drivers,"isArray:",Array.isArray(t.drivers),Array.isArray(t.drivers)?`count=${t.drivers.length}`:`value=${JSON.stringify(t.drivers)?.slice(0,100)}`),Array.isArray(t.drivers)&&t.drivers.forEach((u,d)=>{const p=u;console.log(`[DEBUG_TRANSFORM] Driver ${d}:`,{first_name:p.first_name,gender:p.gender,marital_status:p.marital_status,education_level:p.education_level,industry:p.industry,occupation:p.occupation,sr22:p.sr22,keys:Object.keys(p)})});const l=21474836;if("sale_price_cents"in t){const u=t.sale_price_cents;if(typeof u=="number"&&Number.isFinite(u)){const d=Math.trunc(u);if(d>=1){const p=Math.min(d,l);t.sale_price_cents=p*100}}}return Array.isArray(t.home_losses)&&(t.home_losses=t.home_losses.map(u=>{if(!u||typeof u!="object")return u;const d=u,p=d.amount_paid_cents;if(typeof p!="number"||!Number.isFinite(p))return d;const v=Math.trunc(p),h=Math.min(Math.max(v,0),l);return{...d,amount_paid_cents:h*100}})),t}function o_(e,t){const r=e.findIndex(o=>o.key===t);return r<0?t:e[r+1]?.key??t}function Yo(e){return e.some(t=>String(t.key)==="BundlePolicy"||String(t.key)==="BundleCustomer")}function Ko(e){return Yo(e)?"Bundle":e.some(t=>String(t.key)==="Vehicle"||String(t.key)==="Driver")?"Auto":"Home"}const i_={Auto:45e3,Home:5e4,Bundle:1e5};function a_(e,t){if(e!=="AutoCurrentCarrier")return t;const r=t.some(i=>String(i.key)==="auto_cancelled_declined_refused_to_renew"),n=t.some(i=>String(i.key)==="vehicle_policy_selections"),o=[...t];return r||o.push({question:"Has any auto insurance company cancelled, declined or refused to renew you in the last 5 years?",inputType:"radio",options:["Yes","No"],key:"auto_cancelled_declined_refused_to_renew",required:!0}),n||o.push({question:"Vehicle coverage selections",inputType:"custom",key:"vehicle_policy_selections",required:!1}),o}function s_(e,t){if(e!=="Vehicle")return t;const r=n=>n.map(o=>{const i=o.conditionals?.map(a=>{const s=a.conditionalQuestions??[];return s.length?{...a,conditionalQuestions:r(s)}:a});return String(o.key)!=="vin"?i?{...o,conditionals:i}:o:{...o,required:!1,...i?{conditionals:i}:{}}});return r(t)}function c_({isOpen:e,onClose:t}){const[r,n]=f.useState([]),[o,i]=f.useState(null),a=f.useRef(null);f.useEffect(()=>{a.current=o},[o]);const[s,l]=f.useState(null),[u,d]=f.useState(!1),[p,v]=f.useState(!1),[h,C]=f.useState([]),m=f.useRef(null),[q,H]=f.useState(null),[j,R]=f.useState(void 0),[Z,V]=f.useState(!1),[W,K]=f.useState(null),[z,Y]=f.useState(null),[Q,ne]=f.useState(!1),me=f.useRef(!1);f.useEffect(()=>{if(!u||p)return;const O=Ko(r);let I=!1;const D=[];let L=0,y=0;const g=24,_=3,E=5e3;let S=!1;const k=async()=>{if(I)return;L++;try{const{quote:P}=await mo();if(I)return;if(y=0,!S){const T=P?.appetites??null,N=Kd(T,O);N.length>0&&(C(N),S=!0)}const B=P?.rates_status??null;if(B==="completed"){const{rates:T}=await fo();if(I)return;m.current=T,v(!0);return}if(B==="no_rates"){m.current=[],v(!0);return}if(B==="failed"){K({message:"submission_failed"}),d(!1);return}}catch(P){if(y++,console.warn("Provider polling: getQuote failed",{attempt:L,consecutiveFailures:y,error:P}),y>=_){K({message:"submission_failed"}),d(!1);return}}if(I)return;if(L>=g){K({message:"submission_failed"}),d(!1);return}const F=window.setTimeout(k,E);D.push(F)};return k(),()=>{I=!0,D.forEach(F=>window.clearTimeout(F))}},[u,p,r]);function be(O){const I={Zip:"ZIP Code",Email:"Email",Product:"Product & Address",Home:"Home Details",Vehicle:"Vehicle",Name:"Name & DOB",Driver:"Operator",AutoCurrentCarrier:"Policy",HomeCurrentCarrier:"Policy",HomePolicy:"Policy",BundlePolicy:"Policy",Demographics:"Applicant",Ssn:"SSN",Phone:"Phone",SMSVerification:"Verify",AutoPolicy:"Policy",Customer:"Applicant",HomeCustomer:"Applicant",BundleCustomer:"Applicant",HomeConstruction:"Structure",HomeFeatures:"Features"};return O.map(L=>({key:L,title:I[L]||L,loadQuestions:async()=>{const y=await cd(L,a.current??void 0);let g=a_(L,y.questions);return g=s_(L,g),g}}))}f.useEffect(()=>{const O=async()=>{try{const I=nd();if(Or(),I){V(!0),i(I);try{const D=At(),L=await mo(D?void 0:I);if(!L||!L.quote)throw new Error("Invalid response from getQuote: missing quote data");const{quote:y}=L,{stages:g}=await jt(I),_=be(g);n(_);let E;try{E=r_(y),H(E)}catch(k){throw new Error(`Failed to transform quote data: ${k instanceof Error?k.message:"Unknown error"}`)}const S=Vo(_,E);if(n(S),y.current_stage){const k=y.current_stage==="State"?"Product":y.current_stage,F=S.findIndex(P=>P.key===k);F>=0?R(F):R(S.length-1)}else R(S.length-1)}catch(D){const L=D;if(L.statusCode===404)so(),i(null);else if(L.statusCode===401){uo();try{const{stages:y}=await jt(I),g=be(y);n(g);const _=g.findIndex(E=>E.key==="SMSVerification");_>=0&&R(_)}catch{}}}finally{V(!1)}}else{const{stages:D}=await jt();n(be(D))}}catch{V(!1)}};e&&!me.current&&(me.current=!0,O())},[e]),f.useEffect(()=>{if(!e)return;const{overflow:O}=document.body.style;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=O}},[e]);const Ne=f.useCallback(O=>{O.key==="Escape"&&(Eo(),t())},[t]);f.useEffect(()=>{if(e)return window.addEventListener("keydown",Ne),()=>window.removeEventListener("keydown",Ne)},[e,Ne]),f.useEffect(()=>{e||(H(null),R(void 0),V(!1),d(!1),Y(null),ne(!1))},[e]),f.useEffect(()=>{e&&$d()},[e]),f.useEffect(()=>{s&&Array.isArray(s)&&zd({rateCount:s.length})},[s]);const X=f.useCallback(()=>{K(null),R(Math.max(0,r.length-1))},[r.length]),A=f.useCallback(async O=>{if(!(!z||!o||Q)){ne(!0);try{const D={...qt(z.allValues),communications_consent:O};C([]),v(!1),m.current=null,d(!0),Y(null);let L;try{L=await _t(D,!0)}catch(_){throw d(!1),_}if(L.status==="submission_failed"){d(!1),v(!1),m.current=null,K({message:L.message});return}if(L.status==="success")try{const{rates:_}=await fo();m.current=_,v(!0)}catch(_){throw d(!1),_}const y=r.length,g=r[y-1];No({stageKey:g?.key??"unknown",stageTitle:g?.title??"unknown",stepIndex:y,totalSteps:y}),Bd()}catch{d(!1),K({message:"Oops, something went wrong. Please try again later."})}finally{ne(!1)}}},[z,o,Q,r]);if(!e)return null;const w=()=>{Eo(),t()};return c.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center",role:"dialog","aria-modal":"true","aria-labelledby":"insurance-modal-title",children:[c.jsx("div",{className:"backdrop","aria-hidden":"true"}),c.jsxs("div",{className:"modal-panel bg-white relative w-full max-w-2xl flex flex-col max-h-[90vh] overflow-hidden",role:"document",children:[c.jsx("button",{onClick:w,className:"modal-close-btn absolute top-4 right-4 text-slate-400 hover:text-slate-600 text-xl","aria-label":"Close",type:"button",children:"×"}),!u&&!W&&c.jsx("div",{className:"text-center mb-6",children:c.jsx("h2",{id:"insurance-modal-title",className:"h1-title",children:"Let's shop multiple leading carriers for you."})}),c.jsxs("div",{className:"panel-body flex-1 min-h-0 overflow-y-auto",children:[W&&c.jsx(t_,{onGoBack:X}),!W&&u&&(()=>{const O=Ko(r);return c.jsx(e_,{providers:h,totalTime:i_[O],flow:O,isComplete:p,onComplete:()=>{d(!1),v(!1),C([]),m.current&&(l(m.current),m.current=null)}})})(),!W&&!u&&z&&c.jsx(ai,{onChoose:A,isSubmitting:Q}),!W&&!s&&!u&&!z&&c.jsx(c.Fragment,{children:Z||r.length===0?c.jsx("div",{className:"flex items-center justify-center py-12",children:c.jsx("div",{className:"text-slate-600",children:"Loading..."})}):c.jsx(jd,{stages:r,initialValues:q??void 0,initialActive:j,quoteId:o??void 0,nonTerminalStageKeys:jo,onStageComplete:async(O,I)=>{try{const D=qt(O);let L=o,y=r;const g=y.findIndex(S=>S.key===I),_=y[g],E=o_(y,I);if(L)if(I==="Phone"){const S=D.phone;if(!S)throw new Error("Phone number is required.");const k=At();await _t({...D,current_stage:E},!1,k?void 0:L),await ud(L,S)}else if(I==="SMSVerification"){const{isVerified:S,token:k}=await _o(L,D.sms_code);if(!S)throw new Error("Invalid SMS code");k&&lo(k),await _t({current_stage:E},!1)}else if(I==="Product"){const S=At(),{isSupported:k}=await dd(D.state,S?void 0:L??void 0);if(!k)throw new Error("State is not supported");await _t({...D,current_stage:E},!1,S?void 0:L)}else{const S=At();await _t({...D,current_stage:E},!1,S?void 0:L||void 0)}else{const S=D.postal_code??"";if(!S)throw new Error("ZIP code is required to start a quote.");const F=(await ld(S))?.quoteId;if(!F||typeof F!="string"||F.trim()==="")throw new Error(`Failed to create quote - invalid quoteId returned: ${F}`);L=F,i(F),rd(F),await _t({...D,current_stage:E},!1,F)}if(jo.has(I))try{const{stages:S}=await jt(L||void 0);y=be(S),y=Vo(y,O),n(y)}catch(S){console.warn("Unable to refresh stages after flow-shaping step",S)}return No({stageKey:I,stageTitle:_?.title??I,stepIndex:g+1,totalSteps:y.length}),{success:!0,latestStages:y}}catch(D){return{success:!1,error:D instanceof Error?D.message:"An error occurred"}}},onComplete:async(O,I)=>{if(!o)return{success:!1,error:"Oops, something went wrong. Please try again later."};H(O);try{if(I==="SMSVerification"){const D=qt(O),{isVerified:L,token:y}=await _o(o,D.sms_code);return L?(y&&lo(y),Y({allValues:O}),{success:!0}):{success:!1,error:"Invalid SMS code"}}return Y({allValues:O}),{success:!0}}catch{const L="Oops, something went wrong. Please try again later.";return K({message:L}),{success:!1,error:L}}}})})," ",!W&&s&&o&&c.jsx(Qd,{rates:s,onBack:()=>l(null),isBundleFlow:Yo(r)})]}),c.jsx("div",{className:"mt-4 pt-4 border-t border-slate-200 space-y-1",children:c.jsx("p",{className:"text-center text-sm text-slate-500",children:"Insurance products offered through Credify Corporation, a licensed insurance agency."})})]})]})}function l_({isOpen:e}){return c.jsx(c_,{isOpen:e,onClose:()=>{Qt.close()}})}let Ue=null,Xe=null,Jt=!1;function u_(){Ue||(Ue=document.createElement("div"),Ue.id="insurance-widget-root",document.documentElement.appendChild(Ue)),!Xe&&Ue&&(Xe=Jo.createRoot(Ue))}function Br(){u_(),Xe&&Xe.render(f.createElement(l_,{isOpen:Jt}))}function d_(){Xe&&Ue&&(Xe.unmount(),Ue.remove()),Xe=null,Ue=null}const Qt={init:e=>{Jt=!!e?.autoOpen,Br()},open:()=>{Jt=!0,Br()},close:()=>{Jt=!1,Br()},destroy:d_};typeof window<"u"&&(window.CredifyInsuranceWidget=Qt),$e.CredifyInsuranceWidget=Qt,$e.default=Qt,Object.defineProperties($e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
98
+ `}),u.jsx("div",{style:{background:"#F8FAFC",display:"flex",alignItems:"center",justifyContent:"center",padding:"2rem",fontFamily:"'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",height:"100%",minHeight:400,overflowY:"auto"},children:u.jsxs("div",{style:{width:"100%",maxWidth:560},children:[u.jsxs("div",{style:{textAlign:"center",marginBottom:40},children:[u.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:8,background:i.accent+"12",border:`1px solid ${i.accent}30`,borderRadius:100,padding:"6px 16px",marginBottom:16},children:[u.jsx("span",{style:{fontSize:14},children:i.icon}),u.jsx("span",{style:{fontSize:12,fontWeight:700,color:i.accent,letterSpacing:"0.1em",textTransform:"uppercase"},children:i.label})]}),u.jsx("h1",{style:{fontSize:26,fontWeight:700,color:"#0F172A",margin:0,letterSpacing:"-0.02em",lineHeight:1.3},children:R?"Connecting to top carriers":"Fetching your best rates"}),u.jsx("p",{style:{fontSize:14,color:"#64748B",marginTop:8,marginBottom:0},children:R?"Identifying the carriers eligible for your quote...":te?"Still gathering — a few carriers are taking a little longer...":"We're reaching out to multiple insurers on your behalf"})]}),u.jsx("div",{style:{display:"flex",justifyContent:"center",marginBottom:32},children:R?u.jsx("div",{style:{display:"flex",gap:20},children:[0,1,2,3,4].map(ce=>u.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:6},children:[u.jsx("div",{style:{width:48,height:48,borderRadius:14,background:"#E2E8F0",animation:"skeletonPulse 1.4s ease-in-out infinite",animationDelay:`${ce*.12}s`}}),u.jsx("div",{style:{width:40,height:8,borderRadius:4,background:"#E2E8F0",animation:"skeletonPulse 1.4s ease-in-out infinite",animationDelay:`${ce*.12}s`}})]},`skeleton-${ce}`))}):ee?u.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:8},children:[u.jsxs("div",{style:{width:64,height:64,borderRadius:18,background:ee.color+"18",border:`2px solid ${ee.color}`,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700,fontSize:16,color:ee.color,position:"relative",animation:"providerPulse 1.8s ease-in-out infinite"},children:[ee.abbr,u.jsx("div",{style:{position:"absolute",inset:-5,borderRadius:22,border:`2px solid ${ee.color}`,pointerEvents:"none",animation:"ringPulse 1.6s ease-in-out infinite"}})]}),u.jsx("span",{style:{fontSize:13,fontWeight:600,color:ee.color,letterSpacing:"0.04em"},children:ee.name})]}):null}),u.jsxs("div",{className:`iq-card-fade ${G?"iq-card-visible":"iq-card-hidden"}`,style:{background:"#FFFFFF",borderRadius:24,border:"1px solid #E2E8F0",padding:32},children:[u.jsx("div",{style:{display:"flex",alignItems:"center",gap:20,marginBottom:28},children:R||!ee?u.jsxs("div",{style:{flex:1,textAlign:"center",padding:"8px 0"},children:[u.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.1em",textTransform:"uppercase",margin:"0 0 6px"},children:"Please wait"}),u.jsx("h2",{style:{fontSize:18,fontWeight:700,color:"#0F172A",margin:"0 0 6px",letterSpacing:"-0.02em"},children:"Checking eligible providers"}),u.jsx("p",{style:{fontSize:13,color:"#64748B",margin:0},children:"Reviewing your details against our carrier network"})]}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{style:{position:"relative",flexShrink:0},children:[u.jsx(Ob,{progress:_,color:ee.color,size:80}),u.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:u.jsxs("span",{style:{fontSize:14,fontWeight:700,color:ee.color},children:[Math.round(_),"%"]})})]}),u.jsxs("div",{style:{flex:1},children:[u.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.1em",textTransform:"uppercase",margin:"0 0 4px"},children:te?"Still checking":"Now checking"}),u.jsx("h2",{style:{fontSize:20,fontWeight:700,color:"#0F172A",margin:"0 0 6px",letterSpacing:"-0.02em"},children:ee.name}),u.jsx("p",{className:"iq-status-text",style:{fontSize:13,color:"#64748B",margin:0},children:Wo[g]},`${c}-${g}`)]})]})}),u.jsxs("div",{children:[u.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.08em",textTransform:"uppercase",margin:"0 0 8px"},children:R?"Initializing":"Gathering quotes"}),u.jsx("div",{style:{height:6,background:"#F1F5F9",borderRadius:100,overflow:"hidden"},children:u.jsx("div",{style:{height:"100%",width:"35%",background:i.accent,borderRadius:100,animation:"shimmerSlide 1.4s ease-in-out infinite"}})})]})]})]})})]})}function Pc({onGoBack:e}){return u.jsxs("section",{className:"mt-4",children:[u.jsxs("div",{className:"rounded-xl border border-red-200 bg-red-50 p-5",children:[u.jsx("h3",{className:"text-base font-semibold text-red-700",children:"Sorry, quote submission failed"}),u.jsx("p",{className:"mt-2 text-sm text-red-700",children:"We ran into an issue submitting your quote. Our team will investigate and get back to you soon."})]}),u.jsx("div",{className:"mt-5",children:u.jsx("button",{type:"button",onClick:e,className:"h-12 w-full rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition",children:"Go back"})})]})}const Lc="credify_rt";let _n=null;function Db(){try{if(typeof window>"u")return;const e=new URL(window.location.href),t=e.searchParams.get(Lc);if(!t)return;_n=t,e.searchParams.delete(Lc),window.history.replaceState(window.history.state,"",e.toString())}catch(e){console.error("Failed to capture resume token from URL:",e)}}function Pb(){return _n!==null}function Lb(){const e=_n;return _n=null,e}function Z(e){if(e===!0)return"Yes";if(e===!1)return"No"}function Be(e){if(e)try{const t=typeof e=="string"?new Date(e):e;return isNaN(t.getTime())?void 0:t.toISOString().split("T")[0]}catch{return}}function xb(e){const t=e,r={};t.phone&&(r.phone=t.phone),t.first_name&&(r.first_name=t.first_name),t.last_name&&(r.last_name=t.last_name),t.email&&(r.email=t.email),t.date_of_birth&&(r.date_of_birth=Be(t.date_of_birth)),t.product&&(r.product=t.product),t.state&&(r.state=t.state),t.postal_code&&(r.postal_code=t.postal_code);const n=[];t.line_1&&n.push(t.line_1),t.line_2&&n.push(t.line_2),t.city&&n.push(t.city),t.state&&n.push(t.state),t.postal_code&&n.push(t.postal_code),n.length>0&&(r.address=n.join(", ")),typeof t.ssn_display=="string"&&(r.ssn_display=t.ssn_display),t.years_at_address!==null&&t.years_at_address!==void 0&&(r.years_at_address=t.years_at_address),t.months_at_address!==null&&t.months_at_address!==void 0&&(r.months_at_address=t.months_at_address),t.move_in_date&&(r.move_in_date=Be(t.move_in_date));const o=[];t.prior_line_1&&o.push(t.prior_line_1),t.prior_line_2&&o.push(t.prior_line_2),t.prior_city&&o.push(t.prior_city),t.prior_state&&o.push(t.prior_state),t.prior_postal_code&&o.push(t.prior_postal_code),o.length>0&&(r.prior_address=o.join(", ")),t.years_at_prior_address!==null&&t.years_at_prior_address!==void 0&&(r.years_at_prior_address=t.years_at_prior_address),t.is_mailing_address_different!==null&&t.is_mailing_address_different!==void 0&&(r.is_mailing_address_different=Z(t.is_mailing_address_different)),t.mailing_address&&(r.mailing_address=t.mailing_address),t.effective_date&&(r.effective_date=Be(t.effective_date)),t.auto_has_prior_insurance!==null&&t.auto_has_prior_insurance!==void 0&&(r.auto_has_prior_insurance=Z(t.auto_has_prior_insurance)),t.auto_prior_expiration_date&&(r.auto_prior_expiration_date=Be(t.auto_prior_expiration_date)),t.auto_prior_carrier_name&&(r.auto_prior_carrier_name=t.auto_prior_carrier_name),t.auto_prior_liability_limit&&(r.auto_prior_liability_limit=t.auto_prior_liability_limit),t.auto_reason_for_no_insurance&&(r.auto_reason_for_no_insurance=t.auto_reason_for_no_insurance),t.auto_prior_years!==null&&t.auto_prior_years!==void 0&&(r.auto_prior_years=t.auto_prior_years),t.auto_prior_months!==null&&t.auto_prior_months!==void 0&&(r.auto_prior_months=t.auto_prior_months),t.auto_continuous_coverage_years!==null&&t.auto_continuous_coverage_years!==void 0&&(r.auto_continuous_coverage_years=t.auto_continuous_coverage_years),t.auto_cancelled_declined_refused_to_renew!==null&&t.auto_cancelled_declined_refused_to_renew!==void 0&&(r.auto_cancelled_declined_refused_to_renew=Z(t.auto_cancelled_declined_refused_to_renew)),t.auto_current_annual_premium_cents!==null&&t.auto_current_annual_premium_cents!==void 0&&(r.auto_current_annual_premium_cents=t.auto_current_annual_premium_cents),t.policy_bi&&(r.policy_bi=t.policy_bi),t.policy_um&&(r.policy_um=t.policy_um),t.policy_pd&&(r.policy_pd=t.policy_pd),t.policy_mp&&(r.policy_mp=t.policy_mp),t.policy_umpd&&(r.policy_umpd=t.policy_umpd),t.policy_pip&&(r.policy_pip=t.policy_pip),t.policy_auto_death_indemnity&&(r.policy_auto_death_indemnity=t.policy_auto_death_indemnity),t.driver_vehicle_assignments&&(r.driver_vehicle_assignments=t.driver_vehicle_assignments),t.home_has_prior_insurance!==null&&t.home_has_prior_insurance!==void 0&&(r.home_has_prior_insurance=Z(t.home_has_prior_insurance)),t.home_prior_expiration_date&&(r.home_prior_expiration_date=Be(t.home_prior_expiration_date)),t.home_prior_carrier_name&&(r.home_prior_carrier_name=t.home_prior_carrier_name),t.home_prior_years!==null&&t.home_prior_years!==void 0&&(r.home_prior_years=t.home_prior_years),t.home_continuous_coverage_years!==null&&t.home_continuous_coverage_years!==void 0&&(r.home_continuous_coverage_years=t.home_continuous_coverage_years),t.property_insurance_cancelled!==null&&t.property_insurance_cancelled!==void 0&&(r.property_insurance_cancelled=Z(t.property_insurance_cancelled)),t.lapse_in_coverage!==null&&t.lapse_in_coverage!==void 0&&(r.lapse_in_coverage=Z(t.lapse_in_coverage)),t.year_built!==null&&t.year_built!==void 0&&(r.year_built=t.year_built),t.number_of_units!==null&&t.number_of_units!==void 0&&(r.number_of_units=t.number_of_units),t.number_of_stories!==null&&t.number_of_stories!==void 0&&(r.number_of_stories=t.number_of_stories),t.number_of_beds!==null&&t.number_of_beds!==void 0&&(r.number_of_beds=t.number_of_beds),t.number_of_full_baths!==null&&t.number_of_full_baths!==void 0&&(r.number_of_full_baths=t.number_of_full_baths),t.number_of_partial_baths!==null&&t.number_of_partial_baths!==void 0&&(r.number_of_partial_baths=t.number_of_partial_baths),t.under_construction!==null&&t.under_construction!==void 0&&(r.under_construction=Z(t.under_construction)),t.distance_from_fire_hydrant_ft&&(r.distance_from_fire_hydrant_ft=t.distance_from_fire_hydrant_ft),t.distance_from_fire_station_miles&&(r.distance_from_fire_station_miles=t.distance_from_fire_station_miles),t.architectural_style&&(r.architectural_style=t.architectural_style),t.dwelling_type&&(r.dwelling_type=t.dwelling_type),t.construction_quality&&(r.construction_quality=t.construction_quality),t.located_over_water!==null&&t.located_over_water!==void 0&&(r.located_over_water=t.located_over_water),t.construction_type&&(r.construction_type=t.construction_type),t.exterior_wall_type&&(r.exterior_wall_type=t.exterior_wall_type),t.foundation_type&&(r.foundation_type=t.foundation_type),t.roof_material_type&&(r.roof_material_type=t.roof_material_type),t.roof_shape&&(r.roof_shape=t.roof_shape),t.roof_updated_type&&(r.roof_updated_type=t.roof_updated_type),t.year_roof_updated!==null&&t.year_roof_updated!==void 0&&(r.year_roof_updated=t.year_roof_updated),t.mit_credit_form!==null&&t.mit_credit_form!==void 0&&(r.mit_credit_form=Z(t.mit_credit_form)),t.storm_shutters!==null&&t.storm_shutters!==void 0&&(r.storm_shutters=Z(t.storm_shutters)),t.heating_type&&(r.heating_type=t.heating_type),t.oil_tank_location&&(r.oil_tank_location=t.oil_tank_location),t.heating_fuel_type&&(r.heating_fuel_type=t.heating_fuel_type),t.number_of_fireplaces!==null&&t.number_of_fireplaces!==void 0&&(r.number_of_fireplaces=t.number_of_fireplaces),t.basement_type&&(r.basement_type=t.basement_type),t.parking_type&&(r.parking_type=t.parking_type),t.number_of_parking_spaces!==null&&t.number_of_parking_spaces!==void 0&&(r.number_of_parking_spaces=t.number_of_parking_spaces),t.plumbing_type&&(r.plumbing_type=t.plumbing_type),t.pool_type&&(r.pool_type=t.pool_type),t.total_area_sq_ft!==null&&t.total_area_sq_ft!==void 0&&(r.total_area_sq_ft=t.total_area_sq_ft),t.parcel_area_sq_ft!==null&&t.parcel_area_sq_ft!==void 0&&(r.parcel_area_sq_ft=t.parcel_area_sq_ft),t.residence_type&&(r.residence_type=t.residence_type),t.usage_type&&(r.usage_type=t.usage_type),t.household_size!==null&&t.household_size!==void 0&&(r.household_size=t.household_size),t.number_of_mortgagees!==null&&t.number_of_mortgagees!==void 0&&(r.number_of_mortgagees=t.number_of_mortgagees),t.has_dog!==null&&t.has_dog!==void 0&&(r.has_dog=Z(t.has_dog)),t.dog_breed_type&&(r.dog_breed_type=t.dog_breed_type),t.number_of_dogs!==null&&t.number_of_dogs!==void 0&&(r.number_of_dogs=t.number_of_dogs),t.has_vicious_animals!==null&&t.has_vicious_animals!==void 0&&(r.has_vicious_animals=Z(t.has_vicious_animals)),t.has_business_on_premises!==null&&t.has_business_on_premises!==void 0&&(r.has_business_on_premises=Z(t.has_business_on_premises)),t.business_class&&(r.business_class=t.business_class),t.occupancy_type&&(r.occupancy_type=t.occupancy_type),t.short_term_rental!==null&&t.short_term_rental!==void 0&&(r.short_term_rental=Z(t.short_term_rental)),t.sale_price_cents!==null&&t.sale_price_cents!==void 0&&(r.sale_price_cents=Math.round(Number(t.sale_price_cents)/100)),t.number_of_families!==null&&t.number_of_families!==void 0&&(r.number_of_families=t.number_of_families),t.number_of_units_in_firewall!==null&&t.number_of_units_in_firewall!==void 0&&(r.number_of_units_in_firewall=t.number_of_units_in_firewall),t.heating_update_yn!==null&&t.heating_update_yn!==void 0&&(r.heating_update_yn=Z(t.heating_update_yn)),t.heating_update_type&&(r.heating_update_type=t.heating_update_type),t.heating_update_year!==null&&t.heating_update_year!==void 0&&(r.heating_update_year=t.heating_update_year),t.plumbing_update_yn!==null&&t.plumbing_update_yn!==void 0&&(r.plumbing_update_yn=Z(t.plumbing_update_yn)),t.plumbing_update_type&&(r.plumbing_update_type=t.plumbing_update_type),t.plumbing_update_year!==null&&t.plumbing_update_year!==void 0&&(r.plumbing_update_year=t.plumbing_update_year),t.electrical_update_yn!==null&&t.electrical_update_yn!==void 0&&(r.electrical_update_yn=Z(t.electrical_update_yn)),t.electrical_update_type&&(r.electrical_update_type=t.electrical_update_type),t.electrical_update_year!==null&&t.electrical_update_year!==void 0&&(r.electrical_update_year=t.electrical_update_year),t.electric_circuit_breaker!==null&&t.electric_circuit_breaker!==void 0&&(r.electric_circuit_breaker=Z(t.electric_circuit_breaker)),t.dwelling_replacement_cost!==null&&t.dwelling_replacement_cost!==void 0&&(r.dwelling_replacement_cost=t.dwelling_replacement_cost),t.other_structures_coverage!==null&&t.other_structures_coverage!==void 0&&(r.other_structures_coverage=t.other_structures_coverage),t.personal_property_coverage!==null&&t.personal_property_coverage!==void 0&&(r.personal_property_coverage=t.personal_property_coverage),t.loss_of_use_coverage!==null&&t.loss_of_use_coverage!==void 0&&(r.loss_of_use_coverage=t.loss_of_use_coverage),t.personal_liability&&(r.personal_liability=t.personal_liability),t.dwelling_medical_payments&&(r.dwelling_medical_payments=t.dwelling_medical_payments),t.all_perils_deductible&&(r.all_perils_deductible=t.all_perils_deductible),t.windstorm_deductible&&(r.windstorm_deductible=t.windstorm_deductible),t.has_garage!==null&&t.has_garage!==void 0&&(r.has_garage=Z(t.has_garage)),t.has_pool!==null&&t.has_pool!==void 0&&(r.has_pool=Z(t.has_pool)),t.has_trampoline!==null&&t.has_trampoline!==void 0&&(r.has_trampoline=Z(t.has_trampoline)),t.gender&&(r.gender=t.gender),t.marital_status&&(r.marital_status=t.marital_status),t.employment_industry&&(r.employment_industry=t.employment_industry),t.occupation&&(r.occupation=t.occupation),t.has_co_applicant!==null&&t.has_co_applicant!==void 0&&(r.has_co_applicant=Z(t.has_co_applicant)),t.co_applicant_first_name&&(r.co_applicant_first_name=t.co_applicant_first_name),t.co_applicant_middle_name&&(r.co_applicant_middle_name=t.co_applicant_middle_name),t.co_applicant_last_name&&(r.co_applicant_last_name=t.co_applicant_last_name),t.co_applicant_gender&&(r.co_applicant_gender=t.co_applicant_gender),t.co_applicant_marital_status&&(r.co_applicant_marital_status=t.co_applicant_marital_status),t.co_applicant_relationship&&(r.co_applicant_relationship=t.co_applicant_relationship),t.co_applicant_date_of_birth&&(r.co_applicant_date_of_birth=Be(t.co_applicant_date_of_birth)),t.co_applicant_employment_industry&&(r.co_applicant_employment_industry=t.co_applicant_employment_industry),t.co_applicant_occupation&&(r.co_applicant_occupation=t.co_applicant_occupation),t.retiree_discount!==null&&t.retiree_discount!==void 0&&(r.retiree_discount=Z(t.retiree_discount)),t.gated_community_discount!==null&&t.gated_community_discount!==void 0&&(r.gated_community_discount=Z(t.gated_community_discount)),t.multi_policy_discount!==null&&t.multi_policy_discount!==void 0&&(r.multi_policy_discount=Z(t.multi_policy_discount)),t.non_smoker_discount!==null&&t.non_smoker_discount!==void 0&&(r.non_smoker_discount=Z(t.non_smoker_discount)),t.first_time_buyer_discount!==null&&t.first_time_buyer_discount!==void 0&&(r.first_time_buyer_discount=Z(t.first_time_buyer_discount)),t.fire_detection_system!==null&&t.fire_detection_system!==void 0&&(r.fire_detection_system=Z(t.fire_detection_system)),t.burglar_alarm_system!==null&&t.burglar_alarm_system!==void 0&&(r.burglar_alarm_system=Z(t.burglar_alarm_system)),t.burglar_alarm_system_type&&(r.burglar_alarm_system_type=t.burglar_alarm_system_type),t.smoke_detectors!==null&&t.smoke_detectors!==void 0&&(r.smoke_detectors=Z(t.smoke_detectors)),t.sprinkler_system!==null&&t.sprinkler_system!==void 0&&(r.sprinkler_system=Z(t.sprinkler_system)),t.sprinkler_system_type&&(r.sprinkler_system_type=t.sprinkler_system_type),t.gas_leakage_detector!==null&&t.gas_leakage_detector!==void 0&&(r.gas_leakage_detector=Z(t.gas_leakage_detector)),t.deadbolt_locks!==null&&t.deadbolt_locks!==void 0&&(r.deadbolt_locks=Z(t.deadbolt_locks)),t.fire_extinguisher!==null&&t.fire_extinguisher!==void 0&&(r.fire_extinguisher=Z(t.fire_extinguisher)),t.order_credit_authorized!==null&&t.order_credit_authorized!==void 0&&(r.order_credit_authorized=Z(t.order_credit_authorized)),t.has_health_insurance_auto_accident!==null&&t.has_health_insurance_auto_accident!==void 0&&(r.has_health_insurance_auto_accident=Z(t.has_health_insurance_auto_accident)),t.is_corporation!==null&&t.is_corporation!==void 0&&(r.is_corporation=Z(t.is_corporation)),t.named_insured_foreclosure_repo_bankruptcy!==null&&t.named_insured_foreclosure_repo_bankruptcy!==void 0&&(r.named_insured_foreclosure_repo_bankruptcy=Z(t.named_insured_foreclosure_repo_bankruptcy)),t.named_insured_convicted_insurance_fraud!==null&&t.named_insured_convicted_insurance_fraud!==void 0&&(r.named_insured_convicted_insurance_fraud=Z(t.named_insured_convicted_insurance_fraud));const i={};if(t.vehicles)for(const s of t.vehicles)s.quote_vehicle_id&&s.vin&&(i[s.quote_vehicle_id]=s.vin);return t.drivers&&t.drivers.length>0?(r.drivers="Yes",r.drivers__items=t.drivers.map(s=>{const a=s,c={};a.first_name&&(c.first_name=a.first_name),a.middle_name&&(c.middle_name=a.middle_name),a.last_name&&(c.last_name=a.last_name),a.date_of_birth&&(c.date_of_birth=Be(a.date_of_birth)),a.gender&&(c.gender=a.gender),a.marital_status&&(c.marital_status=a.marital_status),a.relationship_to_insured&&(c.relationship_to_insured=a.relationship_to_insured),a.is_registered_owner!==null&&a.is_registered_owner!==void 0&&(c.is_registered_owner=a.is_registered_owner?"Yes":"No"),a.license_state&&(c.license_state=a.license_state),a.license_status&&(c.license_status=a.license_status),a.license_number&&(c.license_number=a.license_number),a.date_first_licensed&&(c.date_first_licensed=Be(a.date_first_licensed)),a.education_level&&(c.education_level=La(a.education_level)),a.occupation&&(c.occupation=xa(a.occupation)),a.industry&&(c.industry=nn(a.industry)),a.employment_status&&(c.employment_status=a.employment_status),a.last_5_years_license_suspended_or_revoked!==null&&a.last_5_years_license_suspended_or_revoked!==void 0&&(c.last_5_years_license_suspended_or_revoked=Z(a.last_5_years_license_suspended_or_revoked)),a.accident_prevention_course!==null&&a.accident_prevention_course!==void 0&&(c.accident_prevention_course=Z(a.accident_prevention_course)),a.accident_prevention_course_date&&(c.accident_prevention_course_date=Be(a.accident_prevention_course_date)),a.sr22!==null&&a.sr22!==void 0&&(c.sr22=Z(a.sr22));const l=a.ssn_display;typeof l=="string"&&(c.ssn_display=l);const d=a.driver_violations;d&&d.length>0&&(c.driver_violations="Yes",c.driver_violations__items=d.map(m=>{const g={};return m.code&&(g.code=m.code),m.occurred_at&&(g.occurred_at=Be(m.occurred_at)),g}));const f=a.driver_accidents;f&&f.length>0&&(c.driver_accidents="Yes",c.driver_accidents__items=f.map(m=>{const g={};return m.occurred_at&&(g.occurred_at=Be(m.occurred_at)),m.description&&(g.description=m.description),m.quote_vehicle_id&&(g.quote_vehicle_id=i[m.quote_vehicle_id]??m.quote_vehicle_id),m.property_damage_amount_paid_cents!==null&&m.property_damage_amount_paid_cents!==void 0&&(g.property_damage_amount_paid_cents=m.property_damage_amount_paid_cents),m.personal_injury_amount_paid_cents!==null&&m.personal_injury_amount_paid_cents!==void 0&&(g.personal_injury_amount_paid_cents=m.personal_injury_amount_paid_cents),g}));const _=a.losses;return _&&_.length>0&&(c.losses="Yes",c.losses__items=_.map(m=>{const g={};return m.description&&(g.description=m.description),m.date_of_incident&&(g.date_of_incident=Be(m.date_of_incident)),m.amount_paid_cents!==null&&m.amount_paid_cents!==void 0&&(g.amount_paid_cents=m.amount_paid_cents),m.quote_vehicle_id&&(g.quote_vehicle_id=i[m.quote_vehicle_id]??m.quote_vehicle_id),g})),c})):r.drivers="No",t.vehicles&&t.vehicles.length>0?(r.vehicles="Yes",r.vehicles__items=t.vehicles.map(s=>{const a=s,c={};a.vin&&(c.vin=a.vin),a.year!==null&&a.year!==void 0&&(c.year=String(a.year)),a.make&&(c.make=a.make),a.model&&(c.model=a.model),a.body_style&&(c.body_style=a.body_style),a.ownership_type&&(c.ownership_type=a.ownership_type),a.usage&&(c.usage=a.usage),a.annual_mileage!==null&&a.annual_mileage!==void 0&&(c.annual_mileage=a.annual_mileage),a.miles_to_work!==null&&a.miles_to_work!==void 0&&(c.miles_to_work=a.miles_to_work),a.percent_to_work!==null&&a.percent_to_work!==void 0&&(c.percent_to_work=a.percent_to_work);const l=[];return a.garaging_address_line_1&&l.push(a.garaging_address_line_1),a.garaging_address_line_2&&l.push(a.garaging_address_line_2),a.garaging_address_city&&l.push(a.garaging_address_city),a.garaging_address_state&&l.push(a.garaging_address_state),a.garaging_address_postal_code&&l.push(a.garaging_address_postal_code),l.length>0&&(c.garaging_address=l.join(", ")),a.new_when_purchased!==null&&a.new_when_purchased!==void 0&&(c.new_when_purchased=Z(a.new_when_purchased)),a.purchase_date&&(c.purchase_date=Be(a.purchase_date)),a.anti_theft_type&&(c.anti_theft_type=a.anti_theft_type),a.passive_restraint_type&&(c.passive_restraint_type=a.passive_restraint_type),a.anti_lock_brakes!==null&&a.anti_lock_brakes!==void 0&&(c.anti_lock_brakes=Z(a.anti_lock_brakes)),a.daytime_running_lights!==null&&a.daytime_running_lights!==void 0&&(c.daytime_running_lights=Z(a.daytime_running_lights)),a.custom_equipment_value_cents!==null&&a.custom_equipment_value_cents!==void 0&&(c.custom_equipment_value_cents=a.custom_equipment_value_cents),a.cost_new_value_cents!==null&&a.cost_new_value_cents!==void 0&&(c.cost_new_value_cents=a.cost_new_value_cents),a.stated_value_amount_cents!==null&&a.stated_value_amount_cents!==void 0&&(c.stated_value_amount_cents=a.stated_value_amount_cents),a.vehicle_has_modifications!==null&&a.vehicle_has_modifications!==void 0&&(c.vehicle_has_modifications=Z(a.vehicle_has_modifications)),a.vehicle_garaged_at_residence!==null&&a.vehicle_garaged_at_residence!==void 0&&(c.vehicle_garaged_at_residence=Z(a.vehicle_garaged_at_residence)),a.vehicle_comp_deductible&&(c.vehicle_comp_deductible=a.vehicle_comp_deductible),a.vehicle_coll_deductible&&(c.vehicle_coll_deductible=a.vehicle_coll_deductible),a.vehicle_towing_and_labor&&(c.vehicle_towing_and_labor=a.vehicle_towing_and_labor),a.vehicle_transportation_expense&&(c.vehicle_transportation_expense=a.vehicle_transportation_expense),a.vehicle_full_glass!==null&&a.vehicle_full_glass!==void 0&&(c.vehicle_full_glass=Z(a.vehicle_full_glass)),a.vehicle_loan_lease!==null&&a.vehicle_loan_lease!==void 0&&(c.vehicle_loan_lease=Z(a.vehicle_loan_lease)),a.coverages&&a.coverages.length>0&&(c.coverages__items=a.coverages.map(d=>{const f={};return d.type&&(f.type=d.type),d.per_person_limit_cents!==null&&d.per_person_limit_cents!==void 0&&(f.per_person_limit_cents=d.per_person_limit_cents),d.per_incident_limit_cents!==null&&d.per_incident_limit_cents!==void 0&&(f.per_incident_limit_cents=d.per_incident_limit_cents),d.per_incident_limit_percent!==null&&d.per_incident_limit_percent!==void 0&&(f.per_incident_limit_percent=d.per_incident_limit_percent),d.per_day_limit_cents!==null&&d.per_day_limit_cents!==void 0&&(f.per_day_limit_cents=d.per_day_limit_cents),d.deductible_cents!==null&&d.deductible_cents!==void 0&&(f.deductible_cents=d.deductible_cents),d.is_declined!==null&&d.is_declined!==void 0&&(f.is_declined=Z(d.is_declined)),f})),a.vehicle_lienholders&&a.vehicle_lienholders.length>0&&(c.vehicle_lienholders__items=a.vehicle_lienholders.map(d=>{const f={};return d.name&&(f.name=d.name),d.type&&(f.type=d.type),d.line_1&&(f.line_1=d.line_1),d.line_2&&(f.line_2=d.line_2),d.city&&(f.city=d.city),d.state&&(f.state=d.state),d.postal_code&&(f.postal_code=d.postal_code),d.phone&&(f.phone=d.phone),d.fax&&(f.fax=d.fax),f})),c})):r.vehicles="No",t.losses&&t.losses.length>0?(r.home_losses="Yes",r.home_losses__items=t.losses.map(s=>{const a={};return s.description&&(a.description=s.description),s.date_of_incident&&(a.date_of_incident=Be(s.date_of_incident)),s.amount_paid_cents!==null&&s.amount_paid_cents!==void 0&&(a.amount_paid_cents=Math.round(Number(s.amount_paid_cents)/100)),a})):r.home_losses="No",r}const xc=new Set(["Zip","Product","Driver","Vehicle"]);function Fb(e){return e?Array.isArray(e.drivers__items)?e.drivers__items.length:Array.isArray(e.drivers)?e.drivers.length:null:null}function Fc(e,t){const r=Fb(t),n=e.filter(i=>i.key!=="AutoPolicy"),o=n.length>0?n:e;return o}function mn(e){const t={},r=l=>{if(typeof l=="string"){if(l==="Yes")return!0;if(l==="No")return!1}return l},n=Object.keys(e).filter(l=>!l.includes("__items")),o=new Set,i=new Set;for(const[l,d]of Object.entries(e))if(l.endsWith("__items")&&Array.isArray(d)){const f=l.replace("__items","");i.add(f),n.includes(f)&&d.forEach(_=>{typeof _=="object"&&_!==null&&Object.keys(_).forEach(m=>{o.add(m)})})}for(const[l,d]of Object.entries(e))if(l.endsWith("__items")){const f=l.replace("__items","");if(n.includes(f)){const m=Array.isArray(d)?d.map(g=>mn(g)):d;t[f]=m}}else if(!l.includes("__items")){if(i.has(l))continue;o.has(l)||(t[l]=r(d))}const s=t.auto_prior_carrier_name;if(typeof s=="string"&&s.trim()!==""){const l=s==="NoPriorInsurance";t.auto_has_prior_insurance=!l,l&&(delete t.auto_prior_years,delete t.auto_prior_months,delete t.auto_prior_expiration_date,delete t.auto_prior_liability_limit,delete t.auto_continuous_coverage_years,delete t.auto_cancelled_declined_refused_to_renew,delete t.auto_current_annual_premium_cents)}const a=t.home_prior_carrier_name;if(typeof a=="string"&&a.trim()!==""){const l=a==="NoPriorInsurance";t.home_has_prior_insurance=!l,l&&(delete t.home_prior_years,delete t.home_continuous_coverage_years,delete t.home_prior_expiration_date,delete t.property_insurance_cancelled)}Array.isArray(t.drivers)&&(t.drivers=t.drivers.map(l=>{if(!l||typeof l!="object")return l;const d={...l};return d.industry=nn(d.industry),d.education_level=La(d.education_level),d.occupation=xa(d.occupation),d})),console.log("[DEBUG_TRANSFORM] transformed.drivers type:",typeof t.drivers,"isArray:",Array.isArray(t.drivers),Array.isArray(t.drivers)?`count=${t.drivers.length}`:`value=${JSON.stringify(t.drivers)?.slice(0,100)}`),Array.isArray(t.drivers)&&t.drivers.forEach((l,d)=>{const f=l;console.log(`[DEBUG_TRANSFORM] Driver ${d}:`,{first_name:f.first_name,gender:f.gender,marital_status:f.marital_status,education_level:f.education_level,industry:f.industry,occupation:f.occupation,sr22:f.sr22,keys:Object.keys(f)})});const c=21474836;if("sale_price_cents"in t){const l=t.sale_price_cents;if(typeof l=="number"&&Number.isFinite(l)){const d=Math.trunc(l);if(d>=1){const f=Math.min(d,c);t.sale_price_cents=f*100}}}return Array.isArray(t.home_losses)&&(t.home_losses=t.home_losses.map(l=>{if(!l||typeof l!="object")return l;const d=l,f=d.amount_paid_cents;if(typeof f!="number"||!Number.isFinite(f))return d;const _=Math.trunc(f),m=Math.min(Math.max(_,0),c);return{...d,amount_paid_cents:m*100}})),t}function $b(e,t){const r=e.findIndex(o=>o.key===t);return r<0?t:e[r+1]?.key??t}function $c(e){return e.some(t=>String(t.key)==="BundlePolicy"||String(t.key)==="BundleCustomer")}function Bc(e){return $c(e)?"Bundle":e.some(t=>String(t.key)==="Vehicle"||String(t.key)==="Driver")?"Auto":"Home"}const Bb={Auto:45e3,Home:5e4,Bundle:1e5};function Rb(e,t){if(e!=="AutoCurrentCarrier")return t;const r=t.some(i=>String(i.key)==="auto_cancelled_declined_refused_to_renew"),n=t.some(i=>String(i.key)==="vehicle_policy_selections"),o=[...t];return r||o.push({question:"Has any auto insurance company cancelled, declined or refused to renew you in the last 5 years?",inputType:"radio",options:["Yes","No"],key:"auto_cancelled_declined_refused_to_renew",required:!0}),n||o.push({question:"Vehicle coverage selections",inputType:"custom",key:"vehicle_policy_selections",required:!1}),o}function Ub(e,t){if(e!=="Vehicle")return t;const r=n=>n.map(o=>{const i=o.conditionals?.map(s=>{const a=s.conditionalQuestions??[];return a.length?{...s,conditionalQuestions:r(a)}:s});return String(o.key)!=="vin"?i?{...o,conditionals:i}:o:{...o,required:!1,...i?{conditionals:i}:{}}});return r(t)}function Hb({isOpen:e,onClose:t}){const[r,n]=y.useState([]),[o,i]=y.useState(null),s=y.useRef(null);y.useEffect(()=>{s.current=o},[o]);const[a,c]=y.useState(null),[l,d]=y.useState(!1),[f,_]=y.useState(!1),[m,g]=y.useState([]),b=y.useRef(null),[G,x]=y.useState(null),[B,D]=y.useState(void 0),[z,E]=y.useState(!1),[j,K]=y.useState(null),[R,ee]=y.useState(null),[te,ce]=y.useState(!1),[Se,De]=y.useState(!1),Re=y.useRef(!1);y.useEffect(()=>{if(!l||f)return;const F=Bc(r);let H=!1;const S=[];let h=0,p=0;const C=24,A=3,k=5e3;let N=!1;const P=async()=>{if(H)return;h++;try{const{quote:w}=await tc();if(H)return;if(p=0,!N){const M=w?.appetites??null,Y=Ab(M,F);Y.length>0&&(g(Y),N=!0)}const I=w?.rates_status??null;if(I==="completed"){const{rates:M}=await Fo();if(H)return;b.current=M,_(!0);return}if(I==="no_rates"){b.current=[],_(!0);return}if(I==="failed"){er(new Error("Quote failed: rate-generation worker reported rates_status=failed"),{quoteId:s.current??void 0,phase:"rates_status_failed"}),K({message:"submission_failed"}),d(!1);return}}catch(w){if(p++,console.warn("Provider polling: getQuote failed",{attempt:h,consecutiveFailures:p,error:w}),p>=A){w?.__sentryReported||er(w,{quoteId:s.current??void 0,phase:"rates_polling",message:`Quote failed: ${A} consecutive get-quote poll failures`}),K({message:"submission_failed"}),d(!1);return}}if(H)return;if(h>=C){er(new Error(`Quote failed: rate-generation timed out after ${C} polls`),{quoteId:s.current??void 0,phase:"rates_polling_timeout"}),K({message:"submission_failed"}),d(!1);return}const L=window.setTimeout(P,k);S.push(L)};return P(),()=>{H=!0,S.forEach(L=>window.clearTimeout(L))}},[l,f,r]);function Q(F){const H={Zip:"ZIP Code",Email:"Email",Product:"Product & Address",Home:"Home Details",Vehicle:"Vehicle",Name:"Name & DOB",Driver:"Operator",AutoCurrentCarrier:"Policy",HomeCurrentCarrier:"Policy",HomePolicy:"Policy",BundlePolicy:"Policy",Demographics:"Applicant",Ssn:"SSN",Phone:"Phone",SMSVerification:"Verify",AutoPolicy:"Policy",Customer:"Applicant",HomeCustomer:"Applicant",BundleCustomer:"Applicant",HomeConstruction:"Structure",HomeFeatures:"Features"};return F.map(h=>({key:h,title:H[h]||h,loadQuestions:async()=>{const p=await L0(h,s.current??void 0);let C=Rb(h,p.questions);return C=Ub(h,C),C}}))}y.useEffect(()=>{const F=async()=>{try{const H=Lb();if(H)try{const{token:h,quoteId:p}=await $0(H);h&&p&&(Lo(h),$a(p))}catch(h){h.statusCode===401&&De(!0)}const S=Ba();if(xo(),S){E(!0),i(S);try{const h=rr(),p=await tc(h?void 0:S);if(!p||!p.quote)throw new Error("Invalid response from getQuote: missing quote data");const{quote:C}=p,{stages:A}=await ln(S),k=Q(A);n(k);let N;try{N=xb(C),x(N)}catch(w){throw new Error(`Failed to transform quote data: ${w instanceof Error?w.message:"Unknown error"}`)}const P=Fc(k,N);n(P);const L=C?.rates_status??null;if(rr()){if(L==="completed")try{const{rates:w}=await Fo();c(w);return}catch(w){console.warn("Failed to fetch completed rates on resume",w)}else if(L==="no_rates"){c([]);return}else if(L==="processing"){g([]),_(!1),b.current=null,d(!0);return}}if(C.current_stage){const w=C.current_stage==="State"?"Product":C.current_stage,I=P.findIndex(M=>M.key===w);I>=0?D(I):D(P.length-1)}else D(P.length-1)}catch(h){const p=h;if(p.statusCode===404)Ra(),i(null);else if(p.statusCode===401){Xa();try{const{stages:C}=await ln(S),A=Q(C);n(A);const k=A.findIndex(N=>N.key==="SMSVerification");k>=0&&D(k)}catch{}}}finally{E(!1)}}else{const{stages:h}=await ln();n(Q(h))}}catch{E(!1)}};e&&!Re.current&&(Re.current=!0,F())},[e]),y.useEffect(()=>{if(!e)return;const{overflow:F}=document.body.style;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=F}},[e]);const O=y.useCallback(F=>{F.key==="Escape"&&(fc(),t())},[t]);y.useEffect(()=>{if(e)return window.addEventListener("keydown",O),()=>window.removeEventListener("keydown",O)},[e,O]),y.useEffect(()=>{e||(x(null),D(void 0),E(!1),d(!1),ee(null),ce(!1))},[e]),y.useEffect(()=>{e&&db()},[e]),y.useEffect(()=>{a&&Array.isArray(a)&&_b({rateCount:a.length})},[a]);const T=y.useCallback(()=>{K(null),D(Math.max(0,r.length-1))},[r.length]),V=y.useCallback(async F=>{if(!(!R||!o||te)){ce(!0);try{const S={...mn(R.allValues),communications_consent:F};g([]),_(!1),b.current=null,d(!0),ee(null);let h;try{h=await nr(S,!0)}catch(A){throw d(!1),A}if(h.status==="submission_failed"){er(new Error(`Quote failed at submission: ${h.message}`),{quoteId:o??void 0,phase:"consent_submit"}),d(!1),_(!1),b.current=null,K({message:h.message});return}if(h.status==="success")try{const{rates:A}=await Fo();b.current=A,_(!0)}catch(A){throw d(!1),A}const p=r.length,C=r[p-1];pc({stageKey:C?.key??"unknown",stageTitle:C?.title??"unknown",stepIndex:p,totalSteps:p}),pb()}catch(H){H?.__sentryReported||er(H,{quoteId:o??void 0,phase:"consent_submit"}),d(!1),K({message:"Oops, something went wrong. Please try again later."})}finally{ce(!1)}}},[R,o,te,r]);if(!e)return null;const X=()=>{fc(),t()};return u.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center",role:"dialog","aria-modal":"true","aria-labelledby":"insurance-modal-title",children:[u.jsx("div",{className:"backdrop","aria-hidden":"true"}),u.jsxs("div",{className:"modal-panel bg-white relative w-full max-w-2xl flex flex-col max-h-[90vh] overflow-hidden",role:"document",children:[u.jsx("button",{onClick:X,className:"modal-close-btn absolute top-4 right-4 text-slate-400 hover:text-slate-600 text-xl","aria-label":"Close",type:"button",children:"×"}),!l&&!j&&u.jsx("div",{className:"text-center mb-6",children:u.jsx("h2",{id:"insurance-modal-title",className:"h1-title",children:"Let's shop multiple leading carriers for you."})}),u.jsxs("div",{className:"panel-body flex-1 min-h-0 overflow-y-auto",children:[Se&&u.jsxs("div",{className:"mb-4 flex items-start justify-between gap-3 rounded-md border border-amber-300 bg-amber-50 px-4 py-3 text-sm text-amber-800",role:"alert",children:[u.jsx("span",{children:"This resume link has expired or is no longer valid. For your security, emailed links only work for a limited time — you can continue your quote below."}),u.jsx("button",{type:"button",onClick:()=>De(!1),className:"shrink-0 font-bold text-amber-800 hover:text-amber-900","aria-label":"Dismiss",children:"×"})]}),j&&u.jsx(Pc,{onGoBack:T}),!j&&l&&(()=>{const F=Bc(r);return u.jsx(Mb,{providers:m,totalTime:Bb[F],flow:F,isComplete:f,onComplete:()=>{d(!1),_(!1),g([]),b.current&&(c(b.current),b.current=null)}})})(),!j&&!l&&R&&u.jsx(mp,{onChoose:V,isSubmitting:te}),!j&&!a&&!l&&!R&&u.jsx(u.Fragment,{children:z||r.length===0?u.jsx("div",{className:"flex items-center justify-center py-12",children:u.jsx("div",{className:"text-slate-600",children:"Loading..."})}):u.jsx(Sb,{stages:r,initialValues:G??void 0,initialActive:B,quoteId:o??void 0,nonTerminalStageKeys:xc,onStageComplete:async(F,H)=>{try{const S=mn(F);let h=o,p=r;const C=p.findIndex(N=>N.key===H),A=p[C],k=$b(p,H);if(h)if(H==="Phone"){const N=S.phone;if(!N)throw new Error("Phone number is required.");const P=rr();await nr({...S,current_stage:k},!1,P?void 0:h),await F0(h,N)}else if(H==="SMSVerification"){const{isVerified:N,token:P}=await ec(h,S.sms_code);if(!N)throw new Error("Invalid SMS code");P&&Lo(P),await nr({current_stage:k},!1)}else if(H==="Product"){const N=rr(),{isSupported:P}=await B0(S.state,N?void 0:h??void 0);if(!P)throw new Error("State is not supported");await nr({...S,current_stage:k},!1,N?void 0:h)}else{const N=rr();await nr({...S,current_stage:k},!1,N?void 0:h||void 0)}else{const N=S.postal_code??"";if(!N)throw new Error("ZIP code is required to start a quote.");const L=(await x0(N))?.quoteId;if(!L||typeof L!="string"||L.trim()==="")throw new Error(`Failed to create quote - invalid quoteId returned: ${L}`);h=L,i(L),$a(L),await nr({...S,current_stage:k},!1,L)}if(xc.has(H))try{const{stages:N}=await ln(h||void 0);p=Q(N),p=Fc(p,F),n(p)}catch(N){console.warn("Unable to refresh stages after flow-shaping step",N)}return pc({stageKey:H,stageTitle:A?.title??H,stepIndex:C+1,totalSteps:p.length}),{success:!0,latestStages:p}}catch(S){return{success:!1,error:S instanceof Error?S.message:"An error occurred"}}},onComplete:async(F,H)=>{if(!o)return{success:!1,error:"Oops, something went wrong. Please try again later."};x(F);try{if(H==="SMSVerification"){const S=mn(F),{isVerified:h,token:p}=await ec(o,S.sms_code);return h?(p&&Lo(p),ee({allValues:F}),{success:!0}):{success:!1,error:"Invalid SMS code"}}return ee({allValues:F}),{success:!0}}catch{const h="Oops, something went wrong. Please try again later.";return K({message:h}),{success:!1,error:h}}}})})," ",!j&&a&&o&&u.jsx(Nb,{rates:a,onBack:()=>c(null),isBundleFlow:$c(r)})]}),u.jsx("div",{className:"mt-4 pt-4 border-t border-slate-200 space-y-1",children:u.jsx("p",{className:"text-center text-sm text-slate-500",children:"Insurance products offered through Credify Corporation, a licensed insurance agency."})})]})]})}function zb({onClose:e}){return u.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center",role:"dialog","aria-modal":"true",children:[u.jsx("div",{className:"backdrop","aria-hidden":"true"}),u.jsx("div",{className:"modal-panel bg-white relative w-full max-w-2xl p-6",children:u.jsx(Pc,{onGoBack:e})})]})}function jb({isOpen:e}){const t=()=>gn.close();return u.jsx(io,{fallback:u.jsx(zb,{onClose:t}),children:u.jsx(Hb,{isOpen:e,onClose:t})})}var Go={};function Wb(){try{return typeof Go<"u"&&Go?Go:{}}catch{return{}}}let Rc=!1;function Gb(e,t){if(!e)return t;const r=Number(e);return Number.isFinite(r)&&r>=0&&r<=1?r:t}function Zb(e={}){if(Rc)return!0;if(typeof window>"u")return!1;const t=Wb(),r=e.dsn??t.dsn;return!r||e.enabled===!1?!1:(C0({baseUrl:Oe}),Xf({dsn:r,environment:e.environment??t.environment??"production",release:e.release??t.release,sendDefaultPii:!1,maxBreadcrumbs:50,tracesSampleRate:e.tracesSampleRate??Gb(t.tracesSampleRate,.1),tracePropagationTargets:[Oe],replaysSessionSampleRate:0,replaysOnErrorSampleRate:1,beforeSend:n=>Va(n),beforeBreadcrumb:n=>n&&(Va({breadcrumbs:[n]}),n)}),Rc=!0,Jf("replayIntegration").then(n=>{try{Uu(n({maskAllText:!0,maskAllInputs:!0,blockAllMedia:!0,networkDetailAllowUrls:[Oe],networkCaptureBodies:!1}))}catch{}}).catch(()=>{}),!0)}let ct=null,$t=null,hn=!1;function Yb(){ct||(ct=document.createElement("div"),ct.id="insurance-widget-root",document.documentElement.appendChild(ct)),!$t&&ct&&($t=zc.createRoot(ct))}function Zo(){Yb(),$t&&$t.render(y.createElement(jb,{isOpen:hn}))}function Vb(){$t&&ct&&($t.unmount(),ct.remove()),$t=null,ct=null,ub()}const gn={init:e=>{Zb(e?.sentry),Db(),hn=!!e?.autoOpen||Pb(),Zo()},open:()=>{hn=!0,Zo()},close:()=>{hn=!1,Zo()},destroy:Vb,on:cb,off:lb};typeof window<"u"&&(window.CredifyInsuranceWidget=gn),Ye.CredifyInsuranceWidget=gn,Ye.default=gn,Object.defineProperties(Ye,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
76
99
  //# sourceMappingURL=index.umd.js.map