@harshshahcg/survey-render 1.1.0 → 1.1.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode(`/*! tailwindcss v4.2.0 | MIT License | https://tailwindcss.com */@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-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--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-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-outline-style:solid;--tw-duration:initial;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@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-orange-50:oklch(98% .016 73.684);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-yellow-500:oklch(79.5% .184 86.047);--color-green-50:oklch(98.2% .018 155.826);--color-green-200:oklch(92.5% .084 155.995);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-blue-50:oklch(97% .014 254.604);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-500:oklch(62.3% .214 259.815);--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-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-4xl:56rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--leading-relaxed:1.625;--radius-xs:.125rem;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--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);--color-primary:#2e74ff;--color-secondary:#e8b018;--color-primaryLight:#eff6ff;--color-primaryDark:#1e3a8a;--color-textBlack:#333;--color-textGray:#737373;--color-borderGray:#e0e0e0;--color-warning:#fef9c3;--color-error:#ef4444;--color-background:#fff;--color-foreground:#0f172a;--color-muted:#f1f5f9;--color-muted-foreground:#64748b;--color-destructive:#ef4444;--color-border:#e2e8f0;--color-input:#e2e8f0;--color-ring:#3b82f6;--color-card:#fff;--color-card-foreground:#0f172a;--color-popover:#fff;--color-popover-foreground:#0f172a;--color-primary-foreground:#fff;--color-secondary-foreground:#0f172a;--color-accent:#f1f5f9;--color-accent-foreground:#0f172a}}@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%;-moz-tab-size:4;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]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--color-border)}body{background-color:var(--color-background);color:var(--color-foreground);font-family:Inter,sans-serif}}@layer components{.loader{width:50px;height:50px;animation:1s infinite rotate}.loader:before,.loader:after{content:"";width:20px;height:20px;display:block}.loader:before{background-color:#fff;margin-bottom:10px;animation:1s infinite box1;box-shadow:30px 0 #2e74ff}.loader:after{background-color:#2e74ff;animation:1s infinite box2;box-shadow:30px 0 #fff}@keyframes rotate{0%{transform:rotate(0)scale(.8)}50%{transform:rotate(360deg)scale(1.2)}to{transform:rotate(720deg)scale(.8)}}@keyframes box1{0%{box-shadow:30px 0 #2e74ff}50%{margin-bottom:0;transform:translate(15px,15px);box-shadow:0 0 #2e74ff}to{margin-bottom:10px;box-shadow:30px 0 #2e74ff}}@keyframes box2{0%{box-shadow:30px 0 #fff}50%{margin-top:-20px;transform:translate(15px,15px);box-shadow:0 0 #fff}to{margin-top:0;box-shadow:30px 0 #fff}}}@layer utilities{.\\@container\\/card-header{container:card-header/inline-size}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.-top-3{top:calc(var(--spacing) * -3)}.top-0{top:calc(var(--spacing) * 0)}.top-4{top:calc(var(--spacing) * 4)}.top-\\[50\\%\\]{top:50%}.-right-3{right:calc(var(--spacing) * -3)}.right-0{right:calc(var(--spacing) * 0)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.left-\\[50\\%\\]{left:50%}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.z-\\[100\\]{z-index:100}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.row-start-1{grid-row-start:1}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing) * 1)}.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-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.field-sizing-content{field-sizing:content}.size-3\\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-96{height:calc(var(--spacing) * 96)}.h-\\[calc\\(100\\%-1px\\)\\]{height:calc(100% - 1px)}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-px{height:1px}.max-h-\\(--radix-select-content-available-height\\){max-height:var(--radix-select-content-available-height)}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-64{max-height:calc(var(--spacing) * 64)}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-4{min-height:calc(var(--spacing) * 4)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-24{width:calc(var(--spacing) * 24)}.w-32{width:calc(var(--spacing) * 32)}.w-72{width:calc(var(--spacing) * 72)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-4xl{max-width:var(--container-4xl)}.max-w-\\[calc\\(100\\%-2rem\\)\\]{max-width:calc(100% - 2rem)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[60px\\]{min-width:60px}.min-w-\\[140px\\]{min-width:140px}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.translate-x-\\[-50\\%\\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\\[-50\\%\\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-50{--tw-scale-x:50%;--tw-scale-y:50%;--tw-scale-z:50%;scale:var(--tw-scale-x) var(--tw-scale-y)}.rotate-180{rotate:180deg}.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-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-y{resize:vertical}.scroll-my-1{scroll-margin-block:calc(var(--spacing) * 1)}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.auto-rows-min{grid-auto-rows:min-content}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.grid-cols-\\[0_1fr\\]{grid-template-columns:0 1fr}.grid-rows-\\[auto_auto\\]{grid-template-rows:auto auto}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.justify-items-start{justify-items:start}.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-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)))}.gap-y-0\\.5{row-gap:calc(var(--spacing) * .5)}.self-start{align-self:flex-start}.justify-self-end{justify-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.scroll-smooth{scroll-behavior:smooth}.rounded{border-radius:.25rem}.rounded-\\[14px\\]{border-radius:14px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-xs{border-radius:var(--radius-xs)}.border{border-style:var(--tw-border-style);border-width:1px}.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-dashed{--tw-border-style:dashed;border-style:dashed}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-500{border-color:var(--color-blue-500)}.border-borderGray{border-color:var(--color-borderGray)}.border-error{border-color:var(--color-error)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-green-200{border-color:var(--color-green-200)}.border-input{border-color:var(--color-input)}.border-orange-200{border-color:var(--color-orange-200)}.border-primary{border-color:var(--color-primary)}.border-red-200{border-color:var(--color-red-200)}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-t-transparent{border-top-color:#0000}.\\!bg-white{background-color:var(--color-white)!important}.bg-\\[\\#E5E7EB\\]{background-color:#e5e7eb}.bg-background{background-color:var(--color-background)}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\\/40{background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-border{background-color:var(--color-border)}.bg-borderGray{background-color:var(--color-borderGray)}.bg-card{background-color:var(--color-card)}.bg-destructive{background-color:var(--color-destructive)}.bg-error\\/5{background-color:#ef44440d}@supports (color:color-mix(in lab,red,red)){.bg-error\\/5{background-color:color-mix(in oklab,var(--color-error) 5%,transparent)}}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-500{background-color:var(--color-green-500)}.bg-muted{background-color:var(--color-muted)}.bg-orange-50{background-color:var(--color-orange-50)}.bg-orange-500{background-color:var(--color-orange-500)}.bg-popover{background-color:var(--color-popover)}.bg-primary{background-color:var(--color-primary)}.bg-primary\\/5{background-color:#2e74ff0d}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/5{background-color:color-mix(in oklab,var(--color-primary) 5%,transparent)}}.bg-primary\\/10{background-color:#2e74ff1a}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/10{background-color:color-mix(in oklab,var(--color-primary) 10%,transparent)}}.bg-primary\\/20{background-color:#2e74ff33}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/20{background-color:color-mix(in oklab,var(--color-primary) 20%,transparent)}}.bg-primaryLight{background-color:var(--color-primaryLight)}.bg-primaryLight\\/50{background-color:#eff6ff80}@supports (color:color-mix(in lab,red,red)){.bg-primaryLight\\/50{background-color:color-mix(in oklab,var(--color-primaryLight) 50%,transparent)}}.bg-red-50{background-color:var(--color-red-50)}.bg-red-500{background-color:var(--color-red-500)}.bg-secondary{background-color:var(--color-secondary)}.bg-textGray{background-color:var(--color-textGray)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-500{background-color:var(--color-yellow-500)}.object-contain{object-fit:contain}.p-1{padding:calc(var(--spacing) * 1)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.p-\\[3px\\]{padding:3px}.px-2{padding-inline:calc(var(--spacing) * 2)}.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)}.px-\\[13px\\]{padding-inline:13px}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pl-2{padding-left:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-left{text-align:left}.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))}.text-\\[14px\\]{font-size:14px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-\\[20px\\]{--tw-leading:20px;line-height:20px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.whitespace-nowrap{white-space:nowrap}.text-black{color:var(--color-black)}.text-card-foreground{color:var(--color-card-foreground)}.text-destructive{color:var(--color-destructive)}.text-error{color:var(--color-error)}.text-foreground{color:var(--color-foreground)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-green-600{color:var(--color-green-600)}.text-muted-foreground{color:var(--color-muted-foreground)}.text-orange-600{color:var(--color-orange-600)}.text-popover-foreground{color:var(--color-popover-foreground)}.text-primary{color:var(--color-primary)}.text-primary-foreground{color:var(--color-primary-foreground)}.text-primaryDark{color:var(--color-primaryDark)}.text-red-600{color:var(--color-red-600)}.text-secondary{color:var(--color-secondary)}.text-secondary-foreground{color:var(--color-secondary-foreground)}.text-textBlack{color:var(--color-textBlack)}.text-textGray{color:var(--color-textGray)}.text-warning{color:var(--color-warning)}.text-white{color:var(--color-white)}.underline-offset-4{text-underline-offset:4px}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.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-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.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)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px 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-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--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)}.ring-blue-200{--tw-ring-color:var(--color-blue-200)}.ring-offset-background{--tw-ring-offset-color:var(--color-background)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.transition-\\[color\\,box-shadow\\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;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))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\\!transition-none{transition-property:none!important}.duration-200{--tw-duration:.2s;transition-duration:.2s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\\:-translate-x-1:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\\:translate-x-1:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}}.peer-disabled\\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\\:opacity-70:is(:where(.peer):disabled~*){opacity:.7}.selection\\:bg-primary ::selection{background-color:var(--color-primary)}.selection\\:bg-primary::selection{background-color:var(--color-primary)}.selection\\:text-primary-foreground ::selection{color:var(--color-primary-foreground)}.selection\\:text-primary-foreground::selection{color:var(--color-primary-foreground)}.file\\:inline-flex::file-selector-button{display:inline-flex}.file\\:h-7::file-selector-button{height:calc(var(--spacing) * 7)}.file\\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\\:bg-transparent::file-selector-button{background-color:#0000}.file\\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\\:text-foreground::file-selector-button{color:var(--color-foreground)}.placeholder\\:text-muted-foreground::placeholder{color:var(--color-muted-foreground)}.placeholder\\:text-textGray::placeholder{color:var(--color-textGray)}@media(hover:hover){.hover\\:border-primary:hover{border-color:var(--color-primary)}.hover\\:border-primary\\/50:hover{border-color:#2e74ff80}@supports (color:color-mix(in lab,red,red)){.hover\\:border-primary\\/50:hover{border-color:color-mix(in oklab,var(--color-primary) 50%,transparent)}}.hover\\:bg-accent:hover{background-color:var(--color-accent)}.hover\\:bg-destructive\\/90:hover{background-color:#ef4444e6}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-destructive\\/90:hover{background-color:color-mix(in oklab,var(--color-destructive) 90%,transparent)}}.hover\\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\\:bg-primary:hover{background-color:var(--color-primary)}.hover\\:bg-primary\\/5:hover{background-color:#2e74ff0d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/5:hover{background-color:color-mix(in oklab,var(--color-primary) 5%,transparent)}}.hover\\:bg-primary\\/10:hover{background-color:#2e74ff1a}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/10:hover{background-color:color-mix(in oklab,var(--color-primary) 10%,transparent)}}.hover\\:bg-primary\\/90:hover{background-color:#2e74ffe6}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab,var(--color-primary) 90%,transparent)}}.hover\\:bg-secondary\\/80:hover{background-color:#e8b018cc}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-secondary\\/80:hover{background-color:color-mix(in oklab,var(--color-secondary) 80%,transparent)}}.hover\\:text-accent-foreground:hover{color:var(--color-accent-foreground)}.hover\\:text-primary:hover{color:var(--color-primary)}.hover\\:text-textBlack:hover{color:var(--color-textBlack)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-90:hover{opacity:.9}.hover\\:opacity-100:hover{opacity:1}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\:border-error:focus{border-color:var(--color-error)}.focus\\:border-primary:focus{border-color:var(--color-primary)}.focus\\:border-ring:focus{border-color:var(--color-ring)}.focus\\:bg-accent:focus{background-color:var(--color-accent)}.focus\\:text-accent-foreground:focus{color:var(--color-accent-foreground)}.focus\\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + 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\\:ring-1:focus{--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)}.focus\\:ring-2:focus{--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\\:ring-error:focus{--tw-ring-color:var(--color-error)}.focus\\:ring-primary:focus{--tw-ring-color:var(--color-primary)}.focus\\:ring-ring:focus{--tw-ring-color:var(--color-ring)}.focus\\:ring-offset-0:focus{--tw-ring-offset-width:0px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus\\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:border-ring:focus-visible{border-color:var(--color-ring)}.focus-visible\\:ring-\\[3px\\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + 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-destructive\\/20:focus-visible{--tw-ring-color:#ef444433}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-destructive\\/20:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-destructive) 20%, transparent)}}.focus-visible\\:ring-ring\\/50:focus-visible{--tw-ring-color:#3b82f680}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-ring\\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-ring) 50%, transparent)}}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.has-data-\\[slot\\=card-action\\]\\:grid-cols-\\[1fr_auto\\]:has([data-slot=card-action]){grid-template-columns:1fr auto}.has-\\[\\>svg\\]\\:grid-cols-\\[calc\\(var\\(--spacing\\)\\*4\\)_1fr\\]:has(>svg){grid-template-columns:calc(var(--spacing) * 4) 1fr}.has-\\[\\>svg\\]\\:gap-x-3:has(>svg){column-gap:calc(var(--spacing) * 3)}.aria-invalid\\:border-destructive[aria-invalid=true]{border-color:var(--color-destructive)}.aria-invalid\\:border-error[aria-invalid=true]{border-color:var(--color-error)}.aria-invalid\\:ring-destructive\\/20[aria-invalid=true]{--tw-ring-color:#ef444433}@supports (color:color-mix(in lab,red,red)){.aria-invalid\\:ring-destructive\\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--color-destructive) 20%, transparent)}}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[placeholder\\]\\:text-muted-foreground[data-placeholder]{color:var(--color-muted-foreground)}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\\[size\\=default\\]\\:h-9[data-size=default]{height:calc(var(--spacing) * 9)}.data-\\[size\\=sm\\]\\:h-8[data-size=sm]{height:calc(var(--spacing) * 8)}:is(.\\*\\:data-\\[slot\\=alert-description\\]\\:text-destructive\\/90>*)[data-slot=alert-description]{color:#ef4444e6}@supports (color:color-mix(in lab,red,red)){:is(.\\*\\:data-\\[slot\\=alert-description\\]\\:text-destructive\\/90>*)[data-slot=alert-description]{color:color-mix(in oklab,var(--color-destructive) 90%,transparent)}}.data-\\[state\\=active\\]\\:bg-background[data-state=active]{background-color:var(--color-background)}.data-\\[state\\=active\\]\\:shadow-sm[data-state=active]{--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)}.data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\\[state\\=open\\]\\:bg-accent[data-state=open]{background-color:var(--color-accent)}.data-\\[state\\=open\\]\\:text-muted-foreground[data-state=open]{color:var(--color-muted-foreground)}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}@media(min-width:40rem){.sm\\:block{display:block}.sm\\:max-w-lg{max-width:var(--container-lg)}.sm\\:flex-row{flex-direction:row}.sm\\:justify-end{justify-content:flex-end}.sm\\:pr-2\\.5{padding-right:calc(var(--spacing) * 2.5)}.sm\\:pl-2\\.5{padding-left:calc(var(--spacing) * 2.5)}.sm\\:text-left{text-align:left}}@media(min-width:48rem){.md\\:justify-end{justify-content:flex-end}.md\\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media(prefers-color-scheme:dark){.dark\\:border-input{border-color:var(--color-input)}.dark\\:bg-destructive\\/60{background-color:#ef444499}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-destructive\\/60{background-color:color-mix(in oklab,var(--color-destructive) 60%,transparent)}}.dark\\:bg-input\\/30{background-color:#e2e8f04d}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-input\\/30{background-color:color-mix(in oklab,var(--color-input) 30%,transparent)}}@media(hover:hover){.dark\\:hover\\:bg-accent\\/50:hover{background-color:#f1f5f980}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-accent\\/50:hover{background-color:color-mix(in oklab,var(--color-accent) 50%,transparent)}}.dark\\:hover\\:bg-input\\/50:hover{background-color:#e2e8f080}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-input\\/50:hover{background-color:color-mix(in oklab,var(--color-input) 50%,transparent)}}}.dark\\:focus-visible\\:ring-destructive\\/40:focus-visible{--tw-ring-color:#ef444466}@supports (color:color-mix(in lab,red,red)){.dark\\:focus-visible\\:ring-destructive\\/40:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-destructive) 40%, transparent)}}}.\\[\\&_p\\]\\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\\[\\.border-b\\]\\:pb-6.border-b{padding-bottom:calc(var(--spacing) * 6)}.\\[\\.border-t\\]\\:pt-6.border-t{padding-top:calc(var(--spacing) * 6)}.\\[\\&\\>svg\\]\\:pointer-events-none>svg{pointer-events:none}.\\[\\&\\>svg\\]\\:size-3>svg{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\\[\\&\\>svg\\]\\:size-4>svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\\[\\&\\>svg\\]\\:translate-y-0\\.5>svg{--tw-translate-y:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.\\[\\&\\>svg\\]\\:text-current>svg{color:currentColor}@media(hover:hover){a.\\[a\\&\\]\\:hover\\:bg-accent:hover{background-color:var(--color-accent)}a.\\[a\\&\\]\\:hover\\:bg-destructive\\/90:hover{background-color:#ef4444e6}@supports (color:color-mix(in lab,red,red)){a.\\[a\\&\\]\\:hover\\:bg-destructive\\/90:hover{background-color:color-mix(in oklab,var(--color-destructive) 90%,transparent)}}a.\\[a\\&\\]\\:hover\\:bg-primary\\/90:hover{background-color:#2e74ffe6}@supports (color:color-mix(in lab,red,red)){a.\\[a\\&\\]\\:hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab,var(--color-primary) 90%,transparent)}}a.\\[a\\&\\]\\:hover\\:bg-secondary\\/90:hover{background-color:#e8b018e6}@supports (color:color-mix(in lab,red,red)){a.\\[a\\&\\]\\:hover\\:bg-secondary\\/90:hover{background-color:color-mix(in oklab,var(--color-secondary) 90%,transparent)}}a.\\[a\\&\\]\\:hover\\:text-accent-foreground:hover{color:var(--color-accent-foreground)}}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.no-scrollbar::-webkit-scrollbar{display:none}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}body.mobile-landscape{overflow:hidden}body.mobile-landscape #root{display:none}body.mobile-landscape:before{content:"Please rotate your device to portrait mode to use this app";background:var(--color-background);z-index:9999;text-align:center;color:var(--color-textBlack);justify-content:center;align-items:center;padding:2rem;font-size:1.25rem;font-weight:500;display:flex;position:fixed;top:0;right:0;bottom:0;left:0}@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-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@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-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-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}`)),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode(`/*! tailwindcss v4.2.0 | MIT License | https://tailwindcss.com */@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-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--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-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-outline-style:solid;--tw-duration:initial;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@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-orange-50:oklch(98% .016 73.684);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-yellow-500:oklch(79.5% .184 86.047);--color-green-50:oklch(98.2% .018 155.826);--color-green-200:oklch(92.5% .084 155.995);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-blue-50:oklch(97% .014 254.604);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-500:oklch(62.3% .214 259.815);--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-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-4xl:56rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--leading-relaxed:1.625;--radius-xs:.125rem;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--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);--color-primary:#2e74ff;--color-secondary:#e8b018;--color-primaryLight:#eff6ff;--color-primaryDark:#1e3a8a;--color-textBlack:#333;--color-textGray:#737373;--color-borderGray:#e0e0e0;--color-warning:#fef9c3;--color-error:#ef4444;--color-background:#fff;--color-foreground:#0f172a;--color-muted:#f1f5f9;--color-muted-foreground:#64748b;--color-destructive:#ef4444;--color-border:#e2e8f0;--color-input:#e2e8f0;--color-ring:#3b82f6;--color-card:#fff;--color-card-foreground:#0f172a;--color-popover:#fff;--color-popover-foreground:#0f172a;--color-primary-foreground:#fff;--color-secondary-foreground:#0f172a;--color-accent:#f1f5f9;--color-accent-foreground:#0f172a}}@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%;-moz-tab-size:4;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]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--color-border)}body{background-color:var(--color-background);color:var(--color-foreground);font-family:Inter,sans-serif}}@layer components{.loader{width:50px;height:50px;animation:1s infinite rotate}.loader:before,.loader:after{content:"";width:20px;height:20px;display:block}.loader:before{background-color:#fff;margin-bottom:10px;animation:1s infinite box1;box-shadow:30px 0 #2e74ff}.loader:after{background-color:#2e74ff;animation:1s infinite box2;box-shadow:30px 0 #fff}@keyframes rotate{0%{transform:rotate(0)scale(.8)}50%{transform:rotate(360deg)scale(1.2)}to{transform:rotate(720deg)scale(.8)}}@keyframes box1{0%{box-shadow:30px 0 #2e74ff}50%{margin-bottom:0;transform:translate(15px,15px);box-shadow:0 0 #2e74ff}to{margin-bottom:10px;box-shadow:30px 0 #2e74ff}}@keyframes box2{0%{box-shadow:30px 0 #fff}50%{margin-top:-20px;transform:translate(15px,15px);box-shadow:0 0 #fff}to{margin-top:0;box-shadow:30px 0 #fff}}}@layer utilities{.\\@container\\/card-header{container:card-header/inline-size}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.-top-3{top:calc(var(--spacing) * -3)}.top-0{top:calc(var(--spacing) * 0)}.top-4{top:calc(var(--spacing) * 4)}.top-\\[50\\%\\]{top:50%}.-right-3{right:calc(var(--spacing) * -3)}.right-0{right:calc(var(--spacing) * 0)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.left-\\[50\\%\\]{left:50%}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.z-\\[100\\]{z-index:100}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.row-start-1{grid-row-start:1}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing) * 1)}.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-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.field-sizing-content{field-sizing:content}.size-3\\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-96{height:calc(var(--spacing) * 96)}.h-\\[calc\\(100\\%-1px\\)\\]{height:calc(100% - 1px)}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-px{height:1px}.max-h-\\(--radix-select-content-available-height\\){max-height:var(--radix-select-content-available-height)}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-64{max-height:calc(var(--spacing) * 64)}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-4{min-height:calc(var(--spacing) * 4)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-screen{min-height:100vh}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-24{width:calc(var(--spacing) * 24)}.w-32{width:calc(var(--spacing) * 32)}.w-72{width:calc(var(--spacing) * 72)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-4xl{max-width:var(--container-4xl)}.max-w-\\[calc\\(100\\%-2rem\\)\\]{max-width:calc(100% - 2rem)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[60px\\]{min-width:60px}.min-w-\\[140px\\]{min-width:140px}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.translate-x-\\[-50\\%\\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\\[-50\\%\\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-50{--tw-scale-x:50%;--tw-scale-y:50%;--tw-scale-z:50%;scale:var(--tw-scale-x) var(--tw-scale-y)}.rotate-180{rotate:180deg}.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-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-y{resize:vertical}.scroll-my-1{scroll-margin-block:calc(var(--spacing) * 1)}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.auto-rows-min{grid-auto-rows:min-content}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.grid-cols-\\[0_1fr\\]{grid-template-columns:0 1fr}.grid-rows-\\[auto_auto\\]{grid-template-rows:auto auto}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.justify-items-start{justify-items:start}.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-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)))}.gap-y-0\\.5{row-gap:calc(var(--spacing) * .5)}.self-start{align-self:flex-start}.justify-self-end{justify-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.scroll-smooth{scroll-behavior:smooth}.rounded{border-radius:.25rem}.rounded-\\[14px\\]{border-radius:14px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-xs{border-radius:var(--radius-xs)}.border{border-style:var(--tw-border-style);border-width:1px}.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-dashed{--tw-border-style:dashed;border-style:dashed}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-500{border-color:var(--color-blue-500)}.border-borderGray{border-color:var(--color-borderGray)}.border-error{border-color:var(--color-error)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-green-200{border-color:var(--color-green-200)}.border-input{border-color:var(--color-input)}.border-orange-200{border-color:var(--color-orange-200)}.border-primary{border-color:var(--color-primary)}.border-red-200{border-color:var(--color-red-200)}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-t-transparent{border-top-color:#0000}.\\!bg-white{background-color:var(--color-white)!important}.bg-\\[\\#E5E7EB\\]{background-color:#e5e7eb}.bg-background{background-color:var(--color-background)}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\\/40{background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-border{background-color:var(--color-border)}.bg-borderGray{background-color:var(--color-borderGray)}.bg-card{background-color:var(--color-card)}.bg-destructive{background-color:var(--color-destructive)}.bg-error\\/5{background-color:#ef44440d}@supports (color:color-mix(in lab,red,red)){.bg-error\\/5{background-color:color-mix(in oklab,var(--color-error) 5%,transparent)}}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-500{background-color:var(--color-green-500)}.bg-muted{background-color:var(--color-muted)}.bg-orange-50{background-color:var(--color-orange-50)}.bg-orange-500{background-color:var(--color-orange-500)}.bg-popover{background-color:var(--color-popover)}.bg-primary{background-color:var(--color-primary)}.bg-primary\\/5{background-color:#2e74ff0d}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/5{background-color:color-mix(in oklab,var(--color-primary) 5%,transparent)}}.bg-primary\\/10{background-color:#2e74ff1a}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/10{background-color:color-mix(in oklab,var(--color-primary) 10%,transparent)}}.bg-primary\\/20{background-color:#2e74ff33}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/20{background-color:color-mix(in oklab,var(--color-primary) 20%,transparent)}}.bg-primaryLight{background-color:var(--color-primaryLight)}.bg-primaryLight\\/50{background-color:#eff6ff80}@supports (color:color-mix(in lab,red,red)){.bg-primaryLight\\/50{background-color:color-mix(in oklab,var(--color-primaryLight) 50%,transparent)}}.bg-red-50{background-color:var(--color-red-50)}.bg-red-500{background-color:var(--color-red-500)}.bg-secondary{background-color:var(--color-secondary)}.bg-textGray{background-color:var(--color-textGray)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-500{background-color:var(--color-yellow-500)}.object-contain{object-fit:contain}.p-1{padding:calc(var(--spacing) * 1)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.p-\\[3px\\]{padding:3px}.px-2{padding-inline:calc(var(--spacing) * 2)}.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)}.px-\\[13px\\]{padding-inline:13px}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pb-8{padding-bottom:calc(var(--spacing) * 8)}.pl-2{padding-left:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-left{text-align:left}.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))}.text-\\[14px\\]{font-size:14px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-\\[20px\\]{--tw-leading:20px;line-height:20px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.whitespace-nowrap{white-space:nowrap}.text-black{color:var(--color-black)}.text-card-foreground{color:var(--color-card-foreground)}.text-destructive{color:var(--color-destructive)}.text-error{color:var(--color-error)}.text-foreground{color:var(--color-foreground)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-green-600{color:var(--color-green-600)}.text-muted-foreground{color:var(--color-muted-foreground)}.text-orange-600{color:var(--color-orange-600)}.text-popover-foreground{color:var(--color-popover-foreground)}.text-primary{color:var(--color-primary)}.text-primary-foreground{color:var(--color-primary-foreground)}.text-primaryDark{color:var(--color-primaryDark)}.text-red-600{color:var(--color-red-600)}.text-secondary{color:var(--color-secondary)}.text-secondary-foreground{color:var(--color-secondary-foreground)}.text-textBlack{color:var(--color-textBlack)}.text-textGray{color:var(--color-textGray)}.text-warning{color:var(--color-warning)}.text-white{color:var(--color-white)}.underline-offset-4{text-underline-offset:4px}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.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-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.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)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px 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-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--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)}.ring-blue-200{--tw-ring-color:var(--color-blue-200)}.ring-offset-background{--tw-ring-offset-color:var(--color-background)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.transition-\\[color\\,box-shadow\\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;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))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\\!transition-none{transition-property:none!important}.duration-200{--tw-duration:.2s;transition-duration:.2s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\\:-translate-x-1:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\\:translate-x-1:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}}.peer-disabled\\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\\:opacity-70:is(:where(.peer):disabled~*){opacity:.7}.selection\\:bg-primary ::selection{background-color:var(--color-primary)}.selection\\:bg-primary::selection{background-color:var(--color-primary)}.selection\\:text-primary-foreground ::selection{color:var(--color-primary-foreground)}.selection\\:text-primary-foreground::selection{color:var(--color-primary-foreground)}.file\\:inline-flex::file-selector-button{display:inline-flex}.file\\:h-7::file-selector-button{height:calc(var(--spacing) * 7)}.file\\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\\:bg-transparent::file-selector-button{background-color:#0000}.file\\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\\:text-foreground::file-selector-button{color:var(--color-foreground)}.placeholder\\:text-muted-foreground::placeholder{color:var(--color-muted-foreground)}.placeholder\\:text-textGray::placeholder{color:var(--color-textGray)}@media(hover:hover){.hover\\:border-primary:hover{border-color:var(--color-primary)}.hover\\:border-primary\\/50:hover{border-color:#2e74ff80}@supports (color:color-mix(in lab,red,red)){.hover\\:border-primary\\/50:hover{border-color:color-mix(in oklab,var(--color-primary) 50%,transparent)}}.hover\\:bg-accent:hover{background-color:var(--color-accent)}.hover\\:bg-destructive\\/90:hover{background-color:#ef4444e6}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-destructive\\/90:hover{background-color:color-mix(in oklab,var(--color-destructive) 90%,transparent)}}.hover\\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\\:bg-primary:hover{background-color:var(--color-primary)}.hover\\:bg-primary\\/5:hover{background-color:#2e74ff0d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/5:hover{background-color:color-mix(in oklab,var(--color-primary) 5%,transparent)}}.hover\\:bg-primary\\/10:hover{background-color:#2e74ff1a}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/10:hover{background-color:color-mix(in oklab,var(--color-primary) 10%,transparent)}}.hover\\:bg-primary\\/90:hover{background-color:#2e74ffe6}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab,var(--color-primary) 90%,transparent)}}.hover\\:bg-secondary\\/80:hover{background-color:#e8b018cc}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-secondary\\/80:hover{background-color:color-mix(in oklab,var(--color-secondary) 80%,transparent)}}.hover\\:text-accent-foreground:hover{color:var(--color-accent-foreground)}.hover\\:text-primary:hover{color:var(--color-primary)}.hover\\:text-textBlack:hover{color:var(--color-textBlack)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-90:hover{opacity:.9}.hover\\:opacity-100:hover{opacity:1}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\:border-error:focus{border-color:var(--color-error)}.focus\\:border-primary:focus{border-color:var(--color-primary)}.focus\\:border-ring:focus{border-color:var(--color-ring)}.focus\\:bg-accent:focus{background-color:var(--color-accent)}.focus\\:text-accent-foreground:focus{color:var(--color-accent-foreground)}.focus\\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + 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\\:ring-1:focus{--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)}.focus\\:ring-2:focus{--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\\:ring-error:focus{--tw-ring-color:var(--color-error)}.focus\\:ring-primary:focus{--tw-ring-color:var(--color-primary)}.focus\\:ring-ring:focus{--tw-ring-color:var(--color-ring)}.focus\\:ring-offset-0:focus{--tw-ring-offset-width:0px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus\\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:border-ring:focus-visible{border-color:var(--color-ring)}.focus-visible\\:ring-\\[3px\\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + 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-destructive\\/20:focus-visible{--tw-ring-color:#ef444433}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-destructive\\/20:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-destructive) 20%, transparent)}}.focus-visible\\:ring-ring\\/50:focus-visible{--tw-ring-color:#3b82f680}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-ring\\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-ring) 50%, transparent)}}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.has-data-\\[slot\\=card-action\\]\\:grid-cols-\\[1fr_auto\\]:has([data-slot=card-action]){grid-template-columns:1fr auto}.has-\\[\\>svg\\]\\:grid-cols-\\[calc\\(var\\(--spacing\\)\\*4\\)_1fr\\]:has(>svg){grid-template-columns:calc(var(--spacing) * 4) 1fr}.has-\\[\\>svg\\]\\:gap-x-3:has(>svg){column-gap:calc(var(--spacing) * 3)}.aria-invalid\\:border-destructive[aria-invalid=true]{border-color:var(--color-destructive)}.aria-invalid\\:border-error[aria-invalid=true]{border-color:var(--color-error)}.aria-invalid\\:ring-destructive\\/20[aria-invalid=true]{--tw-ring-color:#ef444433}@supports (color:color-mix(in lab,red,red)){.aria-invalid\\:ring-destructive\\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--color-destructive) 20%, transparent)}}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[placeholder\\]\\:text-muted-foreground[data-placeholder]{color:var(--color-muted-foreground)}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\\[size\\=default\\]\\:h-9[data-size=default]{height:calc(var(--spacing) * 9)}.data-\\[size\\=sm\\]\\:h-8[data-size=sm]{height:calc(var(--spacing) * 8)}:is(.\\*\\:data-\\[slot\\=alert-description\\]\\:text-destructive\\/90>*)[data-slot=alert-description]{color:#ef4444e6}@supports (color:color-mix(in lab,red,red)){:is(.\\*\\:data-\\[slot\\=alert-description\\]\\:text-destructive\\/90>*)[data-slot=alert-description]{color:color-mix(in oklab,var(--color-destructive) 90%,transparent)}}.data-\\[state\\=active\\]\\:bg-background[data-state=active]{background-color:var(--color-background)}.data-\\[state\\=active\\]\\:shadow-sm[data-state=active]{--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)}.data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\\[state\\=open\\]\\:bg-accent[data-state=open]{background-color:var(--color-accent)}.data-\\[state\\=open\\]\\:text-muted-foreground[data-state=open]{color:var(--color-muted-foreground)}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}@media(min-width:40rem){.sm\\:block{display:block}.sm\\:max-w-lg{max-width:var(--container-lg)}.sm\\:flex-row{flex-direction:row}.sm\\:justify-end{justify-content:flex-end}.sm\\:pr-2\\.5{padding-right:calc(var(--spacing) * 2.5)}.sm\\:pl-2\\.5{padding-left:calc(var(--spacing) * 2.5)}.sm\\:text-left{text-align:left}}@media(min-width:48rem){.md\\:justify-end{justify-content:flex-end}.md\\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media(prefers-color-scheme:dark){.dark\\:border-input{border-color:var(--color-input)}.dark\\:bg-destructive\\/60{background-color:#ef444499}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-destructive\\/60{background-color:color-mix(in oklab,var(--color-destructive) 60%,transparent)}}.dark\\:bg-input\\/30{background-color:#e2e8f04d}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-input\\/30{background-color:color-mix(in oklab,var(--color-input) 30%,transparent)}}@media(hover:hover){.dark\\:hover\\:bg-accent\\/50:hover{background-color:#f1f5f980}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-accent\\/50:hover{background-color:color-mix(in oklab,var(--color-accent) 50%,transparent)}}.dark\\:hover\\:bg-input\\/50:hover{background-color:#e2e8f080}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-input\\/50:hover{background-color:color-mix(in oklab,var(--color-input) 50%,transparent)}}}.dark\\:focus-visible\\:ring-destructive\\/40:focus-visible{--tw-ring-color:#ef444466}@supports (color:color-mix(in lab,red,red)){.dark\\:focus-visible\\:ring-destructive\\/40:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-destructive) 40%, transparent)}}}.\\[\\&_p\\]\\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\\[\\.border-b\\]\\:pb-6.border-b{padding-bottom:calc(var(--spacing) * 6)}.\\[\\.border-t\\]\\:pt-6.border-t{padding-top:calc(var(--spacing) * 6)}.\\[\\&\\>svg\\]\\:pointer-events-none>svg{pointer-events:none}.\\[\\&\\>svg\\]\\:size-3>svg{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\\[\\&\\>svg\\]\\:size-4>svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\\[\\&\\>svg\\]\\:translate-y-0\\.5>svg{--tw-translate-y:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.\\[\\&\\>svg\\]\\:text-current>svg{color:currentColor}@media(hover:hover){a.\\[a\\&\\]\\:hover\\:bg-accent:hover{background-color:var(--color-accent)}a.\\[a\\&\\]\\:hover\\:bg-destructive\\/90:hover{background-color:#ef4444e6}@supports (color:color-mix(in lab,red,red)){a.\\[a\\&\\]\\:hover\\:bg-destructive\\/90:hover{background-color:color-mix(in oklab,var(--color-destructive) 90%,transparent)}}a.\\[a\\&\\]\\:hover\\:bg-primary\\/90:hover{background-color:#2e74ffe6}@supports (color:color-mix(in lab,red,red)){a.\\[a\\&\\]\\:hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab,var(--color-primary) 90%,transparent)}}a.\\[a\\&\\]\\:hover\\:bg-secondary\\/90:hover{background-color:#e8b018e6}@supports (color:color-mix(in lab,red,red)){a.\\[a\\&\\]\\:hover\\:bg-secondary\\/90:hover{background-color:color-mix(in oklab,var(--color-secondary) 90%,transparent)}}a.\\[a\\&\\]\\:hover\\:text-accent-foreground:hover{color:var(--color-accent-foreground)}}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.no-scrollbar::-webkit-scrollbar{display:none}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}body.mobile-landscape{overflow:hidden}body.mobile-landscape #root{display:none}body.mobile-landscape:before{content:"Please rotate your device to portrait mode to use this app";background:var(--color-background);z-index:9999;text-align:center;color:var(--color-textBlack);justify-content:center;align-items:center;padding:2rem;font-size:1.25rem;font-weight:500;display:flex;position:fixed;top:0;right:0;bottom:0;left:0}@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-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@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-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-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}`)),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
2
|
(function(V,O){typeof exports=="object"&&typeof module<"u"?O(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],O):(V=typeof globalThis<"u"?globalThis:V||self,O(V.SurveyRender={},V.React,V.ReactDOM))})(this,(function(V,O,Bt){"use strict";function Gt(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 p=Gt(O),to=Gt(Bt);var Qe={exports:{}},Fe={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.production.min.js
|
|
@@ -28,7 +28,7 @@ Check the top-level render call using <`+E+">.")}return v}}function Zn(c,v){{if(
|
|
|
28
28
|
<%s {...props} />
|
|
29
29
|
React keys must be passed directly to JSX without using spread:
|
|
30
30
|
let props = %s;
|
|
31
|
-
<%s key={someKey} {...props} />`,Wt,Ae,ol,Ae),qn[Ae+Wt]=!0}}return c===n?qi(X):Ji(X),X}}function el(c,v,E){return eo(c,v,E,!0)}function tl(c,v,E){return eo(c,v,E,!1)}var rl=tl,nl=el;Ve.Fragment=n,Ve.jsx=rl,Ve.jsxs=nl})()),Ve}var Qt;function oo(){return Qt||(Qt=1,process.env.NODE_ENV==="production"?Qe.exports=ro():Qe.exports=no()),Qe.exports}var a=oo();const Ht=["single-select","multi-select","drop-down","dropdown","text-response","calendar","video-response","voice-response","image-response","document-response","pdf-response","tabular-text-input","tabular-drop-down","tabular-check-box"];function Kt(e){return Ht.includes(e)}function He(e){var t;switch(e.type){case"single-select":case"drop-down":case"dropdown":case"text-response":return"";case"multi-select":return[];case"calendar":case"image-response":case"video-response":case"voice-response":case"document-response":case"pdf-response":return null;case"tabular-text-input":case"tabular-drop-down":return{};case"tabular-check-box":{const r={};return(t=e.tableQuestionValue)==null||t.forEach(n=>{r[n.rowId]=!1}),r}default:return null}}function so(e){const t=e.userAnswer;if(t==null)return He(e);switch(e.type){case"single-select":case"drop-down":case"dropdown":case"text-response":return typeof t=="string"?t:String(t);case"multi-select":return Array.isArray(t)?t.map(String):[];case"calendar":{if(typeof t=="string"){const r=new Date(t);return isNaN(r.getTime())?null:r}return t instanceof Date?t:null}case"tabular-text-input":case"tabular-drop-down":case"tabular-check-box":{if(!Array.isArray(t))return He(e);const r=t,n={};return r.forEach(o=>{n[o.rowId]=o.rowAnswer}),n}case"image-response":case"video-response":case"voice-response":case"document-response":case"pdf-response":return t&&typeof t=="object"&&"fileName"in t&&"binary"in t?t:null;default:return He(e)}}function ao(e){return e.questionId}function Xt(e,t){return Array.isArray(e)?e.includes(t):e===t}function mt(e,t,r=[]){const n=e.map(ao),o=new Set,s=new Set;e.forEach(h=>{Object.values(h.childrenQuestions??{}).forEach(b=>{b.forEach(x=>s.add(x))})}),e.filter(h=>!s.has(h.questionId)).forEach(h=>o.add(h.questionId)),e.forEach(h=>{var g;const b=h.childrenQuestions;if(!b||typeof b!="object")return;const x=(g=t[h.questionId])==null?void 0:g.value;Object.entries(b).forEach(([y,N])=>{Array.isArray(N)&&Xt(x,y)&&N.forEach(w=>{o.add(w),Zt(e,t,w,o)})})});const i=n.filter(h=>o.has(h)),d=n.filter(h=>!o.has(h)),u=new Set(r),f=i.filter(h=>!u.has(h)),m=r.filter(h=>!o.has(h));return{visibleQuestions:i,hiddenQuestions:d,newlyVisible:f,newlyHidden:m}}function Zt(e,t,r,n){var l;const o=e.find(i=>i.questionId===r);if(!(o!=null&&o.childrenQuestions))return;const s=(l=t[r])==null?void 0:l.value;Object.entries(o.childrenQuestions).forEach(([i,d])=>{Array.isArray(d)&&Xt(s,i)&&d.forEach(u=>{n.add(u),Zt(e,t,u,n)})})}function Jt(e,t){const r=new Set(t),n={};return Object.entries(e).forEach(([o,s])=>{r.has(o)||(n[o]=s)}),n}function qt(e,t){if(e==null)return!0;switch(t){case"single-select":case"drop-down":case"text-response":case"calendar":return e==="";case"multi-select":return!Array.isArray(e)||e.length===0;case"image-response":case"video-response":case"voice-response":case"document-response":case"pdf-response":return!(e&&typeof e=="object"&&"binary"in e);case"tabular-text-input":case"tabular-drop-down":case"tabular-check-box":{if(typeof e!="object"||e===null)return!0;const r=e;return Object.keys(r).length===0?!0:t==="tabular-check-box"?!Object.values(r).some(o=>o===!0):Object.values(r).every(o=>o===""||o===null||o===void 0)}default:return e===""||e===null||e===void 0}}function io(e,t){const r=e.textLimitCharacter;if(r==null||r<=0)return null;if(e.type==="text-response"&&typeof t=="string")return t.length>r?`Maximum ${r} characters allowed`:null;if(e.type==="tabular-text-input"&&typeof t=="object"&&t!==null){const n=t;for(const[o,s]of Object.entries(n))if(s!=null&&String(s).length>r)return`Field "${o}" exceeds ${r} characters`}return null}function lo(e,t){if(e.textInputType!=="Numeric")return null;if(e.type==="text-response"){if(t===""||t==null)return null;const r=String(t).trim();return/^\d+$/.test(r)?null:"Please enter numbers only"}if(e.type==="tabular-text-input"&&typeof t=="object"&&t!==null){const r=t;for(const[n,o]of Object.entries(r))if(o!=null&&o!==""){const s=String(o).trim();if(!/^\d+$/.test(s))return`Field "${n}" must contain numbers only`}}return null}function co(e,t){const r=e.minValue!=null?Number(e.minValue):NaN,n=e.maxValue!=null?Number(e.maxValue):NaN;if(isNaN(r)&&isNaN(n))return null;if(e.type==="text-response"&&typeof t=="string"){if(t.trim()==="")return null;const o=Number(t);return isNaN(o)?null:!isNaN(r)&&!isNaN(n)&&(o<r||o>n)?`Value must be between ${r} and ${n}`:!isNaN(r)&&o<r?`Value must be at least ${r}`:!isNaN(n)&&o>n?`Value must be at most ${n}`:null}if(e.type==="tabular-text-input"&&typeof t=="object"&&t!==null){const o=t;for(const[s,l]of Object.entries(o))if(l!=null&&String(l).trim()!==""){const i=Number(l);if(!isNaN(i)){if(!isNaN(r)&&!isNaN(n)&&(i<r||i>n))return`Field "${s}" must be between ${r} and ${n}`;if(!isNaN(r)&&i<r)return`Field "${s}" must be at least ${r}`;if(!isNaN(n)&&i>n)return`Field "${s}" must be at most ${n}`}}}return null}function ht(e,t,r){const n=new Map(e.map(s=>[s.questionId,s])),o=[];return r.forEach(s=>{const l=n.get(s);if(!l)return;const i=t[s];if(l.isMandatory&&qt(i,l.type)){o.push({questionId:s,message:"This question is required"});return}if(qt(i,l.type))return;const d=io(l,i);if(d){o.push({questionId:s,message:d});return}const u=lo(l,i);if(u){o.push({questionId:s,message:u});return}const f=co(l,i);f&&o.push({questionId:s,message:f})}),o}function uo(e,t,r){return ht(e,t,r).length===0}function fo(e){var t;if(e&&typeof e=="object"&&((t=e.constructor)==null?void 0:t.name)==="Date"){const r=e,n=r.getFullYear(),o=String(r.getMonth()+1).padStart(2,"0"),s=String(r.getDate()).padStart(2,"0");return`${n}-${o}-${s}`}if(typeof e=="string"&&e.includes("T"))try{const r=new Date(e);if(!isNaN(r.getTime())){const n=r.getFullYear(),o=String(r.getMonth()+1).padStart(2,"0"),s=String(r.getDate()).padStart(2,"0");return`${n}-${o}-${s}`}}catch{}return e}function po(e,t){if(t==null)return e.type==="multi-select"?[]:"";switch(e.type){case"single-select":case"drop-down":case"text-response":return typeof t=="string"?t:String(t);case"multi-select":return Array.isArray(t)?t.map(String):[];case"calendar":return fo(t);case"image-response":case"video-response":case"voice-response":case"document-response":case"pdf-response":return t&&typeof t=="object"&&"fileName"in t&&"binary"in t,t;case"tabular-text-input":case"tabular-drop-down":case"tabular-check-box":{const r=e.tableQuestionValue??[];if(typeof t!="object"||t===null)return r.map(o=>({rowId:o.rowId,rowQuestion:o.rowQuestion,rowAnswer:""}));const n=t;return r.map(o=>({rowId:o.rowId,rowQuestion:o.rowQuestion,rowAnswer:n[o.rowId]??(e.type==="tabular-check-box"?!1:"")}))}default:return t}}function bt(e,t,r){const n=new Map(e.questionList.map(s=>[s.questionId,s])),o=[];return r.forEach(s=>{const l=t[s],i=n.get(s);if(!i)return;const d=po(i,l);o.push({questionId:s,userAnswer:d})}),{surveyId:e.surveyId,...e.surveyCode!=null&&{surveyCode:e.surveyCode},...e.surveyName!=null&&{surveyName:e.surveyName},...e.type!=null&&{type:e.type},responses:o}}const gt={"image-response":["image/jpeg","image/png"],"video-response":["video/mp4"],"voice-response":["audio/mpeg"],"document-response":["application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","text/plain","application/json"],"pdf-response":["application/pdf"]},vt={"image-response":20,"video-response":60,"voice-response":20,"document-response":25,"pdf-response":25},Ke=gt,xt=vt,mo=["image-response","video-response","voice-response","document-response","pdf-response"];function er(e){const t={...gt},r={};for(const n of mo){const o=(e==null?void 0:e[n])??(n==="voice-response"?e==null?void 0:e["audio-response"]:void 0),s=(o==null?void 0:o.supportedType)??(o==null?void 0:o.suppotedType);s!=null&&s.length&&(t[n]=s);const l=o==null?void 0:o.supportedSize;if(l!=null&&l>0)r[n]=l*1024*1024;else{const i=vt[n]??10;r[n]=i*1024*1024}}return{allowedTypes:t,maxSizeBytes:r}}function tr(e,t,r){const n=(r==null?void 0:r.allowedTypes[t])??Ke[t];return n!=null&&n.length?n.some(s=>e.type===s||e.type.startsWith(s.split("/")[0]+"/"))?{valid:!0}:{valid:!1,error:`File type ${e.type} is not allowed. Allowed: ${n.join(", ")}`}:{valid:!0}}function rr(e,t,r){const n=(r==null?void 0:r.maxSizeBytes[t])??(xt[t]??10)*1024*1024;return e.size>n?{valid:!1,error:`File size must be less than ${Math.round(n/1048576)}MB`}:{valid:!0}}function nr(e,t,r){const n=tr(e,t,r);return n.valid?rr(e,t,r):n}function or(e){return new Promise((t,r)=>{const n=new FileReader;n.onload=()=>{const o=n.result;if(typeof o!="string"){r(new Error("Failed to read file as base64"));return}const s=o.includes(",")?o.split(",")[1]:o;t({fileName:e.name,fileType:e.type,binary:s})},n.onerror=()=>r(n.error),n.readAsDataURL(e)})}function sr(e,t){const r=e.trim();switch(t){case"Numeric":return/^\d+$/.test(r);case"Alphabet":case"AlphaNumeric":return/^[A-Za-z0-9]+$/.test(r);default:return!0}}function ar(e,t){var r;if(t==null)return!1;switch(e.type){case"single-select":case"dropdown":case"drop-down":case"text-response":return t!==""&&t!==null&&t!==void 0;case"multi-select":return Array.isArray(t)&&t.length>0;case"calendar":return t&&typeof t=="object"&&((r=t.constructor)==null?void 0:r.name)==="Date";case"video-response":case"voice-response":case"image-response":return t&&typeof t=="object"&&"fileName"in t&&"binary"in t||typeof t=="string"&&t!==""||typeof t=="object"&&t!==null&&"devicePath"in t;case"tabular-text-input":case"tabular-drop-down":{if(typeof t!="object")return!1;const n=t,o=e.tableQuestionValue||[];return o.length===0?Object.keys(n).length>0&&Object.values(n).some(s=>s!==""&&s!==null&&s!==void 0):e.isMandatory?o.every(s=>{const l=n[s.rowId];return l!==""&&l!==null&&l!==void 0}):o.some(s=>{const l=n[s.rowId];return l!==""&&l!==null&&l!==void 0})}case"tabular-check-box":{if(typeof t!="object")return!1;const n=t,o=e.tableQuestionValue||[];return o.length===0?Object.values(n).some(s=>s===!0):e.isMandatory?o.some(s=>n[s.rowId]===!0):o.length>0&&Object.keys(n).length>0}default:return!1}}function ho(e,t){if(!ar(e,t))return!e.isMandatory;if(e.type==="tabular-text-input"||e.type==="tabular-drop-down"||e.type==="tabular-check-box"){if(typeof t=="object"&&t!==null){const r=t;if(e.textLimitCharacter){const n=parseInt(e.textLimitCharacter.toString(),10);for(const o of Object.values(r))if(o!=null&&String(o).length>n)return!1}if(e.textInputType){for(const n of Object.values(r))if(n!=null&&!sr(String(n),e.textInputType))return!1}}}else if(e.textLimitCharacter&&t!=null&&String(t).length>parseInt(e.textLimitCharacter.toString(),10)||e.textInputType&&t!=null&&!sr(String(t),e.textInputType))return!1;return!0}function ir(e,t,r,n=!1){const o={},s=new Map(e.map(l=>[l.questionId,l]));for(const l of r){if(n){o[l]="completed";continue}const i=s.get(l);if(!i){o[l]="unanswered";continue}const d=t[l],u=ar(i,d),f=ho(i,d);u&&f?o[l]="completed":u&&!f?o[l]="error":!u&&i.isMandatory?o[l]="required":o[l]="unanswered"}return o}function lr({options:e,selectionMode:t,selectedOptions:r,onOptionSelect:n,className:o="",disabled:s=!1}){const l=d=>{if(t==="single")n(d);else{const u=Array.isArray(r)?r:[];u.includes(d)?n(u.filter(f=>f!==d)):n([...u,d])}},i=d=>t==="single"?r===d:Array.isArray(r)&&r.includes(d);return a.jsx("div",{className:`space-y-3 ${o}`,children:e.map(d=>{const u=i(d.id);return a.jsx("button",{type:"button",onClick:()=>l(d.id),className:`w-full border px-4 py-3 text-left text-sm leading-5 font-normal transition-all border-rounded rounded-xl ${s?"cursor-not-allowed opacity-50":"cursor-pointer"} ${u?"border-primary bg-primary text-white":"border-primary bg-white text-primary hover:bg-primary/5"}`,children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"flex-shrink-0",children:t==="single"?a.jsx("div",{className:`h-4 w-4 rounded-full border-2 transition-all ${u?"border-white bg-white":"border-primary bg-transparent"}`,children:u&&a.jsx("div",{className:"h-full w-full scale-50 rounded-full bg-primary"})}):a.jsx("div",{className:`h-4 w-4 rounded border-2 transition-all ${u?"border-white bg-white":"border-primary bg-transparent"}`,children:u&&a.jsx("svg",{className:"h-full w-full text-primary",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})})}),a.jsx("span",{className:"flex-1",children:d.text})]})},d.id)})})}function cr(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=cr(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ur(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=cr(e))&&(n&&(n+=" "),n+=t);return n}const bo=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},go=(e,t)=>({classGroupId:e,validator:t}),dr=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Xe="-",fr=[],vo="arbitrary..",xo=e=>{const t=wo(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return yo(l);const i=l.split(Xe),d=i[0]===""&&i.length>1?1:0;return pr(i,d,t)},getConflictingClassGroupIds:(l,i)=>{if(i){const d=n[l],u=r[l];return d?u?bo(u,d):d:u||fr}return r[l]||fr}}},pr=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],s=r.nextPart.get(o);if(s){const u=pr(e,t+1,s);if(u)return u}const l=r.validators;if(l===null)return;const i=t===0?e.join(Xe):e.slice(t).join(Xe),d=l.length;for(let u=0;u<d;u++){const f=l[u];if(f.validator(i))return f.classGroupId}},yo=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?vo+n:void 0})(),wo=e=>{const{theme:t,classGroups:r}=e;return jo(r,t)},jo=(e,t)=>{const r=dr();for(const n in e){const o=e[n];yt(o,r,n,t)}return r},yt=(e,t,r,n)=>{const o=e.length;for(let s=0;s<o;s++){const l=e[s];ko(l,t,r,n)}},ko=(e,t,r,n)=>{if(typeof e=="string"){Eo(e,t,r);return}if(typeof e=="function"){No(e,t,r,n);return}So(e,t,r,n)},Eo=(e,t,r)=>{const n=e===""?t:mr(t,e);n.classGroupId=r},No=(e,t,r,n)=>{if(Co(e)){yt(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(go(r,e))},So=(e,t,r,n)=>{const o=Object.entries(e),s=o.length;for(let l=0;l<s;l++){const[i,d]=o[l];yt(d,mr(t,i),r,n)}},mr=(e,t)=>{let r=e;const n=t.split(Xe),o=n.length;for(let s=0;s<o;s++){const l=n[s];let i=r.nextPart.get(l);i||(i=dr(),r.nextPart.set(l,i)),r=i}return r},Co=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Ro=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(s,l)=>{r[s]=l,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(s){let l=r[s];if(l!==void 0)return l;if((l=n[s])!==void 0)return o(s,l),l},set(s,l){s in r?r[s]=l:o(s,l)}}},wt="!",hr=":",Oo=[],br=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),Ao=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const s=[];let l=0,i=0,d=0,u;const f=o.length;for(let g=0;g<f;g++){const y=o[g];if(l===0&&i===0){if(y===hr){s.push(o.slice(d,g)),d=g+1;continue}if(y==="/"){u=g;continue}}y==="["?l++:y==="]"?l--:y==="("?i++:y===")"&&i--}const m=s.length===0?o:o.slice(d);let h=m,b=!1;m.endsWith(wt)?(h=m.slice(0,-1),b=!0):m.startsWith(wt)&&(h=m.slice(1),b=!0);const x=u&&u>d?u-d:void 0;return br(s,b,h,x)};if(t){const o=t+hr,s=n;n=l=>l.startsWith(o)?s(l.slice(o.length)):br(Oo,!1,l,void 0,!0)}if(r){const o=n;n=s=>r({className:s,parseClassName:o})}return n},Po=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let s=0;s<r.length;s++){const l=r[s],i=l[0]==="[",d=t.has(l);i||d?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(l)):o.push(l)}return o.length>0&&(o.sort(),n.push(...o)),n}},To=e=>({cache:Ro(e.cacheSize),parseClassName:Ao(e),sortModifiers:Po(e),...xo(e)}),_o=/\s+/,Mo=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s}=t,l=[],i=e.trim().split(_o);let d="";for(let u=i.length-1;u>=0;u-=1){const f=i[u],{isExternal:m,modifiers:h,hasImportantModifier:b,baseClassName:x,maybePostfixModifierPosition:g}=r(f);if(m){d=f+(d.length>0?" "+d:d);continue}let y=!!g,N=n(y?x.substring(0,g):x);if(!N){if(!y){d=f+(d.length>0?" "+d:d);continue}if(N=n(x),!N){d=f+(d.length>0?" "+d:d);continue}y=!1}const w=h.length===0?"":h.length===1?h[0]:s(h).join(":"),T=b?w+wt:w,A=T+N;if(l.indexOf(A)>-1)continue;l.push(A);const _=o(N,y);for(let z=0;z<_.length;++z){const k=_[z];l.push(T+k)}d=f+(d.length>0?" "+d:d)}return d},Do=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=gr(r))&&(o&&(o+=" "),o+=n);return o},gr=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=gr(e[n]))&&(r&&(r+=" "),r+=t);return r},Io=(e,...t)=>{let r,n,o,s;const l=d=>{const u=t.reduce((f,m)=>m(f),e());return r=To(u),n=r.cache.get,o=r.cache.set,s=i,i(d)},i=d=>{const u=n(d);if(u)return u;const f=Mo(d,r);return o(d,f),f};return s=l,(...d)=>s(Do(...d))},Lo=[],Z=e=>{const t=r=>r[e]||Lo;return t.isThemeGetter=!0,t},vr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,xr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,$o=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Fo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Vo=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,zo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Wo=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Bo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,me=e=>$o.test(e),I=e=>!!e&&!Number.isNaN(Number(e)),he=e=>!!e&&Number.isInteger(Number(e)),jt=e=>e.endsWith("%")&&I(e.slice(0,-1)),fe=e=>Fo.test(e),yr=()=>!0,Go=e=>Vo.test(e)&&!zo.test(e),kt=()=>!1,Uo=e=>Wo.test(e),Yo=e=>Bo.test(e),Qo=e=>!S(e)&&!C(e),Ho=e=>be(e,Sr,kt),S=e=>vr.test(e),je=e=>be(e,Cr,Go),wr=e=>be(e,rs,I),Ko=e=>be(e,Or,yr),Xo=e=>be(e,Rr,kt),jr=e=>be(e,Er,kt),Zo=e=>be(e,Nr,Yo),Ze=e=>be(e,Ar,Uo),C=e=>xr.test(e),ze=e=>ke(e,Cr),Jo=e=>ke(e,Rr),kr=e=>ke(e,Er),qo=e=>ke(e,Sr),es=e=>ke(e,Nr),Je=e=>ke(e,Ar,!0),ts=e=>ke(e,Or,!0),be=(e,t,r)=>{const n=vr.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},ke=(e,t,r=!1)=>{const n=xr.exec(e);return n?n[1]?t(n[1]):r:!1},Er=e=>e==="position"||e==="percentage",Nr=e=>e==="image"||e==="url",Sr=e=>e==="length"||e==="size"||e==="bg-size",Cr=e=>e==="length",rs=e=>e==="number",Rr=e=>e==="family-name",Or=e=>e==="number"||e==="weight",Ar=e=>e==="shadow",ns=Io(()=>{const e=Z("color"),t=Z("font"),r=Z("text"),n=Z("font-weight"),o=Z("tracking"),s=Z("leading"),l=Z("breakpoint"),i=Z("container"),d=Z("spacing"),u=Z("radius"),f=Z("shadow"),m=Z("inset-shadow"),h=Z("text-shadow"),b=Z("drop-shadow"),x=Z("blur"),g=Z("perspective"),y=Z("aspect"),N=Z("ease"),w=Z("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...A(),C,S],z=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],j=()=>[C,S,d],D=()=>[me,"full","auto",...j()],P=()=>[he,"none","subgrid",C,S],W=()=>["auto",{span:["full",he,C,S]},he,C,S],q=()=>[he,"auto",C,S],te=()=>["auto","min","max","fr",C,S],ee=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],J=()=>["start","end","center","stretch","center-safe","end-safe"],re=()=>["auto",...j()],ae=()=>[me,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],xe=()=>[me,"screen","full","dvw","lvw","svw","min","max","fit",...j()],ye=()=>[me,"screen","full","lh","dvh","lvh","svh","min","max","fit",...j()],R=()=>[e,C,S],Ce=()=>[...A(),kr,jr,{position:[C,S]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",qo,Ho,{size:[C,S]}],we=()=>[jt,ze,je],Y=()=>["","none","full",u,C,S],Q=()=>["",I,ze,je],de=()=>["solid","dashed","dotted","double"],ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>[I,jt,kr,jr],Re=()=>["","none",x,C,S],De=()=>["none",I,C,S],Oe=()=>["none",I,C,S],Ue=()=>[I,C,S],Ie=()=>[me,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[fe],breakpoint:[fe],color:[yr],container:[fe],"drop-shadow":[fe],ease:["in","out","in-out"],font:[Qo],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[fe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[fe],shadow:[fe],spacing:["px",I],text:[fe],"text-shadow":[fe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",me,S,C,y]}],container:["container"],columns:[{columns:[I,S,C,i]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:_()}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[he,"auto",C,S]}],basis:[{basis:[me,"full","auto",i,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[I,me,"auto","initial","none",S]}],grow:[{grow:["",I,C,S]}],shrink:[{shrink:["",I,C,S]}],order:[{order:[he,"first","last","none",C,S]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:W()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:W()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...ee(),"normal"]}],"justify-items":[{"justify-items":[...J(),"normal"]}],"justify-self":[{"justify-self":["auto",...J()]}],"align-content":[{content:["normal",...ee()]}],"align-items":[{items:[...J(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...J(),{baseline:["","last"]}]}],"place-content":[{"place-content":ee()}],"place-items":[{"place-items":[...J(),"baseline"]}],"place-self":[{"place-self":["auto",...J()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pbs:[{pbs:j()}],pbe:[{pbe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:re()}],mx:[{mx:re()}],my:[{my:re()}],ms:[{ms:re()}],me:[{me:re()}],mbs:[{mbs:re()}],mbe:[{mbe:re()}],mt:[{mt:re()}],mr:[{mr:re()}],mb:[{mb:re()}],ml:[{ml:re()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:ae()}],"inline-size":[{inline:["auto",...xe()]}],"min-inline-size":[{"min-inline":["auto",...xe()]}],"max-inline-size":[{"max-inline":["none",...xe()]}],"block-size":[{block:["auto",...ye()]}],"min-block-size":[{"min-block":["auto",...ye()]}],"max-block-size":[{"max-block":["none",...ye()]}],w:[{w:[i,"screen",...ae()]}],"min-w":[{"min-w":[i,"screen","none",...ae()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[l]},...ae()]}],h:[{h:["screen","lh",...ae()]}],"min-h":[{"min-h":["screen","lh","none",...ae()]}],"max-h":[{"max-h":["screen","lh",...ae()]}],"font-size":[{text:["base",r,ze,je]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,ts,Ko]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",jt,S]}],"font-family":[{font:[Jo,Xo,t]}],"font-features":[{"font-features":[S]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,C,S]}],"line-clamp":[{"line-clamp":[I,"none",C,wr]}],leading:[{leading:[s,...j()]}],"list-image":[{"list-image":["none",C,S]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",C,S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...de(),"wavy"]}],"text-decoration-thickness":[{decoration:[I,"from-font","auto",C,je]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[I,"auto",C,S]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",C,S]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",C,S]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Ce()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},he,C,S],radial:["",C,S],conic:[he,C,S]},es,Zo]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:we()}],"gradient-via-pos":[{via:we()}],"gradient-to-pos":[{to:we()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-bs":[{"border-bs":Q()}],"border-w-be":[{"border-be":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...de(),"hidden","none"]}],"divide-style":[{divide:[...de(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-bs":[{"border-bs":R()}],"border-color-be":[{"border-be":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...de(),"none","hidden"]}],"outline-offset":[{"outline-offset":[I,C,S]}],"outline-w":[{outline:["",I,ze,je]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",f,Je,Ze]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",m,Je,Ze]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[I,je]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",h,Je,Ze]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[I,C,S]}],"mix-blend":[{"mix-blend":[...ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ce()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[I]}],"mask-image-linear-from-pos":[{"mask-linear-from":U()}],"mask-image-linear-to-pos":[{"mask-linear-to":U()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":U()}],"mask-image-t-to-pos":[{"mask-t-to":U()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":U()}],"mask-image-r-to-pos":[{"mask-r-to":U()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":U()}],"mask-image-b-to-pos":[{"mask-b-to":U()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":U()}],"mask-image-l-to-pos":[{"mask-l-to":U()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":U()}],"mask-image-x-to-pos":[{"mask-x-to":U()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":U()}],"mask-image-y-to-pos":[{"mask-y-to":U()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[C,S]}],"mask-image-radial-from-pos":[{"mask-radial-from":U()}],"mask-image-radial-to-pos":[{"mask-radial-to":U()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[I]}],"mask-image-conic-from-pos":[{"mask-conic-from":U()}],"mask-image-conic-to-pos":[{"mask-conic-to":U()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Ce()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",C,S]}],filter:[{filter:["","none",C,S]}],blur:[{blur:Re()}],brightness:[{brightness:[I,C,S]}],contrast:[{contrast:[I,C,S]}],"drop-shadow":[{"drop-shadow":["","none",b,Je,Ze]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",I,C,S]}],"hue-rotate":[{"hue-rotate":[I,C,S]}],invert:[{invert:["",I,C,S]}],saturate:[{saturate:[I,C,S]}],sepia:[{sepia:["",I,C,S]}],"backdrop-filter":[{"backdrop-filter":["","none",C,S]}],"backdrop-blur":[{"backdrop-blur":Re()}],"backdrop-brightness":[{"backdrop-brightness":[I,C,S]}],"backdrop-contrast":[{"backdrop-contrast":[I,C,S]}],"backdrop-grayscale":[{"backdrop-grayscale":["",I,C,S]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[I,C,S]}],"backdrop-invert":[{"backdrop-invert":["",I,C,S]}],"backdrop-opacity":[{"backdrop-opacity":[I,C,S]}],"backdrop-saturate":[{"backdrop-saturate":[I,C,S]}],"backdrop-sepia":[{"backdrop-sepia":["",I,C,S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",C,S]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[I,"initial",C,S]}],ease:[{ease:["linear","initial",N,C,S]}],delay:[{delay:[I,C,S]}],animate:[{animate:["none",w,C,S]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,C,S]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:De()}],"rotate-x":[{"rotate-x":De()}],"rotate-y":[{"rotate-y":De()}],"rotate-z":[{"rotate-z":De()}],scale:[{scale:Oe()}],"scale-x":[{"scale-x":Oe()}],"scale-y":[{"scale-y":Oe()}],"scale-z":[{"scale-z":Oe()}],"scale-3d":["scale-3d"],skew:[{skew:Ue()}],"skew-x":[{"skew-x":Ue()}],"skew-y":[{"skew-y":Ue()}],transform:[{transform:[C,S,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ie()}],"translate-x":[{"translate-x":Ie()}],"translate-y":[{"translate-y":Ie()}],"translate-z":[{"translate-z":Ie()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",C,S]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mbs":[{"scroll-mbs":j()}],"scroll-mbe":[{"scroll-mbe":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pbs":[{"scroll-pbs":j()}],"scroll-pbe":[{"scroll-pbe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",C,S]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[I,ze,je,wr]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function se(...e){return ns(ur(e))}function os({className:e,...t}){return a.jsx("textarea",{"data-slot":"textarea",className:se("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}function ss({value:e="",onChange:t,placeholder:r="Enter your response...",className:n="",disabled:o=!1,minRows:s=3,maxRows:l=8,characterLimit:i}){const d=h=>{let b=h.target.value;i&&b.length>i&&(b=b.slice(0,i)),t(b)},u=e.length,f=i&&u>=i*.9,m=i&&u>=i;return a.jsxs("div",{className:se("space-y-2",n),children:[a.jsx("div",{className:"relative",children:a.jsx(os,{value:e,onChange:d,placeholder:r,disabled:o,rows:s,className:se("w-full resize-y rounded-lg border border-borderGray !bg-white px-[13px] py-3 text-sm font-normal","focus:border-primary focus:ring-0 focus:outline-none","placeholder:text-textGray","!field-sizing-auto !transition-none","resize-y",o&&"cursor-not-allowed opacity-50"),style:{minHeight:`${s*1.5}rem`,maxHeight:`${l*1.5}rem`,boxSizing:"border-box",overflow:"hidden",borderRadius:"0px",backgroundColor:"white"}})}),i!=null&&a.jsx("div",{className:"flex justify-end",children:a.jsxs("span",{className:se("text-xs transition-colors",m?"text-error":f?"text-warning":"text-textGray"),children:[u,"/",i]})})]})}function as({options:e,value:t,onChange:r,placeholder:n="Select an option",disabled:o=!1,error:s,required:l=!1,className:i=""}){const[d,u]=O.useState(!1),[f,m]=O.useState(-1),h=O.useRef(null),b=e.find(w=>w.value===t),x=(b==null?void 0:b.label)||"";O.useEffect(()=>{function w(T){h.current&&!h.current.contains(T.target)&&(u(!1),m(-1))}return d&&document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[d]),O.useEffect(()=>{function w(T){if(!d)return;const A=e.filter(_=>!_.disabled);switch(T.key){case"ArrowDown":T.preventDefault(),m(_=>_+1>=A.length?0:_+1);break;case"ArrowUp":T.preventDefault(),m(_=>_-1<0?A.length-1:_-1);break;case"Enter":T.preventDefault(),f>=0&&A[f]&&(r(A[f].value),u(!1));break;case"Escape":u(!1),m(-1);break}}return d&&document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[d,f,e,r]);const g=()=>{o||(u(w=>!w),m(-1))},y=w=>{w.disabled||(r(w.value),u(!1),m(-1))},N="relative w-full cursor-pointer border border-rounded rounded-xl border-borderGray bg-white px-3 py-2 pr-10 text-left focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary "+(o?"cursor-not-allowed bg-gray-50 text-gray-400 ":"")+(s?"border-error focus:border-error focus:ring-error ":"");return a.jsxs("div",{className:`relative ${i}`,ref:h,children:[a.jsxs("button",{type:"button",className:N,onClick:g,disabled:o,"aria-haspopup":"listbox","aria-expanded":d,children:[a.jsxs("span",{className:`block truncate ${x?"text-textBlack":"text-textGray"}`,children:[x||n,l&&!x&&a.jsx("span",{className:"ml-1 text-error",children:"*"})]}),a.jsx("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:a.jsx("svg",{className:`h-4 w-4 transition-transform duration-200 ${d?"rotate-180":""} ${o?"text-gray-400":"text-textGray"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]}),s&&a.jsx("p",{className:"mt-1 text-sm text-error",children:s}),d&&a.jsx("div",{className:"absolute z-50 mt-1 max-h-60 w-full overflow-auto rounded-lg border border-borderGray bg-white shadow-lg",role:"listbox",children:e.length===0?a.jsx("div",{className:"px-3 py-2 text-sm text-textGray",children:"No options available"}):e.map(w=>{const A=e.filter(k=>!k.disabled).findIndex(k=>k.value===w.value),_=A===f,z=w.value===t;return a.jsx("div",{className:`cursor-pointer px-3 py-2 text-sm transition-colors ${w.disabled?"cursor-not-allowed bg-gray-50 text-gray-400":_?"bg-primaryLight text-primary":z?"bg-primary text-white":"text-textBlack hover:bg-gray-50"}`,onClick:()=>y(w),onMouseEnter:()=>!w.disabled&&m(A),role:"option","aria-selected":z,children:w.label},w.value)})})]})}function is(e,t){const r=e.trim();switch(t){case"Numeric":return/^\d+$/.test(r);case"Alphabet":case"AlphaNumeric":return/^[A-Za-z0-9]+$/.test(r);default:return!0}}function ls({columns:e,rows:t,inputConfig:r,values:n,onValueChange:o,className:s=""}){const l=u=>{const f=n==null?void 0:n.find(m=>m.rowId===u);return f?f.value:r.type==="checkbox"?!1:""},i="w-full border border-borderGray bg-white px-3 py-2 text-sm leading-5 font-normal transition-all focus:border-primary focus:outline-none",d=u=>{var m;const f=l(u.id);switch(r.type){case"dropdown":return a.jsxs("select",{value:String(f),onChange:h=>o(u.id,h.target.value),className:`${i} cursor-pointer appearance-none bg-white pr-8`,style:{backgroundImage:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23374151' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e")`,backgroundPosition:"right 8px center",backgroundRepeat:"no-repeat",backgroundSize:"16px",borderRadius:"0.75rem"},children:[a.jsx("option",{value:"",children:"Select"}),(m=r.options)==null?void 0:m.map(h=>a.jsx("option",{value:h.id,children:h.text},h.id))]});case"number":return a.jsx("input",{type:"number",value:String(f),onChange:h=>o(u.id,h.target.value),placeholder:r.placeholder,min:r.min,max:r.max,step:r.step,required:r.required,className:i,style:{borderRadius:"0.75rem"}});case"checkbox":return a.jsxs("div",{className:"flex items-center",children:[a.jsx("input",{type:"checkbox",id:`cb-${u.id}`,checked:!!f,onChange:h=>o(u.id,h.target.checked),required:r.required,className:"h-4 w-4 cursor-pointer border border-borderGray text-primary focus:ring-2 focus:ring-primary focus:ring-offset-0"}),r.checkboxLabel&&a.jsx("label",{htmlFor:`cb-${u.id}`,className:"ml-2 cursor-pointer text-sm text-textBlack",children:r.checkboxLabel})]});case"text":default:return a.jsx("input",{type:"text",value:String(f),onChange:h=>{let b=h.target.value;r.maxLength&&b.length>r.maxLength||r.inputType&&b.trim()!==""&&!is(b,r.inputType)||o(u.id,b)},placeholder:r.placeholder,required:r.required,maxLength:r.maxLength,className:i,style:{borderRadius:"0.75rem"}})}};return a.jsxs("div",{className:`overflow-hidden border border-rounded rounded-xl border-borderGray bg-white ${s}`,children:[a.jsx("div",{className:"flex border-b border-borderGray bg-gray-50",children:e.map((u,f)=>a.jsx("div",{className:`flex-1 px-4 py-3 text-left text-sm font-medium text-textBlack ${f!==e.length-1?"border-r border-borderGray":""}`,style:{width:u.width},children:u.title},u.id))}),a.jsx("div",{children:t.map((u,f)=>{var m,h;return a.jsxs("div",{className:f!==t.length-1?"flex border-b border-borderGray":"flex",children:[a.jsx("div",{className:"flex flex-1 items-center border-r border-borderGray px-4 py-3 text-sm text-textBlack",style:{width:(m=e[0])==null?void 0:m.width},children:u.label}),a.jsx("div",{className:"flex flex-1 items-center px-4 py-3",style:{width:(h=e[1])==null?void 0:h.width},children:d(u)})]},u.id)})})]})}function cs(e){return`${["January","February","March","April","May","June","July","August","September","October","November","December"][e.getMonth()]} ${e.getDate()}, ${e.getFullYear()}`}const us=["January","February","March","April","May","June","July","August","September","October","November","December"],ds=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function fs({selectedDate:e,onDateSelect:t,placeholder:r="Select a date",className:n="",disabled:o=!1,minDate:s,maxDate:l}){const[i,d]=O.useState(!1),[u,f]=O.useState(()=>e??new Date),m=O.useRef(null);O.useEffect(()=>{i&&f(e??new Date)},[i]),O.useEffect(()=>{if(!i)return;const P=W=>{m.current&&!m.current.contains(W.target)&&d(!1)};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[i]);const h=P=>{t(P),d(!1)},b=P=>{const W=new Date(u);W.setMonth(parseInt(P,10)),f(W)},x=P=>{const W=new Date(u);W.setFullYear(parseInt(P,10)),f(W)},g=new Date().getFullYear(),y=s?s.getFullYear():g-100,N=l?l.getFullYear():g+100,w=Array.from({length:Math.max(1,N-y+1)},(P,W)=>y+W),T=P=>!!(s&&P<s||l&&P>l),A=u.getFullYear(),_=u.getMonth(),z=new Date(A,_,1).getDay(),k=new Date(A,_+1,0).getDate(),j=z,D=e?cs(e):"";return a.jsxs("div",{ref:m,className:`relative ${n}`.trim(),children:[a.jsxs("button",{type:"button",onClick:()=>!o&&d(P=>!P),className:`flex w-full items-center justify-start border border-borderGray bg-white px-[13px] py-3 text-left text-sm font-normal hover:bg-gray-50 ${D?"text-textBlack":"text-textGray"} ${o?"cursor-not-allowed opacity-50":"cursor-pointer"}`,style:{borderRadius:"0.75rem",backgroundColor:"white"},children:[a.jsx("svg",{className:"mr-2 h-4 w-4 shrink-0 text-textGray",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),D||r]}),i&&a.jsx("div",{className:"absolute z-50 mt-1 w-auto rounded-md border border-borderGray bg-white p-3 shadow-lg",style:{minWidth:"280px"},children:a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsx("select",{value:u.getMonth().toString(),onChange:P=>b(P.target.value),className:"h-8 w-32 rounded border border-borderGray bg-white px-2 text-sm focus:border-primary focus:outline-none",children:us.map((P,W)=>a.jsx("option",{value:W.toString(),children:P},P))}),a.jsx("select",{value:u.getFullYear().toString(),onChange:P=>x(P.target.value),className:"h-8 w-24 rounded border border-borderGray bg-white px-2 text-sm focus:border-primary focus:outline-none",children:w.map(P=>a.jsx("option",{value:P.toString(),children:P},P))})]}),a.jsxs("div",{className:"w-full",children:[a.jsx("div",{className:"grid grid-cols-7 gap-1 text-center text-xs font-medium text-textGray",children:ds.map(P=>a.jsx("div",{children:P},P))}),a.jsxs("div",{className:"mt-1 grid grid-cols-7 gap-1 text-sm",children:[Array.from({length:j},(P,W)=>a.jsx("div",{},`empty-${W}`)),Array.from({length:k},(P,W)=>{const q=W+1,te=new Date(A,_,q),ee=T(te),J=e&&e.getFullYear()===A&&e.getMonth()===_&&e.getDate()===q;return a.jsx("button",{type:"button",disabled:ee,onClick:()=>!ee&&h(te),className:`flex h-8 w-8 items-center justify-center rounded-md transition-colors ${ee?"cursor-not-allowed text-gray-300":"hover:bg-primary/10 hover:text-primary"} ${J?"bg-primary text-white hover:bg-primary hover:text-white":""}`,children:q},q)})]})]})]})})]})}const ps={"image-response":{label:"Image",showPreview:!0},"video-response":{label:"Video",showPreview:!0},"voice-response":{label:"Audio",showPreview:!0},"document-response":{label:"Document",showPreview:!0},"pdf-response":{label:"PDF",showPreview:!0}};function Et({questionType:e}){const t="h-8 w-8 text-primary";return e==="image-response"?a.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}):e==="video-response"?a.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}):e==="document-response"?a.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}):e==="pdf-response"?a.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})}):a.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15.536 8.464a5 5 0 010 7.072m2.828-9.9a9 9 0 010 12.728M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z"})})}function We({questionType:e,value:t,onChange:r,className:n="",disabled:o=!1,mediaConfig:s}){var _,z;const[l,i]=O.useState(!1),[d,u]=O.useState(null),f=O.useRef(null),m=ps[e],h=((_=s==null?void 0:s.allowedTypes[e])==null?void 0:_.join(","))??((z=Ke[e])==null?void 0:z.join(","))??"",b=(s==null?void 0:s.maxSizeBytes[e])!=null?Math.round(s.maxSizeBytes[e]/(1024*1024)):xt[e]??10,x=(s==null?void 0:s.allowedTypes[e])??Ke[e]??[],g=x.length>0?`Supported: ${x.join(", ")} (max ${b}MB)`:`Max size: ${b}MB`,y=async k=>{u(null);const j=nr(k,e,s);if(!j.valid){u(j.error??"Invalid file"),r(null);return}try{const D=await or(k);r(D)}catch{u("Failed to read file"),r(null)}},N=k=>{var D;if(k.preventDefault(),k.stopPropagation(),i(!1),o)return;const j=(D=k.dataTransfer.files)==null?void 0:D[0];j&&y(j)},w=k=>{var D;const j=(D=k.target.files)==null?void 0:D[0];j&&y(j),k.target.value=""},T=()=>{r(null),u(null)};if((t==null?void 0:t.binary)&&t){const k=`data:${t.fileType};base64,${t.binary}`;return a.jsxs("div",{className:`relative border border-rounded rounded-xl border-borderGray bg-white ${n}`,children:[a.jsx("button",{type:"button",onClick:T,disabled:o,className:"absolute -top-3 -right-3 z-10 rounded-full border border-borderGray bg-textGray p-1 text-white transition-all hover:bg-primary hover:text-white disabled:opacity-50","aria-label":"Remove",children:a.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),a.jsxs("div",{className:"p-4",children:[e==="image-response"&&a.jsx("img",{src:k,alt:"Uploaded",className:"max-h-64 w-full object-contain"}),e==="video-response"&&a.jsx("video",{src:k,controls:!0,className:"max-h-64 w-full",children:"Your browser does not support the video tag."}),e==="voice-response"&&a.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[a.jsx(Et,{questionType:"voice-response"}),a.jsx("p",{className:"text-sm font-medium text-textBlack",children:t.fileName}),a.jsx("audio",{src:k,controls:!0,className:"w-full max-w-sm",children:"Your browser does not support the audio tag."})]}),e==="pdf-response"&&a.jsxs("div",{className:"flex flex-col space-y-2",children:[a.jsx("iframe",{src:k,title:"PDF preview",className:"h-96 w-full rounded border border-borderGray bg-white"}),a.jsx("p",{className:"text-sm text-textGray",children:t.fileName})]}),e==="document-response"&&a.jsxs("div",{className:"flex flex-col items-center space-y-3",children:[a.jsx(Et,{questionType:"document-response"}),a.jsx("p",{className:"text-sm font-medium text-textBlack",children:t.fileName}),a.jsx("a",{href:k,target:"_blank",rel:"noopener noreferrer",className:"text-sm font-medium text-primary hover:underline",children:"View / Open file"})]}),m.showPreview&&e!=="voice-response"&&e!=="document-response"&&e!=="pdf-response"&&a.jsx("p",{className:"mt-2 text-sm text-textGray",children:t.fileName})]})]})}return a.jsxs("div",{className:n,children:[a.jsxs("div",{className:`relative border-2 border-rounded rounded-xl border-dashed p-8 text-center transition-all ${l?"border-primary bg-primary/5":"border-borderGray bg-white hover:border-primary hover:bg-primary/5"} ${o?"cursor-not-allowed opacity-50":"cursor-pointer"}`,onDragEnter:k=>{k.preventDefault(),k.stopPropagation(),o||i(!0)},onDragLeave:k=>{k.preventDefault(),k.stopPropagation(),i(!1)},onDragOver:k=>{k.preventDefault(),k.stopPropagation()},onDrop:N,onClick:()=>{var k;return!o&&((k=f.current)==null?void 0:k.click())},children:[a.jsx("input",{ref:f,type:"file",accept:h,onChange:w,disabled:o,className:"hidden","aria-label":`Select ${m.label} file`}),a.jsxs("div",{className:"space-y-4",children:[a.jsx("div",{className:"flex justify-center",children:a.jsx(Et,{questionType:e})}),a.jsxs("div",{children:[a.jsxs("p",{className:"text-sm font-medium text-primary",children:["Tap to Upload ",m.label]}),a.jsxs("p",{className:"mt-1 text-xs text-textGray",children:["or drag and drop your ",m.label.toLowerCase()," here"]})]}),a.jsx("div",{className:"text-xs text-textGray",children:a.jsx("p",{children:g})})]})]}),d&&a.jsx("div",{className:"mt-4 rounded-lg border border-error bg-error/5 p-3",children:a.jsx("p",{className:"text-xs text-error",children:d})})]})}function ms({question:e,value:t,onChange:r,error:n,disabled:o=!1,mediaConfig:s,className:l=""}){return a.jsxs("div",{className:l,children:[a.jsx(We,{questionType:"image-response",value:t,onChange:r,disabled:o,mediaConfig:s}),n&&a.jsx("p",{className:"mt-1 text-sm text-error",children:n})]})}function hs({question:e,value:t,onChange:r,error:n,disabled:o=!1,mediaConfig:s,className:l=""}){return a.jsxs("div",{className:l,children:[a.jsx(We,{questionType:"video-response",value:t,onChange:r,disabled:o,mediaConfig:s}),n&&a.jsx("p",{className:"mt-1 text-sm text-error",children:n})]})}function bs({question:e,value:t,onChange:r,error:n,disabled:o=!1,mediaConfig:s,className:l=""}){return a.jsxs("div",{className:l,children:[a.jsx(We,{questionType:"voice-response",value:t,onChange:r,disabled:o,mediaConfig:s}),n&&a.jsx("p",{className:"mt-1 text-sm text-error",children:n})]})}function gs({question:e,value:t,onChange:r,error:n,disabled:o=!1,mediaConfig:s,className:l=""}){return a.jsxs("div",{className:l,children:[a.jsx(We,{questionType:"document-response",value:t,onChange:r,disabled:o,mediaConfig:s}),n&&a.jsx("p",{className:"mt-1 text-sm text-error",children:n})]})}function vs({question:e,value:t,onChange:r,error:n,disabled:o=!1,mediaConfig:s,className:l=""}){return a.jsxs("div",{className:l,children:[a.jsx(We,{questionType:"pdf-response",value:t,onChange:r,disabled:o,mediaConfig:s}),n&&a.jsx("p",{className:"mt-1 text-sm text-error",children:n})]})}function xs({question:e,value:t,onChange:r,error:n,touched:o=!0,disabled:s=!1,mediaConfig:l,className:i=""}){const d=()=>e.options?e.options.map((b,x)=>{var g;return{value:b,label:((g=e.optionsEN)==null?void 0:g[x])??b,disabled:!1}}):[],u=()=>e.options?e.options.map((b,x)=>{var g;return{id:b,text:((g=e.optionsEN)==null?void 0:g[x])??b}}):[],f=()=>{if(!e.tableHeaderValue||!e.tableQuestionValue)return null;const b=e.tableHeaderValue.map((y,N)=>({id:`col-${N}`,title:y,width:N===0?"60%":"40%"})),x=e.tableQuestionValue.map(y=>({id:y.rowId,label:y.rowQuestion}));let g;switch(e.type){case"tabular-text-input":g={type:"text",placeholder:"Enter text",required:e.isMandatory,maxLength:e.textLimitCharacter?parseInt(e.textLimitCharacter.toString(),10):void 0,inputType:e.textInputType};break;case"tabular-drop-down":{g={type:"dropdown",options:(e.optionsEN??e.options??[]).map(N=>({id:N,text:N})),required:e.isMandatory};break}case"tabular-check-box":g={type:"checkbox",checkboxLabel:"Yes",required:e.isMandatory};break;default:g={type:"text",required:e.isMandatory}}return{columns:b,rows:x,inputConfig:g}},m=()=>!t||typeof t!="object"?[]:Array.isArray(t)?t.map(x=>({rowId:x.rowId,value:x.rowAnswer??""})):Object.entries(t).map(([x,g])=>({rowId:x,value:g})),h=(b,x)=>{r({...t||{},[b]:x})};switch(e.type){case"single-select":return a.jsxs("div",{className:i,children:[a.jsx(lr,{options:u(),selectedOptions:String(t??""),onOptionSelect:b=>r(b),selectionMode:"single",disabled:s}),o&&n&&a.jsx("p",{className:"mt-1 text-sm text-error",children:n})]});case"multi-select":return a.jsxs("div",{className:i,children:[a.jsx(lr,{options:u(),selectedOptions:Array.isArray(t)?t.map(String):[],onOptionSelect:b=>r(b),selectionMode:"multiple",disabled:s}),o&&n&&a.jsx("p",{className:"mt-1 text-sm text-error",children:n})]});case"dropdown":case"drop-down":return a.jsx("div",{className:i,children:a.jsx(as,{options:d(),value:String(t??""),onChange:b=>r(b),placeholder:"Select an option",disabled:s,error:o?n:void 0,required:e.isMandatory})});case"text-response":return a.jsxs("div",{className:i,children:[a.jsx(ss,{value:String(t??""),onChange:b=>r(b),characterLimit:e.textLimitCharacter??void 0,placeholder:"Enter your response...",disabled:s}),o&&n&&a.jsx("p",{className:"mt-1 text-sm text-error",children:n})]});case"calendar":return a.jsxs("div",{className:i,children:[a.jsx(fs,{selectedDate:t instanceof Date?t:void 0,onDateSelect:b=>r(b??null),disabled:s,placeholder:"Select a date"}),o&&n&&a.jsx("p",{className:"mt-1 text-sm text-error",children:n})]});case"image-response":{const b=t&&typeof t=="object"&&"fileName"in t&&"binary"in t?t:null;return a.jsx("div",{className:i,children:a.jsx(ms,{question:e,value:b,onChange:x=>r(x),error:o?n:void 0,disabled:s,mediaConfig:l})})}case"video-response":{const b=t&&typeof t=="object"&&"fileName"in t&&"binary"in t?t:null;return a.jsx("div",{className:i,children:a.jsx(hs,{question:e,value:b,onChange:x=>r(x),error:o?n:void 0,disabled:s,mediaConfig:l})})}case"voice-response":{const b=t&&typeof t=="object"&&"fileName"in t&&"binary"in t?t:null;return a.jsx("div",{className:i,children:a.jsx(bs,{question:e,value:b,onChange:x=>r(x),error:o?n:void 0,disabled:s,mediaConfig:l})})}case"document-response":{const b=t&&typeof t=="object"&&"fileName"in t&&"binary"in t?t:null;return a.jsx("div",{className:i,children:a.jsx(gs,{question:e,value:b,onChange:x=>r(x),error:o?n:void 0,disabled:s,mediaConfig:l})})}case"pdf-response":{const b=t&&typeof t=="object"&&"fileName"in t&&"binary"in t?t:null;return a.jsx("div",{className:i,children:a.jsx(vs,{question:e,value:b,onChange:x=>r(x),error:o?n:void 0,disabled:s,mediaConfig:l})})}case"tabular-text-input":case"tabular-drop-down":case"tabular-check-box":{const b=f();return b?a.jsxs("div",{className:i,children:[a.jsx(ls,{columns:b.columns,rows:b.rows,inputConfig:b.inputConfig,values:m(),onValueChange:h}),o&&n&&a.jsx("p",{className:"mt-1 text-sm text-error",children:n})]}):a.jsx("div",{className:`text-error ${i}`,children:"Invalid tabular question configuration"})}default:return a.jsxs("div",{className:`text-error ${i}`,children:[a.jsxs("p",{children:["Unsupported question type: ",e.type]}),a.jsxs("p",{className:"mt-1 text-sm text-textGray",children:["Question: ",e.description]})]})}}function Pr({question:e,value:t,onChange:r,disabled:n=!1,error:o,validationErrors:s=[],mediaConfig:l,className:i=""}){const d=s.filter(f=>f.questionId===e.questionId),u=o??d.map(f=>f.message).join("; ");return Kt(e.type)?a.jsx(xs,{question:e,value:t,onChange:r,error:u,touched:!0,disabled:n,mediaConfig:l,className:i}):a.jsx("div",{className:i,children:a.jsxs("p",{className:"text-error",children:["Unsupported question type: ",e.type]})})}function ys(e){switch(e){case"completed":return"border-green-200 bg-green-50";case"error":return"border-red-200 bg-red-50";default:return"border-blue-200 bg-gray-50"}}function Tr({questions:e,activeQuestionId:t,onQuestionSelect:r,questionStatusMap:n={},className:o=""}){const s=O.useRef(null),l=O.useRef([]),i=t!=null?e.indexOf(t):-1,d=e.length>1;O.useEffect(()=>{if(i<0||i>=l.current.length)return;const m=l.current[i];m==null||m.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})},[i,t]);const u=O.useCallback(()=>{if(i<=0)return;const m=e[i-1];m&&r(m)},[i,e,r]),f=O.useCallback(()=>{if(i>=e.length-1||i<0)return;const m=e[i+1];m&&r(m)},[i,e,r]);return e.length===0?null:a.jsxs("div",{className:`flex items-center gap-2 overflow-hidden ${o}`.trim(),role:"navigation","aria-label":"Question navigation",children:[d&&a.jsx("button",{type:"button",onClick:u,disabled:i<=0,"aria-label":"Previous question",className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-md border border-borderGray bg-white text-textBlack transition-colors hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50",children:a.jsx("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",clipRule:"evenodd"})})}),a.jsx("div",{ref:s,className:"flex flex-1 gap-2 overflow-x-auto scroll-smooth whitespace-nowrap no-scrollbar py-1",style:{minHeight:0},children:e.map((m,h)=>{const b=m===t,x=n[m],g=ys(x);return a.jsx("button",{ref:y=>{l.current[h]=y},type:"button",onClick:()=>r(m),className:`min-w-[60px] flex-shrink-0 rounded-md border px-3 py-2 text-center text-sm transition-all cursor-pointer ${b?"border-blue-500 ring-2 ring-blue-200 bg-blue-50 text-primary":`${g} text-textBlack hover:border-primary/50`}`,"aria-current":b?"step":void 0,"aria-label":`Question ${m}`,children:m},m)})}),d&&a.jsx("button",{type:"button",onClick:f,disabled:i>=e.length-1,"aria-label":"Next question",className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-md border border-borderGray bg-white text-textBlack transition-colors hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50",children:a.jsx("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"})})})]})}function _r(e,t){const r=e.trim();switch(t){case"Numeric":return/^\d+$/.test(r);case"Alphabet":case"AlphaNumeric":return/^[A-Za-z0-9]+$/.test(r);default:return!0}}function Mr(e,t){var r;if(t==null)return!1;switch(e.type){case"single-select":case"dropdown":case"drop-down":case"text-response":return t!==""&&t!==null&&t!==void 0;case"multi-select":return Array.isArray(t)&&t.length>0;case"calendar":return t&&typeof t=="object"&&((r=t.constructor)==null?void 0:r.name)==="Date";case"video-response":case"voice-response":case"image-response":return t&&typeof t=="object"&&"fileName"in t&&"binary"in t||typeof t=="string"&&t!==""||typeof t=="object"&&t!==null&&"devicePath"in t;case"tabular-text-input":case"tabular-drop-down":{if(typeof t!="object")return!1;const n=t,o=e.tableQuestionValue||[];return o.length===0?Object.keys(n).length>0&&Object.values(n).some(s=>s!==""&&s!==null&&s!==void 0):e.isMandatory?o.every(s=>{const l=n[s.rowId];return l!==""&&l!==null&&l!==void 0}):o.some(s=>{const l=n[s.rowId];return l!==""&&l!==null&&l!==void 0})}case"tabular-check-box":{if(typeof t!="object")return!1;const n=t,o=e.tableQuestionValue||[];return o.length===0?Object.values(n).some(s=>s===!0):e.isMandatory?o.some(s=>n[s.rowId]===!0):o.length>0&&Object.keys(n).length>0}default:return!1}}function ws(e,t){if(!Mr(e,t))return!e.isMandatory;if(e.type==="tabular-text-input"||e.type==="tabular-drop-down"||e.type==="tabular-check-box"){if(typeof t=="object"&&t!==null){const r=t;if(e.textLimitCharacter){const n=parseInt(e.textLimitCharacter.toString(),10);for(const o of Object.values(r))if(o!=null&&String(o).length>n)return!1}if(e.textInputType){for(const n of Object.values(r))if(n!=null&&!_r(String(n),e.textInputType))return!1}}}else{if(e.textLimitCharacter&&t!=null){const r=String(t),n=parseInt(e.textLimitCharacter.toString(),10);if(r.length>n)return!1}if(e.textInputType&&t!=null&&!_r(String(t),e.textInputType))return!1}return!0}function js(e){switch(e){case"completed":return a.jsx("svg",{className:"h-5 w-5 text-green-600",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})});case"error":return a.jsx("svg",{className:"h-5 w-5 text-red-600",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})});case"required":return a.jsx("svg",{className:"h-5 w-5 text-orange-600",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})});default:return a.jsx("div",{className:"h-5 w-5 rounded-full border-2 border-gray-300"})}}function ks(e){switch(e){case"completed":return"border-green-200 bg-green-50";case"error":return"border-red-200 bg-red-50";case"required":return"border-orange-200 bg-orange-50";default:return"border-gray-200 bg-gray-50"}}function Dr({isOpen:e,onClose:t,questions:r,visibleQuestionIds:n,responses:o,currentQuestionIndex:s,onGoToQuestion:l,readOnly:i=!1}){const d=u=>{if(i)return"completed";const f=o[u],m=r.find(x=>x.questionId===u);if(!m)return"unanswered";const h=Mr(m,f),b=ws(m,f);return h&&b?"completed":h&&!b?"error":!h&&m.isMandatory?"required":"unanswered"};return e?a.jsxs(a.Fragment,{children:[a.jsx("div",{role:"presentation",onClick:t,className:"fixed inset-0 z-50 bg-black/50"}),a.jsx("div",{className:"fixed top-0 right-0 z-50 h-full w-full max-w-md overflow-hidden bg-white shadow-2xl",children:a.jsxs("div",{className:"flex h-full flex-col",children:[a.jsx("div",{className:"border-b border-gray-200 p-6",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h2",{className:"text-xl font-semibold text-textBlack",children:"Question Overview"}),a.jsx("button",{type:"button",onClick:t,className:"rounded-lg p-2 transition-colors hover:bg-gray-100","aria-label":"Close",children:a.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),a.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:a.jsx("div",{className:"space-y-3",children:n.map((u,f)=>{const m=r.find(x=>x.questionId===u);if(!m)return null;const h=d(u),b=f===s;return a.jsx("button",{type:"button",onClick:()=>l(f),className:`w-full rounded-lg border-2 p-4 text-left transition-all duration-200 ${b?"border-primary bg-primary/10 shadow-md":`${ks(h)} hover:shadow-md`}`,children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("div",{className:"mt-0.5 flex-shrink-0",children:js(h)}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[a.jsx("span",{className:"text-sm font-medium text-primary",children:m.questionId}),m.isMandatory&&a.jsx("span",{className:"text-xs text-error",children:"*"}),b&&a.jsx("span",{className:"text-xs font-medium text-primary",children:"Current"})]}),a.jsx("p",{className:"truncate text-sm font-medium text-textBlack",children:m.description})]}),a.jsx("div",{className:"flex-shrink-0 text-xs text-textGray",children:f+1})]})},u)})})}),a.jsx("div",{className:"border-t border-gray-200 bg-gray-50 p-6",children:a.jsx("div",{className:"flex items-center justify-between text-sm",children:a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("div",{className:"h-3 w-3 rounded-full bg-green-500"}),a.jsx("span",{className:"text-textGray",children:"Completed"})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("div",{className:"h-3 w-3 rounded-full bg-orange-500"}),a.jsx("span",{className:"text-textGray",children:"Required"})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("div",{className:"h-3 w-3 rounded-full bg-red-500"}),a.jsx("span",{className:"text-textGray",children:"Error"})]})]})})})]})})]}):null}function Ir(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function qe(...e){return t=>{let r=!1;const n=e.map(o=>{const s=Ir(o,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<n.length;o++){const s=n[o];typeof s=="function"?s():Ir(e[o],null)}}}}function Ee(...e){return p.useCallback(qe(...e),e)}var Es=Symbol.for("react.lazy"),et=p[" use ".trim().toString()];function Ns(e){return typeof e=="object"&&e!==null&&"then"in e}function Lr(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Es&&"_payload"in e&&Ns(e._payload)}function Ss(e){const t=Rs(e),r=p.forwardRef((n,o)=>{let{children:s,...l}=n;Lr(s)&&typeof et=="function"&&(s=et(s._payload));const i=p.Children.toArray(s),d=i.find(As);if(d){const u=d.props.children,f=i.map(m=>m===d?p.Children.count(u)>1?p.Children.only(null):p.isValidElement(u)?u.props.children:null:m);return a.jsx(t,{...l,ref:o,children:p.isValidElement(u)?p.cloneElement(u,void 0,f):null})}return a.jsx(t,{...l,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}var Cs=Ss("Slot");function Rs(e){const t=p.forwardRef((r,n)=>{let{children:o,...s}=r;if(Lr(o)&&typeof et=="function"&&(o=et(o._payload)),p.isValidElement(o)){const l=Ts(o),i=Ps(s,o.props);return o.type!==p.Fragment&&(i.ref=n?qe(n,l):l),p.cloneElement(o,i)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Os=Symbol("radix.slottable");function As(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Os}function Ps(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const d=s(...i);return o(...i),d}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function Ts(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const $r=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Fr=ur,_s=((e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Fr(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:s}=t,l=Object.keys(o).map(u=>{const f=r==null?void 0:r[u],m=s==null?void 0:s[u];if(f===null)return null;const h=$r(f)||$r(m);return o[u][h]}),i=r&&Object.entries(r).reduce((u,f)=>{let[m,h]=f;return h===void 0||(u[m]=h),u},{}),d=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:m,className:h,...b}=f;return Object.entries(b).every(x=>{let[g,y]=x;return Array.isArray(y)?y.includes({...s,...i}[g]):{...s,...i}[g]===y})?[...u,m,h]:u},[]);return Fr(e,l,d,r==null?void 0:r.class,r==null?void 0:r.className)})("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[14px] text-[14px] leading-[20px] font-medium transition-all disabled:pointer-events-none disabled:opacity-50 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 aria-invalid:border-destructive hover:opacity-90",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"px-3 py-3",sm:"px-3 py-2",lg:"px-4 py-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),Ms=e=>{switch(e){case"primary":return"bg-primary";case"secondary":return"bg-secondary";case"destructive":return"bg-destructive";case"muted":return"bg-muted";case"error":return"bg-red-500";case"success":return"bg-green-500";case"warning":return"bg-yellow-500";case"white":return"bg-white";case"gray":return"bg-gray-500";case"lightGray":return"bg-[#E5E7EB]";case"borderGray":return"bg-borderGray";default:return`bg-[${e}]`}},Ds=e=>{switch(e){case"white":return"text-white";case"black":return"text-black";case"primary":return"text-primary";case"primary-foreground":return"text-primary-foreground";case"secondary":return"text-secondary";case"muted":return"text-muted-foreground";default:return`text-[${e}]`}};function Ne({className:e,variant:t,size:r,asChild:n=!1,bgColor:o,textColor:s,text:l,prefixIcon:i,suffixIcon:d,children:u,...f}){const m=n?Cs:"button",h=[o&&Ms(o),s&&Ds(s)].filter(Boolean).join(" "),b=h?se("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[14px] text-[14px] leading-[20px] font-medium transition-all disabled:pointer-events-none disabled:opacity-50 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] hover:opacity-90 cursor-pointer",r==="sm"&&"px-3 py-2",r==="lg"&&"px-4 py-4",r==="icon"&&"size-9",(!r||r==="default")&&"px-3 py-3",h,e):se(_s({variant:t,size:r,className:e}));return l||i||d?a.jsxs(m,{"data-slot":"button",className:b,...f,children:[i&&a.jsx("span",{className:"flex h-4 w-4 items-center justify-center",children:i}),l&&a.jsx("span",{className:"flex-1 text-center",children:l}),d&&a.jsx("span",{className:"flex h-4 w-4 items-center justify-center",children:d}),u]}):a.jsx(m,{"data-slot":"button",className:b,...f,children:u})}function ge(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Is(e,t){const r=p.createContext(t),n=s=>{const{children:l,...i}=s,d=p.useMemo(()=>i,Object.values(i));return a.jsx(r.Provider,{value:d,children:l})};n.displayName=e+"Provider";function o(s){const l=p.useContext(r);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,o]}function Ls(e,t=[]){let r=[];function n(s,l){const i=p.createContext(l),d=r.length;r=[...r,l];const u=m=>{var N;const{scope:h,children:b,...x}=m,g=((N=h==null?void 0:h[e])==null?void 0:N[d])||i,y=p.useMemo(()=>x,Object.values(x));return a.jsx(g.Provider,{value:y,children:b})};u.displayName=s+"Provider";function f(m,h){var g;const b=((g=h==null?void 0:h[e])==null?void 0:g[d])||i,x=p.useContext(b);if(x)return x;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[u,f]}const o=()=>{const s=r.map(l=>p.createContext(l));return function(i){const d=(i==null?void 0:i[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...i,[e]:d}}),[i,d])}};return o.scopeName=e,[n,$s(o,...t)]}function $s(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const l=n.reduce((i,{useScope:d,scopeName:u})=>{const m=d(s)[`__scope${u}`];return{...i,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return r.scopeName=t.scopeName,r}var Be=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},Fs=p[" useId ".trim().toString()]||(()=>{}),Vs=0;function Nt(e){const[t,r]=p.useState(Fs());return Be(()=>{r(n=>n??String(Vs++))},[e]),e||(t?`radix-${t}`:"")}var zs=p[" useInsertionEffect ".trim().toString()]||Be;function Ws({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,s,l]=Bs({defaultProp:t,onChange:r}),i=e!==void 0,d=i?e:o;{const f=p.useRef(e!==void 0);p.useEffect(()=>{const m=f.current;m!==i&&console.warn(`${n} is changing from ${m?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=i},[i,n])}const u=p.useCallback(f=>{var m;if(i){const h=Gs(f)?f(e):f;h!==e&&((m=l.current)==null||m.call(l,h))}else s(f)},[i,e,s,l]);return[d,u]}function Bs({defaultProp:e,onChange:t}){const[r,n]=p.useState(e),o=p.useRef(r),s=p.useRef(t);return zs(()=>{s.current=t},[t]),p.useEffect(()=>{var l;o.current!==r&&((l=s.current)==null||l.call(s,r),o.current=r)},[r,o]),[r,n,s]}function Gs(e){return typeof e=="function"}function Us(e){const t=Ys(e),r=p.forwardRef((n,o)=>{const{children:s,...l}=n,i=p.Children.toArray(s),d=i.find(Hs);if(d){const u=d.props.children,f=i.map(m=>m===d?p.Children.count(u)>1?p.Children.only(null):p.isValidElement(u)?u.props.children:null:m);return a.jsx(t,{...l,ref:o,children:p.isValidElement(u)?p.cloneElement(u,void 0,f):null})}return a.jsx(t,{...l,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function Ys(e){const t=p.forwardRef((r,n)=>{const{children:o,...s}=r;if(p.isValidElement(o)){const l=Xs(o),i=Ks(s,o.props);return o.type!==p.Fragment&&(i.ref=n?qe(n,l):l),p.cloneElement(o,i)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qs=Symbol("radix.slottable");function Hs(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qs}function Ks(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const d=s(...i);return o(...i),d}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function Xs(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Zs=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pe=Zs.reduce((e,t)=>{const r=Us(`Primitive.${t}`),n=p.forwardRef((o,s)=>{const{asChild:l,...i}=o,d=l?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(d,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Js(e,t){e&&to.flushSync(()=>e.dispatchEvent(t))}function Ge(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function qs(e,t=globalThis==null?void 0:globalThis.document){const r=Ge(e);p.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var ea="DismissableLayer",St="dismissableLayer.update",ta="dismissableLayer.pointerDownOutside",ra="dismissableLayer.focusOutside",Vr,zr=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Wr=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:l,onDismiss:i,...d}=e,u=p.useContext(zr),[f,m]=p.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=p.useState({}),x=Ee(t,k=>m(k)),g=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),N=g.indexOf(y),w=f?g.indexOf(f):-1,T=u.layersWithOutsidePointerEventsDisabled.size>0,A=w>=N,_=sa(k=>{const j=k.target,D=[...u.branches].some(P=>P.contains(j));!A||D||(o==null||o(k),l==null||l(k),k.defaultPrevented||i==null||i())},h),z=aa(k=>{const j=k.target;[...u.branches].some(P=>P.contains(j))||(s==null||s(k),l==null||l(k),k.defaultPrevented||i==null||i())},h);return qs(k=>{w===u.layers.size-1&&(n==null||n(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},h),p.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Vr=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Br(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Vr)}},[f,h,r,u]),p.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Br())},[f,u]),p.useEffect(()=>{const k=()=>b({});return document.addEventListener(St,k),()=>document.removeEventListener(St,k)},[]),a.jsx(pe.div,{...d,ref:x,style:{pointerEvents:T?A?"auto":"none":void 0,...e.style},onFocusCapture:ge(e.onFocusCapture,z.onFocusCapture),onBlurCapture:ge(e.onBlurCapture,z.onBlurCapture),onPointerDownCapture:ge(e.onPointerDownCapture,_.onPointerDownCapture)})});Wr.displayName=ea;var na="DismissableLayerBranch",oa=p.forwardRef((e,t)=>{const r=p.useContext(zr),n=p.useRef(null),o=Ee(t,n);return p.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),a.jsx(pe.div,{...e,ref:o})});oa.displayName=na;function sa(e,t=globalThis==null?void 0:globalThis.document){const r=Ge(e),n=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const s=i=>{if(i.target&&!n.current){let d=function(){Gr(ta,r,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);n.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function aa(e,t=globalThis==null?void 0:globalThis.document){const r=Ge(e),n=p.useRef(!1);return p.useEffect(()=>{const o=s=>{s.target&&!n.current&&Gr(ra,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Br(){const e=new CustomEvent(St);document.dispatchEvent(e)}function Gr(e,t,r,{discrete:n}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Js(o,s):o.dispatchEvent(s)}var Ct="focusScope.autoFocusOnMount",Rt="focusScope.autoFocusOnUnmount",Ur={bubbles:!1,cancelable:!0},ia="FocusScope",Yr=p.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...l}=e,[i,d]=p.useState(null),u=Ge(o),f=Ge(s),m=p.useRef(null),h=Ee(t,g=>d(g)),b=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(n){let g=function(T){if(b.paused||!i)return;const A=T.target;i.contains(A)?m.current=A:ve(m.current,{select:!0})},y=function(T){if(b.paused||!i)return;const A=T.relatedTarget;A!==null&&(i.contains(A)||ve(m.current,{select:!0}))},N=function(T){if(document.activeElement===document.body)for(const _ of T)_.removedNodes.length>0&&ve(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",y);const w=new MutationObserver(N);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",y),w.disconnect()}}},[n,i,b.paused]),p.useEffect(()=>{if(i){Kr.add(b);const g=document.activeElement;if(!i.contains(g)){const N=new CustomEvent(Ct,Ur);i.addEventListener(Ct,u),i.dispatchEvent(N),N.defaultPrevented||(la(pa(Qr(i)),{select:!0}),document.activeElement===g&&ve(i))}return()=>{i.removeEventListener(Ct,u),setTimeout(()=>{const N=new CustomEvent(Rt,Ur);i.addEventListener(Rt,f),i.dispatchEvent(N),N.defaultPrevented||ve(g??document.body,{select:!0}),i.removeEventListener(Rt,f),Kr.remove(b)},0)}}},[i,u,f,b]);const x=p.useCallback(g=>{if(!r&&!n||b.paused)return;const y=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,N=document.activeElement;if(y&&N){const w=g.currentTarget,[T,A]=ca(w);T&&A?!g.shiftKey&&N===A?(g.preventDefault(),r&&ve(T,{select:!0})):g.shiftKey&&N===T&&(g.preventDefault(),r&&ve(A,{select:!0})):N===w&&g.preventDefault()}},[r,n,b.paused]);return a.jsx(pe.div,{tabIndex:-1,...l,ref:h,onKeyDown:x})});Yr.displayName=ia;function la(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(ve(n,{select:t}),document.activeElement!==r)return}function ca(e){const t=Qr(e),r=Hr(t,e),n=Hr(t.reverse(),e);return[r,n]}function Qr(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Hr(e,t){for(const r of e)if(!ua(r,{upTo:t}))return r}function ua(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function da(e){return e instanceof HTMLInputElement&&"select"in e}function ve(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&da(e)&&t&&e.select()}}var Kr=fa();function fa(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Xr(e,t),e.unshift(t)},remove(t){var r;e=Xr(e,t),(r=e[0])==null||r.resume()}}}function Xr(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function pa(e){return e.filter(t=>t.tagName!=="A")}var ma="Portal",Zr=p.forwardRef((e,t)=>{var i;const{container:r,...n}=e,[o,s]=p.useState(!1);Be(()=>s(!0),[]);const l=r||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return l?Bt.createPortal(a.jsx(pe.div,{...n,ref:t}),l):null});Zr.displayName=ma;function ha(e,t){return p.useReducer((r,n)=>t[r][n]??r,e)}var tt=e=>{const{present:t,children:r}=e,n=ba(t),o=typeof r=="function"?r({present:n.isPresent}):p.Children.only(r),s=Ee(n.ref,ga(o));return typeof r=="function"||n.isPresent?p.cloneElement(o,{ref:s}):null};tt.displayName="Presence";function ba(e){const[t,r]=p.useState(),n=p.useRef(null),o=p.useRef(e),s=p.useRef("none"),l=e?"mounted":"unmounted",[i,d]=ha(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=rt(n.current);s.current=i==="mounted"?u:"none"},[i]),Be(()=>{const u=n.current,f=o.current;if(f!==e){const h=s.current,b=rt(u);e?d("MOUNT"):b==="none"||(u==null?void 0:u.display)==="none"?d("UNMOUNT"):d(f&&h!==b?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),Be(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,m=b=>{const g=rt(n.current).includes(CSS.escape(b.animationName));if(b.target===t&&g&&(d("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},h=b=>{b.target===t&&(s.current=rt(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:p.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function rt(e){return(e==null?void 0:e.animationName)||"none"}function ga(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Ot=0;function va(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Jr()),document.body.insertAdjacentElement("beforeend",e[1]??Jr()),Ot++,()=>{Ot===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ot--}},[])}function Jr(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ue=function(){return ue=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},ue.apply(this,arguments)};function qr(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function xa(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var nt="right-scroll-bar-position",ot="width-before-scroll-bar",ya="with-scroll-bars-hidden",wa="--removed-body-scroll-bar-size";function At(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ja(e,t){var r=O.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var ka=typeof window<"u"?p.useLayoutEffect:p.useEffect,en=new WeakMap;function Ea(e,t){var r=ja(null,function(n){return e.forEach(function(o){return At(o,n)})});return ka(function(){var n=en.get(r);if(n){var o=new Set(n),s=new Set(e),l=r.current;o.forEach(function(i){s.has(i)||At(i,null)}),s.forEach(function(i){o.has(i)||At(i,l)})}en.set(r,e)},[e]),r}function Na(e){return e}function Sa(e,t){t===void 0&&(t=Na);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var l=t(s,n);return r.push(l),function(){r=r.filter(function(i){return i!==l})}},assignSyncMedium:function(s){for(n=!0;r.length;){var l=r;r=[],l.forEach(s)}r={push:function(i){return s(i)},filter:function(){return r}}},assignMedium:function(s){n=!0;var l=[];if(r.length){var i=r;r=[],i.forEach(s),l=r}var d=function(){var f=l;l=[],f.forEach(s)},u=function(){return Promise.resolve().then(d)};u(),r={push:function(f){l.push(f),u()},filter:function(f){return l=l.filter(f),r}}}};return o}function Ca(e){e===void 0&&(e={});var t=Sa(null);return t.options=ue({async:!0,ssr:!1},e),t}var tn=function(e){var t=e.sideCar,r=qr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return p.createElement(n,ue({},r))};tn.isSideCarExport=!0;function Ra(e,t){return e.useMedium(t),tn}var rn=Ca(),Pt=function(){},st=p.forwardRef(function(e,t){var r=p.useRef(null),n=p.useState({onScrollCapture:Pt,onWheelCapture:Pt,onTouchMoveCapture:Pt}),o=n[0],s=n[1],l=e.forwardProps,i=e.children,d=e.className,u=e.removeScrollBar,f=e.enabled,m=e.shards,h=e.sideCar,b=e.noRelative,x=e.noIsolation,g=e.inert,y=e.allowPinchZoom,N=e.as,w=N===void 0?"div":N,T=e.gapMode,A=qr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=h,z=Ea([r,t]),k=ue(ue({},A),o);return p.createElement(p.Fragment,null,f&&p.createElement(_,{sideCar:rn,removeScrollBar:u,shards:m,noRelative:b,noIsolation:x,inert:g,setCallbacks:s,allowPinchZoom:!!y,lockRef:r,gapMode:T}),l?p.cloneElement(p.Children.only(i),ue(ue({},k),{ref:z})):p.createElement(w,ue({},k,{className:d,ref:z}),i))});st.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},st.classNames={fullWidth:ot,zeroRight:nt};var Oa=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Aa(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Oa();return t&&e.setAttribute("nonce",t),e}function Pa(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ta(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var _a=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Aa())&&(Pa(t,r),Ta(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ma=function(){var e=_a();return function(t,r){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},nn=function(){var e=Ma(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Da={left:0,top:0,right:0,gap:0},Tt=function(e){return parseInt(e||"",10)||0},Ia=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Tt(r),Tt(n),Tt(o)]},La=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Da;var t=Ia(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},$a=nn(),Pe="data-scroll-locked",Fa=function(e,t,r,n){var o=e.left,s=e.top,l=e.right,i=e.gap;return r===void 0&&(r="margin"),`
|
|
31
|
+
<%s key={someKey} {...props} />`,Wt,Ae,ol,Ae),qn[Ae+Wt]=!0}}return c===n?qi(X):Ji(X),X}}function el(c,v,E){return eo(c,v,E,!0)}function tl(c,v,E){return eo(c,v,E,!1)}var rl=tl,nl=el;Ve.Fragment=n,Ve.jsx=rl,Ve.jsxs=nl})()),Ve}var Qt;function oo(){return Qt||(Qt=1,process.env.NODE_ENV==="production"?Qe.exports=ro():Qe.exports=no()),Qe.exports}var a=oo();const Ht=["single-select","multi-select","drop-down","dropdown","text-response","calendar","video-response","voice-response","image-response","document-response","pdf-response","tabular-text-input","tabular-drop-down","tabular-check-box"];function Kt(e){return Ht.includes(e)}function He(e){var t;switch(e.type){case"single-select":case"drop-down":case"dropdown":case"text-response":return"";case"multi-select":return[];case"calendar":case"image-response":case"video-response":case"voice-response":case"document-response":case"pdf-response":return null;case"tabular-text-input":case"tabular-drop-down":return{};case"tabular-check-box":{const r={};return(t=e.tableQuestionValue)==null||t.forEach(n=>{r[n.rowId]=!1}),r}default:return null}}function so(e){const t=e.userAnswer;if(t==null)return He(e);switch(e.type){case"single-select":case"drop-down":case"dropdown":case"text-response":return typeof t=="string"?t:String(t);case"multi-select":return Array.isArray(t)?t.map(String):[];case"calendar":{if(typeof t=="string"){const r=new Date(t);return isNaN(r.getTime())?null:r}return t instanceof Date?t:null}case"tabular-text-input":case"tabular-drop-down":case"tabular-check-box":{if(!Array.isArray(t))return He(e);const r=t,n={};return r.forEach(o=>{n[o.rowId]=o.rowAnswer}),n}case"image-response":case"video-response":case"voice-response":case"document-response":case"pdf-response":return t&&typeof t=="object"&&"fileName"in t&&"binary"in t?t:null;default:return He(e)}}function ao(e){return e.questionId}function Xt(e,t){return Array.isArray(e)?e.includes(t):e===t}function mt(e,t,r=[]){const n=e.map(ao),o=new Set,s=new Set;e.forEach(h=>{Object.values(h.childrenQuestions??{}).forEach(b=>{b.forEach(x=>s.add(x))})}),e.filter(h=>!s.has(h.questionId)).forEach(h=>o.add(h.questionId)),e.forEach(h=>{var g;const b=h.childrenQuestions;if(!b||typeof b!="object")return;const x=(g=t[h.questionId])==null?void 0:g.value;Object.entries(b).forEach(([y,N])=>{Array.isArray(N)&&Xt(x,y)&&N.forEach(w=>{o.add(w),Zt(e,t,w,o)})})});const i=n.filter(h=>o.has(h)),d=n.filter(h=>!o.has(h)),u=new Set(r),f=i.filter(h=>!u.has(h)),m=r.filter(h=>!o.has(h));return{visibleQuestions:i,hiddenQuestions:d,newlyVisible:f,newlyHidden:m}}function Zt(e,t,r,n){var l;const o=e.find(i=>i.questionId===r);if(!(o!=null&&o.childrenQuestions))return;const s=(l=t[r])==null?void 0:l.value;Object.entries(o.childrenQuestions).forEach(([i,d])=>{Array.isArray(d)&&Xt(s,i)&&d.forEach(u=>{n.add(u),Zt(e,t,u,n)})})}function Jt(e,t){const r=new Set(t),n={};return Object.entries(e).forEach(([o,s])=>{r.has(o)||(n[o]=s)}),n}function qt(e,t){if(e==null)return!0;switch(t){case"single-select":case"drop-down":case"text-response":case"calendar":return e==="";case"multi-select":return!Array.isArray(e)||e.length===0;case"image-response":case"video-response":case"voice-response":case"document-response":case"pdf-response":return!(e&&typeof e=="object"&&"binary"in e);case"tabular-text-input":case"tabular-drop-down":case"tabular-check-box":{if(typeof e!="object"||e===null)return!0;const r=e;return Object.keys(r).length===0?!0:t==="tabular-check-box"?!Object.values(r).some(o=>o===!0):Object.values(r).every(o=>o===""||o===null||o===void 0)}default:return e===""||e===null||e===void 0}}function io(e,t){const r=e.textLimitCharacter;if(r==null||r<=0)return null;if(e.type==="text-response"&&typeof t=="string")return t.length>r?`Maximum ${r} characters allowed`:null;if(e.type==="tabular-text-input"&&typeof t=="object"&&t!==null){const n=t;for(const[o,s]of Object.entries(n))if(s!=null&&String(s).length>r)return`Field "${o}" exceeds ${r} characters`}return null}function lo(e,t){if(e.textInputType!=="Numeric")return null;if(e.type==="text-response"){if(t===""||t==null)return null;const r=String(t).trim();return/^\d+$/.test(r)?null:"Please enter numbers only"}if(e.type==="tabular-text-input"&&typeof t=="object"&&t!==null){const r=t;for(const[n,o]of Object.entries(r))if(o!=null&&o!==""){const s=String(o).trim();if(!/^\d+$/.test(s))return`Field "${n}" must contain numbers only`}}return null}function co(e,t){const r=e.minValue!=null?Number(e.minValue):NaN,n=e.maxValue!=null?Number(e.maxValue):NaN;if(isNaN(r)&&isNaN(n))return null;if(e.type==="text-response"&&typeof t=="string"){if(t.trim()==="")return null;const o=Number(t);return isNaN(o)?null:!isNaN(r)&&!isNaN(n)&&(o<r||o>n)?`Value must be between ${r} and ${n}`:!isNaN(r)&&o<r?`Value must be at least ${r}`:!isNaN(n)&&o>n?`Value must be at most ${n}`:null}if(e.type==="tabular-text-input"&&typeof t=="object"&&t!==null){const o=t;for(const[s,l]of Object.entries(o))if(l!=null&&String(l).trim()!==""){const i=Number(l);if(!isNaN(i)){if(!isNaN(r)&&!isNaN(n)&&(i<r||i>n))return`Field "${s}" must be between ${r} and ${n}`;if(!isNaN(r)&&i<r)return`Field "${s}" must be at least ${r}`;if(!isNaN(n)&&i>n)return`Field "${s}" must be at most ${n}`}}}return null}function ht(e,t,r){const n=new Map(e.map(s=>[s.questionId,s])),o=[];return r.forEach(s=>{const l=n.get(s);if(!l)return;const i=t[s];if(l.isMandatory&&qt(i,l.type)){o.push({questionId:s,message:"This question is required"});return}if(qt(i,l.type))return;const d=io(l,i);if(d){o.push({questionId:s,message:d});return}const u=lo(l,i);if(u){o.push({questionId:s,message:u});return}const f=co(l,i);f&&o.push({questionId:s,message:f})}),o}function uo(e,t,r){return ht(e,t,r).length===0}function fo(e){var t;if(e&&typeof e=="object"&&((t=e.constructor)==null?void 0:t.name)==="Date"){const r=e,n=r.getFullYear(),o=String(r.getMonth()+1).padStart(2,"0"),s=String(r.getDate()).padStart(2,"0");return`${n}-${o}-${s}`}if(typeof e=="string"&&e.includes("T"))try{const r=new Date(e);if(!isNaN(r.getTime())){const n=r.getFullYear(),o=String(r.getMonth()+1).padStart(2,"0"),s=String(r.getDate()).padStart(2,"0");return`${n}-${o}-${s}`}}catch{}return e}function po(e,t){if(t==null)return e.type==="multi-select"?[]:"";switch(e.type){case"single-select":case"drop-down":case"text-response":return typeof t=="string"?t:String(t);case"multi-select":return Array.isArray(t)?t.map(String):[];case"calendar":return fo(t);case"image-response":case"video-response":case"voice-response":case"document-response":case"pdf-response":return t&&typeof t=="object"&&"fileName"in t&&"binary"in t,t;case"tabular-text-input":case"tabular-drop-down":case"tabular-check-box":{const r=e.tableQuestionValue??[];if(typeof t!="object"||t===null)return r.map(o=>({rowId:o.rowId,rowQuestion:o.rowQuestion,rowAnswer:""}));const n=t;return r.map(o=>({rowId:o.rowId,rowQuestion:o.rowQuestion,rowAnswer:n[o.rowId]??(e.type==="tabular-check-box"?!1:"")}))}default:return t}}function bt(e,t,r){const n=new Map(e.questionList.map(s=>[s.questionId,s])),o=[];return r.forEach(s=>{const l=t[s],i=n.get(s);if(!i)return;const d=po(i,l);o.push({questionId:s,userAnswer:d})}),{surveyId:e.surveyId,...e.surveyCode!=null&&{surveyCode:e.surveyCode},...e.surveyName!=null&&{surveyName:e.surveyName},...e.type!=null&&{type:e.type},responses:o}}const gt={"image-response":["image/jpeg","image/png"],"video-response":["video/mp4"],"voice-response":["audio/mpeg"],"document-response":["application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/plain","application/json"],"pdf-response":["application/pdf"]},vt={"image-response":20,"video-response":60,"voice-response":20,"document-response":25,"pdf-response":25},Ke=gt,xt=vt,mo=["image-response","video-response","voice-response","document-response","pdf-response"];function er(e){const t={...gt},r={};for(const n of mo){const o=(e==null?void 0:e[n])??(n==="voice-response"?e==null?void 0:e["audio-response"]:void 0),s=(o==null?void 0:o.supportedType)??(o==null?void 0:o.suppotedType);s!=null&&s.length&&(t[n]=s);const l=o==null?void 0:o.supportedSize;if(l!=null&&l>0)r[n]=l*1024*1024;else{const i=vt[n]??10;r[n]=i*1024*1024}}return{allowedTypes:t,maxSizeBytes:r}}function tr(e,t,r){const n=(r==null?void 0:r.allowedTypes[t])??Ke[t];return n!=null&&n.length?n.some(s=>e.type===s||e.type.startsWith(s.split("/")[0]+"/"))?{valid:!0}:{valid:!1,error:`File type ${e.type} is not allowed. Allowed: ${n.join(", ")}`}:{valid:!0}}function rr(e,t,r){const n=(r==null?void 0:r.maxSizeBytes[t])??(xt[t]??10)*1024*1024;return e.size>n?{valid:!1,error:`File size must be less than ${Math.round(n/1048576)}MB`}:{valid:!0}}function nr(e,t,r){const n=tr(e,t,r);return n.valid?rr(e,t,r):n}function or(e){return new Promise((t,r)=>{const n=new FileReader;n.onload=()=>{const o=n.result;if(typeof o!="string"){r(new Error("Failed to read file as base64"));return}const s=o.includes(",")?o.split(",")[1]:o;t({fileName:e.name,fileType:e.type,binary:s})},n.onerror=()=>r(n.error),n.readAsDataURL(e)})}function sr(e,t){const r=e.trim();switch(t){case"Numeric":return/^\d+$/.test(r);case"Alphabet":case"AlphaNumeric":return/^[A-Za-z0-9]+$/.test(r);default:return!0}}function ar(e,t){var r;if(t==null)return!1;switch(e.type){case"single-select":case"dropdown":case"drop-down":case"text-response":return t!==""&&t!==null&&t!==void 0;case"multi-select":return Array.isArray(t)&&t.length>0;case"calendar":return t&&typeof t=="object"&&((r=t.constructor)==null?void 0:r.name)==="Date";case"video-response":case"voice-response":case"image-response":return t&&typeof t=="object"&&"fileName"in t&&"binary"in t||typeof t=="string"&&t!==""||typeof t=="object"&&t!==null&&"devicePath"in t;case"tabular-text-input":case"tabular-drop-down":{if(typeof t!="object")return!1;const n=t,o=e.tableQuestionValue||[];return o.length===0?Object.keys(n).length>0&&Object.values(n).some(s=>s!==""&&s!==null&&s!==void 0):e.isMandatory?o.every(s=>{const l=n[s.rowId];return l!==""&&l!==null&&l!==void 0}):o.some(s=>{const l=n[s.rowId];return l!==""&&l!==null&&l!==void 0})}case"tabular-check-box":{if(typeof t!="object")return!1;const n=t,o=e.tableQuestionValue||[];return o.length===0?Object.values(n).some(s=>s===!0):e.isMandatory?o.some(s=>n[s.rowId]===!0):o.length>0&&Object.keys(n).length>0}default:return!1}}function ho(e,t){if(!ar(e,t))return!e.isMandatory;if(e.type==="tabular-text-input"||e.type==="tabular-drop-down"||e.type==="tabular-check-box"){if(typeof t=="object"&&t!==null){const r=t;if(e.textLimitCharacter){const n=parseInt(e.textLimitCharacter.toString(),10);for(const o of Object.values(r))if(o!=null&&String(o).length>n)return!1}if(e.textInputType){for(const n of Object.values(r))if(n!=null&&!sr(String(n),e.textInputType))return!1}}}else if(e.textLimitCharacter&&t!=null&&String(t).length>parseInt(e.textLimitCharacter.toString(),10)||e.textInputType&&t!=null&&!sr(String(t),e.textInputType))return!1;return!0}function ir(e,t,r,n=!1){const o={},s=new Map(e.map(l=>[l.questionId,l]));for(const l of r){if(n){o[l]="completed";continue}const i=s.get(l);if(!i){o[l]="unanswered";continue}const d=t[l],u=ar(i,d),f=ho(i,d);u&&f?o[l]="completed":u&&!f?o[l]="error":!u&&i.isMandatory?o[l]="required":o[l]="unanswered"}return o}function lr({options:e,selectionMode:t,selectedOptions:r,onOptionSelect:n,className:o="",disabled:s=!1}){const l=d=>{if(t==="single")n(d);else{const u=Array.isArray(r)?r:[];u.includes(d)?n(u.filter(f=>f!==d)):n([...u,d])}},i=d=>t==="single"?r===d:Array.isArray(r)&&r.includes(d);return a.jsx("div",{className:`space-y-3 ${o}`,children:e.map(d=>{const u=i(d.id);return a.jsx("button",{type:"button",onClick:()=>l(d.id),className:`w-full border px-4 py-3 text-left text-sm leading-5 font-normal transition-all border-rounded rounded-xl ${s?"cursor-not-allowed opacity-50":"cursor-pointer"} ${u?"border-primary bg-primary text-white":"border-primary bg-white text-primary hover:bg-primary/5"}`,children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"flex-shrink-0",children:t==="single"?a.jsx("div",{className:`h-4 w-4 rounded-full border-2 transition-all ${u?"border-white bg-white":"border-primary bg-transparent"}`,children:u&&a.jsx("div",{className:"h-full w-full scale-50 rounded-full bg-primary"})}):a.jsx("div",{className:`h-4 w-4 rounded border-2 transition-all ${u?"border-white bg-white":"border-primary bg-transparent"}`,children:u&&a.jsx("svg",{className:"h-full w-full text-primary",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})})}),a.jsx("span",{className:"flex-1",children:d.text})]})},d.id)})})}function cr(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=cr(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ur(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=cr(e))&&(n&&(n+=" "),n+=t);return n}const bo=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},go=(e,t)=>({classGroupId:e,validator:t}),dr=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Xe="-",fr=[],vo="arbitrary..",xo=e=>{const t=wo(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return yo(l);const i=l.split(Xe),d=i[0]===""&&i.length>1?1:0;return pr(i,d,t)},getConflictingClassGroupIds:(l,i)=>{if(i){const d=n[l],u=r[l];return d?u?bo(u,d):d:u||fr}return r[l]||fr}}},pr=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],s=r.nextPart.get(o);if(s){const u=pr(e,t+1,s);if(u)return u}const l=r.validators;if(l===null)return;const i=t===0?e.join(Xe):e.slice(t).join(Xe),d=l.length;for(let u=0;u<d;u++){const f=l[u];if(f.validator(i))return f.classGroupId}},yo=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?vo+n:void 0})(),wo=e=>{const{theme:t,classGroups:r}=e;return jo(r,t)},jo=(e,t)=>{const r=dr();for(const n in e){const o=e[n];yt(o,r,n,t)}return r},yt=(e,t,r,n)=>{const o=e.length;for(let s=0;s<o;s++){const l=e[s];ko(l,t,r,n)}},ko=(e,t,r,n)=>{if(typeof e=="string"){Eo(e,t,r);return}if(typeof e=="function"){No(e,t,r,n);return}So(e,t,r,n)},Eo=(e,t,r)=>{const n=e===""?t:mr(t,e);n.classGroupId=r},No=(e,t,r,n)=>{if(Co(e)){yt(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(go(r,e))},So=(e,t,r,n)=>{const o=Object.entries(e),s=o.length;for(let l=0;l<s;l++){const[i,d]=o[l];yt(d,mr(t,i),r,n)}},mr=(e,t)=>{let r=e;const n=t.split(Xe),o=n.length;for(let s=0;s<o;s++){const l=n[s];let i=r.nextPart.get(l);i||(i=dr(),r.nextPart.set(l,i)),r=i}return r},Co=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Ro=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(s,l)=>{r[s]=l,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(s){let l=r[s];if(l!==void 0)return l;if((l=n[s])!==void 0)return o(s,l),l},set(s,l){s in r?r[s]=l:o(s,l)}}},wt="!",hr=":",Oo=[],br=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),Ao=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const s=[];let l=0,i=0,d=0,u;const f=o.length;for(let g=0;g<f;g++){const y=o[g];if(l===0&&i===0){if(y===hr){s.push(o.slice(d,g)),d=g+1;continue}if(y==="/"){u=g;continue}}y==="["?l++:y==="]"?l--:y==="("?i++:y===")"&&i--}const m=s.length===0?o:o.slice(d);let h=m,b=!1;m.endsWith(wt)?(h=m.slice(0,-1),b=!0):m.startsWith(wt)&&(h=m.slice(1),b=!0);const x=u&&u>d?u-d:void 0;return br(s,b,h,x)};if(t){const o=t+hr,s=n;n=l=>l.startsWith(o)?s(l.slice(o.length)):br(Oo,!1,l,void 0,!0)}if(r){const o=n;n=s=>r({className:s,parseClassName:o})}return n},Po=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let s=0;s<r.length;s++){const l=r[s],i=l[0]==="[",d=t.has(l);i||d?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(l)):o.push(l)}return o.length>0&&(o.sort(),n.push(...o)),n}},To=e=>({cache:Ro(e.cacheSize),parseClassName:Ao(e),sortModifiers:Po(e),...xo(e)}),_o=/\s+/,Mo=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s}=t,l=[],i=e.trim().split(_o);let d="";for(let u=i.length-1;u>=0;u-=1){const f=i[u],{isExternal:m,modifiers:h,hasImportantModifier:b,baseClassName:x,maybePostfixModifierPosition:g}=r(f);if(m){d=f+(d.length>0?" "+d:d);continue}let y=!!g,N=n(y?x.substring(0,g):x);if(!N){if(!y){d=f+(d.length>0?" "+d:d);continue}if(N=n(x),!N){d=f+(d.length>0?" "+d:d);continue}y=!1}const w=h.length===0?"":h.length===1?h[0]:s(h).join(":"),T=b?w+wt:w,A=T+N;if(l.indexOf(A)>-1)continue;l.push(A);const _=o(N,y);for(let z=0;z<_.length;++z){const k=_[z];l.push(T+k)}d=f+(d.length>0?" "+d:d)}return d},Do=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=gr(r))&&(o&&(o+=" "),o+=n);return o},gr=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=gr(e[n]))&&(r&&(r+=" "),r+=t);return r},Io=(e,...t)=>{let r,n,o,s;const l=d=>{const u=t.reduce((f,m)=>m(f),e());return r=To(u),n=r.cache.get,o=r.cache.set,s=i,i(d)},i=d=>{const u=n(d);if(u)return u;const f=Mo(d,r);return o(d,f),f};return s=l,(...d)=>s(Do(...d))},Lo=[],Z=e=>{const t=r=>r[e]||Lo;return t.isThemeGetter=!0,t},vr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,xr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,$o=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Fo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Vo=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,zo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Wo=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Bo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,me=e=>$o.test(e),I=e=>!!e&&!Number.isNaN(Number(e)),he=e=>!!e&&Number.isInteger(Number(e)),jt=e=>e.endsWith("%")&&I(e.slice(0,-1)),fe=e=>Fo.test(e),yr=()=>!0,Go=e=>Vo.test(e)&&!zo.test(e),kt=()=>!1,Uo=e=>Wo.test(e),Yo=e=>Bo.test(e),Qo=e=>!S(e)&&!C(e),Ho=e=>be(e,Sr,kt),S=e=>vr.test(e),je=e=>be(e,Cr,Go),wr=e=>be(e,rs,I),Ko=e=>be(e,Or,yr),Xo=e=>be(e,Rr,kt),jr=e=>be(e,Er,kt),Zo=e=>be(e,Nr,Yo),Ze=e=>be(e,Ar,Uo),C=e=>xr.test(e),ze=e=>ke(e,Cr),Jo=e=>ke(e,Rr),kr=e=>ke(e,Er),qo=e=>ke(e,Sr),es=e=>ke(e,Nr),Je=e=>ke(e,Ar,!0),ts=e=>ke(e,Or,!0),be=(e,t,r)=>{const n=vr.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},ke=(e,t,r=!1)=>{const n=xr.exec(e);return n?n[1]?t(n[1]):r:!1},Er=e=>e==="position"||e==="percentage",Nr=e=>e==="image"||e==="url",Sr=e=>e==="length"||e==="size"||e==="bg-size",Cr=e=>e==="length",rs=e=>e==="number",Rr=e=>e==="family-name",Or=e=>e==="number"||e==="weight",Ar=e=>e==="shadow",ns=Io(()=>{const e=Z("color"),t=Z("font"),r=Z("text"),n=Z("font-weight"),o=Z("tracking"),s=Z("leading"),l=Z("breakpoint"),i=Z("container"),d=Z("spacing"),u=Z("radius"),f=Z("shadow"),m=Z("inset-shadow"),h=Z("text-shadow"),b=Z("drop-shadow"),x=Z("blur"),g=Z("perspective"),y=Z("aspect"),N=Z("ease"),w=Z("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...A(),C,S],z=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],j=()=>[C,S,d],D=()=>[me,"full","auto",...j()],P=()=>[he,"none","subgrid",C,S],W=()=>["auto",{span:["full",he,C,S]},he,C,S],q=()=>[he,"auto",C,S],te=()=>["auto","min","max","fr",C,S],ee=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],J=()=>["start","end","center","stretch","center-safe","end-safe"],re=()=>["auto",...j()],ae=()=>[me,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],xe=()=>[me,"screen","full","dvw","lvw","svw","min","max","fit",...j()],ye=()=>[me,"screen","full","lh","dvh","lvh","svh","min","max","fit",...j()],R=()=>[e,C,S],Ce=()=>[...A(),kr,jr,{position:[C,S]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",qo,Ho,{size:[C,S]}],we=()=>[jt,ze,je],Y=()=>["","none","full",u,C,S],Q=()=>["",I,ze,je],de=()=>["solid","dashed","dotted","double"],ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>[I,jt,kr,jr],Re=()=>["","none",x,C,S],De=()=>["none",I,C,S],Oe=()=>["none",I,C,S],Ue=()=>[I,C,S],Ie=()=>[me,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[fe],breakpoint:[fe],color:[yr],container:[fe],"drop-shadow":[fe],ease:["in","out","in-out"],font:[Qo],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[fe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[fe],shadow:[fe],spacing:["px",I],text:[fe],"text-shadow":[fe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",me,S,C,y]}],container:["container"],columns:[{columns:[I,S,C,i]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:_()}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[he,"auto",C,S]}],basis:[{basis:[me,"full","auto",i,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[I,me,"auto","initial","none",S]}],grow:[{grow:["",I,C,S]}],shrink:[{shrink:["",I,C,S]}],order:[{order:[he,"first","last","none",C,S]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:W()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:W()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...ee(),"normal"]}],"justify-items":[{"justify-items":[...J(),"normal"]}],"justify-self":[{"justify-self":["auto",...J()]}],"align-content":[{content:["normal",...ee()]}],"align-items":[{items:[...J(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...J(),{baseline:["","last"]}]}],"place-content":[{"place-content":ee()}],"place-items":[{"place-items":[...J(),"baseline"]}],"place-self":[{"place-self":["auto",...J()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pbs:[{pbs:j()}],pbe:[{pbe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:re()}],mx:[{mx:re()}],my:[{my:re()}],ms:[{ms:re()}],me:[{me:re()}],mbs:[{mbs:re()}],mbe:[{mbe:re()}],mt:[{mt:re()}],mr:[{mr:re()}],mb:[{mb:re()}],ml:[{ml:re()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:ae()}],"inline-size":[{inline:["auto",...xe()]}],"min-inline-size":[{"min-inline":["auto",...xe()]}],"max-inline-size":[{"max-inline":["none",...xe()]}],"block-size":[{block:["auto",...ye()]}],"min-block-size":[{"min-block":["auto",...ye()]}],"max-block-size":[{"max-block":["none",...ye()]}],w:[{w:[i,"screen",...ae()]}],"min-w":[{"min-w":[i,"screen","none",...ae()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[l]},...ae()]}],h:[{h:["screen","lh",...ae()]}],"min-h":[{"min-h":["screen","lh","none",...ae()]}],"max-h":[{"max-h":["screen","lh",...ae()]}],"font-size":[{text:["base",r,ze,je]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,ts,Ko]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",jt,S]}],"font-family":[{font:[Jo,Xo,t]}],"font-features":[{"font-features":[S]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,C,S]}],"line-clamp":[{"line-clamp":[I,"none",C,wr]}],leading:[{leading:[s,...j()]}],"list-image":[{"list-image":["none",C,S]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",C,S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...de(),"wavy"]}],"text-decoration-thickness":[{decoration:[I,"from-font","auto",C,je]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[I,"auto",C,S]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",C,S]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",C,S]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Ce()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},he,C,S],radial:["",C,S],conic:[he,C,S]},es,Zo]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:we()}],"gradient-via-pos":[{via:we()}],"gradient-to-pos":[{to:we()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-bs":[{"border-bs":Q()}],"border-w-be":[{"border-be":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...de(),"hidden","none"]}],"divide-style":[{divide:[...de(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-bs":[{"border-bs":R()}],"border-color-be":[{"border-be":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...de(),"none","hidden"]}],"outline-offset":[{"outline-offset":[I,C,S]}],"outline-w":[{outline:["",I,ze,je]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",f,Je,Ze]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",m,Je,Ze]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[I,je]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",h,Je,Ze]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[I,C,S]}],"mix-blend":[{"mix-blend":[...ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ce()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[I]}],"mask-image-linear-from-pos":[{"mask-linear-from":U()}],"mask-image-linear-to-pos":[{"mask-linear-to":U()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":U()}],"mask-image-t-to-pos":[{"mask-t-to":U()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":U()}],"mask-image-r-to-pos":[{"mask-r-to":U()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":U()}],"mask-image-b-to-pos":[{"mask-b-to":U()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":U()}],"mask-image-l-to-pos":[{"mask-l-to":U()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":U()}],"mask-image-x-to-pos":[{"mask-x-to":U()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":U()}],"mask-image-y-to-pos":[{"mask-y-to":U()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[C,S]}],"mask-image-radial-from-pos":[{"mask-radial-from":U()}],"mask-image-radial-to-pos":[{"mask-radial-to":U()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[I]}],"mask-image-conic-from-pos":[{"mask-conic-from":U()}],"mask-image-conic-to-pos":[{"mask-conic-to":U()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Ce()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",C,S]}],filter:[{filter:["","none",C,S]}],blur:[{blur:Re()}],brightness:[{brightness:[I,C,S]}],contrast:[{contrast:[I,C,S]}],"drop-shadow":[{"drop-shadow":["","none",b,Je,Ze]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",I,C,S]}],"hue-rotate":[{"hue-rotate":[I,C,S]}],invert:[{invert:["",I,C,S]}],saturate:[{saturate:[I,C,S]}],sepia:[{sepia:["",I,C,S]}],"backdrop-filter":[{"backdrop-filter":["","none",C,S]}],"backdrop-blur":[{"backdrop-blur":Re()}],"backdrop-brightness":[{"backdrop-brightness":[I,C,S]}],"backdrop-contrast":[{"backdrop-contrast":[I,C,S]}],"backdrop-grayscale":[{"backdrop-grayscale":["",I,C,S]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[I,C,S]}],"backdrop-invert":[{"backdrop-invert":["",I,C,S]}],"backdrop-opacity":[{"backdrop-opacity":[I,C,S]}],"backdrop-saturate":[{"backdrop-saturate":[I,C,S]}],"backdrop-sepia":[{"backdrop-sepia":["",I,C,S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",C,S]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[I,"initial",C,S]}],ease:[{ease:["linear","initial",N,C,S]}],delay:[{delay:[I,C,S]}],animate:[{animate:["none",w,C,S]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,C,S]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:De()}],"rotate-x":[{"rotate-x":De()}],"rotate-y":[{"rotate-y":De()}],"rotate-z":[{"rotate-z":De()}],scale:[{scale:Oe()}],"scale-x":[{"scale-x":Oe()}],"scale-y":[{"scale-y":Oe()}],"scale-z":[{"scale-z":Oe()}],"scale-3d":["scale-3d"],skew:[{skew:Ue()}],"skew-x":[{"skew-x":Ue()}],"skew-y":[{"skew-y":Ue()}],transform:[{transform:[C,S,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ie()}],"translate-x":[{"translate-x":Ie()}],"translate-y":[{"translate-y":Ie()}],"translate-z":[{"translate-z":Ie()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",C,S]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mbs":[{"scroll-mbs":j()}],"scroll-mbe":[{"scroll-mbe":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pbs":[{"scroll-pbs":j()}],"scroll-pbe":[{"scroll-pbe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",C,S]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[I,ze,je,wr]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function se(...e){return ns(ur(e))}function os({className:e,...t}){return a.jsx("textarea",{"data-slot":"textarea",className:se("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}function ss({value:e="",onChange:t,placeholder:r="Enter your response...",className:n="",disabled:o=!1,minRows:s=3,maxRows:l=8,characterLimit:i}){const d=h=>{let b=h.target.value;i&&b.length>i&&(b=b.slice(0,i)),t(b)},u=e.length,f=i&&u>=i*.9,m=i&&u>=i;return a.jsxs("div",{className:se("space-y-2",n),children:[a.jsx("div",{className:"relative",children:a.jsx(os,{value:e,onChange:d,placeholder:r,disabled:o,rows:s,className:se("w-full resize-y rounded-lg border border-borderGray !bg-white px-[13px] py-3 text-sm font-normal","focus:border-primary focus:ring-0 focus:outline-none","placeholder:text-textGray","!field-sizing-auto !transition-none","resize-y",o&&"cursor-not-allowed opacity-50"),style:{minHeight:`${s*1.5}rem`,maxHeight:`${l*1.5}rem`,boxSizing:"border-box",overflow:"hidden",borderRadius:"0px",backgroundColor:"white"}})}),i!=null&&a.jsx("div",{className:"flex justify-end",children:a.jsxs("span",{className:se("text-xs transition-colors",m?"text-error":f?"text-warning":"text-textGray"),children:[u,"/",i]})})]})}function as({options:e,value:t,onChange:r,placeholder:n="Select an option",disabled:o=!1,error:s,required:l=!1,className:i=""}){const[d,u]=O.useState(!1),[f,m]=O.useState(-1),h=O.useRef(null),b=e.find(w=>w.value===t),x=(b==null?void 0:b.label)||"";O.useEffect(()=>{function w(T){h.current&&!h.current.contains(T.target)&&(u(!1),m(-1))}return d&&document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[d]),O.useEffect(()=>{function w(T){if(!d)return;const A=e.filter(_=>!_.disabled);switch(T.key){case"ArrowDown":T.preventDefault(),m(_=>_+1>=A.length?0:_+1);break;case"ArrowUp":T.preventDefault(),m(_=>_-1<0?A.length-1:_-1);break;case"Enter":T.preventDefault(),f>=0&&A[f]&&(r(A[f].value),u(!1));break;case"Escape":u(!1),m(-1);break}}return d&&document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[d,f,e,r]);const g=()=>{o||(u(w=>!w),m(-1))},y=w=>{w.disabled||(r(w.value),u(!1),m(-1))},N="relative w-full cursor-pointer border border-rounded rounded-xl border-borderGray bg-white px-3 py-2 pr-10 text-left focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary "+(o?"cursor-not-allowed bg-gray-50 text-gray-400 ":"")+(s?"border-error focus:border-error focus:ring-error ":"");return a.jsxs("div",{className:`relative ${i}`,ref:h,children:[a.jsxs("button",{type:"button",className:N,onClick:g,disabled:o,"aria-haspopup":"listbox","aria-expanded":d,children:[a.jsxs("span",{className:`block truncate ${x?"text-textBlack":"text-textGray"}`,children:[x||n,l&&!x&&a.jsx("span",{className:"ml-1 text-error",children:"*"})]}),a.jsx("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:a.jsx("svg",{className:`h-4 w-4 transition-transform duration-200 ${d?"rotate-180":""} ${o?"text-gray-400":"text-textGray"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]}),s&&a.jsx("p",{className:"mt-1 text-sm text-error",children:s}),d&&a.jsx("div",{className:"absolute z-50 mt-1 max-h-60 w-full overflow-auto rounded-lg border border-borderGray bg-white shadow-lg",role:"listbox",children:e.length===0?a.jsx("div",{className:"px-3 py-2 text-sm text-textGray",children:"No options available"}):e.map(w=>{const A=e.filter(k=>!k.disabled).findIndex(k=>k.value===w.value),_=A===f,z=w.value===t;return a.jsx("div",{className:`cursor-pointer px-3 py-2 text-sm transition-colors ${w.disabled?"cursor-not-allowed bg-gray-50 text-gray-400":_?"bg-primaryLight text-primary":z?"bg-primary text-white":"text-textBlack hover:bg-gray-50"}`,onClick:()=>y(w),onMouseEnter:()=>!w.disabled&&m(A),role:"option","aria-selected":z,children:w.label},w.value)})})]})}function is(e,t){const r=e.trim();switch(t){case"Numeric":return/^\d+$/.test(r);case"Alphabet":case"AlphaNumeric":return/^[A-Za-z0-9]+$/.test(r);default:return!0}}function ls({columns:e,rows:t,inputConfig:r,values:n,onValueChange:o,className:s=""}){const l=u=>{const f=n==null?void 0:n.find(m=>m.rowId===u);return f?f.value:r.type==="checkbox"?!1:""},i="w-full border border-borderGray bg-white px-3 py-2 text-sm leading-5 font-normal transition-all focus:border-primary focus:outline-none",d=u=>{var m;const f=l(u.id);switch(r.type){case"dropdown":return a.jsxs("select",{value:String(f),onChange:h=>o(u.id,h.target.value),className:`${i} cursor-pointer appearance-none bg-white pr-8`,style:{backgroundImage:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23374151' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e")`,backgroundPosition:"right 8px center",backgroundRepeat:"no-repeat",backgroundSize:"16px",borderRadius:"0.75rem"},children:[a.jsx("option",{value:"",children:"Select"}),(m=r.options)==null?void 0:m.map(h=>a.jsx("option",{value:h.id,children:h.text},h.id))]});case"number":return a.jsx("input",{type:"number",value:String(f),onChange:h=>o(u.id,h.target.value),placeholder:r.placeholder,min:r.min,max:r.max,step:r.step,required:r.required,className:i,style:{borderRadius:"0.75rem"}});case"checkbox":return a.jsxs("div",{className:"flex items-center",children:[a.jsx("input",{type:"checkbox",id:`cb-${u.id}`,checked:!!f,onChange:h=>o(u.id,h.target.checked),required:r.required,className:"h-4 w-4 cursor-pointer border border-borderGray text-primary focus:ring-2 focus:ring-primary focus:ring-offset-0"}),r.checkboxLabel&&a.jsx("label",{htmlFor:`cb-${u.id}`,className:"ml-2 cursor-pointer text-sm text-textBlack",children:r.checkboxLabel})]});case"text":default:return a.jsx("input",{type:"text",value:String(f),onChange:h=>{let b=h.target.value;r.maxLength&&b.length>r.maxLength||r.inputType&&b.trim()!==""&&!is(b,r.inputType)||o(u.id,b)},placeholder:r.placeholder,required:r.required,maxLength:r.maxLength,className:i,style:{borderRadius:"0.75rem"}})}};return a.jsxs("div",{className:`overflow-hidden border border-rounded rounded-xl border-borderGray bg-white ${s}`,children:[a.jsx("div",{className:"flex border-b border-borderGray bg-gray-50",children:e.map((u,f)=>a.jsx("div",{className:`flex-1 px-4 py-3 text-left text-sm font-medium text-textBlack ${f!==e.length-1?"border-r border-borderGray":""}`,style:{width:u.width},children:u.title},u.id))}),a.jsx("div",{children:t.map((u,f)=>{var m,h;return a.jsxs("div",{className:f!==t.length-1?"flex border-b border-borderGray":"flex",children:[a.jsx("div",{className:"flex flex-1 items-center border-r border-borderGray px-4 py-3 text-sm text-textBlack",style:{width:(m=e[0])==null?void 0:m.width},children:u.label}),a.jsx("div",{className:"flex flex-1 items-center px-4 py-3",style:{width:(h=e[1])==null?void 0:h.width},children:d(u)})]},u.id)})})]})}function cs(e){return`${["January","February","March","April","May","June","July","August","September","October","November","December"][e.getMonth()]} ${e.getDate()}, ${e.getFullYear()}`}const us=["January","February","March","April","May","June","July","August","September","October","November","December"],ds=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function fs({selectedDate:e,onDateSelect:t,placeholder:r="Select a date",className:n="",disabled:o=!1,minDate:s,maxDate:l}){const[i,d]=O.useState(!1),[u,f]=O.useState(()=>e??new Date),m=O.useRef(null);O.useEffect(()=>{i&&f(e??new Date)},[i]),O.useEffect(()=>{if(!i)return;const P=W=>{m.current&&!m.current.contains(W.target)&&d(!1)};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[i]);const h=P=>{t(P),d(!1)},b=P=>{const W=new Date(u);W.setMonth(parseInt(P,10)),f(W)},x=P=>{const W=new Date(u);W.setFullYear(parseInt(P,10)),f(W)},g=new Date().getFullYear(),y=s?s.getFullYear():g-100,N=l?l.getFullYear():g+100,w=Array.from({length:Math.max(1,N-y+1)},(P,W)=>y+W),T=P=>!!(s&&P<s||l&&P>l),A=u.getFullYear(),_=u.getMonth(),z=new Date(A,_,1).getDay(),k=new Date(A,_+1,0).getDate(),j=z,D=e?cs(e):"";return a.jsxs("div",{ref:m,className:`relative ${n}`.trim(),children:[a.jsxs("button",{type:"button",onClick:()=>!o&&d(P=>!P),className:`flex w-full items-center justify-start border border-borderGray bg-white px-[13px] py-3 text-left text-sm font-normal hover:bg-gray-50 ${D?"text-textBlack":"text-textGray"} ${o?"cursor-not-allowed opacity-50":"cursor-pointer"}`,style:{borderRadius:"0.75rem",backgroundColor:"white"},children:[a.jsx("svg",{className:"mr-2 h-4 w-4 shrink-0 text-textGray",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),D||r]}),i&&a.jsx("div",{className:"absolute z-50 mt-1 w-auto rounded-md border border-borderGray bg-white p-3 shadow-lg",style:{minWidth:"280px"},children:a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsx("select",{value:u.getMonth().toString(),onChange:P=>b(P.target.value),className:"h-8 w-32 rounded border border-borderGray bg-white px-2 text-sm focus:border-primary focus:outline-none",children:us.map((P,W)=>a.jsx("option",{value:W.toString(),children:P},P))}),a.jsx("select",{value:u.getFullYear().toString(),onChange:P=>x(P.target.value),className:"h-8 w-24 rounded border border-borderGray bg-white px-2 text-sm focus:border-primary focus:outline-none",children:w.map(P=>a.jsx("option",{value:P.toString(),children:P},P))})]}),a.jsxs("div",{className:"w-full",children:[a.jsx("div",{className:"grid grid-cols-7 gap-1 text-center text-xs font-medium text-textGray",children:ds.map(P=>a.jsx("div",{children:P},P))}),a.jsxs("div",{className:"mt-1 grid grid-cols-7 gap-1 text-sm",children:[Array.from({length:j},(P,W)=>a.jsx("div",{},`empty-${W}`)),Array.from({length:k},(P,W)=>{const q=W+1,te=new Date(A,_,q),ee=T(te),J=e&&e.getFullYear()===A&&e.getMonth()===_&&e.getDate()===q;return a.jsx("button",{type:"button",disabled:ee,onClick:()=>!ee&&h(te),className:`flex h-8 w-8 items-center justify-center rounded-md transition-colors ${ee?"cursor-not-allowed text-gray-300":"hover:bg-primary/10 hover:text-primary"} ${J?"bg-primary text-white hover:bg-primary hover:text-white":""}`,children:q},q)})]})]})]})})]})}const ps={"image-response":{label:"Image",showPreview:!0},"video-response":{label:"Video",showPreview:!0},"voice-response":{label:"Audio",showPreview:!0},"document-response":{label:"Document",showPreview:!0},"pdf-response":{label:"PDF",showPreview:!0}};function Et({questionType:e}){const t="h-8 w-8 text-primary";return e==="image-response"?a.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}):e==="video-response"?a.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}):e==="document-response"?a.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}):e==="pdf-response"?a.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})}):a.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15.536 8.464a5 5 0 010 7.072m2.828-9.9a9 9 0 010 12.728M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z"})})}function We({questionType:e,value:t,onChange:r,className:n="",disabled:o=!1,mediaConfig:s}){var _,z;const[l,i]=O.useState(!1),[d,u]=O.useState(null),f=O.useRef(null),m=ps[e],h=((_=s==null?void 0:s.allowedTypes[e])==null?void 0:_.join(","))??((z=Ke[e])==null?void 0:z.join(","))??"",b=(s==null?void 0:s.maxSizeBytes[e])!=null?Math.round(s.maxSizeBytes[e]/(1024*1024)):xt[e]??10,x=(s==null?void 0:s.allowedTypes[e])??Ke[e]??[],g=x.length>0?`Supported: ${x.join(", ")} (max ${b}MB)`:`Max size: ${b}MB`,y=async k=>{u(null);const j=nr(k,e,s);if(!j.valid){u(j.error??"Invalid file"),r(null);return}try{const D=await or(k);r(D)}catch{u("Failed to read file"),r(null)}},N=k=>{var D;if(k.preventDefault(),k.stopPropagation(),i(!1),o)return;const j=(D=k.dataTransfer.files)==null?void 0:D[0];j&&y(j)},w=k=>{var D;const j=(D=k.target.files)==null?void 0:D[0];j&&y(j),k.target.value=""},T=()=>{r(null),u(null)};if((t==null?void 0:t.binary)&&t){const k=`data:${t.fileType};base64,${t.binary}`;return a.jsxs("div",{className:`relative border border-rounded rounded-xl border-borderGray bg-white ${n}`,children:[a.jsx("button",{type:"button",onClick:T,disabled:o,className:"absolute -top-3 -right-3 z-10 rounded-full border border-borderGray bg-textGray p-1 text-white transition-all hover:bg-primary hover:text-white disabled:opacity-50","aria-label":"Remove",children:a.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),a.jsxs("div",{className:"p-4",children:[e==="image-response"&&a.jsx("img",{src:k,alt:"Uploaded",className:"max-h-64 w-full object-contain"}),e==="video-response"&&a.jsx("video",{src:k,controls:!0,className:"max-h-64 w-full",children:"Your browser does not support the video tag."}),e==="voice-response"&&a.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[a.jsx(Et,{questionType:"voice-response"}),a.jsx("p",{className:"text-sm font-medium text-textBlack",children:t.fileName}),a.jsx("audio",{src:k,controls:!0,className:"w-full max-w-sm",children:"Your browser does not support the audio tag."})]}),e==="pdf-response"&&a.jsxs("div",{className:"flex flex-col space-y-2",children:[a.jsx("iframe",{src:k,title:"PDF preview",className:"h-96 w-full rounded border border-borderGray bg-white"}),a.jsx("p",{className:"text-sm text-textGray",children:t.fileName})]}),e==="document-response"&&a.jsxs("div",{className:"flex flex-col items-center space-y-3",children:[a.jsx(Et,{questionType:"document-response"}),a.jsx("p",{className:"text-sm font-medium text-textBlack",children:t.fileName}),a.jsx("a",{href:k,target:"_blank",rel:"noopener noreferrer",className:"text-sm font-medium text-primary hover:underline",children:"View / Open file"})]}),m.showPreview&&e!=="voice-response"&&e!=="document-response"&&e!=="pdf-response"&&a.jsx("p",{className:"mt-2 text-sm text-textGray",children:t.fileName})]})]})}return a.jsxs("div",{className:n,children:[a.jsxs("div",{className:`relative border-2 border-rounded rounded-xl border-dashed p-8 text-center transition-all ${l?"border-primary bg-primary/5":"border-borderGray bg-white hover:border-primary hover:bg-primary/5"} ${o?"cursor-not-allowed opacity-50":"cursor-pointer"}`,onDragEnter:k=>{k.preventDefault(),k.stopPropagation(),o||i(!0)},onDragLeave:k=>{k.preventDefault(),k.stopPropagation(),i(!1)},onDragOver:k=>{k.preventDefault(),k.stopPropagation()},onDrop:N,onClick:()=>{var k;return!o&&((k=f.current)==null?void 0:k.click())},children:[a.jsx("input",{ref:f,type:"file",accept:h,onChange:w,disabled:o,className:"hidden","aria-label":`Select ${m.label} file`}),a.jsxs("div",{className:"space-y-4",children:[a.jsx("div",{className:"flex justify-center",children:a.jsx(Et,{questionType:e})}),a.jsxs("div",{children:[a.jsxs("p",{className:"text-sm font-medium text-primary",children:["Tap to Upload ",m.label]}),a.jsxs("p",{className:"mt-1 text-xs text-textGray",children:["or drag and drop your ",m.label.toLowerCase()," here"]})]}),a.jsx("div",{className:"text-xs text-textGray",children:a.jsx("p",{children:g})})]})]}),d&&a.jsx("div",{className:"mt-4 rounded-lg border border-error bg-error/5 p-3",children:a.jsx("p",{className:"text-xs text-error",children:d})})]})}function ms({question:e,value:t,onChange:r,error:n,disabled:o=!1,mediaConfig:s,className:l=""}){return a.jsxs("div",{className:l,children:[a.jsx(We,{questionType:"image-response",value:t,onChange:r,disabled:o,mediaConfig:s}),n&&a.jsx("p",{className:"mt-1 text-sm text-error",children:n})]})}function hs({question:e,value:t,onChange:r,error:n,disabled:o=!1,mediaConfig:s,className:l=""}){return a.jsxs("div",{className:l,children:[a.jsx(We,{questionType:"video-response",value:t,onChange:r,disabled:o,mediaConfig:s}),n&&a.jsx("p",{className:"mt-1 text-sm text-error",children:n})]})}function bs({question:e,value:t,onChange:r,error:n,disabled:o=!1,mediaConfig:s,className:l=""}){return a.jsxs("div",{className:l,children:[a.jsx(We,{questionType:"voice-response",value:t,onChange:r,disabled:o,mediaConfig:s}),n&&a.jsx("p",{className:"mt-1 text-sm text-error",children:n})]})}function gs({question:e,value:t,onChange:r,error:n,disabled:o=!1,mediaConfig:s,className:l=""}){return a.jsxs("div",{className:l,children:[a.jsx(We,{questionType:"document-response",value:t,onChange:r,disabled:o,mediaConfig:s}),n&&a.jsx("p",{className:"mt-1 text-sm text-error",children:n})]})}function vs({question:e,value:t,onChange:r,error:n,disabled:o=!1,mediaConfig:s,className:l=""}){return a.jsxs("div",{className:l,children:[a.jsx(We,{questionType:"pdf-response",value:t,onChange:r,disabled:o,mediaConfig:s}),n&&a.jsx("p",{className:"mt-1 text-sm text-error",children:n})]})}function xs({question:e,value:t,onChange:r,error:n,touched:o=!0,disabled:s=!1,mediaConfig:l,className:i=""}){const d=()=>e.options?e.options.map((b,x)=>{var g;return{value:b,label:((g=e.optionsEN)==null?void 0:g[x])??b,disabled:!1}}):[],u=()=>e.options?e.options.map((b,x)=>{var g;return{id:b,text:((g=e.optionsEN)==null?void 0:g[x])??b}}):[],f=()=>{if(!e.tableHeaderValue||!e.tableQuestionValue)return null;const b=e.tableHeaderValue.map((y,N)=>({id:`col-${N}`,title:y,width:N===0?"60%":"40%"})),x=e.tableQuestionValue.map(y=>({id:y.rowId,label:y.rowQuestion}));let g;switch(e.type){case"tabular-text-input":g={type:"text",placeholder:"Enter text",required:e.isMandatory,maxLength:e.textLimitCharacter?parseInt(e.textLimitCharacter.toString(),10):void 0,inputType:e.textInputType};break;case"tabular-drop-down":{g={type:"dropdown",options:(e.optionsEN??e.options??[]).map(N=>({id:N,text:N})),required:e.isMandatory};break}case"tabular-check-box":g={type:"checkbox",checkboxLabel:"Yes",required:e.isMandatory};break;default:g={type:"text",required:e.isMandatory}}return{columns:b,rows:x,inputConfig:g}},m=()=>!t||typeof t!="object"?[]:Array.isArray(t)?t.map(x=>({rowId:x.rowId,value:x.rowAnswer??""})):Object.entries(t).map(([x,g])=>({rowId:x,value:g})),h=(b,x)=>{r({...t||{},[b]:x})};switch(e.type){case"single-select":return a.jsxs("div",{className:i,children:[a.jsx(lr,{options:u(),selectedOptions:String(t??""),onOptionSelect:b=>r(b),selectionMode:"single",disabled:s}),o&&n&&a.jsx("p",{className:"mt-1 text-sm text-error",children:n})]});case"multi-select":return a.jsxs("div",{className:i,children:[a.jsx(lr,{options:u(),selectedOptions:Array.isArray(t)?t.map(String):[],onOptionSelect:b=>r(b),selectionMode:"multiple",disabled:s}),o&&n&&a.jsx("p",{className:"mt-1 text-sm text-error",children:n})]});case"dropdown":case"drop-down":return a.jsx("div",{className:i,children:a.jsx(as,{options:d(),value:String(t??""),onChange:b=>r(b),placeholder:"Select an option",disabled:s,error:o?n:void 0,required:e.isMandatory})});case"text-response":return a.jsxs("div",{className:i,children:[a.jsx(ss,{value:String(t??""),onChange:b=>r(b),characterLimit:e.textLimitCharacter??void 0,placeholder:"Enter your response...",disabled:s}),o&&n&&a.jsx("p",{className:"mt-1 text-sm text-error",children:n})]});case"calendar":return a.jsxs("div",{className:i,children:[a.jsx(fs,{selectedDate:t instanceof Date?t:void 0,onDateSelect:b=>r(b??null),disabled:s,placeholder:"Select a date"}),o&&n&&a.jsx("p",{className:"mt-1 text-sm text-error",children:n})]});case"image-response":{const b=t&&typeof t=="object"&&"fileName"in t&&"binary"in t?t:null;return a.jsx("div",{className:i,children:a.jsx(ms,{question:e,value:b,onChange:x=>r(x),error:o?n:void 0,disabled:s,mediaConfig:l})})}case"video-response":{const b=t&&typeof t=="object"&&"fileName"in t&&"binary"in t?t:null;return a.jsx("div",{className:i,children:a.jsx(hs,{question:e,value:b,onChange:x=>r(x),error:o?n:void 0,disabled:s,mediaConfig:l})})}case"voice-response":{const b=t&&typeof t=="object"&&"fileName"in t&&"binary"in t?t:null;return a.jsx("div",{className:i,children:a.jsx(bs,{question:e,value:b,onChange:x=>r(x),error:o?n:void 0,disabled:s,mediaConfig:l})})}case"document-response":{const b=t&&typeof t=="object"&&"fileName"in t&&"binary"in t?t:null;return a.jsx("div",{className:i,children:a.jsx(gs,{question:e,value:b,onChange:x=>r(x),error:o?n:void 0,disabled:s,mediaConfig:l})})}case"pdf-response":{const b=t&&typeof t=="object"&&"fileName"in t&&"binary"in t?t:null;return a.jsx("div",{className:i,children:a.jsx(vs,{question:e,value:b,onChange:x=>r(x),error:o?n:void 0,disabled:s,mediaConfig:l})})}case"tabular-text-input":case"tabular-drop-down":case"tabular-check-box":{const b=f();return b?a.jsxs("div",{className:i,children:[a.jsx(ls,{columns:b.columns,rows:b.rows,inputConfig:b.inputConfig,values:m(),onValueChange:h}),o&&n&&a.jsx("p",{className:"mt-1 text-sm text-error",children:n})]}):a.jsx("div",{className:`text-error ${i}`,children:"Invalid tabular question configuration"})}default:return a.jsxs("div",{className:`text-error ${i}`,children:[a.jsxs("p",{children:["Unsupported question type: ",e.type]}),a.jsxs("p",{className:"mt-1 text-sm text-textGray",children:["Question: ",e.description]})]})}}function Pr({question:e,value:t,onChange:r,disabled:n=!1,error:o,validationErrors:s=[],mediaConfig:l,className:i=""}){const d=s.filter(f=>f.questionId===e.questionId),u=o??d.map(f=>f.message).join("; ");return Kt(e.type)?a.jsx(xs,{question:e,value:t,onChange:r,error:u,touched:!0,disabled:n,mediaConfig:l,className:i}):a.jsx("div",{className:i,children:a.jsxs("p",{className:"text-error",children:["Unsupported question type: ",e.type]})})}function ys(e){switch(e){case"completed":return"border-green-200 bg-green-50";case"error":return"border-red-200 bg-red-50";default:return"border-blue-200 bg-gray-50"}}function Tr({questions:e,activeQuestionId:t,onQuestionSelect:r,questionStatusMap:n={},className:o=""}){const s=O.useRef(null),l=O.useRef([]),i=t!=null?e.indexOf(t):-1,d=e.length>1;O.useEffect(()=>{if(i<0||i>=l.current.length)return;const m=l.current[i];m==null||m.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})},[i,t]);const u=O.useCallback(()=>{if(i<=0)return;const m=e[i-1];m&&r(m)},[i,e,r]),f=O.useCallback(()=>{if(i>=e.length-1||i<0)return;const m=e[i+1];m&&r(m)},[i,e,r]);return e.length===0?null:a.jsxs("div",{className:`flex items-center gap-2 overflow-hidden ${o}`.trim(),role:"navigation","aria-label":"Question navigation",children:[d&&a.jsx("button",{type:"button",onClick:u,disabled:i<=0,"aria-label":"Previous question",className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-md border border-borderGray bg-white text-textBlack transition-colors hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50",children:a.jsx("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",clipRule:"evenodd"})})}),a.jsx("div",{ref:s,className:"flex flex-1 gap-2 overflow-x-auto scroll-smooth whitespace-nowrap no-scrollbar py-1",style:{minHeight:0},children:e.map((m,h)=>{const b=m===t,x=n[m],g=ys(x);return a.jsx("button",{ref:y=>{l.current[h]=y},type:"button",onClick:()=>r(m),className:`min-w-[60px] flex-shrink-0 rounded-md border px-3 py-2 text-center text-sm transition-all cursor-pointer ${b?"border-blue-500 ring-2 ring-blue-200 bg-blue-50 text-primary":`${g} text-textBlack hover:border-primary/50`}`,"aria-current":b?"step":void 0,"aria-label":`Question ${m}`,children:m},m)})}),d&&a.jsx("button",{type:"button",onClick:f,disabled:i>=e.length-1,"aria-label":"Next question",className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-md border border-borderGray bg-white text-textBlack transition-colors hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50",children:a.jsx("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"})})})]})}function _r(e,t){const r=e.trim();switch(t){case"Numeric":return/^\d+$/.test(r);case"Alphabet":case"AlphaNumeric":return/^[A-Za-z0-9]+$/.test(r);default:return!0}}function Mr(e,t){var r;if(t==null)return!1;switch(e.type){case"single-select":case"dropdown":case"drop-down":case"text-response":return t!==""&&t!==null&&t!==void 0;case"multi-select":return Array.isArray(t)&&t.length>0;case"calendar":return t&&typeof t=="object"&&((r=t.constructor)==null?void 0:r.name)==="Date";case"video-response":case"voice-response":case"image-response":return t&&typeof t=="object"&&"fileName"in t&&"binary"in t||typeof t=="string"&&t!==""||typeof t=="object"&&t!==null&&"devicePath"in t;case"tabular-text-input":case"tabular-drop-down":{if(typeof t!="object")return!1;const n=t,o=e.tableQuestionValue||[];return o.length===0?Object.keys(n).length>0&&Object.values(n).some(s=>s!==""&&s!==null&&s!==void 0):e.isMandatory?o.every(s=>{const l=n[s.rowId];return l!==""&&l!==null&&l!==void 0}):o.some(s=>{const l=n[s.rowId];return l!==""&&l!==null&&l!==void 0})}case"tabular-check-box":{if(typeof t!="object")return!1;const n=t,o=e.tableQuestionValue||[];return o.length===0?Object.values(n).some(s=>s===!0):e.isMandatory?o.some(s=>n[s.rowId]===!0):o.length>0&&Object.keys(n).length>0}default:return!1}}function ws(e,t){if(!Mr(e,t))return!e.isMandatory;if(e.type==="tabular-text-input"||e.type==="tabular-drop-down"||e.type==="tabular-check-box"){if(typeof t=="object"&&t!==null){const r=t;if(e.textLimitCharacter){const n=parseInt(e.textLimitCharacter.toString(),10);for(const o of Object.values(r))if(o!=null&&String(o).length>n)return!1}if(e.textInputType){for(const n of Object.values(r))if(n!=null&&!_r(String(n),e.textInputType))return!1}}}else{if(e.textLimitCharacter&&t!=null){const r=String(t),n=parseInt(e.textLimitCharacter.toString(),10);if(r.length>n)return!1}if(e.textInputType&&t!=null&&!_r(String(t),e.textInputType))return!1}return!0}function js(e){switch(e){case"completed":return a.jsx("svg",{className:"h-5 w-5 text-green-600",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})});case"error":return a.jsx("svg",{className:"h-5 w-5 text-red-600",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})});case"required":return a.jsx("svg",{className:"h-5 w-5 text-orange-600",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})});default:return a.jsx("div",{className:"h-5 w-5 rounded-full border-2 border-gray-300"})}}function ks(e){switch(e){case"completed":return"border-green-200 bg-green-50";case"error":return"border-red-200 bg-red-50";case"required":return"border-orange-200 bg-orange-50";default:return"border-gray-200 bg-gray-50"}}function Dr({isOpen:e,onClose:t,questions:r,visibleQuestionIds:n,responses:o,currentQuestionIndex:s,onGoToQuestion:l,readOnly:i=!1}){const d=u=>{if(i)return"completed";const f=o[u],m=r.find(x=>x.questionId===u);if(!m)return"unanswered";const h=Mr(m,f),b=ws(m,f);return h&&b?"completed":h&&!b?"error":!h&&m.isMandatory?"required":"unanswered"};return e?a.jsxs(a.Fragment,{children:[a.jsx("div",{role:"presentation",onClick:t,className:"fixed inset-0 z-50 bg-black/50"}),a.jsx("div",{className:"fixed top-0 right-0 z-50 h-full w-full max-w-md overflow-hidden bg-white shadow-2xl",children:a.jsxs("div",{className:"flex h-full flex-col",children:[a.jsx("div",{className:"border-b border-gray-200 p-6",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h2",{className:"text-xl font-semibold text-textBlack",children:"Question Overview"}),a.jsx("button",{type:"button",onClick:t,className:"rounded-lg p-2 transition-colors hover:bg-gray-100","aria-label":"Close",children:a.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),a.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:a.jsx("div",{className:"space-y-3",children:n.map((u,f)=>{const m=r.find(x=>x.questionId===u);if(!m)return null;const h=d(u),b=f===s;return a.jsx("button",{type:"button",onClick:()=>l(f),className:`w-full rounded-lg border-2 p-4 text-left transition-all duration-200 ${b?"border-primary bg-primary/10 shadow-md":`${ks(h)} hover:shadow-md`}`,children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("div",{className:"mt-0.5 flex-shrink-0",children:js(h)}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[a.jsx("span",{className:"text-sm font-medium text-primary",children:m.questionId}),m.isMandatory&&a.jsx("span",{className:"text-xs text-error",children:"*"}),b&&a.jsx("span",{className:"text-xs font-medium text-primary",children:"Current"})]}),a.jsx("p",{className:"truncate text-sm font-medium text-textBlack",children:m.description})]}),a.jsx("div",{className:"flex-shrink-0 text-xs text-textGray",children:f+1})]})},u)})})}),a.jsx("div",{className:"border-t border-gray-200 bg-gray-50 p-6",children:a.jsx("div",{className:"flex items-center justify-between text-sm",children:a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("div",{className:"h-3 w-3 rounded-full bg-green-500"}),a.jsx("span",{className:"text-textGray",children:"Completed"})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("div",{className:"h-3 w-3 rounded-full bg-orange-500"}),a.jsx("span",{className:"text-textGray",children:"Required"})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("div",{className:"h-3 w-3 rounded-full bg-red-500"}),a.jsx("span",{className:"text-textGray",children:"Error"})]})]})})})]})})]}):null}function Ir(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function qe(...e){return t=>{let r=!1;const n=e.map(o=>{const s=Ir(o,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<n.length;o++){const s=n[o];typeof s=="function"?s():Ir(e[o],null)}}}}function Ee(...e){return p.useCallback(qe(...e),e)}var Es=Symbol.for("react.lazy"),et=p[" use ".trim().toString()];function Ns(e){return typeof e=="object"&&e!==null&&"then"in e}function Lr(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Es&&"_payload"in e&&Ns(e._payload)}function Ss(e){const t=Rs(e),r=p.forwardRef((n,o)=>{let{children:s,...l}=n;Lr(s)&&typeof et=="function"&&(s=et(s._payload));const i=p.Children.toArray(s),d=i.find(As);if(d){const u=d.props.children,f=i.map(m=>m===d?p.Children.count(u)>1?p.Children.only(null):p.isValidElement(u)?u.props.children:null:m);return a.jsx(t,{...l,ref:o,children:p.isValidElement(u)?p.cloneElement(u,void 0,f):null})}return a.jsx(t,{...l,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}var Cs=Ss("Slot");function Rs(e){const t=p.forwardRef((r,n)=>{let{children:o,...s}=r;if(Lr(o)&&typeof et=="function"&&(o=et(o._payload)),p.isValidElement(o)){const l=Ts(o),i=Ps(s,o.props);return o.type!==p.Fragment&&(i.ref=n?qe(n,l):l),p.cloneElement(o,i)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Os=Symbol("radix.slottable");function As(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Os}function Ps(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const d=s(...i);return o(...i),d}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function Ts(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const $r=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Fr=ur,_s=((e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Fr(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:s}=t,l=Object.keys(o).map(u=>{const f=r==null?void 0:r[u],m=s==null?void 0:s[u];if(f===null)return null;const h=$r(f)||$r(m);return o[u][h]}),i=r&&Object.entries(r).reduce((u,f)=>{let[m,h]=f;return h===void 0||(u[m]=h),u},{}),d=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:m,className:h,...b}=f;return Object.entries(b).every(x=>{let[g,y]=x;return Array.isArray(y)?y.includes({...s,...i}[g]):{...s,...i}[g]===y})?[...u,m,h]:u},[]);return Fr(e,l,d,r==null?void 0:r.class,r==null?void 0:r.className)})("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[14px] text-[14px] leading-[20px] font-medium transition-all disabled:pointer-events-none disabled:opacity-50 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 aria-invalid:border-destructive hover:opacity-90",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"px-3 py-3",sm:"px-3 py-2",lg:"px-4 py-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),Ms=e=>{switch(e){case"primary":return"bg-primary";case"secondary":return"bg-secondary";case"destructive":return"bg-destructive";case"muted":return"bg-muted";case"error":return"bg-red-500";case"success":return"bg-green-500";case"warning":return"bg-yellow-500";case"white":return"bg-white";case"gray":return"bg-gray-500";case"lightGray":return"bg-[#E5E7EB]";case"borderGray":return"bg-borderGray";default:return`bg-[${e}]`}},Ds=e=>{switch(e){case"white":return"text-white";case"black":return"text-black";case"primary":return"text-primary";case"primary-foreground":return"text-primary-foreground";case"secondary":return"text-secondary";case"muted":return"text-muted-foreground";default:return`text-[${e}]`}};function Ne({className:e,variant:t,size:r,asChild:n=!1,bgColor:o,textColor:s,text:l,prefixIcon:i,suffixIcon:d,children:u,...f}){const m=n?Cs:"button",h=[o&&Ms(o),s&&Ds(s)].filter(Boolean).join(" "),b=h?se("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[14px] text-[14px] leading-[20px] font-medium transition-all disabled:pointer-events-none disabled:opacity-50 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] hover:opacity-90 cursor-pointer",r==="sm"&&"px-3 py-2",r==="lg"&&"px-4 py-4",r==="icon"&&"size-9",(!r||r==="default")&&"px-3 py-3",h,e):se(_s({variant:t,size:r,className:e}));return l||i||d?a.jsxs(m,{"data-slot":"button",className:b,...f,children:[i&&a.jsx("span",{className:"flex h-4 w-4 items-center justify-center",children:i}),l&&a.jsx("span",{className:"flex-1 text-center",children:l}),d&&a.jsx("span",{className:"flex h-4 w-4 items-center justify-center",children:d}),u]}):a.jsx(m,{"data-slot":"button",className:b,...f,children:u})}function ge(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Is(e,t){const r=p.createContext(t),n=s=>{const{children:l,...i}=s,d=p.useMemo(()=>i,Object.values(i));return a.jsx(r.Provider,{value:d,children:l})};n.displayName=e+"Provider";function o(s){const l=p.useContext(r);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,o]}function Ls(e,t=[]){let r=[];function n(s,l){const i=p.createContext(l),d=r.length;r=[...r,l];const u=m=>{var N;const{scope:h,children:b,...x}=m,g=((N=h==null?void 0:h[e])==null?void 0:N[d])||i,y=p.useMemo(()=>x,Object.values(x));return a.jsx(g.Provider,{value:y,children:b})};u.displayName=s+"Provider";function f(m,h){var g;const b=((g=h==null?void 0:h[e])==null?void 0:g[d])||i,x=p.useContext(b);if(x)return x;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[u,f]}const o=()=>{const s=r.map(l=>p.createContext(l));return function(i){const d=(i==null?void 0:i[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...i,[e]:d}}),[i,d])}};return o.scopeName=e,[n,$s(o,...t)]}function $s(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const l=n.reduce((i,{useScope:d,scopeName:u})=>{const m=d(s)[`__scope${u}`];return{...i,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return r.scopeName=t.scopeName,r}var Be=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},Fs=p[" useId ".trim().toString()]||(()=>{}),Vs=0;function Nt(e){const[t,r]=p.useState(Fs());return Be(()=>{r(n=>n??String(Vs++))},[e]),e||(t?`radix-${t}`:"")}var zs=p[" useInsertionEffect ".trim().toString()]||Be;function Ws({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,s,l]=Bs({defaultProp:t,onChange:r}),i=e!==void 0,d=i?e:o;{const f=p.useRef(e!==void 0);p.useEffect(()=>{const m=f.current;m!==i&&console.warn(`${n} is changing from ${m?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=i},[i,n])}const u=p.useCallback(f=>{var m;if(i){const h=Gs(f)?f(e):f;h!==e&&((m=l.current)==null||m.call(l,h))}else s(f)},[i,e,s,l]);return[d,u]}function Bs({defaultProp:e,onChange:t}){const[r,n]=p.useState(e),o=p.useRef(r),s=p.useRef(t);return zs(()=>{s.current=t},[t]),p.useEffect(()=>{var l;o.current!==r&&((l=s.current)==null||l.call(s,r),o.current=r)},[r,o]),[r,n,s]}function Gs(e){return typeof e=="function"}function Us(e){const t=Ys(e),r=p.forwardRef((n,o)=>{const{children:s,...l}=n,i=p.Children.toArray(s),d=i.find(Hs);if(d){const u=d.props.children,f=i.map(m=>m===d?p.Children.count(u)>1?p.Children.only(null):p.isValidElement(u)?u.props.children:null:m);return a.jsx(t,{...l,ref:o,children:p.isValidElement(u)?p.cloneElement(u,void 0,f):null})}return a.jsx(t,{...l,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function Ys(e){const t=p.forwardRef((r,n)=>{const{children:o,...s}=r;if(p.isValidElement(o)){const l=Xs(o),i=Ks(s,o.props);return o.type!==p.Fragment&&(i.ref=n?qe(n,l):l),p.cloneElement(o,i)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qs=Symbol("radix.slottable");function Hs(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qs}function Ks(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const d=s(...i);return o(...i),d}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function Xs(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Zs=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pe=Zs.reduce((e,t)=>{const r=Us(`Primitive.${t}`),n=p.forwardRef((o,s)=>{const{asChild:l,...i}=o,d=l?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(d,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Js(e,t){e&&to.flushSync(()=>e.dispatchEvent(t))}function Ge(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function qs(e,t=globalThis==null?void 0:globalThis.document){const r=Ge(e);p.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var ea="DismissableLayer",St="dismissableLayer.update",ta="dismissableLayer.pointerDownOutside",ra="dismissableLayer.focusOutside",Vr,zr=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Wr=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:l,onDismiss:i,...d}=e,u=p.useContext(zr),[f,m]=p.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=p.useState({}),x=Ee(t,k=>m(k)),g=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),N=g.indexOf(y),w=f?g.indexOf(f):-1,T=u.layersWithOutsidePointerEventsDisabled.size>0,A=w>=N,_=sa(k=>{const j=k.target,D=[...u.branches].some(P=>P.contains(j));!A||D||(o==null||o(k),l==null||l(k),k.defaultPrevented||i==null||i())},h),z=aa(k=>{const j=k.target;[...u.branches].some(P=>P.contains(j))||(s==null||s(k),l==null||l(k),k.defaultPrevented||i==null||i())},h);return qs(k=>{w===u.layers.size-1&&(n==null||n(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},h),p.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Vr=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Br(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Vr)}},[f,h,r,u]),p.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Br())},[f,u]),p.useEffect(()=>{const k=()=>b({});return document.addEventListener(St,k),()=>document.removeEventListener(St,k)},[]),a.jsx(pe.div,{...d,ref:x,style:{pointerEvents:T?A?"auto":"none":void 0,...e.style},onFocusCapture:ge(e.onFocusCapture,z.onFocusCapture),onBlurCapture:ge(e.onBlurCapture,z.onBlurCapture),onPointerDownCapture:ge(e.onPointerDownCapture,_.onPointerDownCapture)})});Wr.displayName=ea;var na="DismissableLayerBranch",oa=p.forwardRef((e,t)=>{const r=p.useContext(zr),n=p.useRef(null),o=Ee(t,n);return p.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),a.jsx(pe.div,{...e,ref:o})});oa.displayName=na;function sa(e,t=globalThis==null?void 0:globalThis.document){const r=Ge(e),n=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const s=i=>{if(i.target&&!n.current){let d=function(){Gr(ta,r,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);n.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function aa(e,t=globalThis==null?void 0:globalThis.document){const r=Ge(e),n=p.useRef(!1);return p.useEffect(()=>{const o=s=>{s.target&&!n.current&&Gr(ra,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Br(){const e=new CustomEvent(St);document.dispatchEvent(e)}function Gr(e,t,r,{discrete:n}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Js(o,s):o.dispatchEvent(s)}var Ct="focusScope.autoFocusOnMount",Rt="focusScope.autoFocusOnUnmount",Ur={bubbles:!1,cancelable:!0},ia="FocusScope",Yr=p.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...l}=e,[i,d]=p.useState(null),u=Ge(o),f=Ge(s),m=p.useRef(null),h=Ee(t,g=>d(g)),b=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(n){let g=function(T){if(b.paused||!i)return;const A=T.target;i.contains(A)?m.current=A:ve(m.current,{select:!0})},y=function(T){if(b.paused||!i)return;const A=T.relatedTarget;A!==null&&(i.contains(A)||ve(m.current,{select:!0}))},N=function(T){if(document.activeElement===document.body)for(const _ of T)_.removedNodes.length>0&&ve(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",y);const w=new MutationObserver(N);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",y),w.disconnect()}}},[n,i,b.paused]),p.useEffect(()=>{if(i){Kr.add(b);const g=document.activeElement;if(!i.contains(g)){const N=new CustomEvent(Ct,Ur);i.addEventListener(Ct,u),i.dispatchEvent(N),N.defaultPrevented||(la(pa(Qr(i)),{select:!0}),document.activeElement===g&&ve(i))}return()=>{i.removeEventListener(Ct,u),setTimeout(()=>{const N=new CustomEvent(Rt,Ur);i.addEventListener(Rt,f),i.dispatchEvent(N),N.defaultPrevented||ve(g??document.body,{select:!0}),i.removeEventListener(Rt,f),Kr.remove(b)},0)}}},[i,u,f,b]);const x=p.useCallback(g=>{if(!r&&!n||b.paused)return;const y=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,N=document.activeElement;if(y&&N){const w=g.currentTarget,[T,A]=ca(w);T&&A?!g.shiftKey&&N===A?(g.preventDefault(),r&&ve(T,{select:!0})):g.shiftKey&&N===T&&(g.preventDefault(),r&&ve(A,{select:!0})):N===w&&g.preventDefault()}},[r,n,b.paused]);return a.jsx(pe.div,{tabIndex:-1,...l,ref:h,onKeyDown:x})});Yr.displayName=ia;function la(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(ve(n,{select:t}),document.activeElement!==r)return}function ca(e){const t=Qr(e),r=Hr(t,e),n=Hr(t.reverse(),e);return[r,n]}function Qr(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Hr(e,t){for(const r of e)if(!ua(r,{upTo:t}))return r}function ua(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function da(e){return e instanceof HTMLInputElement&&"select"in e}function ve(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&da(e)&&t&&e.select()}}var Kr=fa();function fa(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Xr(e,t),e.unshift(t)},remove(t){var r;e=Xr(e,t),(r=e[0])==null||r.resume()}}}function Xr(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function pa(e){return e.filter(t=>t.tagName!=="A")}var ma="Portal",Zr=p.forwardRef((e,t)=>{var i;const{container:r,...n}=e,[o,s]=p.useState(!1);Be(()=>s(!0),[]);const l=r||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return l?Bt.createPortal(a.jsx(pe.div,{...n,ref:t}),l):null});Zr.displayName=ma;function ha(e,t){return p.useReducer((r,n)=>t[r][n]??r,e)}var tt=e=>{const{present:t,children:r}=e,n=ba(t),o=typeof r=="function"?r({present:n.isPresent}):p.Children.only(r),s=Ee(n.ref,ga(o));return typeof r=="function"||n.isPresent?p.cloneElement(o,{ref:s}):null};tt.displayName="Presence";function ba(e){const[t,r]=p.useState(),n=p.useRef(null),o=p.useRef(e),s=p.useRef("none"),l=e?"mounted":"unmounted",[i,d]=ha(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=rt(n.current);s.current=i==="mounted"?u:"none"},[i]),Be(()=>{const u=n.current,f=o.current;if(f!==e){const h=s.current,b=rt(u);e?d("MOUNT"):b==="none"||(u==null?void 0:u.display)==="none"?d("UNMOUNT"):d(f&&h!==b?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),Be(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,m=b=>{const g=rt(n.current).includes(CSS.escape(b.animationName));if(b.target===t&&g&&(d("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},h=b=>{b.target===t&&(s.current=rt(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:p.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function rt(e){return(e==null?void 0:e.animationName)||"none"}function ga(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Ot=0;function va(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Jr()),document.body.insertAdjacentElement("beforeend",e[1]??Jr()),Ot++,()=>{Ot===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ot--}},[])}function Jr(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ue=function(){return ue=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},ue.apply(this,arguments)};function qr(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function xa(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var nt="right-scroll-bar-position",ot="width-before-scroll-bar",ya="with-scroll-bars-hidden",wa="--removed-body-scroll-bar-size";function At(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ja(e,t){var r=O.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var ka=typeof window<"u"?p.useLayoutEffect:p.useEffect,en=new WeakMap;function Ea(e,t){var r=ja(null,function(n){return e.forEach(function(o){return At(o,n)})});return ka(function(){var n=en.get(r);if(n){var o=new Set(n),s=new Set(e),l=r.current;o.forEach(function(i){s.has(i)||At(i,null)}),s.forEach(function(i){o.has(i)||At(i,l)})}en.set(r,e)},[e]),r}function Na(e){return e}function Sa(e,t){t===void 0&&(t=Na);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var l=t(s,n);return r.push(l),function(){r=r.filter(function(i){return i!==l})}},assignSyncMedium:function(s){for(n=!0;r.length;){var l=r;r=[],l.forEach(s)}r={push:function(i){return s(i)},filter:function(){return r}}},assignMedium:function(s){n=!0;var l=[];if(r.length){var i=r;r=[],i.forEach(s),l=r}var d=function(){var f=l;l=[],f.forEach(s)},u=function(){return Promise.resolve().then(d)};u(),r={push:function(f){l.push(f),u()},filter:function(f){return l=l.filter(f),r}}}};return o}function Ca(e){e===void 0&&(e={});var t=Sa(null);return t.options=ue({async:!0,ssr:!1},e),t}var tn=function(e){var t=e.sideCar,r=qr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return p.createElement(n,ue({},r))};tn.isSideCarExport=!0;function Ra(e,t){return e.useMedium(t),tn}var rn=Ca(),Pt=function(){},st=p.forwardRef(function(e,t){var r=p.useRef(null),n=p.useState({onScrollCapture:Pt,onWheelCapture:Pt,onTouchMoveCapture:Pt}),o=n[0],s=n[1],l=e.forwardProps,i=e.children,d=e.className,u=e.removeScrollBar,f=e.enabled,m=e.shards,h=e.sideCar,b=e.noRelative,x=e.noIsolation,g=e.inert,y=e.allowPinchZoom,N=e.as,w=N===void 0?"div":N,T=e.gapMode,A=qr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=h,z=Ea([r,t]),k=ue(ue({},A),o);return p.createElement(p.Fragment,null,f&&p.createElement(_,{sideCar:rn,removeScrollBar:u,shards:m,noRelative:b,noIsolation:x,inert:g,setCallbacks:s,allowPinchZoom:!!y,lockRef:r,gapMode:T}),l?p.cloneElement(p.Children.only(i),ue(ue({},k),{ref:z})):p.createElement(w,ue({},k,{className:d,ref:z}),i))});st.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},st.classNames={fullWidth:ot,zeroRight:nt};var Oa=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Aa(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Oa();return t&&e.setAttribute("nonce",t),e}function Pa(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ta(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var _a=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Aa())&&(Pa(t,r),Ta(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ma=function(){var e=_a();return function(t,r){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},nn=function(){var e=Ma(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Da={left:0,top:0,right:0,gap:0},Tt=function(e){return parseInt(e||"",10)||0},Ia=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Tt(r),Tt(n),Tt(o)]},La=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Da;var t=Ia(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},$a=nn(),Pe="data-scroll-locked",Fa=function(e,t,r,n){var o=e.left,s=e.top,l=e.right,i=e.gap;return r===void 0&&(r="margin"),`
|
|
32
32
|
.`.concat(ya,` {
|
|
33
33
|
overflow: hidden `).concat(n,`;
|
|
34
34
|
padding-right: `).concat(i,"px ").concat(n,`;
|
|
@@ -97,5 +97,5 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
97
97
|
*
|
|
98
98
|
* This source code is licensed under the ISC license.
|
|
99
99
|
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/const Mi=_i("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Pn({...e}){return a.jsx(wi,{"data-slot":"dialog",...e})}function Di({...e}){return a.jsx(ji,{"data-slot":"dialog-portal",...e})}function Ii({className:e,...t}){return a.jsx(ki,{"data-slot":"dialog-overlay",className:se("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...t})}function Tn({className:e,children:t,showCloseButton:r=!0,...n}){return a.jsxs(Di,{"data-slot":"dialog-portal",children:[a.jsx(Ii,{}),a.jsxs(Ei,{"data-slot":"dialog-content",className:se("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-4 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",e),...n,children:[t,r&&a.jsxs(Ci,{"data-slot":"dialog-close",className:"absolute top-4 right-4 cursor-pointer rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[a.jsx(Mi,{}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function _n({className:e,...t}){return a.jsx("div",{"data-slot":"dialog-header",className:se("flex flex-col gap-2 text-center sm:text-left",e),...t})}function Mn({className:e,...t}){return a.jsx("div",{"data-slot":"dialog-footer",className:se("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function Dn({className:e,...t}){return a.jsx(Ni,{"data-slot":"dialog-title",className:se("text-lg leading-none font-semibold",e),...t})}function In({className:e,...t}){return a.jsx(Si,{"data-slot":"dialog-description",className:se("text-sm text-muted-foreground",e),...t})}function Ln({open:e,onOpenChange:t,missingQuestionIds:r,errors:n=[],onOk:o}){return a.jsx(Pn,{open:e,onOpenChange:t,children:a.jsxs(Tn,{showCloseButton:!0,className:"max-w-md",children:[a.jsx(_n,{children:a.jsx(Dn,{id:"validation-dialog-title",children:"Survey Incomplete"})}),a.jsxs(In,{children:["Please fill all the required questions before submitting the survey.",a.jsx("br",{}),"Click OK to see which questions are still pending."]}),a.jsx(Mn,{children:a.jsx("div",{className:"flex w-full gap-3",children:a.jsx(Ne,{onClick:o,bgColor:"primary",textColor:"white",text:"OK",className:"flex-1"})})})]})})}function $n({open:e,onOpenChange:t,onConfirm:r,onCancel:n,readOnly:o=!1}){return a.jsx(Pn,{open:e,onOpenChange:t,children:a.jsxs(Tn,{showCloseButton:!0,className:"max-w-md",children:[a.jsx(_n,{children:a.jsx(Dn,{id:"exit-dialog-title",children:"Exit Survey?"})}),a.jsx(In,{children:o?"Are you sure you want to exit the survey?":"Are you sure you want to exit? Your progress will be lost."}),a.jsxs(Mn,{className:"flex gap-2 p-4",children:[a.jsx(Ne,{variant:"outline",onClick:n,className:"flex-1 border border-borderGray",children:"Cancel"}),a.jsx(Ne,{onClick:r,className:"flex-1",children:"Yes, Exit"})]})]})})}function Fn({show:e}){return e?a.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/40",role:"status","aria-live":"polite","aria-busy":"true",children:a.jsxs("div",{className:"flex flex-col items-center gap-4 rounded-lg bg-white p-6 shadow-xl",children:[a.jsx("div",{className:"h-10 w-10 animate-spin rounded-full border-2 border-primary border-t-transparent","aria-hidden":!0}),a.jsx("p",{className:"text-sm font-medium text-textBlack",children:"Submitting..."})]})}):null}function Vn({data:e,onSubmit:t,onSave:r,onExit:n,isSubmitting:o=!1,className:s="",showHeader:l=!0}){const i=e.questionList,[d,u]=O.useState(()=>{const L={};return i.forEach(H=>{L[H.questionId]=so(H)}),L}),[f,m]=O.useState(()=>{const{visibleQuestions:L}=mt(i,{},[]);return L}),[h,b]=O.useState(0),[x,g]=O.useState(!1),[y,N]=O.useState(!1),[w,T]=O.useState(!1),[A,_]=O.useState([]),z=O.useMemo(()=>er(e.config),[e.config]),k=O.useMemo(()=>ir(i,d,f),[i,d,f]),j=O.useMemo(()=>{const L={};return Object.entries(d).forEach(([H,we])=>{L[H]={value:we}}),L},[d]);O.useEffect(()=>{const{visibleQuestions:L,newlyHidden:H}=mt(i,j,f);!(L.length!==f.length||L.some((Y,Q)=>Y!==f[Q]))&&H.length===0||(m(L),b(Y=>Math.min(Y,Math.max(0,L.length-1))),H.length>0&&u(Y=>{const Q=Object.fromEntries(Object.entries(Y).map(([ce,U])=>[ce,{value:U}])),de=Jt(Q,H);return Object.fromEntries(Object.entries(de).map(([ce,U])=>[ce,U.value]))}))},[j,i,f]);const D=f[h],P=i.find(L=>L.questionId===D),W=f.length,q=O.useCallback(L=>{D&&u(H=>({...H,[D]:L}))},[D]),te=O.useCallback(()=>{h<W-1&&b(L=>L+1)},[h,W]),ee=O.useCallback(()=>{h>0&&b(L=>L-1)},[h]),J=O.useCallback(L=>{L>=0&&L<W&&(b(L),g(!1))},[W]),re=O.useCallback(L=>{const H=f.indexOf(L);H>=0&&J(H)},[f,J]),ae=O.useCallback(()=>{const L=ht(i,d,f);if(L.length>0){_(L),N(!0);return}const H=bt(e,d,f);t(H)},[e,i,d,f,t]),xe=O.useCallback(()=>{N(!1),g(!0)},[]),ye=O.useCallback(()=>{T(!0)},[]),R=O.useCallback(()=>{T(!1);const L=bt(e,d,f);r==null||r(L),n==null||n()},[e,d,f,r,n]),Ce=h===W-1;return P?a.jsxs("div",{className:`min-h-screen bg-gray-50 rounded-lg bg-white shadow-sm ${s}`,children:[l&&a.jsx("header",{className:"sticky top-0 z-40 border-b border-borderGray bg-primaryLight/50",children:a.jsx("div",{className:"",children:a.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[a.jsx("h2",{className:"text-xl font-medium text-primaryDark",children:e.surveyName}),a.jsx("div",{className:"flex items-center gap-4",children:n&&a.jsx(Ne,{type:"button",variant:"ghost",size:"icon",onClick:ye,className:"text-textGray hover:bg-gray-100 hover:text-textBlack",title:"Exit Survey","aria-label":"Exit survey",children:"✕"})})]})})}),a.jsx("div",{className:"bg-white px-4 py-2 shadow-sm",children:a.jsx("div",{className:"",children:a.jsx(Tr,{questions:f,activeQuestionId:D,onQuestionSelect:re,questionStatusMap:k})})}),a.jsxs("main",{className:" flex flex-col",style:{minHeight:"calc(100vh - 130px)"},children:[a.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden p-4",children:a.jsx("div",{className:"relative flex-1 overflow-hidden",children:a.jsx("div",{className:"absolute inset-0 overflow-y-auto",children:a.jsxs("div",{className:"min-h-full p-4",children:[a.jsx("div",{className:"mb-3",children:a.jsx("span",{className:"rounded-full bg-primary/10 px-3 py-1 text-md font-medium text-primary",children:P.questionId})}),a.jsxs("h2",{className:"text-lg leading-relaxed font-medium text-textBlack",children:[P.description,P.isMandatory&&a.jsx("span",{className:"ml-1 text-error",children:"*"})]}),P.textLimitCharacter!=null&&a.jsxs("p",{className:"mt-2 text-xs text-textGray",children:["Maximum ",P.textLimitCharacter," characters"]}),P.textInputType==="Numeric"&&a.jsx("p",{className:"mt-2 text-xs text-textGray",children:"Please enter numeric value only (e.g. 1, 2, 3)"}),a.jsx("div",{className:"mt-6 flex max-w-4xl flex-1 flex-col justify-center",children:a.jsx(Pr,{question:P,value:d[D],onChange:q,validationErrors:A,mediaConfig:z})})]},D)})})}),a.jsx("footer",{className:"flex-shrink-0 p-4 border-t border-borderGray",children:a.jsxs("div",{className:"flex justify-center gap-3 md:justify-end",children:[a.jsx(Ne,{type:"button",variant:"outline",onClick:ee,disabled:h===0,className:"min-w-[140px] text-md font-semibold",prefixIcon:a.jsx("svg",{className:"h-5 w-5 transition-transform duration-200 group-hover:-translate-x-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),children:"Previous"}),Ce?a.jsx(Ne,{type:"button",onClick:ae,className:"min-w-[140px] text-md font-semibold",suffixIcon:a.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),text:"Submit"}):a.jsx(Ne,{type:"button",onClick:te,className:"min-w-[140px] text-md font-semibold",suffixIcon:a.jsx("svg",{className:"h-5 w-5 transition-transform duration-200 group-hover:translate-x-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),text:"Next"})]})})]}),a.jsx(Dr,{isOpen:x,onClose:()=>g(!1),questions:i,visibleQuestionIds:f,responses:d,currentQuestionIndex:h,onGoToQuestion:J}),a.jsx(Ln,{open:y,onOpenChange:N,missingQuestionIds:A.map(L=>L.questionId),errors:A,onOk:xe}),a.jsx($n,{open:w,onOpenChange:T,onConfirm:R,onCancel:()=>T(!1)}),a.jsx(Fn,{show:o})]}):a.jsx("div",{className:"flex min-h-screen items-center justify-center",children:a.jsx("p",{className:"text-textGray",children:"Loading survey..."})})}function Li({data:e,onSubmit:t,onSave:r,onExit:n,isSubmitting:o=!1,className:s="",showHeader:l=!0}){return a.jsx(Vn,{data:e,onSubmit:t,onSave:r,onExit:n,isSubmitting:o,className:s,showHeader:l})}V.DEFAULT_MEDIA_ALLOWED_TYPES=gt,V.DEFAULT_MEDIA_MAX_SIZE_MB=vt,V.ExitConfirmationDialog=$n,V.MEDIA_ALLOWED_TYPES=Ke,V.MEDIA_MAX_SIZE_MB=xt,V.QuestionListCarousel=Tr,V.QuestionOverviewPanel=Dr,V.QuestionRenderer=Pr,V.SUPPORTED_QUESTION_TYPES=Ht,V.SubmissionLoadingOverlay=Fn,V.SurveyContainer=Vn,V.SurveyRenderer=Li,V.ValidationDialog=Ln,V.calculateVisibility=mt,V.canSubmit=uo,V.clearHiddenResponses=Jt,V.fileToFileObject=or,V.formatResponses=bt,V.getDefaultValue=He,V.getEffectiveMediaConfig=er,V.getQuestionStatusMap=ir,V.isSupportedQuestionType=Kt,V.validateFile=nr,V.validateFileSize=rr,V.validateFileType=tr,V.validateResponses=ht,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})}));
|
|
100
|
+
*/const Mi=_i("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Pn({...e}){return a.jsx(wi,{"data-slot":"dialog",...e})}function Di({...e}){return a.jsx(ji,{"data-slot":"dialog-portal",...e})}function Ii({className:e,...t}){return a.jsx(ki,{"data-slot":"dialog-overlay",className:se("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...t})}function Tn({className:e,children:t,showCloseButton:r=!0,...n}){return a.jsxs(Di,{"data-slot":"dialog-portal",children:[a.jsx(Ii,{}),a.jsxs(Ei,{"data-slot":"dialog-content",className:se("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-4 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",e),...n,children:[t,r&&a.jsxs(Ci,{"data-slot":"dialog-close",className:"absolute top-4 right-4 cursor-pointer rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[a.jsx(Mi,{}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function _n({className:e,...t}){return a.jsx("div",{"data-slot":"dialog-header",className:se("flex flex-col gap-2 text-center sm:text-left",e),...t})}function Mn({className:e,...t}){return a.jsx("div",{"data-slot":"dialog-footer",className:se("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function Dn({className:e,...t}){return a.jsx(Ni,{"data-slot":"dialog-title",className:se("text-lg leading-none font-semibold",e),...t})}function In({className:e,...t}){return a.jsx(Si,{"data-slot":"dialog-description",className:se("text-sm text-muted-foreground",e),...t})}function Ln({open:e,onOpenChange:t,missingQuestionIds:r,errors:n=[],onOk:o}){return a.jsx(Pn,{open:e,onOpenChange:t,children:a.jsxs(Tn,{showCloseButton:!0,className:"max-w-md",children:[a.jsx(_n,{children:a.jsx(Dn,{id:"validation-dialog-title",children:"Survey Incomplete"})}),a.jsxs(In,{children:["Please fill all the required questions before submitting the survey.",a.jsx("br",{}),"Click OK to see which questions are still pending."]}),a.jsx(Mn,{children:a.jsx("div",{className:"flex w-full gap-3",children:a.jsx(Ne,{onClick:o,bgColor:"primary",textColor:"white",text:"OK",className:"flex-1"})})})]})})}function $n({open:e,onOpenChange:t,onConfirm:r,onCancel:n,readOnly:o=!1}){return a.jsx(Pn,{open:e,onOpenChange:t,children:a.jsxs(Tn,{showCloseButton:!0,className:"max-w-md",children:[a.jsx(_n,{children:a.jsx(Dn,{id:"exit-dialog-title",children:"Exit Survey?"})}),a.jsx(In,{children:o?"Are you sure you want to exit the survey?":"Are you sure you want to exit? Your progress will be lost."}),a.jsxs(Mn,{className:"flex gap-2 p-4",children:[a.jsx(Ne,{variant:"outline",onClick:n,className:"flex-1 border border-borderGray",children:"Cancel"}),a.jsx(Ne,{onClick:r,className:"flex-1",children:"Yes, Exit"})]})]})})}function Fn({show:e}){return e?a.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/40",role:"status","aria-live":"polite","aria-busy":"true",children:a.jsxs("div",{className:"flex flex-col items-center gap-4 rounded-lg bg-white p-6 shadow-xl",children:[a.jsx("div",{className:"h-10 w-10 animate-spin rounded-full border-2 border-primary border-t-transparent","aria-hidden":!0}),a.jsx("p",{className:"text-sm font-medium text-textBlack",children:"Submitting..."})]})}):null}function Vn({data:e,onSubmit:t,onSave:r,onExit:n,isSubmitting:o=!1,className:s="",showHeader:l=!0}){const i=e.questionList,[d,u]=O.useState(()=>{const L={};return i.forEach(H=>{L[H.questionId]=so(H)}),L}),[f,m]=O.useState(()=>{const{visibleQuestions:L}=mt(i,{},[]);return L}),[h,b]=O.useState(0),[x,g]=O.useState(!1),[y,N]=O.useState(!1),[w,T]=O.useState(!1),[A,_]=O.useState([]),z=O.useMemo(()=>er(e.config),[e.config]),k=O.useMemo(()=>ir(i,d,f),[i,d,f]),j=O.useMemo(()=>{const L={};return Object.entries(d).forEach(([H,we])=>{L[H]={value:we}}),L},[d]);O.useEffect(()=>{const{visibleQuestions:L,newlyHidden:H}=mt(i,j,f);!(L.length!==f.length||L.some((Y,Q)=>Y!==f[Q]))&&H.length===0||(m(L),b(Y=>Math.min(Y,Math.max(0,L.length-1))),H.length>0&&u(Y=>{const Q=Object.fromEntries(Object.entries(Y).map(([ce,U])=>[ce,{value:U}])),de=Jt(Q,H);return Object.fromEntries(Object.entries(de).map(([ce,U])=>[ce,U.value]))}))},[j,i,f]);const D=f[h],P=i.find(L=>L.questionId===D),W=f.length,q=O.useCallback(L=>{D&&u(H=>({...H,[D]:L}))},[D]),te=O.useCallback(()=>{h<W-1&&b(L=>L+1)},[h,W]),ee=O.useCallback(()=>{h>0&&b(L=>L-1)},[h]),J=O.useCallback(L=>{L>=0&&L<W&&(b(L),g(!1))},[W]),re=O.useCallback(L=>{const H=f.indexOf(L);H>=0&&J(H)},[f,J]),ae=O.useCallback(()=>{const L=ht(i,d,f);if(L.length>0){_(L),N(!0);return}const H=bt(e,d,f);t(H)},[e,i,d,f,t]),xe=O.useCallback(()=>{N(!1),g(!0)},[]),ye=O.useCallback(()=>{T(!0)},[]),R=O.useCallback(()=>{T(!1);const L=bt(e,d,f);r==null||r(L),n==null||n()},[e,d,f,r,n]),Ce=h===W-1;return P?a.jsxs("div",{className:`min-h-screen bg-gray-50 rounded-lg bg-white shadow-sm ${s}`,children:[l&&a.jsx("header",{className:"sticky top-0 z-40 border-b border-borderGray bg-primaryLight/50",children:a.jsx("div",{className:"",children:a.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[a.jsx("h2",{className:"text-xl font-medium text-primaryDark",children:e.surveyName}),a.jsx("div",{className:"flex items-center gap-4",children:n&&a.jsx(Ne,{type:"button",variant:"ghost",size:"icon",onClick:ye,className:"text-textGray hover:bg-gray-100 hover:text-textBlack",title:"Exit Survey","aria-label":"Exit survey",children:"✕"})})]})})}),a.jsx("div",{className:"bg-white px-4 py-2 shadow-sm",children:a.jsx("div",{className:"",children:a.jsx(Tr,{questions:f,activeQuestionId:D,onQuestionSelect:re,questionStatusMap:k})})}),a.jsxs("main",{className:"flex flex-col",style:{minHeight:l?"calc(100vh - 130px)":"calc(100vh - 70px)"},children:[a.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden p-4",children:a.jsx("div",{className:"relative flex-1 overflow-hidden min-h-0",children:a.jsx("div",{className:"absolute inset-0 overflow-y-auto",children:a.jsxs("div",{className:"p-4 pb-8",children:[a.jsx("div",{className:"mb-3",children:a.jsx("span",{className:"rounded-full bg-primary/10 px-3 py-1 text-md font-medium text-primary",children:P.questionId})}),a.jsxs("h2",{className:"text-lg leading-relaxed font-medium text-textBlack",children:[P.description,P.isMandatory&&a.jsx("span",{className:"ml-1 text-error",children:"*"})]}),P.textLimitCharacter!=null&&a.jsxs("p",{className:"mt-2 text-xs text-textGray",children:["Maximum ",P.textLimitCharacter," characters"]}),P.textInputType==="Numeric"&&a.jsx("p",{className:"mt-2 text-xs text-textGray",children:"Please enter numeric value only (e.g. 1, 2, 3)"}),a.jsx("div",{className:"mt-6 flex max-w-4xl flex-1 flex-col justify-center",children:a.jsx(Pr,{question:P,value:d[D],onChange:q,validationErrors:A,mediaConfig:z})})]},D)})})}),a.jsx("footer",{className:"flex-shrink-0 p-4 border-t border-borderGray",children:a.jsxs("div",{className:"flex justify-center gap-3 md:justify-end",children:[a.jsx(Ne,{type:"button",variant:"outline",onClick:ee,disabled:h===0,className:"min-w-[140px] text-md font-semibold",prefixIcon:a.jsx("svg",{className:"h-5 w-5 transition-transform duration-200 group-hover:-translate-x-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),children:"Previous"}),Ce?a.jsx(Ne,{type:"button",onClick:ae,className:"min-w-[140px] text-md font-semibold",suffixIcon:a.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),text:"Submit"}):a.jsx(Ne,{type:"button",onClick:te,className:"min-w-[140px] text-md font-semibold",suffixIcon:a.jsx("svg",{className:"h-5 w-5 transition-transform duration-200 group-hover:translate-x-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),text:"Next"})]})})]}),a.jsx(Dr,{isOpen:x,onClose:()=>g(!1),questions:i,visibleQuestionIds:f,responses:d,currentQuestionIndex:h,onGoToQuestion:J}),a.jsx(Ln,{open:y,onOpenChange:N,missingQuestionIds:A.map(L=>L.questionId),errors:A,onOk:xe}),a.jsx($n,{open:w,onOpenChange:T,onConfirm:R,onCancel:()=>T(!1)}),a.jsx(Fn,{show:o})]}):a.jsx("div",{className:"flex min-h-screen items-center justify-center",children:a.jsx("p",{className:"text-textGray",children:"Loading survey..."})})}function Li({data:e,onSubmit:t,onSave:r,onExit:n,isSubmitting:o=!1,className:s="",showHeader:l=!0}){return a.jsx(Vn,{data:e,onSubmit:t,onSave:r,onExit:n,isSubmitting:o,className:s,showHeader:l})}V.DEFAULT_MEDIA_ALLOWED_TYPES=gt,V.DEFAULT_MEDIA_MAX_SIZE_MB=vt,V.ExitConfirmationDialog=$n,V.MEDIA_ALLOWED_TYPES=Ke,V.MEDIA_MAX_SIZE_MB=xt,V.QuestionListCarousel=Tr,V.QuestionOverviewPanel=Dr,V.QuestionRenderer=Pr,V.SUPPORTED_QUESTION_TYPES=Ht,V.SubmissionLoadingOverlay=Fn,V.SurveyContainer=Vn,V.SurveyRenderer=Li,V.ValidationDialog=Ln,V.calculateVisibility=mt,V.canSubmit=uo,V.clearHiddenResponses=Jt,V.fileToFileObject=or,V.formatResponses=bt,V.getDefaultValue=He,V.getEffectiveMediaConfig=er,V.getQuestionStatusMap=ir,V.isSupportedQuestionType=Kt,V.validateFile=nr,V.validateFileSize=rr,V.validateFileType=tr,V.validateResponses=ht,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})}));
|
|
101
101
|
//# sourceMappingURL=surveyRender.umd.cjs.map
|