@getcredify/credify-insurance-widget 1.31.6 → 1.32.1
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/credify-insurance-widget.css +1 -1
- package/dist/iframe/assets/iframe-BjN3pgJS.js +146 -0
- package/dist/iframe/assets/iframe-BjN3pgJS.js.map +1 -0
- package/dist/iframe/assets/iframe-CLDykC6L.css +1 -0
- package/dist/iframe/iframe.html +2 -2
- package/dist/index.es.js +4711 -4400
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +27 -27
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/iframe/assets/iframe-CJuf7ZZS.css +0 -1
- package/dist/iframe/assets/iframe-MX4eLVwP.js +0 -146
- package/dist/iframe/assets/iframe-MX4eLVwP.js.map +0 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,66 +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-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-2xl:42rem;--container-4xl:56rem;--container-6xl:72rem;--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;--tracking-widest:.1em;--leading-snug:1.375;--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}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.top-4{top:calc(var(--spacing)*4)}.right-4{right:calc(var(--spacing)*4)}.bottom-full{bottom:100%}.left-1\\/2{left:50%}.z-0{z-index:0}.z-10{z-index:10}.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-1{margin-inline:calc(var(--spacing)*1)}.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-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.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-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-60{width:calc(var(--spacing)*60)}.w-auto{width:auto}.w-full{width:100%}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-\\[7rem\\]{max-width:7rem}.max-w-full{max-width:100%}.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}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.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}.list-disc{list-style-type:disc}.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-baseline{align-items:baseline}.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-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.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-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*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-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-slate-300{border-color:var(--color-slate-300)}.border-transparent{border-color:#0000}.border-t-slate-600{border-top-color:var(--color-slate-600)}.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-200{background-color:var(--color-slate-200)}.bg-slate-400{background-color:var(--color-slate-400)}.bg-slate-800{background-color:var(--color-slate-800)}.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-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-6{padding-top:calc(var(--spacing)*6)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pl-5{padding-left:calc(var(--spacing)*5)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.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))}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.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)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.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-0{opacity:0}.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))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.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}.group-focus-within\\:opacity-100:is(:where(.group):focus-within *){opacity:1}@media (hover:hover){.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.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\\:bg-slate-100:hover{background-color:var(--color-slate-100)}.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\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.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\\:ring-slate-400:focus-visible{--tw-ring-color:var(--color-slate-400)}.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}.disabled\\:opacity-60:disabled{opacity:.6}@media (min-width:40rem){.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:64rem){.lg\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:80rem){.xl\\:grid-cols-4{grid-template-columns:repeat(4,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-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@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-leading{syntax:"*";inherits:false}@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-duration{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-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--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-leading:initial;--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-duration:initial;--tw-ease:initial}}}`)),document.head.appendChild(t)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
2
|
-
(function(){if(typeof Ze>"u")var Ze={env:{}}})();(function(Ze,
|
|
3
|
-
`);for(let a=n;a<s.length;a++){const c=s[a];if(c.length>1024)continue;const u=
|
|
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-100:oklch(96.2% .059 95.617);--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-2xl:42rem;--container-4xl:56rem;--container-6xl:72rem;--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;--tracking-widest:.1em;--leading-snug:1.375;--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}.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-4{top:calc(var(--spacing)*4)}.right-4{right:calc(var(--spacing)*4)}.bottom-full{bottom:100%}.left-1\\/2{left:50%}.z-0{z-index:0}.z-10{z-index:10}.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-1{margin-inline:calc(var(--spacing)*1)}.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}.table{display:table}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.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-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-60{width:calc(var(--spacing)*60)}.w-auto{width:auto}.w-full{width:100%}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-\\[7rem\\]{max-width:7rem}.max-w-full{max-width:100%}.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}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.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}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.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-baseline{align-items:baseline}.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-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.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-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}: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-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*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-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-slate-300{border-color:var(--color-slate-300)}.border-transparent{border-color:#0000}.border-t-slate-600{border-top-color:var(--color-slate-600)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-50\\/40{background-color:#fffbeb66}@supports (color:color-mix(in lab,red,red)){.bg-amber-50\\/40{background-color:color-mix(in oklab,var(--color-amber-50)40%,transparent)}}.bg-amber-100{background-color:var(--color-amber-100)}.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-200{background-color:var(--color-slate-200)}.bg-slate-400{background-color:var(--color-slate-400)}.bg-slate-800{background-color:var(--color-slate-800)}.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-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-6{padding-top:calc(var(--spacing)*6)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pl-5{padding-left:calc(var(--spacing)*5)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.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))}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.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)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.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-0{opacity:0}.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))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.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}.group-focus-within\\:opacity-100:is(:where(.group):focus-within *){opacity:1}@media (hover:hover){.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.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\\:bg-slate-100:hover{background-color:var(--color-slate-100)}.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\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.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\\:ring-slate-400:focus-visible{--tw-ring-color:var(--color-slate-400)}.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}.disabled\\:opacity-60:disabled{opacity:.6}@media (min-width:40rem){.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:64rem){.lg\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:80rem){.xl\\:grid-cols-4{grid-template-columns:repeat(4,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:flex-start;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;flex-shrink:0;place-items:center;width:1.25rem;height:1.25rem;margin-top:.125rem;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-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@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-leading{syntax:"*";inherits:false}@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-duration{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-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--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-leading:initial;--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-duration:initial;--tw-ease:initial}}}`)),document.head.appendChild(t)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
2
|
+
(function(){if(typeof Ze>"u")var Ze={env:{}}})();(function(Ze,m){typeof exports=="object"&&typeof module<"u"?m(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"],m):(Ze=typeof globalThis<"u"?globalThis:Ze||self,m(Ze.CredifyInsuranceWidget={},Ze.React,Ze.ReactDOM,Ze.React))})(this,(function(Ze,m,El,l){"use strict";function wl(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 Mn=wl(m),fe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ut="8.55.2",ce=globalThis;function Ir(e,t,r){const n=r||ce,o=n.__SENTRY__=n.__SENTRY__||{},i=o[ut]=o[ut]||{};return i[e]||(i[e]=t())}const At=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Cl="Sentry Logger ",Dn=["debug","info","warn","error","log","assert","trace"],Nr={};function Tt(e){if(!("console"in ce))return e();const t=ce.console,r={},n=Object.keys(Nr);n.forEach(o=>{const i=Nr[o];r[o]=t[o],t[o]=i});try{return e()}finally{n.forEach(o=>{t[o]=r[o]})}}function Al(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return At?Dn.forEach(r=>{t[r]=(...n)=>{e&&Tt(()=>{ce.console[r](`${Cl}[${r}]:`,...n)})}}):Dn.forEach(r=>{t[r]=()=>{}}),t}const G=Ir("logger",Al),fi=50,kt="?",pi=/\(error: (.*)\)/,mi=/captureMessage|captureException/;function _i(...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 u=pi.test(c)?c.replace(pi,"$1"):c;if(!u.match(/\S*Error: /)){for(const d of t){const f=d(u);if(f){i.push(f);break}}if(i.length>=fi+o)break}}return kl(i.slice(o))}}function Tl(e){return Array.isArray(e)?_i(...e):e}function kl(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Or(t).function||"")&&t.pop(),t.reverse(),mi.test(Or(t).function||"")&&(t.pop(),mi.test(Or(t).function||"")&&t.pop()),t.slice(0,fi).map(r=>({...r,filename:r.filename||Or(t).filename,function:r.function||kt}))}function Or(e){return e[e.length-1]||{}}const Pn="<anonymous>";function dt(e){try{return!e||typeof e!="function"?Pn:e.name||Pn}catch{return Pn}}function hi(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 Mr={},gi={};function It(e,t){Mr[e]=Mr[e]||[],Mr[e].push(t)}function Nt(e,t){if(!gi[e]){gi[e]=!0;try{t()}catch(r){At&&G.error(`Error while instrumenting ${e}`,r)}}}function et(e,t){const r=e&&Mr[e];if(r)for(const n of r)try{n(t)}catch(o){At&&G.error(`Error while triggering instrumentation handler.
|
|
4
4
|
Type: ${e}
|
|
5
5
|
Name: ${dt(n)}
|
|
6
|
-
Error:`,o)}}let Pn=null;function Al(e){const t="error";It(t,e),Nt(t,Tl)}function Tl(){Pn=ie.onerror,ie.onerror=function(e,t,r,n,o){return Xe("error",{column:n,error:o,line:r,msg:e,url:t}),Pn?Pn.apply(this,arguments):!1},ie.onerror.__SENTRY_INSTRUMENTED__=!0}let Ln=null;function kl(e){const t="unhandledrejection";It(t,e),Nt(t,Il)}function Il(){Ln=ie.onunhandledrejection,ie.onunhandledrejection=function(e){return Xe("unhandledrejection",e),Ln?Ln.apply(this,arguments):!0},ie.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Nr(){return xn(ie),ie}function xn(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||ut,t[ut]=t[ut]||{}}const gi=Object.prototype.toString;function Or(e){switch(gi.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Ot(e,Error)}}function zt(e,t){return gi.call(e)===`[object ${t}]`}function yi(e){return zt(e,"ErrorEvent")}function bi(e){return zt(e,"DOMError")}function Nl(e){return zt(e,"DOMException")}function it(e){return zt(e,"String")}function Fn(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function $n(e){return e===null||Fn(e)||typeof e!="object"&&typeof e!="function"}function jt(e){return zt(e,"Object")}function Mr(e){return typeof Event<"u"&&Ot(e,Event)}function Ol(e){return typeof Element<"u"&&Ot(e,Element)}function Ml(e){return zt(e,"RegExp")}function Dr(e){return!!(e&&e.then&&typeof e.then=="function")}function Dl(e){return jt(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Ot(e,t){try{return e instanceof t}catch{return!1}}function vi(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}const Bn=ie,Pl=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 u;const d=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||Pl;for(;r&&i++<n&&(u=Ll(r,d),!(u==="html"||i>1&&s+o.length*c+u.length>=f));)o.push(u),s+=u.length,r=r.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function Ll(e,t){const r=e,n=[];if(!r||!r.tagName)return"";if(Bn.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&&it(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 xl(){try{return Bn.document.location.href}catch{return""}}function Fl(e){if(!Bn.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 Wt(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Ei(e,t){if(!Array.isArray(e))return"";const r=[];for(let n=0;n<e.length;n++){const o=e[n];try{vi(o)?r.push("[VueViewModel]"):r.push(String(o))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function $l(e,t,r=!1){return it(e)?Ml(t)?t.test(e):it(t)?r?e===t:e.includes(t):!1:!1}function Pr(e,t=[],r=!1){return t.some(n=>$l(e,n,r))}function He(e,t,r){if(!(t in e))return;const n=e[t],o=r(n);typeof o=="function"&&wi(o,n);try{e[t]=o}catch{At&&j.log(`Failed to replace method "${t}" in object`,e)}}function Mt(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{At&&j.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function wi(e,t){try{const r=t.prototype||{};e.prototype=t.prototype=r,Mt(e,"__sentry_original__",t)}catch{}}function Rn(e){return e.__sentry_original__}function Ci(e){if(Or(e))return{message:e.message,name:e.name,stack:e.stack,...Ti(e)};if(Mr(e)){const t={type:e.type,target:Ai(e.target),currentTarget:Ai(e.currentTarget),...Ti(e)};return typeof CustomEvent<"u"&&Ot(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Ai(e){try{return Ol(e)?Si(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Ti(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 Bl(e,t=40){const r=Object.keys(Ci(e));r.sort();const n=r[0];if(!n)return"[object has no keys]";if(n.length>=t)return Wt(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:Wt(i,t)}return""}function Ye(e){return Un(e,new Map)}function Un(e,t){if(Rl(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]=Un(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(Un(o,t))}),n}return e}function Rl(e){if(!jt(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const ki=1e3;function cr(){return Date.now()/ki}function Ul(){const{performance:e}=ie;if(!e||!e.now)return cr;const t=Date.now()-e.now(),r=e.timeOrigin==null?t:e.timeOrigin;return()=>(r+e.now())/ki}const st=Ul();(()=>{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,u=c<t;return i||u?o<=c?e.timeOrigin:s:n})();function Ve(){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 Ii(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function ft(e){const{message:t,event_id:r}=e;if(t)return t;const n=Ii(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function Hn(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 qt(e,t){const r=Ii(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 Ni(e){if(Hl(e))return!0;try{Mt(e,"__sentry_captured__",!0)}catch{}return!1}function Hl(e){try{return e.__sentry_captured__}catch{}}var at;(function(e){e[e.PENDING=0]="PENDING";const r=1;e[e.RESOLVED=r]="RESOLVED";const n=2;e[e.REJECTED=n]="REJECTED"})(at||(at={}));function Dt(e){return new Ke(t=>{t(e)})}function Lr(e){return new Ke((t,r)=>{r(e)})}class Ke{constructor(t){Ke.prototype.__init.call(this),Ke.prototype.__init2.call(this),Ke.prototype.__init3.call(this),Ke.prototype.__init4.call(this),this._state=at.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(r){this._reject(r)}}then(t,r){return new Ke((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 Ke((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(at.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(at.REJECTED,t)}}__init3(){this._setResult=(t,r)=>{if(this._state===at.PENDING){if(Dr(r)){r.then(this._resolve,this._reject);return}this._state=t,this._value=r,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===at.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(r=>{r[0]||(this._state===at.RESOLVED&&r[1](this._value),this._state===at.REJECTED&&r[2](this._value),r[0]=!0)})}}}function zl(e){const t=st(),r={sid:Ve(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Wl(r)};return e&&Gt(r,e),r}function Gt(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||st(),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:Ve()),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 jl(e,t){let r={};e.status==="ok"&&(r={status:"exited"}),Gt(e,r)}function Wl(e){return Ye({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 Oi(){return Ve()}function zn(){return Ve().substring(16)}function xr(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]=xr(n[o],t[o],r-1));return n}const jn="_sentrySpan";function Mi(e,t){t?Mt(e,jn,t):delete e[jn]}function Di(e){return e[jn]}const ql=100;class Wn{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:Oi(),spanId:zn()}}clone(){const t=new Wn;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,Mi(t,Di(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&&Gt(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 pt?[r.getScopeData(),r.getRequestSession()]:jt(r)?[t,t.requestSession]:[],{tags:i,extra:s,user:a,contexts:c,level:u,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),u&&(this._level=u),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,Mi(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Oi()}),this._notifyScopeListeners(),this}addBreadcrumb(t,r){const n=typeof r=="number"?r:ql;if(n<=0)return this;const o={timestamp:cr(),...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:Di(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=xr(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext={spanId:zn(),...t},this}getPropagationContext(){return this._propagationContext}captureException(t,r){const n=r&&r.event_id?r.event_id:Ve();if(!this._client)return j.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:Ve();if(!this._client)return j.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:Ve();return this._client?(this._client.captureEvent(t,{...r,event_id:n},this),n):(j.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 pt=Wn;function Gl(){return Ar("defaultCurrentScope",()=>new pt)}function Zl(){return Ar("defaultIsolationScope",()=>new pt)}class Yl{constructor(t,r){let n;t?n=t:n=new pt;let o;r?o=r:o=new pt,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 Dr(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 Zt(){const e=Nr(),t=xn(e);return t.stack=t.stack||new Yl(Gl(),Zl())}function Vl(e){return Zt().withScope(e)}function Kl(e,t){const r=Zt();return r.withScope(()=>(r.getStackTop().scope=e,t(e)))}function Pi(e){return Zt().withScope(()=>e(Zt().getIsolationScope()))}function Jl(){return{withIsolationScope:Pi,withScope:Vl,withSetScope:Kl,withSetIsolationScope:(e,t)=>Pi(t),getCurrentScope:()=>Zt().getScope(),getIsolationScope:()=>Zt().getIsolationScope()}}function qn(e){const t=xn(e);return t.acs?t.acs:Jl()}function nt(){const e=Nr();return qn(e).getCurrentScope()}function Pt(){const e=Nr();return qn(e).getIsolationScope()}function Ql(){return Ar("globalScope",()=>new pt)}function Gn(...e){const t=Nr(),r=qn(t);if(e.length===2){const[n,o]=e;return n?r.withSetScope(n,o):r.withScope(o)}return r.withScope(e[0])}function we(){return nt().getClient()}function Xl(e){const t=e.getPropagationContext(),{traceId:r,spanId:n,parentSpanId:o}=t;return Ye({trace_id:r,span_id:n,parent_span_id:o})}const eu="_sentryMetrics";function tu(e){const t=e[eu];if(!t)return;const r={};for(const[,[n,o]]of t)(r[n]||(r[n]=[])).push(Ye(o));return r}const ru="sentry.source",nu="sentry.sample_rate",ou="sentry.op",iu="sentry.origin",su=0,au=1,cu="sentry-",lu=/^sentry-/;function uu(e){const t=du(e);if(!t)return;const r=Object.entries(t).reduce((n,[o,i])=>{if(o.match(lu)){const s=o.slice(cu.length);n[s]=i}return n},{});if(Object.keys(r).length>0)return r}function du(e){if(!(!e||!it(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,r)=>{const n=Li(r);return Object.entries(n).forEach(([o,i])=>{t[o]=i}),t},{}):Li(e)}function Li(e){return e.split(",").map(t=>t.split("=").map(r=>decodeURIComponent(r.trim()))).reduce((t,[r,n])=>(r&&n&&(t[r]=n),t),{})}const fu=1;let xi=!1;function pu(e){const{spanId:t,traceId:r,isRemote:n}=e.spanContext(),o=n?t:Zn(e).parent_span_id,i=n?zn():t;return Ye({parent_span_id:o,span_id:i,trace_id:r})}function Fi(e){return typeof e=="number"?$i(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?$i(e.getTime()):st()}function $i(e){return e>9999999999?e/1e3:e}function Zn(e){if(_u(e))return e.getSpanJSON();try{const{spanId:t,traceId:r}=e.spanContext();if(mu(e)){const{attributes:n,startTime:o,name:i,endTime:s,parentSpanId:a,status:c}=e;return Ye({span_id:t,trace_id:r,data:n,description:i,parent_span_id:a,start_timestamp:Fi(o),timestamp:Fi(s)||void 0,status:gu(c),op:n[ou],origin:n[iu],_metrics_summary:tu(e)})}return{span_id:t,trace_id:r}}catch{return{}}}function mu(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function _u(e){return typeof e.getSpanJSON=="function"}function hu(e){const{traceFlags:t}=e.spanContext();return t===fu}function gu(e){if(!(!e||e.code===su))return e.code===au?"ok":e.message||"unknown_error"}const yu="_sentryRootSpan";function Bi(e){return e[yu]||e}function bu(){xi||(Tt(()=>{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.")}),xi=!0)}function vu(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=we(),r=t&&t.getOptions();return!!r&&(r.enableTracing||"tracesSampleRate"in r||"tracesSampler"in r)}const Yn="production",Su="_frozenDsc";function Ri(e,t){const r=t.getOptions(),{publicKey:n}=t.getDsn()||{},o=Ye({environment:r.environment||Yn,release:r.release,public_key:n,trace_id:e});return t.emit("createDsc",o),o}function Eu(e,t){const r=t.getPropagationContext();return r.dsc||Ri(r.traceId,e)}function wu(e){const t=we();if(!t)return{};const r=Bi(e),n=r[Su];if(n)return n;const o=r.spanContext().traceState,i=o&&o.get("sentry.dsc"),s=i&&uu(i);if(s)return s;const a=Ri(e.spanContext().traceId,t),c=Zn(r),u=c.data||{},d=u[nu];d!=null&&(a.sample_rate=`${d}`);const f=u[ru],m=c.description;return f!=="url"&&m&&(a.transaction=m),vu()&&(a.sampled=String(hu(r))),t.emit("createDsc",a,r),a}function Cu(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){le&&j.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 Au=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Tu(e){return e==="http"||e==="https"}function lr(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 ku(e){const t=Au.exec(e);if(!t){Tt(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[r,n,o="",i="",s="",a=""]=t.slice(1);let c="",u=a;const d=u.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),u=d.pop()),u){const f=u.match(/^\d+/);f&&(u=f[0])}return Ui({host:i,pass:o,path:c,projectId:u,port:s,protocol:r,publicKey:n})}function Ui(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Iu(e){if(!At)return!0;const{port:t,projectId:r,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(j.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:r.match(/^\d+$/)?Tu(n)?t&&isNaN(parseInt(t,10))?(j.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(j.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(j.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function Hi(e){const t=typeof e=="string"?ku(e):Ui(e);if(!(!t||!Iu(t)))return t}function Nu(){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 ct(e,t=100,r=1/0){try{return Vn("",e,t,r)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function zi(e,t=3,r=100*1024){const n=ct(e,t);return Pu(n)>r?zi(e,t-1,r):n}function Vn(e,t,r=1/0,n=1/0,o=Nu()){const[i,s]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=Ou(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 u=t;if(u&&typeof u.toJSON=="function")try{const _=u.toJSON();return Vn("",_,c-1,n,o)}catch{}const d=Array.isArray(t)?[]:{};let f=0;const m=Ci(t);for(const _ in m){if(!Object.prototype.hasOwnProperty.call(m,_))continue;if(f>=n){d[_]="[MaxProperties ~]";break}const h=m[_];d[_]=Vn(_,h,c-1,n,o),f++}return s(t),d}function Ou(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(vi(t))return"[VueViewModel]";if(Dl(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${dt(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const r=Mu(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}}function Mu(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function Du(e){return~-encodeURI(e).split(/%..|./).length}function Pu(e){return Du(JSON.stringify(e))}function ur(e,t=[]){return[e,t]}function Lu(e,t){const[r,n]=e;return[r,[...n,t]]}function ji(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 Kn(e){return ie.__SENTRY__&&ie.__SENTRY__.encodePolyfill?ie.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function xu(e){const[t,r]=e;let n=JSON.stringify(t);function o(i){typeof n=="string"?n=typeof i=="string"?n+i:[Kn(n),i]:n.push(typeof i=="string"?Kn(i):i)}for(const i of r){const[s,a]=i;if(o(`
|
|
6
|
+
Error:`,o)}}let Ln=null;function Il(e){const t="error";It(t,e),Nt(t,Nl)}function Nl(){Ln=ce.onerror,ce.onerror=function(e,t,r,n,o){return et("error",{column:n,error:o,line:r,msg:e,url:t}),Ln?Ln.apply(this,arguments):!1},ce.onerror.__SENTRY_INSTRUMENTED__=!0}let xn=null;function Ol(e){const t="unhandledrejection";It(t,e),Nt(t,Ml)}function Ml(){xn=ce.onunhandledrejection,ce.onunhandledrejection=function(e){return et("unhandledrejection",e),xn?xn.apply(this,arguments):!0},ce.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Dr(){return Fn(ce),ce}function Fn(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||ut,t[ut]=t[ut]||{}}const yi=Object.prototype.toString;function Pr(e){switch(yi.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Ot(e,Error)}}function Wt(e,t){return yi.call(e)===`[object ${t}]`}function bi(e){return Wt(e,"ErrorEvent")}function vi(e){return Wt(e,"DOMError")}function Dl(e){return Wt(e,"DOMException")}function it(e){return Wt(e,"String")}function $n(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Bn(e){return e===null||$n(e)||typeof e!="object"&&typeof e!="function"}function qt(e){return Wt(e,"Object")}function Lr(e){return typeof Event<"u"&&Ot(e,Event)}function Pl(e){return typeof Element<"u"&&Ot(e,Element)}function Ll(e){return Wt(e,"RegExp")}function xr(e){return!!(e&&e.then&&typeof e.then=="function")}function xl(e){return qt(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Ot(e,t){try{return e instanceof t}catch{return!1}}function Si(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}const Un=ce,Fl=80;function Ei(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 u;const d=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||Fl;for(;r&&i++<n&&(u=$l(r,d),!(u==="html"||i>1&&s+o.length*c+u.length>=f));)o.push(u),s+=u.length,r=r.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function $l(e,t){const r=e,n=[];if(!r||!r.tagName)return"";if(Un.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&&it(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 Bl(){try{return Un.document.location.href}catch{return""}}function Ul(e){if(!Un.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 Gt(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function wi(e,t){if(!Array.isArray(e))return"";const r=[];for(let n=0;n<e.length;n++){const o=e[n];try{Si(o)?r.push("[VueViewModel]"):r.push(String(o))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function Hl(e,t,r=!1){return it(e)?Ll(t)?t.test(e):it(t)?r?e===t:e.includes(t):!1:!1}function Fr(e,t=[],r=!1){return t.some(n=>Hl(e,n,r))}function Re(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{At&&G.log(`Failed to replace method "${t}" in object`,e)}}function Mt(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{At&&G.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,Mt(e,"__sentry_original__",t)}catch{}}function Hn(e){return e.__sentry_original__}function Ai(e){if(Pr(e))return{message:e.message,name:e.name,stack:e.stack,...ki(e)};if(Lr(e)){const t={type:e.type,target:Ti(e.target),currentTarget:Ti(e.currentTarget),...ki(e)};return typeof CustomEvent<"u"&&Ot(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Ti(e){try{return Pl(e)?Ei(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function ki(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 Rl(e,t=40){const r=Object.keys(Ai(e));r.sort();const n=r[0];if(!n)return"[object has no keys]";if(n.length>=t)return Gt(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:Gt(i,t)}return""}function Ve(e){return Rn(e,new Map)}function Rn(e,t){if(zl(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]=Rn(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(Rn(o,t))}),n}return e}function zl(e){if(!qt(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const Ii=1e3;function ur(){return Date.now()/Ii}function jl(){const{performance:e}=ce;if(!e||!e.now)return ur;const t=Date.now()-e.now(),r=e.timeOrigin==null?t:e.timeOrigin;return()=>(r+e.now())/Ii}const st=jl();(()=>{const{performance:e}=ce;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,u=c<t;return i||u?o<=c?e.timeOrigin:s:n})();function Ye(){const e=ce,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 Ni(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function ft(e){const{message:t,event_id:r}=e;if(t)return t;const n=Ni(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function zn(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 Zt(e,t){const r=Ni(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 Oi(e){if(Wl(e))return!0;try{Mt(e,"__sentry_captured__",!0)}catch{}return!1}function Wl(e){try{return e.__sentry_captured__}catch{}}var at;(function(e){e[e.PENDING=0]="PENDING";const r=1;e[e.RESOLVED=r]="RESOLVED";const n=2;e[e.REJECTED=n]="REJECTED"})(at||(at={}));function Dt(e){return new Ke(t=>{t(e)})}function $r(e){return new Ke((t,r)=>{r(e)})}class Ke{constructor(t){Ke.prototype.__init.call(this),Ke.prototype.__init2.call(this),Ke.prototype.__init3.call(this),Ke.prototype.__init4.call(this),this._state=at.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(r){this._reject(r)}}then(t,r){return new Ke((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 Ke((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(at.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(at.REJECTED,t)}}__init3(){this._setResult=(t,r)=>{if(this._state===at.PENDING){if(xr(r)){r.then(this._resolve,this._reject);return}this._state=t,this._value=r,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===at.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(r=>{r[0]||(this._state===at.RESOLVED&&r[1](this._value),this._state===at.REJECTED&&r[2](this._value),r[0]=!0)})}}}function ql(e){const t=st(),r={sid:Ye(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Zl(r)};return e&&Vt(r,e),r}function Vt(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||st(),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:Ye()),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 Gl(e,t){let r={};e.status==="ok"&&(r={status:"exited"}),Vt(e,r)}function Zl(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 Ye()}function jn(){return Ye().substring(16)}function Br(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]=Br(n[o],t[o],r-1));return n}const Wn="_sentrySpan";function Di(e,t){t?Mt(e,Wn,t):delete e[Wn]}function Pi(e){return e[Wn]}const Vl=100;class qn{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:jn()}}clone(){const t=new qn;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,Di(t,Pi(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&&Vt(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 pt?[r.getScopeData(),r.getRequestSession()]:qt(r)?[t,t.requestSession]:[],{tags:i,extra:s,user:a,contexts:c,level:u,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),u&&(this._level=u),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,Di(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Mi()}),this._notifyScopeListeners(),this}addBreadcrumb(t,r){const n=typeof r=="number"?r:Vl;if(n<=0)return this;const o={timestamp:ur(),...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:Pi(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Br(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext={spanId:jn(),...t},this}getPropagationContext(){return this._propagationContext}captureException(t,r){const n=r&&r.event_id?r.event_id:Ye();if(!this._client)return G.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:Ye();if(!this._client)return G.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:Ye();return this._client?(this._client.captureEvent(t,{...r,event_id:n},this),n):(G.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 pt=qn;function Yl(){return Ir("defaultCurrentScope",()=>new pt)}function Kl(){return Ir("defaultIsolationScope",()=>new pt)}class Jl{constructor(t,r){let n;t?n=t:n=new pt;let o;r?o=r:o=new pt,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 xr(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 Yt(){const e=Dr(),t=Fn(e);return t.stack=t.stack||new Jl(Yl(),Kl())}function Ql(e){return Yt().withScope(e)}function Xl(e,t){const r=Yt();return r.withScope(()=>(r.getStackTop().scope=e,t(e)))}function Li(e){return Yt().withScope(()=>e(Yt().getIsolationScope()))}function eu(){return{withIsolationScope:Li,withScope:Ql,withSetScope:Xl,withSetIsolationScope:(e,t)=>Li(t),getCurrentScope:()=>Yt().getScope(),getIsolationScope:()=>Yt().getIsolationScope()}}function Gn(e){const t=Fn(e);return t.acs?t.acs:eu()}function nt(){const e=Dr();return Gn(e).getCurrentScope()}function Pt(){const e=Dr();return Gn(e).getIsolationScope()}function tu(){return Ir("globalScope",()=>new pt)}function Zn(...e){const t=Dr(),r=Gn(t);if(e.length===2){const[n,o]=e;return n?r.withSetScope(n,o):r.withScope(o)}return r.withScope(e[0])}function Ce(){return nt().getClient()}function ru(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 nu="_sentryMetrics";function ou(e){const t=e[nu];if(!t)return;const r={};for(const[,[n,o]]of t)(r[n]||(r[n]=[])).push(Ve(o));return r}const iu="sentry.source",su="sentry.sample_rate",au="sentry.op",cu="sentry.origin",lu=0,uu=1,du="sentry-",fu=/^sentry-/;function pu(e){const t=mu(e);if(!t)return;const r=Object.entries(t).reduce((n,[o,i])=>{if(o.match(fu)){const s=o.slice(du.length);n[s]=i}return n},{});if(Object.keys(r).length>0)return r}function mu(e){if(!(!e||!it(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,r)=>{const n=xi(r);return Object.entries(n).forEach(([o,i])=>{t[o]=i}),t},{}):xi(e)}function xi(e){return e.split(",").map(t=>t.split("=").map(r=>decodeURIComponent(r.trim()))).reduce((t,[r,n])=>(r&&n&&(t[r]=n),t),{})}const _u=1;let Fi=!1;function hu(e){const{spanId:t,traceId:r,isRemote:n}=e.spanContext(),o=n?t:Vn(e).parent_span_id,i=n?jn():t;return Ve({parent_span_id:o,span_id:i,trace_id:r})}function $i(e){return typeof e=="number"?Bi(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Bi(e.getTime()):st()}function Bi(e){return e>9999999999?e/1e3:e}function Vn(e){if(yu(e))return e.getSpanJSON();try{const{spanId:t,traceId:r}=e.spanContext();if(gu(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:$i(o),timestamp:$i(s)||void 0,status:vu(c),op:n[au],origin:n[cu],_metrics_summary:ou(e)})}return{span_id:t,trace_id:r}}catch{return{}}}function gu(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function yu(e){return typeof e.getSpanJSON=="function"}function bu(e){const{traceFlags:t}=e.spanContext();return t===_u}function vu(e){if(!(!e||e.code===lu))return e.code===uu?"ok":e.message||"unknown_error"}const Su="_sentryRootSpan";function Ui(e){return e[Su]||e}function Eu(){Fi||(Tt(()=>{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.")}),Fi=!0)}function wu(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=Ce(),r=t&&t.getOptions();return!!r&&(r.enableTracing||"tracesSampleRate"in r||"tracesSampler"in r)}const Yn="production",Cu="_frozenDsc";function Hi(e,t){const r=t.getOptions(),{publicKey:n}=t.getDsn()||{},o=Ve({environment:r.environment||Yn,release:r.release,public_key:n,trace_id:e});return t.emit("createDsc",o),o}function Au(e,t){const r=t.getPropagationContext();return r.dsc||Hi(r.traceId,e)}function Tu(e){const t=Ce();if(!t)return{};const r=Ui(e),n=r[Cu];if(n)return n;const o=r.spanContext().traceState,i=o&&o.get("sentry.dsc"),s=i&&pu(i);if(s)return s;const a=Hi(e.spanContext().traceId,t),c=Vn(r),u=c.data||{},d=u[su];d!=null&&(a.sample_rate=`${d}`);const f=u[iu],_=c.description;return f!=="url"&&_&&(a.transaction=_),wu()&&(a.sampled=String(bu(r))),t.emit("createDsc",a,r),a}function ku(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){fe&&G.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 Iu=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Nu(e){return e==="http"||e==="https"}function dr(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 Ou(e){const t=Iu.exec(e);if(!t){Tt(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[r,n,o="",i="",s="",a=""]=t.slice(1);let c="",u=a;const d=u.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),u=d.pop()),u){const f=u.match(/^\d+/);f&&(u=f[0])}return Ri({host:i,pass:o,path:c,projectId:u,port:s,protocol:r,publicKey:n})}function Ri(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Mu(e){if(!At)return!0;const{port:t,projectId:r,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(G.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:r.match(/^\d+$/)?Nu(n)?t&&isNaN(parseInt(t,10))?(G.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(G.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(G.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function zi(e){const t=typeof e=="string"?Ou(e):Ri(e);if(!(!t||!Mu(t)))return t}function Du(){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 ct(e,t=100,r=1/0){try{return Kn("",e,t,r)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function ji(e,t=3,r=100*1024){const n=ct(e,t);return Fu(n)>r?ji(e,t-1,r):n}function Kn(e,t,r=1/0,n=1/0,o=Du()){const[i,s]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=Pu(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 u=t;if(u&&typeof u.toJSON=="function")try{const h=u.toJSON();return Kn("",h,c-1,n,o)}catch{}const d=Array.isArray(t)?[]:{};let f=0;const _=Ai(t);for(const h in _){if(!Object.prototype.hasOwnProperty.call(_,h))continue;if(f>=n){d[h]="[MaxProperties ~]";break}const g=_[h];d[h]=Kn(h,g,c-1,n,o),f++}return s(t),d}function Pu(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(Si(t))return"[VueViewModel]";if(xl(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${dt(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const r=Lu(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}}function Lu(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function xu(e){return~-encodeURI(e).split(/%..|./).length}function Fu(e){return xu(JSON.stringify(e))}function fr(e,t=[]){return[e,t]}function $u(e,t){const[r,n]=e;return[r,[...n,t]]}function Wi(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 Jn(e){return ce.__SENTRY__&&ce.__SENTRY__.encodePolyfill?ce.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function Bu(e){const[t,r]=e;let n=JSON.stringify(t);function o(i){typeof n=="string"?n=typeof i=="string"?n+i:[Jn(n),i]:n.push(typeof i=="string"?Jn(i):i)}for(const i of r){const[s,a]=i;if(o(`
|
|
7
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(ct(a))}o(c)}}return typeof n=="string"?n:Fu(n)}function Fu(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 $u(e){const t=typeof e.data=="string"?Kn(e.data):e.data;return[Ye({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const Bu={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 Wi(e){return Bu[e]}function qi(e){if(!e||!e.sdk)return;const{name:t,version:r}=e.sdk;return{name:t,version:r}}function Ru(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:lr(n)},...o&&{trace:Ye({...o})}}}function Uu(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 Hu(e,t,r,n){const o=qi(r),i={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!n&&t&&{dsn:lr(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return ur(i,[s])}function zu(e,t,r,n){const o=qi(r),i=e.type&&e.type!=="replay_event"?e.type:"event";Uu(e,r&&r.sdk);const s=Ru(e,o,n,t);return delete e.sdkProcessingMetadata,ur(s,[[{type:i},e]])}function Jn(e,t,r,n=0){return new Ke((o,i)=>{const s=e[n];if(t===null||typeof s!="function")o(t);else{const a=s({...t},r);le&&s.id&&a===null&&j.log(`Event processor "${s.id}" dropped event`),Dr(a)?a.then(c=>Jn(e,c,r,n+1).then(o)).then(null,i):Jn(e,a,r,n+1).then(o).then(null,i)}})}let Fr,Gi,$r;function ju(e){const t=ie._sentryDebugIds;if(!t)return{};const r=Object.keys(t);return $r&&r.length===Gi||(Gi=r.length,$r=r.reduce((n,o)=>{Fr||(Fr={});const i=Fr[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],u=c&&c.filename,d=t[o];if(u&&d){n[u]=d,Fr[o]=[u,d];break}}}return n},{})),$r}function Wu(e,t){const{fingerprint:r,span:n,breadcrumbs:o,sdkProcessingMetadata:i}=t;qu(e,t),n&&Yu(e,n),Vu(e,r),Gu(e,o),Zu(e,i)}function Zi(e,t){const{extra:r,tags:n,user:o,contexts:i,level:s,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:m,transactionName:_,span:h}=t;Br(e,"extra",r),Br(e,"tags",n),Br(e,"user",o),Br(e,"contexts",i),e.sdkProcessingMetadata=xr(e.sdkProcessingMetadata,a,2),s&&(e.level=s),_&&(e.transactionName=_),h&&(e.span=h),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...m}}function Br(e,t,r){e[t]=xr(e[t],r,1)}function qu(e,t){const{extra:r,tags:n,user:o,contexts:i,level:s,transactionName:a}=t,c=Ye(r);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const u=Ye(n);u&&Object.keys(u).length&&(e.tags={...u,...e.tags});const d=Ye(o);d&&Object.keys(d).length&&(e.user={...d,...e.user});const f=Ye(i);f&&Object.keys(f).length&&(e.contexts={...f,...e.contexts}),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function Gu(e,t){const r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function Zu(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Yu(e,t){e.contexts={trace:pu(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:wu(t),...e.sdkProcessingMetadata};const r=Bi(t),n=Zn(r).description;n&&!e.transaction&&e.type==="transaction"&&(e.transaction=n)}function Vu(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 Ku(e,t,r,n,o,i){const{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||r.event_id||Ve(),timestamp:t.timestamp||cr()},u=r.integrations||e.integrations.map(W=>W.name);Ju(c,e),ed(c,u),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&Qu(c,e.stackParser);const d=rd(n,r.captureContext);r.mechanism&&qt(c,r.mechanism);const f=o?o.getEventProcessors():[],m=Ql().getScopeData();if(i){const W=i.getScopeData();Zi(m,W)}if(d){const W=d.getScopeData();Zi(m,W)}const _=[...r.attachments||[],...m.attachments];_.length&&(r.attachments=_),Wu(c,m);const h=[...f,...m.eventProcessors];return Jn(h,c,r).then(W=>(W&&Xu(W),typeof s=="number"&&s>0?td(W,s,a):W))}function Ju(e,t){const{environment:r,release:n,dist:o,maxValueLength:i=250}=t;e.environment=e.environment||r||Yn,!e.release&&n&&(e.release=n),!e.dist&&o&&(e.dist=o),e.message&&(e.message=Wt(e.message,i));const s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Wt(s.value,i));const a=e.request;a&&a.url&&(a.url=Wt(a.url,i))}function Qu(e,t){const r=ju(t);try{e.exception.values.forEach(n=>{n.stacktrace.frames.forEach(o=>{r&&o.filename&&(o.debug_id=r[o.filename])})})}catch{}}function Xu(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 ed(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function td(e,t,r){if(!e)return null;const n={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:ct(o.data,t,r)}}))},...e.user&&{user:ct(e.user,t,r)},...e.contexts&&{contexts:ct(e.contexts,t,r)},...e.extra&&{extra:ct(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=ct(e.contexts.trace.data,t,r))),e.spans&&(n.spans=e.spans.map(o=>({...o,...o.data&&{data:ct(o.data,t,r)}}))),e.contexts&&e.contexts.flags&&n.contexts&&(n.contexts.flags=ct(e.contexts.flags,3,r)),n}function rd(e,t){if(!t)return e;const r=e?e.clone():new pt;return r.update(t),r}function nd(e){if(e)return od(e)?{captureContext:e}:sd(e)?{captureContext:e}:e}function od(e){return e instanceof pt||typeof e=="function"}const id=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function sd(e){return Object.keys(e).some(t=>id.includes(t))}function Rr(e,t){return nt().captureException(e,nd(t))}function Yi(e,t){return nt().captureEvent(e,t)}function ad(e,t){Pt().setContext(e,t)}function cd(){return Pt().lastEventId()}function Vi(e){const t=we(),r=Pt(),n=nt(),{release:o,environment:i=Yn}=t&&t.getOptions()||{},{userAgent:s}=ie.navigator||{},a=zl({release:o,environment:i,user:n.getUser()||r.getUser(),...s&&{userAgent:s},...e}),c=r.getSession();return c&&c.status==="ok"&&Gt(c,{status:"exited"}),Ki(),r.setSession(a),n.setSession(a),a}function Ki(){const e=Pt(),t=nt(),r=t.getSession()||e.getSession();r&&jl(r),Ji(),e.setSession(),t.setSession()}function Ji(){const e=Pt(),t=nt(),r=we(),n=t.getSession()||e.getSession();n&&r&&r.captureSession(n)}function Qi(e=!1){if(e){Ki();return}Ji()}const ld="7";function Xi(e){const t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}function ud(e){return`${Xi(e)}${e.projectId}/envelope/`}function dd(e,t){const r={sentry_version:ld};return e.publicKey&&(r.sentry_key=e.publicKey),t&&(r.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(r).toString()}function fd(e,t,r){return t||`${ud(e)}?${dd(e,r)}`}function pd(e,t){const r=Hi(e);if(!r)return"";const n=`${Xi(r)}embed/error-page/`;let o=`dsn=${lr(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 es=[];function md(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 _d(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=md(n),i=o.findIndex(s=>s.name==="Debug");if(i>-1){const[s]=o.splice(i,1);o.push(s)}return o}function hd(e,t){const r={};return t.forEach(n=>{n&&rs(e,n,r)}),r}function ts(e,t){for(const r of t)r&&r.afterAllSetup&&r.afterAllSetup(e)}function rs(e,t,r){if(r[t.name]){le&&j.log(`Integration skipped because it was already installed: ${t.name}`);return}if(r[t.name]=t,es.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),es.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)}le&&j.log(`Integration installed: ${t.name}`)}function gd(e){const t=we();if(!t){le&&j.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function PS(e){return e}function yd(e,t,r){const n=[{type:"client_report"},{timestamp:cr(),discarded_events:e}];return ur(t?{dsn:t}:{},[n])}class et extends Error{constructor(t,r="warn"){super(t),this.message=t,this.logLevel=r}}const ns="Not capturing exception because it's already been captured.";class bd{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Hi(t.dsn):le&&j.warn("No DSN provided, client will not send events."),this._dsn){const o=fd(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&&Tt(()=>{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=Ve();if(Ni(t))return le&&j.log(ns),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:Ve(),...n},s=Fn(t)?t:String(t),a=$n(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=Ve();if(r&&r.originalException&&Ni(r.originalException))return le&&j.log(ns),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"?le&&j.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Gt(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))):Dt(!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];rs(this,t,this._integrations),r||ts(this,[t])}sendEvent(t,r={}){this.emit("beforeSendEvent",t,r);let n=zu(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of r.attachments||[])n=Lu(n,$u(i));const o=this.sendEnvelope(n);o&&o.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){const r=Hu(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}`;le&&j.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=>(le&&j.error("Error while sending envelope:",r),r)):(le&&j.error("Transport disabled"),Dt({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=hd(this,t),ts(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 u=c.mechanism;if(u&&u.handled===!1){n=!0;break}}}const s=t.status==="ok";(s&&t.errors===0||s&&n)&&(Gt(t,{...n&&{status:"crashed"},errors:t.errors||Number(o||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Ke(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=nt(),o=Pt()){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),Ku(i,t,r,n,this,o).then(a=>{if(a===null)return a;a.contexts={trace:Xl(n),...a.contexts};const c=Eu(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=>{le&&(o instanceof et&&o.logLevel==="log"?j.log(o.message):j.warn(o))})}_processEvent(t,r,n){const o=this.getOptions(),{sampleRate:i}=o,s=is(t),a=os(t),c=t.type||"error",u=`before send for type \`${c}\``,d=typeof i>"u"?void 0:Cu(i);if(a&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error",t),Lr(new et(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const f=c==="replay_event"?"replay":c,_=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,r,n,_).then(h=>{if(h===null)throw this.recordDroppedEvent("event_processor",f,t),new et("An event processor returned `null`, will not send event.","log");if(r.data&&r.data.__sentry__===!0)return h;const W=Sd(this,o,h,r);return vd(W,u)}).then(h=>{if(h===null){if(this.recordDroppedEvent("before_send",f,t),s){const B=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",B)}throw new et(`${u} returned \`null\`, will not send event.`,"log")}const b=n&&n.getSession();if(!s&&b&&this._updateSessionFromEvent(b,h),s){const x=h.sdkProcessingMetadata&&h.sdkProcessingMetadata.spanCountBeforeProcessing||0,B=h.spans?h.spans.length:0,M=x-B;M>0&&this.recordDroppedEvent("before_send","span",M)}const W=h.transaction_info;if(s&&W&&h.transaction!==t.transaction){const x="custom";h.transaction_info={...W,source:x}}return this.sendEvent(h,r),h}).then(null,h=>{throw h instanceof et?h:(this.captureException(h,{data:{__sentry__:!0},originalException:h}),new et(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
9
|
-
Reason: ${
|
|
10
|
-
Event: ${ft(e)}`),!0):
|
|
11
|
-
Event: ${ft(e)}`),!0):
|
|
12
|
-
Event: ${ft(e)}`),!0):
|
|
13
|
-
Event: ${ft(e)}`),!0):
|
|
8
|
+
`),typeof a=="string"||a instanceof Uint8Array)o(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(ct(a))}o(c)}}return typeof n=="string"?n:Uu(n)}function Uu(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 Hu(e){const t=typeof e.data=="string"?Jn(e.data):e.data;return[Ve({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const Ru={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 qi(e){return Ru[e]}function Gi(e){if(!e||!e.sdk)return;const{name:t,version:r}=e.sdk;return{name:t,version:r}}function zu(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:dr(n)},...o&&{trace:Ve({...o})}}}function ju(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 Wu(e,t,r,n){const o=Gi(r),i={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!n&&t&&{dsn:dr(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return fr(i,[s])}function qu(e,t,r,n){const o=Gi(r),i=e.type&&e.type!=="replay_event"?e.type:"event";ju(e,r&&r.sdk);const s=zu(e,o,n,t);return delete e.sdkProcessingMetadata,fr(s,[[{type:i},e]])}function Qn(e,t,r,n=0){return new Ke((o,i)=>{const s=e[n];if(t===null||typeof s!="function")o(t);else{const a=s({...t},r);fe&&s.id&&a===null&&G.log(`Event processor "${s.id}" dropped event`),xr(a)?a.then(c=>Qn(e,c,r,n+1).then(o)).then(null,i):Qn(e,a,r,n+1).then(o).then(null,i)}})}let Ur,Zi,Hr;function Gu(e){const t=ce._sentryDebugIds;if(!t)return{};const r=Object.keys(t);return Hr&&r.length===Zi||(Zi=r.length,Hr=r.reduce((n,o)=>{Ur||(Ur={});const i=Ur[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],u=c&&c.filename,d=t[o];if(u&&d){n[u]=d,Ur[o]=[u,d];break}}}return n},{})),Hr}function Zu(e,t){const{fingerprint:r,span:n,breadcrumbs:o,sdkProcessingMetadata:i}=t;Vu(e,t),n&&Ju(e,n),Qu(e,r),Yu(e,o),Ku(e,i)}function Vi(e,t){const{extra:r,tags:n,user:o,contexts:i,level:s,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:_,transactionName:h,span:g}=t;Rr(e,"extra",r),Rr(e,"tags",n),Rr(e,"user",o),Rr(e,"contexts",i),e.sdkProcessingMetadata=Br(e.sdkProcessingMetadata,a,2),s&&(e.level=s),h&&(e.transactionName=h),g&&(e.span=g),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,..._}}function Rr(e,t,r){e[t]=Br(e[t],r,1)}function Vu(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 u=Ve(n);u&&Object.keys(u).length&&(e.tags={...u,...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 Yu(e,t){const r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function Ku(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Ju(e,t){e.contexts={trace:hu(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Tu(t),...e.sdkProcessingMetadata};const r=Ui(t),n=Vn(r).description;n&&!e.transaction&&e.type==="transaction"&&(e.transaction=n)}function Qu(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 Xu(e,t,r,n,o,i){const{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||r.event_id||Ye(),timestamp:t.timestamp||ur()},u=r.integrations||e.integrations.map(W=>W.name);ed(c,e),nd(c,u),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&td(c,e.stackParser);const d=id(n,r.captureContext);r.mechanism&&Zt(c,r.mechanism);const f=o?o.getEventProcessors():[],_=tu().getScopeData();if(i){const W=i.getScopeData();Vi(_,W)}if(d){const W=d.getScopeData();Vi(_,W)}const h=[...r.attachments||[],..._.attachments];h.length&&(r.attachments=h),Zu(c,_);const g=[...f,..._.eventProcessors];return Qn(g,c,r).then(W=>(W&&rd(W),typeof s=="number"&&s>0?od(W,s,a):W))}function ed(e,t){const{environment:r,release:n,dist:o,maxValueLength:i=250}=t;e.environment=e.environment||r||Yn,!e.release&&n&&(e.release=n),!e.dist&&o&&(e.dist=o),e.message&&(e.message=Gt(e.message,i));const s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Gt(s.value,i));const a=e.request;a&&a.url&&(a.url=Gt(a.url,i))}function td(e,t){const r=Gu(t);try{e.exception.values.forEach(n=>{n.stacktrace.frames.forEach(o=>{r&&o.filename&&(o.debug_id=r[o.filename])})})}catch{}}function rd(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 nd(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function od(e,t,r){if(!e)return null;const n={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:ct(o.data,t,r)}}))},...e.user&&{user:ct(e.user,t,r)},...e.contexts&&{contexts:ct(e.contexts,t,r)},...e.extra&&{extra:ct(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=ct(e.contexts.trace.data,t,r))),e.spans&&(n.spans=e.spans.map(o=>({...o,...o.data&&{data:ct(o.data,t,r)}}))),e.contexts&&e.contexts.flags&&n.contexts&&(n.contexts.flags=ct(e.contexts.flags,3,r)),n}function id(e,t){if(!t)return e;const r=e?e.clone():new pt;return r.update(t),r}function sd(e){if(e)return ad(e)?{captureContext:e}:ld(e)?{captureContext:e}:e}function ad(e){return e instanceof pt||typeof e=="function"}const cd=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function ld(e){return Object.keys(e).some(t=>cd.includes(t))}function zr(e,t){return nt().captureException(e,sd(t))}function Yi(e,t){return nt().captureEvent(e,t)}function ud(e,t){Pt().setContext(e,t)}function dd(){return Pt().lastEventId()}function Ki(e){const t=Ce(),r=Pt(),n=nt(),{release:o,environment:i=Yn}=t&&t.getOptions()||{},{userAgent:s}=ce.navigator||{},a=ql({release:o,environment:i,user:n.getUser()||r.getUser(),...s&&{userAgent:s},...e}),c=r.getSession();return c&&c.status==="ok"&&Vt(c,{status:"exited"}),Ji(),r.setSession(a),n.setSession(a),a}function Ji(){const e=Pt(),t=nt(),r=t.getSession()||e.getSession();r&&Gl(r),Qi(),e.setSession(),t.setSession()}function Qi(){const e=Pt(),t=nt(),r=Ce(),n=t.getSession()||e.getSession();n&&r&&r.captureSession(n)}function Xi(e=!1){if(e){Ji();return}Qi()}const fd="7";function es(e){const t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}function pd(e){return`${es(e)}${e.projectId}/envelope/`}function md(e,t){const r={sentry_version:fd};return e.publicKey&&(r.sentry_key=e.publicKey),t&&(r.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(r).toString()}function _d(e,t,r){return t||`${pd(e)}?${md(e,r)}`}function hd(e,t){const r=zi(e);if(!r)return"";const n=`${es(r)}embed/error-page/`;let o=`dsn=${dr(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 ts=[];function gd(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 yd(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=gd(n),i=o.findIndex(s=>s.name==="Debug");if(i>-1){const[s]=o.splice(i,1);o.push(s)}return o}function bd(e,t){const r={};return t.forEach(n=>{n&&ns(e,n,r)}),r}function rs(e,t){for(const r of t)r&&r.afterAllSetup&&r.afterAllSetup(e)}function ns(e,t,r){if(r[t.name]){fe&&G.log(`Integration skipped because it was already installed: ${t.name}`);return}if(r[t.name]=t,ts.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),ts.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)}fe&&G.log(`Integration installed: ${t.name}`)}function vd(e){const t=Ce();if(!t){fe&&G.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function jS(e){return e}function Sd(e,t,r){const n=[{type:"client_report"},{timestamp:ur(),discarded_events:e}];return fr(t?{dsn:t}:{},[n])}class tt extends Error{constructor(t,r="warn"){super(t),this.message=t,this.logLevel=r}}const os="Not capturing exception because it's already been captured.";class Ed{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=zi(t.dsn):fe&&G.warn("No DSN provided, client will not send events."),this._dsn){const o=_d(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&&Tt(()=>{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=Ye();if(Oi(t))return fe&&G.log(os),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:Ye(),...n},s=$n(t)?t:String(t),a=Bn(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=Ye();if(r&&r.originalException&&Oi(r.originalException))return fe&&G.log(os),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"?fe&&G.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Vt(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))):Dt(!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];ns(this,t,this._integrations),r||rs(this,[t])}sendEvent(t,r={}){this.emit("beforeSendEvent",t,r);let n=qu(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of r.attachments||[])n=$u(n,Hu(i));const o=this.sendEnvelope(n);o&&o.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){const r=Wu(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}`;fe&&G.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=>(fe&&G.error("Error while sending envelope:",r),r)):(fe&&G.error("Transport disabled"),Dt({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=bd(this,t),rs(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 u=c.mechanism;if(u&&u.handled===!1){n=!0;break}}}const s=t.status==="ok";(s&&t.errors===0||s&&n)&&(Vt(t,{...n&&{status:"crashed"},errors:t.errors||Number(o||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Ke(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=nt(),o=Pt()){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),Xu(i,t,r,n,this,o).then(a=>{if(a===null)return a;a.contexts={trace:ru(n),...a.contexts};const c=Au(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=>{fe&&(o instanceof tt&&o.logLevel==="log"?G.log(o.message):G.warn(o))})}_processEvent(t,r,n){const o=this.getOptions(),{sampleRate:i}=o,s=ss(t),a=is(t),c=t.type||"error",u=`before send for type \`${c}\``,d=typeof i>"u"?void 0:ku(i);if(a&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error",t),$r(new tt(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const f=c==="replay_event"?"replay":c,h=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,r,n,h).then(g=>{if(g===null)throw this.recordDroppedEvent("event_processor",f,t),new tt("An event processor returned `null`, will not send event.","log");if(r.data&&r.data.__sentry__===!0)return g;const W=Cd(this,o,g,r);return wd(W,u)}).then(g=>{if(g===null){if(this.recordDroppedEvent("before_send",f,t),s){const H=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",H)}throw new tt(`${u} returned \`null\`, will not send event.`,"log")}const y=n&&n.getSession();if(!s&&y&&this._updateSessionFromEvent(y,g),s){const x=g.sdkProcessingMetadata&&g.sdkProcessingMetadata.spanCountBeforeProcessing||0,H=g.spans?g.spans.length:0,M=x-H;M>0&&this.recordDroppedEvent("before_send","span",M)}const W=g.transaction_info;if(s&&W&&g.transaction!==t.transaction){const x="custom";g.transaction_info={...W,source:x}}return this.sendEvent(g,r),g}).then(null,g=>{throw g instanceof tt?g:(this.captureException(g,{data:{__sentry__:!0},originalException:g}),new tt(`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(){fe&&G.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){fe&&G.log("No outcomes to send");return}if(!this._dsn){fe&&G.log("No dsn provided, will not send outcomes");return}fe&&G.log("Sending outcomes:",t);const r=Sd(t,this._options.tunnel&&dr(this._dsn));this.sendEnvelope(r)}}function wd(e,t){const r=`${t} must return \`null\` or a valid event.`;if(xr(e))return e.then(n=>{if(!qt(n)&&n!==null)throw new tt(r);return n},n=>{throw new tt(`${t} rejected with ${n}`)});if(!qt(e)&&e!==null)throw new tt(r);return e}function Cd(e,t,r,n){const{beforeSend:o,beforeSendTransaction:i,beforeSendSpan:s}=t;if(is(r)&&o)return o(r,n);if(ss(r)){if(r.spans&&s){const a=[];for(const c of r.spans){const u=s(c);u?a.push(u):(Eu(),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 is(e){return e.type===void 0}function ss(e){return e.type==="transaction"}function Ad(e,t){t.debug===!0&&(fe?G.enable():Tt(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),nt().update(t.initialScope);const n=new e(t);return Td(n),n.init(),n}function Td(e){nt().setClient(e)}function kd(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 $r(new tt("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 Ke((a,c)=>{let u=t.length;if(!u)return a(!0);const d=setTimeout(()=>{s&&s>0&&a(!1)},s);t.forEach(f=>{Dt(f).then(()=>{--u||(clearTimeout(d),a(!0))},c)})})}return{$:t,add:o,drain:i}}const Id=60*1e3;function Nd(e,t=Date.now()){const r=parseInt(`${e}`,10);if(!isNaN(r))return r*1e3;const n=Date.parse(`${e}`);return isNaN(n)?Id:n-t}function Od(e,t){return e[t]||e.all||0}function Md(e,t,r=Date.now()){return Od(e,t)>r}function Dd(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,u,,,d]=a.split(":",5),f=parseInt(c,10),_=(isNaN(f)?60:f)*1e3;if(!u)o.all=n+_;else for(const h of u.split(";"))h==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(o[h]=n+_):o[h]=n+_}else s?o.all=n+Nd(s,n):t===429&&(o.all=n+60*1e3);return o}const Pd=64;function Ld(e,t,r=kd(e.bufferSize||Pd)){let n={};const o=s=>r.drain(s);function i(s){const a=[];if(Wi(s,(f,_)=>{const h=qi(_);if(Md(n,h)){const g=as(f,_);e.recordDroppedEvent("ratelimit_backoff",h,g)}else a.push(f)}),a.length===0)return Dt({});const c=fr(s[0],a),u=f=>{Wi(c,(_,h)=>{const g=as(_,h);e.recordDroppedEvent(f,qi(h),g)})},d=()=>t({body:Bu(c)}).then(f=>(f.statusCode!==void 0&&(f.statusCode<200||f.statusCode>=300)&&fe&&G.warn(`Sentry responded with status code ${f.statusCode} to sent event.`),n=Dd(n,f),f),f=>{throw u("network_error"),f});return r.add(d).then(f=>f,f=>{if(f instanceof tt)return fe&&G.error("Skipped sending event because buffer is full."),u("queue_overflow"),Dt({});throw f})}return{send:i,flush:o}}function as(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function cs(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:ut})),version:ut}),e._metadata=o}const xd=100;function Lt(e,t){const r=Ce(),n=Pt();if(!r)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:i=xd}=r.getOptions();if(i<=0)return;const a={timestamp:ur(),...e},c=o?Tt(()=>o(a,t)):a;c!==null&&(r.emit&&r.emit("beforeAddBreadcrumb",c,t),n.addBreadcrumb(c,i))}let ls;const Fd="FunctionToString",us=new WeakMap,$d=(()=>({name:Fd,setupOnce(){ls=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Hn(this),r=us.has(Ce())&&t!==void 0?t:this;return ls.apply(r,e)}}catch{}},setup(e){us.set(e,!0)}})),Bd=[/^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$/],Ud="InboundFilters",Hd=((e={})=>({name:Ud,processEvent(t,r,n){const o=n.getOptions(),i=Rd(e,o);return zd(t,i)?null:t}}));function Rd(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Bd],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function zd(e,t){return t.ignoreInternal&&Vd(e)?(fe&&G.warn(`Event dropped due to being internal Sentry Error.
|
|
10
|
+
Event: ${ft(e)}`),!0):jd(e,t.ignoreErrors)?(fe&&G.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
11
|
+
Event: ${ft(e)}`),!0):Kd(e)?(fe&&G.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
12
|
+
Event: ${ft(e)}`),!0):Wd(e,t.ignoreTransactions)?(fe&&G.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
13
|
+
Event: ${ft(e)}`),!0):qd(e,t.denyUrls)?(fe&&G.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
14
14
|
Event: ${ft(e)}.
|
|
15
|
-
Url: ${
|
|
15
|
+
Url: ${jr(e)}`),!0):Gd(e,t.allowUrls)?!1:(fe&&G.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
16
16
|
Event: ${ft(e)}.
|
|
17
|
-
Url: ${Ur(e)}`),!0)}function Ud(e,t){return e.type||!t||!t.length?!1:Wd(e).some(r=>Pr(r,t))}function Hd(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const r=e.transaction;return r?Pr(r,t):!1}function zd(e,t){if(!t||!t.length)return!1;const r=Ur(e);return r?Pr(r,t):!1}function jd(e,t){if(!t||!t.length)return!0;const r=Ur(e);return r?Pr(r,t):!0}function Wd(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 qd(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function Gd(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 Ur(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?Gd(t):null}catch{return le&&j.error(`Cannot extract url for event ${ft(e)}`),null}}function Zd(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 Yd(e,t,r=250,n,o,i,s){if(!i.exception||!i.exception.values||!s||!Ot(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=Vd(Qn(e,t,o,s.originalException,n,i.exception.values,a,0),r))}function Qn(e,t,r,n,o,i,s,a){if(i.length>=r+1)return i;let c=[...i];if(Ot(n[o],Error)){us(s,a);const u=e(t,n[o]),d=c.length;ds(u,o,d,a),c=Qn(e,t,r,n[o],o,[u,...c],u,d)}return Array.isArray(n.errors)&&n.errors.forEach((u,d)=>{if(Ot(u,Error)){us(s,a);const f=e(t,u),m=c.length;ds(f,`errors[${d}]`,m,a),c=Qn(e,t,r,u,o,[f,...c],f,m)}}),c}function us(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 ds(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 Vd(e,t){return e.map(r=>(r.value&&(r.value=Wt(r.value,t)),r))}function Xn(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 Kd(e){const t="console";It(t,e),Nt(t,Jd)}function Jd(){"console"in ie&&Mn.forEach(function(e){e in ie.console&&He(ie.console,e,function(t){return Tr[e]=t,function(...r){Xe("console",{args:r,level:e});const o=Tr[e];o&&o.apply(ie.console,r)}})})}function Qd(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const Xd="Dedupe",ef=(()=>{let e;return{name:Xd,processEvent(t){if(t.type)return t;try{if(tf(t,e))return le&&j.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}});function tf(e,t){return t?!!(rf(e,t)||nf(e,t)):!1}function rf(e,t){const r=e.message,n=t.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!ps(e,t)||!fs(e,t))}function nf(e,t){const r=ms(t),n=ms(e);return!(!r||!n||r.type!==n.type||r.value!==n.value||!ps(e,t)||!fs(e,t))}function fs(e,t){let r=_i(e),n=_i(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 ps(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 ms(e){return e.exception&&e.exception.values&&e.exception.values[0]}function _s(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const eo=ie;function hs(){if(!("fetch"in eo))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function to(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function of(){if(typeof EdgeRuntime=="string")return!0;if(!hs())return!1;if(to(eo.fetch))return!0;let e=!1;const t=eo.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=to(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){At&&j.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function sf(e,t){const r="fetch";It(r,e),Nt(r,()=>af(void 0,t))}function af(e,t=!1){t&&!of()||He(ie,"fetch",function(r){return function(...n){const o=new Error,{method:i,url:s}=cf(n),a={args:n,fetchData:{method:i,url:s},startTimestamp:st()*1e3,virtualError:o};return Xe("fetch",{...a}),r.apply(ie,n).then(async c=>(Xe("fetch",{...a,endTimestamp:st()*1e3,response:c}),c),c=>{throw Xe("fetch",{...a,endTimestamp:st()*1e3,error:c}),Or(c)&&c.stack===void 0&&(c.stack=o.stack,Mt(c,"framesToPop",1)),c})}})}function ro(e,t){return!!e&&typeof e=="object"&&!!e[t]}function gs(e){return typeof e=="string"?e:e?ro(e,"url")?e.url:e.toString?e.toString():"":""}function cf(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[r,n]=e;return{url:gs(r),method:ro(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:gs(t),method:ro(t,"method")?String(t.method).toUpperCase():"GET"}}function lf(){return"npm"}const Hr=ie;function uf(){const e=Hr.chrome,t=e&&e.app&&e.app.runtime,r="history"in Hr&&!!Hr.history.pushState&&!!Hr.history.replaceState;return!t&&r}const X=ie;let no=0;function ys(){return no>0}function df(){no++,setTimeout(()=>{no--})}function Yt(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(Rn(e))return e}catch{return e}const n=function(...o){try{const i=o.map(s=>Yt(s,t));return e.apply(this,i)}catch(i){throw df(),Gn(s=>{s.addEventProcessor(a=>(t.mechanism&&(Hn(a,void 0),qt(a,t.mechanism)),a.extra={...a.extra,arguments:o},a)),Rr(i)}),i}};try{for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}catch{}wi(n,e),Mt(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return e.name}})}catch{}return n}const mt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function oo(e,t){const r=so(e,t),n={type:hf(t),value:gf(t)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function ff(e,t,r,n){const o=we(),i=o&&o.getOptions().normalizeDepth,s=Ef(t),a={__serialized__:zi(t,i)};if(s)return{exception:{values:[oo(e,s)]},extra:a};const c={exception:{values:[{type:Mr(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:vf(t,{isUnhandledRejection:n})}]},extra:a};if(r){const u=so(e,r);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function io(e,t){return{exception:{values:[oo(e,t)]}}}function so(e,t){const r=t.stacktrace||t.stack||"",n=mf(t),o=_f(t);try{return e(r,n,o)}catch{}return[]}const pf=/Minified React error #\d+;/i;function mf(e){return e&&pf.test(e.message)?1:0}function _f(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function bs(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function hf(e){const t=e&&e.name;return!t&&bs(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function gf(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:bs(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:"No error message"}function yf(e,t,r,n){const o=r&&r.syntheticException||void 0,i=ao(e,t,o,n);return qt(i),i.level="error",r&&r.event_id&&(i.event_id=r.event_id),Dt(i)}function bf(e,t,r="info",n,o){const i=n&&n.syntheticException||void 0,s=co(e,t,i,o);return s.level=r,n&&n.event_id&&(s.event_id=n.event_id),Dt(s)}function ao(e,t,r,n,o){let i;if(yi(t)&&t.error)return io(e,t.error);if(bi(t)||Nl(t)){const s=t;if("stack"in t)i=io(e,t);else{const a=s.name||(bi(s)?"DOMError":"DOMException"),c=s.message?`${a}: ${s.message}`:a;i=co(e,c,r,n),Hn(i,c)}return"code"in s&&(i.tags={...i.tags,"DOMException.code":`${s.code}`}),i}return Or(t)?io(e,t):jt(t)||Mr(t)?(i=ff(e,t,r,o),qt(i,{synthetic:!0}),i):(i=co(e,t,r,n),Hn(i,`${t}`),qt(i,{synthetic:!0}),i)}function co(e,t,r,n){const o={};if(n&&r){const i=so(e,r);i.length&&(o.exception={values:[{value:t,stacktrace:{frames:i}}]}),qt(o,{synthetic:!0})}if(Fn(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 vf(e,{isUnhandledRejection:t}){const r=Bl(e),n=t?"promise rejection":"exception";return yi(e)?`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``:Mr(e)?`Event \`${Sf(e)}\` (type=${e.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function Sf(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Ef(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const r=e[t];if(r instanceof Error)return r}}function wf(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:lr(n)}},i=Cf(e);return ur(o,[i])}function Cf(e){return[{type:"user_report"},e]}class Af extends bd{constructor(t){const r={parentSpanIsAlwaysRootSpan:!0,...t},n=X.SENTRY_SDK_SOURCE||lf();as(r,"browser",["browser"],n),super(r),r.sendClientReports&&X.document&&X.document.addEventListener("visibilitychange",()=>{X.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,r){return yf(this._options.stackParser,t,r,this._options.attachStacktrace)}eventFromMessage(t,r="info",n){return bf(this._options.stackParser,t,r,n,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){mt&&j.warn("SDK not enabled, will not capture user feedback.");return}const r=wf(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 Tf=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,xe=ie,kf=1e3;let vs,lo,uo;function If(e){It("dom",e),Nt("dom",Nf)}function Nf(){if(!xe.document)return;const e=Xe.bind(null,"dom"),t=Ss(e,!0);xe.document.addEventListener("click",t,!1),xe.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(r=>{const o=xe[r],i=o&&o.prototype;!i||!i.hasOwnProperty||!i.hasOwnProperty("addEventListener")||(He(i,"addEventListener",function(s){return function(a,c,u){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 m=Ss(e);f.handler=m,s.call(this,a,m,u)}f.refCount++}catch{}return s.call(this,a,c,u)}}),He(i,"removeEventListener",function(s){return function(a,c,u){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,u),f.handler=void 0,delete d[a]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return s.call(this,a,c,u)}}))})}function Of(e){if(e.type!==lo)return!1;try{if(!e.target||e.target._sentryId!==uo)return!1}catch{}return!0}function Mf(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=Df(r);if(Mf(r.type,n))return;Mt(r,"_sentryCaptured",!0),n&&!n._sentryId&&Mt(n,"_sentryId",Ve());const o=r.type==="keypress"?"input":r.type;Of(r)||(e({event:r,name:o,global:t}),lo=r.type,uo=n?n._sentryId:void 0),clearTimeout(vs),vs=xe.setTimeout(()=>{uo=void 0,lo=void 0},kf)}}function Df(e){try{return e.target}catch{return null}}let zr;function Es(e){const t="history";It(t,e),Nt(t,Pf)}function Pf(){if(!uf())return;const e=xe.onpopstate;xe.onpopstate=function(...r){const n=xe.location.href,o=zr;if(zr=n,Xe("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=zr,s=String(o);zr=s,Xe("history",{from:i,to:s})}return r.apply(this,n)}}He(xe.history,"pushState",t),He(xe.history,"replaceState",t)}const jr={};function Lf(e){const t=jr[e];if(t)return t;let r=xe[e];if(to(r))return jr[e]=r.bind(xe);const n=xe.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){Tf&&j.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return r&&(jr[e]=r.bind(xe))}function ws(e){jr[e]=void 0}const dr="__sentry_xhr_v3__";function xf(e){It("xhr",e),Nt("xhr",Ff)}function Ff(){if(!xe.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,r,n){const o=new Error,i=st()*1e3,s=it(n[0])?n[0].toUpperCase():void 0,a=$f(n[1]);if(!s||!a)return t.apply(r,n);r[dr]={method:s,url:a,request_headers:{}},s==="POST"&&a.match(/sentry_key/)&&(r.__sentry_own_request__=!0);const c=()=>{const u=r[dr];if(u&&r.readyState===4){try{u.status_code=r.status}catch{}const d={endTimestamp:st()*1e3,startTimestamp:i,xhr:r,virtualError:o};Xe("xhr",d)}};return"onreadystatechange"in r&&typeof r.onreadystatechange=="function"?r.onreadystatechange=new Proxy(r.onreadystatechange,{apply(u,d,f){return c(),u.apply(d,f)}}):r.addEventListener("readystatechange",c),r.setRequestHeader=new Proxy(r.setRequestHeader,{apply(u,d,f){const[m,_]=f,h=d[dr];return h&&it(m)&&it(_)&&(h.request_headers[m.toLowerCase()]=_),u.apply(d,f)}}),t.apply(r,n)}}),e.send=new Proxy(e.send,{apply(t,r,n){const o=r[dr];if(!o)return t.apply(r,n);n[0]!==void 0&&(o.body=n[0]);const i={startTimestamp:st()*1e3,xhr:r};return Xe("xhr",i),t.apply(r,n)}})}function $f(e){if(it(e))return e;try{return e.toString()}catch{}}function Bf(e,t=Lf("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 ws("fetch"),Lr("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 ws("fetch"),r-=s,n--,Lr(c)}}return Md(e,o)}const Rf=30,Uf=50;function fo(e,t,r,n){const o={filename:e,function:t==="<anonymous>"?kt:t,in_app:!0};return r!==void 0&&(o.lineno=r),n!==void 0&&(o.colno=n),o}const Hf=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,zf=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,jf=/\((\S*)(?::(\d+))(?::(\d+))\)/,Wf=[Rf,e=>{const t=Hf.exec(e);if(t){const[,n,o,i]=t;return fo(n,kt,+o,+i)}const r=zf.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){const s=jf.exec(r[2]);s&&(r[2]=s[1],r[3]=s[2],r[4]=s[3])}const[o,i]=Cs(r[1]||kt,r[2]);return fo(i,o,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],qf=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Gf=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Zf=mi(...[Wf,[Uf,e=>{const t=qf.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=Gf.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]||kt;return[o,n]=Cs(o,n),fo(n,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),Cs=(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]:kt,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Wr=1024,Yf="Breadcrumbs",Vf=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Yf,setup(r){t.console&&Kd(Qf(r)),t.dom&&If(Jf(r,t.dom)),t.xhr&&xf(Xf(r)),t.fetch&&sf(ep(r)),t.history&&Es(tp(r)),t.sentry&&r.on("beforeSendEvent",Kf(r))}}});function Kf(e){return function(r){we()===e&&Lt({category:`sentry.${r.type==="transaction"?"transaction":"event"}`,event_id:r.event_id,level:r.level,message:ft(r)},{event:r})}}function Jf(e,t){return function(n){if(we()!==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>Wr&&(mt&&j.warn(`\`dom.maxStringLength\` cannot exceed ${Wr}, but a value of ${a} was configured. Sentry will use ${Wr} instead.`),a=Wr),typeof s=="string"&&(s=[s]);try{const u=n.event,d=rp(u)?u.target:u;o=Si(d,{keyAttrs:s,maxStringLength:a}),i=Fl(d)}catch{o="<unknown>"}if(o.length===0)return;const c={category:`ui.${n.name}`,message:o};i&&(c.data={"ui.component_name":i}),Lt(c,{event:n.event,name:n.name,global:n.global})}}function Qf(e){return function(r){if(we()!==e)return;const n={category:"console",data:{arguments:r.args,logger:"console"},level:Qd(r.level),message:Ei(r.args," ")};if(r.level==="assert")if(r.args[0]===!1)n.message=`Assertion failed: ${Ei(r.args.slice(1)," ")||"console.assert"}`,n.data.arguments=r.args.slice(1);else return;Lt(n,{input:r.args,level:r.level})}}function Xf(e){return function(r){if(we()!==e)return;const{startTimestamp:n,endTimestamp:o}=r,i=r.xhr[dr];if(!n||!o||!i)return;const{method:s,url:a,status_code:c,body:u}=i,d={method:s,url:a,status_code:c},f={xhr:r.xhr,input:u,startTimestamp:n,endTimestamp:o},m=_s(c);Lt({category:"xhr",data:d,type:"http",level:m},f)}}function ep(e){return function(r){if(we()!==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};Lt({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=_s(s.status_code);Lt({category:"fetch",data:s,type:"http",level:c},a)}}}function tp(e){return function(r){if(we()!==e)return;let n=r.from,o=r.to;const i=Xn(X.location.href);let s=n?Xn(n):void 0;const a=Xn(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),Lt({category:"navigation",data:{from:n,to:o}})}}function rp(e){return!!e&&!!e.target}const np=["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"],op="BrowserApiErrors",ip=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:op,setupOnce(){t.setTimeout&&He(X,"setTimeout",As),t.setInterval&&He(X,"setInterval",As),t.requestAnimationFrame&&He(X,"requestAnimationFrame",sp),t.XMLHttpRequest&&"XMLHttpRequest"in X&&He(XMLHttpRequest.prototype,"send",ap);const r=t.eventTarget;r&&(Array.isArray(r)?r:np).forEach(cp)}}});function As(e){return function(...t){const r=t[0];return t[0]=Yt(r,{mechanism:{data:{function:dt(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function sp(e){return function(t){return e.apply(this,[Yt(t,{mechanism:{data:{function:"requestAnimationFrame",handler:dt(e)},handled:!1,type:"instrument"}})])}}function ap(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:dt(i)},handled:!1,type:"instrument"}},a=Rn(i);return a&&(s.mechanism.data.handler=dt(a)),Yt(i,s)})}),e.apply(this,t)}}function cp(e){const r=X[e],n=r&&r.prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(He(n,"addEventListener",function(o){return function(i,s,a){try{lp(s)&&(s.handleEvent=Yt(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:dt(s),target:e},handled:!1,type:"instrument"}}))}catch{}return o.apply(this,[i,Yt(s,{mechanism:{data:{function:"addEventListener",handler:dt(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 lp(e){return typeof e.handleEvent=="function"}const up=()=>({name:"BrowserSession",setupOnce(){if(typeof X.document>"u"){mt&&j.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Vi({ignoreDuration:!0}),Qi(),Es(({from:e,to:t})=>{e!==void 0&&e!==t&&(Vi({ignoreDuration:!0}),Qi())})}}),dp="GlobalHandlers",fp=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:dp,setupOnce(){Error.stackTraceLimit=50},setup(r){t.onerror&&(pp(r),Ts("onerror")),t.onunhandledrejection&&(mp(r),Ts("onunhandledrejection"))}}});function pp(e){Al(t=>{const{stackParser:r,attachStacktrace:n}=ks();if(we()!==e||ys())return;const{msg:o,url:i,line:s,column:a,error:c}=t,u=gp(ao(r,c||o,void 0,n,!1),i,s,a);u.level="error",Yi(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function mp(e){kl(t=>{const{stackParser:r,attachStacktrace:n}=ks();if(we()!==e||ys())return;const o=_p(t),i=$n(o)?hp(o):ao(r,o,void 0,n,!0);i.level="error",Yi(i,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function _p(e){if($n(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 hp(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function gp(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||[],u=n,d=r,f=it(t)&&t.length>0?t:xl();return c.length===0&&c.push({colno:u,filename:f,function:kt,in_app:!0,lineno:d}),e}function Ts(e){mt&&j.log(`Global Handler attached: ${e}`)}function ks(){const e=we();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const yp=()=>({name:"HttpContext",preprocessEvent(e){if(!X.navigator&&!X.location&&!X.document)return;const t=e.request&&e.request.url||X.location&&X.location.href,{referrer:r}=X.document||{},{userAgent:n}=X.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}}),bp="cause",vp=5,Sp="LinkedErrors",Ep=((e={})=>{const t=e.limit||vp,r=e.key||bp;return{name:Sp,preprocessEvent(n,o,i){const s=i.getOptions();Yd(oo,s.stackParser,s.maxValueLength,r,t,n,o)}}});function wp(e){const t=[$d(),Ld(),ip(),Vf(),fp(),Ep(),ef(),yp()];return e.autoSessionTracking!==!1&&t.push(up()),t}function Cp(e={}){const t={defaultIntegrations:wp(e),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:X.SENTRY_RELEASE&&X.SENTRY_RELEASE.id?X.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return e.defaultIntegrations==null&&delete e.defaultIntegrations,{...t,...e}}function Ap(){const e=typeof X.window<"u"&&X;if(!e)return!1;const t=e.chrome?"chrome":"browser",r=e[t],n=r&&r.runtime&&r.runtime.id,o=X.location&&X.location.href||"",i=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],s=!!n&&X===X.top&&i.some(c=>o.startsWith(`${c}//`)),a=typeof e.nw<"u";return!!n&&!s&&!a}function Tp(e={}){const t=Cp(e);if(!t.skipBrowserExtensionCheck&&Ap()){Tt(()=>{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}mt&&(hs()||j.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:wl(t.stackParser||Zf),integrations:_d(t),transport:t.transport||Bf};return Ed(Af,r)}function Is(e={}){if(!X.document){mt&&j.error("Global document not defined in showReportDialog call");return}const t=nt(),r=t.getClient(),n=r&&r.getDsn();if(!n){mt&&j.error("DSN not configured for showReportDialog call");return}if(t&&(e.user={...t.getUser(),...e.user}),!e.eventId){const a=cd();a&&(e.eventId=a)}const o=X.document.createElement("script");o.async=!0,o.crossOrigin="anonymous",o.src=pd(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{X.removeEventListener("message",a)}};X.addEventListener("message",a)}const s=X.document.head||X.document.body;s?s.appendChild(o):mt&&j.error("Not injecting report dialog. No injection point found in HTML")}const kp={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"},Ns=X;async function Ip(e,t){const r=kp[e],n=Ns.Sentry=Ns.Sentry||{},o=n[e];if(typeof o=="function"&&!("_isShim"in o))return o;const i=Np(r),s=X.document.createElement("script");s.src=i,s.crossOrigin="anonymous",s.referrerPolicy="origin";const a=new Promise((f,m)=>{s.addEventListener("load",()=>f()),s.addEventListener("error",m)}),c=X.document.currentScript,u=X.document.body||X.document.head||c&&c.parentElement;if(u)u.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 Np(e){const t=we(),r=t&&t.getOptions(),n=r&&r.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${ut}/${e}.min.js`,n).toString()}function Op(e){const t={...e};return as(t,"react"),ad("react",{version:y.version}),Tp(t)}function Mp(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function Dp(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 Pp(e,{componentStack:t},r){if(Mp(y.version)&&Or(e)&&t){const n=new Error(e.message);n.name=`React ErrorBoundary ${e.name}`,n.stack=t,Dp(e,n)}return Rr(e,{...r,captureContext:{contexts:{react:{componentStack:t}}}})}var po={exports:{}},ae={};/** @license React v16.13.1
|
|
17
|
+
Url: ${jr(e)}`),!0)}function jd(e,t){return e.type||!t||!t.length?!1:Zd(e).some(r=>Fr(r,t))}function Wd(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const r=e.transaction;return r?Fr(r,t):!1}function qd(e,t){if(!t||!t.length)return!1;const r=jr(e);return r?Fr(r,t):!1}function Gd(e,t){if(!t||!t.length)return!0;const r=jr(e);return r?Fr(r,t):!0}function Zd(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 Vd(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function Yd(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 jr(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?Yd(t):null}catch{return fe&&G.error(`Cannot extract url for event ${ft(e)}`),null}}function Kd(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 Jd(e,t,r=250,n,o,i,s){if(!i.exception||!i.exception.values||!s||!Ot(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=Qd(Xn(e,t,o,s.originalException,n,i.exception.values,a,0),r))}function Xn(e,t,r,n,o,i,s,a){if(i.length>=r+1)return i;let c=[...i];if(Ot(n[o],Error)){ds(s,a);const u=e(t,n[o]),d=c.length;fs(u,o,d,a),c=Xn(e,t,r,n[o],o,[u,...c],u,d)}return Array.isArray(n.errors)&&n.errors.forEach((u,d)=>{if(Ot(u,Error)){ds(s,a);const f=e(t,u),_=c.length;fs(f,`errors[${d}]`,_,a),c=Xn(e,t,r,u,o,[f,...c],f,_)}}),c}function ds(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 fs(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 Qd(e,t){return e.map(r=>(r.value&&(r.value=Gt(r.value,t)),r))}function eo(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 Xd(e){const t="console";It(t,e),Nt(t,ef)}function ef(){"console"in ce&&Dn.forEach(function(e){e in ce.console&&Re(ce.console,e,function(t){return Nr[e]=t,function(...r){et("console",{args:r,level:e});const o=Nr[e];o&&o.apply(ce.console,r)}})})}function tf(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const rf="Dedupe",nf=(()=>{let e;return{name:rf,processEvent(t){if(t.type)return t;try{if(of(t,e))return fe&&G.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}});function of(e,t){return t?!!(sf(e,t)||af(e,t)):!1}function sf(e,t){const r=e.message,n=t.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!ms(e,t)||!ps(e,t))}function af(e,t){const r=_s(t),n=_s(e);return!(!r||!n||r.type!==n.type||r.value!==n.value||!ms(e,t)||!ps(e,t))}function ps(e,t){let r=hi(e),n=hi(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 ms(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 _s(e){return e.exception&&e.exception.values&&e.exception.values[0]}function hs(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const to=ce;function gs(){if(!("fetch"in to))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function ro(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function cf(){if(typeof EdgeRuntime=="string")return!0;if(!gs())return!1;if(ro(to.fetch))return!0;let e=!1;const t=to.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=ro(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){At&&G.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function lf(e,t){const r="fetch";It(r,e),Nt(r,()=>uf(void 0,t))}function uf(e,t=!1){t&&!cf()||Re(ce,"fetch",function(r){return function(...n){const o=new Error,{method:i,url:s}=df(n),a={args:n,fetchData:{method:i,url:s},startTimestamp:st()*1e3,virtualError:o};return et("fetch",{...a}),r.apply(ce,n).then(async c=>(et("fetch",{...a,endTimestamp:st()*1e3,response:c}),c),c=>{throw et("fetch",{...a,endTimestamp:st()*1e3,error:c}),Pr(c)&&c.stack===void 0&&(c.stack=o.stack,Mt(c,"framesToPop",1)),c})}})}function no(e,t){return!!e&&typeof e=="object"&&!!e[t]}function ys(e){return typeof e=="string"?e:e?no(e,"url")?e.url:e.toString?e.toString():"":""}function df(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[r,n]=e;return{url:ys(r),method:no(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:ys(t),method:no(t,"method")?String(t.method).toUpperCase():"GET"}}function ff(){return"npm"}const Wr=ce;function pf(){const e=Wr.chrome,t=e&&e.app&&e.app.runtime,r="history"in Wr&&!!Wr.history.pushState&&!!Wr.history.replaceState;return!t&&r}const oe=ce;let oo=0;function bs(){return oo>0}function mf(){oo++,setTimeout(()=>{oo--})}function Kt(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(Hn(e))return e}catch{return e}const n=function(...o){try{const i=o.map(s=>Kt(s,t));return e.apply(this,i)}catch(i){throw mf(),Zn(s=>{s.addEventProcessor(a=>(t.mechanism&&(zn(a,void 0),Zt(a,t.mechanism)),a.extra={...a.extra,arguments:o},a)),zr(i)}),i}};try{for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}catch{}Ci(n,e),Mt(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return e.name}})}catch{}return n}const mt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function io(e,t){const r=ao(e,t),n={type:bf(t),value:vf(t)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function _f(e,t,r,n){const o=Ce(),i=o&&o.getOptions().normalizeDepth,s=Af(t),a={__serialized__:ji(t,i)};if(s)return{exception:{values:[io(e,s)]},extra:a};const c={exception:{values:[{type:Lr(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:wf(t,{isUnhandledRejection:n})}]},extra:a};if(r){const u=ao(e,r);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function so(e,t){return{exception:{values:[io(e,t)]}}}function ao(e,t){const r=t.stacktrace||t.stack||"",n=gf(t),o=yf(t);try{return e(r,n,o)}catch{}return[]}const hf=/Minified React error #\d+;/i;function gf(e){return e&&hf.test(e.message)?1:0}function yf(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function vs(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function bf(e){const t=e&&e.name;return!t&&vs(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function vf(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:vs(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:"No error message"}function Sf(e,t,r,n){const o=r&&r.syntheticException||void 0,i=co(e,t,o,n);return Zt(i),i.level="error",r&&r.event_id&&(i.event_id=r.event_id),Dt(i)}function Ef(e,t,r="info",n,o){const i=n&&n.syntheticException||void 0,s=lo(e,t,i,o);return s.level=r,n&&n.event_id&&(s.event_id=n.event_id),Dt(s)}function co(e,t,r,n,o){let i;if(bi(t)&&t.error)return so(e,t.error);if(vi(t)||Dl(t)){const s=t;if("stack"in t)i=so(e,t);else{const a=s.name||(vi(s)?"DOMError":"DOMException"),c=s.message?`${a}: ${s.message}`:a;i=lo(e,c,r,n),zn(i,c)}return"code"in s&&(i.tags={...i.tags,"DOMException.code":`${s.code}`}),i}return Pr(t)?so(e,t):qt(t)||Lr(t)?(i=_f(e,t,r,o),Zt(i,{synthetic:!0}),i):(i=lo(e,t,r,n),zn(i,`${t}`),Zt(i,{synthetic:!0}),i)}function lo(e,t,r,n){const o={};if(n&&r){const i=ao(e,r);i.length&&(o.exception={values:[{value:t,stacktrace:{frames:i}}]}),Zt(o,{synthetic:!0})}if($n(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 wf(e,{isUnhandledRejection:t}){const r=Rl(e),n=t?"promise rejection":"exception";return bi(e)?`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``:Lr(e)?`Event \`${Cf(e)}\` (type=${e.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function Cf(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Af(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const r=e[t];if(r instanceof Error)return r}}function Tf(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:dr(n)}},i=kf(e);return fr(o,[i])}function kf(e){return[{type:"user_report"},e]}class If extends Ed{constructor(t){const r={parentSpanIsAlwaysRootSpan:!0,...t},n=oe.SENTRY_SDK_SOURCE||ff();cs(r,"browser",["browser"],n),super(r),r.sendClientReports&&oe.document&&oe.document.addEventListener("visibilitychange",()=>{oe.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,r){return Sf(this._options.stackParser,t,r,this._options.attachStacktrace)}eventFromMessage(t,r="info",n){return Ef(this._options.stackParser,t,r,n,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){mt&&G.warn("SDK not enabled, will not capture user feedback.");return}const r=Tf(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 Nf=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,xe=ce,Of=1e3;let Ss,uo,fo;function Mf(e){It("dom",e),Nt("dom",Df)}function Df(){if(!xe.document)return;const e=et.bind(null,"dom"),t=Es(e,!0);xe.document.addEventListener("click",t,!1),xe.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(r=>{const o=xe[r],i=o&&o.prototype;!i||!i.hasOwnProperty||!i.hasOwnProperty("addEventListener")||(Re(i,"addEventListener",function(s){return function(a,c,u){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 _=Es(e);f.handler=_,s.call(this,a,_,u)}f.refCount++}catch{}return s.call(this,a,c,u)}}),Re(i,"removeEventListener",function(s){return function(a,c,u){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,u),f.handler=void 0,delete d[a]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return s.call(this,a,c,u)}}))})}function Pf(e){if(e.type!==uo)return!1;try{if(!e.target||e.target._sentryId!==fo)return!1}catch{}return!0}function Lf(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function Es(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;const n=xf(r);if(Lf(r.type,n))return;Mt(r,"_sentryCaptured",!0),n&&!n._sentryId&&Mt(n,"_sentryId",Ye());const o=r.type==="keypress"?"input":r.type;Pf(r)||(e({event:r,name:o,global:t}),uo=r.type,fo=n?n._sentryId:void 0),clearTimeout(Ss),Ss=xe.setTimeout(()=>{fo=void 0,uo=void 0},Of)}}function xf(e){try{return e.target}catch{return null}}let qr;function ws(e){const t="history";It(t,e),Nt(t,Ff)}function Ff(){if(!pf())return;const e=xe.onpopstate;xe.onpopstate=function(...r){const n=xe.location.href,o=qr;if(qr=n,et("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=qr,s=String(o);qr=s,et("history",{from:i,to:s})}return r.apply(this,n)}}Re(xe.history,"pushState",t),Re(xe.history,"replaceState",t)}const Gr={};function $f(e){const t=Gr[e];if(t)return t;let r=xe[e];if(ro(r))return Gr[e]=r.bind(xe);const n=xe.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){Nf&&G.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return r&&(Gr[e]=r.bind(xe))}function Cs(e){Gr[e]=void 0}const pr="__sentry_xhr_v3__";function Bf(e){It("xhr",e),Nt("xhr",Uf)}function Uf(){if(!xe.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,r,n){const o=new Error,i=st()*1e3,s=it(n[0])?n[0].toUpperCase():void 0,a=Hf(n[1]);if(!s||!a)return t.apply(r,n);r[pr]={method:s,url:a,request_headers:{}},s==="POST"&&a.match(/sentry_key/)&&(r.__sentry_own_request__=!0);const c=()=>{const u=r[pr];if(u&&r.readyState===4){try{u.status_code=r.status}catch{}const d={endTimestamp:st()*1e3,startTimestamp:i,xhr:r,virtualError:o};et("xhr",d)}};return"onreadystatechange"in r&&typeof r.onreadystatechange=="function"?r.onreadystatechange=new Proxy(r.onreadystatechange,{apply(u,d,f){return c(),u.apply(d,f)}}):r.addEventListener("readystatechange",c),r.setRequestHeader=new Proxy(r.setRequestHeader,{apply(u,d,f){const[_,h]=f,g=d[pr];return g&&it(_)&&it(h)&&(g.request_headers[_.toLowerCase()]=h),u.apply(d,f)}}),t.apply(r,n)}}),e.send=new Proxy(e.send,{apply(t,r,n){const o=r[pr];if(!o)return t.apply(r,n);n[0]!==void 0&&(o.body=n[0]);const i={startTimestamp:st()*1e3,xhr:r};return et("xhr",i),t.apply(r,n)}})}function Hf(e){if(it(e))return e;try{return e.toString()}catch{}}function Rf(e,t=$f("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"),$r("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--,$r(c)}}return Ld(e,o)}const zf=30,jf=50;function po(e,t,r,n){const o={filename:e,function:t==="<anonymous>"?kt:t,in_app:!0};return r!==void 0&&(o.lineno=r),n!==void 0&&(o.colno=n),o}const Wf=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,qf=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Gf=/\((\S*)(?::(\d+))(?::(\d+))\)/,Zf=[zf,e=>{const t=Wf.exec(e);if(t){const[,n,o,i]=t;return po(n,kt,+o,+i)}const r=qf.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){const s=Gf.exec(r[2]);s&&(r[2]=s[1],r[3]=s[2],r[4]=s[3])}const[o,i]=As(r[1]||kt,r[2]);return po(i,o,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],Vf=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Yf=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Kf=_i(...[Zf,[jf,e=>{const t=Vf.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=Yf.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]||kt;return[o,n]=As(o,n),po(n,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),As=(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]:kt,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Zr=1024,Jf="Breadcrumbs",Qf=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Jf,setup(r){t.console&&Xd(tp(r)),t.dom&&Mf(ep(r,t.dom)),t.xhr&&Bf(rp(r)),t.fetch&&lf(np(r)),t.history&&ws(op(r)),t.sentry&&r.on("beforeSendEvent",Xf(r))}}});function Xf(e){return function(r){Ce()===e&&Lt({category:`sentry.${r.type==="transaction"?"transaction":"event"}`,event_id:r.event_id,level:r.level,message:ft(r)},{event:r})}}function ep(e,t){return function(n){if(Ce()!==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>Zr&&(mt&&G.warn(`\`dom.maxStringLength\` cannot exceed ${Zr}, but a value of ${a} was configured. Sentry will use ${Zr} instead.`),a=Zr),typeof s=="string"&&(s=[s]);try{const u=n.event,d=ip(u)?u.target:u;o=Ei(d,{keyAttrs:s,maxStringLength:a}),i=Ul(d)}catch{o="<unknown>"}if(o.length===0)return;const c={category:`ui.${n.name}`,message:o};i&&(c.data={"ui.component_name":i}),Lt(c,{event:n.event,name:n.name,global:n.global})}}function tp(e){return function(r){if(Ce()!==e)return;const n={category:"console",data:{arguments:r.args,logger:"console"},level:tf(r.level),message:wi(r.args," ")};if(r.level==="assert")if(r.args[0]===!1)n.message=`Assertion failed: ${wi(r.args.slice(1)," ")||"console.assert"}`,n.data.arguments=r.args.slice(1);else return;Lt(n,{input:r.args,level:r.level})}}function rp(e){return function(r){if(Ce()!==e)return;const{startTimestamp:n,endTimestamp:o}=r,i=r.xhr[pr];if(!n||!o||!i)return;const{method:s,url:a,status_code:c,body:u}=i,d={method:s,url:a,status_code:c},f={xhr:r.xhr,input:u,startTimestamp:n,endTimestamp:o},_=hs(c);Lt({category:"xhr",data:d,type:"http",level:_},f)}}function np(e){return function(r){if(Ce()!==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};Lt({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=hs(s.status_code);Lt({category:"fetch",data:s,type:"http",level:c},a)}}}function op(e){return function(r){if(Ce()!==e)return;let n=r.from,o=r.to;const i=eo(oe.location.href);let s=n?eo(n):void 0;const a=eo(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),Lt({category:"navigation",data:{from:n,to:o}})}}function ip(e){return!!e&&!!e.target}const sp=["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"],ap="BrowserApiErrors",cp=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:ap,setupOnce(){t.setTimeout&&Re(oe,"setTimeout",Ts),t.setInterval&&Re(oe,"setInterval",Ts),t.requestAnimationFrame&&Re(oe,"requestAnimationFrame",lp),t.XMLHttpRequest&&"XMLHttpRequest"in oe&&Re(XMLHttpRequest.prototype,"send",up);const r=t.eventTarget;r&&(Array.isArray(r)?r:sp).forEach(dp)}}});function Ts(e){return function(...t){const r=t[0];return t[0]=Kt(r,{mechanism:{data:{function:dt(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function lp(e){return function(t){return e.apply(this,[Kt(t,{mechanism:{data:{function:"requestAnimationFrame",handler:dt(e)},handled:!1,type:"instrument"}})])}}function up(e){return function(...t){const r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in r&&typeof r[o]=="function"&&Re(r,o,function(i){const s={mechanism:{data:{function:o,handler:dt(i)},handled:!1,type:"instrument"}},a=Hn(i);return a&&(s.mechanism.data.handler=dt(a)),Kt(i,s)})}),e.apply(this,t)}}function dp(e){const r=oe[e],n=r&&r.prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Re(n,"addEventListener",function(o){return function(i,s,a){try{fp(s)&&(s.handleEvent=Kt(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:dt(s),target:e},handled:!1,type:"instrument"}}))}catch{}return o.apply(this,[i,Kt(s,{mechanism:{data:{function:"addEventListener",handler:dt(s),target:e},handled:!1,type:"instrument"}}),a])}}),Re(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 fp(e){return typeof e.handleEvent=="function"}const pp=()=>({name:"BrowserSession",setupOnce(){if(typeof oe.document>"u"){mt&&G.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Ki({ignoreDuration:!0}),Xi(),ws(({from:e,to:t})=>{e!==void 0&&e!==t&&(Ki({ignoreDuration:!0}),Xi())})}}),mp="GlobalHandlers",_p=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:mp,setupOnce(){Error.stackTraceLimit=50},setup(r){t.onerror&&(hp(r),ks("onerror")),t.onunhandledrejection&&(gp(r),ks("onunhandledrejection"))}}});function hp(e){Il(t=>{const{stackParser:r,attachStacktrace:n}=Is();if(Ce()!==e||bs())return;const{msg:o,url:i,line:s,column:a,error:c}=t,u=vp(co(r,c||o,void 0,n,!1),i,s,a);u.level="error",Yi(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function gp(e){Ol(t=>{const{stackParser:r,attachStacktrace:n}=Is();if(Ce()!==e||bs())return;const o=yp(t),i=Bn(o)?bp(o):co(r,o,void 0,n,!0);i.level="error",Yi(i,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function yp(e){if(Bn(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 bp(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function vp(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||[],u=n,d=r,f=it(t)&&t.length>0?t:Bl();return c.length===0&&c.push({colno:u,filename:f,function:kt,in_app:!0,lineno:d}),e}function ks(e){mt&&G.log(`Global Handler attached: ${e}`)}function Is(){const e=Ce();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Sp=()=>({name:"HttpContext",preprocessEvent(e){if(!oe.navigator&&!oe.location&&!oe.document)return;const t=e.request&&e.request.url||oe.location&&oe.location.href,{referrer:r}=oe.document||{},{userAgent:n}=oe.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}}),Ep="cause",wp=5,Cp="LinkedErrors",Ap=((e={})=>{const t=e.limit||wp,r=e.key||Ep;return{name:Cp,preprocessEvent(n,o,i){const s=i.getOptions();Jd(io,s.stackParser,s.maxValueLength,r,t,n,o)}}});function Tp(e){const t=[Hd(),$d(),cp(),Qf(),_p(),Ap(),nf(),Sp()];return e.autoSessionTracking!==!1&&t.push(pp()),t}function kp(e={}){const t={defaultIntegrations:Tp(e),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:oe.SENTRY_RELEASE&&oe.SENTRY_RELEASE.id?oe.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return e.defaultIntegrations==null&&delete e.defaultIntegrations,{...t,...e}}function Ip(){const e=typeof oe.window<"u"&&oe;if(!e)return!1;const t=e.chrome?"chrome":"browser",r=e[t],n=r&&r.runtime&&r.runtime.id,o=oe.location&&oe.location.href||"",i=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],s=!!n&&oe===oe.top&&i.some(c=>o.startsWith(`${c}//`)),a=typeof e.nw<"u";return!!n&&!s&&!a}function Np(e={}){const t=kp(e);if(!t.skipBrowserExtensionCheck&&Ip()){Tt(()=>{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}mt&&(gs()||G.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:Tl(t.stackParser||Kf),integrations:yd(t),transport:t.transport||Rf};return Ad(If,r)}function Ns(e={}){if(!oe.document){mt&&G.error("Global document not defined in showReportDialog call");return}const t=nt(),r=t.getClient(),n=r&&r.getDsn();if(!n){mt&&G.error("DSN not configured for showReportDialog call");return}if(t&&(e.user={...t.getUser(),...e.user}),!e.eventId){const a=dd();a&&(e.eventId=a)}const o=oe.document.createElement("script");o.async=!0,o.crossOrigin="anonymous",o.src=hd(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{oe.removeEventListener("message",a)}};oe.addEventListener("message",a)}const s=oe.document.head||oe.document.body;s?s.appendChild(o):mt&&G.error("Not injecting report dialog. No injection point found in HTML")}const Op={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"},Os=oe;async function Mp(e,t){const r=Op[e],n=Os.Sentry=Os.Sentry||{},o=n[e];if(typeof o=="function"&&!("_isShim"in o))return o;const i=Dp(r),s=oe.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=oe.document.currentScript,u=oe.document.body||oe.document.head||c&&c.parentElement;if(u)u.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 Dp(e){const t=Ce(),r=t&&t.getOptions(),n=r&&r.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${ut}/${e}.min.js`,n).toString()}function Pp(e){const t={...e};return cs(t,"react"),ud("react",{version:m.version}),Np(t)}function Lp(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function xp(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 Fp(e,{componentStack:t},r){if(Lp(m.version)&&Pr(e)&&t){const n=new Error(e.message);n.name=`React ErrorBoundary ${e.name}`,n.stack=t,xp(e,n)}return zr(e,{...r,captureContext:{contexts:{react:{componentStack:t}}}})}var mo={exports:{}},ue={};/** @license React v16.13.1
|
|
18
18
|
* react-is.production.min.js
|
|
19
19
|
*
|
|
20
20
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
21
21
|
*
|
|
22
22
|
* This source code is licensed under the MIT license found in the
|
|
23
23
|
* LICENSE file in the root directory of this source tree.
|
|
24
|
-
*/var Os;function Lp(){if(Os)return ae;Os=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,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,_=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,W=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,B=e?Symbol.for("react.scope"):60119;function M(C){if(typeof C=="object"&&C!==null){var H=C.$$typeof;switch(H){case t:switch(C=C.type,C){case c:case u:case n:case i:case o:case f:return C;default:switch(C=C&&C.$$typeof,C){case a:case d:case h:case _:case s:return C;default:return H}}case r:return H}}}function z(C){return M(C)===u}return ae.AsyncMode=c,ae.ConcurrentMode=u,ae.ContextConsumer=a,ae.ContextProvider=s,ae.Element=t,ae.ForwardRef=d,ae.Fragment=n,ae.Lazy=h,ae.Memo=_,ae.Portal=r,ae.Profiler=i,ae.StrictMode=o,ae.Suspense=f,ae.isAsyncMode=function(C){return z(C)||M(C)===c},ae.isConcurrentMode=z,ae.isContextConsumer=function(C){return M(C)===a},ae.isContextProvider=function(C){return M(C)===s},ae.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===t},ae.isForwardRef=function(C){return M(C)===d},ae.isFragment=function(C){return M(C)===n},ae.isLazy=function(C){return M(C)===h},ae.isMemo=function(C){return M(C)===_},ae.isPortal=function(C){return M(C)===r},ae.isProfiler=function(C){return M(C)===i},ae.isStrictMode=function(C){return M(C)===o},ae.isSuspense=function(C){return M(C)===f},ae.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===n||C===u||C===i||C===o||C===f||C===m||typeof C=="object"&&C!==null&&(C.$$typeof===h||C.$$typeof===_||C.$$typeof===s||C.$$typeof===a||C.$$typeof===d||C.$$typeof===W||C.$$typeof===x||C.$$typeof===B||C.$$typeof===b)},ae.typeOf=M,ae}var Ms;function xp(){return Ms||(Ms=1,po.exports=Lp()),po.exports}var mo,Ds;function Fp(){if(Ds)return mo;Ds=1;var e=xp(),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(h){return e.isMemo(h)?o:i[h.$$typeof]||t}var a=Object.defineProperty,c=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,m=Object.prototype;function _(h,b,W){if(typeof b!="string"){if(m){var x=f(b);x&&x!==m&&_(h,x,W)}var B=c(b);u&&(B=B.concat(u(b)));for(var M=s(h),z=s(b),C=0;C<B.length;++C){var H=B[C];if(!r[H]&&!(W&&W[H])&&!(z&&z[H])&&!(M&&M[H])){var Y=d(b,H);try{a(h,H,Y)}catch{}}}}return h}return mo=_,mo}Fp();const $p=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ps={componentStack:null,error:null,eventId:null};class _o extends On.Component{constructor(t){super(t),_o.prototype.__init.call(this),this.state=Ps,this._openFallbackReportDialog=!0;const r=we();r&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=r.on("afterSendEvent",n=>{!n.type&&this._lastEventId&&n.event_id===this._lastEventId&&Is({...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;Gn(u=>{i&&i(u,t,o);const d=this.props.handled!=null?this.props.handled:!!this.props.fallback,f=Pp(t,r,{mechanism:{handled:d}});s&&s(t,o,f),a&&(this._lastEventId=f,this._openFallbackReportDialog&&Is({...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(Ps)}}render(){const{fallback:t,children:r}=this.props,n=this.state;if(n.error){let o;return typeof t=="function"?o=On.createElement(t,{error:n.error,componentStack:n.componentStack,resetError:this.resetErrorBoundary,eventId:n.eventId}):o=t,On.isValidElement(o)?o:(t&&$p&&j.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 l.jsxs("div",{className:i,children:[l.jsxs("label",{htmlFor:e,className:"form-label",children:[t," ",o&&l.jsx("span",{className:"text-red-600",children:"*"})]}),s,r&&!n&&l.jsx("p",{id:`${e}-hint`,className:"mt-1 text-sm text-slate-500",children:r}),n&&l.jsx("p",{id:`${e}-error`,className:"mt-1 text-sm text-red-600",children:n})]})}function ho({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return l.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:l.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 Ls(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 Bp({id:e,label:t,hint:r,error:n,required:o,className:i,value:s,onChange:a,onKeyDown:c,isCurrency:u=!1,maxDigits:d,...f}){const[m,_]=y.useState(""),h=y.useRef(null);y.useEffect(()=>{if(s==null||s===""){_("");return}const x=String(s).replace(/\D/g,"");_(Ls(x,u))},[s,u]);const b=x=>{let B=x.target.value.replace(/\D/g,"");d!==void 0&&(B=B.slice(0,d)),_(Ls(B,u));const M={...x,currentTarget:{...x.currentTarget,value:B},target:{...x.target,value:B}};a?.(M)},W=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 l.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:l.jsx("input",{ref:h,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:m,onChange:b,onKeyDown:W,...f})})}function xs(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 Rp({id:e,label:t,hint:r,error:n,required:o,className:i,value:s="",onChange:a,...c}){const[u,d]=y.useState(""),f=y.useRef(null);y.useEffect(()=>{const _=s.replace(/\D/g,"").slice(0,9);d(xs(_))},[s]);const m=_=>{const h=_.target.value,b=_.target.selectionStart??0,W=h.replace(/\D/g,"").slice(0,9),x=xs(W);d(x);const B={..._,currentTarget:{..._.currentTarget,value:x},target:{..._.target,value:x}};a?.(B),setTimeout(()=>{if(f.current){const M=h.slice(0,b).replace(/\D/g,"").length;let z=M;M>5?z+=2:M>3&&(z+=1),f.current.setSelectionRange(z,z)}},0)};return l.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:l.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:u,onChange:m,...c})})}function go({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return l.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:l.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 Up({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return l.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:l.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 yo(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 bo(e){return e.replace(/\D/g,"")}function Hp({id:e,label:t,hint:r,error:n,required:o,className:i,value:s="",onChange:a,...c}){const[u,d]=y.useState(""),f=y.useRef(null),m=y.useRef(0);y.useEffect(()=>{if(!s){d("");return}let h=bo(s);h.length===11&&h.startsWith("1")&&(h=h.slice(1));const b=h.slice(0,10);d(yo(b))},[s]);const _=h=>{const b=h.target,W=b.value;m.current=b.selectionStart||0;const B=bo(W).slice(0,10),M=yo(B);d(M);const z=B.length===10?`+1${B}`:B,C={...h,currentTarget:{...h.currentTarget,value:z},target:{...h.target,value:z}};a?.(C),setTimeout(()=>{if(f.current){const H=W.slice(0,m.current),Y=bo(H),R=yo(Y),ee=Math.min(R.length,M.length);f.current.setSelectionRange(ee,ee)}},0)};return l.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:l.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:[l.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"}),l.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:u,onChange:_,...c})]})})}function zp({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return l.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:l.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 jp({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return l.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:l.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 Wp({id:e,label:t,hint:r,error:n,required:o,className:i,rows:s=4,...a}){return l.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:l.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 qp({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return l.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:l.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 qr({id:e,label:t,className:r,...n}){return l.jsxs("label",{className:`checkbox-card ${r||""}`,htmlFor:e,children:[l.jsx("input",{id:e,type:"checkbox",className:"checkbox-input",...n}),l.jsx("span",{className:"checkbox-label",children:t})]})}function Gp({onChoose:e,isSubmitting:t=!1}){const[r,n]=y.useState(!1),o=!r||t;return l.jsxs("div",{className:"communications-consent","data-testid":"communications-consent",children:[l.jsx("h3",{className:"text-lg font-semibold text-text-primary mb-3",children:"Communications Consent"}),l.jsx(qr,{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)."}),l.jsxs("div",{className:"text-sm text-slate-600 mt-4 space-y-2",children:[l.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."}),l.jsx("p",{children:"Consent is not required to receive quotes or purchase insurance."}),l.jsxs("p",{children:["Credify Corporation – Texas #3309669."," ",l.jsx("a",{href:"https://getcredify.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})," ","|"," ",l.jsx("a",{href:"https://getcredify.com/terms-of-service",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Terms of Service"})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3 mt-6",children:[l.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&&l.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:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.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"]}),l.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 Zp({name:e,value:t,checked:r,onChange:n,children:o}){return l.jsxs("label",{className:"radio-card",children:[l.jsx("input",{className:"radio-input",type:"radio",name:e,value:t,checked:r,onChange:n}),l.jsx("span",{className:"radio-label",children:o})]})}function Yp({legend:e,children:t,className:r,legendClassName:n}){return l.jsxs("fieldset",{className:r,children:[l.jsx("legend",{className:`form-label mb-4 ${n||""}`,children:e}),l.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:t})]})}function fr({id:e,label:t,hint:r,error:n,required:o,className:i,placeholder:s,options:a,children:c,...u}){const d=[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,f=!!c;return l.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:l.jsxs("select",{id:e,className:`form-input select-caret ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":d,required:o,...u,children:[s&&l.jsx("option",{value:"",disabled:!0,selected:!("value"in u),children:s}),f?c:a?.map(m=>l.jsx("option",{value:m.value,disabled:m.disabled,children:m.label},m.value))]})})}var vo={};const Vp="AIzaSyDjLdKLxoa-maLNGAyq_I_2r_Fe_TzFikw";function Kp(){try{if(typeof vo<"u"&&vo?.apiKey)return vo.apiKey}catch{}return Vp}function Jp(){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=${Kp()}&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 Qp(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 Xp({id:e,label:t,hint:r,error:n,required:o,className:i,onChange:s,onPlaceSelect:a,value:c,...u}){const d=y.useRef(null),f=y.useRef(null),m=y.useRef(null),_=y.useRef(null),[h,b]=y.useState(!0),[W,x]=y.useState(c||""),[B,M]=y.useState([]),[z,C]=y.useState(!1),[H,Y]=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=H},[H]),y.useEffect(()=>{c!==void 0&&x(String(c))},[c]);const oe=y.useRef(null);y.useEffect(()=>{if(!d.current)return;let J=!0;return Jp().then(()=>{!J||!d.current||(f.current=new google.maps.places.AutocompleteService,m.current=new google.maps.places.PlacesService(document.createElement("div")),b(!1))}).catch(V=>{console.error("Error loading Google Maps:",V),b(!1)}),()=>{J=!1,oe.current&&clearTimeout(oe.current)}},[]);const ve=J=>{const V=J.target.value;if(x(V),s?.(V),oe.current&&clearTimeout(oe.current),V.length<3){M([]),C(!1);return}oe.current=setTimeout(()=>{f.current&&f.current.getPlacePredictions({input:V,types:["address"]},(L,Q)=>{Q===google.maps.places.PlacesServiceStatus.OK&&L?(M(L),C(!0),Y(-1)):(M([]),C(!1))})},300)},Pe=J=>{if(!ee.current||R.current.length===0){J.key==="Escape"&&(C(!1),ee.current=!1);return}switch(J.key){case"ArrowDown":J.preventDefault(),Y(V=>{const L=V<R.current.length-1?V+1:V;return te.current=L,L});break;case"ArrowUp":J.preventDefault(),Y(V=>{const L=V>0?V-1:-1;return te.current=L,L});break;case"Enter":J.preventDefault(),te.current>=0&&te.current<R.current.length&&Ee(R.current[te.current]);break;case"Escape":J.preventDefault(),C(!1),ee.current=!1;break}};y.useEffect(()=>{const J=V=>{_.current&&!_.current.contains(V.target)&&d.current&&!d.current.contains(V.target)&&(C(!1),ee.current=!1)};if(z)return document.addEventListener("mousedown",J),()=>{document.removeEventListener("mousedown",J)}},[z]);const Ee=J=>{m.current&&m.current.getDetails({placeId:J.place_id,fields:["address_components","formatted_address","geometry"]},(V,L)=>{if(L===google.maps.places.PlacesServiceStatus.OK&&V){const Q=V.formatted_address||"";x(Q),C(!1),M([]),ee.current=!1;const me=Qp(V);s?.(Q,me),a?.(V)}})};return l.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:l.jsxs("div",{className:"relative",children:[l.jsx("input",{ref:d,id:e,type:"text",className:`form-input ${n?"input-error":""}`,value:W,onChange:ve,onKeyDown:Pe,"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:h||u.disabled,...u}),h&&l.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"Loading address suggestions..."}),z&&B.length>0&&l.jsx("div",{ref:_,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((J,V)=>l.jsxs("div",{className:`px-4 py-3 cursor-pointer transition-colors ${V===H?"bg-blue-50 text-slate-900":"bg-white text-slate-900 hover:bg-slate-50"} ${V<B.length-1?"border-b border-slate-100":""}`,role:"option","aria-selected":V===H,onClick:()=>Ee(J),onMouseEnter:()=>Y(V),children:[l.jsx("div",{className:"font-medium text-slate-900",children:J.structured_formatting.main_text}),J.structured_formatting.secondary_text&&l.jsx("div",{className:"text-sm text-slate-500 mt-0.5",children:J.structured_formatting.secondary_text})]},J.place_id))})]})})}function So(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"}`,u=(o.conditionals??[]).map((d,f)=>{const m=d.conditionalQuestions?t(d.conditionalQuestions,[...n,`${a}__c${f}`]):void 0;return{...d,conditionalQuestions:m}});return{...o,key:a,conditionals:u}});return t(e,[])}function S(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 u=s.prototype,d=Object.keys(u);for(let f=0;f<d.length;f++){const m=d[f];m in a||(a[m]=u[m].bind(a))}}const o=r?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(a){var c;const u=r?.Parent?new i:this;n(u,a),(c=u._zod).deferred??(c.deferred=[]);for(const d of u._zod.deferred)d();return u}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 Vt extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Fs extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const $s={};function xt(e){return $s}function Bs(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 Eo(e,t){return typeof t=="bigint"?t.toString():t}function wo(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Co(e){return e==null}function Ao(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function em(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 Rs=Symbol("evaluating");function ce(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Rs)return n===void 0&&(n=Rs,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Ft(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 Us(e){return JSON.stringify(e)}function tm(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Hs="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Gr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const rm=wo(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function pr(e){if(Gr(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(Gr(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function zs(e){return pr(e)?{...e}:Array.isArray(e)?[...e]:e}const nm=new Set(["string","number","symbol"]);function Kt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ht(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 om(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const im={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 sm(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 Ft(this,"shape",s),s},checks:[]});return ht(e,i)}function am(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 Ft(this,"shape",s),s},checks:[]});return ht(e,i)}function cm(e,t){if(!pr(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 Ft(this,"shape",i),i}});return ht(e,o)}function lm(e,t){if(!pr(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 Ft(this,"shape",n),n}});return ht(e,r)}function um(e,t){const r=_t(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return Ft(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return ht(e,r)}function dm(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 u in r){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(c[u]=e?new e({type:"optional",innerType:a[u]}):a[u])}else for(const u in a)c[u]=e?new e({type:"optional",innerType:a[u]}):a[u];return Ft(this,"shape",c),c},checks:[]});return ht(t,s)}function fm(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 Ft(this,"shape",i),i}});return ht(t,n)}function Jt(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 js(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Zr(e){return typeof e=="string"?e:e?.message}function $t(e,t,r){const n={...e,path:e.path??[]};if(!e.message){const o=Zr(e.inst?._zod.def?.error?.(e))??Zr(t?.error?.(e))??Zr(r.customError?.(e))??Zr(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function To(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function mr(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}const Ws=(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,Eo,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},qs=S("$ZodError",Ws),Gs=S("$ZodError",Ws,{Parent:Error});function pm(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 mm(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 ko=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 Vt;if(s.issues.length){const a=new(o?.Err??e)(s.issues.map(c=>$t(c,i,xt())));throw Hs(a,o?.callee),a}return s.value},Io=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=>$t(c,i,xt())));throw Hs(a,o?.callee),a}return s.value},Yr=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 Vt;return i.issues.length?{success:!1,error:new(e??qs)(i.issues.map(s=>$t(s,o,xt())))}:{success:!0,data:i.value}},_m=Yr(Gs),Vr=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=>$t(s,o,xt())))}:{success:!0,data:i.value}},hm=Vr(Gs),gm=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ko(e)(t,r,o)},ym=e=>(t,r,n)=>ko(e)(t,r,n),bm=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Io(e)(t,r,o)},vm=e=>async(t,r,n)=>Io(e)(t,r,n),Sm=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Yr(e)(t,r,o)},Em=e=>(t,r,n)=>Yr(e)(t,r,n),wm=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Vr(e)(t,r,o)},Cm=e=>async(t,r,n)=>Vr(e)(t,r,n),Am=/^[cC][^\s-]{8,}$/,Tm=/^[0-9a-z]+$/,km=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Im=/^[0-9a-vA-V]{20}$/,Nm=/^[A-Za-z0-9]{27}$/,Om=/^[a-zA-Z0-9_-]{21}$/,Mm=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Dm=/^([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})$/,Zs=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)$/,Pm=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Lm="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function xm(){return new RegExp(Lm,"u")}const Fm=/^(?:(?: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])$/,$m=/^(([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}|:))$/,Bm=/^((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])$/,Rm=/^(([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])$/,Um=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ys=/^[A-Za-z0-9_-]*$/,Hm=/^\+[1-9]\d{6,14}$/,Vs="(?:(?:\\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])))",zm=new RegExp(`^${Vs}$`);function Ks(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 jm(e){return new RegExp(`^${Ks(e)}$`)}function Wm(e){const t=Ks({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(`^${Vs}T(?:${n})$`)}const qm=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Gm=/^-?\d+$/,Zm=/^-?\d+(?:\.\d+)?$/,Ym=/^(?:true|false)$/i,Vm=/^[^A-Z]*$/,Km=/^[^a-z]*$/,$e=S("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Js={number:"number",bigint:"bigint",object:"date"},Qs=S("$ZodCheckLessThan",(e,t)=>{$e.init(e,t);const r=Js[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})}}),Xs=S("$ZodCheckGreaterThan",(e,t)=>{$e.init(e,t);const r=Js[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})}}),Jm=S("$ZodCheckMultipleOf",(e,t)=>{$e.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):em(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})}}),Qm=S("$ZodCheckNumberFormat",(e,t)=>{$e.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[o,i]=im[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=Gm)}),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})}}),Xm=S("$ZodCheckMaxLength",(e,t)=>{var r;$e.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Co(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=To(o);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),e_=S("$ZodCheckMinLength",(e,t)=>{var r;$e.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Co(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=To(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),t_=S("$ZodCheckLengthEquals",(e,t)=>{var r;$e.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Co(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=To(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})}}),Kr=S("$ZodCheckStringFormat",(e,t)=>{var r,n;$e.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=()=>{})}),r_=S("$ZodCheckRegex",(e,t)=>{Kr.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})}}),n_=S("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Vm),Kr.init(e,t)}),o_=S("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Km),Kr.init(e,t)}),i_=S("$ZodCheckIncludes",(e,t)=>{$e.init(e,t);const r=Kt(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})}}),s_=S("$ZodCheckStartsWith",(e,t)=>{$e.init(e,t);const r=new RegExp(`^${Kt(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})}}),a_=S("$ZodCheckEndsWith",(e,t)=>{$e.init(e,t);const r=new RegExp(`.*${Kt(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})}}),c_=S("$ZodCheckOverwrite",(e,t)=>{$e.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class l_{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(`
|
|
24
|
+
*/var Ms;function $p(){if(Ms)return ue;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,u=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,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,W=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,H=e?Symbol.for("react.scope"):60119;function M(C){if(typeof C=="object"&&C!==null){var z=C.$$typeof;switch(z){case t:switch(C=C.type,C){case c:case u:case n:case i:case o:case f:return C;default:switch(C=C&&C.$$typeof,C){case a:case d:case g:case h:case s:return C;default:return z}}case r:return z}}}function R(C){return M(C)===u}return ue.AsyncMode=c,ue.ConcurrentMode=u,ue.ContextConsumer=a,ue.ContextProvider=s,ue.Element=t,ue.ForwardRef=d,ue.Fragment=n,ue.Lazy=g,ue.Memo=h,ue.Portal=r,ue.Profiler=i,ue.StrictMode=o,ue.Suspense=f,ue.isAsyncMode=function(C){return R(C)||M(C)===c},ue.isConcurrentMode=R,ue.isContextConsumer=function(C){return M(C)===a},ue.isContextProvider=function(C){return M(C)===s},ue.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===t},ue.isForwardRef=function(C){return M(C)===d},ue.isFragment=function(C){return M(C)===n},ue.isLazy=function(C){return M(C)===g},ue.isMemo=function(C){return M(C)===h},ue.isPortal=function(C){return M(C)===r},ue.isProfiler=function(C){return M(C)===i},ue.isStrictMode=function(C){return M(C)===o},ue.isSuspense=function(C){return M(C)===f},ue.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===n||C===u||C===i||C===o||C===f||C===_||typeof C=="object"&&C!==null&&(C.$$typeof===g||C.$$typeof===h||C.$$typeof===s||C.$$typeof===a||C.$$typeof===d||C.$$typeof===W||C.$$typeof===x||C.$$typeof===H||C.$$typeof===y)},ue.typeOf=M,ue}var Ds;function Bp(){return Ds||(Ds=1,mo.exports=$p()),mo.exports}var _o,Ps;function Up(){if(Ps)return _o;Ps=1;var e=Bp(),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,u=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,_=Object.prototype;function h(g,y,W){if(typeof y!="string"){if(_){var x=f(y);x&&x!==_&&h(g,x,W)}var H=c(y);u&&(H=H.concat(u(y)));for(var M=s(g),R=s(y),C=0;C<H.length;++C){var z=H[C];if(!r[z]&&!(W&&W[z])&&!(R&&R[z])&&!(M&&M[z])){var Y=d(y,z);try{a(g,z,Y)}catch{}}}}return g}return _o=h,_o}Up();const Hp=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ls={componentStack:null,error:null,eventId:null};class ho extends Mn.Component{constructor(t){super(t),ho.prototype.__init.call(this),this.state=Ls,this._openFallbackReportDialog=!0;const r=Ce();r&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=r.on("afterSendEvent",n=>{!n.type&&this._lastEventId&&n.event_id===this._lastEventId&&Ns({...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;Zn(u=>{i&&i(u,t,o);const d=this.props.handled!=null?this.props.handled:!!this.props.fallback,f=Fp(t,r,{mechanism:{handled:d}});s&&s(t,o,f),a&&(this._lastEventId=f,this._openFallbackReportDialog&&Ns({...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(Ls)}}render(){const{fallback:t,children:r}=this.props,n=this.state;if(n.error){let o;return typeof t=="function"?o=Mn.createElement(t,{error:n.error,componentStack:n.componentStack,resetError:this.resetErrorBoundary,eventId:n.eventId}):o=t,Mn.isValidElement(o)?o:(t&&Hp&&G.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 l.jsxs("div",{className:i,children:[l.jsxs("label",{htmlFor:e,className:"form-label",children:[t," ",o&&l.jsx("span",{className:"text-red-600",children:"*"})]}),s,r&&!n&&l.jsx("p",{id:`${e}-hint`,className:"mt-1 text-sm text-slate-500",children:r}),n&&l.jsx("p",{id:`${e}-error`,className:"mt-1 text-sm text-red-600",children:n})]})}function go({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return l.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:l.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 xs(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 Rp({id:e,label:t,hint:r,error:n,required:o,className:i,value:s,onChange:a,onKeyDown:c,isCurrency:u=!1,maxDigits:d,...f}){const[_,h]=m.useState(""),g=m.useRef(null);m.useEffect(()=>{if(s==null||s===""){h("");return}const x=String(s).replace(/\D/g,"");h(xs(x,u))},[s,u]);const y=x=>{let H=x.target.value.replace(/\D/g,"");d!==void 0&&(H=H.slice(0,d)),h(xs(H,u));const M={...x,currentTarget:{...x.currentTarget,value:H},target:{...x.target,value:H}};a?.(M)},W=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 l.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:l.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:y,onKeyDown:W,...f})})}function Fs(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 zp({id:e,label:t,hint:r,error:n,required:o,className:i,value:s="",onChange:a,...c}){const[u,d]=m.useState(""),f=m.useRef(null);m.useEffect(()=>{const h=s.replace(/\D/g,"").slice(0,9);d(Fs(h))},[s]);const _=h=>{const g=h.target.value,y=h.target.selectionStart??0,W=g.replace(/\D/g,"").slice(0,9),x=Fs(W);d(x);const H={...h,currentTarget:{...h.currentTarget,value:x},target:{...h.target,value:x}};a?.(H),setTimeout(()=>{if(f.current){const M=g.slice(0,y).replace(/\D/g,"").length;let R=M;M>5?R+=2:M>3&&(R+=1),f.current.setSelectionRange(R,R)}},0)};return l.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:l.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:u,onChange:_,...c})})}function yo({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return l.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:l.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 jp({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return l.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:l.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 bo(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 vo(e){return e.replace(/\D/g,"")}function Wp({id:e,label:t,hint:r,error:n,required:o,className:i,value:s="",onChange:a,...c}){const[u,d]=m.useState(""),f=m.useRef(null),_=m.useRef(0);m.useEffect(()=>{if(!s){d("");return}let g=vo(s);g.length===11&&g.startsWith("1")&&(g=g.slice(1));const y=g.slice(0,10);d(bo(y))},[s]);const h=g=>{const y=g.target,W=y.value;_.current=y.selectionStart||0;const H=vo(W).slice(0,10),M=bo(H);d(M);const R=H.length===10?`+1${H}`:H,C={...g,currentTarget:{...g.currentTarget,value:R},target:{...g.target,value:R}};a?.(C),setTimeout(()=>{if(f.current){const z=W.slice(0,_.current),Y=vo(z),U=bo(Y),J=Math.min(U.length,M.length);f.current.setSelectionRange(J,J)}},0)};return l.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:l.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:[l.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"}),l.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:u,onChange:h,...c})]})})}function qp({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return l.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:l.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 Gp({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return l.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:l.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 Zp({id:e,label:t,hint:r,error:n,required:o,className:i,rows:s=4,...a}){return l.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:l.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 Vp({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return l.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:l.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 mr({id:e,label:t,className:r,...n}){return l.jsxs("label",{className:`checkbox-card ${r||""}`,htmlFor:e,children:[l.jsx("input",{id:e,type:"checkbox",className:"checkbox-input",...n}),l.jsx("span",{className:"checkbox-label",children:t})]})}function Yp({onChoose:e,isSubmitting:t=!1}){const[r,n]=m.useState(!1),o=!r||t;return l.jsxs("div",{className:"communications-consent","data-testid":"communications-consent",children:[l.jsx("h3",{className:"text-lg font-semibold text-text-primary mb-3",children:"Communications Consent"}),l.jsx(mr,{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)."}),l.jsxs("div",{className:"text-sm text-slate-600 mt-4 space-y-2",children:[l.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."}),l.jsx("p",{children:"Consent is not required to receive quotes or purchase insurance."}),l.jsxs("p",{children:["Credify Corporation – Texas #3309669."," ",l.jsx("a",{href:"https://getcredify.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})," ","|"," ",l.jsx("a",{href:"https://getcredify.com/terms-of-service",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Terms of Service"})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3 mt-6",children:[l.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&&l.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:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.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"]}),l.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 Kp({name:e,value:t,checked:r,onChange:n,children:o}){return l.jsxs("label",{className:"radio-card",children:[l.jsx("input",{className:"radio-input",type:"radio",name:e,value:t,checked:r,onChange:n}),l.jsx("span",{className:"radio-label",children:o})]})}function Jp({legend:e,children:t,className:r,legendClassName:n}){return l.jsxs("fieldset",{className:r,children:[l.jsx("legend",{className:`form-label mb-4 ${n||""}`,children:e}),l.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:t})]})}function _r({id:e,label:t,hint:r,error:n,required:o,className:i,placeholder:s,options:a,children:c,...u}){const d=[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,f=!!c;return l.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:l.jsxs("select",{id:e,className:`form-input select-caret ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":d,required:o,...u,children:[s&&l.jsx("option",{value:"",disabled:!0,selected:!("value"in u),children:s}),f?c:a?.map(_=>l.jsx("option",{value:_.value,disabled:_.disabled,children:_.label},_.value))]})})}var $s={apiKey:""};function Qp(){try{typeof $s<"u"&&$s?.apiKey}catch{}return""}function Xp(){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=Qp();if(!n){t(new Error("Google Maps API key not configured"));return}const o=document.createElement("script");o.src=`https://maps.googleapis.com/maps/api/js?key=${n}&libraries=places`,o.async=!0,o.defer=!0,o.onload=()=>e(),o.onerror=()=>t(new Error("Failed to load Google Maps script")),document.head.appendChild(o)})}function em(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 tm({id:e,label:t,hint:r,error:n,required:o,className:i,onChange:s,onPlaceSelect:a,value:c,...u}){const d=m.useRef(null),f=m.useRef(null),_=m.useRef(null),h=m.useRef(null),[g,y]=m.useState(!0),[W,x]=m.useState(c||""),[H,M]=m.useState([]),[R,C]=m.useState(!1),[z,Y]=m.useState(-1),U=m.useRef([]),J=m.useRef(!1),X=m.useRef(-1);m.useEffect(()=>{U.current=H},[H]),m.useEffect(()=>{J.current=R},[R]),m.useEffect(()=>{X.current=z},[z]),m.useEffect(()=>{c!==void 0&&x(String(c))},[c]);const ie=m.useRef(null);m.useEffect(()=>{if(!d.current)return;let Q=!0;return Xp().then(()=>{!Q||!d.current||(f.current=new google.maps.places.AutocompleteService,_.current=new google.maps.places.PlacesService(document.createElement("div")),y(!1))}).catch(ee=>{console.error("Error loading Google Maps:",ee),y(!1)}),()=>{Q=!1,ie.current&&clearTimeout(ie.current)}},[]);const Z=Q=>{const ee=Q.target.value;if(x(ee),s?.(ee),ie.current&&clearTimeout(ie.current),ee.length<3){M([]),C(!1);return}ie.current=setTimeout(()=>{f.current&&f.current.getPlacePredictions({input:ee,types:["address"]},(L,te)=>{te===google.maps.places.PlacesServiceStatus.OK&&L?(M(L),C(!0),Y(-1)):(M([]),C(!1))})},300)},ne=Q=>{if(!J.current||U.current.length===0){Q.key==="Escape"&&(C(!1),J.current=!1);return}switch(Q.key){case"ArrowDown":Q.preventDefault(),Y(ee=>{const L=ee<U.current.length-1?ee+1:ee;return X.current=L,L});break;case"ArrowUp":Q.preventDefault(),Y(ee=>{const L=ee>0?ee-1:-1;return X.current=L,L});break;case"Enter":Q.preventDefault(),X.current>=0&&X.current<U.current.length&&pe(U.current[X.current]);break;case"Escape":Q.preventDefault(),C(!1),J.current=!1;break}};m.useEffect(()=>{const Q=ee=>{h.current&&!h.current.contains(ee.target)&&d.current&&!d.current.contains(ee.target)&&(C(!1),J.current=!1)};if(R)return document.addEventListener("mousedown",Q),()=>{document.removeEventListener("mousedown",Q)}},[R]);const pe=Q=>{_.current&&_.current.getDetails({placeId:Q.place_id,fields:["address_components","formatted_address","geometry"]},(ee,L)=>{if(L===google.maps.places.PlacesServiceStatus.OK&&ee){const te=ee.formatted_address||"";x(te),C(!1),M([]),J.current=!1;const ge=em(ee);s?.(te,ge),a?.(ee)}})};return l.jsx(ze,{id:e,label:t,hint:r,error:n,required:o,className:i,children:l.jsxs("div",{className:"relative",children:[l.jsx("input",{ref:d,id:e,type:"text",className:`form-input ${n?"input-error":""}`,value:W,onChange:Z,onKeyDown:ne,"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:g||u.disabled,...u}),g&&l.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"Loading address suggestions..."}),R&&H.length>0&&l.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:H.map((Q,ee)=>l.jsxs("div",{className:`px-4 py-3 cursor-pointer transition-colors ${ee===z?"bg-blue-50 text-slate-900":"bg-white text-slate-900 hover:bg-slate-50"} ${ee<H.length-1?"border-b border-slate-100":""}`,role:"option","aria-selected":ee===z,onClick:()=>pe(Q),onMouseEnter:()=>Y(ee),children:[l.jsx("div",{className:"font-medium text-slate-900",children:Q.structured_formatting.main_text}),Q.structured_formatting.secondary_text&&l.jsx("div",{className:"text-sm text-slate-500 mt-0.5",children:Q.structured_formatting.secondary_text})]},Q.place_id))})]})})}function So(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"}`,u=(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:u}});return t(e,[])}function E(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 u=s.prototype,d=Object.keys(u);for(let f=0;f<d.length;f++){const _=d[f];_ in a||(a[_]=u[_].bind(a))}}const o=r?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(a){var c;const u=r?.Parent?new i:this;n(u,a),(c=u._zod).deferred??(c.deferred=[]);for(const d of u._zod.deferred)d();return u}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 Jt extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Bs extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Us={};function xt(e){return Us}function Hs(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 Eo(e,t){return typeof t=="bigint"?t.toString():t}function wo(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Co(e){return e==null}function Ao(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function rm(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 Rs=Symbol("evaluating");function de(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Rs)return n===void 0&&(n=Rs,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Ft(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 zs(e){return JSON.stringify(e)}function nm(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const js="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Vr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const om=wo(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function hr(e){if(Vr(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(Vr(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Ws(e){return hr(e)?{...e}:Array.isArray(e)?[...e]:e}const im=new Set(["string","number","symbol"]);function Qt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ht(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function j(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 sm(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const am={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 cm(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 Ft(this,"shape",s),s},checks:[]});return ht(e,i)}function lm(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 Ft(this,"shape",s),s},checks:[]});return ht(e,i)}function um(e,t){if(!hr(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 Ft(this,"shape",i),i}});return ht(e,o)}function dm(e,t){if(!hr(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 Ft(this,"shape",n),n}});return ht(e,r)}function fm(e,t){const r=_t(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return Ft(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return ht(e,r)}function pm(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 u in r){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(c[u]=e?new e({type:"optional",innerType:a[u]}):a[u])}else for(const u in a)c[u]=e?new e({type:"optional",innerType:a[u]}):a[u];return Ft(this,"shape",c),c},checks:[]});return ht(t,s)}function mm(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 Ft(this,"shape",i),i}});return ht(t,n)}function Xt(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 qs(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Yr(e){return typeof e=="string"?e:e?.message}function $t(e,t,r){const n={...e,path:e.path??[]};if(!e.message){const o=Yr(e.inst?._zod.def?.error?.(e))??Yr(t?.error?.(e))??Yr(r.customError?.(e))??Yr(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function To(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function gr(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}const Gs=(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,Eo,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Zs=E("$ZodError",Gs),Vs=E("$ZodError",Gs,{Parent:Error});function _m(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 hm(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 ko=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 Jt;if(s.issues.length){const a=new(o?.Err??e)(s.issues.map(c=>$t(c,i,xt())));throw js(a,o?.callee),a}return s.value},Io=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=>$t(c,i,xt())));throw js(a,o?.callee),a}return s.value},Kr=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 Jt;return i.issues.length?{success:!1,error:new(e??Zs)(i.issues.map(s=>$t(s,o,xt())))}:{success:!0,data:i.value}},gm=Kr(Vs),Jr=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=>$t(s,o,xt())))}:{success:!0,data:i.value}},ym=Jr(Vs),bm=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ko(e)(t,r,o)},vm=e=>(t,r,n)=>ko(e)(t,r,n),Sm=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Io(e)(t,r,o)},Em=e=>async(t,r,n)=>Io(e)(t,r,n),wm=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Kr(e)(t,r,o)},Cm=e=>(t,r,n)=>Kr(e)(t,r,n),Am=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Jr(e)(t,r,o)},Tm=e=>async(t,r,n)=>Jr(e)(t,r,n),km=/^[cC][^\s-]{8,}$/,Im=/^[0-9a-z]+$/,Nm=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Om=/^[0-9a-vA-V]{20}$/,Mm=/^[A-Za-z0-9]{27}$/,Dm=/^[a-zA-Z0-9_-]{21}$/,Pm=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Lm=/^([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})$/,Ys=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)$/,xm=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Fm="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function $m(){return new RegExp(Fm,"u")}const Bm=/^(?:(?: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])$/,Um=/^(([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}|:))$/,Hm=/^((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])$/,Rm=/^(([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])$/,zm=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ks=/^[A-Za-z0-9_-]*$/,jm=/^\+[1-9]\d{6,14}$/,Js="(?:(?:\\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])))",Wm=new RegExp(`^${Js}$`);function Qs(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 qm(e){return new RegExp(`^${Qs(e)}$`)}function Gm(e){const t=Qs({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(`^${Js}T(?:${n})$`)}const Zm=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Vm=/^-?\d+$/,Ym=/^-?\d+(?:\.\d+)?$/,Km=/^(?:true|false)$/i,Jm=/^[^A-Z]*$/,Qm=/^[^a-z]*$/,$e=E("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Xs={number:"number",bigint:"bigint",object:"date"},ea=E("$ZodCheckLessThan",(e,t)=>{$e.init(e,t);const r=Xs[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})}}),ta=E("$ZodCheckGreaterThan",(e,t)=>{$e.init(e,t);const r=Xs[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})}}),Xm=E("$ZodCheckMultipleOf",(e,t)=>{$e.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):rm(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})}}),e_=E("$ZodCheckNumberFormat",(e,t)=>{$e.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[o,i]=am[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=Vm)}),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})}}),t_=E("$ZodCheckMaxLength",(e,t)=>{var r;$e.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Co(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=To(o);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),r_=E("$ZodCheckMinLength",(e,t)=>{var r;$e.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Co(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=To(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),n_=E("$ZodCheckLengthEquals",(e,t)=>{var r;$e.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Co(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=To(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})}}),Qr=E("$ZodCheckStringFormat",(e,t)=>{var r,n;$e.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=()=>{})}),o_=E("$ZodCheckRegex",(e,t)=>{Qr.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})}}),i_=E("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Jm),Qr.init(e,t)}),s_=E("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Qm),Qr.init(e,t)}),a_=E("$ZodCheckIncludes",(e,t)=>{$e.init(e,t);const r=Qt(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})}}),c_=E("$ZodCheckStartsWith",(e,t)=>{$e.init(e,t);const r=new RegExp(`^${Qt(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})}}),l_=E("$ZodCheckEndsWith",(e,t)=>{$e.init(e,t);const r=new RegExp(`.*${Qt(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})}}),u_=E("$ZodCheckOverwrite",(e,t)=>{$e.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class d_{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
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
|
|
27
|
-
if (${
|
|
26
|
+
`))}}const f_={major:4,minor:3,patch:6},ve=E("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=f_;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 u=Xt(s),d;for(const f of a){if(f._zod.def.when){if(!f._zod.def.when(s))continue}else if(u)continue;const _=s.issues.length,h=f._zod.check(s);if(h instanceof Promise&&c?.async===!1)throw new Jt;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,s.issues.length!==_&&(u||(u=Xt(s,_)))});else{if(s.issues.length===_)continue;u||(u=Xt(s,_))}}return d?d.then(()=>s):s},i=(s,a,c)=>{if(Xt(s))return s.aborted=!0,s;const u=o(a,n,c);if(u instanceof Promise){if(c.async===!1)throw new Jt;return u.then(d=>e._zod.parse(d,c))}return e._zod.parse(u,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){const u=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return u instanceof Promise?u.then(d=>i(d,s,a)):i(u,s,a)}const c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new Jt;return c.then(u=>o(u,n,a))}return o(c,n,a)}}de(e,"~standard",()=>({validate:o=>{try{const i=gm(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return ym(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),No=E("$ZodString",(e,t)=>{ve.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Zm(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}}),he=E("$ZodStringFormat",(e,t)=>{Qr.init(e,t),No.init(e,t)}),p_=E("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Lm),he.init(e,t)}),m_=E("$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=Ys(n))}else t.pattern??(t.pattern=Ys());he.init(e,t)}),__=E("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=xm),he.init(e,t)}),h_=E("$ZodURL",(e,t)=>{he.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})}}}),g_=E("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=$m()),he.init(e,t)}),y_=E("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Dm),he.init(e,t)}),b_=E("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=km),he.init(e,t)}),v_=E("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Im),he.init(e,t)}),S_=E("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Nm),he.init(e,t)}),E_=E("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Om),he.init(e,t)}),w_=E("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Mm),he.init(e,t)}),C_=E("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Gm(t)),he.init(e,t)}),A_=E("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Wm),he.init(e,t)}),T_=E("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=qm(t)),he.init(e,t)}),k_=E("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Pm),he.init(e,t)}),I_=E("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Bm),he.init(e,t),e._zod.bag.format="ipv4"}),N_=E("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Um),he.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})}}}),O_=E("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Hm),he.init(e,t)}),M_=E("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Rm),he.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 ra(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const D_=E("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=zm),he.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{ra(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function P_(e){if(!Ks.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return ra(r)}const L_=E("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ks),he.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{P_(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),x_=E("$ZodE164",(e,t)=>{t.pattern??(t.pattern=jm),he.init(e,t)});function F_(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 $_=E("$ZodJWT",(e,t)=>{he.init(e,t),e._zod.check=r=>{F_(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),na=E("$ZodNumber",(e,t)=>{ve.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ym,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}}),B_=E("$ZodNumberFormat",(e,t)=>{e_.init(e,t),na.init(e,t)}),U_=E("$ZodBoolean",(e,t)=>{ve.init(e,t),e._zod.pattern=Km,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}}),H_=E("$ZodUnknown",(e,t)=>{ve.init(e,t),e._zod.parse=r=>r}),R_=E("$ZodNever",(e,t)=>{ve.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function oa(e,t,r){e.issues.length&&t.issues.push(...qs(r,e.issues)),t.value[r]=e.value}const z_=E("$ZodArray",(e,t)=>{ve.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(u=>oa(u,r,s))):oa(c,r,s)}return i.length?Promise.all(i).then(()=>r):r}});function Xr(e,t,r,n,o){if(e.issues.length){if(o&&!(r in n))return;t.issues.push(...qs(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function ia(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=sm(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function sa(e,t,r,n,o,i){const s=[],a=o.keySet,c=o.catchall._zod,u=c.def.type,d=c.optout==="optional";for(const f in t){if(a.has(f))continue;if(u==="never"){s.push(f);continue}const _=c.run({value:t[f],issues:[]},n);_ instanceof Promise?e.push(_.then(h=>Xr(h,r,f,t,d))):Xr(_,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 j_=E("$ZodObject",(e,t)=>{if(ve.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=wo(()=>ia(t));de(e._zod,"propValues",()=>{const a=t.shape,c={};for(const u in a){const d=a[u]._zod;if(d.values){c[u]??(c[u]=new Set);for(const f of d.values)c[u].add(f)}}return c});const o=Vr,i=t.catchall;let s;e._zod.parse=(a,c)=>{s??(s=n.value);const u=a.value;if(!o(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),a;a.value={};const d=[],f=s.shape;for(const _ of s.keys){const h=f[_],g=h._zod.optout==="optional",y=h._zod.run({value:u[_],issues:[]},c);y instanceof Promise?d.push(y.then(W=>Xr(W,a,_,u,g))):Xr(y,a,_,u,g)}return i?sa(d,u,a,c,n.value,e):d.length?Promise.all(d).then(()=>a):a}}),W_=E("$ZodObjectJIT",(e,t)=>{j_.init(e,t);const r=e._zod.parse,n=wo(()=>ia(t)),o=_=>{const h=new d_(["shape","payload","ctx"]),g=n.value,y=M=>{const R=zs(M);return`shape[${R}]._zod.run({ value: input[${R}], issues: [] }, ctx)`};h.write("const input = payload.value;");const W=Object.create(null);let x=0;for(const M of g.keys)W[M]=`key_${x++}`;h.write("const newResult = {};");for(const M of g.keys){const R=W[M],C=zs(M),Y=_[M]?._zod?.optout==="optional";h.write(`const ${R} = ${y(M)};`),Y?h.write(`
|
|
27
|
+
if (${R}.issues.length) {
|
|
28
28
|
if (${C} in input) {
|
|
29
|
-
payload.issues = payload.issues.concat(${
|
|
29
|
+
payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
|
|
30
30
|
...iss,
|
|
31
31
|
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
32
32
|
})));
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
if (${
|
|
36
|
+
if (${R}.value === undefined) {
|
|
37
37
|
if (${C} in input) {
|
|
38
38
|
newResult[${C}] = undefined;
|
|
39
39
|
}
|
|
40
40
|
} else {
|
|
41
|
-
newResult[${C}] = ${
|
|
41
|
+
newResult[${C}] = ${R}.value;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
`):
|
|
45
|
-
if (${
|
|
46
|
-
payload.issues = payload.issues.concat(${
|
|
44
|
+
`):h.write(`
|
|
45
|
+
if (${R}.issues.length) {
|
|
46
|
+
payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
|
|
47
47
|
...iss,
|
|
48
48
|
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
49
49
|
})));
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
if (${
|
|
52
|
+
if (${R}.value === undefined) {
|
|
53
53
|
if (${C} in input) {
|
|
54
54
|
newResult[${C}] = undefined;
|
|
55
55
|
}
|
|
56
56
|
} else {
|
|
57
|
-
newResult[${C}] = ${
|
|
57
|
+
newResult[${C}] = ${R}.value;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
`)}_.write("payload.value = newResult;"),_.write("return payload;");const B=_.compile();return(M,z)=>B(m,M,z)};let i;const s=Gr,a=!$s.jitless,u=a&&rm.value,d=t.catchall;let f;e._zod.parse=(m,_)=>{f??(f=n.value);const h=m.value;return s(h)?a&&u&&_?.async===!1&&_.jitless!==!0?(i||(i=o(t.shape)),m=i(m,_),d?oa([],h,m,_,f,e):m):r(m,_):(m.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),m)}});function ia(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=>!Jt(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=>$t(s,n,xt())))}),t)}const j_=S("$ZodUnion",(e,t)=>{ge.init(e,t),ce(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),ce(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ce(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),ce(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=>Ao(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 u=c._zod.run({value:o.value,issues:[]},i);if(u instanceof Promise)a.push(u),s=!0;else{if(u.issues.length===0)return u;a.push(u)}}return s?Promise.all(a).then(c=>ia(c,o,e,i)):ia(a,o,e,i)}}),W_=S("$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,u])=>sa(r,c,u)):sa(r,i,s)}});function Oo(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(pr(e)&&pr(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=Oo(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=Oo(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 sa(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}),Jt(e))return e;const s=Oo(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 q_=S("$ZodEnum",(e,t)=>{ge.init(e,t);const r=Bs(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>nm.has(typeof o)).map(o=>typeof o=="string"?Kt(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}}),G_=S("$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"?Kt(n):n?Kt(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}}),Z_=S("$ZodTransform",(e,t)=>{ge.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Fs(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 Vt;return r.value=o,r}});function aa(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const ca=S("$ZodOptional",(e,t)=>{ge.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ce(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ce(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ao(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=>aa(i,r.value)):aa(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),Y_=S("$ZodExactOptional",(e,t)=>{ca.init(e,t),ce(e._zod,"values",()=>t.innerType._zod.values),ce(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),V_=S("$ZodNullable",(e,t)=>{ge.init(e,t),ce(e._zod,"optin",()=>t.innerType._zod.optin),ce(e._zod,"optout",()=>t.innerType._zod.optout),ce(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ao(r.source)}|null)$`):void 0}),ce(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)}),K_=S("$ZodDefault",(e,t)=>{ge.init(e,t),e._zod.optin="optional",ce(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=>la(i,t)):la(o,t)}});function la(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const J_=S("$ZodPrefault",(e,t)=>{ge.init(e,t),e._zod.optin="optional",ce(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))}),Q_=S("$ZodNonOptional",(e,t)=>{ge.init(e,t),ce(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=>ua(i,e)):ua(o,e)}});function ua(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 X_=S("$ZodCatch",(e,t)=>{ge.init(e,t),ce(e._zod,"optin",()=>t.innerType._zod.optin),ce(e._zod,"optout",()=>t.innerType._zod.optout),ce(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=>$t(s,n,xt()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(i=>$t(i,n,xt()))},input:r.value}),r.issues=[]),r)}}),eh=S("$ZodPipe",(e,t)=>{ge.init(e,t),ce(e._zod,"values",()=>t.in._zod.values),ce(e._zod,"optin",()=>t.in._zod.optin),ce(e._zod,"optout",()=>t.out._zod.optout),ce(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=>Qr(s,t.in,n)):Qr(i,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>Qr(i,t.out,n)):Qr(o,t.out,n)}});function Qr(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const th=S("$ZodReadonly",(e,t)=>{ge.init(e,t),ce(e._zod,"propValues",()=>t.innerType._zod.propValues),ce(e._zod,"values",()=>t.innerType._zod.values),ce(e._zod,"optin",()=>t.innerType?._zod?.optin),ce(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(da):da(o)}});function da(e){return e.value=Object.freeze(e.value),e}const rh=S("$ZodCustom",(e,t)=>{$e.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=>fa(i,r,n,e));fa(o,r,n,e)}});function fa(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(mr(o))}}var pa;class nh{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 oh(){return new nh}(pa=globalThis).__zod_globalRegistry??(pa.__zod_globalRegistry=oh());const _r=globalThis.__zod_globalRegistry;function ih(e,t){return new e({type:"string",...U(t)})}function sh(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...U(t)})}function ma(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...U(t)})}function ah(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...U(t)})}function ch(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...U(t)})}function lh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...U(t)})}function uh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...U(t)})}function dh(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...U(t)})}function fh(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...U(t)})}function ph(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...U(t)})}function mh(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...U(t)})}function _h(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...U(t)})}function hh(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...U(t)})}function gh(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...U(t)})}function yh(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...U(t)})}function bh(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...U(t)})}function vh(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...U(t)})}function Sh(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...U(t)})}function Eh(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...U(t)})}function wh(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...U(t)})}function Ch(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...U(t)})}function Ah(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...U(t)})}function Th(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...U(t)})}function kh(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...U(t)})}function Ih(e,t){return new e({type:"string",format:"date",check:"string_format",...U(t)})}function Nh(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...U(t)})}function Oh(e,t){return new e({type:"string",format:"duration",check:"string_format",...U(t)})}function Mh(e,t){return new e({type:"number",coerce:!0,checks:[],...U(t)})}function Dh(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...U(t)})}function Ph(e,t){return new e({type:"boolean",...U(t)})}function Lh(e){return new e({type:"unknown"})}function xh(e,t){return new e({type:"never",...U(t)})}function _a(e,t){return new Qs({check:"less_than",...U(t),value:e,inclusive:!1})}function Mo(e,t){return new Qs({check:"less_than",...U(t),value:e,inclusive:!0})}function ha(e,t){return new Xs({check:"greater_than",...U(t),value:e,inclusive:!1})}function Do(e,t){return new Xs({check:"greater_than",...U(t),value:e,inclusive:!0})}function ga(e,t){return new Jm({check:"multiple_of",...U(t),value:e})}function ya(e,t){return new Xm({check:"max_length",...U(t),maximum:e})}function Xr(e,t){return new e_({check:"min_length",...U(t),minimum:e})}function ba(e,t){return new t_({check:"length_equals",...U(t),length:e})}function Fh(e,t){return new r_({check:"string_format",format:"regex",...U(t),pattern:e})}function $h(e){return new n_({check:"string_format",format:"lowercase",...U(e)})}function Bh(e){return new o_({check:"string_format",format:"uppercase",...U(e)})}function Rh(e,t){return new i_({check:"string_format",format:"includes",...U(t),includes:e})}function Uh(e,t){return new s_({check:"string_format",format:"starts_with",...U(t),prefix:e})}function Hh(e,t){return new a_({check:"string_format",format:"ends_with",...U(t),suffix:e})}function Qt(e){return new c_({check:"overwrite",tx:e})}function zh(e){return Qt(t=>t.normalize(e))}function jh(){return Qt(e=>e.trim())}function Wh(){return Qt(e=>e.toLowerCase())}function qh(){return Qt(e=>e.toUpperCase())}function Gh(){return Qt(e=>tm(e))}function Zh(e,t,r){return new e({type:"array",element:t,...U(r)})}function Yh(e,t,r){return new e({type:"custom",check:"custom",fn:t,...U(r)})}function Vh(e){const t=Kh(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(mr(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(mr(o))}},e(r.value,r)));return t}function Kh(e,t){const r=new $e({check:"custom",...U(t)});return r._zod.check=e,r}function va(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??_r,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 m=s.schema,_=t.processors[o.type];if(!_)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);_(e,t,m,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"&&Fe(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,m=e.external.uri??(h=>h);if(f)return{ref:m(f)};const _=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=_,{defId:_,ref:`${m("__shared")}#/${a}/${_}`}}if(s[1]===r)return{ref:"#"};const u=`#/${a}/`,d=s[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:u+d}},i=s=>{if(s[1].schema.$ref)return;const a=s[1],{ref:c,defId:u}=o(s);a.def={...a.schema},u&&(a.defId=u);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>
|
|
60
|
+
`)}h.write("payload.value = newResult;"),h.write("return payload;");const H=h.compile();return(M,R)=>H(_,M,R)};let i;const s=Vr,a=!Us.jitless,u=a&&om.value,d=t.catchall;let f;e._zod.parse=(_,h)=>{f??(f=n.value);const g=_.value;return s(g)?a&&u&&h?.async===!1&&h.jitless!==!0?(i||(i=o(t.shape)),_=i(_,h),d?sa([],g,_,h,f,e):_):r(_,h):(_.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),_)}});function aa(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=>!Xt(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=>$t(s,n,xt())))}),t)}const q_=E("$ZodUnion",(e,t)=>{ve.init(e,t),de(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),de(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),de(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),de(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=>Ao(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 u=c._zod.run({value:o.value,issues:[]},i);if(u instanceof Promise)a.push(u),s=!0;else{if(u.issues.length===0)return u;a.push(u)}}return s?Promise.all(a).then(c=>aa(c,o,e,i)):aa(a,o,e,i)}}),G_=E("$ZodIntersection",(e,t)=>{ve.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,u])=>ca(r,c,u)):ca(r,i,s)}});function Oo(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(hr(e)&&hr(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=Oo(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=Oo(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 ca(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}),Xt(e))return e;const s=Oo(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 Z_=E("$ZodEnum",(e,t)=>{ve.init(e,t);const r=Hs(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>im.has(typeof o)).map(o=>typeof o=="string"?Qt(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}}),V_=E("$ZodLiteral",(e,t)=>{if(ve.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"?Qt(n):n?Qt(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}}),Y_=E("$ZodTransform",(e,t)=>{ve.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Bs(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 Jt;return r.value=o,r}});function la(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const ua=E("$ZodOptional",(e,t)=>{ve.init(e,t),e._zod.optin="optional",e._zod.optout="optional",de(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),de(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ao(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=>la(i,r.value)):la(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),K_=E("$ZodExactOptional",(e,t)=>{ua.init(e,t),de(e._zod,"values",()=>t.innerType._zod.values),de(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),J_=E("$ZodNullable",(e,t)=>{ve.init(e,t),de(e._zod,"optin",()=>t.innerType._zod.optin),de(e._zod,"optout",()=>t.innerType._zod.optout),de(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ao(r.source)}|null)$`):void 0}),de(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)}),Q_=E("$ZodDefault",(e,t)=>{ve.init(e,t),e._zod.optin="optional",de(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=>da(i,t)):da(o,t)}});function da(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const X_=E("$ZodPrefault",(e,t)=>{ve.init(e,t),e._zod.optin="optional",de(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))}),eh=E("$ZodNonOptional",(e,t)=>{ve.init(e,t),de(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=>fa(i,e)):fa(o,e)}});function fa(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 th=E("$ZodCatch",(e,t)=>{ve.init(e,t),de(e._zod,"optin",()=>t.innerType._zod.optin),de(e._zod,"optout",()=>t.innerType._zod.optout),de(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=>$t(s,n,xt()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(i=>$t(i,n,xt()))},input:r.value}),r.issues=[]),r)}}),rh=E("$ZodPipe",(e,t)=>{ve.init(e,t),de(e._zod,"values",()=>t.in._zod.values),de(e._zod,"optin",()=>t.in._zod.optin),de(e._zod,"optout",()=>t.out._zod.optout),de(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=>en(s,t.in,n)):en(i,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>en(i,t.out,n)):en(o,t.out,n)}});function en(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const nh=E("$ZodReadonly",(e,t)=>{ve.init(e,t),de(e._zod,"propValues",()=>t.innerType._zod.propValues),de(e._zod,"values",()=>t.innerType._zod.values),de(e._zod,"optin",()=>t.innerType?._zod?.optin),de(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(pa):pa(o)}});function pa(e){return e.value=Object.freeze(e.value),e}const oh=E("$ZodCustom",(e,t)=>{$e.init(e,t),ve.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=>ma(i,r,n,e));ma(o,r,n,e)}});function ma(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(gr(o))}}var _a;class ih{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 sh(){return new ih}(_a=globalThis).__zod_globalRegistry??(_a.__zod_globalRegistry=sh());const yr=globalThis.__zod_globalRegistry;function ah(e,t){return new e({type:"string",...j(t)})}function ch(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...j(t)})}function ha(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...j(t)})}function lh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...j(t)})}function uh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...j(t)})}function dh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...j(t)})}function fh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...j(t)})}function ph(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...j(t)})}function mh(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...j(t)})}function _h(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...j(t)})}function hh(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...j(t)})}function gh(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...j(t)})}function yh(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...j(t)})}function bh(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...j(t)})}function vh(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...j(t)})}function Sh(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...j(t)})}function Eh(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...j(t)})}function wh(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...j(t)})}function Ch(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...j(t)})}function Ah(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...j(t)})}function Th(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...j(t)})}function kh(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...j(t)})}function Ih(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...j(t)})}function Nh(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...j(t)})}function Oh(e,t){return new e({type:"string",format:"date",check:"string_format",...j(t)})}function Mh(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...j(t)})}function Dh(e,t){return new e({type:"string",format:"duration",check:"string_format",...j(t)})}function Ph(e,t){return new e({type:"number",coerce:!0,checks:[],...j(t)})}function Lh(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...j(t)})}function xh(e,t){return new e({type:"boolean",...j(t)})}function Fh(e){return new e({type:"unknown"})}function $h(e,t){return new e({type:"never",...j(t)})}function ga(e,t){return new ea({check:"less_than",...j(t),value:e,inclusive:!1})}function Mo(e,t){return new ea({check:"less_than",...j(t),value:e,inclusive:!0})}function ya(e,t){return new ta({check:"greater_than",...j(t),value:e,inclusive:!1})}function Do(e,t){return new ta({check:"greater_than",...j(t),value:e,inclusive:!0})}function ba(e,t){return new Xm({check:"multiple_of",...j(t),value:e})}function va(e,t){return new t_({check:"max_length",...j(t),maximum:e})}function tn(e,t){return new r_({check:"min_length",...j(t),minimum:e})}function Sa(e,t){return new n_({check:"length_equals",...j(t),length:e})}function Bh(e,t){return new o_({check:"string_format",format:"regex",...j(t),pattern:e})}function Uh(e){return new i_({check:"string_format",format:"lowercase",...j(e)})}function Hh(e){return new s_({check:"string_format",format:"uppercase",...j(e)})}function Rh(e,t){return new a_({check:"string_format",format:"includes",...j(t),includes:e})}function zh(e,t){return new c_({check:"string_format",format:"starts_with",...j(t),prefix:e})}function jh(e,t){return new l_({check:"string_format",format:"ends_with",...j(t),suffix:e})}function er(e){return new u_({check:"overwrite",tx:e})}function Wh(e){return er(t=>t.normalize(e))}function qh(){return er(e=>e.trim())}function Gh(){return er(e=>e.toLowerCase())}function Zh(){return er(e=>e.toUpperCase())}function Vh(){return er(e=>nm(e))}function Yh(e,t,r){return new e({type:"array",element:t,...j(r)})}function Kh(e,t,r){return new e({type:"custom",check:"custom",fn:t,...j(r)})}function Jh(e){const t=Qh(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(gr(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(gr(o))}},e(r.value,r)));return t}function Qh(e,t){const r=new $e({check:"custom",...j(t)});return r._zod.check=e,r}function Ea(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??yr,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 Ne(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,h=t.processors[o.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);h(e,t,_,d)}const f=e._zod.parent;f&&(s.ref||(s.ref=f),Ne(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"&&Fe(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 wa(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 h=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=h,{defId:h,ref:`${_("__shared")}#/${a}/${h}`}}if(s[1]===r)return{ref:"#"};const u=`#/${a}/`,d=s[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:u+d}},i=s=>{if(s[1].schema.$ref)return;const a=s[1],{ref:c,defId:u}=o(s);a.def={...a.schema},u&&(a.defId=u);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>
|
|
61
61
|
|
|
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 u=e.external.registry.get(s[0])?.id;if(t!==s[0]&&u){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 Ea(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,u={...c},d=a.ref;if(a.ref=null,d){n(d);const m=e.seen.get(d),_=m.schema;if(_.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(_)):Object.assign(c,_),Object.assign(c,u),s._zod.parent===d)for(const b in c)b==="$ref"||b==="allOf"||b in u||delete c[b];if(_.$ref&&m.def)for(const b in c)b==="$ref"||b==="allOf"||b in m.def&&JSON.stringify(c[b])===JSON.stringify(m.def[b])&&delete c[b]}const f=s._zod.parent;if(f&&f!==d){n(f);const m=e.seen.get(f);if(m?.schema.$ref&&(c.$ref=m.schema.$ref,m.def))for(const _ in c)_==="$ref"||_==="allOf"||_ in m.def&&JSON.stringify(c[_])===JSON.stringify(m.def[_])&&delete c[_]}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:en(t,"input",e.processors),output:en(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function Fe(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 Fe(n.element,r);if(n.type==="set")return Fe(n.valueType,r);if(n.type==="lazy")return Fe(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 Fe(n.innerType,r);if(n.type==="intersection")return Fe(n.left,r)||Fe(n.right,r);if(n.type==="record"||n.type==="map")return Fe(n.keyType,r)||Fe(n.valueType,r);if(n.type==="pipe")return Fe(n.in,r)||Fe(n.out,r);if(n.type==="object"){for(const o in n.shape)if(Fe(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(const o of n.options)if(Fe(o,r))return!0;return!1}if(n.type==="tuple"){for(const o of n.items)if(Fe(o,r))return!0;return!!(n.rest&&Fe(n.rest,r))}return!1}const Jh=(e,t={})=>r=>{const n=va({...r,processors:t});return Ie(e,n),Sa(n,e),Ea(n,e)},en=(e,t,r={})=>n=>{const{libraryOptions:o,target:i}=n??{},s=va({...o??{},target:i,io:t,processors:r});return Ie(e,s),Sa(s,e),Ea(s,e)},Qh={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Xh=(e,t,r,n)=>{const o=r;o.type="string";const{minimum:i,maximum:s,format:a,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),a&&(o.format=Qh[a]??a,o.format===""&&delete o.format,a==="time"&&delete o.format),u&&(o.contentEncoding=u),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}))])}},eg=(e,t,r,n)=>{const o=r,{minimum:i,maximum:s,format:a,multipleOf:c,exclusiveMaximum:u,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 u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=u,o.exclusiveMaximum=!0):o.exclusiveMaximum=u),typeof s=="number"&&(o.maximum=s,typeof u=="number"&&t.target!=="draft-04"&&(u<=s?delete o.maximum:delete o.exclusiveMaximum)),typeof c=="number"&&(o.multipleOf=c)},tg=(e,t,r,n)=>{r.type="boolean"},rg=(e,t,r,n)=>{r.not={}},ng=(e,t,r,n)=>{},og=(e,t,r,n)=>{const o=e._zod.def,i=Bs(o.entries);i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),r.enum=i},ig=(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},sg=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},ag=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},cg=(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"]})},lg=(e,t,r,n)=>{const o=r,i=e._zod.def;o.type="object",o.properties={};const s=i.shape;for(const u in s)o.properties[u]=Ie(s[u],t,{...n,path:[...n.path,"properties",u]});const a=new Set(Object.keys(s)),c=new Set([...a].filter(u=>{const d=i.shape[u]._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)},ug=(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},dg=(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=u=>"allOf"in u&&Object.keys(u).length===1,c=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];r.allOf=c},fg=(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"}]},pg=(e,t,r,n)=>{const o=e._zod.def;Ie(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},mg=(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))},_g=(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)))},hg=(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},gg=(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},yg=(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},wa=(e,t,r,n)=>{const o=e._zod.def;Ie(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},bg=S("ZodISODateTime",(e,t)=>{E_.init(e,t),he.init(e,t)});function vg(e){return kh(bg,e)}const Sg=S("ZodISODate",(e,t)=>{w_.init(e,t),he.init(e,t)});function Eg(e){return Ih(Sg,e)}const wg=S("ZodISOTime",(e,t)=>{C_.init(e,t),he.init(e,t)});function Cg(e){return Nh(wg,e)}const Ag=S("ZodISODuration",(e,t)=>{A_.init(e,t),he.init(e,t)});function Tg(e){return Oh(Ag,e)}const Je=S("ZodError",(e,t)=>{qs.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>mm(e,r)},flatten:{value:r=>pm(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Eo,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Eo,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),kg=ko(Je),Ig=Io(Je),Ng=Yr(Je),Og=Vr(Je),Mg=gm(Je),Dg=ym(Je),Pg=bm(Je),Lg=vm(Je),xg=Sm(Je),Fg=Em(Je),$g=wm(Je),Bg=Cm(Je),ye=S("ZodType",(e,t)=>(ge.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:en(e,"input"),output:en(e,"output")}}),e.toJSONSchema=Jh(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)=>ht(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>kg(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Ng(e,r,n),e.parseAsync=async(r,n)=>Ig(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Og(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>Mg(e,r,n),e.decode=(r,n)=>Dg(e,r,n),e.encodeAsync=async(r,n)=>Pg(e,r,n),e.decodeAsync=async(r,n)=>Lg(e,r,n),e.safeEncode=(r,n)=>xg(e,r,n),e.safeDecode=(r,n)=>Fg(e,r,n),e.safeEncodeAsync=async(r,n)=>$g(e,r,n),e.safeDecodeAsync=async(r,n)=>Bg(e,r,n),e.refine=(r,n)=>e.check(Ly(r,n)),e.superRefine=r=>e.check(xy(r)),e.overwrite=r=>e.check(Qt(r)),e.optional=()=>Ma(e),e.exactOptional=()=>Sy(e),e.nullable=()=>Da(e),e.nullish=()=>Ma(Da(e)),e.nonoptional=r=>ky(e,r),e.array=()=>uy(e),e.or=r=>Na([e,r]),e.and=r=>_y(e,r),e.transform=r=>La(e,by(r)),e.default=r=>Cy(e,r),e.prefault=r=>Ty(e,r),e.catch=r=>Ny(e,r),e.pipe=r=>La(e,r),e.readonly=()=>Dy(e),e.describe=r=>{const n=e.clone();return _r.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return _r.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return _r.get(e);const n=e.clone();return _r.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),Ca=S("_ZodString",(e,t)=>{No.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Xh(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(Fh(...n)),e.includes=(...n)=>e.check(Rh(...n)),e.startsWith=(...n)=>e.check(Uh(...n)),e.endsWith=(...n)=>e.check(Hh(...n)),e.min=(...n)=>e.check(Xr(...n)),e.max=(...n)=>e.check(ya(...n)),e.length=(...n)=>e.check(ba(...n)),e.nonempty=(...n)=>e.check(Xr(1,...n)),e.lowercase=n=>e.check($h(n)),e.uppercase=n=>e.check(Bh(n)),e.trim=()=>e.check(jh()),e.normalize=(...n)=>e.check(zh(...n)),e.toLowerCase=()=>e.check(Wh()),e.toUpperCase=()=>e.check(qh()),e.slugify=()=>e.check(Gh())}),Rg=S("ZodString",(e,t)=>{No.init(e,t),Ca.init(e,t),e.email=r=>e.check(sh(Ug,r)),e.url=r=>e.check(dh(Hg,r)),e.jwt=r=>e.check(Th(ry,r)),e.emoji=r=>e.check(fh(zg,r)),e.guid=r=>e.check(ma(Aa,r)),e.uuid=r=>e.check(ah(tn,r)),e.uuidv4=r=>e.check(ch(tn,r)),e.uuidv6=r=>e.check(lh(tn,r)),e.uuidv7=r=>e.check(uh(tn,r)),e.nanoid=r=>e.check(ph(jg,r)),e.guid=r=>e.check(ma(Aa,r)),e.cuid=r=>e.check(mh(Wg,r)),e.cuid2=r=>e.check(_h(qg,r)),e.ulid=r=>e.check(hh(Gg,r)),e.base64=r=>e.check(wh(Xg,r)),e.base64url=r=>e.check(Ch(ey,r)),e.xid=r=>e.check(gh(Zg,r)),e.ksuid=r=>e.check(yh(Yg,r)),e.ipv4=r=>e.check(bh(Vg,r)),e.ipv6=r=>e.check(vh(Kg,r)),e.cidrv4=r=>e.check(Sh(Jg,r)),e.cidrv6=r=>e.check(Eh(Qg,r)),e.e164=r=>e.check(Ah(ty,r)),e.datetime=r=>e.check(vg(r)),e.date=r=>e.check(Eg(r)),e.time=r=>e.check(Cg(r)),e.duration=r=>e.check(Tg(r))});function gt(e){return ih(Rg,e)}const he=S("ZodStringFormat",(e,t)=>{pe.init(e,t),Ca.init(e,t)}),Ug=S("ZodEmail",(e,t)=>{p_.init(e,t),he.init(e,t)}),Aa=S("ZodGUID",(e,t)=>{d_.init(e,t),he.init(e,t)}),tn=S("ZodUUID",(e,t)=>{f_.init(e,t),he.init(e,t)}),Hg=S("ZodURL",(e,t)=>{m_.init(e,t),he.init(e,t)}),zg=S("ZodEmoji",(e,t)=>{__.init(e,t),he.init(e,t)}),jg=S("ZodNanoID",(e,t)=>{h_.init(e,t),he.init(e,t)}),Wg=S("ZodCUID",(e,t)=>{g_.init(e,t),he.init(e,t)}),qg=S("ZodCUID2",(e,t)=>{y_.init(e,t),he.init(e,t)}),Gg=S("ZodULID",(e,t)=>{b_.init(e,t),he.init(e,t)}),Zg=S("ZodXID",(e,t)=>{v_.init(e,t),he.init(e,t)}),Yg=S("ZodKSUID",(e,t)=>{S_.init(e,t),he.init(e,t)}),Vg=S("ZodIPv4",(e,t)=>{T_.init(e,t),he.init(e,t)}),Kg=S("ZodIPv6",(e,t)=>{k_.init(e,t),he.init(e,t)}),Jg=S("ZodCIDRv4",(e,t)=>{I_.init(e,t),he.init(e,t)}),Qg=S("ZodCIDRv6",(e,t)=>{N_.init(e,t),he.init(e,t)}),Xg=S("ZodBase64",(e,t)=>{O_.init(e,t),he.init(e,t)}),ey=S("ZodBase64URL",(e,t)=>{D_.init(e,t),he.init(e,t)}),ty=S("ZodE164",(e,t)=>{P_.init(e,t),he.init(e,t)}),ry=S("ZodJWT",(e,t)=>{x_.init(e,t),he.init(e,t)}),Ta=S("ZodNumber",(e,t)=>{ta.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(n,o,i)=>eg(e,n,o),e.gt=(n,o)=>e.check(ha(n,o)),e.gte=(n,o)=>e.check(Do(n,o)),e.min=(n,o)=>e.check(Do(n,o)),e.lt=(n,o)=>e.check(_a(n,o)),e.lte=(n,o)=>e.check(Mo(n,o)),e.max=(n,o)=>e.check(Mo(n,o)),e.int=n=>e.check(ka(n)),e.safe=n=>e.check(ka(n)),e.positive=n=>e.check(ha(0,n)),e.nonnegative=n=>e.check(Do(0,n)),e.negative=n=>e.check(_a(0,n)),e.nonpositive=n=>e.check(Mo(0,n)),e.multipleOf=(n,o)=>e.check(ga(n,o)),e.step=(n,o)=>e.check(ga(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}),ny=S("ZodNumberFormat",(e,t)=>{F_.init(e,t),Ta.init(e,t)});function ka(e){return Dh(ny,e)}const oy=S("ZodBoolean",(e,t)=>{$_.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>tg(e,r,n)});function iy(e){return Ph(oy,e)}const sy=S("ZodUnknown",(e,t)=>{B_.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ng()});function Ia(){return Lh(sy)}const ay=S("ZodNever",(e,t)=>{R_.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>rg(e,r,n)});function cy(e){return xh(ay,e)}const ly=S("ZodArray",(e,t)=>{U_.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>cg(e,r,n,o),e.element=t.element,e.min=(r,n)=>e.check(Xr(r,n)),e.nonempty=r=>e.check(Xr(1,r)),e.max=(r,n)=>e.check(ya(r,n)),e.length=(r,n)=>e.check(ba(r,n)),e.unwrap=()=>e.element});function uy(e,t){return Zh(ly,e,t)}const dy=S("ZodObject",(e,t)=>{z_.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>lg(e,r,n,o),ce(e,"shape",()=>t.shape),e.keyof=()=>Xt(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ia()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ia()}),e.strict=()=>e.clone({...e._zod.def,catchall:cy()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>cm(e,r),e.safeExtend=r=>lm(e,r),e.merge=r=>um(e,r),e.pick=r=>sm(e,r),e.omit=r=>am(e,r),e.partial=(...r)=>dm(Oa,e,r[0]),e.required=(...r)=>fm(Pa,e,r[0])});function fy(e,t){const r={type:"object",shape:e??{},...U(t)};return new dy(r)}const py=S("ZodUnion",(e,t)=>{j_.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ug(e,r,n,o),e.options=t.options});function Na(e,t){return new py({type:"union",options:e,...U(t)})}const my=S("ZodIntersection",(e,t)=>{W_.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>dg(e,r,n,o)});function _y(e,t){return new my({type:"intersection",left:e,right:t})}const Po=S("ZodEnum",(e,t)=>{q_.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(n,o,i)=>og(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 Po({...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 Po({...t,checks:[],...U(o),entries:i})}});function Xt(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Po({type:"enum",entries:r,...U(t)})}const hy=S("ZodLiteral",(e,t)=>{G_.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ig(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 gy(e,t){return new hy({type:"literal",values:Array.isArray(e)?e:[e],...U(t)})}const yy=S("ZodTransform",(e,t)=>{Z_.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ag(e,r),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Fs(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(mr(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(mr(s))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function by(e){return new yy({type:"transform",transform:e})}const Oa=S("ZodOptional",(e,t)=>{ca.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>wa(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Ma(e){return new Oa({type:"optional",innerType:e})}const vy=S("ZodExactOptional",(e,t)=>{Y_.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>wa(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Sy(e){return new vy({type:"optional",innerType:e})}const Ey=S("ZodNullable",(e,t)=>{V_.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>fg(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Da(e){return new Ey({type:"nullable",innerType:e})}const wy=S("ZodDefault",(e,t)=>{K_.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>mg(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Cy(e,t){return new wy({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():zs(t)}})}const Ay=S("ZodPrefault",(e,t)=>{J_.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>_g(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Ty(e,t){return new Ay({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():zs(t)}})}const Pa=S("ZodNonOptional",(e,t)=>{Q_.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>pg(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function ky(e,t){return new Pa({type:"nonoptional",innerType:e,...U(t)})}const Iy=S("ZodCatch",(e,t)=>{X_.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>hg(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ny(e,t){return new Iy({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Oy=S("ZodPipe",(e,t)=>{eh.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>gg(e,r,n,o),e.in=t.in,e.out=t.out});function La(e,t){return new Oy({type:"pipe",in:e,out:t})}const My=S("ZodReadonly",(e,t)=>{th.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>yg(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Dy(e){return new My({type:"readonly",innerType:e})}const Py=S("ZodCustom",(e,t)=>{rh.init(e,t),ye.init(e,t),e._zod.processJSONSchema=(r,n,o)=>sg(e,r)});function Ly(e,t={}){return Yh(Py,e,t)}function xy(e){return Vh(e)}const Lo={custom:"custom"};function Ce(e){return Mh(Ta,e)}const Fy=["additional_pip","tort_threshold","pip_coverage_type","extended_medical","policy_pip_deductible"],$y=new Set([...Fy,"is_corporation"]);fy({additional_pip:Xt(["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:Xt(["Verbal_Threshold","Zero_Threshold"]),pip_coverage_type:Xt(["Primary","Secondary"]),extended_medical:Xt(["cov1000","cov10000"]),policy_pip_deductible:Xt(["cov250","cov500","cov1000","cov2000","cov2500"]),has_health_insurance_auto_accident:iy().nullable().optional()}).superRefine((e,t)=>{e.pip_coverage_type==="Secondary"&&e.has_health_insurance_auto_accident!==!0&&t.addIssue({code:Lo.custom,path:["pip_coverage_type"],message:"Secondary PIP coverage requires health insurance that covers auto accidents."})});const By=new Set(["Home","HomeConstruction","HomeFeatures","Demographics"]),Ry=new Set(["HomePolicy","BundlePolicy"]),Uy=new Set(["HomeCustomer","BundleCustomer","Demographics"]);function rn(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 xa(e){return e?rn(e.state??e.State):!1}function Fa(e,t,r){return e==="has_health_insurance_auto_accident"?t==="BundleCustomer"||t==="Demographics"?!1:!xa(r):$y.has(e)?!xa(r):e==="household_size"?!(t&&By.has(t)):e==="number_of_mortgagees"?!(t&&Ry.has(t)):(e==="has_co_applicant"||e==="co_applicant_middle_name"||e==="co_applicant_relationship")&&t&&Uy.has(t)?!1:e==="multi_policy_discount"&&t==="HomePolicy"?!0:Hy.has(e)}const Hy=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"]),$a=new Date().getUTCFullYear(),nn=gt().trim().min(1,"Required").regex(/^[A-Za-z\s]+$/,"Only alphabetic characters are allowed."),Ba=Na([gy(""),gt().trim().regex(/^[A-Za-z\s]*$/,"Only alphabetic characters are allowed.")]).optional(),zy=(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.`),er=(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.`),on=(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($a,`${e} cannot be in the future.`),sn=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.`),hr=(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.`)},jy={email:gt().trim().min(1,"Required").email("Please enter a valid email address."),phone:gt().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:gt().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:gt().trim().min(1,"Required").regex(/^\d{6}$/,"Please enter the 6-digit code."),first_name:nn,last_name:nn,middle_name:Ba,co_applicant_first_name:nn,co_applicant_last_name:nn,co_applicant_middle_name:Ba,year_built:on("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:on("Heating update year"),plumbing_update_year:on("Plumbing update year"),electrical_update_year:on("Electrical update year"),total_area_sq_ft:zy("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:sn("Number of years with your prior carrier"),home_continuous_coverage_years:sn("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:hr("Replacement cost",9,1),other_structures_coverage:hr("Other structures",9),personal_property_coverage:hr("Personal property",7),loss_of_use_coverage:hr("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:hr("Amount paid",7),license_number:gt().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:gt().superRefine((e,t)=>{if(typeof e!="string"||e.trim()==="")return;if(/\s/.test(e)){t.addIssue({code:Lo.custom,message:"VIN cannot contain spaces."});return}const r=e.trim();/^[A-HJ-NPR-Z0-9]{17}$/i.test(r)||t.addIssue({code:Lo.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:er("Modifications value",9999999),cost_new_value_cents:er("Cost new value",9999999),stated_value_amount_cents:er("Stated Value Amount",9999999),property_damage_amount_paid_cents:er("Property damage amount paid",9999999),personal_injury_amount_paid_cents:er("Personal injury amount paid",9999999),auto_current_annual_premium_cents:er("Current annual premium",9999999),auto_prior_years:sn("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:sn("Years with continuous auto coverage")};function be(e){return new Date(`${e}T00:00:00Z`)}function Ne(){const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))}function yt(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 Ra=[{targetKey:"social_security_number",dependsOn:["social_security_number","state"],validate:e=>{if(!("social_security_number"in e)||!rn(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.":yt(r,Ne())<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.":yt(r,Ne())<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>$a)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>Ne()?"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>Ne()?"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>Ne()?"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=Ne(),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=yt(o,Ne());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=yt(o,Ne());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=yt(o,Ne());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=yt(o,Ne());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>Ne()?"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=Ne();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=Ne(),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>Ne()?"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=Ne(),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=yt(o,Ne());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=yt(o,Ne());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 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 xo(e,t){const r=jy[e];if(!r)return;const n=r.safeParse(t);return n.success?void 0:n.error.issues[0].message}function Ua(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 Wy(e,t){const r={};for(const n of Ra){if(t?.has(n.targetKey))continue;const o=n.validate(e);o&&(r[n.targetKey]=o)}return r}function Fo(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function gr(e,t){return e.key??`${Fo(e.question)}-${t}`}function bt(e,t){return t==="number"?e==null||typeof e=="string"&&e.trim()==="":t==="checkbox"?e!==!0:e==null||typeof e=="string"&&e.trim()===""}function an(e,t){const r={};e.forEach((s,a)=>{const c=gr(s,a),u=t[c];if(s.required&&bt(u,s.inputType)){r[c]="Required";return}if(!bt(u,s.inputType)){const d=xo(c,u);if(d){r[c]=d;return}}});const n={...t};e.forEach((s,a)=>{const c=gr(s,a);c in n||(n[c]="")});const o=new Set(Object.keys(r).filter(s=>r[s])),i=Wy(n,o);for(const[s,a]of Object.entries(i))r[s]=a;return r}function qy(e){if(e===""||e===null||e===void 0)return;const t=Number(e);return Number.isNaN(t)?void 0:t}const Gy={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"},Zy={OwnHome:"Own Home",OwnCondo:"Own Condo",RentHome:"Rent Home",RentCondo:"Rent Condo",RentApartment:"Rent Apartment",LiveWithParents:"Live With Parents"},Yy={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"},Vy={Business:"Business",Pleasure:"Pleasure",Farming:"Farming",To_FromWork:"To/From Work",To_FromSchool:"To/From School"},Ky={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"},Jy={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"},Qy={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"},Xy={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"},e0={Dontknow:"Don't know",cov25000:"25,000",cov50000:"50,000",cov100000:"100,000",cov250000:"250,000",cov500000:"500,000"},t0={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"},r0={cov25000:"25,000",cov35000:"35,000",cov50000:"50,000",cov100000:"100,000",cov200000:"200,000",cov250000:"250,000",cov300000:"300,000",cov500000:"500,000"},n0={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"},o0={NoCoverage:"No Coverage",cov5000:"5,000",cov10000:"10,000"},$o={NoCoverage:"No Coverage",Zero:"0",Fifty:"50",Hundred:"100",TwoHunderd:"200",TwoHundredfifty:"250",FiveHundred:"500",SeventyFiveHundred:"750",Thousand:"1,000",TwoThousand:"2,000"},i0=["NoCoverage","Zero","Fifty","Hundred","TwoHunderd","TwoHundredfifty","FiveHundred","SeventyFiveHundred","Thousand","TwoThousand"],s0=["NoCoverage","Zero","Fifty","Hundred","TwoHunderd","TwoHundredfifty","FiveHundred","Thousand","TwoThousand"],Bo={NoCoverage:"No Coverage",TwentyFive:"25",Forty:"40",Fifty:"50",SeventyFive:"75",Eighty:"80",Hundred:"100",TwelveHundred:"120",TwoHundred:"200",Unlimited:"Unlimited"},a0=["NoCoverage","TwentyFive","Fifty","SeventyFive","Hundred","TwoHundred","Unlimited"],Ha={NoCoverage:"No Coverage",cov20to600:"20/600",cov25to750:"25/750",cov30to900:"30/900",cov40to1200:"40/1,200",cov50to1500:"50/1,500",cov100to3000:"100/3,000"},c0=["NoCoverage","cov20to600","cov25to750","cov30to900","cov40to1200","cov50to1500","cov100to3000"],l0=["NoCoverage","cov20to600","cov30to900","cov40to1200","cov50to1500"],za={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"},u0={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"},d0={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)"},f0={OwnerPrimary:"Owner Primary",OwnerSecondary:"Owner Secondary",OwnerSeasonal:"Owner Seasonal"},p0={Basic:"Basic",Modest:"Modest",Average:"Average",AboveAverage:"Above Average",Expensive:"Expensive",VeryExpensive:"Very Expensive",Opulent:"Opulent"},m0={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"},_0={Slab:"Slab",Basement:"Basement",CrawlSpace:"Crawl Space",PartialBasement:"Partial Basement",PiersPostsPiles:"Piers / Posts / Piles",Open:"Open"},h0={NotOverWater:"No",PartiallyOverWater:"Partially Over Water",FullyOrEntirelyOverWater:"Fully or Entirely Over Water"},g0={One:"1",OneHalf:"1.5",Two:"2",TwoHalf:"2.5",Three:"3",ThreeHalf:"3.5",Four:"4",BiLevel:"Bi-Level",TriLevel:"Tri-Level"},y0={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"},b0={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"},v0={B_Gable:"Gable",C_Hip:"Hip",A_Flat:"Flat",D_Other:"Other"},S0={NotUpdated:"Not Updated",PartialUpdate:"Partial Update",CompleteUpdate:"Complete Update"},E0={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"},w0={AboveGround:"Above Ground",BelowGround:"Below Ground"},C0={Basement:"Below Grade Basement",SplitLevelBasement:"Split Level Basement",WalkoutBasement:"Walkout Basement"},A0={EntirelyCopper:"Entirely Copper",EntirelyGalvanized:"Entirely Galvanized",EntirelyPEX:"Entirely PEX",EntirelyPVC:"Entirely PVC",Polybutylene:"Polybutylene"},T0={TwentyFive:"$25,000",Fifty:"$50,000",OneHundred:"$100,000",TwoHundred:"$200,000",ThreeHundred:"$300,000",FourHundred:"$400,000",FiveHundred:"$500,000"},k0={cov1000:"$1,000",cov2000:"$2,000",cov3000:"$3,000",cov4000:"$4,000",cov5000:"$5,000"},I0={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%"},N0={None:"None",OnePercent:"1%",TwoPercent:"2%",FivePercent:"5%",TenPercent:"10%"},O0={_0_500ft:"0-500 Feet",_501_1000ft:"501-1000 Feet",_1001ftAndGreater:"1001 Feet And Greater"},M0={Lessthan5miles:"Less Than 5 Miles",Over5miles:"Over 5 Miles",NotAvailable:"Not Available"},ja={"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"},Wa={Single:"Single",Married:"Married",Seperated:"Separated",Divorced:"Divorced",Widowed:"Widowed",DomesticPartner:"Domestic Partner"},qa={Female:"Female",Male:"Male"},Ga={"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"},D0={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"},P0={Verbal_Threshold:"Limited right to sue",Zero_Threshold:"Unlimited right to sue"},L0={Primary:"Primary",Secondary:"Secondary"},x0={cov1000:"$1,000",cov10000:"$10,000"},F0={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"},$0={cov250:"$250",cov500:"$500",cov1000:"$1,000",cov2000:"$2,000",cov2500:"$2,500"},B0={"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"]},R0={"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"},Za=B0,Ya=R0;function Ro(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 cn(e){return Ro(e,Ga)}function Va(e){return Ro(e,za)}function Ka(e){return Ro(e,Ya)}function U0(e){return e.trim().toLowerCase()}function Ja(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 tr(e,t){if(!t.effectiveDateKey||!t.expirationDateKey)return!1;const r=Ja(e[t.expirationDateKey]),n=Ja(e[t.effectiveDateKey]);return r==null||n==null?!1:r<n}const H0=new Set(["HomePolicy","BundlePolicy"]);function ln(e,t,r){return String(e.key??"")!=="lapse_in_coverage"||!r||!H0.has(r)?!0:t.home_prior_carrier_name!=="NoPriorInsurance"}function Uo(e){let t=null,r=null,n=null;const o=new Set,i=new Set,s=c=>{const u=String(c.key??""),d=U0(String(c.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(s);const a=c=>{c.forEach(u=>{(u.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 yr(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"&&tr(e,t)?!1:tr(e,t)}function un(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:yr(t,r)}function dn(e,t){const r=String(e.key??"");return t.noInsuranceReasonKeys.has(r)}const z0=["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"],Ho="credify_quote_id",zo="credify_auth_token";function Qa(e){try{localStorage.setItem(Ho,e)}catch(t){console.error("Failed to save quoteId to localStorage:",t)}}function fn(){try{return localStorage.getItem(Ho)}catch(e){return console.error("Failed to load quoteId from localStorage:",e),null}}function Xa(){try{localStorage.removeItem(Ho)}catch(e){console.error("Failed to clear quoteId from localStorage:",e)}}function j0(e){try{localStorage.setItem(zo,e)}catch(t){console.error("Failed to save authToken to localStorage:",t)}}function W0(){try{return localStorage.getItem(zo)}catch(e){return console.error("Failed to load authToken from localStorage:",e),null}}function ec(){try{localStorage.removeItem(zo)}catch(e){console.error("Failed to clear authToken from localStorage:",e)}}function q0(){Xa(),ec()}const G0="credify-insurance-widget",Z0="1.0",tc=25,rc=64*1024,Y0=`
|
|
63
|
-
…[truncated]`;let nc=!1,oc=null,ic="",sc=tc,jo=rc,br=[];function V0(e){return typeof e=="string"?e:e instanceof URL?e.href:e.url}function K0(e,t){return t?.method?t.method.toUpperCase():typeof e!="string"&&!(e instanceof URL)&&e.method?e.method.toUpperCase():"GET"}function ac(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 J0(e){try{const t=[];return new URL(e).searchParams.forEach((r,n)=>t.push({name:n,value:r})),t}catch{return[]}}function Q0(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 X0(e){const t=e.length;return t<=jo?{text:e,size:t}:{text:e.slice(0,jo)+Y0,size:t}}function eb(e){br.push(e),br.length>sc&&br.shift()}function tb(e){if(nc)return!0;if(typeof window>"u"||typeof window.fetch!="function")return!1;ic=e.baseUrl,sc=e.maxEntries??tc,jo=e.maxBodyBytes??rc,oc=window.fetch.bind(window);const t=oc;return window.fetch=async(r,n)=>{let o;try{o=V0(r)}catch{return t(r,n)}if(!o.startsWith(ic))return t(r,n);const i=ac(n?.headers??(typeof r!="string"&&!(r instanceof URL)?r.headers:void 0)),s={startedDateTime:new Date().toISOString(),time:-1,request:{method:K0(r,n),url:o,httpVersion:"HTTP/1.1",headers:i,queryString:J0(o),cookies:[],headersSize:-1,bodySize:typeof n?.body=="string"?n.body.length:-1,postData:Q0(i,n)},response:rb(),cache:{},timings:{send:0,wait:-1,receive:0}};eb(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 u=(typeof performance<"u"?performance.now():0)-a;s.time=Math.round(u),s.timings.wait=Math.round(u),s.response.status=c.status,s.response.statusText=c.statusText,s.response.headers=ac(c.headers),s.response.content.mimeType=typeof c.headers?.get=="function"&&c.headers.get("content-type")||"";try{c.clone().text().then(f=>{const{text:m,size:_}=X0(f);s.response.content.text=m,s.response.content.size=_,s.response.bodySize=_}).catch(()=>{})}catch{}return c},nc=!0,!0}function rb(){return{status:0,statusText:"",httpVersion:"HTTP/1.1",headers:[],cookies:[],content:{size:0,mimeType:""},redirectURL:"",headersSize:-1,bodySize:-1}}function nb(){return{log:{version:"1.2",creator:{name:G0,version:Z0},entries:br.map(e=>({...e}))}}}function ob(){return br.length}const ib=[/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],sb=[/\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],vt="[REDACTED]",ab=8;function pn(e){for(const t of ib)if(t.test(e))return!0;return!1}function St(e){let t=e;for(const r of sb)t=t.replace(r,vt);return t}function Et(e,t=0,r=new WeakSet){if(t>ab)return vt;if(e==null)return e;if(typeof e=="string")return St(e);if(typeof e!="object")return e;if(r.has(e))return vt;if(r.add(e),Array.isArray(e))return e.map(i=>Et(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(pn(i)){o[i]=vt;continue}o[i]=Et(s,t+1,r)}return o}function cc(e){if(e.request&&(e.request.data!==void 0&&(e.request.data=Et(e.request.data)),e.request.cookies!==void 0&&(e.request.cookies=vt),e.request.headers)){const t=e.request.headers;for(const r of Object.keys(t))pn(r)&&(t[r]=vt)}if(e.extra&&(e.extra=Et(e.extra)),e.contexts&&(e.contexts=Et(e.contexts)),e.tags&&(e.tags=Et(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=Et(t.data)),typeof t.message=="string"&&(t.message=St(t.message));return typeof e.message=="string"&&(e.message=St(e.message)),e}function lc(e){for(const t of e)t.value=pn(t.name)?vt:St(t.value)}function uc(e){try{return JSON.stringify(Et(JSON.parse(e)))}catch{return St(e)}}function cb(e){const t=JSON.parse(JSON.stringify(e));for(const r of t.log.entries){lc(r.request.headers),lc(r.response.headers);for(const n of r.request.queryString)n.value=pn(n.name)?vt:St(n.value);r.request.postData?.text&&(r.request.postData.text=uc(r.request.postData.text)),r.response.content.text&&(r.response.content.text=uc(r.response.content.text)),r.request.url=St(r.request.url),r.response._error&&(r.response._error=St(r.response._error))}return t}function rr(e,t={}){try{Gn(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{ob()>0&&r.addAttachment({filename:"quote-failure.har",data:JSON.stringify(cb(nb())),contentType:"application/json"})}catch{}const n=e instanceof Error?e:new Error(t.message??"Quote failed");Rr(n)})}catch{}}const Me="https://api.getcredify.com";let nr=null;const lb=6e4,dc=new Map;function ub(e){try{return new URL(e).pathname}catch{return e}}function fc(e,t,r){if(!(r>=500&&r<600)&&!(r===0))return;e.__sentryReported=!0;const i=ub(t),s=`${i}:${r}`,a=Date.now(),c=dc.get(s);c&&a-c<lb||(dc.set(s,a),rr(e,{phase:"api_request",endpoint:i,statusCode:r}))}function Wo(e){nr=e,j0(e)}function or(){return nr}function qo(){const e=W0();e&&(nr=e)}function pc(){nr=null,ec()}async function je(e,t){const r={"Content-Type":"application/json"};nr&&(r.Authorization=`Bearer ${nr}`);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 fc(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,fc(i,e,n.status),i}return n}async function db(e){try{return await e.json()}catch{return{}}}async function fb(e,t){const r=t?{stage:e,quoteId:t}:{stage:e};return await(await je(`${Me}/get-questions-by-stage`,r)).json()}async function mn(e){const t=e?{quoteId:e}:{};return await(await je(`${Me}/get-stages-for-quote`,t)).json()}async function pb(e,t=!1){const r=t?{postal_code:e,is_test:!0}:{postal_code:e},o=await(await je(`${Me}/create-quote`,r)).json();if(!o||typeof o!="object"||!o.quoteId)throw new Error(`Invalid createQuote response: ${JSON.stringify(o)}`);return o}async function mb(e,t){return await(await je(`${Me}/verify-quote`,{action:"send",quoteId:e,phone:t})).json()}async function ir(e,t,r){const n={payload:e,getRates:t};r&&typeof r=="string"&&r.trim()!==""&&(n.quoteId=r);const o=await je(`${Me}/update-quote`,n),i=await db(o);return!i||typeof i!="object"||!("status"in i)||i.status==null?{status:"success"}:i}async function mc(e,t){return await(await je(`${Me}/verify-quote`,{quoteId:e,smsCode:t})).json()}async function _b(e){return await(await je(`${Me}/verify-quote`,{action:"resume",resumeToken:e})).json()}async function hb(e,t){const r={state:e};return t&&typeof t=="string"&&t.trim()!==""&&(r.quoteId=t),await(await je(`${Me}/is-supported-state`,r)).json()}async function Go(){return await(await je(`${Me}/get-rates`,{})).json()}async function _c(e){const t=e?{quoteId:e}:{};return await(await je(`${Me}/get-quote`,t)).json()}async function hc(e){return(await je(`${Me}/get-vehicle-options`,e)).json()}async function gb(e){return(await je(`${Me}/get-vehicle-options`,{...e,action:"vinDecode"})).json()}async function yb(e,t){const n=await(await je(`${Me}/request-bind`,{quoteRateId:e,privacyNoticeAcknowledged:t})).json();return n&&typeof n=="object"&&"success"in n?n:{success:!0}}const Zo=new Set(["auto_prior_years","auto_prior_months","auto_continuous_coverage_years"]),bb={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"},gc={auto_prior_carrier_name:Gy,auto_prior_liability_limit:Ky,auto_reason_for_no_insurance:Jy,residence_type:Zy,home_prior_carrier_name:Yy,policy_bi:Qy,policy_um:Xy,policy_pd:e0,policy_mp:t0,policy_umpd:r0,policy_pip:n0,policy_auto_death_indemnity:o0,vehicle_comp_deductible:$o,vehicle_coll_deductible:$o,vehicle_towing_and_labor:Bo,vehicle_transportation_expense:Ha,education_level:za,industry:Ga,occupation:Ya,usage:Vy,architectural_style:u0,dwelling_type:d0,occupancy_type:f0,construction_quality:p0,construction_type:m0,foundation_type:_0,located_over_water:h0,number_of_stories:g0,exterior_wall_type:y0,roof_material_type:b0,roof_shape:v0,roof_updated_type:S0,heating_type:E0,oil_tank_location:w0,basement_type:C0,plumbing_type:A0,personal_liability:T0,dwelling_medical_payments:k0,all_perils_deductible:I0,windstorm_deductible:N0,distance_from_fire_hydrant_ft:O0,distance_from_fire_station_miles:M0,employment_industry:ja,marital_status:Wa,gender:qa,co_applicant_employment_industry:ja,co_applicant_marital_status:Wa,co_applicant_gender:qa,description:D0,tort_threshold:P0,pip_coverage_type:L0,extended_medical:x0,additional_pip:F0,policy_pip_deductible:$0},vb=["OTHER / NOT LISTED"],Sb=["SEDAN","SUV","COUPE","HATCHBACK","PICKUP","VAN","WAGON","OTHER"],Eb=["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 yc(e){const t=e.replace(/\D+/g,"");if(t!=="")return qy(t)}function wb(e){return e==="-"||e==="+"||e==="."||e==="e"||e==="E"}const Cb={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},bc=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"]),Ab=new Set(["total_area_sq_ft","annual_mileage","miles_to_work","distance_to_coast_miles"]),_n={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"},Tb={license_number:20};function kb(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 Ib=new Set(["Disabled","Retired","Unemployed","Other"]);function Yo(e,t,r){const n=String(e.key??"");if(n!=="occupation"&&n!=="co_applicant_occupation"||n==="co_applicant_occupation")return!0;const o=Oe(t,r,"industry"),i=Oe(t,r,"employment_industry"),s=String(o??i??"").trim();return!Ib.has(s)}function Vo(e,t,r,n){return Fa(e,n,r)}function hn(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 vc(e,t){return hn(e)?"Yes":t}function Sc(e){return typeof e=="number"&&Number.isFinite(e)?e:typeof e=="string"&&e.trim()!==""&&!Number.isNaN(Number(e))?Number(e):null}function Ec(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 wc(e,t){const r=Sc(e),n=Sc(t);if(r!=null&&n!=null)return r-n;const o=Ec(e),i=Ec(t);return o!=null&&i!=null?o-i:e==null||t==null?null:String(e).localeCompare(String(t))}function Nb(e,t){return Array.isArray(e)?e.some(r=>r===t):typeof e=="string"?t!=null&&e.includes(String(t)):!1}function vr(e,t,r){switch(t){case"equals":return e===r;case"notEquals":return e!==r&&e!==""&&e!=null;case"lessThan":{const n=wc(e,r);return n!=null&&n<0}case"greaterThan":{const n=wc(e,r);return n!=null&&n>0}case"contains":return Nb(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 Sr(e,t){return t.reduce((r,n)=>r?.[n],e)}function tt(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],s=typeof o[0]=="number"?Array.isArray(i)?i:[]:i&&typeof i=="object"?i:{},a=tt(s,o,r);if(typeof n=="number"){const u=(Array.isArray(e)?e:[]).slice();return u[n]=a,u}return{...e,[n]:a}}function Oe(e,t,r){return Sr(e,[...t??[],r])}function De(e,t,r,n){return tt(e,[...t??[],r],n)}function Ob(e,t){return e?.length?`${e.join("-")}-${t}`:t}const Mb="__items",gn=e=>`${e}${Mb}`;function Be(e){return e==null?"":typeof e=="string"?e:String(e)}function Cc(e){return e==null?"":typeof e=="number"&&Number.isFinite(e)||typeof e=="string"?e:""}function Db(e){return e==null?"":typeof e=="string"||typeof e=="number"?e:String(e)}function Pb({questions:e,initialValues:t,controlledValues:r,onChangeValues:n,onSubmit:o,quoteId:i,widgetStageKey:s}){const a=y.useMemo(()=>So(e),[e]),c=y.useMemo(()=>Uo(a),[a]),u=y.useMemo(()=>s==="BundlePolicy"?!0:a.some(w=>String(w.key)==="home_prior_carrier_name")&&a.some(w=>String(w.key)==="driver_vehicle_assignments"),[s,a]),d=y.useMemo(()=>{const w={};return t&&Object.assign(w,t),w},[t]),[f,m]=y.useState(d);y.useEffect(()=>{m(d)},[d]);const[_,h]=y.useState({}),b=y.useMemo(()=>({..._,...r??f}),[_,r,f]);y.useEffect(()=>{r&&h(w=>({...w,...r}))},[r]);const[W,x]=y.useState({}),B=y.useRef(new Map),M=y.useRef(new Set),[,z]=y.useState({}),[C,H]=y.useState({}),Y=y.useRef(!1);y.useEffect(()=>{!i||Y.current||!a.some(g=>g.key==="year"||g.key==="make"||g.key==="model"||g.key==="body_style")||(Y.current=!0,hc({quoteId:i}).catch(()=>{}))},[i,a]);const[R,ee]=y.useState({}),[te,oe]=y.useState({}),ve=y.useCallback(async(w,g)=>{if(!i||!Ua(g))return;const p=w?w.join("-"):"_root";ee(v=>({...v,[p]:!0})),oe(v=>({...v,[p]:null}));try{const v=await gb({quoteId:i,vin:g});if(v.error){oe(k=>({...k,[p]:v.error}));return}let E=b;v.year&&(E=De(E,w,"year",String(v.year))),v.make&&(E=De(E,w,"make",v.make)),v.model&&(E=De(E,w,"model",v.model)),v.bodyStyle&&(E=De(E,w,"body_style",v.bodyStyle)),r&&n?n(E):m(E),h(E),B.current.clear(),M.current.clear(),z({})}catch{oe(v=>({...v,[p]:"VIN lookup failed — please enter vehicle details manually"}))}finally{ee(v=>({...v,[p]:!1}))}},[i,b,r,n]),Pe=y.useCallback(w=>{const g=`${w.year}|${w.make??""}|${w.model??""}`,p=w.model?"bodyStyles":w.make?"models":"makes",v=B.current.get(g);return v?v[p]??[]:void 0},[]),Ee=y.useCallback((w,g)=>{if(!i)return;const p=`${g.year}|${g.make??""}|${g.model??""}`,v=g.model?"bodyStyles":g.make?"models":"makes",E=`${w}:${v}`;B.current.has(p)||M.current.has(p)||(M.current.add(p),H(k=>({...k,[E]:!0})),hc({quoteId:i,...g}).then(k=>{B.current.set(p,k),z(O=>({...O,[E]:k[v]??[]}))}).catch(()=>{B.current.set(p,{}),z(k=>({...k,[E]:[]}))}).finally(()=>{M.current.delete(p),H(k=>({...k,[E]:!1}))}))},[i]);function J(w,g,p){const v=b,E=w?Sr(b,w)??{}:v;return w?{state:v.state,...E,[g]:p}:{...E,[g]:p}}function V(w,g){const p=Ra.filter(E=>E.targetKey===w||E.dependsOn.includes(w)),v={[w]:void 0};for(const E of p){const k=E.validate(g);E.targetKey in v?k!==void 0&&(v[E.targetKey]=k):v[E.targetKey]=k}x(E=>({...E,...v}))}const L=(w,g,p)=>{const v=Oe(b,p,w);if(bt(v,g)){W[w]&&x(k=>({...k,[w]:void 0}));return}const E=xo(w,v);if(E){x(k=>({...k,[w]:E}));return}V(w,J(p,w,v))};y.useEffect(()=>{let w=b,g=!1;a.forEach(p=>{if(!hn(p))return;const v=String(p.key);Oe(w,void 0,v)!=="Yes"&&(w=De(w,void 0,v,"Yes"),g=!0)}),g&&(r&&n?n(w):m(w),h(w))},[a,b,r,n]);function Q(w,g){const p=w.key;if((p==="relationship_to_insured"||p==="is_registered_owner")&&g){const A=g[g.length-1];if(typeof A=="number"&&A===0)return null}if((p==="purchase_date"||p==="cost_new_value_cents")&&g)return null;if(p==="custom_equipment_value_cents"&&g){const A=Oe(b,g,"vehicle_has_modifications");if(A!=="Yes"&&A!==!0)return null}const v=p==="auto_reason_for_no_insurance"&&c.currentCarrierKey?b[c.currentCarrierKey]==="NoPriorInsurance"?"Reason you are not currently insured":"Reason for lapse in coverage":w.question,E=w.hint,k=Oe(b,g,p),O=dn(w,c)?yr(b,c):p==="social_security_number"&&rn(b.state??b.State)?!0:w.required,I=W[p],P=A=>{let T=De(b,g,p,A);if(w.inputType==="radio"&&w.conditionals){const N=w.conditionals??[];for(const q of N){const Z=Oe(b,g,p),re=vr(Z,q.conditionalType,q.conditionalValue),K=vr(A,q.conditionalType,q.conditionalValue);if(re&&!K&&q.conditionalQuestionsAllowMultiple){const ue=q.conditionalQuestions??[];if(ue.length>0){const $=gn(p);T=tt(T,[...g??[],$],[]);const de=(ne,Se)=>{ne.forEach(Ue=>{(Ue.conditionals??[]).forEach(Ae=>{if(Ae.conditionalQuestionsAllowMultiple){const _e=gn(Ue.key);T=tt(T,[...Se,_e],[])}const qe=Ae.conditionalQuestions??[];qe.length>0&&de(qe,Se)})})};de(ue,[...g??[],$])}}}}r&&n?n(T):m(T),h(T)};if(p==="vehicle_policy_selections"){const A=b.vehicles__items??[],T=b.drivers__items??[];if(A.length===0)return l.jsx("p",{style:{color:"#666",fontStyle:"italic"},children:"Add vehicles first to configure coverage selections."},p);const N=b.driver_vehicle_assignments??{},q=T.length>1,Z=_e=>Object.entries(_e).map(([se,Te])=>({value:se,label:Te})),re=rn(b.state??b.State),K=(_e,se)=>Object.fromEntries(_e.filter(Te=>Te in se).map(Te=>[Te,se[Te]])),$=Z(K(re?i0:s0,$o)),de=re?K(a0,Bo):Bo,ne=Z(de),Ue=Z(K(re?c0:l0,Ha)),Le=(_e,se,Te)=>{const ke=tt(b,["vehicles__items",_e,se],Te);r&&n?n(ke):m(ke),h(ke)},Ae=(_e,se,Te)=>{const ke={...N},Ge=`v${_e}`;ke[Ge]={...ke[Ge]??{}},ke[Ge][`d${se}`]=Te;const fe=tt(b,["driver_vehicle_assignments"],ke);r&&n?n(fe):m(fe),h(fe)},qe=_e=>{if(!q)return null;const se=N[`v${_e}`];if(!se)return null;const Te=T.map((fe,ot)=>se[`d${ot}`]??0),ke=Te.filter(fe=>fe>0);if(ke.length>=2&&ke.every(fe=>fe===ke[0])&&ke[0]===50)return`Assignments for Vehicle ${_e+1} cannot be 50 percent for both Drivers.`;const Ge=Te.reduce((fe,ot)=>fe+ot,0);return Ge>0&&Ge!==100?`Driver percentages for this vehicle must add up to 100% (currently ${Ge}%).`:null};return l.jsx("div",{children:A.map((_e,se)=>{const Te=[_e.year,_e.make,_e.model].filter(Boolean).join(" ")||`Vehicle ${se+1}`,ke=qe(se),Ge=fe=>typeof _e[fe]=="string"?_e[fe]:"";return l.jsxs("fieldset",{style:{border:`1px solid ${ke?"#dc3545":"#ddd"}`,borderRadius:"8px",padding:"16px",marginBottom:"16px"},children:[l.jsx("legend",{style:{fontWeight:600,padding:"0 8px"},children:Te}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:"12px"},children:[l.jsx(fr,{id:`veh-${se}-comp`,label:"Comprehensive deductible",required:!0,placeholder:"Select...",options:$,value:Ge("vehicle_comp_deductible"),onChange:fe=>Le(se,"vehicle_comp_deductible",fe.currentTarget.value)}),l.jsx(fr,{id:`veh-${se}-coll`,label:"Collision deductible",required:!0,placeholder:"Select...",options:$,value:Ge("vehicle_coll_deductible"),onChange:fe=>Le(se,"vehicle_coll_deductible",fe.currentTarget.value)}),l.jsx(fr,{id:`veh-${se}-tow`,label:"Towing and Labor",required:!0,placeholder:"Select...",options:ne,value:Ge("vehicle_towing_and_labor"),onChange:fe=>Le(se,"vehicle_towing_and_labor",fe.currentTarget.value)}),l.jsx(fr,{id:`veh-${se}-trans`,label:"Transportation expense",required:!0,placeholder:"Select...",options:Ue,value:Ge("vehicle_transportation_expense"),onChange:fe=>Le(se,"vehicle_transportation_expense",fe.currentTarget.value)})]}),q&&l.jsxs("div",{style:{marginTop:"16px"},children:[l.jsx("p",{style:{fontWeight:600,margin:"0 0 8px"},children:"Drivers usage (%)"}),l.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px"},children:T.map((fe,ot)=>{const ci=[fe.first_name,fe.last_name].filter(Boolean).join(" ")||`Driver ${ot+1}`,rt=N[`v${se}`]?.[`d${ot}`];return l.jsx("div",{style:{flex:"0 0 140px"},children:l.jsx(go,{id:`assignment-v${se}-d${ot}`,label:`${ci} %`,value:rt??"",min:0,max:100,step:1,inputMode:"numeric",onChange:Cr=>{const Ct=Cr.currentTarget.value.replace(/\D+/g,"");Ae(se,ot,Ct===""?0:Math.min(100,parseInt(Ct,10)))}})},`${se}-${ot}`)})}),ke&&l.jsx("p",{style:{color:"#dc3545",fontSize:"0.85rem",marginTop:"8px",marginBottom:0},children:ke})]})]},se)})},p)}if(p==="driver_vehicle_assignments"){const A=b.vehicles__items??[],T=b.drivers__items??[];if(u&&T.length<=1)return null;if(A.length===0||T.length===0)return l.jsx("p",{style:{color:"#666",fontStyle:"italic"},children:"Add vehicles and drivers first to configure driver usage percentages."},p);const N=b.driver_vehicle_assignments??{},q=(re,K,ue)=>{const $={...N},de=`v${re}`;$[de]={...$[de]??{}},$[de][`d${K}`]=ue,P($)},Z=re=>{if(T.length<2)return null;const K=N[`v${re}`];if(!K)return null;const ue=T.map((ne,Se)=>K[`d${Se}`]??0),$=ue.filter(ne=>ne>0);if($.length>=2&&$.every(ne=>ne===$[0])&&$[0]===50)return`Assignments for Vehicle ${re+1} cannot be 50 percent for both Drivers.`;const de=ue.reduce((ne,Se)=>ne+Se,0);return de>0&&de!==100?`Driver percentages for this vehicle must add up to 100% (currently ${de}%).`:null};return l.jsxs("div",{children:[l.jsx("h4",{style:{marginBottom:"12px"},children:v}),A.map((re,K)=>{const ue=[re.year,re.make,re.model].filter(Boolean).join(" ")||`Vehicle ${K+1}`,$=Z(K);return l.jsxs("fieldset",{style:{border:`1px solid ${$?"#dc3545":"#ddd"}`,borderRadius:"8px",padding:"16px",marginBottom:"16px"},children:[l.jsx("legend",{style:{fontWeight:600,padding:"0 8px"},children:ue}),l.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px"},children:T.map((de,ne)=>{const Se=[de.first_name,de.last_name].filter(Boolean).join(" ")||`Driver ${ne+1}`,Ue=N[`v${K}`]?.[`d${ne}`];return l.jsx("div",{style:{flex:"0 0 140px"},children:l.jsx(go,{id:`assignment-v${K}-d${ne}`,label:`${Se} %`,value:Ue??"",min:0,max:100,step:1,inputMode:"numeric",onChange:Le=>{const Ae=Le.currentTarget.value.replace(/\D+/g,"");q(K,ne,Ae===""?0:Math.min(100,parseInt(Ae,10)))}})},`${K}-${ne}`)})}),$&&l.jsx("p",{style:{color:"#dc3545",fontSize:"0.85rem",marginTop:"8px",marginBottom:0},children:$})]},K)})]},p)}switch(w.inputType){case"text":{if(p==="vin"&&i){const A=g?g.join("-"):"_root",T=R[A]??!1,N=te[A]??null,q=[E?`${p}-hint`:null,I?`${p}-error`:null,N?`${p}-vin-error`:null].filter(Boolean).join(" ");return l.jsxs("div",{children:[l.jsx(ze,{id:p,label:v,hint:E,error:I,required:O,children:l.jsxs("div",{className:"flex items-end gap-2",children:[l.jsx("div",{className:"flex-1 min-w-0",children:l.jsx("input",{id:p,className:`form-input ${I?"input-error":""}`,"aria-invalid":!!I,"aria-describedby":q||void 0,"aria-required":O||void 0,required:O,value:Be(k),maxLength:17,onChange:Z=>P(Z.currentTarget.value),onBlur:()=>L(p,"text",g),autoComplete:_n[p],type:"text"})}),l.jsx("button",{type:"button",disabled:T||!Ua(Be(k)),className:"btn btn-outline shrink-0 self-end !w-auto min-w-[8.5rem] px-4 whitespace-nowrap disabled:opacity-50",onClick:()=>ve(g,Be(k)),children:T?"Looking up...":"Verify VIN"})]})}),N&&l.jsx("p",{id:`${p}-vin-error`,className:"text-sm text-red-600 mt-1",children:N})]},p)}if(p==="sms_code"){const A=Be(k);return l.jsx(ho,{id:p,label:v,hint:E,value:A,inputMode:"numeric",pattern:"[0-9]*",maxLength:6,onChange:T=>{const N=T.currentTarget.value.replace(/\D+/g,"").slice(0,6);P(N)},onBlur:()=>L(p,"text",g),"aria-required":O||void 0,error:I,autoComplete:_n[p]},p)}if(p==="license_number")return l.jsx(ho,{id:p,label:v,hint:E,value:Be(k),onChange:A=>P(A.currentTarget.value.replace(/[^A-Z0-9]/gi,"").slice(0,20)),onBlur:()=>L(p,"text",g),"aria-required":O||void 0,error:I,autoComplete:"off",maxLength:20},p);if(p==="social_security_number"){const A=Oe(b,g,"ssn_display"),T=typeof A=="string"?A:"",N=T?`${T}. Re-enter to update.${E?` ${E}`:""}`:E;return l.jsx(Rp,{id:p,label:v,hint:N,value:Be(k),onChange:q=>P(q.currentTarget.value),onBlur:()=>L(p,"text",g),"aria-required":O||void 0,error:I},p)}return l.jsx(ho,{id:p,label:v,hint:E,value:Be(k),onChange:A=>P(A.currentTarget.value),onBlur:()=>L(p,"text",g),"aria-required":O||void 0,error:I,autoComplete:_n[p],maxLength:Tb[p]},p)}case"email":return l.jsx(Up,{id:p,label:v,value:Be(k),onChange:A=>P(A.currentTarget.value),onBlur:()=>L(p,"email",g),"aria-required":O||void 0,error:I},p);case"password":return l.jsx(jp,{id:p,label:v,value:Be(k),onChange:A=>P(A.currentTarget.value),onBlur:()=>L(p,"password",g),"aria-required":O||void 0,error:I},p);case"tel":return l.jsxs(l.Fragment,{children:[l.jsx(Hp,{id:p,label:v,value:Be(k),onChange:A=>P(A.currentTarget.value),onBlur:()=>L(p,"tel",g),"aria-required":O||void 0,error:I},p),p==="phone"&&l.jsxs("div",{className:"mt-3 text-xs text-slate-600 space-y-1",children:[l.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."}),l.jsx("p",{children:"Message & data rates may apply. One message per request."}),l.jsxs("p",{children:["See our"," ",l.jsx("a",{href:"https://getcredify.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})," ","and"," ",l.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 l.jsx(zp,{id:p,label:v,value:Be(k),onChange:A=>P(A.currentTarget.value),onBlur:()=>L(p,"url",g),"aria-required":O||void 0,error:I},p);case"number":{const A=Cb[p];return bc.has(p)||Ab.has(p)?l.jsx(Bp,{id:p,label:v,hint:E,value:Cc(k),isCurrency:bc.has(p),maxDigits:A,onChange:T=>P(yc(T.currentTarget.value)),onBlur:()=>L(p,"number",g),"aria-required":O||void 0,error:I},p):l.jsx(go,{id:p,label:v,hint:E,value:Cc(k),inputMode:"numeric",pattern:"[0-9]*",onKeyDown:T=>{if(wb(T.key)){T.preventDefault();return}A!==void 0&&/^\d$/.test(T.key)&&String(T.currentTarget.value).replace(/\D/g,"").length>=A&&T.preventDefault()},onChange:T=>{let N=T.currentTarget.value;A!==void 0&&(N=N.slice(0,A)),P(yc(N))},onBlur:()=>L(p,"number",g),"aria-required":O||void 0,error:I},p)}case"textarea":return l.jsx(Wp,{id:p,label:v,value:Be(k),onChange:A=>P(A.currentTarget.value),onBlur:()=>L(p,"textarea",g),"aria-required":O||void 0,error:I,rows:4},p);case"date":{const{min:A,max:T}=kb(p);return l.jsx(qp,{id:p,label:v,hint:E,value:Be(k),min:A,max:T,onChange:N=>{const q=N.currentTarget.value;P(q),!bt(q,"date")&&!xo(p,q)&&V(p,J(g,p,q))},onBlur:()=>L(p,"date",g),"aria-required":O||void 0,error:I,autoComplete:_n[p]},p)}case"checkbox":{if(w.options){const A=Array.isArray(k)?k:[];return l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"form-label",children:[v,O&&l.jsx("span",{className:"text-red-600 ml-1",children:"*"})]}),l.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:w.options.map(T=>{const N=`${p}-${Fo(T)}`,q=A.includes(T);return l.jsx(qr,{id:N,label:T,checked:q,onChange:Z=>{const re=new Set(A);Z.currentTarget.checked?re.add(T):re.delete(T),P(Array.from(re))},"aria-required":O||void 0},N)})}),I&&l.jsx("p",{className:"mt-1 text-sm text-red-600",children:I})]},p)}return l.jsx(qr,{id:p,label:O?`${v} *`:v,checked:!!k,onChange:A=>P(A.currentTarget.checked),"aria-required":O||void 0},p)}case"radio":{if(hn(w))return null;const A=w.options??[],T=g&&g.length>0?`${p}__${g.join("__")}`:p;return l.jsx(Yp,{legend:v,legendClassName:O?"legend-required":void 0,children:A.map(N=>l.jsx(Zp,{name:T,value:N,checked:k===N,onChange:()=>{P(N),V(p,J(g,p,N))},children:gc[p]?.[N]??N},`${p}-${Fo(N)}`))},p)}case"select":{let A=w.options??[];p==="quote_vehicle_id"&&(A=r?.vehicles__items?.map(K=>K.vin)??[]);let T=!1,N,q,Z;if(p==="year"||p==="make"||p==="model"||p==="body_style"){const K=g?g.join("-"):"_root";R[K]&&(T=!0,N="Looking up VIN...")}if(!T&&(p==="make"||p==="model"||p==="body_style")){const K=g?g.join("-"):"_root";Z=K;const ue=Oe(b,g,"year"),$=typeof ue=="number"?ue:Number(ue);if(p==="make"){const de=`${K}:makes`;if(!$||!Number.isFinite($))T=!0,N="Select a year first";else{q={year:$};const ne=Pe(q);ne&&ne.length>0?A=ne:C[de]?(T=!0,N="Loading makes..."):A=[...z0]}}else if(p==="model"){const de=`${K}:models`,ne=String(Oe(b,g,"make")??"");if(!ne)T=!0,N="Select a make first";else if($&&Number.isFinite($)){q={year:$,make:ne};const Se=Pe(q);Se&&Se.length>0?A=Se:C[de]?(T=!0,N="Loading models..."):A=[...vb]}typeof k=="string"&&k&&!A.includes(k)&&(A=[k,...A])}else{const de=`${K}:bodyStyles`,ne=String(Oe(b,g,"make")??""),Se=String(Oe(b,g,"model")??"");if(!Se)T=!0,N="Select a model first";else if($&&Number.isFinite($)&&ne){q={year:$,make:ne,model:Se};const Ue=Pe(q);Ue&&Ue.length>0?A=Ue:C[de]?(T=!0,N="Loading body styles..."):A=[...Sb]}typeof k=="string"&&k&&!A.includes(k)&&(A=[k,...A])}}if(p==="occupation"||p==="co_applicant_occupation"){const K=p==="co_applicant_occupation"?"co_applicant_employment_industry":void 0,ue=K?void 0:Oe(b,g,"industry"),$=Oe(b,g,K??"employment_industry"),ne=String(cn(ue??$)??"").trim();A=[...Za[ne]??Eb],typeof k=="string"&&k&&!A.includes(k)&&(A=[k,...A])}const re=Ob(g,p);return l.jsx(fr,{id:re,label:N?`${v} — ${N}`:v,"aria-required":O||void 0,error:I,disabled:T,value:Db(k),onChange:K=>{const ue=K.currentTarget.value;if(p!=="year"&&p!=="make"&&p!=="model"&&p!=="industry"&&p!=="employment_industry"&&p!=="co_applicant_employment_industry"){P(ue),V(p,J(g,p,ue));return}let $=De(b,g,p,ue);if(p==="year")$=De($,g,"make",""),$=De($,g,"model",""),$=De($,g,"body_style","");else if(p==="make")$=De($,g,"model",""),$=De($,g,"body_style","");else if(p==="model")$=De($,g,"body_style","");else if(p==="industry"||p==="employment_industry")$=De($,g,"occupation","");else if(p==="co_applicant_employment_industry"){const ne=String(cn(ue)??"").trim(),Se=Za[ne]??[],Ue=Se.find(Le=>Le===ne)??Se[0]??"";$=De($,g,"co_applicant_occupation",Ue??"")}r&&n?n($):m($),h($);const de=g?Sr($,g)??{}:$;V(p,{...de,[p]:ue})},placeholder:N??"Select an option",onFocus:q&&Z?()=>Ee(Z,q):void 0,options:A.map(K=>({value:K,label:gc[p]?.[K]??bb[K]??K}))},re)}case"address":return l.jsx(Xp,{id:p,label:v,value:Be(k),onChange:(A,T)=>{let N=De(b,g,p,A);const q=T?.state??(typeof A=="string"?A.match(/,\s*([A-Z]{2})\s+\d{5}\b/)?.[1]:void 0);if(q){const Z=g?[...g,"state"]:["state"];N=tt(N,Z,q)}r&&n?n(N):m(N),h(N)},onBlur:()=>L(p,"address",g),required:O,"aria-required":O||void 0,error:I},p);default:return null}}function me(w,g){const p=w.some(E=>String(E.key)==="years_at_address"),v=w.find(E=>String(E.key)==="months_at_address");return w.map((E,k)=>{const O=String(E.key);if(O==="months_at_address"&&p||!un(E,b,c)||!Yo(E,b,g)||!ln(E,b,s))return null;if(Vo(O,E,b,s)){const Z=c.currentCarrierKey?b[c.currentCarrierKey]:void 0;if(!(Z&&Z!=="NoPriorInsurance"&&tr(b,c)&&Zo.has(O)))return null}const I=Q(E,g),P=O==="years_at_address"&&v?Q(v,g):null,A=E.conditionals??[];if(!A.length)return s==="BundlePolicy"&&O==="policy_bi"?l.jsxs("div",{children:[l.jsx("h3",{className:"text-lg font-semibold mt-6 mb-3",children:"Vehicle Coverage Information"}),I]},`wrap-${O}-${k}`):l.jsxs("div",{children:[I,P]},`wrap-${O}-${k}`);const T=vc(E,Oe(b,g,O)),N=A.filter(Z=>vr(T,Z.conditionalType,Z.conditionalValue)),q=N.length>1&&!N.some(Z=>Z.conditionalQuestionsAllowMultiple)?N.slice(0,1):N;return l.jsxs("div",{children:[I,P,q.map((Z,re)=>{const K=Z.conditionalQuestions??[];if(!K.length)return null;if(!Z.conditionalQuestionsAllowMultiple)return l.jsx("div",{className:"mt-3",children:me(K,g)},`branch-${O}-${re}`);const ue=gn(O),$=Sr(b,[...g??[],ue])??[],de=Math.max(1,$.length||1),ne=()=>{const Le=tt(b,[...g??[],ue,$.length],{});r&&n?n(Le):m(Le),h(Le)},Se=()=>{const Le=$.slice(0,Math.max(0,$.length-1)),Ae=tt(b,[...g??[],ue],Le);r&&n?n(Ae):m(Ae),h(Ae)},Ue=`${O}__c${re}`;return l.jsxs("div",{className:"mt-3",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsx("div",{className:"text-sm font-medium opacity-75",children:"Add one or more entries"}),l.jsxs("div",{className:"space-x-2",children:[l.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:ne,children:"Add another"}),de>1&&l.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:Se,children:"Remove last"})]})]}),Array.from({length:de}).map((Le,Ae)=>{const qe=[...g??[],ue,Ae],_e=`${Ue}__i${Ae}`,se=$[Ae]??{},Te=O==="drivers",fe=Te?`Driver #${Ae+1}`:O==="vehicles"?`Vehicle #${Ae+1}`:O==="home_losses"||O==="losses"?`Loss #${Ae+1}`:`Entry #${Ae+1}`,ci=Te&&typeof se.ssn_display=="string"&&se.ssn_display?` — ${se.ssn_display}`:"";return l.jsxs("div",{className:"rounded-lg border p-3 mb-3",children:[l.jsxs("div",{className:"text-sm font-semibold mb-2",children:[fe,ci]}),K.map(rt=>{const Cr=String(rt.key);if(!un(rt,b,c)||!Yo(rt,b,qe)||!ln(rt,b,s))return null;if(Vo(Cr,rt,b,s)){const Ct=c.currentCarrierKey?b[c.currentCarrierKey]:void 0;if(!(Ct&&Ct!=="NoPriorInsurance"&&tr(b,c)&&Zo.has(Cr)))return null}return l.jsxs("div",{className:"mt-3",children:[Q(rt,qe),(()=>{const Ct=rt.conditionals??[];if(!Ct.length)return null;const gl=Oe(b,qe,rt.key),kn=Ct.filter(Ut=>vr(gl,Ut.conditionalType,Ut.conditionalValue));return(kn.length>1&&!kn.some(Ut=>Ut.conditionalQuestionsAllowMultiple)?kn.slice(0,1):kn).map((Ut,li)=>{const ui=Ut.conditionalQuestions??[];if(!ui.length)return null;if(!Ut.conditionalQuestionsAllowMultiple)return l.jsx("div",{className:"mt-3",children:me(ui,qe)},`nested-${_e}-${li}`);const In=gn(rt.key),Nn=Sr(b,[...qe,In])??[],yl=Math.max(1,Nn.length||1),OS=()=>{const ar=tt(b,[...qe,In,Nn.length],{});r&&n?n(ar):m(ar),h(ar)},MS=()=>{const ar=Nn.slice(0,Math.max(0,Nn.length-1)),Ht=tt(b,[...qe,In],ar);r&&n?n(Ht):m(Ht),h(Ht)};return l.jsxs("div",{className:"mt-3",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsx("div",{className:"text-sm font-medium opacity-75",children:"Add one or more entries"}),l.jsxs("div",{className:"space-x-2",children:[l.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:OS,children:"Add another"}),yl>1&&l.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:MS,children:"Remove last"})]})]}),Array.from({length:yl}).map((ar,Ht)=>{const DS=[...qe,In,Ht];return l.jsxs("div",{className:"rounded-lg border p-3 mb-3",children:[l.jsxs("div",{className:"text-sm font-semibold mb-2",children:["Entry #",Ht+1]}),me(ui,DS)]},`nested-item-${_e}-${li}-${Ht}`)})]},`nested-repeat-${_e}-${li}`)})})()]},`${_e}-${Cr}`)})]},`group-${_e}`)})]},`branch-${O}-${re}`)})]},`wrap-${O}-${k}`)})}const D=y.useMemo(()=>{const w=[],g=(p,v)=>{p.forEach(E=>{if(!un(E,b,c)||!Yo(E,b,v)||!ln(E,b,s))return;const k=String(E.key);if(Vo(k,E,b,s)){const T=c.currentCarrierKey?b[c.currentCarrierKey]:void 0;if(!(T&&T!=="NoPriorInsurance"&&tr(b,c)&&Zo.has(k)))return}hn(E)||w.push(E);const O=E.conditionals??[];if(!O.length)return;const I=vc(E,Oe(b,v,k)),P=O.filter(T=>vr(I,T.conditionalType,T.conditionalValue));(P.length>1&&!P.some(T=>T.conditionalQuestionsAllowMultiple)?P.slice(0,1):P).forEach(T=>{const N=T.conditionalQuestions??[];N.length&&(T.conditionalQuestionsAllowMultiple||g(N,v))})})};return g(a),w},[a,b,c,s]);function F(w){w.preventDefault();const g=yr(b,c),p=D.map(E=>dn(E,c)?{...E,required:g}:E),v=an(p,b);if(x(v),Object.keys(v).length>0){const E=D.findIndex(k=>v[k.key]);E>=0&&document.getElementById(D[E].key)?.focus();return}o(b)}return l.jsx("form",{className:"space-y-6 px-1",onSubmit:F,noValidate:!0,children:me(a)})}const Lb="https://getcredify.com/privacy-policy";function xb(){return l.jsx("a",{href:Lb,target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})}function Ac(){return l.jsxs(l.Fragment,{children:["See our ",l.jsx(xb,{})," for how we use your information."]})}const Fb=new Set(["Product","Name","Home","HomeConstruction","HomeFeatures","Vehicle","Driver","Demographics","Customer","HomeCustomer","BundleCustomer"]),$b=new Set(["AutoCurrentCarrier","HomeCurrentCarrier","HomePolicy","BundlePolicy","AutoPolicy"]);function Bb({stageKey:e}){return e?e==="Zip"?l.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:"No credit card required."}):e==="Email"?l.jsxs("div",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left space-y-1",children:[l.jsx("p",{children:"We'll send your quotes and updates here, and save your progress so you can return anytime."}),l.jsx("p",{children:l.jsx(Ac,{})})]}):$b.has(e)?l.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"?l.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"?l.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:"You'll receive a text from Credify shortly."}):Fb.has(e)?l.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:l.jsx(Ac,{})}):null:null}const sr={};function Rb(e){let t=sr[e];return t||(t=new Set,sr[e]=t),t}function Tc(e,t){Rb(e).add(t)}function kc(e,t){sr[e]?.delete(t)}function wt(e,...t){const r=sr[e];if(!r||r.size===0)return;const n=t[0],o={quoteId:fn(),timestamp:Date.now()};for(const i of[...r])try{i(n,o)}catch(s){Rr(s,{tags:{source:"widget-event-listener",event:e}})}}function Ub(){for(const e of Object.keys(sr))delete sr[e]}function Hb(){wt("widgetOpened")}function Ic(){wt("widgetClosed")}function zb(e){wt("stageViewed",e)}function Nc(e){wt("stageCompleted",e)}function jb(){wt("flowCompleted")}function Wb(e){wt("ratesViewed",e)}function qb(){wt("ratesBack")}function Er(e){wt("submissionFailed",e)}const Oc=new Set(["Disabled","Retired","Unemployed","Other"]);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!Oc.has(i)}function Zb(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!Oc.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 Dc(e,t){return Mc(e)?"Yes":t}function Pc(e){return typeof e=="number"&&Number.isFinite(e)?e:typeof e=="string"&&e.trim()!==""&&!Number.isNaN(Number(e))?Number(e):null}function Lc(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 xc(e,t){const r=Pc(e),n=Pc(t);if(r!=null&&n!=null)return r-n;const o=Lc(e),i=Lc(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 Fc(e,t,r){switch(t){case"equals":return e===r;case"notEquals":return e!==r&&e!==""&&e!=null;case"lessThan":{const n=xc(e,r);return n!=null&&n<0}case"greaterThan":{const n=xc(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 Vb=new Set(["auto_prior_years","auto_prior_months","auto_continuous_coverage_years"]);function Ko(e,t,r){const n=So([...e]),o=Uo(n),i=[],s=a=>{a.forEach(c=>{if(!un(c,t,o)||!Gb(c,t)||!ln(c,t,r))return;const u=String(c.key);if(Fa(u,r,t)){const h=o.currentCarrierKey?t[o.currentCarrierKey]:void 0;if(!(h&&h!=="NoPriorInsurance"&&tr(t,o)&&Vb.has(u)))return}Mc(c)||i.push(c);const d=Dc(c,t[u]),f=c.conditionals??[];if(!f.length)return;const m=f.filter(h=>Fc(d,h.conditionalType,h.conditionalValue));(m.length>1&&!m.some(h=>h.conditionalQuestionsAllowMultiple)?m.slice(0,1):m).forEach(h=>{const b=h.conditionalQuestions??[];b.length&&(h.conditionalQuestionsAllowMultiple||s(b))})})};return s(n),i}const $c="__items",Jo=e=>`${e}${$c}`;function Kb(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 Qo(e,t,r=[],n=void 0,o=t){for(const i of e){const s=String(i.key),a=Dc(i,t[s]),c=i.conditionals??[];if(!c.length)continue;const u=c.filter(f=>Fc(a,f.conditionalType,f.conditionalValue)),d=u.length>1&&!u.some(f=>f.conditionalQuestionsAllowMultiple)?u.slice(0,1):u;for(const f of d){const m=f.conditionalQuestions??[];if(!m.length)continue;if(!f.conditionalQuestionsAllowMultiple){if(Qo(m,t,r,n,o))return!0;continue}const _=t[Jo(s)]??[];if(_.length===0)return!0;for(const[h,b]of _.entries()){const W=[...r,Jo(s),h],x=Ko(m,b,n).filter(z=>!(Kb(z,W)||!Zb(z,b))),B={state:o.state,...b},M=an(x,B);if(Object.values(M).some(Boolean)||Qo(m,b,W,n,o))return!0}}}return!1}function Bc(e,t,r){return Qo(e,t,[],r,t)}function Rc(e){const t=e.vehicles__items??[];if(!Array.isArray(t)||t.length===0)return!1;for(const r of t)if(bt(r.vehicle_comp_deductible,"select")||bt(r.vehicle_coll_deductible,"select")||bt(r.vehicle_towing_and_labor,"select")||bt(r.vehicle_transportation_expense,"select"))return!0;return!1}function Jb({stages:e,onStageComplete:t,onComplete:r,initialValues:n,initialActive:o,quoteId:i,nonTerminalStageKeys:s}){const[a,c]=y.useState(o??0),[u,d]=y.useState(n??{}),[f,m]=y.useState({}),[_,h]=y.useState(!1),[b,W]=y.useState(!1),[x,B]=y.useState(null),M=y.useRef([]),z=y.useRef(e),C=Array.isArray(e)&&e.length>0,H=C?Math.min(a,e.length-1):0,Y=C?e[H]:null,R=Y?.key??null;y.useEffect(()=>{o!==void 0&&c(o)},[o]),z.current=e;const ee=y.useMemo(()=>{const L=H>=e.length-1;return L&&R&&s?.has(R)?!1:!!(L||e.slice(H+1).every(me=>me.key==="AutoPolicy")&&(u.drivers__items??[]).length<=1)},[H,e,u,R,s]);y.useEffect(()=>{C&&a>=e.length&&c(e.length-1)},[a,e.length,C]),y.useEffect(()=>{const L=M.current[H];L&&L.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[H]),y.useEffect(()=>{n!==void 0&&d(n)},[n]),y.useEffect(()=>{if(!Y||!R){h(!1),B(null);return}if(f[R]){h(!1),B(null);return}let L=!1;return h(!0),B(null),Promise.resolve(Y.loadQuestions()).then(Q=>{if(!L){if(!Array.isArray(Q))throw new Error(`loadQuestions("${R}") did not return an array`);m(me=>({...me,[R]:Q}))}}).catch(Q=>{L||B(`Failed to load stage "${Y?.title??""}": ${Q?.message??"Unknown error"}`)}).finally(()=>{L||h(!1)}),()=>{L=!0}},[Y,R,f]);const te=R?f[R]:void 0,oe=y.useMemo(()=>Uo(So(te??[])),[te]);y.useEffect(()=>{Y&&R&&te&&zb({stageKey:R,stageTitle:Y.title??R,stepIndex:a+1,totalSteps:e.length})},[R,a,e.length,Y,te]);const ve=y.useMemo(()=>{if(!te)return{};const L={};(D=>{const F=[],w=g=>{g.forEach((p,v)=>{const E=gr(p,v);F.push(E);const k=Jo(E);F.push(k),(p.conditionals??[]).forEach(I=>{const P=I.conditionalQuestions??[];P.length>0&&w(P)})})};return w(D),F})(te).forEach(D=>{D in u&&(L[D]=u[D])});for(const D of["state","State","address","product"])D in u&&(L[D]=u[D]);for(const[D,F]of Object.entries(u))D.endsWith($c)&&!(D in L)&&(L[D]=F);return L},[te,u]),Pe=L=>{d(Q=>({...Q,...L}))},Ee=()=>{c(L=>L>0?L-1:0),document.querySelector(".panel-body")?.scrollTo({top:0,behavior:"instant"})},J=async()=>{if(!te||!Y||_||x||b)return;const L=Ko(te,ve,R??void 0),Q=yr(u,oe),me=L.map(I=>dn(I,oe)?{...I,required:Q}:I),D=an(me,ve),F=new Set(me.map((I,P)=>gr(I,P))),w=Object.entries(D).some(([I,P])=>P&&F.has(I)),g=Bc(te,u,R??void 0),v=L.some(I=>String(I.key??"")==="vehicle_policy_selections")?Rc(u):!1,E=u.driver_vehicle_assignments,k=u.drivers__items??[];let O=!1;if(E&&k.length>=2){const I=u.vehicles__items??[];for(let P=0;P<I.length;P++){const A=E[`v${P}`];if(!A)continue;const T=k.map((Z,re)=>A[`d${re}`]??0),N=T.filter(Z=>Z>0);if(N.length>=2&&N.every(Z=>Z===50)){O=!0;break}const q=T.reduce((Z,re)=>Z+re,0);if(q>0&&q!==100){O=!0;break}}}if(!(w||g||v||O)){W(!0);try{const I=ee,P=I?await r(u,R??""):await t(ve,R??""),{success:A,error:T}=P;if(!A){B(T??"An error occurred");return}if(!I){const N=P.latestStages??z.current,q=N.findIndex(re=>re.key===R),Z=q>=0?Math.min(q+1,N.length-1):Math.min(a+1,N.length-1);c(Z)}}finally{W(!1)}}},V=y.useMemo(()=>{if(!te||_||x||b)return!0;const L=Ko(te,ve,R??void 0),Q=yr(u,oe),me=L.map(I=>dn(I,oe)?{...I,required:Q}:I),D=an(me,ve),F=new Set(me.map((I,P)=>gr(I,P))),w=Object.entries(D).some(([I,P])=>P&&F.has(I)),g=Bc(te,u,R??void 0),v=L.some(I=>String(I.key??"")==="vehicle_policy_selections")?Rc(u):!1,E=u.driver_vehicle_assignments,k=u.drivers__items??[];let O=!1;if(E&&k.length>=2){const I=u.vehicles__items??[];for(let P=0;P<I.length;P++){const A=E[`v${P}`];if(!A)continue;const T=k.map((Z,re)=>A[`d${re}`]??0),N=T.filter(Z=>Z>0);if(N.length>=2&&N.every(Z=>Z===50)){O=!0;break}const q=T.reduce((Z,re)=>Z+re,0);if(q>0&&q!==100){O=!0;break}}}return w||g||v||O},[te,ve,u,_,x,b,oe,R]);return C?l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"form-wizard-steps-header flex items-center justify-between gap-4",children:[l.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((L,Q)=>[l.jsx("li",{ref:me=>{M.current[Q]=me},className:`form-wizard-step-pill px-2.5 py-1 rounded-full border whitespace-nowrap flex-shrink-0 ${Q<H?"bg-blue-600 text-white border-blue-600":Q===H?"border-blue-600 text-blue-600 bg-white":"border-slate-200 text-slate-600"}`,children:L.title},L.key??`stage-${Q}`),...Q<e.length-1?[l.jsx("li",{className:"form-wizard-step-arrow text-slate-400 flex-shrink-0",children:"→"},`arrow-${L.key??Q}`)]:[]])}),l.jsxs("div",{className:"form-wizard-step-counter text-sm text-slate-500 flex-shrink-0",children:[H+1," / ",e.length]})]}),l.jsxs("div",{children:[_&&l.jsx("div",{className:"text-slate-500",children:"Loading…"}),Y&&l.jsx(Pb,{questions:te??[],controlledValues:ve,onChangeValues:Pe,onSubmit:()=>J(),quoteId:i,widgetStageKey:R??void 0},Y.key)]}),!_&&x&&l.jsxs("div",{className:"text-red-600 text-sm -mt-4",children:[l.jsx("div",{children:x}),Y&&l.jsx("button",{type:"button",className:"credify-retry-btn underline mt-1 font-bold",onClick:()=>{m(L=>{if(!R)return L;const Q={...L};return delete Q[R],Q})},children:"Retry"})]}),l.jsx(Bb,{stageKey:R}),l.jsxs("div",{className:H>0?"grid grid-cols-2 gap-3":"",children:[H>0&&l.jsx("button",{type:"button",onClick:Ee,disabled:_,className:"credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition",children:"Back"}),l.jsxs("button",{type:"button","data-widget-ctrl":"next",onClick:J,disabled:V,className:["form-wizard-next-btn",H>0?"":"w-full","h-12 rounded-full text-white transition","disabled:opacity-50 disabled:cursor-not-allowed","flex items-center justify-center gap-2",V?"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&&l.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:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.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"]})]})]}):l.jsx("div",{className:"text-slate-600",children:"Loading..."})}const Uc={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"}},Hc=["#0369A1","#1D4ED8","#0F766E","#7C3AED","#B45309","#DC2626","#0891B2","#9333EA"];function Qb(e){return e.replace(/[^A-Za-z0-9]/g,"").slice(0,3).toUpperCase()||"CAR"}function zc(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/_/g," ").trim()}function Bt(e){if(!e)return e;const t=Uc[e];return t?t.name:zc(e)}function Xb(e){const t=new Set,r=[];return e.forEach((n,o)=>{const s=Uc[n]??{name:zc(n),abbr:Qb(n),color:Hc[o%Hc.length]};t.has(s.name)||(t.add(s.name),r.push(s))}),r}function ev(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),Xb(r)}const tv="https://getcredify.com/privacy-policy";function rv({acknowledged:e,onChange:t,disabled:r=!1}){return l.jsx("div",{className:"privacy-notice-ack rounded-xl border border-slate-200 bg-slate-50 p-4","data-testid":"privacy-notice-acknowledgment",children:l.jsx(qr,{id:"privacy-notice-ack-checkbox",className:"privacy-notice-ack-checkbox",checked:e,onChange:n=>t(n.target.checked),disabled:r,label:l.jsxs(l.Fragment,{children:["I acknowledge I have received Credify’s"," ",l.jsx("a",{href:tv,target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Notice"}),"."]})})})}function nv({carrierName:e,formattedPremium:t,lobLabel:r,acknowledged:n,onAcknowledgeChange:o,onCancel:i,onProceed:s,isProcessing:a,hasError:c}){const u=!n||a;return l.jsxs("div",{className:"bind-confirmation","data-testid":"bind-confirmation",role:"group","aria-label":"Confirm your bind request",children:[l.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Confirm your bind request"}),l.jsxs("div",{className:"mt-4 rounded-xl border border-slate-200 bg-white p-4",children:[r&&l.jsx("div",{className:"mb-1 text-xs font-semibold uppercase tracking-wide text-slate-500",children:r}),l.jsx("p",{className:"font-semibold text-slate-900",children:e}),l.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:[t,l.jsx("span",{className:"ml-1 text-sm font-medium text-slate-500",children:"/month"})]})]}),l.jsx("div",{className:"mt-4",children:l.jsx(rv,{acknowledged:n,onChange:o,disabled:a})}),c&&l.jsx("p",{className:"mt-3 text-sm text-red-600",role:"alert",children:"Something went wrong while processing your bind request. Please try again."}),l.jsxs("div",{className:"mt-6 grid grid-cols-2 gap-3",children:[l.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"}),l.jsxs("button",{type:"button","data-testid":"bind-confirmation-proceed",onClick:s,disabled:u,className:["h-12 rounded-full text-white font-bold transition","flex items-center justify-center gap-2","disabled:cursor-not-allowed",u?"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&&l.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:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.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 jc=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"});function Wc(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 yn={PersonalHome:"Homeowners",PersonalAuto:"Personal Auto",Flood:"Flood",ExcessFlood:"Excess Flood",_other:"Other"},bn=["PersonalHome","PersonalAuto","Flood","ExcessFlood"];function ov(e){if(e.length===0)return[];const t=(n,o)=>Bt(n.carrier_name).localeCompare(Bt(o.carrier_name));if(!e.some(n=>n.lob))return[{lob:null,title:"Not Quoted",rates:[...e].sort(t)}];const r=new Map;for(const n of e){const o=n.lob||"_other",i=r.get(o);i?i.push(n):r.set(o,[n])}return[...r.entries()].sort(([n],[o])=>{const i=bn.indexOf(n),s=bn.indexOf(o);return(i===-1?999:i)-(s===-1?999:s)}).map(([n,o])=>({lob:n,title:yn[n]??n,rates:[...o].sort(t)}))}function qc({onBack:e}){const t=()=>{qb(),e?.()};return l.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 iv({rate:e,status:t,onRequestBind:r,disabled:n,showLobLabel:o=!0,className:i}){const s=Wc(e)/100,a=jc.format(s),c=t==="loading",u=t==="success",d=!!n||c||u,f=!!(e.effective_date&&e.policy_end_date),m=e.lob?yn[e.lob]||e.lob:null,_=(e.coverages??[]).filter(h=>!!h&&typeof h.label=="string"&&h.label.trim()!==""&&typeof h.value=="string"&&h.value.trim()!=="");return l.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&&m&&l.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-slate-500",children:m}),l.jsxs("div",{className:"mb-4 flex flex-col items-start gap-2",children:[e.carrier_logo_base64?l.jsx("img",{src:`data:image/png;base64,${e.carrier_logo_base64}`,alt:Bt(e.carrier_name),className:"h-12 w-auto max-w-full object-contain"}):l.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:Bt(e.carrier_name).charAt(0).toUpperCase()}),l.jsx("h4",{className:"w-full break-words text-left font-semibold text-slate-900",children:Bt(e.carrier_name)})]}),l.jsx("div",{className:"mb-2",children:l.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:[a,l.jsx("span",{className:"ml-1 text-sm font-medium text-slate-500",children:"/month"})]})}),f&&l.jsx("div",{className:"mb-2",children:l.jsxs("p",{className:"text-xs text-slate-500",children:["Effective ",e.effective_date," - ",e.policy_end_date]})}),e.carrier_quote_id&&l.jsx("div",{className:"mb-4",children:l.jsxs("p",{className:"text-xs text-slate-400",children:["Quote ID: ",e.carrier_quote_id]})}),_.length>0&&l.jsx("div",{className:"mb-2 border-t border-slate-200 pt-3",children:l.jsx("dl",{children:_.map((h,b)=>l.jsxs("div",{className:"flex items-baseline justify-between gap-2 py-1",children:[l.jsx("dt",{className:"text-xs text-slate-600",children:h.label}),l.jsx("dd",{className:"text-right text-xs font-semibold text-slate-900",children:h.value})]},`${h.label}-${b}`))})}),l.jsxs("div",{className:"mt-auto pt-4",children:[l.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 ${u?"rates-bind-btn-requested":"hover:bg-blue-600/90 disabled:bg-slate-300 disabled:text-slate-500"}`,children:c?"Requesting…":u?"Requested":"Request Bind"}),t==="error"&&l.jsx("p",{className:"mt-2 text-xs text-red-600",children:"Something went wrong. Please try again."}),t==="success"&&l.jsx("p",{className:"mt-2 text-xs text-emerald-600",children:"We received your bind request."})]})]})}function sv({item:e}){const t=Bt(e.carrier_name),r=(e.decline_reasons??[]).filter(Boolean);return l.jsxs("div",{className:"flex w-full gap-4 rounded-xl border border-slate-200 bg-white p-4 shadow-sm",children:[l.jsx("div",{className:"shrink-0",children:e.carrier_logo_base64?l.jsx("img",{src:`data:image/png;base64,${e.carrier_logo_base64}`,alt:t,className:"h-10 w-auto max-w-[7rem] object-contain"}):l.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-md bg-slate-100 text-sm font-semibold text-slate-500",children:t.charAt(0).toUpperCase()})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("div",{className:"flex flex-wrap items-center gap-2",children:l.jsx("h4",{className:"break-words font-semibold text-slate-900",children:t})}),r.length>0?l.jsx("ul",{className:"mt-2 list-disc space-y-1 pl-5 text-sm text-slate-600",children:r.map((n,o)=>l.jsx("li",{children:n},o))}):l.jsx("p",{className:"mt-2 text-sm text-slate-500",children:"This carrier did not return a quote."})]})]})}function av({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"),[u,d]=y.useState(!1),[f,m]=y.useState(null),[_,h]=y.useState(!1),b=y.useMemo(()=>n.some(D=>D.lob==="PersonalAuto"),[n]),W=y.useMemo(()=>n.some(D=>D.lob==="PersonalHome"),[n]),x=y.useMemo(()=>{if(!r)return[];const D=[];return b&&D.push("PersonalAuto"),W&&D.push("PersonalHome"),D},[r,b,W]),B=y.useMemo(()=>{const D=new Set;for(const F of n){const w=F.lob??null;w&&i[F.quote_rate_id]==="success"&&D.add(w)}return D},[n,i]),M=y.useMemo(()=>Object.values(i).some(D=>D==="success"),[i]),z=y.useMemo(()=>u?!0:!r||x.length===0?M:x.every(D=>B.has(D)),[u,r,M,x,B]),C=y.useMemo(()=>o?n.filter(D=>(D.admitted_status??"admitted")==="admitted"):[],[n,o]),H=y.useMemo(()=>o?n.filter(D=>D.admitted_status==="non_admitted"):[],[n,o]),Y=y.useMemo(()=>o?n.filter(D=>D.admitted_status==="not_quoted"):[],[n,o]),R=C.length,ee=H.length,te=Y.length,oe=R+ee>0,ve=oe||te>0,Pe=y.useMemo(()=>ov(Y),[Y]);y.useEffect(()=>{ve&&a==="admitted"&&R===0&&(ee>0?c("non_admitted"):te>0&&c("not_quoted"))},[a,R,ee,te,ve]);const Ee=y.useMemo(()=>oe?a==="admitted"?C:a==="non_admitted"?H:[]:[],[oe,a,C,H]);y.useEffect(()=>{qo()},[]),y.useEffect(()=>{!z||u||(q0(),pc(),d(!0))},[z,u]);const J=y.useMemo(()=>{if(Ee.length===0)return[];if(!Ee.some(g=>g.lob))return[{lob:null,title:"Rates",rates:[...Ee].sort((p,v)=>{const E=Number.isFinite(p.term_months)&&p.term_months>0?p.term_months:1,k=Number.isFinite(v.term_months)&&v.term_months>0?v.term_months:1,O=p.monthly_premium_cents??Math.round((p.premium_cents||0)/E),I=v.monthly_premium_cents??Math.round((v.premium_cents||0)/k);return O-I})}];const F=new Map;for(const g of Ee){const p=g.lob||"_other",v=F.get(p);v?v.push(g):F.set(p,[g])}return[...F.entries()].sort(([g],[p])=>{const v=bn.indexOf(g),E=bn.indexOf(p);return(v===-1?999:v)-(E===-1?999:E)}).map(([g,p])=>({lob:g,title:yn[g]??g,rates:[...p].sort((v,E)=>{const k=Number.isFinite(v.term_months)&&v.term_months>0?v.term_months:1,O=Number.isFinite(E.term_months)&&E.term_months>0?E.term_months:1,I=v.monthly_premium_cents??Math.round((v.premium_cents||0)/k),P=E.monthly_premium_cents??Math.round((E.premium_cents||0)/O);return I-P})}))},[Ee]),V=y.useMemo(()=>{if(!r)return[];const D=n.some(g=>g.lob==="PersonalAuto"),F=n.some(g=>g.lob==="PersonalHome"),w=[];return D||w.push("Sorry, no rates found for Personal Auto."),F||w.push("Sorry, no rates found for Homeowners."),w},[r,n]);if(!ve)return l.jsxs("section",{className:"mt-8",children:[l.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Rates"}),l.jsx("p",{className:"mt-2 text-sm text-slate-500",children:"Sorry, no rates are available at this time."}),t&&l.jsx(qc,{onBack:t})]});const L=D=>{s(F=>({...F,[D.quote_rate_id]:"idle"})),h(!1),m({cardKey:D.quote_rate_id,rate:D})},Q=()=>{m(null),h(!1)},me=async()=>{if(!f||!_)return;const D=f.cardKey;s(F=>({...F,[D]:"loading"}));try{if(qo(),!or())throw new Error("Authentication required. Please verify your phone number first.");if(!((await yb(D,!0))?.success!==!1))throw new Error("Request failed");s(p=>({...p,[D]:"success"})),m(null),h(!1)}catch{s(F=>({...F,[D]:"error"}))}};if(f){const D=f.rate.lob?yn[f.rate.lob]||f.rate.lob:null;return l.jsx("section",{className:"mt-8",children:l.jsx(nv,{carrierName:Bt(f.rate.carrier_name),formattedPremium:jc.format(Wc(f.rate)/100),lobLabel:D,acknowledged:_,onAcknowledgeChange:h,onCancel:Q,onProceed:me,isProcessing:i[f.cardKey]==="loading",hasError:i[f.cardKey]==="error"})})}return l.jsxs("section",{className:"mt-8",children:[l.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Rates"}),V.length>0&&l.jsx("div",{className:"mt-3 space-y-1",children:V.map(D=>l.jsx("p",{className:"text-sm text-slate-600",children:D},D))}),l.jsx("div",{className:"mt-4 border-b border-slate-200",children:l.jsxs("div",{className:"flex items-center gap-6",children:[l.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 (",R,")"]}),l.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 (",ee,")"]}),te>0&&l.jsxs("button",{type:"button",onClick:()=>c("not_quoted"),className:`border-b-2 px-1 py-2 text-sm font-semibold transition ${a==="not_quoted"?"border-cyan-500 text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Not Quoted (",te,")"]})]})}),a==="not_quoted"?Pe.map(D=>l.jsxs("div",{className:"mt-6",children:[D.lob!=null&&l.jsx("h4",{className:"mb-3 text-base font-semibold text-slate-800",children:D.title}),l.jsx("div",{className:"space-y-3",children:D.rates.map(F=>l.jsx(sv,{item:F},F.quote_rate_id))})]},D.lob??"all")):l.jsxs(l.Fragment,{children:[Ee.length===0&&l.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."}),Ee.length>0&&J.map(D=>l.jsxs("div",{className:"mt-6",children:[l.jsx("h4",{className:"mb-3 text-base font-semibold text-slate-800",children:D.title}),l.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:D.rates.map(F=>l.jsx("div",{className:"w-full min-w-0",children:l.jsx(iv,{rate:F,showLobLabel:D.lob==null,status:i[F.quote_rate_id]??"idle",disabled:z||(r?!!(F.lob&&x.includes(F.lob)&&B.has(F.lob)):M),onRequestBind:()=>L(F)})},F.quote_rate_id))})]},D.lob??"all"))]}),t&&l.jsx(qc,{onBack:t})]})}const Xo=["Validating your details...","Checking underwriting rules...","Applying eligible discounts...","Reviewing your risk profile...","Calculating premium...","Check complete"],Gc={Auto:{label:"Auto Policy",icon:"🚗",accent:"#0369A1"},Home:{label:"Home Policy",icon:"🏠",accent:"#059669"},Bundle:{label:"Home + Auto Bundle",icon:"🔗",accent:"#7C3AED"}},Zc={Auto:6e4,Home:9e4,Bundle:12e4};function cv({progress:e,color:t,size:r=80}){const n=(r-10)/2,o=2*Math.PI*n,i=o-e/100*o;return l.jsxs("svg",{width:r,height:r,style:{transform:"rotate(-90deg)"},children:[l.jsx("circle",{cx:r/2,cy:r/2,r:n,fill:"none",stroke:"#F1F5F9",strokeWidth:6}),l.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 lv({providers:e=[],totalTime:t=6e4,flow:r="Auto",isComplete:n=!1,onComplete:o}){const i=Gc[r]??Gc.Auto,s=Zc[r]??Zc.Auto,a=e.length>0?Math.floor(s/e.length):t,[c,u]=y.useState(0),[d,f]=y.useState(0),[m,_]=y.useState(0),[h,b]=y.useState(0),[W,x]=y.useState(!0),B=y.useRef(n),M=y.useRef(o),z=y.useRef(c),C=y.useRef(e.length),H=y.useRef(!1),Y=y.useRef(!1);y.useEffect(()=>{B.current=n,n&&e.length===0&&!H.current&&(H.current=!0,M.current?.())},[n,e.length]),y.useEffect(()=>{M.current=o},[o]),y.useEffect(()=>{z.current=c},[c]),y.useEffect(()=>{C.current=e.length,e.length>0&&(Y.current=!1,u(0),f(0),_(0),b(0),x(!0))},[e.length]),y.useEffect(()=>{if(e.length===0){B.current&&!H.current&&(H.current=!0,M.current?.());return}Y.current=!1;const oe=100,ve=100/(a/oe),Pe=setInterval(()=>{_(Ee=>{if(Y.current||H.current)return Ee;const J=Ee+ve;return J<100?J:(Y.current=!0,setTimeout(()=>{if(B.current){if(H.current)return;H.current=!0,M.current?.();return}const L=z.current===C.current-1;x(!1),setTimeout(()=>{L?(u(0),f(Q=>Q+1)):u(Q=>Q+1),_(0),b(0),x(!0)},300)},400),100)})},oe);return()=>clearInterval(Pe)},[c,a,e.length]),y.useEffect(()=>{if(e.length===0)return;const oe=Math.floor(a/Xo.length),ve=setInterval(()=>b(Pe=>Math.min(Pe+1,Xo.length-1)),oe);return()=>clearInterval(ve)},[c,a,e.length]);const R=e.length===0,ee=R?null:e[Math.min(c,e.length-1)],te=d>0;return l.jsxs(l.Fragment,{children:[l.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 u=e.external.registry.get(s[0])?.id;if(t!==s[0]&&u){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 Ca(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,u={...c},d=a.ref;if(a.ref=null,d){n(d);const _=e.seen.get(d),h=_.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(h)):Object.assign(c,h),Object.assign(c,u),s._zod.parent===d)for(const y in c)y==="$ref"||y==="allOf"||y in u||delete c[y];if(h.$ref&&_.def)for(const y in c)y==="$ref"||y==="allOf"||y in _.def&&JSON.stringify(c[y])===JSON.stringify(_.def[y])&&delete c[y]}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 h in c)h==="$ref"||h==="allOf"||h in _.def&&JSON.stringify(c[h])===JSON.stringify(_.def[h])&&delete c[h]}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:rn(t,"input",e.processors),output:rn(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function Fe(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 Fe(n.element,r);if(n.type==="set")return Fe(n.valueType,r);if(n.type==="lazy")return Fe(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 Fe(n.innerType,r);if(n.type==="intersection")return Fe(n.left,r)||Fe(n.right,r);if(n.type==="record"||n.type==="map")return Fe(n.keyType,r)||Fe(n.valueType,r);if(n.type==="pipe")return Fe(n.in,r)||Fe(n.out,r);if(n.type==="object"){for(const o in n.shape)if(Fe(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(const o of n.options)if(Fe(o,r))return!0;return!1}if(n.type==="tuple"){for(const o of n.items)if(Fe(o,r))return!0;return!!(n.rest&&Fe(n.rest,r))}return!1}const Xh=(e,t={})=>r=>{const n=Ea({...r,processors:t});return Ne(e,n),wa(n,e),Ca(n,e)},rn=(e,t,r={})=>n=>{const{libraryOptions:o,target:i}=n??{},s=Ea({...o??{},target:i,io:t,processors:r});return Ne(e,s),wa(s,e),Ca(s,e)},eg={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},tg=(e,t,r,n)=>{const o=r;o.type="string";const{minimum:i,maximum:s,format:a,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),a&&(o.format=eg[a]??a,o.format===""&&delete o.format,a==="time"&&delete o.format),u&&(o.contentEncoding=u),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}))])}},rg=(e,t,r,n)=>{const o=r,{minimum:i,maximum:s,format:a,multipleOf:c,exclusiveMaximum:u,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 u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=u,o.exclusiveMaximum=!0):o.exclusiveMaximum=u),typeof s=="number"&&(o.maximum=s,typeof u=="number"&&t.target!=="draft-04"&&(u<=s?delete o.maximum:delete o.exclusiveMaximum)),typeof c=="number"&&(o.multipleOf=c)},ng=(e,t,r,n)=>{r.type="boolean"},og=(e,t,r,n)=>{r.not={}},ig=(e,t,r,n)=>{},sg=(e,t,r,n)=>{const o=e._zod.def,i=Hs(o.entries);i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),r.enum=i},ag=(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},cg=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},lg=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},ug=(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=Ne(i.element,t,{...n,path:[...n.path,"items"]})},dg=(e,t,r,n)=>{const o=r,i=e._zod.def;o.type="object",o.properties={};const s=i.shape;for(const u in s)o.properties[u]=Ne(s[u],t,{...n,path:[...n.path,"properties",u]});const a=new Set(Object.keys(s)),c=new Set([...a].filter(u=>{const d=i.shape[u]._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=Ne(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},fg=(e,t,r,n)=>{const o=e._zod.def,i=o.inclusive===!1,s=o.options.map((a,c)=>Ne(a,t,{...n,path:[...n.path,i?"oneOf":"anyOf",c]}));i?r.oneOf=s:r.anyOf=s},pg=(e,t,r,n)=>{const o=e._zod.def,i=Ne(o.left,t,{...n,path:[...n.path,"allOf",0]}),s=Ne(o.right,t,{...n,path:[...n.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,c=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];r.allOf=c},mg=(e,t,r,n)=>{const o=e._zod.def,i=Ne(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"}]},_g=(e,t,r,n)=>{const o=e._zod.def;Ne(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},hg=(e,t,r,n)=>{const o=e._zod.def;Ne(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType,r.default=JSON.parse(JSON.stringify(o.defaultValue))},gg=(e,t,r,n)=>{const o=e._zod.def;Ne(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)))},yg=(e,t,r,n)=>{const o=e._zod.def;Ne(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},bg=(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;Ne(i,t,n);const s=t.seen.get(e);s.ref=i},vg=(e,t,r,n)=>{const o=e._zod.def;Ne(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType,r.readOnly=!0},Aa=(e,t,r,n)=>{const o=e._zod.def;Ne(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},Sg=E("ZodISODateTime",(e,t)=>{C_.init(e,t),be.init(e,t)});function Eg(e){return Nh(Sg,e)}const wg=E("ZodISODate",(e,t)=>{A_.init(e,t),be.init(e,t)});function Cg(e){return Oh(wg,e)}const Ag=E("ZodISOTime",(e,t)=>{T_.init(e,t),be.init(e,t)});function Tg(e){return Mh(Ag,e)}const kg=E("ZodISODuration",(e,t)=>{k_.init(e,t),be.init(e,t)});function Ig(e){return Dh(kg,e)}const Je=E("ZodError",(e,t)=>{Zs.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>hm(e,r)},flatten:{value:r=>_m(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Eo,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Eo,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Ng=ko(Je),Og=Io(Je),Mg=Kr(Je),Dg=Jr(Je),Pg=bm(Je),Lg=vm(Je),xg=Sm(Je),Fg=Em(Je),$g=wm(Je),Bg=Cm(Je),Ug=Am(Je),Hg=Tm(Je),Se=E("ZodType",(e,t)=>(ve.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:rn(e,"input"),output:rn(e,"output")}}),e.toJSONSchema=Xh(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)=>ht(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>Ng(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Mg(e,r,n),e.parseAsync=async(r,n)=>Og(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Dg(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>Pg(e,r,n),e.decode=(r,n)=>Lg(e,r,n),e.encodeAsync=async(r,n)=>xg(e,r,n),e.decodeAsync=async(r,n)=>Fg(e,r,n),e.safeEncode=(r,n)=>$g(e,r,n),e.safeDecode=(r,n)=>Bg(e,r,n),e.safeEncodeAsync=async(r,n)=>Ug(e,r,n),e.safeDecodeAsync=async(r,n)=>Hg(e,r,n),e.refine=(r,n)=>e.check(Fy(r,n)),e.superRefine=r=>e.check($y(r)),e.overwrite=r=>e.check(er(r)),e.optional=()=>Pa(e),e.exactOptional=()=>wy(e),e.nullable=()=>La(e),e.nullish=()=>Pa(La(e)),e.nonoptional=r=>Ny(e,r),e.array=()=>fy(e),e.or=r=>Ma([e,r]),e.and=r=>gy(e,r),e.transform=r=>Fa(e,Sy(r)),e.default=r=>Ty(e,r),e.prefault=r=>Iy(e,r),e.catch=r=>My(e,r),e.pipe=r=>Fa(e,r),e.readonly=()=>Ly(e),e.describe=r=>{const n=e.clone();return yr.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return yr.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return yr.get(e);const n=e.clone();return yr.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),Ta=E("_ZodString",(e,t)=>{No.init(e,t),Se.init(e,t),e._zod.processJSONSchema=(n,o,i)=>tg(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(Bh(...n)),e.includes=(...n)=>e.check(Rh(...n)),e.startsWith=(...n)=>e.check(zh(...n)),e.endsWith=(...n)=>e.check(jh(...n)),e.min=(...n)=>e.check(tn(...n)),e.max=(...n)=>e.check(va(...n)),e.length=(...n)=>e.check(Sa(...n)),e.nonempty=(...n)=>e.check(tn(1,...n)),e.lowercase=n=>e.check(Uh(n)),e.uppercase=n=>e.check(Hh(n)),e.trim=()=>e.check(qh()),e.normalize=(...n)=>e.check(Wh(...n)),e.toLowerCase=()=>e.check(Gh()),e.toUpperCase=()=>e.check(Zh()),e.slugify=()=>e.check(Vh())}),Rg=E("ZodString",(e,t)=>{No.init(e,t),Ta.init(e,t),e.email=r=>e.check(ch(zg,r)),e.url=r=>e.check(ph(jg,r)),e.jwt=r=>e.check(Ih(oy,r)),e.emoji=r=>e.check(mh(Wg,r)),e.guid=r=>e.check(ha(ka,r)),e.uuid=r=>e.check(lh(nn,r)),e.uuidv4=r=>e.check(uh(nn,r)),e.uuidv6=r=>e.check(dh(nn,r)),e.uuidv7=r=>e.check(fh(nn,r)),e.nanoid=r=>e.check(_h(qg,r)),e.guid=r=>e.check(ha(ka,r)),e.cuid=r=>e.check(hh(Gg,r)),e.cuid2=r=>e.check(gh(Zg,r)),e.ulid=r=>e.check(yh(Vg,r)),e.base64=r=>e.check(Ah(ty,r)),e.base64url=r=>e.check(Th(ry,r)),e.xid=r=>e.check(bh(Yg,r)),e.ksuid=r=>e.check(vh(Kg,r)),e.ipv4=r=>e.check(Sh(Jg,r)),e.ipv6=r=>e.check(Eh(Qg,r)),e.cidrv4=r=>e.check(wh(Xg,r)),e.cidrv6=r=>e.check(Ch(ey,r)),e.e164=r=>e.check(kh(ny,r)),e.datetime=r=>e.check(Eg(r)),e.date=r=>e.check(Cg(r)),e.time=r=>e.check(Tg(r)),e.duration=r=>e.check(Ig(r))});function gt(e){return ah(Rg,e)}const be=E("ZodStringFormat",(e,t)=>{he.init(e,t),Ta.init(e,t)}),zg=E("ZodEmail",(e,t)=>{__.init(e,t),be.init(e,t)}),ka=E("ZodGUID",(e,t)=>{p_.init(e,t),be.init(e,t)}),nn=E("ZodUUID",(e,t)=>{m_.init(e,t),be.init(e,t)}),jg=E("ZodURL",(e,t)=>{h_.init(e,t),be.init(e,t)}),Wg=E("ZodEmoji",(e,t)=>{g_.init(e,t),be.init(e,t)}),qg=E("ZodNanoID",(e,t)=>{y_.init(e,t),be.init(e,t)}),Gg=E("ZodCUID",(e,t)=>{b_.init(e,t),be.init(e,t)}),Zg=E("ZodCUID2",(e,t)=>{v_.init(e,t),be.init(e,t)}),Vg=E("ZodULID",(e,t)=>{S_.init(e,t),be.init(e,t)}),Yg=E("ZodXID",(e,t)=>{E_.init(e,t),be.init(e,t)}),Kg=E("ZodKSUID",(e,t)=>{w_.init(e,t),be.init(e,t)}),Jg=E("ZodIPv4",(e,t)=>{I_.init(e,t),be.init(e,t)}),Qg=E("ZodIPv6",(e,t)=>{N_.init(e,t),be.init(e,t)}),Xg=E("ZodCIDRv4",(e,t)=>{O_.init(e,t),be.init(e,t)}),ey=E("ZodCIDRv6",(e,t)=>{M_.init(e,t),be.init(e,t)}),ty=E("ZodBase64",(e,t)=>{D_.init(e,t),be.init(e,t)}),ry=E("ZodBase64URL",(e,t)=>{L_.init(e,t),be.init(e,t)}),ny=E("ZodE164",(e,t)=>{x_.init(e,t),be.init(e,t)}),oy=E("ZodJWT",(e,t)=>{$_.init(e,t),be.init(e,t)}),Ia=E("ZodNumber",(e,t)=>{na.init(e,t),Se.init(e,t),e._zod.processJSONSchema=(n,o,i)=>rg(e,n,o),e.gt=(n,o)=>e.check(ya(n,o)),e.gte=(n,o)=>e.check(Do(n,o)),e.min=(n,o)=>e.check(Do(n,o)),e.lt=(n,o)=>e.check(ga(n,o)),e.lte=(n,o)=>e.check(Mo(n,o)),e.max=(n,o)=>e.check(Mo(n,o)),e.int=n=>e.check(Na(n)),e.safe=n=>e.check(Na(n)),e.positive=n=>e.check(ya(0,n)),e.nonnegative=n=>e.check(Do(0,n)),e.negative=n=>e.check(ga(0,n)),e.nonpositive=n=>e.check(Mo(0,n)),e.multipleOf=(n,o)=>e.check(ba(n,o)),e.step=(n,o)=>e.check(ba(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}),iy=E("ZodNumberFormat",(e,t)=>{B_.init(e,t),Ia.init(e,t)});function Na(e){return Lh(iy,e)}const sy=E("ZodBoolean",(e,t)=>{U_.init(e,t),Se.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ng(e,r,n)});function ay(e){return xh(sy,e)}const cy=E("ZodUnknown",(e,t)=>{H_.init(e,t),Se.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ig()});function Oa(){return Fh(cy)}const ly=E("ZodNever",(e,t)=>{R_.init(e,t),Se.init(e,t),e._zod.processJSONSchema=(r,n,o)=>og(e,r,n)});function uy(e){return $h(ly,e)}const dy=E("ZodArray",(e,t)=>{z_.init(e,t),Se.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ug(e,r,n,o),e.element=t.element,e.min=(r,n)=>e.check(tn(r,n)),e.nonempty=r=>e.check(tn(1,r)),e.max=(r,n)=>e.check(va(r,n)),e.length=(r,n)=>e.check(Sa(r,n)),e.unwrap=()=>e.element});function fy(e,t){return Yh(dy,e,t)}const py=E("ZodObject",(e,t)=>{W_.init(e,t),Se.init(e,t),e._zod.processJSONSchema=(r,n,o)=>dg(e,r,n,o),de(e,"shape",()=>t.shape),e.keyof=()=>tr(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Oa()}),e.loose=()=>e.clone({...e._zod.def,catchall:Oa()}),e.strict=()=>e.clone({...e._zod.def,catchall:uy()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>um(e,r),e.safeExtend=r=>dm(e,r),e.merge=r=>fm(e,r),e.pick=r=>cm(e,r),e.omit=r=>lm(e,r),e.partial=(...r)=>pm(Da,e,r[0]),e.required=(...r)=>mm(xa,e,r[0])});function my(e,t){const r={type:"object",shape:e??{},...j(t)};return new py(r)}const _y=E("ZodUnion",(e,t)=>{q_.init(e,t),Se.init(e,t),e._zod.processJSONSchema=(r,n,o)=>fg(e,r,n,o),e.options=t.options});function Ma(e,t){return new _y({type:"union",options:e,...j(t)})}const hy=E("ZodIntersection",(e,t)=>{G_.init(e,t),Se.init(e,t),e._zod.processJSONSchema=(r,n,o)=>pg(e,r,n,o)});function gy(e,t){return new hy({type:"intersection",left:e,right:t})}const Po=E("ZodEnum",(e,t)=>{Z_.init(e,t),Se.init(e,t),e._zod.processJSONSchema=(n,o,i)=>sg(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 Po({...t,checks:[],...j(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 Po({...t,checks:[],...j(o),entries:i})}});function tr(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Po({type:"enum",entries:r,...j(t)})}const yy=E("ZodLiteral",(e,t)=>{V_.init(e,t),Se.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ag(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 by(e,t){return new yy({type:"literal",values:Array.isArray(e)?e:[e],...j(t)})}const vy=E("ZodTransform",(e,t)=>{Y_.init(e,t),Se.init(e,t),e._zod.processJSONSchema=(r,n,o)=>lg(e,r),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Bs(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(gr(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(gr(s))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function Sy(e){return new vy({type:"transform",transform:e})}const Da=E("ZodOptional",(e,t)=>{ua.init(e,t),Se.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Aa(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Pa(e){return new Da({type:"optional",innerType:e})}const Ey=E("ZodExactOptional",(e,t)=>{K_.init(e,t),Se.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Aa(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function wy(e){return new Ey({type:"optional",innerType:e})}const Cy=E("ZodNullable",(e,t)=>{J_.init(e,t),Se.init(e,t),e._zod.processJSONSchema=(r,n,o)=>mg(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function La(e){return new Cy({type:"nullable",innerType:e})}const Ay=E("ZodDefault",(e,t)=>{Q_.init(e,t),Se.init(e,t),e._zod.processJSONSchema=(r,n,o)=>hg(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ty(e,t){return new Ay({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ws(t)}})}const ky=E("ZodPrefault",(e,t)=>{X_.init(e,t),Se.init(e,t),e._zod.processJSONSchema=(r,n,o)=>gg(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Iy(e,t){return new ky({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ws(t)}})}const xa=E("ZodNonOptional",(e,t)=>{eh.init(e,t),Se.init(e,t),e._zod.processJSONSchema=(r,n,o)=>_g(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Ny(e,t){return new xa({type:"nonoptional",innerType:e,...j(t)})}const Oy=E("ZodCatch",(e,t)=>{th.init(e,t),Se.init(e,t),e._zod.processJSONSchema=(r,n,o)=>yg(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function My(e,t){return new Oy({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Dy=E("ZodPipe",(e,t)=>{rh.init(e,t),Se.init(e,t),e._zod.processJSONSchema=(r,n,o)=>bg(e,r,n,o),e.in=t.in,e.out=t.out});function Fa(e,t){return new Dy({type:"pipe",in:e,out:t})}const Py=E("ZodReadonly",(e,t)=>{nh.init(e,t),Se.init(e,t),e._zod.processJSONSchema=(r,n,o)=>vg(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Ly(e){return new Py({type:"readonly",innerType:e})}const xy=E("ZodCustom",(e,t)=>{oh.init(e,t),Se.init(e,t),e._zod.processJSONSchema=(r,n,o)=>cg(e,r)});function Fy(e,t={}){return Kh(xy,e,t)}function $y(e){return Jh(e)}const Lo={custom:"custom"};function Ae(e){return Ph(Ia,e)}const By=["additional_pip","tort_threshold","pip_coverage_type","extended_medical","policy_pip_deductible"],Uy=new Set([...By,"is_corporation"]);my({additional_pip:tr(["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:tr(["Verbal_Threshold","Zero_Threshold"]),pip_coverage_type:tr(["Primary","Secondary"]),extended_medical:tr(["cov1000","cov10000"]),policy_pip_deductible:tr(["cov250","cov500","cov1000","cov2000","cov2500"]),has_health_insurance_auto_accident:ay().nullable().optional()}).superRefine((e,t)=>{e.pip_coverage_type==="Secondary"&&e.has_health_insurance_auto_accident!==!0&&t.addIssue({code:Lo.custom,path:["pip_coverage_type"],message:"Secondary PIP coverage requires health insurance that covers auto accidents."})});const Hy=new Set(["Home","HomeConstruction","HomeFeatures","Demographics"]),Ry=new Set(["HomePolicy","BundlePolicy"]),zy=new Set(["HomeCustomer","BundleCustomer","Demographics"]);function on(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 $a(e){return e?on(e.state??e.State):!1}function Ba(e,t,r){return e==="has_health_insurance_auto_accident"?t==="BundleCustomer"||t==="Demographics"?!1:!$a(r):Uy.has(e)?!$a(r):e==="household_size"?!(t&&Hy.has(t)):e==="number_of_mortgagees"?!(t&&Ry.has(t)):(e==="has_co_applicant"||e==="co_applicant_middle_name"||e==="co_applicant_relationship")&&t&&zy.has(t)?!1:e==="multi_policy_discount"&&t==="HomePolicy"?!0:jy.has(e)}const jy=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"]),Ua=new Date().getUTCFullYear(),sn=gt().trim().min(1,"Required").regex(/^[A-Za-z\s]+$/,"Only alphabetic characters are allowed."),Ha=Ma([by(""),gt().trim().regex(/^[A-Za-z\s]*$/,"Only alphabetic characters are allowed.")]).optional(),Wy=(e,t,r)=>Ae({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.`),rr=(e,t)=>Ae({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.`),an=(e,t=1600)=>Ae({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(Ua,`${e} cannot be in the future.`),cn=e=>Ae({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.`),br=(e,t,r=0)=>{const n=Math.pow(10,t)-1,o=n.toLocaleString("en-US"),i=r.toLocaleString("en-US");return Ae({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.`)},qy={email:gt().trim().min(1,"Required").email("Please enter a valid email address."),phone:gt().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:gt().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:gt().trim().min(1,"Required").regex(/^\d{6}$/,"Please enter the 6-digit code."),first_name:sn,last_name:sn,middle_name:Ha,co_applicant_first_name:sn,co_applicant_last_name:sn,co_applicant_middle_name:Ha,year_built:an("Year built",1800),year_roof_updated:Ae({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:an("Heating update year"),plumbing_update_year:an("Plumbing update year"),electrical_update_year:an("Electrical update year"),total_area_sq_ft:Wy("Square footage",1,999999),sale_price_cents:Ae({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:cn("Number of years with your prior carrier"),home_continuous_coverage_years:cn("How long you have had continuous home coverage"),household_size:Ae({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:Ae({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:br("Replacement cost",9,1),other_structures_coverage:br("Other structures",9),personal_property_coverage:br("Personal property",7),loss_of_use_coverage:br("Loss of use coverage",8),years_at_address:Ae({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:Ae({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:Ae({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:Ae({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:Ae({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:Ae({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:Ae({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:br("Amount paid",7),license_number:gt().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:gt().superRefine((e,t)=>{if(typeof e!="string"||e.trim()==="")return;if(/\s/.test(e)){t.addIssue({code:Lo.custom,message:"VIN cannot contain spaces."});return}const r=e.trim();/^[A-HJ-NPR-Z0-9]{17}$/i.test(r)||t.addIssue({code:Lo.custom,message:"VIN must be exactly 17 letters and numbers (excluding I, O, and Q)."})}),annual_mileage:Ae({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:Ae({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:rr("Modifications value",9999999),cost_new_value_cents:rr("Cost new value",9999999),stated_value_amount_cents:rr("Stated Value Amount",9999999),property_damage_amount_paid_cents:rr("Property damage amount paid",9999999),personal_injury_amount_paid_cents:rr("Personal injury amount paid",9999999),auto_current_annual_premium_cents:rr("Current annual premium",9999999),auto_prior_years:cn("Years with prior auto carrier"),auto_prior_months:Ae({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:cn("Years with continuous auto coverage")};function Ee(e){return new Date(`${e}T00:00:00Z`)}function Oe(){const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))}function yt(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 Ra=[{targetKey:"social_security_number",dependsOn:["social_security_number","state"],validate:e=>{if(!("social_security_number"in e)||!on(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=Ee(t);return isNaN(r.getTime())?"Invalid date.":r.getUTCFullYear()<1900?"Date of birth year can't be earlier than 1900.":yt(r,Oe())<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=Ee(t);return isNaN(r.getTime())?"Invalid date.":r.getUTCFullYear()<1900?"Date of birth year can't be earlier than 1900.":yt(r,Oe())<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>Ua)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=Ee(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=Ee(t);return isNaN(r.getTime())?"Invalid date.":r>Oe()?"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=Ee(r),o=Ee(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=Ee(t);return isNaN(r.getTime())?"Invalid date.":r>Oe()?"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=Ee(t);return isNaN(r.getTime())?"Invalid date.":r>Oe()?"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=Ee(t);if(isNaN(r.getTime()))return"Invalid date.";const n=Oe(),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=Ee(r);if(isNaN(o.getTime()))return;const i=yt(o,Oe());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=Ee(r);if(isNaN(o.getTime()))return;const i=yt(o,Oe());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=Ee(r);if(isNaN(o.getTime()))return;const i=yt(o,Oe());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=Ee(r);if(isNaN(o.getTime()))return;const i=yt(o,Oe());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=Ee(t);return isNaN(r.getTime())?"Invalid date.":r>Oe()?"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=Ee(t);if(isNaN(r.getTime()))return"Invalid date.";const n=Oe();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=Ee(t);if(isNaN(r.getTime()))return"Invalid date.";const n=Oe(),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=Ee(t);return isNaN(r.getTime())?"Invalid date.":r>Oe()?"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=Ee(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=Ee(t);if(isNaN(r.getTime()))return"Invalid date.";const n=Oe(),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=Ee(r);if(isNaN(o.getTime()))return;const i=yt(o,Oe());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=Ee(r);if(isNaN(o.getTime()))return;const i=yt(o,Oe());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 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 xo(e,t){const r=qy[e];if(!r)return;const n=r.safeParse(t);return n.success?void 0:n.error.issues[0].message}function za(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 Gy(e,t){const r={};for(const n of Ra){if(t?.has(n.targetKey))continue;const o=n.validate(e);o&&(r[n.targetKey]=o)}return r}function Fo(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function nr(e,t){return e.key??`${Fo(e.question)}-${t}`}function bt(e,t){return t==="number"?e==null||typeof e=="string"&&e.trim()==="":t==="checkbox"?e!==!0:e==null||typeof e=="string"&&e.trim()===""}function vr(e,t){const r={};e.forEach((s,a)=>{const c=nr(s,a),u=t[c];if(s.required&&bt(u,s.inputType)){r[c]="Required";return}if(!bt(u,s.inputType)){const d=xo(c,u);if(d){r[c]=d;return}}});const n={...t};e.forEach((s,a)=>{const c=nr(s,a);c in n||(n[c]="")});const o=new Set(Object.keys(r).filter(s=>r[s])),i=Gy(n,o);for(const[s,a]of Object.entries(i))r[s]=a;return r}function Zy(e){if(e===""||e===null||e===void 0)return;const t=Number(e);return Number.isNaN(t)?void 0:t}const Vy={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"},Yy={OwnHome:"Own Home",OwnCondo:"Own Condo",RentHome:"Rent Home",RentCondo:"Rent Condo",RentApartment:"Rent Apartment",LiveWithParents:"Live With Parents"},Ky={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"},Jy={Business:"Business",Pleasure:"Pleasure",Farming:"Farming",To_FromWork:"To/From Work",To_FromSchool:"To/From School"},Qy={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"},Xy={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"},e0={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"},t0={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"},r0={Dontknow:"Don't know",cov25000:"25,000",cov50000:"50,000",cov100000:"100,000",cov250000:"250,000",cov500000:"500,000"},n0={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"},o0={cov25000:"25,000",cov35000:"35,000",cov50000:"50,000",cov100000:"100,000",cov200000:"200,000",cov250000:"250,000",cov300000:"300,000",cov500000:"500,000"},i0={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"},s0={NoCoverage:"No Coverage",cov5000:"5,000",cov10000:"10,000"},$o={NoCoverage:"No Coverage",Zero:"0",Fifty:"50",Hundred:"100",TwoHunderd:"200",TwoHundredfifty:"250",FiveHundred:"500",SeventyFiveHundred:"750",Thousand:"1,000",TwoThousand:"2,000"},a0=["NoCoverage","Zero","Fifty","Hundred","TwoHunderd","TwoHundredfifty","FiveHundred","SeventyFiveHundred","Thousand","TwoThousand"],c0=["NoCoverage","Zero","Fifty","Hundred","TwoHunderd","TwoHundredfifty","FiveHundred","Thousand","TwoThousand"],Bo={NoCoverage:"No Coverage",TwentyFive:"25",Forty:"40",Fifty:"50",SeventyFive:"75",Eighty:"80",Hundred:"100",TwelveHundred:"120",TwoHundred:"200",Unlimited:"Unlimited"},l0=["NoCoverage","TwentyFive","Fifty","SeventyFive","Hundred","TwoHundred","Unlimited"],ja={NoCoverage:"No Coverage",cov20to600:"20/600",cov25to750:"25/750",cov30to900:"30/900",cov40to1200:"40/1,200",cov50to1500:"50/1,500",cov100to3000:"100/3,000"},u0=["NoCoverage","cov20to600","cov25to750","cov30to900","cov40to1200","cov50to1500","cov100to3000"],d0=["NoCoverage","cov20to600","cov30to900","cov40to1200","cov50to1500"],Wa={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"},f0={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"},p0={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)"},m0={OwnerPrimary:"Owner Primary",OwnerSecondary:"Owner Secondary",OwnerSeasonal:"Owner Seasonal"},_0={Basic:"Basic",Modest:"Modest",Average:"Average",AboveAverage:"Above Average",Expensive:"Expensive",VeryExpensive:"Very Expensive",Opulent:"Opulent"},h0={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"},g0={Slab:"Slab",Basement:"Basement",CrawlSpace:"Crawl Space",PartialBasement:"Partial Basement",PiersPostsPiles:"Piers / Posts / Piles",Open:"Open"},y0={NotOverWater:"No",PartiallyOverWater:"Partially Over Water",FullyOrEntirelyOverWater:"Fully or Entirely Over Water"},b0={One:"1",OneHalf:"1.5",Two:"2",TwoHalf:"2.5",Three:"3",ThreeHalf:"3.5",Four:"4",BiLevel:"Bi-Level",TriLevel:"Tri-Level"},v0={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"},S0={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"},E0={B_Gable:"Gable",C_Hip:"Hip",A_Flat:"Flat",D_Other:"Other"},w0={NotUpdated:"Not Updated",PartialUpdate:"Partial Update",CompleteUpdate:"Complete Update"},C0={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"},A0={AboveGround:"Above Ground",BelowGround:"Below Ground"},T0={Basement:"Below Grade Basement",SplitLevelBasement:"Split Level Basement",WalkoutBasement:"Walkout Basement"},k0={EntirelyCopper:"Entirely Copper",EntirelyGalvanized:"Entirely Galvanized",EntirelyPEX:"Entirely PEX",EntirelyPVC:"Entirely PVC",Polybutylene:"Polybutylene"},I0={TwentyFive:"$25,000",Fifty:"$50,000",OneHundred:"$100,000",TwoHundred:"$200,000",ThreeHundred:"$300,000",FourHundred:"$400,000",FiveHundred:"$500,000"},N0={cov1000:"$1,000",cov2000:"$2,000",cov3000:"$3,000",cov4000:"$4,000",cov5000:"$5,000"},O0={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%"},M0={None:"None",OnePercent:"1%",TwoPercent:"2%",FivePercent:"5%",TenPercent:"10%"},D0={_0_500ft:"0-500 Feet",_501_1000ft:"501-1000 Feet",_1001ftAndGreater:"1001 Feet And Greater"},P0={Lessthan5miles:"Less Than 5 Miles",Over5miles:"Over 5 Miles",NotAvailable:"Not Available"},qa={"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"},Ga={Single:"Single",Married:"Married",Seperated:"Separated",Divorced:"Divorced",Widowed:"Widowed",DomesticPartner:"Domestic Partner"},Za={Female:"Female",Male:"Male"},Va={"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"},L0={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"},x0={Verbal_Threshold:"Limited right to sue",Zero_Threshold:"Unlimited right to sue"},F0={Primary:"Primary",Secondary:"Secondary"},$0={cov1000:"$1,000",cov10000:"$10,000"},B0={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"},U0={cov250:"$250",cov500:"$500",cov1000:"$1,000",cov2000:"$2,000",cov2500:"$2,500"},H0={"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"]},R0={"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"},Ya=H0,Ka=R0;function Uo(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 ln(e){return Uo(e,Va)}function Ja(e){return Uo(e,Wa)}function Qa(e){return Uo(e,Ka)}function z0(e){return e.trim().toLowerCase()}function Xa(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 or(e,t){if(!t.effectiveDateKey||!t.expirationDateKey)return!1;const r=Xa(e[t.expirationDateKey]),n=Xa(e[t.effectiveDateKey]);return r==null||n==null?!1:r<n}const j0=new Set(["HomePolicy","BundlePolicy"]);function un(e,t,r){return String(e.key??"")!=="lapse_in_coverage"||!r||!j0.has(r)?!0:t.home_prior_carrier_name!=="NoPriorInsurance"}function Ho(e){let t=null,r=null,n=null;const o=new Set,i=new Set,s=c=>{const u=String(c.key??""),d=z0(String(c.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(s);const a=c=>{c.forEach(u=>{(u.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 Sr(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"&&or(e,t)?!1:or(e,t)}function dn(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:Sr(t,r)}function fn(e,t){const r=String(e.key??"");return t.noInsuranceReasonKeys.has(r)}const W0=["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"],Ro="credify_quote_id",zo="credify_auth_token";function ec(e){try{localStorage.setItem(Ro,e)}catch(t){console.error("Failed to save quoteId to localStorage:",t)}}function pn(){try{return localStorage.getItem(Ro)}catch(e){return console.error("Failed to load quoteId from localStorage:",e),null}}function tc(){try{localStorage.removeItem(Ro)}catch(e){console.error("Failed to clear quoteId from localStorage:",e)}}function q0(e){try{localStorage.setItem(zo,e)}catch(t){console.error("Failed to save authToken to localStorage:",t)}}function G0(){try{return localStorage.getItem(zo)}catch(e){return console.error("Failed to load authToken from localStorage:",e),null}}function rc(){try{localStorage.removeItem(zo)}catch(e){console.error("Failed to clear authToken from localStorage:",e)}}function Z0(){tc(),rc()}const V0="credify-insurance-widget",Y0="1.0",nc=25,oc=64*1024,K0=`
|
|
63
|
+
…[truncated]`;let ic=!1,sc=null,ac="",cc=nc,jo=oc,Er=[];function J0(e){return typeof e=="string"?e:e instanceof URL?e.href:e.url}function Q0(e,t){return t?.method?t.method.toUpperCase():typeof e!="string"&&!(e instanceof URL)&&e.method?e.method.toUpperCase():"GET"}function lc(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 X0(e){try{const t=[];return new URL(e).searchParams.forEach((r,n)=>t.push({name:n,value:r})),t}catch{return[]}}function eb(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 tb(e){const t=e.length;return t<=jo?{text:e,size:t}:{text:e.slice(0,jo)+K0,size:t}}function rb(e){Er.push(e),Er.length>cc&&Er.shift()}function nb(e){if(ic)return!0;if(typeof window>"u"||typeof window.fetch!="function")return!1;ac=e.baseUrl,cc=e.maxEntries??nc,jo=e.maxBodyBytes??oc,sc=window.fetch.bind(window);const t=sc;return window.fetch=async(r,n)=>{let o;try{o=J0(r)}catch{return t(r,n)}if(!o.startsWith(ac))return t(r,n);const i=lc(n?.headers??(typeof r!="string"&&!(r instanceof URL)?r.headers:void 0)),s={startedDateTime:new Date().toISOString(),time:-1,request:{method:Q0(r,n),url:o,httpVersion:"HTTP/1.1",headers:i,queryString:X0(o),cookies:[],headersSize:-1,bodySize:typeof n?.body=="string"?n.body.length:-1,postData:eb(i,n)},response:ob(),cache:{},timings:{send:0,wait:-1,receive:0}};rb(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 u=(typeof performance<"u"?performance.now():0)-a;s.time=Math.round(u),s.timings.wait=Math.round(u),s.response.status=c.status,s.response.statusText=c.statusText,s.response.headers=lc(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:h}=tb(f);s.response.content.text=_,s.response.content.size=h,s.response.bodySize=h}).catch(()=>{})}catch{}return c},ic=!0,!0}function ob(){return{status:0,statusText:"",httpVersion:"HTTP/1.1",headers:[],cookies:[],content:{size:0,mimeType:""},redirectURL:"",headersSize:-1,bodySize:-1}}function ib(){return{log:{version:"1.2",creator:{name:V0,version:Y0},entries:Er.map(e=>({...e}))}}}function sb(){return Er.length}const ab=[/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],cb=[/\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],vt="[REDACTED]",lb=8;function mn(e){for(const t of ab)if(t.test(e))return!0;return!1}function St(e){let t=e;for(const r of cb)t=t.replace(r,vt);return t}function Et(e,t=0,r=new WeakSet){if(t>lb)return vt;if(e==null)return e;if(typeof e=="string")return St(e);if(typeof e!="object")return e;if(r.has(e))return vt;if(r.add(e),Array.isArray(e))return e.map(i=>Et(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(mn(i)){o[i]=vt;continue}o[i]=Et(s,t+1,r)}return o}function uc(e){if(e.request&&(e.request.data!==void 0&&(e.request.data=Et(e.request.data)),e.request.cookies!==void 0&&(e.request.cookies=vt),e.request.headers)){const t=e.request.headers;for(const r of Object.keys(t))mn(r)&&(t[r]=vt)}if(e.extra&&(e.extra=Et(e.extra)),e.contexts&&(e.contexts=Et(e.contexts)),e.tags&&(e.tags=Et(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=Et(t.data)),typeof t.message=="string"&&(t.message=St(t.message));return typeof e.message=="string"&&(e.message=St(e.message)),e}function dc(e){for(const t of e)t.value=mn(t.name)?vt:St(t.value)}function fc(e){try{return JSON.stringify(Et(JSON.parse(e)))}catch{return St(e)}}function ub(e){const t=JSON.parse(JSON.stringify(e));for(const r of t.log.entries){dc(r.request.headers),dc(r.response.headers);for(const n of r.request.queryString)n.value=mn(n.name)?vt:St(n.value);r.request.postData?.text&&(r.request.postData.text=fc(r.request.postData.text)),r.response.content.text&&(r.response.content.text=fc(r.response.content.text)),r.request.url=St(r.request.url),r.response._error&&(r.response._error=St(r.response._error))}return t}function ir(e,t={}){try{Zn(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{sb()>0&&r.addAttachment({filename:"quote-failure.har",data:JSON.stringify(ub(ib())),contentType:"application/json"})}catch{}const n=e instanceof Error?e:new Error(t.message??"Quote failed");zr(n)})}catch{}}const De="https://api.getcredify.com";let sr=null;const db=6e4,pc=new Map;function fb(e){try{return new URL(e).pathname}catch{return e}}function mc(e,t,r){if(!(r>=500&&r<600)&&!(r===0))return;e.__sentryReported=!0;const i=fb(t),s=`${i}:${r}`,a=Date.now(),c=pc.get(s);c&&a-c<db||(pc.set(s,a),ir(e,{phase:"api_request",endpoint:i,statusCode:r}))}function Wo(e){sr=e,q0(e)}function Bt(){return sr}function qo(){const e=G0();e&&(sr=e)}function _c(){sr=null,rc()}async function je(e,t){const r={"Content-Type":"application/json"};sr&&(r.Authorization=`Bearer ${sr}`);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 mc(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,mc(i,e,n.status),i}return n}async function pb(e){try{return await e.json()}catch{return{}}}async function mb(e,t){const r=t?{stage:e,quoteId:t}:{stage:e};return await(await je(`${De}/get-questions-by-stage`,r)).json()}async function _n(e){const t=e?{quoteId:e}:{};return await(await je(`${De}/get-stages-for-quote`,t)).json()}async function _b(e,t=!1){const r=t?{postal_code:e,is_test:!0}:{postal_code:e},o=await(await je(`${De}/create-quote`,r)).json();if(!o||typeof o!="object"||!o.quoteId)throw new Error(`Invalid createQuote response: ${JSON.stringify(o)}`);return o}async function hb(e,t){return await(await je(`${De}/verify-quote`,{action:"send",quoteId:e,phone:t})).json()}async function Ut(e,t,r){const n={payload:e,getRates:t};r&&typeof r=="string"&&r.trim()!==""&&(n.quoteId=r);const o=await je(`${De}/update-quote`,n),i=await pb(o);return!i||typeof i!="object"||!("status"in i)||i.status==null?{status:"success"}:i}async function hc(e,t){return await(await je(`${De}/verify-quote`,{quoteId:e,smsCode:t})).json()}async function gb(e){return await(await je(`${De}/verify-quote`,{action:"resume",resumeToken:e})).json()}async function gc(e,t){const r={state:e};return t&&typeof t=="string"&&t.trim()!==""&&(r.quoteId=t),await(await je(`${De}/is-supported-state`,r)).json()}async function Go(){return await(await je(`${De}/get-rates`,{})).json()}async function yc(e){const t=e?{quoteId:e}:{};return await(await je(`${De}/get-quote`,t)).json()}async function bc(e){return(await je(`${De}/get-vehicle-options`,e)).json()}async function yb(e){return(await je(`${De}/get-vehicle-options`,{...e,action:"vinDecode"})).json()}async function bb(e,t){const n=await(await je(`${De}/request-bind`,{quoteRateId:e,privacyNoticeAcknowledged:t})).json();return n&&typeof n=="object"&&"success"in n?n:{success:!0}}const Zo=new Set(["auto_prior_years","auto_prior_months","auto_continuous_coverage_years"]),vb={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"},vc={auto_prior_carrier_name:Vy,auto_prior_liability_limit:Qy,auto_reason_for_no_insurance:Xy,residence_type:Yy,home_prior_carrier_name:Ky,policy_bi:e0,policy_um:t0,policy_pd:r0,policy_mp:n0,policy_umpd:o0,policy_pip:i0,policy_auto_death_indemnity:s0,vehicle_comp_deductible:$o,vehicle_coll_deductible:$o,vehicle_towing_and_labor:Bo,vehicle_transportation_expense:ja,education_level:Wa,industry:Va,occupation:Ka,usage:Jy,architectural_style:f0,dwelling_type:p0,occupancy_type:m0,construction_quality:_0,construction_type:h0,foundation_type:g0,located_over_water:y0,number_of_stories:b0,exterior_wall_type:v0,roof_material_type:S0,roof_shape:E0,roof_updated_type:w0,heating_type:C0,oil_tank_location:A0,basement_type:T0,plumbing_type:k0,personal_liability:I0,dwelling_medical_payments:N0,all_perils_deductible:O0,windstorm_deductible:M0,distance_from_fire_hydrant_ft:D0,distance_from_fire_station_miles:P0,employment_industry:qa,marital_status:Ga,gender:Za,co_applicant_employment_industry:qa,co_applicant_marital_status:Ga,co_applicant_gender:Za,description:L0,tort_threshold:x0,pip_coverage_type:F0,extended_medical:$0,additional_pip:B0,policy_pip_deductible:U0},Sb=["OTHER / NOT LISTED"],Eb=["SEDAN","SUV","COUPE","HATCHBACK","PICKUP","VAN","WAGON","OTHER"],wb=["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 Sc(e){const t=e.replace(/\D+/g,"");if(t!=="")return Zy(t)}function Cb(e){return e==="-"||e==="+"||e==="."||e==="e"||e==="E"}const Ab={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},Ec=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"]),Tb=new Set(["total_area_sq_ft","annual_mileage","miles_to_work","distance_to_coast_miles"]),hn={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"},kb={license_number:20};function Ib(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 Nb=new Set(["Disabled","Retired","Unemployed","Other"]);function Vo(e,t,r){const n=String(e.key??"");if(n!=="occupation"&&n!=="co_applicant_occupation"||n==="co_applicant_occupation")return!0;const o=Me(t,r,"industry"),i=Me(t,r,"employment_industry"),s=String(o??i??"").trim();return!Nb.has(s)}function Yo(e,t,r,n){return Ba(e,n,r)}function gn(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 wc(e,t){return gn(e)?"Yes":t}function Cc(e){return typeof e=="number"&&Number.isFinite(e)?e:typeof e=="string"&&e.trim()!==""&&!Number.isNaN(Number(e))?Number(e):null}function Ac(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 Tc(e,t){const r=Cc(e),n=Cc(t);if(r!=null&&n!=null)return r-n;const o=Ac(e),i=Ac(t);return o!=null&&i!=null?o-i:e==null||t==null?null:String(e).localeCompare(String(t))}function Ob(e,t){return Array.isArray(e)?e.some(r=>r===t):typeof e=="string"?t!=null&&e.includes(String(t)):!1}function wr(e,t,r){switch(t){case"equals":return e===r;case"notEquals":return e!==r&&e!==""&&e!=null;case"lessThan":{const n=Tc(e,r);return n!=null&&n<0}case"greaterThan":{const n=Tc(e,r);return n!=null&&n>0}case"contains":return Ob(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 Cr(e,t){return t.reduce((r,n)=>r?.[n],e)}function Qe(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],s=typeof o[0]=="number"?Array.isArray(i)?i:[]:i&&typeof i=="object"?i:{},a=Qe(s,o,r);if(typeof n=="number"){const u=(Array.isArray(e)?e:[]).slice();return u[n]=a,u}return{...e,[n]:a}}function Me(e,t,r){return Cr(e,[...t??[],r])}function Pe(e,t,r,n){return Qe(e,[...t??[],r],n)}function Mb(e,t){return e?.length?`${e.join("-")}-${t}`:t}const Db="__items",yn=e=>`${e}${Db}`;function Be(e){return e==null?"":typeof e=="string"?e:String(e)}function kc(e){return e==null?"":typeof e=="number"&&Number.isFinite(e)||typeof e=="string"?e:""}function Pb(e){return e==null?"":typeof e=="string"||typeof e=="number"?e:String(e)}function Ic({questions:e,initialValues:t,controlledValues:r,onChangeValues:n,onSubmit:o,quoteId:i,widgetStageKey:s}){const a=m.useMemo(()=>So(e),[e]),c=m.useMemo(()=>Ho(a),[a]),u=m.useMemo(()=>s==="BundlePolicy"?!0:a.some(O=>String(O.key)==="home_prior_carrier_name")&&a.some(O=>String(O.key)==="driver_vehicle_assignments"),[s,a]),d=m.useMemo(()=>{const O={};return t&&Object.assign(O,t),O},[t]),[f,_]=m.useState(d);m.useEffect(()=>{_(d)},[d]);const[h,g]=m.useState({}),y=m.useMemo(()=>({...h,...r??f}),[h,r,f]);m.useEffect(()=>{r&&g(O=>({...O,...r}))},[r]);const[W,x]=m.useState({}),H=m.useRef(new Map),M=m.useRef(new Set),[,R]=m.useState({}),[C,z]=m.useState({}),Y=m.useRef(!1);m.useEffect(()=>{!i||Y.current||!a.some(b=>b.key==="year"||b.key==="make"||b.key==="model"||b.key==="body_style")||(Y.current=!0,bc({quoteId:i}).catch(()=>{}))},[i,a]);const[U,J]=m.useState({}),[X,ie]=m.useState({}),Z=m.useCallback(async(O,b)=>{if(!i||!za(b))return;const p=O?O.join("-"):"_root";J(v=>({...v,[p]:!0})),ie(v=>({...v,[p]:null}));try{const v=await yb({quoteId:i,vin:b});if(v.error){ie(w=>({...w,[p]:v.error}));return}let S=y;v.year&&(S=Pe(S,O,"year",String(v.year))),v.make&&(S=Pe(S,O,"make",v.make)),v.model&&(S=Pe(S,O,"model",v.model)),v.bodyStyle&&(S=Pe(S,O,"body_style",v.bodyStyle)),r&&n?n(S):_(S),g(S),H.current.clear(),M.current.clear(),R({})}catch{ie(v=>({...v,[p]:"VIN lookup failed — please enter vehicle details manually"}))}finally{J(v=>({...v,[p]:!1}))}},[i,y,r,n]),ne=m.useCallback(O=>{const b=`${O.year}|${O.make??""}|${O.model??""}`,p=O.model?"bodyStyles":O.make?"models":"makes",v=H.current.get(b);return v?v[p]??[]:void 0},[]),pe=m.useCallback((O,b)=>{if(!i)return;const p=`${b.year}|${b.make??""}|${b.model??""}`,v=b.model?"bodyStyles":b.make?"models":"makes",S=`${O}:${v}`;H.current.has(p)||M.current.has(p)||(M.current.add(p),z(w=>({...w,[S]:!0})),bc({quoteId:i,...b}).then(w=>{H.current.set(p,w),R(k=>({...k,[S]:w[v]??[]}))}).catch(()=>{H.current.set(p,{}),R(w=>({...w,[S]:[]}))}).finally(()=>{M.current.delete(p),z(w=>({...w,[S]:!1}))}))},[i]);function Q(O,b,p){const v=y,S=O?Cr(y,O)??{}:v;return O?{state:v.state,...S,[b]:p}:{...S,[b]:p}}function ee(O,b){const p=Ra.filter(S=>S.targetKey===O||S.dependsOn.includes(O)),v={[O]:void 0};for(const S of p){const w=S.validate(b);S.targetKey in v?w!==void 0&&(v[S.targetKey]=w):v[S.targetKey]=w}x(S=>({...S,...v}))}const L=(O,b,p)=>{const v=Me(y,p,O);if(bt(v,b)){W[O]&&x(w=>({...w,[O]:void 0}));return}const S=xo(O,v);if(S){x(w=>({...w,[O]:S}));return}ee(O,Q(p,O,v))};m.useEffect(()=>{let O=y,b=!1;a.forEach(p=>{if(!gn(p))return;const v=String(p.key);Me(O,void 0,v)!=="Yes"&&(O=Pe(O,void 0,v,"Yes"),b=!0)}),b&&(r&&n?n(O):_(O),g(O))},[a,y,r,n]);function te(O,b){const p=O.key;if((p==="relationship_to_insured"||p==="is_registered_owner")&&b){const T=b[b.length-1];if(typeof T=="number"&&T===0)return null}if((p==="purchase_date"||p==="cost_new_value_cents")&&b)return null;if(p==="custom_equipment_value_cents"&&b){const T=Me(y,b,"vehicle_has_modifications");if(T!=="Yes"&&T!==!0)return null}const v=p==="auto_reason_for_no_insurance"&&c.currentCarrierKey?y[c.currentCarrierKey]==="NoPriorInsurance"?"Reason you are not currently insured":"Reason for lapse in coverage":O.question,S=O.hint,w=Me(y,b,p),k=fn(O,c)?Sr(y,c):p==="social_security_number"&&on(y.state??y.State)?!0:O.required,I=W[p],P=T=>{let N=Pe(y,b,p,T);if(O.inputType==="radio"&&O.conditionals){const A=O.conditionals??[];for(const B of A){const $=Me(y,b,p),K=wr($,B.conditionalType,B.conditionalValue),q=wr(T,B.conditionalType,B.conditionalValue);if(K&&!q&&B.conditionalQuestionsAllowMultiple){const se=B.conditionalQuestions??[];if(se.length>0){const F=yn(p);N=Qe(N,[...b??[],F],[]);const me=(ae,we)=>{ae.forEach(He=>{(He.conditionals??[]).forEach(Te=>{if(Te.conditionalQuestionsAllowMultiple){const ye=yn(He.key);N=Qe(N,[...we,ye],[])}const qe=Te.conditionalQuestions??[];qe.length>0&&me(qe,we)})})};me(se,[...b??[],F])}}}}r&&n?n(N):_(N),g(N)};if(p==="vehicle_policy_selections"){const T=y.vehicles__items??[],N=y.drivers__items??[];if(T.length===0)return l.jsx("p",{style:{color:"#666",fontStyle:"italic"},children:"Add vehicles first to configure coverage selections."},p);const A=y.driver_vehicle_assignments??{},B=N.length>1,$=ye=>Object.entries(ye).map(([le,ke])=>({value:le,label:ke})),K=on(y.state??y.State),q=(ye,le)=>Object.fromEntries(ye.filter(ke=>ke in le).map(ke=>[ke,le[ke]])),F=$(q(K?a0:c0,$o)),me=K?q(l0,Bo):Bo,ae=$(me),He=$(q(K?u0:d0,ja)),Le=(ye,le,ke)=>{const Ie=Qe(y,["vehicles__items",ye,le],ke);r&&n?n(Ie):_(Ie),g(Ie)},Te=(ye,le,ke)=>{const Ie={...A},Ge=`v${ye}`;Ie[Ge]={...Ie[Ge]??{}},Ie[Ge][`d${le}`]=ke;const _e=Qe(y,["driver_vehicle_assignments"],Ie);r&&n?n(_e):_(_e),g(_e)},qe=ye=>{if(!B)return null;const le=A[`v${ye}`];if(!le)return null;const ke=N.map((_e,ot)=>le[`d${ot}`]??0),Ie=ke.filter(_e=>_e>0);if(Ie.length>=2&&Ie.every(_e=>_e===Ie[0])&&Ie[0]===50)return`Assignments for Vehicle ${ye+1} cannot be 50 percent for both Drivers.`;const Ge=ke.reduce((_e,ot)=>_e+ot,0);return Ge>0&&Ge!==100?`Driver percentages for this vehicle must add up to 100% (currently ${Ge}%).`:null};return l.jsx("div",{children:T.map((ye,le)=>{const ke=[ye.year,ye.make,ye.model].filter(Boolean).join(" ")||`Vehicle ${le+1}`,Ie=qe(le),Ge=_e=>typeof ye[_e]=="string"?ye[_e]:"";return l.jsxs("fieldset",{style:{border:`1px solid ${Ie?"#dc3545":"#ddd"}`,borderRadius:"8px",padding:"16px",marginBottom:"16px"},children:[l.jsx("legend",{style:{fontWeight:600,padding:"0 8px"},children:ke}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:"12px"},children:[l.jsx(_r,{id:`veh-${le}-comp`,label:"Comprehensive deductible",required:!0,placeholder:"Select...",options:F,value:Ge("vehicle_comp_deductible"),onChange:_e=>Le(le,"vehicle_comp_deductible",_e.currentTarget.value)}),l.jsx(_r,{id:`veh-${le}-coll`,label:"Collision deductible",required:!0,placeholder:"Select...",options:F,value:Ge("vehicle_coll_deductible"),onChange:_e=>Le(le,"vehicle_coll_deductible",_e.currentTarget.value)}),l.jsx(_r,{id:`veh-${le}-tow`,label:"Towing and Labor",required:!0,placeholder:"Select...",options:ae,value:Ge("vehicle_towing_and_labor"),onChange:_e=>Le(le,"vehicle_towing_and_labor",_e.currentTarget.value)}),l.jsx(_r,{id:`veh-${le}-trans`,label:"Transportation expense",required:!0,placeholder:"Select...",options:He,value:Ge("vehicle_transportation_expense"),onChange:_e=>Le(le,"vehicle_transportation_expense",_e.currentTarget.value)})]}),B&&l.jsxs("div",{style:{marginTop:"16px"},children:[l.jsx("p",{style:{fontWeight:600,margin:"0 0 8px"},children:"Drivers usage (%)"}),l.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px"},children:N.map((_e,ot)=>{const li=[_e.first_name,_e.last_name].filter(Boolean).join(" ")||`Driver ${ot+1}`,rt=A[`v${le}`]?.[`d${ot}`];return l.jsx("div",{style:{flex:"0 0 140px"},children:l.jsx(yo,{id:`assignment-v${le}-d${ot}`,label:`${li} %`,value:rt??"",min:0,max:100,step:1,inputMode:"numeric",onChange:kr=>{const Ct=kr.currentTarget.value.replace(/\D+/g,"");Te(le,ot,Ct===""?0:Math.min(100,parseInt(Ct,10)))}})},`${le}-${ot}`)})}),Ie&&l.jsx("p",{style:{color:"#dc3545",fontSize:"0.85rem",marginTop:"8px",marginBottom:0},children:Ie})]})]},le)})},p)}if(p==="driver_vehicle_assignments"){const T=y.vehicles__items??[],N=y.drivers__items??[];if(u&&N.length<=1)return null;if(T.length===0||N.length===0)return l.jsx("p",{style:{color:"#666",fontStyle:"italic"},children:"Add vehicles and drivers first to configure driver usage percentages."},p);const A=y.driver_vehicle_assignments??{},B=(K,q,se)=>{const F={...A},me=`v${K}`;F[me]={...F[me]??{}},F[me][`d${q}`]=se,P(F)},$=K=>{if(N.length<2)return null;const q=A[`v${K}`];if(!q)return null;const se=N.map((ae,we)=>q[`d${we}`]??0),F=se.filter(ae=>ae>0);if(F.length>=2&&F.every(ae=>ae===F[0])&&F[0]===50)return`Assignments for Vehicle ${K+1} cannot be 50 percent for both Drivers.`;const me=se.reduce((ae,we)=>ae+we,0);return me>0&&me!==100?`Driver percentages for this vehicle must add up to 100% (currently ${me}%).`:null};return l.jsxs("div",{children:[l.jsx("h4",{style:{marginBottom:"12px"},children:v}),T.map((K,q)=>{const se=[K.year,K.make,K.model].filter(Boolean).join(" ")||`Vehicle ${q+1}`,F=$(q);return l.jsxs("fieldset",{style:{border:`1px solid ${F?"#dc3545":"#ddd"}`,borderRadius:"8px",padding:"16px",marginBottom:"16px"},children:[l.jsx("legend",{style:{fontWeight:600,padding:"0 8px"},children:se}),l.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px"},children:N.map((me,ae)=>{const we=[me.first_name,me.last_name].filter(Boolean).join(" ")||`Driver ${ae+1}`,He=A[`v${q}`]?.[`d${ae}`];return l.jsx("div",{style:{flex:"0 0 140px"},children:l.jsx(yo,{id:`assignment-v${q}-d${ae}`,label:`${we} %`,value:He??"",min:0,max:100,step:1,inputMode:"numeric",onChange:Le=>{const Te=Le.currentTarget.value.replace(/\D+/g,"");B(q,ae,Te===""?0:Math.min(100,parseInt(Te,10)))}})},`${q}-${ae}`)})}),F&&l.jsx("p",{style:{color:"#dc3545",fontSize:"0.85rem",marginTop:"8px",marginBottom:0},children:F})]},q)})]},p)}switch(O.inputType){case"text":{if(p==="vin"&&i){const T=b?b.join("-"):"_root",N=U[T]??!1,A=X[T]??null,B=[S?`${p}-hint`:null,I?`${p}-error`:null,A?`${p}-vin-error`:null].filter(Boolean).join(" ");return l.jsxs("div",{children:[l.jsx(ze,{id:p,label:v,hint:S,error:I,required:k,children:l.jsxs("div",{className:"flex items-end gap-2",children:[l.jsx("div",{className:"flex-1 min-w-0",children:l.jsx("input",{id:p,className:`form-input ${I?"input-error":""}`,"aria-invalid":!!I,"aria-describedby":B||void 0,"aria-required":k||void 0,required:k,value:Be(w),maxLength:17,onChange:$=>P($.currentTarget.value),onBlur:()=>L(p,"text",b),autoComplete:hn[p],type:"text"})}),l.jsx("button",{type:"button",disabled:N||!za(Be(w)),className:"btn btn-outline shrink-0 self-end !w-auto min-w-[8.5rem] px-4 whitespace-nowrap disabled:opacity-50",onClick:()=>Z(b,Be(w)),children:N?"Looking up...":"Verify VIN"})]})}),A&&l.jsx("p",{id:`${p}-vin-error`,className:"text-sm text-red-600 mt-1",children:A})]},p)}if(p==="sms_code"){const T=Be(w);return l.jsx(go,{id:p,label:v,hint:S,value:T,inputMode:"numeric",pattern:"[0-9]*",maxLength:6,onChange:N=>{const A=N.currentTarget.value.replace(/\D+/g,"").slice(0,6);P(A)},onBlur:()=>L(p,"text",b),"aria-required":k||void 0,error:I,autoComplete:hn[p]},p)}if(p==="license_number")return l.jsx(go,{id:p,label:v,hint:S,value:Be(w),onChange:T=>P(T.currentTarget.value.replace(/[^A-Z0-9]/gi,"").slice(0,20)),onBlur:()=>L(p,"text",b),"aria-required":k||void 0,error:I,autoComplete:"off",maxLength:20},p);if(p==="social_security_number"){const T=Me(y,b,"ssn_display"),N=typeof T=="string"?T:"",A=N?`${N}. Re-enter to update.${S?` ${S}`:""}`:S;return l.jsx(zp,{id:p,label:v,hint:A,value:Be(w),onChange:B=>P(B.currentTarget.value),onBlur:()=>L(p,"text",b),"aria-required":k||void 0,error:I},p)}return l.jsx(go,{id:p,label:v,hint:S,value:Be(w),onChange:T=>P(T.currentTarget.value),onBlur:()=>L(p,"text",b),"aria-required":k||void 0,error:I,autoComplete:hn[p],maxLength:kb[p]},p)}case"email":return l.jsx(jp,{id:p,label:v,value:Be(w),onChange:T=>P(T.currentTarget.value),onBlur:()=>L(p,"email",b),"aria-required":k||void 0,error:I},p);case"password":return l.jsx(Gp,{id:p,label:v,value:Be(w),onChange:T=>P(T.currentTarget.value),onBlur:()=>L(p,"password",b),"aria-required":k||void 0,error:I},p);case"tel":return l.jsxs(l.Fragment,{children:[l.jsx(Wp,{id:p,label:v,value:Be(w),onChange:T=>P(T.currentTarget.value),onBlur:()=>L(p,"tel",b),"aria-required":k||void 0,error:I},p),p==="phone"&&l.jsxs("div",{className:"mt-3 text-xs text-slate-600 space-y-1",children:[l.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."}),l.jsx("p",{children:"Message & data rates may apply. One message per request."}),l.jsxs("p",{children:["See our"," ",l.jsx("a",{href:"https://getcredify.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})," ","and"," ",l.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 l.jsx(qp,{id:p,label:v,value:Be(w),onChange:T=>P(T.currentTarget.value),onBlur:()=>L(p,"url",b),"aria-required":k||void 0,error:I},p);case"number":{const T=Ab[p];return Ec.has(p)||Tb.has(p)?l.jsx(Rp,{id:p,label:v,hint:S,value:kc(w),isCurrency:Ec.has(p),maxDigits:T,onChange:N=>P(Sc(N.currentTarget.value)),onBlur:()=>L(p,"number",b),"aria-required":k||void 0,error:I},p):l.jsx(yo,{id:p,label:v,hint:S,value:kc(w),inputMode:"numeric",pattern:"[0-9]*",onKeyDown:N=>{if(Cb(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 A=N.currentTarget.value;T!==void 0&&(A=A.slice(0,T)),P(Sc(A))},onBlur:()=>L(p,"number",b),"aria-required":k||void 0,error:I},p)}case"textarea":return l.jsx(Zp,{id:p,label:v,value:Be(w),onChange:T=>P(T.currentTarget.value),onBlur:()=>L(p,"textarea",b),"aria-required":k||void 0,error:I,rows:4},p);case"date":{const{min:T,max:N}=Ib(p);return l.jsx(Vp,{id:p,label:v,hint:S,value:Be(w),min:T,max:N,onChange:A=>{const B=A.currentTarget.value;P(B),!bt(B,"date")&&!xo(p,B)&&ee(p,Q(b,p,B))},onBlur:()=>L(p,"date",b),"aria-required":k||void 0,error:I,autoComplete:hn[p]},p)}case"checkbox":{if(O.options){const T=Array.isArray(w)?w:[];return l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"form-label",children:[v,k&&l.jsx("span",{className:"text-red-600 ml-1",children:"*"})]}),l.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:O.options.map(N=>{const A=`${p}-${Fo(N)}`,B=T.includes(N);return l.jsx(mr,{id:A,label:N,checked:B,onChange:$=>{const K=new Set(T);$.currentTarget.checked?K.add(N):K.delete(N),P(Array.from(K))},"aria-required":k||void 0},A)})}),I&&l.jsx("p",{className:"mt-1 text-sm text-red-600",children:I})]},p)}return l.jsx(mr,{id:p,label:k?`${v} *`:v,checked:!!w,onChange:T=>P(T.currentTarget.checked),"aria-required":k||void 0},p)}case"radio":{if(gn(O))return null;const T=O.options??[],N=b&&b.length>0?`${p}__${b.join("__")}`:p;return l.jsx(Jp,{legend:v,legendClassName:k?"legend-required":void 0,children:T.map(A=>l.jsx(Kp,{name:N,value:A,checked:w===A,onChange:()=>{P(A),ee(p,Q(b,p,A))},children:vc[p]?.[A]??A},`${p}-${Fo(A)}`))},p)}case"select":{let T=O.options??[];p==="quote_vehicle_id"&&(T=r?.vehicles__items?.map(q=>q.vin)??[]);let N=!1,A,B,$;if(p==="year"||p==="make"||p==="model"||p==="body_style"){const q=b?b.join("-"):"_root";U[q]&&(N=!0,A="Looking up VIN...")}if(!N&&(p==="make"||p==="model"||p==="body_style")){const q=b?b.join("-"):"_root";$=q;const se=Me(y,b,"year"),F=typeof se=="number"?se:Number(se);if(p==="make"){const me=`${q}:makes`;if(!F||!Number.isFinite(F))N=!0,A="Select a year first";else{B={year:F};const ae=ne(B);ae&&ae.length>0?T=ae:C[me]?(N=!0,A="Loading makes..."):T=[...W0]}}else if(p==="model"){const me=`${q}:models`,ae=String(Me(y,b,"make")??"");if(!ae)N=!0,A="Select a make first";else if(F&&Number.isFinite(F)){B={year:F,make:ae};const we=ne(B);we&&we.length>0?T=we:C[me]?(N=!0,A="Loading models..."):T=[...Sb]}typeof w=="string"&&w&&!T.includes(w)&&(T=[w,...T])}else{const me=`${q}:bodyStyles`,ae=String(Me(y,b,"make")??""),we=String(Me(y,b,"model")??"");if(!we)N=!0,A="Select a model first";else if(F&&Number.isFinite(F)&&ae){B={year:F,make:ae,model:we};const He=ne(B);He&&He.length>0?T=He:C[me]?(N=!0,A="Loading body styles..."):T=[...Eb]}typeof w=="string"&&w&&!T.includes(w)&&(T=[w,...T])}}if(p==="occupation"||p==="co_applicant_occupation"){const q=p==="co_applicant_occupation"?"co_applicant_employment_industry":void 0,se=q?void 0:Me(y,b,"industry"),F=Me(y,b,q??"employment_industry"),ae=String(ln(se??F)??"").trim();T=[...Ya[ae]??wb],typeof w=="string"&&w&&!T.includes(w)&&(T=[w,...T])}const K=Mb(b,p);return l.jsx(_r,{id:K,label:A?`${v} — ${A}`:v,"aria-required":k||void 0,error:I,disabled:N,value:Pb(w),onChange:q=>{const se=q.currentTarget.value;if(p!=="year"&&p!=="make"&&p!=="model"&&p!=="industry"&&p!=="employment_industry"&&p!=="co_applicant_employment_industry"){P(se),ee(p,Q(b,p,se));return}let F=Pe(y,b,p,se);if(p==="year")F=Pe(F,b,"make",""),F=Pe(F,b,"model",""),F=Pe(F,b,"body_style","");else if(p==="make")F=Pe(F,b,"model",""),F=Pe(F,b,"body_style","");else if(p==="model")F=Pe(F,b,"body_style","");else if(p==="industry"||p==="employment_industry")F=Pe(F,b,"occupation","");else if(p==="co_applicant_employment_industry"){const ae=String(ln(se)??"").trim(),we=Ya[ae]??[],He=we.find(Le=>Le===ae)??we[0]??"";F=Pe(F,b,"co_applicant_occupation",He??"")}r&&n?n(F):_(F),g(F);const me=b?Cr(F,b)??{}:F;ee(p,{...me,[p]:se})},placeholder:A??"Select an option",onFocus:B&&$?()=>pe($,B):void 0,options:T.map(q=>({value:q,label:vc[p]?.[q]??vb[q]??q}))},K)}case"address":return l.jsx(tm,{id:p,label:v,value:Be(w),onChange:(T,N)=>{let A=Pe(y,b,p,T);const B=N?.state??(typeof T=="string"?T.match(/,\s*([A-Z]{2})\s+\d{5}\b/)?.[1]:void 0);if(B){const $=b?[...b,"state"]:["state"];A=Qe(A,$,B)}if(!b){const $=N?.zipCode??(typeof T=="string"?T.match(/,\s*[A-Z]{2}\s+(\d{5})(?:-\d{4})?\b/)?.[1]:void 0);$&&(A=Qe(A,["postal_code"],$))}r&&n?n(A):_(A),g(A)},onBlur:()=>L(p,"address",b),required:k,"aria-required":k||void 0,error:I},p);default:return null}}function ge(O,b){const p=O.some(S=>String(S.key)==="years_at_address"),v=O.find(S=>String(S.key)==="months_at_address");return O.map((S,w)=>{const k=String(S.key);if(k==="months_at_address"&&p||!dn(S,y,c)||!Vo(S,y,b)||!un(S,y,s))return null;if(Yo(k,S,y,s)){const $=c.currentCarrierKey?y[c.currentCarrierKey]:void 0;if(!($&&$!=="NoPriorInsurance"&&or(y,c)&&Zo.has(k)))return null}const I=te(S,b),P=k==="years_at_address"&&v?te(v,b):null,T=S.conditionals??[];if(!T.length)return s==="BundlePolicy"&&k==="policy_bi"?l.jsxs("div",{children:[l.jsx("h3",{className:"text-lg font-semibold mt-6 mb-3",children:"Vehicle Coverage Information"}),I]},`wrap-${k}-${w}`):l.jsxs("div",{children:[I,P]},`wrap-${k}-${w}`);const N=wc(S,Me(y,b,k)),A=T.filter($=>wr(N,$.conditionalType,$.conditionalValue)),B=A.length>1&&!A.some($=>$.conditionalQuestionsAllowMultiple)?A.slice(0,1):A;return l.jsxs("div",{children:[I,P,B.map(($,K)=>{const q=$.conditionalQuestions??[];if(!q.length)return null;if(!$.conditionalQuestionsAllowMultiple)return l.jsx("div",{className:"mt-3",children:ge(q,b)},`branch-${k}-${K}`);const se=yn(k),F=Cr(y,[...b??[],se])??[],me=Math.max(1,F.length||1),ae=()=>{const Le=Qe(y,[...b??[],se,F.length],{});r&&n?n(Le):_(Le),g(Le)},we=()=>{const Le=F.slice(0,Math.max(0,F.length-1)),Te=Qe(y,[...b??[],se],Le);r&&n?n(Te):_(Te),g(Te)},He=`${k}__c${K}`;return l.jsxs("div",{className:"mt-3",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsx("div",{className:"text-sm font-medium opacity-75",children:"Add one or more entries"}),l.jsxs("div",{className:"space-x-2",children:[l.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:ae,children:"Add another"}),me>1&&l.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:we,children:"Remove last"})]})]}),Array.from({length:me}).map((Le,Te)=>{const qe=[...b??[],se,Te],ye=`${He}__i${Te}`,le=F[Te]??{},ke=k==="drivers",_e=ke?`Driver #${Te+1}`:k==="vehicles"?`Vehicle #${Te+1}`:k==="home_losses"||k==="losses"?`Loss #${Te+1}`:`Entry #${Te+1}`,li=ke&&typeof le.ssn_display=="string"&&le.ssn_display?` — ${le.ssn_display}`:"";return l.jsxs("div",{className:"rounded-lg border p-3 mb-3",children:[l.jsxs("div",{className:"text-sm font-semibold mb-2",children:[_e,li]}),q.map(rt=>{const kr=String(rt.key);if(!dn(rt,y,c)||!Vo(rt,y,qe)||!un(rt,y,s))return null;if(Yo(kr,rt,y,s)){const Ct=c.currentCarrierKey?y[c.currentCarrierKey]:void 0;if(!(Ct&&Ct!=="NoPriorInsurance"&&or(y,c)&&Zo.has(kr)))return null}return l.jsxs("div",{className:"mt-3",children:[te(rt,qe),(()=>{const Ct=rt.conditionals??[];if(!Ct.length)return null;const vl=Me(y,qe,rt.key),In=Ct.filter(zt=>wr(vl,zt.conditionalType,zt.conditionalValue));return(In.length>1&&!In.some(zt=>zt.conditionalQuestionsAllowMultiple)?In.slice(0,1):In).map((zt,ui)=>{const di=zt.conditionalQuestions??[];if(!di.length)return null;if(!zt.conditionalQuestionsAllowMultiple)return l.jsx("div",{className:"mt-3",children:ge(di,qe)},`nested-${ye}-${ui}`);const Nn=yn(rt.key),On=Cr(y,[...qe,Nn])??[],Sl=Math.max(1,On.length||1),HS=()=>{const lr=Qe(y,[...qe,Nn,On.length],{});r&&n?n(lr):_(lr),g(lr)},RS=()=>{const lr=On.slice(0,Math.max(0,On.length-1)),jt=Qe(y,[...qe,Nn],lr);r&&n?n(jt):_(jt),g(jt)};return l.jsxs("div",{className:"mt-3",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsx("div",{className:"text-sm font-medium opacity-75",children:"Add one or more entries"}),l.jsxs("div",{className:"space-x-2",children:[l.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:HS,children:"Add another"}),Sl>1&&l.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:RS,children:"Remove last"})]})]}),Array.from({length:Sl}).map((lr,jt)=>{const zS=[...qe,Nn,jt];return l.jsxs("div",{className:"rounded-lg border p-3 mb-3",children:[l.jsxs("div",{className:"text-sm font-semibold mb-2",children:["Entry #",jt+1]}),ge(di,zS)]},`nested-item-${ye}-${ui}-${jt}`)})]},`nested-repeat-${ye}-${ui}`)})})()]},`${ye}-${kr}`)})]},`group-${ye}`)})]},`branch-${k}-${K}`)})]},`wrap-${k}-${w}`)})}const D=m.useMemo(()=>{const O=[],b=(p,v)=>{p.forEach(S=>{if(!dn(S,y,c)||!Vo(S,y,v)||!un(S,y,s))return;const w=String(S.key);if(Yo(w,S,y,s)){const N=c.currentCarrierKey?y[c.currentCarrierKey]:void 0;if(!(N&&N!=="NoPriorInsurance"&&or(y,c)&&Zo.has(w)))return}gn(S)||O.push(S);const k=S.conditionals??[];if(!k.length)return;const I=wc(S,Me(y,v,w)),P=k.filter(N=>wr(I,N.conditionalType,N.conditionalValue));(P.length>1&&!P.some(N=>N.conditionalQuestionsAllowMultiple)?P.slice(0,1):P).forEach(N=>{const A=N.conditionalQuestions??[];A.length&&(N.conditionalQuestionsAllowMultiple||b(A,v))})})};return b(a),O},[a,y,c,s]);function re(O){O.preventDefault();const b=Sr(y,c),p=D.map(S=>fn(S,c)?{...S,required:b}:S),v=vr(p,y);if(x(v),Object.keys(v).length>0){const S=D.findIndex(w=>v[w.key]);S>=0&&document.getElementById(D[S].key)?.focus();return}o(y)}return l.jsx("form",{className:"space-y-6 px-1",onSubmit:re,noValidate:!0,children:ge(a)})}const Lb="https://getcredify.com/privacy-policy";function xb(){return l.jsx("a",{href:Lb,target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})}function Nc(){return l.jsxs(l.Fragment,{children:["See our ",l.jsx(xb,{})," for how we use your information."]})}const Fb=new Set(["Product","Name","Home","HomeConstruction","HomeFeatures","Vehicle","Driver","Demographics","Customer","HomeCustomer","BundleCustomer"]),$b=new Set(["AutoCurrentCarrier","HomeCurrentCarrier","HomePolicy","BundlePolicy","AutoPolicy"]);function Bb({stageKey:e}){return e?e==="Zip"?l.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:"No credit card required."}):e==="Email"?l.jsxs("div",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left space-y-1",children:[l.jsx("p",{children:"We'll send your quotes and updates here, and save your progress so you can return anytime."}),l.jsx("p",{children:l.jsx(Nc,{})})]}):$b.has(e)?l.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"?l.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"?l.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:"You'll receive a text from Credify shortly."}):Fb.has(e)?l.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:l.jsx(Nc,{})}):null:null}const ar={};function Ub(e){let t=ar[e];return t||(t=new Set,ar[e]=t),t}function Oc(e,t){Ub(e).add(t)}function Mc(e,t){ar[e]?.delete(t)}function wt(e,...t){const r=ar[e];if(!r||r.size===0)return;const n=t[0],o={quoteId:pn(),timestamp:Date.now()};for(const i of[...r])try{i(n,o)}catch(s){zr(s,{tags:{source:"widget-event-listener",event:e}})}}function Hb(){for(const e of Object.keys(ar))delete ar[e]}function Rb(){wt("widgetOpened")}function Dc(){wt("widgetClosed")}function zb(e){wt("stageViewed",e)}function Pc(e){wt("stageCompleted",e)}function jb(){wt("flowCompleted")}function Wb(e){wt("ratesViewed",e)}function qb(){wt("ratesBack")}function Ar(e){wt("submissionFailed",e)}const Lc=new Set(["Disabled","Retired","Unemployed","Other"]);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!Lc.has(i)}function Zb(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!Lc.has(i)}function xc(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 Fc(e,t){return xc(e)?"Yes":t}function $c(e){return typeof e=="number"&&Number.isFinite(e)?e:typeof e=="string"&&e.trim()!==""&&!Number.isNaN(Number(e))?Number(e):null}function Bc(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 Uc(e,t){const r=$c(e),n=$c(t);if(r!=null&&n!=null)return r-n;const o=Bc(e),i=Bc(t);return o!=null&&i!=null?o-i:e==null||t==null?null:String(e).localeCompare(String(t))}function Vb(e,t){return Array.isArray(e)?e.some(r=>r===t):typeof e=="string"?t!=null&&e.includes(String(t)):!1}function Hc(e,t,r){switch(t){case"equals":return e===r;case"notEquals":return e!==r&&e!==""&&e!=null;case"lessThan":{const n=Uc(e,r);return n!=null&&n<0}case"greaterThan":{const n=Uc(e,r);return n!=null&&n>0}case"contains":return Vb(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 Yb=new Set(["auto_prior_years","auto_prior_months","auto_continuous_coverage_years"]);function bn(e,t,r){const n=So([...e]),o=Ho(n),i=[],s=a=>{a.forEach(c=>{if(!dn(c,t,o)||!Gb(c,t)||!un(c,t,r))return;const u=String(c.key);if(Ba(u,r,t)){const g=o.currentCarrierKey?t[o.currentCarrierKey]:void 0;if(!(g&&g!=="NoPriorInsurance"&&or(t,o)&&Yb.has(u)))return}xc(c)||i.push(c);const d=Fc(c,t[u]),f=c.conditionals??[];if(!f.length)return;const _=f.filter(g=>Hc(d,g.conditionalType,g.conditionalValue));(_.length>1&&!_.some(g=>g.conditionalQuestionsAllowMultiple)?_.slice(0,1):_).forEach(g=>{const y=g.conditionalQuestions??[];y.length&&(g.conditionalQuestionsAllowMultiple||s(y))})})};return s(n),i}const Rc="__items",Ko=e=>`${e}${Rc}`;function Kb(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 Jo(e,t,r=[],n=void 0,o=t){for(const i of e){const s=String(i.key),a=Fc(i,t[s]),c=i.conditionals??[];if(!c.length)continue;const u=c.filter(f=>Hc(a,f.conditionalType,f.conditionalValue)),d=u.length>1&&!u.some(f=>f.conditionalQuestionsAllowMultiple)?u.slice(0,1):u;for(const f of d){const _=f.conditionalQuestions??[];if(!_.length)continue;if(!f.conditionalQuestionsAllowMultiple){if(Jo(_,t,r,n,o))return!0;continue}const h=t[Ko(s)]??[];if(h.length===0)return!0;for(const[g,y]of h.entries()){const W=[...r,Ko(s),g],x=bn(_,y,n).filter(R=>!(Kb(R,W)||!Zb(R,y))),H={state:o.state,...y},M=vr(x,H);if(Object.values(M).some(Boolean)||Jo(_,y,W,n,o))return!0}}}return!1}function Qo(e,t,r){return Jo(e,t,[],r,t)}function Xo(e){const t=e.vehicles__items??[];if(!Array.isArray(t)||t.length===0)return!1;for(const r of t)if(bt(r.vehicle_comp_deductible,"select")||bt(r.vehicle_coll_deductible,"select")||bt(r.vehicle_towing_and_labor,"select")||bt(r.vehicle_transportation_expense,"select"))return!0;return!1}function Jb({stages:e,onStageComplete:t,onComplete:r,initialValues:n,initialActive:o,quoteId:i,nonTerminalStageKeys:s}){const[a,c]=m.useState(o??0),[u,d]=m.useState(n??{}),[f,_]=m.useState({}),[h,g]=m.useState(!1),[y,W]=m.useState(!1),[x,H]=m.useState(null),M=m.useRef([]),R=m.useRef(e),C=Array.isArray(e)&&e.length>0,z=C?Math.min(a,e.length-1):0,Y=C?e[z]:null,U=Y?.key??null;m.useEffect(()=>{o!==void 0&&c(o)},[o]),R.current=e;const J=m.useMemo(()=>{const L=z>=e.length-1;return L&&U&&s?.has(U)?!1:!!(L||e.slice(z+1).every(ge=>ge.key==="AutoPolicy")&&(u.drivers__items??[]).length<=1)},[z,e,u,U,s]);m.useEffect(()=>{C&&a>=e.length&&c(e.length-1)},[a,e.length,C]),m.useEffect(()=>{const L=M.current[z];L&&L.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[z]),m.useEffect(()=>{n!==void 0&&d(n)},[n]),m.useEffect(()=>{if(!Y||!U){g(!1),H(null);return}if(f[U]){g(!1),H(null);return}let L=!1;return g(!0),H(null),Promise.resolve(Y.loadQuestions()).then(te=>{if(!L){if(!Array.isArray(te))throw new Error(`loadQuestions("${U}") did not return an array`);_(ge=>({...ge,[U]:te}))}}).catch(te=>{L||H(`Failed to load stage "${Y?.title??""}": ${te?.message??"Unknown error"}`)}).finally(()=>{L||g(!1)}),()=>{L=!0}},[Y,U,f]);const X=U?f[U]:void 0,ie=m.useMemo(()=>Ho(So(X??[])),[X]);m.useEffect(()=>{Y&&U&&X&&zb({stageKey:U,stageTitle:Y.title??U,stepIndex:a+1,totalSteps:e.length})},[U,a,e.length,Y,X]);const Z=m.useMemo(()=>{if(!X)return{};const L={};(D=>{const re=[],O=b=>{b.forEach((p,v)=>{const S=nr(p,v);re.push(S);const w=Ko(S);re.push(w),(p.conditionals??[]).forEach(I=>{const P=I.conditionalQuestions??[];P.length>0&&O(P)})})};return O(D),re})(X).forEach(D=>{D in u&&(L[D]=u[D])});for(const D of["state","State","address","product"])D in u&&(L[D]=u[D]);for(const[D,re]of Object.entries(u))D.endsWith(Rc)&&!(D in L)&&(L[D]=re);return L},[X,u]),ne=L=>{d(te=>({...te,...L}))},pe=()=>{c(L=>L>0?L-1:0),document.querySelector(".panel-body")?.scrollTo({top:0,behavior:"instant"})},Q=async()=>{if(!X||!Y||h||x||y)return;const L=bn(X,Z,U??void 0),te=Sr(u,ie),ge=L.map(I=>fn(I,ie)?{...I,required:te}:I),D=vr(ge,Z),re=new Set(ge.map((I,P)=>nr(I,P))),O=Object.entries(D).some(([I,P])=>P&&re.has(I)),b=Qo(X,u,U??void 0),v=L.some(I=>String(I.key??"")==="vehicle_policy_selections")?Xo(u):!1,S=u.driver_vehicle_assignments,w=u.drivers__items??[];let k=!1;if(S&&w.length>=2){const I=u.vehicles__items??[];for(let P=0;P<I.length;P++){const T=S[`v${P}`];if(!T)continue;const N=w.map(($,K)=>T[`d${K}`]??0),A=N.filter($=>$>0);if(A.length>=2&&A.every($=>$===50)){k=!0;break}const B=N.reduce(($,K)=>$+K,0);if(B>0&&B!==100){k=!0;break}}}if(!(O||b||v||k)){W(!0);try{const I=J,P=I?await r(u,U??""):await t(Z,U??""),{success:T,error:N}=P;if(!T){H(N??"An error occurred");return}if(!I){const A=P.latestStages??R.current,B=A.findIndex(K=>K.key===U),$=B>=0?Math.min(B+1,A.length-1):Math.min(a+1,A.length-1);c($)}}finally{W(!1)}}},ee=m.useMemo(()=>{if(!X||h||x||y)return!0;const L=bn(X,Z,U??void 0),te=Sr(u,ie),ge=L.map(I=>fn(I,ie)?{...I,required:te}:I),D=vr(ge,Z),re=new Set(ge.map((I,P)=>nr(I,P))),O=Object.entries(D).some(([I,P])=>P&&re.has(I)),b=Qo(X,u,U??void 0),v=L.some(I=>String(I.key??"")==="vehicle_policy_selections")?Xo(u):!1,S=u.driver_vehicle_assignments,w=u.drivers__items??[];let k=!1;if(S&&w.length>=2){const I=u.vehicles__items??[];for(let P=0;P<I.length;P++){const T=S[`v${P}`];if(!T)continue;const N=w.map(($,K)=>T[`d${K}`]??0),A=N.filter($=>$>0);if(A.length>=2&&A.every($=>$===50)){k=!0;break}const B=N.reduce(($,K)=>$+K,0);if(B>0&&B!==100){k=!0;break}}}return O||b||v||k},[X,Z,u,h,x,y,ie,U]);return C?l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"form-wizard-steps-header flex items-center justify-between gap-4",children:[l.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((L,te)=>[l.jsx("li",{ref:ge=>{M.current[te]=ge},className:`form-wizard-step-pill px-2.5 py-1 rounded-full border whitespace-nowrap flex-shrink-0 ${te<z?"bg-blue-600 text-white border-blue-600":te===z?"border-blue-600 text-blue-600 bg-white":"border-slate-200 text-slate-600"}`,children:L.title},L.key??`stage-${te}`),...te<e.length-1?[l.jsx("li",{className:"form-wizard-step-arrow text-slate-400 flex-shrink-0",children:"→"},`arrow-${L.key??te}`)]:[]])}),l.jsxs("div",{className:"form-wizard-step-counter text-sm text-slate-500 flex-shrink-0",children:[z+1," / ",e.length]})]}),l.jsxs("div",{children:[h&&l.jsx("div",{className:"text-slate-500",children:"Loading…"}),Y&&l.jsx(Ic,{questions:X??[],controlledValues:Z,onChangeValues:ne,onSubmit:()=>Q(),quoteId:i,widgetStageKey:U??void 0},Y.key)]}),!h&&x&&l.jsxs("div",{className:"text-red-600 text-sm -mt-4",children:[l.jsx("div",{children:x}),Y&&l.jsx("button",{type:"button",className:"credify-retry-btn underline mt-1 font-bold",onClick:()=>{_(L=>{if(!U)return L;const te={...L};return delete te[U],te})},children:"Retry"})]}),l.jsx(Bb,{stageKey:U}),l.jsxs("div",{className:z>0?"grid grid-cols-2 gap-3":"",children:[z>0&&l.jsx("button",{type:"button",onClick:pe,disabled:h,className:"credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition",children:"Back"}),l.jsxs("button",{type:"button","data-widget-ctrl":"next",onClick:Q,disabled:ee,className:["form-wizard-next-btn",z>0?"":"w-full","h-12 rounded-full text-white transition","disabled:opacity-50 disabled:cursor-not-allowed","flex items-center justify-center gap-2",ee?"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:[y&&l.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:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.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"})]}),J?"Finish":"Next"]})]})]}):l.jsx("div",{className:"text-slate-600",children:"Loading..."})}const zc={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"}},jc=["#0369A1","#1D4ED8","#0F766E","#7C3AED","#B45309","#DC2626","#0891B2","#9333EA"];function Qb(e){return e.replace(/[^A-Za-z0-9]/g,"").slice(0,3).toUpperCase()||"CAR"}function Wc(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/_/g," ").trim()}function Ht(e){if(!e)return e;const t=zc[e];return t?t.name:Wc(e)}function Xb(e){const t=new Set,r=[];return e.forEach((n,o)=>{const s=zc[n]??{name:Wc(n),abbr:Qb(n),color:jc[o%jc.length]};t.has(s.name)||(t.add(s.name),r.push(s))}),r}function ev(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),Xb(r)}const tv="https://getcredify.com/privacy-policy";function rv({acknowledged:e,onChange:t,disabled:r=!1}){return l.jsx("div",{className:"privacy-notice-ack rounded-xl border border-slate-200 bg-slate-50 p-4","data-testid":"privacy-notice-acknowledgment",children:l.jsx(mr,{id:"privacy-notice-ack-checkbox",className:"privacy-notice-ack-checkbox",checked:e,onChange:n=>t(n.target.checked),disabled:r,label:l.jsxs(l.Fragment,{children:["I acknowledge I have received Credify’s"," ",l.jsx("a",{href:tv,target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Notice"}),"."]})})})}function nv({carrierName:e,formattedPremium:t,lobLabel:r,acknowledged:n,onAcknowledgeChange:o,onCancel:i,onProceed:s,isProcessing:a,hasError:c}){const u=!n||a;return l.jsxs("div",{className:"bind-confirmation","data-testid":"bind-confirmation",role:"group","aria-label":"Confirm your bind request",children:[l.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Confirm your bind request"}),l.jsxs("div",{className:"mt-4 rounded-xl border border-slate-200 bg-white p-4",children:[r&&l.jsx("div",{className:"mb-1 text-xs font-semibold uppercase tracking-wide text-slate-500",children:r}),l.jsx("p",{className:"font-semibold text-slate-900",children:e}),l.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:[t,l.jsx("span",{className:"ml-1 text-sm font-medium text-slate-500",children:"/month"})]})]}),l.jsx("div",{className:"mt-4",children:l.jsx(rv,{acknowledged:n,onChange:o,disabled:a})}),c&&l.jsx("p",{className:"mt-3 text-sm text-red-600",role:"alert",children:"Something went wrong while processing your bind request. Please try again."}),l.jsxs("div",{className:"mt-6 grid grid-cols-2 gap-3",children:[l.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"}),l.jsxs("button",{type:"button","data-testid":"bind-confirmation-proceed",onClick:s,disabled:u,className:["h-12 rounded-full text-white font-bold transition","flex items-center justify-center gap-2","disabled:cursor-not-allowed",u?"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&&l.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:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.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 qc=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"});function Gc(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 vn={PersonalHome:"Homeowners",PersonalAuto:"Personal Auto",Flood:"Flood",ExcessFlood:"Excess Flood",_other:"Other"},Sn=["PersonalHome","PersonalAuto","Flood","ExcessFlood"];function ov(e){if(e.length===0)return[];const t=(n,o)=>Ht(n.carrier_name).localeCompare(Ht(o.carrier_name));if(!e.some(n=>n.lob))return[{lob:null,title:"Not Quoted",rates:[...e].sort(t)}];const r=new Map;for(const n of e){const o=n.lob||"_other",i=r.get(o);i?i.push(n):r.set(o,[n])}return[...r.entries()].sort(([n],[o])=>{const i=Sn.indexOf(n),s=Sn.indexOf(o);return(i===-1?999:i)-(s===-1?999:s)}).map(([n,o])=>({lob:n,title:vn[n]??n,rates:[...o].sort(t)}))}function Zc({onBack:e}){const t=()=>{qb(),e?.()};return l.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 iv({rate:e,status:t,onRequestBind:r,disabled:n,showLobLabel:o=!0,className:i}){const s=Gc(e)/100,a=qc.format(s),c=t==="loading",u=t==="success",d=!!n||c||u,f=!!(e.effective_date&&e.policy_end_date),_=e.lob?vn[e.lob]||e.lob:null,h=(e.coverages??[]).filter(g=>!!g&&typeof g.label=="string"&&g.label.trim()!==""&&typeof g.value=="string"&&g.value.trim()!=="");return l.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&&_&&l.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-slate-500",children:_}),l.jsxs("div",{className:"mb-4 flex flex-col items-start gap-2",children:[e.carrier_logo_base64?l.jsx("img",{src:`data:image/png;base64,${e.carrier_logo_base64}`,alt:Ht(e.carrier_name),className:"h-12 w-auto max-w-full object-contain"}):l.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:Ht(e.carrier_name).charAt(0).toUpperCase()}),l.jsx("h4",{className:"w-full break-words text-left font-semibold text-slate-900",children:Ht(e.carrier_name)})]}),l.jsx("div",{className:"mb-2",children:l.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:[a,l.jsx("span",{className:"ml-1 text-sm font-medium text-slate-500",children:"/month"})]})}),f&&l.jsx("div",{className:"mb-2",children:l.jsxs("p",{className:"text-xs text-slate-500",children:["Effective ",e.effective_date," - ",e.policy_end_date]})}),e.carrier_quote_id&&l.jsx("div",{className:"mb-4",children:l.jsxs("p",{className:"text-xs text-slate-400",children:["Quote ID: ",e.carrier_quote_id]})}),h.length>0&&l.jsx("div",{className:"mb-2 border-t border-slate-200 pt-3",children:l.jsx("dl",{children:h.map((g,y)=>l.jsxs("div",{className:"flex items-baseline justify-between gap-2 py-1",children:[l.jsx("dt",{className:"text-xs text-slate-600",children:g.label}),l.jsx("dd",{className:"text-right text-xs font-semibold text-slate-900",children:g.value})]},`${g.label}-${y}`))})}),l.jsxs("div",{className:"mt-auto pt-4",children:[l.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 ${u?"rates-bind-btn-requested":"hover:bg-blue-600/90 disabled:bg-slate-300 disabled:text-slate-500"}`,children:c?"Requesting…":u?"Requested":"Request Bind"}),t==="error"&&l.jsx("p",{className:"mt-2 text-xs text-red-600",children:"Something went wrong. Please try again."}),t==="success"&&l.jsx("p",{className:"mt-2 text-xs text-emerald-600",children:"We received your bind request."})]})]})}function sv({item:e}){const t=Ht(e.carrier_name),r=(e.decline_reasons??[]).filter(Boolean);return l.jsxs("div",{className:"flex w-full gap-4 rounded-xl border border-slate-200 bg-white p-4 shadow-sm",children:[l.jsx("div",{className:"shrink-0",children:e.carrier_logo_base64?l.jsx("img",{src:`data:image/png;base64,${e.carrier_logo_base64}`,alt:t,className:"h-10 w-auto max-w-[7rem] object-contain"}):l.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-md bg-slate-100 text-sm font-semibold text-slate-500",children:t.charAt(0).toUpperCase()})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("div",{className:"flex flex-wrap items-center gap-2",children:l.jsx("h4",{className:"break-words font-semibold text-slate-900",children:t})}),r.length>0?l.jsx("ul",{className:"mt-2 list-disc space-y-1 pl-5 text-sm text-slate-600",children:r.map((n,o)=>l.jsx("li",{children:n},o))}):l.jsx("p",{className:"mt-2 text-sm text-slate-500",children:"This carrier did not return a quote."})]})]})}function av({rates:e,onBack:t,isBundleFlow:r=!1}){const n=Array.isArray(e)?e:[],o=n.length>0,[i,s]=m.useState({}),[a,c]=m.useState("admitted"),[u,d]=m.useState(!1),[f,_]=m.useState(null),[h,g]=m.useState(!1),y=m.useMemo(()=>n.some(D=>D.lob==="PersonalAuto"),[n]),W=m.useMemo(()=>n.some(D=>D.lob==="PersonalHome"),[n]),x=m.useMemo(()=>{if(!r)return[];const D=[];return y&&D.push("PersonalAuto"),W&&D.push("PersonalHome"),D},[r,y,W]),H=m.useMemo(()=>{const D=new Set;for(const re of n){const O=re.lob??null;O&&i[re.quote_rate_id]==="success"&&D.add(O)}return D},[n,i]),M=m.useMemo(()=>Object.values(i).some(D=>D==="success"),[i]),R=m.useMemo(()=>u?!0:!r||x.length===0?M:x.every(D=>H.has(D)),[u,r,M,x,H]),C=m.useMemo(()=>o?n.filter(D=>(D.admitted_status??"admitted")==="admitted"):[],[n,o]),z=m.useMemo(()=>o?n.filter(D=>D.admitted_status==="non_admitted"):[],[n,o]),Y=m.useMemo(()=>o?n.filter(D=>D.admitted_status==="not_quoted"):[],[n,o]),U=C.length,J=z.length,X=Y.length,ie=U+J>0,Z=ie||X>0,ne=m.useMemo(()=>ov(Y),[Y]);m.useEffect(()=>{Z&&a==="admitted"&&U===0&&(J>0?c("non_admitted"):X>0&&c("not_quoted"))},[a,U,J,X,Z]);const pe=m.useMemo(()=>ie?a==="admitted"?C:a==="non_admitted"?z:[]:[],[ie,a,C,z]);m.useEffect(()=>{qo()},[]),m.useEffect(()=>{!R||u||(Z0(),_c(),d(!0))},[R,u]);const Q=m.useMemo(()=>{if(pe.length===0)return[];if(!pe.some(b=>b.lob))return[{lob:null,title:"Rates",rates:[...pe].sort((p,v)=>{const S=Number.isFinite(p.term_months)&&p.term_months>0?p.term_months:1,w=Number.isFinite(v.term_months)&&v.term_months>0?v.term_months:1,k=p.monthly_premium_cents??Math.round((p.premium_cents||0)/S),I=v.monthly_premium_cents??Math.round((v.premium_cents||0)/w);return k-I})}];const re=new Map;for(const b of pe){const p=b.lob||"_other",v=re.get(p);v?v.push(b):re.set(p,[b])}return[...re.entries()].sort(([b],[p])=>{const v=Sn.indexOf(b),S=Sn.indexOf(p);return(v===-1?999:v)-(S===-1?999:S)}).map(([b,p])=>({lob:b,title:vn[b]??b,rates:[...p].sort((v,S)=>{const w=Number.isFinite(v.term_months)&&v.term_months>0?v.term_months:1,k=Number.isFinite(S.term_months)&&S.term_months>0?S.term_months:1,I=v.monthly_premium_cents??Math.round((v.premium_cents||0)/w),P=S.monthly_premium_cents??Math.round((S.premium_cents||0)/k);return I-P})}))},[pe]),ee=m.useMemo(()=>{if(!r)return[];const D=n.some(b=>b.lob==="PersonalAuto"),re=n.some(b=>b.lob==="PersonalHome"),O=[];return D||O.push("Sorry, no rates found for Personal Auto."),re||O.push("Sorry, no rates found for Homeowners."),O},[r,n]);if(!Z)return l.jsxs("section",{className:"mt-8",children:[l.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Rates"}),l.jsx("p",{className:"mt-2 text-sm text-slate-500",children:"Sorry, no rates are available at this time."}),t&&l.jsx(Zc,{onBack:t})]});const L=D=>{s(re=>({...re,[D.quote_rate_id]:"idle"})),g(!1),_({cardKey:D.quote_rate_id,rate:D})},te=()=>{_(null),g(!1)},ge=async()=>{if(!f||!h)return;const D=f.cardKey;s(re=>({...re,[D]:"loading"}));try{if(qo(),!Bt())throw new Error("Authentication required. Please verify your phone number first.");if(!((await bb(D,!0))?.success!==!1))throw new Error("Request failed");s(p=>({...p,[D]:"success"})),_(null),g(!1)}catch{s(re=>({...re,[D]:"error"}))}};if(f){const D=f.rate.lob?vn[f.rate.lob]||f.rate.lob:null;return l.jsx("section",{className:"mt-8",children:l.jsx(nv,{carrierName:Ht(f.rate.carrier_name),formattedPremium:qc.format(Gc(f.rate)/100),lobLabel:D,acknowledged:h,onAcknowledgeChange:g,onCancel:te,onProceed:ge,isProcessing:i[f.cardKey]==="loading",hasError:i[f.cardKey]==="error"})})}return l.jsxs("section",{className:"mt-8",children:[l.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Rates"}),ee.length>0&&l.jsx("div",{className:"mt-3 space-y-1",children:ee.map(D=>l.jsx("p",{className:"text-sm text-slate-600",children:D},D))}),l.jsx("div",{className:"mt-4 border-b border-slate-200",children:l.jsxs("div",{className:"flex items-center gap-6",children:[l.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 (",U,")"]}),l.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 (",J,")"]}),X>0&&l.jsxs("button",{type:"button",onClick:()=>c("not_quoted"),className:`border-b-2 px-1 py-2 text-sm font-semibold transition ${a==="not_quoted"?"border-cyan-500 text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Not Quoted (",X,")"]})]})}),a==="not_quoted"?ne.map(D=>l.jsxs("div",{className:"mt-6",children:[D.lob!=null&&l.jsx("h4",{className:"mb-3 text-base font-semibold text-slate-800",children:D.title}),l.jsx("div",{className:"space-y-3",children:D.rates.map(re=>l.jsx(sv,{item:re},re.quote_rate_id))})]},D.lob??"all")):l.jsxs(l.Fragment,{children:[pe.length===0&&l.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."}),pe.length>0&&Q.map(D=>l.jsxs("div",{className:"mt-6",children:[l.jsx("h4",{className:"mb-3 text-base font-semibold text-slate-800",children:D.title}),l.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:D.rates.map(re=>l.jsx("div",{className:"w-full min-w-0",children:l.jsx(iv,{rate:re,showLobLabel:D.lob==null,status:i[re.quote_rate_id]??"idle",disabled:R||(r?!!(re.lob&&x.includes(re.lob)&&H.has(re.lob)):M),onRequestBind:()=>L(re)})},re.quote_rate_id))})]},D.lob??"all"))]}),t&&l.jsx(Zc,{onBack:t})]})}function cv({stageKey:e,title:t,questions:r,values:n,onChangeValues:o,review:i,quoteId:s}){return l.jsxs("section",{id:`review-section-${e}`,"data-testid":`review-section-${e}`,className:`review-section rounded-lg border p-4 ${i.hasIssues?"border-amber-300 bg-amber-50/40":"border-slate-200"}`,children:[l.jsxs("div",{className:"flex items-center justify-between gap-3 mb-3",children:[l.jsx("h3",{className:"text-base font-semibold text-text-primary",children:t}),i.hasIssues?l.jsxs("span",{"data-testid":`review-section-${e}-badge`,className:"shrink-0 rounded-full bg-amber-100 border border-amber-300 text-amber-800 text-xs font-semibold px-2.5 py-1",children:[i.issues.length," ",i.issues.length===1?"field needs":"fields need"," attention"]}):l.jsx("svg",{"data-testid":`review-section-${e}-ok`,className:"h-5 w-5 shrink-0 text-emerald-600",viewBox:"0 0 20 20",fill:"currentColor",role:"img","aria-label":"Section complete",children:l.jsx("path",{fillRule:"evenodd",d:"M16.704 5.29a1 1 0 010 1.415l-7.5 7.5a1 1 0 01-1.415 0l-3.5-3.5a1 1 0 011.415-1.415l2.792 2.793 6.793-6.793a1 1 0 011.415 0z",clipRule:"evenodd"})})]}),i.hasIssues&&l.jsx("ul",{className:"mb-3 list-disc list-inside space-y-0.5 text-sm text-amber-800","data-testid":`review-section-${e}-issues`,children:i.issues.map(a=>l.jsxs("li",{children:[a.label,": ",a.message]},a.key))}),l.jsx(Ic,{questions:r,controlledValues:n,onChangeValues:o,onSubmit:()=>{},quoteId:s,widgetStageKey:e})]})}const lv=new Set(["SMSVerification","CanopyConnect","Phone"]);function uv({stageKey:e,questions:t,values:r}){const n=bn(t,r,e),o=vr(n,r),i=new Map(n.map((u,d)=>[nr(u,d),u])),s={},a=[];for(const[u,d]of Object.entries(o))!d||!i.has(u)||(s[u]=d,a.push({key:u,label:i.get(u)?.question??u,message:d}));if(Qo(t,r,e)&&a.push({key:"__repeatable",label:"Repeated entries",message:"One or more entries are incomplete"}),n.some(u=>String(u.key??"")==="vehicle_policy_selections")&&Xo(r)&&a.push({key:"__vehicle_policy",label:"Vehicle coverage selections",message:"Coverage selections are incomplete"}),mv(r,n)&&a.push({key:"__dva",label:"Driver usage",message:"Driver usage percentages must total 100% (50/50 is not allowed)"}),n.some(u=>u.inputType==="address"&&String(u.key??"")==="address")){const u=pv(r);u&&a.push(u)}return{stageKey:e,errorsByKey:s,issues:a,hasIssues:a.length>0}}const dv=/^[A-Z]{2}$/,fv=/^\d{5}(-\d{4})?$/;function pv(e){if(!(typeof e.address=="string"?e.address.trim():""))return null;const r=typeof e.state=="string"?e.state.trim().toUpperCase():"",n=e.postal_code==null?"":String(e.postal_code).trim();return dv.test(r)&&fv.test(n)?null:{key:"__address",label:"Property address",message:"Select your address from the dropdown suggestions so we can verify the state and ZIP code"}}function mv(e,t){if(!t.some(i=>String(i.key??"")==="driver_vehicle_assignments"||String(i.key??"")==="vehicle_policy_selections"))return!1;const r=e.driver_vehicle_assignments,n=e.drivers__items??[];if(!r||n.length<2)return!1;const o=e.vehicles__items??[];for(let i=0;i<o.length;i++){const s=r[`v${i}`];if(!s)continue;const a=n.map((d,f)=>s[`d${f}`]??0),c=a.filter(d=>d>0);if(c.length>=2&&c.every(d=>d===50))return!0;const u=a.reduce((d,f)=>d+f,0);if(u>0&&u!==100)return!0}return!1}function cr(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 f=u.replace("__items","");i.add(f),n.includes(f)&&d.forEach(_=>{typeof _=="object"&&_!==null&&Object.keys(_).forEach(h=>{o.add(h)})})}for(const[u,d]of Object.entries(e))if(u.endsWith("__items")){const f=u.replace("__items","");if(n.includes(f)){const h=Array.isArray(d)?d.map(g=>cr(g)):d;t[f]=h}}else if(!u.includes("__items")){if(i.has(u))continue;o.has(u)||(t[u]=r(d))}const s=t.auto_prior_carrier_name;if(typeof s=="string"&&s.trim()!==""){const u=s==="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 a=t.home_prior_carrier_name;if(typeof a=="string"&&a.trim()!==""){const u=a==="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=ln(d.industry),d.education_level=Ja(d.education_level),d.occupation=Qa(d.occupation),d}));const c=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 f=Math.min(d,c);t.sale_price_cents=f*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,f=d.amount_paid_cents;if(typeof f!="number"||!Number.isFinite(f))return d;const _=Math.trunc(f),h=Math.min(Math.max(_,0),c);return{...d,amount_paid_cents:h*100}})),t}const _v={AL:"Alabama",AK:"Alaska",AZ:"Arizona",AR:"Arkansas",CA:"California",CO:"Colorado",CT:"Connecticut",DE:"Delaware",DC:"District of Columbia",FL:"Florida",GA:"Georgia",HI:"Hawaii",ID:"Idaho",IL:"Illinois",IN:"Indiana",IA:"Iowa",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",ME:"Maine",MD:"Maryland",MA:"Massachusetts",MI:"Michigan",MN:"Minnesota",MS:"Mississippi",MO:"Missouri",MT:"Montana",NE:"Nebraska",NV:"Nevada",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NY:"New York",NC:"North Carolina",ND:"North Dakota",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PA:"Pennsylvania",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VT:"Vermont",VA:"Virginia",WA:"Washington",WV:"West Virginia",WI:"Wisconsin",WY:"Wyoming",PR:"Puerto Rico"};function Vc(e){const t=e?.trim().toUpperCase();if(!t)return"your state";const r=_v[t];return r?`${r} (${t})`:"your state"}const hv=1500;function gv({stages:e,initialValues:t,quoteId:r,isSubmitting:n,onConfirmed:o}){const i=m.useMemo(()=>e.filter(Z=>!lv.has(String(Z.key))),[e]),[s,a]=m.useState(t),[c,u]=m.useState({}),[d,f]=m.useState(null),[_,h]=m.useState(!0),[g,y]=m.useState(0),[W,x]=m.useState(!1),[H,M]=m.useState(null);m.useEffect(()=>{let Z=!1;return h(!0),f(null),Promise.all(i.map(async ne=>{const pe=await ne.loadQuestions();return[String(ne.key),[...pe]]})).then(ne=>{Z||u(Object.fromEntries(ne))}).catch(ne=>{Z||f(ne instanceof Error?ne.message:"Failed to load your review")}).finally(()=>{Z||h(!1)}),()=>{Z=!0}},[i,g]);const R=m.useRef(null),C=m.useRef(!0);m.useEffect(()=>{if(C.current){C.current=!1;return}return R.current&&window.clearTimeout(R.current),R.current=window.setTimeout(()=>{Ut(cr(s),!1).catch(Z=>{console.warn("Review autosave failed (will retry on next edit / submit)",Z)})},hv),()=>{R.current&&window.clearTimeout(R.current)}},[s]);const z=m.useCallback(Z=>{a(ne=>({...ne,...Z}))},[]),Y=m.useMemo(()=>{const Z={};for(const ne of i){const pe=String(ne.key),Q=c[pe];Q&&(Z[pe]=uv({stageKey:pe,questions:Q,values:s}))}return Z},[i,c,s]),U=m.useMemo(()=>Object.values(Y).reduce((Z,ne)=>Z+ne.issues.length,0),[Y]),J=!_&&!d&&U===0&&W&&!n,X=m.useCallback(()=>{const Z=i.find(ne=>Y[String(ne.key)]?.hasIssues);Z&&document.getElementById(`review-section-${String(Z.key)}`)?.scrollIntoView({behavior:"smooth",block:"start"})},[i,Y]),ie=m.useCallback(async()=>{if(J){M(null);try{const Z=typeof s.state=="string"?s.state:"";if(Z){const{isSupported:ne}=await gc(Z);if(!ne){M(`Sorry, Credify Corporation doesn't currently offer insurance in ${Vc(Z)}. We're expanding our coverage and hope to serve your state soon.`);return}}await o(s)}catch{M("Oops, something went wrong. Please try again later.")}}},[J,s,o]);return _?l.jsx("div",{className:"flex items-center justify-center py-12","data-testid":"review-loading",children:l.jsx("div",{className:"text-slate-600",children:"Loading your details..."})}):d?l.jsxs("div",{className:"text-red-600 text-sm","data-testid":"review-load-error",children:[l.jsx("div",{children:d}),l.jsx("button",{type:"button",className:"credify-retry-btn underline mt-1 font-bold",onClick:()=>y(Z=>Z+1),children:"Retry"})]}):l.jsxs("div",{className:"space-y-6","data-testid":"review-screen",children:[l.jsxs("div",{className:"text-center",children:[l.jsx("h3",{className:"text-lg font-semibold text-text-primary",children:"Review your information"}),l.jsx("p",{className:"text-sm text-slate-600 mt-1",children:"Here's what we collected during your conversation. Please review each section, fix anything we got wrong, and fill in anything missing — then confirm below to see your quotes."})]}),U>0&&l.jsxs("div",{className:"sticky top-0 z-10 flex items-center justify-between gap-3 rounded-md border border-amber-300 bg-amber-50 px-4 py-2.5 text-sm text-amber-800",role:"status","data-testid":"review-issue-summary",children:[l.jsxs("span",{children:[U," ",U===1?"field needs":"fields need"," your attention before you can continue."]}),l.jsx("button",{type:"button",onClick:X,className:"shrink-0 font-bold underline text-amber-800 hover:text-amber-900",children:"Show me"})]}),i.map(Z=>{const ne=String(Z.key),pe=c[ne],Q=Y[ne];return!pe||!Q?null:l.jsx(cv,{stageKey:ne,title:Z.title,questions:pe,values:s,onChangeValues:z,review:Q,quoteId:r},ne)}),l.jsxs("div",{className:"rounded-lg border border-slate-200 p-4 space-y-4","data-testid":"review-consent-block",children:[l.jsx(mr,{id:"review-terms-checkbox","data-testid":"review-terms-checkbox",checked:W,onChange:Z=>x(Z.target.checked),disabled:n,label:"I have reviewed my information and confirm it is accurate, and I agree to the Terms of Service and Privacy Policy."}),l.jsxs("p",{className:"text-sm text-slate-600",children:["Credify Corporation – Texas #3309669."," ",l.jsx("a",{href:"https://getcredify.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})," ","|"," ",l.jsx("a",{href:"https://getcredify.com/terms-of-service",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Terms of Service"})]})]}),H&&l.jsx("div",{className:"text-red-600 text-sm",role:"alert","data-testid":"review-submit-error",children:H}),l.jsxs("button",{type:"button","data-testid":"review-submit","data-widget-ctrl":"review-submit",onClick:ie,disabled:!J,className:["form-wizard-next-btn w-full","h-12 rounded-full text-white font-bold transition","disabled:opacity-50 disabled:cursor-not-allowed","flex items-center justify-center gap-2",J?"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":"bg-gray-300"].join(" "),children:[n&&l.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:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.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"})]}),"Confirm & See My Quotes"]})]})}const ei=["Validating your details...","Checking underwriting rules...","Applying eligible discounts...","Reviewing your risk profile...","Calculating premium...","Check complete"],Yc={Auto:{label:"Auto Policy",icon:"🚗",accent:"#0369A1"},Home:{label:"Home Policy",icon:"🏠",accent:"#059669"},Bundle:{label:"Home + Auto Bundle",icon:"🔗",accent:"#7C3AED"}},Kc={Auto:6e4,Home:9e4,Bundle:12e4};function yv({progress:e,color:t,size:r=80}){const n=(r-10)/2,o=2*Math.PI*n,i=o-e/100*o;return l.jsxs("svg",{width:r,height:r,style:{transform:"rotate(-90deg)"},children:[l.jsx("circle",{cx:r/2,cy:r/2,r:n,fill:"none",stroke:"#F1F5F9",strokeWidth:6}),l.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 bv({providers:e=[],totalTime:t=6e4,flow:r="Auto",isComplete:n=!1,onComplete:o}){const i=Yc[r]??Yc.Auto,s=Kc[r]??Kc.Auto,a=e.length>0?Math.floor(s/e.length):t,[c,u]=m.useState(0),[d,f]=m.useState(0),[_,h]=m.useState(0),[g,y]=m.useState(0),[W,x]=m.useState(!0),H=m.useRef(n),M=m.useRef(o),R=m.useRef(c),C=m.useRef(e.length),z=m.useRef(!1),Y=m.useRef(!1);m.useEffect(()=>{H.current=n,n&&e.length===0&&!z.current&&(z.current=!0,M.current?.())},[n,e.length]),m.useEffect(()=>{M.current=o},[o]),m.useEffect(()=>{R.current=c},[c]),m.useEffect(()=>{C.current=e.length,e.length>0&&(Y.current=!1,u(0),f(0),h(0),y(0),x(!0))},[e.length]),m.useEffect(()=>{if(e.length===0){H.current&&!z.current&&(z.current=!0,M.current?.());return}Y.current=!1;const ie=100,Z=100/(a/ie),ne=setInterval(()=>{h(pe=>{if(Y.current||z.current)return pe;const Q=pe+Z;return Q<100?Q:(Y.current=!0,setTimeout(()=>{if(H.current){if(z.current)return;z.current=!0,M.current?.();return}const L=R.current===C.current-1;x(!1),setTimeout(()=>{L?(u(0),f(te=>te+1)):u(te=>te+1),h(0),y(0),x(!0)},300)},400),100)})},ie);return()=>clearInterval(ne)},[c,a,e.length]),m.useEffect(()=>{if(e.length===0)return;const ie=Math.floor(a/ei.length),Z=setInterval(()=>y(ne=>Math.min(ne+1,ei.length-1)),ie);return()=>clearInterval(Z)},[c,a,e.length]);const U=e.length===0,J=U?null:e[Math.min(c,e.length-1)],X=d>0;return l.jsxs(l.Fragment,{children:[l.jsx("style",{children:`
|
|
64
64
|
@keyframes providerPulse {
|
|
65
65
|
0%, 100% { transform: scale(1); }
|
|
66
66
|
50% { transform: scale(1.05); }
|
|
@@ -95,5 +95,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
95
95
|
.iq-status-text {
|
|
96
96
|
animation: statusFadeIn 0.25s ease forwards;
|
|
97
97
|
}
|
|
98
|
-
`}),l.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:l.jsxs("div",{style:{width:"100%",maxWidth:560},children:[l.jsxs("div",{style:{textAlign:"center",marginBottom:40},children:[l.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:[l.jsx("span",{style:{fontSize:14},children:i.icon}),l.jsx("span",{style:{fontSize:12,fontWeight:700,color:i.accent,letterSpacing:"0.1em",textTransform:"uppercase"},children:i.label})]}),l.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"}),l.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"})]}),l.jsx("div",{style:{display:"flex",justifyContent:"center",marginBottom:32},children:R?l.jsx("div",{style:{display:"flex",gap:20},children:[0,1,2,3,4].map(oe=>l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:6},children:[l.jsx("div",{style:{width:48,height:48,borderRadius:14,background:"#E2E8F0",animation:"skeletonPulse 1.4s ease-in-out infinite",animationDelay:`${oe*.12}s`}}),l.jsx("div",{style:{width:40,height:8,borderRadius:4,background:"#E2E8F0",animation:"skeletonPulse 1.4s ease-in-out infinite",animationDelay:`${oe*.12}s`}})]},`skeleton-${oe}`))}):ee?l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:8},children:[l.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,l.jsx("div",{style:{position:"absolute",inset:-5,borderRadius:22,border:`2px solid ${ee.color}`,pointerEvents:"none",animation:"ringPulse 1.6s ease-in-out infinite"}})]}),l.jsx("span",{style:{fontSize:13,fontWeight:600,color:ee.color,letterSpacing:"0.04em"},children:ee.name})]}):null}),l.jsxs("div",{className:`iq-card-fade ${W?"iq-card-visible":"iq-card-hidden"}`,style:{background:"#FFFFFF",borderRadius:24,border:"1px solid #E2E8F0",padding:32},children:[l.jsx("div",{style:{display:"flex",alignItems:"center",gap:20,marginBottom:28},children:R||!ee?l.jsxs("div",{style:{flex:1,textAlign:"center",padding:"8px 0"},children:[l.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.1em",textTransform:"uppercase",margin:"0 0 6px"},children:"Please wait"}),l.jsx("h2",{style:{fontSize:18,fontWeight:700,color:"#0F172A",margin:"0 0 6px",letterSpacing:"-0.02em"},children:"Checking eligible providers"}),l.jsx("p",{style:{fontSize:13,color:"#64748B",margin:0},children:"Reviewing your details against our carrier network"})]}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{style:{position:"relative",flexShrink:0},children:[l.jsx(cv,{progress:m,color:ee.color,size:80}),l.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsxs("span",{style:{fontSize:14,fontWeight:700,color:ee.color},children:[Math.round(m),"%"]})})]}),l.jsxs("div",{style:{flex:1},children:[l.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.1em",textTransform:"uppercase",margin:"0 0 4px"},children:te?"Still checking":"Now checking"}),l.jsx("h2",{style:{fontSize:20,fontWeight:700,color:"#0F172A",margin:"0 0 6px",letterSpacing:"-0.02em"},children:ee.name}),l.jsx("p",{className:"iq-status-text",style:{fontSize:13,color:"#64748B",margin:0},children:Xo[h]},`${c}-${h}`)]})]})}),l.jsxs("div",{children:[l.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.08em",textTransform:"uppercase",margin:"0 0 8px"},children:R?"Initializing":"Gathering quotes"}),l.jsx("div",{style:{height:6,background:"#F1F5F9",borderRadius:100,overflow:"hidden"},children:l.jsx("div",{style:{height:"100%",width:"35%",background:i.accent,borderRadius:100,animation:"shimmerSlide 1.4s ease-in-out infinite"}})})]})]})]})})]})}function Yc({onGoBack:e}){return l.jsxs("section",{className:"mt-4",children:[l.jsxs("div",{className:"rounded-xl border border-red-200 bg-red-50 p-5",children:[l.jsx("h3",{className:"text-base font-semibold text-red-700",children:"Sorry, quote submission failed"}),l.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."})]}),l.jsx("div",{className:"mt-5",children:l.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"})})]})}var ei={};function uv(){try{return typeof ei<"u"&&ei?ei:{}}catch{return{}}}function dv(e){const t=uv(),r=e?.intercomAppId??t.intercomAppId,n=e?.cobrowseLicense??t.cobrowseLicense;return{enabled:(e?.enabled??!0)&&!!(r||n),intercomAppId:r||void 0,cobrowseLicense:n||void 0,proactiveOnError:e?.proactiveOnError??!0}}const ti=new Map;function Vc(e){if(typeof document>"u")return Promise.reject(new Error("loadScript called without a document"));const t=ti.get(e);if(t)return t;const r=new Promise((n,o)=>{const i=document.createElement("script");i.src=e,i.async=!0,i.onload=()=>n(),i.onerror=()=>{ti.delete(e),o(new Error(`Failed to load script: ${e}`))},document.head.appendChild(i)});return ti.set(e,r),r}let ri=!1;function fv(){if(typeof window.Intercom=="function")return window.Intercom;const e=function(...t){e.c?.(t)};return e.q=[],e.c=t=>{e.q.push(t)},window.Intercom=e,e}function pv(e){const t={app_id:e,hide_default_launcher:!0},r=fn();return r&&(t.quote_id=r),t}function Kc(e){if(typeof window>"u")return;fv();const t=pv(e);if(window.intercomSettings=t,ri){window.Intercom("update",t);return}window.Intercom("boot",t),ri=!0,Vc(`https://widget.intercom.io/widget/${e}`).catch(()=>{})}function mv(){typeof window?.Intercom=="function"&&window.Intercom("show")}function _v(e){typeof window?.Intercom=="function"&&window.Intercom("showNewMessage",e)}function hv(e){typeof window?.Intercom=="function"&&window.Intercom("update",e)}function gv(){if(typeof window?.Intercom=="function")try{window.Intercom("shutdown")}catch{}ri=!1}const yv="https://js.cobrowse.io/CobrowseIO.js";let ni=!1;async function bv(e){await Vc(yv);const t=window.CobrowseIO;if(!t)return null;if(!ni){t.license=e,t.redactedViews=["input","select","textarea","[data-credify-redact]"],t.customData={quote_id:fn()??void 0,device_name:"Credify Insurance Widget"},t.confirmSession=()=>Promise.resolve(typeof window<"u"?window.confirm("Allow a Credify support agent to view your screen?"):!1);try{await t.client?.()}catch{}t.start?.(),ni=!0}return t}async function vv(e){if(typeof window>"u")return null;try{const t=await bv(e);return t?.createSessionCode?await t.createSessionCode():null}catch{return null}}function Sv(){try{window.CobrowseIO?.stop?.()}catch{}ni=!1}const Ev="Hi! It looks like something went wrong submitting your quote. We're here to help — tell us what you were trying to do and we'll jump in.";let Qe=null,vn=null,oi=!1;function wv(e){Xc();const t=dv(e);if(Qe=t,!!t.enabled&&t.proactiveOnError&&t.intercomAppId){const r=n=>{oi||(oi=!0,Kc(t.intercomAppId),hv({last_quote_error:n?.reason??"unknown"}),_v(Ev))};Tc("submissionFailed",r),vn=r}}function Jc(){!Qe?.enabled||!Qe.intercomAppId||(Kc(Qe.intercomAppId),mv())}function Qc(){return!Qe?.enabled||!Qe.cobrowseLicense?Promise.resolve(null):vv(Qe.cobrowseLicense)}function Cv(){return!!(Qe?.enabled&&Qe.intercomAppId)}function Av(){return!!(Qe?.enabled&&Qe.cobrowseLicense)}function Xc(){vn&&(kc("submissionFailed",vn),vn=null),gv(),Sv(),oi=!1,Qe=null}const Tv="Chat with our support team in real time — we'll help you finish your quote.",kv="Share your screen with a support agent so they can see what you see and guide you in real time. We'll generate a secure code — share it with your agent to begin. Your personal information stays hidden.",el="inline-flex h-9 w-9 items-center justify-center rounded-full text-slate-500 hover:bg-slate-100 hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-400 disabled:opacity-60",tl="pointer-events-none absolute bottom-full left-1/2 z-10 mb-2 w-60 -translate-x-1/2 rounded-lg bg-slate-800 px-3 py-2 text-center text-xs leading-snug text-white opacity-0 shadow-lg transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100";function Iv(){const e=Cv(),t=Av(),[r,n]=y.useState(null),[o,i]=y.useState(!1),[s,a]=y.useState(!1),c=y.useCallback(async()=>{i(!0),a(!1);try{const u=await Qc();u?n(u):a(!0)}finally{i(!1)}},[]);return!e&&!t?null:l.jsxs("div",{className:"flex flex-col items-center gap-1.5 text-sm text-slate-500",children:[l.jsx("span",{className:"font-medium",children:"Need help?"}),l.jsxs("div",{className:"inline-flex items-center gap-1",children:[e&&l.jsxs("span",{className:"group relative inline-flex",children:[l.jsx("button",{type:"button",onClick:Jc,"aria-label":"Chat with support","aria-describedby":"credify-chat-tooltip",className:el,children:l.jsx("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8","aria-hidden":"true",children:l.jsx("path",{d:"M21 11.5a8.38 8.38 0 0 1-8.5 8.5 9 9 0 0 1-3.8-.8L3 21l1.3-4.2A8.38 8.38 0 0 1 3.5 11.5 8.5 8.5 0 0 1 12 3a8.38 8.38 0 0 1 9 8.5Z",strokeLinejoin:"round"})})}),l.jsx("span",{id:"credify-chat-tooltip",role:"tooltip",className:tl,children:Tv})]}),e&&t&&l.jsx("span",{className:"mx-1 h-6 w-px bg-slate-200","aria-hidden":"true"}),t&&l.jsxs("span",{className:"group relative inline-flex",children:[l.jsx("button",{type:"button",onClick:c,disabled:o,"aria-label":"Share your screen with an agent","aria-describedby":"credify-cobrowse-tooltip",className:el,children:o?l.jsx("span",{className:"h-4 w-4 animate-spin rounded-full border-2 border-slate-300 border-t-slate-600","aria-hidden":"true"}):l.jsxs("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8","aria-hidden":"true",children:[l.jsx("rect",{x:"2.5",y:"4",width:"19",height:"13",rx:"2"}),l.jsx("path",{d:"M8 21h8M12 17v4",strokeLinecap:"round"}),l.jsx("path",{d:"M12 13V8m0 0-2 2m2-2 2 2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),l.jsx("span",{id:"credify-cobrowse-tooltip",role:"tooltip",className:tl,children:kv})]})]}),r&&l.jsxs("span",{children:["Read this code to your agent: ",l.jsx("strong",{className:"tracking-widest text-text-primary",children:r})]}),s&&l.jsx("span",{className:"text-red-600",children:"Couldn't start screen sharing. Please try chat instead."})]})}const rl="credify_rt";let Sn=null;function Nv(){try{if(typeof window>"u")return;const e=new URL(window.location.href),t=e.searchParams.get(rl);if(!t)return;Sn=t,e.searchParams.delete(rl),window.history.replaceState(window.history.state,"",e.toString())}catch(e){console.error("Failed to capture resume token from URL:",e)}}function Ov(){return Sn!==null}function Mv(){const e=Sn;return Sn=null,e}const nl="credify_test",ol="credify_test_mode";let En=!1;function Dv(e){return e===""||/^(1|true|yes)$/i.test(e.trim())}function Pv(){try{if(typeof window>"u")return;window.sessionStorage?.getItem(ol)==="1"&&(En=!0);const e=new URL(window.location.href),t=e.searchParams.get(nl);if(t!==null){En=Dv(t);try{window.sessionStorage?.setItem(ol,En?"1":"0")}catch{}e.searchParams.delete(nl),window.history.replaceState(window.history.state,"",e.toString())}}catch(e){console.error("Failed to capture test mode from URL:",e)}}function Lv(){return En}function G(e){if(e===!0)return"Yes";if(e===!1)return"No"}function Re(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 xv(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=Re(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=Re(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=G(t.is_mailing_address_different)),t.mailing_address&&(r.mailing_address=t.mailing_address),t.effective_date&&(r.effective_date=Re(t.effective_date)),t.auto_has_prior_insurance!==null&&t.auto_has_prior_insurance!==void 0&&(r.auto_has_prior_insurance=G(t.auto_has_prior_insurance)),t.auto_prior_expiration_date&&(r.auto_prior_expiration_date=Re(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=G(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=G(t.home_has_prior_insurance)),t.home_prior_expiration_date&&(r.home_prior_expiration_date=Re(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=G(t.property_insurance_cancelled)),t.lapse_in_coverage!==null&&t.lapse_in_coverage!==void 0&&(r.lapse_in_coverage=G(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=G(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=G(t.mit_credit_form)),t.storm_shutters!==null&&t.storm_shutters!==void 0&&(r.storm_shutters=G(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=G(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=G(t.has_vicious_animals)),t.has_business_on_premises!==null&&t.has_business_on_premises!==void 0&&(r.has_business_on_premises=G(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=G(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=G(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=G(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=G(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=G(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=G(t.has_garage)),t.has_pool!==null&&t.has_pool!==void 0&&(r.has_pool=G(t.has_pool)),t.has_trampoline!==null&&t.has_trampoline!==void 0&&(r.has_trampoline=G(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=G(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=Re(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=G(t.retiree_discount)),t.gated_community_discount!==null&&t.gated_community_discount!==void 0&&(r.gated_community_discount=G(t.gated_community_discount)),t.multi_policy_discount!==null&&t.multi_policy_discount!==void 0&&(r.multi_policy_discount=G(t.multi_policy_discount)),t.non_smoker_discount!==null&&t.non_smoker_discount!==void 0&&(r.non_smoker_discount=G(t.non_smoker_discount)),t.first_time_buyer_discount!==null&&t.first_time_buyer_discount!==void 0&&(r.first_time_buyer_discount=G(t.first_time_buyer_discount)),t.fire_detection_system!==null&&t.fire_detection_system!==void 0&&(r.fire_detection_system=G(t.fire_detection_system)),t.burglar_alarm_system!==null&&t.burglar_alarm_system!==void 0&&(r.burglar_alarm_system=G(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=G(t.smoke_detectors)),t.sprinkler_system!==null&&t.sprinkler_system!==void 0&&(r.sprinkler_system=G(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=G(t.gas_leakage_detector)),t.deadbolt_locks!==null&&t.deadbolt_locks!==void 0&&(r.deadbolt_locks=G(t.deadbolt_locks)),t.fire_extinguisher!==null&&t.fire_extinguisher!==void 0&&(r.fire_extinguisher=G(t.fire_extinguisher)),t.order_credit_authorized!==null&&t.order_credit_authorized!==void 0&&(r.order_credit_authorized=G(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=G(t.has_health_insurance_auto_accident)),t.is_corporation!==null&&t.is_corporation!==void 0&&(r.is_corporation=G(t.is_corporation)),t.named_insured_foreclosure_repo_bankruptcy!==null&&t.named_insured_foreclosure_repo_bankruptcy!==void 0&&(r.named_insured_foreclosure_repo_bankruptcy=G(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=G(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=Re(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=Re(a.date_first_licensed)),a.education_level&&(c.education_level=Va(a.education_level)),a.occupation&&(c.occupation=Ka(a.occupation)),a.industry&&(c.industry=cn(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=G(a.last_5_years_license_suspended_or_revoked)),a.accident_prevention_course!==null&&a.accident_prevention_course!==void 0&&(c.accident_prevention_course=G(a.accident_prevention_course)),a.accident_prevention_course_date&&(c.accident_prevention_course_date=Re(a.accident_prevention_course_date)),a.sr22!==null&&a.sr22!==void 0&&(c.sr22=G(a.sr22));const u=a.ssn_display;typeof u=="string"&&(c.ssn_display=u);const d=a.driver_violations;d&&d.length>0&&(c.driver_violations="Yes",c.driver_violations__items=d.map(_=>{const h={};return _.code&&(h.code=_.code),_.occurred_at&&(h.occurred_at=Re(_.occurred_at)),h}));const f=a.driver_accidents;f&&f.length>0&&(c.driver_accidents="Yes",c.driver_accidents__items=f.map(_=>{const h={};return _.occurred_at&&(h.occurred_at=Re(_.occurred_at)),_.description&&(h.description=_.description),_.quote_vehicle_id&&(h.quote_vehicle_id=i[_.quote_vehicle_id]??_.quote_vehicle_id),_.property_damage_amount_paid_cents!==null&&_.property_damage_amount_paid_cents!==void 0&&(h.property_damage_amount_paid_cents=_.property_damage_amount_paid_cents),_.personal_injury_amount_paid_cents!==null&&_.personal_injury_amount_paid_cents!==void 0&&(h.personal_injury_amount_paid_cents=_.personal_injury_amount_paid_cents),h}));const m=a.losses;return m&&m.length>0&&(c.losses="Yes",c.losses__items=m.map(_=>{const h={};return _.description&&(h.description=_.description),_.date_of_incident&&(h.date_of_incident=Re(_.date_of_incident)),_.amount_paid_cents!==null&&_.amount_paid_cents!==void 0&&(h.amount_paid_cents=_.amount_paid_cents),_.quote_vehicle_id&&(h.quote_vehicle_id=i[_.quote_vehicle_id]??_.quote_vehicle_id),h})),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 u=[];return a.garaging_address_line_1&&u.push(a.garaging_address_line_1),a.garaging_address_line_2&&u.push(a.garaging_address_line_2),a.garaging_address_city&&u.push(a.garaging_address_city),a.garaging_address_state&&u.push(a.garaging_address_state),a.garaging_address_postal_code&&u.push(a.garaging_address_postal_code),u.length>0&&(c.garaging_address=u.join(", ")),a.new_when_purchased!==null&&a.new_when_purchased!==void 0&&(c.new_when_purchased=G(a.new_when_purchased)),a.purchase_date&&(c.purchase_date=Re(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=G(a.anti_lock_brakes)),a.daytime_running_lights!==null&&a.daytime_running_lights!==void 0&&(c.daytime_running_lights=G(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=G(a.vehicle_has_modifications)),a.vehicle_garaged_at_residence!==null&&a.vehicle_garaged_at_residence!==void 0&&(c.vehicle_garaged_at_residence=G(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=G(a.vehicle_full_glass)),a.vehicle_loan_lease!==null&&a.vehicle_loan_lease!==void 0&&(c.vehicle_loan_lease=G(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=G(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=Re(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 Fv={AL:"Alabama",AK:"Alaska",AZ:"Arizona",AR:"Arkansas",CA:"California",CO:"Colorado",CT:"Connecticut",DE:"Delaware",DC:"District of Columbia",FL:"Florida",GA:"Georgia",HI:"Hawaii",ID:"Idaho",IL:"Illinois",IN:"Indiana",IA:"Iowa",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",ME:"Maine",MD:"Maryland",MA:"Massachusetts",MI:"Michigan",MN:"Minnesota",MS:"Mississippi",MO:"Missouri",MT:"Montana",NE:"Nebraska",NV:"Nevada",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NY:"New York",NC:"North Carolina",ND:"North Dakota",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PA:"Pennsylvania",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VT:"Vermont",VA:"Virginia",WA:"Washington",WV:"West Virginia",WI:"Wisconsin",WY:"Wyoming",PR:"Puerto Rico"};function $v(e){const t=e?.trim().toUpperCase();if(!t)return"your state";const r=Fv[t];return r?`${r} (${t})`:"your state"}const il=new Set(["Zip","Product","Driver","Vehicle"]);function Bv(e){return e?Array.isArray(e.drivers__items)?e.drivers__items.length:Array.isArray(e.drivers)?e.drivers.length:null:null}function sl(e,t){const r=Bv(t),n=e.filter(i=>i.key!=="AutoPolicy"),o=n.length>0?n:e;return o}function wn(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 f=u.replace("__items","");i.add(f),n.includes(f)&&d.forEach(m=>{typeof m=="object"&&m!==null&&Object.keys(m).forEach(_=>{o.add(_)})})}for(const[u,d]of Object.entries(e))if(u.endsWith("__items")){const f=u.replace("__items","");if(n.includes(f)){const _=Array.isArray(d)?d.map(h=>wn(h)):d;t[f]=_}}else if(!u.includes("__items")){if(i.has(u))continue;o.has(u)||(t[u]=r(d))}const s=t.auto_prior_carrier_name;if(typeof s=="string"&&s.trim()!==""){const u=s==="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 a=t.home_prior_carrier_name;if(typeof a=="string"&&a.trim()!==""){const u=a==="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=cn(d.industry),d.education_level=Va(d.education_level),d.occupation=Ka(d.occupation),d}));const c=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 f=Math.min(d,c);t.sale_price_cents=f*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,f=d.amount_paid_cents;if(typeof f!="number"||!Number.isFinite(f))return d;const m=Math.trunc(f),_=Math.min(Math.max(m,0),c);return{...d,amount_paid_cents:_*100}})),t}function Rv(e,t){const r=e.findIndex(o=>o.key===t);return r<0?t:e[r+1]?.key??t}function al(e){return e.some(t=>String(t.key)==="BundlePolicy"||String(t.key)==="BundleCustomer")}function cl(e){return al(e)?"Bundle":e.some(t=>String(t.key)==="Vehicle"||String(t.key)==="Driver")?"Auto":"Home"}const Uv={Auto:45e3,Home:5e4,Bundle:1e5};function Hv(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 zv(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 jv({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),[u,d]=y.useState(!1),[f,m]=y.useState(!1),[_,h]=y.useState([]),b=y.useRef(null),[W,x]=y.useState(null),[B,M]=y.useState(void 0),[z,C]=y.useState(!1),[H,Y]=y.useState(null),[R,ee]=y.useState(null),[te,oe]=y.useState(!1),[ve,Pe]=y.useState(!1),Ee=y.useRef(!1);y.useEffect(()=>{if(!u||f)return;const F=cl(r);let w=!1;const g=[];let p=0,v=0;const E=66,k=3,O=5e3;let I=!1;const P=async()=>{if(w)return;p++;try{const{quote:T}=await _c();if(w)return;if(v=0,!I){const q=T?.appetites??null,Z=ev(q,F);Z.length>0&&(h(Z),I=!0)}const N=T?.rates_status??null;if(N==="completed"){const{rates:q}=await Go();if(w)return;b.current=q,m(!0);return}if(N==="no_rates"){b.current=[],m(!0);return}if(N==="failed"){rr(new Error("Quote failed: rate-generation worker reported rates_status=failed"),{quoteId:s.current??void 0,phase:"rates_status_failed"}),Er({reason:"submission"}),Y({message:"submission_failed"}),d(!1);return}}catch(T){if(v++,console.warn("Provider polling: getQuote failed",{attempt:p,consecutiveFailures:v,error:T}),v>=k){T?.__sentryReported||rr(T,{quoteId:s.current??void 0,phase:"rates_polling",message:`Quote failed: ${k} consecutive get-quote poll failures`}),Er({reason:"network"}),Y({message:"submission_failed"}),d(!1);return}}if(w)return;if(p>=E){rr(new Error(`Quote failed: rate-generation timed out after ${E} polls`),{quoteId:s.current??void 0,phase:"rates_polling_timeout"}),Er({reason:"timeout"}),Y({message:"submission_failed"}),d(!1);return}const A=window.setTimeout(P,O);g.push(A)};return P(),()=>{w=!0,g.forEach(A=>window.clearTimeout(A))}},[u,f,r]);function J(F){const w={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(p=>({key:p,title:w[p]||p,loadQuestions:async()=>{const v=await fb(p,s.current??void 0);let E=Hv(p,v.questions);return E=zv(p,E),E}}))}y.useEffect(()=>{const F=async()=>{try{const w=Mv();if(w)try{const{token:p,quoteId:v}=await _b(w);p&&v&&(Wo(p),Qa(v))}catch(p){p.statusCode===401&&Pe(!0)}const g=fn();if(qo(),g){C(!0),i(g);try{const p=or(),v=await _c(p?void 0:g);if(!v||!v.quote)throw new Error("Invalid response from getQuote: missing quote data");const{quote:E}=v,{stages:k}=await mn(g),O=J(k);n(O);let I;try{I=xv(E),x(I)}catch(T){throw new Error(`Failed to transform quote data: ${T instanceof Error?T.message:"Unknown error"}`)}const P=sl(O,I);n(P);const A=E?.rates_status??null;if(or()){if(A==="completed")try{const{rates:T}=await Go();c(T);return}catch(T){console.warn("Failed to fetch completed rates on resume",T)}else if(A==="no_rates"){c([]);return}else if(A==="processing"){h([]),m(!1),b.current=null,d(!0);return}}if(E.current_stage){const T=E.current_stage==="State"?"Product":E.current_stage,N=P.findIndex(q=>q.key===T);N>=0?M(N):M(P.length-1)}else M(P.length-1)}catch(p){const v=p;if(v.statusCode===404)Xa(),i(null);else if(v.statusCode===401){pc();try{const{stages:E}=await mn(g),k=J(E);n(k);const O=k.findIndex(I=>I.key==="SMSVerification");O>=0&&M(O)}catch{}}}finally{C(!1)}}else{const{stages:p}=await mn();n(J(p))}}catch{C(!1)}};e&&!Ee.current&&(Ee.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 V=y.useCallback(F=>{F.key==="Escape"&&(Ic(),t())},[t]);y.useEffect(()=>{if(e)return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[e,V]),y.useEffect(()=>{e||(x(null),M(void 0),C(!1),d(!1),ee(null),oe(!1))},[e]),y.useEffect(()=>{e&&Hb()},[e]),y.useEffect(()=>{a&&Array.isArray(a)&&Wb({rateCount:a.length})},[a]);const L=y.useCallback(()=>{Y(null),M(Math.max(0,r.length-1))},[r.length]),Q=y.useCallback(async F=>{if(!(!R||!o||te)){oe(!0);try{const g={...wn(R.allValues),communications_consent:F};h([]),m(!1),b.current=null,d(!0),ee(null);let p;try{p=await ir(g,!0)}catch(k){throw d(!1),k}if(p.status==="submission_failed"){rr(new Error(`Quote failed at submission: ${p.message}`),{quoteId:o??void 0,phase:"consent_submit"}),d(!1),m(!1),b.current=null,Er({reason:"submission"}),Y({message:p.message});return}if(p.status==="success")try{const{rates:k}=await Go();b.current=k,m(!0)}catch(k){throw d(!1),k}const v=r.length,E=r[v-1];Nc({stageKey:E?.key??"unknown",stageTitle:E?.title??"unknown",stepIndex:v,totalSteps:v}),jb()}catch(w){w?.__sentryReported||rr(w,{quoteId:o??void 0,phase:"consent_submit"}),d(!1),Er({reason:"submission"}),Y({message:"Oops, something went wrong. Please try again later."})}finally{oe(!1)}}},[R,o,te,r]);if(!e)return null;const me=()=>{Ic(),t()},D=!!(!H&&a&&o);return l.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center",role:"dialog","aria-modal":"true","aria-labelledby":"insurance-modal-title",children:[l.jsx("div",{className:"backdrop","aria-hidden":"true"}),l.jsxs("div",{className:`modal-panel bg-white relative w-full flex flex-col max-h-[90vh] overflow-hidden ${D?"max-w-6xl":"max-w-2xl"}`,role:"document",children:[l.jsx("button",{onClick:me,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&&!H&&l.jsx("div",{className:"text-center mb-6",children:l.jsx("h2",{id:"insurance-modal-title",className:"h1-title",children:"Let's shop multiple leading carriers for you."})}),l.jsxs("div",{className:"panel-body flex-1 min-h-0 overflow-y-auto",children:[ve&&l.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:[l.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."}),l.jsx("button",{type:"button",onClick:()=>Pe(!1),className:"shrink-0 font-bold text-amber-800 hover:text-amber-900","aria-label":"Dismiss",children:"×"})]}),H&&l.jsx(Yc,{onGoBack:L}),!H&&u&&(()=>{const F=cl(r);return l.jsx(lv,{providers:_,totalTime:Uv[F],flow:F,isComplete:f,onComplete:()=>{d(!1),m(!1),h([]),b.current&&(c(b.current),b.current=null)}})})(),!H&&!u&&R&&l.jsx(Gp,{onChoose:Q,isSubmitting:te}),!H&&!a&&!u&&!R&&l.jsx(l.Fragment,{children:z||r.length===0?l.jsx("div",{className:"flex items-center justify-center py-12",children:l.jsx("div",{className:"text-slate-600",children:"Loading..."})}):l.jsx(Jb,{stages:r,initialValues:W??void 0,initialActive:B,quoteId:o??void 0,nonTerminalStageKeys:il,onStageComplete:async(F,w)=>{try{const g=wn(F);let p=o,v=r;const E=v.findIndex(I=>I.key===w),k=v[E],O=Rv(v,w);if(p)if(w==="Phone"){const I=g.phone;if(!I)throw new Error("Phone number is required.");const P=or();await ir({...g,current_stage:O},!1,P?void 0:p),await mb(p,I)}else if(w==="SMSVerification"){const{isVerified:I,token:P}=await mc(p,g.sms_code);if(!I)throw new Error("Invalid SMS code");P&&Wo(P),await ir({current_stage:O},!1)}else if(w==="Product"){const I=or(),{isSupported:P}=await hb(g.state,I?void 0:p??void 0);if(await ir({...g,current_stage:P?O:w},!1,I?void 0:p),!P){const A=$v(g.state);throw new Error(`Sorry, Credify Corporation doesn't currently offer insurance in ${A}. We're expanding our coverage and hope to serve your state soon.`)}}else{const I=or();await ir({...g,current_stage:O},!1,I?void 0:p||void 0)}else{const I=g.postal_code??"";if(!I)throw new Error("ZIP code is required to start a quote.");const A=(await pb(I,Lv()))?.quoteId;if(!A||typeof A!="string"||A.trim()==="")throw new Error(`Failed to create quote - invalid quoteId returned: ${A}`);p=A,i(A),Qa(A),await ir({...g,current_stage:O},!1,A)}if(il.has(w))try{const{stages:I}=await mn(p||void 0);v=J(I),v=sl(v,F),n(v)}catch(I){console.warn("Unable to refresh stages after flow-shaping step",I)}return Nc({stageKey:w,stageTitle:k?.title??w,stepIndex:E+1,totalSteps:v.length}),{success:!0,latestStages:v}}catch(g){return{success:!1,error:g instanceof Error?g.message:"An error occurred"}}},onComplete:async(F,w)=>{if(!o)return{success:!1,error:"Oops, something went wrong. Please try again later."};x(F);try{if(w==="SMSVerification"){const g=wn(F),{isVerified:p,token:v}=await mc(o,g.sms_code);return p?(v&&Wo(v),ee({allValues:F}),{success:!0}):{success:!1,error:"Invalid SMS code"}}return ee({allValues:F}),{success:!0}}catch{const p="Oops, something went wrong. Please try again later.";return Y({message:p}),{success:!1,error:p}}}})})," ",!H&&a&&o&&l.jsx(av,{rates:a,onBack:()=>c(null),isBundleFlow:al(r)})]}),l.jsxs("div",{className:"mt-4 pt-4 border-t border-slate-200 space-y-2",children:[l.jsx(Iv,{}),l.jsx("p",{className:"text-center text-sm text-slate-500",children:"Insurance products offered through Credify Corporation, a licensed insurance agency."})]})]})]})}function Wv({onClose:e}){return l.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center",role:"dialog","aria-modal":"true",children:[l.jsx("div",{className:"backdrop","aria-hidden":"true"}),l.jsx("div",{className:"modal-panel bg-white relative w-full max-w-2xl p-6",children:l.jsx(Yc,{onGoBack:e})})]})}function qv({isOpen:e}){const t=()=>An.close();return l.jsx(_o,{fallback:l.jsx(Wv,{onClose:t}),children:l.jsx(jv,{isOpen:e,onClose:t})})}var ii={};function Gv(){try{return typeof ii<"u"&&ii?ii:{}}catch{return{}}}let ll=!1;function Zv(e,t){if(!e)return t;const r=Number(e);return Number.isFinite(r)&&r>=0&&r<=1?r:t}function Yv(e={}){if(ll)return!0;if(typeof window>"u")return!1;const t=Gv(),r=e.dsn??t.dsn;return!r||e.enabled===!1?!1:(tb({baseUrl:Me}),Op({dsn:r,environment:e.environment??t.environment??"production",release:e.release??t.release,sendDefaultPii:!1,maxBreadcrumbs:50,tracesSampleRate:e.tracesSampleRate??Zv(t.tracesSampleRate,.1),tracePropagationTargets:[Me],replaysSessionSampleRate:0,replaysOnErrorSampleRate:1,beforeSend:n=>cc(n),beforeBreadcrumb:n=>n&&(cc({breadcrumbs:[n]}),n)}),ll=!0,Ip("replayIntegration").then(n=>{try{gd(n({maskAllText:!0,maskAllInputs:!0,blockAllMedia:!0,networkDetailAllowUrls:[Me],networkCaptureBodies:!1}))}catch{}}).catch(()=>{}),!0)}var si={};const Vv="mock";function Kv(){try{return typeof si<"u"&&si&&si.key||void 0}catch{return}}function Jv(){const e=Kv();if(!e||typeof window>"u"||!window.location)return!1;try{return new URLSearchParams(window.location.search).get(Vv)===e}catch{return!1}}const Qv=new Set(["/create-quote","/get-stages-for-quote","/get-questions-by-stage","/update-quote","/verify-quote","/is-supported-state","/get-rates","/get-quote","/get-vehicle-options","/request-bind"]);let ul=!1;function Xv(e){try{if(typeof e=="string")return new URL(e,window.location.href).pathname;if(e instanceof URL)return e.pathname;if(e instanceof Request)return new URL(e.url,window.location.href).pathname}catch{return null}return null}async function eS(e,t){try{if(t?.body&&typeof t.body=="string")return JSON.parse(t.body);if(e instanceof Request){const r=await e.clone().text();return r?JSON.parse(r):{}}}catch{return{}}return{}}function dl(e,t=200){return new Response(JSON.stringify(e),{status:t,headers:{"Content-Type":"application/json"}})}function tS(){try{if(typeof document>"u"||document.getElementById("credify-mock-badge"))return;const e=()=>{const t=document.createElement("div");t.id="credify-mock-badge",t.textContent="MOCK MODE",t.setAttribute("aria-hidden","true"),t.style.cssText=["position:fixed","bottom:12px","left:12px","z-index:2147483647","background:#b91c1c","color:#fff","font:600 11px/1 system-ui,sans-serif","letter-spacing:0.08em","padding:6px 10px","border-radius:9999px","box-shadow:0 1px 4px rgba(0,0,0,0.3)","pointer-events:none","user-select:none"].join(";"),document.body.appendChild(t)};document.body?e():document.addEventListener("DOMContentLoaded",e,{once:!0})}catch{}}function rS(){if(ul||typeof window>"u"||typeof window.fetch!="function"||!Jv())return;ul=!0;const e=window.fetch.bind(window),t=Promise.resolve().then(()=>NS);window.fetch=async(r,n)=>{const o=Xv(r);if(!o||!Qv.has(o))return e(r,n);const i=await eS(r,n),{handleMockRequest:s}=await t;await new Promise(a=>window.setTimeout(a,120));try{return dl(s(o,i))}catch(a){return dl({error:a instanceof Error?a.message:"Mock handler error"},404)}},tS(),typeof console<"u"&&console.info("[Credify] Mock mode active — all API calls are served from in-memory fixtures.")}rS();let lt=null,Rt=null,Cn=!1;function nS(){lt||(lt=document.createElement("div"),lt.id="insurance-widget-root",document.documentElement.appendChild(lt)),!Rt&<&&(Rt=bl.createRoot(lt))}function ai(){nS(),Rt&&Rt.render(y.createElement(qv,{isOpen:Cn}))}function oS(){Rt&<&&(Rt.unmount(),lt.remove()),Rt=null,lt=null,Xc(),Ub()}const An={init:e=>{Yv(e?.sentry),wv(e?.support),Nv(),Pv(),Cn=!!e?.autoOpen||Ov(),ai()},open:()=>{Cn=!0,ai()},close:()=>{Cn=!1,ai()},destroy:oS,on:Tc,off:kc,support:{openChat:Jc,startScreenShare:Qc}};typeof window<"u"&&(window.CredifyInsuranceWidget=An);const iS=["Zip","Email","Product"],sS={Auto:["Zip","Email","Product","Name","Vehicle","Driver","AutoCurrentCarrier","Demographics","Ssn","Phone","SMSVerification"],Home:["Zip","Email","Product","Name","Home","HomePolicy","Demographics","Ssn","Phone","SMSVerification"],Bundle:["Zip","Email","Product","Name","Home","Vehicle","Driver","BundlePolicy","Demographics","Ssn","Phone","SMSVerification"]};function aS(e){return e==="Auto"||e==="Home"||e==="Bundle"?sS[e]:iS}const fl=["Allstate","State Farm","GEICO","Progressive","Liberty Mutual","Nationwide","Farmers","NoPriorInsurance"],pl=["25/50","50/100","100/300","250/500"],cS=Array.from({length:35},(e,t)=>String(2024-t)),lS=[{question:"What's your ZIP code?",inputType:"text",key:"postal_code",required:!0}],uS=[{question:"What is your email address?",inputType:"email",key:"email",required:!0}],dS=[{question:"Do you want to quote auto, home, or both?",inputType:"select",options:["Auto","Home","Bundle"],key:"product",required:!0},{question:"What is your property address?",inputType:"address",key:"address",required:!0}],fS=[{question:"What is your first name?",inputType:"text",key:"first_name",required:!0},{question:"What is your last name?",inputType:"text",key:"last_name",required:!0},{question:"What is your date of birth?",inputType:"date",key:"date_of_birth",required:!0}],pS=[{question:"Add Vehicles",inputType:"radio",options:["Yes"],key:"vehicles",required:!0,conditionals:[{conditionalType:"equals",conditionalValue:"Yes",conditionalQuestionsAllowMultiple:!0,conditionalQuestions:[{question:"Vehicle Identification Number (VIN)",inputType:"text",key:"vin",required:!1},{question:"Year",inputType:"select",options:cS,key:"year",required:!0},{question:"Make",inputType:"select",options:[],key:"make",required:!0},{question:"Model",inputType:"select",options:[],key:"model",required:!0},{question:"Body style",inputType:"select",options:[],key:"body_style",required:!0},{question:"Vehicle ownership type",inputType:"select",options:["Owned","Leased","Lien"],key:"ownership_type",required:!0},{question:"What is the primary use of this vehicle?",inputType:"select",options:["Pleasure","To_FromWork","To_FromSchool","Business","Farming"],key:"usage",required:!0},{question:"Annual mileage driven",inputType:"number",key:"annual_mileage",required:!0}]}]}],mS=[{question:"Add Drivers",inputType:"radio",options:["Yes"],key:"drivers",required:!0,conditionals:[{conditionalType:"equals",conditionalValue:"Yes",conditionalQuestionsAllowMultiple:!0,conditionalQuestions:[{question:"First Name",inputType:"text",key:"first_name",required:!0},{question:"Middle Name Initial",inputType:"text",key:"middle_name",required:!1},{question:"Last Name",inputType:"text",key:"last_name",required:!0},{question:"Date of Birth",inputType:"date",key:"date_of_birth",required:!0},{question:"Gender",inputType:"select",options:["Male","Female"],key:"gender",required:!0},{question:"What is the relationship to Driver #1?",inputType:"select",options:["Spouse","Parent","Child","Domestic Partner","Relative","Employee","Other"],key:"relationship_to_insured",required:!0},{question:"Marital status",inputType:"select",options:["Single","Married","Divorced","Widowed"],key:"marital_status",required:!0}]}]}],ml=[{question:"When do you need your insurance to begin?",inputType:"date",key:"effective_date",required:!0},{question:"Type of residence",inputType:"select",options:["Single Family Dwelling","Condo","Apartment","Townhouse","Mobile Home"],key:"residence_type",required:!0},{question:"Please select your current auto insurance company",inputType:"select",options:fl,key:"auto_prior_carrier_name",required:!0,conditionals:[{conditionalType:"notEquals",conditionalValue:"NoPriorInsurance",conditionalQuestions:[{question:"Years with prior personal auto carrier",inputType:"number",key:"auto_prior_years",required:!0},{question:"Months with prior personal auto carrier",inputType:"number",key:"auto_prior_months",required:!0},{question:"When does the current policy expire?",inputType:"date",key:"auto_prior_expiration_date",required:!0},{question:"What is your current or most recent Bodily Injury Limit?",inputType:"select",options:pl,key:"auto_prior_liability_limit",required:!0}]}]},{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},{question:"Bodily Injury liability",inputType:"select",options:pl,key:"policy_bi",required:!0},{question:"Property Damage Liability",inputType:"select",options:["25000","50000","100000"],key:"policy_pd",required:!0}],_S=[{question:"Year built",inputType:"number",key:"year_built",required:!0},{question:"Total living area (sq ft)",inputType:"number",key:"total_area_sq_ft",required:!0},{question:"Dwelling type",inputType:"select",options:["Single Family","Condo","Townhouse","Multi-Family"],key:"dwelling_type",required:!0},{question:"Construction type",inputType:"select",options:["Frame","Masonry","Masonry Veneer","Fire Resistive"],key:"construction_type",required:!0},{question:"Roof material",inputType:"select",options:["Asphalt Shingle","Metal","Tile","Wood Shake","Slate"],key:"roof_material_type",required:!0},{question:"Number of stories",inputType:"select",options:["1","1.5","2","2.5","3"],key:"number_of_stories",required:!0}],_l=[{question:"When do you need your insurance to begin?",inputType:"date",key:"effective_date",required:!0},{question:"Do you currently have a Homeowners policy?",inputType:"radio",options:["Yes","No"],key:"home_has_prior_insurance",required:!0,conditionals:[{conditionalType:"equals",conditionalValue:"Yes",conditionalQuestions:[{question:"Which carrier currently insures the home?",inputType:"select",options:fl,key:"home_prior_carrier_name",required:!0}]}]},{question:"Personal liability limit",inputType:"select",options:["100000","300000","500000","1000000"],key:"home_personal_liability",required:!0},{question:"All-perils deductible",inputType:"select",options:["500","1000","2500","5000"],key:"home_all_perils_deductible",required:!0}],hS=[..._l,...ml],gS={Zip:lS,Email:uS,Product:dS,Name:fS,Vehicle:pS,Driver:mS,AutoCurrentCarrier:ml,Home:_S,HomePolicy:_l,BundlePolicy:hS,Demographics:[{question:"Gender",inputType:"radio",options:["Male","Female"],key:"gender",required:!0},{question:"Marital status",inputType:"select",options:["Single","Married","Divorced","Widowed","Domestic Partner"],key:"marital_status",required:!0},{question:"Employment industry",inputType:"select",options:["Technology","Healthcare","Education","Finance","Retail","Construction","Other"],key:"employment_industry",required:!0},{question:"How many occupants live in the household?",inputType:"number",key:"household_size",required:!0},{question:"Do you authorize us to check your credit?",inputType:"radio",options:["Yes","No"],key:"order_credit_authorized",required:!0}],Ssn:[{question:"Social Security Number",inputType:"text",key:"social_security_number",required:!1}],Phone:[{question:"What is your phone number?",inputType:"tel",key:"phone",required:!0}],SMSVerification:[{question:"Please enter the code we sent to your phone number.",inputType:"text",key:"sms_code",required:!0}]};function yS(e){return gS[e]??[]}const bS=[{quote_rate_id:"mock-rate-1",carrier_name:"Progressive",carrier_logo_base64:null,carrier_quote_id:"MOCK-PRG-001",premium_cents:142800,monthly_premium_cents:11900,term_months:12,lob:"auto",admitted_status:"admitted",effective_date:"2026-07-01",policy_end_date:"2027-07-01"},{quote_rate_id:"mock-rate-2",carrier_name:"Nationwide",carrier_logo_base64:null,carrier_quote_id:"MOCK-NW-002",premium_cents:156e3,monthly_premium_cents:13e3,term_months:12,lob:"auto",admitted_status:"admitted",effective_date:"2026-07-01",policy_end_date:"2027-07-01"},{quote_rate_id:"mock-rate-3",carrier_name:"Liberty Mutual",carrier_logo_base64:null,carrier_quote_id:"MOCK-LM-003",premium_cents:173400,monthly_premium_cents:14450,term_months:12,lob:"auto",admitted_status:"non_admitted",effective_date:"2026-07-01",policy_end_date:"2027-07-01"},{quote_rate_id:"mock-nq-1",carrier_name:"Travelers",carrier_logo_base64:null,carrier_quote_id:null,premium_cents:0,monthly_premium_cents:null,term_months:0,lob:"auto",admitted_status:"not_quoted",effective_date:null,policy_end_date:null,decline_category:"Upfront Underwriting",decline_reasons:["Consumer didn’t grant permission to review credit score."]},{quote_rate_id:"mock-nq-2",carrier_name:"NationalGeneral",carrier_logo_base64:null,carrier_quote_id:null,premium_cents:0,monthly_premium_cents:null,term_months:0,lob:"auto",admitted_status:"not_quoted",effective_date:null,policy_end_date:null,decline_category:"Declinations",decline_reasons:["Carrier requires credit report ordering. Please select Yes for Credit Check Authorized.","Monoline quoting is not allowed."]},{quote_rate_id:"mock-nq-3",carrier_name:"Allstate",carrier_logo_base64:null,carrier_quote_id:null,premium_cents:0,monthly_premium_cents:null,term_months:0,lob:"auto",admitted_status:"not_quoted",effective_date:null,policy_end_date:null,decline_category:"Declinations",decline_reasons:["This carrier will not quote if the credit disclosure is not accepted by the insured."]}],vS=["Toyota","Honda","Ford","Chevrolet","Tesla","Subaru"],SS={Toyota:["Camry","Corolla","RAV4","Highlander","Tacoma"],Honda:["Civic","Accord","CR-V","Pilot","Odyssey"],Ford:["F-150","Escape","Explorer","Mustang","Bronco"],Chevrolet:["Silverado","Equinox","Malibu","Tahoe","Camaro"],Tesla:["Model 3","Model Y","Model S","Model X"],Subaru:["Outback","Forester","Crosstrek","Impreza"]},ES=["Sedan","SUV","Truck","Coupe","Hatchback","Minivan"];function wS(e){return e.make&&e.model?{ready:!0,bodyStyles:ES}:e.make?{ready:!0,models:SS[e.make]??["Base","Sport","Limited"]}:{ready:!0,makes:vS}}function CS(){return{year:2022,make:"Toyota",model:"Camry",bodyStyle:"Sedan"}}const Tn="mock-quote-0001",hl="mock-jwt-token";let wr={quote_id:Tn};function AS(e={}){wr={quote_id:Tn,...e}}function TS(e){return e.action==="send"?{success:!0}:e.action==="resume"?{isVerified:!0,token:hl,quoteId:Tn}:{isVerified:!0,token:hl}}function kS(e){return e.action==="vinDecode"?CS():wS({year:typeof e.year=="number"?e.year:void 0,make:typeof e.make=="string"?e.make:void 0,model:typeof e.model=="string"?e.model:void 0})}function IS(e,t){switch(e){case"/create-quote":return AS({postal_code:t.postal_code}),{quoteId:Tn};case"/get-stages-for-quote":return{stages:aS(wr.product)};case"/get-questions-by-stage":return{questions:yS(t.stage)};case"/update-quote":{const r={...t.payload??{}};return delete r.current_stage,wr={...wr,...r},{status:"success"}}case"/verify-quote":return TS(t);case"/is-supported-state":return{isSupported:!0};case"/get-rates":return{rates:bS};case"/get-quote":return{quote:wr};case"/get-vehicle-options":return kS(t);case"/request-bind":return{success:!0};default:throw new Error(`No mock handler for ${e}`)}}const NS=Object.freeze(Object.defineProperty({__proto__:null,handleMockRequest:IS},Symbol.toStringTag,{value:"Module"}));Ze.CredifyInsuranceWidget=An,Ze.default=An,Object.defineProperties(Ze,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
98
|
+
`}),l.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:l.jsxs("div",{style:{width:"100%",maxWidth:560},children:[l.jsxs("div",{style:{textAlign:"center",marginBottom:40},children:[l.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:[l.jsx("span",{style:{fontSize:14},children:i.icon}),l.jsx("span",{style:{fontSize:12,fontWeight:700,color:i.accent,letterSpacing:"0.1em",textTransform:"uppercase"},children:i.label})]}),l.jsx("h1",{style:{fontSize:26,fontWeight:700,color:"#0F172A",margin:0,letterSpacing:"-0.02em",lineHeight:1.3},children:U?"Connecting to top carriers":"Fetching your best rates"}),l.jsx("p",{style:{fontSize:14,color:"#64748B",marginTop:8,marginBottom:0},children:U?"Identifying the carriers eligible for your quote...":X?"Still gathering — a few carriers are taking a little longer...":"We're reaching out to multiple insurers on your behalf"})]}),l.jsx("div",{style:{display:"flex",justifyContent:"center",marginBottom:32},children:U?l.jsx("div",{style:{display:"flex",gap:20},children:[0,1,2,3,4].map(ie=>l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:6},children:[l.jsx("div",{style:{width:48,height:48,borderRadius:14,background:"#E2E8F0",animation:"skeletonPulse 1.4s ease-in-out infinite",animationDelay:`${ie*.12}s`}}),l.jsx("div",{style:{width:40,height:8,borderRadius:4,background:"#E2E8F0",animation:"skeletonPulse 1.4s ease-in-out infinite",animationDelay:`${ie*.12}s`}})]},`skeleton-${ie}`))}):J?l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:8},children:[l.jsxs("div",{style:{width:64,height:64,borderRadius:18,background:J.color+"18",border:`2px solid ${J.color}`,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700,fontSize:16,color:J.color,position:"relative",animation:"providerPulse 1.8s ease-in-out infinite"},children:[J.abbr,l.jsx("div",{style:{position:"absolute",inset:-5,borderRadius:22,border:`2px solid ${J.color}`,pointerEvents:"none",animation:"ringPulse 1.6s ease-in-out infinite"}})]}),l.jsx("span",{style:{fontSize:13,fontWeight:600,color:J.color,letterSpacing:"0.04em"},children:J.name})]}):null}),l.jsxs("div",{className:`iq-card-fade ${W?"iq-card-visible":"iq-card-hidden"}`,style:{background:"#FFFFFF",borderRadius:24,border:"1px solid #E2E8F0",padding:32},children:[l.jsx("div",{style:{display:"flex",alignItems:"center",gap:20,marginBottom:28},children:U||!J?l.jsxs("div",{style:{flex:1,textAlign:"center",padding:"8px 0"},children:[l.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.1em",textTransform:"uppercase",margin:"0 0 6px"},children:"Please wait"}),l.jsx("h2",{style:{fontSize:18,fontWeight:700,color:"#0F172A",margin:"0 0 6px",letterSpacing:"-0.02em"},children:"Checking eligible providers"}),l.jsx("p",{style:{fontSize:13,color:"#64748B",margin:0},children:"Reviewing your details against our carrier network"})]}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{style:{position:"relative",flexShrink:0},children:[l.jsx(yv,{progress:_,color:J.color,size:80}),l.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsxs("span",{style:{fontSize:14,fontWeight:700,color:J.color},children:[Math.round(_),"%"]})})]}),l.jsxs("div",{style:{flex:1},children:[l.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.1em",textTransform:"uppercase",margin:"0 0 4px"},children:X?"Still checking":"Now checking"}),l.jsx("h2",{style:{fontSize:20,fontWeight:700,color:"#0F172A",margin:"0 0 6px",letterSpacing:"-0.02em"},children:J.name}),l.jsx("p",{className:"iq-status-text",style:{fontSize:13,color:"#64748B",margin:0},children:ei[g]},`${c}-${g}`)]})]})}),l.jsxs("div",{children:[l.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.08em",textTransform:"uppercase",margin:"0 0 8px"},children:U?"Initializing":"Gathering quotes"}),l.jsx("div",{style:{height:6,background:"#F1F5F9",borderRadius:100,overflow:"hidden"},children:l.jsx("div",{style:{height:"100%",width:"35%",background:i.accent,borderRadius:100,animation:"shimmerSlide 1.4s ease-in-out infinite"}})})]})]})]})})]})}function Jc({onGoBack:e}){return l.jsxs("section",{className:"mt-4",children:[l.jsxs("div",{className:"rounded-xl border border-red-200 bg-red-50 p-5",children:[l.jsx("h3",{className:"text-base font-semibold text-red-700",children:"Sorry, quote submission failed"}),l.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."})]}),l.jsx("div",{className:"mt-5",children:l.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"})})]})}var ti={intercomAppId:"",cobrowseLicense:""};function vv(){try{return typeof ti<"u"&&ti?ti:{}}catch{return{}}}function Sv(e){const t=vv(),r=e?.intercomAppId??t.intercomAppId,n=e?.cobrowseLicense??t.cobrowseLicense;return{enabled:(e?.enabled??!0)&&!!(r||n),intercomAppId:r||void 0,cobrowseLicense:n||void 0,proactiveOnError:e?.proactiveOnError??!0}}const ri=new Map;function Qc(e){if(typeof document>"u")return Promise.reject(new Error("loadScript called without a document"));const t=ri.get(e);if(t)return t;const r=new Promise((n,o)=>{const i=document.createElement("script");i.src=e,i.async=!0,i.onload=()=>n(),i.onerror=()=>{ri.delete(e),o(new Error(`Failed to load script: ${e}`))},document.head.appendChild(i)});return ri.set(e,r),r}let ni=!1;function Ev(){if(typeof window.Intercom=="function")return window.Intercom;const e=function(...t){e.c?.(t)};return e.q=[],e.c=t=>{e.q.push(t)},window.Intercom=e,e}function wv(e){const t={app_id:e,hide_default_launcher:!0},r=pn();return r&&(t.quote_id=r),t}function Xc(e){if(typeof window>"u")return;Ev();const t=wv(e);if(window.intercomSettings=t,ni){window.Intercom("update",t);return}window.Intercom("boot",t),ni=!0,Qc(`https://widget.intercom.io/widget/${e}`).catch(()=>{})}function Cv(){typeof window?.Intercom=="function"&&window.Intercom("show")}function Av(e){typeof window?.Intercom=="function"&&window.Intercom("showNewMessage",e)}function Tv(e){typeof window?.Intercom=="function"&&window.Intercom("update",e)}function kv(){if(typeof window?.Intercom=="function")try{window.Intercom("shutdown")}catch{}ni=!1}const Iv="https://js.cobrowse.io/CobrowseIO.js";let oi=!1;async function Nv(e){await Qc(Iv);const t=window.CobrowseIO;if(!t)return null;if(!oi){t.license=e,t.redactedViews=["input","select","textarea","[data-credify-redact]"],t.customData={quote_id:pn()??void 0,device_name:"Credify Insurance Widget"},t.confirmSession=()=>Promise.resolve(typeof window<"u"?window.confirm("Allow a Credify support agent to view your screen?"):!1);try{await t.client?.()}catch{}t.start?.(),oi=!0}return t}async function Ov(e){if(typeof window>"u")return null;try{const t=await Nv(e);return t?.createSessionCode?await t.createSessionCode():null}catch{return null}}function Mv(){try{window.CobrowseIO?.stop?.()}catch{}oi=!1}const Dv="Hi! It looks like something went wrong submitting your quote. We're here to help — tell us what you were trying to do and we'll jump in.";let Xe=null,En=null,ii=!1;function Pv(e){rl();const t=Sv(e);if(Xe=t,!!t.enabled&&t.proactiveOnError&&t.intercomAppId){const r=n=>{ii||(ii=!0,Xc(t.intercomAppId),Tv({last_quote_error:n?.reason??"unknown"}),Av(Dv))};Oc("submissionFailed",r),En=r}}function el(){!Xe?.enabled||!Xe.intercomAppId||(Xc(Xe.intercomAppId),Cv())}function tl(){return!Xe?.enabled||!Xe.cobrowseLicense?Promise.resolve(null):Ov(Xe.cobrowseLicense)}function Lv(){return!!(Xe?.enabled&&Xe.intercomAppId)}function xv(){return!!(Xe?.enabled&&Xe.cobrowseLicense)}function rl(){En&&(Mc("submissionFailed",En),En=null),kv(),Mv(),ii=!1,Xe=null}const Fv="Chat with our support team in real time — we'll help you finish your quote.",$v="Share your screen with a support agent so they can see what you see and guide you in real time. We'll generate a secure code — share it with your agent to begin. Your personal information stays hidden.",nl="inline-flex h-9 w-9 items-center justify-center rounded-full text-slate-500 hover:bg-slate-100 hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-400 disabled:opacity-60",ol="pointer-events-none absolute bottom-full left-1/2 z-10 mb-2 w-60 -translate-x-1/2 rounded-lg bg-slate-800 px-3 py-2 text-center text-xs leading-snug text-white opacity-0 shadow-lg transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100";function Bv(){const e=Lv(),t=xv(),[r,n]=m.useState(null),[o,i]=m.useState(!1),[s,a]=m.useState(!1),c=m.useCallback(async()=>{i(!0),a(!1);try{const u=await tl();u?n(u):a(!0)}finally{i(!1)}},[]);return!e&&!t?null:l.jsxs("div",{className:"flex flex-col items-center gap-1.5 text-sm text-slate-500",children:[l.jsx("span",{className:"font-medium",children:"Need help?"}),l.jsxs("div",{className:"inline-flex items-center gap-1",children:[e&&l.jsxs("span",{className:"group relative inline-flex",children:[l.jsx("button",{type:"button",onClick:el,"aria-label":"Chat with support","aria-describedby":"credify-chat-tooltip",className:nl,children:l.jsx("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8","aria-hidden":"true",children:l.jsx("path",{d:"M21 11.5a8.38 8.38 0 0 1-8.5 8.5 9 9 0 0 1-3.8-.8L3 21l1.3-4.2A8.38 8.38 0 0 1 3.5 11.5 8.5 8.5 0 0 1 12 3a8.38 8.38 0 0 1 9 8.5Z",strokeLinejoin:"round"})})}),l.jsx("span",{id:"credify-chat-tooltip",role:"tooltip",className:ol,children:Fv})]}),e&&t&&l.jsx("span",{className:"mx-1 h-6 w-px bg-slate-200","aria-hidden":"true"}),t&&l.jsxs("span",{className:"group relative inline-flex",children:[l.jsx("button",{type:"button",onClick:c,disabled:o,"aria-label":"Share your screen with an agent","aria-describedby":"credify-cobrowse-tooltip",className:nl,children:o?l.jsx("span",{className:"h-4 w-4 animate-spin rounded-full border-2 border-slate-300 border-t-slate-600","aria-hidden":"true"}):l.jsxs("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8","aria-hidden":"true",children:[l.jsx("rect",{x:"2.5",y:"4",width:"19",height:"13",rx:"2"}),l.jsx("path",{d:"M8 21h8M12 17v4",strokeLinecap:"round"}),l.jsx("path",{d:"M12 13V8m0 0-2 2m2-2 2 2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),l.jsx("span",{id:"credify-cobrowse-tooltip",role:"tooltip",className:ol,children:$v})]})]}),r&&l.jsxs("span",{children:["Read this code to your agent: ",l.jsx("strong",{className:"tracking-widest text-text-primary",children:r})]}),s&&l.jsx("span",{className:"text-red-600",children:"Couldn't start screen sharing. Please try chat instead."})]})}const il="credify_rt";let wn=null;function Uv(){try{if(typeof window>"u")return;const e=new URL(window.location.href),t=e.searchParams.get(il);if(!t)return;wn=t,e.searchParams.delete(il),window.history.replaceState(window.history.state,"",e.toString())}catch(e){console.error("Failed to capture resume token from URL:",e)}}function Hv(){return wn!==null}function Rv(){const e=wn;return wn=null,e}const sl="credify_test",al="credify_test_mode";let Cn=!1;function zv(e){return e===""||/^(1|true|yes)$/i.test(e.trim())}function jv(){try{if(typeof window>"u")return;window.sessionStorage?.getItem(al)==="1"&&(Cn=!0);const e=new URL(window.location.href),t=e.searchParams.get(sl);if(t!==null){Cn=zv(t);try{window.sessionStorage?.setItem(al,Cn?"1":"0")}catch{}e.searchParams.delete(sl),window.history.replaceState(window.history.state,"",e.toString())}}catch(e){console.error("Failed to capture test mode from URL:",e)}}function Wv(){return Cn}function V(e){if(e===!0)return"Yes";if(e===!1)return"No"}function Ue(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 qv(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=Ue(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=Ue(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=V(t.is_mailing_address_different)),t.mailing_address&&(r.mailing_address=t.mailing_address),t.effective_date&&(r.effective_date=Ue(t.effective_date)),t.auto_has_prior_insurance!==null&&t.auto_has_prior_insurance!==void 0&&(r.auto_has_prior_insurance=V(t.auto_has_prior_insurance)),t.auto_prior_expiration_date&&(r.auto_prior_expiration_date=Ue(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=V(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=V(t.home_has_prior_insurance)),t.home_prior_expiration_date&&(r.home_prior_expiration_date=Ue(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=V(t.property_insurance_cancelled)),t.lapse_in_coverage!==null&&t.lapse_in_coverage!==void 0&&(r.lapse_in_coverage=V(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=V(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=V(t.mit_credit_form)),t.storm_shutters!==null&&t.storm_shutters!==void 0&&(r.storm_shutters=V(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=V(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=V(t.has_vicious_animals)),t.has_business_on_premises!==null&&t.has_business_on_premises!==void 0&&(r.has_business_on_premises=V(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=V(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=V(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=V(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=V(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=V(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=V(t.has_garage)),t.has_pool!==null&&t.has_pool!==void 0&&(r.has_pool=V(t.has_pool)),t.has_trampoline!==null&&t.has_trampoline!==void 0&&(r.has_trampoline=V(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=V(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=Ue(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=V(t.retiree_discount)),t.gated_community_discount!==null&&t.gated_community_discount!==void 0&&(r.gated_community_discount=V(t.gated_community_discount)),t.multi_policy_discount!==null&&t.multi_policy_discount!==void 0&&(r.multi_policy_discount=V(t.multi_policy_discount)),t.non_smoker_discount!==null&&t.non_smoker_discount!==void 0&&(r.non_smoker_discount=V(t.non_smoker_discount)),t.first_time_buyer_discount!==null&&t.first_time_buyer_discount!==void 0&&(r.first_time_buyer_discount=V(t.first_time_buyer_discount)),t.fire_detection_system!==null&&t.fire_detection_system!==void 0&&(r.fire_detection_system=V(t.fire_detection_system)),t.burglar_alarm_system!==null&&t.burglar_alarm_system!==void 0&&(r.burglar_alarm_system=V(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=V(t.smoke_detectors)),t.sprinkler_system!==null&&t.sprinkler_system!==void 0&&(r.sprinkler_system=V(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=V(t.gas_leakage_detector)),t.deadbolt_locks!==null&&t.deadbolt_locks!==void 0&&(r.deadbolt_locks=V(t.deadbolt_locks)),t.fire_extinguisher!==null&&t.fire_extinguisher!==void 0&&(r.fire_extinguisher=V(t.fire_extinguisher)),t.order_credit_authorized!==null&&t.order_credit_authorized!==void 0&&(r.order_credit_authorized=V(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=V(t.has_health_insurance_auto_accident)),t.is_corporation!==null&&t.is_corporation!==void 0&&(r.is_corporation=V(t.is_corporation)),t.named_insured_foreclosure_repo_bankruptcy!==null&&t.named_insured_foreclosure_repo_bankruptcy!==void 0&&(r.named_insured_foreclosure_repo_bankruptcy=V(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=V(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=Ue(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=Ue(a.date_first_licensed)),a.education_level&&(c.education_level=Ja(a.education_level)),a.occupation&&(c.occupation=Qa(a.occupation)),a.industry&&(c.industry=ln(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=V(a.last_5_years_license_suspended_or_revoked)),a.accident_prevention_course!==null&&a.accident_prevention_course!==void 0&&(c.accident_prevention_course=V(a.accident_prevention_course)),a.accident_prevention_course_date&&(c.accident_prevention_course_date=Ue(a.accident_prevention_course_date)),a.sr22!==null&&a.sr22!==void 0&&(c.sr22=V(a.sr22));const u=a.ssn_display;typeof u=="string"&&(c.ssn_display=u);const d=a.driver_violations;d&&d.length>0&&(c.driver_violations="Yes",c.driver_violations__items=d.map(h=>{const g={};return h.code&&(g.code=h.code),h.occurred_at&&(g.occurred_at=Ue(h.occurred_at)),g}));const f=a.driver_accidents;f&&f.length>0&&(c.driver_accidents="Yes",c.driver_accidents__items=f.map(h=>{const g={};return h.occurred_at&&(g.occurred_at=Ue(h.occurred_at)),h.description&&(g.description=h.description),h.quote_vehicle_id&&(g.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&&(g.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&&(g.personal_injury_amount_paid_cents=h.personal_injury_amount_paid_cents),g}));const _=a.losses;return _&&_.length>0&&(c.losses="Yes",c.losses__items=_.map(h=>{const g={};return h.description&&(g.description=h.description),h.date_of_incident&&(g.date_of_incident=Ue(h.date_of_incident)),h.amount_paid_cents!==null&&h.amount_paid_cents!==void 0&&(g.amount_paid_cents=h.amount_paid_cents),h.quote_vehicle_id&&(g.quote_vehicle_id=i[h.quote_vehicle_id]??h.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 u=[];return a.garaging_address_line_1&&u.push(a.garaging_address_line_1),a.garaging_address_line_2&&u.push(a.garaging_address_line_2),a.garaging_address_city&&u.push(a.garaging_address_city),a.garaging_address_state&&u.push(a.garaging_address_state),a.garaging_address_postal_code&&u.push(a.garaging_address_postal_code),u.length>0&&(c.garaging_address=u.join(", ")),a.new_when_purchased!==null&&a.new_when_purchased!==void 0&&(c.new_when_purchased=V(a.new_when_purchased)),a.purchase_date&&(c.purchase_date=Ue(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=V(a.anti_lock_brakes)),a.daytime_running_lights!==null&&a.daytime_running_lights!==void 0&&(c.daytime_running_lights=V(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=V(a.vehicle_has_modifications)),a.vehicle_garaged_at_residence!==null&&a.vehicle_garaged_at_residence!==void 0&&(c.vehicle_garaged_at_residence=V(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=V(a.vehicle_full_glass)),a.vehicle_loan_lease!==null&&a.vehicle_loan_lease!==void 0&&(c.vehicle_loan_lease=V(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=V(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=Ue(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 Gv={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"};function Zv(e){return Gv[e]||e}const cl=new Set(["Zip","Product","Driver","Vehicle"]);function Vv(e){return e?Array.isArray(e.drivers__items)?e.drivers__items.length:Array.isArray(e.drivers)?e.drivers.length:null:null}function ll(e,t){const r=Vv(t),n=e.filter(i=>i.key!=="AutoPolicy"),o=n.length>0?n:e;return o}function Yv(e,t){const r=e.findIndex(o=>o.key===t);return r<0?t:e[r+1]?.key??t}function ul(e){return e.some(t=>String(t.key)==="BundlePolicy"||String(t.key)==="BundleCustomer")}function dl(e){return ul(e)?"Bundle":e.some(t=>String(t.key)==="Vehicle"||String(t.key)==="Driver")?"Auto":"Home"}const Kv={Auto:45e3,Home:5e4,Bundle:1e5};function Jv(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 Qv(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 Xv({isOpen:e,onClose:t}){const[r,n]=m.useState([]),[o,i]=m.useState(null),s=m.useRef(null);m.useEffect(()=>{s.current=o},[o]);const[a,c]=m.useState(null),[u,d]=m.useState(!1),[f,_]=m.useState(!1),[h,g]=m.useState([]),y=m.useRef(null),[W,x]=m.useState(null),[H,M]=m.useState(void 0),[R,C]=m.useState(!1),[z,Y]=m.useState(null),[U,J]=m.useState(null),[X,ie]=m.useState(!1),[Z,ne]=m.useState(!1),[pe,Q]=m.useState(!1),ee=m.useRef(!1);m.useEffect(()=>{if(!u||f)return;const v=dl(r);let S=!1;const w=[];let k=0,I=0;const P=66,T=3,N=5e3;let A=!1;const B=async()=>{if(S)return;k++;try{const{quote:K}=await yc();if(S)return;if(I=0,!A){const se=K?.appetites??null,F=ev(se,v);F.length>0&&(g(F),A=!0)}const q=K?.rates_status??null;if(q==="completed"){const{rates:se}=await Go();if(S)return;y.current=se,_(!0);return}if(q==="no_rates"){y.current=[],_(!0);return}if(q==="failed"){ir(new Error("Quote failed: rate-generation worker reported rates_status=failed"),{quoteId:s.current??void 0,phase:"rates_status_failed"}),Ar({reason:"submission"}),Y({message:"submission_failed"}),d(!1);return}}catch(K){if(I++,console.warn("Provider polling: getQuote failed",{attempt:k,consecutiveFailures:I,error:K}),I>=T){K?.__sentryReported||ir(K,{quoteId:s.current??void 0,phase:"rates_polling",message:`Quote failed: ${T} consecutive get-quote poll failures`}),Ar({reason:"network"}),Y({message:"submission_failed"}),d(!1);return}}if(S)return;if(k>=P){ir(new Error(`Quote failed: rate-generation timed out after ${P} polls`),{quoteId:s.current??void 0,phase:"rates_polling_timeout"}),Ar({reason:"timeout"}),Y({message:"submission_failed"}),d(!1);return}const $=window.setTimeout(B,N);w.push($)};return B(),()=>{S=!0,w.forEach($=>window.clearTimeout($))}},[u,f,r]);function L(v){return v.map(w=>({key:w,title:Zv(w),loadQuestions:async()=>{const k=await mb(w,s.current??void 0);let I=Jv(w,k.questions);return I=Qv(w,I),I}}))}m.useEffect(()=>{const v=async()=>{try{const S=Rv();if(S)try{const{token:k,quoteId:I}=await gb(S);k&&I&&(Wo(k),ec(I))}catch(k){k.statusCode===401&&ne(!0)}const w=pn();if(qo(),w){C(!0),i(w);try{const k=Bt(),I=await yc(k?void 0:w);if(!I||!I.quote)throw new Error("Invalid response from getQuote: missing quote data");const{quote:P}=I,{stages:T}=await _n(w),N=L(T);n(N);let A;try{A=qv(P),x(A)}catch(q){throw new Error(`Failed to transform quote data: ${q instanceof Error?q.message:"Unknown error"}`)}const B=ll(N,A);if(n(B),(P?.review_status??null)==="pending_review"&&Bt()){Q(!0);return}const K=P?.rates_status??null;if(Bt()){if(K==="completed")try{const{rates:q}=await Go();c(q);return}catch(q){console.warn("Failed to fetch completed rates on resume",q)}else if(K==="no_rates"){c([]);return}else if(K==="processing"){g([]),_(!1),y.current=null,d(!0);return}}if(P.current_stage){const q=P.current_stage==="State"?"Product":P.current_stage,se=B.findIndex(F=>F.key===q);se>=0?M(se):M(B.length-1)}else M(B.length-1)}catch(k){const I=k;if(I.statusCode===404)tc(),i(null);else if(I.statusCode===401){_c();try{const{stages:P}=await _n(w),T=L(P);n(T);const N=T.findIndex(A=>A.key==="SMSVerification");N>=0&&M(N)}catch{}}}finally{C(!1)}}else{const{stages:k}=await _n();n(L(k))}}catch{C(!1)}};e&&!ee.current&&(ee.current=!0,v())},[e]),m.useEffect(()=>{if(!e)return;const{overflow:v}=document.body.style;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=v}},[e]);const te=m.useCallback(v=>{v.key==="Escape"&&(Dc(),t())},[t]);m.useEffect(()=>{if(e)return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[e,te]),m.useEffect(()=>{e||(x(null),M(void 0),C(!1),d(!1),J(null),ie(!1))},[e]),m.useEffect(()=>{e&&Rb()},[e]),m.useEffect(()=>{a&&Array.isArray(a)&&Wb({rateCount:a.length})},[a]);const ge=m.useCallback(()=>{Y(null),M(Math.max(0,r.length-1))},[r.length]),D=m.useCallback(async(v,S)=>{try{g([]),_(!1),y.current=null,d(!0);let w;try{w=await Ut(v,!0)}catch(P){throw d(!1),P}if(w.status==="submission_failed"){ir(new Error(`Quote failed at submission: ${w.message}`),{quoteId:o??void 0,phase:S}),d(!1),_(!1),y.current=null,Ar({reason:"submission"}),Y({message:w.message});return}if(w.status==="success")try{const{rates:P}=await Go();y.current=P,_(!0)}catch(P){throw d(!1),P}const k=r.length,I=r[k-1];Pc({stageKey:I?.key??"unknown",stageTitle:I?.title??"unknown",stepIndex:k,totalSteps:k}),jb()}catch(w){w?.__sentryReported||ir(w,{quoteId:o??void 0,phase:S}),d(!1),Ar({reason:"submission"}),Y({message:"Oops, something went wrong. Please try again later."})}},[o,r]),re=m.useCallback(async v=>{if(!(!U||!o||X)){ie(!0);try{const w={...cr(U.allValues),communications_consent:v};J(null),await D(w,"consent_submit")}finally{ie(!1)}}},[U,o,X,D]),O=m.useCallback(async v=>{if(!(!o||X)){ie(!0);try{x(v);const S={...cr(v),customer_review_confirmed:!0};await D(S,"review_submit")}finally{ie(!1)}}},[o,X,D]);if(!e)return null;const b=()=>{Dc(),t()},p=!!(!z&&a&&o);return l.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center",role:"dialog","aria-modal":"true","aria-labelledby":"insurance-modal-title",children:[l.jsx("div",{className:"backdrop","aria-hidden":"true"}),l.jsxs("div",{className:`modal-panel bg-white relative w-full flex flex-col max-h-[90vh] overflow-hidden ${p?"max-w-6xl":"max-w-2xl"}`,role:"document",children:[l.jsx("button",{onClick:b,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&&!z&&l.jsx("div",{className:"text-center mb-6",children:l.jsx("h2",{id:"insurance-modal-title",className:"h1-title",children:"Let's shop multiple leading carriers for you."})}),l.jsxs("div",{className:"panel-body flex-1 min-h-0 overflow-y-auto",children:[Z&&l.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:[l.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."}),l.jsx("button",{type:"button",onClick:()=>ne(!1),className:"shrink-0 font-bold text-amber-800 hover:text-amber-900","aria-label":"Dismiss",children:"×"})]}),z&&l.jsx(Jc,{onGoBack:ge}),!z&&u&&(()=>{const v=dl(r);return l.jsx(bv,{providers:h,totalTime:Kv[v],flow:v,isComplete:f,onComplete:()=>{d(!1),_(!1),g([]),y.current&&(c(y.current),y.current=null)}})})(),!z&&!u&&U&&l.jsx(Yp,{onChoose:re,isSubmitting:X}),!z&&!a&&!u&&!U&&l.jsx(l.Fragment,{children:R||r.length===0?l.jsx("div",{className:"flex items-center justify-center py-12",children:l.jsx("div",{className:"text-slate-600",children:"Loading..."})}):pe&&o?l.jsx(gv,{stages:r,initialValues:W??{},quoteId:o,isSubmitting:X,onConfirmed:O}):l.jsx(Jb,{stages:r,initialValues:W??void 0,initialActive:H,quoteId:o??void 0,nonTerminalStageKeys:cl,onStageComplete:async(v,S)=>{try{const w=cr(v);let k=o,I=r;const P=I.findIndex(A=>A.key===S),T=I[P],N=Yv(I,S);if(k)if(S==="Phone"){const A=w.phone;if(!A)throw new Error("Phone number is required.");const B=Bt();await Ut({...w,current_stage:N},!1,B?void 0:k),await hb(k,A)}else if(S==="SMSVerification"){const{isVerified:A,token:B}=await hc(k,w.sms_code);if(!A)throw new Error("Invalid SMS code");B&&Wo(B),await Ut({current_stage:N},!1)}else if(S==="Product"){const A=Bt(),{isSupported:B}=await gc(w.state,A?void 0:k??void 0);if(await Ut({...w,current_stage:B?N:S},!1,A?void 0:k),!B){const $=Vc(w.state);throw new Error(`Sorry, Credify Corporation doesn't currently offer insurance in ${$}. We're expanding our coverage and hope to serve your state soon.`)}}else{const A=Bt();await Ut({...w,current_stage:N},!1,A?void 0:k||void 0)}else{const A=w.postal_code??"";if(!A)throw new Error("ZIP code is required to start a quote.");const $=(await _b(A,Wv()))?.quoteId;if(!$||typeof $!="string"||$.trim()==="")throw new Error(`Failed to create quote - invalid quoteId returned: ${$}`);k=$,i($),ec($),await Ut({...w,current_stage:N},!1,$)}if(cl.has(S))try{const{stages:A}=await _n(k||void 0);I=L(A),I=ll(I,v),n(I)}catch(A){console.warn("Unable to refresh stages after flow-shaping step",A)}return Pc({stageKey:S,stageTitle:T?.title??S,stepIndex:P+1,totalSteps:I.length}),{success:!0,latestStages:I}}catch(w){return{success:!1,error:w instanceof Error?w.message:"An error occurred"}}},onComplete:async(v,S)=>{if(!o)return{success:!1,error:"Oops, something went wrong. Please try again later."};x(v);try{if(S==="SMSVerification"){const w=cr(v),{isVerified:k,token:I}=await hc(o,w.sms_code);return k?(I&&Wo(I),J({allValues:v}),{success:!0}):{success:!1,error:"Invalid SMS code"}}return J({allValues:v}),{success:!0}}catch{const k="Oops, something went wrong. Please try again later.";return Y({message:k}),{success:!1,error:k}}}})})," ",!z&&a&&o&&l.jsx(av,{rates:a,onBack:()=>c(null),isBundleFlow:ul(r)})]}),l.jsxs("div",{className:"mt-4 pt-4 border-t border-slate-200 space-y-2",children:[l.jsx(Bv,{}),l.jsx("p",{className:"text-center text-sm text-slate-500",children:"Insurance products offered through Credify Corporation, a licensed insurance agency."})]})]})]})}function eS({onClose:e}){return l.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center",role:"dialog","aria-modal":"true",children:[l.jsx("div",{className:"backdrop","aria-hidden":"true"}),l.jsx("div",{className:"modal-panel bg-white relative w-full max-w-2xl p-6",children:l.jsx(Jc,{onGoBack:e})})]})}function tS({isOpen:e}){const t=()=>Tn.close();return l.jsx(ho,{fallback:l.jsx(eS,{onClose:t}),children:l.jsx(Xv,{isOpen:e,onClose:t})})}var si={dsn:"",environment:"production",release:"958d819ebb365b8405a9eac7524dc39e0bef7e61"};function rS(){try{return typeof si<"u"&&si?si:{}}catch{return{}}}let fl=!1;function nS(e,t){if(!e)return t;const r=Number(e);return Number.isFinite(r)&&r>=0&&r<=1?r:t}function oS(e={}){if(fl)return!0;if(typeof window>"u")return!1;const t=rS(),r=e.dsn??t.dsn;return!r||e.enabled===!1?!1:(nb({baseUrl:De}),Pp({dsn:r,environment:e.environment??t.environment??"production",release:e.release??t.release,sendDefaultPii:!1,maxBreadcrumbs:50,tracesSampleRate:e.tracesSampleRate??nS(t.tracesSampleRate,.1),tracePropagationTargets:[De],replaysSessionSampleRate:0,replaysOnErrorSampleRate:1,beforeSend:n=>uc(n),beforeBreadcrumb:n=>n&&(uc({breadcrumbs:[n]}),n)}),fl=!0,Mp("replayIntegration").then(n=>{try{vd(n({maskAllText:!0,maskAllInputs:!0,blockAllMedia:!0,networkDetailAllowUrls:[De],networkCaptureBodies:!1}))}catch{}}).catch(()=>{}),!0)}var ai={key:""};const iS="mock";function sS(){try{return typeof ai<"u"&&ai&&ai.key||void 0}catch{return}}function aS(){const e=sS();if(!e||typeof window>"u"||!window.location)return!1;try{return new URLSearchParams(window.location.search).get(iS)===e}catch{return!1}}const cS=new Set(["/create-quote","/get-stages-for-quote","/get-questions-by-stage","/update-quote","/verify-quote","/is-supported-state","/get-rates","/get-quote","/get-vehicle-options","/request-bind"]);let pl=!1;function lS(e){try{if(typeof e=="string")return new URL(e,window.location.href).pathname;if(e instanceof URL)return e.pathname;if(e instanceof Request)return new URL(e.url,window.location.href).pathname}catch{return null}return null}async function uS(e,t){try{if(t?.body&&typeof t.body=="string")return JSON.parse(t.body);if(e instanceof Request){const r=await e.clone().text();return r?JSON.parse(r):{}}}catch{return{}}return{}}function ml(e,t=200){return new Response(JSON.stringify(e),{status:t,headers:{"Content-Type":"application/json"}})}function dS(){try{if(typeof document>"u"||document.getElementById("credify-mock-badge"))return;const e=()=>{const t=document.createElement("div");t.id="credify-mock-badge",t.textContent="MOCK MODE",t.setAttribute("aria-hidden","true"),t.style.cssText=["position:fixed","bottom:12px","left:12px","z-index:2147483647","background:#b91c1c","color:#fff","font:600 11px/1 system-ui,sans-serif","letter-spacing:0.08em","padding:6px 10px","border-radius:9999px","box-shadow:0 1px 4px rgba(0,0,0,0.3)","pointer-events:none","user-select:none"].join(";"),document.body.appendChild(t)};document.body?e():document.addEventListener("DOMContentLoaded",e,{once:!0})}catch{}}function fS(){if(pl||typeof window>"u"||typeof window.fetch!="function"||!aS())return;pl=!0;const e=window.fetch.bind(window),t=Promise.resolve().then(()=>US);window.fetch=async(r,n)=>{const o=lS(r);if(!o||!cS.has(o))return e(r,n);const i=await uS(r,n),{handleMockRequest:s}=await t;await new Promise(a=>window.setTimeout(a,120));try{return ml(s(o,i))}catch(a){return ml({error:a instanceof Error?a.message:"Mock handler error"},404)}},dS(),typeof console<"u"&&console.info("[Credify] Mock mode active — all API calls are served from in-memory fixtures.")}fS();let lt=null,Rt=null,An=!1;function pS(){lt||(lt=document.createElement("div"),lt.id="insurance-widget-root",document.documentElement.appendChild(lt)),!Rt&<&&(Rt=El.createRoot(lt))}function ci(){pS(),Rt&&Rt.render(m.createElement(tS,{isOpen:An}))}function mS(){Rt&<&&(Rt.unmount(),lt.remove()),Rt=null,lt=null,rl(),Hb()}const Tn={init:e=>{oS(e?.sentry),Pv(e?.support),Uv(),jv(),An=!!e?.autoOpen||Hv(),ci()},open:()=>{An=!0,ci()},close:()=>{An=!1,ci()},destroy:mS,on:Oc,off:Mc,support:{openChat:el,startScreenShare:tl}};typeof window<"u"&&(window.CredifyInsuranceWidget=Tn);const _S=["Zip","Email","Product"],hS={Auto:["Zip","Email","Product","Name","Vehicle","Driver","AutoCurrentCarrier","Demographics","Ssn","Phone","SMSVerification"],Home:["Zip","Email","Product","Name","Home","HomePolicy","Demographics","Ssn","Phone","SMSVerification"],Bundle:["Zip","Email","Product","Name","Home","Vehicle","Driver","BundlePolicy","Demographics","Ssn","Phone","SMSVerification"]};function gS(e){return e==="Auto"||e==="Home"||e==="Bundle"?hS[e]:_S}const _l=["Allstate","State Farm","GEICO","Progressive","Liberty Mutual","Nationwide","Farmers","NoPriorInsurance"],hl=["25/50","50/100","100/300","250/500"],yS=Array.from({length:35},(e,t)=>String(2024-t)),bS=[{question:"What's your ZIP code?",inputType:"text",key:"postal_code",required:!0}],vS=[{question:"What is your email address?",inputType:"email",key:"email",required:!0}],SS=[{question:"Do you want to quote auto, home, or both?",inputType:"select",options:["Auto","Home","Bundle"],key:"product",required:!0},{question:"What is your property address?",inputType:"address",key:"address",required:!0}],ES=[{question:"What is your first name?",inputType:"text",key:"first_name",required:!0},{question:"What is your last name?",inputType:"text",key:"last_name",required:!0},{question:"What is your date of birth?",inputType:"date",key:"date_of_birth",required:!0}],wS=[{question:"Add Vehicles",inputType:"radio",options:["Yes"],key:"vehicles",required:!0,conditionals:[{conditionalType:"equals",conditionalValue:"Yes",conditionalQuestionsAllowMultiple:!0,conditionalQuestions:[{question:"Vehicle Identification Number (VIN)",inputType:"text",key:"vin",required:!1},{question:"Year",inputType:"select",options:yS,key:"year",required:!0},{question:"Make",inputType:"select",options:[],key:"make",required:!0},{question:"Model",inputType:"select",options:[],key:"model",required:!0},{question:"Body style",inputType:"select",options:[],key:"body_style",required:!0},{question:"Vehicle ownership type",inputType:"select",options:["Owned","Leased","Lien"],key:"ownership_type",required:!0},{question:"What is the primary use of this vehicle?",inputType:"select",options:["Pleasure","To_FromWork","To_FromSchool","Business","Farming"],key:"usage",required:!0},{question:"Annual mileage driven",inputType:"number",key:"annual_mileage",required:!0}]}]}],CS=[{question:"Add Drivers",inputType:"radio",options:["Yes"],key:"drivers",required:!0,conditionals:[{conditionalType:"equals",conditionalValue:"Yes",conditionalQuestionsAllowMultiple:!0,conditionalQuestions:[{question:"First Name",inputType:"text",key:"first_name",required:!0},{question:"Middle Name Initial",inputType:"text",key:"middle_name",required:!1},{question:"Last Name",inputType:"text",key:"last_name",required:!0},{question:"Date of Birth",inputType:"date",key:"date_of_birth",required:!0},{question:"Gender",inputType:"select",options:["Male","Female"],key:"gender",required:!0},{question:"What is the relationship to Driver #1?",inputType:"select",options:["Spouse","Parent","Child","Domestic Partner","Relative","Employee","Other"],key:"relationship_to_insured",required:!0},{question:"Marital status",inputType:"select",options:["Single","Married","Divorced","Widowed"],key:"marital_status",required:!0}]}]}],gl=[{question:"When do you need your insurance to begin?",inputType:"date",key:"effective_date",required:!0},{question:"Type of residence",inputType:"select",options:["Single Family Dwelling","Condo","Apartment","Townhouse","Mobile Home"],key:"residence_type",required:!0},{question:"Please select your current auto insurance company",inputType:"select",options:_l,key:"auto_prior_carrier_name",required:!0,conditionals:[{conditionalType:"notEquals",conditionalValue:"NoPriorInsurance",conditionalQuestions:[{question:"Years with prior personal auto carrier",inputType:"number",key:"auto_prior_years",required:!0},{question:"Months with prior personal auto carrier",inputType:"number",key:"auto_prior_months",required:!0},{question:"When does the current policy expire?",inputType:"date",key:"auto_prior_expiration_date",required:!0},{question:"What is your current or most recent Bodily Injury Limit?",inputType:"select",options:hl,key:"auto_prior_liability_limit",required:!0}]}]},{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},{question:"Bodily Injury liability",inputType:"select",options:hl,key:"policy_bi",required:!0},{question:"Property Damage Liability",inputType:"select",options:["25000","50000","100000"],key:"policy_pd",required:!0}],AS=[{question:"Year built",inputType:"number",key:"year_built",required:!0},{question:"Total living area (sq ft)",inputType:"number",key:"total_area_sq_ft",required:!0},{question:"Dwelling type",inputType:"select",options:["Single Family","Condo","Townhouse","Multi-Family"],key:"dwelling_type",required:!0},{question:"Construction type",inputType:"select",options:["Frame","Masonry","Masonry Veneer","Fire Resistive"],key:"construction_type",required:!0},{question:"Roof material",inputType:"select",options:["Asphalt Shingle","Metal","Tile","Wood Shake","Slate"],key:"roof_material_type",required:!0},{question:"Number of stories",inputType:"select",options:["1","1.5","2","2.5","3"],key:"number_of_stories",required:!0}],yl=[{question:"When do you need your insurance to begin?",inputType:"date",key:"effective_date",required:!0},{question:"Do you currently have a Homeowners policy?",inputType:"radio",options:["Yes","No"],key:"home_has_prior_insurance",required:!0,conditionals:[{conditionalType:"equals",conditionalValue:"Yes",conditionalQuestions:[{question:"Which carrier currently insures the home?",inputType:"select",options:_l,key:"home_prior_carrier_name",required:!0}]}]},{question:"Personal liability limit",inputType:"select",options:["100000","300000","500000","1000000"],key:"home_personal_liability",required:!0},{question:"All-perils deductible",inputType:"select",options:["500","1000","2500","5000"],key:"home_all_perils_deductible",required:!0}],TS=[...yl,...gl],kS={Zip:bS,Email:vS,Product:SS,Name:ES,Vehicle:wS,Driver:CS,AutoCurrentCarrier:gl,Home:AS,HomePolicy:yl,BundlePolicy:TS,Demographics:[{question:"Gender",inputType:"radio",options:["Male","Female"],key:"gender",required:!0},{question:"Marital status",inputType:"select",options:["Single","Married","Divorced","Widowed","Domestic Partner"],key:"marital_status",required:!0},{question:"Employment industry",inputType:"select",options:["Technology","Healthcare","Education","Finance","Retail","Construction","Other"],key:"employment_industry",required:!0},{question:"How many occupants live in the household?",inputType:"number",key:"household_size",required:!0},{question:"Do you authorize us to check your credit?",inputType:"radio",options:["Yes","No"],key:"order_credit_authorized",required:!0}],Ssn:[{question:"Social Security Number",inputType:"text",key:"social_security_number",required:!1}],Phone:[{question:"What is your phone number?",inputType:"tel",key:"phone",required:!0}],SMSVerification:[{question:"Please enter the code we sent to your phone number.",inputType:"text",key:"sms_code",required:!0}]};function IS(e){return kS[e]??[]}const NS=[{quote_rate_id:"mock-rate-1",carrier_name:"Progressive",carrier_logo_base64:null,carrier_quote_id:"MOCK-PRG-001",premium_cents:142800,monthly_premium_cents:11900,term_months:12,lob:"auto",admitted_status:"admitted",effective_date:"2026-07-01",policy_end_date:"2027-07-01"},{quote_rate_id:"mock-rate-2",carrier_name:"Nationwide",carrier_logo_base64:null,carrier_quote_id:"MOCK-NW-002",premium_cents:156e3,monthly_premium_cents:13e3,term_months:12,lob:"auto",admitted_status:"admitted",effective_date:"2026-07-01",policy_end_date:"2027-07-01"},{quote_rate_id:"mock-rate-3",carrier_name:"Liberty Mutual",carrier_logo_base64:null,carrier_quote_id:"MOCK-LM-003",premium_cents:173400,monthly_premium_cents:14450,term_months:12,lob:"auto",admitted_status:"non_admitted",effective_date:"2026-07-01",policy_end_date:"2027-07-01"},{quote_rate_id:"mock-nq-1",carrier_name:"Travelers",carrier_logo_base64:null,carrier_quote_id:null,premium_cents:0,monthly_premium_cents:null,term_months:0,lob:"auto",admitted_status:"not_quoted",effective_date:null,policy_end_date:null,decline_category:"Upfront Underwriting",decline_reasons:["Consumer didn’t grant permission to review credit score."]},{quote_rate_id:"mock-nq-2",carrier_name:"NationalGeneral",carrier_logo_base64:null,carrier_quote_id:null,premium_cents:0,monthly_premium_cents:null,term_months:0,lob:"auto",admitted_status:"not_quoted",effective_date:null,policy_end_date:null,decline_category:"Declinations",decline_reasons:["Carrier requires credit report ordering. Please select Yes for Credit Check Authorized.","Monoline quoting is not allowed."]},{quote_rate_id:"mock-nq-3",carrier_name:"Allstate",carrier_logo_base64:null,carrier_quote_id:null,premium_cents:0,monthly_premium_cents:null,term_months:0,lob:"auto",admitted_status:"not_quoted",effective_date:null,policy_end_date:null,decline_category:"Declinations",decline_reasons:["This carrier will not quote if the credit disclosure is not accepted by the insured."]}],OS=["Toyota","Honda","Ford","Chevrolet","Tesla","Subaru"],MS={Toyota:["Camry","Corolla","RAV4","Highlander","Tacoma"],Honda:["Civic","Accord","CR-V","Pilot","Odyssey"],Ford:["F-150","Escape","Explorer","Mustang","Bronco"],Chevrolet:["Silverado","Equinox","Malibu","Tahoe","Camaro"],Tesla:["Model 3","Model Y","Model S","Model X"],Subaru:["Outback","Forester","Crosstrek","Impreza"]},DS=["Sedan","SUV","Truck","Coupe","Hatchback","Minivan"];function PS(e){return e.make&&e.model?{ready:!0,bodyStyles:DS}:e.make?{ready:!0,models:MS[e.make]??["Base","Sport","Limited"]}:{ready:!0,makes:OS}}function LS(){return{year:2022,make:"Toyota",model:"Camry",bodyStyle:"Sedan"}}const kn="mock-quote-0001",bl="mock-jwt-token";let Tr={quote_id:kn};function xS(e={}){Tr={quote_id:kn,...e}}function FS(e){return e.action==="send"?{success:!0}:e.action==="resume"?{isVerified:!0,token:bl,quoteId:kn}:{isVerified:!0,token:bl}}function $S(e){return e.action==="vinDecode"?LS():PS({year:typeof e.year=="number"?e.year:void 0,make:typeof e.make=="string"?e.make:void 0,model:typeof e.model=="string"?e.model:void 0})}function BS(e,t){switch(e){case"/create-quote":return xS({postal_code:t.postal_code}),{quoteId:kn};case"/get-stages-for-quote":return{stages:gS(Tr.product)};case"/get-questions-by-stage":return{questions:IS(t.stage)};case"/update-quote":{const r={...t.payload??{}};return delete r.current_stage,Tr={...Tr,...r},{status:"success"}}case"/verify-quote":return FS(t);case"/is-supported-state":return{isSupported:!0};case"/get-rates":return{rates:NS};case"/get-quote":return{quote:Tr};case"/get-vehicle-options":return $S(t);case"/request-bind":return{success:!0};default:throw new Error(`No mock handler for ${e}`)}}const US=Object.freeze(Object.defineProperty({__proto__:null,handleMockRequest:BS},Symbol.toStringTag,{value:"Module"}));Ze.CredifyInsuranceWidget=Tn,Ze.default=Tn,Object.defineProperties(Ze,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
99
99
|
//# sourceMappingURL=index.umd.js.map
|