@habit.analytics/habit-claims-journey-components 2.3.1 โ 2.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -0
- package/dist/components/journey-builder/preview-widgets/MultiUploadWidget.d.ts +20 -0
- package/dist/components/journey-builder/preview-widgets/WidgetRenderer.d.ts +12 -2
- package/dist/i18n/locales/en.d.ts +4 -0
- package/dist/index.cjs +63 -63
- package/dist/index.mjs +5701 -5358
- package/dist/schemas/form-config.schema.json.d.ts +3 -1
- package/dist/types/journey.d.ts +4 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,251 +1,251 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(`*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }:root,.jb-widget-root{--claims-journey-background: 210 25% 96.5%;--claims-journey-foreground: 222.2 84% 4.9%;--claims-journey-font-heading: "Poppins", sans-serif;--claims-journey-font-body: "Roboto", sans-serif;--claims-journey-card: 0 0% 100%;--claims-journey-card-foreground: 222.2 84% 4.9%;--claims-journey-popover: 0 0% 100%;--claims-journey-popover-foreground: 222.2 84% 4.9%;--claims-journey-primary: 222.2 47.4% 11.2%;--claims-journey-primary-foreground: 210 40% 98%;--claims-journey-secondary: 210 40% 96.1%;--claims-journey-secondary-foreground: 222.2 47.4% 11.2%;--claims-journey-muted: 210 40% 96.1%;--claims-journey-muted-foreground: 215.4 16.3% 46.9%;--claims-journey-accent: 210 40% 96.1%;--claims-journey-accent-foreground: 222.2 47.4% 11.2%;--claims-journey-destructive: 0 84.2% 60.2%;--claims-journey-destructive-foreground: 210 40% 98%;--claims-journey-border: 214.3 31.8% 91.4%;--claims-journey-input: 214.3 31.8% 91.4%;--claims-journey-ring: 222.2 84% 4.9%;--claims-journey-radius: .75rem;--claims-journey-success: 142 71% 45%;--claims-journey-success-foreground: 0 0% 100%;--claims-journey-sidebar-background: 0 0% 98%;--claims-journey-sidebar-foreground: 240 5.3% 26.1%;--claims-journey-sidebar-primary: 240 5.9% 10%;--claims-journey-sidebar-primary-foreground: 0 0% 98%;--claims-journey-sidebar-accent: 240 4.8% 95.9%;--claims-journey-sidebar-accent-foreground: 240 5.9% 10%;--claims-journey-sidebar-border: 220 13% 91%;--claims-journey-sidebar-ring: 217.2 91.2% 59.8%}.dark{--claims-journey-background: 222.2 84% 4.9%;--claims-journey-foreground: 210 40% 98%;--claims-journey-card: 222.2 84% 4.9%;--claims-journey-card-foreground: 210 40% 98%;--claims-journey-popover: 222.2 84% 4.9%;--claims-journey-popover-foreground: 210 40% 98%;--claims-journey-primary: 210 40% 98%;--claims-journey-primary-foreground: 222.2 47.4% 11.2%;--claims-journey-secondary: 217.2 32.6% 17.5%;--claims-journey-secondary-foreground: 210 40% 98%;--claims-journey-muted: 217.2 32.6% 17.5%;--claims-journey-muted-foreground: 215 20.2% 65.1%;--claims-journey-accent: 217.2 32.6% 17.5%;--claims-journey-accent-foreground: 210 40% 98%;--claims-journey-destructive: 0 62.8% 30.6%;--claims-journey-destructive-foreground: 210 40% 98%;--claims-journey-border: 217.2 32.6% 17.5%;--claims-journey-input: 217.2 32.6% 17.5%;--claims-journey-ring: 212.7 26.8% 83.9%;--claims-journey-sidebar-background: 240 5.9% 10%;--claims-journey-sidebar-foreground: 240 4.8% 95.9%;--claims-journey-sidebar-primary: 224.3 76.3% 48%;--claims-journey-sidebar-primary-foreground: 0 0% 100%;--claims-journey-sidebar-accent: 240 3.7% 15.9%;--claims-journey-sidebar-accent-foreground: 240 4.8% 95.9%;--claims-journey-sidebar-border: 240 3.7% 15.9%;--claims-journey-sidebar-ring: 217.2 91.2% 59.8%}.jb-widget-root,.jb-widget-root *,.jb-widget-root *:before,.jb-widget-root *:after{border-color:hsl(var(--claims-journey-border));box-sizing:border-box}.jb-widget-root{background-color:hsl(var(--claims-journey-background));color:hsl(var(--claims-journey-foreground))}.cj-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border-width:0!important}.cj-pointer-events-none{pointer-events:none!important}.cj-pointer-events-auto{pointer-events:auto!important}.cj-invisible{visibility:hidden!important}.cj-fixed{position:fixed!important}.cj-absolute{position:absolute!important}.cj-relative{position:relative!important}.cj-sticky{position:sticky!important}.cj-inset-0{top:0!important;right:0!important;bottom:0!important;left:0!important}.cj-inset-x-0{left:0!important;right:0!important}.cj-inset-y-0{top:0!important;bottom:0!important}.-cj-bottom-12{bottom:-3rem!important}.-cj-bottom-2{bottom:-.5rem!important}.-cj-left-12{left:-3rem!important}.-cj-right-1{right:-.25rem!important}.-cj-right-12{right:-3rem!important}.-cj-top-1{top:-.25rem!important}.-cj-top-12{top:-3rem!important}.cj-bottom-0{bottom:0!important}.cj-left-0{left:0!important}.cj-left-1{left:.25rem!important}.cj-left-1\\/2{left:50%!important}.cj-left-2{left:.5rem!important}.cj-left-2\\.5{left:.625rem!important}.cj-left-3{left:.75rem!important}.cj-left-\\[50\\%\\]{left:50%!important}.cj-right-0{right:0!important}.cj-right-1{right:.25rem!important}.cj-right-2{right:.5rem!important}.cj-right-3{right:.75rem!important}.cj-right-4{right:1rem!important}.cj-top-0{top:0!important}.cj-top-1{top:.25rem!important}.cj-top-1\\.5{top:.375rem!important}.cj-top-1\\/2{top:50%!important}.cj-top-2{top:.5rem!important}.cj-top-2\\.5{top:.625rem!important}.cj-top-3\\.5{top:.875rem!important}.cj-top-4{top:1rem!important}.cj-top-\\[1px\\]{top:1px!important}.cj-top-\\[50\\%\\]{top:50%!important}.cj-top-\\[60\\%\\]{top:60%!important}.cj-top-full{top:100%!important}.cj-z-10{z-index:10!important}.cj-z-20{z-index:20!important}.cj-z-50{z-index:50!important}.cj-z-\\[100\\]{z-index:100!important}.cj-z-\\[1\\]{z-index:1!important}.cj-m-0{margin:0!important}.-cj-mx-1,.cj--mx-1{margin-left:-.25rem!important;margin-right:-.25rem!important}.cj-mx-1{margin-left:.25rem!important;margin-right:.25rem!important}.cj-mx-2{margin-left:.5rem!important;margin-right:.5rem!important}.cj-mx-3\\.5{margin-left:.875rem!important;margin-right:.875rem!important}.cj-mx-auto{margin-left:auto!important;margin-right:auto!important}.cj-my-0\\.5{margin-top:.125rem!important;margin-bottom:.125rem!important}.cj-my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.-cj-ml-4{margin-left:-1rem!important}.-cj-mt-4{margin-top:-1rem!important}.cj-mb-1{margin-bottom:.25rem!important}.cj-mb-1\\.5{margin-bottom:.375rem!important}.cj-mb-2{margin-bottom:.5rem!important}.cj-mb-3{margin-bottom:.75rem!important}.cj-mb-4{margin-bottom:1rem!important}.cj-mb-6{margin-bottom:1.5rem!important}.cj-ml-0\\.5{margin-left:.125rem!important}.cj-ml-1{margin-left:.25rem!important}.cj-ml-1\\.5{margin-left:.375rem!important}.cj-ml-2{margin-left:.5rem!important}.cj-ml-auto{margin-left:auto!important}.cj-mr-1{margin-right:.25rem!important}.cj-mr-1\\.5{margin-right:.375rem!important}.cj-mr-2{margin-right:.5rem!important}.cj-mt-0{margin-top:0!important}.cj-mt-0\\.5{margin-top:.125rem!important}.cj-mt-1{margin-top:.25rem!important}.cj-mt-1\\.5{margin-top:.375rem!important}.cj-mt-2{margin-top:.5rem!important}.cj-mt-24{margin-top:6rem!important}.cj-mt-3{margin-top:.75rem!important}.cj-mt-4{margin-top:1rem!important}.cj-mt-auto{margin-top:auto!important}.cj-block{display:block!important}.cj-flex{display:flex!important}.cj-inline-flex{display:inline-flex!important}.cj-grid{display:grid!important}.cj-hidden{display:none!important}.cj-aspect-square{aspect-ratio:1 / 1!important}.cj-aspect-video{aspect-ratio:16 / 9!important}.cj-size-4{width:1rem!important;height:1rem!important}.\\!cj-h-3{height:.75rem!important}.cj-h-0{height:0px!important}.cj-h-1{height:.25rem!important}.cj-h-1\\.5{height:.375rem!important}.cj-h-10{height:2.5rem!important}.cj-h-11{height:2.75rem!important}.cj-h-12{height:3rem!important}.cj-h-14{height:3.5rem!important}.cj-h-16{height:4rem!important}.cj-h-2{height:.5rem!important}.cj-h-2\\.5{height:.625rem!important}.cj-h-3{height:.75rem!important}.cj-h-3\\.5{height:.875rem!important}.cj-h-4{height:1rem!important}.cj-h-5{height:1.25rem!important}.cj-h-6{height:1.5rem!important}.cj-h-7{height:1.75rem!important}.cj-h-8{height:2rem!important}.cj-h-9{height:2.25rem!important}.cj-h-\\[1px\\]{height:1px!important}.cj-h-\\[200px\\]{height:200px!important}.cj-h-\\[55vh\\]{height:55vh!important}.cj-h-\\[var\\(--radix-navigation-menu-viewport-height\\)\\]{height:var(--radix-navigation-menu-viewport-height)!important}.cj-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)!important}.cj-h-auto{height:auto!important}.cj-h-full{height:100%!important}.cj-h-px{height:1px!important}.cj-h-svh{height:100svh!important}.cj-max-h-40{max-height:10rem!important}.cj-max-h-60{max-height:15rem!important}.cj-max-h-80{max-height:20rem!important}.cj-max-h-96{max-height:24rem!important}.cj-max-h-\\[300px\\]{max-height:300px!important}.cj-max-h-\\[420px\\]{max-height:420px!important}.cj-max-h-\\[85vh\\]{max-height:85vh!important}.cj-max-h-\\[calc\\(100vh-5rem\\)\\]{max-height:calc(100vh - 5rem)!important}.cj-max-h-screen{max-height:100vh!important}.cj-min-h-0{min-height:0px!important}.cj-min-h-12{min-height:3rem!important}.cj-min-h-\\[100px\\]{min-height:100px!important}.cj-min-h-\\[120px\\]{min-height:120px!important}.cj-min-h-\\[200px\\]{min-height:200px!important}.cj-min-h-\\[48px\\]{min-height:48px!important}.cj-min-h-\\[56px\\]{min-height:56px!important}.cj-min-h-full{min-height:100%!important}.cj-min-h-screen{min-height:100vh!important}.cj-min-h-svh{min-height:100svh!important}.\\!cj-w-3{width:.75rem!important}.cj-w-0{width:0px!important}.cj-w-1{width:.25rem!important}.cj-w-1\\.5{width:.375rem!important}.cj-w-10{width:2.5rem!important}.cj-w-11{width:2.75rem!important}.cj-w-12{width:3rem!important}.cj-w-16{width:4rem!important}.cj-w-2{width:.5rem!important}.cj-w-2\\.5{width:.625rem!important}.cj-w-24{width:6rem!important}.cj-w-28{width:7rem!important}.cj-w-3{width:.75rem!important}.cj-w-3\\.5{width:.875rem!important}.cj-w-3\\/4{width:75%!important}.cj-w-32{width:8rem!important}.cj-w-4{width:1rem!important}.cj-w-48{width:12rem!important}.cj-w-5{width:1.25rem!important}.cj-w-6{width:1.5rem!important}.cj-w-64{width:16rem!important}.cj-w-7{width:1.75rem!important}.cj-w-72{width:18rem!important}.cj-w-8{width:2rem!important}.cj-w-9{width:2.25rem!important}.cj-w-96{width:24rem!important}.cj-w-\\[--sidebar-width\\]{width:var(--sidebar-width)!important}.cj-w-\\[100px\\]{width:100px!important}.cj-w-\\[1px\\]{width:1px!important}.cj-w-\\[260px\\]{width:260px!important}.cj-w-\\[360px\\]{width:360px!important}.cj-w-\\[calc\\(100\\%-2rem\\)\\]{width:calc(100% - 2rem)!important}.cj-w-auto{width:auto!important}.cj-w-full{width:100%!important}.cj-w-max{width:-moz-max-content!important;width:max-content!important}.cj-w-px{width:1px!important}.cj-min-w-0{min-width:0px!important}.cj-min-w-5{min-width:1.25rem!important}.cj-min-w-\\[1\\.75rem\\]{min-width:1.75rem!important}.cj-min-w-\\[12rem\\]{min-width:12rem!important}.cj-min-w-\\[140px\\]{min-width:140px!important}.cj-min-w-\\[180px\\]{min-width:180px!important}.cj-min-w-\\[220px\\]{min-width:220px!important}.cj-min-w-\\[8rem\\]{min-width:8rem!important}.cj-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)!important}.cj-max-w-2xl{max-width:42rem!important}.cj-max-w-3xl{max-width:48rem!important}.cj-max-w-4xl{max-width:56rem!important}.cj-max-w-\\[--skeleton-width\\]{max-width:var(--skeleton-width)!important}.cj-max-w-\\[160px\\]{max-width:160px!important}.cj-max-w-\\[200px\\]{max-width:200px!important}.cj-max-w-\\[240px\\]{max-width:240px!important}.cj-max-w-lg{max-width:32rem!important}.cj-max-w-max{max-width:-moz-max-content!important;max-width:max-content!important}.cj-max-w-md{max-width:28rem!important}.cj-max-w-xl{max-width:36rem!important}.cj-flex-1{flex:1 1 0%!important}.cj-flex-shrink-0,.cj-shrink-0{flex-shrink:0!important}.cj-grow{flex-grow:1!important}.cj-grow-0{flex-grow:0!important}.cj-basis-full{flex-basis:100%!important}.cj-caption-bottom{caption-side:bottom!important}.cj-border-collapse{border-collapse:collapse!important}.-cj-translate-x-1\\/2{--tw-translate-x: -50% !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-cj-translate-x-px{--tw-translate-x: -1px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-cj-translate-y-1\\/2,.cj--translate-y-1\\/2{--tw-translate-y: -50% !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cj-translate-x-\\[-50\\%\\]{--tw-translate-x: -50% !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cj-translate-x-px{--tw-translate-x: 1px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cj-translate-y-\\[-50\\%\\]{--tw-translate-y: -50% !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-cj-rotate-90{--tw-rotate: -90deg !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cj-rotate-180{--tw-rotate: 180deg !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cj-rotate-45{--tw-rotate: 45deg !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cj-rotate-90{--tw-rotate: 90deg !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cj-animate-\\[fadeSlideIn_0\\.35s_ease-out_both\\]{animation:fadeSlideIn .35s ease-out both!important}.cj-animate-\\[fadeSlideIn_0\\.3s_ease-out_both\\]{animation:fadeSlideIn .3s ease-out both!important}@keyframes cj-pulse{50%{opacity:.5}}.cj-animate-pulse{animation:cj-pulse 2s cubic-bezier(.4,0,.6,1) infinite!important}@keyframes cj-spin{to{transform:rotate(360deg)}}.cj-animate-spin{animation:cj-spin 1s linear infinite!important}.cj-cursor-default{cursor:default!important}.cj-cursor-grab{cursor:grab!important}.cj-cursor-pointer{cursor:pointer!important}.cj-cursor-wait{cursor:wait!important}.cj-touch-none{touch-action:none!important}.cj-select-none{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}.cj-list-inside{list-style-position:inside!important}.cj-list-disc{list-style-type:disc!important}.cj-list-none{list-style-type:none!important}.cj-appearance-none{-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important}.cj-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))!important}.cj-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.cj-flex-row{flex-direction:row!important}.cj-flex-col{flex-direction:column!important}.cj-flex-col-reverse{flex-direction:column-reverse!important}.cj-flex-wrap{flex-wrap:wrap!important}.cj-items-start{align-items:flex-start!important}.cj-items-end{align-items:flex-end!important}.cj-items-center{align-items:center!important}.cj-items-stretch{align-items:stretch!important}.cj-justify-end{justify-content:flex-end!important}.cj-justify-center{justify-content:center!important}.cj-justify-between{justify-content:space-between!important}.cj-gap-0\\.5{gap:.125rem!important}.cj-gap-1{gap:.25rem!important}.cj-gap-1\\.5{gap:.375rem!important}.cj-gap-2{gap:.5rem!important}.cj-gap-3{gap:.75rem!important}.cj-gap-4{gap:1rem!important}.cj-gap-6{gap:1.5rem!important}.cj-space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0 !important;margin-right:calc(.25rem * var(--tw-space-x-reverse))!important;margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))!important}.cj-space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0 !important;margin-right:calc(1rem * var(--tw-space-x-reverse))!important;margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))!important}.cj-space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0 !important;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)))!important;margin-bottom:calc(.125rem * var(--tw-space-y-reverse))!important}.cj-space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0 !important;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)))!important;margin-bottom:calc(.25rem * var(--tw-space-y-reverse))!important}.cj-space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0 !important;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)))!important;margin-bottom:calc(.375rem * var(--tw-space-y-reverse))!important}.cj-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0 !important;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)))!important;margin-bottom:calc(.5rem * var(--tw-space-y-reverse))!important}.cj-space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0 !important;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)))!important;margin-bottom:calc(.75rem * var(--tw-space-y-reverse))!important}.cj-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0 !important;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)))!important;margin-bottom:calc(1rem * var(--tw-space-y-reverse))!important}.cj-space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0 !important;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)))!important;margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))!important}.cj-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0 !important;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)))!important;margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))!important}.cj-space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0 !important;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)))!important;margin-bottom:calc(2rem * var(--tw-space-y-reverse))!important}.cj-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0 !important;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))!important;border-bottom-width:calc(1px * var(--tw-divide-y-reverse))!important}.cj-divide-border\\/30>:not([hidden])~:not([hidden]){border-color:hsl(var(--claims-journey-border) / .3)!important}.cj-self-start{align-self:flex-start!important}.cj-overflow-auto{overflow:auto!important}.cj-overflow-hidden{overflow:hidden!important}.cj-overflow-visible{overflow:visible!important}.cj-overflow-y-auto{overflow-y:auto!important}.cj-overflow-x-hidden{overflow-x:hidden!important}.cj-overflow-y-scroll{overflow-y:scroll!important}.cj-truncate{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.cj-whitespace-nowrap{white-space:nowrap!important}.cj-break-words{overflow-wrap:break-word!important}.cj-break-all{word-break:break-all!important}.cj-rounded{border-radius:.25rem!important}.cj-rounded-2xl{border-radius:1rem!important}.cj-rounded-\\[2px\\]{border-radius:2px!important}.cj-rounded-\\[inherit\\]{border-radius:inherit!important}.cj-rounded-full{border-radius:9999px!important}.cj-rounded-lg{border-radius:var(--claims-journey-radius)!important}.cj-rounded-md{border-radius:calc(var(--claims-journey-radius) - 2px)!important}.cj-rounded-none{border-radius:0!important}.cj-rounded-sm{border-radius:calc(var(--claims-journey-radius) - 4px)!important}.cj-rounded-xl{border-radius:.75rem!important}.cj-rounded-t-\\[10px\\]{border-top-left-radius:10px!important;border-top-right-radius:10px!important}.cj-rounded-tl-sm{border-top-left-radius:calc(var(--claims-journey-radius) - 4px)!important}.\\!cj-border-2{border-width:2px!important}.cj-border{border-width:1px!important}.cj-border-0{border-width:0px!important}.cj-border-2{border-width:2px!important}.cj-border-\\[1\\.5px\\]{border-width:1.5px!important}.cj-border-y{border-top-width:1px!important;border-bottom-width:1px!important}.cj-border-b{border-bottom-width:1px!important}.cj-border-b-2{border-bottom-width:2px!important}.cj-border-l{border-left-width:1px!important}.cj-border-r{border-right-width:1px!important}.cj-border-t{border-top-width:1px!important}.cj-border-t-2{border-top-width:2px!important}.cj-border-dashed{border-style:dashed!important}.cj-border-dotted{border-style:dotted!important}.cj-border-none{border-style:none!important}.\\!cj-border-background{border-color:hsl(var(--claims-journey-background))!important}.\\!cj-border-border{border-color:hsl(var(--claims-journey-border))!important}.cj-border-\\[--color-border\\]{border-color:var(--color-border)!important}.cj-border-background{border-color:hsl(var(--claims-journey-background))!important}.cj-border-border{border-color:hsl(var(--claims-journey-border))!important}.cj-border-border\\/30{border-color:hsl(var(--claims-journey-border) / .3)!important}.cj-border-border\\/40{border-color:hsl(var(--claims-journey-border) / .4)!important}.cj-border-border\\/50{border-color:hsl(var(--claims-journey-border) / .5)!important}.cj-border-border\\/60{border-color:hsl(var(--claims-journey-border) / .6)!important}.cj-border-card{border-color:hsl(var(--claims-journey-card))!important}.cj-border-destructive{border-color:hsl(var(--claims-journey-destructive))!important}.cj-border-destructive\\/30{border-color:hsl(var(--claims-journey-destructive) / .3)!important}.cj-border-destructive\\/40{border-color:hsl(var(--claims-journey-destructive) / .4)!important}.cj-border-destructive\\/50{border-color:hsl(var(--claims-journey-destructive) / .5)!important}.cj-border-input{border-color:hsl(var(--claims-journey-input))!important}.cj-border-muted-foreground\\/25{border-color:hsl(var(--claims-journey-muted-foreground) / .25)!important}.cj-border-primary{border-color:hsl(var(--claims-journey-primary))!important}.cj-border-primary\\/40{border-color:hsl(var(--claims-journey-primary) / .4)!important}.cj-border-primary\\/50{border-color:hsl(var(--claims-journey-primary) / .5)!important}.cj-border-sidebar-border{border-color:hsl(var(--claims-journey-sidebar-border))!important}.cj-border-transparent{border-color:transparent!important}.cj-border-yellow-500{--tw-border-opacity: 1 !important;border-color:rgb(234 179 8 / var(--tw-border-opacity, 1))!important}.cj-border-l-transparent{border-left-color:transparent!important}.cj-border-t-transparent{border-top-color:transparent!important}.\\!cj-bg-background{background-color:hsl(var(--claims-journey-background))!important}.\\!cj-bg-primary{background-color:hsl(var(--claims-journey-primary))!important}.cj-bg-\\[--color-bg\\]{background-color:var(--color-bg)!important}.cj-bg-\\[hsl\\(var\\(--claims-journey-success\\)\\/0\\.15\\)\\]{background-color:hsl(var(--claims-journey-success)/.15)!important}.cj-bg-accent{background-color:hsl(var(--claims-journey-accent))!important}.cj-bg-background{background-color:hsl(var(--claims-journey-background))!important}.cj-bg-background\\/50{background-color:hsl(var(--claims-journey-background) / .5)!important}.cj-bg-black\\/80{background-color:#000c!important}.cj-bg-blue-50{--tw-bg-opacity: 1 !important;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))!important}.cj-bg-blue-500{--tw-bg-opacity: 1 !important;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))!important}.cj-bg-border{background-color:hsl(var(--claims-journey-border))!important}.cj-bg-card{background-color:hsl(var(--claims-journey-card))!important}.cj-bg-cyan-500{--tw-bg-opacity: 1 !important;background-color:rgb(6 182 212 / var(--tw-bg-opacity, 1))!important}.cj-bg-destructive{background-color:hsl(var(--claims-journey-destructive))!important}.cj-bg-destructive\\/10{background-color:hsl(var(--claims-journey-destructive) / .1)!important}.cj-bg-emerald-500{--tw-bg-opacity: 1 !important;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))!important}.cj-bg-foreground{background-color:hsl(var(--claims-journey-foreground))!important}.cj-bg-green-500{--tw-bg-opacity: 1 !important;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))!important}.cj-bg-indigo-500{--tw-bg-opacity: 1 !important;background-color:rgb(99 102 241 / var(--tw-bg-opacity, 1))!important}.cj-bg-lime-500{--tw-bg-opacity: 1 !important;background-color:rgb(132 204 22 / var(--tw-bg-opacity, 1))!important}.cj-bg-muted{background-color:hsl(var(--claims-journey-muted))!important}.cj-bg-muted\\/20{background-color:hsl(var(--claims-journey-muted) / .2)!important}.cj-bg-muted\\/30{background-color:hsl(var(--claims-journey-muted) / .3)!important}.cj-bg-muted\\/40{background-color:hsl(var(--claims-journey-muted) / .4)!important}.cj-bg-muted\\/50{background-color:hsl(var(--claims-journey-muted) / .5)!important}.cj-bg-orange-500{--tw-bg-opacity: 1 !important;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))!important}.cj-bg-popover{background-color:hsl(var(--claims-journey-popover))!important}.cj-bg-primary{background-color:hsl(var(--claims-journey-primary))!important}.cj-bg-primary\\/10{background-color:hsl(var(--claims-journey-primary) / .1)!important}.cj-bg-primary\\/5{background-color:hsl(var(--claims-journey-primary) / .05)!important}.cj-bg-purple-500{--tw-bg-opacity: 1 !important;background-color:rgb(168 85 247 / var(--tw-bg-opacity, 1))!important}.cj-bg-rose-500{--tw-bg-opacity: 1 !important;background-color:rgb(244 63 94 / var(--tw-bg-opacity, 1))!important}.cj-bg-secondary{background-color:hsl(var(--claims-journey-secondary))!important}.cj-bg-sidebar{background-color:hsl(var(--claims-journey-sidebar-background))!important}.cj-bg-sidebar-border{background-color:hsl(var(--claims-journey-sidebar-border))!important}.cj-bg-teal-500{--tw-bg-opacity: 1 !important;background-color:rgb(20 184 166 / var(--tw-bg-opacity, 1))!important}.cj-bg-transparent{background-color:transparent!important}.cj-bg-yellow-500{--tw-bg-opacity: 1 !important;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))!important}.cj-fill-current{fill:currentColor!important}.cj-p-0{padding:0!important}.cj-p-0\\.5{padding:.125rem!important}.cj-p-1{padding:.25rem!important}.cj-p-2{padding:.5rem!important}.cj-p-3{padding:.75rem!important}.cj-p-4{padding:1rem!important}.cj-p-5{padding:1.25rem!important}.cj-p-6{padding:1.5rem!important}.cj-p-8{padding:2rem!important}.cj-p-\\[1px\\]{padding:1px!important}.cj-px-1{padding-left:.25rem!important;padding-right:.25rem!important}.cj-px-2{padding-left:.5rem!important;padding-right:.5rem!important}.cj-px-2\\.5{padding-left:.625rem!important;padding-right:.625rem!important}.cj-px-3{padding-left:.75rem!important;padding-right:.75rem!important}.cj-px-4{padding-left:1rem!important;padding-right:1rem!important}.cj-px-5{padding-left:1.25rem!important;padding-right:1.25rem!important}.cj-px-6{padding-left:1.5rem!important;padding-right:1.5rem!important}.cj-px-8{padding-left:2rem!important;padding-right:2rem!important}.cj-py-0\\.5{padding-top:.125rem!important;padding-bottom:.125rem!important}.cj-py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.cj-py-1\\.5{padding-top:.375rem!important;padding-bottom:.375rem!important}.cj-py-12{padding-top:3rem!important;padding-bottom:3rem!important}.cj-py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.cj-py-2\\.5{padding-top:.625rem!important;padding-bottom:.625rem!important}.cj-py-3{padding-top:.75rem!important;padding-bottom:.75rem!important}.cj-py-3\\.5{padding-top:.875rem!important;padding-bottom:.875rem!important}.cj-py-4{padding-top:1rem!important;padding-bottom:1rem!important}.cj-py-6{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.cj-py-8{padding-top:2rem!important;padding-bottom:2rem!important}.cj-pb-1{padding-bottom:.25rem!important}.cj-pb-2{padding-bottom:.5rem!important}.cj-pb-3{padding-bottom:.75rem!important}.cj-pb-4{padding-bottom:1rem!important}.cj-pl-1{padding-left:.25rem!important}.cj-pl-2{padding-left:.5rem!important}.cj-pl-2\\.5{padding-left:.625rem!important}.cj-pl-4{padding-left:1rem!important}.cj-pl-8{padding-left:2rem!important}.cj-pl-9{padding-left:2.25rem!important}.cj-pr-1{padding-right:.25rem!important}.cj-pr-12{padding-right:3rem!important}.cj-pr-2{padding-right:.5rem!important}.cj-pr-2\\.5{padding-right:.625rem!important}.cj-pr-3{padding-right:.75rem!important}.cj-pr-4{padding-right:1rem!important}.cj-pr-6{padding-right:1.5rem!important}.cj-pr-8{padding-right:2rem!important}.cj-pt-0{padding-top:0!important}.cj-pt-1{padding-top:.25rem!important}.cj-pt-2{padding-top:.5rem!important}.cj-pt-3{padding-top:.75rem!important}.cj-pt-4{padding-top:1rem!important}.cj-pt-8{padding-top:2rem!important}.cj-text-left{text-align:left!important}.cj-text-center{text-align:center!important}.cj-text-right{text-align:right!important}.cj-align-middle{vertical-align:middle!important}.cj-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace!important}.cj-text-2xl{font-size:1.5rem!important;line-height:2rem!important}.cj-text-4xl{font-size:2.25rem!important;line-height:2.5rem!important}.cj-text-\\[10px\\]{font-size:10px!important}.cj-text-\\[11px\\]{font-size:11px!important}.cj-text-\\[9px\\]{font-size:9px!important}.cj-text-base{font-size:1rem!important;line-height:1.5rem!important}.cj-text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.cj-text-sm{font-size:.875rem!important;line-height:1.25rem!important}.cj-text-xl{font-size:1.25rem!important;line-height:1.75rem!important}.cj-text-xs{font-size:.75rem!important;line-height:1rem!important}.cj-font-bold{font-weight:700!important}.cj-font-medium{font-weight:500!important}.cj-font-normal{font-weight:400!important}.cj-font-semibold{font-weight:600!important}.cj-uppercase{text-transform:uppercase!important}.cj-capitalize{text-transform:capitalize!important}.cj-italic{font-style:italic!important}.cj-tabular-nums{--tw-numeric-spacing: tabular-nums !important;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)!important}.cj-leading-none{line-height:1!important}.cj-leading-relaxed{line-height:1.625!important}.cj-leading-snug{line-height:1.375!important}.cj-leading-tight{line-height:1.25!important}.cj-tracking-tight{letter-spacing:-.025em!important}.cj-tracking-wide{letter-spacing:.025em!important}.cj-tracking-wider{letter-spacing:.05em!important}.cj-tracking-widest{letter-spacing:.1em!important}.cj-text-\\[hsl\\(var\\(--claims-journey-success\\)\\)\\]{color:hsl(var(--claims-journey-success))!important}.cj-text-card-foreground{color:hsl(var(--claims-journey-card-foreground))!important}.cj-text-current{color:currentColor!important}.cj-text-destructive{color:hsl(var(--claims-journey-destructive))!important}.cj-text-destructive-foreground{color:hsl(var(--claims-journey-destructive-foreground))!important}.cj-text-destructive\\/80{color:hsl(var(--claims-journey-destructive) / .8)!important}.cj-text-foreground{color:hsl(var(--claims-journey-foreground))!important}.cj-text-foreground\\/50{color:hsl(var(--claims-journey-foreground) / .5)!important}.cj-text-foreground\\/80{color:hsl(var(--claims-journey-foreground) / .8)!important}.cj-text-green-500{--tw-text-opacity: 1 !important;color:rgb(34 197 94 / var(--tw-text-opacity, 1))!important}.cj-text-green-600{--tw-text-opacity: 1 !important;color:rgb(22 163 74 / var(--tw-text-opacity, 1))!important}.cj-text-muted-foreground{color:hsl(var(--claims-journey-muted-foreground))!important}.cj-text-muted-foreground\\/40{color:hsl(var(--claims-journey-muted-foreground) / .4)!important}.cj-text-muted-foreground\\/60{color:hsl(var(--claims-journey-muted-foreground) / .6)!important}.cj-text-muted-foreground\\/70{color:hsl(var(--claims-journey-muted-foreground) / .7)!important}.cj-text-popover-foreground{color:hsl(var(--claims-journey-popover-foreground))!important}.cj-text-primary{color:hsl(var(--claims-journey-primary))!important}.cj-text-primary-foreground{color:hsl(var(--claims-journey-primary-foreground))!important}.cj-text-secondary-foreground{color:hsl(var(--claims-journey-secondary-foreground))!important}.cj-text-sidebar-foreground{color:hsl(var(--claims-journey-sidebar-foreground))!important}.cj-text-sidebar-foreground\\/70{color:hsl(var(--claims-journey-sidebar-foreground) / .7)!important}.cj-text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity, 1))!important}.cj-text-yellow-500{--tw-text-opacity: 1 !important;color:rgb(234 179 8 / var(--tw-text-opacity, 1))!important}.cj-text-yellow-600{--tw-text-opacity: 1 !important;color:rgb(202 138 4 / var(--tw-text-opacity, 1))!important}.cj-underline{text-decoration-line:underline!important}.cj-underline-offset-4{text-underline-offset:4px!important}.cj-opacity-0{opacity:0!important}.cj-opacity-40{opacity:.4!important}.cj-opacity-50{opacity:.5!important}.cj-opacity-60{opacity:.6!important}.cj-opacity-70{opacity:.7!important}.cj-opacity-90{opacity:.9!important}.cj-shadow-\\[0_0_0_1px_hsl\\(var\\(--claims-journey-sidebar-border\\)\\)\\]{--tw-shadow: 0 0 0 1px hsl(var(--claims-journey-sidebar-border)) !important;--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.cj-shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.cj-shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.cj-shadow-none{--tw-shadow: 0 0 #0000 !important;--tw-shadow-colored: 0 0 #0000 !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.cj-shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05) !important;--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.cj-shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.cj-shadow-primary\\/20{--tw-shadow-color: hsl(var(--claims-journey-primary) / .2) !important;--tw-shadow: var(--tw-shadow-colored) !important}.cj-outline-none{outline:2px solid transparent!important;outline-offset:2px!important}.cj-ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.cj-ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.cj-ring-destructive\\/40{--tw-ring-color: hsl(var(--claims-journey-destructive) / .4) !important}.cj-ring-primary\\/20{--tw-ring-color: hsl(var(--claims-journey-primary) / .2) !important}.cj-ring-primary\\/30{--tw-ring-color: hsl(var(--claims-journey-primary) / .3) !important}.cj-ring-primary\\/50{--tw-ring-color: hsl(var(--claims-journey-primary) / .5) !important}.cj-ring-ring{--tw-ring-color: hsl(var(--claims-journey-ring)) !important}.cj-ring-sidebar-ring{--tw-ring-color: hsl(var(--claims-journey-sidebar-ring)) !important}.cj-ring-offset-background{--tw-ring-offset-color: hsl(var(--claims-journey-background)) !important}.cj-transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.cj-transition-\\[left\\,right\\,width\\]{transition-property:left,right,width!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.cj-transition-\\[margin\\,opa\\]{transition-property:margin,opa!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.cj-transition-\\[width\\,height\\,padding\\]{transition-property:width,height,padding!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.cj-transition-\\[width\\]{transition-property:width!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.cj-transition-all{transition-property:all!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.cj-transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.cj-transition-opacity{transition-property:opacity!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.cj-transition-transform{transition-property:transform!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.cj-duration-1000{transition-duration:1s!important}.cj-duration-150{transition-duration:.15s!important}.cj-duration-200{transition-duration:.2s!important}.cj-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.cj-ease-linear{transition-timing-function:linear!important}@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))}}@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))}}.cj-animate-in{animation-name:enter!important;animation-duration:.15s!important;--tw-enter-opacity: initial !important;--tw-enter-scale: initial !important;--tw-enter-rotate: initial !important;--tw-enter-translate-x: initial !important;--tw-enter-translate-y: initial !important}.cj-fade-in-0{--tw-enter-opacity: 0 !important}.cj-fade-in-80{--tw-enter-opacity: .8 !important}.cj-zoom-in-95{--tw-enter-scale: .95 !important}.cj-duration-1000{animation-duration:1s!important}.cj-duration-150{animation-duration:.15s!important}.cj-duration-200{animation-duration:.2s!important}.cj-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)!important}.cj-ease-linear{animation-timing-function:linear!important}@keyframes fadeSlideIn{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}.file\\:cj-border-0::file-selector-button{border-width:0px!important}.file\\:cj-bg-transparent::file-selector-button{background-color:transparent!important}.file\\:cj-text-sm::file-selector-button{font-size:.875rem!important;line-height:1.25rem!important}.file\\:cj-font-medium::file-selector-button{font-weight:500!important}.file\\:cj-text-foreground::file-selector-button{color:hsl(var(--claims-journey-foreground))!important}.placeholder\\:cj-text-muted-foreground::-moz-placeholder{color:hsl(var(--claims-journey-muted-foreground))!important}.placeholder\\:cj-text-muted-foreground::placeholder{color:hsl(var(--claims-journey-muted-foreground))!important}.after\\:cj-absolute:after{content:var(--tw-content)!important;position:absolute!important}.after\\:-cj-inset-2:after{content:var(--tw-content)!important;top:-.5rem!important;right:-.5rem!important;bottom:-.5rem!important;left:-.5rem!important}.after\\:cj-inset-y-0:after{content:var(--tw-content)!important;top:0!important;bottom:0!important}.after\\:cj-left-1\\/2:after{content:var(--tw-content)!important;left:50%!important}.after\\:cj-w-1:after{content:var(--tw-content)!important;width:.25rem!important}.after\\:cj-w-\\[2px\\]:after{content:var(--tw-content)!important;width:2px!important}.after\\:-cj-translate-x-1\\/2:after{content:var(--tw-content)!important;--tw-translate-x: -50% !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.first\\:cj-rounded-l-md:first-child{border-top-left-radius:calc(var(--claims-journey-radius) - 2px)!important;border-bottom-left-radius:calc(var(--claims-journey-radius) - 2px)!important}.first\\:cj-border-l:first-child{border-left-width:1px!important}.last\\:cj-rounded-r-md:last-child{border-top-right-radius:calc(var(--claims-journey-radius) - 2px)!important;border-bottom-right-radius:calc(var(--claims-journey-radius) - 2px)!important}.focus-within\\:cj-relative:focus-within{position:relative!important}.focus-within\\:cj-z-20:focus-within{z-index:20!important}.hover\\:\\!cj-h-4:hover{height:1rem!important}.hover\\:\\!cj-w-4:hover{width:1rem!important}.hover\\:cj-border-destructive\\/75:hover{border-color:hsl(var(--claims-journey-destructive) / .75)!important}.hover\\:cj-border-muted-foreground\\/50:hover{border-color:hsl(var(--claims-journey-muted-foreground) / .5)!important}.hover\\:cj-border-primary\\/40:hover{border-color:hsl(var(--claims-journey-primary) / .4)!important}.hover\\:cj-border-primary\\/50:hover{border-color:hsl(var(--claims-journey-primary) / .5)!important}.hover\\:cj-border-primary\\/60:hover{border-color:hsl(var(--claims-journey-primary) / .6)!important}.hover\\:\\!cj-bg-primary\\/80:hover{background-color:hsl(var(--claims-journey-primary) / .8)!important}.hover\\:cj-bg-accent:hover{background-color:hsl(var(--claims-journey-accent))!important}.hover\\:cj-bg-accent\\/40:hover{background-color:hsl(var(--claims-journey-accent) / .4)!important}.hover\\:cj-bg-accent\\/50:hover{background-color:hsl(var(--claims-journey-accent) / .5)!important}.hover\\:cj-bg-accent\\/60:hover{background-color:hsl(var(--claims-journey-accent) / .6)!important}.hover\\:cj-bg-destructive\\/10:hover{background-color:hsl(var(--claims-journey-destructive) / .1)!important}.hover\\:cj-bg-destructive\\/80:hover{background-color:hsl(var(--claims-journey-destructive) / .8)!important}.hover\\:cj-bg-destructive\\/90:hover{background-color:hsl(var(--claims-journey-destructive) / .9)!important}.hover\\:cj-bg-muted:hover{background-color:hsl(var(--claims-journey-muted))!important}.hover\\:cj-bg-muted\\/50:hover{background-color:hsl(var(--claims-journey-muted) / .5)!important}.hover\\:cj-bg-primary:hover{background-color:hsl(var(--claims-journey-primary))!important}.hover\\:cj-bg-primary\\/80:hover{background-color:hsl(var(--claims-journey-primary) / .8)!important}.hover\\:cj-bg-primary\\/90:hover{background-color:hsl(var(--claims-journey-primary) / .9)!important}.hover\\:cj-bg-secondary:hover{background-color:hsl(var(--claims-journey-secondary))!important}.hover\\:cj-bg-secondary\\/80:hover{background-color:hsl(var(--claims-journey-secondary) / .8)!important}.hover\\:cj-bg-sidebar-accent:hover{background-color:hsl(var(--claims-journey-sidebar-accent))!important}.hover\\:cj-text-accent-foreground:hover{color:hsl(var(--claims-journey-accent-foreground))!important}.hover\\:cj-text-destructive:hover{color:hsl(var(--claims-journey-destructive))!important}.hover\\:cj-text-foreground:hover{color:hsl(var(--claims-journey-foreground))!important}.hover\\:cj-text-muted-foreground:hover{color:hsl(var(--claims-journey-muted-foreground))!important}.hover\\:cj-text-primary-foreground:hover{color:hsl(var(--claims-journey-primary-foreground))!important}.hover\\:cj-text-primary\\/90:hover{color:hsl(var(--claims-journey-primary) / .9)!important}.hover\\:cj-text-sidebar-accent-foreground:hover{color:hsl(var(--claims-journey-sidebar-accent-foreground))!important}.hover\\:cj-text-yellow-600:hover{--tw-text-opacity: 1 !important;color:rgb(202 138 4 / var(--tw-text-opacity, 1))!important}.hover\\:cj-underline:hover{text-decoration-line:underline!important}.hover\\:cj-opacity-100:hover{opacity:1!important}.hover\\:cj-shadow-\\[0_0_0_1px_hsl\\(var\\(--claims-journey-sidebar-accent\\)\\)\\]:hover{--tw-shadow: 0 0 0 1px hsl(var(--claims-journey-sidebar-accent)) !important;--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.hover\\:cj-shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.hover\\:after\\:cj-bg-sidebar-border:hover:after{content:var(--tw-content)!important;background-color:hsl(var(--claims-journey-sidebar-border))!important}.focus\\:cj-bg-accent:focus{background-color:hsl(var(--claims-journey-accent))!important}.focus\\:cj-bg-primary:focus{background-color:hsl(var(--claims-journey-primary))!important}.focus\\:cj-text-accent-foreground:focus{color:hsl(var(--claims-journey-accent-foreground))!important}.focus\\:cj-text-primary-foreground:focus{color:hsl(var(--claims-journey-primary-foreground))!important}.focus\\:cj-opacity-100:focus{opacity:1!important}.focus\\:cj-outline-none:focus{outline:2px solid transparent!important;outline-offset:2px!important}.focus\\:cj-ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.focus\\:cj-ring-ring:focus{--tw-ring-color: hsl(var(--claims-journey-ring)) !important}.focus\\:cj-ring-offset-2:focus{--tw-ring-offset-width: 2px !important}.focus-visible\\:cj-outline-none:focus-visible{outline:2px solid transparent!important;outline-offset:2px!important}.focus-visible\\:cj-ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.focus-visible\\:cj-ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.focus-visible\\:cj-ring-destructive:focus-visible{--tw-ring-color: hsl(var(--claims-journey-destructive)) !important}.focus-visible\\:cj-ring-ring:focus-visible{--tw-ring-color: hsl(var(--claims-journey-ring)) !important}.focus-visible\\:cj-ring-sidebar-ring:focus-visible{--tw-ring-color: hsl(var(--claims-journey-sidebar-ring)) !important}.focus-visible\\:cj-ring-offset-1:focus-visible{--tw-ring-offset-width: 1px !important}.focus-visible\\:cj-ring-offset-2:focus-visible{--tw-ring-offset-width: 2px !important}.focus-visible\\:cj-ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--claims-journey-background)) !important}.active\\:cj-cursor-grabbing:active{cursor:grabbing!important}.active\\:cj-bg-sidebar-accent:active{background-color:hsl(var(--claims-journey-sidebar-accent))!important}.active\\:cj-text-sidebar-accent-foreground:active{color:hsl(var(--claims-journey-sidebar-accent-foreground))!important}.disabled\\:cj-pointer-events-none:disabled{pointer-events:none!important}.disabled\\:cj-cursor-not-allowed:disabled{cursor:not-allowed!important}.disabled\\:cj-opacity-50:disabled{opacity:.5!important}.cj-group\\/menu-item:focus-within .group-focus-within\\/menu-item\\:cj-opacity-100{opacity:1!important}.cj-group:hover .group-hover\\:cj-text-foreground{color:hsl(var(--claims-journey-foreground))!important}.cj-group\\/menu-item:hover .group-hover\\/menu-item\\:cj-opacity-100,.cj-group:hover .group-hover\\:cj-opacity-100{opacity:1!important}.cj-group.destructive .group-\\[\\.destructive\\]\\:cj-border-muted\\/40{border-color:hsl(var(--claims-journey-muted) / .4)!important}.cj-group.toaster .group-\\[\\.toaster\\]\\:cj-border-border{border-color:hsl(var(--claims-journey-border))!important}.cj-group.toast .group-\\[\\.toast\\]\\:cj-bg-muted{background-color:hsl(var(--claims-journey-muted))!important}.cj-group.toast .group-\\[\\.toast\\]\\:cj-bg-primary{background-color:hsl(var(--claims-journey-primary))!important}.cj-group.toaster .group-\\[\\.toaster\\]\\:cj-bg-background{background-color:hsl(var(--claims-journey-background))!important}.cj-group.destructive .group-\\[\\.destructive\\]\\:cj-text-red-300{--tw-text-opacity: 1 !important;color:rgb(252 165 165 / var(--tw-text-opacity, 1))!important}.cj-group.toast .group-\\[\\.toast\\]\\:cj-text-muted-foreground{color:hsl(var(--claims-journey-muted-foreground))!important}.cj-group.toast .group-\\[\\.toast\\]\\:cj-text-primary-foreground{color:hsl(var(--claims-journey-primary-foreground))!important}.cj-group.toaster .group-\\[\\.toaster\\]\\:cj-text-foreground{color:hsl(var(--claims-journey-foreground))!important}.cj-group.toaster .group-\\[\\.toaster\\]\\:cj-shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.cj-group.destructive .group-\\[\\.destructive\\]\\:hover\\:cj-border-destructive\\/30:hover{border-color:hsl(var(--claims-journey-destructive) / .3)!important}.cj-group.destructive .group-\\[\\.destructive\\]\\:hover\\:cj-bg-destructive:hover{background-color:hsl(var(--claims-journey-destructive))!important}.cj-group.destructive .group-\\[\\.destructive\\]\\:hover\\:cj-text-destructive-foreground:hover{color:hsl(var(--claims-journey-destructive-foreground))!important}.cj-group.destructive .group-\\[\\.destructive\\]\\:hover\\:cj-text-red-50:hover{--tw-text-opacity: 1 !important;color:rgb(254 242 242 / var(--tw-text-opacity, 1))!important}.cj-group.destructive .group-\\[\\.destructive\\]\\:focus\\:cj-ring-destructive:focus{--tw-ring-color: hsl(var(--claims-journey-destructive)) !important}.cj-group.destructive .group-\\[\\.destructive\\]\\:focus\\:cj-ring-red-400:focus{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity, 1)) !important}.cj-group.destructive .group-\\[\\.destructive\\]\\:focus\\:cj-ring-offset-red-600:focus{--tw-ring-offset-color: #dc2626 !important}.cj-peer\\/menu-button:hover~.peer-hover\\/menu-button\\:cj-text-sidebar-accent-foreground{color:hsl(var(--claims-journey-sidebar-accent-foreground))!important}.cj-peer:disabled~.peer-disabled\\:cj-cursor-not-allowed{cursor:not-allowed!important}.cj-peer:disabled~.peer-disabled\\:cj-opacity-70{opacity:.7!important}.has-\\[\\[data-variant\\=inset\\]\\]\\:cj-bg-sidebar:has([data-variant=inset]){background-color:hsl(var(--claims-journey-sidebar-background))!important}.has-\\[\\:disabled\\]\\:cj-opacity-50:has(:disabled){opacity:.5!important}.cj-group\\/menu-item:has([data-sidebar=menu-action]) .group-has-\\[\\[data-sidebar\\=menu-action\\]\\]\\/menu-item\\:cj-pr-8{padding-right:2rem!important}.aria-disabled\\:cj-pointer-events-none[aria-disabled=true]{pointer-events:none!important}.aria-disabled\\:cj-opacity-50[aria-disabled=true]{opacity:.5!important}.aria-selected\\:cj-bg-accent[aria-selected=true]{background-color:hsl(var(--claims-journey-accent))!important}.aria-selected\\:cj-bg-accent\\/50[aria-selected=true]{background-color:hsl(var(--claims-journey-accent) / .5)!important}.aria-selected\\:cj-text-accent-foreground[aria-selected=true]{color:hsl(var(--claims-journey-accent-foreground))!important}.aria-selected\\:cj-text-muted-foreground[aria-selected=true]{color:hsl(var(--claims-journey-muted-foreground))!important}.aria-selected\\:cj-opacity-100[aria-selected=true]{opacity:1!important}.aria-selected\\:cj-opacity-30[aria-selected=true]{opacity:.3!important}.data-\\[disabled\\=true\\]\\:cj-pointer-events-none[data-disabled=true],.data-\\[disabled\\]\\:cj-pointer-events-none[data-disabled]{pointer-events:none!important}.data-\\[panel-group-direction\\=vertical\\]\\:cj-h-px[data-panel-group-direction=vertical]{height:1px!important}.data-\\[panel-group-direction\\=vertical\\]\\:cj-w-full[data-panel-group-direction=vertical]{width:100%!important}.data-\\[side\\=bottom\\]\\:cj-translate-y-1[data-side=bottom]{--tw-translate-y: .25rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\\[side\\=left\\]\\:-cj-translate-x-1[data-side=left]{--tw-translate-x: -.25rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\\[side\\=right\\]\\:cj-translate-x-1[data-side=right]{--tw-translate-x: .25rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\\[side\\=top\\]\\:-cj-translate-y-1[data-side=top]{--tw-translate-y: -.25rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\\[state\\=checked\\]\\:cj-translate-x-5[data-state=checked]{--tw-translate-x: 1.25rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\\[state\\=unchecked\\]\\:cj-translate-x-0[data-state=unchecked],.data-\\[swipe\\=cancel\\]\\:cj-translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\\[swipe\\=end\\]\\:cj-translate-x-\\[var\\(--radix-toast-swipe-end-x\\)\\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x) !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\\[swipe\\=move\\]\\:cj-translate-x-\\[var\\(--radix-toast-swipe-move-x\\)\\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x) !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}@keyframes cj-accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\\[state\\=closed\\]\\:cj-animate-accordion-up[data-state=closed]{animation:cj-accordion-up .2s ease-out!important}@keyframes cj-accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\\[state\\=open\\]\\:cj-animate-accordion-down[data-state=open]{animation:cj-accordion-down .2s ease-out!important}.data-\\[panel-group-direction\\=vertical\\]\\:cj-flex-col[data-panel-group-direction=vertical]{flex-direction:column!important}.data-\\[state\\=active\\]\\:cj-border-primary[data-state=active]{border-color:hsl(var(--claims-journey-primary))!important}.data-\\[state\\=checked\\]\\:cj-border-primary\\/40[data-state=checked]{border-color:hsl(var(--claims-journey-primary) / .4)!important}.data-\\[active\\=true\\]\\:cj-bg-sidebar-accent[data-active=true]{background-color:hsl(var(--claims-journey-sidebar-accent))!important}.data-\\[active\\]\\:cj-bg-accent\\/50[data-active]{background-color:hsl(var(--claims-journey-accent) / .5)!important}.data-\\[selected\\=\\'true\\'\\]\\:cj-bg-accent[data-selected=true]{background-color:hsl(var(--claims-journey-accent))!important}.data-\\[state\\=active\\]\\:cj-bg-background[data-state=active]{background-color:hsl(var(--claims-journey-background))!important}.data-\\[state\\=active\\]\\:cj-bg-transparent[data-state=active]{background-color:transparent!important}.data-\\[state\\=checked\\]\\:cj-bg-primary[data-state=checked]{background-color:hsl(var(--claims-journey-primary))!important}.data-\\[state\\=checked\\]\\:cj-bg-primary\\/5[data-state=checked]{background-color:hsl(var(--claims-journey-primary) / .05)!important}.data-\\[state\\=on\\]\\:cj-bg-accent[data-state=on],.data-\\[state\\=open\\]\\:cj-bg-accent[data-state=open]{background-color:hsl(var(--claims-journey-accent))!important}.data-\\[state\\=open\\]\\:cj-bg-accent\\/50[data-state=open]{background-color:hsl(var(--claims-journey-accent) / .5)!important}.data-\\[state\\=open\\]\\:cj-bg-secondary[data-state=open]{background-color:hsl(var(--claims-journey-secondary))!important}.data-\\[state\\=selected\\]\\:cj-bg-muted[data-state=selected]{background-color:hsl(var(--claims-journey-muted))!important}.data-\\[state\\=unchecked\\]\\:cj-bg-input[data-state=unchecked]{background-color:hsl(var(--claims-journey-input))!important}.data-\\[active\\=true\\]\\:cj-font-medium[data-active=true]{font-weight:500!important}.data-\\[active\\=true\\]\\:cj-text-sidebar-accent-foreground[data-active=true]{color:hsl(var(--claims-journey-sidebar-accent-foreground))!important}.data-\\[selected\\=true\\]\\:cj-text-accent-foreground[data-selected=true]{color:hsl(var(--claims-journey-accent-foreground))!important}.data-\\[state\\=active\\]\\:cj-text-foreground[data-state=active]{color:hsl(var(--claims-journey-foreground))!important}.data-\\[state\\=checked\\]\\:cj-text-primary-foreground[data-state=checked]{color:hsl(var(--claims-journey-primary-foreground))!important}.data-\\[state\\=on\\]\\:cj-text-accent-foreground[data-state=on],.data-\\[state\\=open\\]\\:cj-text-accent-foreground[data-state=open]{color:hsl(var(--claims-journey-accent-foreground))!important}.data-\\[state\\=open\\]\\:cj-text-muted-foreground[data-state=open]{color:hsl(var(--claims-journey-muted-foreground))!important}.data-\\[disabled\\=true\\]\\:cj-opacity-50[data-disabled=true],.data-\\[disabled\\]\\:cj-opacity-50[data-disabled]{opacity:.5!important}.data-\\[state\\=open\\]\\:cj-opacity-100[data-state=open]{opacity:1!important}.data-\\[state\\=active\\]\\:cj-shadow-none[data-state=active]{--tw-shadow: 0 0 #0000 !important;--tw-shadow-colored: 0 0 #0000 !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.data-\\[state\\=active\\]\\:cj-shadow-sm[data-state=active]{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05) !important;--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.data-\\[swipe\\=move\\]\\:cj-transition-none[data-swipe=move]{transition-property:none!important}.data-\\[state\\=closed\\]\\:cj-duration-300[data-state=closed]{transition-duration:.3s!important}.data-\\[state\\=open\\]\\:cj-duration-500[data-state=open]{transition-duration:.5s!important}.data-\\[motion\\^\\=from-\\]\\:cj-animate-in[data-motion^=from-],.data-\\[state\\=open\\]\\:cj-animate-in[data-state=open],.data-\\[state\\=visible\\]\\:cj-animate-in[data-state=visible]{animation-name:enter!important;animation-duration:.15s!important;--tw-enter-opacity: initial !important;--tw-enter-scale: initial !important;--tw-enter-rotate: initial !important;--tw-enter-translate-x: initial !important;--tw-enter-translate-y: initial !important}.data-\\[motion\\^\\=to-\\]\\:cj-animate-out[data-motion^=to-],.data-\\[state\\=closed\\]\\:cj-animate-out[data-state=closed],.data-\\[state\\=hidden\\]\\:cj-animate-out[data-state=hidden],.data-\\[swipe\\=end\\]\\:cj-animate-out[data-swipe=end]{animation-name:exit!important;animation-duration:.15s!important;--tw-exit-opacity: initial !important;--tw-exit-scale: initial !important;--tw-exit-rotate: initial !important;--tw-exit-translate-x: initial !important;--tw-exit-translate-y: initial !important}.data-\\[motion\\^\\=from-\\]\\:cj-fade-in[data-motion^=from-]{--tw-enter-opacity: 0 !important}.data-\\[motion\\^\\=to-\\]\\:cj-fade-out[data-motion^=to-],.data-\\[state\\=closed\\]\\:cj-fade-out-0[data-state=closed]{--tw-exit-opacity: 0 !important}.data-\\[state\\=closed\\]\\:cj-fade-out-80[data-state=closed]{--tw-exit-opacity: .8 !important}.data-\\[state\\=hidden\\]\\:cj-fade-out[data-state=hidden]{--tw-exit-opacity: 0 !important}.data-\\[state\\=open\\]\\:cj-fade-in-0[data-state=open],.data-\\[state\\=visible\\]\\:cj-fade-in[data-state=visible]{--tw-enter-opacity: 0 !important}.data-\\[state\\=closed\\]\\:cj-zoom-out-95[data-state=closed]{--tw-exit-scale: .95 !important}.data-\\[state\\=open\\]\\:cj-zoom-in-90[data-state=open]{--tw-enter-scale: .9 !important}.data-\\[state\\=open\\]\\:cj-zoom-in-95[data-state=open]{--tw-enter-scale: .95 !important}.data-\\[motion\\=from-end\\]\\:cj-slide-in-from-right-52[data-motion=from-end]{--tw-enter-translate-x: 13rem !important}.data-\\[motion\\=from-start\\]\\:cj-slide-in-from-left-52[data-motion=from-start]{--tw-enter-translate-x: -13rem !important}.data-\\[motion\\=to-end\\]\\:cj-slide-out-to-right-52[data-motion=to-end]{--tw-exit-translate-x: 13rem !important}.data-\\[motion\\=to-start\\]\\:cj-slide-out-to-left-52[data-motion=to-start]{--tw-exit-translate-x: -13rem !important}.data-\\[side\\=bottom\\]\\:cj-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem !important}.data-\\[side\\=left\\]\\:cj-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem !important}.data-\\[side\\=right\\]\\:cj-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem !important}.data-\\[side\\=top\\]\\:cj-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem !important}.data-\\[state\\=closed\\]\\:cj-slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y: 100% !important}.data-\\[state\\=closed\\]\\:cj-slide-out-to-left[data-state=closed]{--tw-exit-translate-x: -100% !important}.data-\\[state\\=closed\\]\\:cj-slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x: -50% !important}.data-\\[state\\=closed\\]\\:cj-slide-out-to-right[data-state=closed],.data-\\[state\\=closed\\]\\:cj-slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100% !important}.data-\\[state\\=closed\\]\\:cj-slide-out-to-top[data-state=closed]{--tw-exit-translate-y: -100% !important}.data-\\[state\\=closed\\]\\:cj-slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y: -48% !important}.data-\\[state\\=open\\]\\:cj-slide-in-from-bottom[data-state=open]{--tw-enter-translate-y: 100% !important}.data-\\[state\\=open\\]\\:cj-slide-in-from-left[data-state=open]{--tw-enter-translate-x: -100% !important}.data-\\[state\\=open\\]\\:cj-slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x: -50% !important}.data-\\[state\\=open\\]\\:cj-slide-in-from-right[data-state=open]{--tw-enter-translate-x: 100% !important}.data-\\[state\\=open\\]\\:cj-slide-in-from-top[data-state=open]{--tw-enter-translate-y: -100% !important}.data-\\[state\\=open\\]\\:cj-slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y: -48% !important}.data-\\[state\\=open\\]\\:cj-slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100% !important}.data-\\[state\\=closed\\]\\:cj-duration-300[data-state=closed]{animation-duration:.3s!important}.data-\\[state\\=open\\]\\:cj-duration-500[data-state=open]{animation-duration:.5s!important}.data-\\[panel-group-direction\\=vertical\\]\\:after\\:cj-left-0[data-panel-group-direction=vertical]:after{content:var(--tw-content)!important;left:0!important}.data-\\[panel-group-direction\\=vertical\\]\\:after\\:cj-h-1[data-panel-group-direction=vertical]:after{content:var(--tw-content)!important;height:.25rem!important}.data-\\[panel-group-direction\\=vertical\\]\\:after\\:cj-w-full[data-panel-group-direction=vertical]:after{content:var(--tw-content)!important;width:100%!important}.data-\\[panel-group-direction\\=vertical\\]\\:after\\:-cj-translate-y-1\\/2[data-panel-group-direction=vertical]:after{content:var(--tw-content)!important;--tw-translate-y: -50% !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\\[panel-group-direction\\=vertical\\]\\:after\\:cj-translate-x-0[data-panel-group-direction=vertical]:after{content:var(--tw-content)!important;--tw-translate-x: 0px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\\[state\\=open\\]\\:hover\\:cj-bg-sidebar-accent:hover[data-state=open]{background-color:hsl(var(--claims-journey-sidebar-accent))!important}.data-\\[state\\=open\\]\\:hover\\:cj-text-sidebar-accent-foreground:hover[data-state=open]{color:hsl(var(--claims-journey-sidebar-accent-foreground))!important}.cj-group[data-collapsible=offcanvas] .group-data-\\[collapsible\\=offcanvas\\]\\:cj-left-\\[calc\\(var\\(--sidebar-width\\)\\*-1\\)\\]{left:calc(var(--sidebar-width) * -1)!important}.cj-group[data-collapsible=offcanvas] .group-data-\\[collapsible\\=offcanvas\\]\\:cj-right-\\[calc\\(var\\(--sidebar-width\\)\\*-1\\)\\]{right:calc(var(--sidebar-width) * -1)!important}.cj-group[data-side=left] .group-data-\\[side\\=left\\]\\:-cj-right-4{right:-1rem!important}.cj-group[data-side=right] .group-data-\\[side\\=right\\]\\:cj-left-0{left:0!important}.cj-group[data-collapsible=icon] .group-data-\\[collapsible\\=icon\\]\\:-cj-mt-8{margin-top:-2rem!important}.cj-group[data-collapsible=icon] .group-data-\\[collapsible\\=icon\\]\\:cj-hidden{display:none!important}.cj-group[data-collapsible=icon] .group-data-\\[collapsible\\=icon\\]\\:cj-w-\\[--sidebar-width-icon\\]{width:var(--sidebar-width-icon)!important}.cj-group[data-collapsible=icon] .group-data-\\[collapsible\\=icon\\]\\:cj-w-\\[calc\\(var\\(--sidebar-width-icon\\)_\\+_theme\\(spacing\\.4\\)\\)\\]{width:calc(var(--sidebar-width-icon) + 1rem)!important}.cj-group[data-collapsible=icon] .group-data-\\[collapsible\\=icon\\]\\:cj-w-\\[calc\\(var\\(--sidebar-width-icon\\)_\\+_theme\\(spacing\\.4\\)_\\+2px\\)\\]{width:calc(var(--sidebar-width-icon) + 1rem + 2px)!important}.cj-group[data-collapsible=offcanvas] .group-data-\\[collapsible\\=offcanvas\\]\\:cj-w-0{width:0px!important}.cj-group[data-collapsible=offcanvas] .group-data-\\[collapsible\\=offcanvas\\]\\:cj-translate-x-0{--tw-translate-x: 0px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cj-group[data-side=right] .group-data-\\[side\\=right\\]\\:cj-rotate-180,.cj-group[data-state=open] .group-data-\\[state\\=open\\]\\:cj-rotate-180{--tw-rotate: 180deg !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cj-group[data-collapsible=icon] .group-data-\\[collapsible\\=icon\\]\\:cj-overflow-hidden{overflow:hidden!important}.cj-group[data-variant=floating] .group-data-\\[variant\\=floating\\]\\:cj-rounded-lg{border-radius:var(--claims-journey-radius)!important}.cj-group[data-variant=floating] .group-data-\\[variant\\=floating\\]\\:cj-border{border-width:1px!important}.cj-group[data-side=left] .group-data-\\[side\\=left\\]\\:cj-border-r{border-right-width:1px!important}.cj-group[data-side=right] .group-data-\\[side\\=right\\]\\:cj-border-l{border-left-width:1px!important}.cj-group[data-variant=floating] .group-data-\\[variant\\=floating\\]\\:cj-border-sidebar-border{border-color:hsl(var(--claims-journey-sidebar-border))!important}.cj-group[data-collapsible=icon] .group-data-\\[collapsible\\=icon\\]\\:cj-opacity-0{opacity:0!important}.cj-group[data-variant=floating] .group-data-\\[variant\\=floating\\]\\:cj-shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.cj-group[data-collapsible=offcanvas] .group-data-\\[collapsible\\=offcanvas\\]\\:after\\:cj-left-full:after{content:var(--tw-content)!important;left:100%!important}.cj-group[data-collapsible=offcanvas] .group-data-\\[collapsible\\=offcanvas\\]\\:hover\\:cj-bg-sidebar:hover{background-color:hsl(var(--claims-journey-sidebar-background))!important}.cj-peer\\/menu-button[data-size=default]~.peer-data-\\[size\\=default\\]\\/menu-button\\:cj-top-1\\.5{top:.375rem!important}.cj-peer\\/menu-button[data-size=lg]~.peer-data-\\[size\\=lg\\]\\/menu-button\\:cj-top-2\\.5{top:.625rem!important}.cj-peer\\/menu-button[data-size=sm]~.peer-data-\\[size\\=sm\\]\\/menu-button\\:cj-top-1{top:.25rem!important}.cj-peer[data-variant=inset]~.peer-data-\\[variant\\=inset\\]\\:cj-min-h-\\[calc\\(100svh-theme\\(spacing\\.4\\)\\)\\]{min-height:calc(100svh - 1rem)!important}.cj-peer\\/menu-button[data-active=true]~.peer-data-\\[active\\=true\\]\\/menu-button\\:cj-text-sidebar-accent-foreground{color:hsl(var(--claims-journey-sidebar-accent-foreground))!important}.dark\\:cj-border-destructive:is(.cj-dark *){border-color:hsl(var(--claims-journey-destructive))!important}.dark\\:cj-bg-blue-950:is(.cj-dark *){--tw-bg-opacity: 1 !important;background-color:rgb(23 37 84 / var(--tw-bg-opacity, 1))!important}@media (min-width: 640px){.sm\\:cj-bottom-0{bottom:0!important}.sm\\:cj-right-0{right:0!important}.sm\\:cj-top-auto{top:auto!important}.sm\\:cj-col-span-2{grid-column:span 2 / span 2!important}.sm\\:cj-col-span-3{grid-column:span 3 / span 3!important}.sm\\:cj-col-span-4{grid-column:span 4 / span 4!important}.sm\\:cj-col-span-6{grid-column:span 6 / span 6!important}.sm\\:cj-mt-0{margin-top:0!important}.sm\\:cj-flex{display:flex!important}.sm\\:cj-w-\\[420px\\]{width:420px!important}.sm\\:cj-max-w-lg{max-width:32rem!important}.sm\\:cj-max-w-sm{max-width:24rem!important}.sm\\:cj-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.sm\\:cj-grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))!important}.sm\\:cj-flex-row{flex-direction:row!important}.sm\\:cj-flex-col{flex-direction:column!important}.sm\\:cj-justify-end{justify-content:flex-end!important}.sm\\:cj-justify-between{justify-content:space-between!important}.sm\\:cj-gap-2\\.5{gap:.625rem!important}.sm\\:cj-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0 !important;margin-right:calc(.5rem * var(--tw-space-x-reverse))!important;margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))!important}.sm\\:cj-rounded-lg{border-radius:var(--claims-journey-radius)!important}.sm\\:cj-p-10{padding:2.5rem!important}.sm\\:cj-p-7{padding:1.75rem!important}.sm\\:cj-px-6{padding-left:1.5rem!important;padding-right:1.5rem!important}.sm\\:cj-text-left{text-align:left!important}.sm\\:cj-text-2xl{font-size:1.5rem!important;line-height:2rem!important}.sm\\:cj-text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.sm\\:cj-text-xl{font-size:1.25rem!important;line-height:1.75rem!important}.data-\\[state\\=open\\]\\:sm\\:cj-slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100% !important}}@media (min-width: 768px){.md\\:cj-absolute{position:absolute!important}.md\\:cj-block{display:block!important}.md\\:cj-flex{display:flex!important}.md\\:cj-hidden{display:none!important}.md\\:cj-w-\\[30\\%\\]{width:30%!important}.md\\:cj-w-\\[70\\%\\]{width:70%!important}.md\\:cj-w-\\[var\\(--radix-navigation-menu-viewport-width\\)\\]{width:var(--radix-navigation-menu-viewport-width)!important}.md\\:cj-w-auto{width:auto!important}.md\\:cj-w-full{width:100%!important}.md\\:cj-max-w-\\[420px\\]{max-width:420px!important}.md\\:cj-shrink-0{flex-shrink:0!important}.md\\:cj-flex-row{flex-direction:row!important}.md\\:cj-px-3{padding-left:.75rem!important;padding-right:.75rem!important}.md\\:cj-py-8{padding-top:2rem!important;padding-bottom:2rem!important}.md\\:cj-text-sm{font-size:.875rem!important;line-height:1.25rem!important}.md\\:cj-opacity-0{opacity:0!important}.after\\:md\\:cj-hidden:after{content:var(--tw-content)!important;display:none!important}.cj-peer[data-variant=inset]~.md\\:peer-data-\\[variant\\=inset\\]\\:cj-m-2{margin:.5rem!important}.cj-peer[data-state=collapsed][data-variant=inset]~.md\\:peer-data-\\[state\\=collapsed\\]\\:peer-data-\\[variant\\=inset\\]\\:cj-ml-2{margin-left:.5rem!important}.cj-peer[data-variant=inset]~.md\\:peer-data-\\[variant\\=inset\\]\\:cj-ml-0{margin-left:0!important}.cj-peer[data-variant=inset]~.md\\:peer-data-\\[variant\\=inset\\]\\:cj-rounded-xl{border-radius:.75rem!important}.cj-peer[data-variant=inset]~.md\\:peer-data-\\[variant\\=inset\\]\\:cj-shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}}.\\[\\&\\:has\\(\\[aria-selected\\]\\)\\]\\:cj-bg-accent:has([aria-selected]){background-color:hsl(var(--claims-journey-accent))!important}.first\\:\\[\\&\\:has\\(\\[aria-selected\\]\\)\\]\\:cj-rounded-l-full:has([aria-selected]):first-child{border-top-left-radius:9999px!important;border-bottom-left-radius:9999px!important}.last\\:\\[\\&\\:has\\(\\[aria-selected\\]\\)\\]\\:cj-rounded-r-full:has([aria-selected]):last-child{border-top-right-radius:9999px!important;border-bottom-right-radius:9999px!important}.\\[\\&\\:has\\(\\[aria-selected\\]\\.day-outside\\)\\]\\:cj-bg-accent\\/50:has([aria-selected].day-outside){background-color:hsl(var(--claims-journey-accent) / .5)!important}.\\[\\&\\:has\\(\\[aria-selected\\]\\.day-range-end\\)\\]\\:cj-rounded-r-full:has([aria-selected].day-range-end){border-top-right-radius:9999px!important;border-bottom-right-radius:9999px!important}.\\[\\&\\:has\\(\\[role\\=checkbox\\]\\)\\]\\:cj-pr-0:has([role=checkbox]){padding-right:0!important}.\\[\\&\\>button\\]\\:cj-hidden>button{display:none!important}.\\[\\&\\>div\\>div\\]\\:\\!cj-block>div>div{display:block!important}.\\[\\&\\>div\\]\\:\\!cj-block>div{display:block!important}.\\[\\&\\>div\\]\\:cj-w-full>div{width:100%!important}.\\[\\&\\>div\\]\\:\\!cj-min-w-0>div{min-width:0px!important}.\\[\\&\\>span\\:last-child\\]\\:cj-truncate>span:last-child{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.\\[\\&\\>span\\]\\:cj-line-clamp-1>span{overflow:hidden!important;display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:1!important}.\\[\\&\\>svg\\+div\\]\\:cj-translate-y-\\[-3px\\]>svg+div{--tw-translate-y: -3px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.\\[\\&\\>svg\\]\\:cj-absolute>svg{position:absolute!important}.\\[\\&\\>svg\\]\\:cj-left-4>svg{left:1rem!important}.\\[\\&\\>svg\\]\\:cj-top-4>svg{top:1rem!important}.\\[\\&\\>svg\\]\\:cj-size-3\\.5>svg{width:.875rem!important;height:.875rem!important}.\\[\\&\\>svg\\]\\:cj-size-4>svg{width:1rem!important;height:1rem!important}.\\[\\&\\>svg\\]\\:cj-h-2\\.5>svg{height:.625rem!important}.\\[\\&\\>svg\\]\\:cj-h-3>svg{height:.75rem!important}.\\[\\&\\>svg\\]\\:cj-w-2\\.5>svg{width:.625rem!important}.\\[\\&\\>svg\\]\\:cj-w-3>svg{width:.75rem!important}.\\[\\&\\>svg\\]\\:cj-shrink-0>svg{flex-shrink:0!important}.\\[\\&\\>svg\\]\\:cj-text-destructive>svg{color:hsl(var(--claims-journey-destructive))!important}.\\[\\&\\>svg\\]\\:cj-text-foreground>svg{color:hsl(var(--claims-journey-foreground))!important}.\\[\\&\\>svg\\]\\:cj-text-muted-foreground>svg{color:hsl(var(--claims-journey-muted-foreground))!important}.\\[\\&\\>svg\\]\\:cj-text-sidebar-accent-foreground>svg{color:hsl(var(--claims-journey-sidebar-accent-foreground))!important}.\\[\\&\\>svg\\~\\*\\]\\:cj-pl-7>svg~*{padding-left:1.75rem!important}.\\[\\&\\>tr\\]\\:last\\:cj-border-b-0:last-child>tr{border-bottom-width:0px!important}.\\[\\&\\[data-panel-group-direction\\=vertical\\]\\>div\\]\\:cj-rotate-90[data-panel-group-direction=vertical]>div{--tw-rotate: 90deg !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.\\[\\&\\[data-state\\=open\\]\\>svg\\]\\:cj-rotate-180[data-state=open]>svg{--tw-rotate: 180deg !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.\\[\\&_\\.recharts-cartesian-axis-tick_text\\]\\:cj-fill-muted-foreground .recharts-cartesian-axis-tick text{fill:hsl(var(--claims-journey-muted-foreground))!important}.\\[\\&_\\.recharts-cartesian-grid_line\\[stroke\\=\\'\\#ccc\\'\\]\\]\\:cj-stroke-border\\/50 .recharts-cartesian-grid line[stroke="#ccc"]{stroke:hsl(var(--claims-journey-border) / .5)!important}.\\[\\&_\\.recharts-curve\\.recharts-tooltip-cursor\\]\\:cj-stroke-border .recharts-curve.recharts-tooltip-cursor{stroke:hsl(var(--claims-journey-border))!important}.\\[\\&_\\.recharts-dot\\[stroke\\=\\'\\#fff\\'\\]\\]\\:cj-stroke-transparent .recharts-dot[stroke="#fff"]{stroke:transparent!important}.\\[\\&_\\.recharts-layer\\]\\:cj-outline-none .recharts-layer{outline:2px solid transparent!important;outline-offset:2px!important}.\\[\\&_\\.recharts-polar-grid_\\[stroke\\=\\'\\#ccc\\'\\]\\]\\:cj-stroke-border .recharts-polar-grid [stroke="#ccc"]{stroke:hsl(var(--claims-journey-border))!important}.\\[\\&_\\.recharts-radial-bar-background-sector\\]\\:cj-fill-muted .recharts-radial-bar-background-sector,.\\[\\&_\\.recharts-rectangle\\.recharts-tooltip-cursor\\]\\:cj-fill-muted .recharts-rectangle.recharts-tooltip-cursor{fill:hsl(var(--claims-journey-muted))!important}.\\[\\&_\\.recharts-reference-line_\\[stroke\\=\\'\\#ccc\\'\\]\\]\\:cj-stroke-border .recharts-reference-line [stroke="#ccc"]{stroke:hsl(var(--claims-journey-border))!important}.\\[\\&_\\.recharts-sector\\[stroke\\=\\'\\#fff\\'\\]\\]\\:cj-stroke-transparent .recharts-sector[stroke="#fff"]{stroke:transparent!important}.\\[\\&_\\.recharts-sector\\]\\:cj-outline-none .recharts-sector,.\\[\\&_\\.recharts-surface\\]\\:cj-outline-none .recharts-surface{outline:2px solid transparent!important;outline-offset:2px!important}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:cj-px-2 [cmdk-group-heading]{padding-left:.5rem!important;padding-right:.5rem!important}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:cj-py-1\\.5 [cmdk-group-heading]{padding-top:.375rem!important;padding-bottom:.375rem!important}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:cj-text-xs [cmdk-group-heading]{font-size:.75rem!important;line-height:1rem!important}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:cj-font-medium [cmdk-group-heading]{font-weight:500!important}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:cj-text-muted-foreground [cmdk-group-heading]{color:hsl(var(--claims-journey-muted-foreground))!important}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:cj-pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0!important}.\\[\\&_\\[cmdk-group\\]\\]\\:cj-px-2 [cmdk-group]{padding-left:.5rem!important;padding-right:.5rem!important}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:cj-h-5 [cmdk-input-wrapper] svg{height:1.25rem!important}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:cj-w-5 [cmdk-input-wrapper] svg{width:1.25rem!important}.\\[\\&_\\[cmdk-input\\]\\]\\:cj-h-12 [cmdk-input]{height:3rem!important}.\\[\\&_\\[cmdk-item\\]\\]\\:cj-px-2 [cmdk-item]{padding-left:.5rem!important;padding-right:.5rem!important}.\\[\\&_\\[cmdk-item\\]\\]\\:cj-py-3 [cmdk-item]{padding-top:.75rem!important;padding-bottom:.75rem!important}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:cj-h-5 [cmdk-item] svg{height:1.25rem!important}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:cj-w-5 [cmdk-item] svg{width:1.25rem!important}.\\[\\&_button\\]\\:cj-ring-offset-0 button,.\\[\\&_input\\]\\:cj-ring-offset-0 input{--tw-ring-offset-width: 0px !important}.\\[\\&_input\\]\\:focus-visible\\:cj-border-ring:focus-visible input{border-color:hsl(var(--claims-journey-ring))!important}.\\[\\&_input\\]\\:focus-visible\\:cj-ring-0:focus-visible input{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.\\[\\&_p\\]\\:cj-leading-relaxed p{line-height:1.625!important}.\\[\\&_svg\\]\\:cj-pointer-events-none svg{pointer-events:none!important}.\\[\\&_svg\\]\\:cj-size-4 svg{width:1rem!important;height:1rem!important}.\\[\\&_svg\\]\\:cj-shrink-0 svg{flex-shrink:0!important}.\\[\\&_tr\\:last-child\\]\\:cj-border-0 tr:last-child{border-width:0px!important}.\\[\\&_tr\\]\\:cj-border-b tr{border-bottom-width:1px!important}[data-side=left][data-collapsible=offcanvas] .\\[\\[data-side\\=left\\]\\[data-collapsible\\=offcanvas\\]_\\&\\]\\:-cj-right-2{right:-.5rem!important}[data-side=left][data-state=collapsed] .\\[\\[data-side\\=left\\]\\[data-state\\=collapsed\\]_\\&\\]\\:cj-cursor-e-resize{cursor:e-resize!important}[data-side=left] .\\[\\[data-side\\=left\\]_\\&\\]\\:cj-cursor-w-resize{cursor:w-resize!important}[data-side=right][data-collapsible=offcanvas] .\\[\\[data-side\\=right\\]\\[data-collapsible\\=offcanvas\\]_\\&\\]\\:-cj-left-2{left:-.5rem!important}[data-side=right][data-state=collapsed] .\\[\\[data-side\\=right\\]\\[data-state\\=collapsed\\]_\\&\\]\\:cj-cursor-w-resize{cursor:w-resize!important}[data-side=right] .\\[\\[data-side\\=right\\]_\\&\\]\\:cj-cursor-e-resize{cursor:e-resize!important}[data-state=closed]>.\\[\\[data-state\\=closed\\]\\>\\&\\]\\:cj-rotate-\\[-90deg\\]{--tw-rotate: -90deg !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}`)),document.head.appendChild(t)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
2
|
-
"use strict";var Lp=Object.defineProperty;var Bp=(e,t,n)=>t in e?Lp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Y=(e,t,n)=>Bp(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),v=require("react"),ws=require("react-dom");function sl(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const _=sl(v),Oo=sl(ws),Ei=e=>{let t;const n=new Set,r=(d,u)=>{const m=typeof d=="function"?d(t):d;if(!Object.is(m,t)){const f=t;t=u??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(p=>p(t,f))}},o=()=>t,c={setState:r,getState:o,getInitialState:()=>l,subscribe:d=>(n.add(d),()=>n.delete(d))},l=t=e(r,o,c);return c},Hp=e=>e?Ei(e):Ei,qp=e=>e;function Yp(e,t=qp){const n=v.useSyncExternalStore(e.subscribe,v.useCallback(()=>t(e.getState()),[e,t]),v.useCallback(()=>t(e.getInitialState()),[e,t]));return v.useDebugValue(n),n}const Mi=e=>{const t=Hp(e),n=r=>Yp(t,r);return Object.assign(n,t),n},Vp=e=>e?Mi(e):Mi,$e=e=>`${e}_${Date.now()}_${Math.random().toString(36).slice(2,7)}`;function Di(){return{steps:[],fields:[],summary:{title:"Summary",show_pricing:!1,show_sidebar:!0,sections:[]},init:{values:{}}}}function Gp(e){return!!e&&typeof e=="object"&&"claimspec_id"in e}function Ti(e){return{field_id:$e("field"),namespace:e.namespace,label:e.label,specId:e.id,schema:e.schema,options:e.options,actor:"customer",required:!1,bindings:[{target_namespace:e.namespace}],placeholder:e.placeholder??void 0,helpText:e.help_text??void 0}}function Ri(e){const t=e.bindings&&e.bindings.length>0?e.bindings.map(n=>({target_namespace:n.target_namespace})):[{target_namespace:e.namespace}];return{field_id:$e("field"),namespace:e.namespace,label:e.label,specId:e.specId??"custom",schema:e.schema,options:e.options??null,actor:e.actor??"customer",required:e.required??!1,bindings:t,widget:e.widget,uploadConfig:e.uploadConfig,allowFuture:e.allowFuture}}function il(e){const t=(e.nodes||[]).map(a=>Up(a)),n=new Map;(e.nodes||[]).forEach((a,i)=>n.set(a.node_id,t[i].field_id));const r=e.mode==="grouped"&&(e.groups||[]).length>0;let o;if(r){const a=Oi((e.groups||[]).map(i=>i.group_id),e.edges||[],e.start_node_id??null);o=a.map(i=>{const c=(e.groups||[]).find(u=>u.group_id===i),l=(c.sections||[]).map(u=>({row_id:$e("row"),layout:"horizontal",field_ids:u.node_ids.map(m=>n.get(m)).filter(m=>!!m)})),d=Ai(i,e.edges||[],a,u=>u);return{step_id:i,title:c.title||"Step",description:"",rows:l.length>0?l:[{row_id:$e("row"),layout:"horizontal",field_ids:[]}],navigation:d}})}else{const a=Oi((e.nodes||[]).map(i=>i.node_id),e.edges||[],e.start_node_id??null);o=a.map(i=>{const c=n.get(i),l=(e.nodes||[]).find(u=>u.node_id===i),d=Ai(i,e.edges||[],a,u=>u);return{step_id:i,title:l.label_override||l.label||l.question_key,description:"",rows:[{row_id:$e("row"),layout:"horizontal",field_ids:c?[c]:[]}],navigation:d}})}return{steps:o,fields:t,summary:{title:"Summary",show_pricing:!1,show_sidebar:!0,sections:[]},init:{values:{}}}}function Up(e){var t,n,r;return{field_id:$e("field"),namespace:e.question_key,label:e.label_override||e.label||e.question_key,labelOverride:e.label_override,specId:e.source_property_spec_id||"custom",schema:e.schema||"v1_string",options:e.options??null,actor:e.actor||"customer",bindings:e.bindings||[{target_namespace:e.question_key}],widget:(t=e.ui)!=null&&t.widget&&e.ui.widget!=="auto"?e.ui.widget:void 0,ui_variant:((n=e.ui)==null?void 0:n.variant)??((r=e.ui)==null?void 0:r.ui_variant),required:!!e.required,uploadConfig:e.upload_config,allowFuture:e.allow_future}}function Oi(e,t,n){var l;if(e.length===0)return[];const r=new Set(t.map(d=>d.to_node_id)),o=n&&e.includes(n)?n:e.find(d=>!r.has(d))||e[0],a=[],i=new Set;let c=o;for(;c&&!i.has(c);){i.add(c),a.push(c);const d=t.filter(f=>f.from_node_id===c);if(d.length===0)break;const u=[...d].sort((f,p)=>(p.priority||0)-(f.priority||0)),m=u.find(f=>f.is_default);c=((m==null?void 0:m.to_node_id)||((l=u[0])==null?void 0:l.to_node_id))??null}for(const d of e)i.has(d)||a.push(d);return a}function Ai(e,t,n,r){const a=t.filter(i=>i.from_node_id===e).sort((i,c)=>(c.priority||0)-(i.priority||0)).map(i=>({rule_id:$e("rule"),condition:i.condition||null,next_step_id:r(i.to_node_id),priority:i.priority||0}));if(a.length===0){const i=n.indexOf(e),c=i>=0&&i<n.length-1?r(n[i+1]):"__submit__";a.push({rule_id:$e("rule"),condition:null,next_step_id:c,priority:0})}return{rules:a}}const pt=Vp((e,t)=>{const n=()=>{const{formConfig:a,theme:i}=t();return{formConfig:JSON.parse(JSON.stringify(a)),theme:JSON.parse(JSON.stringify(i))}},r=()=>{const a=n();e({_history:[...t()._history.slice(-50),a],_future:[],isDirty:!0})},o=a=>{r(),e({formConfig:a(t().formConfig)})};return{formConfig:Di(),theme:{},activeTab:"steps",activeStepId:null,selectedFieldId:null,isDirty:!1,_history:[],_future:[],_push:r,undo:()=>{const{_history:a}=t();if(a.length===0)return;const i=a[a.length-1],c=n();e({formConfig:i.formConfig,theme:i.theme,_history:a.slice(0,-1),_future:[...t()._future,c]})},redo:()=>{const{_future:a}=t();if(a.length===0)return;const i=a[a.length-1],c=n();e({formConfig:i.formConfig,theme:i.theme,_future:a.slice(0,-1),_history:[...t()._history,c]})},canUndo:()=>t()._history.length>0,canRedo:()=>t()._future.length>0,markClean:()=>e({isDirty:!1}),setActiveTab:a=>e({activeTab:a}),setActiveStep:a=>e({activeStepId:a,selectedFieldId:null}),setSelectedField:a=>e({selectedFieldId:a}),updateTheme:a=>{r(),e({theme:{...t().theme,...a}})},resetTheme:()=>{r(),e({theme:{}})},addStep:a=>{const i=$e("step");return o(c=>({...c,steps:[...c.steps,{step_id:i,title:a||`Step ${c.steps.length+1}`,description:"",rows:[{row_id:$e("row"),layout:"horizontal",field_ids:[]}],navigation:{rules:[{rule_id:$e("rule"),condition:null,next_step_id:"__submit__",priority:0}]}}]})),e({activeStepId:i}),i},updateStep:(a,i)=>o(c=>({...c,steps:c.steps.map(l=>l.step_id===a?{...l,...i}:l)})),deleteStep:a=>{var i;o(c=>({...c,steps:c.steps.filter(l=>l.step_id!==a).map(l=>({...l,navigation:{...l.navigation,rules:l.navigation.rules.map(d=>d.next_step_id===a?{...d,next_step_id:"__submit__"}:d)}}))})),t().activeStepId===a&&e({activeStepId:((i=t().formConfig.steps[0])==null?void 0:i.step_id)||null})},reorderSteps:a=>o(i=>({...i,steps:a.map(c=>i.steps.find(l=>l.step_id===c)).filter(c=>!!c)})),moveStep:(a,i)=>o(c=>{const l=c.steps.findIndex(m=>m.step_id===a);if(l<0)return c;const d=i==="up"?l-1:l+1;if(d<0||d>=c.steps.length)return c;const u=[...c.steps];return[u[l],u[d]]=[u[d],u[l]],{...c,steps:u}}),addRow:(a,i="horizontal")=>{const c=$e("row");return o(l=>({...l,steps:l.steps.map(d=>d.step_id===a?{...d,rows:[...d.rows,{row_id:c,layout:i,field_ids:[]}]}:d)})),c},updateRow:(a,i,c)=>o(l=>({...l,steps:l.steps.map(d=>d.step_id===a?{...d,rows:d.rows.map(u=>u.row_id===i?{...u,...c}:u)}:d)})),deleteRow:(a,i)=>o(c=>({...c,steps:c.steps.map(l=>l.step_id===a?{...l,rows:l.rows.filter(d=>d.row_id!==i)}:l)})),moveRow:(a,i,c)=>o(l=>({...l,steps:l.steps.map(d=>{if(d.step_id!==a)return d;const u=d.rows.findIndex(p=>p.row_id===i);if(u<0)return d;const m=c==="up"?u-1:u+1;if(m<0||m>=d.rows.length)return d;const f=[...d.rows];return[f[u],f[m]]=[f[m],f[u]],{...d,rows:f}})})),createField:a=>{const i=Ri(a);return o(c=>({...c,fields:[...c.fields,i]})),i.field_id},createFieldFromSpec:a=>{const i=Ti(a);return o(c=>({...c,fields:[...c.fields,i]})),i.field_id},updateField:(a,i)=>o(c=>({...c,fields:c.fields.map(l=>l.field_id===a?{...l,...i}:l)})),deleteField:a=>{o(i=>({...i,fields:i.fields.filter(c=>c.field_id!==a),steps:i.steps.map(c=>({...c,rows:c.rows.map(l=>({...l,field_ids:l.field_ids.filter(d=>d!==a)}))})),summary:{...i.summary,sections:i.summary.sections.map(c=>({...c,display_fields:c.display_fields.filter(l=>l.field_id!==a)}))}})),t().selectedFieldId===a&&e({selectedFieldId:null})},addFieldToRow:(a,i,c)=>o(l=>({...l,steps:l.steps.map(d=>d.step_id===a?{...d,rows:d.rows.map(u=>u.row_id===i?u.field_ids.includes(c)?u:{...u,field_ids:[...u.field_ids,c]}:u)}:d)})),addNewFieldToRow:(a,i,c)=>{const l=Gp(c)?Ti(c):Ri(c);return o(d=>({...d,fields:[...d.fields,l],steps:d.steps.map(u=>u.step_id===a?{...u,rows:u.rows.map(m=>m.row_id===i?{...m,field_ids:[...m.field_ids,l.field_id]}:m)}:u)})),e({selectedFieldId:l.field_id}),l.field_id},removeFieldFromRow:(a,i,c)=>o(l=>({...l,steps:l.steps.map(d=>d.step_id===a?{...d,rows:d.rows.map(u=>u.row_id===i?{...u,field_ids:u.field_ids.filter(m=>m!==c)}:u)}:d)})),moveFieldInRow:(a,i,c,l)=>o(d=>({...d,steps:d.steps.map(u=>u.step_id!==a?u:{...u,rows:u.rows.map(m=>{if(m.row_id!==i)return m;const f=m.field_ids.indexOf(c);if(f<0)return m;const p=l==="left"?f-1:f+1;if(p<0||p>=m.field_ids.length)return m;const g=[...m.field_ids];return[g[f],g[p]]=[g[p],g[f]],{...m,field_ids:g}})})})),updateStepNavigation:(a,i)=>o(c=>({...c,steps:c.steps.map(l=>l.step_id===a?{...l,navigation:{...l.navigation,...i}}:l)})),setStepApiCall:(a,i)=>o(c=>({...c,steps:c.steps.map(l=>l.step_id===a?{...l,navigation:{...l.navigation,api_call:i}}:l)})),addNavRule:a=>{const i=$e("rule");return o(c=>({...c,steps:c.steps.map(l=>l.step_id===a?{...l,navigation:{...l.navigation,rules:[...l.navigation.rules,{rule_id:i,condition:null,next_step_id:"__submit__",priority:0}]}}:l)})),i},updateNavRule:(a,i,c)=>o(l=>({...l,steps:l.steps.map(d=>d.step_id===a?{...d,navigation:{...d.navigation,rules:d.navigation.rules.map(u=>u.rule_id===i?{...u,...c}:u)}}:d)})),deleteNavRule:(a,i)=>o(c=>({...c,steps:c.steps.map(l=>l.step_id===a?{...l,navigation:{...l.navigation,rules:l.navigation.rules.filter(d=>d.rule_id!==i)}}:l)})),updateSummary:a=>o(i=>({...i,summary:{...i.summary,...a}})),addSummarySection:a=>{const i=$e("section");return o(c=>({...c,summary:{...c.summary,sections:[...c.summary.sections,{section_id:i,title:a||"Section",display_fields:[]}]}})),i},updateSummarySection:(a,i)=>o(c=>({...c,summary:{...c.summary,sections:c.summary.sections.map(l=>l.section_id===a?{...l,...i}:l)}})),deleteSummarySection:a=>o(i=>({...i,summary:{...i.summary,sections:i.summary.sections.filter(c=>c.section_id!==a)}})),addDisplayField:(a,i="form_field")=>{const c=$e("display");return o(l=>({...l,summary:{...l.summary,sections:l.summary.sections.map(d=>d.section_id===a?{...d,display_fields:[...d.display_fields,{display_id:c,source:i,label:"",format:"text"}]}:d)}})),c},updateDisplayField:(a,i,c)=>o(l=>({...l,summary:{...l.summary,sections:l.summary.sections.map(d=>d.section_id===a?{...d,display_fields:d.display_fields.map(u=>u.display_id===i?{...u,...c}:u)}:d)}})),deleteDisplayField:(a,i)=>o(c=>({...c,summary:{...c.summary,sections:c.summary.sections.map(l=>l.section_id===a?{...l,display_fields:l.display_fields.filter(d=>d.display_id!==i)}:l)}})),updateInit:a=>o(i=>({...i,init:{...i.init,...a}})),importJourneySpec:a=>{var c;const i=a.form_config?Va(a.form_config):il(a);e({formConfig:i,theme:a.theme||{},activeStepId:((c=i.steps[0])==null?void 0:c.step_id)||null,selectedFieldId:null,_history:[],_future:[],isDirty:!1})},loadFormConfig:(a,i)=>{var c;e({formConfig:Va(a),theme:i||{},activeStepId:((c=a.steps[0])==null?void 0:c.step_id)||null,selectedFieldId:null,_history:[],_future:[],isDirty:!1})},exportJourneySpec:a=>{const{formConfig:i,theme:c}=t(),l={journey_id:(a==null?void 0:a.journey_id)||`journey_${Date.now()}`,claimspec_id:(a==null?void 0:a.claimspec_id)||"",version:(a==null?void 0:a.version)||"2.0.0",form_config:i};return c&&Object.keys(c).length>0&&(l.theme=c),l},reset:()=>{e({formConfig:Di(),theme:{},activeStepId:null,selectedFieldId:null,_history:[],_future:[],isDirty:!1})}}});function Va(e){var t,n,r,o,a,i;return{steps:(e.steps||[]).map(c=>{var l,d,u;return{step_id:c.step_id||$e("step"),title:c.title||"Step",description:c.description||"",rows:(c.rows&&c.rows.length>0?c.rows:[{row_id:$e("row"),layout:"horizontal",field_ids:[]}]).map(m=>({row_id:m.row_id||$e("row"),layout:m.layout||"horizontal",field_ids:m.field_ids||[],title:m.title,show_divider:m.show_divider})),navigation:{api_call:(l=c.navigation)==null?void 0:l.api_call,button_label:(d=c.navigation)==null?void 0:d.button_label,rules:(u=c.navigation)!=null&&u.rules&&c.navigation.rules.length>0?c.navigation.rules.map(m=>({rule_id:m.rule_id||$e("rule"),condition:m.condition||null,next_step_id:m.next_step_id||"__submit__",priority:m.priority||0})):[{rule_id:$e("rule"),condition:null,next_step_id:"__submit__",priority:0}]}}}),fields:(e.fields||[]).map(c=>({...c,field_id:c.field_id||$e("field")})),summary:{title:((t=e.summary)==null?void 0:t.title)||"Summary",show_pricing:!!((n=e.summary)!=null&&n.show_pricing),show_sidebar:((r=e.summary)==null?void 0:r.show_sidebar)??!0,sections:(((o=e.summary)==null?void 0:o.sections)||[]).map(c=>({section_id:c.section_id||$e("section"),title:c.title||"Section",visible_from_step:c.visible_from_step,until_step:c.until_step,display_fields:(c.display_fields||[]).map(l=>({...l,display_id:l.display_id||$e("display"),format:l.format||"text"}))}))},init:{values:((a=e.init)==null?void 0:a.values)||{},api:(i=e.init)==null?void 0:i.api}}}function zi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Wn(...e){return t=>{let n=!1;const r=e.map(o=>{const a=zi(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():zi(e[o],null)}}}}function ve(...e){return _.useCallback(Wn(...e),e)}var Xp=Symbol.for("react.lazy"),ho=_[" use ".trim().toString()];function Kp(e){return typeof e=="object"&&e!==null&&"then"in e}function cl(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Xp&&"_payload"in e&&Kp(e._payload)}function Ao(e){const t=Qp(e),n=_.forwardRef((r,o)=>{let{children:a,...i}=r;cl(a)&&typeof ho=="function"&&(a=ho(a._payload));const c=_.Children.toArray(a),l=c.find(eh);if(l){const d=l.props.children,u=c.map(m=>m===l?_.Children.count(d)>1?_.Children.only(null):_.isValidElement(d)?d.props.children:null:m);return s.jsx(t,{...i,ref:o,children:_.isValidElement(d)?_.cloneElement(d,void 0,u):null})}return s.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var Jp=Ao("Slot");function Qp(e){const t=_.forwardRef((n,r)=>{let{children:o,...a}=n;if(cl(o)&&typeof ho=="function"&&(o=ho(o._payload)),_.isValidElement(o)){const i=nh(o),c=th(a,o.props);return o.type!==_.Fragment&&(c.ref=r?Wn(r,i):i),_.cloneElement(o,c)}return _.Children.count(o)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Zp=Symbol("radix.slottable");function eh(e){return _.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Zp}function th(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...c)=>{const l=a(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function nh(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ll(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=ll(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function dl(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=ll(e))&&(r&&(r+=" "),r+=t);return r}const Ii=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Wi=dl,Rr=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Wi(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(d=>{const u=n==null?void 0:n[d],m=a==null?void 0:a[d];if(u===null)return null;const f=Ii(u)||Ii(m);return o[d][f]}),c=n&&Object.entries(n).reduce((d,u)=>{let[m,f]=u;return f===void 0||(d[m]=f),d},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,u)=>{let{class:m,className:f,...p}=u;return Object.entries(p).every(g=>{let[h,j]=g;return Array.isArray(j)?j.includes({...a,...c}[h]):{...a,...c}[h]===j})?[...d,m,f]:d},[]);return Wi(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},Ns="-",rh=e=>{const t=ah(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const c=i.split(Ns);return c[0]===""&&c.length!==1&&c.shift(),ul(c,t)||oh(i)},getConflictingClassGroupIds:(i,c)=>{const l=n[i]||[];return c&&r[i]?[...l,...r[i]]:l}}},ul=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?ul(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(Ns);return(i=t.validators.find(({validator:c})=>c(a)))==null?void 0:i.classGroupId},Fi=/^\[(.+)\]$/,oh=e=>{if(Fi.test(e)){const t=Fi.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},ah=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return ih(Object.entries(e.classGroups),n).forEach(([a,i])=>{Ga(i,r,a,t)}),r},Ga=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:$i(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(sh(o)){Ga(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,i])=>{Ga(i,$i(t,a),n,r)})})},$i=(e,t)=>{let n=e;return t.split(Ns).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},sh=e=>e.isThemeGetter,ih=(e,t)=>t?e.map(([n,r])=>{const o=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,c])=>[t+i,c])):a);return[n,o]}):e,ch=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(a,i)=>{n.set(a,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let i=n.get(a);if(i!==void 0)return i;if((i=r.get(a))!==void 0)return o(a,i),i},set(a,i){n.has(a)?n.set(a,i):o(a,i)}}},fl="!",lh=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length,i=c=>{const l=[];let d=0,u=0,m;for(let j=0;j<c.length;j++){let x=c[j];if(d===0){if(x===o&&(r||c.slice(j,j+a)===t)){l.push(c.slice(u,j)),u=j+a;continue}if(x==="/"){m=j;continue}}x==="["?d++:x==="]"&&d--}const f=l.length===0?c:c.substring(u),p=f.startsWith(fl),g=p?f.substring(1):f,h=m&&m>u?m-u:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:h}};return n?c=>n({className:c,parseClassName:i}):i},dh=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},uh=e=>({cache:ch(e.cacheSize),parseClassName:lh(e),...rh(e)}),fh=/\s+/,mh=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],i=e.trim().split(fh);let c="";for(let l=i.length-1;l>=0;l-=1){const d=i[l],{modifiers:u,hasImportantModifier:m,baseClassName:f,maybePostfixModifierPosition:p}=n(d);let g=!!p,h=r(g?f.substring(0,p):f);if(!h){if(!g){c=d+(c.length>0?" "+c:c);continue}if(h=r(f),!h){c=d+(c.length>0?" "+c:c);continue}g=!1}const j=dh(u).join(":"),x=m?j+fl:j,b=x+h;if(a.includes(b))continue;a.push(b);const w=o(h,g);for(let N=0;N<w.length;++N){const S=w[N];a.push(x+S)}c=d+(c.length>0?" "+c:c)}return c};function ph(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ml(t))&&(r&&(r+=" "),r+=n);return r}const ml=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ml(e[r]))&&(n&&(n+=" "),n+=t);return n};function Li(e,...t){let n,r,o,a=i;function i(l){const d=t.reduce((u,m)=>m(u),e());return n=uh(d),r=n.cache.get,o=n.cache.set,a=c,c(l)}function c(l){const d=r(l);if(d)return d;const u=mh(l,n);return o(l,u),u}return function(){return a(ph.apply(null,arguments))}}const ze=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},pl=/^\[(?:([a-z-]+):)?(.+)\]$/i,hh=/^\d+\/\d+$/,_h=new Set(["px","full","screen"]),gh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jh=/\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$/,yh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,vh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Kt=e=>Kn(e)||_h.has(e)||hh.test(e),ln=e=>ir(e,"length",Eh),Kn=e=>!!e&&!Number.isNaN(Number(e)),ya=e=>ir(e,"number",Kn),pr=e=>!!e&&Number.isInteger(Number(e)),bh=e=>e.endsWith("%")&&Kn(e.slice(0,-1)),ge=e=>pl.test(e),dn=e=>gh.test(e),wh=new Set(["length","size","percentage"]),Nh=e=>ir(e,wh,hl),Sh=e=>ir(e,"position",hl),Ch=new Set(["image","url"]),kh=e=>ir(e,Ch,Dh),Ph=e=>ir(e,"",Mh),hr=()=>!0,ir=(e,t,n)=>{const r=pl.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Eh=e=>jh.test(e)&&!yh.test(e),hl=()=>!1,Mh=e=>vh.test(e),Dh=e=>xh.test(e),Bi=()=>{const e=ze("colors"),t=ze("spacing"),n=ze("blur"),r=ze("brightness"),o=ze("borderColor"),a=ze("borderRadius"),i=ze("borderSpacing"),c=ze("borderWidth"),l=ze("contrast"),d=ze("grayscale"),u=ze("hueRotate"),m=ze("invert"),f=ze("gap"),p=ze("gradientColorStops"),g=ze("gradientColorStopPositions"),h=ze("inset"),j=ze("margin"),x=ze("opacity"),b=ze("padding"),w=ze("saturate"),N=ze("scale"),S=ze("sepia"),y=ze("skew"),C=ze("space"),E=ze("translate"),P=()=>["auto","contain","none"],k=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",ge,t],M=()=>[ge,t],A=()=>["",Kt,ln],z=()=>["auto",Kn,ge],G=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",ge],K=()=>["auto","avoid","all","avoid-page","page","left","right","column"],fe=()=>[Kn,ge];return{cacheSize:500,separator:":",theme:{colors:[hr],spacing:[Kt,ln],blur:["none","",dn,ge],brightness:fe(),borderColor:[e],borderRadius:["none","","full",dn,ge],borderSpacing:M(),borderWidth:A(),contrast:fe(),grayscale:R(),hueRotate:fe(),invert:R(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[bh,ln],inset:D(),margin:D(),opacity:fe(),padding:M(),saturate:fe(),scale:fe(),sepia:R(),skew:fe(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",ge]}],container:["container"],columns:[{columns:[dn]}],"break-after":[{"break-after":K()}],"break-before":[{"break-before":K()}],"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"],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:[...G(),ge]}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",pr,ge]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ge]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",pr,ge]}],"grid-cols":[{"grid-cols":[hr]}],"col-start-end":[{col:["auto",{span:["full",pr,ge]},ge]}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":[hr]}],"row-start-end":[{row:["auto",{span:[pr,ge]},ge]}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ge]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ge]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...V()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...V(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...V(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[j]}],mx:[{mx:[j]}],my:[{my:[j]}],ms:[{ms:[j]}],me:[{me:[j]}],mt:[{mt:[j]}],mr:[{mr:[j]}],mb:[{mb:[j]}],ml:[{ml:[j]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ge,t]}],"min-w":[{"min-w":[ge,t,"min","max","fit"]}],"max-w":[{"max-w":[ge,t,"none","full","min","max","fit","prose",{screen:[dn]},dn]}],h:[{h:[ge,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ge,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ge,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ge,t,"auto","min","max","fit"]}],"font-size":[{text:["base",dn,ln]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ya]}],"font-family":[{font:[hr]}],"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:["tighter","tight","normal","wide","wider","widest",ge]}],"line-clamp":[{"line-clamp":["none",Kn,ya]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Kt,ge]}],"list-image":[{"list-image":["none",ge]}],"list-style-type":[{list:["none","disc","decimal",ge]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Kt,ln]}],"underline-offset":[{"underline-offset":["auto",Kt,ge]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...G(),Sh]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Nh]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},kh]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:W()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...W()]}],"outline-offset":[{"outline-offset":[Kt,ge]}],"outline-w":[{outline:[Kt,ln]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:A()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[Kt,ln]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",dn,Ph]}],"shadow-color":[{shadow:[hr]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...Q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",dn,ge]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[m]}],saturate:[{saturate:[w]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ge]}],duration:[{duration:fe()}],ease:[{ease:["linear","in","out","in-out",ge]}],delay:[{delay:fe()}],animate:[{animate:["none","spin","ping","pulse","bounce",ge]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[N]}],"scale-x":[{"scale-x":[N]}],"scale-y":[{"scale-y":[N]}],rotate:[{rotate:[pr,ge]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[y]}],"skew-y":[{"skew-y":[y]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ge]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",ge]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",ge]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Kt,ln,ya]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-s","border-w-e","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-s","border-color-e","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"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","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-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"]}}},Th=(e,{cacheSize:t,prefix:n,separator:r,experimentalParseClassName:o,extend:a={},override:i={}})=>{jr(e,"cacheSize",t),jr(e,"prefix",n),jr(e,"separator",r),jr(e,"experimentalParseClassName",o);for(const c in i)Rh(e[c],i[c]);for(const c in a)Oh(e[c],a[c]);return e},jr=(e,t,n)=>{n!==void 0&&(e[t]=n)},Rh=(e,t)=>{if(t)for(const n in t)jr(e,n,t[n])},Oh=(e,t)=>{if(t)for(const n in t){const r=t[n];r!==void 0&&(e[n]=(e[n]||[]).concat(r))}},Ah=(e,...t)=>typeof e=="function"?Li(Bi,e,...t):Li(()=>Th(Bi(),e),...t),zh=Ah({prefix:"cj-"});function ne(...e){return zh(dl(e))}const Ss=Rr("cj-inline-flex cj-items-center cj-justify-center cj-gap-2 cj-whitespace-nowrap cj-rounded-md cj-text-sm cj-font-medium cj-ring-offset-background cj-transition-colors focus-visible:cj-outline-none focus-visible:cj-ring-2 focus-visible:cj-ring-ring focus-visible:cj-ring-offset-2 disabled:cj-pointer-events-none disabled:cj-opacity-50 [&_svg]:cj-pointer-events-none [&_svg]:cj-size-4 [&_svg]:cj-shrink-0",{variants:{variant:{default:"cj-bg-primary cj-text-primary-foreground hover:cj-bg-primary/90",destructive:"cj-bg-destructive cj-text-destructive-foreground hover:cj-bg-destructive/90",outline:"cj-border cj-border-input cj-bg-background hover:cj-bg-accent hover:cj-text-accent-foreground",secondary:"cj-bg-secondary cj-text-secondary-foreground hover:cj-bg-secondary/80",ghost:"hover:cj-bg-accent hover:cj-text-accent-foreground",link:"cj-text-primary cj-underline-offset-4 hover:cj-underline"},size:{default:"cj-h-12 cj-px-4 cj-py-2",sm:"cj-h-10 cj-rounded-md cj-px-3",lg:"cj-h-14 cj-rounded-md cj-px-8",icon:"cj-h-12 cj-w-12"}},defaultVariants:{variant:"default",size:"default"}}),te=_.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},a)=>{const i=r?Jp:"button";return s.jsx(i,{className:ne(Ss({variant:t,size:n,className:e})),ref:a,...o})});te.displayName="Button";const Ih=Rr("cj-inline-flex cj-items-center cj-rounded-full cj-border cj-px-2.5 cj-py-0.5 cj-text-xs cj-font-semibold cj-transition-colors focus:cj-outline-none focus:cj-ring-2 focus:cj-ring-ring focus:cj-ring-offset-2",{variants:{variant:{default:"cj-border-transparent cj-bg-primary cj-text-primary-foreground hover:cj-bg-primary/80",secondary:"cj-border-transparent cj-bg-secondary cj-text-secondary-foreground hover:cj-bg-secondary/80",destructive:"cj-border-transparent cj-bg-destructive cj-text-destructive-foreground hover:cj-bg-destructive/80",outline:"cj-text-foreground"}},defaultVariants:{variant:"default"}});function it({className:e,variant:t,...n}){return s.jsx("div",{className:ne(Ih({variant:t}),e),...n})}function se(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Wh(e,t){const n=_.createContext(t),r=a=>{const{children:i,...c}=a,l=_.useMemo(()=>c,Object.values(c));return s.jsx(n.Provider,{value:l,children:i})};r.displayName=e+"Provider";function o(a){const i=_.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function _t(e,t=[]){let n=[];function r(a,i){const c=_.createContext(i),l=n.length;n=[...n,i];const d=m=>{var x;const{scope:f,children:p,...g}=m,h=((x=f==null?void 0:f[e])==null?void 0:x[l])||c,j=_.useMemo(()=>g,Object.values(g));return s.jsx(h.Provider,{value:j,children:p})};d.displayName=a+"Provider";function u(m,f){var h;const p=((h=f==null?void 0:f[e])==null?void 0:h[l])||c,g=_.useContext(p);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${m}\` must be used within \`${a}\``)}return[d,u]}const o=()=>{const a=n.map(i=>_.createContext(i));return function(c){const l=(c==null?void 0:c[e])||a;return _.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return o.scopeName=e,[r,Fh(o,...t)]}function Fh(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=r.reduce((c,{useScope:l,scopeName:d})=>{const m=l(a)[`__scope${d}`];return{...c,...m}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Hi(e){const t=$h(e),n=_.forwardRef((r,o)=>{const{children:a,...i}=r,c=_.Children.toArray(a),l=c.find(Bh);if(l){const d=l.props.children,u=c.map(m=>m===l?_.Children.count(d)>1?_.Children.only(null):_.isValidElement(d)?d.props.children:null:m);return s.jsx(t,{...i,ref:o,children:_.isValidElement(d)?_.cloneElement(d,void 0,u):null})}return s.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function $h(e){const t=_.forwardRef((n,r)=>{const{children:o,...a}=n;if(_.isValidElement(o)){const i=qh(o),c=Hh(a,o.props);return o.type!==_.Fragment&&(c.ref=r?Wn(r,i):i),_.cloneElement(o,c)}return _.Children.count(o)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Lh=Symbol("radix.slottable");function Bh(e){return _.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Lh}function Hh(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...c)=>{const l=a(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function qh(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function _l(e){const t=e+"CollectionProvider",[n,r]=_t(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:j,children:x}=h,b=v.useRef(null),w=v.useRef(new Map).current;return s.jsx(o,{scope:j,itemMap:w,collectionRef:b,children:x})};i.displayName=t;const c=e+"CollectionSlot",l=Hi(c),d=v.forwardRef((h,j)=>{const{scope:x,children:b}=h,w=a(c,x),N=ve(j,w.collectionRef);return s.jsx(l,{ref:N,children:b})});d.displayName=c;const u=e+"CollectionItemSlot",m="data-radix-collection-item",f=Hi(u),p=v.forwardRef((h,j)=>{const{scope:x,children:b,...w}=h,N=v.useRef(null),S=ve(j,N),y=a(u,x);return v.useEffect(()=>(y.itemMap.set(N,{ref:N,...w}),()=>void y.itemMap.delete(N))),s.jsx(f,{[m]:"",ref:S,children:b})});p.displayName=u;function g(h){const j=a(e+"CollectionConsumer",h);return v.useCallback(()=>{const b=j.collectionRef.current;if(!b)return[];const w=Array.from(b.querySelectorAll(`[${m}]`));return Array.from(j.itemMap.values()).sort((y,C)=>w.indexOf(y.ref.current)-w.indexOf(C.ref.current))},[j.collectionRef,j.itemMap])}return[{Provider:i,Slot:d,ItemSlot:p},g,r]}var Je=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},Yh=_[" useId ".trim().toString()]||(()=>{}),Vh=0;function $t(e){const[t,n]=_.useState(Yh());return Je(()=>{n(r=>r??String(Vh++))},[e]),t?`radix-${t}`:""}function Gh(e){const t=Uh(e),n=_.forwardRef((r,o)=>{const{children:a,...i}=r,c=_.Children.toArray(a),l=c.find(Kh);if(l){const d=l.props.children,u=c.map(m=>m===l?_.Children.count(d)>1?_.Children.only(null):_.isValidElement(d)?d.props.children:null:m);return s.jsx(t,{...i,ref:o,children:_.isValidElement(d)?_.cloneElement(d,void 0,u):null})}return s.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function Uh(e){const t=_.forwardRef((n,r)=>{const{children:o,...a}=n;if(_.isValidElement(o)){const i=Qh(o),c=Jh(a,o.props);return o.type!==_.Fragment&&(c.ref=r?Wn(r,i):i),_.cloneElement(o,c)}return _.Children.count(o)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Xh=Symbol("radix.slottable");function Kh(e){return _.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Xh}function Jh(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...c)=>{const l=a(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Qh(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Zh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],le=Zh.reduce((e,t)=>{const n=Gh(`Primitive.${t}`),r=_.forwardRef((o,a)=>{const{asChild:i,...c}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(l,{...c,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function e_(e,t){e&&Oo.flushSync(()=>e.dispatchEvent(t))}function rt(e){const t=_.useRef(e);return _.useEffect(()=>{t.current=e}),_.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var t_=_[" useInsertionEffect ".trim().toString()]||Je;function tn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=n_({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:o;{const u=_.useRef(e!==void 0);_.useEffect(()=>{const m=u.current;m!==c&&console.warn(`${r} is changing from ${m?"controlled":"uncontrolled"} to ${c?"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.`),u.current=c},[c,r])}const d=_.useCallback(u=>{var m;if(c){const f=r_(u)?u(e):u;f!==e&&((m=i.current)==null||m.call(i,f))}else a(u)},[c,e,a,i]);return[l,d]}function n_({defaultProp:e,onChange:t}){const[n,r]=_.useState(e),o=_.useRef(n),a=_.useRef(t);return t_(()=>{a.current=t},[t]),_.useEffect(()=>{var i;o.current!==n&&((i=a.current)==null||i.call(a,n),o.current=n)},[n,o]),[n,r,a]}function r_(e){return typeof e=="function"}var o_=_.createContext(void 0);function Or(e){const t=_.useContext(o_);return e||t||"ltr"}var va="rovingFocusGroup.onEntryFocus",a_={bubbles:!1,cancelable:!0},Ar="RovingFocusGroup",[Ua,gl,s_]=_l(Ar),[i_,zo]=_t(Ar,[s_]),[c_,l_]=i_(Ar),jl=_.forwardRef((e,t)=>s.jsx(Ua.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(Ua.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(d_,{...e,ref:t})})}));jl.displayName=Ar;var d_=_.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:d,preventScrollOnEntryFocus:u=!1,...m}=e,f=_.useRef(null),p=ve(t,f),g=Or(a),[h,j]=tn({prop:i,defaultProp:c??null,onChange:l,caller:Ar}),[x,b]=_.useState(!1),w=rt(d),N=gl(n),S=_.useRef(!1),[y,C]=_.useState(0);return _.useEffect(()=>{const E=f.current;if(E)return E.addEventListener(va,w),()=>E.removeEventListener(va,w)},[w]),s.jsx(c_,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:h,onItemFocus:_.useCallback(E=>j(E),[j]),onItemShiftTab:_.useCallback(()=>b(!0),[]),onFocusableItemAdd:_.useCallback(()=>C(E=>E+1),[]),onFocusableItemRemove:_.useCallback(()=>C(E=>E-1),[]),children:s.jsx(le.div,{tabIndex:x||y===0?-1:0,"data-orientation":r,...m,ref:p,style:{outline:"none",...e.style},onMouseDown:se(e.onMouseDown,()=>{S.current=!0}),onFocus:se(e.onFocus,E=>{const P=!S.current;if(E.target===E.currentTarget&&P&&!x){const k=new CustomEvent(va,a_);if(E.currentTarget.dispatchEvent(k),!k.defaultPrevented){const D=N().filter(W=>W.focusable),M=D.find(W=>W.active),A=D.find(W=>W.id===h),G=[M,A,...D].filter(Boolean).map(W=>W.ref.current);xl(G,u)}}S.current=!1}),onBlur:se(e.onBlur,()=>b(!1))})})}),yl="RovingFocusGroupItem",vl=_.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...c}=e,l=$t(),d=a||l,u=l_(yl,n),m=u.currentTabStopId===d,f=gl(n),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:h}=u;return _.useEffect(()=>{if(r)return p(),()=>g()},[r,p,g]),s.jsx(Ua.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:s.jsx(le.span,{tabIndex:m?0:-1,"data-orientation":u.orientation,...c,ref:t,onMouseDown:se(e.onMouseDown,j=>{r?u.onItemFocus(d):j.preventDefault()}),onFocus:se(e.onFocus,()=>u.onItemFocus(d)),onKeyDown:se(e.onKeyDown,j=>{if(j.key==="Tab"&&j.shiftKey){u.onItemShiftTab();return}if(j.target!==j.currentTarget)return;const x=m_(j,u.orientation,u.dir);if(x!==void 0){if(j.metaKey||j.ctrlKey||j.altKey||j.shiftKey)return;j.preventDefault();let w=f().filter(N=>N.focusable).map(N=>N.ref.current);if(x==="last")w.reverse();else if(x==="prev"||x==="next"){x==="prev"&&w.reverse();const N=w.indexOf(j.currentTarget);w=u.loop?p_(w,N+1):w.slice(N+1)}setTimeout(()=>xl(w))}}),children:typeof i=="function"?i({isCurrentTabStop:m,hasTabStop:h!=null}):i})})});vl.displayName=yl;var u_={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function f_(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function m_(e,t,n){const r=f_(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return u_[r]}function xl(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function p_(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var bl=jl,wl=vl;function h_(e,t){return _.useReducer((n,r)=>t[n][r]??n,e)}var gt=e=>{const{present:t,children:n}=e,r=__(t),o=typeof n=="function"?n({present:r.isPresent}):_.Children.only(n),a=ve(r.ref,g_(o));return typeof n=="function"||r.isPresent?_.cloneElement(o,{ref:a}):null};gt.displayName="Presence";function __(e){const[t,n]=_.useState(),r=_.useRef(null),o=_.useRef(e),a=_.useRef("none"),i=e?"mounted":"unmounted",[c,l]=h_(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const d=Kr(r.current);a.current=c==="mounted"?d:"none"},[c]),Je(()=>{const d=r.current,u=o.current;if(u!==e){const f=a.current,p=Kr(d);e?l("MOUNT"):p==="none"||(d==null?void 0:d.display)==="none"?l("UNMOUNT"):l(u&&f!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Je(()=>{if(t){let d;const u=t.ownerDocument.defaultView??window,m=p=>{const h=Kr(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&h&&(l("ANIMATION_END"),!o.current)){const j=t.style.animationFillMode;t.style.animationFillMode="forwards",d=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=j)})}},f=p=>{p.target===t&&(a.current=Kr(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{u.clearTimeout(d),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:_.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function Kr(e){return(e==null?void 0:e.animationName)||"none"}function g_(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Io="Tabs",[j_]=_t(Io,[zo]),Nl=zo(),[y_,Cs]=j_(Io),Sl=_.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:c,activationMode:l="automatic",...d}=e,u=Or(c),[m,f]=tn({prop:r,onChange:o,defaultProp:a??"",caller:Io});return s.jsx(y_,{scope:n,baseId:$t(),value:m,onValueChange:f,orientation:i,dir:u,activationMode:l,children:s.jsx(le.div,{dir:u,"data-orientation":i,...d,ref:t})})});Sl.displayName=Io;var Cl="TabsList",kl=_.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=Cs(Cl,n),i=Nl(n);return s.jsx(bl,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:r,children:s.jsx(le.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});kl.displayName=Cl;var Pl="TabsTrigger",El=_.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=Cs(Pl,n),c=Nl(n),l=Tl(i.baseId,r),d=Rl(i.baseId,r),u=r===i.value;return s.jsx(wl,{asChild:!0,...c,focusable:!o,active:u,children:s.jsx(le.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":d,"data-state":u?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:se(e.onMouseDown,m=>{!o&&m.button===0&&m.ctrlKey===!1?i.onValueChange(r):m.preventDefault()}),onKeyDown:se(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&i.onValueChange(r)}),onFocus:se(e.onFocus,()=>{const m=i.activationMode!=="manual";!u&&!o&&m&&i.onValueChange(r)})})})});El.displayName=Pl;var Ml="TabsContent",Dl=_.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,c=Cs(Ml,n),l=Tl(c.baseId,r),d=Rl(c.baseId,r),u=r===c.value,m=_.useRef(u);return _.useEffect(()=>{const f=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(f)},[]),s.jsx(gt,{present:o||u,children:({present:f})=>s.jsx(le.div,{"data-state":u?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:d,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:f&&a})})});Dl.displayName=Ml;function Tl(e,t){return`${e}-trigger-${t}`}function Rl(e,t){return`${e}-content-${t}`}var v_=Sl,Ol=kl,Al=El,zl=Dl;const x_=v_,Il=_.forwardRef(({className:e,...t},n)=>s.jsx(Ol,{ref:n,className:ne("cj-inline-flex cj-h-10 cj-items-center cj-justify-center cj-rounded-md cj-bg-muted cj-p-1 cj-text-muted-foreground",e),...t}));Il.displayName=Ol.displayName;const yr=_.forwardRef(({className:e,...t},n)=>s.jsx(Al,{ref:n,className:ne("cj-inline-flex cj-items-center cj-justify-center cj-whitespace-nowrap cj-rounded-sm cj-px-3 cj-py-1.5 cj-text-sm cj-font-medium cj-ring-offset-background cj-transition-all data-[state=active]:cj-bg-background data-[state=active]:cj-text-foreground data-[state=active]:cj-shadow-sm focus-visible:cj-outline-none focus-visible:cj-ring-2 focus-visible:cj-ring-ring focus-visible:cj-ring-offset-2 disabled:cj-pointer-events-none disabled:cj-opacity-50",e),...t}));yr.displayName=Al.displayName;const b_=_.forwardRef(({className:e,...t},n)=>s.jsx(zl,{ref:n,className:ne("cj-mt-2 cj-ring-offset-background focus-visible:cj-outline-none focus-visible:cj-ring-2 focus-visible:cj-ring-ring focus-visible:cj-ring-offset-2",e),...t}));b_.displayName=zl.displayName;/**
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(`*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }:root,.jb-widget-root{--claims-journey-background: 210 25% 96.5%;--claims-journey-foreground: 222.2 84% 4.9%;--claims-journey-font-heading: "Poppins", sans-serif;--claims-journey-font-body: "Roboto", sans-serif;--claims-journey-card: 0 0% 100%;--claims-journey-card-foreground: 222.2 84% 4.9%;--claims-journey-popover: 0 0% 100%;--claims-journey-popover-foreground: 222.2 84% 4.9%;--claims-journey-primary: 222.2 47.4% 11.2%;--claims-journey-primary-foreground: 210 40% 98%;--claims-journey-secondary: 210 40% 96.1%;--claims-journey-secondary-foreground: 222.2 47.4% 11.2%;--claims-journey-muted: 210 40% 96.1%;--claims-journey-muted-foreground: 215.4 16.3% 46.9%;--claims-journey-accent: 210 40% 96.1%;--claims-journey-accent-foreground: 222.2 47.4% 11.2%;--claims-journey-destructive: 0 84.2% 60.2%;--claims-journey-destructive-foreground: 210 40% 98%;--claims-journey-border: 214.3 31.8% 91.4%;--claims-journey-input: 214.3 31.8% 91.4%;--claims-journey-ring: 222.2 84% 4.9%;--claims-journey-radius: .75rem;--claims-journey-success: 142 71% 45%;--claims-journey-success-foreground: 0 0% 100%;--claims-journey-sidebar-background: 0 0% 98%;--claims-journey-sidebar-foreground: 240 5.3% 26.1%;--claims-journey-sidebar-primary: 240 5.9% 10%;--claims-journey-sidebar-primary-foreground: 0 0% 98%;--claims-journey-sidebar-accent: 240 4.8% 95.9%;--claims-journey-sidebar-accent-foreground: 240 5.9% 10%;--claims-journey-sidebar-border: 220 13% 91%;--claims-journey-sidebar-ring: 217.2 91.2% 59.8%}.dark{--claims-journey-background: 222.2 84% 4.9%;--claims-journey-foreground: 210 40% 98%;--claims-journey-card: 222.2 84% 4.9%;--claims-journey-card-foreground: 210 40% 98%;--claims-journey-popover: 222.2 84% 4.9%;--claims-journey-popover-foreground: 210 40% 98%;--claims-journey-primary: 210 40% 98%;--claims-journey-primary-foreground: 222.2 47.4% 11.2%;--claims-journey-secondary: 217.2 32.6% 17.5%;--claims-journey-secondary-foreground: 210 40% 98%;--claims-journey-muted: 217.2 32.6% 17.5%;--claims-journey-muted-foreground: 215 20.2% 65.1%;--claims-journey-accent: 217.2 32.6% 17.5%;--claims-journey-accent-foreground: 210 40% 98%;--claims-journey-destructive: 0 62.8% 30.6%;--claims-journey-destructive-foreground: 210 40% 98%;--claims-journey-border: 217.2 32.6% 17.5%;--claims-journey-input: 217.2 32.6% 17.5%;--claims-journey-ring: 212.7 26.8% 83.9%;--claims-journey-sidebar-background: 240 5.9% 10%;--claims-journey-sidebar-foreground: 240 4.8% 95.9%;--claims-journey-sidebar-primary: 224.3 76.3% 48%;--claims-journey-sidebar-primary-foreground: 0 0% 100%;--claims-journey-sidebar-accent: 240 3.7% 15.9%;--claims-journey-sidebar-accent-foreground: 240 4.8% 95.9%;--claims-journey-sidebar-border: 240 3.7% 15.9%;--claims-journey-sidebar-ring: 217.2 91.2% 59.8%}.jb-widget-root,.jb-widget-root *,.jb-widget-root *:before,.jb-widget-root *:after{border-color:hsl(var(--claims-journey-border));box-sizing:border-box}.jb-widget-root{background-color:hsl(var(--claims-journey-background));color:hsl(var(--claims-journey-foreground))}.cj-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border-width:0!important}.cj-pointer-events-none{pointer-events:none!important}.cj-pointer-events-auto{pointer-events:auto!important}.cj-invisible{visibility:hidden!important}.cj-fixed{position:fixed!important}.cj-absolute{position:absolute!important}.cj-relative{position:relative!important}.cj-sticky{position:sticky!important}.cj-inset-0{top:0!important;right:0!important;bottom:0!important;left:0!important}.cj-inset-x-0{left:0!important;right:0!important}.cj-inset-y-0{top:0!important;bottom:0!important}.-cj-bottom-12{bottom:-3rem!important}.-cj-bottom-2{bottom:-.5rem!important}.-cj-left-12{left:-3rem!important}.-cj-right-1{right:-.25rem!important}.-cj-right-12{right:-3rem!important}.-cj-top-1{top:-.25rem!important}.-cj-top-12{top:-3rem!important}.cj-bottom-0{bottom:0!important}.cj-left-0{left:0!important}.cj-left-1{left:.25rem!important}.cj-left-1\\/2{left:50%!important}.cj-left-2{left:.5rem!important}.cj-left-2\\.5{left:.625rem!important}.cj-left-3{left:.75rem!important}.cj-left-\\[50\\%\\]{left:50%!important}.cj-right-0{right:0!important}.cj-right-1{right:.25rem!important}.cj-right-2{right:.5rem!important}.cj-right-3{right:.75rem!important}.cj-right-4{right:1rem!important}.cj-top-0{top:0!important}.cj-top-1{top:.25rem!important}.cj-top-1\\.5{top:.375rem!important}.cj-top-1\\/2{top:50%!important}.cj-top-2{top:.5rem!important}.cj-top-2\\.5{top:.625rem!important}.cj-top-3\\.5{top:.875rem!important}.cj-top-4{top:1rem!important}.cj-top-\\[1px\\]{top:1px!important}.cj-top-\\[50\\%\\]{top:50%!important}.cj-top-\\[60\\%\\]{top:60%!important}.cj-top-full{top:100%!important}.cj-z-10{z-index:10!important}.cj-z-20{z-index:20!important}.cj-z-50{z-index:50!important}.cj-z-\\[100\\]{z-index:100!important}.cj-z-\\[1\\]{z-index:1!important}.cj-m-0{margin:0!important}.-cj-mx-1,.cj--mx-1{margin-left:-.25rem!important;margin-right:-.25rem!important}.cj-mx-1{margin-left:.25rem!important;margin-right:.25rem!important}.cj-mx-2{margin-left:.5rem!important;margin-right:.5rem!important}.cj-mx-3\\.5{margin-left:.875rem!important;margin-right:.875rem!important}.cj-mx-auto{margin-left:auto!important;margin-right:auto!important}.cj-my-0\\.5{margin-top:.125rem!important;margin-bottom:.125rem!important}.cj-my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.-cj-ml-4{margin-left:-1rem!important}.-cj-mt-4{margin-top:-1rem!important}.cj-mb-1{margin-bottom:.25rem!important}.cj-mb-1\\.5{margin-bottom:.375rem!important}.cj-mb-2{margin-bottom:.5rem!important}.cj-mb-3{margin-bottom:.75rem!important}.cj-mb-4{margin-bottom:1rem!important}.cj-mb-6{margin-bottom:1.5rem!important}.cj-ml-0\\.5{margin-left:.125rem!important}.cj-ml-1{margin-left:.25rem!important}.cj-ml-1\\.5{margin-left:.375rem!important}.cj-ml-2{margin-left:.5rem!important}.cj-ml-auto{margin-left:auto!important}.cj-mr-1{margin-right:.25rem!important}.cj-mr-1\\.5{margin-right:.375rem!important}.cj-mr-2{margin-right:.5rem!important}.cj-mt-0{margin-top:0!important}.cj-mt-0\\.5{margin-top:.125rem!important}.cj-mt-1{margin-top:.25rem!important}.cj-mt-1\\.5{margin-top:.375rem!important}.cj-mt-2{margin-top:.5rem!important}.cj-mt-24{margin-top:6rem!important}.cj-mt-3{margin-top:.75rem!important}.cj-mt-4{margin-top:1rem!important}.cj-mt-auto{margin-top:auto!important}.cj-block{display:block!important}.cj-flex{display:flex!important}.cj-inline-flex{display:inline-flex!important}.cj-grid{display:grid!important}.cj-hidden{display:none!important}.cj-aspect-square{aspect-ratio:1 / 1!important}.cj-aspect-video{aspect-ratio:16 / 9!important}.cj-size-4{width:1rem!important;height:1rem!important}.\\!cj-h-3{height:.75rem!important}.cj-h-0{height:0px!important}.cj-h-1{height:.25rem!important}.cj-h-1\\.5{height:.375rem!important}.cj-h-10{height:2.5rem!important}.cj-h-11{height:2.75rem!important}.cj-h-12{height:3rem!important}.cj-h-14{height:3.5rem!important}.cj-h-16{height:4rem!important}.cj-h-2{height:.5rem!important}.cj-h-2\\.5{height:.625rem!important}.cj-h-3{height:.75rem!important}.cj-h-3\\.5{height:.875rem!important}.cj-h-4{height:1rem!important}.cj-h-5{height:1.25rem!important}.cj-h-6{height:1.5rem!important}.cj-h-7{height:1.75rem!important}.cj-h-8{height:2rem!important}.cj-h-9{height:2.25rem!important}.cj-h-\\[1px\\]{height:1px!important}.cj-h-\\[200px\\]{height:200px!important}.cj-h-\\[55vh\\]{height:55vh!important}.cj-h-\\[var\\(--radix-navigation-menu-viewport-height\\)\\]{height:var(--radix-navigation-menu-viewport-height)!important}.cj-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)!important}.cj-h-auto{height:auto!important}.cj-h-full{height:100%!important}.cj-h-px{height:1px!important}.cj-h-svh{height:100svh!important}.cj-max-h-40{max-height:10rem!important}.cj-max-h-60{max-height:15rem!important}.cj-max-h-80{max-height:20rem!important}.cj-max-h-96{max-height:24rem!important}.cj-max-h-\\[300px\\]{max-height:300px!important}.cj-max-h-\\[420px\\]{max-height:420px!important}.cj-max-h-\\[85vh\\]{max-height:85vh!important}.cj-max-h-\\[calc\\(100vh-5rem\\)\\]{max-height:calc(100vh - 5rem)!important}.cj-max-h-screen{max-height:100vh!important}.cj-min-h-0{min-height:0px!important}.cj-min-h-12{min-height:3rem!important}.cj-min-h-\\[100px\\]{min-height:100px!important}.cj-min-h-\\[120px\\]{min-height:120px!important}.cj-min-h-\\[200px\\]{min-height:200px!important}.cj-min-h-\\[48px\\]{min-height:48px!important}.cj-min-h-\\[56px\\]{min-height:56px!important}.cj-min-h-full{min-height:100%!important}.cj-min-h-screen{min-height:100vh!important}.cj-min-h-svh{min-height:100svh!important}.\\!cj-w-3{width:.75rem!important}.cj-w-0{width:0px!important}.cj-w-1{width:.25rem!important}.cj-w-1\\.5{width:.375rem!important}.cj-w-10{width:2.5rem!important}.cj-w-11{width:2.75rem!important}.cj-w-12{width:3rem!important}.cj-w-16{width:4rem!important}.cj-w-2{width:.5rem!important}.cj-w-2\\.5{width:.625rem!important}.cj-w-24{width:6rem!important}.cj-w-28{width:7rem!important}.cj-w-3{width:.75rem!important}.cj-w-3\\.5{width:.875rem!important}.cj-w-3\\/4{width:75%!important}.cj-w-32{width:8rem!important}.cj-w-4{width:1rem!important}.cj-w-48{width:12rem!important}.cj-w-5{width:1.25rem!important}.cj-w-6{width:1.5rem!important}.cj-w-64{width:16rem!important}.cj-w-7{width:1.75rem!important}.cj-w-72{width:18rem!important}.cj-w-8{width:2rem!important}.cj-w-9{width:2.25rem!important}.cj-w-96{width:24rem!important}.cj-w-\\[--sidebar-width\\]{width:var(--sidebar-width)!important}.cj-w-\\[100px\\]{width:100px!important}.cj-w-\\[1px\\]{width:1px!important}.cj-w-\\[260px\\]{width:260px!important}.cj-w-\\[360px\\]{width:360px!important}.cj-w-\\[calc\\(100\\%-2rem\\)\\]{width:calc(100% - 2rem)!important}.cj-w-auto{width:auto!important}.cj-w-full{width:100%!important}.cj-w-max{width:-moz-max-content!important;width:max-content!important}.cj-w-px{width:1px!important}.cj-min-w-0{min-width:0px!important}.cj-min-w-5{min-width:1.25rem!important}.cj-min-w-\\[1\\.75rem\\]{min-width:1.75rem!important}.cj-min-w-\\[12rem\\]{min-width:12rem!important}.cj-min-w-\\[140px\\]{min-width:140px!important}.cj-min-w-\\[180px\\]{min-width:180px!important}.cj-min-w-\\[220px\\]{min-width:220px!important}.cj-min-w-\\[8rem\\]{min-width:8rem!important}.cj-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)!important}.cj-max-w-2xl{max-width:42rem!important}.cj-max-w-3xl{max-width:48rem!important}.cj-max-w-4xl{max-width:56rem!important}.cj-max-w-\\[--skeleton-width\\]{max-width:var(--skeleton-width)!important}.cj-max-w-\\[160px\\]{max-width:160px!important}.cj-max-w-\\[200px\\]{max-width:200px!important}.cj-max-w-\\[240px\\]{max-width:240px!important}.cj-max-w-lg{max-width:32rem!important}.cj-max-w-max{max-width:-moz-max-content!important;max-width:max-content!important}.cj-max-w-md{max-width:28rem!important}.cj-max-w-xl{max-width:36rem!important}.cj-flex-1{flex:1 1 0%!important}.cj-flex-shrink-0,.cj-shrink-0{flex-shrink:0!important}.cj-grow{flex-grow:1!important}.cj-grow-0{flex-grow:0!important}.cj-basis-full{flex-basis:100%!important}.cj-caption-bottom{caption-side:bottom!important}.cj-border-collapse{border-collapse:collapse!important}.-cj-translate-x-1\\/2{--tw-translate-x: -50% !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-cj-translate-x-px{--tw-translate-x: -1px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-cj-translate-y-1\\/2,.cj--translate-y-1\\/2{--tw-translate-y: -50% !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cj-translate-x-\\[-50\\%\\]{--tw-translate-x: -50% !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cj-translate-x-px{--tw-translate-x: 1px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cj-translate-y-\\[-50\\%\\]{--tw-translate-y: -50% !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-cj-rotate-90{--tw-rotate: -90deg !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cj-rotate-180{--tw-rotate: 180deg !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cj-rotate-45{--tw-rotate: 45deg !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cj-rotate-90{--tw-rotate: 90deg !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cj-animate-\\[fadeSlideIn_0\\.35s_ease-out_both\\]{animation:fadeSlideIn .35s ease-out both!important}.cj-animate-\\[fadeSlideIn_0\\.3s_ease-out_both\\]{animation:fadeSlideIn .3s ease-out both!important}@keyframes cj-pulse{50%{opacity:.5}}.cj-animate-pulse{animation:cj-pulse 2s cubic-bezier(.4,0,.6,1) infinite!important}@keyframes cj-spin{to{transform:rotate(360deg)}}.cj-animate-spin{animation:cj-spin 1s linear infinite!important}.cj-cursor-default{cursor:default!important}.cj-cursor-grab{cursor:grab!important}.cj-cursor-not-allowed{cursor:not-allowed!important}.cj-cursor-pointer{cursor:pointer!important}.cj-cursor-wait{cursor:wait!important}.cj-touch-none{touch-action:none!important}.cj-select-none{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}.cj-list-inside{list-style-position:inside!important}.cj-list-disc{list-style-type:disc!important}.cj-list-none{list-style-type:none!important}.cj-appearance-none{-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important}.cj-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))!important}.cj-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.cj-flex-row{flex-direction:row!important}.cj-flex-col{flex-direction:column!important}.cj-flex-col-reverse{flex-direction:column-reverse!important}.cj-flex-wrap{flex-wrap:wrap!important}.cj-items-start{align-items:flex-start!important}.cj-items-end{align-items:flex-end!important}.cj-items-center{align-items:center!important}.cj-items-stretch{align-items:stretch!important}.cj-justify-end{justify-content:flex-end!important}.cj-justify-center{justify-content:center!important}.cj-justify-between{justify-content:space-between!important}.cj-gap-0\\.5{gap:.125rem!important}.cj-gap-1{gap:.25rem!important}.cj-gap-1\\.5{gap:.375rem!important}.cj-gap-2{gap:.5rem!important}.cj-gap-3{gap:.75rem!important}.cj-gap-4{gap:1rem!important}.cj-gap-6{gap:1.5rem!important}.cj-space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0 !important;margin-right:calc(.25rem * var(--tw-space-x-reverse))!important;margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))!important}.cj-space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0 !important;margin-right:calc(1rem * var(--tw-space-x-reverse))!important;margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))!important}.cj-space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0 !important;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)))!important;margin-bottom:calc(.125rem * var(--tw-space-y-reverse))!important}.cj-space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0 !important;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)))!important;margin-bottom:calc(.25rem * var(--tw-space-y-reverse))!important}.cj-space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0 !important;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)))!important;margin-bottom:calc(.375rem * var(--tw-space-y-reverse))!important}.cj-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0 !important;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)))!important;margin-bottom:calc(.5rem * var(--tw-space-y-reverse))!important}.cj-space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0 !important;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)))!important;margin-bottom:calc(.75rem * var(--tw-space-y-reverse))!important}.cj-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0 !important;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)))!important;margin-bottom:calc(1rem * var(--tw-space-y-reverse))!important}.cj-space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0 !important;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)))!important;margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))!important}.cj-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0 !important;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)))!important;margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))!important}.cj-space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0 !important;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)))!important;margin-bottom:calc(2rem * var(--tw-space-y-reverse))!important}.cj-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0 !important;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))!important;border-bottom-width:calc(1px * var(--tw-divide-y-reverse))!important}.cj-divide-border\\/30>:not([hidden])~:not([hidden]){border-color:hsl(var(--claims-journey-border) / .3)!important}.cj-self-start{align-self:flex-start!important}.cj-overflow-auto{overflow:auto!important}.cj-overflow-hidden{overflow:hidden!important}.cj-overflow-visible{overflow:visible!important}.cj-overflow-y-auto{overflow-y:auto!important}.cj-overflow-x-hidden{overflow-x:hidden!important}.cj-overflow-y-scroll{overflow-y:scroll!important}.cj-truncate{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.cj-whitespace-nowrap{white-space:nowrap!important}.cj-break-words{overflow-wrap:break-word!important}.cj-break-all{word-break:break-all!important}.cj-rounded{border-radius:.25rem!important}.cj-rounded-2xl{border-radius:1rem!important}.cj-rounded-\\[2px\\]{border-radius:2px!important}.cj-rounded-\\[inherit\\]{border-radius:inherit!important}.cj-rounded-full{border-radius:9999px!important}.cj-rounded-lg{border-radius:var(--claims-journey-radius)!important}.cj-rounded-md{border-radius:calc(var(--claims-journey-radius) - 2px)!important}.cj-rounded-none{border-radius:0!important}.cj-rounded-sm{border-radius:calc(var(--claims-journey-radius) - 4px)!important}.cj-rounded-xl{border-radius:.75rem!important}.cj-rounded-t-\\[10px\\]{border-top-left-radius:10px!important;border-top-right-radius:10px!important}.cj-rounded-tl-sm{border-top-left-radius:calc(var(--claims-journey-radius) - 4px)!important}.\\!cj-border-2{border-width:2px!important}.cj-border{border-width:1px!important}.cj-border-0{border-width:0px!important}.cj-border-2{border-width:2px!important}.cj-border-\\[1\\.5px\\]{border-width:1.5px!important}.cj-border-y{border-top-width:1px!important;border-bottom-width:1px!important}.cj-border-b{border-bottom-width:1px!important}.cj-border-b-2{border-bottom-width:2px!important}.cj-border-l{border-left-width:1px!important}.cj-border-r{border-right-width:1px!important}.cj-border-t{border-top-width:1px!important}.cj-border-t-2{border-top-width:2px!important}.cj-border-dashed{border-style:dashed!important}.cj-border-dotted{border-style:dotted!important}.cj-border-none{border-style:none!important}.\\!cj-border-background{border-color:hsl(var(--claims-journey-background))!important}.\\!cj-border-border{border-color:hsl(var(--claims-journey-border))!important}.cj-border-\\[--color-border\\]{border-color:var(--color-border)!important}.cj-border-background{border-color:hsl(var(--claims-journey-background))!important}.cj-border-border{border-color:hsl(var(--claims-journey-border))!important}.cj-border-border\\/30{border-color:hsl(var(--claims-journey-border) / .3)!important}.cj-border-border\\/40{border-color:hsl(var(--claims-journey-border) / .4)!important}.cj-border-border\\/50{border-color:hsl(var(--claims-journey-border) / .5)!important}.cj-border-border\\/60{border-color:hsl(var(--claims-journey-border) / .6)!important}.cj-border-card{border-color:hsl(var(--claims-journey-card))!important}.cj-border-destructive{border-color:hsl(var(--claims-journey-destructive))!important}.cj-border-destructive\\/30{border-color:hsl(var(--claims-journey-destructive) / .3)!important}.cj-border-destructive\\/40{border-color:hsl(var(--claims-journey-destructive) / .4)!important}.cj-border-destructive\\/50{border-color:hsl(var(--claims-journey-destructive) / .5)!important}.cj-border-input{border-color:hsl(var(--claims-journey-input))!important}.cj-border-muted-foreground\\/25{border-color:hsl(var(--claims-journey-muted-foreground) / .25)!important}.cj-border-muted\\/30{border-color:hsl(var(--claims-journey-muted) / .3)!important}.cj-border-primary{border-color:hsl(var(--claims-journey-primary))!important}.cj-border-primary\\/40{border-color:hsl(var(--claims-journey-primary) / .4)!important}.cj-border-primary\\/50{border-color:hsl(var(--claims-journey-primary) / .5)!important}.cj-border-sidebar-border{border-color:hsl(var(--claims-journey-sidebar-border))!important}.cj-border-transparent{border-color:transparent!important}.cj-border-yellow-500{--tw-border-opacity: 1 !important;border-color:rgb(234 179 8 / var(--tw-border-opacity, 1))!important}.cj-border-l-transparent{border-left-color:transparent!important}.cj-border-t-transparent{border-top-color:transparent!important}.\\!cj-bg-background{background-color:hsl(var(--claims-journey-background))!important}.\\!cj-bg-primary{background-color:hsl(var(--claims-journey-primary))!important}.cj-bg-\\[--color-bg\\]{background-color:var(--color-bg)!important}.cj-bg-\\[hsl\\(var\\(--claims-journey-success\\)\\/0\\.15\\)\\]{background-color:hsl(var(--claims-journey-success)/.15)!important}.cj-bg-accent{background-color:hsl(var(--claims-journey-accent))!important}.cj-bg-background{background-color:hsl(var(--claims-journey-background))!important}.cj-bg-background\\/50{background-color:hsl(var(--claims-journey-background) / .5)!important}.cj-bg-black\\/80{background-color:#000c!important}.cj-bg-blue-50{--tw-bg-opacity: 1 !important;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))!important}.cj-bg-blue-500{--tw-bg-opacity: 1 !important;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))!important}.cj-bg-border{background-color:hsl(var(--claims-journey-border))!important}.cj-bg-card{background-color:hsl(var(--claims-journey-card))!important}.cj-bg-cyan-500{--tw-bg-opacity: 1 !important;background-color:rgb(6 182 212 / var(--tw-bg-opacity, 1))!important}.cj-bg-destructive{background-color:hsl(var(--claims-journey-destructive))!important}.cj-bg-destructive\\/10{background-color:hsl(var(--claims-journey-destructive) / .1)!important}.cj-bg-emerald-500{--tw-bg-opacity: 1 !important;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))!important}.cj-bg-foreground{background-color:hsl(var(--claims-journey-foreground))!important}.cj-bg-green-500{--tw-bg-opacity: 1 !important;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))!important}.cj-bg-indigo-500{--tw-bg-opacity: 1 !important;background-color:rgb(99 102 241 / var(--tw-bg-opacity, 1))!important}.cj-bg-lime-500{--tw-bg-opacity: 1 !important;background-color:rgb(132 204 22 / var(--tw-bg-opacity, 1))!important}.cj-bg-muted{background-color:hsl(var(--claims-journey-muted))!important}.cj-bg-muted\\/20{background-color:hsl(var(--claims-journey-muted) / .2)!important}.cj-bg-muted\\/30{background-color:hsl(var(--claims-journey-muted) / .3)!important}.cj-bg-muted\\/40{background-color:hsl(var(--claims-journey-muted) / .4)!important}.cj-bg-muted\\/50{background-color:hsl(var(--claims-journey-muted) / .5)!important}.cj-bg-orange-500{--tw-bg-opacity: 1 !important;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))!important}.cj-bg-popover{background-color:hsl(var(--claims-journey-popover))!important}.cj-bg-primary{background-color:hsl(var(--claims-journey-primary))!important}.cj-bg-primary\\/10{background-color:hsl(var(--claims-journey-primary) / .1)!important}.cj-bg-primary\\/5{background-color:hsl(var(--claims-journey-primary) / .05)!important}.cj-bg-purple-500{--tw-bg-opacity: 1 !important;background-color:rgb(168 85 247 / var(--tw-bg-opacity, 1))!important}.cj-bg-rose-500{--tw-bg-opacity: 1 !important;background-color:rgb(244 63 94 / var(--tw-bg-opacity, 1))!important}.cj-bg-secondary{background-color:hsl(var(--claims-journey-secondary))!important}.cj-bg-sidebar{background-color:hsl(var(--claims-journey-sidebar-background))!important}.cj-bg-sidebar-border{background-color:hsl(var(--claims-journey-sidebar-border))!important}.cj-bg-teal-500{--tw-bg-opacity: 1 !important;background-color:rgb(20 184 166 / var(--tw-bg-opacity, 1))!important}.cj-bg-transparent{background-color:transparent!important}.cj-bg-yellow-500{--tw-bg-opacity: 1 !important;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))!important}.cj-fill-current{fill:currentColor!important}.cj-p-0{padding:0!important}.cj-p-0\\.5{padding:.125rem!important}.cj-p-1{padding:.25rem!important}.cj-p-2{padding:.5rem!important}.cj-p-3{padding:.75rem!important}.cj-p-4{padding:1rem!important}.cj-p-5{padding:1.25rem!important}.cj-p-6{padding:1.5rem!important}.cj-p-8{padding:2rem!important}.cj-p-\\[1px\\]{padding:1px!important}.cj-px-1{padding-left:.25rem!important;padding-right:.25rem!important}.cj-px-2{padding-left:.5rem!important;padding-right:.5rem!important}.cj-px-2\\.5{padding-left:.625rem!important;padding-right:.625rem!important}.cj-px-3{padding-left:.75rem!important;padding-right:.75rem!important}.cj-px-4{padding-left:1rem!important;padding-right:1rem!important}.cj-px-5{padding-left:1.25rem!important;padding-right:1.25rem!important}.cj-px-6{padding-left:1.5rem!important;padding-right:1.5rem!important}.cj-px-8{padding-left:2rem!important;padding-right:2rem!important}.cj-py-0\\.5{padding-top:.125rem!important;padding-bottom:.125rem!important}.cj-py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.cj-py-1\\.5{padding-top:.375rem!important;padding-bottom:.375rem!important}.cj-py-12{padding-top:3rem!important;padding-bottom:3rem!important}.cj-py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.cj-py-2\\.5{padding-top:.625rem!important;padding-bottom:.625rem!important}.cj-py-3{padding-top:.75rem!important;padding-bottom:.75rem!important}.cj-py-3\\.5{padding-top:.875rem!important;padding-bottom:.875rem!important}.cj-py-4{padding-top:1rem!important;padding-bottom:1rem!important}.cj-py-6{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.cj-py-8{padding-top:2rem!important;padding-bottom:2rem!important}.cj-pb-1{padding-bottom:.25rem!important}.cj-pb-2{padding-bottom:.5rem!important}.cj-pb-3{padding-bottom:.75rem!important}.cj-pb-4{padding-bottom:1rem!important}.cj-pl-1{padding-left:.25rem!important}.cj-pl-2{padding-left:.5rem!important}.cj-pl-2\\.5{padding-left:.625rem!important}.cj-pl-4{padding-left:1rem!important}.cj-pl-8{padding-left:2rem!important}.cj-pl-9{padding-left:2.25rem!important}.cj-pr-1{padding-right:.25rem!important}.cj-pr-12{padding-right:3rem!important}.cj-pr-2{padding-right:.5rem!important}.cj-pr-2\\.5{padding-right:.625rem!important}.cj-pr-3{padding-right:.75rem!important}.cj-pr-4{padding-right:1rem!important}.cj-pr-6{padding-right:1.5rem!important}.cj-pr-8{padding-right:2rem!important}.cj-pt-0{padding-top:0!important}.cj-pt-1{padding-top:.25rem!important}.cj-pt-2{padding-top:.5rem!important}.cj-pt-3{padding-top:.75rem!important}.cj-pt-4{padding-top:1rem!important}.cj-pt-8{padding-top:2rem!important}.cj-text-left{text-align:left!important}.cj-text-center{text-align:center!important}.cj-text-right{text-align:right!important}.cj-align-middle{vertical-align:middle!important}.cj-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace!important}.cj-text-2xl{font-size:1.5rem!important;line-height:2rem!important}.cj-text-4xl{font-size:2.25rem!important;line-height:2.5rem!important}.cj-text-\\[10px\\]{font-size:10px!important}.cj-text-\\[11px\\]{font-size:11px!important}.cj-text-\\[9px\\]{font-size:9px!important}.cj-text-base{font-size:1rem!important;line-height:1.5rem!important}.cj-text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.cj-text-sm{font-size:.875rem!important;line-height:1.25rem!important}.cj-text-xl{font-size:1.25rem!important;line-height:1.75rem!important}.cj-text-xs{font-size:.75rem!important;line-height:1rem!important}.cj-font-bold{font-weight:700!important}.cj-font-medium{font-weight:500!important}.cj-font-normal{font-weight:400!important}.cj-font-semibold{font-weight:600!important}.cj-uppercase{text-transform:uppercase!important}.cj-capitalize{text-transform:capitalize!important}.cj-italic{font-style:italic!important}.cj-tabular-nums{--tw-numeric-spacing: tabular-nums !important;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)!important}.cj-leading-none{line-height:1!important}.cj-leading-relaxed{line-height:1.625!important}.cj-leading-snug{line-height:1.375!important}.cj-leading-tight{line-height:1.25!important}.cj-tracking-tight{letter-spacing:-.025em!important}.cj-tracking-wide{letter-spacing:.025em!important}.cj-tracking-wider{letter-spacing:.05em!important}.cj-tracking-widest{letter-spacing:.1em!important}.cj-text-\\[hsl\\(var\\(--claims-journey-success\\)\\)\\]{color:hsl(var(--claims-journey-success))!important}.cj-text-amber-600{--tw-text-opacity: 1 !important;color:rgb(217 119 6 / var(--tw-text-opacity, 1))!important}.cj-text-card-foreground{color:hsl(var(--claims-journey-card-foreground))!important}.cj-text-current{color:currentColor!important}.cj-text-destructive{color:hsl(var(--claims-journey-destructive))!important}.cj-text-destructive-foreground{color:hsl(var(--claims-journey-destructive-foreground))!important}.cj-text-destructive\\/80{color:hsl(var(--claims-journey-destructive) / .8)!important}.cj-text-foreground{color:hsl(var(--claims-journey-foreground))!important}.cj-text-foreground\\/50{color:hsl(var(--claims-journey-foreground) / .5)!important}.cj-text-foreground\\/80{color:hsl(var(--claims-journey-foreground) / .8)!important}.cj-text-green-500{--tw-text-opacity: 1 !important;color:rgb(34 197 94 / var(--tw-text-opacity, 1))!important}.cj-text-green-600{--tw-text-opacity: 1 !important;color:rgb(22 163 74 / var(--tw-text-opacity, 1))!important}.cj-text-muted-foreground{color:hsl(var(--claims-journey-muted-foreground))!important}.cj-text-muted-foreground\\/40{color:hsl(var(--claims-journey-muted-foreground) / .4)!important}.cj-text-muted-foreground\\/60{color:hsl(var(--claims-journey-muted-foreground) / .6)!important}.cj-text-muted-foreground\\/70{color:hsl(var(--claims-journey-muted-foreground) / .7)!important}.cj-text-popover-foreground{color:hsl(var(--claims-journey-popover-foreground))!important}.cj-text-primary{color:hsl(var(--claims-journey-primary))!important}.cj-text-primary-foreground{color:hsl(var(--claims-journey-primary-foreground))!important}.cj-text-secondary-foreground{color:hsl(var(--claims-journey-secondary-foreground))!important}.cj-text-sidebar-foreground{color:hsl(var(--claims-journey-sidebar-foreground))!important}.cj-text-sidebar-foreground\\/70{color:hsl(var(--claims-journey-sidebar-foreground) / .7)!important}.cj-text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity, 1))!important}.cj-text-yellow-500{--tw-text-opacity: 1 !important;color:rgb(234 179 8 / var(--tw-text-opacity, 1))!important}.cj-text-yellow-600{--tw-text-opacity: 1 !important;color:rgb(202 138 4 / var(--tw-text-opacity, 1))!important}.cj-underline{text-decoration-line:underline!important}.cj-underline-offset-4{text-underline-offset:4px!important}.cj-opacity-0{opacity:0!important}.cj-opacity-40{opacity:.4!important}.cj-opacity-50{opacity:.5!important}.cj-opacity-60{opacity:.6!important}.cj-opacity-70{opacity:.7!important}.cj-opacity-90{opacity:.9!important}.cj-shadow-\\[0_0_0_1px_hsl\\(var\\(--claims-journey-sidebar-border\\)\\)\\]{--tw-shadow: 0 0 0 1px hsl(var(--claims-journey-sidebar-border)) !important;--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.cj-shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.cj-shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.cj-shadow-none{--tw-shadow: 0 0 #0000 !important;--tw-shadow-colored: 0 0 #0000 !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.cj-shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05) !important;--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.cj-shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.cj-shadow-primary\\/20{--tw-shadow-color: hsl(var(--claims-journey-primary) / .2) !important;--tw-shadow: var(--tw-shadow-colored) !important}.cj-outline-none{outline:2px solid transparent!important;outline-offset:2px!important}.cj-ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.cj-ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.cj-ring-destructive\\/40{--tw-ring-color: hsl(var(--claims-journey-destructive) / .4) !important}.cj-ring-primary\\/20{--tw-ring-color: hsl(var(--claims-journey-primary) / .2) !important}.cj-ring-primary\\/30{--tw-ring-color: hsl(var(--claims-journey-primary) / .3) !important}.cj-ring-primary\\/50{--tw-ring-color: hsl(var(--claims-journey-primary) / .5) !important}.cj-ring-ring{--tw-ring-color: hsl(var(--claims-journey-ring)) !important}.cj-ring-sidebar-ring{--tw-ring-color: hsl(var(--claims-journey-sidebar-ring)) !important}.cj-ring-offset-background{--tw-ring-offset-color: hsl(var(--claims-journey-background)) !important}.cj-transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.cj-transition-\\[left\\,right\\,width\\]{transition-property:left,right,width!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.cj-transition-\\[margin\\,opa\\]{transition-property:margin,opa!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.cj-transition-\\[width\\,height\\,padding\\]{transition-property:width,height,padding!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.cj-transition-\\[width\\]{transition-property:width!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.cj-transition-all{transition-property:all!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.cj-transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.cj-transition-opacity{transition-property:opacity!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.cj-transition-transform{transition-property:transform!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.cj-duration-1000{transition-duration:1s!important}.cj-duration-150{transition-duration:.15s!important}.cj-duration-200{transition-duration:.2s!important}.cj-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.cj-ease-linear{transition-timing-function:linear!important}@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))}}@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))}}.cj-animate-in{animation-name:enter!important;animation-duration:.15s!important;--tw-enter-opacity: initial !important;--tw-enter-scale: initial !important;--tw-enter-rotate: initial !important;--tw-enter-translate-x: initial !important;--tw-enter-translate-y: initial !important}.cj-fade-in-0{--tw-enter-opacity: 0 !important}.cj-fade-in-80{--tw-enter-opacity: .8 !important}.cj-zoom-in-95{--tw-enter-scale: .95 !important}.cj-duration-1000{animation-duration:1s!important}.cj-duration-150{animation-duration:.15s!important}.cj-duration-200{animation-duration:.2s!important}.cj-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)!important}.cj-ease-linear{animation-timing-function:linear!important}@keyframes fadeSlideIn{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}.file\\:cj-border-0::file-selector-button{border-width:0px!important}.file\\:cj-bg-transparent::file-selector-button{background-color:transparent!important}.file\\:cj-text-sm::file-selector-button{font-size:.875rem!important;line-height:1.25rem!important}.file\\:cj-font-medium::file-selector-button{font-weight:500!important}.file\\:cj-text-foreground::file-selector-button{color:hsl(var(--claims-journey-foreground))!important}.placeholder\\:cj-text-muted-foreground::-moz-placeholder{color:hsl(var(--claims-journey-muted-foreground))!important}.placeholder\\:cj-text-muted-foreground::placeholder{color:hsl(var(--claims-journey-muted-foreground))!important}.after\\:cj-absolute:after{content:var(--tw-content)!important;position:absolute!important}.after\\:-cj-inset-2:after{content:var(--tw-content)!important;top:-.5rem!important;right:-.5rem!important;bottom:-.5rem!important;left:-.5rem!important}.after\\:cj-inset-y-0:after{content:var(--tw-content)!important;top:0!important;bottom:0!important}.after\\:cj-left-1\\/2:after{content:var(--tw-content)!important;left:50%!important}.after\\:cj-w-1:after{content:var(--tw-content)!important;width:.25rem!important}.after\\:cj-w-\\[2px\\]:after{content:var(--tw-content)!important;width:2px!important}.after\\:-cj-translate-x-1\\/2:after{content:var(--tw-content)!important;--tw-translate-x: -50% !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.first\\:cj-rounded-l-md:first-child{border-top-left-radius:calc(var(--claims-journey-radius) - 2px)!important;border-bottom-left-radius:calc(var(--claims-journey-radius) - 2px)!important}.first\\:cj-border-l:first-child{border-left-width:1px!important}.last\\:cj-rounded-r-md:last-child{border-top-right-radius:calc(var(--claims-journey-radius) - 2px)!important;border-bottom-right-radius:calc(var(--claims-journey-radius) - 2px)!important}.focus-within\\:cj-relative:focus-within{position:relative!important}.focus-within\\:cj-z-20:focus-within{z-index:20!important}.hover\\:\\!cj-h-4:hover{height:1rem!important}.hover\\:\\!cj-w-4:hover{width:1rem!important}.hover\\:cj-border-destructive\\/75:hover{border-color:hsl(var(--claims-journey-destructive) / .75)!important}.hover\\:cj-border-muted-foreground\\/50:hover{border-color:hsl(var(--claims-journey-muted-foreground) / .5)!important}.hover\\:cj-border-primary\\/40:hover{border-color:hsl(var(--claims-journey-primary) / .4)!important}.hover\\:cj-border-primary\\/50:hover{border-color:hsl(var(--claims-journey-primary) / .5)!important}.hover\\:cj-border-primary\\/60:hover{border-color:hsl(var(--claims-journey-primary) / .6)!important}.hover\\:\\!cj-bg-primary\\/80:hover{background-color:hsl(var(--claims-journey-primary) / .8)!important}.hover\\:cj-bg-accent:hover{background-color:hsl(var(--claims-journey-accent))!important}.hover\\:cj-bg-accent\\/40:hover{background-color:hsl(var(--claims-journey-accent) / .4)!important}.hover\\:cj-bg-accent\\/50:hover{background-color:hsl(var(--claims-journey-accent) / .5)!important}.hover\\:cj-bg-accent\\/60:hover{background-color:hsl(var(--claims-journey-accent) / .6)!important}.hover\\:cj-bg-destructive\\/10:hover{background-color:hsl(var(--claims-journey-destructive) / .1)!important}.hover\\:cj-bg-destructive\\/80:hover{background-color:hsl(var(--claims-journey-destructive) / .8)!important}.hover\\:cj-bg-destructive\\/90:hover{background-color:hsl(var(--claims-journey-destructive) / .9)!important}.hover\\:cj-bg-muted:hover{background-color:hsl(var(--claims-journey-muted))!important}.hover\\:cj-bg-muted\\/50:hover{background-color:hsl(var(--claims-journey-muted) / .5)!important}.hover\\:cj-bg-primary:hover{background-color:hsl(var(--claims-journey-primary))!important}.hover\\:cj-bg-primary\\/80:hover{background-color:hsl(var(--claims-journey-primary) / .8)!important}.hover\\:cj-bg-primary\\/90:hover{background-color:hsl(var(--claims-journey-primary) / .9)!important}.hover\\:cj-bg-secondary:hover{background-color:hsl(var(--claims-journey-secondary))!important}.hover\\:cj-bg-secondary\\/80:hover{background-color:hsl(var(--claims-journey-secondary) / .8)!important}.hover\\:cj-bg-sidebar-accent:hover{background-color:hsl(var(--claims-journey-sidebar-accent))!important}.hover\\:cj-text-accent-foreground:hover{color:hsl(var(--claims-journey-accent-foreground))!important}.hover\\:cj-text-destructive:hover{color:hsl(var(--claims-journey-destructive))!important}.hover\\:cj-text-foreground:hover{color:hsl(var(--claims-journey-foreground))!important}.hover\\:cj-text-muted-foreground:hover{color:hsl(var(--claims-journey-muted-foreground))!important}.hover\\:cj-text-primary-foreground:hover{color:hsl(var(--claims-journey-primary-foreground))!important}.hover\\:cj-text-primary\\/90:hover{color:hsl(var(--claims-journey-primary) / .9)!important}.hover\\:cj-text-sidebar-accent-foreground:hover{color:hsl(var(--claims-journey-sidebar-accent-foreground))!important}.hover\\:cj-text-yellow-600:hover{--tw-text-opacity: 1 !important;color:rgb(202 138 4 / var(--tw-text-opacity, 1))!important}.hover\\:cj-underline:hover{text-decoration-line:underline!important}.hover\\:cj-opacity-100:hover{opacity:1!important}.hover\\:cj-shadow-\\[0_0_0_1px_hsl\\(var\\(--claims-journey-sidebar-accent\\)\\)\\]:hover{--tw-shadow: 0 0 0 1px hsl(var(--claims-journey-sidebar-accent)) !important;--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.hover\\:cj-shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.hover\\:after\\:cj-bg-sidebar-border:hover:after{content:var(--tw-content)!important;background-color:hsl(var(--claims-journey-sidebar-border))!important}.focus\\:cj-bg-accent:focus{background-color:hsl(var(--claims-journey-accent))!important}.focus\\:cj-bg-primary:focus{background-color:hsl(var(--claims-journey-primary))!important}.focus\\:cj-text-accent-foreground:focus{color:hsl(var(--claims-journey-accent-foreground))!important}.focus\\:cj-text-primary-foreground:focus{color:hsl(var(--claims-journey-primary-foreground))!important}.focus\\:cj-opacity-100:focus{opacity:1!important}.focus\\:cj-outline-none:focus{outline:2px solid transparent!important;outline-offset:2px!important}.focus\\:cj-ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.focus\\:cj-ring-ring:focus{--tw-ring-color: hsl(var(--claims-journey-ring)) !important}.focus\\:cj-ring-offset-2:focus{--tw-ring-offset-width: 2px !important}.focus-visible\\:cj-outline-none:focus-visible{outline:2px solid transparent!important;outline-offset:2px!important}.focus-visible\\:cj-ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.focus-visible\\:cj-ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.focus-visible\\:cj-ring-destructive:focus-visible{--tw-ring-color: hsl(var(--claims-journey-destructive)) !important}.focus-visible\\:cj-ring-ring:focus-visible{--tw-ring-color: hsl(var(--claims-journey-ring)) !important}.focus-visible\\:cj-ring-sidebar-ring:focus-visible{--tw-ring-color: hsl(var(--claims-journey-sidebar-ring)) !important}.focus-visible\\:cj-ring-offset-1:focus-visible{--tw-ring-offset-width: 1px !important}.focus-visible\\:cj-ring-offset-2:focus-visible{--tw-ring-offset-width: 2px !important}.focus-visible\\:cj-ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--claims-journey-background)) !important}.active\\:cj-cursor-grabbing:active{cursor:grabbing!important}.active\\:cj-bg-sidebar-accent:active{background-color:hsl(var(--claims-journey-sidebar-accent))!important}.active\\:cj-text-sidebar-accent-foreground:active{color:hsl(var(--claims-journey-sidebar-accent-foreground))!important}.disabled\\:cj-pointer-events-none:disabled{pointer-events:none!important}.disabled\\:cj-cursor-not-allowed:disabled{cursor:not-allowed!important}.disabled\\:cj-opacity-50:disabled{opacity:.5!important}.cj-group\\/menu-item:focus-within .group-focus-within\\/menu-item\\:cj-opacity-100{opacity:1!important}.cj-group:hover .group-hover\\:cj-text-foreground{color:hsl(var(--claims-journey-foreground))!important}.cj-group\\/menu-item:hover .group-hover\\/menu-item\\:cj-opacity-100,.cj-group:hover .group-hover\\:cj-opacity-100{opacity:1!important}.cj-group.destructive .group-\\[\\.destructive\\]\\:cj-border-muted\\/40{border-color:hsl(var(--claims-journey-muted) / .4)!important}.cj-group.toaster .group-\\[\\.toaster\\]\\:cj-border-border{border-color:hsl(var(--claims-journey-border))!important}.cj-group.toast .group-\\[\\.toast\\]\\:cj-bg-muted{background-color:hsl(var(--claims-journey-muted))!important}.cj-group.toast .group-\\[\\.toast\\]\\:cj-bg-primary{background-color:hsl(var(--claims-journey-primary))!important}.cj-group.toaster .group-\\[\\.toaster\\]\\:cj-bg-background{background-color:hsl(var(--claims-journey-background))!important}.cj-group.destructive .group-\\[\\.destructive\\]\\:cj-text-red-300{--tw-text-opacity: 1 !important;color:rgb(252 165 165 / var(--tw-text-opacity, 1))!important}.cj-group.toast .group-\\[\\.toast\\]\\:cj-text-muted-foreground{color:hsl(var(--claims-journey-muted-foreground))!important}.cj-group.toast .group-\\[\\.toast\\]\\:cj-text-primary-foreground{color:hsl(var(--claims-journey-primary-foreground))!important}.cj-group.toaster .group-\\[\\.toaster\\]\\:cj-text-foreground{color:hsl(var(--claims-journey-foreground))!important}.cj-group.toaster .group-\\[\\.toaster\\]\\:cj-shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.cj-group.destructive .group-\\[\\.destructive\\]\\:hover\\:cj-border-destructive\\/30:hover{border-color:hsl(var(--claims-journey-destructive) / .3)!important}.cj-group.destructive .group-\\[\\.destructive\\]\\:hover\\:cj-bg-destructive:hover{background-color:hsl(var(--claims-journey-destructive))!important}.cj-group.destructive .group-\\[\\.destructive\\]\\:hover\\:cj-text-destructive-foreground:hover{color:hsl(var(--claims-journey-destructive-foreground))!important}.cj-group.destructive .group-\\[\\.destructive\\]\\:hover\\:cj-text-red-50:hover{--tw-text-opacity: 1 !important;color:rgb(254 242 242 / var(--tw-text-opacity, 1))!important}.cj-group.destructive .group-\\[\\.destructive\\]\\:focus\\:cj-ring-destructive:focus{--tw-ring-color: hsl(var(--claims-journey-destructive)) !important}.cj-group.destructive .group-\\[\\.destructive\\]\\:focus\\:cj-ring-red-400:focus{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity, 1)) !important}.cj-group.destructive .group-\\[\\.destructive\\]\\:focus\\:cj-ring-offset-red-600:focus{--tw-ring-offset-color: #dc2626 !important}.cj-peer\\/menu-button:hover~.peer-hover\\/menu-button\\:cj-text-sidebar-accent-foreground{color:hsl(var(--claims-journey-sidebar-accent-foreground))!important}.cj-peer:disabled~.peer-disabled\\:cj-cursor-not-allowed{cursor:not-allowed!important}.cj-peer:disabled~.peer-disabled\\:cj-opacity-70{opacity:.7!important}.has-\\[\\[data-variant\\=inset\\]\\]\\:cj-bg-sidebar:has([data-variant=inset]){background-color:hsl(var(--claims-journey-sidebar-background))!important}.has-\\[\\:disabled\\]\\:cj-opacity-50:has(:disabled){opacity:.5!important}.cj-group\\/menu-item:has([data-sidebar=menu-action]) .group-has-\\[\\[data-sidebar\\=menu-action\\]\\]\\/menu-item\\:cj-pr-8{padding-right:2rem!important}.aria-disabled\\:cj-pointer-events-none[aria-disabled=true]{pointer-events:none!important}.aria-disabled\\:cj-opacity-50[aria-disabled=true]{opacity:.5!important}.aria-selected\\:cj-bg-accent[aria-selected=true]{background-color:hsl(var(--claims-journey-accent))!important}.aria-selected\\:cj-bg-accent\\/50[aria-selected=true]{background-color:hsl(var(--claims-journey-accent) / .5)!important}.aria-selected\\:cj-text-accent-foreground[aria-selected=true]{color:hsl(var(--claims-journey-accent-foreground))!important}.aria-selected\\:cj-text-muted-foreground[aria-selected=true]{color:hsl(var(--claims-journey-muted-foreground))!important}.aria-selected\\:cj-opacity-100[aria-selected=true]{opacity:1!important}.aria-selected\\:cj-opacity-30[aria-selected=true]{opacity:.3!important}.data-\\[disabled\\=true\\]\\:cj-pointer-events-none[data-disabled=true],.data-\\[disabled\\]\\:cj-pointer-events-none[data-disabled]{pointer-events:none!important}.data-\\[panel-group-direction\\=vertical\\]\\:cj-h-px[data-panel-group-direction=vertical]{height:1px!important}.data-\\[panel-group-direction\\=vertical\\]\\:cj-w-full[data-panel-group-direction=vertical]{width:100%!important}.data-\\[side\\=bottom\\]\\:cj-translate-y-1[data-side=bottom]{--tw-translate-y: .25rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\\[side\\=left\\]\\:-cj-translate-x-1[data-side=left]{--tw-translate-x: -.25rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\\[side\\=right\\]\\:cj-translate-x-1[data-side=right]{--tw-translate-x: .25rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\\[side\\=top\\]\\:-cj-translate-y-1[data-side=top]{--tw-translate-y: -.25rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\\[state\\=checked\\]\\:cj-translate-x-5[data-state=checked]{--tw-translate-x: 1.25rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\\[state\\=unchecked\\]\\:cj-translate-x-0[data-state=unchecked],.data-\\[swipe\\=cancel\\]\\:cj-translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\\[swipe\\=end\\]\\:cj-translate-x-\\[var\\(--radix-toast-swipe-end-x\\)\\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x) !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\\[swipe\\=move\\]\\:cj-translate-x-\\[var\\(--radix-toast-swipe-move-x\\)\\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x) !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}@keyframes cj-accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\\[state\\=closed\\]\\:cj-animate-accordion-up[data-state=closed]{animation:cj-accordion-up .2s ease-out!important}@keyframes cj-accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\\[state\\=open\\]\\:cj-animate-accordion-down[data-state=open]{animation:cj-accordion-down .2s ease-out!important}.data-\\[panel-group-direction\\=vertical\\]\\:cj-flex-col[data-panel-group-direction=vertical]{flex-direction:column!important}.data-\\[state\\=active\\]\\:cj-border-primary[data-state=active]{border-color:hsl(var(--claims-journey-primary))!important}.data-\\[state\\=checked\\]\\:cj-border-primary\\/40[data-state=checked]{border-color:hsl(var(--claims-journey-primary) / .4)!important}.data-\\[active\\=true\\]\\:cj-bg-sidebar-accent[data-active=true]{background-color:hsl(var(--claims-journey-sidebar-accent))!important}.data-\\[active\\]\\:cj-bg-accent\\/50[data-active]{background-color:hsl(var(--claims-journey-accent) / .5)!important}.data-\\[selected\\=\\'true\\'\\]\\:cj-bg-accent[data-selected=true]{background-color:hsl(var(--claims-journey-accent))!important}.data-\\[state\\=active\\]\\:cj-bg-background[data-state=active]{background-color:hsl(var(--claims-journey-background))!important}.data-\\[state\\=active\\]\\:cj-bg-transparent[data-state=active]{background-color:transparent!important}.data-\\[state\\=checked\\]\\:cj-bg-primary[data-state=checked]{background-color:hsl(var(--claims-journey-primary))!important}.data-\\[state\\=checked\\]\\:cj-bg-primary\\/5[data-state=checked]{background-color:hsl(var(--claims-journey-primary) / .05)!important}.data-\\[state\\=on\\]\\:cj-bg-accent[data-state=on],.data-\\[state\\=open\\]\\:cj-bg-accent[data-state=open]{background-color:hsl(var(--claims-journey-accent))!important}.data-\\[state\\=open\\]\\:cj-bg-accent\\/50[data-state=open]{background-color:hsl(var(--claims-journey-accent) / .5)!important}.data-\\[state\\=open\\]\\:cj-bg-secondary[data-state=open]{background-color:hsl(var(--claims-journey-secondary))!important}.data-\\[state\\=selected\\]\\:cj-bg-muted[data-state=selected]{background-color:hsl(var(--claims-journey-muted))!important}.data-\\[state\\=unchecked\\]\\:cj-bg-input[data-state=unchecked]{background-color:hsl(var(--claims-journey-input))!important}.data-\\[active\\=true\\]\\:cj-font-medium[data-active=true]{font-weight:500!important}.data-\\[active\\=true\\]\\:cj-text-sidebar-accent-foreground[data-active=true]{color:hsl(var(--claims-journey-sidebar-accent-foreground))!important}.data-\\[selected\\=true\\]\\:cj-text-accent-foreground[data-selected=true]{color:hsl(var(--claims-journey-accent-foreground))!important}.data-\\[state\\=active\\]\\:cj-text-foreground[data-state=active]{color:hsl(var(--claims-journey-foreground))!important}.data-\\[state\\=checked\\]\\:cj-text-primary-foreground[data-state=checked]{color:hsl(var(--claims-journey-primary-foreground))!important}.data-\\[state\\=on\\]\\:cj-text-accent-foreground[data-state=on],.data-\\[state\\=open\\]\\:cj-text-accent-foreground[data-state=open]{color:hsl(var(--claims-journey-accent-foreground))!important}.data-\\[state\\=open\\]\\:cj-text-muted-foreground[data-state=open]{color:hsl(var(--claims-journey-muted-foreground))!important}.data-\\[disabled\\=true\\]\\:cj-opacity-50[data-disabled=true],.data-\\[disabled\\]\\:cj-opacity-50[data-disabled]{opacity:.5!important}.data-\\[state\\=open\\]\\:cj-opacity-100[data-state=open]{opacity:1!important}.data-\\[state\\=active\\]\\:cj-shadow-none[data-state=active]{--tw-shadow: 0 0 #0000 !important;--tw-shadow-colored: 0 0 #0000 !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.data-\\[state\\=active\\]\\:cj-shadow-sm[data-state=active]{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05) !important;--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.data-\\[swipe\\=move\\]\\:cj-transition-none[data-swipe=move]{transition-property:none!important}.data-\\[state\\=closed\\]\\:cj-duration-300[data-state=closed]{transition-duration:.3s!important}.data-\\[state\\=open\\]\\:cj-duration-500[data-state=open]{transition-duration:.5s!important}.data-\\[motion\\^\\=from-\\]\\:cj-animate-in[data-motion^=from-],.data-\\[state\\=open\\]\\:cj-animate-in[data-state=open],.data-\\[state\\=visible\\]\\:cj-animate-in[data-state=visible]{animation-name:enter!important;animation-duration:.15s!important;--tw-enter-opacity: initial !important;--tw-enter-scale: initial !important;--tw-enter-rotate: initial !important;--tw-enter-translate-x: initial !important;--tw-enter-translate-y: initial !important}.data-\\[motion\\^\\=to-\\]\\:cj-animate-out[data-motion^=to-],.data-\\[state\\=closed\\]\\:cj-animate-out[data-state=closed],.data-\\[state\\=hidden\\]\\:cj-animate-out[data-state=hidden],.data-\\[swipe\\=end\\]\\:cj-animate-out[data-swipe=end]{animation-name:exit!important;animation-duration:.15s!important;--tw-exit-opacity: initial !important;--tw-exit-scale: initial !important;--tw-exit-rotate: initial !important;--tw-exit-translate-x: initial !important;--tw-exit-translate-y: initial !important}.data-\\[motion\\^\\=from-\\]\\:cj-fade-in[data-motion^=from-]{--tw-enter-opacity: 0 !important}.data-\\[motion\\^\\=to-\\]\\:cj-fade-out[data-motion^=to-],.data-\\[state\\=closed\\]\\:cj-fade-out-0[data-state=closed]{--tw-exit-opacity: 0 !important}.data-\\[state\\=closed\\]\\:cj-fade-out-80[data-state=closed]{--tw-exit-opacity: .8 !important}.data-\\[state\\=hidden\\]\\:cj-fade-out[data-state=hidden]{--tw-exit-opacity: 0 !important}.data-\\[state\\=open\\]\\:cj-fade-in-0[data-state=open],.data-\\[state\\=visible\\]\\:cj-fade-in[data-state=visible]{--tw-enter-opacity: 0 !important}.data-\\[state\\=closed\\]\\:cj-zoom-out-95[data-state=closed]{--tw-exit-scale: .95 !important}.data-\\[state\\=open\\]\\:cj-zoom-in-90[data-state=open]{--tw-enter-scale: .9 !important}.data-\\[state\\=open\\]\\:cj-zoom-in-95[data-state=open]{--tw-enter-scale: .95 !important}.data-\\[motion\\=from-end\\]\\:cj-slide-in-from-right-52[data-motion=from-end]{--tw-enter-translate-x: 13rem !important}.data-\\[motion\\=from-start\\]\\:cj-slide-in-from-left-52[data-motion=from-start]{--tw-enter-translate-x: -13rem !important}.data-\\[motion\\=to-end\\]\\:cj-slide-out-to-right-52[data-motion=to-end]{--tw-exit-translate-x: 13rem !important}.data-\\[motion\\=to-start\\]\\:cj-slide-out-to-left-52[data-motion=to-start]{--tw-exit-translate-x: -13rem !important}.data-\\[side\\=bottom\\]\\:cj-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem !important}.data-\\[side\\=left\\]\\:cj-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem !important}.data-\\[side\\=right\\]\\:cj-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem !important}.data-\\[side\\=top\\]\\:cj-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem !important}.data-\\[state\\=closed\\]\\:cj-slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y: 100% !important}.data-\\[state\\=closed\\]\\:cj-slide-out-to-left[data-state=closed]{--tw-exit-translate-x: -100% !important}.data-\\[state\\=closed\\]\\:cj-slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x: -50% !important}.data-\\[state\\=closed\\]\\:cj-slide-out-to-right[data-state=closed],.data-\\[state\\=closed\\]\\:cj-slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100% !important}.data-\\[state\\=closed\\]\\:cj-slide-out-to-top[data-state=closed]{--tw-exit-translate-y: -100% !important}.data-\\[state\\=closed\\]\\:cj-slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y: -48% !important}.data-\\[state\\=open\\]\\:cj-slide-in-from-bottom[data-state=open]{--tw-enter-translate-y: 100% !important}.data-\\[state\\=open\\]\\:cj-slide-in-from-left[data-state=open]{--tw-enter-translate-x: -100% !important}.data-\\[state\\=open\\]\\:cj-slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x: -50% !important}.data-\\[state\\=open\\]\\:cj-slide-in-from-right[data-state=open]{--tw-enter-translate-x: 100% !important}.data-\\[state\\=open\\]\\:cj-slide-in-from-top[data-state=open]{--tw-enter-translate-y: -100% !important}.data-\\[state\\=open\\]\\:cj-slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y: -48% !important}.data-\\[state\\=open\\]\\:cj-slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100% !important}.data-\\[state\\=closed\\]\\:cj-duration-300[data-state=closed]{animation-duration:.3s!important}.data-\\[state\\=open\\]\\:cj-duration-500[data-state=open]{animation-duration:.5s!important}.data-\\[panel-group-direction\\=vertical\\]\\:after\\:cj-left-0[data-panel-group-direction=vertical]:after{content:var(--tw-content)!important;left:0!important}.data-\\[panel-group-direction\\=vertical\\]\\:after\\:cj-h-1[data-panel-group-direction=vertical]:after{content:var(--tw-content)!important;height:.25rem!important}.data-\\[panel-group-direction\\=vertical\\]\\:after\\:cj-w-full[data-panel-group-direction=vertical]:after{content:var(--tw-content)!important;width:100%!important}.data-\\[panel-group-direction\\=vertical\\]\\:after\\:-cj-translate-y-1\\/2[data-panel-group-direction=vertical]:after{content:var(--tw-content)!important;--tw-translate-y: -50% !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\\[panel-group-direction\\=vertical\\]\\:after\\:cj-translate-x-0[data-panel-group-direction=vertical]:after{content:var(--tw-content)!important;--tw-translate-x: 0px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\\[state\\=open\\]\\:hover\\:cj-bg-sidebar-accent:hover[data-state=open]{background-color:hsl(var(--claims-journey-sidebar-accent))!important}.data-\\[state\\=open\\]\\:hover\\:cj-text-sidebar-accent-foreground:hover[data-state=open]{color:hsl(var(--claims-journey-sidebar-accent-foreground))!important}.cj-group[data-collapsible=offcanvas] .group-data-\\[collapsible\\=offcanvas\\]\\:cj-left-\\[calc\\(var\\(--sidebar-width\\)\\*-1\\)\\]{left:calc(var(--sidebar-width) * -1)!important}.cj-group[data-collapsible=offcanvas] .group-data-\\[collapsible\\=offcanvas\\]\\:cj-right-\\[calc\\(var\\(--sidebar-width\\)\\*-1\\)\\]{right:calc(var(--sidebar-width) * -1)!important}.cj-group[data-side=left] .group-data-\\[side\\=left\\]\\:-cj-right-4{right:-1rem!important}.cj-group[data-side=right] .group-data-\\[side\\=right\\]\\:cj-left-0{left:0!important}.cj-group[data-collapsible=icon] .group-data-\\[collapsible\\=icon\\]\\:-cj-mt-8{margin-top:-2rem!important}.cj-group[data-collapsible=icon] .group-data-\\[collapsible\\=icon\\]\\:cj-hidden{display:none!important}.cj-group[data-collapsible=icon] .group-data-\\[collapsible\\=icon\\]\\:cj-w-\\[--sidebar-width-icon\\]{width:var(--sidebar-width-icon)!important}.cj-group[data-collapsible=icon] .group-data-\\[collapsible\\=icon\\]\\:cj-w-\\[calc\\(var\\(--sidebar-width-icon\\)_\\+_theme\\(spacing\\.4\\)\\)\\]{width:calc(var(--sidebar-width-icon) + 1rem)!important}.cj-group[data-collapsible=icon] .group-data-\\[collapsible\\=icon\\]\\:cj-w-\\[calc\\(var\\(--sidebar-width-icon\\)_\\+_theme\\(spacing\\.4\\)_\\+2px\\)\\]{width:calc(var(--sidebar-width-icon) + 1rem + 2px)!important}.cj-group[data-collapsible=offcanvas] .group-data-\\[collapsible\\=offcanvas\\]\\:cj-w-0{width:0px!important}.cj-group[data-collapsible=offcanvas] .group-data-\\[collapsible\\=offcanvas\\]\\:cj-translate-x-0{--tw-translate-x: 0px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cj-group[data-side=right] .group-data-\\[side\\=right\\]\\:cj-rotate-180,.cj-group[data-state=open] .group-data-\\[state\\=open\\]\\:cj-rotate-180{--tw-rotate: 180deg !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cj-group[data-collapsible=icon] .group-data-\\[collapsible\\=icon\\]\\:cj-overflow-hidden{overflow:hidden!important}.cj-group[data-variant=floating] .group-data-\\[variant\\=floating\\]\\:cj-rounded-lg{border-radius:var(--claims-journey-radius)!important}.cj-group[data-variant=floating] .group-data-\\[variant\\=floating\\]\\:cj-border{border-width:1px!important}.cj-group[data-side=left] .group-data-\\[side\\=left\\]\\:cj-border-r{border-right-width:1px!important}.cj-group[data-side=right] .group-data-\\[side\\=right\\]\\:cj-border-l{border-left-width:1px!important}.cj-group[data-variant=floating] .group-data-\\[variant\\=floating\\]\\:cj-border-sidebar-border{border-color:hsl(var(--claims-journey-sidebar-border))!important}.cj-group[data-collapsible=icon] .group-data-\\[collapsible\\=icon\\]\\:cj-opacity-0{opacity:0!important}.cj-group[data-variant=floating] .group-data-\\[variant\\=floating\\]\\:cj-shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.cj-group[data-collapsible=offcanvas] .group-data-\\[collapsible\\=offcanvas\\]\\:after\\:cj-left-full:after{content:var(--tw-content)!important;left:100%!important}.cj-group[data-collapsible=offcanvas] .group-data-\\[collapsible\\=offcanvas\\]\\:hover\\:cj-bg-sidebar:hover{background-color:hsl(var(--claims-journey-sidebar-background))!important}.cj-peer\\/menu-button[data-size=default]~.peer-data-\\[size\\=default\\]\\/menu-button\\:cj-top-1\\.5{top:.375rem!important}.cj-peer\\/menu-button[data-size=lg]~.peer-data-\\[size\\=lg\\]\\/menu-button\\:cj-top-2\\.5{top:.625rem!important}.cj-peer\\/menu-button[data-size=sm]~.peer-data-\\[size\\=sm\\]\\/menu-button\\:cj-top-1{top:.25rem!important}.cj-peer[data-variant=inset]~.peer-data-\\[variant\\=inset\\]\\:cj-min-h-\\[calc\\(100svh-theme\\(spacing\\.4\\)\\)\\]{min-height:calc(100svh - 1rem)!important}.cj-peer\\/menu-button[data-active=true]~.peer-data-\\[active\\=true\\]\\/menu-button\\:cj-text-sidebar-accent-foreground{color:hsl(var(--claims-journey-sidebar-accent-foreground))!important}.dark\\:cj-border-destructive:is(.cj-dark *){border-color:hsl(var(--claims-journey-destructive))!important}.dark\\:cj-bg-blue-950:is(.cj-dark *){--tw-bg-opacity: 1 !important;background-color:rgb(23 37 84 / var(--tw-bg-opacity, 1))!important}@media (min-width: 640px){.sm\\:cj-bottom-0{bottom:0!important}.sm\\:cj-right-0{right:0!important}.sm\\:cj-top-auto{top:auto!important}.sm\\:cj-col-span-2{grid-column:span 2 / span 2!important}.sm\\:cj-col-span-3{grid-column:span 3 / span 3!important}.sm\\:cj-col-span-4{grid-column:span 4 / span 4!important}.sm\\:cj-col-span-6{grid-column:span 6 / span 6!important}.sm\\:cj-mt-0{margin-top:0!important}.sm\\:cj-flex{display:flex!important}.sm\\:cj-w-\\[420px\\]{width:420px!important}.sm\\:cj-max-w-lg{max-width:32rem!important}.sm\\:cj-max-w-sm{max-width:24rem!important}.sm\\:cj-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.sm\\:cj-grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))!important}.sm\\:cj-flex-row{flex-direction:row!important}.sm\\:cj-flex-col{flex-direction:column!important}.sm\\:cj-justify-end{justify-content:flex-end!important}.sm\\:cj-justify-between{justify-content:space-between!important}.sm\\:cj-gap-2\\.5{gap:.625rem!important}.sm\\:cj-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0 !important;margin-right:calc(.5rem * var(--tw-space-x-reverse))!important;margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))!important}.sm\\:cj-rounded-lg{border-radius:var(--claims-journey-radius)!important}.sm\\:cj-p-10{padding:2.5rem!important}.sm\\:cj-p-7{padding:1.75rem!important}.sm\\:cj-px-6{padding-left:1.5rem!important;padding-right:1.5rem!important}.sm\\:cj-text-left{text-align:left!important}.sm\\:cj-text-2xl{font-size:1.5rem!important;line-height:2rem!important}.sm\\:cj-text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.sm\\:cj-text-xl{font-size:1.25rem!important;line-height:1.75rem!important}.data-\\[state\\=open\\]\\:sm\\:cj-slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100% !important}}@media (min-width: 768px){.md\\:cj-absolute{position:absolute!important}.md\\:cj-block{display:block!important}.md\\:cj-flex{display:flex!important}.md\\:cj-hidden{display:none!important}.md\\:cj-w-\\[30\\%\\]{width:30%!important}.md\\:cj-w-\\[70\\%\\]{width:70%!important}.md\\:cj-w-\\[var\\(--radix-navigation-menu-viewport-width\\)\\]{width:var(--radix-navigation-menu-viewport-width)!important}.md\\:cj-w-auto{width:auto!important}.md\\:cj-w-full{width:100%!important}.md\\:cj-max-w-\\[420px\\]{max-width:420px!important}.md\\:cj-shrink-0{flex-shrink:0!important}.md\\:cj-flex-row{flex-direction:row!important}.md\\:cj-px-3{padding-left:.75rem!important;padding-right:.75rem!important}.md\\:cj-py-8{padding-top:2rem!important;padding-bottom:2rem!important}.md\\:cj-text-sm{font-size:.875rem!important;line-height:1.25rem!important}.md\\:cj-opacity-0{opacity:0!important}.after\\:md\\:cj-hidden:after{content:var(--tw-content)!important;display:none!important}.cj-peer[data-variant=inset]~.md\\:peer-data-\\[variant\\=inset\\]\\:cj-m-2{margin:.5rem!important}.cj-peer[data-state=collapsed][data-variant=inset]~.md\\:peer-data-\\[state\\=collapsed\\]\\:peer-data-\\[variant\\=inset\\]\\:cj-ml-2{margin-left:.5rem!important}.cj-peer[data-variant=inset]~.md\\:peer-data-\\[variant\\=inset\\]\\:cj-ml-0{margin-left:0!important}.cj-peer[data-variant=inset]~.md\\:peer-data-\\[variant\\=inset\\]\\:cj-rounded-xl{border-radius:.75rem!important}.cj-peer[data-variant=inset]~.md\\:peer-data-\\[variant\\=inset\\]\\:cj-shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}}.\\[\\&\\:has\\(\\[aria-selected\\]\\)\\]\\:cj-bg-accent:has([aria-selected]){background-color:hsl(var(--claims-journey-accent))!important}.first\\:\\[\\&\\:has\\(\\[aria-selected\\]\\)\\]\\:cj-rounded-l-full:has([aria-selected]):first-child{border-top-left-radius:9999px!important;border-bottom-left-radius:9999px!important}.last\\:\\[\\&\\:has\\(\\[aria-selected\\]\\)\\]\\:cj-rounded-r-full:has([aria-selected]):last-child{border-top-right-radius:9999px!important;border-bottom-right-radius:9999px!important}.\\[\\&\\:has\\(\\[aria-selected\\]\\.day-outside\\)\\]\\:cj-bg-accent\\/50:has([aria-selected].day-outside){background-color:hsl(var(--claims-journey-accent) / .5)!important}.\\[\\&\\:has\\(\\[aria-selected\\]\\.day-range-end\\)\\]\\:cj-rounded-r-full:has([aria-selected].day-range-end){border-top-right-radius:9999px!important;border-bottom-right-radius:9999px!important}.\\[\\&\\:has\\(\\[role\\=checkbox\\]\\)\\]\\:cj-pr-0:has([role=checkbox]){padding-right:0!important}.\\[\\&\\>button\\]\\:cj-hidden>button{display:none!important}.\\[\\&\\>div\\>div\\]\\:\\!cj-block>div>div{display:block!important}.\\[\\&\\>div\\]\\:\\!cj-block>div{display:block!important}.\\[\\&\\>div\\]\\:cj-w-full>div{width:100%!important}.\\[\\&\\>div\\]\\:\\!cj-min-w-0>div{min-width:0px!important}.\\[\\&\\>span\\:last-child\\]\\:cj-truncate>span:last-child{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.\\[\\&\\>span\\]\\:cj-line-clamp-1>span{overflow:hidden!important;display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:1!important}.\\[\\&\\>svg\\+div\\]\\:cj-translate-y-\\[-3px\\]>svg+div{--tw-translate-y: -3px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.\\[\\&\\>svg\\]\\:cj-absolute>svg{position:absolute!important}.\\[\\&\\>svg\\]\\:cj-left-4>svg{left:1rem!important}.\\[\\&\\>svg\\]\\:cj-top-4>svg{top:1rem!important}.\\[\\&\\>svg\\]\\:cj-size-3\\.5>svg{width:.875rem!important;height:.875rem!important}.\\[\\&\\>svg\\]\\:cj-size-4>svg{width:1rem!important;height:1rem!important}.\\[\\&\\>svg\\]\\:cj-h-2\\.5>svg{height:.625rem!important}.\\[\\&\\>svg\\]\\:cj-h-3>svg{height:.75rem!important}.\\[\\&\\>svg\\]\\:cj-w-2\\.5>svg{width:.625rem!important}.\\[\\&\\>svg\\]\\:cj-w-3>svg{width:.75rem!important}.\\[\\&\\>svg\\]\\:cj-shrink-0>svg{flex-shrink:0!important}.\\[\\&\\>svg\\]\\:cj-text-destructive>svg{color:hsl(var(--claims-journey-destructive))!important}.\\[\\&\\>svg\\]\\:cj-text-foreground>svg{color:hsl(var(--claims-journey-foreground))!important}.\\[\\&\\>svg\\]\\:cj-text-muted-foreground>svg{color:hsl(var(--claims-journey-muted-foreground))!important}.\\[\\&\\>svg\\]\\:cj-text-sidebar-accent-foreground>svg{color:hsl(var(--claims-journey-sidebar-accent-foreground))!important}.\\[\\&\\>svg\\~\\*\\]\\:cj-pl-7>svg~*{padding-left:1.75rem!important}.\\[\\&\\>tr\\]\\:last\\:cj-border-b-0:last-child>tr{border-bottom-width:0px!important}.\\[\\&\\[data-panel-group-direction\\=vertical\\]\\>div\\]\\:cj-rotate-90[data-panel-group-direction=vertical]>div{--tw-rotate: 90deg !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.\\[\\&\\[data-state\\=open\\]\\>svg\\]\\:cj-rotate-180[data-state=open]>svg{--tw-rotate: 180deg !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.\\[\\&_\\.recharts-cartesian-axis-tick_text\\]\\:cj-fill-muted-foreground .recharts-cartesian-axis-tick text{fill:hsl(var(--claims-journey-muted-foreground))!important}.\\[\\&_\\.recharts-cartesian-grid_line\\[stroke\\=\\'\\#ccc\\'\\]\\]\\:cj-stroke-border\\/50 .recharts-cartesian-grid line[stroke="#ccc"]{stroke:hsl(var(--claims-journey-border) / .5)!important}.\\[\\&_\\.recharts-curve\\.recharts-tooltip-cursor\\]\\:cj-stroke-border .recharts-curve.recharts-tooltip-cursor{stroke:hsl(var(--claims-journey-border))!important}.\\[\\&_\\.recharts-dot\\[stroke\\=\\'\\#fff\\'\\]\\]\\:cj-stroke-transparent .recharts-dot[stroke="#fff"]{stroke:transparent!important}.\\[\\&_\\.recharts-layer\\]\\:cj-outline-none .recharts-layer{outline:2px solid transparent!important;outline-offset:2px!important}.\\[\\&_\\.recharts-polar-grid_\\[stroke\\=\\'\\#ccc\\'\\]\\]\\:cj-stroke-border .recharts-polar-grid [stroke="#ccc"]{stroke:hsl(var(--claims-journey-border))!important}.\\[\\&_\\.recharts-radial-bar-background-sector\\]\\:cj-fill-muted .recharts-radial-bar-background-sector,.\\[\\&_\\.recharts-rectangle\\.recharts-tooltip-cursor\\]\\:cj-fill-muted .recharts-rectangle.recharts-tooltip-cursor{fill:hsl(var(--claims-journey-muted))!important}.\\[\\&_\\.recharts-reference-line_\\[stroke\\=\\'\\#ccc\\'\\]\\]\\:cj-stroke-border .recharts-reference-line [stroke="#ccc"]{stroke:hsl(var(--claims-journey-border))!important}.\\[\\&_\\.recharts-sector\\[stroke\\=\\'\\#fff\\'\\]\\]\\:cj-stroke-transparent .recharts-sector[stroke="#fff"]{stroke:transparent!important}.\\[\\&_\\.recharts-sector\\]\\:cj-outline-none .recharts-sector,.\\[\\&_\\.recharts-surface\\]\\:cj-outline-none .recharts-surface{outline:2px solid transparent!important;outline-offset:2px!important}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:cj-px-2 [cmdk-group-heading]{padding-left:.5rem!important;padding-right:.5rem!important}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:cj-py-1\\.5 [cmdk-group-heading]{padding-top:.375rem!important;padding-bottom:.375rem!important}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:cj-text-xs [cmdk-group-heading]{font-size:.75rem!important;line-height:1rem!important}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:cj-font-medium [cmdk-group-heading]{font-weight:500!important}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:cj-text-muted-foreground [cmdk-group-heading]{color:hsl(var(--claims-journey-muted-foreground))!important}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:cj-pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0!important}.\\[\\&_\\[cmdk-group\\]\\]\\:cj-px-2 [cmdk-group]{padding-left:.5rem!important;padding-right:.5rem!important}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:cj-h-5 [cmdk-input-wrapper] svg{height:1.25rem!important}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:cj-w-5 [cmdk-input-wrapper] svg{width:1.25rem!important}.\\[\\&_\\[cmdk-input\\]\\]\\:cj-h-12 [cmdk-input]{height:3rem!important}.\\[\\&_\\[cmdk-item\\]\\]\\:cj-px-2 [cmdk-item]{padding-left:.5rem!important;padding-right:.5rem!important}.\\[\\&_\\[cmdk-item\\]\\]\\:cj-py-3 [cmdk-item]{padding-top:.75rem!important;padding-bottom:.75rem!important}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:cj-h-5 [cmdk-item] svg{height:1.25rem!important}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:cj-w-5 [cmdk-item] svg{width:1.25rem!important}.\\[\\&_button\\]\\:cj-ring-offset-0 button,.\\[\\&_input\\]\\:cj-ring-offset-0 input{--tw-ring-offset-width: 0px !important}.\\[\\&_input\\]\\:focus-visible\\:cj-border-ring:focus-visible input{border-color:hsl(var(--claims-journey-ring))!important}.\\[\\&_input\\]\\:focus-visible\\:cj-ring-0:focus-visible input{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.\\[\\&_p\\]\\:cj-leading-relaxed p{line-height:1.625!important}.\\[\\&_svg\\]\\:cj-pointer-events-none svg{pointer-events:none!important}.\\[\\&_svg\\]\\:cj-size-4 svg{width:1rem!important;height:1rem!important}.\\[\\&_svg\\]\\:cj-shrink-0 svg{flex-shrink:0!important}.\\[\\&_tr\\:last-child\\]\\:cj-border-0 tr:last-child{border-width:0px!important}.\\[\\&_tr\\]\\:cj-border-b tr{border-bottom-width:1px!important}[data-side=left][data-collapsible=offcanvas] .\\[\\[data-side\\=left\\]\\[data-collapsible\\=offcanvas\\]_\\&\\]\\:-cj-right-2{right:-.5rem!important}[data-side=left][data-state=collapsed] .\\[\\[data-side\\=left\\]\\[data-state\\=collapsed\\]_\\&\\]\\:cj-cursor-e-resize{cursor:e-resize!important}[data-side=left] .\\[\\[data-side\\=left\\]_\\&\\]\\:cj-cursor-w-resize{cursor:w-resize!important}[data-side=right][data-collapsible=offcanvas] .\\[\\[data-side\\=right\\]\\[data-collapsible\\=offcanvas\\]_\\&\\]\\:-cj-left-2{left:-.5rem!important}[data-side=right][data-state=collapsed] .\\[\\[data-side\\=right\\]\\[data-state\\=collapsed\\]_\\&\\]\\:cj-cursor-w-resize{cursor:w-resize!important}[data-side=right] .\\[\\[data-side\\=right\\]_\\&\\]\\:cj-cursor-e-resize{cursor:e-resize!important}[data-state=closed]>.\\[\\[data-state\\=closed\\]\\>\\&\\]\\:cj-rotate-\\[-90deg\\]{--tw-rotate: -90deg !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}`)),document.head.appendChild(t)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
2
|
+
"use strict";var Hp=Object.defineProperty;var qp=(e,t,n)=>t in e?Hp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var G=(e,t,n)=>qp(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),y=require("react"),Ns=require("react-dom");function ll(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const g=ll(y),Ao=ll(Ns),Ti=e=>{let t;const n=new Set,r=(d,u)=>{const p=typeof d=="function"?d(t):d;if(!Object.is(p,t)){const f=t;t=u??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(m=>m(t,f))}},o=()=>t,c={setState:r,getState:o,getInitialState:()=>l,subscribe:d=>(n.add(d),()=>n.delete(d))},l=t=e(r,o,c);return c},Yp=e=>e?Ti(e):Ti,Vp=e=>e;function Up(e,t=Vp){const n=y.useSyncExternalStore(e.subscribe,y.useCallback(()=>t(e.getState()),[e,t]),y.useCallback(()=>t(e.getInitialState()),[e,t]));return y.useDebugValue(n),n}const Ri=e=>{const t=Yp(e),n=r=>Up(t,r);return Object.assign(n,t),n},Gp=e=>e?Ri(e):Ri,$e=e=>`${e}_${Date.now()}_${Math.random().toString(36).slice(2,7)}`;function Ai(){return{steps:[],fields:[],summary:{title:"Summary",show_pricing:!1,show_sidebar:!0,sections:[]},init:{values:{}}}}function Xp(e){return!!e&&typeof e=="object"&&"claimspec_id"in e}function Oi(e){return{field_id:$e("field"),namespace:e.namespace,label:e.label,specId:e.id,schema:e.schema,options:e.options,actor:"customer",required:!1,bindings:[{target_namespace:e.namespace}],placeholder:e.placeholder??void 0,helpText:e.help_text??void 0}}function zi(e){const t=e.bindings&&e.bindings.length>0?e.bindings.map(n=>({target_namespace:n.target_namespace})):[{target_namespace:e.namespace}];return{field_id:$e("field"),namespace:e.namespace,label:e.label,specId:e.specId??"custom",schema:e.schema,options:e.options??null,actor:e.actor??"customer",required:e.required??!1,bindings:t,widget:e.widget,uploadConfig:e.uploadConfig,allowFuture:e.allowFuture}}function dl(e){const t=(e.nodes||[]).map(a=>Kp(a)),n=new Map;(e.nodes||[]).forEach((a,i)=>n.set(a.node_id,t[i].field_id));const r=e.mode==="grouped"&&(e.groups||[]).length>0;let o;if(r){const a=Ii((e.groups||[]).map(i=>i.group_id),e.edges||[],e.start_node_id??null);o=a.map(i=>{const c=(e.groups||[]).find(u=>u.group_id===i),l=(c.sections||[]).map(u=>({row_id:$e("row"),layout:"horizontal",field_ids:u.node_ids.map(p=>n.get(p)).filter(p=>!!p)})),d=Wi(i,e.edges||[],a,u=>u);return{step_id:i,title:c.title||"Step",description:"",rows:l.length>0?l:[{row_id:$e("row"),layout:"horizontal",field_ids:[]}],navigation:d}})}else{const a=Ii((e.nodes||[]).map(i=>i.node_id),e.edges||[],e.start_node_id??null);o=a.map(i=>{const c=n.get(i),l=(e.nodes||[]).find(u=>u.node_id===i),d=Wi(i,e.edges||[],a,u=>u);return{step_id:i,title:l.label_override||l.label||l.question_key,description:"",rows:[{row_id:$e("row"),layout:"horizontal",field_ids:c?[c]:[]}],navigation:d}})}return{steps:o,fields:t,summary:{title:"Summary",show_pricing:!1,show_sidebar:!0,sections:[]},init:{values:{}}}}function Kp(e){var t,n,r;return{field_id:$e("field"),namespace:e.question_key,label:e.label_override||e.label||e.question_key,labelOverride:e.label_override,specId:e.source_property_spec_id||"custom",schema:e.schema||"v1_string",options:e.options??null,actor:e.actor||"customer",bindings:e.bindings||[{target_namespace:e.question_key}],widget:(t=e.ui)!=null&&t.widget&&e.ui.widget!=="auto"?e.ui.widget:void 0,ui_variant:((n=e.ui)==null?void 0:n.variant)??((r=e.ui)==null?void 0:r.ui_variant),required:!!e.required,uploadConfig:e.upload_config,allowFuture:e.allow_future}}function Ii(e,t,n){var l;if(e.length===0)return[];const r=new Set(t.map(d=>d.to_node_id)),o=n&&e.includes(n)?n:e.find(d=>!r.has(d))||e[0],a=[],i=new Set;let c=o;for(;c&&!i.has(c);){i.add(c),a.push(c);const d=t.filter(f=>f.from_node_id===c);if(d.length===0)break;const u=[...d].sort((f,m)=>(m.priority||0)-(f.priority||0)),p=u.find(f=>f.is_default);c=((p==null?void 0:p.to_node_id)||((l=u[0])==null?void 0:l.to_node_id))??null}for(const d of e)i.has(d)||a.push(d);return a}function Wi(e,t,n,r){const a=t.filter(i=>i.from_node_id===e).sort((i,c)=>(c.priority||0)-(i.priority||0)).map(i=>({rule_id:$e("rule"),condition:i.condition||null,next_step_id:r(i.to_node_id),priority:i.priority||0}));if(a.length===0){const i=n.indexOf(e),c=i>=0&&i<n.length-1?r(n[i+1]):"__submit__";a.push({rule_id:$e("rule"),condition:null,next_step_id:c,priority:0})}return{rules:a}}const pt=Gp((e,t)=>{const n=()=>{const{formConfig:a,theme:i}=t();return{formConfig:JSON.parse(JSON.stringify(a)),theme:JSON.parse(JSON.stringify(i))}},r=()=>{const a=n();e({_history:[...t()._history.slice(-50),a],_future:[],isDirty:!0})},o=a=>{r(),e({formConfig:a(t().formConfig)})};return{formConfig:Ai(),theme:{},activeTab:"steps",activeStepId:null,selectedFieldId:null,isDirty:!1,_history:[],_future:[],_push:r,undo:()=>{const{_history:a}=t();if(a.length===0)return;const i=a[a.length-1],c=n();e({formConfig:i.formConfig,theme:i.theme,_history:a.slice(0,-1),_future:[...t()._future,c]})},redo:()=>{const{_future:a}=t();if(a.length===0)return;const i=a[a.length-1],c=n();e({formConfig:i.formConfig,theme:i.theme,_future:a.slice(0,-1),_history:[...t()._history,c]})},canUndo:()=>t()._history.length>0,canRedo:()=>t()._future.length>0,markClean:()=>e({isDirty:!1}),setActiveTab:a=>e({activeTab:a}),setActiveStep:a=>e({activeStepId:a,selectedFieldId:null}),setSelectedField:a=>e({selectedFieldId:a}),updateTheme:a=>{r(),e({theme:{...t().theme,...a}})},resetTheme:()=>{r(),e({theme:{}})},addStep:a=>{const i=$e("step");return o(c=>({...c,steps:[...c.steps,{step_id:i,title:a||`Step ${c.steps.length+1}`,description:"",rows:[{row_id:$e("row"),layout:"horizontal",field_ids:[]}],navigation:{rules:[{rule_id:$e("rule"),condition:null,next_step_id:"__submit__",priority:0}]}}]})),e({activeStepId:i}),i},updateStep:(a,i)=>o(c=>({...c,steps:c.steps.map(l=>l.step_id===a?{...l,...i}:l)})),deleteStep:a=>{var i;o(c=>({...c,steps:c.steps.filter(l=>l.step_id!==a).map(l=>({...l,navigation:{...l.navigation,rules:l.navigation.rules.map(d=>d.next_step_id===a?{...d,next_step_id:"__submit__"}:d)}}))})),t().activeStepId===a&&e({activeStepId:((i=t().formConfig.steps[0])==null?void 0:i.step_id)||null})},reorderSteps:a=>o(i=>({...i,steps:a.map(c=>i.steps.find(l=>l.step_id===c)).filter(c=>!!c)})),moveStep:(a,i)=>o(c=>{const l=c.steps.findIndex(p=>p.step_id===a);if(l<0)return c;const d=i==="up"?l-1:l+1;if(d<0||d>=c.steps.length)return c;const u=[...c.steps];return[u[l],u[d]]=[u[d],u[l]],{...c,steps:u}}),addRow:(a,i="horizontal")=>{const c=$e("row");return o(l=>({...l,steps:l.steps.map(d=>d.step_id===a?{...d,rows:[...d.rows,{row_id:c,layout:i,field_ids:[]}]}:d)})),c},updateRow:(a,i,c)=>o(l=>({...l,steps:l.steps.map(d=>d.step_id===a?{...d,rows:d.rows.map(u=>u.row_id===i?{...u,...c}:u)}:d)})),deleteRow:(a,i)=>o(c=>({...c,steps:c.steps.map(l=>l.step_id===a?{...l,rows:l.rows.filter(d=>d.row_id!==i)}:l)})),moveRow:(a,i,c)=>o(l=>({...l,steps:l.steps.map(d=>{if(d.step_id!==a)return d;const u=d.rows.findIndex(m=>m.row_id===i);if(u<0)return d;const p=c==="up"?u-1:u+1;if(p<0||p>=d.rows.length)return d;const f=[...d.rows];return[f[u],f[p]]=[f[p],f[u]],{...d,rows:f}})})),createField:a=>{const i=zi(a);return o(c=>({...c,fields:[...c.fields,i]})),i.field_id},createFieldFromSpec:a=>{const i=Oi(a);return o(c=>({...c,fields:[...c.fields,i]})),i.field_id},updateField:(a,i)=>o(c=>({...c,fields:c.fields.map(l=>l.field_id===a?{...l,...i}:l)})),deleteField:a=>{o(i=>({...i,fields:i.fields.filter(c=>c.field_id!==a),steps:i.steps.map(c=>({...c,rows:c.rows.map(l=>({...l,field_ids:l.field_ids.filter(d=>d!==a)}))})),summary:{...i.summary,sections:i.summary.sections.map(c=>({...c,display_fields:c.display_fields.filter(l=>l.field_id!==a)}))}})),t().selectedFieldId===a&&e({selectedFieldId:null})},addFieldToRow:(a,i,c)=>o(l=>({...l,steps:l.steps.map(d=>d.step_id===a?{...d,rows:d.rows.map(u=>u.row_id===i?u.field_ids.includes(c)?u:{...u,field_ids:[...u.field_ids,c]}:u)}:d)})),addNewFieldToRow:(a,i,c)=>{const l=Xp(c)?Oi(c):zi(c);return o(d=>({...d,fields:[...d.fields,l],steps:d.steps.map(u=>u.step_id===a?{...u,rows:u.rows.map(p=>p.row_id===i?{...p,field_ids:[...p.field_ids,l.field_id]}:p)}:u)})),e({selectedFieldId:l.field_id}),l.field_id},removeFieldFromRow:(a,i,c)=>o(l=>({...l,steps:l.steps.map(d=>d.step_id===a?{...d,rows:d.rows.map(u=>u.row_id===i?{...u,field_ids:u.field_ids.filter(p=>p!==c)}:u)}:d)})),moveFieldInRow:(a,i,c,l)=>o(d=>({...d,steps:d.steps.map(u=>u.step_id!==a?u:{...u,rows:u.rows.map(p=>{if(p.row_id!==i)return p;const f=p.field_ids.indexOf(c);if(f<0)return p;const m=l==="left"?f-1:f+1;if(m<0||m>=p.field_ids.length)return p;const _=[...p.field_ids];return[_[f],_[m]]=[_[m],_[f]],{...p,field_ids:_}})})})),updateStepNavigation:(a,i)=>o(c=>({...c,steps:c.steps.map(l=>l.step_id===a?{...l,navigation:{...l.navigation,...i}}:l)})),setStepApiCall:(a,i)=>o(c=>({...c,steps:c.steps.map(l=>l.step_id===a?{...l,navigation:{...l.navigation,api_call:i}}:l)})),addNavRule:a=>{const i=$e("rule");return o(c=>({...c,steps:c.steps.map(l=>l.step_id===a?{...l,navigation:{...l.navigation,rules:[...l.navigation.rules,{rule_id:i,condition:null,next_step_id:"__submit__",priority:0}]}}:l)})),i},updateNavRule:(a,i,c)=>o(l=>({...l,steps:l.steps.map(d=>d.step_id===a?{...d,navigation:{...d.navigation,rules:d.navigation.rules.map(u=>u.rule_id===i?{...u,...c}:u)}}:d)})),deleteNavRule:(a,i)=>o(c=>({...c,steps:c.steps.map(l=>l.step_id===a?{...l,navigation:{...l.navigation,rules:l.navigation.rules.filter(d=>d.rule_id!==i)}}:l)})),updateSummary:a=>o(i=>({...i,summary:{...i.summary,...a}})),addSummarySection:a=>{const i=$e("section");return o(c=>({...c,summary:{...c.summary,sections:[...c.summary.sections,{section_id:i,title:a||"Section",display_fields:[]}]}})),i},updateSummarySection:(a,i)=>o(c=>({...c,summary:{...c.summary,sections:c.summary.sections.map(l=>l.section_id===a?{...l,...i}:l)}})),deleteSummarySection:a=>o(i=>({...i,summary:{...i.summary,sections:i.summary.sections.filter(c=>c.section_id!==a)}})),addDisplayField:(a,i="form_field")=>{const c=$e("display");return o(l=>({...l,summary:{...l.summary,sections:l.summary.sections.map(d=>d.section_id===a?{...d,display_fields:[...d.display_fields,{display_id:c,source:i,label:"",format:"text"}]}:d)}})),c},updateDisplayField:(a,i,c)=>o(l=>({...l,summary:{...l.summary,sections:l.summary.sections.map(d=>d.section_id===a?{...d,display_fields:d.display_fields.map(u=>u.display_id===i?{...u,...c}:u)}:d)}})),deleteDisplayField:(a,i)=>o(c=>({...c,summary:{...c.summary,sections:c.summary.sections.map(l=>l.section_id===a?{...l,display_fields:l.display_fields.filter(d=>d.display_id!==i)}:l)}})),updateInit:a=>o(i=>({...i,init:{...i.init,...a}})),importJourneySpec:a=>{var c;const i=a.form_config?Ua(a.form_config):dl(a);e({formConfig:i,theme:a.theme||{},activeStepId:((c=i.steps[0])==null?void 0:c.step_id)||null,selectedFieldId:null,_history:[],_future:[],isDirty:!1})},loadFormConfig:(a,i)=>{var c;e({formConfig:Ua(a),theme:i||{},activeStepId:((c=a.steps[0])==null?void 0:c.step_id)||null,selectedFieldId:null,_history:[],_future:[],isDirty:!1})},exportJourneySpec:a=>{const{formConfig:i,theme:c}=t(),l={journey_id:(a==null?void 0:a.journey_id)||`journey_${Date.now()}`,claimspec_id:(a==null?void 0:a.claimspec_id)||"",version:(a==null?void 0:a.version)||"2.0.0",form_config:i};return c&&Object.keys(c).length>0&&(l.theme=c),l},reset:()=>{e({formConfig:Ai(),theme:{},activeStepId:null,selectedFieldId:null,_history:[],_future:[],isDirty:!1})}}});function Ua(e){var t,n,r,o,a,i;return{steps:(e.steps||[]).map(c=>{var l,d,u;return{step_id:c.step_id||$e("step"),title:c.title||"Step",description:c.description||"",rows:(c.rows&&c.rows.length>0?c.rows:[{row_id:$e("row"),layout:"horizontal",field_ids:[]}]).map(p=>({row_id:p.row_id||$e("row"),layout:p.layout||"horizontal",field_ids:p.field_ids||[],title:p.title,show_divider:p.show_divider})),navigation:{api_call:(l=c.navigation)==null?void 0:l.api_call,button_label:(d=c.navigation)==null?void 0:d.button_label,rules:(u=c.navigation)!=null&&u.rules&&c.navigation.rules.length>0?c.navigation.rules.map(p=>({rule_id:p.rule_id||$e("rule"),condition:p.condition||null,next_step_id:p.next_step_id||"__submit__",priority:p.priority||0})):[{rule_id:$e("rule"),condition:null,next_step_id:"__submit__",priority:0}]}}}),fields:(e.fields||[]).map(c=>({...c,field_id:c.field_id||$e("field")})),summary:{title:((t=e.summary)==null?void 0:t.title)||"Summary",show_pricing:!!((n=e.summary)!=null&&n.show_pricing),show_sidebar:((r=e.summary)==null?void 0:r.show_sidebar)??!0,sections:(((o=e.summary)==null?void 0:o.sections)||[]).map(c=>({section_id:c.section_id||$e("section"),title:c.title||"Section",visible_from_step:c.visible_from_step,until_step:c.until_step,display_fields:(c.display_fields||[]).map(l=>({...l,display_id:l.display_id||$e("display"),format:l.format||"text"}))}))},init:{values:((a=e.init)==null?void 0:a.values)||{},api:(i=e.init)==null?void 0:i.api}}}function Fi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Wn(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Fi(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Fi(e[o],null)}}}}function xe(...e){return g.useCallback(Wn(...e),e)}var Jp=Symbol.for("react.lazy"),ho=g[" use ".trim().toString()];function Qp(e){return typeof e=="object"&&e!==null&&"then"in e}function ul(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Jp&&"_payload"in e&&Qp(e._payload)}function Oo(e){const t=eh(e),n=g.forwardRef((r,o)=>{let{children:a,...i}=r;ul(a)&&typeof ho=="function"&&(a=ho(a._payload));const c=g.Children.toArray(a),l=c.find(nh);if(l){const d=l.props.children,u=c.map(p=>p===l?g.Children.count(d)>1?g.Children.only(null):g.isValidElement(d)?d.props.children:null:p);return s.jsx(t,{...i,ref:o,children:g.isValidElement(d)?g.cloneElement(d,void 0,u):null})}return s.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var Zp=Oo("Slot");function eh(e){const t=g.forwardRef((n,r)=>{let{children:o,...a}=n;if(ul(o)&&typeof ho=="function"&&(o=ho(o._payload)),g.isValidElement(o)){const i=oh(o),c=rh(a,o.props);return o.type!==g.Fragment&&(c.ref=r?Wn(r,i):i),g.cloneElement(o,c)}return g.Children.count(o)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var th=Symbol("radix.slottable");function nh(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===th}function rh(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...c)=>{const l=a(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function oh(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function fl(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=fl(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ml(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=fl(e))&&(r&&(r+=" "),r+=t);return r}const $i=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Li=ml,Rr=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Li(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(d=>{const u=n==null?void 0:n[d],p=a==null?void 0:a[d];if(u===null)return null;const f=$i(u)||$i(p);return o[d][f]}),c=n&&Object.entries(n).reduce((d,u)=>{let[p,f]=u;return f===void 0||(d[p]=f),d},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,u)=>{let{class:p,className:f,...m}=u;return Object.entries(m).every(_=>{let[h,j]=_;return Array.isArray(j)?j.includes({...a,...c}[h]):{...a,...c}[h]===j})?[...d,p,f]:d},[]);return Li(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},Ss="-",ah=e=>{const t=ih(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const c=i.split(Ss);return c[0]===""&&c.length!==1&&c.shift(),pl(c,t)||sh(i)},getConflictingClassGroupIds:(i,c)=>{const l=n[i]||[];return c&&r[i]?[...l,...r[i]]:l}}},pl=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?pl(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(Ss);return(i=t.validators.find(({validator:c})=>c(a)))==null?void 0:i.classGroupId},Bi=/^\[(.+)\]$/,sh=e=>{if(Bi.test(e)){const t=Bi.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},ih=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return lh(Object.entries(e.classGroups),n).forEach(([a,i])=>{Ga(i,r,a,t)}),r},Ga=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Hi(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(ch(o)){Ga(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,i])=>{Ga(i,Hi(t,a),n,r)})})},Hi=(e,t)=>{let n=e;return t.split(Ss).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},ch=e=>e.isThemeGetter,lh=(e,t)=>t?e.map(([n,r])=>{const o=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,c])=>[t+i,c])):a);return[n,o]}):e,dh=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(a,i)=>{n.set(a,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let i=n.get(a);if(i!==void 0)return i;if((i=r.get(a))!==void 0)return o(a,i),i},set(a,i){n.has(a)?n.set(a,i):o(a,i)}}},hl="!",uh=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length,i=c=>{const l=[];let d=0,u=0,p;for(let j=0;j<c.length;j++){let v=c[j];if(d===0){if(v===o&&(r||c.slice(j,j+a)===t)){l.push(c.slice(u,j)),u=j+a;continue}if(v==="/"){p=j;continue}}v==="["?d++:v==="]"&&d--}const f=l.length===0?c:c.substring(u),m=f.startsWith(hl),_=m?f.substring(1):f,h=p&&p>u?p-u:void 0;return{modifiers:l,hasImportantModifier:m,baseClassName:_,maybePostfixModifierPosition:h}};return n?c=>n({className:c,parseClassName:i}):i},fh=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},mh=e=>({cache:dh(e.cacheSize),parseClassName:uh(e),...ah(e)}),ph=/\s+/,hh=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],i=e.trim().split(ph);let c="";for(let l=i.length-1;l>=0;l-=1){const d=i[l],{modifiers:u,hasImportantModifier:p,baseClassName:f,maybePostfixModifierPosition:m}=n(d);let _=!!m,h=r(_?f.substring(0,m):f);if(!h){if(!_){c=d+(c.length>0?" "+c:c);continue}if(h=r(f),!h){c=d+(c.length>0?" "+c:c);continue}_=!1}const j=fh(u).join(":"),v=p?j+hl:j,b=v+h;if(a.includes(b))continue;a.push(b);const w=o(h,_);for(let N=0;N<w.length;++N){const S=w[N];a.push(v+S)}c=d+(c.length>0?" "+c:c)}return c};function _h(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=_l(t))&&(r&&(r+=" "),r+=n);return r}const _l=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=_l(e[r]))&&(n&&(n+=" "),n+=t);return n};function qi(e,...t){let n,r,o,a=i;function i(l){const d=t.reduce((u,p)=>p(u),e());return n=mh(d),r=n.cache.get,o=n.cache.set,a=c,c(l)}function c(l){const d=r(l);if(d)return d;const u=hh(l,n);return o(l,u),u}return function(){return a(_h.apply(null,arguments))}}const ze=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},gl=/^\[(?:([a-z-]+):)?(.+)\]$/i,gh=/^\d+\/\d+$/,jh=new Set(["px","full","screen"]),yh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xh=/\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$/,vh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,bh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Kt=e=>Kn(e)||jh.has(e)||gh.test(e),ln=e=>ir(e,"length",Dh),Kn=e=>!!e&&!Number.isNaN(Number(e)),xa=e=>ir(e,"number",Kn),pr=e=>!!e&&Number.isInteger(Number(e)),Nh=e=>e.endsWith("%")&&Kn(e.slice(0,-1)),ge=e=>gl.test(e),dn=e=>yh.test(e),Sh=new Set(["length","size","percentage"]),Ch=e=>ir(e,Sh,jl),kh=e=>ir(e,"position",jl),Ph=new Set(["image","url"]),Eh=e=>ir(e,Ph,Rh),Mh=e=>ir(e,"",Th),hr=()=>!0,ir=(e,t,n)=>{const r=gl.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Dh=e=>xh.test(e)&&!vh.test(e),jl=()=>!1,Th=e=>bh.test(e),Rh=e=>wh.test(e),Yi=()=>{const e=ze("colors"),t=ze("spacing"),n=ze("blur"),r=ze("brightness"),o=ze("borderColor"),a=ze("borderRadius"),i=ze("borderSpacing"),c=ze("borderWidth"),l=ze("contrast"),d=ze("grayscale"),u=ze("hueRotate"),p=ze("invert"),f=ze("gap"),m=ze("gradientColorStops"),_=ze("gradientColorStopPositions"),h=ze("inset"),j=ze("margin"),v=ze("opacity"),b=ze("padding"),w=ze("saturate"),N=ze("scale"),S=ze("sepia"),x=ze("skew"),C=ze("space"),E=ze("translate"),M=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto",ge,t],k=()=>[ge,t],z=()=>["",Kt,ln],D=()=>["auto",Kn,ge],W=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],O=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",ge],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],de=()=>[Kn,ge];return{cacheSize:500,separator:":",theme:{colors:[hr],spacing:[Kt,ln],blur:["none","",dn,ge],brightness:de(),borderColor:[e],borderRadius:["none","","full",dn,ge],borderSpacing:k(),borderWidth:z(),contrast:de(),grayscale:R(),hueRotate:de(),invert:R(),gap:k(),gradientColorStops:[e],gradientColorStopPositions:[Nh,ln],inset:T(),margin:T(),opacity:de(),padding:k(),saturate:de(),scale:de(),sepia:R(),skew:de(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",ge]}],container:["container"],columns:[{columns:[dn]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"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"],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:[...W(),ge]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",pr,ge]}],basis:[{basis:T()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ge]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",pr,ge]}],"grid-cols":[{"grid-cols":[hr]}],"col-start-end":[{col:["auto",{span:["full",pr,ge]},ge]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[hr]}],"row-start-end":[{row:["auto",{span:[pr,ge]},ge]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ge]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ge]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...L()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...L(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...L(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[j]}],mx:[{mx:[j]}],my:[{my:[j]}],ms:[{ms:[j]}],me:[{me:[j]}],mt:[{mt:[j]}],mr:[{mr:[j]}],mb:[{mb:[j]}],ml:[{ml:[j]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ge,t]}],"min-w":[{"min-w":[ge,t,"min","max","fit"]}],"max-w":[{"max-w":[ge,t,"none","full","min","max","fit","prose",{screen:[dn]},dn]}],h:[{h:[ge,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ge,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ge,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ge,t,"auto","min","max","fit"]}],"font-size":[{text:["base",dn,ln]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",xa]}],"font-family":[{font:[hr]}],"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:["tighter","tight","normal","wide","wider","widest",ge]}],"line-clamp":[{"line-clamp":["none",Kn,xa]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Kt,ge]}],"list-image":[{"list-image":["none",ge]}],"list-style-type":[{list:["none","disc","decimal",ge]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Kt,ln]}],"underline-offset":[{"underline-offset":["auto",Kt,ge]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...W(),kh]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ch]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Eh]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[_]}],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...O(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:O()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...O()]}],"outline-offset":[{"outline-offset":[Kt,ge]}],"outline-w":[{outline:[Kt,ln]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Kt,ln]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",dn,Mh]}],"shadow-color":[{shadow:[hr]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",dn,ge]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[p]}],saturate:[{saturate:[w]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ge]}],duration:[{duration:de()}],ease:[{ease:["linear","in","out","in-out",ge]}],delay:[{delay:de()}],animate:[{animate:["none","spin","ping","pulse","bounce",ge]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[N]}],"scale-x":[{"scale-x":[N]}],"scale-y":[{"scale-y":[N]}],rotate:[{rotate:[pr,ge]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[x]}],"skew-y":[{"skew-y":[x]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ge]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",ge]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",ge]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Kt,ln,xa]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-s","border-w-e","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-s","border-color-e","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"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","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-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"]}}},Ah=(e,{cacheSize:t,prefix:n,separator:r,experimentalParseClassName:o,extend:a={},override:i={}})=>{jr(e,"cacheSize",t),jr(e,"prefix",n),jr(e,"separator",r),jr(e,"experimentalParseClassName",o);for(const c in i)Oh(e[c],i[c]);for(const c in a)zh(e[c],a[c]);return e},jr=(e,t,n)=>{n!==void 0&&(e[t]=n)},Oh=(e,t)=>{if(t)for(const n in t)jr(e,n,t[n])},zh=(e,t)=>{if(t)for(const n in t){const r=t[n];r!==void 0&&(e[n]=(e[n]||[]).concat(r))}},Ih=(e,...t)=>typeof e=="function"?qi(Yi,e,...t):qi(()=>Ah(Yi(),e),...t),Wh=Ih({prefix:"cj-"});function ne(...e){return Wh(ml(e))}const Cs=Rr("cj-inline-flex cj-items-center cj-justify-center cj-gap-2 cj-whitespace-nowrap cj-rounded-md cj-text-sm cj-font-medium cj-ring-offset-background cj-transition-colors focus-visible:cj-outline-none focus-visible:cj-ring-2 focus-visible:cj-ring-ring focus-visible:cj-ring-offset-2 disabled:cj-pointer-events-none disabled:cj-opacity-50 [&_svg]:cj-pointer-events-none [&_svg]:cj-size-4 [&_svg]:cj-shrink-0",{variants:{variant:{default:"cj-bg-primary cj-text-primary-foreground hover:cj-bg-primary/90",destructive:"cj-bg-destructive cj-text-destructive-foreground hover:cj-bg-destructive/90",outline:"cj-border cj-border-input cj-bg-background hover:cj-bg-accent hover:cj-text-accent-foreground",secondary:"cj-bg-secondary cj-text-secondary-foreground hover:cj-bg-secondary/80",ghost:"hover:cj-bg-accent hover:cj-text-accent-foreground",link:"cj-text-primary cj-underline-offset-4 hover:cj-underline"},size:{default:"cj-h-12 cj-px-4 cj-py-2",sm:"cj-h-10 cj-rounded-md cj-px-3",lg:"cj-h-14 cj-rounded-md cj-px-8",icon:"cj-h-12 cj-w-12"}},defaultVariants:{variant:"default",size:"default"}}),te=g.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},a)=>{const i=r?Zp:"button";return s.jsx(i,{className:ne(Cs({variant:t,size:n,className:e})),ref:a,...o})});te.displayName="Button";const Fh=Rr("cj-inline-flex cj-items-center cj-rounded-full cj-border cj-px-2.5 cj-py-0.5 cj-text-xs cj-font-semibold cj-transition-colors focus:cj-outline-none focus:cj-ring-2 focus:cj-ring-ring focus:cj-ring-offset-2",{variants:{variant:{default:"cj-border-transparent cj-bg-primary cj-text-primary-foreground hover:cj-bg-primary/80",secondary:"cj-border-transparent cj-bg-secondary cj-text-secondary-foreground hover:cj-bg-secondary/80",destructive:"cj-border-transparent cj-bg-destructive cj-text-destructive-foreground hover:cj-bg-destructive/80",outline:"cj-text-foreground"}},defaultVariants:{variant:"default"}});function it({className:e,variant:t,...n}){return s.jsx("div",{className:ne(Fh({variant:t}),e),...n})}function se(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function $h(e,t){const n=g.createContext(t),r=a=>{const{children:i,...c}=a,l=g.useMemo(()=>c,Object.values(c));return s.jsx(n.Provider,{value:l,children:i})};r.displayName=e+"Provider";function o(a){const i=g.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function _t(e,t=[]){let n=[];function r(a,i){const c=g.createContext(i),l=n.length;n=[...n,i];const d=p=>{var v;const{scope:f,children:m,..._}=p,h=((v=f==null?void 0:f[e])==null?void 0:v[l])||c,j=g.useMemo(()=>_,Object.values(_));return s.jsx(h.Provider,{value:j,children:m})};d.displayName=a+"Provider";function u(p,f){var h;const m=((h=f==null?void 0:f[e])==null?void 0:h[l])||c,_=g.useContext(m);if(_)return _;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[d,u]}const o=()=>{const a=n.map(i=>g.createContext(i));return function(c){const l=(c==null?void 0:c[e])||a;return g.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return o.scopeName=e,[r,Lh(o,...t)]}function Lh(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=r.reduce((c,{useScope:l,scopeName:d})=>{const p=l(a)[`__scope${d}`];return{...c,...p}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Vi(e){const t=Bh(e),n=g.forwardRef((r,o)=>{const{children:a,...i}=r,c=g.Children.toArray(a),l=c.find(qh);if(l){const d=l.props.children,u=c.map(p=>p===l?g.Children.count(d)>1?g.Children.only(null):g.isValidElement(d)?d.props.children:null:p);return s.jsx(t,{...i,ref:o,children:g.isValidElement(d)?g.cloneElement(d,void 0,u):null})}return s.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function Bh(e){const t=g.forwardRef((n,r)=>{const{children:o,...a}=n;if(g.isValidElement(o)){const i=Vh(o),c=Yh(a,o.props);return o.type!==g.Fragment&&(c.ref=r?Wn(r,i):i),g.cloneElement(o,c)}return g.Children.count(o)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Hh=Symbol("radix.slottable");function qh(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Hh}function Yh(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...c)=>{const l=a(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Vh(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function yl(e){const t=e+"CollectionProvider",[n,r]=_t(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:j,children:v}=h,b=y.useRef(null),w=y.useRef(new Map).current;return s.jsx(o,{scope:j,itemMap:w,collectionRef:b,children:v})};i.displayName=t;const c=e+"CollectionSlot",l=Vi(c),d=y.forwardRef((h,j)=>{const{scope:v,children:b}=h,w=a(c,v),N=xe(j,w.collectionRef);return s.jsx(l,{ref:N,children:b})});d.displayName=c;const u=e+"CollectionItemSlot",p="data-radix-collection-item",f=Vi(u),m=y.forwardRef((h,j)=>{const{scope:v,children:b,...w}=h,N=y.useRef(null),S=xe(j,N),x=a(u,v);return y.useEffect(()=>(x.itemMap.set(N,{ref:N,...w}),()=>void x.itemMap.delete(N))),s.jsx(f,{[p]:"",ref:S,children:b})});m.displayName=u;function _(h){const j=a(e+"CollectionConsumer",h);return y.useCallback(()=>{const b=j.collectionRef.current;if(!b)return[];const w=Array.from(b.querySelectorAll(`[${p}]`));return Array.from(j.itemMap.values()).sort((x,C)=>w.indexOf(x.ref.current)-w.indexOf(C.ref.current))},[j.collectionRef,j.itemMap])}return[{Provider:i,Slot:d,ItemSlot:m},_,r]}var Je=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},Uh=g[" useId ".trim().toString()]||(()=>{}),Gh=0;function Lt(e){const[t,n]=g.useState(Uh());return Je(()=>{n(r=>r??String(Gh++))},[e]),t?`radix-${t}`:""}function Xh(e){const t=Kh(e),n=g.forwardRef((r,o)=>{const{children:a,...i}=r,c=g.Children.toArray(a),l=c.find(Qh);if(l){const d=l.props.children,u=c.map(p=>p===l?g.Children.count(d)>1?g.Children.only(null):g.isValidElement(d)?d.props.children:null:p);return s.jsx(t,{...i,ref:o,children:g.isValidElement(d)?g.cloneElement(d,void 0,u):null})}return s.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function Kh(e){const t=g.forwardRef((n,r)=>{const{children:o,...a}=n;if(g.isValidElement(o)){const i=e_(o),c=Zh(a,o.props);return o.type!==g.Fragment&&(c.ref=r?Wn(r,i):i),g.cloneElement(o,c)}return g.Children.count(o)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Jh=Symbol("radix.slottable");function Qh(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Jh}function Zh(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...c)=>{const l=a(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function e_(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var t_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],le=t_.reduce((e,t)=>{const n=Xh(`Primitive.${t}`),r=g.forwardRef((o,a)=>{const{asChild:i,...c}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(l,{...c,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function n_(e,t){e&&Ao.flushSync(()=>e.dispatchEvent(t))}function rt(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var r_=g[" useInsertionEffect ".trim().toString()]||Je;function tn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=o_({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:o;{const u=g.useRef(e!==void 0);g.useEffect(()=>{const p=u.current;p!==c&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${c?"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.`),u.current=c},[c,r])}const d=g.useCallback(u=>{var p;if(c){const f=a_(u)?u(e):u;f!==e&&((p=i.current)==null||p.call(i,f))}else a(u)},[c,e,a,i]);return[l,d]}function o_({defaultProp:e,onChange:t}){const[n,r]=g.useState(e),o=g.useRef(n),a=g.useRef(t);return r_(()=>{a.current=t},[t]),g.useEffect(()=>{var i;o.current!==n&&((i=a.current)==null||i.call(a,n),o.current=n)},[n,o]),[n,r,a]}function a_(e){return typeof e=="function"}var s_=g.createContext(void 0);function Ar(e){const t=g.useContext(s_);return e||t||"ltr"}var va="rovingFocusGroup.onEntryFocus",i_={bubbles:!1,cancelable:!0},Or="RovingFocusGroup",[Xa,xl,c_]=yl(Or),[l_,zo]=_t(Or,[c_]),[d_,u_]=l_(Or),vl=g.forwardRef((e,t)=>s.jsx(Xa.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(Xa.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(f_,{...e,ref:t})})}));vl.displayName=Or;var f_=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:d,preventScrollOnEntryFocus:u=!1,...p}=e,f=g.useRef(null),m=xe(t,f),_=Ar(a),[h,j]=tn({prop:i,defaultProp:c??null,onChange:l,caller:Or}),[v,b]=g.useState(!1),w=rt(d),N=xl(n),S=g.useRef(!1),[x,C]=g.useState(0);return g.useEffect(()=>{const E=f.current;if(E)return E.addEventListener(va,w),()=>E.removeEventListener(va,w)},[w]),s.jsx(d_,{scope:n,orientation:r,dir:_,loop:o,currentTabStopId:h,onItemFocus:g.useCallback(E=>j(E),[j]),onItemShiftTab:g.useCallback(()=>b(!0),[]),onFocusableItemAdd:g.useCallback(()=>C(E=>E+1),[]),onFocusableItemRemove:g.useCallback(()=>C(E=>E-1),[]),children:s.jsx(le.div,{tabIndex:v||x===0?-1:0,"data-orientation":r,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:se(e.onMouseDown,()=>{S.current=!0}),onFocus:se(e.onFocus,E=>{const M=!S.current;if(E.target===E.currentTarget&&M&&!v){const P=new CustomEvent(va,i_);if(E.currentTarget.dispatchEvent(P),!P.defaultPrevented){const T=N().filter(O=>O.focusable),k=T.find(O=>O.active),z=T.find(O=>O.id===h),W=[k,z,...T].filter(Boolean).map(O=>O.ref.current);Nl(W,u)}}S.current=!1}),onBlur:se(e.onBlur,()=>b(!1))})})}),bl="RovingFocusGroupItem",wl=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...c}=e,l=Lt(),d=a||l,u=u_(bl,n),p=u.currentTabStopId===d,f=xl(n),{onFocusableItemAdd:m,onFocusableItemRemove:_,currentTabStopId:h}=u;return g.useEffect(()=>{if(r)return m(),()=>_()},[r,m,_]),s.jsx(Xa.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:s.jsx(le.span,{tabIndex:p?0:-1,"data-orientation":u.orientation,...c,ref:t,onMouseDown:se(e.onMouseDown,j=>{r?u.onItemFocus(d):j.preventDefault()}),onFocus:se(e.onFocus,()=>u.onItemFocus(d)),onKeyDown:se(e.onKeyDown,j=>{if(j.key==="Tab"&&j.shiftKey){u.onItemShiftTab();return}if(j.target!==j.currentTarget)return;const v=h_(j,u.orientation,u.dir);if(v!==void 0){if(j.metaKey||j.ctrlKey||j.altKey||j.shiftKey)return;j.preventDefault();let w=f().filter(N=>N.focusable).map(N=>N.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const N=w.indexOf(j.currentTarget);w=u.loop?__(w,N+1):w.slice(N+1)}setTimeout(()=>Nl(w))}}),children:typeof i=="function"?i({isCurrentTabStop:p,hasTabStop:h!=null}):i})})});wl.displayName=bl;var m_={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function p_(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function h_(e,t,n){const r=p_(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return m_[r]}function Nl(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function __(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Sl=vl,Cl=wl;function g_(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var gt=e=>{const{present:t,children:n}=e,r=j_(t),o=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),a=xe(r.ref,y_(o));return typeof n=="function"||r.isPresent?g.cloneElement(o,{ref:a}):null};gt.displayName="Presence";function j_(e){const[t,n]=g.useState(),r=g.useRef(null),o=g.useRef(e),a=g.useRef("none"),i=e?"mounted":"unmounted",[c,l]=g_(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const d=Kr(r.current);a.current=c==="mounted"?d:"none"},[c]),Je(()=>{const d=r.current,u=o.current;if(u!==e){const f=a.current,m=Kr(d);e?l("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?l("UNMOUNT"):l(u&&f!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Je(()=>{if(t){let d;const u=t.ownerDocument.defaultView??window,p=m=>{const h=Kr(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&h&&(l("ANIMATION_END"),!o.current)){const j=t.style.animationFillMode;t.style.animationFillMode="forwards",d=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=j)})}},f=m=>{m.target===t&&(a.current=Kr(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{u.clearTimeout(d),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:g.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function Kr(e){return(e==null?void 0:e.animationName)||"none"}function y_(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Io="Tabs",[x_]=_t(Io,[zo]),kl=zo(),[v_,ks]=x_(Io),Pl=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:c,activationMode:l="automatic",...d}=e,u=Ar(c),[p,f]=tn({prop:r,onChange:o,defaultProp:a??"",caller:Io});return s.jsx(v_,{scope:n,baseId:Lt(),value:p,onValueChange:f,orientation:i,dir:u,activationMode:l,children:s.jsx(le.div,{dir:u,"data-orientation":i,...d,ref:t})})});Pl.displayName=Io;var El="TabsList",Ml=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=ks(El,n),i=kl(n);return s.jsx(Sl,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:r,children:s.jsx(le.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});Ml.displayName=El;var Dl="TabsTrigger",Tl=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=ks(Dl,n),c=kl(n),l=Ol(i.baseId,r),d=zl(i.baseId,r),u=r===i.value;return s.jsx(Cl,{asChild:!0,...c,focusable:!o,active:u,children:s.jsx(le.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":d,"data-state":u?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:se(e.onMouseDown,p=>{!o&&p.button===0&&p.ctrlKey===!1?i.onValueChange(r):p.preventDefault()}),onKeyDown:se(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&i.onValueChange(r)}),onFocus:se(e.onFocus,()=>{const p=i.activationMode!=="manual";!u&&!o&&p&&i.onValueChange(r)})})})});Tl.displayName=Dl;var Rl="TabsContent",Al=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,c=ks(Rl,n),l=Ol(c.baseId,r),d=zl(c.baseId,r),u=r===c.value,p=g.useRef(u);return g.useEffect(()=>{const f=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(f)},[]),s.jsx(gt,{present:o||u,children:({present:f})=>s.jsx(le.div,{"data-state":u?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:d,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:f&&a})})});Al.displayName=Rl;function Ol(e,t){return`${e}-trigger-${t}`}function zl(e,t){return`${e}-content-${t}`}var b_=Pl,Il=Ml,Wl=Tl,Fl=Al;const w_=b_,$l=g.forwardRef(({className:e,...t},n)=>s.jsx(Il,{ref:n,className:ne("cj-inline-flex cj-h-10 cj-items-center cj-justify-center cj-rounded-md cj-bg-muted cj-p-1 cj-text-muted-foreground",e),...t}));$l.displayName=Il.displayName;const yr=g.forwardRef(({className:e,...t},n)=>s.jsx(Wl,{ref:n,className:ne("cj-inline-flex cj-items-center cj-justify-center cj-whitespace-nowrap cj-rounded-sm cj-px-3 cj-py-1.5 cj-text-sm cj-font-medium cj-ring-offset-background cj-transition-all data-[state=active]:cj-bg-background data-[state=active]:cj-text-foreground data-[state=active]:cj-shadow-sm focus-visible:cj-outline-none focus-visible:cj-ring-2 focus-visible:cj-ring-ring focus-visible:cj-ring-offset-2 disabled:cj-pointer-events-none disabled:cj-opacity-50",e),...t}));yr.displayName=Wl.displayName;const N_=g.forwardRef(({className:e,...t},n)=>s.jsx(Fl,{ref:n,className:ne("cj-mt-2 cj-ring-offset-background focus-visible:cj-outline-none focus-visible:cj-ring-2 focus-visible:cj-ring-ring focus-visible:cj-ring-offset-2",e),...t}));N_.displayName=Fl.displayName;/**
|
|
3
3
|
* @license lucide-react v0.462.0 - ISC
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the ISC license.
|
|
6
6
|
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/const
|
|
7
|
+
*/const S_=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ll=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
8
8
|
* @license lucide-react v0.462.0 - ISC
|
|
9
9
|
*
|
|
10
10
|
* This source code is licensed under the ISC license.
|
|
11
11
|
* See the LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/var
|
|
12
|
+
*/var C_={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
13
13
|
* @license lucide-react v0.462.0 - ISC
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the ISC license.
|
|
16
16
|
* See the LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/const
|
|
17
|
+
*/const k_=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...c},l)=>y.createElement("svg",{ref:l,...C_,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ll("lucide",o),...c},[...i.map(([d,u])=>y.createElement(d,u)),...Array.isArray(a)?a:[a]]));/**
|
|
18
18
|
* @license lucide-react v0.462.0 - ISC
|
|
19
19
|
*
|
|
20
20
|
* This source code is licensed under the ISC license.
|
|
21
21
|
* See the LICENSE file in the root directory of this source tree.
|
|
22
|
-
*/const
|
|
22
|
+
*/const ue=(e,t)=>{const n=y.forwardRef(({className:r,...o},a)=>y.createElement(k_,{ref:a,iconNode:t,className:Ll(`lucide-${S_(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
|
|
23
23
|
* @license lucide-react v0.462.0 - ISC
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the ISC license.
|
|
26
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/const
|
|
27
|
+
*/const Bl=ue("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
28
28
|
* @license lucide-react v0.462.0 - ISC
|
|
29
29
|
*
|
|
30
30
|
* This source code is licensed under the ISC license.
|
|
31
31
|
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/const Wo=
|
|
32
|
+
*/const Wo=ue("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
33
33
|
* @license lucide-react v0.462.0 - ISC
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the ISC license.
|
|
36
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/const
|
|
37
|
+
*/const Hl=ue("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
|
38
38
|
* @license lucide-react v0.462.0 - ISC
|
|
39
39
|
*
|
|
40
40
|
* This source code is licensed under the ISC license.
|
|
41
41
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/const
|
|
42
|
+
*/const ql=ue("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
43
43
|
* @license lucide-react v0.462.0 - ISC
|
|
44
44
|
*
|
|
45
45
|
* This source code is licensed under the ISC license.
|
|
46
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/const
|
|
47
|
+
*/const Ht=ue("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
48
48
|
* @license lucide-react v0.462.0 - ISC
|
|
49
49
|
*
|
|
50
50
|
* This source code is licensed under the ISC license.
|
|
51
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/const
|
|
52
|
+
*/const P_=ue("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
53
53
|
* @license lucide-react v0.462.0 - ISC
|
|
54
54
|
*
|
|
55
55
|
* This source code is licensed under the ISC license.
|
|
56
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/const
|
|
57
|
+
*/const E_=ue("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
58
58
|
* @license lucide-react v0.462.0 - ISC
|
|
59
59
|
*
|
|
60
60
|
* This source code is licensed under the ISC license.
|
|
61
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/const _o=
|
|
62
|
+
*/const _o=ue("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
63
63
|
* @license lucide-react v0.462.0 - ISC
|
|
64
64
|
*
|
|
65
65
|
* This source code is licensed under the ISC license.
|
|
66
66
|
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/const
|
|
67
|
+
*/const Ps=ue("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
68
68
|
* @license lucide-react v0.462.0 - ISC
|
|
69
69
|
*
|
|
70
70
|
* This source code is licensed under the ISC license.
|
|
71
71
|
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/const
|
|
72
|
+
*/const M_=ue("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
73
73
|
* @license lucide-react v0.462.0 - ISC
|
|
74
74
|
*
|
|
75
75
|
* This source code is licensed under the ISC license.
|
|
76
76
|
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
-
*/const
|
|
77
|
+
*/const Ui=ue("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
78
78
|
* @license lucide-react v0.462.0 - ISC
|
|
79
79
|
*
|
|
80
80
|
* This source code is licensed under the ISC license.
|
|
81
81
|
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/const
|
|
82
|
+
*/const Gi=ue("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
83
83
|
* @license lucide-react v0.462.0 - ISC
|
|
84
84
|
*
|
|
85
85
|
* This source code is licensed under the ISC license.
|
|
86
86
|
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/const
|
|
87
|
+
*/const D_=ue("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
88
88
|
* @license lucide-react v0.462.0 - ISC
|
|
89
89
|
*
|
|
90
90
|
* This source code is licensed under the ISC license.
|
|
91
91
|
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/const
|
|
92
|
+
*/const T_=ue("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
93
93
|
* @license lucide-react v0.462.0 - ISC
|
|
94
94
|
*
|
|
95
95
|
* This source code is licensed under the ISC license.
|
|
96
96
|
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/const
|
|
97
|
+
*/const R_=ue("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
|
98
98
|
* @license lucide-react v0.462.0 - ISC
|
|
99
99
|
*
|
|
100
100
|
* This source code is licensed under the ISC license.
|
|
101
101
|
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/const
|
|
102
|
+
*/const A_=ue("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
103
103
|
* @license lucide-react v0.462.0 - ISC
|
|
104
104
|
*
|
|
105
105
|
* This source code is licensed under the ISC license.
|
|
106
106
|
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const
|
|
107
|
+
*/const O_=ue("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
108
108
|
* @license lucide-react v0.462.0 - ISC
|
|
109
109
|
*
|
|
110
110
|
* This source code is licensed under the ISC license.
|
|
111
111
|
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/const
|
|
112
|
+
*/const z_=ue("FileJson",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);/**
|
|
113
113
|
* @license lucide-react v0.462.0 - ISC
|
|
114
114
|
*
|
|
115
115
|
* This source code is licensed under the ISC license.
|
|
116
116
|
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/const
|
|
117
|
+
*/const I_=ue("FilePen",[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]]);/**
|
|
118
118
|
* @license lucide-react v0.462.0 - ISC
|
|
119
119
|
*
|
|
120
120
|
* This source code is licensed under the ISC license.
|
|
121
121
|
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/const
|
|
122
|
+
*/const Yl=ue("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
123
123
|
* @license lucide-react v0.462.0 - ISC
|
|
124
124
|
*
|
|
125
125
|
* This source code is licensed under the ISC license.
|
|
126
126
|
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
-
*/const
|
|
127
|
+
*/const W_=ue("FileUp",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"m15 15-3-3-3 3",key:"15xj92"}]]);/**
|
|
128
128
|
* @license lucide-react v0.462.0 - ISC
|
|
129
129
|
*
|
|
130
130
|
* This source code is licensed under the ISC license.
|
|
131
131
|
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
-
*/const
|
|
132
|
+
*/const F_=ue("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
|
133
133
|
* @license lucide-react v0.462.0 - ISC
|
|
134
134
|
*
|
|
135
135
|
* This source code is licensed under the ISC license.
|
|
136
136
|
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
-
*/const
|
|
137
|
+
*/const Vl=ue("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
|
|
138
138
|
* @license lucide-react v0.462.0 - ISC
|
|
139
139
|
*
|
|
140
140
|
* This source code is licensed under the ISC license.
|
|
141
141
|
* See the LICENSE file in the root directory of this source tree.
|
|
142
|
-
*/const
|
|
142
|
+
*/const $_=ue("LayoutList",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]]);/**
|
|
143
143
|
* @license lucide-react v0.462.0 - ISC
|
|
144
144
|
*
|
|
145
145
|
* This source code is licensed under the ISC license.
|
|
146
146
|
* See the LICENSE file in the root directory of this source tree.
|
|
147
|
-
*/const
|
|
147
|
+
*/const Fo=ue("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
148
148
|
* @license lucide-react v0.462.0 - ISC
|
|
149
149
|
*
|
|
150
150
|
* This source code is licensed under the ISC license.
|
|
151
151
|
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
-
*/const
|
|
152
|
+
*/const L_=ue("LockKeyholeOpen",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{width:"18",height:"12",x:"3",y:"10",rx:"2",key:"l0tzu3"}],["path",{d:"M7 10V7a5 5 0 0 1 9.33-2.5",key:"car5b7"}]]);/**
|
|
153
153
|
* @license lucide-react v0.462.0 - ISC
|
|
154
154
|
*
|
|
155
155
|
* This source code is licensed under the ISC license.
|
|
156
156
|
* See the LICENSE file in the root directory of this source tree.
|
|
157
|
-
*/const
|
|
157
|
+
*/const B_=ue("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
|
158
158
|
* @license lucide-react v0.462.0 - ISC
|
|
159
159
|
*
|
|
160
160
|
* This source code is licensed under the ISC license.
|
|
161
161
|
* See the LICENSE file in the root directory of this source tree.
|
|
162
|
-
*/const
|
|
162
|
+
*/const H_=ue("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
|
|
163
163
|
* @license lucide-react v0.462.0 - ISC
|
|
164
164
|
*
|
|
165
165
|
* This source code is licensed under the ISC license.
|
|
166
166
|
* See the LICENSE file in the root directory of this source tree.
|
|
167
|
-
*/const
|
|
167
|
+
*/const ba=ue("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
|
|
168
168
|
* @license lucide-react v0.462.0 - ISC
|
|
169
169
|
*
|
|
170
170
|
* This source code is licensed under the ISC license.
|
|
171
171
|
* See the LICENSE file in the root directory of this source tree.
|
|
172
|
-
*/const
|
|
172
|
+
*/const q_=ue("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/**
|
|
173
173
|
* @license lucide-react v0.462.0 - ISC
|
|
174
174
|
*
|
|
175
175
|
* This source code is licensed under the ISC license.
|
|
176
176
|
* See the LICENSE file in the root directory of this source tree.
|
|
177
|
-
*/const
|
|
177
|
+
*/const Y_=ue("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
|
|
178
178
|
* @license lucide-react v0.462.0 - ISC
|
|
179
179
|
*
|
|
180
180
|
* This source code is licensed under the ISC license.
|
|
181
181
|
* See the LICENSE file in the root directory of this source tree.
|
|
182
|
-
*/const Et=
|
|
182
|
+
*/const Et=ue("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
183
183
|
* @license lucide-react v0.462.0 - ISC
|
|
184
184
|
*
|
|
185
185
|
* This source code is licensed under the ISC license.
|
|
186
186
|
* See the LICENSE file in the root directory of this source tree.
|
|
187
|
-
*/const
|
|
187
|
+
*/const V_=ue("Redo2",[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]);/**
|
|
188
188
|
* @license lucide-react v0.462.0 - ISC
|
|
189
189
|
*
|
|
190
190
|
* This source code is licensed under the ISC license.
|
|
191
191
|
* See the LICENSE file in the root directory of this source tree.
|
|
192
|
-
*/const
|
|
192
|
+
*/const Ul=ue("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
193
193
|
* @license lucide-react v0.462.0 - ISC
|
|
194
194
|
*
|
|
195
195
|
* This source code is licensed under the ISC license.
|
|
196
196
|
* See the LICENSE file in the root directory of this source tree.
|
|
197
|
-
*/const
|
|
197
|
+
*/const U_=ue("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
|
198
198
|
* @license lucide-react v0.462.0 - ISC
|
|
199
199
|
*
|
|
200
200
|
* This source code is licensed under the ISC license.
|
|
201
201
|
* See the LICENSE file in the root directory of this source tree.
|
|
202
|
-
*/const
|
|
202
|
+
*/const Gl=ue("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
203
203
|
* @license lucide-react v0.462.0 - ISC
|
|
204
204
|
*
|
|
205
205
|
* This source code is licensed under the ISC license.
|
|
206
206
|
* See the LICENSE file in the root directory of this source tree.
|
|
207
|
-
*/const G_=
|
|
207
|
+
*/const G_=ue("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
208
208
|
* @license lucide-react v0.462.0 - ISC
|
|
209
209
|
*
|
|
210
210
|
* This source code is licensed under the ISC license.
|
|
211
211
|
* See the LICENSE file in the root directory of this source tree.
|
|
212
|
-
*/const
|
|
212
|
+
*/const X_=ue("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
|
|
213
213
|
* @license lucide-react v0.462.0 - ISC
|
|
214
214
|
*
|
|
215
215
|
* This source code is licensed under the ISC license.
|
|
216
216
|
* See the LICENSE file in the root directory of this source tree.
|
|
217
|
-
*/const
|
|
217
|
+
*/const K_=ue("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
218
218
|
* @license lucide-react v0.462.0 - ISC
|
|
219
219
|
*
|
|
220
220
|
* This source code is licensed under the ISC license.
|
|
221
221
|
* See the LICENSE file in the root directory of this source tree.
|
|
222
|
-
*/const Fn=
|
|
222
|
+
*/const Fn=ue("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
223
223
|
* @license lucide-react v0.462.0 - ISC
|
|
224
224
|
*
|
|
225
225
|
* This source code is licensed under the ISC license.
|
|
226
226
|
* See the LICENSE file in the root directory of this source tree.
|
|
227
|
-
*/const
|
|
227
|
+
*/const Xi=ue("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
228
228
|
* @license lucide-react v0.462.0 - ISC
|
|
229
229
|
*
|
|
230
230
|
* This source code is licensed under the ISC license.
|
|
231
231
|
* See the LICENSE file in the root directory of this source tree.
|
|
232
|
-
*/const
|
|
232
|
+
*/const J_=ue("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);/**
|
|
233
233
|
* @license lucide-react v0.462.0 - ISC
|
|
234
234
|
*
|
|
235
235
|
* This source code is licensed under the ISC license.
|
|
236
236
|
* See the LICENSE file in the root directory of this source tree.
|
|
237
|
-
*/const
|
|
237
|
+
*/const Es=ue("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
238
238
|
* @license lucide-react v0.462.0 - ISC
|
|
239
239
|
*
|
|
240
240
|
* This source code is licensed under the ISC license.
|
|
241
241
|
* See the LICENSE file in the root directory of this source tree.
|
|
242
|
-
*/const
|
|
242
|
+
*/const Tt=ue("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
243
243
|
* @license lucide-react v0.462.0 - ISC
|
|
244
244
|
*
|
|
245
245
|
* This source code is licensed under the ISC license.
|
|
246
246
|
* See the LICENSE file in the root directory of this source tree.
|
|
247
|
-
*/const Gl=de("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Fo=v.createContext(null);Fo.displayName="PanelGroupContext";const Be={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Ps=10,Tn=v.useLayoutEffect,Gi=_.useId,J_=typeof Gi=="function"?Gi:()=>null;let Q_=0;function Es(e=null){const t=J_(),n=v.useRef(e||t||null);return n.current===null&&(n.current=""+Q_++),e??n.current}function Ul({children:e,className:t="",collapsedSize:n,collapsible:r,defaultSize:o,forwardedRef:a,id:i,maxSize:c,minSize:l,onCollapse:d,onExpand:u,onResize:m,order:f,style:p,tagName:g="div",...h}){const j=v.useContext(Fo);if(j===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:b,getPanelSize:w,getPanelStyle:N,groupId:S,isPanelCollapsed:y,reevaluatePanelConstraints:C,registerPanel:E,resizePanel:P,unregisterPanel:k}=j,D=Es(i),M=v.useRef({callbacks:{onCollapse:d,onExpand:u,onResize:m},constraints:{collapsedSize:n,collapsible:r,defaultSize:o,maxSize:c,minSize:l},id:D,idIsFromProps:i!==void 0,order:f});v.useRef({didLogMissingDefaultSizeWarning:!1}),Tn(()=>{const{callbacks:z,constraints:G}=M.current,W={...G};M.current.id=D,M.current.idIsFromProps=i!==void 0,M.current.order=f,z.onCollapse=d,z.onExpand=u,z.onResize=m,G.collapsedSize=n,G.collapsible=r,G.defaultSize=o,G.maxSize=c,G.minSize=l,(W.collapsedSize!==G.collapsedSize||W.collapsible!==G.collapsible||W.maxSize!==G.maxSize||W.minSize!==G.minSize)&&C(M.current,W)}),Tn(()=>{const z=M.current;return E(z),()=>{k(z)}},[f,D,E,k]),v.useImperativeHandle(a,()=>({collapse:()=>{x(M.current)},expand:z=>{b(M.current,z)},getId(){return D},getSize(){return w(M.current)},isCollapsed(){return y(M.current)},isExpanded(){return!y(M.current)},resize:z=>{P(M.current,z)}}),[x,b,w,y,D,P]);const A=N(M.current,o);return v.createElement(g,{...h,children:e,className:t,id:D,style:{...A,...p},[Be.groupId]:S,[Be.panel]:"",[Be.panelCollapsible]:r||void 0,[Be.panelId]:D,[Be.panelSize]:parseFloat(""+A.flexGrow).toFixed(1)})}const Xl=v.forwardRef((e,t)=>v.createElement(Ul,{...e,forwardedRef:t}));Ul.displayName="Panel";Xl.displayName="forwardRef(Panel)";let Xa=null,lo=-1,pn=null;function Z_(e,t){if(t){const n=(t&ed)!==0,r=(t&td)!==0,o=(t&nd)!==0,a=(t&rd)!==0;if(n)return o?"se-resize":a?"ne-resize":"e-resize";if(r)return o?"sw-resize":a?"nw-resize":"w-resize";if(o)return"s-resize";if(a)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function eg(){pn!==null&&(document.head.removeChild(pn),Xa=null,pn=null,lo=-1)}function ba(e,t){var n,r;const o=Z_(e,t);if(Xa!==o){if(Xa=o,pn===null&&(pn=document.createElement("style"),document.head.appendChild(pn)),lo>=0){var a;(a=pn.sheet)===null||a===void 0||a.removeRule(lo)}lo=(n=(r=pn.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${o} !important;}`))!==null&&n!==void 0?n:-1}}function Kl(e){return e.type==="keydown"}function Jl(e){return e.type.startsWith("pointer")}function Ql(e){return e.type.startsWith("mouse")}function $o(e){if(Jl(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(Ql(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function tg(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function ng(e,t,n){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function rg(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:Ki(e),b:Ki(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;ye(r,"Stacking order can only be calculated for elements with a common ancestor");const o={a:Xi(Ui(n.a)),b:Xi(Ui(n.b))};if(o.a===o.b){const a=r.childNodes,i={a:n.a.at(-1),b:n.b.at(-1)};let c=a.length;for(;c--;){const l=a[c];if(l===i.a)return 1;if(l===i.b)return-1}}return Math.sign(o.a-o.b)}const og=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function ag(e){var t;const n=getComputedStyle((t=Zl(e))!==null&&t!==void 0?t:e).display;return n==="flex"||n==="inline-flex"}function sg(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||ag(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||og.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function Ui(e){let t=e.length;for(;t--;){const n=e[t];if(ye(n,"Missing node"),sg(n))return n}return null}function Xi(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Ki(e){const t=[];for(;e;)t.push(e),e=Zl(e);return t}function Zl(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const ed=1,td=2,nd=4,rd=8,ig=tg()==="coarse";let Pt=[],Jn=!1,En=new Map,Lo=new Map;const kr=new Set;function cg(e,t,n,r,o){var a;const{ownerDocument:i}=t,c={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:o},l=(a=En.get(i))!==null&&a!==void 0?a:0;return En.set(i,l+1),kr.add(c),go(),function(){var u;Lo.delete(e),kr.delete(c);const m=(u=En.get(i))!==null&&u!==void 0?u:1;if(En.set(i,m-1),go(),m===1&&En.delete(i),Pt.includes(c)){const f=Pt.indexOf(c);f>=0&&Pt.splice(f,1),Ds(),o("up",!0,null)}}}function lg(e){const{target:t}=e,{x:n,y:r}=$o(e);Jn=!0,Ms({target:t,x:n,y:r}),go(),Pt.length>0&&(jo("down",e),e.preventDefault(),od(t)||e.stopImmediatePropagation())}function wa(e){const{x:t,y:n}=$o(e);if(Jn&&e.buttons===0&&(Jn=!1,jo("up",e)),!Jn){const{target:r}=e;Ms({target:r,x:t,y:n})}jo("move",e),Ds(),Pt.length>0&&e.preventDefault()}function Na(e){const{target:t}=e,{x:n,y:r}=$o(e);Lo.clear(),Jn=!1,Pt.length>0&&(e.preventDefault(),od(t)||e.stopImmediatePropagation()),jo("up",e),Ms({target:t,x:n,y:r}),Ds(),go()}function od(e){let t=e;for(;t;){if(t.hasAttribute(Be.resizeHandle))return!0;t=t.parentElement}return!1}function Ms({target:e,x:t,y:n}){Pt.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),kr.forEach(o=>{const{element:a,hitAreaMargins:i}=o,c=a.getBoundingClientRect(),{bottom:l,left:d,right:u,top:m}=c,f=ig?i.coarse:i.fine;if(t>=d-f&&t<=u+f&&n>=m-f&&n<=l+f){if(r!==null&&document.contains(r)&&a!==r&&!a.contains(r)&&!r.contains(a)&&rg(r,a)>0){let g=r,h=!1;for(;g&&!g.contains(a);){if(ng(g.getBoundingClientRect(),c)){h=!0;break}g=g.parentElement}if(h)return}Pt.push(o)}})}function Sa(e,t){Lo.set(e,t)}function Ds(){let e=!1,t=!1;Pt.forEach(r=>{const{direction:o}=r;o==="horizontal"?e=!0:t=!0});let n=0;Lo.forEach(r=>{n|=r}),e&&t?ba("intersection",n):e?ba("horizontal",n):t?ba("vertical",n):eg()}let Ca=new AbortController;function go(){Ca.abort(),Ca=new AbortController;const e={capture:!0,signal:Ca.signal};kr.size&&(Jn?(Pt.length>0&&En.forEach((t,n)=>{const{body:r}=n;t>0&&(r.addEventListener("contextmenu",Na,e),r.addEventListener("pointerleave",wa,e),r.addEventListener("pointermove",wa,e))}),window.addEventListener("pointerup",Na,e),window.addEventListener("pointercancel",Na,e)):En.forEach((t,n)=>{const{body:r}=n;t>0&&(r.addEventListener("pointerdown",lg,e),r.addEventListener("pointermove",wa,e))}))}function jo(e,t){kr.forEach(n=>{const{setResizeHandlerState:r}=n,o=Pt.includes(n);r(e,o,t)})}function dg(){const[e,t]=v.useState(0);return v.useCallback(()=>t(n=>n+1),[])}function ye(e,t){if(!e)throw console.error(t),Error(t)}function Rn(e,t,n=Ps){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function Jt(e,t,n=Ps){return Rn(e,t,n)===0}function dt(e,t,n){return Rn(e,t,n)===0}function ug(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const o=e[r],a=t[r];if(!dt(o,a,n))return!1}return!0}function Xn({panelConstraints:e,panelIndex:t,size:n}){const r=e[t];ye(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:o=0,collapsible:a,maxSize:i=100,minSize:c=0}=r;if(Rn(n,c)<0)if(a){const l=(o+c)/2;Rn(n,l)<0?n=o:n=c}else n=c;return n=Math.min(i,n),n=parseFloat(n.toFixed(Ps)),n}function vr({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:o,trigger:a}){if(dt(e,0))return t;const i=[...t],[c,l]=r;ye(c!=null,"Invalid first pivot index"),ye(l!=null,"Invalid second pivot index");let d=0;if(a==="keyboard"){{const m=e<0?l:c,f=n[m];ye(f,`Panel constraints not found for index ${m}`);const{collapsedSize:p=0,collapsible:g,minSize:h=0}=f;if(g){const j=t[m];if(ye(j!=null,`Previous layout not found for panel index ${m}`),dt(j,p)){const x=h-j;Rn(x,Math.abs(e))>0&&(e=e<0?0-x:x)}}}{const m=e<0?c:l,f=n[m];ye(f,`No panel constraints found for index ${m}`);const{collapsedSize:p=0,collapsible:g,minSize:h=0}=f;if(g){const j=t[m];if(ye(j!=null,`Previous layout not found for panel index ${m}`),dt(j,h)){const x=j-p;Rn(x,Math.abs(e))>0&&(e=e<0?0-x:x)}}}}{const m=e<0?1:-1;let f=e<0?l:c,p=0;for(;;){const h=t[f];ye(h!=null,`Previous layout not found for panel index ${f}`);const x=Xn({panelConstraints:n,panelIndex:f,size:100})-h;if(p+=x,f+=m,f<0||f>=n.length)break}const g=Math.min(Math.abs(e),Math.abs(p));e=e<0?0-g:g}{let f=e<0?c:l;for(;f>=0&&f<n.length;){const p=Math.abs(e)-Math.abs(d),g=t[f];ye(g!=null,`Previous layout not found for panel index ${f}`);const h=g-p,j=Xn({panelConstraints:n,panelIndex:f,size:h});if(!dt(g,j)&&(d+=g-j,i[f]=j,d.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?f--:f++}}if(ug(o,i))return o;{const m=e<0?l:c,f=t[m];ye(f!=null,`Previous layout not found for panel index ${m}`);const p=f+d,g=Xn({panelConstraints:n,panelIndex:m,size:p});if(i[m]=g,!dt(g,p)){let h=p-g,x=e<0?l:c;for(;x>=0&&x<n.length;){const b=i[x];ye(b!=null,`Previous layout not found for panel index ${x}`);const w=b+h,N=Xn({panelConstraints:n,panelIndex:x,size:w});if(dt(b,N)||(h-=N-b,i[x]=N),dt(h,0))break;e>0?x--:x++}}}const u=i.reduce((m,f)=>f+m,0);return dt(u,100)?i:o}function fg({layout:e,panelsArray:t,pivotIndices:n}){let r=0,o=100,a=0,i=0;const c=n[0];ye(c!=null,"No pivot index found"),t.forEach((m,f)=>{const{constraints:p}=m,{maxSize:g=100,minSize:h=0}=p;f===c?(r=h,o=g):(a+=h,i+=g)});const l=Math.min(o,100-a),d=Math.max(r,100-i),u=e[c];return{valueMax:l,valueMin:d,valueNow:u}}function Pr(e,t=document){return Array.from(t.querySelectorAll(`[${Be.resizeHandleId}][data-panel-group-id="${e}"]`))}function ad(e,t,n=document){const o=Pr(e,n).findIndex(a=>a.getAttribute(Be.resizeHandleId)===t);return o??null}function sd(e,t,n){const r=ad(e,t,n);return r!=null?[r,r+1]:[-1,-1]}function id(e,t=document){var n;if(t instanceof HTMLElement&&(t==null||(n=t.dataset)===null||n===void 0?void 0:n.panelGroupId)==e)return t;const r=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return r||null}function Bo(e,t=document){const n=t.querySelector(`[${Be.resizeHandleId}="${e}"]`);return n||null}function mg(e,t,n,r=document){var o,a,i,c;const l=Bo(t,r),d=Pr(e,r),u=l?d.indexOf(l):-1,m=(o=(a=n[u])===null||a===void 0?void 0:a.id)!==null&&o!==void 0?o:null,f=(i=(c=n[u+1])===null||c===void 0?void 0:c.id)!==null&&i!==void 0?i:null;return[m,f]}function pg({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:o,panelGroupElement:a,setLayout:i}){v.useRef({didWarnAboutMissingResizeHandle:!1}),Tn(()=>{if(!a)return;const c=Pr(n,a);for(let l=0;l<o.length-1;l++){const{valueMax:d,valueMin:u,valueNow:m}=fg({layout:r,panelsArray:o,pivotIndices:[l,l+1]}),f=c[l];if(f!=null){const p=o[l];ye(p,`No panel data found for index "${l}"`),f.setAttribute("aria-controls",p.id),f.setAttribute("aria-valuemax",""+Math.round(d)),f.setAttribute("aria-valuemin",""+Math.round(u)),f.setAttribute("aria-valuenow",m!=null?""+Math.round(m):"")}}return()=>{c.forEach((l,d)=>{l.removeAttribute("aria-controls"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuenow")})}},[n,r,o,a]),v.useEffect(()=>{if(!a)return;const c=t.current;ye(c,"Eager values not found");const{panelDataArray:l}=c,d=id(n,a);ye(d!=null,`No group found for id "${n}"`);const u=Pr(n,a);ye(u,`No resize handles found for group id "${n}"`);const m=u.map(f=>{const p=f.getAttribute(Be.resizeHandleId);ye(p,"Resize handle element has no handle id attribute");const[g,h]=mg(n,p,l,a);if(g==null||h==null)return()=>{};const j=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const b=l.findIndex(w=>w.id===g);if(b>=0){const w=l[b];ye(w,`No panel data found for index ${b}`);const N=r[b],{collapsedSize:S=0,collapsible:y,minSize:C=0}=w.constraints;if(N!=null&&y){const E=vr({delta:dt(N,S)?C-S:S-N,initialLayout:r,panelConstraints:l.map(P=>P.constraints),pivotIndices:sd(n,p,a),prevLayout:r,trigger:"keyboard"});r!==E&&i(E)}}break}}};return f.addEventListener("keydown",j),()=>{f.removeEventListener("keydown",j)}});return()=>{m.forEach(f=>f())}},[a,e,t,n,r,o,i])}function Ji(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function cd(e,t){const n=e==="horizontal",{x:r,y:o}=$o(t);return n?r:o}function hg(e,t,n,r,o){const a=n==="horizontal",i=Bo(t,o);ye(i,`No resize handle element found for id "${t}"`);const c=i.getAttribute(Be.groupId);ye(c,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=r;const d=cd(n,e),u=id(c,o);ye(u,`No group element found for id "${c}"`);const m=u.getBoundingClientRect(),f=a?m.width:m.height;return(d-l)/f*100}function _g(e,t,n,r,o,a){if(Kl(e)){const i=n==="horizontal";let c=0;e.shiftKey?c=100:o!=null?c=o:c=10;let l=0;switch(e.key){case"ArrowDown":l=i?0:c;break;case"ArrowLeft":l=i?-c:0;break;case"ArrowRight":l=i?c:0;break;case"ArrowUp":l=i?0:-c;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return r==null?0:hg(e,t,n,r,a)}function gg({panelDataArray:e}){const t=Array(e.length),n=e.map(a=>a.constraints);let r=0,o=100;for(let a=0;a<e.length;a++){const i=n[a];ye(i,`Panel constraints not found for index ${a}`);const{defaultSize:c}=i;c!=null&&(r++,t[a]=c,o-=c)}for(let a=0;a<e.length;a++){const i=n[a];ye(i,`Panel constraints not found for index ${a}`);const{defaultSize:c}=i;if(c!=null)continue;const l=e.length-r,d=o/l;r++,t[a]=d,o-=d}return t}function $n(e,t,n){t.forEach((r,o)=>{const a=e[o];ye(a,`Panel data not found for index ${o}`);const{callbacks:i,constraints:c,id:l}=a,{collapsedSize:d=0,collapsible:u}=c,m=n[l];if(m==null||r!==m){n[l]=r;const{onCollapse:f,onExpand:p,onResize:g}=i;g&&g(r,m),u&&(f||p)&&(p&&(m==null||Jt(m,d))&&!Jt(r,d)&&p(),f&&(m==null||!Jt(m,d))&&Jt(r,d)&&f())}})}function Jr(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function jg({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:o,precision:a=3}){const i=n[o];let c;return i==null?c=e!=null?e.toPrecision(a):"1":r.length===1?c="1":c=i.toPrecision(a),{flexBasis:0,flexGrow:c,flexShrink:1,overflow:"hidden",pointerEvents:t!==null?"none":void 0}}function yg(e,t=10){let n=null;return(...o)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}function Qi(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function ld(e){return`react-resizable-panels:${e}`}function dd(e){return e.map(t=>{const{constraints:n,id:r,idIsFromProps:o,order:a}=t;return o?r:a?`${a}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((t,n)=>t.localeCompare(n)).join(",")}function ud(e,t){try{const n=ld(e),r=t.getItem(n);if(r){const o=JSON.parse(r);if(typeof o=="object"&&o!=null)return o}}catch{}return null}function vg(e,t,n){var r,o;const a=(r=ud(e,n))!==null&&r!==void 0?r:{},i=dd(t);return(o=a[i])!==null&&o!==void 0?o:null}function xg(e,t,n,r,o){var a;const i=ld(e),c=dd(t),l=(a=ud(e,o))!==null&&a!==void 0?a:{};l[c]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{o.setItem(i,JSON.stringify(l))}catch(d){console.error(d)}}function Zi({layout:e,panelConstraints:t}){const n=[...e],r=n.reduce((a,i)=>a+i,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(a=>`${a}%`).join(", ")}`);if(!dt(r,100)&&n.length>0)for(let a=0;a<t.length;a++){const i=n[a];ye(i!=null,`No layout data found for index ${a}`);const c=100/r*i;n[a]=c}let o=0;for(let a=0;a<t.length;a++){const i=n[a];ye(i!=null,`No layout data found for index ${a}`);const c=Xn({panelConstraints:t,panelIndex:a,size:i});i!=c&&(o+=i-c,n[a]=c)}if(!dt(o,0))for(let a=0;a<t.length;a++){const i=n[a];ye(i!=null,`No layout data found for index ${a}`);const c=i+o,l=Xn({panelConstraints:t,panelIndex:a,size:c});if(i!==l&&(o-=l-i,n[a]=l,dt(o,0)))break}return n}const bg=100,xr={getItem:e=>(Qi(xr),xr.getItem(e)),setItem:(e,t)=>{Qi(xr),xr.setItem(e,t)}},ec={};function fd({autoSaveId:e=null,children:t,className:n="",direction:r,forwardedRef:o,id:a=null,onLayout:i=null,keyboardResizeBy:c=null,storage:l=xr,style:d,tagName:u="div",...m}){const f=Es(a),p=v.useRef(null),[g,h]=v.useState(null),[j,x]=v.useState([]),b=dg(),w=v.useRef({}),N=v.useRef(new Map),S=v.useRef(0),y=v.useRef({autoSaveId:e,direction:r,dragState:g,id:f,keyboardResizeBy:c,onLayout:i,storage:l}),C=v.useRef({layout:j,panelDataArray:[],panelDataArrayChanged:!1});v.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),v.useImperativeHandle(o,()=>({getId:()=>y.current.id,getLayout:()=>{const{layout:O}=C.current;return O},setLayout:O=>{const{onLayout:I}=y.current,{layout:H,panelDataArray:U}=C.current,T=Zi({layout:O,panelConstraints:U.map($=>$.constraints)});Ji(H,T)||(x(T),C.current.layout=T,I&&I(T),$n(U,T,w.current))}}),[]),Tn(()=>{y.current.autoSaveId=e,y.current.direction=r,y.current.dragState=g,y.current.id=f,y.current.onLayout=i,y.current.storage=l}),pg({committedValuesRef:y,eagerValuesRef:C,groupId:f,layout:j,panelDataArray:C.current.panelDataArray,setLayout:x,panelGroupElement:p.current}),v.useEffect(()=>{const{panelDataArray:O}=C.current;if(e){if(j.length===0||j.length!==O.length)return;let I=ec[e];I==null&&(I=yg(xg,bg),ec[e]=I);const H=[...O],U=new Map(N.current);I(e,H,U,j,l)}},[e,j,l]),v.useEffect(()=>{});const E=v.useCallback(O=>{const{onLayout:I}=y.current,{layout:H,panelDataArray:U}=C.current;if(O.constraints.collapsible){const T=U.map(ae=>ae.constraints),{collapsedSize:$=0,panelSize:J,pivotIndices:X}=Sn(U,O,H);if(ye(J!=null,`Panel size not found for panel "${O.id}"`),!Jt(J,$)){N.current.set(O.id,J);const ce=Gn(U,O)===U.length-1?J-$:$-J,me=vr({delta:ce,initialLayout:H,panelConstraints:T,pivotIndices:X,prevLayout:H,trigger:"imperative-api"});Jr(H,me)||(x(me),C.current.layout=me,I&&I(me),$n(U,me,w.current))}}},[]),P=v.useCallback((O,I)=>{const{onLayout:H}=y.current,{layout:U,panelDataArray:T}=C.current;if(O.constraints.collapsible){const $=T.map(xe=>xe.constraints),{collapsedSize:J=0,panelSize:X=0,minSize:ae=0,pivotIndices:ce}=Sn(T,O,U),me=I??ae;if(Jt(X,J)){const xe=N.current.get(O.id),Ge=xe!=null&&xe>=me?xe:me,Ze=Gn(T,O)===T.length-1?X-Ge:Ge-X,Ie=vr({delta:Ze,initialLayout:U,panelConstraints:$,pivotIndices:ce,prevLayout:U,trigger:"imperative-api"});Jr(U,Ie)||(x(Ie),C.current.layout=Ie,H&&H(Ie),$n(T,Ie,w.current))}}},[]),k=v.useCallback(O=>{const{layout:I,panelDataArray:H}=C.current,{panelSize:U}=Sn(H,O,I);return ye(U!=null,`Panel size not found for panel "${O.id}"`),U},[]),D=v.useCallback((O,I)=>{const{panelDataArray:H}=C.current,U=Gn(H,O);return jg({defaultSize:I,dragState:g,layout:j,panelData:H,panelIndex:U})},[g,j]),M=v.useCallback(O=>{const{layout:I,panelDataArray:H}=C.current,{collapsedSize:U=0,collapsible:T,panelSize:$}=Sn(H,O,I);return ye($!=null,`Panel size not found for panel "${O.id}"`),T===!0&&Jt($,U)},[]),A=v.useCallback(O=>{const{layout:I,panelDataArray:H}=C.current,{collapsedSize:U=0,collapsible:T,panelSize:$}=Sn(H,O,I);return ye($!=null,`Panel size not found for panel "${O.id}"`),!T||Rn($,U)>0},[]),z=v.useCallback(O=>{const{panelDataArray:I}=C.current;I.push(O),I.sort((H,U)=>{const T=H.order,$=U.order;return T==null&&$==null?0:T==null?-1:$==null?1:T-$}),C.current.panelDataArrayChanged=!0,b()},[b]);Tn(()=>{if(C.current.panelDataArrayChanged){C.current.panelDataArrayChanged=!1;const{autoSaveId:O,onLayout:I,storage:H}=y.current,{layout:U,panelDataArray:T}=C.current;let $=null;if(O){const X=vg(O,T,H);X&&(N.current=new Map(Object.entries(X.expandToSizes)),$=X.layout)}$==null&&($=gg({panelDataArray:T}));const J=Zi({layout:$,panelConstraints:T.map(X=>X.constraints)});Ji(U,J)||(x(J),C.current.layout=J,I&&I(J),$n(T,J,w.current))}}),Tn(()=>{const O=C.current;return()=>{O.layout=[]}},[]);const G=v.useCallback(O=>{let I=!1;const H=p.current;return H&&window.getComputedStyle(H,null).getPropertyValue("direction")==="rtl"&&(I=!0),function(T){T.preventDefault();const $=p.current;if(!$)return()=>null;const{direction:J,dragState:X,id:ae,keyboardResizeBy:ce,onLayout:me}=y.current,{layout:xe,panelDataArray:Ge}=C.current,{initialLayout:Qe}=X??{},Ze=sd(ae,O,$);let Ie=_g(T,O,J,X,ce,$);const ct=J==="horizontal";ct&&I&&(Ie=-Ie);const L=Ge.map(re=>re.constraints),Z=vr({delta:Ie,initialLayout:Qe??xe,panelConstraints:L,pivotIndices:Ze,prevLayout:xe,trigger:Kl(T)?"keyboard":"mouse-or-touch"}),_e=!Jr(xe,Z);(Jl(T)||Ql(T))&&S.current!=Ie&&(S.current=Ie,!_e&&Ie!==0?ct?Sa(O,Ie<0?ed:td):Sa(O,Ie<0?nd:rd):Sa(O,0)),_e&&(x(Z),C.current.layout=Z,me&&me(Z),$n(Ge,Z,w.current))}},[]),W=v.useCallback((O,I)=>{const{onLayout:H}=y.current,{layout:U,panelDataArray:T}=C.current,$=T.map(xe=>xe.constraints),{panelSize:J,pivotIndices:X}=Sn(T,O,U);ye(J!=null,`Panel size not found for panel "${O.id}"`);const ce=Gn(T,O)===T.length-1?J-I:I-J,me=vr({delta:ce,initialLayout:U,panelConstraints:$,pivotIndices:X,prevLayout:U,trigger:"imperative-api"});Jr(U,me)||(x(me),C.current.layout=me,H&&H(me),$n(T,me,w.current))},[]),Q=v.useCallback((O,I)=>{const{layout:H,panelDataArray:U}=C.current,{collapsedSize:T=0,collapsible:$}=I,{collapsedSize:J=0,collapsible:X,maxSize:ae=100,minSize:ce=0}=O.constraints,{panelSize:me}=Sn(U,O,H);me!=null&&($&&X&&Jt(me,T)?Jt(T,J)||W(O,J):me<ce?W(O,ce):me>ae&&W(O,ae))},[W]),V=v.useCallback((O,I)=>{const{direction:H}=y.current,{layout:U}=C.current;if(!p.current)return;const T=Bo(O,p.current);ye(T,`Drag handle element not found for id "${O}"`);const $=cd(H,I);h({dragHandleId:O,dragHandleRect:T.getBoundingClientRect(),initialCursorPosition:$,initialLayout:U})},[]),R=v.useCallback(()=>{h(null)},[]),K=v.useCallback(O=>{const{panelDataArray:I}=C.current,H=Gn(I,O);H>=0&&(I.splice(H,1),delete w.current[O.id],C.current.panelDataArrayChanged=!0,b())},[b]),fe=v.useMemo(()=>({collapsePanel:E,direction:r,dragState:g,expandPanel:P,getPanelSize:k,getPanelStyle:D,groupId:f,isPanelCollapsed:M,isPanelExpanded:A,reevaluatePanelConstraints:Q,registerPanel:z,registerResizeHandle:G,resizePanel:W,startDragging:V,stopDragging:R,unregisterPanel:K,panelGroupElement:p.current}),[E,g,r,P,k,D,f,M,A,Q,z,G,W,V,R,K]),ie={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return v.createElement(Fo.Provider,{value:fe},v.createElement(u,{...m,children:t,className:n,id:a,ref:p,style:{...ie,...d},[Be.group]:"",[Be.groupDirection]:r,[Be.groupId]:f}))}const md=v.forwardRef((e,t)=>v.createElement(fd,{...e,forwardedRef:t}));fd.displayName="PanelGroup";md.displayName="forwardRef(PanelGroup)";function Gn(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function Sn(e,t,n){const r=Gn(e,t),a=r===e.length-1?[r-1,r]:[r,r+1],i=n[r];return{...t.constraints,panelSize:i,pivotIndices:a}}function wg({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){v.useEffect(()=>{if(e||n==null||r==null)return;const o=Bo(t,r);if(o==null)return;const a=i=>{if(!i.defaultPrevented)switch(i.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{i.preventDefault(),n(i);break}case"F6":{i.preventDefault();const c=o.getAttribute(Be.groupId);ye(c,`No group element found for id "${c}"`);const l=Pr(c,r),d=ad(c,t,r);ye(d!==null,`No resize element found for id "${t}"`);const u=i.shiftKey?d>0?d-1:l.length-1:d+1<l.length?d+1:0;l[u].focus();break}}};return o.addEventListener("keydown",a),()=>{o.removeEventListener("keydown",a)}},[r,e,t,n])}function pd({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:r,id:o,onBlur:a,onClick:i,onDragging:c,onFocus:l,onPointerDown:d,onPointerUp:u,style:m={},tabIndex:f=0,tagName:p="div",...g}){var h,j;const x=v.useRef(null),b=v.useRef({onClick:i,onDragging:c,onPointerDown:d,onPointerUp:u});v.useEffect(()=>{b.current.onClick=i,b.current.onDragging=c,b.current.onPointerDown=d,b.current.onPointerUp=u});const w=v.useContext(Fo);if(w===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:S,registerResizeHandle:y,startDragging:C,stopDragging:E,panelGroupElement:P}=w,k=Es(o),[D,M]=v.useState("inactive"),[A,z]=v.useState(!1),[G,W]=v.useState(null),Q=v.useRef({state:D});Tn(()=>{Q.current.state=D}),v.useEffect(()=>{if(n)W(null);else{const fe=y(k);W(()=>fe)}},[n,k,y]);const V=(h=r==null?void 0:r.coarse)!==null&&h!==void 0?h:15,R=(j=r==null?void 0:r.fine)!==null&&j!==void 0?j:5;v.useEffect(()=>{if(n||G==null)return;const fe=x.current;ye(fe,"Element ref not attached");let ie=!1;return cg(k,fe,N,{coarse:V,fine:R},(I,H,U)=>{if(!H){M("inactive");return}switch(I){case"down":{M("drag"),ie=!1,ye(U,'Expected event to be defined for "down" action'),C(k,U);const{onDragging:T,onPointerDown:$}=b.current;T==null||T(!0),$==null||$();break}case"move":{const{state:T}=Q.current;ie=!0,T!=="drag"&&M("hover"),ye(U,'Expected event to be defined for "move" action'),G(U);break}case"up":{M("hover"),E();const{onClick:T,onDragging:$,onPointerUp:J}=b.current;$==null||$(!1),J==null||J(),ie||T==null||T();break}}})},[V,N,n,R,y,k,G,C,E]),wg({disabled:n,handleId:k,resizeHandler:G,panelGroupElement:P});const K={touchAction:"none",userSelect:"none"};return v.createElement(p,{...g,children:e,className:t,id:o,onBlur:()=>{z(!1),a==null||a()},onFocus:()=>{z(!0),l==null||l()},ref:x,role:"separator",style:{...K,...m},tabIndex:f,[Be.groupDirection]:N,[Be.groupId]:S,[Be.resizeHandle]:"",[Be.resizeHandleActive]:D==="drag"?"pointer":A?"keyboard":void 0,[Be.resizeHandleEnabled]:!n,[Be.resizeHandleId]:k,[Be.resizeHandleState]:D})}pd.displayName="PanelResizeHandle";const Ng=({className:e,...t})=>s.jsx(md,{className:ne("cj-flex cj-h-full cj-w-full data-[panel-group-direction=vertical]:cj-flex-col",e),...t}),ka=Xl,tc=({withHandle:e,className:t,...n})=>s.jsx(pd,{className:ne("cj-relative cj-flex cj-w-px cj-items-center cj-justify-center cj-bg-border after:cj-absolute after:cj-inset-y-0 after:cj-left-1/2 after:cj-w-1 after:-cj-translate-x-1/2 data-[panel-group-direction=vertical]:cj-h-px data-[panel-group-direction=vertical]:cj-w-full data-[panel-group-direction=vertical]:after:cj-left-0 data-[panel-group-direction=vertical]:after:cj-h-1 data-[panel-group-direction=vertical]:after:cj-w-full data-[panel-group-direction=vertical]:after:-cj-translate-y-1/2 data-[panel-group-direction=vertical]:after:cj-translate-x-0 focus-visible:cj-outline-none focus-visible:cj-ring-1 focus-visible:cj-ring-ring focus-visible:cj-ring-offset-1 [&[data-panel-group-direction=vertical]>div]:cj-rotate-90",t),...n,children:e&&s.jsx("div",{className:"cj-z-10 cj-flex cj-h-4 cj-w-3 cj-items-center cj-justify-center cj-rounded-sm cj-border cj-bg-border",children:s.jsx(Hl,{className:"cj-h-2.5 cj-w-2.5"})})});function Ka(e,[t,n]){return Math.min(n,Math.max(t,e))}function Sg(e,t){return _.useReducer((n,r)=>t[n][r]??n,e)}var Ts="ScrollArea",[hd]=_t(Ts),[Cg,vt]=hd(Ts),_d=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:a=600,...i}=e,[c,l]=_.useState(null),[d,u]=_.useState(null),[m,f]=_.useState(null),[p,g]=_.useState(null),[h,j]=_.useState(null),[x,b]=_.useState(0),[w,N]=_.useState(0),[S,y]=_.useState(!1),[C,E]=_.useState(!1),P=ve(t,D=>l(D)),k=Or(o);return s.jsx(Cg,{scope:n,type:r,dir:k,scrollHideDelay:a,scrollArea:c,viewport:d,onViewportChange:u,content:m,onContentChange:f,scrollbarX:p,onScrollbarXChange:g,scrollbarXEnabled:S,onScrollbarXEnabledChange:y,scrollbarY:h,onScrollbarYChange:j,scrollbarYEnabled:C,onScrollbarYEnabledChange:E,onCornerWidthChange:b,onCornerHeightChange:N,children:s.jsx(le.div,{dir:k,...i,ref:P,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});_d.displayName=Ts;var gd="ScrollAreaViewport",jd=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...a}=e,i=vt(gd,n),c=_.useRef(null),l=ve(t,c,i.onViewportChange);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),s.jsx(le.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:s.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});jd.displayName=gd;var Gt="ScrollAreaScrollbar",Rs=_.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=vt(Gt,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=o,c=e.orientation==="horizontal";return _.useEffect(()=>(c?a(!0):i(!0),()=>{c?a(!1):i(!1)}),[c,a,i]),o.type==="hover"?s.jsx(kg,{...r,ref:t,forceMount:n}):o.type==="scroll"?s.jsx(Pg,{...r,ref:t,forceMount:n}):o.type==="auto"?s.jsx(yd,{...r,ref:t,forceMount:n}):o.type==="always"?s.jsx(Os,{...r,ref:t}):null});Rs.displayName=Gt;var kg=_.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=vt(Gt,e.__scopeScrollArea),[a,i]=_.useState(!1);return _.useEffect(()=>{const c=o.scrollArea;let l=0;if(c){const d=()=>{window.clearTimeout(l),i(!0)},u=()=>{l=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return c.addEventListener("pointerenter",d),c.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),c.removeEventListener("pointerenter",d),c.removeEventListener("pointerleave",u)}}},[o.scrollArea,o.scrollHideDelay]),s.jsx(gt,{present:n||a,children:s.jsx(yd,{"data-state":a?"visible":"hidden",...r,ref:t})})}),Pg=_.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=vt(Gt,e.__scopeScrollArea),a=e.orientation==="horizontal",i=qo(()=>l("SCROLL_END"),100),[c,l]=Sg("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return _.useEffect(()=>{if(c==="idle"){const d=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(d)}},[c,o.scrollHideDelay,l]),_.useEffect(()=>{const d=o.viewport,u=a?"scrollLeft":"scrollTop";if(d){let m=d[u];const f=()=>{const p=d[u];m!==p&&(l("SCROLL"),i()),m=p};return d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[o.viewport,a,l,i]),s.jsx(gt,{present:n||c!=="hidden",children:s.jsx(Os,{"data-state":c==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:se(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:se(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),yd=_.forwardRef((e,t)=>{const n=vt(Gt,e.__scopeScrollArea),{forceMount:r,...o}=e,[a,i]=_.useState(!1),c=e.orientation==="horizontal",l=qo(()=>{if(n.viewport){const d=n.viewport.offsetWidth<n.viewport.scrollWidth,u=n.viewport.offsetHeight<n.viewport.scrollHeight;i(c?d:u)}},10);return nr(n.viewport,l),nr(n.content,l),s.jsx(gt,{present:r||a,children:s.jsx(Os,{"data-state":a?"visible":"hidden",...o,ref:t})})}),Os=_.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=vt(Gt,e.__scopeScrollArea),a=_.useRef(null),i=_.useRef(0),[c,l]=_.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=Nd(c.viewport,c.content),u={...r,sizes:c,onSizesChange:l,hasThumb:d>0&&d<1,onThumbChange:f=>a.current=f,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:f=>i.current=f};function m(f,p){return Og(f,i.current,c,p)}return n==="horizontal"?s.jsx(Eg,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const f=o.viewport.scrollLeft,p=nc(f,c,o.dir);a.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollLeft=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollLeft=m(f,o.dir))}}):n==="vertical"?s.jsx(Mg,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const f=o.viewport.scrollTop,p=nc(f,c);a.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollTop=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollTop=m(f))}}):null}),Eg=_.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=vt(Gt,e.__scopeScrollArea),[i,c]=_.useState(),l=_.useRef(null),d=ve(t,l,a.onScrollbarXChange);return _.useEffect(()=>{l.current&&c(getComputedStyle(l.current))},[l]),s.jsx(xd,{"data-orientation":"horizontal",...o,ref:d,sizes:n,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Ho(n)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,m)=>{if(a.viewport){const f=a.viewport.scrollLeft+u.deltaX;e.onWheelScroll(f),Cd(f,m)&&u.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:vo(i.paddingLeft),paddingEnd:vo(i.paddingRight)}})}})}),Mg=_.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=vt(Gt,e.__scopeScrollArea),[i,c]=_.useState(),l=_.useRef(null),d=ve(t,l,a.onScrollbarYChange);return _.useEffect(()=>{l.current&&c(getComputedStyle(l.current))},[l]),s.jsx(xd,{"data-orientation":"vertical",...o,ref:d,sizes:n,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Ho(n)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,m)=>{if(a.viewport){const f=a.viewport.scrollTop+u.deltaY;e.onWheelScroll(f),Cd(f,m)&&u.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:vo(i.paddingTop),paddingEnd:vo(i.paddingBottom)}})}})}),[Dg,vd]=hd(Gt),xd=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:a,onThumbPointerUp:i,onThumbPointerDown:c,onThumbPositionChange:l,onDragScroll:d,onWheelScroll:u,onResize:m,...f}=e,p=vt(Gt,n),[g,h]=_.useState(null),j=ve(t,P=>h(P)),x=_.useRef(null),b=_.useRef(""),w=p.viewport,N=r.content-r.viewport,S=rt(u),y=rt(l),C=qo(m,10);function E(P){if(x.current){const k=P.clientX-x.current.left,D=P.clientY-x.current.top;d({x:k,y:D})}}return _.useEffect(()=>{const P=k=>{const D=k.target;(g==null?void 0:g.contains(D))&&S(k,N)};return document.addEventListener("wheel",P,{passive:!1}),()=>document.removeEventListener("wheel",P,{passive:!1})},[w,g,N,S]),_.useEffect(y,[r,y]),nr(g,C),nr(p.content,C),s.jsx(Dg,{scope:n,scrollbar:g,hasThumb:o,onThumbChange:rt(a),onThumbPointerUp:rt(i),onThumbPositionChange:y,onThumbPointerDown:rt(c),children:s.jsx(le.div,{...f,ref:j,style:{position:"absolute",...f.style},onPointerDown:se(e.onPointerDown,P=>{P.button===0&&(P.target.setPointerCapture(P.pointerId),x.current=g.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),E(P))}),onPointerMove:se(e.onPointerMove,E),onPointerUp:se(e.onPointerUp,P=>{const k=P.target;k.hasPointerCapture(P.pointerId)&&k.releasePointerCapture(P.pointerId),document.body.style.webkitUserSelect=b.current,p.viewport&&(p.viewport.style.scrollBehavior=""),x.current=null})})})}),yo="ScrollAreaThumb",bd=_.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=vd(yo,e.__scopeScrollArea);return s.jsx(gt,{present:n||o.hasThumb,children:s.jsx(Tg,{ref:t,...r})})}),Tg=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,a=vt(yo,n),i=vd(yo,n),{onThumbPositionChange:c}=i,l=ve(t,m=>i.onThumbChange(m)),d=_.useRef(void 0),u=qo(()=>{d.current&&(d.current(),d.current=void 0)},100);return _.useEffect(()=>{const m=a.viewport;if(m){const f=()=>{if(u(),!d.current){const p=Ag(m,c);d.current=p,c()}};return c(),m.addEventListener("scroll",f),()=>m.removeEventListener("scroll",f)}},[a.viewport,u,c]),s.jsx(le.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:se(e.onPointerDownCapture,m=>{const p=m.target.getBoundingClientRect(),g=m.clientX-p.left,h=m.clientY-p.top;i.onThumbPointerDown({x:g,y:h})}),onPointerUp:se(e.onPointerUp,i.onThumbPointerUp)})});bd.displayName=yo;var As="ScrollAreaCorner",wd=_.forwardRef((e,t)=>{const n=vt(As,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?s.jsx(Rg,{...e,ref:t}):null});wd.displayName=As;var Rg=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=vt(As,n),[a,i]=_.useState(0),[c,l]=_.useState(0),d=!!(a&&c);return nr(o.scrollbarX,()=>{var m;const u=((m=o.scrollbarX)==null?void 0:m.offsetHeight)||0;o.onCornerHeightChange(u),l(u)}),nr(o.scrollbarY,()=>{var m;const u=((m=o.scrollbarY)==null?void 0:m.offsetWidth)||0;o.onCornerWidthChange(u),i(u)}),d?s.jsx(le.div,{...r,ref:t,style:{width:a,height:c,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function vo(e){return e?parseInt(e,10):0}function Nd(e,t){const n=e/t;return isNaN(n)?0:n}function Ho(e){const t=Nd(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Og(e,t,n,r="ltr"){const o=Ho(n),a=o/2,i=t||a,c=o-i,l=n.scrollbar.paddingStart+i,d=n.scrollbar.size-n.scrollbar.paddingEnd-c,u=n.content-n.viewport,m=r==="ltr"?[0,u]:[u*-1,0];return Sd([l,d],m)(e)}function nc(e,t,n="ltr"){const r=Ho(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,i=t.content-t.viewport,c=a-r,l=n==="ltr"?[0,i]:[i*-1,0],d=Ka(e,l);return Sd([0,i],[0,c])(d)}function Sd(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Cd(e,t){return e>0&&e<t}var Ag=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const a={left:e.scrollLeft,top:e.scrollTop},i=n.left!==a.left,c=n.top!==a.top;(i||c)&&t(),n=a,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function qo(e,t){const n=rt(e),r=_.useRef(0);return _.useEffect(()=>()=>window.clearTimeout(r.current),[]),_.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function nr(e,t){const n=rt(t);Je(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var kd=_d,zg=jd,Ig=wd;const Ht=_.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(kd,{ref:r,className:ne("cj-relative cj-overflow-hidden",e),...n,children:[s.jsx(zg,{className:"cj-h-full cj-w-full cj-rounded-[inherit] [&>div]:!cj-block [&>div]:!cj-min-w-0 [&>div]:cj-w-full",style:{overflowY:"auto"},children:t}),s.jsx(Pd,{}),s.jsx(Ig,{})]}));Ht.displayName=kd.displayName;const Pd=_.forwardRef(({className:e,orientation:t="vertical",...n},r)=>s.jsx(Rs,{ref:r,orientation:t,className:ne("cj-flex cj-touch-none cj-select-none cj-transition-colors",t==="vertical"&&"cj-h-full cj-w-2.5 cj-border-l cj-border-l-transparent cj-p-[1px]",t==="horizontal"&&"cj-h-2.5 cj-flex-col cj-border-t cj-border-t-transparent cj-p-[1px]",e),...n,children:s.jsx(bd,{className:"cj-relative cj-flex-1 cj-rounded-full cj-bg-border"})}));Pd.displayName=Rs.displayName;const Ja={back:"Back",next:"Next",reset:"Reset",cancel:"Cancel",submit:"Submit",save:"Save",delete:"Delete",close:"Close",empty:"(empty)",path:"Path",unknown:"Unknown",runner_title:"Form Runner",runner_save_exit:"Save & Exit",runner_ready_title:"Ready to begin",runner_onboarding_subtitle:"Before you start, make sure you have the following:",runner_onboarding_line1:"Before you start, please have the relevant information about the incident ready.",runner_onboarding_line2:"We may ask for details such as a description of the incident, the date, location, or supporting documents.",runner_onboarding_photos:"Photos of the incident (damage, location, context)",runner_onboarding_documents:"Relevant documents (policy, ID, etc.)",runner_onboarding_datetime:"Date and time of the event",runner_onboarding_location:"Location",runner_onboarding_description:"Brief description of what happened",runner_start_claim:"Start claim",runner_review_title:"Review Your Answers",runner_no_answers:"No answers recorded.",runner_summary_all_answers:"All answers",runner_review:"Review",runner_step:"Step {{step}}/{{total}}",runner_no_journey:"No journey has been built yet.",runner_no_data:"No journey data available.",builder_title:"Journey Builder",builder_read_only:"Read Only",builder_publish:"Publish",builder_unlock_edit:"Unlock Edit",builder_open_runner:"Open Runner",builder_auto_layout:"Auto Layout",builder_export_json:"Export JSON",builder_export_copied:"Journey spec copied to clipboard",specs_title:"Property Specs",specs_search_placeholder:"Search specs...",specs_filter_all:"All Types",specs_create_custom:"Create Custom Field",specs_count:"{{filtered}} of {{total}} specs",specs_no_results:"No specs found",props_select_hint:"Select a node or edge to edit",props_drag_hint:"Drag specs from the left panel onto the canvas to create nodes",node_props_title:"Node Properties",node_schema_type:"Schema Type",node_source_spec:"Source Spec ID",node_namespace:"Namespace",node_required:"Required",node_required_hint:"Block navigation if empty",node_original_label:"Original Label",node_label_override:"Label Override (optional)",node_label_override_placeholder:"Custom label to displayโฆ",node_actor:"Actor",node_actor_customer:"Customer",node_actor_operator:"Operator",node_widget:"Widget Override",node_widget_auto:"Auto (from schema)",node_widget_text:"Text Input",node_widget_textarea:"Textarea",node_widget_select:"Select Dropdown",node_widget_radio:"Radio Group",node_widget_datepicker:"Date Picker",node_widget_timepicker:"Time Picker",node_widget_datetimepicker:"Date & Time Picker",node_widget_currency:"Currency Input",node_widget_upload:"File Upload",node_widget_email:"Email",node_widget_phone:"Phone",node_widget_location:"Location",node_allow_future:"Allow future dates",node_allow_future_hint:"When off, only past or today are selectable",node_bindings_title:"Bindings",node_bindings_target:"Target Namespace",node_bindings_add:"Add Binding",node_delete:"Delete Node",node_options_title:"Options",upload_config_title:"Upload Configuration",upload_file_type_preset:"File type preset",upload_any_file:"Any file",upload_images_only:"Images only",upload_documents_only:"Documents only",upload_images_pdf:"Images + PDFs",upload_custom:"Custom",upload_accepted_types:"Accepted types (custom)",upload_accepted_types_placeholder:"e.g. image/*,.pdf",upload_max_size:"Max file size (MB)",upload_max_size_placeholder:"e.g. 10",edge_props_title:"Edge Properties",edge_connection:"Connection",edge_default:"Default Edge",edge_default_hint:"Used when no other conditions match",edge_priority:"Priority",edge_priority_hint:"Higher priority edges are evaluated first",edge_quick_pick:"Quick pick from source options:",edge_condition:"Condition",edge_visual:"Visual",edge_advanced:"Advanced",edge_json_logic:"JSON Logic condition",edge_delete:"Delete Edge",preview_title:"Form Preview",preview_step_of:"Step {{current}} of {{total}}",preview_start:"Start Preview",preview_add_nodes_hint:"Add nodes to the canvas to preview the form flow.",preview_start_hint:'Click "Start Preview" to test the form flow interactively.',preview_no_node:"No current node selected.",preview_required_hint:"This field is required",preview_validation_hint:"Fix validation errors first",import_title:"Import Journey Spec",import_description:"Load a JourneySpec JSON file or paste JSON to populate the canvas.",import_paste_tab:"Paste JSON",import_upload_tab:"Upload File",import_paste_clipboard:"Paste from Clipboard",import_placeholder:'{"journey_id": "...", "nodes": [...], "edges": [...]}',import_button:"Import Journey",import_validation_errors:"Validation errors:",validation_title:"Graph Validation",validation_no_issues:"No issues found",validation_issue_count:"{{count}} issue{{plural}} found",validation_good:"Graph looks good!",validation_no_issues_actor:"No issues",validation_validate:"Validate",create_node_title:"Create Custom Field",create_node_label:"Label *",create_node_label_placeholder:"Enter a display label",create_node_namespace:"Namespace",create_node_namespace_hint:"Auto-generated from label. Override if needed.",create_node_schema:"Schema Type",upload_drag_drop:"Drag & drop a file here, or click to select",upload_uploading:"Uploadingโฆ",widget_unknown_schema:"Unknown schema type: {{schema}}",widget_yes:"Yes",widget_no:"No",widget_no_widget:"No widget available for this field type.",widget_no_options:"No options configured for this select field.",widget_pick_date:"Pick a date",widget_invalid_date:"Enter a valid date",widget_pick_time:"Pick a time",widget_select_option:"Select an option...",widget_search_country:"Search country...",widget_no_country:"No country found.",widget_invalid_phone:"Enter a valid phone number",widget_invalid_email:"Enter a valid email address",widget_file_too_large:"File exceeds {{max}} MB limit ({{size}} MB)",widget_file_type_rejected:"File type not accepted. Allowed: {{accept}}",widget_upload_failed:"Upload failed",widget_accepted_hint:"Accepted: {{accept}}",widget_max_size_hint:"Max {{max}} MB",location_placeholder:"Start typing an addressโฆ",location_no_api_key:"Google Maps API key is required for the location widget.",placeholder_text:"Type hereโฆ",placeholder_select:"Select an optionโฆ",placeholder_currency:"0,00",placeholder_phone:"555 000 0000",placeholder_email:"email@example.com",placeholder_date:"Select a dateโฆ",not_found_title:"404",not_found_message:"Oops! Page not found",not_found_link:"Return to Home",runner_page_back:"Builder",fc_title:"Form Configurator",fc_read_only:"Read-only",fc_undo:"Undo",fc_redo:"Redo",fc_preview_form:"Preview Form",fc_save:"Save",fc_publish:"Publish",fc_unlock_edit:"Unlock edit",fc_tab_steps:"Steps",fc_tab_fields:"Fields",fc_tab_init:"Init",fc_tab_json:"JSON",fc_flow_validation_title:"Flow Validation",fc_flow_validation_validate:"Validate Flow",fc_flow_validation_no_issues:"No flow issues found",fc_flow_validation_good:"Flow looks good!",fc_flow_validation_no_issues_step:"No issues",fc_flow_validation_broken_reference:"Broken Reference",fc_flow_validation_unreachable_step:"Unreachable Step",fc_flow_validation_dead_end:"Dead End",fc_flow_validation_cycle:"Navigation Cycle",fc_flow_validation_no_fallback_rule:"No Fallback Rule",fc_flow_validation_general:"General",fc_form_steps:"Form Steps",fc_add_step:"Add Step",fc_step_untitled:"(untitled)",fc_step_meta:"{{rows}} rows, {{fields}} fields",fc_no_steps:"No steps yet.",fc_no_steps_hint_click:"Click",fc_no_steps_hint_to_begin:"to begin.",fc_confirm_title:"Are you sure?",fc_confirm_delete_step:"Delete this step?",fc_step_empty_select:"Select a step on the left.",fc_step_empty_create:"Add a step from the left panel to begin.",fc_step_title_label:"Step Title",fc_step_title_placeholder:"Step title",fc_step_description_label:"Description",fc_step_description_placeholder:"Optional",fc_add_row:"Add Row",fc_row_n:"Row {{n}}",fc_layout_horizontal:"Horizontal",fc_layout_vertical:"Vertical",fc_confirm_delete_row:"Delete this row?",fc_add_field_btn:"Add field",fc_no_fields:"No fields.",fc_edit:"Edit",fc_remove_from_row:"Remove from row",fc_row_title_placeholder:"Section title (optional)",fc_row_show_divider:"Divider",fc_nav_title:"Step Navigation",fc_nav_api_call:"API call on continue",fc_nav_api_call_hint:"Executed before evaluating the rules.",fc_nav_body_template:"Body template (JSON)",fc_nav_body_template_hint_prefix:"Use",fc_nav_body_template_hint_suffix:"tokens.",fc_nav_on_error:"On error",fc_nav_on_error_block:"Block โ stay on this step",fc_nav_on_error_continue:"Continue โ evaluate rules anyway",fc_nav_on_error_goto:"Go to: {{step}}",fc_nav_on_error_summary:"Go to: Summary",fc_nav_on_error_hint:"What happens if the call throws or the network fails.",fc_nav_continue_button:"Continue button",fc_nav_continue_placeholder:"Continue",fc_nav_rules:"Navigation rules",fc_nav_add_rule:"Add rule",fc_nav_rules_hint:'Rules evaluated in order. First match wins. Use "always" as the last fallback.',fc_nav_rule_n:"Rule {{n}}",fc_nav_has_condition:"Has condition",fc_nav_go_to:"Go to",fc_nav_submit_form:"โ Submit form โ",fc_nav_field_requires_value:'Field "{{label}}" requires a value.',fc_summary_panel:"Summary Panel",fc_summary_title_label:"Summary Title",fc_summary_show_sidebar:"Show live summary",fc_summary_show_sidebar_hint:"Display the summary sidebar while the user moves through the journey.",fc_summary_sections:"Sections",fc_summary_add_section:"Add Section",fc_summary_section_title_placeholder:"Section title",fc_summary_visible_from:"Visible from step",fc_summary_until_step:"Until step (optional)",fc_summary_all_steps:"All steps",fc_summary_step_n:"Step {{n}}",fc_summary_display_fields:"Display Fields",fc_summary_add:"Add",fc_summary_no_display_fields:"No display fields yet.",fc_summary_no_sections:"No sections yet.",fc_summary_confirm_delete_section:"Delete this section?",fc_summary_source:"Source",fc_summary_source_form_field:"Form Field",fc_summary_source_api_response:"API Response",fc_summary_format:"Format",fc_summary_format_text:"Text",fc_summary_format_number:"Number",fc_summary_format_currency:"Currency",fc_summary_format_date:"Date",fc_summary_format_datetime:"Date & Time",fc_summary_display_label:"Label",fc_summary_display_label_placeholder:"Display label",fc_summary_field:"Field",fc_summary_select:"Selectโฆ",fc_summary_from_step_api:"From step API",fc_summary_response_path:"Response Path (dot-notation)",fc_fields_catalog:"Fields catalog",fc_fields_catalog_hint:"All fields used across the form. Edit here to update them everywhere.",fc_fields_add:"Add Field",fc_fields_search:"Search fieldsโฆ",fc_fields_filter_all:"All",fc_fields_filter_used:"Used",fc_fields_filter_unused:"Unused",fc_fields_unused_badge:"Unused",fc_fields_used_in_one:"Used in {{count}} step",fc_fields_used_in_many:"Used in {{count}} steps",fc_fields_go_to_step:'Go to step "{{title}}"',fc_fields_no_fields:"No fields yet.",fc_fields_no_match:"No fields match the current filter.",fc_fields_confirm_delete:"Delete this field?",fc_init_title:"Initial values",fc_init_subtitle:"Static answers pre-loaded into the runner before the user starts.",fc_init_static:"Static values",fc_init_add:"Add",fc_init_no_values:"No initial values yet.",fc_init_prefill:"Pre-fill from API",fc_init_prefill_hint:"Fetch answers from an endpoint when the runner mounts.",fc_init_mapping:"Mapping (JSON: namespace โ response_path)",fc_json_title:"JSON",fc_json_hint:"Raw JourneySpec (form_config + theme). Edit and click Apply to update the configurator.",fc_json_refresh:"Reload from configurator",fc_json_refresh_hint:"Discard JSON edits and reload from the current configurator state",fc_json_copy:"Copy",fc_json_download:"Download",fc_json_import:"Apply changes",fc_json_apply_hint:"Apply the JSON edits to the configurator",fc_json_imported_ok:"Imported successfully",fc_json_copied:"Copied to clipboard",fc_json_invalid:"Invalid JSON",fc_json_upload:"Upload File",fc_json_file_error:"Could not read the file.",fc_create_field_title:"Add field",fc_create_field_subtitle:"Pick from the catalog or create a custom field.",fc_create_from_catalog:"From catalog ({{count}})",fc_create_custom:"Custom field",fc_create_search_specs:"Search specsโฆ",fc_create_no_specs:"No specs match.",fc_create_label_required:"Label *",fc_create_label_placeholder:"e.g. Customer Name",fc_create_namespace:"Namespace",fc_create_namespace_placeholder:"e.g. customer.name (auto if empty)",fc_create_schema:"Schema",fc_create_options:"Options",fc_create_option_value_placeholder:"value",fc_create_option_label_placeholder:"Label",fc_create_cancel:"Cancel",fc_create_create:"Create",fc_field_props:"Field properties",fc_field_no_selected:"No field selected.",fc_field_label:"Label *",fc_field_namespace:"Namespace",fc_field_placeholder:"Placeholder",fc_field_help:"Help text",fc_field_required:"Required",fc_field_required_hint:"User must fill before continuing.",fc_field_actor:"Actor",fc_field_actor_customer:"Customer",fc_field_actor_operator:"Operator",fc_field_widget:"Widget",fc_field_widget_auto:"Auto",fc_field_widget_text:"Text",fc_field_widget_textarea:"Textarea",fc_field_widget_select:"Select",fc_field_widget_radio:"Radio",fc_field_widget_date:"Date",fc_field_widget_time:"Time",fc_field_widget_datetime:"Date & Time",fc_field_widget_currency:"Currency",fc_field_widget_upload:"Upload",fc_field_widget_email:"Email",fc_field_widget_phone:"Phone",fc_field_widget_location:"Location",fc_field_widget_boolean:"Boolean (Yes/No)",fc_field_allow_future:"Allow future dates",fc_field_allow_future_hint:"Allow dates after today.",fc_field_display_style:"Display style",fc_field_display_auto:"Auto (radio โค5, dropdown >5)",fc_field_display_radio:"Radio list",fc_field_display_radio_horizontal:"Radio list horizontal",fc_field_display_dropdown:"Dropdown",fc_field_display_segmented:"Segmented buttons",fc_field_display_hint:"Controls how options render at runtime.",fc_field_display_switch:"Switch (toggle)",fc_field_display_yesno:"Segmented (Yes / No buttons)",fc_field_boolean_hint:"Override Yes/No labels by adding 2 options below (first = true, second = false).",fc_field_options:"Options",fc_field_no_options:"No options yet.",fc_field_upload_validation:"Upload validation",fc_field_upload_accept:"Accepted MIME types/extensions",fc_field_upload_max:"Max size (MB)",fc_field_dynamic_rules:"Dynamic rules",fc_field_dynamic_rules_hint:"Show, enable or require this field based on other answers.",fc_field_visible_when:"Show when",fc_field_visible_when_hint:"When the condition is false, the field is hidden and its value is cleared.",fc_field_enabled_when:"Enable when",fc_field_enabled_when_hint:"When the condition is false, the field is shown as read-only.",fc_field_required_when:"Required when",fc_field_required_when_hint:'Overrides the static "required" flag while the field is visible.',fc_field_always_visible:"Always visible",fc_field_always_enabled:"Always enabled",fc_field_required_static:'Use static "Required" setting',fc_field_rule_active:"Rule active",fc_field_computed:"Computed value",fc_field_computed_hint:"Auto-calculate this field from other fields. The result is read-only.",fc_field_width:"Field width",fc_field_width_hint:"Width within a horizontal row (mobile is always full width).",fc_field_width_auto:"Auto (share row evenly)",fc_field_width_full:"Full (3/3)",fc_field_computed_operation:"Operation",fc_field_computed_op_sum:"Sum (+)",fc_field_computed_op_subtract:"Subtract (โ)",fc_field_computed_op_multiply:"Multiply (ร)",fc_field_computed_op_divide:"Divide (รท)",fc_field_computed_precision:"Decimal places",fc_field_computed_operands:"Operand fields",fc_field_computed_add_operand:"Add a fieldโฆ",fc_field_computed_missing_operand:"(field not found)",fc_field_computed_no_fields:"No other fields available to use as operands.",fc_field_computed_all_added:"All available fields are already added.",fc_field_delete:"Delete field",fc_field_done:"Done",fc_field_confirm_delete:"Delete this field from the catalog (and all rows that use it)?",theme_button:"Theme",theme_reset:"Reset",theme_colors:"Colors",theme_primary:"Primary",theme_background:"Background",theme_card:"Card",theme_foreground:"Foreground",theme_color_picker_aria:"{{label}} color picker",theme_color_placeholder:"e.g. 222 47% 11%",theme_color_hint:"Pick a color or type an HSL triplet",theme_typography:"Typography",theme_heading_font:"Heading font",theme_body_font:"Body font",theme_font_default:"Default",theme_font_size:"Base font size (px)",theme_shape_spacing:"Shape & spacing",theme_border_radius:"Border radius (rem)",theme_spacing:"Spacing",theme_spacing_cozy_default:"Cozy (default)",theme_spacing_compact:"Compact",theme_spacing_cozy:"Cozy",theme_spacing_spacious:"Spacious",theme_live_preview:"Live preview",theme_heading_sample:"Heading sample",theme_body_sample:"The quick brown fox jumps over the lazy dog. Body text uses your selected font, size and spacing.",theme_input_sample:"Sample input",theme_primary_action:"Primary action",runner_toast_required_fields:"Please fill the required fields.",runner_toast_api_failed:"API call failed.",runner_toast_answers_copied:"Answers copied to clipboard!",runner_toast_partial_saved:"Partial answers saved (logged).",runner_toast_file_uploaded:"Uploaded {{name}} for {{key}}",runner_loading_preview:"Loading previewโฆ",runner_no_form:"No form configured yet.",runner_back_to_builder:"Back to builder",runner_preset_full:"Full",runner_iframe_title:"Form runner preview",import_invalid_json:"Invalid JSON: could not parse the input.",import_success:"Journey imported successfully",import_clipboard_failed:"Could not read clipboard",shortcut_selected_nodes_one:"Selected {{count}} node",shortcut_selected_nodes_other:"Selected {{count}} nodes",shortcut_deleted:"Deleted",shortcut_undo:"Undo",shortcut_redo:"Redo",shortcut_copied:"Copied to clipboard",shortcut_pasted:"Pasted",shortcut_duplicated:"Duplicated"},Wg={back:"Atrรกs",next:"Siguiente",reset:"Reiniciar",cancel:"Cancelar",submit:"Enviar",save:"Guardar",delete:"Eliminar",close:"Cerrar",empty:"(vacรญo)",path:"Ruta",unknown:"Desconocido",runner_title:"Formulario",runner_save_exit:"Guardar y Salir",runner_ready_title:"Listo para comenzar",runner_onboarding_subtitle:"Antes de empezar, asegรบrate de tener lo siguiente:",runner_onboarding_line1:"Antes de empezar, por favor tenga preparada la informaciรณn relevante sobre lo ocurrido.",runner_onboarding_line2:"Podremos pedir detalles como una descripciรณn del incidente, la fecha, el lugar o documentos de apoyo.",runner_onboarding_photos:"Fotos del incidente (daรฑo, lugar, contexto)",runner_onboarding_documents:"Documentos relevantes (pรณliza, identificaciรณn, etc.)",runner_onboarding_datetime:"Fecha y hora del suceso",runner_onboarding_location:"Ubicaciรณn",runner_onboarding_description:"Descripciรณn breve de lo ocurrido",runner_start_claim:"Comenzar parte",runner_review_title:"Revisa tus respuestas",runner_no_answers:"No hay respuestas registradas.",runner_summary_all_answers:"Todas las respuestas",runner_review:"Revisar",runner_step:"Paso {{step}}/{{total}}",runner_no_journey:"Aรบn no se ha creado ningรบn recorrido.",runner_no_data:"Datos del recorrido no disponibles.",builder_title:"Constructor de Recorridos",builder_read_only:"Solo Lectura",builder_publish:"Publicar",builder_unlock_edit:"Desbloquear Ediciรณn",builder_open_runner:"Abrir Formulario",builder_auto_layout:"Diseรฑo Automรกtico",builder_export_json:"Exportar JSON",builder_export_copied:"Especificaciรณn copiada al portapapeles",specs_title:"Propiedades",specs_search_placeholder:"Buscar...",specs_filter_all:"Todos los Tipos",specs_create_custom:"Crear Campo Personalizado",specs_count:"{{filtered}} de {{total}} propiedades",specs_no_results:"No se encontraron propiedades",props_select_hint:"Selecciona un nodo o arista para editar",props_drag_hint:"Arrastra propiedades del panel izquierdo al lienzo para crear nodos",node_props_title:"Propiedades del Nodo",node_schema_type:"Tipo de Schema",node_source_spec:"ID de Propiedad",node_namespace:"Namespace",node_required:"Obligatorio",node_required_hint:"Bloquear navegaciรณn si estรก vacรญo",node_original_label:"Etiqueta Original",node_label_override:"Etiqueta Personalizada (opcional)",node_label_override_placeholder:"Etiqueta personalizadaโฆ",node_actor:"Actor",node_actor_customer:"Cliente",node_actor_operator:"Operador",node_widget:"Widget",node_widget_auto:"Automรกtico (del schema)",node_widget_text:"Campo de Texto",node_widget_textarea:"รrea de Texto",node_widget_select:"Lista Desplegable",node_widget_radio:"Grupo de Radio",node_widget_datepicker:"Selector de Fecha",node_widget_timepicker:"Selector de Hora",node_widget_datetimepicker:"Selector de Fecha y Hora",node_widget_currency:"Campo Monetario",node_widget_upload:"Carga de Archivo",node_widget_email:"Email",node_widget_phone:"Telรฉfono",node_widget_location:"Ubicaciรณn",node_allow_future:"Permitir fechas futuras",node_allow_future_hint:"Cuando estรก desactivado, solo permite fechas pasadas u hoy",node_bindings_title:"Vรญnculos",node_bindings_target:"Namespace Destino",node_bindings_add:"Agregar Binding",node_delete:"Eliminar Nodo",node_options_title:"Opciones",upload_config_title:"Configuraciรณn de Carga",upload_file_type_preset:"Tipo de archivo",upload_any_file:"Cualquier archivo",upload_images_only:"Solo imรกgenes",upload_documents_only:"Solo documentos",upload_images_pdf:"Imรกgenes + PDFs",upload_custom:"Personalizado",upload_accepted_types:"Tipos aceptados (personalizado)",upload_accepted_types_placeholder:"ej: image/*,.pdf",upload_max_size:"Tamaรฑo mรกximo (MB)",upload_max_size_placeholder:"ej: 10",edge_props_title:"Propiedades de la Arista",edge_connection:"Conexiรณn",edge_default:"Arista Predeterminada",edge_default_hint:"Se usa cuando ninguna otra condiciรณn coincide",edge_priority:"Prioridad",edge_priority_hint:"Las aristas con mayor prioridad se evalรบan primero",edge_quick_pick:"Selecciรณn rรกpida de opciones:",edge_condition:"Condiciรณn",edge_visual:"Visual",edge_advanced:"Avanzado",edge_json_logic:"Condiciรณn JSON Logic",edge_delete:"Eliminar Arista",preview_title:"Vista Previa",preview_step_of:"Paso {{current}} de {{total}}",preview_start:"Iniciar Vista Previa",preview_add_nodes_hint:"Agrega nodos al lienzo para previsualizar el flujo.",preview_start_hint:'Haz clic en "Iniciar Vista Previa" para probar el flujo interactivamente.',preview_no_node:"Ningรบn nodo seleccionado.",preview_required_hint:"Este campo es obligatorio",preview_validation_hint:"Corrige los errores de validaciรณn primero",import_title:"Importar Especificaciรณn",import_description:"Carga un archivo JSON o pega el JSON para poblar el lienzo.",import_paste_tab:"Pegar JSON",import_upload_tab:"Cargar Archivo",import_paste_clipboard:"Pegar del Portapapeles",import_placeholder:'{"journey_id": "...", "nodes": [...], "edges": [...]}',import_button:"Importar",import_validation_errors:"Errores de validaciรณn:",validation_title:"Validaciรณn del Grafo",validation_no_issues:"Sin problemas encontrados",validation_issue_count:"{{count}} problema{{plural}} encontrado{{plural}}",validation_good:"ยกEl grafo estรก correcto!",validation_no_issues_actor:"Sin problemas",validation_validate:"Validar",create_node_title:"Crear Campo Personalizado",create_node_label:"Etiqueta *",create_node_label_placeholder:"Ingresa una etiqueta",create_node_namespace:"Namespace",create_node_namespace_hint:"Generado automรกticamente a partir de la etiqueta.",create_node_schema:"Tipo de Schema",upload_drag_drop:"Arrastra y suelta un archivo aquรญ, o haz clic para seleccionar",upload_uploading:"Cargandoโฆ",widget_unknown_schema:"Tipo de schema desconocido: {{schema}}",widget_yes:"Sรญ",widget_no:"No",widget_no_widget:"No hay widget disponible para este tipo de campo.",widget_no_options:"No hay opciones configuradas para este campo de selecciรณn.",widget_pick_date:"Seleccionar fecha",widget_invalid_date:"Introduce una fecha vรกlida",widget_pick_time:"Seleccionar hora",widget_select_option:"Seleccionar una opciรณn...",widget_search_country:"Buscar paรญs...",widget_no_country:"Paรญs no encontrado.",widget_invalid_phone:"Ingrese un nรบmero de telรฉfono vรกlido",widget_invalid_email:"Ingrese un correo electrรณnico vรกlido",widget_file_too_large:"El archivo excede el lรญmite de {{max}} MB ({{size}} MB)",widget_file_type_rejected:"Tipo de archivo no aceptado. Permitidos: {{accept}}",widget_upload_failed:"Error al cargar",widget_accepted_hint:"Aceptados: {{accept}}",widget_max_size_hint:"Mรกx {{max}} MB",location_placeholder:"Empieza a escribir una direcciรณnโฆ",location_no_api_key:"Se requiere una clave de API de Google Maps para el widget de ubicaciรณn.",placeholder_text:"Insertarโฆ",placeholder_select:"Seleccionarโฆ",placeholder_currency:"0,00",placeholder_phone:"555 000 0000",placeholder_email:"email@ejemplo.com",placeholder_date:"Seleccionar fechaโฆ",not_found_title:"404",not_found_message:"Pรกgina no encontrada",not_found_link:"Volver al Inicio",runner_page_back:"Constructor",fc_title:"Configurador de Formulario",fc_read_only:"Solo lectura",fc_undo:"Deshacer",fc_redo:"Rehacer",fc_preview_form:"Vista previa",fc_save:"Guardar",fc_publish:"Publicar",fc_unlock_edit:"Desbloquear ediciรณn",fc_tab_steps:"Pasos",fc_tab_fields:"Campos",fc_tab_init:"Inicializaciรณn",fc_tab_json:"JSON",fc_flow_validation_title:"Validaciรณn del Flujo",fc_flow_validation_validate:"Validar Flujo",fc_flow_validation_no_issues:"Sin problemas en el flujo",fc_flow_validation_good:"ยกEl flujo estรก correcto!",fc_flow_validation_no_issues_step:"Sin problemas",fc_flow_validation_broken_reference:"Referencia Rota",fc_flow_validation_unreachable_step:"Paso Inalcanzable",fc_flow_validation_dead_end:"Sin Salida",fc_flow_validation_cycle:"Ciclo de Navegaciรณn",fc_flow_validation_no_fallback_rule:"Sin Regla de Respaldos",fc_flow_validation_general:"General",fc_form_steps:"Pasos del Formulario",fc_add_step:"Aรฑadir Paso",fc_step_untitled:"(sin tรญtulo)",fc_step_meta:"{{rows}} filas, {{fields}} campos",fc_no_steps:"Aรบn sin pasos.",fc_no_steps_hint_click:"Haz clic en",fc_no_steps_hint_to_begin:"para empezar.",fc_confirm_title:"ยฟEstรกs seguro?",fc_confirm_delete_step:"ยฟEliminar este paso?",fc_step_empty_select:"Selecciona un paso a la izquierda.",fc_step_empty_create:"Aรฑade un paso desde el panel izquierdo para empezar.",fc_step_title_label:"Tรญtulo del Paso",fc_step_title_placeholder:"Tรญtulo del paso",fc_step_description_label:"Descripciรณn",fc_step_description_placeholder:"Opcional",fc_add_row:"Aรฑadir Fila",fc_row_n:"Fila {{n}}",fc_layout_horizontal:"Horizontal",fc_layout_vertical:"Vertical",fc_confirm_delete_row:"ยฟEliminar esta fila?",fc_add_field_btn:"Aรฑadir campo",fc_no_fields:"Sin campos.",fc_edit:"Editar",fc_remove_from_row:"Quitar de la fila",fc_row_title_placeholder:"Tรญtulo de secciรณn (opcional)",fc_row_show_divider:"Divisor",fc_nav_title:"Navegaciรณn del Paso",fc_nav_api_call:"Llamada API al continuar",fc_nav_api_call_hint:"Se ejecuta antes de evaluar las reglas.",fc_nav_body_template:"Plantilla del body (JSON)",fc_nav_body_template_hint_prefix:"Usa tokens",fc_nav_body_template_hint_suffix:".",fc_nav_on_error:"En caso de error",fc_nav_on_error_block:"Bloquear โ permanece en este paso",fc_nav_on_error_continue:"Continuar โ evalรบa las reglas igualmente",fc_nav_on_error_goto:"Ir a: {{step}}",fc_nav_on_error_summary:"Ir a: Resumen",fc_nav_on_error_hint:"Quรฉ ocurre si la llamada falla o la red cae.",fc_nav_continue_button:"Botรณn continuar",fc_nav_continue_placeholder:"Continuar",fc_nav_rules:"Reglas de navegaciรณn",fc_nav_add_rule:"Aรฑadir regla",fc_nav_rules_hint:'Reglas evaluadas en orden. Gana la primera. Usa "siempre" como รบltimo recurso.',fc_nav_rule_n:"Regla {{n}}",fc_nav_has_condition:"Tiene condiciรณn",fc_nav_go_to:"Ir a",fc_nav_submit_form:"โ Enviar formulario โ",fc_nav_field_requires_value:'El campo "{{label}}" requiere un valor.',fc_summary_panel:"Panel de Resumen",fc_summary_title_label:"Tรญtulo del Resumen",fc_summary_show_sidebar:"Mostrar resumen en progreso",fc_summary_show_sidebar_hint:"Muestra la barra lateral de resumen mientras el usuario avanza en la jornada.",fc_summary_sections:"Secciones",fc_summary_add_section:"Aรฑadir Secciรณn",fc_summary_section_title_placeholder:"Tรญtulo de la secciรณn",fc_summary_visible_from:"Visible desde el paso",fc_summary_until_step:"Hasta el paso (opcional)",fc_summary_all_steps:"Todos los pasos",fc_summary_step_n:"Paso {{n}}",fc_summary_display_fields:"Campos a Mostrar",fc_summary_add:"Aรฑadir",fc_summary_no_display_fields:"Aรบn sin campos a mostrar.",fc_summary_no_sections:"Aรบn sin secciones.",fc_summary_confirm_delete_section:"ยฟEliminar esta secciรณn?",fc_summary_source:"Origen",fc_summary_source_form_field:"Campo del Formulario",fc_summary_source_api_response:"Respuesta de la API",fc_summary_format:"Formato",fc_summary_format_text:"Texto",fc_summary_format_number:"Nรบmero",fc_summary_format_currency:"Moneda",fc_summary_format_date:"Fecha",fc_summary_format_datetime:"Fecha y hora",fc_summary_display_label:"Etiqueta",fc_summary_display_label_placeholder:"Etiqueta a mostrar",fc_summary_field:"Campo",fc_summary_select:"Seleccionarโฆ",fc_summary_from_step_api:"Desde API del paso",fc_summary_response_path:"Ruta de respuesta (notaciรณn con puntos)",fc_fields_catalog:"Catรกlogo de campos",fc_fields_catalog_hint:"Todos los campos usados en el formulario. Edรญtalos aquรญ para actualizarlos en todas partes.",fc_fields_add:"Aรฑadir Campo",fc_fields_search:"Buscar camposโฆ",fc_fields_filter_all:"Todos",fc_fields_filter_used:"Usados",fc_fields_filter_unused:"No usados",fc_fields_unused_badge:"No usado",fc_fields_used_in_one:"Usado en {{count}} paso",fc_fields_used_in_many:"Usado en {{count}} pasos",fc_fields_go_to_step:'Ir al paso "{{title}}"',fc_fields_no_fields:"Aรบn sin campos.",fc_fields_no_match:"Ningรบn campo coincide con el filtro.",fc_fields_confirm_delete:"ยฟEliminar este campo?",fc_init_title:"Valores iniciales",fc_init_subtitle:"Respuestas estรกticas precargadas en el runner antes de que el usuario empiece.",fc_init_static:"Valores estรกticos",fc_init_add:"Aรฑadir",fc_init_no_values:"Aรบn sin valores iniciales.",fc_init_prefill:"Precargar desde API",fc_init_prefill_hint:"Obtener respuestas desde un endpoint cuando el runner monta.",fc_init_mapping:"Mapeo (JSON: namespace โ response_path)",fc_json_title:"JSON",fc_json_hint:"JourneySpec en bruto (form_config + theme). Edita y haz clic en Aplicar para actualizar el configurador.",fc_json_refresh:"Recargar del configurador",fc_json_refresh_hint:"Descarta las ediciones del JSON y recarga desde el estado actual del configurador",fc_json_copy:"Copiar",fc_json_download:"Descargar",fc_json_import:"Aplicar cambios",fc_json_apply_hint:"Aplica las ediciones del JSON al configurador",fc_json_imported_ok:"Importado correctamente",fc_json_copied:"Copiado al portapapeles",fc_json_invalid:"JSON no vรกlido",fc_json_upload:"Subir archivo",fc_json_file_error:"No se pudo leer el archivo.",fc_create_field_title:"Aรฑadir campo",fc_create_field_subtitle:"Elige del catรกlogo o crea un campo personalizado.",fc_create_from_catalog:"Del catรกlogo ({{count}})",fc_create_custom:"Campo personalizado",fc_create_search_specs:"Buscar specsโฆ",fc_create_no_specs:"Sin specs coincidentes.",fc_create_label_required:"Etiqueta *",fc_create_label_placeholder:"p. ej., Nombre del Cliente",fc_create_namespace:"Namespace",fc_create_namespace_placeholder:"p. ej., customer.name (auto si vacรญo)",fc_create_schema:"Schema",fc_create_options:"Opciones",fc_create_option_value_placeholder:"valor",fc_create_option_label_placeholder:"Etiqueta",fc_create_cancel:"Cancelar",fc_create_create:"Crear",fc_field_props:"Propiedades del campo",fc_field_no_selected:"Ningรบn campo seleccionado.",fc_field_label:"Etiqueta *",fc_field_namespace:"Namespace",fc_field_placeholder:"Placeholder",fc_field_help:"Texto de ayuda",fc_field_required:"Obligatorio",fc_field_required_hint:"El usuario debe rellenarlo antes de continuar.",fc_field_actor:"Actor",fc_field_actor_customer:"Cliente",fc_field_actor_operator:"Operador",fc_field_widget:"Widget",fc_field_widget_auto:"Automรกtico",fc_field_widget_text:"Texto",fc_field_widget_textarea:"รrea de texto",fc_field_widget_select:"Lista",fc_field_widget_radio:"Radio",fc_field_widget_date:"Fecha",fc_field_widget_time:"Hora",fc_field_widget_datetime:"Fecha y hora",fc_field_widget_currency:"Moneda",fc_field_widget_upload:"Subida",fc_field_widget_email:"Email",fc_field_widget_phone:"Telรฉfono",fc_field_widget_location:"Ubicaciรณn",fc_field_widget_boolean:"Booleano (Sรญ/No)",fc_field_allow_future:"Permitir fechas futuras",fc_field_allow_future_hint:"Permitir fechas posteriores a hoy.",fc_field_display_style:"Estilo de presentaciรณn",fc_field_display_auto:"Automรกtico (radio โค5, dropdown >5)",fc_field_display_radio:"Lista radio",fc_field_display_radio_horizontal:"Lista radio horizontal",fc_field_display_dropdown:"Dropdown",fc_field_display_segmented:"Botones segmentados",fc_field_display_hint:"Controla cรณmo se muestran las opciones en runtime.",fc_field_display_switch:"Switch (toggle)",fc_field_display_yesno:"Segmentado (botones Sรญ / No)",fc_field_boolean_hint:"Sustituye las etiquetas Sรญ/No aรฑadiendo 2 opciones debajo (primera = true, segunda = false).",fc_field_options:"Opciones",fc_field_no_options:"Aรบn sin opciones.",fc_field_upload_validation:"Validaciรณn de la subida",fc_field_upload_accept:"Tipos MIME/extensiones aceptados",fc_field_upload_max:"Tamaรฑo mรกximo (MB)",fc_field_dynamic_rules:"Reglas dinรกmicas",fc_field_dynamic_rules_hint:"Muestra, habilita o exige este campo segรบn otras respuestas.",fc_field_visible_when:"Mostrar cuando",fc_field_visible_when_hint:"Cuando la condiciรณn es falsa, el campo se oculta y su valor se borra.",fc_field_enabled_when:"Habilitar cuando",fc_field_enabled_when_hint:"Cuando la condiciรณn es falsa, el campo se muestra como solo lectura.",fc_field_required_when:"Obligatorio cuando",fc_field_required_when_hint:'Sustituye la opciรณn estรกtica "Obligatorio" mientras el campo estรก visible.',fc_field_always_visible:"Siempre visible",fc_field_always_enabled:"Siempre habilitado",fc_field_required_static:'Usar opciรณn estรกtica "Obligatorio"',fc_field_rule_active:"Regla activa",fc_field_computed:"Valor calculado",fc_field_computed_hint:"Calcular este campo automรกticamente a partir de otros campos. El resultado es de solo lectura.",fc_field_width:"Ancho del campo",fc_field_width_hint:"Ancho dentro de una fila horizontal (en mรณvil siempre es ancho completo).",fc_field_width_auto:"Automรกtico (repartir la fila)",fc_field_width_full:"Completo (3/3)",fc_field_computed_operation:"Operaciรณn",fc_field_computed_op_sum:"Suma (+)",fc_field_computed_op_subtract:"Resta (โ)",fc_field_computed_op_multiply:"Multiplicaciรณn (ร)",fc_field_computed_op_divide:"Divisiรณn (รท)",fc_field_computed_precision:"Decimales",fc_field_computed_operands:"Campos operandos",fc_field_computed_add_operand:"Aรฑadir un campoโฆ",fc_field_computed_missing_operand:"(campo no encontrado)",fc_field_computed_no_fields:"No hay otros campos disponibles para usar como operandos.",fc_field_computed_all_added:"Todos los campos disponibles ya estรกn aรฑadidos.",fc_field_delete:"Eliminar campo",fc_field_done:"Listo",fc_field_confirm_delete:"ยฟEliminar este campo del catรกlogo (y de todas las filas que lo usan)?",theme_button:"Tema",theme_reset:"Restablecer",theme_colors:"Colores",theme_primary:"Primario",theme_background:"Fondo",theme_card:"Tarjeta",theme_foreground:"Texto",theme_color_picker_aria:"Selector de color {{label}}",theme_color_placeholder:"p. ej., 222 47% 11%",theme_color_hint:"Elige un color o escribe un triplet HSL",theme_typography:"Tipografรญa",theme_heading_font:"Fuente de tรญtulos",theme_body_font:"Fuente del cuerpo",theme_font_default:"Predeterminada",theme_font_size:"Tamaรฑo base de fuente (px)",theme_shape_spacing:"Forma y espaciado",theme_border_radius:"Radio de bordes (rem)",theme_spacing:"Espaciado",theme_spacing_cozy_default:"Cรณmodo (predeterminado)",theme_spacing_compact:"Compacto",theme_spacing_cozy:"Cรณmodo",theme_spacing_spacious:"Espacioso",theme_live_preview:"Vista previa",theme_heading_sample:"Ejemplo de tรญtulo",theme_body_sample:"El veloz murciรฉlago hindรบ comรญa feliz cardillo y kiwi. El texto del cuerpo usa la fuente, tamaรฑo y espaciado que elegiste.",theme_input_sample:"Input de ejemplo",theme_primary_action:"Acciรณn primaria",runner_toast_required_fields:"Completa los campos obligatorios.",runner_toast_api_failed:"La llamada a la API fallรณ.",runner_toast_answers_copied:"ยกRespuestas copiadas al portapapeles!",runner_toast_partial_saved:"Respuestas parciales guardadas (registradas).",runner_toast_file_uploaded:"Subido {{name}} para {{key}}",runner_loading_preview:"Cargando vista previaโฆ",runner_no_form:"Ningรบn formulario configurado.",runner_back_to_builder:"Volver al constructor",runner_preset_full:"Completo",runner_iframe_title:"Vista previa del formulario",import_invalid_json:"JSON invรกlido: no se pudo analizar la entrada.",import_success:"Journey importada con รฉxito",import_clipboard_failed:"No se pudo leer el portapapeles",shortcut_selected_nodes_one:"{{count}} nodo seleccionado",shortcut_selected_nodes_other:"{{count}} nodos seleccionados",shortcut_deleted:"Eliminado",shortcut_undo:"Deshacer",shortcut_redo:"Rehacer",shortcut_copied:"Copiado al portapapeles",shortcut_pasted:"Pegado",shortcut_duplicated:"Duplicado"},Fg={back:"Voltar",next:"Seguinte",reset:"Reiniciar",cancel:"Cancelar",submit:"Submeter",save:"Guardar",delete:"Eliminar",close:"Fechar",empty:"(vazio)",path:"Caminho",unknown:"Desconhecido",runner_title:"Formulรกrio",runner_save_exit:"Guardar e Sair",runner_ready_title:"Antes de comeรงar, garanta que tem os seguintes dados:",runner_onboarding_subtitle:"Antes de comeรงar, garanta que tem os seguintes dados:",runner_onboarding_line1:"Antes de comeรงar, por favor tenha preparada a informaรงรฃo relevante sobre o ocorrido.",runner_onboarding_line2:"Poderemos pedir detalhes como a descriรงรฃo do ocorrido, a data, a localizaรงรฃo ou documentos de apoio.",runner_onboarding_photos:"Fotos do incidente (dano, local, contexto)",runner_onboarding_documents:"Documentos relevantes (apรณlice, identificaรงรฃo, etc.)",runner_onboarding_datetime:"Data e hora do ocorrido",runner_onboarding_location:"Localizaรงรฃo",runner_onboarding_description:"Descriรงรฃo breve do que aconteceu",runner_start_claim:"Comeรงar participaรงรฃo",runner_review_title:"Reveja as suas respostas",runner_no_answers:"Nenhuma resposta registada.",runner_summary_all_answers:"Todas as respostas",runner_review:"Rever",runner_step:"Passo {{step}}/{{total}}",runner_no_journey:"Ainda nรฃo foi criado nenhum percurso.",runner_no_data:"Dados do percurso indisponรญveis.",builder_title:"Construtor de Percursos",builder_read_only:"Sรณ Leitura",builder_publish:"Publicar",builder_unlock_edit:"Desbloquear Ediรงรฃo",builder_open_runner:"Abrir Formulรกrio",builder_auto_layout:"Disposiรงรฃo Auto",builder_export_json:"Exportar JSON",builder_export_copied:"Especificaรงรฃo copiada para a รกrea de transferรชncia",specs_title:"Propriedades",specs_search_placeholder:"Pesquisar...",specs_filter_all:"Todos os Tipos",specs_create_custom:"Criar Campo Personalizado",specs_count:"{{filtered}} de {{total}} propriedades",specs_no_results:"Nenhuma propriedade encontrada",props_select_hint:"Selecione um nรณ ou aresta para editar",props_drag_hint:"Arraste propriedades do painel esquerdo para a tela para criar nรณs",node_props_title:"Propriedades do Nรณ",node_schema_type:"Tipo de Schema",node_source_spec:"ID da Propriedade",node_namespace:"Namespace",node_required:"Obrigatรณrio",node_required_hint:"Bloquear navegaรงรฃo se vazio",node_original_label:"Etiqueta Original",node_label_override:"Etiqueta Personalizada (opcional)",node_label_override_placeholder:"Etiqueta personalizadaโฆ",node_actor:"Ator",node_actor_customer:"Cliente",node_actor_operator:"Operador",node_widget:"Widget",node_widget_auto:"Automรกtico (do schema)",node_widget_text:"Campo de Texto",node_widget_textarea:"รrea de Texto",node_widget_select:"Lista Suspensa",node_widget_radio:"Grupo de Rรกdio",node_widget_datepicker:"Seletor de Data",node_widget_timepicker:"Seletor de Hora",node_widget_datetimepicker:"Seletor de Data e Hora",node_widget_currency:"Campo Monetรกrio",node_widget_upload:"Carregamento de Ficheiro",node_widget_email:"Email",node_widget_phone:"Telefone",node_widget_location:"Localizaรงรฃo",node_allow_future:"Permitir datas futuras",node_allow_future_hint:"Quando desativado, sรณ permite datas passadas ou hoje",node_bindings_title:"Ligaรงรตes",node_bindings_target:"Namespace Destino",node_bindings_add:"Adicionar Binding",node_delete:"Eliminar Nรณ",node_options_title:"Opรงรตes",upload_config_title:"Configuraรงรฃo de Upload",upload_file_type_preset:"Tipo de ficheiro",upload_any_file:"Qualquer ficheiro",upload_images_only:"Apenas imagens",upload_documents_only:"Apenas documentos",upload_images_pdf:"Imagens + PDFs",upload_custom:"Personalizado",upload_accepted_types:"Tipos aceites (personalizado)",upload_accepted_types_placeholder:"ex: image/*,.pdf",upload_max_size:"Tamanho mรกximo (MB)",upload_max_size_placeholder:"ex: 10",edge_props_title:"Propriedades da Aresta",edge_connection:"Ligaรงรฃo",edge_default:"Aresta Padrรฃo",edge_default_hint:"Usada quando nenhuma outra condiรงรฃo coincide",edge_priority:"Prioridade",edge_priority_hint:"Arestas com maior prioridade sรฃo avaliadas primeiro",edge_quick_pick:"Seleรงรฃo rรกpida das opรงรตes:",edge_condition:"Condiรงรฃo",edge_visual:"Visual",edge_advanced:"Avanรงado",edge_json_logic:"Condiรงรฃo JSON Logic",edge_delete:"Eliminar Aresta",preview_title:"Prรฉ-visualizaรงรฃo",preview_step_of:"Passo {{current}} de {{total}}",preview_start:"Iniciar Prรฉ-visualizaรงรฃo",preview_add_nodes_hint:"Adicione nรณs ร tela para prรฉ-visualizar o fluxo.",preview_start_hint:'Clique em "Iniciar Prรฉ-visualizaรงรฃo" para testar o fluxo interativamente.',preview_no_node:"Nenhum nรณ selecionado.",preview_required_hint:"Este campo รฉ obrigatรณrio",preview_validation_hint:"Corrija os erros de validaรงรฃo primeiro",import_title:"Importar Especificaรงรฃo",import_description:"Carregue um ficheiro JSON ou cole o JSON para popular a tela.",import_paste_tab:"Colar JSON",import_upload_tab:"Carregar Ficheiro",import_paste_clipboard:"Colar da รrea de Transferรชncia",import_placeholder:'{"journey_id": "...", "nodes": [...], "edges": [...]}',import_button:"Importar",import_validation_errors:"Erros de validaรงรฃo:",validation_title:"Validaรงรฃo do Grafo",validation_no_issues:"Sem problemas encontrados",validation_issue_count:"{{count}} problema{{plural}} encontrado{{plural}}",validation_good:"O grafo estรก correto!",validation_no_issues_actor:"Sem problemas",validation_validate:"Validar",create_node_title:"Criar Campo Personalizado",create_node_label:"Etiqueta *",create_node_label_placeholder:"Introduza uma etiqueta",create_node_namespace:"Namespace",create_node_namespace_hint:"Gerado automaticamente a partir da etiqueta.",create_node_schema:"Tipo de Schema",upload_drag_drop:"Arraste e largue um ficheiro aqui, ou clique para selecionar",upload_uploading:"A carregarโฆ",widget_unknown_schema:"Tipo de schema desconhecido: {{schema}}",widget_yes:"Sim",widget_no:"Nรฃo",widget_no_widget:"Nenhum widget disponรญvel para este tipo de campo.",widget_no_options:"Nenhuma opรงรฃo configurada para este campo de seleรงรฃo.",widget_pick_date:"Selecionar data",widget_invalid_date:"Introduza uma data vรกlida",widget_pick_time:"Selecionar hora",widget_select_option:"Selecionar uma opรงรฃo...",widget_search_country:"Pesquisar paรญs...",widget_no_country:"Paรญs nรฃo encontrado.",widget_invalid_phone:"Introduza um nรบmero de telefone vรกlido",widget_invalid_email:"Introduza um e-mail vรกlido",widget_file_too_large:"O ficheiro excede o limite de {{max}} MB ({{size}} MB)",widget_file_type_rejected:"Tipo de ficheiro nรฃo aceite. Permitidos: {{accept}}",widget_upload_failed:"Falha ao carregar",widget_accepted_hint:"Aceites: {{accept}}",widget_max_size_hint:"Mรกx {{max}} MB",location_placeholder:"Comece a digitar um endereรงoโฆ",location_no_api_key:"ร necessรกria uma chave de API do Google Maps para o widget de localizaรงรฃo.",placeholder_text:"Inserirโฆ",placeholder_select:"Selecionarโฆ",placeholder_currency:"0,00",placeholder_phone:"555 000 0000",placeholder_email:"email@exemplo.com",placeholder_date:"Selecionar dataโฆ",not_found_title:"404",not_found_message:"Pรกgina nรฃo encontrada",not_found_link:"Voltar ao Inรญcio",runner_page_back:"Construtor",fc_title:"Configurador de Formulรกrio",fc_read_only:"Sรณ leitura",fc_undo:"Desfazer",fc_redo:"Refazer",fc_preview_form:"Prรฉ-visualizar",fc_save:"Guardar",fc_publish:"Publicar",fc_unlock_edit:"Desbloquear ediรงรฃo",fc_tab_steps:"Passos",fc_tab_fields:"Campos",fc_tab_init:"Inicializaรงรฃo",fc_tab_json:"JSON",fc_flow_validation_title:"Validaรงรฃo do Fluxo",fc_flow_validation_validate:"Validar Fluxo",fc_flow_validation_no_issues:"Sem problemas no fluxo",fc_flow_validation_good:"O fluxo estรก correto!",fc_flow_validation_no_issues_step:"Sem problemas",fc_flow_validation_broken_reference:"Referรชncia Partida",fc_flow_validation_unreachable_step:"Passo Inalcansรกvel",fc_flow_validation_dead_end:"Sem Saรญda",fc_flow_validation_cycle:"Ciclo de Navegaรงรฃo",fc_flow_validation_no_fallback_rule:"Sem Regra de Fallback",fc_flow_validation_general:"Geral",fc_form_steps:"Passos do Formulรกrio",fc_add_step:"Adicionar Passo",fc_step_untitled:"(sem tรญtulo)",fc_step_meta:"{{rows}} linhas, {{fields}} campos",fc_no_steps:"Ainda sem passos.",fc_no_steps_hint_click:"Clique em",fc_no_steps_hint_to_begin:"para comeรงar.",fc_confirm_title:"Tem a certeza?",fc_confirm_delete_step:"Eliminar este passo?",fc_step_empty_select:"Selecione um passo ร esquerda.",fc_step_empty_create:"Adicione um passo no painel ร esquerda para comeรงar.",fc_step_title_label:"Tรญtulo do Passo",fc_step_title_placeholder:"Tรญtulo do passo",fc_step_description_label:"Descriรงรฃo",fc_step_description_placeholder:"Opcional",fc_add_row:"Adicionar Linha",fc_row_n:"Linha {{n}}",fc_layout_horizontal:"Horizontal",fc_layout_vertical:"Vertical",fc_confirm_delete_row:"Eliminar esta linha?",fc_add_field_btn:"Adicionar campo",fc_no_fields:"Sem campos.",fc_edit:"Editar",fc_remove_from_row:"Remover da linha",fc_row_title_placeholder:"Tรญtulo da secรงรฃo (opcional)",fc_row_show_divider:"Divisรณria",fc_nav_title:"Navegaรงรฃo do Passo",fc_nav_api_call:"Chamada API ao continuar",fc_nav_api_call_hint:"Executada antes de avaliar as regras.",fc_nav_body_template:"Template do body (JSON)",fc_nav_body_template_hint_prefix:"Use tokens",fc_nav_body_template_hint_suffix:".",fc_nav_on_error:"Em caso de erro",fc_nav_on_error_block:"Bloquear โ permanece neste passo",fc_nav_on_error_continue:"Continuar โ avalia as regras na mesma",fc_nav_on_error_goto:"Ir para: {{step}}",fc_nav_on_error_summary:"Ir para: Resumo",fc_nav_on_error_hint:"O que acontece se a chamada falhar ou a rede cair.",fc_nav_continue_button:"Botรฃo continuar",fc_nav_continue_placeholder:"Continuar",fc_nav_rules:"Regras de navegaรงรฃo",fc_nav_add_rule:"Adicionar regra",fc_nav_rules_hint:'Regras avaliadas por ordem. Vence a primeira. Use "sempre" como รบltimo fallback.',fc_nav_rule_n:"Regra {{n}}",fc_nav_has_condition:"Tem condiรงรฃo",fc_nav_go_to:"Ir para",fc_nav_submit_form:"โ Submeter formulรกrio โ",fc_nav_field_requires_value:'O campo "{{label}}" requer um valor.',fc_summary_panel:"Painel de Resumo",fc_summary_title_label:"Tรญtulo do Resumo",fc_summary_show_sidebar:"Mostrar resumo em progresso",fc_summary_show_sidebar_hint:"Apresenta a barra lateral de resumo enquanto o utilizador avanรงa na jornada.",fc_summary_sections:"Secรงรตes",fc_summary_add_section:"Adicionar Secรงรฃo",fc_summary_section_title_placeholder:"Tรญtulo da secรงรฃo",fc_summary_visible_from:"Visรญvel a partir do passo",fc_summary_until_step:"Atรฉ ao passo (opcional)",fc_summary_all_steps:"Todos os passos",fc_summary_step_n:"Passo {{n}}",fc_summary_display_fields:"Campos a Mostrar",fc_summary_add:"Adicionar",fc_summary_no_display_fields:"Ainda sem campos a mostrar.",fc_summary_no_sections:"Ainda sem secรงรตes.",fc_summary_confirm_delete_section:"Eliminar esta secรงรฃo?",fc_summary_source:"Origem",fc_summary_source_form_field:"Campo do Formulรกrio",fc_summary_source_api_response:"Resposta da API",fc_summary_format:"Formato",fc_summary_format_text:"Texto",fc_summary_format_number:"Nรบmero",fc_summary_format_currency:"Moeda",fc_summary_format_date:"Data",fc_summary_format_datetime:"Data e Hora",fc_summary_display_label:"Etiqueta",fc_summary_display_label_placeholder:"Etiqueta a apresentar",fc_summary_field:"Campo",fc_summary_select:"Selecionarโฆ",fc_summary_from_step_api:"Do API do passo",fc_summary_response_path:"Caminho da resposta (notaรงรฃo por pontos)",fc_fields_catalog:"Catรกlogo de campos",fc_fields_catalog_hint:"Todos os campos usados no formulรกrio. Editar aqui atualiza-os em todo o lado.",fc_fields_add:"Adicionar Campo",fc_fields_search:"Pesquisar camposโฆ",fc_fields_filter_all:"Todos",fc_fields_filter_used:"Usados",fc_fields_filter_unused:"Nรฃo usados",fc_fields_unused_badge:"Nรฃo usado",fc_fields_used_in_one:"Usado em {{count}} passo",fc_fields_used_in_many:"Usado em {{count}} passos",fc_fields_go_to_step:'Ir para o passo "{{title}}"',fc_fields_no_fields:"Ainda sem campos.",fc_fields_no_match:"Nenhum campo corresponde ao filtro.",fc_fields_confirm_delete:"Eliminar este campo?",fc_init_title:"Valores iniciais",fc_init_subtitle:"Respostas estรกticas prรฉ-carregadas no runner antes do utilizador comeรงar.",fc_init_static:"Valores estรกticos",fc_init_add:"Adicionar",fc_init_no_values:"Ainda sem valores iniciais.",fc_init_prefill:"Prรฉ-preencher a partir de API",fc_init_prefill_hint:"Obter respostas de um endpoint quando o runner monta.",fc_init_mapping:"Mapeamento (JSON: namespace โ response_path)",fc_json_title:"JSON",fc_json_hint:"JourneySpec em bruto (form_config + theme). Edite e clique em Aplicar para atualizar o configurador.",fc_json_refresh:"Recarregar do configurador",fc_json_refresh_hint:"Descarta as ediรงรตes do JSON e recarrega o estado atual do configurador",fc_json_copy:"Copiar",fc_json_download:"Descarregar",fc_json_import:"Aplicar alteraรงรตes",fc_json_apply_hint:"Aplica as ediรงรตes do JSON ao configurador",fc_json_imported_ok:"Importado com sucesso",fc_json_copied:"Copiado para a รกrea de transferรชncia",fc_json_invalid:"JSON invรกlido",fc_json_upload:"Carregar Ficheiro",fc_json_file_error:"Nรฃo foi possรญvel ler o ficheiro.",fc_create_field_title:"Adicionar campo",fc_create_field_subtitle:"Escolha do catรกlogo ou crie um campo personalizado.",fc_create_from_catalog:"Do catรกlogo ({{count}})",fc_create_custom:"Campo personalizado",fc_create_search_specs:"Pesquisar specsโฆ",fc_create_no_specs:"Sem specs correspondentes.",fc_create_label_required:"Etiqueta *",fc_create_label_placeholder:"ex.: Nome do Cliente",fc_create_namespace:"Namespace",fc_create_namespace_placeholder:"ex.: customer.name (automรกtico se vazio)",fc_create_schema:"Schema",fc_create_options:"Opรงรตes",fc_create_option_value_placeholder:"valor",fc_create_option_label_placeholder:"Etiqueta",fc_create_cancel:"Cancelar",fc_create_create:"Criar",fc_field_props:"Propriedades do campo",fc_field_no_selected:"Nenhum campo selecionado.",fc_field_label:"Etiqueta *",fc_field_namespace:"Namespace",fc_field_placeholder:"Placeholder",fc_field_help:"Texto de ajuda",fc_field_required:"Obrigatรณrio",fc_field_required_hint:"O utilizador tem de preencher antes de continuar.",fc_field_actor:"Ator",fc_field_actor_customer:"Cliente",fc_field_actor_operator:"Operador",fc_field_widget:"Widget",fc_field_widget_auto:"Automรกtico",fc_field_widget_text:"Texto",fc_field_widget_textarea:"รrea de texto",fc_field_widget_select:"Lista",fc_field_widget_radio:"Radio",fc_field_widget_date:"Data",fc_field_widget_time:"Hora",fc_field_widget_datetime:"Data e Hora",fc_field_widget_currency:"Moeda",fc_field_widget_upload:"Upload",fc_field_widget_email:"Email",fc_field_widget_phone:"Telefone",fc_field_widget_location:"Localizaรงรฃo",fc_field_widget_boolean:"Booleano (Sim/Nรฃo)",fc_field_allow_future:"Permitir datas futuras",fc_field_allow_future_hint:"Permitir datas apรณs hoje.",fc_field_display_style:"Estilo de apresentaรงรฃo",fc_field_display_auto:"Automรกtico (radio โค5, dropdown >5)",fc_field_display_radio:"Lista radio",fc_field_display_radio_horizontal:"Lista radio horizontal",fc_field_display_dropdown:"Dropdown",fc_field_display_segmented:"Botรตes segmentados",fc_field_display_hint:"Controla como as opรงรตes aparecem em runtime.",fc_field_display_switch:"Switch (toggle)",fc_field_display_yesno:"Segmentado (botรตes Sim / Nรฃo)",fc_field_boolean_hint:"Substitua as etiquetas Sim/Nรฃo adicionando 2 opรงรตes abaixo (primeira = true, segunda = false).",fc_field_options:"Opรงรตes",fc_field_no_options:"Ainda sem opรงรตes.",fc_field_upload_validation:"Validaรงรฃo do upload",fc_field_upload_accept:"Tipos MIME/extensรตes aceites",fc_field_upload_max:"Tamanho mรกximo (MB)",fc_field_dynamic_rules:"Regras dinรขmicas",fc_field_dynamic_rules_hint:"Mostre, ative ou torne obrigatรณrio este campo com base noutras respostas.",fc_field_visible_when:"Mostrar quando",fc_field_visible_when_hint:"Quando a condiรงรฃo for falsa, o campo รฉ ocultado e o seu valor รฉ limpo.",fc_field_enabled_when:"Habilitar quando",fc_field_enabled_when_hint:"Quando a condiรงรฃo for falsa, o campo รฉ apresentado como apenas leitura.",fc_field_required_when:"Obrigatรณrio quando",fc_field_required_when_hint:'Substitui a definiรงรฃo estรกtica "Obrigatรณrio" enquanto o campo estiver visรญvel.',fc_field_always_visible:"Sempre visรญvel",fc_field_always_enabled:"Sempre habilitado",fc_field_required_static:'Usar definiรงรฃo estรกtica "Obrigatรณrio"',fc_field_rule_active:"Regra ativa",fc_field_computed:"Valor calculado",fc_field_computed_hint:"Calcular este campo automaticamente a partir de outros campos. O resultado รฉ sรณ de leitura.",fc_field_width:"Largura do campo",fc_field_width_hint:"Largura dentro de uma linha horizontal (no mobile รฉ sempre largura total).",fc_field_width_auto:"Automรกtica (dividir igualmente)",fc_field_width_full:"Total (3/3)",fc_field_computed_operation:"Operaรงรฃo",fc_field_computed_op_sum:"Soma (+)",fc_field_computed_op_subtract:"Subtraรงรฃo (โ)",fc_field_computed_op_multiply:"Multiplicaรงรฃo (ร)",fc_field_computed_op_divide:"Divisรฃo (รท)",fc_field_computed_precision:"Casas decimais",fc_field_computed_operands:"Campos operandos",fc_field_computed_add_operand:"Adicionar um campoโฆ",fc_field_computed_missing_operand:"(campo nรฃo encontrado)",fc_field_computed_no_fields:"Sem outros campos disponรญveis para usar como operandos.",fc_field_computed_all_added:"Todos os campos disponรญveis jรก foram adicionados.",fc_field_delete:"Eliminar campo",fc_field_done:"Concluรญdo",fc_field_confirm_delete:"Eliminar este campo do catรกlogo (e de todas as linhas que o usam)?",theme_button:"Tema",theme_reset:"Repor",theme_colors:"Cores",theme_primary:"Primรกria",theme_background:"Fundo",theme_card:"Cartรฃo",theme_foreground:"Texto",theme_color_picker_aria:"Seletor de cor {{label}}",theme_color_placeholder:"ex.: 222 47% 11%",theme_color_hint:"Escolha uma cor ou escreva um triplet HSL",theme_typography:"Tipografia",theme_heading_font:"Fonte dos tรญtulos",theme_body_font:"Fonte do corpo",theme_font_default:"Predefinido",theme_font_size:"Tamanho base da fonte (px)",theme_shape_spacing:"Forma e espaรงamento",theme_border_radius:"Raio das bordas (rem)",theme_spacing:"Espaรงamento",theme_spacing_cozy_default:"Cรณmodo (predefinido)",theme_spacing_compact:"Compacto",theme_spacing_cozy:"Cรณmodo",theme_spacing_spacious:"Espaรงoso",theme_live_preview:"Prรฉ-visualizaรงรฃo",theme_heading_sample:"Exemplo de tรญtulo",theme_body_sample:"A rรกpida raposa castanha salta sobre o cรฃo preguiรงoso. O texto do corpo usa a fonte, tamanho e espaรงamento que escolheu.",theme_input_sample:"Input de exemplo",theme_primary_action:"Aรงรฃo primรกria",runner_toast_required_fields:"Preencha os campos obrigatรณrios.",runner_toast_api_failed:"A chamada ร API falhou.",runner_toast_answers_copied:"Respostas copiadas para a รกrea de transferรชncia!",runner_toast_partial_saved:"Respostas parciais guardadas (registadas).",runner_toast_file_uploaded:"Enviado {{name}} para {{key}}",runner_loading_preview:"A carregar prรฉ-visualizaรงรฃoโฆ",runner_no_form:"Nenhum formulรกrio configurado.",runner_back_to_builder:"Voltar ao construtor",runner_preset_full:"Total",runner_iframe_title:"Prรฉ-visualizaรงรฃo do formulรกrio",import_invalid_json:"JSON invรกlido: nรฃo foi possรญvel analisar a entrada.",import_success:"Journey importada com sucesso",import_clipboard_failed:"Nรฃo foi possรญvel ler a รกrea de transferรชncia",shortcut_selected_nodes_one:"{{count}} nรณ selecionado",shortcut_selected_nodes_other:"{{count}} nรณs selecionados",shortcut_deleted:"Eliminado",shortcut_undo:"Desfazer",shortcut_redo:"Refazer",shortcut_copied:"Copiado para a รกrea de transferรชncia",shortcut_pasted:"Colado",shortcut_duplicated:"Duplicado"},$g={back:"Wstecz",next:"Dalej",reset:"Resetuj",cancel:"Anuluj",submit:"Wyลlij",save:"Zapisz",delete:"Usuล",close:"Zamknij",empty:"(puste)",path:"ลcieลผka",unknown:"Nieznany",runner_title:"Formularz",runner_save_exit:"Zapisz i wyjdลบ",runner_ready_title:"Zanim zaczniesz, upewnij siฤ, ลผe masz nastฤpujฤ
ce dane:",runner_onboarding_subtitle:"Zanim zaczniesz, upewnij siฤ, ลผe masz nastฤpujฤ
ce dane:",runner_onboarding_line1:"Zanim zaczniesz, proszฤ przygotuj odpowiednie informacje o zdarzeniu.",runner_onboarding_line2:"Moลผemy poprosiฤ o szczegรณลy, takie jak opis zdarzenia, datฤ, lokalizacjฤ lub dokumenty pomocnicze.",runner_onboarding_photos:"Zdjฤcia incydentu (szkoda, miejsce, kontekst)",runner_onboarding_documents:"Istotne dokumenty (polisa, dowรณd toลผsamoลci itp.)",runner_onboarding_datetime:"Data i godzina zdarzenia",runner_onboarding_location:"Lokalizacja",runner_onboarding_description:"Krรณtki opis tego, co siฤ wydarzyลo",runner_start_claim:"Rozpocznij zgลoszenie",runner_review_title:"Przejrzyj swoje odpowiedzi",runner_no_answers:"Brak zarejestrowanych odpowiedzi.",runner_summary_all_answers:"Wszystkie odpowiedzi",runner_review:"Przeglฤ
d",runner_step:"Krok {{step}}/{{total}}",runner_no_journey:"Nie utworzono jeszcze ลผadnej ลcieลผki.",runner_no_data:"Dane ลcieลผki niedostฤpne.",builder_title:"Kreator ลcieลผek",builder_read_only:"Tylko do odczytu",builder_publish:"Publikuj",builder_unlock_edit:"Odblokuj edycjฤ",builder_open_runner:"Otwรณrz formularz",builder_auto_layout:"Auto-ukลad",builder_export_json:"Eksportuj JSON",builder_export_copied:"Specyfikacja skopiowana do schowka",specs_title:"Wลaลciwoลci",specs_search_placeholder:"Szukaj...",specs_filter_all:"Wszystkie typy",specs_create_custom:"Utwรณrz pole niestandardowe",specs_count:"{{filtered}} z {{total}} wลaลciwoลci",specs_no_results:"Nie znaleziono wลaลciwoลci",props_select_hint:"Wybierz wฤzeล lub krawฤdลบ do edycji",props_drag_hint:"Przeciฤ
gnij wลaลciwoลci z lewego panelu na pลรณtno, aby utworzyฤ wฤzลy",node_props_title:"Wลaลciwoลci wฤzลa",node_schema_type:"Typ schematu",node_source_spec:"ID wลaลciwoลci",node_namespace:"Namespace",node_required:"Wymagane",node_required_hint:"Blokuj nawigacjฤ, jeลli puste",node_original_label:"Oryginalna etykieta",node_label_override:"Etykieta niestandardowa (opcjonalna)",node_label_override_placeholder:"Etykieta niestandardowaโฆ",node_actor:"Aktor",node_actor_customer:"Klient",node_actor_operator:"Operator",node_widget:"Widลผet",node_widget_auto:"Automatyczny (ze schematu)",node_widget_text:"Pole tekstowe",node_widget_textarea:"Obszar tekstowy",node_widget_select:"Lista rozwijana",node_widget_radio:"Grupa radio",node_widget_datepicker:"Wybรณr daty",node_widget_timepicker:"Wybรณr godziny",node_widget_datetimepicker:"Wybรณr daty i godziny",node_widget_currency:"Pole walutowe",node_widget_upload:"Przesyลanie pliku",node_widget_email:"E-mail",node_widget_phone:"Telefon",node_widget_location:"Lokalizacja",node_allow_future:"Zezwรณl na przyszลe daty",node_allow_future_hint:"Gdy wyลฤ
czone, zezwala tylko na daty z przeszลoลci lub dzisiaj",node_bindings_title:"Powiฤ
zania",node_bindings_target:"Docelowy namespace",node_bindings_add:"Dodaj powiฤ
zanie",node_delete:"Usuล wฤzeล",node_options_title:"Opcje",upload_config_title:"Konfiguracja przesyลania",upload_file_type_preset:"Typ pliku",upload_any_file:"Dowolny plik",upload_images_only:"Tylko obrazy",upload_documents_only:"Tylko dokumenty",upload_images_pdf:"Obrazy + PDF",upload_custom:"Niestandardowy",upload_accepted_types:"Akceptowane typy (niestandardowe)",upload_accepted_types_placeholder:"np.: image/*,.pdf",upload_max_size:"Maksymalny rozmiar (MB)",upload_max_size_placeholder:"np.: 10",edge_props_title:"Wลaลciwoลci krawฤdzi",edge_connection:"Poลฤ
czenie",edge_default:"Krawฤdลบ domyลlna",edge_default_hint:"Uลผywana, gdy ลผaden inny warunek nie jest speลniony",edge_priority:"Priorytet",edge_priority_hint:"Krawฤdzie o wyลผszym priorytecie sฤ
oceniane jako pierwsze",edge_quick_pick:"Szybki wybรณr opcji:",edge_condition:"Warunek",edge_visual:"Wizualny",edge_advanced:"Zaawansowany",edge_json_logic:"Warunek JSON Logic",edge_delete:"Usuล krawฤdลบ",preview_title:"Podglฤ
d",preview_step_of:"Krok {{current}} z {{total}}",preview_start:"Rozpocznij podglฤ
d",preview_add_nodes_hint:"Dodaj wฤzลy do pลรณtna, aby wyลwietliฤ podglฤ
d przepลywu.",preview_start_hint:"Kliknij โRozpocznij podglฤ
dโ, aby interaktywnie przetestowaฤ przepลyw.",preview_no_node:"Nie wybrano wฤzลa.",preview_required_hint:"To pole jest wymagane",preview_validation_hint:"Najpierw popraw bลฤdy walidacji",import_title:"Importuj specyfikacjฤ",import_description:"Wgraj plik JSON lub wklej JSON, aby wypeลniฤ pลรณtno.",import_paste_tab:"Wklej JSON",import_upload_tab:"Wgraj plik",import_paste_clipboard:"Wklej ze schowka",import_placeholder:'{"journey_id": "...", "nodes": [...], "edges": [...]}',import_button:"Importuj",import_validation_errors:"Bลฤdy walidacji:",validation_title:"Walidacja grafu",validation_no_issues:"Nie znaleziono problemรณw",validation_issue_count:"Znaleziono {{count}} problem{{plural}}",validation_good:"Graf jest poprawny!",validation_no_issues_actor:"Brak problemรณw",validation_validate:"Waliduj",create_node_title:"Utwรณrz pole niestandardowe",create_node_label:"Etykieta *",create_node_label_placeholder:"Wprowadลบ etykietฤ",create_node_namespace:"Namespace",create_node_namespace_hint:"Generowany automatycznie z etykiety.",create_node_schema:"Typ schematu",upload_drag_drop:"Przeciฤ
gnij i upuลฤ plik tutaj lub kliknij, aby wybraฤ",upload_uploading:"Przesyลanieโฆ",widget_unknown_schema:"Nieznany typ schematu: {{schema}}",widget_yes:"Tak",widget_no:"Nie",widget_no_widget:"Brak dostฤpnego widลผetu dla tego typu pola.",widget_no_options:"Brak skonfigurowanych opcji dla tego pola wyboru.",widget_pick_date:"Wybierz datฤ",widget_invalid_date:"Wprowadลบ prawidลowฤ
datฤ",widget_pick_time:"Wybierz godzinฤ",widget_select_option:"Wybierz opcjฤ...",widget_search_country:"Szukaj kraju...",widget_no_country:"Nie znaleziono kraju.",widget_invalid_phone:"Wprowadลบ prawidลowy numer telefonu",widget_invalid_email:"Wprowadลบ prawidลowy e-mail",widget_file_too_large:"Plik przekracza limit {{max}} MB ({{size}} MB)",widget_file_type_rejected:"Typ pliku nie jest akceptowany. Dozwolone: {{accept}}",widget_upload_failed:"Przesyลanie nie powiodลo siฤ",widget_accepted_hint:"Akceptowane: {{accept}}",widget_max_size_hint:"Maks. {{max}} MB",location_placeholder:"Zacznij wpisywaฤ adresโฆ",location_no_api_key:"Klucz API Google Maps jest wymagany dla widลผetu lokalizacji.",placeholder_text:"Wpiszโฆ",placeholder_select:"Wybierzโฆ",placeholder_currency:"0,00",placeholder_phone:"555 000 0000",placeholder_email:"email@przyklad.pl",placeholder_date:"Wybierz datฤโฆ",not_found_title:"404",not_found_message:"Strona nie znaleziona",not_found_link:"Powrรณt do strony gลรณwnej",runner_page_back:"Kreator",fc_title:"Konfigurator Formularza",fc_read_only:"Tylko do odczytu",fc_undo:"Cofnij",fc_redo:"Ponรณw",fc_preview_form:"Podglฤ
d",fc_save:"Zapisz",fc_publish:"Opublikuj",fc_unlock_edit:"Odblokuj edycjฤ",fc_tab_steps:"Kroki",fc_tab_fields:"Pola",fc_tab_init:"Inicjalizacja",fc_tab_json:"JSON",fc_flow_validation_title:"Walidacja Przepลywu",fc_flow_validation_validate:"Waliduj Przepลyw",fc_flow_validation_no_issues:"Nie znaleziono problemรณw z przepลywem",fc_flow_validation_good:"Przepลyw jest poprawny!",fc_flow_validation_no_issues_step:"Brak problemรณw",fc_flow_validation_broken_reference:"Uszkodzona Referencja",fc_flow_validation_unreachable_step:"Nieosiฤ
galny Krok",fc_flow_validation_dead_end:"ลlepy Zauลek",fc_flow_validation_cycle:"Cykl Nawigacji",fc_flow_validation_no_fallback_rule:"Brak Reguลy Awaryjnej",fc_flow_validation_general:"Ogรณlne",fc_form_steps:"Kroki Formularza",fc_add_step:"Dodaj Krok",fc_step_untitled:"(bez tytuลu)",fc_step_meta:"{{rows}} wierszy, {{fields}} pรณl",fc_no_steps:"Brak krokรณw.",fc_no_steps_hint_click:"Kliknij",fc_no_steps_hint_to_begin:"aby rozpoczฤ
ฤ.",fc_confirm_title:"Czy na pewno?",fc_confirm_delete_step:"Usunฤ
ฤ ten krok?",fc_step_empty_select:"Wybierz krok po lewej.",fc_step_empty_create:"Dodaj krok z lewego panelu, aby rozpoczฤ
ฤ.",fc_step_title_label:"Tytuล kroku",fc_step_title_placeholder:"Tytuล kroku",fc_step_description_label:"Opis",fc_step_description_placeholder:"Opcjonalnie",fc_add_row:"Dodaj wiersz",fc_row_n:"Wiersz {{n}}",fc_layout_horizontal:"Poziomy",fc_layout_vertical:"Pionowy",fc_confirm_delete_row:"Usunฤ
ฤ ten wiersz?",fc_add_field_btn:"Dodaj pole",fc_no_fields:"Brak pรณl.",fc_edit:"Edytuj",fc_remove_from_row:"Usuล z wiersza",fc_row_title_placeholder:"Tytuล sekcji (opcjonalny)",fc_row_show_divider:"Separator",fc_nav_title:"Nawigacja kroku",fc_nav_api_call:"Wywoลanie API przy kontynuacji",fc_nav_api_call_hint:"Wykonywane przed ocenฤ
reguล.",fc_nav_body_template:"Szablon body (JSON)",fc_nav_body_template_hint_prefix:"Uลผyj tokenรณw",fc_nav_body_template_hint_suffix:".",fc_nav_on_error:"W przypadku bลฤdu",fc_nav_on_error_block:"Zablokuj โ pozostaล na tym kroku",fc_nav_on_error_continue:"Kontynuuj โ oceล reguลy mimo to",fc_nav_on_error_goto:"Przejdลบ do: {{step}}",fc_nav_on_error_summary:"Przejdลบ do: Podsumowanie",fc_nav_on_error_hint:"Co siฤ dzieje, jeลli wywoลanie siฤ nie powiedzie lub sieฤ padnie.",fc_nav_continue_button:"Przycisk kontynuacji",fc_nav_continue_placeholder:"Kontynuuj",fc_nav_rules:"Reguลy nawigacji",fc_nav_add_rule:"Dodaj reguลฤ",fc_nav_rules_hint:'Reguลy oceniane po kolei. Wygrywa pierwsza. Uลผyj "zawsze" jako ostatniej.',fc_nav_rule_n:"Reguลa {{n}}",fc_nav_has_condition:"Ma warunek",fc_nav_go_to:"Przejdลบ do",fc_nav_submit_form:"โ Wyลlij formularz โ",fc_nav_field_requires_value:'Pole "{{label}}" wymaga wartoลci.',fc_summary_panel:"Panel podsumowania",fc_summary_title_label:"Tytuล podsumowania",fc_summary_show_sidebar:"Pokaลผ podsumowanie na ลผywo",fc_summary_show_sidebar_hint:"Wyลwietla panel podsumowania, gdy uลผytkownik przechodzi przez ลcieลผkฤ.",fc_summary_sections:"Sekcje",fc_summary_add_section:"Dodaj sekcjฤ",fc_summary_section_title_placeholder:"Tytuล sekcji",fc_summary_visible_from:"Widoczna od kroku",fc_summary_until_step:"Do kroku (opcjonalne)",fc_summary_all_steps:"Wszystkie kroki",fc_summary_step_n:"Krok {{n}}",fc_summary_display_fields:"Pola do wyลwietlenia",fc_summary_add:"Dodaj",fc_summary_no_display_fields:"Brak pรณl do wyลwietlenia.",fc_summary_no_sections:"Brak sekcji.",fc_summary_confirm_delete_section:"Usunฤ
ฤ tฤ sekcjฤ?",fc_summary_source:"ลนrรณdลo",fc_summary_source_form_field:"Pole formularza",fc_summary_source_api_response:"Odpowiedลบ API",fc_summary_format:"Format",fc_summary_format_text:"Tekst",fc_summary_format_number:"Liczba",fc_summary_format_currency:"Waluta",fc_summary_format_date:"Data",fc_summary_format_datetime:"Data i godzina",fc_summary_display_label:"Etykieta",fc_summary_display_label_placeholder:"Etykieta do wyลwietlenia",fc_summary_field:"Pole",fc_summary_select:"Wybierzโฆ",fc_summary_from_step_api:"Z API kroku",fc_summary_response_path:"ลcieลผka odpowiedzi (notacja z kropkami)",fc_fields_catalog:"Katalog pรณl",fc_fields_catalog_hint:"Wszystkie pola uลผywane w formularzu. Edycja tutaj aktualizuje wszฤdzie.",fc_fields_add:"Dodaj pole",fc_fields_search:"Szukaj pรณlโฆ",fc_fields_filter_all:"Wszystkie",fc_fields_filter_used:"Uลผywane",fc_fields_filter_unused:"Nieuลผywane",fc_fields_unused_badge:"Nieuลผywane",fc_fields_used_in_one:"Uลผywane w {{count}} kroku",fc_fields_used_in_many:"Uลผywane w {{count}} krokach",fc_fields_go_to_step:'Przejdลบ do kroku "{{title}}"',fc_fields_no_fields:"Brak pรณl.",fc_fields_no_match:"ลปadne pole nie pasuje do filtra.",fc_fields_confirm_delete:"Usunฤ
ฤ to pole?",fc_init_title:"Wartoลci poczฤ
tkowe",fc_init_subtitle:"Statyczne odpowiedzi wstฤpnie wczytane do runnera przed rozpoczฤciem.",fc_init_static:"Wartoลci statyczne",fc_init_add:"Dodaj",fc_init_no_values:"Brak wartoลci poczฤ
tkowych.",fc_init_prefill:"Wstฤpne wypeลnienie z API",fc_init_prefill_hint:"Pobierz odpowiedzi z endpointu przy montowaniu runnera.",fc_init_mapping:"Mapowanie (JSON: namespace โ response_path)",fc_json_title:"JSON",fc_json_hint:"Surowy JourneySpec (form_config + theme). Edytuj i kliknij Zastosuj, aby zaktualizowaฤ konfigurator.",fc_json_refresh:"Wczytaj z konfiguratora",fc_json_refresh_hint:"Odrzuฤ zmiany w JSON i wczytaj ponownie aktualny stan konfiguratora",fc_json_copy:"Kopiuj",fc_json_download:"Pobierz",fc_json_import:"Zastosuj zmiany",fc_json_apply_hint:"Zastosuj zmiany JSON w konfiguratorze",fc_json_imported_ok:"Zaimportowano pomyลlnie",fc_json_copied:"Skopiowano do schowka",fc_json_invalid:"Nieprawidลowy JSON",fc_json_upload:"Przeลlij plik",fc_json_file_error:"Nie udaลo siฤ odczytaฤ pliku.",fc_create_field_title:"Dodaj pole",fc_create_field_subtitle:"Wybierz z katalogu lub utwรณrz pole niestandardowe.",fc_create_from_catalog:"Z katalogu ({{count}})",fc_create_custom:"Pole niestandardowe",fc_create_search_specs:"Szukaj specsโฆ",fc_create_no_specs:"Brak pasujฤ
cych specs.",fc_create_label_required:"Etykieta *",fc_create_label_placeholder:"np. Nazwa klienta",fc_create_namespace:"Namespace",fc_create_namespace_placeholder:"np. customer.name (automatycznie jeลli puste)",fc_create_schema:"Schema",fc_create_options:"Opcje",fc_create_option_value_placeholder:"wartoลฤ",fc_create_option_label_placeholder:"Etykieta",fc_create_cancel:"Anuluj",fc_create_create:"Utwรณrz",fc_field_props:"Wลaลciwoลci pola",fc_field_no_selected:"Nie wybrano pola.",fc_field_label:"Etykieta *",fc_field_namespace:"Namespace",fc_field_placeholder:"Placeholder",fc_field_help:"Tekst pomocy",fc_field_required:"Wymagane",fc_field_required_hint:"Uลผytkownik musi wypeลniฤ przed kontynuacjฤ
.",fc_field_actor:"Aktor",fc_field_actor_customer:"Klient",fc_field_actor_operator:"Operator",fc_field_widget:"Widget",fc_field_widget_auto:"Automatyczny",fc_field_widget_text:"Tekst",fc_field_widget_textarea:"Pole tekstowe",fc_field_widget_select:"Lista",fc_field_widget_radio:"Radio",fc_field_widget_date:"Data",fc_field_widget_time:"Godzina",fc_field_widget_datetime:"Data i godzina",fc_field_widget_currency:"Waluta",fc_field_widget_upload:"Zaลฤ
cznik",fc_field_widget_email:"Email",fc_field_widget_phone:"Telefon",fc_field_widget_location:"Lokalizacja",fc_field_widget_boolean:"Boolean (Tak/Nie)",fc_field_allow_future:"Zezwรณl na przyszลe daty",fc_field_allow_future_hint:"Zezwรณl na daty po dzisiejszej.",fc_field_display_style:"Styl wyลwietlania",fc_field_display_auto:"Auto (radio โค5, dropdown >5)",fc_field_display_radio:"Lista radio",fc_field_display_radio_horizontal:"Lista radio pozioma",fc_field_display_dropdown:"Dropdown",fc_field_display_segmented:"Przyciski segmentowane",fc_field_display_hint:"Kontroluje wyglฤ
d opcji w runtime.",fc_field_display_switch:"Switch (przeลฤ
cznik)",fc_field_display_yesno:"Segmentowany (przyciski Tak / Nie)",fc_field_boolean_hint:"Nadpisz etykiety Tak/Nie dodajฤ
c 2 opcje poniลผej (pierwsza = true, druga = false).",fc_field_options:"Opcje",fc_field_no_options:"Brak opcji.",fc_field_upload_validation:"Walidacja zaลฤ
cznika",fc_field_upload_accept:"Akceptowane typy MIME/rozszerzenia",fc_field_upload_max:"Maksymalny rozmiar (MB)",fc_field_dynamic_rules:"Reguลy dynamiczne",fc_field_dynamic_rules_hint:"Pokazuj, wลฤ
czaj lub wymagaj tego pola na podstawie innych odpowiedzi.",fc_field_visible_when:"Pokaลผ gdy",fc_field_visible_when_hint:"Gdy warunek jest faลszywy, pole jest ukrywane, a jego wartoลฤ czyszczona.",fc_field_enabled_when:"Wลฤ
cz gdy",fc_field_enabled_when_hint:"Gdy warunek jest faลszywy, pole jest pokazywane tylko do odczytu.",fc_field_required_when:"Wymagane gdy",fc_field_required_when_hint:'Zastฤpuje statyczne ustawienie "Wymagane", gdy pole jest widoczne.',fc_field_always_visible:"Zawsze widoczne",fc_field_always_enabled:"Zawsze wลฤ
czone",fc_field_required_static:'Uลผyj statycznego ustawienia "Wymagane"',fc_field_rule_active:"Reguลa aktywna",fc_field_computed:"Wartoลฤ obliczana",fc_field_computed_hint:"Obliczaj to pole automatycznie na podstawie innych pรณl. Wynik jest tylko do odczytu.",fc_field_width:"Szerokoลฤ pola",fc_field_width_hint:"Szerokoลฤ w wierszu poziomym (na mobilnych zawsze peลna szerokoลฤ).",fc_field_width_auto:"Automatyczna (podziaล wiersza)",fc_field_width_full:"Peลna (3/3)",fc_field_computed_operation:"Operacja",fc_field_computed_op_sum:"Suma (+)",fc_field_computed_op_subtract:"Odejmowanie (โ)",fc_field_computed_op_multiply:"Mnoลผenie (ร)",fc_field_computed_op_divide:"Dzielenie (รท)",fc_field_computed_precision:"Miejsca dziesiฤtne",fc_field_computed_operands:"Pola operandรณw",fc_field_computed_add_operand:"Dodaj poleโฆ",fc_field_computed_missing_operand:"(pole nie znalezione)",fc_field_computed_no_fields:"Brak innych pรณl dostฤpnych jako operandy.",fc_field_computed_all_added:"Wszystkie dostฤpne pola zostaลy juลผ dodane.",fc_field_delete:"Usuล pole",fc_field_done:"Gotowe",fc_field_confirm_delete:"Usunฤ
ฤ to pole z katalogu (i ze wszystkich wierszy, ktรณre go uลผywajฤ
)?",theme_button:"Motyw",theme_reset:"Resetuj",theme_colors:"Kolory",theme_primary:"Podstawowy",theme_background:"Tลo",theme_card:"Karta",theme_foreground:"Tekst",theme_color_picker_aria:"Wybรณr koloru {{label}}",theme_color_placeholder:"np. 222 47% 11%",theme_color_hint:"Wybierz kolor lub wpisz triplet HSL",theme_typography:"Typografia",theme_heading_font:"Czcionka nagลรณwkรณw",theme_body_font:"Czcionka treลci",theme_font_default:"Domyลlna",theme_font_size:"Bazowy rozmiar czcionki (px)",theme_shape_spacing:"Ksztaลt i odstฤpy",theme_border_radius:"Promieล zaokrฤ
glenia (rem)",theme_spacing:"Odstฤpy",theme_spacing_cozy_default:"Komfortowe (domyลlne)",theme_spacing_compact:"Kompaktowe",theme_spacing_cozy:"Komfortowe",theme_spacing_spacious:"Przestronne",theme_live_preview:"Podglฤ
d na ลผywo",theme_heading_sample:"Przykลadowy nagลรณwek",theme_body_sample:"Zaลผรณลฤ gฤลlฤ
jaลบล. Tekst treลci uลผywa wybranej czcionki, rozmiaru i odstฤpรณw.",theme_input_sample:"Przykลadowe pole",theme_primary_action:"Akcja podstawowa",runner_toast_required_fields:"Wypeลnij wymagane pola.",runner_toast_api_failed:"Wywoลanie API nie powiodลo siฤ.",runner_toast_answers_copied:"Odpowiedzi skopiowane do schowka!",runner_toast_partial_saved:"Czฤลciowe odpowiedzi zapisane (zalogowane).",runner_toast_file_uploaded:"Przesลano {{name}} dla {{key}}",runner_loading_preview:"ลadowanie podglฤ
duโฆ",runner_no_form:"Nie skonfigurowano formularza.",runner_back_to_builder:"Wrรณฤ do kreatora",runner_preset_full:"Peลny",runner_iframe_title:"Podglฤ
d formularza",import_invalid_json:"Nieprawidลowy JSON: nie moลผna przeanalizowaฤ danych.",import_success:"Journey zaimportowana pomyลlnie",import_clipboard_failed:"Nie moลผna odczytaฤ schowka",shortcut_selected_nodes_one:"Zaznaczono {{count}} wฤzeล",shortcut_selected_nodes_other:"Zaznaczono {{count}} wฤzลรณw",shortcut_deleted:"Usuniฤto",shortcut_undo:"Cofnij",shortcut_redo:"Ponรณw",shortcut_copied:"Skopiowano do schowka",shortcut_pasted:"Wklejono",shortcut_duplicated:"Zduplikowano"},rc={en:Ja,es:Wg,pt:Fg,pl:$g},zs="language",Er="en";function Lg(){try{return localStorage.getItem(zs)||Er}catch{return Er}}let Sr=[],Is=Lg();function Bg(e){return Sr.push(e),()=>{Sr=Sr.filter(t=>t!==e)}}function Hg(){return Is}function Ed(e){try{localStorage.setItem(zs,e)}catch{}Is=e,Sr.forEach(t=>t())}typeof window<"u"&&window.addEventListener("storage",e=>{e.key===zs&&(Is=e.newValue||Er,Sr.forEach(t=>t()))});function we(){const e=v.useSyncExternalStore(Bg,Hg,()=>Er),t=rc[e]||rc[Er]||Ja;return{t:v.useCallback((r,o)=>{let a=t[r]??Ja[r]??r;if(o)for(const[i,c]of Object.entries(o))a=a.replace(new RegExp(`\\{\\{${i}\\}\\}`,"g"),String(c));return a},[t]),language:e,setLanguage:Ed}}function qg(e,t=globalThis==null?void 0:globalThis.document){const n=rt(e);_.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Yg="DismissableLayer",Qa="dismissableLayer.update",Vg="dismissableLayer.pointerDownOutside",Gg="dismissableLayer.focusOutside",oc,Md=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Yo=_.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:c,...l}=e,d=_.useContext(Md),[u,m]=_.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=_.useState({}),g=ve(t,C=>m(C)),h=Array.from(d.layers),[j]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),x=h.indexOf(j),b=u?h.indexOf(u):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,N=b>=x,S=Kg(C=>{const E=C.target,P=[...d.branches].some(k=>k.contains(E));!N||P||(o==null||o(C),i==null||i(C),C.defaultPrevented||c==null||c())},f),y=Jg(C=>{const E=C.target;[...d.branches].some(k=>k.contains(E))||(a==null||a(C),i==null||i(C),C.defaultPrevented||c==null||c())},f);return qg(C=>{b===d.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&c&&(C.preventDefault(),c()))},f),_.useEffect(()=>{if(u)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(oc=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),ac(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=oc)}},[u,f,n,d]),_.useEffect(()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),ac())},[u,d]),_.useEffect(()=>{const C=()=>p({});return document.addEventListener(Qa,C),()=>document.removeEventListener(Qa,C)},[]),s.jsx(le.div,{...l,ref:g,style:{pointerEvents:w?N?"auto":"none":void 0,...e.style},onFocusCapture:se(e.onFocusCapture,y.onFocusCapture),onBlurCapture:se(e.onBlurCapture,y.onBlurCapture),onPointerDownCapture:se(e.onPointerDownCapture,S.onPointerDownCapture)})});Yo.displayName=Yg;var Ug="DismissableLayerBranch",Xg=_.forwardRef((e,t)=>{const n=_.useContext(Md),r=_.useRef(null),o=ve(t,r);return _.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),s.jsx(le.div,{...e,ref:o})});Xg.displayName=Ug;function Kg(e,t=globalThis==null?void 0:globalThis.document){const n=rt(e),r=_.useRef(!1),o=_.useRef(()=>{});return _.useEffect(()=>{const a=c=>{if(c.target&&!r.current){let l=function(){Dd(Vg,n,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Jg(e,t=globalThis==null?void 0:globalThis.document){const n=rt(e),r=_.useRef(!1);return _.useEffect(()=>{const o=a=>{a.target&&!r.current&&Dd(Gg,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ac(){const e=new CustomEvent(Qa);document.dispatchEvent(e)}function Dd(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?e_(o,a):o.dispatchEvent(a)}var Pa="focusScope.autoFocusOnMount",Ea="focusScope.autoFocusOnUnmount",sc={bubbles:!1,cancelable:!0},Qg="FocusScope",Vo=_.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[c,l]=_.useState(null),d=rt(o),u=rt(a),m=_.useRef(null),f=ve(t,h=>l(h)),p=_.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;_.useEffect(()=>{if(r){let h=function(w){if(p.paused||!c)return;const N=w.target;c.contains(N)?m.current=N:mn(m.current,{select:!0})},j=function(w){if(p.paused||!c)return;const N=w.relatedTarget;N!==null&&(c.contains(N)||mn(m.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const S of w)S.removedNodes.length>0&&mn(c)};document.addEventListener("focusin",h),document.addEventListener("focusout",j);const b=new MutationObserver(x);return c&&b.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",j),b.disconnect()}}},[r,c,p.paused]),_.useEffect(()=>{if(c){cc.add(p);const h=document.activeElement;if(!c.contains(h)){const x=new CustomEvent(Pa,sc);c.addEventListener(Pa,d),c.dispatchEvent(x),x.defaultPrevented||(Zg(oj(Td(c)),{select:!0}),document.activeElement===h&&mn(c))}return()=>{c.removeEventListener(Pa,d),setTimeout(()=>{const x=new CustomEvent(Ea,sc);c.addEventListener(Ea,u),c.dispatchEvent(x),x.defaultPrevented||mn(h??document.body,{select:!0}),c.removeEventListener(Ea,u),cc.remove(p)},0)}}},[c,d,u,p]);const g=_.useCallback(h=>{if(!n&&!r||p.paused)return;const j=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,x=document.activeElement;if(j&&x){const b=h.currentTarget,[w,N]=ej(b);w&&N?!h.shiftKey&&x===N?(h.preventDefault(),n&&mn(w,{select:!0})):h.shiftKey&&x===w&&(h.preventDefault(),n&&mn(N,{select:!0})):x===b&&h.preventDefault()}},[n,r,p.paused]);return s.jsx(le.div,{tabIndex:-1,...i,ref:f,onKeyDown:g})});Vo.displayName=Qg;function Zg(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(mn(r,{select:t}),document.activeElement!==n)return}function ej(e){const t=Td(e),n=ic(t,e),r=ic(t.reverse(),e);return[n,r]}function Td(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ic(e,t){for(const n of e)if(!tj(n,{upTo:t}))return n}function tj(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 nj(e){return e instanceof HTMLInputElement&&"select"in e}function mn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&nj(e)&&t&&e.select()}}var cc=rj();function rj(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=lc(e,t),e.unshift(t)},remove(t){var n;e=lc(e,t),(n=e[0])==null||n.resume()}}}function lc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function oj(e){return e.filter(t=>t.tagName!=="A")}var aj="Portal",Go=_.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[o,a]=_.useState(!1);Je(()=>a(!0),[]);const i=n||o&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return i?ws.createPortal(s.jsx(le.div,{...r,ref:t}),i):null});Go.displayName=aj;var Ma=0;function Ws(){_.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??dc()),document.body.insertAdjacentElement("beforeend",e[1]??dc()),Ma++,()=>{Ma===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ma--}},[])}function dc(){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 At=function(){return At=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},At.apply(this,arguments)};function Rd(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function sj(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var uo="right-scroll-bar-position",fo="width-before-scroll-bar",ij="with-scroll-bars-hidden",cj="--removed-body-scroll-bar-size";function Da(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function lj(e,t){var n=v.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var dj=typeof window<"u"?_.useLayoutEffect:_.useEffect,uc=new WeakMap;function uj(e,t){var n=lj(null,function(r){return e.forEach(function(o){return Da(o,r)})});return dj(function(){var r=uc.get(n);if(r){var o=new Set(r),a=new Set(e),i=n.current;o.forEach(function(c){a.has(c)||Da(c,null)}),a.forEach(function(c){o.has(c)||Da(c,i)})}uc.set(n,e)},[e]),n}function fj(e){return e}function mj(e,t){t===void 0&&(t=fj);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var i=t(a,r);return n.push(i),function(){n=n.filter(function(c){return c!==i})}},assignSyncMedium:function(a){for(r=!0;n.length;){var i=n;n=[],i.forEach(a)}n={push:function(c){return a(c)},filter:function(){return n}}},assignMedium:function(a){r=!0;var i=[];if(n.length){var c=n;n=[],c.forEach(a),i=n}var l=function(){var u=i;i=[],u.forEach(a)},d=function(){return Promise.resolve().then(l)};d(),n={push:function(u){i.push(u),d()},filter:function(u){return i=i.filter(u),n}}}};return o}function pj(e){e===void 0&&(e={});var t=mj(null);return t.options=At({async:!0,ssr:!1},e),t}var Od=function(e){var t=e.sideCar,n=Rd(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return _.createElement(r,At({},n))};Od.isSideCarExport=!0;function hj(e,t){return e.useMedium(t),Od}var Ad=pj(),Ta=function(){},Uo=_.forwardRef(function(e,t){var n=_.useRef(null),r=_.useState({onScrollCapture:Ta,onWheelCapture:Ta,onTouchMoveCapture:Ta}),o=r[0],a=r[1],i=e.forwardProps,c=e.children,l=e.className,d=e.removeScrollBar,u=e.enabled,m=e.shards,f=e.sideCar,p=e.noRelative,g=e.noIsolation,h=e.inert,j=e.allowPinchZoom,x=e.as,b=x===void 0?"div":x,w=e.gapMode,N=Rd(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,y=uj([n,t]),C=At(At({},N),o);return _.createElement(_.Fragment,null,u&&_.createElement(S,{sideCar:Ad,removeScrollBar:d,shards:m,noRelative:p,noIsolation:g,inert:h,setCallbacks:a,allowPinchZoom:!!j,lockRef:n,gapMode:w}),i?_.cloneElement(_.Children.only(c),At(At({},C),{ref:y})):_.createElement(b,At({},C,{className:l,ref:y}),c))});Uo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Uo.classNames={fullWidth:fo,zeroRight:uo};var _j=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function gj(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=_j();return t&&e.setAttribute("nonce",t),e}function jj(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function yj(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var vj=function(){var e=0,t=null;return{add:function(n){e==0&&(t=gj())&&(jj(t,n),yj(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},xj=function(){var e=vj();return function(t,n){_.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},zd=function(){var e=xj(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},bj={left:0,top:0,right:0,gap:0},Ra=function(e){return parseInt(e||"",10)||0},wj=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ra(n),Ra(r),Ra(o)]},Nj=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return bj;var t=wj(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Sj=zd(),Qn="data-scroll-locked",Cj=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
248
|
-
.`.concat(
|
|
247
|
+
*/const Xl=ue("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),$o=y.createContext(null);$o.displayName="PanelGroupContext";const Be={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Ms=10,Tn=y.useLayoutEffect,Ki=g.useId,Q_=typeof Ki=="function"?Ki:()=>null;let Z_=0;function Ds(e=null){const t=Q_(),n=y.useRef(e||t||null);return n.current===null&&(n.current=""+Z_++),e??n.current}function Kl({children:e,className:t="",collapsedSize:n,collapsible:r,defaultSize:o,forwardedRef:a,id:i,maxSize:c,minSize:l,onCollapse:d,onExpand:u,onResize:p,order:f,style:m,tagName:_="div",...h}){const j=y.useContext($o);if(j===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:v,expandPanel:b,getPanelSize:w,getPanelStyle:N,groupId:S,isPanelCollapsed:x,reevaluatePanelConstraints:C,registerPanel:E,resizePanel:M,unregisterPanel:P}=j,T=Ds(i),k=y.useRef({callbacks:{onCollapse:d,onExpand:u,onResize:p},constraints:{collapsedSize:n,collapsible:r,defaultSize:o,maxSize:c,minSize:l},id:T,idIsFromProps:i!==void 0,order:f});y.useRef({didLogMissingDefaultSizeWarning:!1}),Tn(()=>{const{callbacks:D,constraints:W}=k.current,O={...W};k.current.id=T,k.current.idIsFromProps=i!==void 0,k.current.order=f,D.onCollapse=d,D.onExpand=u,D.onResize=p,W.collapsedSize=n,W.collapsible=r,W.defaultSize=o,W.maxSize=c,W.minSize=l,(O.collapsedSize!==W.collapsedSize||O.collapsible!==W.collapsible||O.maxSize!==W.maxSize||O.minSize!==W.minSize)&&C(k.current,O)}),Tn(()=>{const D=k.current;return E(D),()=>{P(D)}},[f,T,E,P]),y.useImperativeHandle(a,()=>({collapse:()=>{v(k.current)},expand:D=>{b(k.current,D)},getId(){return T},getSize(){return w(k.current)},isCollapsed(){return x(k.current)},isExpanded(){return!x(k.current)},resize:D=>{M(k.current,D)}}),[v,b,w,x,T,M]);const z=N(k.current,o);return y.createElement(_,{...h,children:e,className:t,id:T,style:{...z,...m},[Be.groupId]:S,[Be.panel]:"",[Be.panelCollapsible]:r||void 0,[Be.panelId]:T,[Be.panelSize]:parseFloat(""+z.flexGrow).toFixed(1)})}const Jl=y.forwardRef((e,t)=>y.createElement(Kl,{...e,forwardedRef:t}));Kl.displayName="Panel";Jl.displayName="forwardRef(Panel)";let Ka=null,lo=-1,pn=null;function eg(e,t){if(t){const n=(t&nd)!==0,r=(t&rd)!==0,o=(t&od)!==0,a=(t&ad)!==0;if(n)return o?"se-resize":a?"ne-resize":"e-resize";if(r)return o?"sw-resize":a?"nw-resize":"w-resize";if(o)return"s-resize";if(a)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function tg(){pn!==null&&(document.head.removeChild(pn),Ka=null,pn=null,lo=-1)}function wa(e,t){var n,r;const o=eg(e,t);if(Ka!==o){if(Ka=o,pn===null&&(pn=document.createElement("style"),document.head.appendChild(pn)),lo>=0){var a;(a=pn.sheet)===null||a===void 0||a.removeRule(lo)}lo=(n=(r=pn.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${o} !important;}`))!==null&&n!==void 0?n:-1}}function Ql(e){return e.type==="keydown"}function Zl(e){return e.type.startsWith("pointer")}function ed(e){return e.type.startsWith("mouse")}function Lo(e){if(Zl(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(ed(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function ng(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function rg(e,t,n){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function og(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:Zi(e),b:Zi(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;ye(r,"Stacking order can only be calculated for elements with a common ancestor");const o={a:Qi(Ji(n.a)),b:Qi(Ji(n.b))};if(o.a===o.b){const a=r.childNodes,i={a:n.a.at(-1),b:n.b.at(-1)};let c=a.length;for(;c--;){const l=a[c];if(l===i.a)return 1;if(l===i.b)return-1}}return Math.sign(o.a-o.b)}const ag=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function sg(e){var t;const n=getComputedStyle((t=td(e))!==null&&t!==void 0?t:e).display;return n==="flex"||n==="inline-flex"}function ig(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||sg(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||ag.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function Ji(e){let t=e.length;for(;t--;){const n=e[t];if(ye(n,"Missing node"),ig(n))return n}return null}function Qi(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Zi(e){const t=[];for(;e;)t.push(e),e=td(e);return t}function td(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const nd=1,rd=2,od=4,ad=8,cg=ng()==="coarse";let Pt=[],Jn=!1,En=new Map,Bo=new Map;const kr=new Set;function lg(e,t,n,r,o){var a;const{ownerDocument:i}=t,c={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:o},l=(a=En.get(i))!==null&&a!==void 0?a:0;return En.set(i,l+1),kr.add(c),go(),function(){var u;Bo.delete(e),kr.delete(c);const p=(u=En.get(i))!==null&&u!==void 0?u:1;if(En.set(i,p-1),go(),p===1&&En.delete(i),Pt.includes(c)){const f=Pt.indexOf(c);f>=0&&Pt.splice(f,1),Rs(),o("up",!0,null)}}}function dg(e){const{target:t}=e,{x:n,y:r}=Lo(e);Jn=!0,Ts({target:t,x:n,y:r}),go(),Pt.length>0&&(jo("down",e),e.preventDefault(),sd(t)||e.stopImmediatePropagation())}function Na(e){const{x:t,y:n}=Lo(e);if(Jn&&e.buttons===0&&(Jn=!1,jo("up",e)),!Jn){const{target:r}=e;Ts({target:r,x:t,y:n})}jo("move",e),Rs(),Pt.length>0&&e.preventDefault()}function Sa(e){const{target:t}=e,{x:n,y:r}=Lo(e);Bo.clear(),Jn=!1,Pt.length>0&&(e.preventDefault(),sd(t)||e.stopImmediatePropagation()),jo("up",e),Ts({target:t,x:n,y:r}),Rs(),go()}function sd(e){let t=e;for(;t;){if(t.hasAttribute(Be.resizeHandle))return!0;t=t.parentElement}return!1}function Ts({target:e,x:t,y:n}){Pt.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),kr.forEach(o=>{const{element:a,hitAreaMargins:i}=o,c=a.getBoundingClientRect(),{bottom:l,left:d,right:u,top:p}=c,f=cg?i.coarse:i.fine;if(t>=d-f&&t<=u+f&&n>=p-f&&n<=l+f){if(r!==null&&document.contains(r)&&a!==r&&!a.contains(r)&&!r.contains(a)&&og(r,a)>0){let _=r,h=!1;for(;_&&!_.contains(a);){if(rg(_.getBoundingClientRect(),c)){h=!0;break}_=_.parentElement}if(h)return}Pt.push(o)}})}function Ca(e,t){Bo.set(e,t)}function Rs(){let e=!1,t=!1;Pt.forEach(r=>{const{direction:o}=r;o==="horizontal"?e=!0:t=!0});let n=0;Bo.forEach(r=>{n|=r}),e&&t?wa("intersection",n):e?wa("horizontal",n):t?wa("vertical",n):tg()}let ka=new AbortController;function go(){ka.abort(),ka=new AbortController;const e={capture:!0,signal:ka.signal};kr.size&&(Jn?(Pt.length>0&&En.forEach((t,n)=>{const{body:r}=n;t>0&&(r.addEventListener("contextmenu",Sa,e),r.addEventListener("pointerleave",Na,e),r.addEventListener("pointermove",Na,e))}),window.addEventListener("pointerup",Sa,e),window.addEventListener("pointercancel",Sa,e)):En.forEach((t,n)=>{const{body:r}=n;t>0&&(r.addEventListener("pointerdown",dg,e),r.addEventListener("pointermove",Na,e))}))}function jo(e,t){kr.forEach(n=>{const{setResizeHandlerState:r}=n,o=Pt.includes(n);r(e,o,t)})}function ug(){const[e,t]=y.useState(0);return y.useCallback(()=>t(n=>n+1),[])}function ye(e,t){if(!e)throw console.error(t),Error(t)}function Rn(e,t,n=Ms){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function Jt(e,t,n=Ms){return Rn(e,t,n)===0}function dt(e,t,n){return Rn(e,t,n)===0}function fg(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const o=e[r],a=t[r];if(!dt(o,a,n))return!1}return!0}function Xn({panelConstraints:e,panelIndex:t,size:n}){const r=e[t];ye(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:o=0,collapsible:a,maxSize:i=100,minSize:c=0}=r;if(Rn(n,c)<0)if(a){const l=(o+c)/2;Rn(n,l)<0?n=o:n=c}else n=c;return n=Math.min(i,n),n=parseFloat(n.toFixed(Ms)),n}function xr({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:o,trigger:a}){if(dt(e,0))return t;const i=[...t],[c,l]=r;ye(c!=null,"Invalid first pivot index"),ye(l!=null,"Invalid second pivot index");let d=0;if(a==="keyboard"){{const p=e<0?l:c,f=n[p];ye(f,`Panel constraints not found for index ${p}`);const{collapsedSize:m=0,collapsible:_,minSize:h=0}=f;if(_){const j=t[p];if(ye(j!=null,`Previous layout not found for panel index ${p}`),dt(j,m)){const v=h-j;Rn(v,Math.abs(e))>0&&(e=e<0?0-v:v)}}}{const p=e<0?c:l,f=n[p];ye(f,`No panel constraints found for index ${p}`);const{collapsedSize:m=0,collapsible:_,minSize:h=0}=f;if(_){const j=t[p];if(ye(j!=null,`Previous layout not found for panel index ${p}`),dt(j,h)){const v=j-m;Rn(v,Math.abs(e))>0&&(e=e<0?0-v:v)}}}}{const p=e<0?1:-1;let f=e<0?l:c,m=0;for(;;){const h=t[f];ye(h!=null,`Previous layout not found for panel index ${f}`);const v=Xn({panelConstraints:n,panelIndex:f,size:100})-h;if(m+=v,f+=p,f<0||f>=n.length)break}const _=Math.min(Math.abs(e),Math.abs(m));e=e<0?0-_:_}{let f=e<0?c:l;for(;f>=0&&f<n.length;){const m=Math.abs(e)-Math.abs(d),_=t[f];ye(_!=null,`Previous layout not found for panel index ${f}`);const h=_-m,j=Xn({panelConstraints:n,panelIndex:f,size:h});if(!dt(_,j)&&(d+=_-j,i[f]=j,d.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?f--:f++}}if(fg(o,i))return o;{const p=e<0?l:c,f=t[p];ye(f!=null,`Previous layout not found for panel index ${p}`);const m=f+d,_=Xn({panelConstraints:n,panelIndex:p,size:m});if(i[p]=_,!dt(_,m)){let h=m-_,v=e<0?l:c;for(;v>=0&&v<n.length;){const b=i[v];ye(b!=null,`Previous layout not found for panel index ${v}`);const w=b+h,N=Xn({panelConstraints:n,panelIndex:v,size:w});if(dt(b,N)||(h-=N-b,i[v]=N),dt(h,0))break;e>0?v--:v++}}}const u=i.reduce((p,f)=>f+p,0);return dt(u,100)?i:o}function mg({layout:e,panelsArray:t,pivotIndices:n}){let r=0,o=100,a=0,i=0;const c=n[0];ye(c!=null,"No pivot index found"),t.forEach((p,f)=>{const{constraints:m}=p,{maxSize:_=100,minSize:h=0}=m;f===c?(r=h,o=_):(a+=h,i+=_)});const l=Math.min(o,100-a),d=Math.max(r,100-i),u=e[c];return{valueMax:l,valueMin:d,valueNow:u}}function Pr(e,t=document){return Array.from(t.querySelectorAll(`[${Be.resizeHandleId}][data-panel-group-id="${e}"]`))}function id(e,t,n=document){const o=Pr(e,n).findIndex(a=>a.getAttribute(Be.resizeHandleId)===t);return o??null}function cd(e,t,n){const r=id(e,t,n);return r!=null?[r,r+1]:[-1,-1]}function ld(e,t=document){var n;if(t instanceof HTMLElement&&(t==null||(n=t.dataset)===null||n===void 0?void 0:n.panelGroupId)==e)return t;const r=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return r||null}function Ho(e,t=document){const n=t.querySelector(`[${Be.resizeHandleId}="${e}"]`);return n||null}function pg(e,t,n,r=document){var o,a,i,c;const l=Ho(t,r),d=Pr(e,r),u=l?d.indexOf(l):-1,p=(o=(a=n[u])===null||a===void 0?void 0:a.id)!==null&&o!==void 0?o:null,f=(i=(c=n[u+1])===null||c===void 0?void 0:c.id)!==null&&i!==void 0?i:null;return[p,f]}function hg({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:o,panelGroupElement:a,setLayout:i}){y.useRef({didWarnAboutMissingResizeHandle:!1}),Tn(()=>{if(!a)return;const c=Pr(n,a);for(let l=0;l<o.length-1;l++){const{valueMax:d,valueMin:u,valueNow:p}=mg({layout:r,panelsArray:o,pivotIndices:[l,l+1]}),f=c[l];if(f!=null){const m=o[l];ye(m,`No panel data found for index "${l}"`),f.setAttribute("aria-controls",m.id),f.setAttribute("aria-valuemax",""+Math.round(d)),f.setAttribute("aria-valuemin",""+Math.round(u)),f.setAttribute("aria-valuenow",p!=null?""+Math.round(p):"")}}return()=>{c.forEach((l,d)=>{l.removeAttribute("aria-controls"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuenow")})}},[n,r,o,a]),y.useEffect(()=>{if(!a)return;const c=t.current;ye(c,"Eager values not found");const{panelDataArray:l}=c,d=ld(n,a);ye(d!=null,`No group found for id "${n}"`);const u=Pr(n,a);ye(u,`No resize handles found for group id "${n}"`);const p=u.map(f=>{const m=f.getAttribute(Be.resizeHandleId);ye(m,"Resize handle element has no handle id attribute");const[_,h]=pg(n,m,l,a);if(_==null||h==null)return()=>{};const j=v=>{if(!v.defaultPrevented)switch(v.key){case"Enter":{v.preventDefault();const b=l.findIndex(w=>w.id===_);if(b>=0){const w=l[b];ye(w,`No panel data found for index ${b}`);const N=r[b],{collapsedSize:S=0,collapsible:x,minSize:C=0}=w.constraints;if(N!=null&&x){const E=xr({delta:dt(N,S)?C-S:S-N,initialLayout:r,panelConstraints:l.map(M=>M.constraints),pivotIndices:cd(n,m,a),prevLayout:r,trigger:"keyboard"});r!==E&&i(E)}}break}}};return f.addEventListener("keydown",j),()=>{f.removeEventListener("keydown",j)}});return()=>{p.forEach(f=>f())}},[a,e,t,n,r,o,i])}function ec(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function dd(e,t){const n=e==="horizontal",{x:r,y:o}=Lo(t);return n?r:o}function _g(e,t,n,r,o){const a=n==="horizontal",i=Ho(t,o);ye(i,`No resize handle element found for id "${t}"`);const c=i.getAttribute(Be.groupId);ye(c,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=r;const d=dd(n,e),u=ld(c,o);ye(u,`No group element found for id "${c}"`);const p=u.getBoundingClientRect(),f=a?p.width:p.height;return(d-l)/f*100}function gg(e,t,n,r,o,a){if(Ql(e)){const i=n==="horizontal";let c=0;e.shiftKey?c=100:o!=null?c=o:c=10;let l=0;switch(e.key){case"ArrowDown":l=i?0:c;break;case"ArrowLeft":l=i?-c:0;break;case"ArrowRight":l=i?c:0;break;case"ArrowUp":l=i?0:-c;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return r==null?0:_g(e,t,n,r,a)}function jg({panelDataArray:e}){const t=Array(e.length),n=e.map(a=>a.constraints);let r=0,o=100;for(let a=0;a<e.length;a++){const i=n[a];ye(i,`Panel constraints not found for index ${a}`);const{defaultSize:c}=i;c!=null&&(r++,t[a]=c,o-=c)}for(let a=0;a<e.length;a++){const i=n[a];ye(i,`Panel constraints not found for index ${a}`);const{defaultSize:c}=i;if(c!=null)continue;const l=e.length-r,d=o/l;r++,t[a]=d,o-=d}return t}function $n(e,t,n){t.forEach((r,o)=>{const a=e[o];ye(a,`Panel data not found for index ${o}`);const{callbacks:i,constraints:c,id:l}=a,{collapsedSize:d=0,collapsible:u}=c,p=n[l];if(p==null||r!==p){n[l]=r;const{onCollapse:f,onExpand:m,onResize:_}=i;_&&_(r,p),u&&(f||m)&&(m&&(p==null||Jt(p,d))&&!Jt(r,d)&&m(),f&&(p==null||!Jt(p,d))&&Jt(r,d)&&f())}})}function Jr(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function yg({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:o,precision:a=3}){const i=n[o];let c;return i==null?c=e!=null?e.toPrecision(a):"1":r.length===1?c="1":c=i.toPrecision(a),{flexBasis:0,flexGrow:c,flexShrink:1,overflow:"hidden",pointerEvents:t!==null?"none":void 0}}function xg(e,t=10){let n=null;return(...o)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}function tc(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function ud(e){return`react-resizable-panels:${e}`}function fd(e){return e.map(t=>{const{constraints:n,id:r,idIsFromProps:o,order:a}=t;return o?r:a?`${a}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((t,n)=>t.localeCompare(n)).join(",")}function md(e,t){try{const n=ud(e),r=t.getItem(n);if(r){const o=JSON.parse(r);if(typeof o=="object"&&o!=null)return o}}catch{}return null}function vg(e,t,n){var r,o;const a=(r=md(e,n))!==null&&r!==void 0?r:{},i=fd(t);return(o=a[i])!==null&&o!==void 0?o:null}function bg(e,t,n,r,o){var a;const i=ud(e),c=fd(t),l=(a=md(e,o))!==null&&a!==void 0?a:{};l[c]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{o.setItem(i,JSON.stringify(l))}catch(d){console.error(d)}}function nc({layout:e,panelConstraints:t}){const n=[...e],r=n.reduce((a,i)=>a+i,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(a=>`${a}%`).join(", ")}`);if(!dt(r,100)&&n.length>0)for(let a=0;a<t.length;a++){const i=n[a];ye(i!=null,`No layout data found for index ${a}`);const c=100/r*i;n[a]=c}let o=0;for(let a=0;a<t.length;a++){const i=n[a];ye(i!=null,`No layout data found for index ${a}`);const c=Xn({panelConstraints:t,panelIndex:a,size:i});i!=c&&(o+=i-c,n[a]=c)}if(!dt(o,0))for(let a=0;a<t.length;a++){const i=n[a];ye(i!=null,`No layout data found for index ${a}`);const c=i+o,l=Xn({panelConstraints:t,panelIndex:a,size:c});if(i!==l&&(o-=l-i,n[a]=l,dt(o,0)))break}return n}const wg=100,vr={getItem:e=>(tc(vr),vr.getItem(e)),setItem:(e,t)=>{tc(vr),vr.setItem(e,t)}},rc={};function pd({autoSaveId:e=null,children:t,className:n="",direction:r,forwardedRef:o,id:a=null,onLayout:i=null,keyboardResizeBy:c=null,storage:l=vr,style:d,tagName:u="div",...p}){const f=Ds(a),m=y.useRef(null),[_,h]=y.useState(null),[j,v]=y.useState([]),b=ug(),w=y.useRef({}),N=y.useRef(new Map),S=y.useRef(0),x=y.useRef({autoSaveId:e,direction:r,dragState:_,id:f,keyboardResizeBy:c,onLayout:i,storage:l}),C=y.useRef({layout:j,panelDataArray:[],panelDataArrayChanged:!1});y.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),y.useImperativeHandle(o,()=>({getId:()=>x.current.id,getLayout:()=>{const{layout:I}=C.current;return I},setLayout:I=>{const{onLayout:F}=x.current,{layout:U,panelDataArray:K}=C.current,A=nc({layout:I,panelConstraints:K.map(H=>H.constraints)});ec(U,A)||(v(A),C.current.layout=A,F&&F(A),$n(K,A,w.current))}}),[]),Tn(()=>{x.current.autoSaveId=e,x.current.direction=r,x.current.dragState=_,x.current.id=f,x.current.onLayout=i,x.current.storage=l}),hg({committedValuesRef:x,eagerValuesRef:C,groupId:f,layout:j,panelDataArray:C.current.panelDataArray,setLayout:v,panelGroupElement:m.current}),y.useEffect(()=>{const{panelDataArray:I}=C.current;if(e){if(j.length===0||j.length!==I.length)return;let F=rc[e];F==null&&(F=xg(bg,wg),rc[e]=F);const U=[...I],K=new Map(N.current);F(e,U,K,j,l)}},[e,j,l]),y.useEffect(()=>{});const E=y.useCallback(I=>{const{onLayout:F}=x.current,{layout:U,panelDataArray:K}=C.current;if(I.constraints.collapsible){const A=K.map(ae=>ae.constraints),{collapsedSize:H=0,panelSize:Q,pivotIndices:J}=Sn(K,I,U);if(ye(Q!=null,`Panel size not found for panel "${I.id}"`),!Jt(Q,H)){N.current.set(I.id,Q);const ce=Un(K,I)===K.length-1?Q-H:H-Q,me=xr({delta:ce,initialLayout:U,panelConstraints:A,pivotIndices:J,prevLayout:U,trigger:"imperative-api"});Jr(U,me)||(v(me),C.current.layout=me,F&&F(me),$n(K,me,w.current))}}},[]),M=y.useCallback((I,F)=>{const{onLayout:U}=x.current,{layout:K,panelDataArray:A}=C.current;if(I.constraints.collapsible){const H=A.map(be=>be.constraints),{collapsedSize:Q=0,panelSize:J=0,minSize:ae=0,pivotIndices:ce}=Sn(A,I,K),me=F??ae;if(Jt(J,Q)){const be=N.current.get(I.id),Ue=be!=null&&be>=me?be:me,Ze=Un(A,I)===A.length-1?J-Ue:Ue-J,Ie=xr({delta:Ze,initialLayout:K,panelConstraints:H,pivotIndices:ce,prevLayout:K,trigger:"imperative-api"});Jr(K,Ie)||(v(Ie),C.current.layout=Ie,U&&U(Ie),$n(A,Ie,w.current))}}},[]),P=y.useCallback(I=>{const{layout:F,panelDataArray:U}=C.current,{panelSize:K}=Sn(U,I,F);return ye(K!=null,`Panel size not found for panel "${I.id}"`),K},[]),T=y.useCallback((I,F)=>{const{panelDataArray:U}=C.current,K=Un(U,I);return yg({defaultSize:F,dragState:_,layout:j,panelData:U,panelIndex:K})},[_,j]),k=y.useCallback(I=>{const{layout:F,panelDataArray:U}=C.current,{collapsedSize:K=0,collapsible:A,panelSize:H}=Sn(U,I,F);return ye(H!=null,`Panel size not found for panel "${I.id}"`),A===!0&&Jt(H,K)},[]),z=y.useCallback(I=>{const{layout:F,panelDataArray:U}=C.current,{collapsedSize:K=0,collapsible:A,panelSize:H}=Sn(U,I,F);return ye(H!=null,`Panel size not found for panel "${I.id}"`),!A||Rn(H,K)>0},[]),D=y.useCallback(I=>{const{panelDataArray:F}=C.current;F.push(I),F.sort((U,K)=>{const A=U.order,H=K.order;return A==null&&H==null?0:A==null?-1:H==null?1:A-H}),C.current.panelDataArrayChanged=!0,b()},[b]);Tn(()=>{if(C.current.panelDataArrayChanged){C.current.panelDataArrayChanged=!1;const{autoSaveId:I,onLayout:F,storage:U}=x.current,{layout:K,panelDataArray:A}=C.current;let H=null;if(I){const J=vg(I,A,U);J&&(N.current=new Map(Object.entries(J.expandToSizes)),H=J.layout)}H==null&&(H=jg({panelDataArray:A}));const Q=nc({layout:H,panelConstraints:A.map(J=>J.constraints)});ec(K,Q)||(v(Q),C.current.layout=Q,F&&F(Q),$n(A,Q,w.current))}}),Tn(()=>{const I=C.current;return()=>{I.layout=[]}},[]);const W=y.useCallback(I=>{let F=!1;const U=m.current;return U&&window.getComputedStyle(U,null).getPropertyValue("direction")==="rtl"&&(F=!0),function(A){A.preventDefault();const H=m.current;if(!H)return()=>null;const{direction:Q,dragState:J,id:ae,keyboardResizeBy:ce,onLayout:me}=x.current,{layout:be,panelDataArray:Ue}=C.current,{initialLayout:Qe}=J??{},Ze=cd(ae,I,H);let Ie=gg(A,I,Q,J,ce,H);const ct=Q==="horizontal";ct&&F&&(Ie=-Ie);const q=Ue.map(re=>re.constraints),Z=xr({delta:Ie,initialLayout:Qe??be,panelConstraints:q,pivotIndices:Ze,prevLayout:be,trigger:Ql(A)?"keyboard":"mouse-or-touch"}),he=!Jr(be,Z);(Zl(A)||ed(A))&&S.current!=Ie&&(S.current=Ie,!he&&Ie!==0?ct?Ca(I,Ie<0?nd:rd):Ca(I,Ie<0?od:ad):Ca(I,0)),he&&(v(Z),C.current.layout=Z,me&&me(Z),$n(Ue,Z,w.current))}},[]),O=y.useCallback((I,F)=>{const{onLayout:U}=x.current,{layout:K,panelDataArray:A}=C.current,H=A.map(be=>be.constraints),{panelSize:Q,pivotIndices:J}=Sn(A,I,K);ye(Q!=null,`Panel size not found for panel "${I.id}"`);const ce=Un(A,I)===A.length-1?Q-F:F-Q,me=xr({delta:ce,initialLayout:K,panelConstraints:H,pivotIndices:J,prevLayout:K,trigger:"imperative-api"});Jr(K,me)||(v(me),C.current.layout=me,U&&U(me),$n(A,me,w.current))},[]),$=y.useCallback((I,F)=>{const{layout:U,panelDataArray:K}=C.current,{collapsedSize:A=0,collapsible:H}=F,{collapsedSize:Q=0,collapsible:J,maxSize:ae=100,minSize:ce=0}=I.constraints,{panelSize:me}=Sn(K,I,U);me!=null&&(H&&J&&Jt(me,A)?Jt(A,Q)||O(I,Q):me<ce?O(I,ce):me>ae&&O(I,ae))},[O]),L=y.useCallback((I,F)=>{const{direction:U}=x.current,{layout:K}=C.current;if(!m.current)return;const A=Ho(I,m.current);ye(A,`Drag handle element not found for id "${I}"`);const H=dd(U,F);h({dragHandleId:I,dragHandleRect:A.getBoundingClientRect(),initialCursorPosition:H,initialLayout:K})},[]),R=y.useCallback(()=>{h(null)},[]),X=y.useCallback(I=>{const{panelDataArray:F}=C.current,U=Un(F,I);U>=0&&(F.splice(U,1),delete w.current[I.id],C.current.panelDataArrayChanged=!0,b())},[b]),de=y.useMemo(()=>({collapsePanel:E,direction:r,dragState:_,expandPanel:M,getPanelSize:P,getPanelStyle:T,groupId:f,isPanelCollapsed:k,isPanelExpanded:z,reevaluatePanelConstraints:$,registerPanel:D,registerResizeHandle:W,resizePanel:O,startDragging:L,stopDragging:R,unregisterPanel:X,panelGroupElement:m.current}),[E,_,r,M,P,T,f,k,z,$,D,W,O,L,R,X]),ie={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return y.createElement($o.Provider,{value:de},y.createElement(u,{...p,children:t,className:n,id:a,ref:m,style:{...ie,...d},[Be.group]:"",[Be.groupDirection]:r,[Be.groupId]:f}))}const hd=y.forwardRef((e,t)=>y.createElement(pd,{...e,forwardedRef:t}));pd.displayName="PanelGroup";hd.displayName="forwardRef(PanelGroup)";function Un(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function Sn(e,t,n){const r=Un(e,t),a=r===e.length-1?[r-1,r]:[r,r+1],i=n[r];return{...t.constraints,panelSize:i,pivotIndices:a}}function Ng({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){y.useEffect(()=>{if(e||n==null||r==null)return;const o=Ho(t,r);if(o==null)return;const a=i=>{if(!i.defaultPrevented)switch(i.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{i.preventDefault(),n(i);break}case"F6":{i.preventDefault();const c=o.getAttribute(Be.groupId);ye(c,`No group element found for id "${c}"`);const l=Pr(c,r),d=id(c,t,r);ye(d!==null,`No resize element found for id "${t}"`);const u=i.shiftKey?d>0?d-1:l.length-1:d+1<l.length?d+1:0;l[u].focus();break}}};return o.addEventListener("keydown",a),()=>{o.removeEventListener("keydown",a)}},[r,e,t,n])}function _d({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:r,id:o,onBlur:a,onClick:i,onDragging:c,onFocus:l,onPointerDown:d,onPointerUp:u,style:p={},tabIndex:f=0,tagName:m="div",..._}){var h,j;const v=y.useRef(null),b=y.useRef({onClick:i,onDragging:c,onPointerDown:d,onPointerUp:u});y.useEffect(()=>{b.current.onClick=i,b.current.onDragging=c,b.current.onPointerDown=d,b.current.onPointerUp=u});const w=y.useContext($o);if(w===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:S,registerResizeHandle:x,startDragging:C,stopDragging:E,panelGroupElement:M}=w,P=Ds(o),[T,k]=y.useState("inactive"),[z,D]=y.useState(!1),[W,O]=y.useState(null),$=y.useRef({state:T});Tn(()=>{$.current.state=T}),y.useEffect(()=>{if(n)O(null);else{const de=x(P);O(()=>de)}},[n,P,x]);const L=(h=r==null?void 0:r.coarse)!==null&&h!==void 0?h:15,R=(j=r==null?void 0:r.fine)!==null&&j!==void 0?j:5;y.useEffect(()=>{if(n||W==null)return;const de=v.current;ye(de,"Element ref not attached");let ie=!1;return lg(P,de,N,{coarse:L,fine:R},(F,U,K)=>{if(!U){k("inactive");return}switch(F){case"down":{k("drag"),ie=!1,ye(K,'Expected event to be defined for "down" action'),C(P,K);const{onDragging:A,onPointerDown:H}=b.current;A==null||A(!0),H==null||H();break}case"move":{const{state:A}=$.current;ie=!0,A!=="drag"&&k("hover"),ye(K,'Expected event to be defined for "move" action'),W(K);break}case"up":{k("hover"),E();const{onClick:A,onDragging:H,onPointerUp:Q}=b.current;H==null||H(!1),Q==null||Q(),ie||A==null||A();break}}})},[L,N,n,R,x,P,W,C,E]),Ng({disabled:n,handleId:P,resizeHandler:W,panelGroupElement:M});const X={touchAction:"none",userSelect:"none"};return y.createElement(m,{..._,children:e,className:t,id:o,onBlur:()=>{D(!1),a==null||a()},onFocus:()=>{D(!0),l==null||l()},ref:v,role:"separator",style:{...X,...p},tabIndex:f,[Be.groupDirection]:N,[Be.groupId]:S,[Be.resizeHandle]:"",[Be.resizeHandleActive]:T==="drag"?"pointer":z?"keyboard":void 0,[Be.resizeHandleEnabled]:!n,[Be.resizeHandleId]:P,[Be.resizeHandleState]:T})}_d.displayName="PanelResizeHandle";const Sg=({className:e,...t})=>s.jsx(hd,{className:ne("cj-flex cj-h-full cj-w-full data-[panel-group-direction=vertical]:cj-flex-col",e),...t}),Pa=Jl,oc=({withHandle:e,className:t,...n})=>s.jsx(_d,{className:ne("cj-relative cj-flex cj-w-px cj-items-center cj-justify-center cj-bg-border after:cj-absolute after:cj-inset-y-0 after:cj-left-1/2 after:cj-w-1 after:-cj-translate-x-1/2 data-[panel-group-direction=vertical]:cj-h-px data-[panel-group-direction=vertical]:cj-w-full data-[panel-group-direction=vertical]:after:cj-left-0 data-[panel-group-direction=vertical]:after:cj-h-1 data-[panel-group-direction=vertical]:after:cj-w-full data-[panel-group-direction=vertical]:after:-cj-translate-y-1/2 data-[panel-group-direction=vertical]:after:cj-translate-x-0 focus-visible:cj-outline-none focus-visible:cj-ring-1 focus-visible:cj-ring-ring focus-visible:cj-ring-offset-1 [&[data-panel-group-direction=vertical]>div]:cj-rotate-90",t),...n,children:e&&s.jsx("div",{className:"cj-z-10 cj-flex cj-h-4 cj-w-3 cj-items-center cj-justify-center cj-rounded-sm cj-border cj-bg-border",children:s.jsx(Vl,{className:"cj-h-2.5 cj-w-2.5"})})});function Ja(e,[t,n]){return Math.min(n,Math.max(t,e))}function Cg(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var As="ScrollArea",[gd]=_t(As),[kg,xt]=gd(As),jd=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:a=600,...i}=e,[c,l]=g.useState(null),[d,u]=g.useState(null),[p,f]=g.useState(null),[m,_]=g.useState(null),[h,j]=g.useState(null),[v,b]=g.useState(0),[w,N]=g.useState(0),[S,x]=g.useState(!1),[C,E]=g.useState(!1),M=xe(t,T=>l(T)),P=Ar(o);return s.jsx(kg,{scope:n,type:r,dir:P,scrollHideDelay:a,scrollArea:c,viewport:d,onViewportChange:u,content:p,onContentChange:f,scrollbarX:m,onScrollbarXChange:_,scrollbarXEnabled:S,onScrollbarXEnabledChange:x,scrollbarY:h,onScrollbarYChange:j,scrollbarYEnabled:C,onScrollbarYEnabledChange:E,onCornerWidthChange:b,onCornerHeightChange:N,children:s.jsx(le.div,{dir:P,...i,ref:M,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});jd.displayName=As;var yd="ScrollAreaViewport",xd=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...a}=e,i=xt(yd,n),c=g.useRef(null),l=xe(t,c,i.onViewportChange);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),s.jsx(le.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:s.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});xd.displayName=yd;var Ut="ScrollAreaScrollbar",Os=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=xt(Ut,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=o,c=e.orientation==="horizontal";return g.useEffect(()=>(c?a(!0):i(!0),()=>{c?a(!1):i(!1)}),[c,a,i]),o.type==="hover"?s.jsx(Pg,{...r,ref:t,forceMount:n}):o.type==="scroll"?s.jsx(Eg,{...r,ref:t,forceMount:n}):o.type==="auto"?s.jsx(vd,{...r,ref:t,forceMount:n}):o.type==="always"?s.jsx(zs,{...r,ref:t}):null});Os.displayName=Ut;var Pg=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=xt(Ut,e.__scopeScrollArea),[a,i]=g.useState(!1);return g.useEffect(()=>{const c=o.scrollArea;let l=0;if(c){const d=()=>{window.clearTimeout(l),i(!0)},u=()=>{l=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return c.addEventListener("pointerenter",d),c.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),c.removeEventListener("pointerenter",d),c.removeEventListener("pointerleave",u)}}},[o.scrollArea,o.scrollHideDelay]),s.jsx(gt,{present:n||a,children:s.jsx(vd,{"data-state":a?"visible":"hidden",...r,ref:t})})}),Eg=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=xt(Ut,e.__scopeScrollArea),a=e.orientation==="horizontal",i=Yo(()=>l("SCROLL_END"),100),[c,l]=Cg("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return g.useEffect(()=>{if(c==="idle"){const d=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(d)}},[c,o.scrollHideDelay,l]),g.useEffect(()=>{const d=o.viewport,u=a?"scrollLeft":"scrollTop";if(d){let p=d[u];const f=()=>{const m=d[u];p!==m&&(l("SCROLL"),i()),p=m};return d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[o.viewport,a,l,i]),s.jsx(gt,{present:n||c!=="hidden",children:s.jsx(zs,{"data-state":c==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:se(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:se(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),vd=g.forwardRef((e,t)=>{const n=xt(Ut,e.__scopeScrollArea),{forceMount:r,...o}=e,[a,i]=g.useState(!1),c=e.orientation==="horizontal",l=Yo(()=>{if(n.viewport){const d=n.viewport.offsetWidth<n.viewport.scrollWidth,u=n.viewport.offsetHeight<n.viewport.scrollHeight;i(c?d:u)}},10);return nr(n.viewport,l),nr(n.content,l),s.jsx(gt,{present:r||a,children:s.jsx(zs,{"data-state":a?"visible":"hidden",...o,ref:t})})}),zs=g.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=xt(Ut,e.__scopeScrollArea),a=g.useRef(null),i=g.useRef(0),[c,l]=g.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=Cd(c.viewport,c.content),u={...r,sizes:c,onSizesChange:l,hasThumb:d>0&&d<1,onThumbChange:f=>a.current=f,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:f=>i.current=f};function p(f,m){return Og(f,i.current,c,m)}return n==="horizontal"?s.jsx(Mg,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const f=o.viewport.scrollLeft,m=ac(f,c,o.dir);a.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollLeft=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollLeft=p(f,o.dir))}}):n==="vertical"?s.jsx(Dg,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const f=o.viewport.scrollTop,m=ac(f,c);a.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollTop=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollTop=p(f))}}):null}),Mg=g.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=xt(Ut,e.__scopeScrollArea),[i,c]=g.useState(),l=g.useRef(null),d=xe(t,l,a.onScrollbarXChange);return g.useEffect(()=>{l.current&&c(getComputedStyle(l.current))},[l]),s.jsx(wd,{"data-orientation":"horizontal",...o,ref:d,sizes:n,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":qo(n)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,p)=>{if(a.viewport){const f=a.viewport.scrollLeft+u.deltaX;e.onWheelScroll(f),Pd(f,p)&&u.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:xo(i.paddingLeft),paddingEnd:xo(i.paddingRight)}})}})}),Dg=g.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=xt(Ut,e.__scopeScrollArea),[i,c]=g.useState(),l=g.useRef(null),d=xe(t,l,a.onScrollbarYChange);return g.useEffect(()=>{l.current&&c(getComputedStyle(l.current))},[l]),s.jsx(wd,{"data-orientation":"vertical",...o,ref:d,sizes:n,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":qo(n)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,p)=>{if(a.viewport){const f=a.viewport.scrollTop+u.deltaY;e.onWheelScroll(f),Pd(f,p)&&u.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:xo(i.paddingTop),paddingEnd:xo(i.paddingBottom)}})}})}),[Tg,bd]=gd(Ut),wd=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:a,onThumbPointerUp:i,onThumbPointerDown:c,onThumbPositionChange:l,onDragScroll:d,onWheelScroll:u,onResize:p,...f}=e,m=xt(Ut,n),[_,h]=g.useState(null),j=xe(t,M=>h(M)),v=g.useRef(null),b=g.useRef(""),w=m.viewport,N=r.content-r.viewport,S=rt(u),x=rt(l),C=Yo(p,10);function E(M){if(v.current){const P=M.clientX-v.current.left,T=M.clientY-v.current.top;d({x:P,y:T})}}return g.useEffect(()=>{const M=P=>{const T=P.target;(_==null?void 0:_.contains(T))&&S(P,N)};return document.addEventListener("wheel",M,{passive:!1}),()=>document.removeEventListener("wheel",M,{passive:!1})},[w,_,N,S]),g.useEffect(x,[r,x]),nr(_,C),nr(m.content,C),s.jsx(Tg,{scope:n,scrollbar:_,hasThumb:o,onThumbChange:rt(a),onThumbPointerUp:rt(i),onThumbPositionChange:x,onThumbPointerDown:rt(c),children:s.jsx(le.div,{...f,ref:j,style:{position:"absolute",...f.style},onPointerDown:se(e.onPointerDown,M=>{M.button===0&&(M.target.setPointerCapture(M.pointerId),v.current=_.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),E(M))}),onPointerMove:se(e.onPointerMove,E),onPointerUp:se(e.onPointerUp,M=>{const P=M.target;P.hasPointerCapture(M.pointerId)&&P.releasePointerCapture(M.pointerId),document.body.style.webkitUserSelect=b.current,m.viewport&&(m.viewport.style.scrollBehavior=""),v.current=null})})})}),yo="ScrollAreaThumb",Nd=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=bd(yo,e.__scopeScrollArea);return s.jsx(gt,{present:n||o.hasThumb,children:s.jsx(Rg,{ref:t,...r})})}),Rg=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,a=xt(yo,n),i=bd(yo,n),{onThumbPositionChange:c}=i,l=xe(t,p=>i.onThumbChange(p)),d=g.useRef(void 0),u=Yo(()=>{d.current&&(d.current(),d.current=void 0)},100);return g.useEffect(()=>{const p=a.viewport;if(p){const f=()=>{if(u(),!d.current){const m=zg(p,c);d.current=m,c()}};return c(),p.addEventListener("scroll",f),()=>p.removeEventListener("scroll",f)}},[a.viewport,u,c]),s.jsx(le.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:se(e.onPointerDownCapture,p=>{const m=p.target.getBoundingClientRect(),_=p.clientX-m.left,h=p.clientY-m.top;i.onThumbPointerDown({x:_,y:h})}),onPointerUp:se(e.onPointerUp,i.onThumbPointerUp)})});Nd.displayName=yo;var Is="ScrollAreaCorner",Sd=g.forwardRef((e,t)=>{const n=xt(Is,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?s.jsx(Ag,{...e,ref:t}):null});Sd.displayName=Is;var Ag=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=xt(Is,n),[a,i]=g.useState(0),[c,l]=g.useState(0),d=!!(a&&c);return nr(o.scrollbarX,()=>{var p;const u=((p=o.scrollbarX)==null?void 0:p.offsetHeight)||0;o.onCornerHeightChange(u),l(u)}),nr(o.scrollbarY,()=>{var p;const u=((p=o.scrollbarY)==null?void 0:p.offsetWidth)||0;o.onCornerWidthChange(u),i(u)}),d?s.jsx(le.div,{...r,ref:t,style:{width:a,height:c,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function xo(e){return e?parseInt(e,10):0}function Cd(e,t){const n=e/t;return isNaN(n)?0:n}function qo(e){const t=Cd(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Og(e,t,n,r="ltr"){const o=qo(n),a=o/2,i=t||a,c=o-i,l=n.scrollbar.paddingStart+i,d=n.scrollbar.size-n.scrollbar.paddingEnd-c,u=n.content-n.viewport,p=r==="ltr"?[0,u]:[u*-1,0];return kd([l,d],p)(e)}function ac(e,t,n="ltr"){const r=qo(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,i=t.content-t.viewport,c=a-r,l=n==="ltr"?[0,i]:[i*-1,0],d=Ja(e,l);return kd([0,i],[0,c])(d)}function kd(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Pd(e,t){return e>0&&e<t}var zg=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const a={left:e.scrollLeft,top:e.scrollTop},i=n.left!==a.left,c=n.top!==a.top;(i||c)&&t(),n=a,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function Yo(e,t){const n=rt(e),r=g.useRef(0);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),g.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function nr(e,t){const n=rt(t);Je(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var Ed=jd,Ig=xd,Wg=Sd;const qt=g.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(Ed,{ref:r,className:ne("cj-relative cj-overflow-hidden",e),...n,children:[s.jsx(Ig,{className:"cj-h-full cj-w-full cj-rounded-[inherit] [&>div]:!cj-block [&>div]:!cj-min-w-0 [&>div]:cj-w-full",style:{overflowY:"auto"},children:t}),s.jsx(Md,{}),s.jsx(Wg,{})]}));qt.displayName=Ed.displayName;const Md=g.forwardRef(({className:e,orientation:t="vertical",...n},r)=>s.jsx(Os,{ref:r,orientation:t,className:ne("cj-flex cj-touch-none cj-select-none cj-transition-colors",t==="vertical"&&"cj-h-full cj-w-2.5 cj-border-l cj-border-l-transparent cj-p-[1px]",t==="horizontal"&&"cj-h-2.5 cj-flex-col cj-border-t cj-border-t-transparent cj-p-[1px]",e),...n,children:s.jsx(Nd,{className:"cj-relative cj-flex-1 cj-rounded-full cj-bg-border"})}));Md.displayName=Os.displayName;const Qa={back:"Back",next:"Next",reset:"Reset",cancel:"Cancel",submit:"Submit",save:"Save",delete:"Delete",close:"Close",empty:"(empty)",path:"Path",unknown:"Unknown",runner_title:"Form Runner",runner_save_exit:"Save & Exit",runner_ready_title:"Ready to begin",runner_onboarding_subtitle:"Before you start, make sure you have the following:",runner_onboarding_line1:"Before you start, please have the relevant information about the incident ready.",runner_onboarding_line2:"We may ask for details such as a description of the incident, the date, location, or supporting documents.",runner_onboarding_photos:"Photos of the incident (damage, location, context)",runner_onboarding_documents:"Relevant documents (policy, ID, etc.)",runner_onboarding_datetime:"Date and time of the event",runner_onboarding_location:"Location",runner_onboarding_description:"Brief description of what happened",runner_start_claim:"Start claim",runner_review_title:"Review Your Answers",runner_no_answers:"No answers recorded.",runner_summary_all_answers:"All answers",runner_review:"Review",runner_step:"Step {{step}}/{{total}}",runner_no_journey:"No journey has been built yet.",runner_no_data:"No journey data available.",builder_title:"Journey Builder",builder_read_only:"Read Only",builder_publish:"Publish",builder_unlock_edit:"Unlock Edit",builder_open_runner:"Open Runner",builder_auto_layout:"Auto Layout",builder_export_json:"Export JSON",builder_export_copied:"Journey spec copied to clipboard",specs_title:"Property Specs",specs_search_placeholder:"Search specs...",specs_filter_all:"All Types",specs_create_custom:"Create Custom Field",specs_count:"{{filtered}} of {{total}} specs",specs_no_results:"No specs found",props_select_hint:"Select a node or edge to edit",props_drag_hint:"Drag specs from the left panel onto the canvas to create nodes",node_props_title:"Node Properties",node_schema_type:"Schema Type",node_source_spec:"Source Spec ID",node_namespace:"Namespace",node_required:"Required",node_required_hint:"Block navigation if empty",node_original_label:"Original Label",node_label_override:"Label Override (optional)",node_label_override_placeholder:"Custom label to displayโฆ",node_actor:"Actor",node_actor_customer:"Customer",node_actor_operator:"Operator",node_widget:"Widget Override",node_widget_auto:"Auto (from schema)",node_widget_text:"Text Input",node_widget_textarea:"Textarea",node_widget_select:"Select Dropdown",node_widget_radio:"Radio Group",node_widget_datepicker:"Date Picker",node_widget_timepicker:"Time Picker",node_widget_datetimepicker:"Date & Time Picker",node_widget_currency:"Currency Input",node_widget_upload:"File Upload",node_widget_email:"Email",node_widget_phone:"Phone",node_widget_location:"Location",node_allow_future:"Allow future dates",node_allow_future_hint:"When off, only past or today are selectable",node_bindings_title:"Bindings",node_bindings_target:"Target Namespace",node_bindings_add:"Add Binding",node_delete:"Delete Node",node_options_title:"Options",upload_config_title:"Upload Configuration",upload_file_type_preset:"File type preset",upload_any_file:"Any file",upload_images_only:"Images only",upload_documents_only:"Documents only",upload_images_pdf:"Images + PDFs",upload_custom:"Custom",upload_accepted_types:"Accepted types (custom)",upload_accepted_types_placeholder:"e.g. image/*,.pdf",upload_max_size:"Max file size (MB)",upload_max_size_placeholder:"e.g. 10",upload_max_files:"Max number of files",edge_props_title:"Edge Properties",edge_connection:"Connection",edge_default:"Default Edge",edge_default_hint:"Used when no other conditions match",edge_priority:"Priority",edge_priority_hint:"Higher priority edges are evaluated first",edge_quick_pick:"Quick pick from source options:",edge_condition:"Condition",edge_visual:"Visual",edge_advanced:"Advanced",edge_json_logic:"JSON Logic condition",edge_delete:"Delete Edge",preview_title:"Form Preview",preview_step_of:"Step {{current}} of {{total}}",preview_start:"Start Preview",preview_add_nodes_hint:"Add nodes to the canvas to preview the form flow.",preview_start_hint:'Click "Start Preview" to test the form flow interactively.',preview_no_node:"No current node selected.",preview_required_hint:"This field is required",preview_validation_hint:"Fix validation errors first",import_title:"Import Journey Spec",import_description:"Load a JourneySpec JSON file or paste JSON to populate the canvas.",import_paste_tab:"Paste JSON",import_upload_tab:"Upload File",import_paste_clipboard:"Paste from Clipboard",import_placeholder:'{"journey_id": "...", "nodes": [...], "edges": [...]}',import_button:"Import Journey",import_validation_errors:"Validation errors:",validation_title:"Graph Validation",validation_no_issues:"No issues found",validation_issue_count:"{{count}} issue{{plural}} found",validation_good:"Graph looks good!",validation_no_issues_actor:"No issues",validation_validate:"Validate",create_node_title:"Create Custom Field",create_node_label:"Label *",create_node_label_placeholder:"Enter a display label",create_node_namespace:"Namespace",create_node_namespace_hint:"Auto-generated from label. Override if needed.",create_node_schema:"Schema Type",upload_drag_drop:"Drag & drop a file here, or click to select",upload_drag_drop_multiple:"Drag & drop files here, or click to select",upload_uploading:"Uploadingโฆ",upload_files_count:"{{count}} file(s) uploaded",upload_max_reached:"Maximum {{max}} files reached",widget_unknown_schema:"Unknown schema type: {{schema}}",widget_yes:"Yes",widget_no:"No",widget_no_widget:"No widget available for this field type.",widget_no_options:"No options configured for this select field.",widget_pick_date:"Pick a date",widget_invalid_date:"Enter a valid date",widget_pick_time:"Pick a time",widget_select_option:"Select an option...",widget_search_country:"Search country...",widget_no_country:"No country found.",widget_invalid_phone:"Enter a valid phone number",widget_invalid_email:"Enter a valid email address",widget_file_too_large:"File exceeds {{max}} MB limit ({{size}} MB)",widget_file_type_rejected:"File type not accepted. Allowed: {{accept}}",widget_upload_failed:"Upload failed",widget_accepted_hint:"Accepted: {{accept}}",widget_max_size_hint:"Max {{max}} MB",location_placeholder:"Start typing an addressโฆ",location_no_api_key:"Google Maps API key is required for the location widget.",placeholder_text:"Type hereโฆ",placeholder_select:"Select an optionโฆ",placeholder_currency:"0,00",placeholder_phone:"555 000 0000",placeholder_email:"email@example.com",placeholder_date:"Select a dateโฆ",not_found_title:"404",not_found_message:"Oops! Page not found",not_found_link:"Return to Home",runner_page_back:"Builder",fc_title:"Form Configurator",fc_read_only:"Read-only",fc_undo:"Undo",fc_redo:"Redo",fc_preview_form:"Preview Form",fc_save:"Save",fc_publish:"Publish",fc_unlock_edit:"Unlock edit",fc_tab_steps:"Steps",fc_tab_fields:"Fields",fc_tab_init:"Init",fc_tab_json:"JSON",fc_flow_validation_title:"Flow Validation",fc_flow_validation_validate:"Validate Flow",fc_flow_validation_no_issues:"No flow issues found",fc_flow_validation_good:"Flow looks good!",fc_flow_validation_no_issues_step:"No issues",fc_flow_validation_broken_reference:"Broken Reference",fc_flow_validation_unreachable_step:"Unreachable Step",fc_flow_validation_dead_end:"Dead End",fc_flow_validation_cycle:"Navigation Cycle",fc_flow_validation_no_fallback_rule:"No Fallback Rule",fc_flow_validation_general:"General",fc_form_steps:"Form Steps",fc_add_step:"Add Step",fc_step_untitled:"(untitled)",fc_step_meta:"{{rows}} rows, {{fields}} fields",fc_no_steps:"No steps yet.",fc_no_steps_hint_click:"Click",fc_no_steps_hint_to_begin:"to begin.",fc_confirm_title:"Are you sure?",fc_confirm_delete_step:"Delete this step?",fc_step_empty_select:"Select a step on the left.",fc_step_empty_create:"Add a step from the left panel to begin.",fc_step_title_label:"Step Title",fc_step_title_placeholder:"Step title",fc_step_description_label:"Description",fc_step_description_placeholder:"Optional",fc_add_row:"Add Row",fc_row_n:"Row {{n}}",fc_layout_horizontal:"Horizontal",fc_layout_vertical:"Vertical",fc_confirm_delete_row:"Delete this row?",fc_add_field_btn:"Add field",fc_no_fields:"No fields.",fc_edit:"Edit",fc_remove_from_row:"Remove from row",fc_row_title_placeholder:"Section title (optional)",fc_row_show_divider:"Divider",fc_nav_title:"Step Navigation",fc_nav_api_call:"API call on continue",fc_nav_api_call_hint:"Executed before evaluating the rules.",fc_nav_body_template:"Body template (JSON)",fc_nav_body_template_hint_prefix:"Use",fc_nav_body_template_hint_suffix:"tokens.",fc_nav_on_error:"On error",fc_nav_on_error_block:"Block โ stay on this step",fc_nav_on_error_continue:"Continue โ evaluate rules anyway",fc_nav_on_error_goto:"Go to: {{step}}",fc_nav_on_error_summary:"Go to: Summary",fc_nav_on_error_hint:"What happens if the call throws or the network fails.",fc_nav_continue_button:"Continue button",fc_nav_continue_placeholder:"Continue",fc_nav_rules:"Navigation rules",fc_nav_add_rule:"Add rule",fc_nav_rules_hint:'Rules evaluated in order. First match wins. Use "always" as the last fallback.',fc_nav_rule_n:"Rule {{n}}",fc_nav_has_condition:"Has condition",fc_nav_go_to:"Go to",fc_nav_submit_form:"โ Submit form โ",fc_nav_field_requires_value:'Field "{{label}}" requires a value.',fc_summary_panel:"Summary Panel",fc_summary_title_label:"Summary Title",fc_summary_show_sidebar:"Show live summary",fc_summary_show_sidebar_hint:"Display the summary sidebar while the user moves through the journey.",fc_summary_sections:"Sections",fc_summary_add_section:"Add Section",fc_summary_section_title_placeholder:"Section title",fc_summary_visible_from:"Visible from step",fc_summary_until_step:"Until step (optional)",fc_summary_all_steps:"All steps",fc_summary_step_n:"Step {{n}}",fc_summary_display_fields:"Display Fields",fc_summary_add:"Add",fc_summary_no_display_fields:"No display fields yet.",fc_summary_no_sections:"No sections yet.",fc_summary_confirm_delete_section:"Delete this section?",fc_summary_source:"Source",fc_summary_source_form_field:"Form Field",fc_summary_source_api_response:"API Response",fc_summary_format:"Format",fc_summary_format_text:"Text",fc_summary_format_number:"Number",fc_summary_format_currency:"Currency",fc_summary_format_date:"Date",fc_summary_format_datetime:"Date & Time",fc_summary_display_label:"Label",fc_summary_display_label_placeholder:"Display label",fc_summary_field:"Field",fc_summary_select:"Selectโฆ",fc_summary_from_step_api:"From step API",fc_summary_response_path:"Response Path (dot-notation)",fc_fields_catalog:"Fields catalog",fc_fields_catalog_hint:"All fields used across the form. Edit here to update them everywhere.",fc_fields_add:"Add Field",fc_fields_search:"Search fieldsโฆ",fc_fields_filter_all:"All",fc_fields_filter_used:"Used",fc_fields_filter_unused:"Unused",fc_fields_unused_badge:"Unused",fc_fields_used_in_one:"Used in {{count}} step",fc_fields_used_in_many:"Used in {{count}} steps",fc_fields_go_to_step:'Go to step "{{title}}"',fc_fields_no_fields:"No fields yet.",fc_fields_no_match:"No fields match the current filter.",fc_fields_confirm_delete:"Delete this field?",fc_init_title:"Initial values",fc_init_subtitle:"Static answers pre-loaded into the runner before the user starts.",fc_init_static:"Static values",fc_init_add:"Add",fc_init_no_values:"No initial values yet.",fc_init_prefill:"Pre-fill from API",fc_init_prefill_hint:"Fetch answers from an endpoint when the runner mounts.",fc_init_mapping:"Mapping (JSON: namespace โ response_path)",fc_json_title:"JSON",fc_json_hint:"Raw JourneySpec (form_config + theme). Edit and click Apply to update the configurator.",fc_json_refresh:"Reload from configurator",fc_json_refresh_hint:"Discard JSON edits and reload from the current configurator state",fc_json_copy:"Copy",fc_json_download:"Download",fc_json_import:"Apply changes",fc_json_apply_hint:"Apply the JSON edits to the configurator",fc_json_imported_ok:"Imported successfully",fc_json_copied:"Copied to clipboard",fc_json_invalid:"Invalid JSON",fc_json_upload:"Upload File",fc_json_file_error:"Could not read the file.",fc_create_field_title:"Add field",fc_create_field_subtitle:"Pick from the catalog or create a custom field.",fc_create_from_catalog:"From catalog ({{count}})",fc_create_custom:"Custom field",fc_create_search_specs:"Search specsโฆ",fc_create_no_specs:"No specs match.",fc_create_label_required:"Label *",fc_create_label_placeholder:"e.g. Customer Name",fc_create_namespace:"Namespace",fc_create_namespace_placeholder:"e.g. customer.name (auto if empty)",fc_create_schema:"Schema",fc_create_options:"Options",fc_create_option_value_placeholder:"value",fc_create_option_label_placeholder:"Label",fc_create_cancel:"Cancel",fc_create_create:"Create",fc_field_props:"Field properties",fc_field_no_selected:"No field selected.",fc_field_label:"Label *",fc_field_namespace:"Namespace",fc_field_placeholder:"Placeholder",fc_field_help:"Help text",fc_field_required:"Required",fc_field_required_hint:"User must fill before continuing.",fc_field_actor:"Actor",fc_field_actor_customer:"Customer",fc_field_actor_operator:"Operator",fc_field_widget:"Widget",fc_field_widget_auto:"Auto",fc_field_widget_text:"Text",fc_field_widget_textarea:"Textarea",fc_field_widget_select:"Select",fc_field_widget_radio:"Radio",fc_field_widget_date:"Date",fc_field_widget_time:"Time",fc_field_widget_datetime:"Date & Time",fc_field_widget_currency:"Currency",fc_field_widget_upload:"Upload",fc_field_widget_email:"Email",fc_field_widget_phone:"Phone",fc_field_widget_location:"Location",fc_field_widget_boolean:"Boolean (Yes/No)",fc_field_allow_future:"Allow future dates",fc_field_allow_future_hint:"Allow dates after today.",fc_field_display_style:"Display style",fc_field_display_auto:"Auto (radio โค5, dropdown >5)",fc_field_display_radio:"Radio list",fc_field_display_radio_horizontal:"Radio list horizontal",fc_field_display_dropdown:"Dropdown",fc_field_display_segmented:"Segmented buttons",fc_field_display_hint:"Controls how options render at runtime.",fc_field_display_switch:"Switch (toggle)",fc_field_display_yesno:"Segmented (Yes / No buttons)",fc_field_boolean_hint:"Override Yes/No labels by adding 2 options below (first = true, second = false).",fc_field_options:"Options",fc_field_no_options:"No options yet.",fc_field_upload_validation:"Upload validation",fc_field_upload_accept:"Accepted MIME types/extensions",fc_field_upload_max:"Max size (MB)",fc_field_dynamic_rules:"Dynamic rules",fc_field_dynamic_rules_hint:"Show, enable or require this field based on other answers.",fc_field_visible_when:"Show when",fc_field_visible_when_hint:"When the condition is false, the field is hidden and its value is cleared.",fc_field_enabled_when:"Enable when",fc_field_enabled_when_hint:"When the condition is false, the field is shown as read-only.",fc_field_required_when:"Required when",fc_field_required_when_hint:'Overrides the static "required" flag while the field is visible.',fc_field_always_visible:"Always visible",fc_field_always_enabled:"Always enabled",fc_field_required_static:'Use static "Required" setting',fc_field_rule_active:"Rule active",fc_field_computed:"Computed value",fc_field_computed_hint:"Auto-calculate this field from other fields. The result is read-only.",fc_field_width:"Field width",fc_field_width_hint:"Width within a horizontal row (mobile is always full width).",fc_field_width_auto:"Auto (share row evenly)",fc_field_width_full:"Full (3/3)",fc_field_computed_operation:"Operation",fc_field_computed_op_sum:"Sum (+)",fc_field_computed_op_subtract:"Subtract (โ)",fc_field_computed_op_multiply:"Multiply (ร)",fc_field_computed_op_divide:"Divide (รท)",fc_field_computed_precision:"Decimal places",fc_field_computed_operands:"Operand fields",fc_field_computed_add_operand:"Add a fieldโฆ",fc_field_computed_missing_operand:"(field not found)",fc_field_computed_no_fields:"No other fields available to use as operands.",fc_field_computed_all_added:"All available fields are already added.",fc_field_delete:"Delete field",fc_field_done:"Done",fc_field_confirm_delete:"Delete this field from the catalog (and all rows that use it)?",theme_button:"Theme",theme_reset:"Reset",theme_colors:"Colors",theme_primary:"Primary",theme_background:"Background",theme_card:"Card",theme_foreground:"Foreground",theme_color_picker_aria:"{{label}} color picker",theme_color_placeholder:"e.g. 222 47% 11%",theme_color_hint:"Pick a color or type an HSL triplet",theme_typography:"Typography",theme_heading_font:"Heading font",theme_body_font:"Body font",theme_font_default:"Default",theme_font_size:"Base font size (px)",theme_shape_spacing:"Shape & spacing",theme_border_radius:"Border radius (rem)",theme_spacing:"Spacing",theme_spacing_cozy_default:"Cozy (default)",theme_spacing_compact:"Compact",theme_spacing_cozy:"Cozy",theme_spacing_spacious:"Spacious",theme_live_preview:"Live preview",theme_heading_sample:"Heading sample",theme_body_sample:"The quick brown fox jumps over the lazy dog. Body text uses your selected font, size and spacing.",theme_input_sample:"Sample input",theme_primary_action:"Primary action",runner_toast_required_fields:"Please fill the required fields.",runner_toast_api_failed:"API call failed.",runner_toast_answers_copied:"Answers copied to clipboard!",runner_toast_partial_saved:"Partial answers saved (logged).",runner_toast_file_uploaded:"Uploaded {{name}} for {{key}}",runner_loading_preview:"Loading previewโฆ",runner_no_form:"No form configured yet.",runner_back_to_builder:"Back to builder",runner_preset_full:"Full",runner_iframe_title:"Form runner preview",import_invalid_json:"Invalid JSON: could not parse the input.",import_success:"Journey imported successfully",import_clipboard_failed:"Could not read clipboard",shortcut_selected_nodes_one:"Selected {{count}} node",shortcut_selected_nodes_other:"Selected {{count}} nodes",shortcut_deleted:"Deleted",shortcut_undo:"Undo",shortcut_redo:"Redo",shortcut_copied:"Copied to clipboard",shortcut_pasted:"Pasted",shortcut_duplicated:"Duplicated"},Fg={back:"Atrรกs",next:"Siguiente",reset:"Reiniciar",cancel:"Cancelar",submit:"Enviar",save:"Guardar",delete:"Eliminar",close:"Cerrar",empty:"(vacรญo)",path:"Ruta",unknown:"Desconocido",runner_title:"Formulario",runner_save_exit:"Guardar y Salir",runner_ready_title:"Listo para comenzar",runner_onboarding_subtitle:"Antes de empezar, asegรบrate de tener lo siguiente:",runner_onboarding_line1:"Antes de empezar, por favor tenga preparada la informaciรณn relevante sobre lo ocurrido.",runner_onboarding_line2:"Podremos pedir detalles como una descripciรณn del incidente, la fecha, el lugar o documentos de apoyo.",runner_onboarding_photos:"Fotos del incidente (daรฑo, lugar, contexto)",runner_onboarding_documents:"Documentos relevantes (pรณliza, identificaciรณn, etc.)",runner_onboarding_datetime:"Fecha y hora del suceso",runner_onboarding_location:"Ubicaciรณn",runner_onboarding_description:"Descripciรณn breve de lo ocurrido",runner_start_claim:"Comenzar parte",runner_review_title:"Revisa tus respuestas",runner_no_answers:"No hay respuestas registradas.",runner_summary_all_answers:"Todas las respuestas",runner_review:"Revisar",runner_step:"Paso {{step}}/{{total}}",runner_no_journey:"Aรบn no se ha creado ningรบn recorrido.",runner_no_data:"Datos del recorrido no disponibles.",builder_title:"Constructor de Recorridos",builder_read_only:"Solo Lectura",builder_publish:"Publicar",builder_unlock_edit:"Desbloquear Ediciรณn",builder_open_runner:"Abrir Formulario",builder_auto_layout:"Diseรฑo Automรกtico",builder_export_json:"Exportar JSON",builder_export_copied:"Especificaciรณn copiada al portapapeles",specs_title:"Propiedades",specs_search_placeholder:"Buscar...",specs_filter_all:"Todos los Tipos",specs_create_custom:"Crear Campo Personalizado",specs_count:"{{filtered}} de {{total}} propiedades",specs_no_results:"No se encontraron propiedades",props_select_hint:"Selecciona un nodo o arista para editar",props_drag_hint:"Arrastra propiedades del panel izquierdo al lienzo para crear nodos",node_props_title:"Propiedades del Nodo",node_schema_type:"Tipo de Schema",node_source_spec:"ID de Propiedad",node_namespace:"Namespace",node_required:"Obligatorio",node_required_hint:"Bloquear navegaciรณn si estรก vacรญo",node_original_label:"Etiqueta Original",node_label_override:"Etiqueta Personalizada (opcional)",node_label_override_placeholder:"Etiqueta personalizadaโฆ",node_actor:"Actor",node_actor_customer:"Cliente",node_actor_operator:"Operador",node_widget:"Widget",node_widget_auto:"Automรกtico (del schema)",node_widget_text:"Campo de Texto",node_widget_textarea:"รrea de Texto",node_widget_select:"Lista Desplegable",node_widget_radio:"Grupo de Radio",node_widget_datepicker:"Selector de Fecha",node_widget_timepicker:"Selector de Hora",node_widget_datetimepicker:"Selector de Fecha y Hora",node_widget_currency:"Campo Monetario",node_widget_upload:"Carga de Archivo",node_widget_email:"Email",node_widget_phone:"Telรฉfono",node_widget_location:"Ubicaciรณn",node_allow_future:"Permitir fechas futuras",node_allow_future_hint:"Cuando estรก desactivado, solo permite fechas pasadas u hoy",node_bindings_title:"Vรญnculos",node_bindings_target:"Namespace Destino",node_bindings_add:"Agregar Binding",node_delete:"Eliminar Nodo",node_options_title:"Opciones",upload_config_title:"Configuraciรณn de Carga",upload_file_type_preset:"Tipo de archivo",upload_any_file:"Cualquier archivo",upload_images_only:"Solo imรกgenes",upload_documents_only:"Solo documentos",upload_images_pdf:"Imรกgenes + PDFs",upload_custom:"Personalizado",upload_accepted_types:"Tipos aceptados (personalizado)",upload_accepted_types_placeholder:"ej: image/*,.pdf",upload_max_size:"Tamaรฑo mรกximo (MB)",upload_max_size_placeholder:"ej: 10",upload_max_files:"Nรบmero mรกximo de archivos",edge_props_title:"Propiedades de la Arista",edge_connection:"Conexiรณn",edge_default:"Arista Predeterminada",edge_default_hint:"Se usa cuando ninguna otra condiciรณn coincide",edge_priority:"Prioridad",edge_priority_hint:"Las aristas con mayor prioridad se evalรบan primero",edge_quick_pick:"Selecciรณn rรกpida de opciones:",edge_condition:"Condiciรณn",edge_visual:"Visual",edge_advanced:"Avanzado",edge_json_logic:"Condiciรณn JSON Logic",edge_delete:"Eliminar Arista",preview_title:"Vista Previa",preview_step_of:"Paso {{current}} de {{total}}",preview_start:"Iniciar Vista Previa",preview_add_nodes_hint:"Agrega nodos al lienzo para previsualizar el flujo.",preview_start_hint:'Haz clic en "Iniciar Vista Previa" para probar el flujo interactivamente.',preview_no_node:"Ningรบn nodo seleccionado.",preview_required_hint:"Este campo es obligatorio",preview_validation_hint:"Corrige los errores de validaciรณn primero",import_title:"Importar Especificaciรณn",import_description:"Carga un archivo JSON o pega el JSON para poblar el lienzo.",import_paste_tab:"Pegar JSON",import_upload_tab:"Cargar Archivo",import_paste_clipboard:"Pegar del Portapapeles",import_placeholder:'{"journey_id": "...", "nodes": [...], "edges": [...]}',import_button:"Importar",import_validation_errors:"Errores de validaciรณn:",validation_title:"Validaciรณn del Grafo",validation_no_issues:"Sin problemas encontrados",validation_issue_count:"{{count}} problema{{plural}} encontrado{{plural}}",validation_good:"ยกEl grafo estรก correcto!",validation_no_issues_actor:"Sin problemas",validation_validate:"Validar",create_node_title:"Crear Campo Personalizado",create_node_label:"Etiqueta *",create_node_label_placeholder:"Ingresa una etiqueta",create_node_namespace:"Namespace",create_node_namespace_hint:"Generado automรกticamente a partir de la etiqueta.",create_node_schema:"Tipo de Schema",upload_drag_drop:"Arrastra y suelta un archivo aquรญ, o haz clic para seleccionar",upload_drag_drop_multiple:"Arrastra y suelta archivos aquรญ, o haz clic para seleccionar",upload_uploading:"Cargandoโฆ",upload_files_count:"{{count}} archivo(s) cargado(s)",upload_max_reached:"Mรกximo de {{max}} archivos alcanzado",widget_unknown_schema:"Tipo de schema desconocido: {{schema}}",widget_yes:"Sรญ",widget_no:"No",widget_no_widget:"No hay widget disponible para este tipo de campo.",widget_no_options:"No hay opciones configuradas para este campo de selecciรณn.",widget_pick_date:"Seleccionar fecha",widget_invalid_date:"Introduce una fecha vรกlida",widget_pick_time:"Seleccionar hora",widget_select_option:"Seleccionar una opciรณn...",widget_search_country:"Buscar paรญs...",widget_no_country:"Paรญs no encontrado.",widget_invalid_phone:"Ingrese un nรบmero de telรฉfono vรกlido",widget_invalid_email:"Ingrese un correo electrรณnico vรกlido",widget_file_too_large:"El archivo excede el lรญmite de {{max}} MB ({{size}} MB)",widget_file_type_rejected:"Tipo de archivo no aceptado. Permitidos: {{accept}}",widget_upload_failed:"Error al cargar",widget_accepted_hint:"Aceptados: {{accept}}",widget_max_size_hint:"Mรกx {{max}} MB",location_placeholder:"Empieza a escribir una direcciรณnโฆ",location_no_api_key:"Se requiere una clave de API de Google Maps para el widget de ubicaciรณn.",placeholder_text:"Insertarโฆ",placeholder_select:"Seleccionarโฆ",placeholder_currency:"0,00",placeholder_phone:"555 000 0000",placeholder_email:"email@ejemplo.com",placeholder_date:"Seleccionar fechaโฆ",not_found_title:"404",not_found_message:"Pรกgina no encontrada",not_found_link:"Volver al Inicio",runner_page_back:"Constructor",fc_title:"Configurador de Formulario",fc_read_only:"Solo lectura",fc_undo:"Deshacer",fc_redo:"Rehacer",fc_preview_form:"Vista previa",fc_save:"Guardar",fc_publish:"Publicar",fc_unlock_edit:"Desbloquear ediciรณn",fc_tab_steps:"Pasos",fc_tab_fields:"Campos",fc_tab_init:"Inicializaciรณn",fc_tab_json:"JSON",fc_flow_validation_title:"Validaciรณn del Flujo",fc_flow_validation_validate:"Validar Flujo",fc_flow_validation_no_issues:"Sin problemas en el flujo",fc_flow_validation_good:"ยกEl flujo estรก correcto!",fc_flow_validation_no_issues_step:"Sin problemas",fc_flow_validation_broken_reference:"Referencia Rota",fc_flow_validation_unreachable_step:"Paso Inalcanzable",fc_flow_validation_dead_end:"Sin Salida",fc_flow_validation_cycle:"Ciclo de Navegaciรณn",fc_flow_validation_no_fallback_rule:"Sin Regla de Respaldos",fc_flow_validation_general:"General",fc_form_steps:"Pasos del Formulario",fc_add_step:"Aรฑadir Paso",fc_step_untitled:"(sin tรญtulo)",fc_step_meta:"{{rows}} filas, {{fields}} campos",fc_no_steps:"Aรบn sin pasos.",fc_no_steps_hint_click:"Haz clic en",fc_no_steps_hint_to_begin:"para empezar.",fc_confirm_title:"ยฟEstรกs seguro?",fc_confirm_delete_step:"ยฟEliminar este paso?",fc_step_empty_select:"Selecciona un paso a la izquierda.",fc_step_empty_create:"Aรฑade un paso desde el panel izquierdo para empezar.",fc_step_title_label:"Tรญtulo del Paso",fc_step_title_placeholder:"Tรญtulo del paso",fc_step_description_label:"Descripciรณn",fc_step_description_placeholder:"Opcional",fc_add_row:"Aรฑadir Fila",fc_row_n:"Fila {{n}}",fc_layout_horizontal:"Horizontal",fc_layout_vertical:"Vertical",fc_confirm_delete_row:"ยฟEliminar esta fila?",fc_add_field_btn:"Aรฑadir campo",fc_no_fields:"Sin campos.",fc_edit:"Editar",fc_remove_from_row:"Quitar de la fila",fc_row_title_placeholder:"Tรญtulo de secciรณn (opcional)",fc_row_show_divider:"Divisor",fc_nav_title:"Navegaciรณn del Paso",fc_nav_api_call:"Llamada API al continuar",fc_nav_api_call_hint:"Se ejecuta antes de evaluar las reglas.",fc_nav_body_template:"Plantilla del body (JSON)",fc_nav_body_template_hint_prefix:"Usa tokens",fc_nav_body_template_hint_suffix:".",fc_nav_on_error:"En caso de error",fc_nav_on_error_block:"Bloquear โ permanece en este paso",fc_nav_on_error_continue:"Continuar โ evalรบa las reglas igualmente",fc_nav_on_error_goto:"Ir a: {{step}}",fc_nav_on_error_summary:"Ir a: Resumen",fc_nav_on_error_hint:"Quรฉ ocurre si la llamada falla o la red cae.",fc_nav_continue_button:"Botรณn continuar",fc_nav_continue_placeholder:"Continuar",fc_nav_rules:"Reglas de navegaciรณn",fc_nav_add_rule:"Aรฑadir regla",fc_nav_rules_hint:'Reglas evaluadas en orden. Gana la primera. Usa "siempre" como รบltimo recurso.',fc_nav_rule_n:"Regla {{n}}",fc_nav_has_condition:"Tiene condiciรณn",fc_nav_go_to:"Ir a",fc_nav_submit_form:"โ Enviar formulario โ",fc_nav_field_requires_value:'El campo "{{label}}" requiere un valor.',fc_summary_panel:"Panel de Resumen",fc_summary_title_label:"Tรญtulo del Resumen",fc_summary_show_sidebar:"Mostrar resumen en progreso",fc_summary_show_sidebar_hint:"Muestra la barra lateral de resumen mientras el usuario avanza en la jornada.",fc_summary_sections:"Secciones",fc_summary_add_section:"Aรฑadir Secciรณn",fc_summary_section_title_placeholder:"Tรญtulo de la secciรณn",fc_summary_visible_from:"Visible desde el paso",fc_summary_until_step:"Hasta el paso (opcional)",fc_summary_all_steps:"Todos los pasos",fc_summary_step_n:"Paso {{n}}",fc_summary_display_fields:"Campos a Mostrar",fc_summary_add:"Aรฑadir",fc_summary_no_display_fields:"Aรบn sin campos a mostrar.",fc_summary_no_sections:"Aรบn sin secciones.",fc_summary_confirm_delete_section:"ยฟEliminar esta secciรณn?",fc_summary_source:"Origen",fc_summary_source_form_field:"Campo del Formulario",fc_summary_source_api_response:"Respuesta de la API",fc_summary_format:"Formato",fc_summary_format_text:"Texto",fc_summary_format_number:"Nรบmero",fc_summary_format_currency:"Moneda",fc_summary_format_date:"Fecha",fc_summary_format_datetime:"Fecha y hora",fc_summary_display_label:"Etiqueta",fc_summary_display_label_placeholder:"Etiqueta a mostrar",fc_summary_field:"Campo",fc_summary_select:"Seleccionarโฆ",fc_summary_from_step_api:"Desde API del paso",fc_summary_response_path:"Ruta de respuesta (notaciรณn con puntos)",fc_fields_catalog:"Catรกlogo de campos",fc_fields_catalog_hint:"Todos los campos usados en el formulario. Edรญtalos aquรญ para actualizarlos en todas partes.",fc_fields_add:"Aรฑadir Campo",fc_fields_search:"Buscar camposโฆ",fc_fields_filter_all:"Todos",fc_fields_filter_used:"Usados",fc_fields_filter_unused:"No usados",fc_fields_unused_badge:"No usado",fc_fields_used_in_one:"Usado en {{count}} paso",fc_fields_used_in_many:"Usado en {{count}} pasos",fc_fields_go_to_step:'Ir al paso "{{title}}"',fc_fields_no_fields:"Aรบn sin campos.",fc_fields_no_match:"Ningรบn campo coincide con el filtro.",fc_fields_confirm_delete:"ยฟEliminar este campo?",fc_init_title:"Valores iniciales",fc_init_subtitle:"Respuestas estรกticas precargadas en el runner antes de que el usuario empiece.",fc_init_static:"Valores estรกticos",fc_init_add:"Aรฑadir",fc_init_no_values:"Aรบn sin valores iniciales.",fc_init_prefill:"Precargar desde API",fc_init_prefill_hint:"Obtener respuestas desde un endpoint cuando el runner monta.",fc_init_mapping:"Mapeo (JSON: namespace โ response_path)",fc_json_title:"JSON",fc_json_hint:"JourneySpec en bruto (form_config + theme). Edita y haz clic en Aplicar para actualizar el configurador.",fc_json_refresh:"Recargar del configurador",fc_json_refresh_hint:"Descarta las ediciones del JSON y recarga desde el estado actual del configurador",fc_json_copy:"Copiar",fc_json_download:"Descargar",fc_json_import:"Aplicar cambios",fc_json_apply_hint:"Aplica las ediciones del JSON al configurador",fc_json_imported_ok:"Importado correctamente",fc_json_copied:"Copiado al portapapeles",fc_json_invalid:"JSON no vรกlido",fc_json_upload:"Subir archivo",fc_json_file_error:"No se pudo leer el archivo.",fc_create_field_title:"Aรฑadir campo",fc_create_field_subtitle:"Elige del catรกlogo o crea un campo personalizado.",fc_create_from_catalog:"Del catรกlogo ({{count}})",fc_create_custom:"Campo personalizado",fc_create_search_specs:"Buscar specsโฆ",fc_create_no_specs:"Sin specs coincidentes.",fc_create_label_required:"Etiqueta *",fc_create_label_placeholder:"p. ej., Nombre del Cliente",fc_create_namespace:"Namespace",fc_create_namespace_placeholder:"p. ej., customer.name (auto si vacรญo)",fc_create_schema:"Schema",fc_create_options:"Opciones",fc_create_option_value_placeholder:"valor",fc_create_option_label_placeholder:"Etiqueta",fc_create_cancel:"Cancelar",fc_create_create:"Crear",fc_field_props:"Propiedades del campo",fc_field_no_selected:"Ningรบn campo seleccionado.",fc_field_label:"Etiqueta *",fc_field_namespace:"Namespace",fc_field_placeholder:"Placeholder",fc_field_help:"Texto de ayuda",fc_field_required:"Obligatorio",fc_field_required_hint:"El usuario debe rellenarlo antes de continuar.",fc_field_actor:"Actor",fc_field_actor_customer:"Cliente",fc_field_actor_operator:"Operador",fc_field_widget:"Widget",fc_field_widget_auto:"Automรกtico",fc_field_widget_text:"Texto",fc_field_widget_textarea:"รrea de texto",fc_field_widget_select:"Lista",fc_field_widget_radio:"Radio",fc_field_widget_date:"Fecha",fc_field_widget_time:"Hora",fc_field_widget_datetime:"Fecha y hora",fc_field_widget_currency:"Moneda",fc_field_widget_upload:"Subida",fc_field_widget_email:"Email",fc_field_widget_phone:"Telรฉfono",fc_field_widget_location:"Ubicaciรณn",fc_field_widget_boolean:"Booleano (Sรญ/No)",fc_field_allow_future:"Permitir fechas futuras",fc_field_allow_future_hint:"Permitir fechas posteriores a hoy.",fc_field_display_style:"Estilo de presentaciรณn",fc_field_display_auto:"Automรกtico (radio โค5, dropdown >5)",fc_field_display_radio:"Lista radio",fc_field_display_radio_horizontal:"Lista radio horizontal",fc_field_display_dropdown:"Dropdown",fc_field_display_segmented:"Botones segmentados",fc_field_display_hint:"Controla cรณmo se muestran las opciones en runtime.",fc_field_display_switch:"Switch (toggle)",fc_field_display_yesno:"Segmentado (botones Sรญ / No)",fc_field_boolean_hint:"Sustituye las etiquetas Sรญ/No aรฑadiendo 2 opciones debajo (primera = true, segunda = false).",fc_field_options:"Opciones",fc_field_no_options:"Aรบn sin opciones.",fc_field_upload_validation:"Validaciรณn de la subida",fc_field_upload_accept:"Tipos MIME/extensiones aceptados",fc_field_upload_max:"Tamaรฑo mรกximo (MB)",fc_field_dynamic_rules:"Reglas dinรกmicas",fc_field_dynamic_rules_hint:"Muestra, habilita o exige este campo segรบn otras respuestas.",fc_field_visible_when:"Mostrar cuando",fc_field_visible_when_hint:"Cuando la condiciรณn es falsa, el campo se oculta y su valor se borra.",fc_field_enabled_when:"Habilitar cuando",fc_field_enabled_when_hint:"Cuando la condiciรณn es falsa, el campo se muestra como solo lectura.",fc_field_required_when:"Obligatorio cuando",fc_field_required_when_hint:'Sustituye la opciรณn estรกtica "Obligatorio" mientras el campo estรก visible.',fc_field_always_visible:"Siempre visible",fc_field_always_enabled:"Siempre habilitado",fc_field_required_static:'Usar opciรณn estรกtica "Obligatorio"',fc_field_rule_active:"Regla activa",fc_field_computed:"Valor calculado",fc_field_computed_hint:"Calcular este campo automรกticamente a partir de otros campos. El resultado es de solo lectura.",fc_field_width:"Ancho del campo",fc_field_width_hint:"Ancho dentro de una fila horizontal (en mรณvil siempre es ancho completo).",fc_field_width_auto:"Automรกtico (repartir la fila)",fc_field_width_full:"Completo (3/3)",fc_field_computed_operation:"Operaciรณn",fc_field_computed_op_sum:"Suma (+)",fc_field_computed_op_subtract:"Resta (โ)",fc_field_computed_op_multiply:"Multiplicaciรณn (ร)",fc_field_computed_op_divide:"Divisiรณn (รท)",fc_field_computed_precision:"Decimales",fc_field_computed_operands:"Campos operandos",fc_field_computed_add_operand:"Aรฑadir un campoโฆ",fc_field_computed_missing_operand:"(campo no encontrado)",fc_field_computed_no_fields:"No hay otros campos disponibles para usar como operandos.",fc_field_computed_all_added:"Todos los campos disponibles ya estรกn aรฑadidos.",fc_field_delete:"Eliminar campo",fc_field_done:"Listo",fc_field_confirm_delete:"ยฟEliminar este campo del catรกlogo (y de todas las filas que lo usan)?",theme_button:"Tema",theme_reset:"Restablecer",theme_colors:"Colores",theme_primary:"Primario",theme_background:"Fondo",theme_card:"Tarjeta",theme_foreground:"Texto",theme_color_picker_aria:"Selector de color {{label}}",theme_color_placeholder:"p. ej., 222 47% 11%",theme_color_hint:"Elige un color o escribe un triplet HSL",theme_typography:"Tipografรญa",theme_heading_font:"Fuente de tรญtulos",theme_body_font:"Fuente del cuerpo",theme_font_default:"Predeterminada",theme_font_size:"Tamaรฑo base de fuente (px)",theme_shape_spacing:"Forma y espaciado",theme_border_radius:"Radio de bordes (rem)",theme_spacing:"Espaciado",theme_spacing_cozy_default:"Cรณmodo (predeterminado)",theme_spacing_compact:"Compacto",theme_spacing_cozy:"Cรณmodo",theme_spacing_spacious:"Espacioso",theme_live_preview:"Vista previa",theme_heading_sample:"Ejemplo de tรญtulo",theme_body_sample:"El veloz murciรฉlago hindรบ comรญa feliz cardillo y kiwi. El texto del cuerpo usa la fuente, tamaรฑo y espaciado que elegiste.",theme_input_sample:"Input de ejemplo",theme_primary_action:"Acciรณn primaria",runner_toast_required_fields:"Completa los campos obligatorios.",runner_toast_api_failed:"La llamada a la API fallรณ.",runner_toast_answers_copied:"ยกRespuestas copiadas al portapapeles!",runner_toast_partial_saved:"Respuestas parciales guardadas (registradas).",runner_toast_file_uploaded:"Subido {{name}} para {{key}}",runner_loading_preview:"Cargando vista previaโฆ",runner_no_form:"Ningรบn formulario configurado.",runner_back_to_builder:"Volver al constructor",runner_preset_full:"Completo",runner_iframe_title:"Vista previa del formulario",import_invalid_json:"JSON invรกlido: no se pudo analizar la entrada.",import_success:"Journey importada con รฉxito",import_clipboard_failed:"No se pudo leer el portapapeles",shortcut_selected_nodes_one:"{{count}} nodo seleccionado",shortcut_selected_nodes_other:"{{count}} nodos seleccionados",shortcut_deleted:"Eliminado",shortcut_undo:"Deshacer",shortcut_redo:"Rehacer",shortcut_copied:"Copiado al portapapeles",shortcut_pasted:"Pegado",shortcut_duplicated:"Duplicado"},$g={back:"Voltar",next:"Seguinte",reset:"Reiniciar",cancel:"Cancelar",submit:"Submeter",save:"Guardar",delete:"Eliminar",close:"Fechar",empty:"(vazio)",path:"Caminho",unknown:"Desconhecido",runner_title:"Formulรกrio",runner_save_exit:"Guardar e Sair",runner_ready_title:"Antes de comeรงar, garanta que tem os seguintes dados:",runner_onboarding_subtitle:"Antes de comeรงar, garanta que tem os seguintes dados:",runner_onboarding_line1:"Antes de comeรงar, por favor tenha preparada a informaรงรฃo relevante sobre o ocorrido.",runner_onboarding_line2:"Poderemos pedir detalhes como a descriรงรฃo do ocorrido, a data, a localizaรงรฃo ou documentos de apoio.",runner_onboarding_photos:"Fotos do incidente (dano, local, contexto)",runner_onboarding_documents:"Documentos relevantes (apรณlice, identificaรงรฃo, etc.)",runner_onboarding_datetime:"Data e hora do ocorrido",runner_onboarding_location:"Localizaรงรฃo",runner_onboarding_description:"Descriรงรฃo breve do que aconteceu",runner_start_claim:"Comeรงar participaรงรฃo",runner_review_title:"Reveja as suas respostas",runner_no_answers:"Nenhuma resposta registada.",runner_summary_all_answers:"Todas as respostas",runner_review:"Rever",runner_step:"Passo {{step}}/{{total}}",runner_no_journey:"Ainda nรฃo foi criado nenhum percurso.",runner_no_data:"Dados do percurso indisponรญveis.",builder_title:"Construtor de Percursos",builder_read_only:"Sรณ Leitura",builder_publish:"Publicar",builder_unlock_edit:"Desbloquear Ediรงรฃo",builder_open_runner:"Abrir Formulรกrio",builder_auto_layout:"Disposiรงรฃo Auto",builder_export_json:"Exportar JSON",builder_export_copied:"Especificaรงรฃo copiada para a รกrea de transferรชncia",specs_title:"Propriedades",specs_search_placeholder:"Pesquisar...",specs_filter_all:"Todos os Tipos",specs_create_custom:"Criar Campo Personalizado",specs_count:"{{filtered}} de {{total}} propriedades",specs_no_results:"Nenhuma propriedade encontrada",props_select_hint:"Selecione um nรณ ou aresta para editar",props_drag_hint:"Arraste propriedades do painel esquerdo para a tela para criar nรณs",node_props_title:"Propriedades do Nรณ",node_schema_type:"Tipo de Schema",node_source_spec:"ID da Propriedade",node_namespace:"Namespace",node_required:"Obrigatรณrio",node_required_hint:"Bloquear navegaรงรฃo se vazio",node_original_label:"Etiqueta Original",node_label_override:"Etiqueta Personalizada (opcional)",node_label_override_placeholder:"Etiqueta personalizadaโฆ",node_actor:"Ator",node_actor_customer:"Cliente",node_actor_operator:"Operador",node_widget:"Widget",node_widget_auto:"Automรกtico (do schema)",node_widget_text:"Campo de Texto",node_widget_textarea:"รrea de Texto",node_widget_select:"Lista Suspensa",node_widget_radio:"Grupo de Rรกdio",node_widget_datepicker:"Seletor de Data",node_widget_timepicker:"Seletor de Hora",node_widget_datetimepicker:"Seletor de Data e Hora",node_widget_currency:"Campo Monetรกrio",node_widget_upload:"Carregamento de Ficheiro",node_widget_email:"Email",node_widget_phone:"Telefone",node_widget_location:"Localizaรงรฃo",node_allow_future:"Permitir datas futuras",node_allow_future_hint:"Quando desativado, sรณ permite datas passadas ou hoje",node_bindings_title:"Ligaรงรตes",node_bindings_target:"Namespace Destino",node_bindings_add:"Adicionar Binding",node_delete:"Eliminar Nรณ",node_options_title:"Opรงรตes",upload_config_title:"Configuraรงรฃo de Upload",upload_file_type_preset:"Tipo de ficheiro",upload_any_file:"Qualquer ficheiro",upload_images_only:"Apenas imagens",upload_documents_only:"Apenas documentos",upload_images_pdf:"Imagens + PDFs",upload_custom:"Personalizado",upload_accepted_types:"Tipos aceites (personalizado)",upload_accepted_types_placeholder:"ex: image/*,.pdf",upload_max_size:"Tamanho mรกximo (MB)",upload_max_size_placeholder:"ex: 10",upload_max_files:"Nรบmero mรกximo de ficheiros",edge_props_title:"Propriedades da Aresta",edge_connection:"Ligaรงรฃo",edge_default:"Aresta Padrรฃo",edge_default_hint:"Usada quando nenhuma outra condiรงรฃo coincide",edge_priority:"Prioridade",edge_priority_hint:"Arestas com maior prioridade sรฃo avaliadas primeiro",edge_quick_pick:"Seleรงรฃo rรกpida das opรงรตes:",edge_condition:"Condiรงรฃo",edge_visual:"Visual",edge_advanced:"Avanรงado",edge_json_logic:"Condiรงรฃo JSON Logic",edge_delete:"Eliminar Aresta",preview_title:"Prรฉ-visualizaรงรฃo",preview_step_of:"Passo {{current}} de {{total}}",preview_start:"Iniciar Prรฉ-visualizaรงรฃo",preview_add_nodes_hint:"Adicione nรณs ร tela para prรฉ-visualizar o fluxo.",preview_start_hint:'Clique em "Iniciar Prรฉ-visualizaรงรฃo" para testar o fluxo interativamente.',preview_no_node:"Nenhum nรณ selecionado.",preview_required_hint:"Este campo รฉ obrigatรณrio",preview_validation_hint:"Corrija os erros de validaรงรฃo primeiro",import_title:"Importar Especificaรงรฃo",import_description:"Carregue um ficheiro JSON ou cole o JSON para popular a tela.",import_paste_tab:"Colar JSON",import_upload_tab:"Carregar Ficheiro",import_paste_clipboard:"Colar da รrea de Transferรชncia",import_placeholder:'{"journey_id": "...", "nodes": [...], "edges": [...]}',import_button:"Importar",import_validation_errors:"Erros de validaรงรฃo:",validation_title:"Validaรงรฃo do Grafo",validation_no_issues:"Sem problemas encontrados",validation_issue_count:"{{count}} problema{{plural}} encontrado{{plural}}",validation_good:"O grafo estรก correto!",validation_no_issues_actor:"Sem problemas",validation_validate:"Validar",create_node_title:"Criar Campo Personalizado",create_node_label:"Etiqueta *",create_node_label_placeholder:"Introduza uma etiqueta",create_node_namespace:"Namespace",create_node_namespace_hint:"Gerado automaticamente a partir da etiqueta.",create_node_schema:"Tipo de Schema",upload_drag_drop:"Arraste e largue um ficheiro aqui, ou clique para selecionar",upload_drag_drop_multiple:"Arraste e largue ficheiros aqui, ou clique para selecionar",upload_uploading:"A carregarโฆ",upload_files_count:"{{count}} ficheiro(s) carregado(s)",upload_max_reached:"Mรกximo de {{max}} ficheiros atingido",widget_unknown_schema:"Tipo de schema desconhecido: {{schema}}",widget_yes:"Sim",widget_no:"Nรฃo",widget_no_widget:"Nenhum widget disponรญvel para este tipo de campo.",widget_no_options:"Nenhuma opรงรฃo configurada para este campo de seleรงรฃo.",widget_pick_date:"Selecionar data",widget_invalid_date:"Introduza uma data vรกlida",widget_pick_time:"Selecionar hora",widget_select_option:"Selecionar uma opรงรฃo...",widget_search_country:"Pesquisar paรญs...",widget_no_country:"Paรญs nรฃo encontrado.",widget_invalid_phone:"Introduza um nรบmero de telefone vรกlido",widget_invalid_email:"Introduza um e-mail vรกlido",widget_file_too_large:"O ficheiro excede o limite de {{max}} MB ({{size}} MB)",widget_file_type_rejected:"Tipo de ficheiro nรฃo aceite. Permitidos: {{accept}}",widget_upload_failed:"Falha ao carregar",widget_accepted_hint:"Aceites: {{accept}}",widget_max_size_hint:"Mรกx {{max}} MB",location_placeholder:"Comece a digitar um endereรงoโฆ",location_no_api_key:"ร necessรกria uma chave de API do Google Maps para o widget de localizaรงรฃo.",placeholder_text:"Inserirโฆ",placeholder_select:"Selecionarโฆ",placeholder_currency:"0,00",placeholder_phone:"555 000 0000",placeholder_email:"email@exemplo.com",placeholder_date:"Selecionar dataโฆ",not_found_title:"404",not_found_message:"Pรกgina nรฃo encontrada",not_found_link:"Voltar ao Inรญcio",runner_page_back:"Construtor",fc_title:"Configurador de Formulรกrio",fc_read_only:"Sรณ leitura",fc_undo:"Desfazer",fc_redo:"Refazer",fc_preview_form:"Prรฉ-visualizar",fc_save:"Guardar",fc_publish:"Publicar",fc_unlock_edit:"Desbloquear ediรงรฃo",fc_tab_steps:"Passos",fc_tab_fields:"Campos",fc_tab_init:"Inicializaรงรฃo",fc_tab_json:"JSON",fc_flow_validation_title:"Validaรงรฃo do Fluxo",fc_flow_validation_validate:"Validar Fluxo",fc_flow_validation_no_issues:"Sem problemas no fluxo",fc_flow_validation_good:"O fluxo estรก correto!",fc_flow_validation_no_issues_step:"Sem problemas",fc_flow_validation_broken_reference:"Referรชncia Partida",fc_flow_validation_unreachable_step:"Passo Inalcansรกvel",fc_flow_validation_dead_end:"Sem Saรญda",fc_flow_validation_cycle:"Ciclo de Navegaรงรฃo",fc_flow_validation_no_fallback_rule:"Sem Regra de Fallback",fc_flow_validation_general:"Geral",fc_form_steps:"Passos do Formulรกrio",fc_add_step:"Adicionar Passo",fc_step_untitled:"(sem tรญtulo)",fc_step_meta:"{{rows}} linhas, {{fields}} campos",fc_no_steps:"Ainda sem passos.",fc_no_steps_hint_click:"Clique em",fc_no_steps_hint_to_begin:"para comeรงar.",fc_confirm_title:"Tem a certeza?",fc_confirm_delete_step:"Eliminar este passo?",fc_step_empty_select:"Selecione um passo ร esquerda.",fc_step_empty_create:"Adicione um passo no painel ร esquerda para comeรงar.",fc_step_title_label:"Tรญtulo do Passo",fc_step_title_placeholder:"Tรญtulo do passo",fc_step_description_label:"Descriรงรฃo",fc_step_description_placeholder:"Opcional",fc_add_row:"Adicionar Linha",fc_row_n:"Linha {{n}}",fc_layout_horizontal:"Horizontal",fc_layout_vertical:"Vertical",fc_confirm_delete_row:"Eliminar esta linha?",fc_add_field_btn:"Adicionar campo",fc_no_fields:"Sem campos.",fc_edit:"Editar",fc_remove_from_row:"Remover da linha",fc_row_title_placeholder:"Tรญtulo da secรงรฃo (opcional)",fc_row_show_divider:"Divisรณria",fc_nav_title:"Navegaรงรฃo do Passo",fc_nav_api_call:"Chamada API ao continuar",fc_nav_api_call_hint:"Executada antes de avaliar as regras.",fc_nav_body_template:"Template do body (JSON)",fc_nav_body_template_hint_prefix:"Use tokens",fc_nav_body_template_hint_suffix:".",fc_nav_on_error:"Em caso de erro",fc_nav_on_error_block:"Bloquear โ permanece neste passo",fc_nav_on_error_continue:"Continuar โ avalia as regras na mesma",fc_nav_on_error_goto:"Ir para: {{step}}",fc_nav_on_error_summary:"Ir para: Resumo",fc_nav_on_error_hint:"O que acontece se a chamada falhar ou a rede cair.",fc_nav_continue_button:"Botรฃo continuar",fc_nav_continue_placeholder:"Continuar",fc_nav_rules:"Regras de navegaรงรฃo",fc_nav_add_rule:"Adicionar regra",fc_nav_rules_hint:'Regras avaliadas por ordem. Vence a primeira. Use "sempre" como รบltimo fallback.',fc_nav_rule_n:"Regra {{n}}",fc_nav_has_condition:"Tem condiรงรฃo",fc_nav_go_to:"Ir para",fc_nav_submit_form:"โ Submeter formulรกrio โ",fc_nav_field_requires_value:'O campo "{{label}}" requer um valor.',fc_summary_panel:"Painel de Resumo",fc_summary_title_label:"Tรญtulo do Resumo",fc_summary_show_sidebar:"Mostrar resumo em progresso",fc_summary_show_sidebar_hint:"Apresenta a barra lateral de resumo enquanto o utilizador avanรงa na jornada.",fc_summary_sections:"Secรงรตes",fc_summary_add_section:"Adicionar Secรงรฃo",fc_summary_section_title_placeholder:"Tรญtulo da secรงรฃo",fc_summary_visible_from:"Visรญvel a partir do passo",fc_summary_until_step:"Atรฉ ao passo (opcional)",fc_summary_all_steps:"Todos os passos",fc_summary_step_n:"Passo {{n}}",fc_summary_display_fields:"Campos a Mostrar",fc_summary_add:"Adicionar",fc_summary_no_display_fields:"Ainda sem campos a mostrar.",fc_summary_no_sections:"Ainda sem secรงรตes.",fc_summary_confirm_delete_section:"Eliminar esta secรงรฃo?",fc_summary_source:"Origem",fc_summary_source_form_field:"Campo do Formulรกrio",fc_summary_source_api_response:"Resposta da API",fc_summary_format:"Formato",fc_summary_format_text:"Texto",fc_summary_format_number:"Nรบmero",fc_summary_format_currency:"Moeda",fc_summary_format_date:"Data",fc_summary_format_datetime:"Data e Hora",fc_summary_display_label:"Etiqueta",fc_summary_display_label_placeholder:"Etiqueta a apresentar",fc_summary_field:"Campo",fc_summary_select:"Selecionarโฆ",fc_summary_from_step_api:"Do API do passo",fc_summary_response_path:"Caminho da resposta (notaรงรฃo por pontos)",fc_fields_catalog:"Catรกlogo de campos",fc_fields_catalog_hint:"Todos os campos usados no formulรกrio. Editar aqui atualiza-os em todo o lado.",fc_fields_add:"Adicionar Campo",fc_fields_search:"Pesquisar camposโฆ",fc_fields_filter_all:"Todos",fc_fields_filter_used:"Usados",fc_fields_filter_unused:"Nรฃo usados",fc_fields_unused_badge:"Nรฃo usado",fc_fields_used_in_one:"Usado em {{count}} passo",fc_fields_used_in_many:"Usado em {{count}} passos",fc_fields_go_to_step:'Ir para o passo "{{title}}"',fc_fields_no_fields:"Ainda sem campos.",fc_fields_no_match:"Nenhum campo corresponde ao filtro.",fc_fields_confirm_delete:"Eliminar este campo?",fc_init_title:"Valores iniciais",fc_init_subtitle:"Respostas estรกticas prรฉ-carregadas no runner antes do utilizador comeรงar.",fc_init_static:"Valores estรกticos",fc_init_add:"Adicionar",fc_init_no_values:"Ainda sem valores iniciais.",fc_init_prefill:"Prรฉ-preencher a partir de API",fc_init_prefill_hint:"Obter respostas de um endpoint quando o runner monta.",fc_init_mapping:"Mapeamento (JSON: namespace โ response_path)",fc_json_title:"JSON",fc_json_hint:"JourneySpec em bruto (form_config + theme). Edite e clique em Aplicar para atualizar o configurador.",fc_json_refresh:"Recarregar do configurador",fc_json_refresh_hint:"Descarta as ediรงรตes do JSON e recarrega o estado atual do configurador",fc_json_copy:"Copiar",fc_json_download:"Descarregar",fc_json_import:"Aplicar alteraรงรตes",fc_json_apply_hint:"Aplica as ediรงรตes do JSON ao configurador",fc_json_imported_ok:"Importado com sucesso",fc_json_copied:"Copiado para a รกrea de transferรชncia",fc_json_invalid:"JSON invรกlido",fc_json_upload:"Carregar Ficheiro",fc_json_file_error:"Nรฃo foi possรญvel ler o ficheiro.",fc_create_field_title:"Adicionar campo",fc_create_field_subtitle:"Escolha do catรกlogo ou crie um campo personalizado.",fc_create_from_catalog:"Do catรกlogo ({{count}})",fc_create_custom:"Campo personalizado",fc_create_search_specs:"Pesquisar specsโฆ",fc_create_no_specs:"Sem specs correspondentes.",fc_create_label_required:"Etiqueta *",fc_create_label_placeholder:"ex.: Nome do Cliente",fc_create_namespace:"Namespace",fc_create_namespace_placeholder:"ex.: customer.name (automรกtico se vazio)",fc_create_schema:"Schema",fc_create_options:"Opรงรตes",fc_create_option_value_placeholder:"valor",fc_create_option_label_placeholder:"Etiqueta",fc_create_cancel:"Cancelar",fc_create_create:"Criar",fc_field_props:"Propriedades do campo",fc_field_no_selected:"Nenhum campo selecionado.",fc_field_label:"Etiqueta *",fc_field_namespace:"Namespace",fc_field_placeholder:"Placeholder",fc_field_help:"Texto de ajuda",fc_field_required:"Obrigatรณrio",fc_field_required_hint:"O utilizador tem de preencher antes de continuar.",fc_field_actor:"Ator",fc_field_actor_customer:"Cliente",fc_field_actor_operator:"Operador",fc_field_widget:"Widget",fc_field_widget_auto:"Automรกtico",fc_field_widget_text:"Texto",fc_field_widget_textarea:"รrea de texto",fc_field_widget_select:"Lista",fc_field_widget_radio:"Radio",fc_field_widget_date:"Data",fc_field_widget_time:"Hora",fc_field_widget_datetime:"Data e Hora",fc_field_widget_currency:"Moeda",fc_field_widget_upload:"Upload",fc_field_widget_email:"Email",fc_field_widget_phone:"Telefone",fc_field_widget_location:"Localizaรงรฃo",fc_field_widget_boolean:"Booleano (Sim/Nรฃo)",fc_field_allow_future:"Permitir datas futuras",fc_field_allow_future_hint:"Permitir datas apรณs hoje.",fc_field_display_style:"Estilo de apresentaรงรฃo",fc_field_display_auto:"Automรกtico (radio โค5, dropdown >5)",fc_field_display_radio:"Lista radio",fc_field_display_radio_horizontal:"Lista radio horizontal",fc_field_display_dropdown:"Dropdown",fc_field_display_segmented:"Botรตes segmentados",fc_field_display_hint:"Controla como as opรงรตes aparecem em runtime.",fc_field_display_switch:"Switch (toggle)",fc_field_display_yesno:"Segmentado (botรตes Sim / Nรฃo)",fc_field_boolean_hint:"Substitua as etiquetas Sim/Nรฃo adicionando 2 opรงรตes abaixo (primeira = true, segunda = false).",fc_field_options:"Opรงรตes",fc_field_no_options:"Ainda sem opรงรตes.",fc_field_upload_validation:"Validaรงรฃo do upload",fc_field_upload_accept:"Tipos MIME/extensรตes aceites",fc_field_upload_max:"Tamanho mรกximo (MB)",fc_field_dynamic_rules:"Regras dinรขmicas",fc_field_dynamic_rules_hint:"Mostre, ative ou torne obrigatรณrio este campo com base noutras respostas.",fc_field_visible_when:"Mostrar quando",fc_field_visible_when_hint:"Quando a condiรงรฃo for falsa, o campo รฉ ocultado e o seu valor รฉ limpo.",fc_field_enabled_when:"Habilitar quando",fc_field_enabled_when_hint:"Quando a condiรงรฃo for falsa, o campo รฉ apresentado como apenas leitura.",fc_field_required_when:"Obrigatรณrio quando",fc_field_required_when_hint:'Substitui a definiรงรฃo estรกtica "Obrigatรณrio" enquanto o campo estiver visรญvel.',fc_field_always_visible:"Sempre visรญvel",fc_field_always_enabled:"Sempre habilitado",fc_field_required_static:'Usar definiรงรฃo estรกtica "Obrigatรณrio"',fc_field_rule_active:"Regra ativa",fc_field_computed:"Valor calculado",fc_field_computed_hint:"Calcular este campo automaticamente a partir de outros campos. O resultado รฉ sรณ de leitura.",fc_field_width:"Largura do campo",fc_field_width_hint:"Largura dentro de uma linha horizontal (no mobile รฉ sempre largura total).",fc_field_width_auto:"Automรกtica (dividir igualmente)",fc_field_width_full:"Total (3/3)",fc_field_computed_operation:"Operaรงรฃo",fc_field_computed_op_sum:"Soma (+)",fc_field_computed_op_subtract:"Subtraรงรฃo (โ)",fc_field_computed_op_multiply:"Multiplicaรงรฃo (ร)",fc_field_computed_op_divide:"Divisรฃo (รท)",fc_field_computed_precision:"Casas decimais",fc_field_computed_operands:"Campos operandos",fc_field_computed_add_operand:"Adicionar um campoโฆ",fc_field_computed_missing_operand:"(campo nรฃo encontrado)",fc_field_computed_no_fields:"Sem outros campos disponรญveis para usar como operandos.",fc_field_computed_all_added:"Todos os campos disponรญveis jรก foram adicionados.",fc_field_delete:"Eliminar campo",fc_field_done:"Concluรญdo",fc_field_confirm_delete:"Eliminar este campo do catรกlogo (e de todas as linhas que o usam)?",theme_button:"Tema",theme_reset:"Repor",theme_colors:"Cores",theme_primary:"Primรกria",theme_background:"Fundo",theme_card:"Cartรฃo",theme_foreground:"Texto",theme_color_picker_aria:"Seletor de cor {{label}}",theme_color_placeholder:"ex.: 222 47% 11%",theme_color_hint:"Escolha uma cor ou escreva um triplet HSL",theme_typography:"Tipografia",theme_heading_font:"Fonte dos tรญtulos",theme_body_font:"Fonte do corpo",theme_font_default:"Predefinido",theme_font_size:"Tamanho base da fonte (px)",theme_shape_spacing:"Forma e espaรงamento",theme_border_radius:"Raio das bordas (rem)",theme_spacing:"Espaรงamento",theme_spacing_cozy_default:"Cรณmodo (predefinido)",theme_spacing_compact:"Compacto",theme_spacing_cozy:"Cรณmodo",theme_spacing_spacious:"Espaรงoso",theme_live_preview:"Prรฉ-visualizaรงรฃo",theme_heading_sample:"Exemplo de tรญtulo",theme_body_sample:"A rรกpida raposa castanha salta sobre o cรฃo preguiรงoso. O texto do corpo usa a fonte, tamanho e espaรงamento que escolheu.",theme_input_sample:"Input de exemplo",theme_primary_action:"Aรงรฃo primรกria",runner_toast_required_fields:"Preencha os campos obrigatรณrios.",runner_toast_api_failed:"A chamada ร API falhou.",runner_toast_answers_copied:"Respostas copiadas para a รกrea de transferรชncia!",runner_toast_partial_saved:"Respostas parciais guardadas (registadas).",runner_toast_file_uploaded:"Enviado {{name}} para {{key}}",runner_loading_preview:"A carregar prรฉ-visualizaรงรฃoโฆ",runner_no_form:"Nenhum formulรกrio configurado.",runner_back_to_builder:"Voltar ao construtor",runner_preset_full:"Total",runner_iframe_title:"Prรฉ-visualizaรงรฃo do formulรกrio",import_invalid_json:"JSON invรกlido: nรฃo foi possรญvel analisar a entrada.",import_success:"Journey importada com sucesso",import_clipboard_failed:"Nรฃo foi possรญvel ler a รกrea de transferรชncia",shortcut_selected_nodes_one:"{{count}} nรณ selecionado",shortcut_selected_nodes_other:"{{count}} nรณs selecionados",shortcut_deleted:"Eliminado",shortcut_undo:"Desfazer",shortcut_redo:"Refazer",shortcut_copied:"Copiado para a รกrea de transferรชncia",shortcut_pasted:"Colado",shortcut_duplicated:"Duplicado"},Lg={back:"Wstecz",next:"Dalej",reset:"Resetuj",cancel:"Anuluj",submit:"Wyลlij",save:"Zapisz",delete:"Usuล",close:"Zamknij",empty:"(puste)",path:"ลcieลผka",unknown:"Nieznany",runner_title:"Formularz",runner_save_exit:"Zapisz i wyjdลบ",runner_ready_title:"Zanim zaczniesz, upewnij siฤ, ลผe masz nastฤpujฤ
ce dane:",runner_onboarding_subtitle:"Zanim zaczniesz, upewnij siฤ, ลผe masz nastฤpujฤ
ce dane:",runner_onboarding_line1:"Zanim zaczniesz, proszฤ przygotuj odpowiednie informacje o zdarzeniu.",runner_onboarding_line2:"Moลผemy poprosiฤ o szczegรณลy, takie jak opis zdarzenia, datฤ, lokalizacjฤ lub dokumenty pomocnicze.",runner_onboarding_photos:"Zdjฤcia incydentu (szkoda, miejsce, kontekst)",runner_onboarding_documents:"Istotne dokumenty (polisa, dowรณd toลผsamoลci itp.)",runner_onboarding_datetime:"Data i godzina zdarzenia",runner_onboarding_location:"Lokalizacja",runner_onboarding_description:"Krรณtki opis tego, co siฤ wydarzyลo",runner_start_claim:"Rozpocznij zgลoszenie",runner_review_title:"Przejrzyj swoje odpowiedzi",runner_no_answers:"Brak zarejestrowanych odpowiedzi.",runner_summary_all_answers:"Wszystkie odpowiedzi",runner_review:"Przeglฤ
d",runner_step:"Krok {{step}}/{{total}}",runner_no_journey:"Nie utworzono jeszcze ลผadnej ลcieลผki.",runner_no_data:"Dane ลcieลผki niedostฤpne.",builder_title:"Kreator ลcieลผek",builder_read_only:"Tylko do odczytu",builder_publish:"Publikuj",builder_unlock_edit:"Odblokuj edycjฤ",builder_open_runner:"Otwรณrz formularz",builder_auto_layout:"Auto-ukลad",builder_export_json:"Eksportuj JSON",builder_export_copied:"Specyfikacja skopiowana do schowka",specs_title:"Wลaลciwoลci",specs_search_placeholder:"Szukaj...",specs_filter_all:"Wszystkie typy",specs_create_custom:"Utwรณrz pole niestandardowe",specs_count:"{{filtered}} z {{total}} wลaลciwoลci",specs_no_results:"Nie znaleziono wลaลciwoลci",props_select_hint:"Wybierz wฤzeล lub krawฤdลบ do edycji",props_drag_hint:"Przeciฤ
gnij wลaลciwoลci z lewego panelu na pลรณtno, aby utworzyฤ wฤzลy",node_props_title:"Wลaลciwoลci wฤzลa",node_schema_type:"Typ schematu",node_source_spec:"ID wลaลciwoลci",node_namespace:"Namespace",node_required:"Wymagane",node_required_hint:"Blokuj nawigacjฤ, jeลli puste",node_original_label:"Oryginalna etykieta",node_label_override:"Etykieta niestandardowa (opcjonalna)",node_label_override_placeholder:"Etykieta niestandardowaโฆ",node_actor:"Aktor",node_actor_customer:"Klient",node_actor_operator:"Operator",node_widget:"Widลผet",node_widget_auto:"Automatyczny (ze schematu)",node_widget_text:"Pole tekstowe",node_widget_textarea:"Obszar tekstowy",node_widget_select:"Lista rozwijana",node_widget_radio:"Grupa radio",node_widget_datepicker:"Wybรณr daty",node_widget_timepicker:"Wybรณr godziny",node_widget_datetimepicker:"Wybรณr daty i godziny",node_widget_currency:"Pole walutowe",node_widget_upload:"Przesyลanie pliku",node_widget_email:"E-mail",node_widget_phone:"Telefon",node_widget_location:"Lokalizacja",node_allow_future:"Zezwรณl na przyszลe daty",node_allow_future_hint:"Gdy wyลฤ
czone, zezwala tylko na daty z przeszลoลci lub dzisiaj",node_bindings_title:"Powiฤ
zania",node_bindings_target:"Docelowy namespace",node_bindings_add:"Dodaj powiฤ
zanie",node_delete:"Usuล wฤzeล",node_options_title:"Opcje",upload_config_title:"Konfiguracja przesyลania",upload_file_type_preset:"Typ pliku",upload_any_file:"Dowolny plik",upload_images_only:"Tylko obrazy",upload_documents_only:"Tylko dokumenty",upload_images_pdf:"Obrazy + PDF",upload_custom:"Niestandardowy",upload_accepted_types:"Akceptowane typy (niestandardowe)",upload_accepted_types_placeholder:"np.: image/*,.pdf",upload_max_size:"Maksymalny rozmiar (MB)",upload_max_size_placeholder:"np.: 10",upload_max_files:"Maksymalna liczba plikรณw",edge_props_title:"Wลaลciwoลci krawฤdzi",edge_connection:"Poลฤ
czenie",edge_default:"Krawฤdลบ domyลlna",edge_default_hint:"Uลผywana, gdy ลผaden inny warunek nie jest speลniony",edge_priority:"Priorytet",edge_priority_hint:"Krawฤdzie o wyลผszym priorytecie sฤ
oceniane jako pierwsze",edge_quick_pick:"Szybki wybรณr opcji:",edge_condition:"Warunek",edge_visual:"Wizualny",edge_advanced:"Zaawansowany",edge_json_logic:"Warunek JSON Logic",edge_delete:"Usuล krawฤdลบ",preview_title:"Podglฤ
d",preview_step_of:"Krok {{current}} z {{total}}",preview_start:"Rozpocznij podglฤ
d",preview_add_nodes_hint:"Dodaj wฤzลy do pลรณtna, aby wyลwietliฤ podglฤ
d przepลywu.",preview_start_hint:"Kliknij โRozpocznij podglฤ
dโ, aby interaktywnie przetestowaฤ przepลyw.",preview_no_node:"Nie wybrano wฤzลa.",preview_required_hint:"To pole jest wymagane",preview_validation_hint:"Najpierw popraw bลฤdy walidacji",import_title:"Importuj specyfikacjฤ",import_description:"Wgraj plik JSON lub wklej JSON, aby wypeลniฤ pลรณtno.",import_paste_tab:"Wklej JSON",import_upload_tab:"Wgraj plik",import_paste_clipboard:"Wklej ze schowka",import_placeholder:'{"journey_id": "...", "nodes": [...], "edges": [...]}',import_button:"Importuj",import_validation_errors:"Bลฤdy walidacji:",validation_title:"Walidacja grafu",validation_no_issues:"Nie znaleziono problemรณw",validation_issue_count:"Znaleziono {{count}} problem{{plural}}",validation_good:"Graf jest poprawny!",validation_no_issues_actor:"Brak problemรณw",validation_validate:"Waliduj",create_node_title:"Utwรณrz pole niestandardowe",create_node_label:"Etykieta *",create_node_label_placeholder:"Wprowadลบ etykietฤ",create_node_namespace:"Namespace",create_node_namespace_hint:"Generowany automatycznie z etykiety.",create_node_schema:"Typ schematu",upload_drag_drop:"Przeciฤ
gnij i upuลฤ plik tutaj lub kliknij, aby wybraฤ",upload_drag_drop_multiple:"Przeciฤ
gnij i upuลฤ pliki tutaj lub kliknij, aby wybraฤ",upload_uploading:"Przesyลanieโฆ",upload_files_count:"{{count}} plik(รณw) wysลanych",upload_max_reached:"Osiฤ
gniฤto limit {{max}} plikรณw",widget_unknown_schema:"Nieznany typ schematu: {{schema}}",widget_yes:"Tak",widget_no:"Nie",widget_no_widget:"Brak dostฤpnego widลผetu dla tego typu pola.",widget_no_options:"Brak skonfigurowanych opcji dla tego pola wyboru.",widget_pick_date:"Wybierz datฤ",widget_invalid_date:"Wprowadลบ prawidลowฤ
datฤ",widget_pick_time:"Wybierz godzinฤ",widget_select_option:"Wybierz opcjฤ...",widget_search_country:"Szukaj kraju...",widget_no_country:"Nie znaleziono kraju.",widget_invalid_phone:"Wprowadลบ prawidลowy numer telefonu",widget_invalid_email:"Wprowadลบ prawidลowy e-mail",widget_file_too_large:"Plik przekracza limit {{max}} MB ({{size}} MB)",widget_file_type_rejected:"Typ pliku nie jest akceptowany. Dozwolone: {{accept}}",widget_upload_failed:"Przesyลanie nie powiodลo siฤ",widget_accepted_hint:"Akceptowane: {{accept}}",widget_max_size_hint:"Maks. {{max}} MB",location_placeholder:"Zacznij wpisywaฤ adresโฆ",location_no_api_key:"Klucz API Google Maps jest wymagany dla widลผetu lokalizacji.",placeholder_text:"Wpiszโฆ",placeholder_select:"Wybierzโฆ",placeholder_currency:"0,00",placeholder_phone:"555 000 0000",placeholder_email:"email@przyklad.pl",placeholder_date:"Wybierz datฤโฆ",not_found_title:"404",not_found_message:"Strona nie znaleziona",not_found_link:"Powrรณt do strony gลรณwnej",runner_page_back:"Kreator",fc_title:"Konfigurator Formularza",fc_read_only:"Tylko do odczytu",fc_undo:"Cofnij",fc_redo:"Ponรณw",fc_preview_form:"Podglฤ
d",fc_save:"Zapisz",fc_publish:"Opublikuj",fc_unlock_edit:"Odblokuj edycjฤ",fc_tab_steps:"Kroki",fc_tab_fields:"Pola",fc_tab_init:"Inicjalizacja",fc_tab_json:"JSON",fc_flow_validation_title:"Walidacja Przepลywu",fc_flow_validation_validate:"Waliduj Przepลyw",fc_flow_validation_no_issues:"Nie znaleziono problemรณw z przepลywem",fc_flow_validation_good:"Przepลyw jest poprawny!",fc_flow_validation_no_issues_step:"Brak problemรณw",fc_flow_validation_broken_reference:"Uszkodzona Referencja",fc_flow_validation_unreachable_step:"Nieosiฤ
galny Krok",fc_flow_validation_dead_end:"ลlepy Zauลek",fc_flow_validation_cycle:"Cykl Nawigacji",fc_flow_validation_no_fallback_rule:"Brak Reguลy Awaryjnej",fc_flow_validation_general:"Ogรณlne",fc_form_steps:"Kroki Formularza",fc_add_step:"Dodaj Krok",fc_step_untitled:"(bez tytuลu)",fc_step_meta:"{{rows}} wierszy, {{fields}} pรณl",fc_no_steps:"Brak krokรณw.",fc_no_steps_hint_click:"Kliknij",fc_no_steps_hint_to_begin:"aby rozpoczฤ
ฤ.",fc_confirm_title:"Czy na pewno?",fc_confirm_delete_step:"Usunฤ
ฤ ten krok?",fc_step_empty_select:"Wybierz krok po lewej.",fc_step_empty_create:"Dodaj krok z lewego panelu, aby rozpoczฤ
ฤ.",fc_step_title_label:"Tytuล kroku",fc_step_title_placeholder:"Tytuล kroku",fc_step_description_label:"Opis",fc_step_description_placeholder:"Opcjonalnie",fc_add_row:"Dodaj wiersz",fc_row_n:"Wiersz {{n}}",fc_layout_horizontal:"Poziomy",fc_layout_vertical:"Pionowy",fc_confirm_delete_row:"Usunฤ
ฤ ten wiersz?",fc_add_field_btn:"Dodaj pole",fc_no_fields:"Brak pรณl.",fc_edit:"Edytuj",fc_remove_from_row:"Usuล z wiersza",fc_row_title_placeholder:"Tytuล sekcji (opcjonalny)",fc_row_show_divider:"Separator",fc_nav_title:"Nawigacja kroku",fc_nav_api_call:"Wywoลanie API przy kontynuacji",fc_nav_api_call_hint:"Wykonywane przed ocenฤ
reguล.",fc_nav_body_template:"Szablon body (JSON)",fc_nav_body_template_hint_prefix:"Uลผyj tokenรณw",fc_nav_body_template_hint_suffix:".",fc_nav_on_error:"W przypadku bลฤdu",fc_nav_on_error_block:"Zablokuj โ pozostaล na tym kroku",fc_nav_on_error_continue:"Kontynuuj โ oceล reguลy mimo to",fc_nav_on_error_goto:"Przejdลบ do: {{step}}",fc_nav_on_error_summary:"Przejdลบ do: Podsumowanie",fc_nav_on_error_hint:"Co siฤ dzieje, jeลli wywoลanie siฤ nie powiedzie lub sieฤ padnie.",fc_nav_continue_button:"Przycisk kontynuacji",fc_nav_continue_placeholder:"Kontynuuj",fc_nav_rules:"Reguลy nawigacji",fc_nav_add_rule:"Dodaj reguลฤ",fc_nav_rules_hint:'Reguลy oceniane po kolei. Wygrywa pierwsza. Uลผyj "zawsze" jako ostatniej.',fc_nav_rule_n:"Reguลa {{n}}",fc_nav_has_condition:"Ma warunek",fc_nav_go_to:"Przejdลบ do",fc_nav_submit_form:"โ Wyลlij formularz โ",fc_nav_field_requires_value:'Pole "{{label}}" wymaga wartoลci.',fc_summary_panel:"Panel podsumowania",fc_summary_title_label:"Tytuล podsumowania",fc_summary_show_sidebar:"Pokaลผ podsumowanie na ลผywo",fc_summary_show_sidebar_hint:"Wyลwietla panel podsumowania, gdy uลผytkownik przechodzi przez ลcieลผkฤ.",fc_summary_sections:"Sekcje",fc_summary_add_section:"Dodaj sekcjฤ",fc_summary_section_title_placeholder:"Tytuล sekcji",fc_summary_visible_from:"Widoczna od kroku",fc_summary_until_step:"Do kroku (opcjonalne)",fc_summary_all_steps:"Wszystkie kroki",fc_summary_step_n:"Krok {{n}}",fc_summary_display_fields:"Pola do wyลwietlenia",fc_summary_add:"Dodaj",fc_summary_no_display_fields:"Brak pรณl do wyลwietlenia.",fc_summary_no_sections:"Brak sekcji.",fc_summary_confirm_delete_section:"Usunฤ
ฤ tฤ sekcjฤ?",fc_summary_source:"ลนrรณdลo",fc_summary_source_form_field:"Pole formularza",fc_summary_source_api_response:"Odpowiedลบ API",fc_summary_format:"Format",fc_summary_format_text:"Tekst",fc_summary_format_number:"Liczba",fc_summary_format_currency:"Waluta",fc_summary_format_date:"Data",fc_summary_format_datetime:"Data i godzina",fc_summary_display_label:"Etykieta",fc_summary_display_label_placeholder:"Etykieta do wyลwietlenia",fc_summary_field:"Pole",fc_summary_select:"Wybierzโฆ",fc_summary_from_step_api:"Z API kroku",fc_summary_response_path:"ลcieลผka odpowiedzi (notacja z kropkami)",fc_fields_catalog:"Katalog pรณl",fc_fields_catalog_hint:"Wszystkie pola uลผywane w formularzu. Edycja tutaj aktualizuje wszฤdzie.",fc_fields_add:"Dodaj pole",fc_fields_search:"Szukaj pรณlโฆ",fc_fields_filter_all:"Wszystkie",fc_fields_filter_used:"Uลผywane",fc_fields_filter_unused:"Nieuลผywane",fc_fields_unused_badge:"Nieuลผywane",fc_fields_used_in_one:"Uลผywane w {{count}} kroku",fc_fields_used_in_many:"Uลผywane w {{count}} krokach",fc_fields_go_to_step:'Przejdลบ do kroku "{{title}}"',fc_fields_no_fields:"Brak pรณl.",fc_fields_no_match:"ลปadne pole nie pasuje do filtra.",fc_fields_confirm_delete:"Usunฤ
ฤ to pole?",fc_init_title:"Wartoลci poczฤ
tkowe",fc_init_subtitle:"Statyczne odpowiedzi wstฤpnie wczytane do runnera przed rozpoczฤciem.",fc_init_static:"Wartoลci statyczne",fc_init_add:"Dodaj",fc_init_no_values:"Brak wartoลci poczฤ
tkowych.",fc_init_prefill:"Wstฤpne wypeลnienie z API",fc_init_prefill_hint:"Pobierz odpowiedzi z endpointu przy montowaniu runnera.",fc_init_mapping:"Mapowanie (JSON: namespace โ response_path)",fc_json_title:"JSON",fc_json_hint:"Surowy JourneySpec (form_config + theme). Edytuj i kliknij Zastosuj, aby zaktualizowaฤ konfigurator.",fc_json_refresh:"Wczytaj z konfiguratora",fc_json_refresh_hint:"Odrzuฤ zmiany w JSON i wczytaj ponownie aktualny stan konfiguratora",fc_json_copy:"Kopiuj",fc_json_download:"Pobierz",fc_json_import:"Zastosuj zmiany",fc_json_apply_hint:"Zastosuj zmiany JSON w konfiguratorze",fc_json_imported_ok:"Zaimportowano pomyลlnie",fc_json_copied:"Skopiowano do schowka",fc_json_invalid:"Nieprawidลowy JSON",fc_json_upload:"Przeลlij plik",fc_json_file_error:"Nie udaลo siฤ odczytaฤ pliku.",fc_create_field_title:"Dodaj pole",fc_create_field_subtitle:"Wybierz z katalogu lub utwรณrz pole niestandardowe.",fc_create_from_catalog:"Z katalogu ({{count}})",fc_create_custom:"Pole niestandardowe",fc_create_search_specs:"Szukaj specsโฆ",fc_create_no_specs:"Brak pasujฤ
cych specs.",fc_create_label_required:"Etykieta *",fc_create_label_placeholder:"np. Nazwa klienta",fc_create_namespace:"Namespace",fc_create_namespace_placeholder:"np. customer.name (automatycznie jeลli puste)",fc_create_schema:"Schema",fc_create_options:"Opcje",fc_create_option_value_placeholder:"wartoลฤ",fc_create_option_label_placeholder:"Etykieta",fc_create_cancel:"Anuluj",fc_create_create:"Utwรณrz",fc_field_props:"Wลaลciwoลci pola",fc_field_no_selected:"Nie wybrano pola.",fc_field_label:"Etykieta *",fc_field_namespace:"Namespace",fc_field_placeholder:"Placeholder",fc_field_help:"Tekst pomocy",fc_field_required:"Wymagane",fc_field_required_hint:"Uลผytkownik musi wypeลniฤ przed kontynuacjฤ
.",fc_field_actor:"Aktor",fc_field_actor_customer:"Klient",fc_field_actor_operator:"Operator",fc_field_widget:"Widget",fc_field_widget_auto:"Automatyczny",fc_field_widget_text:"Tekst",fc_field_widget_textarea:"Pole tekstowe",fc_field_widget_select:"Lista",fc_field_widget_radio:"Radio",fc_field_widget_date:"Data",fc_field_widget_time:"Godzina",fc_field_widget_datetime:"Data i godzina",fc_field_widget_currency:"Waluta",fc_field_widget_upload:"Zaลฤ
cznik",fc_field_widget_email:"Email",fc_field_widget_phone:"Telefon",fc_field_widget_location:"Lokalizacja",fc_field_widget_boolean:"Boolean (Tak/Nie)",fc_field_allow_future:"Zezwรณl na przyszลe daty",fc_field_allow_future_hint:"Zezwรณl na daty po dzisiejszej.",fc_field_display_style:"Styl wyลwietlania",fc_field_display_auto:"Auto (radio โค5, dropdown >5)",fc_field_display_radio:"Lista radio",fc_field_display_radio_horizontal:"Lista radio pozioma",fc_field_display_dropdown:"Dropdown",fc_field_display_segmented:"Przyciski segmentowane",fc_field_display_hint:"Kontroluje wyglฤ
d opcji w runtime.",fc_field_display_switch:"Switch (przeลฤ
cznik)",fc_field_display_yesno:"Segmentowany (przyciski Tak / Nie)",fc_field_boolean_hint:"Nadpisz etykiety Tak/Nie dodajฤ
c 2 opcje poniลผej (pierwsza = true, druga = false).",fc_field_options:"Opcje",fc_field_no_options:"Brak opcji.",fc_field_upload_validation:"Walidacja zaลฤ
cznika",fc_field_upload_accept:"Akceptowane typy MIME/rozszerzenia",fc_field_upload_max:"Maksymalny rozmiar (MB)",fc_field_dynamic_rules:"Reguลy dynamiczne",fc_field_dynamic_rules_hint:"Pokazuj, wลฤ
czaj lub wymagaj tego pola na podstawie innych odpowiedzi.",fc_field_visible_when:"Pokaลผ gdy",fc_field_visible_when_hint:"Gdy warunek jest faลszywy, pole jest ukrywane, a jego wartoลฤ czyszczona.",fc_field_enabled_when:"Wลฤ
cz gdy",fc_field_enabled_when_hint:"Gdy warunek jest faลszywy, pole jest pokazywane tylko do odczytu.",fc_field_required_when:"Wymagane gdy",fc_field_required_when_hint:'Zastฤpuje statyczne ustawienie "Wymagane", gdy pole jest widoczne.',fc_field_always_visible:"Zawsze widoczne",fc_field_always_enabled:"Zawsze wลฤ
czone",fc_field_required_static:'Uลผyj statycznego ustawienia "Wymagane"',fc_field_rule_active:"Reguลa aktywna",fc_field_computed:"Wartoลฤ obliczana",fc_field_computed_hint:"Obliczaj to pole automatycznie na podstawie innych pรณl. Wynik jest tylko do odczytu.",fc_field_width:"Szerokoลฤ pola",fc_field_width_hint:"Szerokoลฤ w wierszu poziomym (na mobilnych zawsze peลna szerokoลฤ).",fc_field_width_auto:"Automatyczna (podziaล wiersza)",fc_field_width_full:"Peลna (3/3)",fc_field_computed_operation:"Operacja",fc_field_computed_op_sum:"Suma (+)",fc_field_computed_op_subtract:"Odejmowanie (โ)",fc_field_computed_op_multiply:"Mnoลผenie (ร)",fc_field_computed_op_divide:"Dzielenie (รท)",fc_field_computed_precision:"Miejsca dziesiฤtne",fc_field_computed_operands:"Pola operandรณw",fc_field_computed_add_operand:"Dodaj poleโฆ",fc_field_computed_missing_operand:"(pole nie znalezione)",fc_field_computed_no_fields:"Brak innych pรณl dostฤpnych jako operandy.",fc_field_computed_all_added:"Wszystkie dostฤpne pola zostaลy juลผ dodane.",fc_field_delete:"Usuล pole",fc_field_done:"Gotowe",fc_field_confirm_delete:"Usunฤ
ฤ to pole z katalogu (i ze wszystkich wierszy, ktรณre go uลผywajฤ
)?",theme_button:"Motyw",theme_reset:"Resetuj",theme_colors:"Kolory",theme_primary:"Podstawowy",theme_background:"Tลo",theme_card:"Karta",theme_foreground:"Tekst",theme_color_picker_aria:"Wybรณr koloru {{label}}",theme_color_placeholder:"np. 222 47% 11%",theme_color_hint:"Wybierz kolor lub wpisz triplet HSL",theme_typography:"Typografia",theme_heading_font:"Czcionka nagลรณwkรณw",theme_body_font:"Czcionka treลci",theme_font_default:"Domyลlna",theme_font_size:"Bazowy rozmiar czcionki (px)",theme_shape_spacing:"Ksztaลt i odstฤpy",theme_border_radius:"Promieล zaokrฤ
glenia (rem)",theme_spacing:"Odstฤpy",theme_spacing_cozy_default:"Komfortowe (domyลlne)",theme_spacing_compact:"Kompaktowe",theme_spacing_cozy:"Komfortowe",theme_spacing_spacious:"Przestronne",theme_live_preview:"Podglฤ
d na ลผywo",theme_heading_sample:"Przykลadowy nagลรณwek",theme_body_sample:"Zaลผรณลฤ gฤลlฤ
jaลบล. Tekst treลci uลผywa wybranej czcionki, rozmiaru i odstฤpรณw.",theme_input_sample:"Przykลadowe pole",theme_primary_action:"Akcja podstawowa",runner_toast_required_fields:"Wypeลnij wymagane pola.",runner_toast_api_failed:"Wywoลanie API nie powiodลo siฤ.",runner_toast_answers_copied:"Odpowiedzi skopiowane do schowka!",runner_toast_partial_saved:"Czฤลciowe odpowiedzi zapisane (zalogowane).",runner_toast_file_uploaded:"Przesลano {{name}} dla {{key}}",runner_loading_preview:"ลadowanie podglฤ
duโฆ",runner_no_form:"Nie skonfigurowano formularza.",runner_back_to_builder:"Wrรณฤ do kreatora",runner_preset_full:"Peลny",runner_iframe_title:"Podglฤ
d formularza",import_invalid_json:"Nieprawidลowy JSON: nie moลผna przeanalizowaฤ danych.",import_success:"Journey zaimportowana pomyลlnie",import_clipboard_failed:"Nie moลผna odczytaฤ schowka",shortcut_selected_nodes_one:"Zaznaczono {{count}} wฤzeล",shortcut_selected_nodes_other:"Zaznaczono {{count}} wฤzลรณw",shortcut_deleted:"Usuniฤto",shortcut_undo:"Cofnij",shortcut_redo:"Ponรณw",shortcut_copied:"Skopiowano do schowka",shortcut_pasted:"Wklejono",shortcut_duplicated:"Zduplikowano"},sc={en:Qa,es:Fg,pt:$g,pl:Lg},Ws="language",Er="en";function Bg(){try{return localStorage.getItem(Ws)||Er}catch{return Er}}let Sr=[],Fs=Bg();function Hg(e){return Sr.push(e),()=>{Sr=Sr.filter(t=>t!==e)}}function qg(){return Fs}function Dd(e){try{localStorage.setItem(Ws,e)}catch{}Fs=e,Sr.forEach(t=>t())}typeof window<"u"&&window.addEventListener("storage",e=>{e.key===Ws&&(Fs=e.newValue||Er,Sr.forEach(t=>t()))});function ve(){const e=y.useSyncExternalStore(Hg,qg,()=>Er),t=sc[e]||sc[Er]||Qa;return{t:y.useCallback((r,o)=>{let a=t[r]??Qa[r]??r;if(o)for(const[i,c]of Object.entries(o))a=a.replace(new RegExp(`\\{\\{${i}\\}\\}`,"g"),String(c));return a},[t]),language:e,setLanguage:Dd}}function Yg(e,t=globalThis==null?void 0:globalThis.document){const n=rt(e);g.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Vg="DismissableLayer",Za="dismissableLayer.update",Ug="dismissableLayer.pointerDownOutside",Gg="dismissableLayer.focusOutside",ic,Td=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Vo=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:c,...l}=e,d=g.useContext(Td),[u,p]=g.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=g.useState({}),_=xe(t,C=>p(C)),h=Array.from(d.layers),[j]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(j),b=u?h.indexOf(u):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,N=b>=v,S=Jg(C=>{const E=C.target,M=[...d.branches].some(P=>P.contains(E));!N||M||(o==null||o(C),i==null||i(C),C.defaultPrevented||c==null||c())},f),x=Qg(C=>{const E=C.target;[...d.branches].some(P=>P.contains(E))||(a==null||a(C),i==null||i(C),C.defaultPrevented||c==null||c())},f);return Yg(C=>{b===d.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&c&&(C.preventDefault(),c()))},f),g.useEffect(()=>{if(u)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(ic=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),cc(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=ic)}},[u,f,n,d]),g.useEffect(()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),cc())},[u,d]),g.useEffect(()=>{const C=()=>m({});return document.addEventListener(Za,C),()=>document.removeEventListener(Za,C)},[]),s.jsx(le.div,{...l,ref:_,style:{pointerEvents:w?N?"auto":"none":void 0,...e.style},onFocusCapture:se(e.onFocusCapture,x.onFocusCapture),onBlurCapture:se(e.onBlurCapture,x.onBlurCapture),onPointerDownCapture:se(e.onPointerDownCapture,S.onPointerDownCapture)})});Vo.displayName=Vg;var Xg="DismissableLayerBranch",Kg=g.forwardRef((e,t)=>{const n=g.useContext(Td),r=g.useRef(null),o=xe(t,r);return g.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),s.jsx(le.div,{...e,ref:o})});Kg.displayName=Xg;function Jg(e,t=globalThis==null?void 0:globalThis.document){const n=rt(e),r=g.useRef(!1),o=g.useRef(()=>{});return g.useEffect(()=>{const a=c=>{if(c.target&&!r.current){let l=function(){Rd(Ug,n,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Qg(e,t=globalThis==null?void 0:globalThis.document){const n=rt(e),r=g.useRef(!1);return g.useEffect(()=>{const o=a=>{a.target&&!r.current&&Rd(Gg,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function cc(){const e=new CustomEvent(Za);document.dispatchEvent(e)}function Rd(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?n_(o,a):o.dispatchEvent(a)}var Ea="focusScope.autoFocusOnMount",Ma="focusScope.autoFocusOnUnmount",lc={bubbles:!1,cancelable:!0},Zg="FocusScope",Uo=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[c,l]=g.useState(null),d=rt(o),u=rt(a),p=g.useRef(null),f=xe(t,h=>l(h)),m=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let h=function(w){if(m.paused||!c)return;const N=w.target;c.contains(N)?p.current=N:mn(p.current,{select:!0})},j=function(w){if(m.paused||!c)return;const N=w.relatedTarget;N!==null&&(c.contains(N)||mn(p.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const S of w)S.removedNodes.length>0&&mn(c)};document.addEventListener("focusin",h),document.addEventListener("focusout",j);const b=new MutationObserver(v);return c&&b.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",j),b.disconnect()}}},[r,c,m.paused]),g.useEffect(()=>{if(c){uc.add(m);const h=document.activeElement;if(!c.contains(h)){const v=new CustomEvent(Ea,lc);c.addEventListener(Ea,d),c.dispatchEvent(v),v.defaultPrevented||(ej(aj(Ad(c)),{select:!0}),document.activeElement===h&&mn(c))}return()=>{c.removeEventListener(Ea,d),setTimeout(()=>{const v=new CustomEvent(Ma,lc);c.addEventListener(Ma,u),c.dispatchEvent(v),v.defaultPrevented||mn(h??document.body,{select:!0}),c.removeEventListener(Ma,u),uc.remove(m)},0)}}},[c,d,u,m]);const _=g.useCallback(h=>{if(!n&&!r||m.paused)return;const j=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,v=document.activeElement;if(j&&v){const b=h.currentTarget,[w,N]=tj(b);w&&N?!h.shiftKey&&v===N?(h.preventDefault(),n&&mn(w,{select:!0})):h.shiftKey&&v===w&&(h.preventDefault(),n&&mn(N,{select:!0})):v===b&&h.preventDefault()}},[n,r,m.paused]);return s.jsx(le.div,{tabIndex:-1,...i,ref:f,onKeyDown:_})});Uo.displayName=Zg;function ej(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(mn(r,{select:t}),document.activeElement!==n)return}function tj(e){const t=Ad(e),n=dc(t,e),r=dc(t.reverse(),e);return[n,r]}function Ad(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function dc(e,t){for(const n of e)if(!nj(n,{upTo:t}))return n}function nj(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 rj(e){return e instanceof HTMLInputElement&&"select"in e}function mn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&rj(e)&&t&&e.select()}}var uc=oj();function oj(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=fc(e,t),e.unshift(t)},remove(t){var n;e=fc(e,t),(n=e[0])==null||n.resume()}}}function fc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function aj(e){return e.filter(t=>t.tagName!=="A")}var sj="Portal",Go=g.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[o,a]=g.useState(!1);Je(()=>a(!0),[]);const i=n||o&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return i?Ns.createPortal(s.jsx(le.div,{...r,ref:t}),i):null});Go.displayName=sj;var Da=0;function $s(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??mc()),document.body.insertAdjacentElement("beforeend",e[1]??mc()),Da++,()=>{Da===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Da--}},[])}function mc(){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 zt=function(){return zt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},zt.apply(this,arguments)};function Od(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function ij(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var uo="right-scroll-bar-position",fo="width-before-scroll-bar",cj="with-scroll-bars-hidden",lj="--removed-body-scroll-bar-size";function Ta(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function dj(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var uj=typeof window<"u"?g.useLayoutEffect:g.useEffect,pc=new WeakMap;function fj(e,t){var n=dj(null,function(r){return e.forEach(function(o){return Ta(o,r)})});return uj(function(){var r=pc.get(n);if(r){var o=new Set(r),a=new Set(e),i=n.current;o.forEach(function(c){a.has(c)||Ta(c,null)}),a.forEach(function(c){o.has(c)||Ta(c,i)})}pc.set(n,e)},[e]),n}function mj(e){return e}function pj(e,t){t===void 0&&(t=mj);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var i=t(a,r);return n.push(i),function(){n=n.filter(function(c){return c!==i})}},assignSyncMedium:function(a){for(r=!0;n.length;){var i=n;n=[],i.forEach(a)}n={push:function(c){return a(c)},filter:function(){return n}}},assignMedium:function(a){r=!0;var i=[];if(n.length){var c=n;n=[],c.forEach(a),i=n}var l=function(){var u=i;i=[],u.forEach(a)},d=function(){return Promise.resolve().then(l)};d(),n={push:function(u){i.push(u),d()},filter:function(u){return i=i.filter(u),n}}}};return o}function hj(e){e===void 0&&(e={});var t=pj(null);return t.options=zt({async:!0,ssr:!1},e),t}var zd=function(e){var t=e.sideCar,n=Od(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return g.createElement(r,zt({},n))};zd.isSideCarExport=!0;function _j(e,t){return e.useMedium(t),zd}var Id=hj(),Ra=function(){},Xo=g.forwardRef(function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:Ra,onWheelCapture:Ra,onTouchMoveCapture:Ra}),o=r[0],a=r[1],i=e.forwardProps,c=e.children,l=e.className,d=e.removeScrollBar,u=e.enabled,p=e.shards,f=e.sideCar,m=e.noRelative,_=e.noIsolation,h=e.inert,j=e.allowPinchZoom,v=e.as,b=v===void 0?"div":v,w=e.gapMode,N=Od(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,x=fj([n,t]),C=zt(zt({},N),o);return g.createElement(g.Fragment,null,u&&g.createElement(S,{sideCar:Id,removeScrollBar:d,shards:p,noRelative:m,noIsolation:_,inert:h,setCallbacks:a,allowPinchZoom:!!j,lockRef:n,gapMode:w}),i?g.cloneElement(g.Children.only(c),zt(zt({},C),{ref:x})):g.createElement(b,zt({},C,{className:l,ref:x}),c))});Xo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Xo.classNames={fullWidth:fo,zeroRight:uo};var gj=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function jj(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=gj();return t&&e.setAttribute("nonce",t),e}function yj(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function xj(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var vj=function(){var e=0,t=null;return{add:function(n){e==0&&(t=jj())&&(yj(t,n),xj(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},bj=function(){var e=vj();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Wd=function(){var e=bj(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},wj={left:0,top:0,right:0,gap:0},Aa=function(e){return parseInt(e||"",10)||0},Nj=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Aa(n),Aa(r),Aa(o)]},Sj=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return wj;var t=Nj(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Cj=Wd(),Qn="data-scroll-locked",kj=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
248
|
+
.`.concat(cj,` {
|
|
249
249
|
overflow: hidden `).concat(r,`;
|
|
250
250
|
padding-right: `).concat(c,"px ").concat(r,`;
|
|
251
251
|
}
|
|
@@ -279,29 +279,29 @@
|
|
|
279
279
|
}
|
|
280
280
|
|
|
281
281
|
body[`).concat(Qn,`] {
|
|
282
|
-
`).concat(
|
|
282
|
+
`).concat(lj,": ").concat(c,`px;
|
|
283
283
|
}
|
|
284
|
-
`)},
|
|
284
|
+
`)},hc=function(){var e=parseInt(document.body.getAttribute(Qn)||"0",10);return isFinite(e)?e:0},Pj=function(){g.useEffect(function(){return document.body.setAttribute(Qn,(hc()+1).toString()),function(){var e=hc()-1;e<=0?document.body.removeAttribute(Qn):document.body.setAttribute(Qn,e.toString())}},[])},Ej=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Pj();var a=g.useMemo(function(){return Sj(o)},[o]);return g.createElement(Cj,{styles:kj(a,!t,o,n?"":"!important")})},es=!1;if(typeof window<"u")try{var Qr=Object.defineProperty({},"passive",{get:function(){return es=!0,!0}});window.addEventListener("test",Qr,Qr),window.removeEventListener("test",Qr,Qr)}catch{es=!1}var Ln=es?{passive:!1}:!1,Mj=function(e){return e.tagName==="TEXTAREA"},Fd=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Mj(e)&&n[t]==="visible")},Dj=function(e){return Fd(e,"overflowY")},Tj=function(e){return Fd(e,"overflowX")},_c=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=$d(e,r);if(o){var a=Ld(e,r),i=a[1],c=a[2];if(i>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Rj=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Aj=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},$d=function(e,t){return e==="v"?Dj(t):Tj(t)},Ld=function(e,t){return e==="v"?Rj(t):Aj(t)},Oj=function(e,t){return e==="h"&&t==="rtl"?-1:1},zj=function(e,t,n,r,o){var a=Oj(e,window.getComputedStyle(t).direction),i=a*r,c=n.target,l=t.contains(c),d=!1,u=i>0,p=0,f=0;do{if(!c)break;var m=Ld(e,c),_=m[0],h=m[1],j=m[2],v=h-j-a*_;(_||v)&&$d(e,c)&&(p+=v,f+=_);var b=c.parentNode;c=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!l&&c!==document.body||l&&(t.contains(c)||t===c));return(u&&Math.abs(p)<1||!u&&Math.abs(f)<1)&&(d=!0),d},Zr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},gc=function(e){return[e.deltaX,e.deltaY]},jc=function(e){return e&&"current"in e?e.current:e},Ij=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Wj=function(e){return`
|
|
285
285
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
286
286
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
287
|
-
`)},Wj=0,Bn=[];function Fj(e){var t=_.useRef([]),n=_.useRef([0,0]),r=_.useRef(),o=_.useState(Wj++)[0],a=_.useState(zd)[0],i=_.useRef(e);_.useEffect(function(){i.current=e},[e]),_.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=sj([e.lockRef.current],(e.shards||[]).map(hc),!0).filter(Boolean);return h.forEach(function(j){return j.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=_.useCallback(function(h,j){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!i.current.allowPinchZoom;var x=Zr(h),b=n.current,w="deltaX"in h?h.deltaX:b[0]-x[0],N="deltaY"in h?h.deltaY:b[1]-x[1],S,y=h.target,C=Math.abs(w)>Math.abs(N)?"h":"v";if("touches"in h&&C==="h"&&y.type==="range")return!1;var E=window.getSelection(),P=E&&E.anchorNode,k=P?P===y||P.contains(y):!1;if(k)return!1;var D=mc(C,y);if(!D)return!0;if(D?S=C:(S=C==="v"?"h":"v",D=mc(C,y)),!D)return!1;if(!r.current&&"changedTouches"in h&&(w||N)&&(r.current=S),!S)return!0;var M=r.current||S;return Aj(M,j,h,M==="h"?w:N)},[]),l=_.useCallback(function(h){var j=h;if(!(!Bn.length||Bn[Bn.length-1]!==a)){var x="deltaY"in j?pc(j):Zr(j),b=t.current.filter(function(S){return S.name===j.type&&(S.target===j.target||j.target===S.shadowParent)&&zj(S.delta,x)})[0];if(b&&b.should){j.cancelable&&j.preventDefault();return}if(!b){var w=(i.current.shards||[]).map(hc).filter(Boolean).filter(function(S){return S.contains(j.target)}),N=w.length>0?c(j,w[0]):!i.current.noIsolation;N&&j.cancelable&&j.preventDefault()}}},[]),d=_.useCallback(function(h,j,x,b){var w={name:h,delta:j,target:x,should:b,shadowParent:$j(x)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(N){return N!==w})},1)},[]),u=_.useCallback(function(h){n.current=Zr(h),r.current=void 0},[]),m=_.useCallback(function(h){d(h.type,pc(h),h.target,c(h,e.lockRef.current))},[]),f=_.useCallback(function(h){d(h.type,Zr(h),h.target,c(h,e.lockRef.current))},[]);_.useEffect(function(){return Bn.push(a),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Ln),document.addEventListener("touchmove",l,Ln),document.addEventListener("touchstart",u,Ln),function(){Bn=Bn.filter(function(h){return h!==a}),document.removeEventListener("wheel",l,Ln),document.removeEventListener("touchmove",l,Ln),document.removeEventListener("touchstart",u,Ln)}},[]);var p=e.removeScrollBar,g=e.inert;return _.createElement(_.Fragment,null,g?_.createElement(a,{styles:Ij(o)}):null,p?_.createElement(Pj,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function $j(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Lj=hj(Ad,Fj);var Xo=_.forwardRef(function(e,t){return _.createElement(Uo,At({},e,{ref:t,sideCar:Lj}))});Xo.classNames=Uo.classNames;var Bj=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Hn=new WeakMap,eo=new WeakMap,to={},Oa=0,$d=function(e){return e&&(e.host||$d(e.parentNode))},Hj=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=$d(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},qj=function(e,t,n,r){var o=Hj(t,Array.isArray(e)?e:[e]);to[n]||(to[n]=new WeakMap);var a=to[n],i=[],c=new Set,l=new Set(o),d=function(m){!m||c.has(m)||(c.add(m),d(m.parentNode))};o.forEach(d);var u=function(m){!m||l.has(m)||Array.prototype.forEach.call(m.children,function(f){if(c.has(f))u(f);else try{var p=f.getAttribute(r),g=p!==null&&p!=="false",h=(Hn.get(f)||0)+1,j=(a.get(f)||0)+1;Hn.set(f,h),a.set(f,j),i.push(f),h===1&&g&&eo.set(f,!0),j===1&&f.setAttribute(n,"true"),g||f.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",f,x)}})};return u(t),c.clear(),Oa++,function(){i.forEach(function(m){var f=Hn.get(m)-1,p=a.get(m)-1;Hn.set(m,f),a.set(m,p),f||(eo.has(m)||m.removeAttribute(r),eo.delete(m)),p||m.removeAttribute(n)}),Oa--,Oa||(Hn=new WeakMap,Hn=new WeakMap,eo=new WeakMap,to={})}},Fs=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Bj(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),qj(r,o,n,"aria-hidden")):function(){return null}};function Yj(e){const t=Vj(e),n=_.forwardRef((r,o)=>{const{children:a,...i}=r,c=_.Children.toArray(a),l=c.find(Uj);if(l){const d=l.props.children,u=c.map(m=>m===l?_.Children.count(d)>1?_.Children.only(null):_.isValidElement(d)?d.props.children:null:m);return s.jsx(t,{...i,ref:o,children:_.isValidElement(d)?_.cloneElement(d,void 0,u):null})}return s.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function Vj(e){const t=_.forwardRef((n,r)=>{const{children:o,...a}=n;if(_.isValidElement(o)){const i=Kj(o),c=Xj(a,o.props);return o.type!==_.Fragment&&(c.ref=r?Wn(r,i):i),_.cloneElement(o,c)}return _.Children.count(o)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Gj=Symbol("radix.slottable");function Uj(e){return _.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Gj}function Xj(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...c)=>{const l=a(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Kj(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ko="Dialog",[Ld,Bd]=_t(Ko),[Jj,Tt]=Ld(Ko),Hd=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,c=_.useRef(null),l=_.useRef(null),[d,u]=tn({prop:r,defaultProp:o??!1,onChange:a,caller:Ko});return s.jsx(Jj,{scope:t,triggerRef:c,contentRef:l,contentId:$t(),titleId:$t(),descriptionId:$t(),open:d,onOpenChange:u,onOpenToggle:_.useCallback(()=>u(m=>!m),[u]),modal:i,children:n})};Hd.displayName=Ko;var qd="DialogTrigger",Yd=_.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Tt(qd,n),a=ve(t,o.triggerRef);return s.jsx(le.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Bs(o.open),...r,ref:a,onClick:se(e.onClick,o.onOpenToggle)})});Yd.displayName=qd;var $s="DialogPortal",[Qj,Vd]=Ld($s,{forceMount:void 0}),Gd=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Tt($s,t);return s.jsx(Qj,{scope:t,forceMount:n,children:_.Children.map(r,i=>s.jsx(gt,{present:n||a.open,children:s.jsx(Go,{asChild:!0,container:o,children:i})}))})};Gd.displayName=$s;var xo="DialogOverlay",Ud=_.forwardRef((e,t)=>{const n=Vd(xo,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Tt(xo,e.__scopeDialog);return a.modal?s.jsx(gt,{present:r||a.open,children:s.jsx(ey,{...o,ref:t})}):null});Ud.displayName=xo;var Zj=Yj("DialogOverlay.RemoveScroll"),ey=_.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Tt(xo,n);return s.jsx(Xo,{as:Zj,allowPinchZoom:!0,shards:[o.contentRef],children:s.jsx(le.div,{"data-state":Bs(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),On="DialogContent",Xd=_.forwardRef((e,t)=>{const n=Vd(On,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Tt(On,e.__scopeDialog);return s.jsx(gt,{present:r||a.open,children:a.modal?s.jsx(ty,{...o,ref:t}):s.jsx(ny,{...o,ref:t})})});Xd.displayName=On;var ty=_.forwardRef((e,t)=>{const n=Tt(On,e.__scopeDialog),r=_.useRef(null),o=ve(t,n.contentRef,r);return _.useEffect(()=>{const a=r.current;if(a)return Fs(a)},[]),s.jsx(Kd,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:se(e.onCloseAutoFocus,a=>{var i;a.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:se(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0;(i.button===2||c)&&a.preventDefault()}),onFocusOutside:se(e.onFocusOutside,a=>a.preventDefault())})}),ny=_.forwardRef((e,t)=>{const n=Tt(On,e.__scopeDialog),r=_.useRef(!1),o=_.useRef(!1);return s.jsx(Kd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,c;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(r.current||(c=n.triggerRef.current)==null||c.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var l,d;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Kd=_.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,c=Tt(On,n),l=_.useRef(null),d=ve(t,l);return Ws(),s.jsxs(s.Fragment,{children:[s.jsx(Vo,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:s.jsx(Yo,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Bs(c.open),...i,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(oy,{titleId:c.titleId}),s.jsx(sy,{contentRef:l,descriptionId:c.descriptionId})]})]})}),Ls="DialogTitle",Jd=_.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Tt(Ls,n);return s.jsx(le.h2,{id:o.titleId,...r,ref:t})});Jd.displayName=Ls;var Qd="DialogDescription",Zd=_.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Tt(Qd,n);return s.jsx(le.p,{id:o.descriptionId,...r,ref:t})});Zd.displayName=Qd;var eu="DialogClose",tu=_.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Tt(eu,n);return s.jsx(le.button,{type:"button",...r,ref:t,onClick:se(e.onClick,()=>o.onOpenChange(!1))})});tu.displayName=eu;function Bs(e){return e?"open":"closed"}var nu="DialogTitleWarning",[ry,ru]=Wh(nu,{contentName:On,titleName:Ls,docsSlug:"dialog"}),oy=({titleId:e})=>{const t=ru(nu),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
287
|
+
`)},Fj=0,Bn=[];function $j(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),o=g.useState(Fj++)[0],a=g.useState(Wd)[0],i=g.useRef(e);g.useEffect(function(){i.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=ij([e.lockRef.current],(e.shards||[]).map(jc),!0).filter(Boolean);return h.forEach(function(j){return j.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=g.useCallback(function(h,j){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!i.current.allowPinchZoom;var v=Zr(h),b=n.current,w="deltaX"in h?h.deltaX:b[0]-v[0],N="deltaY"in h?h.deltaY:b[1]-v[1],S,x=h.target,C=Math.abs(w)>Math.abs(N)?"h":"v";if("touches"in h&&C==="h"&&x.type==="range")return!1;var E=window.getSelection(),M=E&&E.anchorNode,P=M?M===x||M.contains(x):!1;if(P)return!1;var T=_c(C,x);if(!T)return!0;if(T?S=C:(S=C==="v"?"h":"v",T=_c(C,x)),!T)return!1;if(!r.current&&"changedTouches"in h&&(w||N)&&(r.current=S),!S)return!0;var k=r.current||S;return zj(k,j,h,k==="h"?w:N)},[]),l=g.useCallback(function(h){var j=h;if(!(!Bn.length||Bn[Bn.length-1]!==a)){var v="deltaY"in j?gc(j):Zr(j),b=t.current.filter(function(S){return S.name===j.type&&(S.target===j.target||j.target===S.shadowParent)&&Ij(S.delta,v)})[0];if(b&&b.should){j.cancelable&&j.preventDefault();return}if(!b){var w=(i.current.shards||[]).map(jc).filter(Boolean).filter(function(S){return S.contains(j.target)}),N=w.length>0?c(j,w[0]):!i.current.noIsolation;N&&j.cancelable&&j.preventDefault()}}},[]),d=g.useCallback(function(h,j,v,b){var w={name:h,delta:j,target:v,should:b,shadowParent:Lj(v)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(N){return N!==w})},1)},[]),u=g.useCallback(function(h){n.current=Zr(h),r.current=void 0},[]),p=g.useCallback(function(h){d(h.type,gc(h),h.target,c(h,e.lockRef.current))},[]),f=g.useCallback(function(h){d(h.type,Zr(h),h.target,c(h,e.lockRef.current))},[]);g.useEffect(function(){return Bn.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Ln),document.addEventListener("touchmove",l,Ln),document.addEventListener("touchstart",u,Ln),function(){Bn=Bn.filter(function(h){return h!==a}),document.removeEventListener("wheel",l,Ln),document.removeEventListener("touchmove",l,Ln),document.removeEventListener("touchstart",u,Ln)}},[]);var m=e.removeScrollBar,_=e.inert;return g.createElement(g.Fragment,null,_?g.createElement(a,{styles:Wj(o)}):null,m?g.createElement(Ej,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Lj(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Bj=_j(Id,$j);var Ko=g.forwardRef(function(e,t){return g.createElement(Xo,zt({},e,{ref:t,sideCar:Bj}))});Ko.classNames=Xo.classNames;var Hj=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Hn=new WeakMap,eo=new WeakMap,to={},Oa=0,Bd=function(e){return e&&(e.host||Bd(e.parentNode))},qj=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Bd(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Yj=function(e,t,n,r){var o=qj(t,Array.isArray(e)?e:[e]);to[n]||(to[n]=new WeakMap);var a=to[n],i=[],c=new Set,l=new Set(o),d=function(p){!p||c.has(p)||(c.add(p),d(p.parentNode))};o.forEach(d);var u=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(f){if(c.has(f))u(f);else try{var m=f.getAttribute(r),_=m!==null&&m!=="false",h=(Hn.get(f)||0)+1,j=(a.get(f)||0)+1;Hn.set(f,h),a.set(f,j),i.push(f),h===1&&_&&eo.set(f,!0),j===1&&f.setAttribute(n,"true"),_||f.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return u(t),c.clear(),Oa++,function(){i.forEach(function(p){var f=Hn.get(p)-1,m=a.get(p)-1;Hn.set(p,f),a.set(p,m),f||(eo.has(p)||p.removeAttribute(r),eo.delete(p)),m||p.removeAttribute(n)}),Oa--,Oa||(Hn=new WeakMap,Hn=new WeakMap,eo=new WeakMap,to={})}},Ls=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Hj(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Yj(r,o,n,"aria-hidden")):function(){return null}};function Vj(e){const t=Uj(e),n=g.forwardRef((r,o)=>{const{children:a,...i}=r,c=g.Children.toArray(a),l=c.find(Xj);if(l){const d=l.props.children,u=c.map(p=>p===l?g.Children.count(d)>1?g.Children.only(null):g.isValidElement(d)?d.props.children:null:p);return s.jsx(t,{...i,ref:o,children:g.isValidElement(d)?g.cloneElement(d,void 0,u):null})}return s.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function Uj(e){const t=g.forwardRef((n,r)=>{const{children:o,...a}=n;if(g.isValidElement(o)){const i=Jj(o),c=Kj(a,o.props);return o.type!==g.Fragment&&(c.ref=r?Wn(r,i):i),g.cloneElement(o,c)}return g.Children.count(o)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Gj=Symbol("radix.slottable");function Xj(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Gj}function Kj(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...c)=>{const l=a(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Jj(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Jo="Dialog",[Hd,qd]=_t(Jo),[Qj,Rt]=Hd(Jo),Yd=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,c=g.useRef(null),l=g.useRef(null),[d,u]=tn({prop:r,defaultProp:o??!1,onChange:a,caller:Jo});return s.jsx(Qj,{scope:t,triggerRef:c,contentRef:l,contentId:Lt(),titleId:Lt(),descriptionId:Lt(),open:d,onOpenChange:u,onOpenToggle:g.useCallback(()=>u(p=>!p),[u]),modal:i,children:n})};Yd.displayName=Jo;var Vd="DialogTrigger",Ud=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Rt(Vd,n),a=xe(t,o.triggerRef);return s.jsx(le.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":qs(o.open),...r,ref:a,onClick:se(e.onClick,o.onOpenToggle)})});Ud.displayName=Vd;var Bs="DialogPortal",[Zj,Gd]=Hd(Bs,{forceMount:void 0}),Xd=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Rt(Bs,t);return s.jsx(Zj,{scope:t,forceMount:n,children:g.Children.map(r,i=>s.jsx(gt,{present:n||a.open,children:s.jsx(Go,{asChild:!0,container:o,children:i})}))})};Xd.displayName=Bs;var vo="DialogOverlay",Kd=g.forwardRef((e,t)=>{const n=Gd(vo,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Rt(vo,e.__scopeDialog);return a.modal?s.jsx(gt,{present:r||a.open,children:s.jsx(ty,{...o,ref:t})}):null});Kd.displayName=vo;var ey=Vj("DialogOverlay.RemoveScroll"),ty=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Rt(vo,n);return s.jsx(Ko,{as:ey,allowPinchZoom:!0,shards:[o.contentRef],children:s.jsx(le.div,{"data-state":qs(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),An="DialogContent",Jd=g.forwardRef((e,t)=>{const n=Gd(An,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Rt(An,e.__scopeDialog);return s.jsx(gt,{present:r||a.open,children:a.modal?s.jsx(ny,{...o,ref:t}):s.jsx(ry,{...o,ref:t})})});Jd.displayName=An;var ny=g.forwardRef((e,t)=>{const n=Rt(An,e.__scopeDialog),r=g.useRef(null),o=xe(t,n.contentRef,r);return g.useEffect(()=>{const a=r.current;if(a)return Ls(a)},[]),s.jsx(Qd,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:se(e.onCloseAutoFocus,a=>{var i;a.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:se(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0;(i.button===2||c)&&a.preventDefault()}),onFocusOutside:se(e.onFocusOutside,a=>a.preventDefault())})}),ry=g.forwardRef((e,t)=>{const n=Rt(An,e.__scopeDialog),r=g.useRef(!1),o=g.useRef(!1);return s.jsx(Qd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,c;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(r.current||(c=n.triggerRef.current)==null||c.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var l,d;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Qd=g.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,c=Rt(An,n),l=g.useRef(null),d=xe(t,l);return $s(),s.jsxs(s.Fragment,{children:[s.jsx(Uo,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:s.jsx(Vo,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":qs(c.open),...i,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(ay,{titleId:c.titleId}),s.jsx(iy,{contentRef:l,descriptionId:c.descriptionId})]})]})}),Hs="DialogTitle",Zd=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Rt(Hs,n);return s.jsx(le.h2,{id:o.titleId,...r,ref:t})});Zd.displayName=Hs;var eu="DialogDescription",tu=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Rt(eu,n);return s.jsx(le.p,{id:o.descriptionId,...r,ref:t})});tu.displayName=eu;var nu="DialogClose",ru=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Rt(nu,n);return s.jsx(le.button,{type:"button",...r,ref:t,onClick:se(e.onClick,()=>o.onOpenChange(!1))})});ru.displayName=nu;function qs(e){return e?"open":"closed"}var ou="DialogTitleWarning",[oy,au]=$h(ou,{contentName:An,titleName:Hs,docsSlug:"dialog"}),ay=({titleId:e})=>{const t=au(ou),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
288
288
|
|
|
289
289
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
290
290
|
|
|
291
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return
|
|
291
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},sy="DialogDescriptionWarning",iy=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${au(sy).contentName}}.`;return g.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Ys=Yd,su=Ud,Vs=Xd,zr=Kd,Ir=Jd,Wr=Zd,Fr=tu,Qo=ru,cy=Symbol("radix.slottable");function ly(e){const t=({children:n})=>s.jsx(s.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=cy,t}var iu="AlertDialog",[dy]=_t(iu,[qd]),on=qd(),cu=e=>{const{__scopeAlertDialog:t,...n}=e,r=on(t);return s.jsx(Ys,{...r,...n,modal:!0})};cu.displayName=iu;var uy="AlertDialogTrigger",fy=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=on(n);return s.jsx(su,{...o,...r,ref:t})});fy.displayName=uy;var my="AlertDialogPortal",lu=e=>{const{__scopeAlertDialog:t,...n}=e,r=on(t);return s.jsx(Vs,{...r,...n})};lu.displayName=my;var py="AlertDialogOverlay",du=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=on(n);return s.jsx(zr,{...o,...r,ref:t})});du.displayName=py;var Zn="AlertDialogContent",[hy,_y]=dy(Zn),gy=ly("AlertDialogContent"),uu=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,a=on(n),i=g.useRef(null),c=xe(t,i),l=g.useRef(null);return s.jsx(oy,{contentName:Zn,titleName:fu,docsSlug:"alert-dialog",children:s.jsx(hy,{scope:n,cancelRef:l,children:s.jsxs(Ir,{role:"alertdialog",...a,...o,ref:c,onOpenAutoFocus:se(o.onOpenAutoFocus,d=>{var u;d.preventDefault(),(u=l.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[s.jsx(gy,{children:r}),s.jsx(yy,{contentRef:i})]})})})});uu.displayName=Zn;var fu="AlertDialogTitle",mu=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=on(n);return s.jsx(Wr,{...o,...r,ref:t})});mu.displayName=fu;var pu="AlertDialogDescription",hu=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=on(n);return s.jsx(Fr,{...o,...r,ref:t})});hu.displayName=pu;var jy="AlertDialogAction",_u=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=on(n);return s.jsx(Qo,{...o,...r,ref:t})});_u.displayName=jy;var gu="AlertDialogCancel",ju=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=_y(gu,n),a=on(n),i=xe(t,o);return s.jsx(Qo,{...a,...r,ref:i})});ju.displayName=gu;var yy=({contentRef:e})=>{const t=`\`${Zn}\` requires a description for the component to be accessible for screen reader users.
|
|
292
292
|
|
|
293
|
-
You can add a description to the \`${Zn}\` by passing a \`${
|
|
293
|
+
You can add a description to the \`${Zn}\` by passing a \`${pu}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
294
294
|
|
|
295
295
|
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Zn}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
296
296
|
|
|
297
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return _.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},yy=su,vy=iu,gu=cu,ju=lu,yu=pu,vu=_u,xu=uu,bu=mu;const xy=yy,by=vy,wu=_.forwardRef(({className:e,...t},n)=>s.jsx(gu,{className:ne("cj-fixed cj-inset-0 cj-z-50 cj-bg-black/80 data-[state=open]:cj-animate-in data-[state=closed]:cj-animate-out data-[state=closed]:cj-fade-out-0 data-[state=open]:cj-fade-in-0",e),...t,ref:n}));wu.displayName=gu.displayName;const Nu=_.forwardRef(({className:e,...t},n)=>s.jsxs(by,{children:[s.jsx(wu,{}),s.jsx(ju,{ref:n,className:ne("cj-fixed cj-left-[50%] cj-top-[50%] cj-z-50 cj-grid cj-w-full cj-max-w-lg cj-translate-x-[-50%] cj-translate-y-[-50%] cj-gap-4 cj-border cj-bg-background cj-p-6 cj-shadow-lg cj-duration-200 data-[state=open]:cj-animate-in data-[state=closed]:cj-animate-out data-[state=closed]:cj-fade-out-0 data-[state=open]:cj-fade-in-0 data-[state=closed]:cj-zoom-out-95 data-[state=open]:cj-zoom-in-95 data-[state=closed]:cj-slide-out-to-left-1/2 data-[state=closed]:cj-slide-out-to-top-[48%] data-[state=open]:cj-slide-in-from-left-1/2 data-[state=open]:cj-slide-in-from-top-[48%] sm:cj-rounded-lg",e),...t})]}));Nu.displayName=ju.displayName;const Su=({className:e,...t})=>s.jsx("div",{className:ne("cj-flex cj-flex-col cj-space-y-2 cj-text-center sm:cj-text-left",e),...t});Su.displayName="AlertDialogHeader";const Cu=({className:e,...t})=>s.jsx("div",{className:ne("cj-flex cj-flex-col-reverse sm:cj-flex-row sm:cj-justify-end sm:cj-space-x-2",e),...t});Cu.displayName="AlertDialogFooter";const ku=_.forwardRef(({className:e,...t},n)=>s.jsx(xu,{ref:n,className:ne("cj-text-lg cj-font-semibold",e),...t}));ku.displayName=xu.displayName;const Pu=_.forwardRef(({className:e,...t},n)=>s.jsx(bu,{ref:n,className:ne("cj-text-sm cj-text-muted-foreground",e),...t}));Pu.displayName=bu.displayName;const Eu=_.forwardRef(({className:e,...t},n)=>s.jsx(yu,{ref:n,className:ne(Ss(),e),...t}));Eu.displayName=yu.displayName;const Mu=_.forwardRef(({className:e,...t},n)=>s.jsx(vu,{ref:n,className:ne(Ss({variant:"outline"}),"cj-mt-2 sm:cj-mt-0",e),...t}));Mu.displayName=vu.displayName;function $r({open:e,onOpenChange:t,title:n,description:r,confirmLabel:o,cancelLabel:a,destructive:i=!0,onConfirm:c}){const{t:l}=we();return s.jsx(xy,{open:e,onOpenChange:t,children:s.jsxs(Nu,{children:[s.jsxs(Su,{children:[s.jsx(ku,{children:n??l("fc_confirm_title")}),s.jsx(Pu,{children:r})]}),s.jsxs(Cu,{children:[s.jsx(Mu,{children:a??l("cancel")}),s.jsx(Eu,{onClick:c,className:i?"cj-bg-destructive cj-text-destructive-foreground hover:cj-bg-destructive/90":void 0,children:o??l("delete")})]})]})})}function wy({readOnly:e=!1}){const{t}=we(),{formConfig:n,activeStepId:r,setActiveStep:o,addStep:a,deleteStep:i,moveStep:c}=pt(),[l,d]=v.useState(null);return s.jsxs("div",{className:"cj-flex cj-flex-col cj-h-full cj-bg-card",children:[s.jsxs("div",{className:"cj-p-4 cj-border-b cj-flex cj-items-center cj-justify-between",children:[s.jsx("h2",{className:"cj-text-sm cj-font-semibold",children:t("fc_form_steps")}),!e&&s.jsxs(te,{size:"sm",variant:"outline",onClick:()=>a(),children:[s.jsx(Et,{className:"cj-h-3.5 cj-w-3.5 cj-mr-1"}),t("fc_add_step")]})]}),s.jsx(Ht,{className:"cj-flex-1 cj-min-w-0",children:s.jsxs("div",{className:"cj-p-3 cj-space-y-2 cj-min-w-0",children:[n.steps.map((u,m)=>{const f=u.step_id===r,p=u.rows.reduce((g,h)=>g+h.field_ids.length,0);return s.jsx("div",{onClick:()=>o(u.step_id),className:`cj-rounded-xl cj-border-2 cj-p-3 cj-cursor-pointer cj-transition-colors ${f?"cj-border-primary cj-bg-primary/5":"cj-border-border cj-bg-card hover:cj-border-primary/40"}`,children:s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[s.jsx("div",{className:`cj-h-7 cj-w-7 cj-rounded-full cj-flex cj-items-center cj-justify-center cj-text-xs cj-font-bold cj-shrink-0 ${f?"cj-bg-primary cj-text-primary-foreground":"cj-bg-muted cj-text-muted-foreground"}`,children:m+1}),s.jsxs("div",{className:"cj-flex-1 cj-min-w-0",children:[s.jsx("div",{className:"cj-text-sm cj-font-semibold cj-truncate",children:u.title||t("fc_step_untitled")}),s.jsx("div",{className:"cj-text-[11px] cj-text-muted-foreground",children:t("fc_step_meta",{rows:u.rows.length,fields:p})})]}),!e&&f&&s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-0.5",children:[s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-6 cj-w-6",disabled:m===0,onClick:g=>{g.stopPropagation(),c(u.step_id,"up")},children:s.jsx(_o,{className:"cj-h-3 cj-w-3"})}),s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-6 cj-w-6",disabled:m===n.steps.length-1,onClick:g=>{g.stopPropagation(),c(u.step_id,"down")},children:s.jsx(Bt,{className:"cj-h-3 cj-w-3"})}),s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-6 cj-w-6",onClick:g=>{g.stopPropagation(),d(u.step_id)},children:s.jsx(Fn,{className:"cj-h-3 cj-w-3 cj-text-destructive"})})]})]})},u.step_id)}),n.steps.length===0&&s.jsxs("div",{className:"cj-py-12 cj-text-center cj-text-xs cj-text-muted-foreground",children:[t("fc_no_steps"),!e&&s.jsxs(s.Fragment,{children:[s.jsx("br",{}),t("fc_no_steps_hint_click")," ",s.jsxs("strong",{children:["+ ",t("fc_add_step")]})," ",t("fc_no_steps_hint_to_begin")]})]})]})}),s.jsx($r,{open:l!==null,onOpenChange:u=>!u&&d(null),description:t("fc_confirm_delete_step"),onConfirm:()=>{l&&i(l),d(null)}})]})}const he=_.forwardRef(({className:e,type:t,...n},r)=>s.jsx("input",{type:t,className:ne("cj-flex cj-h-12 cj-w-full cj-rounded-xl cj-border cj-border-border/40 cj-bg-muted/50 cj-px-3 cj-py-2 cj-text-base cj-shadow-none cj-ring-offset-background file:cj-border-0 file:cj-bg-transparent file:cj-text-sm file:cj-font-medium file:cj-text-foreground placeholder:cj-text-muted-foreground focus-visible:cj-outline-none focus-visible:cj-ring-2 focus-visible:cj-ring-ring focus-visible:cj-ring-offset-2 disabled:cj-cursor-not-allowed disabled:cj-opacity-50 md:cj-text-sm",e),ref:r,...n}));he.displayName="Input";var Ny=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Sy=Ny.reduce((e,t)=>{const n=Ao(`Primitive.${t}`),r=_.forwardRef((o,a)=>{const{asChild:i,...c}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(l,{...c,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Cy="Label",Du=_.forwardRef((e,t)=>s.jsx(Sy.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Du.displayName=Cy;var Tu=Du;const ky=Rr("cj-text-sm cj-font-medium cj-leading-none peer-disabled:cj-cursor-not-allowed peer-disabled:cj-opacity-70"),q=_.forwardRef(({className:e,...t},n)=>s.jsx(Tu,{ref:n,className:ne(ky(),e),...t}));q.displayName=Tu.displayName;const Py=["top","right","bottom","left"],hn=Math.min,ft=Math.max,bo=Math.round,no=Math.floor,Lt=e=>({x:e,y:e}),Ey={left:"right",right:"left",bottom:"top",top:"bottom"},My={start:"end",end:"start"};function es(e,t,n){return ft(e,hn(t,n))}function nn(e,t){return typeof e=="function"?e(t):e}function rn(e){return e.split("-")[0]}function cr(e){return e.split("-")[1]}function Ys(e){return e==="x"?"y":"x"}function Vs(e){return e==="y"?"height":"width"}const Dy=new Set(["top","bottom"]);function Wt(e){return Dy.has(rn(e))?"y":"x"}function Gs(e){return Ys(Wt(e))}function Ty(e,t,n){n===void 0&&(n=!1);const r=cr(e),o=Gs(e),a=Vs(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=wo(i)),[i,wo(i)]}function Ry(e){const t=wo(e);return[ts(e),t,ts(t)]}function ts(e){return e.replace(/start|end/g,t=>My[t])}const _c=["left","right"],gc=["right","left"],Oy=["top","bottom"],Ay=["bottom","top"];function zy(e,t,n){switch(e){case"top":case"bottom":return n?t?gc:_c:t?_c:gc;case"left":case"right":return t?Oy:Ay;default:return[]}}function Iy(e,t,n,r){const o=cr(e);let a=zy(rn(e),n==="start",r);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(ts)))),a}function wo(e){return e.replace(/left|right|bottom|top/g,t=>Ey[t])}function Wy(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ru(e){return typeof e!="number"?Wy(e):{top:e,right:e,bottom:e,left:e}}function No(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function jc(e,t,n){let{reference:r,floating:o}=e;const a=Wt(t),i=Gs(t),c=Vs(i),l=rn(t),d=a==="y",u=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,f=r[c]/2-o[c]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:m};break;case"left":p={x:r.x-o.width,y:m};break;default:p={x:r.x,y:r.y}}switch(cr(t)){case"start":p[i]-=f*(n&&d?-1:1);break;case"end":p[i]+=f*(n&&d?-1:1);break}return p}async function Fy(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:i,elements:c,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:m="floating",altBoundary:f=!1,padding:p=0}=nn(t,e),g=Ru(p),j=c[f?m==="floating"?"reference":"floating":m],x=No(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(j)))==null||n?j:j.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:d,rootBoundary:u,strategy:l})),b=m==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),N=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},S=No(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:b,offsetParent:w,strategy:l}):b);return{top:(x.top-S.top+g.top)/N.y,bottom:(S.bottom-x.bottom+g.bottom)/N.y,left:(x.left-S.left+g.left)/N.x,right:(S.right-x.right+g.right)/N.x}}const $y=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,c=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:m}=jc(d,r,l),f=r,p={},g=0;for(let j=0;j<c.length;j++){var h;const{name:x,fn:b}=c[j],{x:w,y:N,data:S,reset:y}=await b({x:u,y:m,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:d,platform:{...i,detectOverflow:(h=i.detectOverflow)!=null?h:Fy},elements:{reference:e,floating:t}});u=w??u,m=N??m,p={...p,[x]:{...p[x],...S}},y&&g<=50&&(g++,typeof y=="object"&&(y.placement&&(f=y.placement),y.rects&&(d=y.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):y.rects),{x:u,y:m}=jc(d,f,l)),j=-1)}return{x:u,y:m,placement:f,strategy:o,middlewareData:p}},Ly=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:c,middlewareData:l}=t,{element:d,padding:u=0}=nn(e,t)||{};if(d==null)return{};const m=Ru(u),f={x:n,y:r},p=Gs(o),g=Vs(p),h=await i.getDimensions(d),j=p==="y",x=j?"top":"left",b=j?"bottom":"right",w=j?"clientHeight":"clientWidth",N=a.reference[g]+a.reference[p]-f[p]-a.floating[g],S=f[p]-a.reference[p],y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let C=y?y[w]:0;(!C||!await(i.isElement==null?void 0:i.isElement(y)))&&(C=c.floating[w]||a.floating[g]);const E=N/2-S/2,P=C/2-h[g]/2-1,k=hn(m[x],P),D=hn(m[b],P),M=k,A=C-h[g]-D,z=C/2-h[g]/2+E,G=es(M,z,A),W=!l.arrow&&cr(o)!=null&&z!==G&&a.reference[g]/2-(z<M?k:D)-h[g]/2<0,Q=W?z<M?z-M:z-A:0;return{[p]:f[p]+Q,data:{[p]:G,centerOffset:z-G-Q,...W&&{alignmentOffset:Q}},reset:W}}}),By=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:c,platform:l,elements:d}=t,{mainAxis:u=!0,crossAxis:m=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...j}=nn(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const x=rn(o),b=Wt(c),w=rn(c)===c,N=await(l.isRTL==null?void 0:l.isRTL(d.floating)),S=f||(w||!h?[wo(c)]:Ry(c)),y=g!=="none";!f&&y&&S.push(...Iy(c,h,g,N));const C=[c,...S],E=await l.detectOverflow(t,j),P=[];let k=((r=a.flip)==null?void 0:r.overflows)||[];if(u&&P.push(E[x]),m){const z=Ty(o,i,N);P.push(E[z[0]],E[z[1]])}if(k=[...k,{placement:o,overflows:P}],!P.every(z=>z<=0)){var D,M;const z=(((D=a.flip)==null?void 0:D.index)||0)+1,G=C[z];if(G&&(!(m==="alignment"?b!==Wt(G):!1)||k.every(V=>Wt(V.placement)===b?V.overflows[0]>0:!0)))return{data:{index:z,overflows:k},reset:{placement:G}};let W=(M=k.filter(Q=>Q.overflows[0]<=0).sort((Q,V)=>Q.overflows[1]-V.overflows[1])[0])==null?void 0:M.placement;if(!W)switch(p){case"bestFit":{var A;const Q=(A=k.filter(V=>{if(y){const R=Wt(V.placement);return R===b||R==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(R=>R>0).reduce((R,K)=>R+K,0)]).sort((V,R)=>V[1]-R[1])[0])==null?void 0:A[0];Q&&(W=Q);break}case"initialPlacement":W=c;break}if(o!==W)return{reset:{placement:W}}}return{}}}};function yc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vc(e){return Py.some(t=>e[t]>=0)}const Hy=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...a}=nn(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...a,elementContext:"reference"}),c=yc(i,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:vc(c)}}}case"escaped":{const i=await r.detectOverflow(t,{...a,altBoundary:!0}),c=yc(i,n.floating);return{data:{escapedOffsets:c,escaped:vc(c)}}}default:return{}}}}},Ou=new Set(["left","top"]);async function qy(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=rn(n),c=cr(n),l=Wt(n)==="y",d=Ou.has(i)?-1:1,u=a&&l?-1:1,m=nn(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:g}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof g=="number"&&(p=c==="end"?g*-1:g),l?{x:p*u,y:f*d}:{x:f*d,y:p*u}}const Yy=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:c}=t,l=await qy(t,e);return i===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},Vy=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:i=!0,crossAxis:c=!1,limiter:l={fn:x=>{let{x:b,y:w}=x;return{x:b,y:w}}},...d}=nn(e,t),u={x:n,y:r},m=await a.detectOverflow(t,d),f=Wt(rn(o)),p=Ys(f);let g=u[p],h=u[f];if(i){const x=p==="y"?"top":"left",b=p==="y"?"bottom":"right",w=g+m[x],N=g-m[b];g=es(w,g,N)}if(c){const x=f==="y"?"top":"left",b=f==="y"?"bottom":"right",w=h+m[x],N=h-m[b];h=es(w,h,N)}const j=l.fn({...t,[p]:g,[f]:h});return{...j,data:{x:j.x-n,y:j.y-r,enabled:{[p]:i,[f]:c}}}}}},Gy=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:c=0,mainAxis:l=!0,crossAxis:d=!0}=nn(e,t),u={x:n,y:r},m=Wt(o),f=Ys(m);let p=u[f],g=u[m];const h=nn(c,t),j=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const w=f==="y"?"height":"width",N=a.reference[f]-a.floating[w]+j.mainAxis,S=a.reference[f]+a.reference[w]-j.mainAxis;p<N?p=N:p>S&&(p=S)}if(d){var x,b;const w=f==="y"?"width":"height",N=Ou.has(rn(o)),S=a.reference[m]-a.floating[w]+(N&&((x=i.offset)==null?void 0:x[m])||0)+(N?0:j.crossAxis),y=a.reference[m]+a.reference[w]+(N?0:((b=i.offset)==null?void 0:b[m])||0)-(N?j.crossAxis:0);g<S?g=S:g>y&&(g=y)}return{[f]:p,[m]:g}}}},Uy=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:c}=t,{apply:l=()=>{},...d}=nn(e,t),u=await i.detectOverflow(t,d),m=rn(o),f=cr(o),p=Wt(o)==="y",{width:g,height:h}=a.floating;let j,x;m==="top"||m==="bottom"?(j=m,x=f===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(x=m,j=f==="end"?"top":"bottom");const b=h-u.top-u.bottom,w=g-u.left-u.right,N=hn(h-u[j],b),S=hn(g-u[x],w),y=!t.middlewareData.shift;let C=N,E=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=b),y&&!f){const k=ft(u.left,0),D=ft(u.right,0),M=ft(u.top,0),A=ft(u.bottom,0);p?E=g-2*(k!==0||D!==0?k+D:ft(u.left,u.right)):C=h-2*(M!==0||A!==0?M+A:ft(u.top,u.bottom))}await l({...t,availableWidth:E,availableHeight:C});const P=await i.getDimensions(c.floating);return g!==P.width||h!==P.height?{reset:{rects:!0}}:{}}}};function Qo(){return typeof window<"u"}function lr(e){return Au(e)?(e.nodeName||"").toLowerCase():"#document"}function mt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ut(e){var t;return(t=(Au(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Au(e){return Qo()?e instanceof Node||e instanceof mt(e).Node:!1}function Mt(e){return Qo()?e instanceof Element||e instanceof mt(e).Element:!1}function qt(e){return Qo()?e instanceof HTMLElement||e instanceof mt(e).HTMLElement:!1}function xc(e){return!Qo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof mt(e).ShadowRoot}const Xy=new Set(["inline","contents"]);function Lr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Dt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Xy.has(o)}const Ky=new Set(["table","td","th"]);function Jy(e){return Ky.has(lr(e))}const Qy=[":popover-open",":modal"];function Zo(e){return Qy.some(t=>{try{return e.matches(t)}catch{return!1}})}const Zy=["transform","translate","scale","rotate","perspective"],ev=["transform","translate","scale","rotate","perspective","filter"],tv=["paint","layout","strict","content"];function Us(e){const t=Xs(),n=Mt(e)?Dt(e):e;return Zy.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||ev.some(r=>(n.willChange||"").includes(r))||tv.some(r=>(n.contain||"").includes(r))}function nv(e){let t=_n(e);for(;qt(t)&&!rr(t);){if(Us(t))return t;if(Zo(t))return null;t=_n(t)}return null}function Xs(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const rv=new Set(["html","body","#document"]);function rr(e){return rv.has(lr(e))}function Dt(e){return mt(e).getComputedStyle(e)}function ea(e){return Mt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _n(e){if(lr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||xc(e)&&e.host||Ut(e);return xc(t)?t.host:t}function zu(e){const t=_n(e);return rr(t)?e.ownerDocument?e.ownerDocument.body:e.body:qt(t)&&Lr(t)?t:zu(t)}function Mr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=zu(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),i=mt(o);if(a){const c=ns(i);return t.concat(i,i.visualViewport||[],Lr(o)?o:[],c&&n?Mr(c):[])}return t.concat(o,Mr(o,[],n))}function ns(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Iu(e){const t=Dt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=qt(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,c=bo(n)!==a||bo(r)!==i;return c&&(n=a,r=i),{width:n,height:r,$:c}}function Ks(e){return Mt(e)?e:e.contextElement}function er(e){const t=Ks(e);if(!qt(t))return Lt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Iu(t);let i=(a?bo(n.width):n.width)/r,c=(a?bo(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const ov=Lt(0);function Wu(e){const t=mt(e);return!Xs()||!t.visualViewport?ov:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function av(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==mt(e)?!1:t}function An(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Ks(e);let i=Lt(1);t&&(r?Mt(r)&&(i=er(r)):i=er(e));const c=av(a,n,r)?Wu(a):Lt(0);let l=(o.left+c.x)/i.x,d=(o.top+c.y)/i.y,u=o.width/i.x,m=o.height/i.y;if(a){const f=mt(a),p=r&&Mt(r)?mt(r):r;let g=f,h=ns(g);for(;h&&r&&p!==g;){const j=er(h),x=h.getBoundingClientRect(),b=Dt(h),w=x.left+(h.clientLeft+parseFloat(b.paddingLeft))*j.x,N=x.top+(h.clientTop+parseFloat(b.paddingTop))*j.y;l*=j.x,d*=j.y,u*=j.x,m*=j.y,l+=w,d+=N,g=mt(h),h=ns(g)}}return No({width:u,height:m,x:l,y:d})}function ta(e,t){const n=ea(e).scrollLeft;return t?t.left+n:An(Ut(e)).left+n}function Fu(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ta(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function sv(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",i=Ut(r),c=t?Zo(t.floating):!1;if(r===i||c&&a)return n;let l={scrollLeft:0,scrollTop:0},d=Lt(1);const u=Lt(0),m=qt(r);if((m||!m&&!a)&&((lr(r)!=="body"||Lr(i))&&(l=ea(r)),qt(r))){const p=An(r);d=er(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const f=i&&!m&&!a?Fu(i,l):Lt(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-l.scrollLeft*d.x+u.x+f.x,y:n.y*d.y-l.scrollTop*d.y+u.y+f.y}}function iv(e){return Array.from(e.getClientRects())}function cv(e){const t=Ut(e),n=ea(e),r=e.ownerDocument.body,o=ft(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=ft(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+ta(e);const c=-n.scrollTop;return Dt(r).direction==="rtl"&&(i+=ft(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:c}}const bc=25;function lv(e,t){const n=mt(e),r=Ut(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,c=0,l=0;if(o){a=o.width,i=o.height;const u=Xs();(!u||u&&t==="fixed")&&(c=o.offsetLeft,l=o.offsetTop)}const d=ta(r);if(d<=0){const u=r.ownerDocument,m=u.body,f=getComputedStyle(m),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(r.clientWidth-m.clientWidth-p);g<=bc&&(a-=g)}else d<=bc&&(a+=d);return{width:a,height:i,x:c,y:l}}const dv=new Set(["absolute","fixed"]);function uv(e,t){const n=An(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=qt(e)?er(e):Lt(1),i=e.clientWidth*a.x,c=e.clientHeight*a.y,l=o*a.x,d=r*a.y;return{width:i,height:c,x:l,y:d}}function wc(e,t,n){let r;if(t==="viewport")r=lv(e,n);else if(t==="document")r=cv(Ut(e));else if(Mt(t))r=uv(t,n);else{const o=Wu(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return No(r)}function $u(e,t){const n=_n(e);return n===t||!Mt(n)||rr(n)?!1:Dt(n).position==="fixed"||$u(n,t)}function fv(e,t){const n=t.get(e);if(n)return n;let r=Mr(e,[],!1).filter(c=>Mt(c)&&lr(c)!=="body"),o=null;const a=Dt(e).position==="fixed";let i=a?_n(e):e;for(;Mt(i)&&!rr(i);){const c=Dt(i),l=Us(i);!l&&c.position==="fixed"&&(o=null),(a?!l&&!o:!l&&c.position==="static"&&!!o&&dv.has(o.position)||Lr(i)&&!l&&$u(e,i))?r=r.filter(u=>u!==i):o=c,i=_n(i)}return t.set(e,r),r}function mv(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Zo(t)?[]:fv(t,this._c):[].concat(n),r],c=i[0],l=i.reduce((d,u)=>{const m=wc(t,u,o);return d.top=ft(m.top,d.top),d.right=hn(m.right,d.right),d.bottom=hn(m.bottom,d.bottom),d.left=ft(m.left,d.left),d},wc(t,c,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function pv(e){const{width:t,height:n}=Iu(e);return{width:t,height:n}}function hv(e,t,n){const r=qt(t),o=Ut(t),a=n==="fixed",i=An(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const l=Lt(0);function d(){l.x=ta(o)}if(r||!r&&!a)if((lr(t)!=="body"||Lr(o))&&(c=ea(t)),r){const p=An(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&d();a&&!r&&o&&d();const u=o&&!r&&!a?Fu(o,c):Lt(0),m=i.left+c.scrollLeft-l.x-u.x,f=i.top+c.scrollTop-l.y-u.y;return{x:m,y:f,width:i.width,height:i.height}}function Aa(e){return Dt(e).position==="static"}function Nc(e,t){if(!qt(e)||Dt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ut(e)===n&&(n=n.ownerDocument.body),n}function Lu(e,t){const n=mt(e);if(Zo(e))return n;if(!qt(e)){let o=_n(e);for(;o&&!rr(o);){if(Mt(o)&&!Aa(o))return o;o=_n(o)}return n}let r=Nc(e,t);for(;r&&Jy(r)&&Aa(r);)r=Nc(r,t);return r&&rr(r)&&Aa(r)&&!Us(r)?n:r||nv(e)||n}const _v=async function(e){const t=this.getOffsetParent||Lu,n=this.getDimensions,r=await n(e.floating);return{reference:hv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gv(e){return Dt(e).direction==="rtl"}const jv={convertOffsetParentRelativeRectToViewportRelativeRect:sv,getDocumentElement:Ut,getClippingRect:mv,getOffsetParent:Lu,getElementRects:_v,getClientRects:iv,getDimensions:pv,getScale:er,isElement:Mt,isRTL:gv};function Bu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function yv(e,t){let n=null,r;const o=Ut(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function i(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),a();const d=e.getBoundingClientRect(),{left:u,top:m,width:f,height:p}=d;if(c||t(),!f||!p)return;const g=no(m),h=no(o.clientWidth-(u+f)),j=no(o.clientHeight-(m+p)),x=no(u),w={rootMargin:-g+"px "+-h+"px "+-j+"px "+-x+"px",threshold:ft(0,hn(1,l))||1};let N=!0;function S(y){const C=y[0].intersectionRatio;if(C!==l){if(!N)return i();C?i(!1,C):r=setTimeout(()=>{i(!1,1e-7)},1e3)}C===1&&!Bu(d,e.getBoundingClientRect())&&i(),N=!1}try{n=new IntersectionObserver(S,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(e)}return i(!0),a}function vv(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,d=Ks(e),u=o||a?[...d?Mr(d):[],...Mr(t)]:[];u.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),a&&x.addEventListener("resize",n)});const m=d&&c?yv(d,n):null;let f=-1,p=null;i&&(p=new ResizeObserver(x=>{let[b]=x;b&&b.target===d&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),d&&!l&&p.observe(d),p.observe(t));let g,h=l?An(e):null;l&&j();function j(){const x=An(e);h&&!Bu(h,x)&&n(),h=x,g=requestAnimationFrame(j)}return n(),()=>{var x;u.forEach(b=>{o&&b.removeEventListener("scroll",n),a&&b.removeEventListener("resize",n)}),m==null||m(),(x=p)==null||x.disconnect(),p=null,l&&cancelAnimationFrame(g)}}const xv=Yy,bv=Vy,wv=By,Nv=Uy,Sv=Hy,Sc=Ly,Cv=Gy,kv=(e,t,n)=>{const r=new Map,o={platform:jv,...n},a={...o.platform,_c:r};return $y(e,t,{...o,platform:a})};var Pv=typeof document<"u",Ev=function(){},mo=Pv?v.useLayoutEffect:Ev;function So(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!So(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!So(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Hu(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Cc(e,t){const n=Hu(e);return Math.round(t*n)/n}function za(e){const t=_.useRef(e);return mo(()=>{t.current=e}),t}function Mv(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:c=!0,whileElementsMounted:l,open:d}=e,[u,m]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=_.useState(r);So(f,r)||p(r);const[g,h]=_.useState(null),[j,x]=_.useState(null),b=_.useCallback(V=>{V!==y.current&&(y.current=V,h(V))},[]),w=_.useCallback(V=>{V!==C.current&&(C.current=V,x(V))},[]),N=a||g,S=i||j,y=_.useRef(null),C=_.useRef(null),E=_.useRef(u),P=l!=null,k=za(l),D=za(o),M=za(d),A=_.useCallback(()=>{if(!y.current||!C.current)return;const V={placement:t,strategy:n,middleware:f};D.current&&(V.platform=D.current),kv(y.current,C.current,V).then(R=>{const K={...R,isPositioned:M.current!==!1};z.current&&!So(E.current,K)&&(E.current=K,Oo.flushSync(()=>{m(K)}))})},[f,t,n,D,M]);mo(()=>{d===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,m(V=>({...V,isPositioned:!1})))},[d]);const z=_.useRef(!1);mo(()=>(z.current=!0,()=>{z.current=!1}),[]),mo(()=>{if(N&&(y.current=N),S&&(C.current=S),N&&S){if(k.current)return k.current(N,S,A);A()}},[N,S,A,k,P]);const G=_.useMemo(()=>({reference:y,floating:C,setReference:b,setFloating:w}),[b,w]),W=_.useMemo(()=>({reference:N,floating:S}),[N,S]),Q=_.useMemo(()=>{const V={position:n,left:0,top:0};if(!W.floating)return V;const R=Cc(W.floating,u.x),K=Cc(W.floating,u.y);return c?{...V,transform:"translate("+R+"px, "+K+"px)",...Hu(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:K}},[n,c,W.floating,u.x,u.y]);return _.useMemo(()=>({...u,update:A,refs:G,elements:W,floatingStyles:Q}),[u,A,G,W,Q])}const Dv=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Sc({element:r.current,padding:o}).fn(n):{}:r?Sc({element:r,padding:o}).fn(n):{}}}},Tv=(e,t)=>({...xv(e),options:[e,t]}),Rv=(e,t)=>({...bv(e),options:[e,t]}),Ov=(e,t)=>({...Cv(e),options:[e,t]}),Av=(e,t)=>({...wv(e),options:[e,t]}),zv=(e,t)=>({...Nv(e),options:[e,t]}),Iv=(e,t)=>({...Sv(e),options:[e,t]}),Wv=(e,t)=>({...Dv(e),options:[e,t]});var Fv="Arrow",qu=_.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return s.jsx(le.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});qu.displayName=Fv;var $v=qu;function Js(e){const[t,n]=_.useState(void 0);return Je(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let i,c;if("borderBoxSize"in a){const l=a.borderBoxSize,d=Array.isArray(l)?l[0]:l;i=d.inlineSize,c=d.blockSize}else i=e.offsetWidth,c=e.offsetHeight;n({width:i,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Qs="Popper",[Yu,na]=_t(Qs),[Lv,Vu]=Yu(Qs),Gu=e=>{const{__scopePopper:t,children:n}=e,[r,o]=_.useState(null);return s.jsx(Lv,{scope:t,anchor:r,onAnchorChange:o,children:n})};Gu.displayName=Qs;var Uu="PopperAnchor",Xu=_.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Vu(Uu,n),i=_.useRef(null),c=ve(t,i),l=_.useRef(null);return _.useEffect(()=>{const d=l.current;l.current=(r==null?void 0:r.current)||i.current,d!==l.current&&a.onAnchorChange(l.current)}),r?null:s.jsx(le.div,{...o,ref:c})});Xu.displayName=Uu;var Zs="PopperContent",[Bv,Hv]=Yu(Zs),Ku=_.forwardRef((e,t)=>{var T,$,J,X,ae,ce;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:m="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:g,...h}=e,j=Vu(Zs,n),[x,b]=_.useState(null),w=ve(t,me=>b(me)),[N,S]=_.useState(null),y=Js(N),C=(y==null?void 0:y.width)??0,E=(y==null?void 0:y.height)??0,P=r+(a!=="center"?"-"+a:""),k=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(d)?d:[d],M=D.length>0,A={padding:k,boundary:D.filter(Yv),altBoundary:M},{refs:z,floatingStyles:G,placement:W,isPositioned:Q,middlewareData:V}=Mv({strategy:"fixed",placement:P,whileElementsMounted:(...me)=>vv(...me,{animationFrame:p==="always"}),elements:{reference:j.anchor},middleware:[Tv({mainAxis:o+E,alignmentAxis:i}),l&&Rv({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Ov():void 0,...A}),l&&Av({...A}),zv({...A,apply:({elements:me,rects:xe,availableWidth:Ge,availableHeight:Qe})=>{const{width:Ze,height:Ie}=xe.reference,ct=me.floating.style;ct.setProperty("--radix-popper-available-width",`${Ge}px`),ct.setProperty("--radix-popper-available-height",`${Qe}px`),ct.setProperty("--radix-popper-anchor-width",`${Ze}px`),ct.setProperty("--radix-popper-anchor-height",`${Ie}px`)}}),N&&Wv({element:N,padding:c}),Vv({arrowWidth:C,arrowHeight:E}),f&&Iv({strategy:"referenceHidden",...A})]}),[R,K]=Zu(W),fe=rt(g);Je(()=>{Q&&(fe==null||fe())},[Q,fe]);const ie=(T=V.arrow)==null?void 0:T.x,O=($=V.arrow)==null?void 0:$.y,I=((J=V.arrow)==null?void 0:J.centerOffset)!==0,[H,U]=_.useState();return Je(()=>{x&&U(window.getComputedStyle(x).zIndex)},[x]),s.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:Q?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[(X=V.transformOrigin)==null?void 0:X.x,(ae=V.transformOrigin)==null?void 0:ae.y].join(" "),...((ce=V.hide)==null?void 0:ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(Bv,{scope:n,placedSide:R,onArrowChange:S,arrowX:ie,arrowY:O,shouldHideArrow:I,children:s.jsx(le.div,{"data-side":R,"data-align":K,...h,ref:w,style:{...h.style,animation:Q?void 0:"none"}})})})});Ku.displayName=Zs;var Ju="PopperArrow",qv={top:"bottom",right:"left",bottom:"top",left:"right"},Qu=_.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=Hv(Ju,r),i=qv[a.placedSide];return s.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:s.jsx($v,{...o,ref:n,style:{...o.style,display:"block"}})})});Qu.displayName=Ju;function Yv(e){return e!==null}var Vv=e=>({name:"transformOrigin",options:e,fn(t){var j,x,b;const{placement:n,rects:r,middlewareData:o}=t,i=((j=o.arrow)==null?void 0:j.centerOffset)!==0,c=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[d,u]=Zu(n),m={start:"0%",center:"50%",end:"100%"}[u],f=(((x=o.arrow)==null?void 0:x.x)??0)+c/2,p=(((b=o.arrow)==null?void 0:b.y)??0)+l/2;let g="",h="";return d==="bottom"?(g=i?m:`${f}px`,h=`${-l}px`):d==="top"?(g=i?m:`${f}px`,h=`${r.floating.height+l}px`):d==="right"?(g=`${-l}px`,h=i?m:`${p}px`):d==="left"&&(g=`${r.floating.width+l}px`,h=i?m:`${p}px`),{data:{x:g,y:h}}}});function Zu(e){const[t,n="center"]=e.split("-");return[t,n]}var ef=Gu,ei=Xu,tf=Ku,nf=Qu;function Gv(e){const t=Uv(e),n=_.forwardRef((r,o)=>{const{children:a,...i}=r,c=_.Children.toArray(a),l=c.find(Kv);if(l){const d=l.props.children,u=c.map(m=>m===l?_.Children.count(d)>1?_.Children.only(null):_.isValidElement(d)?d.props.children:null:m);return s.jsx(t,{...i,ref:o,children:_.isValidElement(d)?_.cloneElement(d,void 0,u):null})}return s.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function Uv(e){const t=_.forwardRef((n,r)=>{const{children:o,...a}=n;if(_.isValidElement(o)){const i=Qv(o),c=Jv(a,o.props);return o.type!==_.Fragment&&(c.ref=r?Wn(r,i):i),_.cloneElement(o,c)}return _.Children.count(o)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Xv=Symbol("radix.slottable");function Kv(e){return _.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Xv}function Jv(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...c)=>{const l=a(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Qv(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ti(e){const t=_.useRef({value:e,previous:e});return _.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var rf=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Zv="VisuallyHidden",ex=_.forwardRef((e,t)=>s.jsx(le.span,{...e,ref:t,style:{...rf,...e.style}}));ex.displayName=Zv;var tx=[" ","Enter","ArrowUp","ArrowDown"],nx=[" ","Enter"],zn="Select",[ra,oa,rx]=_l(zn),[dr]=_t(zn,[rx,na]),aa=na(),[ox,yn]=dr(zn),[ax,sx]=dr(zn),of=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:c,onValueChange:l,dir:d,name:u,autoComplete:m,disabled:f,required:p,form:g}=e,h=aa(t),[j,x]=_.useState(null),[b,w]=_.useState(null),[N,S]=_.useState(!1),y=Or(d),[C,E]=tn({prop:r,defaultProp:o??!1,onChange:a,caller:zn}),[P,k]=tn({prop:i,defaultProp:c,onChange:l,caller:zn}),D=_.useRef(null),M=j?g||!!j.closest("form"):!0,[A,z]=_.useState(new Set),G=Array.from(A).map(W=>W.props.value).join(";");return s.jsx(ef,{...h,children:s.jsxs(ox,{required:p,scope:t,trigger:j,onTriggerChange:x,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:N,onValueNodeHasChildrenChange:S,contentId:$t(),value:P,onValueChange:k,open:C,onOpenChange:E,dir:y,triggerPointerDownPosRef:D,disabled:f,children:[s.jsx(ra.Provider,{scope:t,children:s.jsx(ax,{scope:e.__scopeSelect,onNativeOptionAdd:_.useCallback(W=>{z(Q=>new Set(Q).add(W))},[]),onNativeOptionRemove:_.useCallback(W=>{z(Q=>{const V=new Set(Q);return V.delete(W),V})},[]),children:n})}),M?s.jsxs(Ef,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:m,value:P,onChange:W=>k(W.target.value),disabled:f,form:g,children:[P===void 0?s.jsx("option",{value:""}):null,Array.from(A)]},G):null]})})};of.displayName=zn;var af="SelectTrigger",sf=_.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=aa(n),i=yn(af,n),c=i.disabled||r,l=ve(t,i.onTriggerChange),d=oa(n),u=_.useRef("touch"),[m,f,p]=Df(h=>{const j=d().filter(w=>!w.disabled),x=j.find(w=>w.value===i.value),b=Tf(j,h,x);b!==void 0&&i.onValueChange(b.value)}),g=h=>{c||(i.onOpenChange(!0),p()),h&&(i.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return s.jsx(ei,{asChild:!0,...a,children:s.jsx(le.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Mf(i.value)?"":void 0,...o,ref:l,onClick:se(o.onClick,h=>{h.currentTarget.focus(),u.current!=="mouse"&&g(h)}),onPointerDown:se(o.onPointerDown,h=>{u.current=h.pointerType;const j=h.target;j.hasPointerCapture(h.pointerId)&&j.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(g(h),h.preventDefault())}),onKeyDown:se(o.onKeyDown,h=>{const j=m.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&f(h.key),!(j&&h.key===" ")&&tx.includes(h.key)&&(g(),h.preventDefault())})})})});sf.displayName=af;var cf="SelectValue",lf=_.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...c}=e,l=yn(cf,n),{onValueNodeHasChildrenChange:d}=l,u=a!==void 0,m=ve(t,l.onValueNodeChange);return Je(()=>{d(u)},[d,u]),s.jsx(le.span,{...c,ref:m,style:{pointerEvents:"none"},children:Mf(l.value)?s.jsx(s.Fragment,{children:i}):a})});lf.displayName=cf;var ix="SelectIcon",df=_.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return s.jsx(le.span,{"aria-hidden":!0,...o,ref:t,children:r||"โผ"})});df.displayName=ix;var cx="SelectPortal",uf=e=>s.jsx(Go,{asChild:!0,...e});uf.displayName=cx;var In="SelectContent",ff=_.forwardRef((e,t)=>{const n=yn(In,e.__scopeSelect),[r,o]=_.useState();if(Je(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?Oo.createPortal(s.jsx(mf,{scope:e.__scopeSelect,children:s.jsx(ra.Slot,{scope:e.__scopeSelect,children:s.jsx("div",{children:e.children})})}),a):null}return s.jsx(pf,{...e,ref:t})});ff.displayName=In;var Ct=10,[mf,vn]=dr(In),lx="SelectContentImpl",dx=Gv("SelectContent.RemoveScroll"),pf=_.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:c,sideOffset:l,align:d,alignOffset:u,arrowPadding:m,collisionBoundary:f,collisionPadding:p,sticky:g,hideWhenDetached:h,avoidCollisions:j,...x}=e,b=yn(In,n),[w,N]=_.useState(null),[S,y]=_.useState(null),C=ve(t,T=>N(T)),[E,P]=_.useState(null),[k,D]=_.useState(null),M=oa(n),[A,z]=_.useState(!1),G=_.useRef(!1);_.useEffect(()=>{if(w)return Fs(w)},[w]),Ws();const W=_.useCallback(T=>{const[$,...J]=M().map(ce=>ce.ref.current),[X]=J.slice(-1),ae=document.activeElement;for(const ce of T)if(ce===ae||(ce==null||ce.scrollIntoView({block:"nearest"}),ce===$&&S&&(S.scrollTop=0),ce===X&&S&&(S.scrollTop=S.scrollHeight),ce==null||ce.focus(),document.activeElement!==ae))return},[M,S]),Q=_.useCallback(()=>W([E,w]),[W,E,w]);_.useEffect(()=>{A&&Q()},[A,Q]);const{onOpenChange:V,triggerPointerDownPosRef:R}=b;_.useEffect(()=>{if(w){let T={x:0,y:0};const $=X=>{var ae,ce;T={x:Math.abs(Math.round(X.pageX)-(((ae=R.current)==null?void 0:ae.x)??0)),y:Math.abs(Math.round(X.pageY)-(((ce=R.current)==null?void 0:ce.y)??0))}},J=X=>{T.x<=10&&T.y<=10?X.preventDefault():w.contains(X.target)||V(!1),document.removeEventListener("pointermove",$),R.current=null};return R.current!==null&&(document.addEventListener("pointermove",$),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",$),document.removeEventListener("pointerup",J,{capture:!0})}}},[w,V,R]),_.useEffect(()=>{const T=()=>V(!1);return window.addEventListener("blur",T),window.addEventListener("resize",T),()=>{window.removeEventListener("blur",T),window.removeEventListener("resize",T)}},[V]);const[K,fe]=Df(T=>{const $=M().filter(ae=>!ae.disabled),J=$.find(ae=>ae.ref.current===document.activeElement),X=Tf($,T,J);X&&setTimeout(()=>X.ref.current.focus())}),ie=_.useCallback((T,$,J)=>{const X=!G.current&&!J;(b.value!==void 0&&b.value===$||X)&&(P(T),X&&(G.current=!0))},[b.value]),O=_.useCallback(()=>w==null?void 0:w.focus(),[w]),I=_.useCallback((T,$,J)=>{const X=!G.current&&!J;(b.value!==void 0&&b.value===$||X)&&D(T)},[b.value]),H=r==="popper"?rs:hf,U=H===rs?{side:c,sideOffset:l,align:d,alignOffset:u,arrowPadding:m,collisionBoundary:f,collisionPadding:p,sticky:g,hideWhenDetached:h,avoidCollisions:j}:{};return s.jsx(mf,{scope:n,content:w,viewport:S,onViewportChange:y,itemRefCallback:ie,selectedItem:E,onItemLeave:O,itemTextRefCallback:I,focusSelectedItem:Q,selectedItemText:k,position:r,isPositioned:A,searchRef:K,children:s.jsx(Xo,{as:dx,allowPinchZoom:!0,children:s.jsx(Vo,{asChild:!0,trapped:b.open,onMountAutoFocus:T=>{T.preventDefault()},onUnmountAutoFocus:se(o,T=>{var $;($=b.trigger)==null||$.focus({preventScroll:!0}),T.preventDefault()}),children:s.jsx(Yo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:T=>T.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:s.jsx(H,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:T=>T.preventDefault(),...x,...U,onPlaced:()=>z(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:se(x.onKeyDown,T=>{const $=T.ctrlKey||T.altKey||T.metaKey;if(T.key==="Tab"&&T.preventDefault(),!$&&T.key.length===1&&fe(T.key),["ArrowUp","ArrowDown","Home","End"].includes(T.key)){let X=M().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);if(["ArrowUp","End"].includes(T.key)&&(X=X.slice().reverse()),["ArrowUp","ArrowDown"].includes(T.key)){const ae=T.target,ce=X.indexOf(ae);X=X.slice(ce+1)}setTimeout(()=>W(X)),T.preventDefault()}})})})})})})});pf.displayName=lx;var ux="SelectItemAlignedPosition",hf=_.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=yn(In,n),i=vn(In,n),[c,l]=_.useState(null),[d,u]=_.useState(null),m=ve(t,C=>u(C)),f=oa(n),p=_.useRef(!1),g=_.useRef(!0),{viewport:h,selectedItem:j,selectedItemText:x,focusSelectedItem:b}=i,w=_.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&d&&h&&j&&x){const C=a.trigger.getBoundingClientRect(),E=d.getBoundingClientRect(),P=a.valueNode.getBoundingClientRect(),k=x.getBoundingClientRect();if(a.dir!=="rtl"){const ae=k.left-E.left,ce=P.left-ae,me=C.left-ce,xe=C.width+me,Ge=Math.max(xe,E.width),Qe=window.innerWidth-Ct,Ze=Ka(ce,[Ct,Math.max(Ct,Qe-Ge)]);c.style.minWidth=xe+"px",c.style.left=Ze+"px"}else{const ae=E.right-k.right,ce=window.innerWidth-P.right-ae,me=window.innerWidth-C.right-ce,xe=C.width+me,Ge=Math.max(xe,E.width),Qe=window.innerWidth-Ct,Ze=Ka(ce,[Ct,Math.max(Ct,Qe-Ge)]);c.style.minWidth=xe+"px",c.style.right=Ze+"px"}const D=f(),M=window.innerHeight-Ct*2,A=h.scrollHeight,z=window.getComputedStyle(d),G=parseInt(z.borderTopWidth,10),W=parseInt(z.paddingTop,10),Q=parseInt(z.borderBottomWidth,10),V=parseInt(z.paddingBottom,10),R=G+W+A+V+Q,K=Math.min(j.offsetHeight*5,R),fe=window.getComputedStyle(h),ie=parseInt(fe.paddingTop,10),O=parseInt(fe.paddingBottom,10),I=C.top+C.height/2-Ct,H=M-I,U=j.offsetHeight/2,T=j.offsetTop+U,$=G+W+T,J=R-$;if($<=I){const ae=D.length>0&&j===D[D.length-1].ref.current;c.style.bottom="0px";const ce=d.clientHeight-h.offsetTop-h.offsetHeight,me=Math.max(H,U+(ae?O:0)+ce+Q),xe=$+me;c.style.height=xe+"px"}else{const ae=D.length>0&&j===D[0].ref.current;c.style.top="0px";const me=Math.max(I,G+h.offsetTop+(ae?ie:0)+U)+J;c.style.height=me+"px",h.scrollTop=$-I+h.offsetTop}c.style.margin=`${Ct}px 0`,c.style.minHeight=K+"px",c.style.maxHeight=M+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,c,d,h,j,x,a.dir,r]);Je(()=>w(),[w]);const[N,S]=_.useState();Je(()=>{d&&S(window.getComputedStyle(d).zIndex)},[d]);const y=_.useCallback(C=>{C&&g.current===!0&&(w(),b==null||b(),g.current=!1)},[w,b]);return s.jsx(mx,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:p,onScrollButtonChange:y,children:s.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:s.jsx(le.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});hf.displayName=ux;var fx="SelectPopperPosition",rs=_.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Ct,...a}=e,i=aa(n);return s.jsx(tf,{...i,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});rs.displayName=fx;var[mx,ni]=dr(In,{}),os="SelectViewport",_f=_.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=vn(os,n),i=ni(os,n),c=ve(t,a.onViewportChange),l=_.useRef(0);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),s.jsx(ra.Slot,{scope:n,children:s.jsx(le.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:se(o.onScroll,d=>{const u=d.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:f}=i;if(f!=null&&f.current&&m){const p=Math.abs(l.current-u.scrollTop);if(p>0){const g=window.innerHeight-Ct*2,h=parseFloat(m.style.minHeight),j=parseFloat(m.style.height),x=Math.max(h,j);if(x<g){const b=x+p,w=Math.min(g,b),N=b-w;m.style.height=w+"px",m.style.bottom==="0px"&&(u.scrollTop=N>0?N:0,m.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});_f.displayName=os;var gf="SelectGroup",[px,hx]=dr(gf),_x=_.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=$t();return s.jsx(px,{scope:n,id:o,children:s.jsx(le.div,{role:"group","aria-labelledby":o,...r,ref:t})})});_x.displayName=gf;var jf="SelectLabel",yf=_.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=hx(jf,n);return s.jsx(le.div,{id:o.id,...r,ref:t})});yf.displayName=jf;var Co="SelectItem",[gx,vf]=dr(Co),xf=_.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,c=yn(Co,n),l=vn(Co,n),d=c.value===r,[u,m]=_.useState(a??""),[f,p]=_.useState(!1),g=ve(t,b=>{var w;return(w=l.itemRefCallback)==null?void 0:w.call(l,b,r,o)}),h=$t(),j=_.useRef("touch"),x=()=>{o||(c.onValueChange(r),c.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return s.jsx(gx,{scope:n,value:r,disabled:o,textId:h,isSelected:d,onItemTextChange:_.useCallback(b=>{m(w=>w||((b==null?void 0:b.textContent)??"").trim())},[]),children:s.jsx(ra.ItemSlot,{scope:n,value:r,disabled:o,textValue:u,children:s.jsx(le.div,{role:"option","aria-labelledby":h,"data-highlighted":f?"":void 0,"aria-selected":d&&f,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:g,onFocus:se(i.onFocus,()=>p(!0)),onBlur:se(i.onBlur,()=>p(!1)),onClick:se(i.onClick,()=>{j.current!=="mouse"&&x()}),onPointerUp:se(i.onPointerUp,()=>{j.current==="mouse"&&x()}),onPointerDown:se(i.onPointerDown,b=>{j.current=b.pointerType}),onPointerMove:se(i.onPointerMove,b=>{var w;j.current=b.pointerType,o?(w=l.onItemLeave)==null||w.call(l):j.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:se(i.onPointerLeave,b=>{var w;b.currentTarget===document.activeElement&&((w=l.onItemLeave)==null||w.call(l))}),onKeyDown:se(i.onKeyDown,b=>{var N;((N=l.searchRef)==null?void 0:N.current)!==""&&b.key===" "||(nx.includes(b.key)&&x(),b.key===" "&&b.preventDefault())})})})})});xf.displayName=Co;var br="SelectItemText",bf=_.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=yn(br,n),c=vn(br,n),l=vf(br,n),d=sx(br,n),[u,m]=_.useState(null),f=ve(t,x=>m(x),l.onItemTextChange,x=>{var b;return(b=c.itemTextRefCallback)==null?void 0:b.call(c,x,l.value,l.disabled)}),p=u==null?void 0:u.textContent,g=_.useMemo(()=>s.jsx("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:j}=d;return Je(()=>(h(g),()=>j(g)),[h,j,g]),s.jsxs(s.Fragment,{children:[s.jsx(le.span,{id:l.textId,...a,ref:f}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Oo.createPortal(a.children,i.valueNode):null]})});bf.displayName=br;var wf="SelectItemIndicator",Nf=_.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return vf(wf,n).isSelected?s.jsx(le.span,{"aria-hidden":!0,...r,ref:t}):null});Nf.displayName=wf;var as="SelectScrollUpButton",Sf=_.forwardRef((e,t)=>{const n=vn(as,e.__scopeSelect),r=ni(as,e.__scopeSelect),[o,a]=_.useState(!1),i=ve(t,r.onScrollButtonChange);return Je(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=l.scrollTop>0;a(d)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?s.jsx(kf,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop-l.offsetHeight)}}):null});Sf.displayName=as;var ss="SelectScrollDownButton",Cf=_.forwardRef((e,t)=>{const n=vn(ss,e.__scopeSelect),r=ni(ss,e.__scopeSelect),[o,a]=_.useState(!1),i=ve(t,r.onScrollButtonChange);return Je(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<d;a(u)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?s.jsx(kf,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop+l.offsetHeight)}}):null});Cf.displayName=ss;var kf=_.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=vn("SelectScrollButton",n),i=_.useRef(null),c=oa(n),l=_.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return _.useEffect(()=>()=>l(),[l]),Je(()=>{var u;const d=c().find(m=>m.ref.current===document.activeElement);(u=d==null?void 0:d.ref.current)==null||u.scrollIntoView({block:"nearest"})},[c]),s.jsx(le.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:se(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:se(o.onPointerMove,()=>{var d;(d=a.onItemLeave)==null||d.call(a),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:se(o.onPointerLeave,()=>{l()})})}),jx="SelectSeparator",Pf=_.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return s.jsx(le.div,{"aria-hidden":!0,...r,ref:t})});Pf.displayName=jx;var is="SelectArrow",yx=_.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=aa(n),a=yn(is,n),i=vn(is,n);return a.open&&i.position==="popper"?s.jsx(nf,{...o,...r,ref:t}):null});yx.displayName=is;var vx="SelectBubbleInput",Ef=_.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=_.useRef(null),a=ve(r,o),i=ti(t);return _.useEffect(()=>{const c=o.current;if(!c)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&u){const m=new Event("change",{bubbles:!0});u.call(c,t),c.dispatchEvent(m)}},[i,t]),s.jsx(le.select,{...n,style:{...rf,...n.style},ref:a,defaultValue:t})});Ef.displayName=vx;function Mf(e){return e===""||e===void 0}function Df(e){const t=rt(e),n=_.useRef(""),r=_.useRef(0),o=_.useCallback(i=>{const c=n.current+i;t(c),function l(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(c)},[t]),a=_.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return _.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function Tf(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let i=xx(e,Math.max(a,0));o.length===1&&(i=i.filter(d=>d!==n));const l=i.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function xx(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var bx=of,Rf=sf,wx=lf,Nx=df,Sx=uf,Of=ff,Cx=_f,Af=yf,zf=xf,kx=bf,Px=Nf,If=Sf,Wf=Cf,Ff=Pf;const sa=v.createContext(null);function ia(){return v.useContext(sa)}const Oe=bx,Ae=wx,De=_.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(Rf,{ref:r,className:ne("cj-flex cj-h-10 cj-w-full cj-items-center cj-justify-between cj-rounded-md cj-border cj-border-input cj-bg-background cj-px-3 cj-py-2 cj-text-sm cj-ring-offset-background placeholder:cj-text-muted-foreground focus:cj-outline-none focus:cj-ring-2 focus:cj-ring-ring focus:cj-ring-offset-2 disabled:cj-cursor-not-allowed disabled:cj-opacity-50 [&>span]:cj-line-clamp-1",e),...n,children:[t,s.jsx(Nx,{asChild:!0,children:s.jsx(Bt,{className:"cj-h-4 cj-w-4 cj-opacity-50"})})]}));De.displayName=Rf.displayName;const $f=_.forwardRef(({className:e,...t},n)=>s.jsx(If,{ref:n,className:ne("cj-flex cj-cursor-default cj-items-center cj-justify-center cj-py-1",e),...t,children:s.jsx(_o,{className:"cj-h-4 cj-w-4"})}));$f.displayName=If.displayName;const Lf=_.forwardRef(({className:e,...t},n)=>s.jsx(Wf,{ref:n,className:ne("cj-flex cj-cursor-default cj-items-center cj-justify-center cj-py-1",e),...t,children:s.jsx(Bt,{className:"cj-h-4 cj-w-4"})}));Lf.displayName=Wf.displayName;const Te=_.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>{const a=ia();return s.jsx(Sx,{container:a??void 0,children:s.jsxs(Of,{ref:o,className:ne("cj-relative cj-z-50 cj-max-h-96 cj-min-w-[8rem] cj-overflow-hidden cj-rounded-md cj-border cj-bg-popover cj-text-popover-foreground cj-shadow-md data-[state=open]:cj-animate-in data-[state=closed]:cj-animate-out data-[state=closed]:cj-fade-out-0 data-[state=open]:cj-fade-in-0 data-[state=closed]:cj-zoom-out-95 data-[state=open]:cj-zoom-in-95 data-[side=bottom]:cj-slide-in-from-top-2 data-[side=left]:cj-slide-in-from-right-2 data-[side=right]:cj-slide-in-from-left-2 data-[side=top]:cj-slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:cj-translate-y-1 data-[side=left]:-cj-translate-x-1 data-[side=right]:cj-translate-x-1 data-[side=top]:-cj-translate-y-1",e),position:n,...r,children:[s.jsx($f,{}),s.jsx(Cx,{className:ne("cj-p-1",n==="popper"&&"cj-h-[var(--radix-select-trigger-height)] cj-w-full cj-min-w-[var(--radix-select-trigger-width)]"),children:t}),s.jsx(Lf,{})]})})});Te.displayName=Of.displayName;const Ex=_.forwardRef(({className:e,...t},n)=>s.jsx(Af,{ref:n,className:ne("cj-py-1.5 cj-pl-8 cj-pr-2 cj-text-sm cj-font-semibold",e),...t}));Ex.displayName=Af.displayName;const B=_.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(zf,{ref:r,className:ne("cj-relative cj-flex cj-w-full cj-cursor-default cj-select-none cj-items-center cj-rounded-sm cj-py-1.5 cj-pl-8 cj-pr-2 cj-text-sm cj-outline-none data-[disabled]:cj-pointer-events-none data-[disabled]:cj-opacity-50 focus:cj-bg-accent focus:cj-text-accent-foreground",e),...n,children:[s.jsx("span",{className:"cj-absolute cj-left-2 cj-flex cj-h-3.5 cj-w-3.5 cj-items-center cj-justify-center",children:s.jsx(Px,{children:s.jsx(Ll,{className:"cj-h-4 cj-w-4"})})}),s.jsx(kx,{children:t})]}));B.displayName=zf.displayName;const Mx=_.forwardRef(({className:e,...t},n)=>s.jsx(Ff,{ref:n,className:ne("-cj-mx-1 cj-my-1 cj-h-px cj-bg-muted",e),...t}));Mx.displayName=Ff.displayName;const Cr={v1_string:{label:"String",color:"cj-bg-blue-500"},"v2_single_option_select-1":{label:"Single Select",color:"cj-bg-purple-500"},"v2_date-1":{label:"Date",color:"cj-bg-green-500"},"v2_time-1":{label:"Time",color:"cj-bg-lime-500"},"v2_datetime-1":{label:"Date & Time",color:"cj-bg-cyan-500"},"v2_currency-1":{label:"Currency",color:"cj-bg-yellow-500"},v2_single_asset_upload:{label:"Upload",color:"cj-bg-orange-500"},"v2_phone-1":{label:"Phone",color:"cj-bg-teal-500"},"v2_email-1":{label:"Email",color:"cj-bg-rose-500"},v2_address_coordinates:{label:"Location",color:"cj-bg-emerald-500"},"v2_boolean-1":{label:"Boolean",color:"cj-bg-indigo-500"}};function ca(e){return Cr[e]||{label:e,color:"cj-bg-muted"}}const cs=Hs,Dx=qs,Bf=_.forwardRef(({className:e,...t},n)=>{const r=ia();return s.jsx(zr,{ref:n,className:ne(r?"cj-absolute cj-inset-0 cj-z-50 cj-bg-black/80 data-[state=open]:cj-animate-in data-[state=closed]:cj-animate-out data-[state=closed]:cj-fade-out-0 data-[state=open]:cj-fade-in-0":"cj-fixed cj-inset-0 cj-z-50 cj-bg-black/80 data-[state=open]:cj-animate-in data-[state=closed]:cj-animate-out data-[state=closed]:cj-fade-out-0 data-[state=open]:cj-fade-in-0",e),...t})});Bf.displayName=zr.displayName;const ko=_.forwardRef(({className:e,children:t,...n},r)=>{const o=ia(),a=o?"cj-absolute cj-left-[50%] cj-top-[50%] cj-z-50 cj-grid cj-w-full cj-max-w-lg cj-translate-x-[-50%] cj-translate-y-[-50%] cj-gap-4 cj-border cj-bg-background cj-p-6 cj-shadow-lg cj-duration-200 data-[state=open]:cj-animate-in data-[state=closed]:cj-animate-out data-[state=closed]:cj-fade-out-0 data-[state=open]:cj-fade-in-0 data-[state=closed]:cj-zoom-out-95 data-[state=open]:cj-zoom-in-95 sm:cj-rounded-lg":"cj-fixed cj-left-[50%] cj-top-[50%] cj-z-50 cj-grid cj-w-full cj-max-w-lg cj-translate-x-[-50%] cj-translate-y-[-50%] cj-gap-4 cj-border cj-bg-background cj-p-6 cj-shadow-lg cj-duration-200 data-[state=open]:cj-animate-in data-[state=closed]:cj-animate-out data-[state=closed]:cj-fade-out-0 data-[state=open]:cj-fade-in-0 data-[state=closed]:cj-zoom-out-95 data-[state=open]:cj-zoom-in-95 data-[state=closed]:cj-slide-out-to-left-1/2 data-[state=closed]:cj-slide-out-to-top-[48%] data-[state=open]:cj-slide-in-from-left-1/2 data-[state=open]:cj-slide-in-from-top-[48%] sm:cj-rounded-lg";return s.jsxs(Dx,{container:o??void 0,children:[s.jsx(Bf,{}),s.jsxs(Ir,{ref:r,className:ne(a,e),...n,children:[t,s.jsxs(Jo,{className:"cj-absolute cj-right-4 cj-top-4 cj-rounded-sm cj-opacity-70 cj-ring-offset-background cj-transition-opacity data-[state=open]:cj-bg-accent data-[state=open]:cj-text-muted-foreground hover:cj-opacity-100 focus:cj-outline-none focus:cj-ring-2 focus:cj-ring-ring focus:cj-ring-offset-2 disabled:cj-pointer-events-none",children:[s.jsx(Vt,{className:"cj-h-4 cj-w-4"}),s.jsx("span",{className:"cj-sr-only",children:"Close"})]})]})]})});ko.displayName=Ir.displayName;const ri=({className:e,...t})=>s.jsx("div",{className:ne("cj-flex cj-flex-col cj-space-y-1.5 cj-text-center sm:cj-text-left",e),...t});ri.displayName="DialogHeader";const oi=({className:e,...t})=>s.jsx("div",{className:ne("cj-flex cj-flex-col-reverse sm:cj-flex-row sm:cj-justify-end sm:cj-space-x-2",e),...t});oi.displayName="DialogFooter";const ai=_.forwardRef(({className:e,...t},n)=>s.jsx(Wr,{ref:n,className:ne("cj-text-lg cj-font-semibold cj-leading-none cj-tracking-tight",e),...t}));ai.displayName=Wr.displayName;const Hf=_.forwardRef(({className:e,...t},n)=>s.jsx(Fr,{ref:n,className:ne("cj-text-sm cj-text-muted-foreground",e),...t}));Hf.displayName=Fr.displayName;var la="Switch",[Tx]=_t(la),[Rx,Ox]=Tx(la),qf=_.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:c,value:l="on",onCheckedChange:d,form:u,...m}=e,[f,p]=_.useState(null),g=ve(t,w=>p(w)),h=_.useRef(!1),j=f?u||!!f.closest("form"):!0,[x,b]=tn({prop:o,defaultProp:a??!1,onChange:d,caller:la});return s.jsxs(Rx,{scope:n,checked:x,disabled:c,children:[s.jsx(le.button,{type:"button",role:"switch","aria-checked":x,"aria-required":i,"data-state":Uf(x),"data-disabled":c?"":void 0,disabled:c,value:l,...m,ref:g,onClick:se(e.onClick,w=>{b(N=>!N),j&&(h.current=w.isPropagationStopped(),h.current||w.stopPropagation())})}),j&&s.jsx(Gf,{control:f,bubbles:!h.current,name:r,value:l,checked:x,required:i,disabled:c,form:u,style:{transform:"translateX(-100%)"}})]})});qf.displayName=la;var Yf="SwitchThumb",Vf=_.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=Ox(Yf,n);return s.jsx(le.span,{"data-state":Uf(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Vf.displayName=Yf;var Ax="SwitchBubbleInput",Gf=_.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=_.useRef(null),c=ve(i,a),l=ti(n),d=Js(t);return _.useEffect(()=>{const u=i.current;if(!u)return;const m=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(m,"checked").set;if(l!==n&&p){const g=new Event("click",{bubbles:r});p.call(u,n),u.dispatchEvent(g)}},[l,n,r]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:c,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Gf.displayName=Ax;function Uf(e){return e?"checked":"unchecked"}var Xf=qf,zx=Vf;const Yt=_.forwardRef(({className:e,...t},n)=>s.jsx(Xf,{className:ne("cj-peer cj-inline-flex cj-h-6 cj-w-11 cj-shrink-0 cj-cursor-pointer cj-items-center cj-rounded-full cj-border-2 cj-border-transparent cj-transition-colors data-[state=checked]:cj-bg-primary data-[state=unchecked]:cj-bg-input focus-visible:cj-outline-none focus-visible:cj-ring-2 focus-visible:cj-ring-ring focus-visible:cj-ring-offset-2 focus-visible:cj-ring-offset-background disabled:cj-cursor-not-allowed disabled:cj-opacity-50",e),...t,ref:n,children:s.jsx(zx,{className:ne("cj-pointer-events-none cj-block cj-h-5 cj-w-5 cj-rounded-full cj-bg-background cj-shadow-lg cj-ring-0 cj-transition-transform data-[state=checked]:cj-translate-x-5 data-[state=unchecked]:cj-translate-x-0")})}));Yt.displayName=Xf.displayName;var Ix=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Wx=Ix.reduce((e,t)=>{const n=Ao(`Primitive.${t}`),r=_.forwardRef((o,a)=>{const{asChild:i,...c}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(l,{...c,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Fx="Separator",kc="horizontal",$x=["horizontal","vertical"],Kf=_.forwardRef((e,t)=>{const{decorative:n,orientation:r=kc,...o}=e,a=Lx(r)?r:kc,c=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return s.jsx(Wx.div,{"data-orientation":a,...c,...o,ref:t})});Kf.displayName=Fx;function Lx(e){return $x.includes(e)}var Jf=Kf;const Cn=_.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>s.jsx(Jf,{ref:o,decorative:n,orientation:t,className:ne("cj-shrink-0 cj-bg-border",t==="horizontal"?"cj-h-[1px] cj-w-full":"cj-h-full cj-w-[1px]",e),...r}));Cn.displayName=Jf.displayName;const Qf=[{value:"==",label:"equals"},{value:"!=",label:"not equals"},{value:">",label:"greater than"},{value:"<",label:"less than"},{value:">=",label:"greater or equal"},{value:"<=",label:"less or equal"},{value:"in",label:"contains"},{value:"is_null",label:"is null"},{value:"is_not_null",label:"is not null"}],Po=["is_null","is_not_null"];function Pc(e){const t=Object.keys(e)[0];if(t==="=="||t==="!="){const a=e[t];if(!Array.isArray(a)||a.length!==2)return null;const i=a[0];if(!(i!=null&&i.var))return null;const c=i.var.replace("answers.","");return a[1]===null?{field:c,operator:t==="=="?"is_null":"is_not_null",value:""}:{field:c,operator:t,value:String(a[1])}}if(!Qf.some(a=>a.value===t))return null;const n=e[t];if(!Array.isArray(n)||n.length!==2)return null;const r=n[0];return r!=null&&r.var?{field:r.var.replace("answers.",""),operator:t,value:String(n[1])}:null}function tr(e){const t={mode:"and",rules:[{field:"",operator:"==",value:""}]};if(!e)return t;const n=Object.keys(e)[0];if(n==="and"||n==="or"){const o=e[n];if(Array.isArray(o)){const a=o.map(Pc).filter(Boolean);if(a.length>0)return{mode:n,rules:a}}return t}const r=Pc(e);return r?{mode:"and",rules:[r]}:t}function si(e){const t=e.rules.filter(r=>r.field&&(r.value||Po.includes(r.operator)));if(t.length===0)return null;const n=t.map(r=>r.operator==="is_null"?{"==":[{var:`answers.${r.field}`},null]}:r.operator==="is_not_null"?{"!=":[{var:`answers.${r.field}`},null]}:{[r.operator]:[{var:`answers.${r.field}`},r.value]});return n.length===1?n[0]:{[e.mode]:n}}function Bx(){return{field:"",operator:"==",value:""}}function Hx({rule:e,availableFields:t,canRemove:n,onChange:r,onRemove:o}){const a=Po.includes(e.operator),i=t.find(l=>l.namespace===e.field),c=i!=null&&i.options&&i.options.length>0?i.options:null;return s.jsxs("div",{className:"cj-flex cj-items-start cj-gap-1.5 cj-group",children:[s.jsxs("div",{className:"cj-flex-1 cj-space-y-1.5",children:[s.jsxs(Oe,{value:e.field,onValueChange:l=>r({field:l,value:""}),children:[s.jsx(De,{className:"cj-h-8 cj-text-xs",children:s.jsx(Ae,{placeholder:"Field"})}),s.jsx(Te,{children:t.map(l=>s.jsx(B,{value:l.namespace,children:l.label},l.namespace))})]}),s.jsxs(Oe,{value:e.operator,onValueChange:l=>r({operator:l,...Po.includes(l)?{value:""}:{}}),children:[s.jsx(De,{className:"cj-h-8 cj-text-xs",children:s.jsx(Ae,{})}),s.jsx(Te,{children:Qf.map(l=>s.jsx(B,{value:l.value,children:l.label},l.value))})]}),!a&&(c?s.jsxs(Oe,{value:e.value,onValueChange:l=>r({value:l}),children:[s.jsx(De,{className:"cj-h-8 cj-text-xs",children:s.jsx(Ae,{placeholder:"Select value"})}),s.jsx(Te,{children:c.map(l=>s.jsx(B,{value:l.data,children:l.label},l.data))})]}):s.jsx(he,{className:"cj-h-8 cj-text-xs",placeholder:"Value",value:e.value,onChange:l=>r({value:l.target.value})}))]}),n&&s.jsx(te,{variant:"ghost",size:"icon",className:"cj-h-8 cj-w-8 cj-opacity-0 group-hover:cj-opacity-100 cj-shrink-0 cj-mt-0",onClick:o,children:s.jsx(Vt,{className:"cj-h-3.5 cj-w-3.5"})})]})}function Zf({conditions:e,availableFields:t,onChange:n}){const r=()=>{n({...e,mode:e.mode==="and"?"or":"and"})},o=(c,l)=>{const d=e.rules.map((u,m)=>m===c?{...u,...l}:u);n({...e,rules:d})},a=()=>{n({...e,rules:[...e.rules,Bx()]})},i=c=>{n({...e,rules:e.rules.filter((l,d)=>d!==c)})};return s.jsxs("div",{className:"cj-space-y-3",children:[e.rules.length>1&&s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[s.jsx("span",{className:"cj-text-xs cj-text-muted-foreground",children:"Combine with:"}),s.jsx(it,{variant:e.mode==="and"?"default":"outline",className:"cj-cursor-pointer cj-text-[10px]",onClick:r,children:"AND"}),s.jsx(it,{variant:e.mode==="or"?"default":"outline",className:"cj-cursor-pointer cj-text-[10px]",onClick:r,children:"OR"})]}),s.jsx("div",{className:"cj-space-y-3",children:e.rules.map((c,l)=>s.jsxs("div",{children:[l>0&&s.jsx("div",{className:"cj-text-center cj-text-[10px] cj-text-muted-foreground cj-font-medium cj-py-1 cj-uppercase",children:e.mode}),s.jsx(Hx,{rule:c,availableFields:t,canRemove:e.rules.length>1,onChange:d=>o(l,d),onRemove:()=>i(l)})]},l))}),s.jsxs(te,{variant:"outline",size:"sm",className:"cj-w-full cj-h-7 cj-text-xs",onClick:a,children:[s.jsx(Et,{className:"cj-h-3 cj-w-3 cj-mr-1"}),"Add condition"]})]})}function em({fieldId:e,open:t,onOpenChange:n}){const{t:r}=we(),{formConfig:o,updateField:a,deleteField:i}=pt(),c=v.useMemo(()=>o.fields.find(y=>y.field_id===e)||null,[o.fields,e]),[l,d]=v.useState(c),[u,m]=v.useState(!1);v.useEffect(()=>{d(c)},[c]);const f=v.useMemo(()=>o.fields.filter(y=>y.field_id!==e).map(y=>({namespace:y.namespace,label:y.label,options:y.options||null})),[o.fields,e]);if(!l||!c)return s.jsx(cs,{open:t,onOpenChange:n,children:s.jsx(ko,{children:s.jsx("p",{className:"cj-text-sm cj-text-muted-foreground",children:r("fc_field_no_selected")})})});const p=ca(l.schema),g=l.schema==="v2_single_option_select-1",h=l.schema==="v2_boolean-1"||l.widget==="boolean"||l.widget==="switch",j=l.schema==="v2_single_asset_upload"||l.widget==="upload",x=l.schema==="v2_date-1"||l.schema==="v2_datetime-1"||l.widget==="datepicker"||l.widget==="datetimepicker",b=y=>{d(C=>C&&{...C,...y}),a(c.field_id,y)},w=l.options||[],N=l.uploadConfig||{},S=(y,C)=>{const E=si(C);b({[y]:E})};return s.jsxs(cs,{open:t,onOpenChange:n,children:[s.jsxs(ko,{className:"cj-max-w-2xl cj-overflow-hidden",style:{display:"flex",flexDirection:"column",maxHeight:"85vh",height:"85vh"},children:[s.jsx(ri,{className:"cj-flex-shrink-0",children:s.jsxs(ai,{className:"cj-flex cj-items-center cj-gap-2",children:[r("fc_field_props"),s.jsx(it,{variant:"secondary",className:`${p.color} cj-text-white`,children:p.label})]})}),s.jsx("div",{className:"cj-pl-1 cj-pr-2 cj-overflow-y-scroll",style:{flex:"1 1 0%",minHeight:0,scrollbarWidth:"thin",scrollbarGutter:"stable"},children:s.jsxs("div",{className:"cj-space-y-4 cj-py-2",children:[s.jsxs("div",{className:"cj-grid cj-grid-cols-2 cj-gap-3",children:[s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-xs",children:r("fc_field_label")}),s.jsx(he,{value:l.label,onChange:y=>b({label:y.target.value}),className:"cj-mt-1"})]}),s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-xs",children:r("fc_field_namespace")}),s.jsx(he,{value:l.namespace,onChange:y=>b({namespace:y.target.value}),className:"cj-mt-1 cj-font-mono cj-text-sm"})]})]}),s.jsxs("div",{className:"cj-grid cj-grid-cols-2 cj-gap-3",children:[s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-xs",children:r("fc_field_placeholder")}),s.jsx(he,{value:l.placeholder||"",onChange:y=>b({placeholder:y.target.value||void 0}),className:"cj-mt-1"})]}),s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-xs",children:r("fc_field_help")}),s.jsx(he,{value:l.helpText||"",onChange:y=>b({helpText:y.target.value||void 0}),className:"cj-mt-1"})]})]}),s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-rounded-lg cj-border cj-p-3",children:[s.jsxs("div",{children:[s.jsx(q,{children:r("fc_field_required")}),s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r("fc_field_required_hint")})]}),s.jsx(Yt,{checked:!!l.required,onCheckedChange:y=>b({required:y})})]}),s.jsx(Cn,{}),s.jsxs("div",{className:"cj-grid cj-grid-cols-2 cj-gap-3",children:[s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-xs",children:r("fc_field_actor")}),s.jsxs(Oe,{value:l.actor||"customer",onValueChange:y=>b({actor:y}),children:[s.jsx(De,{className:"cj-mt-1",children:s.jsx(Ae,{})}),s.jsxs(Te,{children:[s.jsx(B,{value:"customer",children:r("fc_field_actor_customer")}),s.jsx(B,{value:"operator",children:r("fc_field_actor_operator")})]})]})]}),s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-xs",children:r("fc_field_widget")}),s.jsxs(Oe,{value:l.widget||"auto",onValueChange:y=>b({widget:y==="auto"?void 0:y}),children:[s.jsx(De,{className:"cj-mt-1",children:s.jsx(Ae,{})}),s.jsxs(Te,{children:[s.jsx(B,{value:"auto",children:r("fc_field_widget_auto")}),s.jsx(B,{value:"text",children:r("fc_field_widget_text")}),s.jsx(B,{value:"textarea",children:r("fc_field_widget_textarea")}),s.jsx(B,{value:"select",children:r("fc_field_widget_select")}),s.jsx(B,{value:"radio",children:r("fc_field_widget_radio")}),s.jsx(B,{value:"datepicker",children:r("fc_field_widget_date")}),s.jsx(B,{value:"timepicker",children:r("fc_field_widget_time")}),s.jsx(B,{value:"datetimepicker",children:r("fc_field_widget_datetime")}),s.jsx(B,{value:"currency",children:r("fc_field_widget_currency")}),s.jsx(B,{value:"upload",children:r("fc_field_widget_upload")}),s.jsx(B,{value:"email",children:r("fc_field_widget_email")}),s.jsx(B,{value:"phone",children:r("fc_field_widget_phone")}),s.jsx(B,{value:"location",children:r("fc_field_widget_location")}),s.jsx(B,{value:"boolean",children:r("fc_field_widget_boolean")})]})]})]})]}),x&&s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-rounded-lg cj-border cj-p-3",children:[s.jsxs("div",{children:[s.jsx(q,{children:r("fc_field_allow_future")}),s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r("fc_field_allow_future_hint")})]}),s.jsx(Yt,{checked:l.allowFuture??l.schema==="v2_datetime-1",onCheckedChange:y=>b({allowFuture:y})})]}),g&&s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-xs",children:r("fc_field_display_style")}),s.jsxs(Oe,{value:l.ui_variant||"auto",onValueChange:y=>b({ui_variant:y==="auto"?void 0:y}),children:[s.jsx(De,{className:"cj-mt-1",children:s.jsx(Ae,{})}),s.jsxs(Te,{children:[s.jsx(B,{value:"auto",children:r("fc_field_display_auto")}),s.jsx(B,{value:"radio",children:r("fc_field_display_radio")}),s.jsx(B,{value:"radio-horizontal",children:r("fc_field_display_radio_horizontal")}),s.jsx(B,{value:"dropdown",children:r("fc_field_display_dropdown")}),s.jsx(B,{value:"segmented",children:r("fc_field_display_segmented")})]})]}),s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-mt-1",children:r("fc_field_display_hint")})]}),h&&s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-xs",children:r("fc_field_display_style")}),s.jsxs(Oe,{value:l.ui_variant||"switch",onValueChange:y=>b({ui_variant:y==="switch"?void 0:y}),children:[s.jsx(De,{className:"cj-mt-1",children:s.jsx(Ae,{})}),s.jsxs(Te,{children:[s.jsx(B,{value:"switch",children:r("fc_field_display_switch")}),s.jsx(B,{value:"segmented",children:r("fc_field_display_yesno")})]})]}),s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-mt-1",children:r("fc_field_boolean_hint")})]}),g&&s.jsxs(s.Fragment,{children:[s.jsx(Cn,{}),s.jsxs("div",{children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-mb-2",children:[s.jsx(q,{children:r("fc_field_options")}),s.jsxs(te,{variant:"ghost",size:"sm",onClick:()=>b({options:[...w,{data:"",label:""}]}),children:[s.jsx(Et,{className:"cj-h-3 cj-w-3 cj-mr-1"}),r("fc_summary_add")]})]}),s.jsxs("div",{className:"cj-space-y-2",children:[w.map((y,C)=>s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2 cj-rounded-lg cj-border cj-p-2",children:[s.jsxs("div",{className:"cj-flex-1 cj-space-y-1",children:[s.jsx(he,{value:y.data,onChange:E=>b({options:w.map((P,k)=>k===C?{...P,data:E.target.value}:P)}),placeholder:r("fc_create_option_value_placeholder"),className:"cj-h-8 cj-font-mono cj-text-sm"}),s.jsx(he,{value:y.label,onChange:E=>b({options:w.map((P,k)=>k===C?{...P,label:E.target.value}:P)}),placeholder:r("fc_create_option_label_placeholder"),className:"cj-h-8 cj-text-sm"})]}),s.jsx(te,{variant:"ghost",size:"icon",className:"cj-h-8 cj-w-8",onClick:()=>b({options:w.filter((E,P)=>P!==C)}),children:s.jsx(Vt,{className:"cj-h-3 cj-w-3"})})]},C)),w.length===0&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-italic",children:r("fc_field_no_options")})]})]})]}),j&&s.jsxs(s.Fragment,{children:[s.jsx(Cn,{}),s.jsxs("div",{className:"cj-space-y-3",children:[s.jsx(q,{children:r("fc_field_upload_validation")}),s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-xs",children:r("fc_field_upload_accept")}),s.jsx(he,{value:N.accept||"",onChange:y=>b({uploadConfig:{...N,accept:y.target.value||void 0}}),placeholder:"image/*,.pdf",className:"cj-mt-1 cj-font-mono cj-text-sm"})]}),s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-xs",children:r("fc_field_upload_max")}),s.jsx(he,{type:"number",min:0,step:.5,value:N.maxSizeMB??"",onChange:y=>b({uploadConfig:{...N,maxSizeMB:y.target.value?parseFloat(y.target.value):void 0}}),className:"cj-mt-1 cj-w-32"})]})]})]}),s.jsx(Cn,{}),s.jsxs("div",{className:"cj-space-y-2",children:[s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-sm cj-font-semibold",children:r("fc_field_width")}),s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r("fc_field_width_hint")})]}),s.jsxs(Oe,{value:l.width??"auto",onValueChange:y=>b({width:y==="auto"?void 0:y}),children:[s.jsx(De,{className:"cj-w-48",children:s.jsx(Ae,{})}),s.jsxs(Te,{children:[s.jsx(B,{value:"auto",children:r("fc_field_width_auto")}),s.jsx(B,{value:"1/3",children:"1/3"}),s.jsx(B,{value:"1/2",children:"1/2"}),s.jsx(B,{value:"2/3",children:"2/3"}),s.jsx(B,{value:"full",children:r("fc_field_width_full")})]})]})]}),s.jsx(Cn,{}),s.jsx(qx,{field:l,availableFields:o.fields.filter(y=>y.field_id!==c.field_id&&!y.computed),onChange:y=>b({computed:y})}),s.jsx(Cn,{}),s.jsxs("div",{className:"cj-space-y-3",children:[s.jsxs("div",{children:[s.jsx(q,{children:r("fc_field_dynamic_rules")}),s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r("fc_field_dynamic_rules_hint")})]}),s.jsx(Ia,{title:r("fc_field_visible_when"),hint:r("fc_field_visible_when_hint"),value:l.visibleWhen??null,onChange:y=>S("visibleWhen",y),availableFields:f,disabledLabel:r("fc_field_always_visible")}),s.jsx(Ia,{title:r("fc_field_enabled_when"),hint:r("fc_field_enabled_when_hint"),value:l.enabledWhen??null,onChange:y=>S("enabledWhen",y),availableFields:f,disabledLabel:r("fc_field_always_enabled")}),s.jsx(Ia,{title:r("fc_field_required_when"),hint:r("fc_field_required_when_hint"),value:l.requiredWhen??null,onChange:y=>S("requiredWhen",y),availableFields:f,disabledLabel:r("fc_field_required_static")})]})]})}),s.jsxs(oi,{className:"cj-flex cj-items-center cj-justify-between sm:cj-justify-between",children:[s.jsxs(te,{variant:"destructive",size:"sm",onClick:()=>m(!0),children:[s.jsx(Fn,{className:"cj-h-4 cj-w-4 cj-mr-1"}),r("fc_field_delete")]}),s.jsx(te,{onClick:()=>n(!1),children:r("fc_field_done")})]})]}),s.jsx($r,{open:u,onOpenChange:m,description:r("fc_field_confirm_delete"),onConfirm:()=>{i(c.field_id),m(!1),n(!1)}})]})}function Ia({title:e,hint:t,value:n,onChange:r,availableFields:o,disabledLabel:a}){const[i,c]=v.useState(n!=null),[l,d]=v.useState(()=>tr(n)),u=v.useRef(n?JSON.stringify(n):null);v.useEffect(()=>{const p=n?JSON.stringify(n):null;p!==u.current&&(d(tr(n)),u.current=p),c(n!=null)},[n]);const m=p=>{c(p),p||(d(tr(null)),u.current=null,r({mode:"and",rules:[]}))},f=p=>{d(p);const g=si(p);u.current=g?JSON.stringify(g):null,r(p)};return s.jsxs("div",{className:"cj-rounded-lg cj-border cj-p-3 cj-space-y-2",children:[s.jsxs("div",{className:"cj-flex cj-items-start cj-justify-between cj-gap-3",children:[s.jsxs("div",{className:"cj-min-w-0",children:[s.jsx(q,{className:"cj-text-xs cj-font-semibold",children:e}),t&&s.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground",children:t})]}),s.jsx(Yt,{checked:i,onCheckedChange:m})]}),i?s.jsx(Zf,{conditions:l,availableFields:o,onChange:f}):s.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground cj-italic",children:a})]})}function qx({field:e,availableFields:t,onChange:n}){var m,f,p;const{t:r}=we(),o=!!e.computed,a=((m=e.computed)==null?void 0:m.operation)||"sum",i=((f=e.computed)==null?void 0:f.operand_field_ids)||[],c=((p=e.computed)==null?void 0:p.precision)??2,l=g=>{n(g?{operation:"sum",operand_field_ids:[],precision:2}:null)},d=g=>{n({operation:a,operand_field_ids:i,precision:c,...g})},u=t.filter(g=>!i.includes(g.field_id));return s.jsxs("div",{className:"cj-rounded-lg cj-border cj-p-3 cj-space-y-3",children:[s.jsxs("div",{className:"cj-flex cj-items-start cj-justify-between cj-gap-3",children:[s.jsxs("div",{className:"cj-min-w-0",children:[s.jsx(q,{className:"cj-text-sm cj-font-semibold",children:r("fc_field_computed")}),s.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground",children:r("fc_field_computed_hint")})]}),s.jsx(Yt,{checked:o,onCheckedChange:l})]}),o&&s.jsxs("div",{className:"cj-space-y-3",children:[s.jsxs("div",{className:"cj-grid cj-grid-cols-2 cj-gap-3",children:[s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-xs",children:r("fc_field_computed_operation")}),s.jsxs(Oe,{value:a,onValueChange:g=>d({operation:g}),children:[s.jsx(De,{className:"cj-mt-1",children:s.jsx(Ae,{})}),s.jsxs(Te,{children:[s.jsx(B,{value:"sum",children:r("fc_field_computed_op_sum")}),s.jsx(B,{value:"subtract",children:r("fc_field_computed_op_subtract")}),s.jsx(B,{value:"multiply",children:r("fc_field_computed_op_multiply")}),s.jsx(B,{value:"divide",children:r("fc_field_computed_op_divide")})]})]})]}),s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-xs",children:r("fc_field_computed_precision")}),s.jsx(he,{type:"number",min:0,max:6,step:1,value:c,onChange:g=>d({precision:Math.max(0,parseInt(g.target.value||"0",10))}),className:"cj-mt-1"})]})]}),s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-xs",children:r("fc_field_computed_operands")}),s.jsxs("div",{className:"cj-mt-1 cj-space-y-2",children:[i.map((g,h)=>{const j=t.find(x=>x.field_id===g);return s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2 cj-rounded-lg cj-border cj-p-2",children:[s.jsxs("span",{className:"cj-text-xs cj-font-mono cj-text-muted-foreground",children:[h+1,"."]}),s.jsxs("div",{className:"cj-flex-1 cj-min-w-0",children:[s.jsx("div",{className:"cj-text-sm cj-truncate",children:j?j.label:r("fc_field_computed_missing_operand")}),j&&s.jsx("div",{className:"cj-text-[10px] cj-font-mono cj-text-muted-foreground cj-truncate",children:j.namespace})]}),s.jsx(te,{variant:"ghost",size:"icon",className:"cj-h-7 cj-w-7",onClick:()=>d({operand_field_ids:i.filter((x,b)=>b!==h)}),children:s.jsx(Vt,{className:"cj-h-3 cj-w-3"})})]},`${g}-${h}`)}),u.length>0?s.jsxs(Oe,{value:"",onValueChange:g=>{g&&d({operand_field_ids:[...i,g]})},children:[s.jsx(De,{className:"cj-h-9",children:s.jsx(Ae,{placeholder:r("fc_field_computed_add_operand")})}),s.jsx(Te,{children:u.map(g=>s.jsx(B,{value:g.field_id,children:g.label},g.field_id))})]}):s.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground cj-italic",children:i.length===0?r("fc_field_computed_no_fields"):r("fc_field_computed_all_added")})]})]})]})]})}function tm({specs:e=[],open:t,onOpenChange:n,onCreate:r}){const{t:o}=we(),[a,i]=v.useState("catalog"),[c,l]=v.useState(""),[d,u]=v.useState(""),[m,f]=v.useState(""),[p,g]=v.useState("v1_string"),[h,j]=v.useState([]),x=v.useMemo(()=>e.filter(S=>S.label.toLowerCase().includes(c.toLowerCase())||S.namespace.toLowerCase().includes(c.toLowerCase())),[e,c]),b=()=>{u(""),f(""),g("v1_string"),j([]),l("")},w=p==="v2_single_option_select-1",N=d.trim()!=="";return s.jsx(cs,{open:t,onOpenChange:S=>{S||b(),n(S)},children:s.jsxs(ko,{className:"cj-max-w-lg cj-overflow-hidden",children:[s.jsxs(ri,{children:[s.jsx(ai,{children:o("fc_create_field_title")}),s.jsx(Hf,{children:o("fc_create_field_subtitle")})]}),s.jsxs("div",{className:"cj-flex cj-gap-1 cj-bg-muted cj-rounded-lg cj-p-1",children:[s.jsx("button",{onClick:()=>i("catalog"),className:`cj-flex-1 cj-h-8 cj-rounded-md cj-text-sm cj-font-medium ${a==="catalog"?"cj-bg-card cj-shadow-sm":"cj-text-muted-foreground"}`,children:o("fc_create_from_catalog",{count:e.length})}),s.jsx("button",{onClick:()=>i("custom"),className:`cj-flex-1 cj-h-8 cj-rounded-md cj-text-sm cj-font-medium ${a==="custom"?"cj-bg-card cj-shadow-sm":"cj-text-muted-foreground"}`,children:o("fc_create_custom")})]}),a==="catalog"?s.jsxs("div",{className:"cj-space-y-2 cj-min-w-0",children:[s.jsx(he,{placeholder:o("fc_create_search_specs"),value:c,onChange:S=>l(S.target.value)}),s.jsx(Ht,{className:"cj-h-[55vh] cj-max-h-[420px] cj-border cj-rounded-lg",children:s.jsxs("div",{className:"cj-divide-y",children:[x.map(S=>{var y,C;return s.jsxs("button",{onClick:()=>{r(S),b(),n(!1)},className:"cj-w-full cj-text-left cj-px-3 cj-py-2 hover:cj-bg-accent cj-flex cj-items-center cj-gap-2",children:[s.jsx(it,{variant:"secondary",className:`cj-text-[10px] ${((y=Cr[S.schema])==null?void 0:y.color)||"cj-bg-muted"} cj-text-white`,children:((C=Cr[S.schema])==null?void 0:C.label)||S.schema}),s.jsxs("div",{className:"cj-flex-1 cj-min-w-0",children:[s.jsx("div",{className:"cj-text-sm cj-font-medium cj-truncate",children:S.label}),s.jsx("div",{className:"cj-text-[11px] cj-font-mono cj-text-muted-foreground cj-truncate",children:S.namespace})]})]},S.id)}),x.length===0&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-py-6 cj-text-center",children:o("fc_create_no_specs")})]})})]}):s.jsx(Ht,{className:"cj-h-[55vh] cj-max-h-[420px] cj--mx-1",children:s.jsxs("div",{className:"cj-space-y-3 cj-px-1",children:[s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-xs",children:o("fc_create_label_required")}),s.jsx(he,{value:d,onChange:S=>u(S.target.value),placeholder:o("fc_create_label_placeholder"),className:"cj-mt-1"})]}),s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-xs",children:o("fc_create_namespace")}),s.jsx(he,{value:m,onChange:S=>f(S.target.value),placeholder:o("fc_create_namespace_placeholder"),className:"cj-mt-1 cj-font-mono cj-text-sm"})]}),s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-xs",children:o("fc_create_schema")}),s.jsxs(Oe,{value:p,onValueChange:g,children:[s.jsx(De,{className:"cj-mt-1",children:s.jsx(Ae,{})}),s.jsx(Te,{children:Object.entries(Cr).map(([S,y])=>s.jsx(B,{value:S,children:s.jsx("div",{className:"cj-flex cj-items-center cj-gap-2",children:s.jsx(it,{className:`${y.color} cj-text-white cj-text-[10px]`,children:y.label})})},S))})]})]}),w&&s.jsxs("div",{children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-mb-1",children:[s.jsx(q,{className:"cj-text-xs",children:o("fc_create_options")}),s.jsxs(te,{size:"sm",variant:"ghost",onClick:()=>j([...h,{data:"",label:""}]),children:[s.jsx(Et,{className:"cj-h-3 cj-w-3 cj-mr-1"}),o("fc_summary_add")]})]}),s.jsx("div",{className:"cj-space-y-2",children:h.map((S,y)=>s.jsxs("div",{className:"cj-flex cj-gap-2",children:[s.jsx(he,{value:S.data,onChange:C=>j(h.map((E,P)=>P===y?{...E,data:C.target.value}:E)),placeholder:o("fc_create_option_value_placeholder"),className:"cj-flex-1 cj-h-8 cj-font-mono cj-text-sm"}),s.jsx(he,{value:S.label,onChange:C=>j(h.map((E,P)=>P===y?{...E,label:C.target.value}:E)),placeholder:o("fc_create_option_label_placeholder"),className:"cj-flex-1 cj-h-8 cj-text-sm"}),s.jsx(te,{variant:"ghost",size:"icon",className:"cj-h-8 cj-w-8",onClick:()=>j(h.filter((C,E)=>E!==y)),children:s.jsx(Vt,{className:"cj-h-3 cj-w-3"})})]},y))})]})]})}),a==="custom"&&s.jsxs(oi,{children:[s.jsx(te,{variant:"outline",onClick:()=>n(!1),children:o("fc_create_cancel")}),s.jsx(te,{disabled:!N,onClick:()=>{r({label:d.trim(),namespace:m.trim()||`custom_${Date.now()}`,schema:p,options:w?h:null,required:!1}),b(),n(!1)},children:o("fc_create_create")})]})]})})}const Br=_.forwardRef(({className:e,...t},n)=>s.jsx("textarea",{className:ne("cj-flex cj-min-h-[120px] cj-w-full cj-rounded-xl cj-border cj-border-input cj-bg-background cj-px-3 cj-py-3 cj-text-base cj-ring-offset-background placeholder:cj-text-muted-foreground focus-visible:cj-outline-none focus-visible:cj-ring-2 focus-visible:cj-ring-ring focus-visible:cj-ring-offset-2 disabled:cj-cursor-not-allowed disabled:cj-opacity-50 md:cj-text-sm",e),ref:n,...t}));Br.displayName="Textarea";var da="Collapsible",[Yx]=_t(da),[Vx,ii]=Yx(da),nm=_.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...c}=e,[l,d]=tn({prop:r,defaultProp:o??!1,onChange:i,caller:da});return s.jsx(Vx,{scope:n,disabled:a,contentId:$t(),open:l,onOpenToggle:_.useCallback(()=>d(u=>!u),[d]),children:s.jsx(le.div,{"data-state":li(l),"data-disabled":a?"":void 0,...c,ref:t})})});nm.displayName=da;var rm="CollapsibleTrigger",om=_.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=ii(rm,n);return s.jsx(le.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":li(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:se(e.onClick,o.onOpenToggle)})});om.displayName=rm;var ci="CollapsibleContent",am=_.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ii(ci,e.__scopeCollapsible);return s.jsx(gt,{present:n||o.open,children:({present:a})=>s.jsx(Gx,{...r,ref:t,present:a})})});am.displayName=ci;var Gx=_.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=ii(ci,n),[c,l]=_.useState(r),d=_.useRef(null),u=ve(t,d),m=_.useRef(0),f=m.current,p=_.useRef(0),g=p.current,h=i.open||c,j=_.useRef(h),x=_.useRef(void 0);return _.useEffect(()=>{const b=requestAnimationFrame(()=>j.current=!1);return()=>cancelAnimationFrame(b)},[]),Je(()=>{const b=d.current;if(b){x.current=x.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const w=b.getBoundingClientRect();m.current=w.height,p.current=w.width,j.current||(b.style.transitionDuration=x.current.transitionDuration,b.style.animationName=x.current.animationName),l(r)}},[i.open,r]),s.jsx(le.div,{"data-state":li(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:h&&o})});function li(e){return e?"open":"closed"}var Ux=nm;const ls=Ux,ds=om,us=am;function Xx({step:e,readOnly:t=!1}){const{t:n}=we(),{formConfig:r,updateStepNavigation:o,setStepApiCall:a,addNavRule:i,updateNavRule:c,deleteNavRule:l}=pt(),[d,u]=v.useState(!0),m=r.steps.filter(g=>g.step_id!==e.step_id),f=e.navigation.api_call,p=r.fields.map(g=>({namespace:g.namespace,label:g.label,options:g.options||null}));return s.jsx("div",{className:"cj-rounded-2xl cj-bg-card cj-border cj-border-border cj-p-4",children:s.jsxs(ls,{open:d,onOpenChange:u,children:[s.jsx(ds,{asChild:!0,children:s.jsxs("button",{className:"cj-w-full cj-flex cj-items-center cj-justify-between cj-gap-2 cj-text-left",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[s.jsx(Gl,{className:"cj-h-4 cj-w-4 cj-text-primary"}),s.jsx("span",{className:"cj-text-sm cj-font-semibold cj-uppercase cj-tracking-wide cj-text-muted-foreground",children:n("fc_nav_title")})]}),s.jsx(Bt,{className:`cj-h-4 cj-w-4 cj-transition-transform ${d?"cj-rotate-180":""}`})]})}),s.jsxs(us,{className:"cj-pt-4 cj-space-y-4",children:[s.jsxs("div",{className:"cj-rounded-xl cj-border cj-border-border/60 cj-p-3 cj-space-y-3",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between",children:[s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-xs cj-font-semibold cj-uppercase",children:n("fc_nav_api_call")}),s.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground",children:n("fc_nav_api_call_hint")})]}),s.jsx(Yt,{checked:!!(f!=null&&f.enabled),disabled:t,onCheckedChange:g=>a(e.step_id,g?f||{enabled:!0,method:"POST",url:"",headers:{},body_template:""}:void 0)})]}),(f==null?void 0:f.enabled)&&s.jsxs("div",{className:"cj-space-y-2",children:[s.jsxs("div",{className:"cj-flex cj-gap-2",children:[s.jsxs(Oe,{value:f.method,onValueChange:g=>a(e.step_id,{...f,method:g}),disabled:t,children:[s.jsx(De,{className:"cj-w-28",children:s.jsx(Ae,{})}),s.jsxs(Te,{children:[s.jsx(B,{value:"GET",children:"GET"}),s.jsx(B,{value:"POST",children:"POST"}),s.jsx(B,{value:"PUT",children:"PUT"}),s.jsx(B,{value:"PATCH",children:"PATCH"}),s.jsx(B,{value:"DELETE",children:"DELETE"})]})]}),s.jsx(he,{value:f.url,onChange:g=>a(e.step_id,{...f,url:g.target.value}),placeholder:"https://api.example.com/endpoint",className:"cj-flex-1 cj-font-mono cj-text-xs",disabled:t})]}),s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-[11px]",children:n("fc_nav_body_template")}),s.jsx(Br,{value:f.body_template||"",onChange:g=>a(e.step_id,{...f,body_template:g.target.value}),placeholder:'{ "name": "{{answers.full_name}}" }',className:"cj-mt-1 cj-font-mono cj-text-xs",rows:4,disabled:t}),s.jsxs("p",{className:"cj-text-[10px] cj-text-muted-foreground cj-mt-1",children:[n("fc_nav_body_template_hint_prefix")," ",s.jsx("code",{children:"{{answers.namespace}}"})," ",n("fc_nav_body_template_hint_suffix")]})]}),s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-[11px]",children:n("fc_nav_on_error")}),s.jsxs(Oe,{value:f.on_error||"block",onValueChange:g=>{const h=g==="block"||g==="continue"?g:`goto:${g.slice(5)}`;a(e.step_id,{...f,on_error:h})},disabled:t,children:[s.jsx(De,{className:"cj-mt-1 cj-h-8 cj-text-xs",children:s.jsx(Ae,{})}),s.jsxs(Te,{children:[s.jsx(B,{value:"block",children:n("fc_nav_on_error_block")}),s.jsx(B,{value:"continue",children:n("fc_nav_on_error_continue")}),m.map(g=>s.jsx(B,{value:`goto:${g.step_id}`,children:n("fc_nav_on_error_goto",{step:g.title||g.step_id})},g.step_id)),s.jsx(B,{value:"goto:__submit__",children:n("fc_nav_on_error_summary")})]})]}),s.jsx("p",{className:"cj-text-[10px] cj-text-muted-foreground cj-mt-1",children:n("fc_nav_on_error_hint")})]})]})]}),s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[s.jsx(q,{className:"cj-text-xs cj-w-32",children:n("fc_nav_continue_button")}),s.jsx(he,{value:e.navigation.button_label||"",onChange:g=>o(e.step_id,{button_label:g.target.value||void 0}),placeholder:n("fc_nav_continue_placeholder"),className:"cj-flex-1 cj-h-8 cj-text-sm",disabled:t})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-mb-2",children:[s.jsx(q,{className:"cj-text-xs cj-font-semibold cj-uppercase",children:n("fc_nav_rules")}),!t&&s.jsxs(te,{size:"sm",variant:"ghost",className:"cj-h-7",onClick:()=>i(e.step_id),children:[s.jsx(Et,{className:"cj-h-3 cj-w-3 cj-mr-1"}),n("fc_nav_add_rule")]})]}),s.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground cj-mb-3",children:n("fc_nav_rules_hint")}),s.jsx("div",{className:"cj-space-y-2",children:e.navigation.rules.map((g,h)=>s.jsx(Kx,{rule:g,index:h,steps:m.map(j=>({id:j.step_id,title:j.title})),fields:p,readOnly:t,onUpdate:j=>c(e.step_id,g.rule_id,j),onDelete:()=>l(e.step_id,g.rule_id),canDelete:e.navigation.rules.length>1},g.rule_id))})]})]})]})})}function Kx({rule:e,index:t,steps:n,fields:r,readOnly:o,onUpdate:a,onDelete:i,canDelete:c}){const{t:l}=we(),[d,u]=v.useState(!!e.condition),[m,f]=v.useState(()=>tr(e.condition)),[p,g]=v.useState(null),h=v.useRef(e.condition);v.useEffect(()=>{e.condition!==h.current&&(f(tr(e.condition)),h.current=e.condition,g(null))},[e.condition]);const j=b=>{for(const w of b.rules){if(!w.field||Po.includes(w.operator))continue;const N=r.find(S=>S.namespace===w.field);if(N!=null&&N.options&&N.options.length>0&&!w.value)return l("fc_nav_field_requires_value",{label:N.label})}return null},x=b=>{f(b);const w=j(b);if(w){g(w);return}g(null);const N=si(b);h.current=N,a({condition:N})};return s.jsxs("div",{className:"cj-rounded-xl cj-border cj-border-border/60 cj-p-3 cj-bg-muted/20",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2 cj-mb-2",children:[s.jsx("span",{className:"cj-text-[11px] cj-font-bold cj-text-muted-foreground cj-uppercase",children:l("fc_nav_rule_n",{n:t+1})}),s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-1 cj-ml-auto",children:[s.jsx(q,{className:"cj-text-[11px]",children:l("fc_nav_has_condition")}),s.jsx(Yt,{checked:d,disabled:o,onCheckedChange:b=>{u(b),g(null),b||(f(tr(null)),h.current=null,a({condition:null}))}}),c&&!o&&s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-6 cj-w-6",onClick:i,children:s.jsx(Fn,{className:"cj-h-3 cj-w-3 cj-text-destructive"})})]})]}),d&&s.jsxs("div",{className:"cj-mb-3 cj-rounded-lg cj-bg-card cj-p-3",children:[s.jsx(Zf,{conditions:m,availableFields:r,onChange:x}),p&&s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-1.5 cj-mt-2 cj-text-[11px] cj-text-destructive",children:[s.jsx(Bl,{className:"cj-h-3.5 cj-w-3.5 cj-shrink-0"}),s.jsx("span",{children:p})]})]}),s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[s.jsx(Wo,{className:"cj-h-3.5 cj-w-3.5 cj-text-muted-foreground"}),s.jsx(q,{className:"cj-text-xs",children:l("fc_nav_go_to")}),s.jsxs(Oe,{value:e.next_step_id,onValueChange:b=>a({next_step_id:b}),disabled:o,children:[s.jsx(De,{className:"cj-flex-1 cj-h-8 cj-text-sm",children:s.jsx(Ae,{})}),s.jsxs(Te,{children:[s.jsx(B,{value:"__submit__",children:l("fc_nav_submit_form")}),n.map(b=>s.jsx(B,{value:b.id,children:b.title},b.id))]})]})]})]})}function Jx({specs:e=[],readOnly:t=!1}){const{t:n}=we(),{formConfig:r,activeStepId:o,updateStep:a,addRow:i,updateRow:c,deleteRow:l,moveRow:d,removeFieldFromRow:u,moveFieldInRow:m,addNewFieldToRow:f,setSelectedField:p,selectedFieldId:g}=pt(),h=r.steps.find(S=>S.step_id===o)||null,[j,x]=v.useState(!1),[b,w]=v.useState(null);if(!h)return s.jsx("div",{className:"cj-h-full cj-flex cj-items-center cj-justify-center cj-p-8 cj-text-center",children:s.jsx("div",{className:"cj-text-sm cj-text-muted-foreground",children:r.steps.length===0?n("fc_step_empty_create"):n("fc_step_empty_select")})});const N=r.steps.findIndex(S=>S.step_id===h.step_id)+1;return s.jsxs(Ht,{className:"cj-h-full",children:[s.jsxs("div",{className:"cj-p-6 cj-space-y-4 cj-max-w-3xl cj-mx-auto",children:[s.jsxs("div",{className:"cj-rounded-2xl cj-bg-card cj-border cj-border-border cj-p-5 cj-space-y-4",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-3",children:[s.jsx("div",{className:"cj-h-9 cj-w-9 cj-rounded-full cj-bg-primary cj-text-primary-foreground cj-flex cj-items-center cj-justify-center cj-font-bold",children:N}),s.jsx(he,{value:h.title,onChange:S=>a(h.step_id,{title:S.target.value}),placeholder:n("fc_step_title_placeholder"),disabled:t,className:"cj-flex-1 cj-text-lg cj-font-semibold cj-border-none cj-shadow-none cj-px-1 cj-bg-transparent focus-visible:cj-ring-1"})]}),s.jsxs("div",{className:"cj-grid cj-grid-cols-2 cj-gap-3",children:[s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-xs",children:n("fc_step_title_label")}),s.jsx(he,{value:h.title,onChange:S=>a(h.step_id,{title:S.target.value}),disabled:t,className:"cj-mt-1"})]}),s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-xs",children:n("fc_step_description_label")}),s.jsx(he,{value:h.description||"",onChange:S=>a(h.step_id,{description:S.target.value}),disabled:t,placeholder:n("fc_step_description_placeholder"),className:"cj-mt-1"})]})]})]}),h.rows.map((S,y)=>s.jsx(Qx,{row:S,index:y,isLast:y===h.rows.length-1,readOnly:t,onChangeLayout:C=>c(h.step_id,S.row_id,{layout:C}),onChangeTitle:C=>c(h.step_id,S.row_id,{title:C}),onToggleDivider:C=>c(h.step_id,S.row_id,{show_divider:C}),onDelete:()=>l(h.step_id,S.row_id),onMoveUp:()=>d(h.step_id,S.row_id,"up"),onMoveDown:()=>d(h.step_id,S.row_id,"down"),onAddField:()=>w(S.row_id),onSelectField:C=>{p(C),x(!0)},onRemoveField:C=>u(h.step_id,S.row_id,C),onMoveField:(C,E)=>m(h.step_id,S.row_id,C,E),fieldLookup:C=>r.fields.find(E=>E.field_id===C)||null},S.row_id)),!t&&s.jsxs(te,{variant:"outline",className:"cj-w-full cj-h-12 cj-rounded-xl cj-border-dashed",onClick:()=>i(h.step_id),children:[s.jsx(Et,{className:"cj-h-4 cj-w-4 cj-mr-2"}),n("fc_add_row")]}),s.jsx(Xx,{step:h,readOnly:t})]}),s.jsx(em,{fieldId:g,open:j,onOpenChange:S=>{x(S),S||p(null)}}),s.jsx(tm,{specs:e,open:!!b,onOpenChange:S=>{S||w(null)},onCreate:S=>{b&&f(h.step_id,b,S)}})]})}function Qx({row:e,index:t,isLast:n,readOnly:r,onChangeLayout:o,onChangeTitle:a,onToggleDivider:i,onDelete:c,onMoveUp:l,onMoveDown:d,onAddField:u,onSelectField:m,onRemoveField:f,onMoveField:p,fieldLookup:g}){const{t:h}=we(),[j,x]=v.useState(!1);return s.jsxs("div",{children:[e.show_divider&&s.jsx("div",{className:"cj-border-t-2 cj-border-dotted cj-border-border cj-mb-3","aria-hidden":"true"}),s.jsxs("div",{className:"cj-rounded-2xl cj-bg-card cj-border cj-border-border cj-p-4",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2 cj-mb-3",children:[s.jsx(Hl,{className:"cj-h-4 cj-w-4 cj-text-muted-foreground"}),s.jsx("span",{className:"cj-text-sm cj-font-medium",children:h("fc_row_n",{n:t+1})}),s.jsxs(Oe,{value:e.layout,onValueChange:b=>o(b),disabled:r,children:[s.jsx(De,{className:"cj-h-7 cj-w-32 cj-text-xs",children:s.jsx(Ae,{})}),s.jsxs(Te,{children:[s.jsx(B,{value:"horizontal",children:h("fc_layout_horizontal")}),s.jsx(B,{value:"vertical",children:h("fc_layout_vertical")})]})]}),!r&&s.jsxs("label",{className:"cj-flex cj-items-center cj-gap-1 cj-text-xs cj-text-muted-foreground cj-cursor-pointer",children:[s.jsx("input",{type:"checkbox",checked:!!e.show_divider,onChange:b=>i(b.target.checked),className:"cj-h-3 cj-w-3"}),h("fc_row_show_divider")]}),!r&&s.jsxs("div",{className:"cj-ml-auto cj-flex cj-items-center cj-gap-0.5",children:[s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-6 cj-w-6",disabled:t===0,onClick:l,children:s.jsx(_o,{className:"cj-h-3 cj-w-3"})}),s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-6 cj-w-6",disabled:n,onClick:d,children:s.jsx(Bt,{className:"cj-h-3 cj-w-3"})}),s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-6 cj-w-6",onClick:()=>x(!0),children:s.jsx(Fn,{className:"cj-h-3 cj-w-3 cj-text-destructive"})}),s.jsx($r,{open:j,onOpenChange:x,description:h("fc_confirm_delete_row"),onConfirm:c})]})]}),!r&&s.jsx("div",{className:"cj-mb-3",children:s.jsx(he,{value:e.title||"",onChange:b=>a(b.target.value),placeholder:h("fc_row_title_placeholder"),className:"cj-h-8 cj-text-sm"})}),r&&e.title&&s.jsx("div",{className:"cj-text-sm cj-font-semibold cj-mb-2",children:e.title}),s.jsxs("div",{className:`cj-gap-3 ${e.layout==="horizontal"?"cj-flex cj-flex-wrap":"cj-flex cj-flex-col"}`,children:[e.field_ids.map((b,w)=>{const N=g(b);if(!N)return null;const S=ca(N.schema);return s.jsxs("div",{className:`cj-group cj-relative cj-rounded-xl cj-border cj-border-border cj-bg-muted/30 hover:cj-border-primary/60 cj-px-3 cj-py-2 cj-cursor-pointer ${e.layout==="horizontal"?"cj-flex-1 cj-min-w-[180px]":"cj-w-full"}`,onClick:()=>m(b),children:[s.jsxs("div",{className:"cj-flex cj-items-start cj-gap-2",children:[s.jsxs("div",{className:"cj-flex-1 cj-min-w-0",children:[s.jsx(it,{variant:"secondary",className:`cj-text-[9px] cj-mb-1 ${S.color} cj-text-white`,children:S.label}),s.jsxs("div",{className:"cj-text-sm cj-font-medium cj-truncate",children:[N.label,N.required&&s.jsx("span",{className:"cj-text-destructive cj-ml-0.5",children:"*"})]}),s.jsx("div",{className:"cj-text-[10px] cj-font-mono cj-text-muted-foreground cj-truncate",children:N.namespace})]}),!r&&s.jsxs("div",{className:"cj-flex cj-flex-col cj-gap-0.5 cj-opacity-0 group-hover:cj-opacity-100 cj-transition-opacity",children:[s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-5 cj-w-5",onClick:y=>{y.stopPropagation(),m(b)},title:h("fc_edit"),children:s.jsx(U_,{className:"cj-h-3 cj-w-3"})}),s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-5 cj-w-5",onClick:y=>{y.stopPropagation(),f(b)},title:h("fc_remove_from_row"),children:s.jsx(Vt,{className:"cj-h-3 cj-w-3 cj-text-destructive"})})]})]}),!r&&e.field_ids.length>1&&s.jsxs("div",{className:"cj-absolute -cj-bottom-2 cj-left-1/2 -cj-translate-x-1/2 cj-flex cj-gap-0.5 cj-bg-card cj-rounded-full cj-shadow-sm cj-opacity-0 group-hover:cj-opacity-100",children:[s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-5 cj-w-5",disabled:w===0,onClick:y=>{y.stopPropagation(),p(b,"left")},children:s.jsx(_o,{className:"cj-h-3 cj-w-3 -cj-rotate-90"})}),s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-5 cj-w-5",disabled:w===e.field_ids.length-1,onClick:y=>{y.stopPropagation(),p(b,"right")},children:s.jsx(Bt,{className:"cj-h-3 cj-w-3 -cj-rotate-90"})})]})]},b)}),!r&&s.jsxs("button",{onClick:u,className:`cj-rounded-xl cj-border-2 cj-border-dashed cj-border-border hover:cj-border-primary/60 cj-text-xs cj-text-muted-foreground hover:cj-text-foreground cj-px-3 cj-py-2 cj-flex cj-items-center cj-justify-center cj-gap-1 ${e.layout==="horizontal"?"cj-flex-1 cj-min-w-[140px]":"cj-w-full cj-py-3"}`,children:[s.jsx(Et,{className:"cj-h-3.5 cj-w-3.5"}),h("fc_add_field_btn")]}),e.field_ids.length===0&&r&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-italic",children:h("fc_no_fields")})]})]})]})}function Zx({readOnly:e=!1}){const{t}=we(),{formConfig:n,updateSummary:r,addSummarySection:o,updateSummarySection:a,deleteSummarySection:i,addDisplayField:c,updateDisplayField:l,deleteDisplayField:d}=pt(),[u,m]=v.useState(null),{summary:f,fields:p,steps:g}=n;return s.jsxs("div",{className:"cj-flex cj-flex-col cj-h-full cj-bg-card",children:[s.jsx("div",{className:"cj-p-4 cj-border-b",children:s.jsx("h2",{className:"cj-text-sm cj-font-semibold",children:t("fc_summary_panel")})}),s.jsx(Ht,{className:"cj-flex-1",children:s.jsxs("div",{className:"cj-p-4 cj-space-y-4",children:[s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-xs",children:t("fc_summary_title_label")}),s.jsx(he,{value:f.title,onChange:h=>r({title:h.target.value}),disabled:e,className:"cj-mt-1"})]}),s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-gap-3 cj-rounded-lg cj-border cj-border-border cj-bg-muted/20 cj-p-3",children:[s.jsxs("div",{className:"cj-space-y-0.5",children:[s.jsx(q,{htmlFor:"summary-show-sidebar",className:"cj-text-xs cj-font-medium",children:t("fc_summary_show_sidebar")}),s.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground",children:t("fc_summary_show_sidebar_hint")})]}),s.jsx(Yt,{id:"summary-show-sidebar",checked:f.show_sidebar??!0,onCheckedChange:h=>r({show_sidebar:h}),disabled:e})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-mb-2",children:[s.jsx(q,{className:"cj-text-xs cj-font-semibold cj-uppercase",children:t("fc_summary_sections")}),!e&&s.jsxs(te,{size:"sm",variant:"outline",onClick:()=>o(),children:[s.jsx(Et,{className:"cj-h-3 cj-w-3 cj-mr-1"}),t("fc_summary_add_section")]})]}),s.jsxs("div",{className:"cj-space-y-3",children:[f.sections.map(h=>s.jsxs("div",{className:"cj-rounded-xl cj-border cj-border-border cj-p-3 cj-space-y-3 cj-bg-muted/20",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[s.jsx(he,{value:h.title,onChange:j=>a(h.section_id,{title:j.target.value}),placeholder:t("fc_summary_section_title_placeholder"),disabled:e,className:"cj-flex-1 cj-h-8 cj-font-semibold"}),!e&&s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-7 cj-w-7",onClick:()=>m(h.section_id),children:s.jsx(Fn,{className:"cj-h-3.5 cj-w-3.5 cj-text-destructive"})})]}),s.jsxs("div",{className:"cj-grid cj-grid-cols-2 cj-gap-2",children:[s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-[10px]",children:t("fc_summary_visible_from")}),s.jsxs(Oe,{value:String(h.visible_from_step??1),onValueChange:j=>a(h.section_id,{visible_from_step:parseInt(j,10)||1}),disabled:e,children:[s.jsx(De,{className:"cj-mt-0.5 cj-h-8 cj-text-xs",children:s.jsx(Ae,{})}),s.jsx(Te,{children:g.map((j,x)=>s.jsx(B,{value:String(x+1),children:t("fc_summary_step_n",{n:x+1})},x))})]})]}),s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-[10px]",children:t("fc_summary_until_step")}),s.jsxs(Oe,{value:h.until_step?String(h.until_step):"all",onValueChange:j=>a(h.section_id,{until_step:j==="all"?void 0:parseInt(j,10)}),disabled:e,children:[s.jsx(De,{className:"cj-mt-0.5 cj-h-8 cj-text-xs",children:s.jsx(Ae,{})}),s.jsxs(Te,{children:[s.jsx(B,{value:"all",children:t("fc_summary_all_steps")}),g.map((j,x)=>s.jsx(B,{value:String(x+1),children:t("fc_summary_step_n",{n:x+1})},x))]})]})]})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-mb-1",children:[s.jsx(q,{className:"cj-text-[10px] cj-uppercase cj-font-semibold",children:t("fc_summary_display_fields")}),!e&&s.jsxs(te,{size:"sm",variant:"ghost",className:"cj-h-6 cj-text-[11px]",onClick:()=>c(h.section_id),children:[s.jsx(Et,{className:"cj-h-3 cj-w-3 cj-mr-1"}),t("fc_summary_add")]})]}),s.jsxs("div",{className:"cj-space-y-2",children:[h.display_fields.map(j=>s.jsx(eb,{field:j,steps:g.map(x=>({id:x.step_id,title:x.title})),fields:p.map(x=>({id:x.field_id,label:x.label,namespace:x.namespace})),readOnly:e,onChange:x=>l(h.section_id,j.display_id,x),onDelete:()=>d(h.section_id,j.display_id)},j.display_id)),h.display_fields.length===0&&s.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground cj-italic",children:t("fc_summary_no_display_fields")})]})]})]},h.section_id)),f.sections.length===0&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-text-center cj-py-4",children:t("fc_summary_no_sections")})]})]})]})}),s.jsx($r,{open:u!==null,onOpenChange:h=>!h&&m(null),description:t("fc_summary_confirm_delete_section"),onConfirm:()=>{u&&i(u),m(null)}})]})}function eb({field:e,steps:t,fields:n,readOnly:r,onChange:o,onDelete:a}){const{t:i}=we();return s.jsxs("div",{className:"cj-relative cj-rounded-lg cj-border cj-bg-card cj-p-2 cj-space-y-1.5",children:[!r&&s.jsx("button",{onClick:a,className:"cj-absolute cj-top-1 cj-right-1 cj-text-destructive hover:cj-bg-destructive/10 cj-rounded cj-p-0.5",children:s.jsx(Vt,{className:"cj-h-3 cj-w-3"})}),s.jsxs("div",{className:"cj-grid cj-grid-cols-2 cj-gap-1.5",children:[s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-[10px]",children:i("fc_summary_source")}),s.jsxs(Oe,{value:e.source,onValueChange:c=>o({source:c}),disabled:r,children:[s.jsx(De,{className:"cj-mt-0.5 cj-h-7 cj-text-xs",children:s.jsx(Ae,{})}),s.jsxs(Te,{children:[s.jsx(B,{value:"form_field",children:i("fc_summary_source_form_field")}),s.jsx(B,{value:"api_response",children:i("fc_summary_source_api_response")})]})]})]}),s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-[10px]",children:i("fc_summary_format")}),s.jsxs(Oe,{value:e.format||"text",onValueChange:c=>o({format:c}),disabled:r,children:[s.jsx(De,{className:"cj-mt-0.5 cj-h-7 cj-text-xs",children:s.jsx(Ae,{})}),s.jsxs(Te,{children:[s.jsx(B,{value:"text",children:i("fc_summary_format_text")}),s.jsx(B,{value:"number",children:i("fc_summary_format_number")}),s.jsx(B,{value:"currency",children:i("fc_summary_format_currency")}),s.jsx(B,{value:"date",children:i("fc_summary_format_date")}),s.jsx(B,{value:"datetime",children:i("fc_summary_format_datetime")})]})]})]})]}),s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-[10px]",children:i("fc_summary_display_label")}),s.jsx(he,{value:e.label,onChange:c=>o({label:c.target.value}),placeholder:i("fc_summary_display_label_placeholder"),disabled:r,className:"cj-mt-0.5 cj-h-7 cj-text-xs"})]}),e.source==="form_field"?s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-[10px]",children:i("fc_summary_field")}),s.jsxs(Oe,{value:e.field_id||"",onValueChange:c=>o({field_id:c}),disabled:r,children:[s.jsx(De,{className:"cj-mt-0.5 cj-h-7 cj-text-xs",children:s.jsx(Ae,{placeholder:i("fc_summary_select")})}),s.jsx(Te,{children:n.map(c=>s.jsxs(B,{value:c.id,children:[c.label," ",s.jsxs("span",{className:"cj-text-muted-foreground",children:["(",c.namespace,")"]})]},c.id))})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-[10px]",children:i("fc_summary_from_step_api")}),s.jsxs(Oe,{value:e.step_id||"",onValueChange:c=>o({step_id:c}),disabled:r,children:[s.jsx(De,{className:"cj-mt-0.5 cj-h-7 cj-text-xs",children:s.jsx(Ae,{placeholder:i("fc_summary_select")})}),s.jsx(Te,{children:t.map(c=>s.jsx(B,{value:c.id,children:c.title},c.id))})]})]}),s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-[10px]",children:i("fc_summary_response_path")}),s.jsx(he,{value:e.response_path||"",onChange:c=>o({response_path:c.target.value}),placeholder:"data.quote.premium",disabled:r,className:"cj-mt-0.5 cj-h-7 cj-text-xs cj-font-mono"})]})]})]})}function tb({specs:e=[],readOnly:t=!1}){const{t:n}=we(),{formConfig:r,createField:o,createFieldFromSpec:a,deleteField:i,setSelectedField:c,setActiveStep:l,setActiveTab:d}=pt(),[u,m]=v.useState(""),[f,p]=v.useState("all"),[g,h]=v.useState(!1),[j,x]=v.useState(null),[b,w]=v.useState(null),N=v.useMemo(()=>{const P=new Map;for(const k of r.steps){const D=new Set;for(const M of k.rows)for(const A of M.field_ids)D.add(A);for(const M of D){const A=P.get(M)??[];A.push({step_id:k.step_id,title:k.title}),P.set(M,A)}}return P},[r.steps]),S=v.useMemo(()=>{var D;let P=0,k=0;for(const M of r.fields)(((D=N.get(M.field_id))==null?void 0:D.length)??0)>0?P++:k++;return{all:r.fields.length,used:P,unused:k}},[r.fields,N]),y=r.fields.filter(P=>{var A;const k=u.toLowerCase();if(!(P.label.toLowerCase().includes(k)||P.namespace.toLowerCase().includes(k)))return!1;const M=((A=N.get(P.field_id))==null?void 0:A.length)??0;return f==="used"?M>0:f==="unused"?M===0:!0}),C=P=>{l(P),d("steps")},E=P=>`cj-h-8 cj-px-3 cj-text-xs cj-rounded-lg cj-border cj-transition-colors ${P?"cj-bg-primary cj-text-primary-foreground cj-border-primary":"cj-bg-background cj-text-foreground cj-border-border hover:cj-bg-accent/40"}`;return s.jsx("div",{className:"cj-h-full cj-overflow-hidden cj-p-6",children:s.jsxs("div",{className:"cj-h-full cj-flex cj-flex-col cj-max-w-4xl cj-mx-auto cj-w-full cj-bg-card cj-border cj-border-border cj-rounded-2xl cj-p-6",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-mb-4",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"cj-text-lg cj-font-semibold",children:n("fc_fields_catalog")}),s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:n("fc_fields_catalog_hint")})]}),!t&&s.jsxs(te,{onClick:()=>h(!0),children:[s.jsx(Et,{className:"cj-h-4 cj-w-4 cj-mr-1"}),n("fc_fields_add")]})]}),s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2 cj-mb-3",children:[s.jsxs("div",{className:"cj-relative cj-flex-1",children:[s.jsx(Yl,{className:"cj-absolute cj-left-2.5 cj-top-2.5 cj-h-4 cj-w-4 cj-text-muted-foreground"}),s.jsx(he,{placeholder:n("fc_fields_search"),value:u,onChange:P=>m(P.target.value),className:"cj-pl-8"})]}),s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-1",children:[s.jsxs("button",{type:"button",className:E(f==="all"),onClick:()=>p("all"),children:[n("fc_fields_filter_all")," ",s.jsx("span",{className:"cj-opacity-70 cj-ml-1",children:S.all})]}),s.jsxs("button",{type:"button",className:E(f==="used"),onClick:()=>p("used"),children:[n("fc_fields_filter_used")," ",s.jsx("span",{className:"cj-opacity-70 cj-ml-1",children:S.used})]}),s.jsxs("button",{type:"button",className:E(f==="unused"),onClick:()=>p("unused"),children:[n("fc_fields_filter_unused")," ",s.jsx("span",{className:"cj-opacity-70 cj-ml-1",children:S.unused})]})]})]}),s.jsx(Ht,{className:"cj-flex-1 cj-rounded-xl cj-border",children:s.jsxs("div",{className:"cj-divide-y",children:[y.map(P=>{const k=ca(P.schema),D=N.get(P.field_id)??[],M=D.length===0;return s.jsxs("div",{className:`cj-p-3 cj-flex cj-items-start cj-gap-3 hover:cj-bg-accent/40 ${M?"cj-bg-muted/30":""}`,children:[s.jsx(it,{variant:"secondary",className:`cj-text-[10px] ${k.color} cj-text-white cj-mt-0.5`,children:k.label}),s.jsxs("div",{className:"cj-flex-1 cj-min-w-0",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[s.jsxs("div",{className:"cj-text-sm cj-font-medium cj-truncate",children:[P.label,P.required&&s.jsx("span",{className:"cj-text-destructive cj-ml-1",children:"*"})]}),M?s.jsx(it,{variant:"outline",className:"cj-text-[10px] cj-border-destructive/40 cj-text-destructive",children:n("fc_fields_unused_badge")}):s.jsx(it,{variant:"outline",className:"cj-text-[10px] cj-border-primary/40 cj-text-primary",children:D.length===1?n("fc_fields_used_in_one",{count:D.length}):n("fc_fields_used_in_many",{count:D.length})})]}),s.jsx("div",{className:"cj-text-[11px] cj-font-mono cj-text-muted-foreground cj-truncate",children:P.namespace}),D.length>0&&s.jsx("div",{className:"cj-mt-2 cj-flex cj-flex-wrap cj-gap-1",children:D.map(A=>s.jsxs("button",{type:"button",onClick:()=>C(A.step_id),title:n("fc_fields_go_to_step",{title:A.title}),className:"cj-inline-flex cj-items-center cj-gap-1 cj-text-[11px] cj-px-2 cj-py-0.5 cj-rounded-md cj-border cj-border-border cj-bg-background hover:cj-bg-accent/60 cj-transition-colors",children:[s.jsx("span",{className:"cj-truncate cj-max-w-[160px]",children:A.title}),s.jsx(Wo,{className:"cj-h-3 cj-w-3 cj-opacity-60"})]},A.step_id))})]}),!t&&s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-1",children:[s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-7 cj-w-7",onClick:()=>{c(P.field_id),x(P.field_id)},children:s.jsx(q_,{className:"cj-h-3.5 cj-w-3.5"})}),s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-7 cj-w-7",onClick:()=>w(P.field_id),children:s.jsx(Fn,{className:"cj-h-3.5 cj-w-3.5 cj-text-destructive"})})]})]},P.field_id)}),y.length===0&&s.jsx("p",{className:"cj-py-8 cj-text-center cj-text-xs cj-text-muted-foreground",children:r.fields.length===0?n("fc_fields_no_fields"):n("fc_fields_no_match")})]})}),s.jsx(tm,{specs:e,open:g,onOpenChange:h,onCreate:P=>{"claimspec_id"in P?a(P):o(P)}}),s.jsx(em,{fieldId:j,open:!!j,onOpenChange:P=>!P&&x(null)}),s.jsx($r,{open:b!==null,onOpenChange:P=>!P&&w(null),description:n("fc_fields_confirm_delete"),onConfirm:()=>{b&&i(b),w(null)}})]})})}function nb({readOnly:e=!1}){var u,m;const{t}=we(),{formConfig:n,updateInit:r}=pt(),o=n.init,a=Object.entries(o.values||{}),i=()=>{let f="namespace",p=1;for(;o.values[f]!==void 0;)f=`namespace_${p++}`;r({values:{...o.values,[f]:""}})},c=(f,p)=>{if(p===f)return;const g={...o.values};g[p]=g[f],delete g[f],r({values:g})},l=(f,p)=>{r({values:{...o.values,[f]:p}})},d=f=>{const p={...o.values};delete p[f],r({values:p})};return s.jsx(Ht,{className:"cj-h-full",children:s.jsx("div",{className:"cj-p-6",children:s.jsxs("div",{className:"cj-max-w-3xl cj-mx-auto cj-w-full cj-bg-card cj-border cj-border-border cj-rounded-2xl cj-p-6 cj-space-y-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"cj-text-lg cj-font-semibold",children:t("fc_init_title")}),s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:t("fc_init_subtitle")})]}),s.jsxs("div",{className:"cj-rounded-xl cj-border cj-p-4 cj-space-y-3",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between",children:[s.jsx(q,{className:"cj-text-sm cj-font-semibold",children:t("fc_init_static")}),!e&&s.jsxs(te,{size:"sm",variant:"outline",onClick:i,children:[s.jsx(Et,{className:"cj-h-3.5 cj-w-3.5 cj-mr-1"}),t("fc_init_add")]})]}),s.jsxs("div",{className:"cj-space-y-2",children:[a.map(([f,p])=>s.jsxs("div",{className:"cj-flex cj-gap-2 cj-items-center",children:[s.jsx(he,{value:f,onChange:g=>c(f,g.target.value),className:"cj-flex-1 cj-font-mono cj-text-sm cj-h-9",disabled:e}),s.jsx(he,{value:String(p??""),onChange:g=>l(f,g.target.value),className:"cj-flex-1 cj-h-9",disabled:e}),!e&&s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-8 cj-w-8",onClick:()=>d(f),children:s.jsx(Fn,{className:"cj-h-3.5 cj-w-3.5 cj-text-destructive"})})]},f)),a.length===0&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-italic cj-py-2",children:t("fc_init_no_values")})]})]}),s.jsxs("div",{className:"cj-rounded-xl cj-border cj-p-4 cj-space-y-3",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between",children:[s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-sm cj-font-semibold",children:t("fc_init_prefill")}),s.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground",children:t("fc_init_prefill_hint")})]}),s.jsx(Yt,{checked:!!((u=o.api)!=null&&u.enabled),disabled:e,onCheckedChange:f=>r({api:f?o.api||{enabled:!0,method:"GET",url:"",mapping:{}}:void 0})})]}),((m=o.api)==null?void 0:m.enabled)&&s.jsxs("div",{className:"cj-space-y-2",children:[s.jsxs("div",{className:"cj-flex cj-gap-2",children:[s.jsxs(Oe,{value:o.api.method,onValueChange:f=>r({api:{...o.api,method:f}}),disabled:e,children:[s.jsx(De,{className:"cj-w-28",children:s.jsx(Ae,{})}),s.jsxs(Te,{children:[s.jsx(B,{value:"GET",children:"GET"}),s.jsx(B,{value:"POST",children:"POST"})]})]}),s.jsx(he,{value:o.api.url,onChange:f=>r({api:{...o.api,url:f.target.value}}),placeholder:"https://api.example.com/prefill",className:"cj-flex-1 cj-font-mono cj-text-xs",disabled:e})]}),s.jsxs("div",{children:[s.jsx(q,{className:"cj-text-xs",children:t("fc_init_mapping")}),s.jsx(Br,{value:JSON.stringify(o.api.mapping||{},null,2),onChange:f=>{try{const p=JSON.parse(f.target.value);r({api:{...o.api,mapping:p}})}catch{}},className:"cj-mt-1 cj-font-mono cj-text-xs",rows:5,disabled:e})]})]})]})]})})})}var rb=e=>{switch(e){case"success":return sb;case"info":return cb;case"warning":return ib;case"error":return lb;default:return null}},ob=Array(12).fill(0),ab=({visible:e,className:t})=>v.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},v.createElement("div",{className:"sonner-spinner"},ob.map((n,r)=>v.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),sb=v.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},v.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),ib=v.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},v.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),cb=v.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},v.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),lb=v.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},v.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),db=v.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},v.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),v.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),ub=()=>{let[e,t]=v.useState(document.hidden);return v.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},fs=1,fb=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:fs++,a=this.toasts.find(c=>c.id===o),i=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),a?this.toasts=this.toasts.map(c=>c.id===o?(this.publish({...c,...e,id:o,title:n}),{...c,...e,id:o,dismissible:i,title:n}):c):this.addToast({title:n,...r,dismissible:i,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,a,i=r.then(async l=>{if(a=["resolve",l],v.isValidElement(l))o=!1,this.create({id:n,type:"default",message:l});else if(pb(l)&&!l.ok){o=!1;let d=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,u=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:d,description:u})}else if(t.success!==void 0){o=!1;let d=typeof t.success=="function"?await t.success(l):t.success,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:d,description:u})}}).catch(async l=>{if(a=["reject",l],t.error!==void 0){o=!1;let d=typeof t.error=="function"?await t.error(l):t.error,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:d,description:u})}}).finally(()=>{var l;o&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),c=()=>new Promise((l,d)=>i.then(()=>a[0]==="reject"?d(a[1]):l(a[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:c}:Object.assign(n,{unwrap:c})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||fs++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},st=new fb,mb=(e,t)=>{let n=(t==null?void 0:t.id)||fs++;return st.addToast({title:e,...t,id:n}),n},pb=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",hb=mb,_b=()=>st.toasts,gb=()=>st.getActiveToasts(),Mn=Object.assign(hb,{success:st.success,info:st.info,warning:st.warning,error:st.error,custom:st.custom,message:st.message,promise:st.promise,dismiss:st.dismiss,loading:st.loading},{getHistory:_b,getToasts:gb});function jb(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}jb(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
298
|
-
`);function ro(e){return e.label!==void 0}var yb=3,vb="32px",xb="16px",Ec=4e3,bb=356,wb=14,Nb=20,Sb=200;function Nt(...e){return e.filter(Boolean).join(" ")}function Cb(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var kb=e=>{var t,n,r,o,a,i,c,l,d,u,m;let{invert:f,toast:p,unstyled:g,interacting:h,setHeights:j,visibleToasts:x,heights:b,index:w,toasts:N,expanded:S,removeToast:y,defaultRichColors:C,closeButton:E,style:P,cancelButtonStyle:k,actionButtonStyle:D,className:M="",descriptionClassName:A="",duration:z,position:G,gap:W,loadingIcon:Q,expandByDefault:V,classNames:R,icons:K,closeButtonAriaLabel:fe="Close toast",pauseWhenPageIsHidden:ie}=e,[O,I]=v.useState(null),[H,U]=v.useState(null),[T,$]=v.useState(!1),[J,X]=v.useState(!1),[ae,ce]=v.useState(!1),[me,xe]=v.useState(!1),[Ge,Qe]=v.useState(!1),[Ze,Ie]=v.useState(0),[ct,L]=v.useState(0),Z=v.useRef(p.duration||z||Ec),_e=v.useRef(null),re=v.useRef(null),pe=w===0,Ce=w+1<=x,be=p.type,We=p.dismissible!==!1,xt=p.className||"",bt=p.descriptionClassName||"",Ue=v.useMemo(()=>b.findIndex(F=>F.toastId===p.id)||0,[b,p.id]),Rt=v.useMemo(()=>{var F;return(F=p.closeButton)!=null?F:E},[p.closeButton,E]),bn=v.useMemo(()=>p.duration||z||Ec,[p.duration,z]),wn=v.useRef(0),an=v.useRef(0),Ur=v.useRef(0),sn=v.useRef(null),[Xr,ja]=G.split("-"),mr=v.useMemo(()=>b.reduce((F,ke,Re)=>Re>=Ue?F:F+ke.height,0),[b,Ue]),ue=ub(),Ne=p.invert||f,oe=be==="loading";an.current=v.useMemo(()=>Ue*W+mr,[Ue,mr]),v.useEffect(()=>{Z.current=bn},[bn]),v.useEffect(()=>{$(!0)},[]),v.useEffect(()=>{let F=re.current;if(F){let ke=F.getBoundingClientRect().height;return L(ke),j(Re=>[{toastId:p.id,height:ke,position:p.position},...Re]),()=>j(Re=>Re.filter(lt=>lt.toastId!==p.id))}},[j,p.id]),v.useLayoutEffect(()=>{if(!T)return;let F=re.current,ke=F.style.height;F.style.height="auto";let Re=F.getBoundingClientRect().height;F.style.height=ke,L(Re),j(lt=>lt.find(nt=>nt.toastId===p.id)?lt.map(nt=>nt.toastId===p.id?{...nt,height:Re}:nt):[{toastId:p.id,height:Re,position:p.position},...lt])},[T,p.title,p.description,j,p.id]);let je=v.useCallback(()=>{X(!0),Ie(an.current),j(F=>F.filter(ke=>ke.toastId!==p.id)),setTimeout(()=>{y(p)},Sb)},[p,y,j,an]);v.useEffect(()=>{if(p.promise&&be==="loading"||p.duration===1/0||p.type==="loading")return;let F;return S||h||ie&&ue?(()=>{if(Ur.current<wn.current){let ke=new Date().getTime()-wn.current;Z.current=Z.current-ke}Ur.current=new Date().getTime()})():Z.current!==1/0&&(wn.current=new Date().getTime(),F=setTimeout(()=>{var ke;(ke=p.onAutoClose)==null||ke.call(p,p),je()},Z.current)),()=>clearTimeout(F)},[S,h,p,be,ie,ue,je]),v.useEffect(()=>{p.delete&&je()},[je,p.delete]);function tt(){var F,ke,Re;return K!=null&&K.loading?v.createElement("div",{className:Nt(R==null?void 0:R.loader,(F=p==null?void 0:p.classNames)==null?void 0:F.loader,"sonner-loader"),"data-visible":be==="loading"},K.loading):Q?v.createElement("div",{className:Nt(R==null?void 0:R.loader,(ke=p==null?void 0:p.classNames)==null?void 0:ke.loader,"sonner-loader"),"data-visible":be==="loading"},Q):v.createElement(ab,{className:Nt(R==null?void 0:R.loader,(Re=p==null?void 0:p.classNames)==null?void 0:Re.loader),visible:be==="loading"})}return v.createElement("li",{tabIndex:0,ref:re,className:Nt(M,xt,R==null?void 0:R.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,R==null?void 0:R.default,R==null?void 0:R[be],(n=p==null?void 0:p.classNames)==null?void 0:n[be]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:C,"data-styled":!(p.jsx||p.unstyled||g),"data-mounted":T,"data-promise":!!p.promise,"data-swiped":Ge,"data-removed":J,"data-visible":Ce,"data-y-position":Xr,"data-x-position":ja,"data-index":w,"data-front":pe,"data-swiping":ae,"data-dismissible":We,"data-type":be,"data-invert":Ne,"data-swipe-out":me,"data-swipe-direction":H,"data-expanded":!!(S||V&&T),style:{"--index":w,"--toasts-before":w,"--z-index":N.length-w,"--offset":`${J?Ze:an.current}px`,"--initial-height":V?"auto":`${ct}px`,...P,...p.style},onDragEnd:()=>{ce(!1),I(null),sn.current=null},onPointerDown:F=>{oe||!We||(_e.current=new Date,Ie(an.current),F.target.setPointerCapture(F.pointerId),F.target.tagName!=="BUTTON"&&(ce(!0),sn.current={x:F.clientX,y:F.clientY}))},onPointerUp:()=>{var F,ke,Re,lt;if(me||!We)return;sn.current=null;let nt=Number(((F=re.current)==null?void 0:F.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),jt=Number(((ke=re.current)==null?void 0:ke.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Nn=new Date().getTime()-((Re=_e.current)==null?void 0:Re.getTime()),wt=O==="x"?nt:jt,cn=Math.abs(wt)/Nn;if(Math.abs(wt)>=Nb||cn>.11){Ie(an.current),(lt=p.onDismiss)==null||lt.call(p,p),U(O==="x"?nt>0?"right":"left":jt>0?"down":"up"),je(),xe(!0),Qe(!1);return}ce(!1),I(null)},onPointerMove:F=>{var ke,Re,lt,nt;if(!sn.current||!We||((ke=window.getSelection())==null?void 0:ke.toString().length)>0)return;let jt=F.clientY-sn.current.y,Nn=F.clientX-sn.current.x,wt=(Re=e.swipeDirections)!=null?Re:Cb(G);!O&&(Math.abs(Nn)>1||Math.abs(jt)>1)&&I(Math.abs(Nn)>Math.abs(jt)?"x":"y");let cn={x:0,y:0};O==="y"?(wt.includes("top")||wt.includes("bottom"))&&(wt.includes("top")&&jt<0||wt.includes("bottom")&&jt>0)&&(cn.y=jt):O==="x"&&(wt.includes("left")||wt.includes("right"))&&(wt.includes("left")&&Nn<0||wt.includes("right")&&Nn>0)&&(cn.x=Nn),(Math.abs(cn.x)>0||Math.abs(cn.y)>0)&&Qe(!0),(lt=re.current)==null||lt.style.setProperty("--swipe-amount-x",`${cn.x}px`),(nt=re.current)==null||nt.style.setProperty("--swipe-amount-y",`${cn.y}px`)}},Rt&&!p.jsx?v.createElement("button",{"aria-label":fe,"data-disabled":oe,"data-close-button":!0,onClick:oe||!We?()=>{}:()=>{var F;je(),(F=p.onDismiss)==null||F.call(p,p)},className:Nt(R==null?void 0:R.closeButton,(o=p==null?void 0:p.classNames)==null?void 0:o.closeButton)},(a=K==null?void 0:K.close)!=null?a:db):null,p.jsx||v.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:v.createElement(v.Fragment,null,be||p.icon||p.promise?v.createElement("div",{"data-icon":"",className:Nt(R==null?void 0:R.icon,(i=p==null?void 0:p.classNames)==null?void 0:i.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||tt():null,p.type!=="loading"?p.icon||(K==null?void 0:K[be])||rb(be):null):null,v.createElement("div",{"data-content":"",className:Nt(R==null?void 0:R.content,(c=p==null?void 0:p.classNames)==null?void 0:c.content)},v.createElement("div",{"data-title":"",className:Nt(R==null?void 0:R.title,(l=p==null?void 0:p.classNames)==null?void 0:l.title)},typeof p.title=="function"?p.title():p.title),p.description?v.createElement("div",{"data-description":"",className:Nt(A,bt,R==null?void 0:R.description,(d=p==null?void 0:p.classNames)==null?void 0:d.description)},typeof p.description=="function"?p.description():p.description):null),v.isValidElement(p.cancel)?p.cancel:p.cancel&&ro(p.cancel)?v.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||k,onClick:F=>{var ke,Re;ro(p.cancel)&&We&&((Re=(ke=p.cancel).onClick)==null||Re.call(ke,F),je())},className:Nt(R==null?void 0:R.cancelButton,(u=p==null?void 0:p.classNames)==null?void 0:u.cancelButton)},p.cancel.label):null,v.isValidElement(p.action)?p.action:p.action&&ro(p.action)?v.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||D,onClick:F=>{var ke,Re;ro(p.action)&&((Re=(ke=p.action).onClick)==null||Re.call(ke,F),!F.defaultPrevented&&je())},className:Nt(R==null?void 0:R.actionButton,(m=p==null?void 0:p.classNames)==null?void 0:m.actionButton)},p.action.label):null))};function Mc(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Pb(e,t){let n={};return[e,t].forEach((r,o)=>{let a=o===1,i=a?"--mobile-offset":"--offset",c=a?xb:vb;function l(d){["top","right","bottom","left"].forEach(u=>{n[`${i}-${u}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${i}-${d}`]=c:n[`${i}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):l(c)}),n}v.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:i,className:c,offset:l,mobileOffset:d,theme:u="light",richColors:m,duration:f,style:p,visibleToasts:g=yb,toastOptions:h,dir:j=Mc(),gap:x=wb,loadingIcon:b,icons:w,containerAriaLabel:N="Notifications",pauseWhenPageIsHidden:S}=e,[y,C]=v.useState([]),E=v.useMemo(()=>Array.from(new Set([r].concat(y.filter(ie=>ie.position).map(ie=>ie.position)))),[y,r]),[P,k]=v.useState([]),[D,M]=v.useState(!1),[A,z]=v.useState(!1),[G,W]=v.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Q=v.useRef(null),V=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=v.useRef(null),K=v.useRef(!1),fe=v.useCallback(ie=>{C(O=>{var I;return(I=O.find(H=>H.id===ie.id))!=null&&I.delete||st.dismiss(ie.id),O.filter(({id:H})=>H!==ie.id)})},[]);return v.useEffect(()=>st.subscribe(ie=>{if(ie.dismiss){C(O=>O.map(I=>I.id===ie.id?{...I,delete:!0}:I));return}setTimeout(()=>{ws.flushSync(()=>{C(O=>{let I=O.findIndex(H=>H.id===ie.id);return I!==-1?[...O.slice(0,I),{...O[I],...ie},...O.slice(I+1)]:[ie,...O]})})})}),[]),v.useEffect(()=>{if(u!=="system"){W(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?W("dark"):W("light")),typeof window>"u")return;let ie=window.matchMedia("(prefers-color-scheme: dark)");try{ie.addEventListener("change",({matches:O})=>{W(O?"dark":"light")})}catch{ie.addListener(({matches:I})=>{try{W(I?"dark":"light")}catch(H){console.error(H)}})}},[u]),v.useEffect(()=>{y.length<=1&&M(!1)},[y]),v.useEffect(()=>{let ie=O=>{var I,H;o.every(U=>O[U]||O.code===U)&&(M(!0),(I=Q.current)==null||I.focus()),O.code==="Escape"&&(document.activeElement===Q.current||(H=Q.current)!=null&&H.contains(document.activeElement))&&M(!1)};return document.addEventListener("keydown",ie),()=>document.removeEventListener("keydown",ie)},[o]),v.useEffect(()=>{if(Q.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,K.current=!1)}},[Q.current]),v.createElement("section",{ref:t,"aria-label":`${N} ${V}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},E.map((ie,O)=>{var I;let[H,U]=ie.split("-");return y.length?v.createElement("ol",{key:ie,dir:j==="auto"?Mc():j,tabIndex:-1,ref:Q,className:c,"data-sonner-toaster":!0,"data-theme":G,"data-y-position":H,"data-lifted":D&&y.length>1&&!a,"data-x-position":U,style:{"--front-toast-height":`${((I=P[0])==null?void 0:I.height)||0}px`,"--width":`${bb}px`,"--gap":`${x}px`,...p,...Pb(l,d)},onBlur:T=>{K.current&&!T.currentTarget.contains(T.relatedTarget)&&(K.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:T=>{T.target instanceof HTMLElement&&T.target.dataset.dismissible==="false"||K.current||(K.current=!0,R.current=T.relatedTarget)},onMouseEnter:()=>M(!0),onMouseMove:()=>M(!0),onMouseLeave:()=>{A||M(!1)},onDragEnd:()=>M(!1),onPointerDown:T=>{T.target instanceof HTMLElement&&T.target.dataset.dismissible==="false"||z(!0)},onPointerUp:()=>z(!1)},y.filter(T=>!T.position&&O===0||T.position===ie).map((T,$)=>{var J,X;return v.createElement(kb,{key:T.id,icons:w,index:$,toast:T,defaultRichColors:m,duration:(J=h==null?void 0:h.duration)!=null?J:f,className:h==null?void 0:h.className,descriptionClassName:h==null?void 0:h.descriptionClassName,invert:n,visibleToasts:g,closeButton:(X=h==null?void 0:h.closeButton)!=null?X:i,interacting:A,position:ie,style:h==null?void 0:h.style,unstyled:h==null?void 0:h.unstyled,classNames:h==null?void 0:h.classNames,cancelButtonStyle:h==null?void 0:h.cancelButtonStyle,actionButtonStyle:h==null?void 0:h.actionButtonStyle,removeToast:fe,toasts:y.filter(ae=>ae.position==T.position),heights:P.filter(ae=>ae.position==T.position),setHeights:k,expandByDefault:a,gap:x,loadingIcon:b,expanded:D,pauseWhenPageIsHidden:S,swipeDirections:e.swipeDirections})})):null}))});function Eb({readOnly:e=!1}){const{t}=we(),{exportJourneySpec:n,importJourneySpec:r}=pt(),o=n(),a=JSON.stringify(o,null,2),[i,c]=v.useState(a),[l,d]=v.useState(null),[u,m]=v.useState(null),f=v.useRef(null),p=v.useRef(),g=i!==a,h=y=>{m(y),clearTimeout(p.current),p.current=setTimeout(()=>{m(null)},2200)};v.useEffect(()=>()=>{clearTimeout(p.current)},[]);const j=y=>u===y?s.jsx(Ll,{"aria-label":"Success",className:"cj-h-3.5 cj-w-3.5 cj-ml-1 cj-text-green-600"}):null,x=()=>{c(JSON.stringify(n(),null,2)),d(null),h("refresh")},b=(y,C)=>{try{const E=JSON.parse(y);r(E),c(JSON.stringify(E,null,2)),d(null),h(C),Mn.success(t("fc_json_imported_ok"))}catch(E){d(E instanceof Error?E.message:t("fc_json_invalid")),Mn.error(t("fc_json_invalid"))}},w=y=>{var P;const C=(P=y.target.files)==null?void 0:P[0];if(!C)return;const E=new FileReader;E.onload=k=>{var M;const D=(M=k.target)==null?void 0:M.result;b(D,"upload")},E.onerror=()=>{Mn.error(t("fc_json_file_error"))},E.readAsText(C),y.target.value=""},N=()=>{navigator.clipboard.writeText(i).then(()=>{h("copy"),Mn.success(t("fc_json_copied"))})},S=()=>{const y=new Blob([i],{type:"application/json"}),C=URL.createObjectURL(y),E=document.createElement("a");E.href=C,E.download=`${o.journey_id}.json`,E.click(),URL.revokeObjectURL(C),h("download")};return s.jsx("div",{className:"cj-h-full cj-overflow-auto cj-p-6",children:s.jsxs("div",{className:"cj-max-w-4xl cj-mx-auto cj-w-full cj-bg-card cj-border cj-border-border cj-rounded-2xl cj-p-6 cj-flex cj-flex-col cj-gap-2 cj-min-h-full",children:[s.jsx("h2",{className:"cj-text-lg cj-font-semibold",children:t("fc_json_title")}),s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:t("fc_json_hint")}),s.jsxs("div",{className:"cj-flex cj-flex-wrap cj-gap-2",children:[s.jsxs(te,{size:"sm",variant:"outline",onClick:x,title:t("fc_json_refresh_hint"),children:[t("fc_json_refresh"),j("refresh")]}),s.jsxs(te,{size:"sm",variant:"outline",onClick:N,children:[s.jsx(M_,{className:"cj-h-3.5 cj-w-3.5 cj-mr-1"}),t("fc_json_copy"),j("copy")]}),s.jsxs(te,{size:"sm",variant:"outline",onClick:S,children:[s.jsx(T_,{className:"cj-h-3.5 cj-w-3.5 cj-mr-1"}),t("fc_json_download"),j("download")]}),!e&&s.jsxs(s.Fragment,{children:[s.jsxs(te,{size:"sm",variant:"outline",onClick:()=>{var y;return(y=f.current)==null?void 0:y.click()},children:[s.jsx(I_,{className:"cj-h-3.5 cj-w-3.5 cj-mr-1"}),t("fc_json_upload"),j("upload")]}),s.jsxs(te,{size:"sm",onClick:()=>b(i,"apply"),disabled:!g,title:t("fc_json_apply_hint"),children:[s.jsx(Vl,{className:"cj-h-3.5 cj-w-3.5 cj-mr-1"}),t("fc_json_import"),j("apply")]}),s.jsx("input",{ref:f,type:"file",accept:".json,application/json",hidden:!0,onChange:w})]})]}),l&&s.jsx("div",{className:"cj-rounded-lg cj-border cj-border-destructive/40 cj-bg-destructive/10 cj-text-destructive cj-text-xs cj-p-2 cj-font-mono",children:l}),s.jsx(Br,{value:i,onChange:y=>c(y.target.value),className:"cj-flex-1 cj-font-mono cj-text-xs",readOnly:e})]})})}function Mb(e){const t=[];if(e.steps.length===0)return t;const n=new Map;for(const f of e.steps)n.set(f.step_id,f);for(const f of e.steps)for(const p of f.navigation.rules)p.next_step_id!=="__submit__"&&(n.has(p.next_step_id)||t.push({type:"error",category:"broken-reference",message:`Navigation rule targets non-existent step "${p.next_step_id}".`,stepIds:[f.step_id]}));const r=new Set;if(e.steps.length>0){const f=[e.steps[0].step_id];for(r.add(e.steps[0].step_id);f.length>0;){const p=f.shift(),g=n.get(p);if(g)for(const h of g.navigation.rules)h.next_step_id!=="__submit__"&&!r.has(h.next_step_id)&&n.has(h.next_step_id)&&(r.add(h.next_step_id),f.push(h.next_step_id))}}for(const f of e.steps)r.has(f.step_id)||t.push({type:"warning",category:"unreachable-step",message:`Step "${f.title}" cannot be reached from the first step.`,stepIds:[f.step_id]});const o=new Map;for(const f of e.steps){o.has(f.step_id)||o.set(f.step_id,[]);for(const p of f.navigation.rules)p.next_step_id!=="__submit__"&&(o.has(p.next_step_id)||o.set(p.next_step_id,[]),o.get(p.next_step_id).push(f.step_id))}const a=new Set,i=[];for(const f of e.steps)for(const p of f.navigation.rules)if(p.next_step_id==="__submit__"){a.add(f.step_id),i.push(f.step_id);break}for(;i.length>0;){const f=i.shift(),p=o.get(f)||[];for(const g of p)a.has(g)||(a.add(g),i.push(g))}for(const f of e.steps)f.navigation.rules.length!==0&&(a.has(f.step_id)||t.push({type:"error",category:"dead-end",message:`Step "${f.title}" has navigation rules but none lead to form submission.`,stepIds:[f.step_id]}));const c=new Map;for(const f of e.steps){c.has(f.step_id)||c.set(f.step_id,[]);for(const p of f.navigation.rules)p.next_step_id!=="__submit__"&&n.has(p.next_step_id)&&c.get(f.step_id).push(p.next_step_id)}const l=new Set,d=new Set,u=new Set;function m(f){l.add(f),d.add(f);let p=!1;for(const g of c.get(f)||[])d.has(g)?(u.add(f),u.add(g),p=!0):l.has(g)||m(g)&&(p=!0);return d.delete(f),p}for(const f of e.steps)l.has(f.step_id)||m(f.step_id);if(u.size>0){const f=[...u].map(p=>{var g;return((g=n.get(p))==null?void 0:g.title)||p}).join(", ");t.push({type:"error",category:"cycle",message:`Navigation cycle detected involving: ${f}`,stepIds:[...u]})}for(const f of e.steps){if(f.navigation.rules.length<=1)continue;f.navigation.rules.some(g=>g.condition===null)||t.push({type:"warning",category:"no-fallback-rule",message:`Step "${f.title}" has multiple rules but no unconditional fallback rule.`,stepIds:[f.step_id]})}return t}const Db=Rr("cj-relative cj-w-full cj-rounded-lg cj-border cj-p-4 [&>svg~*]:cj-pl-7 [&>svg+div]:cj-translate-y-[-3px] [&>svg]:cj-absolute [&>svg]:cj-left-4 [&>svg]:cj-top-4 [&>svg]:cj-text-foreground",{variants:{variant:{default:"cj-bg-background cj-text-foreground",destructive:"cj-border-destructive/50 cj-text-destructive dark:cj-border-destructive [&>svg]:cj-text-destructive"}},defaultVariants:{variant:"default"}}),ms=_.forwardRef(({className:e,variant:t,...n},r)=>s.jsx("div",{ref:r,role:"alert",className:ne(Db({variant:t}),e),...n}));ms.displayName="Alert";const ps=_.forwardRef(({className:e,...t},n)=>s.jsx("h5",{ref:n,className:ne("cj-mb-1 cj-font-medium cj-leading-none cj-tracking-tight",e),...t}));ps.displayName="AlertTitle";const hs=_.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:ne("cj-text-sm [&_p]:cj-leading-relaxed",e),...t}));hs.displayName="AlertDescription";function Tb(e){const t=Rb(e),n=_.forwardRef((r,o)=>{const{children:a,...i}=r,c=_.Children.toArray(a),l=c.find(Ab);if(l){const d=l.props.children,u=c.map(m=>m===l?_.Children.count(d)>1?_.Children.only(null):_.isValidElement(d)?d.props.children:null:m);return s.jsx(t,{...i,ref:o,children:_.isValidElement(d)?_.cloneElement(d,void 0,u):null})}return s.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function Rb(e){const t=_.forwardRef((n,r)=>{const{children:o,...a}=n;if(_.isValidElement(o)){const i=Ib(o),c=zb(a,o.props);return o.type!==_.Fragment&&(c.ref=r?Wn(r,i):i),_.cloneElement(o,c)}return _.Children.count(o)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ob=Symbol("radix.slottable");function Ab(e){return _.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ob}function zb(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...c)=>{const l=a(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Ib(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ua="Popover",[sm]=_t(ua,[na]),Hr=na(),[Wb,xn]=sm(ua),im=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,c=Hr(t),l=_.useRef(null),[d,u]=_.useState(!1),[m,f]=tn({prop:r,defaultProp:o??!1,onChange:a,caller:ua});return s.jsx(ef,{...c,children:s.jsx(Wb,{scope:t,contentId:$t(),triggerRef:l,open:m,onOpenChange:f,onOpenToggle:_.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:d,onCustomAnchorAdd:_.useCallback(()=>u(!0),[]),onCustomAnchorRemove:_.useCallback(()=>u(!1),[]),modal:i,children:n})})};im.displayName=ua;var cm="PopoverAnchor",Fb=_.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=xn(cm,n),a=Hr(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:c}=o;return _.useEffect(()=>(i(),()=>c()),[i,c]),s.jsx(ei,{...a,...r,ref:t})});Fb.displayName=cm;var lm="PopoverTrigger",dm=_.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=xn(lm,n),a=Hr(n),i=ve(t,o.triggerRef),c=s.jsx(le.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":hm(o.open),...r,ref:i,onClick:se(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?c:s.jsx(ei,{asChild:!0,...a,children:c})});dm.displayName=lm;var di="PopoverPortal",[$b,Lb]=sm(di,{forceMount:void 0}),um=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=xn(di,t);return s.jsx($b,{scope:t,forceMount:n,children:s.jsx(gt,{present:n||a.open,children:s.jsx(Go,{asChild:!0,container:o,children:r})})})};um.displayName=di;var or="PopoverContent",fm=_.forwardRef((e,t)=>{const n=Lb(or,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=xn(or,e.__scopePopover);return s.jsx(gt,{present:r||a.open,children:a.modal?s.jsx(Hb,{...o,ref:t}):s.jsx(qb,{...o,ref:t})})});fm.displayName=or;var Bb=Tb("PopoverContent.RemoveScroll"),Hb=_.forwardRef((e,t)=>{const n=xn(or,e.__scopePopover),r=_.useRef(null),o=ve(t,r),a=_.useRef(!1);return _.useEffect(()=>{const i=r.current;if(i)return Fs(i)},[]),s.jsx(Xo,{as:Bb,allowPinchZoom:!0,children:s.jsx(mm,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:se(e.onCloseAutoFocus,i=>{var c;i.preventDefault(),a.current||(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:se(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,d=c.button===2||l;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:se(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),qb=_.forwardRef((e,t)=>{const n=xn(or,e.__scopePopover),r=_.useRef(!1),o=_.useRef(!1);return s.jsx(mm,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,c;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(r.current||(c=n.triggerRef.current)==null||c.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var l,d;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),mm=_.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:u,...m}=e,f=xn(or,n),p=Hr(n);return Ws(),s.jsx(Vo,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:s.jsx(Yo,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:u,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:s.jsx(tf,{"data-state":hm(f.open),role:"dialog",id:f.contentId,...p,...m,ref:t,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),pm="PopoverClose",Yb=_.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=xn(pm,n);return s.jsx(le.button,{type:"button",...r,ref:t,onClick:se(e.onClick,()=>o.onOpenChange(!1))})});Yb.displayName=pm;var Vb="PopoverArrow",Gb=_.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Hr(n);return s.jsx(nf,{...o,...r,ref:t})});Gb.displayName=Vb;function hm(e){return e?"open":"closed"}var Ub=im,Xb=dm,Kb=um,_m=fm;const fa=Ub,ma=Xb,qr=_.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>{const a=ia();return s.jsx(Kb,{container:a??void 0,children:s.jsx(_m,{ref:o,align:t,sideOffset:n,className:ne("cj-z-50 cj-w-72 cj-rounded-md cj-border cj-bg-popover cj-p-4 cj-text-popover-foreground cj-shadow-md cj-outline-none data-[state=open]:cj-animate-in data-[state=closed]:cj-animate-out data-[state=closed]:cj-fade-out-0 data-[state=open]:cj-fade-in-0 data-[state=closed]:cj-zoom-out-95 data-[state=open]:cj-zoom-in-95 data-[side=bottom]:cj-slide-in-from-top-2 data-[side=left]:cj-slide-in-from-right-2 data-[side=right]:cj-slide-in-from-left-2 data-[side=top]:cj-slide-in-from-bottom-2",e),...r})})});qr.displayName=_m.displayName;function Jb(){const e=pt(p=>p.formConfig),t=pt(p=>p.setActiveStep),[n,r]=v.useState(!1),{t:o}=we(),a=v.useMemo(()=>Mb(e),[e]),i=v.useMemo(()=>{const p={},g=[];for(const h of a){const j=h.stepIds||[];if(j.length>0){const x=j[0];p[x]||(p[x]=[]),p[x].push(h)}else g.push(h)}return{byStep:p,general:g}},[a]),c=a.filter(p=>p.type==="error"),l=a.filter(p=>p.type==="warning"),d=p=>{var g;(g=p.stepIds)!=null&&g[0]&&t(p.stepIds[0])},u=a.length,m=p=>{var g;return((g=e.steps.find(h=>h.step_id===p))==null?void 0:g.title)||p},f=p=>o("fc_flow_validation_"+p.replace(/-/g,"_"))||p.replace(/-/g," ");return s.jsxs(fa,{open:n,onOpenChange:r,children:[s.jsx(ma,{asChild:!0,children:s.jsxs(te,{variant:"outline",size:"sm",className:c.length>0?"cj-border-destructive cj-text-destructive hover:cj-text-destructive":l.length>0?"cj-border-yellow-500 cj-text-yellow-600 hover:cj-text-yellow-600":"",children:[s.jsx(X_,{className:"cj-h-4 cj-w-4 cj-mr-1"}),o("fc_flow_validation_validate"),u>0&&s.jsx(it,{variant:c.length>0?"destructive":"secondary",className:"cj-ml-1.5 cj-h-5 cj-min-w-5 cj-px-1 cj-text-xs",children:u})]})}),s.jsxs(qr,{className:"cj-w-96 cj-p-0",align:"end",children:[s.jsxs("div",{className:"cj-p-3 cj-border-b",children:[s.jsx("h4",{className:"cj-font-semibold cj-text-sm",children:o("fc_flow_validation_title")}),s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-mt-0.5",children:a.length===0?o("fc_flow_validation_no_issues"):`${c.length} error(s), ${l.length} warning(s)`})]}),a.length===0?s.jsxs("div",{className:"cj-p-6 cj-flex cj-flex-col cj-items-center cj-gap-2 cj-text-muted-foreground",children:[s.jsx(qi,{className:"cj-h-8 cj-w-8 cj-text-green-500"}),s.jsx("span",{className:"cj-text-sm cj-font-medium",children:o("fc_flow_validation_good")})]}):s.jsx(Ht,{className:"cj-max-h-80",children:s.jsxs("div",{className:"cj-p-2 cj-space-y-1",children:[Object.entries(i.byStep).map(([p,g])=>{const h=g.filter(j=>j.type==="error");return s.jsxs(ls,{defaultOpen:g.length>0,children:[s.jsxs(ds,{className:"cj-flex cj-items-center cj-gap-2 cj-w-full cj-px-2 cj-py-1.5 cj-rounded hover:cj-bg-accent/50 cj-transition-colors cj-text-sm cj-font-medium",children:[s.jsx(Bt,{className:"cj-h-3.5 cj-w-3.5 cj-text-muted-foreground cj-transition-transform [[data-state=closed]>&]:cj-rotate-[-90deg]"}),s.jsx("span",{children:m(p)}),g.length===0?s.jsx(qi,{className:"cj-h-3.5 cj-w-3.5 cj-text-green-500 cj-ml-auto"}):s.jsx(it,{variant:h.length>0?"destructive":"secondary",className:"cj-ml-auto cj-h-5 cj-min-w-5 cj-px-1 cj-text-xs",children:g.length})]}),s.jsx(us,{children:g.length===0?s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-pl-8 cj-py-1",children:o("fc_flow_validation_no_issues_step")}):s.jsx("div",{className:"cj-pl-2 cj-pr-1 cj-pb-1 cj-space-y-1.5",children:g.map((j,x)=>s.jsxs(ms,{variant:j.type==="error"?"destructive":"default",className:"cj-cursor-pointer hover:cj-bg-accent/50 cj-transition-colors cj-py-2",onClick:()=>d(j),children:[j.type==="error"?s.jsx(Yi,{className:"cj-h-4 cj-w-4"}):s.jsx(Vi,{className:"cj-h-4 cj-w-4 cj-text-yellow-500"}),s.jsx(ps,{className:"cj-text-xs cj-font-semibold cj-uppercase cj-tracking-wide",children:f(j.category)}),s.jsx(hs,{className:"cj-text-xs",children:j.message})]},x))})})]},p)}),i.general.length>0&&s.jsxs(ls,{defaultOpen:!0,children:[s.jsxs(ds,{className:"cj-flex cj-items-center cj-gap-2 cj-w-full cj-px-2 cj-py-1.5 cj-rounded hover:cj-bg-accent/50 cj-transition-colors cj-text-sm cj-font-medium",children:[s.jsx(Bt,{className:"cj-h-3.5 cj-w-3.5 cj-text-muted-foreground cj-transition-transform [[data-state=closed]>&]:cj-rotate-[-90deg]"}),s.jsx("span",{children:o("fc_flow_validation_general")}),s.jsx(it,{variant:"secondary",className:"cj-ml-auto cj-h-5 cj-min-w-5 cj-px-1 cj-text-xs",children:i.general.length})]}),s.jsx(us,{children:s.jsx("div",{className:"cj-pl-2 cj-pr-1 cj-pb-1 cj-space-y-1.5",children:i.general.map((p,g)=>s.jsxs(ms,{variant:p.type==="error"?"destructive":"default",className:"cj-cursor-pointer hover:cj-bg-accent/50 cj-transition-colors cj-py-2",onClick:()=>d(p),children:[p.type==="error"?s.jsx(Yi,{className:"cj-h-4 cj-w-4"}):s.jsx(Vi,{className:"cj-h-4 cj-w-4 cj-text-yellow-500"}),s.jsx(ps,{className:"cj-text-xs cj-font-semibold cj-uppercase cj-tracking-wide",children:f(p.category)}),s.jsx(hs,{className:"cj-text-xs",children:p.message})]},g))})})]})]})})]})]})}const Qb=Hs,Zb=ou,ew=qs,gm=_.forwardRef(({className:e,...t},n)=>s.jsx(zr,{className:ne("cj-fixed cj-inset-0 cj-z-50 cj-bg-black/80 data-[state=open]:cj-animate-in data-[state=closed]:cj-animate-out data-[state=closed]:cj-fade-out-0 data-[state=open]:cj-fade-in-0",e),...t,ref:n}));gm.displayName=zr.displayName;const tw=Rr("cj-fixed cj-z-50 cj-gap-4 cj-bg-background cj-p-6 cj-shadow-lg cj-transition cj-ease-in-out data-[state=open]:cj-animate-in data-[state=closed]:cj-animate-out data-[state=closed]:cj-duration-300 data-[state=open]:cj-duration-500",{variants:{side:{top:"cj-inset-x-0 cj-top-0 cj-border-b data-[state=closed]:cj-slide-out-to-top data-[state=open]:cj-slide-in-from-top",bottom:"cj-inset-x-0 cj-bottom-0 cj-border-t data-[state=closed]:cj-slide-out-to-bottom data-[state=open]:cj-slide-in-from-bottom",left:"cj-inset-y-0 cj-left-0 cj-h-full cj-w-3/4 cj-border-r data-[state=closed]:cj-slide-out-to-left data-[state=open]:cj-slide-in-from-left sm:cj-max-w-sm",right:"cj-inset-y-0 cj-right-0 cj-h-full cj-w-3/4 cj-border-l data-[state=closed]:cj-slide-out-to-right data-[state=open]:cj-slide-in-from-right sm:cj-max-w-sm"}},defaultVariants:{side:"right"}}),jm=_.forwardRef(({side:e="right",className:t,children:n,...r},o)=>s.jsxs(ew,{children:[s.jsx(gm,{}),s.jsxs(Ir,{ref:o,className:ne(tw({side:e}),t),...r,children:[n,s.jsxs(Jo,{className:"cj-absolute cj-right-4 cj-top-4 cj-rounded-sm cj-opacity-70 cj-ring-offset-background cj-transition-opacity data-[state=open]:cj-bg-secondary hover:cj-opacity-100 focus:cj-outline-none focus:cj-ring-2 focus:cj-ring-ring focus:cj-ring-offset-2 disabled:cj-pointer-events-none",children:[s.jsx(Vt,{className:"cj-h-4 cj-w-4"}),s.jsx("span",{className:"cj-sr-only",children:"Close"})]})]})]}));jm.displayName=Ir.displayName;const ym=({className:e,...t})=>s.jsx("div",{className:ne("cj-flex cj-flex-col cj-space-y-2 cj-text-center sm:cj-text-left",e),...t});ym.displayName="SheetHeader";const vm=_.forwardRef(({className:e,...t},n)=>s.jsx(Wr,{ref:n,className:ne("cj-text-lg cj-font-semibold cj-text-foreground",e),...t}));vm.displayName=Wr.displayName;const nw=_.forwardRef(({className:e,...t},n)=>s.jsx(Fr,{ref:n,className:ne("cj-text-sm cj-text-muted-foreground",e),...t}));nw.displayName=Fr.displayName;const xm={compact:"8px",cozy:"16px",spacious:"24px"};function bm(e){if(!e)return[];const t=[];return e.primaryColor&&t.push(`--claims-journey-primary: ${e.primaryColor};`),e.backgroundColor&&t.push(`--claims-journey-background: ${e.backgroundColor};`),e.cardColor&&t.push(`--claims-journey-card: ${e.cardColor};`),e.foregroundColor&&t.push(`--claims-journey-foreground: ${e.foregroundColor};`),e.fontFamilyHeading&&t.push(`--claims-journey-font-heading: ${e.fontFamilyHeading};`),e.fontFamilyBody&&t.push(`--claims-journey-font-body: ${e.fontFamilyBody};`),e.borderRadius!==void 0&&t.push(`--claims-journey-radius: ${e.borderRadius}rem;`),e.spacing&&t.push(`--claims-journey-spacing: ${xm[e.spacing]};`),e.fontSizeBase!==void 0&&t.push(`font-size: ${e.fontSizeBase}px;`),t}function rw(e,t){const n=bm(e);return n.length?`${t} { ${n.join(" ")} }`:null}function wm(e){const t={};return e&&(e.primaryColor&&(t["--claims-journey-primary"]=e.primaryColor),e.backgroundColor&&(t["--claims-journey-background"]=e.backgroundColor),e.cardColor&&(t["--claims-journey-card"]=e.cardColor),e.foregroundColor&&(t["--claims-journey-foreground"]=e.foregroundColor),e.fontFamilyHeading&&(t["--claims-journey-font-heading"]=e.fontFamilyHeading),e.fontFamilyBody&&(t["--claims-journey-font-body"]=e.fontFamilyBody),e.borderRadius!==void 0&&(t["--claims-journey-radius"]=`${e.borderRadius}rem`),e.spacing&&(t["--claims-journey-spacing"]=xm[e.spacing]),e.fontSizeBase!==void 0&&(t.fontSize=`${e.fontSizeBase}px`)),t}const Dc=[{label:"Poppins (default)",value:"'Poppins', sans-serif"},{label:"Roboto (default)",value:"'Roboto', sans-serif"},{label:"Inter",value:"'Inter', sans-serif"},{label:"System UI",value:"system-ui, sans-serif"},{label:"Georgia",value:"Georgia, serif"}];function ow(e){if(!e)return"#000000";const t=e.trim().match(/^(\d+(?:\.\d+)?)\s+(\d+(?:\.\d+)?)%\s+(\d+(?:\.\d+)?)%$/);if(!t)return"#000000";const n=parseFloat(t[1])/360,r=parseFloat(t[2])/100,o=parseFloat(t[3])/100,a=(u,m,f)=>(f<0&&(f+=1),f>1&&(f-=1),f<1/6?u+(m-u)*6*f:f<1/2?m:f<2/3?u+(m-u)*(2/3-f)*6:u);let i,c,l;if(r===0)i=c=l=o;else{const u=o<.5?o*(1+r):o+r-o*r,m=2*o-u;i=a(m,u,n+1/3),c=a(m,u,n),l=a(m,u,n-1/3)}const d=u=>Math.round(u*255).toString(16).padStart(2,"0");return`#${d(i)}${d(c)}${d(l)}`}function aw(e){const t=e.replace("#","").match(/^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i);if(!t)return"0 0% 0%";const n=parseInt(t[1],16)/255,r=parseInt(t[2],16)/255,o=parseInt(t[3],16)/255,a=Math.max(n,r,o),i=Math.min(n,r,o);let c=0,l=0;const d=(a+i)/2;if(a!==i){const u=a-i;switch(l=d>.5?u/(2-a-i):u/(a+i),a){case n:c=(r-o)/u+(r<o?6:0);break;case r:c=(o-n)/u+2;break;case o:c=(n-r)/u+4;break}c/=6}return`${Math.round(c*360)} ${Math.round(l*100)}% ${Math.round(d*100)}%`}function oo({label:e,value:t,onChange:n}){const{t:r}=we(),o=ow(t);return s.jsxs("div",{className:"cj-space-y-1",children:[s.jsx(q,{className:"cj-text-xs",children:e}),s.jsxs("div",{className:"cj-flex cj-gap-2 cj-items-center",children:[s.jsx("input",{type:"color",value:o,onChange:a=>n(aw(a.target.value)),className:"cj-h-9 cj-w-12 cj-rounded-md cj-border cj-border-input cj-bg-background cj-cursor-pointer cj-p-1","aria-label":r("theme_color_picker_aria",{label:e})}),s.jsx(he,{value:t||"",onChange:a=>n(a.target.value),placeholder:r("theme_color_placeholder"),className:"cj-h-9 cj-text-xs cj-font-mono cj-flex-1"})]}),s.jsx("p",{className:"cj-text-[10px] cj-text-muted-foreground",children:r("theme_color_hint")})]})}function sw(){const{t:e}=we(),{theme:t,updateTheme:n,resetTheme:r}=pt(),[o,a]=v.useState(null),i=l=>n(l),c=wm(t);return s.jsxs(Qb,{children:[s.jsx(Zb,{asChild:!0,children:s.jsxs(te,{size:"sm",variant:"outline",children:[s.jsx(H_,{className:"cj-h-4 cj-w-4 cj-mr-1"}),e("theme_button")]})}),s.jsx(jm,{className:"cj-w-[360px] sm:cj-w-[420px] cj-overflow-y-auto",ref:a,children:s.jsxs(sa.Provider,{value:o,children:[s.jsx(ym,{children:s.jsxs(vm,{className:"cj-flex cj-items-center cj-justify-between",children:[s.jsx("span",{children:e("theme_button")}),s.jsxs(te,{size:"sm",variant:"ghost",onClick:()=>r(),children:[s.jsx(ql,{className:"cj-h-3 cj-w-3 cj-mr-1"}),e("theme_reset")]})]})}),s.jsxs("div",{className:"cj-space-y-4 cj-mt-4",children:[s.jsxs("section",{className:"cj-space-y-3",children:[s.jsx("h4",{className:"cj-text-xs cj-font-semibold cj-uppercase cj-tracking-wide cj-text-muted-foreground",children:e("theme_colors")}),s.jsx(oo,{label:e("theme_primary"),value:t.primaryColor,onChange:l=>i({primaryColor:l})}),s.jsx(oo,{label:e("theme_background"),value:t.backgroundColor,onChange:l=>i({backgroundColor:l})}),s.jsx(oo,{label:e("theme_card"),value:t.cardColor,onChange:l=>i({cardColor:l})}),s.jsx(oo,{label:e("theme_foreground"),value:t.foregroundColor,onChange:l=>i({foregroundColor:l})})]}),s.jsxs("section",{className:"cj-space-y-3",children:[s.jsx("h4",{className:"cj-text-xs cj-font-semibold cj-uppercase cj-tracking-wide cj-text-muted-foreground",children:e("theme_typography")}),s.jsxs("div",{className:"cj-space-y-1",children:[s.jsx(q,{className:"cj-text-xs",children:e("theme_heading_font")}),s.jsxs(Oe,{value:t.fontFamilyHeading||void 0,onValueChange:l=>i({fontFamilyHeading:l}),children:[s.jsx(De,{className:"cj-h-9 cj-text-xs",children:s.jsx(Ae,{placeholder:e("theme_font_default")})}),s.jsx(Te,{children:Dc.map(l=>s.jsx(B,{value:l.value,children:l.label},l.value))})]})]}),s.jsxs("div",{className:"cj-space-y-1",children:[s.jsx(q,{className:"cj-text-xs",children:e("theme_body_font")}),s.jsxs(Oe,{value:t.fontFamilyBody||void 0,onValueChange:l=>i({fontFamilyBody:l}),children:[s.jsx(De,{className:"cj-h-9 cj-text-xs",children:s.jsx(Ae,{placeholder:e("theme_font_default")})}),s.jsx(Te,{children:Dc.map(l=>s.jsx(B,{value:l.value,children:l.label},l.value))})]})]}),s.jsxs("div",{className:"cj-space-y-1",children:[s.jsx(q,{className:"cj-text-xs",children:e("theme_font_size")}),s.jsx(he,{type:"number",min:12,max:24,value:t.fontSizeBase??"",onChange:l=>i({fontSizeBase:l.target.value?Number(l.target.value):void 0}),placeholder:"16",className:"cj-h-9 cj-text-xs"})]})]}),s.jsxs("section",{className:"cj-space-y-3",children:[s.jsx("h4",{className:"cj-text-xs cj-font-semibold cj-uppercase cj-tracking-wide cj-text-muted-foreground",children:e("theme_shape_spacing")}),s.jsxs("div",{className:"cj-space-y-1",children:[s.jsx(q,{className:"cj-text-xs",children:e("theme_border_radius")}),s.jsx(he,{type:"number",step:"0.125",min:0,max:2,value:t.borderRadius??"",onChange:l=>i({borderRadius:l.target.value?Number(l.target.value):void 0}),placeholder:"0.75",className:"cj-h-9 cj-text-xs"})]}),s.jsxs("div",{className:"cj-space-y-1",children:[s.jsx(q,{className:"cj-text-xs",children:e("theme_spacing")}),s.jsxs(Oe,{value:t.spacing||void 0,onValueChange:l=>i({spacing:l}),children:[s.jsx(De,{className:"cj-h-9 cj-text-xs",children:s.jsx(Ae,{placeholder:e("theme_spacing_cozy_default")})}),s.jsxs(Te,{children:[s.jsx(B,{value:"compact",children:e("theme_spacing_compact")}),s.jsx(B,{value:"cozy",children:e("theme_spacing_cozy")}),s.jsx(B,{value:"spacious",children:e("theme_spacing_spacious")})]})]})]})]}),s.jsxs("section",{className:"cj-space-y-2",children:[s.jsx("h4",{className:"cj-text-xs cj-font-semibold cj-uppercase cj-tracking-wide cj-text-muted-foreground",children:e("theme_live_preview")}),s.jsx("div",{className:"jb-widget-root jb-themed cj-rounded-lg cj-border cj-border-border cj-bg-background cj-text-foreground",style:{...c,padding:"var(--claims-journey-spacing, 16px)"},children:s.jsxs("div",{className:"cj-rounded-lg cj-border cj-border-border cj-bg-card cj-text-foreground",style:{padding:"var(--claims-journey-spacing, 16px)",display:"flex",flexDirection:"column",gap:"calc(var(--claims-journey-spacing, 16px) / 2)"},children:[s.jsx("h3",{className:"cj-m-0 cj-text-lg cj-font-semibold",style:{fontFamily:"var(--claims-journey-font-heading)"},children:e("theme_heading_sample")}),s.jsx("p",{className:"cj-m-0 cj-text-sm cj-text-muted-foreground",style:{fontFamily:"var(--claims-journey-font-body)"},children:e("theme_body_sample")}),s.jsx("input",{className:"cj-w-full cj-border cj-border-input cj-bg-background cj-text-foreground cj-text-sm cj-px-3 cj-rounded-md",style:{fontFamily:"var(--claims-journey-font-body)",borderRadius:"var(--claims-journey-radius)",minHeight:"calc(var(--claims-journey-spacing, 16px) * 2 + 16px)"},placeholder:e("theme_input_sample"),readOnly:!0}),s.jsx("button",{type:"button",className:"cj-bg-primary cj-text-primary-foreground cj-text-sm cj-font-medium cj-self-start cj-cursor-default",style:{fontFamily:"var(--claims-journey-font-body)",borderRadius:"var(--claims-journey-radius)",padding:"calc(var(--claims-journey-spacing, 16px) / 2) var(--claims-journey-spacing, 16px)",border:"none"},children:e("theme_primary_action")})]})})]})]})]})})]})}const _s="cj-theme-portal-vars",gs="data-cj-themed-portals";let ao=0;const iw=["[data-radix-popper-content-wrapper]","[data-radix-popper-content-wrapper] *",'[role="dialog"]','[role="alertdialog"]',"[data-vaul-drawer]","[data-sonner-toaster]"].map(e=>`html[${gs}="true"] ${e}`).join(`,
|
|
299
|
-
`);function
|
|
297
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return g.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},xy=cu,vy=lu,yu=du,xu=uu,vu=_u,bu=ju,wu=mu,Nu=hu;const by=xy,wy=vy,Su=g.forwardRef(({className:e,...t},n)=>s.jsx(yu,{className:ne("cj-fixed cj-inset-0 cj-z-50 cj-bg-black/80 data-[state=open]:cj-animate-in data-[state=closed]:cj-animate-out data-[state=closed]:cj-fade-out-0 data-[state=open]:cj-fade-in-0",e),...t,ref:n}));Su.displayName=yu.displayName;const Cu=g.forwardRef(({className:e,...t},n)=>s.jsxs(wy,{children:[s.jsx(Su,{}),s.jsx(xu,{ref:n,className:ne("cj-fixed cj-left-[50%] cj-top-[50%] cj-z-50 cj-grid cj-w-full cj-max-w-lg cj-translate-x-[-50%] cj-translate-y-[-50%] cj-gap-4 cj-border cj-bg-background cj-p-6 cj-shadow-lg cj-duration-200 data-[state=open]:cj-animate-in data-[state=closed]:cj-animate-out data-[state=closed]:cj-fade-out-0 data-[state=open]:cj-fade-in-0 data-[state=closed]:cj-zoom-out-95 data-[state=open]:cj-zoom-in-95 data-[state=closed]:cj-slide-out-to-left-1/2 data-[state=closed]:cj-slide-out-to-top-[48%] data-[state=open]:cj-slide-in-from-left-1/2 data-[state=open]:cj-slide-in-from-top-[48%] sm:cj-rounded-lg",e),...t})]}));Cu.displayName=xu.displayName;const ku=({className:e,...t})=>s.jsx("div",{className:ne("cj-flex cj-flex-col cj-space-y-2 cj-text-center sm:cj-text-left",e),...t});ku.displayName="AlertDialogHeader";const Pu=({className:e,...t})=>s.jsx("div",{className:ne("cj-flex cj-flex-col-reverse sm:cj-flex-row sm:cj-justify-end sm:cj-space-x-2",e),...t});Pu.displayName="AlertDialogFooter";const Eu=g.forwardRef(({className:e,...t},n)=>s.jsx(wu,{ref:n,className:ne("cj-text-lg cj-font-semibold",e),...t}));Eu.displayName=wu.displayName;const Mu=g.forwardRef(({className:e,...t},n)=>s.jsx(Nu,{ref:n,className:ne("cj-text-sm cj-text-muted-foreground",e),...t}));Mu.displayName=Nu.displayName;const Du=g.forwardRef(({className:e,...t},n)=>s.jsx(vu,{ref:n,className:ne(Cs(),e),...t}));Du.displayName=vu.displayName;const Tu=g.forwardRef(({className:e,...t},n)=>s.jsx(bu,{ref:n,className:ne(Cs({variant:"outline"}),"cj-mt-2 sm:cj-mt-0",e),...t}));Tu.displayName=bu.displayName;function $r({open:e,onOpenChange:t,title:n,description:r,confirmLabel:o,cancelLabel:a,destructive:i=!0,onConfirm:c}){const{t:l}=ve();return s.jsx(by,{open:e,onOpenChange:t,children:s.jsxs(Cu,{children:[s.jsxs(ku,{children:[s.jsx(Eu,{children:n??l("fc_confirm_title")}),s.jsx(Mu,{children:r})]}),s.jsxs(Pu,{children:[s.jsx(Tu,{children:a??l("cancel")}),s.jsx(Du,{onClick:c,className:i?"cj-bg-destructive cj-text-destructive-foreground hover:cj-bg-destructive/90":void 0,children:o??l("delete")})]})]})})}function Ny({readOnly:e=!1}){const{t}=ve(),{formConfig:n,activeStepId:r,setActiveStep:o,addStep:a,deleteStep:i,moveStep:c}=pt(),[l,d]=y.useState(null);return s.jsxs("div",{className:"cj-flex cj-flex-col cj-h-full cj-bg-card",children:[s.jsxs("div",{className:"cj-p-4 cj-border-b cj-flex cj-items-center cj-justify-between",children:[s.jsx("h2",{className:"cj-text-sm cj-font-semibold",children:t("fc_form_steps")}),!e&&s.jsxs(te,{size:"sm",variant:"outline",onClick:()=>a(),children:[s.jsx(Et,{className:"cj-h-3.5 cj-w-3.5 cj-mr-1"}),t("fc_add_step")]})]}),s.jsx(qt,{className:"cj-flex-1 cj-min-w-0",children:s.jsxs("div",{className:"cj-p-3 cj-space-y-2 cj-min-w-0",children:[n.steps.map((u,p)=>{const f=u.step_id===r,m=u.rows.reduce((_,h)=>_+h.field_ids.length,0);return s.jsx("div",{onClick:()=>o(u.step_id),className:`cj-rounded-xl cj-border-2 cj-p-3 cj-cursor-pointer cj-transition-colors ${f?"cj-border-primary cj-bg-primary/5":"cj-border-border cj-bg-card hover:cj-border-primary/40"}`,children:s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[s.jsx("div",{className:`cj-h-7 cj-w-7 cj-rounded-full cj-flex cj-items-center cj-justify-center cj-text-xs cj-font-bold cj-shrink-0 ${f?"cj-bg-primary cj-text-primary-foreground":"cj-bg-muted cj-text-muted-foreground"}`,children:p+1}),s.jsxs("div",{className:"cj-flex-1 cj-min-w-0",children:[s.jsx("div",{className:"cj-text-sm cj-font-semibold cj-truncate",children:u.title||t("fc_step_untitled")}),s.jsx("div",{className:"cj-text-[11px] cj-text-muted-foreground",children:t("fc_step_meta",{rows:u.rows.length,fields:m})})]}),!e&&f&&s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-0.5",children:[s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-6 cj-w-6",disabled:p===0,onClick:_=>{_.stopPropagation(),c(u.step_id,"up")},children:s.jsx(_o,{className:"cj-h-3 cj-w-3"})}),s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-6 cj-w-6",disabled:p===n.steps.length-1,onClick:_=>{_.stopPropagation(),c(u.step_id,"down")},children:s.jsx(Ht,{className:"cj-h-3 cj-w-3"})}),s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-6 cj-w-6",onClick:_=>{_.stopPropagation(),d(u.step_id)},children:s.jsx(Fn,{className:"cj-h-3 cj-w-3 cj-text-destructive"})})]})]})},u.step_id)}),n.steps.length===0&&s.jsxs("div",{className:"cj-py-12 cj-text-center cj-text-xs cj-text-muted-foreground",children:[t("fc_no_steps"),!e&&s.jsxs(s.Fragment,{children:[s.jsx("br",{}),t("fc_no_steps_hint_click")," ",s.jsxs("strong",{children:["+ ",t("fc_add_step")]})," ",t("fc_no_steps_hint_to_begin")]})]})]})}),s.jsx($r,{open:l!==null,onOpenChange:u=>!u&&d(null),description:t("fc_confirm_delete_step"),onConfirm:()=>{l&&i(l),d(null)}})]})}const pe=g.forwardRef(({className:e,type:t,...n},r)=>s.jsx("input",{type:t,className:ne("cj-flex cj-h-12 cj-w-full cj-rounded-xl cj-border cj-border-border/40 cj-bg-muted/50 cj-px-3 cj-py-2 cj-text-base cj-shadow-none cj-ring-offset-background file:cj-border-0 file:cj-bg-transparent file:cj-text-sm file:cj-font-medium file:cj-text-foreground placeholder:cj-text-muted-foreground focus-visible:cj-outline-none focus-visible:cj-ring-2 focus-visible:cj-ring-ring focus-visible:cj-ring-offset-2 disabled:cj-cursor-not-allowed disabled:cj-opacity-50 md:cj-text-sm",e),ref:r,...n}));pe.displayName="Input";var Sy=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Cy=Sy.reduce((e,t)=>{const n=Oo(`Primitive.${t}`),r=g.forwardRef((o,a)=>{const{asChild:i,...c}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(l,{...c,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),ky="Label",Ru=g.forwardRef((e,t)=>s.jsx(Cy.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Ru.displayName=ky;var Au=Ru;const Py=Rr("cj-text-sm cj-font-medium cj-leading-none peer-disabled:cj-cursor-not-allowed peer-disabled:cj-opacity-70"),Y=g.forwardRef(({className:e,...t},n)=>s.jsx(Au,{ref:n,className:ne(Py(),e),...t}));Y.displayName=Au.displayName;const Ey=["top","right","bottom","left"],hn=Math.min,ft=Math.max,bo=Math.round,no=Math.floor,Bt=e=>({x:e,y:e}),My={left:"right",right:"left",bottom:"top",top:"bottom"},Dy={start:"end",end:"start"};function ts(e,t,n){return ft(e,hn(t,n))}function nn(e,t){return typeof e=="function"?e(t):e}function rn(e){return e.split("-")[0]}function cr(e){return e.split("-")[1]}function Us(e){return e==="x"?"y":"x"}function Gs(e){return e==="y"?"height":"width"}const Ty=new Set(["top","bottom"]);function Ft(e){return Ty.has(rn(e))?"y":"x"}function Xs(e){return Us(Ft(e))}function Ry(e,t,n){n===void 0&&(n=!1);const r=cr(e),o=Xs(e),a=Gs(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=wo(i)),[i,wo(i)]}function Ay(e){const t=wo(e);return[ns(e),t,ns(t)]}function ns(e){return e.replace(/start|end/g,t=>Dy[t])}const yc=["left","right"],xc=["right","left"],Oy=["top","bottom"],zy=["bottom","top"];function Iy(e,t,n){switch(e){case"top":case"bottom":return n?t?xc:yc:t?yc:xc;case"left":case"right":return t?Oy:zy;default:return[]}}function Wy(e,t,n,r){const o=cr(e);let a=Iy(rn(e),n==="start",r);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(ns)))),a}function wo(e){return e.replace(/left|right|bottom|top/g,t=>My[t])}function Fy(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ou(e){return typeof e!="number"?Fy(e):{top:e,right:e,bottom:e,left:e}}function No(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function vc(e,t,n){let{reference:r,floating:o}=e;const a=Ft(t),i=Xs(t),c=Gs(i),l=rn(t),d=a==="y",u=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,f=r[c]/2-o[c]/2;let m;switch(l){case"top":m={x:u,y:r.y-o.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:p};break;case"left":m={x:r.x-o.width,y:p};break;default:m={x:r.x,y:r.y}}switch(cr(t)){case"start":m[i]-=f*(n&&d?-1:1);break;case"end":m[i]+=f*(n&&d?-1:1);break}return m}async function $y(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:i,elements:c,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:f=!1,padding:m=0}=nn(t,e),_=Ou(m),j=c[f?p==="floating"?"reference":"floating":p],v=No(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(j)))==null||n?j:j.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:d,rootBoundary:u,strategy:l})),b=p==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),N=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},S=No(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:b,offsetParent:w,strategy:l}):b);return{top:(v.top-S.top+_.top)/N.y,bottom:(S.bottom-v.bottom+_.bottom)/N.y,left:(v.left-S.left+_.left)/N.x,right:(S.right-v.right+_.right)/N.x}}const Ly=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,c=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:p}=vc(d,r,l),f=r,m={},_=0;for(let j=0;j<c.length;j++){var h;const{name:v,fn:b}=c[j],{x:w,y:N,data:S,reset:x}=await b({x:u,y:p,initialPlacement:r,placement:f,strategy:o,middlewareData:m,rects:d,platform:{...i,detectOverflow:(h=i.detectOverflow)!=null?h:$y},elements:{reference:e,floating:t}});u=w??u,p=N??p,m={...m,[v]:{...m[v],...S}},x&&_<=50&&(_++,typeof x=="object"&&(x.placement&&(f=x.placement),x.rects&&(d=x.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:u,y:p}=vc(d,f,l)),j=-1)}return{x:u,y:p,placement:f,strategy:o,middlewareData:m}},By=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:c,middlewareData:l}=t,{element:d,padding:u=0}=nn(e,t)||{};if(d==null)return{};const p=Ou(u),f={x:n,y:r},m=Xs(o),_=Gs(m),h=await i.getDimensions(d),j=m==="y",v=j?"top":"left",b=j?"bottom":"right",w=j?"clientHeight":"clientWidth",N=a.reference[_]+a.reference[m]-f[m]-a.floating[_],S=f[m]-a.reference[m],x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let C=x?x[w]:0;(!C||!await(i.isElement==null?void 0:i.isElement(x)))&&(C=c.floating[w]||a.floating[_]);const E=N/2-S/2,M=C/2-h[_]/2-1,P=hn(p[v],M),T=hn(p[b],M),k=P,z=C-h[_]-T,D=C/2-h[_]/2+E,W=ts(k,D,z),O=!l.arrow&&cr(o)!=null&&D!==W&&a.reference[_]/2-(D<k?P:T)-h[_]/2<0,$=O?D<k?D-k:D-z:0;return{[m]:f[m]+$,data:{[m]:W,centerOffset:D-W-$,...O&&{alignmentOffset:$}},reset:O}}}),Hy=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:c,platform:l,elements:d}=t,{mainAxis:u=!0,crossAxis:p=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:h=!0,...j}=nn(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const v=rn(o),b=Ft(c),w=rn(c)===c,N=await(l.isRTL==null?void 0:l.isRTL(d.floating)),S=f||(w||!h?[wo(c)]:Ay(c)),x=_!=="none";!f&&x&&S.push(...Wy(c,h,_,N));const C=[c,...S],E=await l.detectOverflow(t,j),M=[];let P=((r=a.flip)==null?void 0:r.overflows)||[];if(u&&M.push(E[v]),p){const D=Ry(o,i,N);M.push(E[D[0]],E[D[1]])}if(P=[...P,{placement:o,overflows:M}],!M.every(D=>D<=0)){var T,k;const D=(((T=a.flip)==null?void 0:T.index)||0)+1,W=C[D];if(W&&(!(p==="alignment"?b!==Ft(W):!1)||P.every(L=>Ft(L.placement)===b?L.overflows[0]>0:!0)))return{data:{index:D,overflows:P},reset:{placement:W}};let O=(k=P.filter($=>$.overflows[0]<=0).sort(($,L)=>$.overflows[1]-L.overflows[1])[0])==null?void 0:k.placement;if(!O)switch(m){case"bestFit":{var z;const $=(z=P.filter(L=>{if(x){const R=Ft(L.placement);return R===b||R==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(R=>R>0).reduce((R,X)=>R+X,0)]).sort((L,R)=>L[1]-R[1])[0])==null?void 0:z[0];$&&(O=$);break}case"initialPlacement":O=c;break}if(o!==O)return{reset:{placement:O}}}return{}}}};function bc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function wc(e){return Ey.some(t=>e[t]>=0)}const qy=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...a}=nn(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...a,elementContext:"reference"}),c=bc(i,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:wc(c)}}}case"escaped":{const i=await r.detectOverflow(t,{...a,altBoundary:!0}),c=bc(i,n.floating);return{data:{escapedOffsets:c,escaped:wc(c)}}}default:return{}}}}},zu=new Set(["left","top"]);async function Yy(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=rn(n),c=cr(n),l=Ft(n)==="y",d=zu.has(i)?-1:1,u=a&&l?-1:1,p=nn(t,e);let{mainAxis:f,crossAxis:m,alignmentAxis:_}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof _=="number"&&(m=c==="end"?_*-1:_),l?{x:m*u,y:f*d}:{x:f*d,y:m*u}}const Vy=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:c}=t,l=await Yy(t,e);return i===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},Uy=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:i=!0,crossAxis:c=!1,limiter:l={fn:v=>{let{x:b,y:w}=v;return{x:b,y:w}}},...d}=nn(e,t),u={x:n,y:r},p=await a.detectOverflow(t,d),f=Ft(rn(o)),m=Us(f);let _=u[m],h=u[f];if(i){const v=m==="y"?"top":"left",b=m==="y"?"bottom":"right",w=_+p[v],N=_-p[b];_=ts(w,_,N)}if(c){const v=f==="y"?"top":"left",b=f==="y"?"bottom":"right",w=h+p[v],N=h-p[b];h=ts(w,h,N)}const j=l.fn({...t,[m]:_,[f]:h});return{...j,data:{x:j.x-n,y:j.y-r,enabled:{[m]:i,[f]:c}}}}}},Gy=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:c=0,mainAxis:l=!0,crossAxis:d=!0}=nn(e,t),u={x:n,y:r},p=Ft(o),f=Us(p);let m=u[f],_=u[p];const h=nn(c,t),j=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const w=f==="y"?"height":"width",N=a.reference[f]-a.floating[w]+j.mainAxis,S=a.reference[f]+a.reference[w]-j.mainAxis;m<N?m=N:m>S&&(m=S)}if(d){var v,b;const w=f==="y"?"width":"height",N=zu.has(rn(o)),S=a.reference[p]-a.floating[w]+(N&&((v=i.offset)==null?void 0:v[p])||0)+(N?0:j.crossAxis),x=a.reference[p]+a.reference[w]+(N?0:((b=i.offset)==null?void 0:b[p])||0)-(N?j.crossAxis:0);_<S?_=S:_>x&&(_=x)}return{[f]:m,[p]:_}}}},Xy=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:c}=t,{apply:l=()=>{},...d}=nn(e,t),u=await i.detectOverflow(t,d),p=rn(o),f=cr(o),m=Ft(o)==="y",{width:_,height:h}=a.floating;let j,v;p==="top"||p==="bottom"?(j=p,v=f===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(v=p,j=f==="end"?"top":"bottom");const b=h-u.top-u.bottom,w=_-u.left-u.right,N=hn(h-u[j],b),S=hn(_-u[v],w),x=!t.middlewareData.shift;let C=N,E=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=b),x&&!f){const P=ft(u.left,0),T=ft(u.right,0),k=ft(u.top,0),z=ft(u.bottom,0);m?E=_-2*(P!==0||T!==0?P+T:ft(u.left,u.right)):C=h-2*(k!==0||z!==0?k+z:ft(u.top,u.bottom))}await l({...t,availableWidth:E,availableHeight:C});const M=await i.getDimensions(c.floating);return _!==M.width||h!==M.height?{reset:{rects:!0}}:{}}}};function Zo(){return typeof window<"u"}function lr(e){return Iu(e)?(e.nodeName||"").toLowerCase():"#document"}function mt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Gt(e){var t;return(t=(Iu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Iu(e){return Zo()?e instanceof Node||e instanceof mt(e).Node:!1}function Mt(e){return Zo()?e instanceof Element||e instanceof mt(e).Element:!1}function Yt(e){return Zo()?e instanceof HTMLElement||e instanceof mt(e).HTMLElement:!1}function Nc(e){return!Zo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof mt(e).ShadowRoot}const Ky=new Set(["inline","contents"]);function Lr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Dt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Ky.has(o)}const Jy=new Set(["table","td","th"]);function Qy(e){return Jy.has(lr(e))}const Zy=[":popover-open",":modal"];function ea(e){return Zy.some(t=>{try{return e.matches(t)}catch{return!1}})}const ex=["transform","translate","scale","rotate","perspective"],tx=["transform","translate","scale","rotate","perspective","filter"],nx=["paint","layout","strict","content"];function Ks(e){const t=Js(),n=Mt(e)?Dt(e):e;return ex.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||tx.some(r=>(n.willChange||"").includes(r))||nx.some(r=>(n.contain||"").includes(r))}function rx(e){let t=_n(e);for(;Yt(t)&&!rr(t);){if(Ks(t))return t;if(ea(t))return null;t=_n(t)}return null}function Js(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ox=new Set(["html","body","#document"]);function rr(e){return ox.has(lr(e))}function Dt(e){return mt(e).getComputedStyle(e)}function ta(e){return Mt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _n(e){if(lr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Nc(e)&&e.host||Gt(e);return Nc(t)?t.host:t}function Wu(e){const t=_n(e);return rr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Yt(t)&&Lr(t)?t:Wu(t)}function Mr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Wu(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),i=mt(o);if(a){const c=rs(i);return t.concat(i,i.visualViewport||[],Lr(o)?o:[],c&&n?Mr(c):[])}return t.concat(o,Mr(o,[],n))}function rs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Fu(e){const t=Dt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Yt(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,c=bo(n)!==a||bo(r)!==i;return c&&(n=a,r=i),{width:n,height:r,$:c}}function Qs(e){return Mt(e)?e:e.contextElement}function er(e){const t=Qs(e);if(!Yt(t))return Bt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Fu(t);let i=(a?bo(n.width):n.width)/r,c=(a?bo(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const ax=Bt(0);function $u(e){const t=mt(e);return!Js()||!t.visualViewport?ax:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sx(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==mt(e)?!1:t}function On(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Qs(e);let i=Bt(1);t&&(r?Mt(r)&&(i=er(r)):i=er(e));const c=sx(a,n,r)?$u(a):Bt(0);let l=(o.left+c.x)/i.x,d=(o.top+c.y)/i.y,u=o.width/i.x,p=o.height/i.y;if(a){const f=mt(a),m=r&&Mt(r)?mt(r):r;let _=f,h=rs(_);for(;h&&r&&m!==_;){const j=er(h),v=h.getBoundingClientRect(),b=Dt(h),w=v.left+(h.clientLeft+parseFloat(b.paddingLeft))*j.x,N=v.top+(h.clientTop+parseFloat(b.paddingTop))*j.y;l*=j.x,d*=j.y,u*=j.x,p*=j.y,l+=w,d+=N,_=mt(h),h=rs(_)}}return No({width:u,height:p,x:l,y:d})}function na(e,t){const n=ta(e).scrollLeft;return t?t.left+n:On(Gt(e)).left+n}function Lu(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-na(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function ix(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",i=Gt(r),c=t?ea(t.floating):!1;if(r===i||c&&a)return n;let l={scrollLeft:0,scrollTop:0},d=Bt(1);const u=Bt(0),p=Yt(r);if((p||!p&&!a)&&((lr(r)!=="body"||Lr(i))&&(l=ta(r)),Yt(r))){const m=On(r);d=er(r),u.x=m.x+r.clientLeft,u.y=m.y+r.clientTop}const f=i&&!p&&!a?Lu(i,l):Bt(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-l.scrollLeft*d.x+u.x+f.x,y:n.y*d.y-l.scrollTop*d.y+u.y+f.y}}function cx(e){return Array.from(e.getClientRects())}function lx(e){const t=Gt(e),n=ta(e),r=e.ownerDocument.body,o=ft(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=ft(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+na(e);const c=-n.scrollTop;return Dt(r).direction==="rtl"&&(i+=ft(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:c}}const Sc=25;function dx(e,t){const n=mt(e),r=Gt(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,c=0,l=0;if(o){a=o.width,i=o.height;const u=Js();(!u||u&&t==="fixed")&&(c=o.offsetLeft,l=o.offsetTop)}const d=na(r);if(d<=0){const u=r.ownerDocument,p=u.body,f=getComputedStyle(p),m=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,_=Math.abs(r.clientWidth-p.clientWidth-m);_<=Sc&&(a-=_)}else d<=Sc&&(a+=d);return{width:a,height:i,x:c,y:l}}const ux=new Set(["absolute","fixed"]);function fx(e,t){const n=On(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Yt(e)?er(e):Bt(1),i=e.clientWidth*a.x,c=e.clientHeight*a.y,l=o*a.x,d=r*a.y;return{width:i,height:c,x:l,y:d}}function Cc(e,t,n){let r;if(t==="viewport")r=dx(e,n);else if(t==="document")r=lx(Gt(e));else if(Mt(t))r=fx(t,n);else{const o=$u(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return No(r)}function Bu(e,t){const n=_n(e);return n===t||!Mt(n)||rr(n)?!1:Dt(n).position==="fixed"||Bu(n,t)}function mx(e,t){const n=t.get(e);if(n)return n;let r=Mr(e,[],!1).filter(c=>Mt(c)&&lr(c)!=="body"),o=null;const a=Dt(e).position==="fixed";let i=a?_n(e):e;for(;Mt(i)&&!rr(i);){const c=Dt(i),l=Ks(i);!l&&c.position==="fixed"&&(o=null),(a?!l&&!o:!l&&c.position==="static"&&!!o&&ux.has(o.position)||Lr(i)&&!l&&Bu(e,i))?r=r.filter(u=>u!==i):o=c,i=_n(i)}return t.set(e,r),r}function px(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?ea(t)?[]:mx(t,this._c):[].concat(n),r],c=i[0],l=i.reduce((d,u)=>{const p=Cc(t,u,o);return d.top=ft(p.top,d.top),d.right=hn(p.right,d.right),d.bottom=hn(p.bottom,d.bottom),d.left=ft(p.left,d.left),d},Cc(t,c,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function hx(e){const{width:t,height:n}=Fu(e);return{width:t,height:n}}function _x(e,t,n){const r=Yt(t),o=Gt(t),a=n==="fixed",i=On(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const l=Bt(0);function d(){l.x=na(o)}if(r||!r&&!a)if((lr(t)!=="body"||Lr(o))&&(c=ta(t)),r){const m=On(t,!0,a,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else o&&d();a&&!r&&o&&d();const u=o&&!r&&!a?Lu(o,c):Bt(0),p=i.left+c.scrollLeft-l.x-u.x,f=i.top+c.scrollTop-l.y-u.y;return{x:p,y:f,width:i.width,height:i.height}}function za(e){return Dt(e).position==="static"}function kc(e,t){if(!Yt(e)||Dt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Gt(e)===n&&(n=n.ownerDocument.body),n}function Hu(e,t){const n=mt(e);if(ea(e))return n;if(!Yt(e)){let o=_n(e);for(;o&&!rr(o);){if(Mt(o)&&!za(o))return o;o=_n(o)}return n}let r=kc(e,t);for(;r&&Qy(r)&&za(r);)r=kc(r,t);return r&&rr(r)&&za(r)&&!Ks(r)?n:r||rx(e)||n}const gx=async function(e){const t=this.getOffsetParent||Hu,n=this.getDimensions,r=await n(e.floating);return{reference:_x(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function jx(e){return Dt(e).direction==="rtl"}const yx={convertOffsetParentRelativeRectToViewportRelativeRect:ix,getDocumentElement:Gt,getClippingRect:px,getOffsetParent:Hu,getElementRects:gx,getClientRects:cx,getDimensions:hx,getScale:er,isElement:Mt,isRTL:jx};function qu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xx(e,t){let n=null,r;const o=Gt(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function i(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),a();const d=e.getBoundingClientRect(),{left:u,top:p,width:f,height:m}=d;if(c||t(),!f||!m)return;const _=no(p),h=no(o.clientWidth-(u+f)),j=no(o.clientHeight-(p+m)),v=no(u),w={rootMargin:-_+"px "+-h+"px "+-j+"px "+-v+"px",threshold:ft(0,hn(1,l))||1};let N=!0;function S(x){const C=x[0].intersectionRatio;if(C!==l){if(!N)return i();C?i(!1,C):r=setTimeout(()=>{i(!1,1e-7)},1e3)}C===1&&!qu(d,e.getBoundingClientRect())&&i(),N=!1}try{n=new IntersectionObserver(S,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(e)}return i(!0),a}function vx(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,d=Qs(e),u=o||a?[...d?Mr(d):[],...Mr(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const p=d&&c?xx(d,n):null;let f=-1,m=null;i&&(m=new ResizeObserver(v=>{let[b]=v;b&&b.target===d&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=m)==null||w.observe(t)})),n()}),d&&!l&&m.observe(d),m.observe(t));let _,h=l?On(e):null;l&&j();function j(){const v=On(e);h&&!qu(h,v)&&n(),h=v,_=requestAnimationFrame(j)}return n(),()=>{var v;u.forEach(b=>{o&&b.removeEventListener("scroll",n),a&&b.removeEventListener("resize",n)}),p==null||p(),(v=m)==null||v.disconnect(),m=null,l&&cancelAnimationFrame(_)}}const bx=Vy,wx=Uy,Nx=Hy,Sx=Xy,Cx=qy,Pc=By,kx=Gy,Px=(e,t,n)=>{const r=new Map,o={platform:yx,...n},a={...o.platform,_c:r};return Ly(e,t,{...o,platform:a})};var Ex=typeof document<"u",Mx=function(){},mo=Ex?y.useLayoutEffect:Mx;function So(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!So(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!So(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Yu(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ec(e,t){const n=Yu(e);return Math.round(t*n)/n}function Ia(e){const t=g.useRef(e);return mo(()=>{t.current=e}),t}function Dx(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:c=!0,whileElementsMounted:l,open:d}=e,[u,p]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=g.useState(r);So(f,r)||m(r);const[_,h]=g.useState(null),[j,v]=g.useState(null),b=g.useCallback(L=>{L!==x.current&&(x.current=L,h(L))},[]),w=g.useCallback(L=>{L!==C.current&&(C.current=L,v(L))},[]),N=a||_,S=i||j,x=g.useRef(null),C=g.useRef(null),E=g.useRef(u),M=l!=null,P=Ia(l),T=Ia(o),k=Ia(d),z=g.useCallback(()=>{if(!x.current||!C.current)return;const L={placement:t,strategy:n,middleware:f};T.current&&(L.platform=T.current),Px(x.current,C.current,L).then(R=>{const X={...R,isPositioned:k.current!==!1};D.current&&!So(E.current,X)&&(E.current=X,Ao.flushSync(()=>{p(X)}))})},[f,t,n,T,k]);mo(()=>{d===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,p(L=>({...L,isPositioned:!1})))},[d]);const D=g.useRef(!1);mo(()=>(D.current=!0,()=>{D.current=!1}),[]),mo(()=>{if(N&&(x.current=N),S&&(C.current=S),N&&S){if(P.current)return P.current(N,S,z);z()}},[N,S,z,P,M]);const W=g.useMemo(()=>({reference:x,floating:C,setReference:b,setFloating:w}),[b,w]),O=g.useMemo(()=>({reference:N,floating:S}),[N,S]),$=g.useMemo(()=>{const L={position:n,left:0,top:0};if(!O.floating)return L;const R=Ec(O.floating,u.x),X=Ec(O.floating,u.y);return c?{...L,transform:"translate("+R+"px, "+X+"px)",...Yu(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:X}},[n,c,O.floating,u.x,u.y]);return g.useMemo(()=>({...u,update:z,refs:W,elements:O,floatingStyles:$}),[u,z,W,O,$])}const Tx=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Pc({element:r.current,padding:o}).fn(n):{}:r?Pc({element:r,padding:o}).fn(n):{}}}},Rx=(e,t)=>({...bx(e),options:[e,t]}),Ax=(e,t)=>({...wx(e),options:[e,t]}),Ox=(e,t)=>({...kx(e),options:[e,t]}),zx=(e,t)=>({...Nx(e),options:[e,t]}),Ix=(e,t)=>({...Sx(e),options:[e,t]}),Wx=(e,t)=>({...Cx(e),options:[e,t]}),Fx=(e,t)=>({...Tx(e),options:[e,t]});var $x="Arrow",Vu=g.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return s.jsx(le.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});Vu.displayName=$x;var Lx=Vu;function Zs(e){const[t,n]=g.useState(void 0);return Je(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let i,c;if("borderBoxSize"in a){const l=a.borderBoxSize,d=Array.isArray(l)?l[0]:l;i=d.inlineSize,c=d.blockSize}else i=e.offsetWidth,c=e.offsetHeight;n({width:i,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var ei="Popper",[Uu,ra]=_t(ei),[Bx,Gu]=Uu(ei),Xu=e=>{const{__scopePopper:t,children:n}=e,[r,o]=g.useState(null);return s.jsx(Bx,{scope:t,anchor:r,onAnchorChange:o,children:n})};Xu.displayName=ei;var Ku="PopperAnchor",Ju=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Gu(Ku,n),i=g.useRef(null),c=xe(t,i),l=g.useRef(null);return g.useEffect(()=>{const d=l.current;l.current=(r==null?void 0:r.current)||i.current,d!==l.current&&a.onAnchorChange(l.current)}),r?null:s.jsx(le.div,{...o,ref:c})});Ju.displayName=Ku;var ti="PopperContent",[Hx,qx]=Uu(ti),Qu=g.forwardRef((e,t)=>{var A,H,Q,J,ae,ce;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:p="partial",hideWhenDetached:f=!1,updatePositionStrategy:m="optimized",onPlaced:_,...h}=e,j=Gu(ti,n),[v,b]=g.useState(null),w=xe(t,me=>b(me)),[N,S]=g.useState(null),x=Zs(N),C=(x==null?void 0:x.width)??0,E=(x==null?void 0:x.height)??0,M=r+(a!=="center"?"-"+a:""),P=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},T=Array.isArray(d)?d:[d],k=T.length>0,z={padding:P,boundary:T.filter(Vx),altBoundary:k},{refs:D,floatingStyles:W,placement:O,isPositioned:$,middlewareData:L}=Dx({strategy:"fixed",placement:M,whileElementsMounted:(...me)=>vx(...me,{animationFrame:m==="always"}),elements:{reference:j.anchor},middleware:[Rx({mainAxis:o+E,alignmentAxis:i}),l&&Ax({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Ox():void 0,...z}),l&&zx({...z}),Ix({...z,apply:({elements:me,rects:be,availableWidth:Ue,availableHeight:Qe})=>{const{width:Ze,height:Ie}=be.reference,ct=me.floating.style;ct.setProperty("--radix-popper-available-width",`${Ue}px`),ct.setProperty("--radix-popper-available-height",`${Qe}px`),ct.setProperty("--radix-popper-anchor-width",`${Ze}px`),ct.setProperty("--radix-popper-anchor-height",`${Ie}px`)}}),N&&Fx({element:N,padding:c}),Ux({arrowWidth:C,arrowHeight:E}),f&&Wx({strategy:"referenceHidden",...z})]}),[R,X]=tf(O),de=rt(_);Je(()=>{$&&(de==null||de())},[$,de]);const ie=(A=L.arrow)==null?void 0:A.x,I=(H=L.arrow)==null?void 0:H.y,F=((Q=L.arrow)==null?void 0:Q.centerOffset)!==0,[U,K]=g.useState();return Je(()=>{v&&K(window.getComputedStyle(v).zIndex)},[v]),s.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:$?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[(J=L.transformOrigin)==null?void 0:J.x,(ae=L.transformOrigin)==null?void 0:ae.y].join(" "),...((ce=L.hide)==null?void 0:ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(Hx,{scope:n,placedSide:R,onArrowChange:S,arrowX:ie,arrowY:I,shouldHideArrow:F,children:s.jsx(le.div,{"data-side":R,"data-align":X,...h,ref:w,style:{...h.style,animation:$?void 0:"none"}})})})});Qu.displayName=ti;var Zu="PopperArrow",Yx={top:"bottom",right:"left",bottom:"top",left:"right"},ef=g.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=qx(Zu,r),i=Yx[a.placedSide];return s.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:s.jsx(Lx,{...o,ref:n,style:{...o.style,display:"block"}})})});ef.displayName=Zu;function Vx(e){return e!==null}var Ux=e=>({name:"transformOrigin",options:e,fn(t){var j,v,b;const{placement:n,rects:r,middlewareData:o}=t,i=((j=o.arrow)==null?void 0:j.centerOffset)!==0,c=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[d,u]=tf(n),p={start:"0%",center:"50%",end:"100%"}[u],f=(((v=o.arrow)==null?void 0:v.x)??0)+c/2,m=(((b=o.arrow)==null?void 0:b.y)??0)+l/2;let _="",h="";return d==="bottom"?(_=i?p:`${f}px`,h=`${-l}px`):d==="top"?(_=i?p:`${f}px`,h=`${r.floating.height+l}px`):d==="right"?(_=`${-l}px`,h=i?p:`${m}px`):d==="left"&&(_=`${r.floating.width+l}px`,h=i?p:`${m}px`),{data:{x:_,y:h}}}});function tf(e){const[t,n="center"]=e.split("-");return[t,n]}var nf=Xu,ni=Ju,rf=Qu,of=ef;function Gx(e){const t=Xx(e),n=g.forwardRef((r,o)=>{const{children:a,...i}=r,c=g.Children.toArray(a),l=c.find(Jx);if(l){const d=l.props.children,u=c.map(p=>p===l?g.Children.count(d)>1?g.Children.only(null):g.isValidElement(d)?d.props.children:null:p);return s.jsx(t,{...i,ref:o,children:g.isValidElement(d)?g.cloneElement(d,void 0,u):null})}return s.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function Xx(e){const t=g.forwardRef((n,r)=>{const{children:o,...a}=n;if(g.isValidElement(o)){const i=Zx(o),c=Qx(a,o.props);return o.type!==g.Fragment&&(c.ref=r?Wn(r,i):i),g.cloneElement(o,c)}return g.Children.count(o)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Kx=Symbol("radix.slottable");function Jx(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Kx}function Qx(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...c)=>{const l=a(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Zx(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ri(e){const t=g.useRef({value:e,previous:e});return g.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var af=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ev="VisuallyHidden",tv=g.forwardRef((e,t)=>s.jsx(le.span,{...e,ref:t,style:{...af,...e.style}}));tv.displayName=ev;var nv=[" ","Enter","ArrowUp","ArrowDown"],rv=[" ","Enter"],zn="Select",[oa,aa,ov]=yl(zn),[dr]=_t(zn,[ov,ra]),sa=ra(),[av,yn]=dr(zn),[sv,iv]=dr(zn),sf=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:c,onValueChange:l,dir:d,name:u,autoComplete:p,disabled:f,required:m,form:_}=e,h=sa(t),[j,v]=g.useState(null),[b,w]=g.useState(null),[N,S]=g.useState(!1),x=Ar(d),[C,E]=tn({prop:r,defaultProp:o??!1,onChange:a,caller:zn}),[M,P]=tn({prop:i,defaultProp:c,onChange:l,caller:zn}),T=g.useRef(null),k=j?_||!!j.closest("form"):!0,[z,D]=g.useState(new Set),W=Array.from(z).map(O=>O.props.value).join(";");return s.jsx(nf,{...h,children:s.jsxs(av,{required:m,scope:t,trigger:j,onTriggerChange:v,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:N,onValueNodeHasChildrenChange:S,contentId:Lt(),value:M,onValueChange:P,open:C,onOpenChange:E,dir:x,triggerPointerDownPosRef:T,disabled:f,children:[s.jsx(oa.Provider,{scope:t,children:s.jsx(sv,{scope:e.__scopeSelect,onNativeOptionAdd:g.useCallback(O=>{D($=>new Set($).add(O))},[]),onNativeOptionRemove:g.useCallback(O=>{D($=>{const L=new Set($);return L.delete(O),L})},[]),children:n})}),k?s.jsxs(Df,{"aria-hidden":!0,required:m,tabIndex:-1,name:u,autoComplete:p,value:M,onChange:O=>P(O.target.value),disabled:f,form:_,children:[M===void 0?s.jsx("option",{value:""}):null,Array.from(z)]},W):null]})})};sf.displayName=zn;var cf="SelectTrigger",lf=g.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=sa(n),i=yn(cf,n),c=i.disabled||r,l=xe(t,i.onTriggerChange),d=aa(n),u=g.useRef("touch"),[p,f,m]=Rf(h=>{const j=d().filter(w=>!w.disabled),v=j.find(w=>w.value===i.value),b=Af(j,h,v);b!==void 0&&i.onValueChange(b.value)}),_=h=>{c||(i.onOpenChange(!0),m()),h&&(i.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return s.jsx(ni,{asChild:!0,...a,children:s.jsx(le.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Tf(i.value)?"":void 0,...o,ref:l,onClick:se(o.onClick,h=>{h.currentTarget.focus(),u.current!=="mouse"&&_(h)}),onPointerDown:se(o.onPointerDown,h=>{u.current=h.pointerType;const j=h.target;j.hasPointerCapture(h.pointerId)&&j.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(_(h),h.preventDefault())}),onKeyDown:se(o.onKeyDown,h=>{const j=p.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&f(h.key),!(j&&h.key===" ")&&nv.includes(h.key)&&(_(),h.preventDefault())})})})});lf.displayName=cf;var df="SelectValue",uf=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...c}=e,l=yn(df,n),{onValueNodeHasChildrenChange:d}=l,u=a!==void 0,p=xe(t,l.onValueNodeChange);return Je(()=>{d(u)},[d,u]),s.jsx(le.span,{...c,ref:p,style:{pointerEvents:"none"},children:Tf(l.value)?s.jsx(s.Fragment,{children:i}):a})});uf.displayName=df;var cv="SelectIcon",ff=g.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return s.jsx(le.span,{"aria-hidden":!0,...o,ref:t,children:r||"โผ"})});ff.displayName=cv;var lv="SelectPortal",mf=e=>s.jsx(Go,{asChild:!0,...e});mf.displayName=lv;var In="SelectContent",pf=g.forwardRef((e,t)=>{const n=yn(In,e.__scopeSelect),[r,o]=g.useState();if(Je(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?Ao.createPortal(s.jsx(hf,{scope:e.__scopeSelect,children:s.jsx(oa.Slot,{scope:e.__scopeSelect,children:s.jsx("div",{children:e.children})})}),a):null}return s.jsx(_f,{...e,ref:t})});pf.displayName=In;var Ct=10,[hf,xn]=dr(In),dv="SelectContentImpl",uv=Gx("SelectContent.RemoveScroll"),_f=g.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:c,sideOffset:l,align:d,alignOffset:u,arrowPadding:p,collisionBoundary:f,collisionPadding:m,sticky:_,hideWhenDetached:h,avoidCollisions:j,...v}=e,b=yn(In,n),[w,N]=g.useState(null),[S,x]=g.useState(null),C=xe(t,A=>N(A)),[E,M]=g.useState(null),[P,T]=g.useState(null),k=aa(n),[z,D]=g.useState(!1),W=g.useRef(!1);g.useEffect(()=>{if(w)return Ls(w)},[w]),$s();const O=g.useCallback(A=>{const[H,...Q]=k().map(ce=>ce.ref.current),[J]=Q.slice(-1),ae=document.activeElement;for(const ce of A)if(ce===ae||(ce==null||ce.scrollIntoView({block:"nearest"}),ce===H&&S&&(S.scrollTop=0),ce===J&&S&&(S.scrollTop=S.scrollHeight),ce==null||ce.focus(),document.activeElement!==ae))return},[k,S]),$=g.useCallback(()=>O([E,w]),[O,E,w]);g.useEffect(()=>{z&&$()},[z,$]);const{onOpenChange:L,triggerPointerDownPosRef:R}=b;g.useEffect(()=>{if(w){let A={x:0,y:0};const H=J=>{var ae,ce;A={x:Math.abs(Math.round(J.pageX)-(((ae=R.current)==null?void 0:ae.x)??0)),y:Math.abs(Math.round(J.pageY)-(((ce=R.current)==null?void 0:ce.y)??0))}},Q=J=>{A.x<=10&&A.y<=10?J.preventDefault():w.contains(J.target)||L(!1),document.removeEventListener("pointermove",H),R.current=null};return R.current!==null&&(document.addEventListener("pointermove",H),document.addEventListener("pointerup",Q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",H),document.removeEventListener("pointerup",Q,{capture:!0})}}},[w,L,R]),g.useEffect(()=>{const A=()=>L(!1);return window.addEventListener("blur",A),window.addEventListener("resize",A),()=>{window.removeEventListener("blur",A),window.removeEventListener("resize",A)}},[L]);const[X,de]=Rf(A=>{const H=k().filter(ae=>!ae.disabled),Q=H.find(ae=>ae.ref.current===document.activeElement),J=Af(H,A,Q);J&&setTimeout(()=>J.ref.current.focus())}),ie=g.useCallback((A,H,Q)=>{const J=!W.current&&!Q;(b.value!==void 0&&b.value===H||J)&&(M(A),J&&(W.current=!0))},[b.value]),I=g.useCallback(()=>w==null?void 0:w.focus(),[w]),F=g.useCallback((A,H,Q)=>{const J=!W.current&&!Q;(b.value!==void 0&&b.value===H||J)&&T(A)},[b.value]),U=r==="popper"?os:gf,K=U===os?{side:c,sideOffset:l,align:d,alignOffset:u,arrowPadding:p,collisionBoundary:f,collisionPadding:m,sticky:_,hideWhenDetached:h,avoidCollisions:j}:{};return s.jsx(hf,{scope:n,content:w,viewport:S,onViewportChange:x,itemRefCallback:ie,selectedItem:E,onItemLeave:I,itemTextRefCallback:F,focusSelectedItem:$,selectedItemText:P,position:r,isPositioned:z,searchRef:X,children:s.jsx(Ko,{as:uv,allowPinchZoom:!0,children:s.jsx(Uo,{asChild:!0,trapped:b.open,onMountAutoFocus:A=>{A.preventDefault()},onUnmountAutoFocus:se(o,A=>{var H;(H=b.trigger)==null||H.focus({preventScroll:!0}),A.preventDefault()}),children:s.jsx(Vo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:A=>A.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:s.jsx(U,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:A=>A.preventDefault(),...v,...K,onPlaced:()=>D(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:se(v.onKeyDown,A=>{const H=A.ctrlKey||A.altKey||A.metaKey;if(A.key==="Tab"&&A.preventDefault(),!H&&A.key.length===1&&de(A.key),["ArrowUp","ArrowDown","Home","End"].includes(A.key)){let J=k().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);if(["ArrowUp","End"].includes(A.key)&&(J=J.slice().reverse()),["ArrowUp","ArrowDown"].includes(A.key)){const ae=A.target,ce=J.indexOf(ae);J=J.slice(ce+1)}setTimeout(()=>O(J)),A.preventDefault()}})})})})})})});_f.displayName=dv;var fv="SelectItemAlignedPosition",gf=g.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=yn(In,n),i=xn(In,n),[c,l]=g.useState(null),[d,u]=g.useState(null),p=xe(t,C=>u(C)),f=aa(n),m=g.useRef(!1),_=g.useRef(!0),{viewport:h,selectedItem:j,selectedItemText:v,focusSelectedItem:b}=i,w=g.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&d&&h&&j&&v){const C=a.trigger.getBoundingClientRect(),E=d.getBoundingClientRect(),M=a.valueNode.getBoundingClientRect(),P=v.getBoundingClientRect();if(a.dir!=="rtl"){const ae=P.left-E.left,ce=M.left-ae,me=C.left-ce,be=C.width+me,Ue=Math.max(be,E.width),Qe=window.innerWidth-Ct,Ze=Ja(ce,[Ct,Math.max(Ct,Qe-Ue)]);c.style.minWidth=be+"px",c.style.left=Ze+"px"}else{const ae=E.right-P.right,ce=window.innerWidth-M.right-ae,me=window.innerWidth-C.right-ce,be=C.width+me,Ue=Math.max(be,E.width),Qe=window.innerWidth-Ct,Ze=Ja(ce,[Ct,Math.max(Ct,Qe-Ue)]);c.style.minWidth=be+"px",c.style.right=Ze+"px"}const T=f(),k=window.innerHeight-Ct*2,z=h.scrollHeight,D=window.getComputedStyle(d),W=parseInt(D.borderTopWidth,10),O=parseInt(D.paddingTop,10),$=parseInt(D.borderBottomWidth,10),L=parseInt(D.paddingBottom,10),R=W+O+z+L+$,X=Math.min(j.offsetHeight*5,R),de=window.getComputedStyle(h),ie=parseInt(de.paddingTop,10),I=parseInt(de.paddingBottom,10),F=C.top+C.height/2-Ct,U=k-F,K=j.offsetHeight/2,A=j.offsetTop+K,H=W+O+A,Q=R-H;if(H<=F){const ae=T.length>0&&j===T[T.length-1].ref.current;c.style.bottom="0px";const ce=d.clientHeight-h.offsetTop-h.offsetHeight,me=Math.max(U,K+(ae?I:0)+ce+$),be=H+me;c.style.height=be+"px"}else{const ae=T.length>0&&j===T[0].ref.current;c.style.top="0px";const me=Math.max(F,W+h.offsetTop+(ae?ie:0)+K)+Q;c.style.height=me+"px",h.scrollTop=H-F+h.offsetTop}c.style.margin=`${Ct}px 0`,c.style.minHeight=X+"px",c.style.maxHeight=k+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[f,a.trigger,a.valueNode,c,d,h,j,v,a.dir,r]);Je(()=>w(),[w]);const[N,S]=g.useState();Je(()=>{d&&S(window.getComputedStyle(d).zIndex)},[d]);const x=g.useCallback(C=>{C&&_.current===!0&&(w(),b==null||b(),_.current=!1)},[w,b]);return s.jsx(pv,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:m,onScrollButtonChange:x,children:s.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:s.jsx(le.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});gf.displayName=fv;var mv="SelectPopperPosition",os=g.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Ct,...a}=e,i=sa(n);return s.jsx(rf,{...i,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});os.displayName=mv;var[pv,oi]=dr(In,{}),as="SelectViewport",jf=g.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=xn(as,n),i=oi(as,n),c=xe(t,a.onViewportChange),l=g.useRef(0);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),s.jsx(oa.Slot,{scope:n,children:s.jsx(le.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:se(o.onScroll,d=>{const u=d.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:f}=i;if(f!=null&&f.current&&p){const m=Math.abs(l.current-u.scrollTop);if(m>0){const _=window.innerHeight-Ct*2,h=parseFloat(p.style.minHeight),j=parseFloat(p.style.height),v=Math.max(h,j);if(v<_){const b=v+m,w=Math.min(_,b),N=b-w;p.style.height=w+"px",p.style.bottom==="0px"&&(u.scrollTop=N>0?N:0,p.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});jf.displayName=as;var yf="SelectGroup",[hv,_v]=dr(yf),gv=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Lt();return s.jsx(hv,{scope:n,id:o,children:s.jsx(le.div,{role:"group","aria-labelledby":o,...r,ref:t})})});gv.displayName=yf;var xf="SelectLabel",vf=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=_v(xf,n);return s.jsx(le.div,{id:o.id,...r,ref:t})});vf.displayName=xf;var Co="SelectItem",[jv,bf]=dr(Co),wf=g.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,c=yn(Co,n),l=xn(Co,n),d=c.value===r,[u,p]=g.useState(a??""),[f,m]=g.useState(!1),_=xe(t,b=>{var w;return(w=l.itemRefCallback)==null?void 0:w.call(l,b,r,o)}),h=Lt(),j=g.useRef("touch"),v=()=>{o||(c.onValueChange(r),c.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return s.jsx(jv,{scope:n,value:r,disabled:o,textId:h,isSelected:d,onItemTextChange:g.useCallback(b=>{p(w=>w||((b==null?void 0:b.textContent)??"").trim())},[]),children:s.jsx(oa.ItemSlot,{scope:n,value:r,disabled:o,textValue:u,children:s.jsx(le.div,{role:"option","aria-labelledby":h,"data-highlighted":f?"":void 0,"aria-selected":d&&f,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:_,onFocus:se(i.onFocus,()=>m(!0)),onBlur:se(i.onBlur,()=>m(!1)),onClick:se(i.onClick,()=>{j.current!=="mouse"&&v()}),onPointerUp:se(i.onPointerUp,()=>{j.current==="mouse"&&v()}),onPointerDown:se(i.onPointerDown,b=>{j.current=b.pointerType}),onPointerMove:se(i.onPointerMove,b=>{var w;j.current=b.pointerType,o?(w=l.onItemLeave)==null||w.call(l):j.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:se(i.onPointerLeave,b=>{var w;b.currentTarget===document.activeElement&&((w=l.onItemLeave)==null||w.call(l))}),onKeyDown:se(i.onKeyDown,b=>{var N;((N=l.searchRef)==null?void 0:N.current)!==""&&b.key===" "||(rv.includes(b.key)&&v(),b.key===" "&&b.preventDefault())})})})})});wf.displayName=Co;var br="SelectItemText",Nf=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=yn(br,n),c=xn(br,n),l=bf(br,n),d=iv(br,n),[u,p]=g.useState(null),f=xe(t,v=>p(v),l.onItemTextChange,v=>{var b;return(b=c.itemTextRefCallback)==null?void 0:b.call(c,v,l.value,l.disabled)}),m=u==null?void 0:u.textContent,_=g.useMemo(()=>s.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:h,onNativeOptionRemove:j}=d;return Je(()=>(h(_),()=>j(_)),[h,j,_]),s.jsxs(s.Fragment,{children:[s.jsx(le.span,{id:l.textId,...a,ref:f}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Ao.createPortal(a.children,i.valueNode):null]})});Nf.displayName=br;var Sf="SelectItemIndicator",Cf=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return bf(Sf,n).isSelected?s.jsx(le.span,{"aria-hidden":!0,...r,ref:t}):null});Cf.displayName=Sf;var ss="SelectScrollUpButton",kf=g.forwardRef((e,t)=>{const n=xn(ss,e.__scopeSelect),r=oi(ss,e.__scopeSelect),[o,a]=g.useState(!1),i=xe(t,r.onScrollButtonChange);return Je(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=l.scrollTop>0;a(d)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?s.jsx(Ef,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop-l.offsetHeight)}}):null});kf.displayName=ss;var is="SelectScrollDownButton",Pf=g.forwardRef((e,t)=>{const n=xn(is,e.__scopeSelect),r=oi(is,e.__scopeSelect),[o,a]=g.useState(!1),i=xe(t,r.onScrollButtonChange);return Je(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<d;a(u)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?s.jsx(Ef,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop+l.offsetHeight)}}):null});Pf.displayName=is;var Ef=g.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=xn("SelectScrollButton",n),i=g.useRef(null),c=aa(n),l=g.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return g.useEffect(()=>()=>l(),[l]),Je(()=>{var u;const d=c().find(p=>p.ref.current===document.activeElement);(u=d==null?void 0:d.ref.current)==null||u.scrollIntoView({block:"nearest"})},[c]),s.jsx(le.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:se(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:se(o.onPointerMove,()=>{var d;(d=a.onItemLeave)==null||d.call(a),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:se(o.onPointerLeave,()=>{l()})})}),yv="SelectSeparator",Mf=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return s.jsx(le.div,{"aria-hidden":!0,...r,ref:t})});Mf.displayName=yv;var cs="SelectArrow",xv=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=sa(n),a=yn(cs,n),i=xn(cs,n);return a.open&&i.position==="popper"?s.jsx(of,{...o,...r,ref:t}):null});xv.displayName=cs;var vv="SelectBubbleInput",Df=g.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=g.useRef(null),a=xe(r,o),i=ri(t);return g.useEffect(()=>{const c=o.current;if(!c)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&u){const p=new Event("change",{bubbles:!0});u.call(c,t),c.dispatchEvent(p)}},[i,t]),s.jsx(le.select,{...n,style:{...af,...n.style},ref:a,defaultValue:t})});Df.displayName=vv;function Tf(e){return e===""||e===void 0}function Rf(e){const t=rt(e),n=g.useRef(""),r=g.useRef(0),o=g.useCallback(i=>{const c=n.current+i;t(c),function l(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(c)},[t]),a=g.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function Af(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let i=bv(e,Math.max(a,0));o.length===1&&(i=i.filter(d=>d!==n));const l=i.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function bv(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var wv=sf,Of=lf,Nv=uf,Sv=ff,Cv=mf,zf=pf,kv=jf,If=vf,Wf=wf,Pv=Nf,Ev=Cf,Ff=kf,$f=Pf,Lf=Mf;const ia=y.createContext(null);function ca(){return y.useContext(ia)}const Ae=wv,Oe=Nv,De=g.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(Of,{ref:r,className:ne("cj-flex cj-h-10 cj-w-full cj-items-center cj-justify-between cj-rounded-md cj-border cj-border-input cj-bg-background cj-px-3 cj-py-2 cj-text-sm cj-ring-offset-background placeholder:cj-text-muted-foreground focus:cj-outline-none focus:cj-ring-2 focus:cj-ring-ring focus:cj-ring-offset-2 disabled:cj-cursor-not-allowed disabled:cj-opacity-50 [&>span]:cj-line-clamp-1",e),...n,children:[t,s.jsx(Sv,{asChild:!0,children:s.jsx(Ht,{className:"cj-h-4 cj-w-4 cj-opacity-50"})})]}));De.displayName=Of.displayName;const Bf=g.forwardRef(({className:e,...t},n)=>s.jsx(Ff,{ref:n,className:ne("cj-flex cj-cursor-default cj-items-center cj-justify-center cj-py-1",e),...t,children:s.jsx(_o,{className:"cj-h-4 cj-w-4"})}));Bf.displayName=Ff.displayName;const Hf=g.forwardRef(({className:e,...t},n)=>s.jsx($f,{ref:n,className:ne("cj-flex cj-cursor-default cj-items-center cj-justify-center cj-py-1",e),...t,children:s.jsx(Ht,{className:"cj-h-4 cj-w-4"})}));Hf.displayName=$f.displayName;const Te=g.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>{const a=ca();return s.jsx(Cv,{container:a??void 0,children:s.jsxs(zf,{ref:o,className:ne("cj-relative cj-z-50 cj-max-h-96 cj-min-w-[8rem] cj-overflow-hidden cj-rounded-md cj-border cj-bg-popover cj-text-popover-foreground cj-shadow-md data-[state=open]:cj-animate-in data-[state=closed]:cj-animate-out data-[state=closed]:cj-fade-out-0 data-[state=open]:cj-fade-in-0 data-[state=closed]:cj-zoom-out-95 data-[state=open]:cj-zoom-in-95 data-[side=bottom]:cj-slide-in-from-top-2 data-[side=left]:cj-slide-in-from-right-2 data-[side=right]:cj-slide-in-from-left-2 data-[side=top]:cj-slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:cj-translate-y-1 data-[side=left]:-cj-translate-x-1 data-[side=right]:cj-translate-x-1 data-[side=top]:-cj-translate-y-1",e),position:n,...r,children:[s.jsx(Bf,{}),s.jsx(kv,{className:ne("cj-p-1",n==="popper"&&"cj-h-[var(--radix-select-trigger-height)] cj-w-full cj-min-w-[var(--radix-select-trigger-width)]"),children:t}),s.jsx(Hf,{})]})})});Te.displayName=zf.displayName;const Mv=g.forwardRef(({className:e,...t},n)=>s.jsx(If,{ref:n,className:ne("cj-py-1.5 cj-pl-8 cj-pr-2 cj-text-sm cj-font-semibold",e),...t}));Mv.displayName=If.displayName;const V=g.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(Wf,{ref:r,className:ne("cj-relative cj-flex cj-w-full cj-cursor-default cj-select-none cj-items-center cj-rounded-sm cj-py-1.5 cj-pl-8 cj-pr-2 cj-text-sm cj-outline-none data-[disabled]:cj-pointer-events-none data-[disabled]:cj-opacity-50 focus:cj-bg-accent focus:cj-text-accent-foreground",e),...n,children:[s.jsx("span",{className:"cj-absolute cj-left-2 cj-flex cj-h-3.5 cj-w-3.5 cj-items-center cj-justify-center",children:s.jsx(Ev,{children:s.jsx(ql,{className:"cj-h-4 cj-w-4"})})}),s.jsx(Pv,{children:t})]}));V.displayName=Wf.displayName;const Dv=g.forwardRef(({className:e,...t},n)=>s.jsx(Lf,{ref:n,className:ne("-cj-mx-1 cj-my-1 cj-h-px cj-bg-muted",e),...t}));Dv.displayName=Lf.displayName;const Cr={v1_string:{label:"String",color:"cj-bg-blue-500"},"v2_single_option_select-1":{label:"Single Select",color:"cj-bg-purple-500"},"v2_date-1":{label:"Date",color:"cj-bg-green-500"},"v2_time-1":{label:"Time",color:"cj-bg-lime-500"},"v2_datetime-1":{label:"Date & Time",color:"cj-bg-cyan-500"},"v2_currency-1":{label:"Currency",color:"cj-bg-yellow-500"},v2_single_asset_upload:{label:"Upload",color:"cj-bg-orange-500"},"v2_phone-1":{label:"Phone",color:"cj-bg-teal-500"},"v2_email-1":{label:"Email",color:"cj-bg-rose-500"},v2_address_coordinates:{label:"Location",color:"cj-bg-emerald-500"},"v2_boolean-1":{label:"Boolean",color:"cj-bg-indigo-500"}};function la(e){return Cr[e]||{label:e,color:"cj-bg-muted"}}const ls=Ys,Tv=Vs,qf=g.forwardRef(({className:e,...t},n)=>{const r=ca();return s.jsx(zr,{ref:n,className:ne(r?"cj-absolute cj-inset-0 cj-z-50 cj-bg-black/80 data-[state=open]:cj-animate-in data-[state=closed]:cj-animate-out data-[state=closed]:cj-fade-out-0 data-[state=open]:cj-fade-in-0":"cj-fixed cj-inset-0 cj-z-50 cj-bg-black/80 data-[state=open]:cj-animate-in data-[state=closed]:cj-animate-out data-[state=closed]:cj-fade-out-0 data-[state=open]:cj-fade-in-0",e),...t})});qf.displayName=zr.displayName;const ko=g.forwardRef(({className:e,children:t,...n},r)=>{const o=ca(),a=o?"cj-absolute cj-left-[50%] cj-top-[50%] cj-z-50 cj-grid cj-w-full cj-max-w-lg cj-translate-x-[-50%] cj-translate-y-[-50%] cj-gap-4 cj-border cj-bg-background cj-p-6 cj-shadow-lg cj-duration-200 data-[state=open]:cj-animate-in data-[state=closed]:cj-animate-out data-[state=closed]:cj-fade-out-0 data-[state=open]:cj-fade-in-0 data-[state=closed]:cj-zoom-out-95 data-[state=open]:cj-zoom-in-95 sm:cj-rounded-lg":"cj-fixed cj-left-[50%] cj-top-[50%] cj-z-50 cj-grid cj-w-full cj-max-w-lg cj-translate-x-[-50%] cj-translate-y-[-50%] cj-gap-4 cj-border cj-bg-background cj-p-6 cj-shadow-lg cj-duration-200 data-[state=open]:cj-animate-in data-[state=closed]:cj-animate-out data-[state=closed]:cj-fade-out-0 data-[state=open]:cj-fade-in-0 data-[state=closed]:cj-zoom-out-95 data-[state=open]:cj-zoom-in-95 data-[state=closed]:cj-slide-out-to-left-1/2 data-[state=closed]:cj-slide-out-to-top-[48%] data-[state=open]:cj-slide-in-from-left-1/2 data-[state=open]:cj-slide-in-from-top-[48%] sm:cj-rounded-lg";return s.jsxs(Tv,{container:o??void 0,children:[s.jsx(qf,{}),s.jsxs(Ir,{ref:r,className:ne(a,e),...n,children:[t,s.jsxs(Qo,{className:"cj-absolute cj-right-4 cj-top-4 cj-rounded-sm cj-opacity-70 cj-ring-offset-background cj-transition-opacity data-[state=open]:cj-bg-accent data-[state=open]:cj-text-muted-foreground hover:cj-opacity-100 focus:cj-outline-none focus:cj-ring-2 focus:cj-ring-ring focus:cj-ring-offset-2 disabled:cj-pointer-events-none",children:[s.jsx(Tt,{className:"cj-h-4 cj-w-4"}),s.jsx("span",{className:"cj-sr-only",children:"Close"})]})]})]})});ko.displayName=Ir.displayName;const ai=({className:e,...t})=>s.jsx("div",{className:ne("cj-flex cj-flex-col cj-space-y-1.5 cj-text-center sm:cj-text-left",e),...t});ai.displayName="DialogHeader";const si=({className:e,...t})=>s.jsx("div",{className:ne("cj-flex cj-flex-col-reverse sm:cj-flex-row sm:cj-justify-end sm:cj-space-x-2",e),...t});si.displayName="DialogFooter";const ii=g.forwardRef(({className:e,...t},n)=>s.jsx(Wr,{ref:n,className:ne("cj-text-lg cj-font-semibold cj-leading-none cj-tracking-tight",e),...t}));ii.displayName=Wr.displayName;const Yf=g.forwardRef(({className:e,...t},n)=>s.jsx(Fr,{ref:n,className:ne("cj-text-sm cj-text-muted-foreground",e),...t}));Yf.displayName=Fr.displayName;var da="Switch",[Rv]=_t(da),[Av,Ov]=Rv(da),Vf=g.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:c,value:l="on",onCheckedChange:d,form:u,...p}=e,[f,m]=g.useState(null),_=xe(t,w=>m(w)),h=g.useRef(!1),j=f?u||!!f.closest("form"):!0,[v,b]=tn({prop:o,defaultProp:a??!1,onChange:d,caller:da});return s.jsxs(Av,{scope:n,checked:v,disabled:c,children:[s.jsx(le.button,{type:"button",role:"switch","aria-checked":v,"aria-required":i,"data-state":Kf(v),"data-disabled":c?"":void 0,disabled:c,value:l,...p,ref:_,onClick:se(e.onClick,w=>{b(N=>!N),j&&(h.current=w.isPropagationStopped(),h.current||w.stopPropagation())})}),j&&s.jsx(Xf,{control:f,bubbles:!h.current,name:r,value:l,checked:v,required:i,disabled:c,form:u,style:{transform:"translateX(-100%)"}})]})});Vf.displayName=da;var Uf="SwitchThumb",Gf=g.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=Ov(Uf,n);return s.jsx(le.span,{"data-state":Kf(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Gf.displayName=Uf;var zv="SwitchBubbleInput",Xf=g.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=g.useRef(null),c=xe(i,a),l=ri(n),d=Zs(t);return g.useEffect(()=>{const u=i.current;if(!u)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(l!==n&&m){const _=new Event("click",{bubbles:r});m.call(u,n),u.dispatchEvent(_)}},[l,n,r]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:c,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Xf.displayName=zv;function Kf(e){return e?"checked":"unchecked"}var Jf=Vf,Iv=Gf;const Vt=g.forwardRef(({className:e,...t},n)=>s.jsx(Jf,{className:ne("cj-peer cj-inline-flex cj-h-6 cj-w-11 cj-shrink-0 cj-cursor-pointer cj-items-center cj-rounded-full cj-border-2 cj-border-transparent cj-transition-colors data-[state=checked]:cj-bg-primary data-[state=unchecked]:cj-bg-input focus-visible:cj-outline-none focus-visible:cj-ring-2 focus-visible:cj-ring-ring focus-visible:cj-ring-offset-2 focus-visible:cj-ring-offset-background disabled:cj-cursor-not-allowed disabled:cj-opacity-50",e),...t,ref:n,children:s.jsx(Iv,{className:ne("cj-pointer-events-none cj-block cj-h-5 cj-w-5 cj-rounded-full cj-bg-background cj-shadow-lg cj-ring-0 cj-transition-transform data-[state=checked]:cj-translate-x-5 data-[state=unchecked]:cj-translate-x-0")})}));Vt.displayName=Jf.displayName;var Wv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Fv=Wv.reduce((e,t)=>{const n=Oo(`Primitive.${t}`),r=g.forwardRef((o,a)=>{const{asChild:i,...c}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(l,{...c,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),$v="Separator",Mc="horizontal",Lv=["horizontal","vertical"],Qf=g.forwardRef((e,t)=>{const{decorative:n,orientation:r=Mc,...o}=e,a=Bv(r)?r:Mc,c=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return s.jsx(Fv.div,{"data-orientation":a,...c,...o,ref:t})});Qf.displayName=$v;function Bv(e){return Lv.includes(e)}var Zf=Qf;const Cn=g.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>s.jsx(Zf,{ref:o,decorative:n,orientation:t,className:ne("cj-shrink-0 cj-bg-border",t==="horizontal"?"cj-h-[1px] cj-w-full":"cj-h-full cj-w-[1px]",e),...r}));Cn.displayName=Zf.displayName;const em=[{value:"==",label:"equals"},{value:"!=",label:"not equals"},{value:">",label:"greater than"},{value:"<",label:"less than"},{value:">=",label:"greater or equal"},{value:"<=",label:"less or equal"},{value:"in",label:"contains"},{value:"is_null",label:"is null"},{value:"is_not_null",label:"is not null"}],Po=["is_null","is_not_null"];function Dc(e){const t=Object.keys(e)[0];if(t==="=="||t==="!="){const a=e[t];if(!Array.isArray(a)||a.length!==2)return null;const i=a[0];if(!(i!=null&&i.var))return null;const c=i.var.replace("answers.","");return a[1]===null?{field:c,operator:t==="=="?"is_null":"is_not_null",value:""}:{field:c,operator:t,value:String(a[1])}}if(!em.some(a=>a.value===t))return null;const n=e[t];if(!Array.isArray(n)||n.length!==2)return null;const r=n[0];return r!=null&&r.var?{field:r.var.replace("answers.",""),operator:t,value:String(n[1])}:null}function tr(e){const t={mode:"and",rules:[{field:"",operator:"==",value:""}]};if(!e)return t;const n=Object.keys(e)[0];if(n==="and"||n==="or"){const o=e[n];if(Array.isArray(o)){const a=o.map(Dc).filter(Boolean);if(a.length>0)return{mode:n,rules:a}}return t}const r=Dc(e);return r?{mode:"and",rules:[r]}:t}function ci(e){const t=e.rules.filter(r=>r.field&&(r.value||Po.includes(r.operator)));if(t.length===0)return null;const n=t.map(r=>r.operator==="is_null"?{"==":[{var:`answers.${r.field}`},null]}:r.operator==="is_not_null"?{"!=":[{var:`answers.${r.field}`},null]}:{[r.operator]:[{var:`answers.${r.field}`},r.value]});return n.length===1?n[0]:{[e.mode]:n}}function Hv(){return{field:"",operator:"==",value:""}}function qv({rule:e,availableFields:t,canRemove:n,onChange:r,onRemove:o}){const a=Po.includes(e.operator),i=t.find(l=>l.namespace===e.field),c=i!=null&&i.options&&i.options.length>0?i.options:null;return s.jsxs("div",{className:"cj-flex cj-items-start cj-gap-1.5 cj-group",children:[s.jsxs("div",{className:"cj-flex-1 cj-space-y-1.5",children:[s.jsxs(Ae,{value:e.field,onValueChange:l=>r({field:l,value:""}),children:[s.jsx(De,{className:"cj-h-8 cj-text-xs",children:s.jsx(Oe,{placeholder:"Field"})}),s.jsx(Te,{children:t.map(l=>s.jsx(V,{value:l.namespace,children:l.label},l.namespace))})]}),s.jsxs(Ae,{value:e.operator,onValueChange:l=>r({operator:l,...Po.includes(l)?{value:""}:{}}),children:[s.jsx(De,{className:"cj-h-8 cj-text-xs",children:s.jsx(Oe,{})}),s.jsx(Te,{children:em.map(l=>s.jsx(V,{value:l.value,children:l.label},l.value))})]}),!a&&(c?s.jsxs(Ae,{value:e.value,onValueChange:l=>r({value:l}),children:[s.jsx(De,{className:"cj-h-8 cj-text-xs",children:s.jsx(Oe,{placeholder:"Select value"})}),s.jsx(Te,{children:c.map(l=>s.jsx(V,{value:l.data,children:l.label},l.data))})]}):s.jsx(pe,{className:"cj-h-8 cj-text-xs",placeholder:"Value",value:e.value,onChange:l=>r({value:l.target.value})}))]}),n&&s.jsx(te,{variant:"ghost",size:"icon",className:"cj-h-8 cj-w-8 cj-opacity-0 group-hover:cj-opacity-100 cj-shrink-0 cj-mt-0",onClick:o,children:s.jsx(Tt,{className:"cj-h-3.5 cj-w-3.5"})})]})}function tm({conditions:e,availableFields:t,onChange:n}){const r=()=>{n({...e,mode:e.mode==="and"?"or":"and"})},o=(c,l)=>{const d=e.rules.map((u,p)=>p===c?{...u,...l}:u);n({...e,rules:d})},a=()=>{n({...e,rules:[...e.rules,Hv()]})},i=c=>{n({...e,rules:e.rules.filter((l,d)=>d!==c)})};return s.jsxs("div",{className:"cj-space-y-3",children:[e.rules.length>1&&s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[s.jsx("span",{className:"cj-text-xs cj-text-muted-foreground",children:"Combine with:"}),s.jsx(it,{variant:e.mode==="and"?"default":"outline",className:"cj-cursor-pointer cj-text-[10px]",onClick:r,children:"AND"}),s.jsx(it,{variant:e.mode==="or"?"default":"outline",className:"cj-cursor-pointer cj-text-[10px]",onClick:r,children:"OR"})]}),s.jsx("div",{className:"cj-space-y-3",children:e.rules.map((c,l)=>s.jsxs("div",{children:[l>0&&s.jsx("div",{className:"cj-text-center cj-text-[10px] cj-text-muted-foreground cj-font-medium cj-py-1 cj-uppercase",children:e.mode}),s.jsx(qv,{rule:c,availableFields:t,canRemove:e.rules.length>1,onChange:d=>o(l,d),onRemove:()=>i(l)})]},l))}),s.jsxs(te,{variant:"outline",size:"sm",className:"cj-w-full cj-h-7 cj-text-xs",onClick:a,children:[s.jsx(Et,{className:"cj-h-3 cj-w-3 cj-mr-1"}),"Add condition"]})]})}function nm({fieldId:e,open:t,onOpenChange:n}){const{t:r}=ve(),{formConfig:o,updateField:a,deleteField:i}=pt(),c=y.useMemo(()=>o.fields.find(x=>x.field_id===e)||null,[o.fields,e]),[l,d]=y.useState(c),[u,p]=y.useState(!1);y.useEffect(()=>{d(c)},[c]);const f=y.useMemo(()=>o.fields.filter(x=>x.field_id!==e).map(x=>({namespace:x.namespace,label:x.label,options:x.options||null})),[o.fields,e]);if(!l||!c)return s.jsx(ls,{open:t,onOpenChange:n,children:s.jsx(ko,{children:s.jsx("p",{className:"cj-text-sm cj-text-muted-foreground",children:r("fc_field_no_selected")})})});const m=la(l.schema),_=l.schema==="v2_single_option_select-1",h=l.schema==="v2_boolean-1"||l.widget==="boolean"||l.widget==="switch",j=l.schema==="v2_single_asset_upload"||l.widget==="upload",v=l.schema==="v2_date-1"||l.schema==="v2_datetime-1"||l.widget==="datepicker"||l.widget==="datetimepicker",b=x=>{d(C=>C&&{...C,...x}),a(c.field_id,x)},w=l.options||[],N=l.uploadConfig||{},S=(x,C)=>{const E=ci(C);b({[x]:E})};return s.jsxs(ls,{open:t,onOpenChange:n,children:[s.jsxs(ko,{className:"cj-max-w-2xl cj-overflow-hidden",style:{display:"flex",flexDirection:"column",maxHeight:"85vh",height:"85vh"},children:[s.jsx(ai,{className:"cj-flex-shrink-0",children:s.jsxs(ii,{className:"cj-flex cj-items-center cj-gap-2",children:[r("fc_field_props"),s.jsx(it,{variant:"secondary",className:`${m.color} cj-text-white`,children:m.label})]})}),s.jsx("div",{className:"cj-pl-1 cj-pr-2 cj-overflow-y-scroll",style:{flex:"1 1 0%",minHeight:0,scrollbarWidth:"thin",scrollbarGutter:"stable"},children:s.jsxs("div",{className:"cj-space-y-4 cj-py-2",children:[s.jsxs("div",{className:"cj-grid cj-grid-cols-2 cj-gap-3",children:[s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-xs",children:r("fc_field_label")}),s.jsx(pe,{value:l.label,onChange:x=>b({label:x.target.value}),className:"cj-mt-1"})]}),s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-xs",children:r("fc_field_namespace")}),s.jsx(pe,{value:l.namespace,onChange:x=>b({namespace:x.target.value}),className:"cj-mt-1 cj-font-mono cj-text-sm"})]})]}),s.jsxs("div",{className:"cj-grid cj-grid-cols-2 cj-gap-3",children:[s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-xs",children:r("fc_field_placeholder")}),s.jsx(pe,{value:l.placeholder||"",onChange:x=>b({placeholder:x.target.value||void 0}),className:"cj-mt-1"})]}),s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-xs",children:r("fc_field_help")}),s.jsx(pe,{value:l.helpText||"",onChange:x=>b({helpText:x.target.value||void 0}),className:"cj-mt-1"})]})]}),s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-rounded-lg cj-border cj-p-3",children:[s.jsxs("div",{children:[s.jsx(Y,{children:r("fc_field_required")}),s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r("fc_field_required_hint")})]}),s.jsx(Vt,{checked:!!l.required,onCheckedChange:x=>b({required:x})})]}),s.jsx(Cn,{}),s.jsxs("div",{className:"cj-grid cj-grid-cols-2 cj-gap-3",children:[s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-xs",children:r("fc_field_actor")}),s.jsxs(Ae,{value:l.actor||"customer",onValueChange:x=>b({actor:x}),children:[s.jsx(De,{className:"cj-mt-1",children:s.jsx(Oe,{})}),s.jsxs(Te,{children:[s.jsx(V,{value:"customer",children:r("fc_field_actor_customer")}),s.jsx(V,{value:"operator",children:r("fc_field_actor_operator")})]})]})]}),s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-xs",children:r("fc_field_widget")}),s.jsxs(Ae,{value:l.widget||"auto",onValueChange:x=>b({widget:x==="auto"?void 0:x}),children:[s.jsx(De,{className:"cj-mt-1",children:s.jsx(Oe,{})}),s.jsxs(Te,{children:[s.jsx(V,{value:"auto",children:r("fc_field_widget_auto")}),s.jsx(V,{value:"text",children:r("fc_field_widget_text")}),s.jsx(V,{value:"textarea",children:r("fc_field_widget_textarea")}),s.jsx(V,{value:"select",children:r("fc_field_widget_select")}),s.jsx(V,{value:"radio",children:r("fc_field_widget_radio")}),s.jsx(V,{value:"datepicker",children:r("fc_field_widget_date")}),s.jsx(V,{value:"timepicker",children:r("fc_field_widget_time")}),s.jsx(V,{value:"datetimepicker",children:r("fc_field_widget_datetime")}),s.jsx(V,{value:"currency",children:r("fc_field_widget_currency")}),s.jsx(V,{value:"upload",children:r("fc_field_widget_upload")}),s.jsx(V,{value:"email",children:r("fc_field_widget_email")}),s.jsx(V,{value:"phone",children:r("fc_field_widget_phone")}),s.jsx(V,{value:"location",children:r("fc_field_widget_location")}),s.jsx(V,{value:"boolean",children:r("fc_field_widget_boolean")})]})]})]})]}),v&&s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-rounded-lg cj-border cj-p-3",children:[s.jsxs("div",{children:[s.jsx(Y,{children:r("fc_field_allow_future")}),s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r("fc_field_allow_future_hint")})]}),s.jsx(Vt,{checked:l.allowFuture??l.schema==="v2_datetime-1",onCheckedChange:x=>b({allowFuture:x})})]}),_&&s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-xs",children:r("fc_field_display_style")}),s.jsxs(Ae,{value:l.ui_variant||"auto",onValueChange:x=>b({ui_variant:x==="auto"?void 0:x}),children:[s.jsx(De,{className:"cj-mt-1",children:s.jsx(Oe,{})}),s.jsxs(Te,{children:[s.jsx(V,{value:"auto",children:r("fc_field_display_auto")}),s.jsx(V,{value:"radio",children:r("fc_field_display_radio")}),s.jsx(V,{value:"radio-horizontal",children:r("fc_field_display_radio_horizontal")}),s.jsx(V,{value:"dropdown",children:r("fc_field_display_dropdown")}),s.jsx(V,{value:"segmented",children:r("fc_field_display_segmented")})]})]}),s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-mt-1",children:r("fc_field_display_hint")})]}),h&&s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-xs",children:r("fc_field_display_style")}),s.jsxs(Ae,{value:l.ui_variant||"switch",onValueChange:x=>b({ui_variant:x==="switch"?void 0:x}),children:[s.jsx(De,{className:"cj-mt-1",children:s.jsx(Oe,{})}),s.jsxs(Te,{children:[s.jsx(V,{value:"switch",children:r("fc_field_display_switch")}),s.jsx(V,{value:"segmented",children:r("fc_field_display_yesno")})]})]}),s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-mt-1",children:r("fc_field_boolean_hint")})]}),_&&s.jsxs(s.Fragment,{children:[s.jsx(Cn,{}),s.jsxs("div",{children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-mb-2",children:[s.jsx(Y,{children:r("fc_field_options")}),s.jsxs(te,{variant:"ghost",size:"sm",onClick:()=>b({options:[...w,{data:"",label:""}]}),children:[s.jsx(Et,{className:"cj-h-3 cj-w-3 cj-mr-1"}),r("fc_summary_add")]})]}),s.jsxs("div",{className:"cj-space-y-2",children:[w.map((x,C)=>s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2 cj-rounded-lg cj-border cj-p-2",children:[s.jsxs("div",{className:"cj-flex-1 cj-space-y-1",children:[s.jsx(pe,{value:x.data,onChange:E=>b({options:w.map((M,P)=>P===C?{...M,data:E.target.value}:M)}),placeholder:r("fc_create_option_value_placeholder"),className:"cj-h-8 cj-font-mono cj-text-sm"}),s.jsx(pe,{value:x.label,onChange:E=>b({options:w.map((M,P)=>P===C?{...M,label:E.target.value}:M)}),placeholder:r("fc_create_option_label_placeholder"),className:"cj-h-8 cj-text-sm"})]}),s.jsx(te,{variant:"ghost",size:"icon",className:"cj-h-8 cj-w-8",onClick:()=>b({options:w.filter((E,M)=>M!==C)}),children:s.jsx(Tt,{className:"cj-h-3 cj-w-3"})})]},C)),w.length===0&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-italic",children:r("fc_field_no_options")})]})]})]}),j&&s.jsxs(s.Fragment,{children:[s.jsx(Cn,{}),s.jsxs("div",{className:"cj-space-y-3",children:[s.jsx(Y,{children:r("fc_field_upload_validation")}),s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-xs",children:r("fc_field_upload_accept")}),s.jsx(pe,{value:N.accept||"",onChange:x=>b({uploadConfig:{...N,accept:x.target.value||void 0}}),placeholder:"image/*,.pdf",className:"cj-mt-1 cj-font-mono cj-text-sm"})]}),s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-xs",children:r("fc_field_upload_max")}),s.jsx(pe,{type:"number",min:0,step:.5,value:N.maxSizeMB??"",onChange:x=>b({uploadConfig:{...N,maxSizeMB:x.target.value?parseFloat(x.target.value):void 0}}),className:"cj-mt-1 cj-w-32"})]}),s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[s.jsx("input",{id:"fieldMultiUpload",type:"checkbox",checked:N.multiple===!0,onChange:x=>b({uploadConfig:{...N,multiple:x.target.checked?!0:void 0}}),className:"cj-h-4 cj-w-4 cj-rounded cj-border-border cj-bg-background cj-text-primary cj-cursor-pointer"}),s.jsx(Y,{htmlFor:"fieldMultiUpload",className:"cj-text-xs cj-font-medium cj-cursor-pointer",children:"Multiple files"})]}),N.multiple&&s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-xs",children:r("upload_max_files")}),s.jsx(pe,{id:"fieldMaxFiles",type:"number",min:1,value:N.maxFiles??"",onChange:x=>b({uploadConfig:{...N,maxFiles:x.target.value?parseInt(x.target.value,10):void 0}}),placeholder:"e.g. 5 (no limit if empty)",className:"cj-mt-1 cj-w-32"})]})]})]}),s.jsx(Cn,{}),s.jsxs("div",{className:"cj-space-y-2",children:[s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-sm cj-font-semibold",children:r("fc_field_width")}),s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r("fc_field_width_hint")})]}),s.jsxs(Ae,{value:l.width??"auto",onValueChange:x=>b({width:x==="auto"?void 0:x}),children:[s.jsx(De,{className:"cj-w-48",children:s.jsx(Oe,{})}),s.jsxs(Te,{children:[s.jsx(V,{value:"auto",children:r("fc_field_width_auto")}),s.jsx(V,{value:"1/3",children:"1/3"}),s.jsx(V,{value:"1/2",children:"1/2"}),s.jsx(V,{value:"2/3",children:"2/3"}),s.jsx(V,{value:"full",children:r("fc_field_width_full")})]})]})]}),s.jsx(Cn,{}),s.jsx(Yv,{field:l,availableFields:o.fields.filter(x=>x.field_id!==c.field_id&&!x.computed),onChange:x=>b({computed:x})}),s.jsx(Cn,{}),s.jsxs("div",{className:"cj-space-y-3",children:[s.jsxs("div",{children:[s.jsx(Y,{children:r("fc_field_dynamic_rules")}),s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r("fc_field_dynamic_rules_hint")})]}),s.jsx(Wa,{title:r("fc_field_visible_when"),hint:r("fc_field_visible_when_hint"),value:l.visibleWhen??null,onChange:x=>S("visibleWhen",x),availableFields:f,disabledLabel:r("fc_field_always_visible")}),s.jsx(Wa,{title:r("fc_field_enabled_when"),hint:r("fc_field_enabled_when_hint"),value:l.enabledWhen??null,onChange:x=>S("enabledWhen",x),availableFields:f,disabledLabel:r("fc_field_always_enabled")}),s.jsx(Wa,{title:r("fc_field_required_when"),hint:r("fc_field_required_when_hint"),value:l.requiredWhen??null,onChange:x=>S("requiredWhen",x),availableFields:f,disabledLabel:r("fc_field_required_static")})]})]})}),s.jsxs(si,{className:"cj-flex cj-items-center cj-justify-between sm:cj-justify-between",children:[s.jsxs(te,{variant:"destructive",size:"sm",onClick:()=>p(!0),children:[s.jsx(Fn,{className:"cj-h-4 cj-w-4 cj-mr-1"}),r("fc_field_delete")]}),s.jsx(te,{onClick:()=>n(!1),children:r("fc_field_done")})]})]}),s.jsx($r,{open:u,onOpenChange:p,description:r("fc_field_confirm_delete"),onConfirm:()=>{i(c.field_id),p(!1),n(!1)}})]})}function Wa({title:e,hint:t,value:n,onChange:r,availableFields:o,disabledLabel:a}){const[i,c]=y.useState(n!=null),[l,d]=y.useState(()=>tr(n)),u=y.useRef(n?JSON.stringify(n):null);y.useEffect(()=>{const m=n?JSON.stringify(n):null;m!==u.current&&(d(tr(n)),u.current=m),c(n!=null)},[n]);const p=m=>{c(m),m||(d(tr(null)),u.current=null,r({mode:"and",rules:[]}))},f=m=>{d(m);const _=ci(m);u.current=_?JSON.stringify(_):null,r(m)};return s.jsxs("div",{className:"cj-rounded-lg cj-border cj-p-3 cj-space-y-2",children:[s.jsxs("div",{className:"cj-flex cj-items-start cj-justify-between cj-gap-3",children:[s.jsxs("div",{className:"cj-min-w-0",children:[s.jsx(Y,{className:"cj-text-xs cj-font-semibold",children:e}),t&&s.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground",children:t})]}),s.jsx(Vt,{checked:i,onCheckedChange:p})]}),i?s.jsx(tm,{conditions:l,availableFields:o,onChange:f}):s.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground cj-italic",children:a})]})}function Yv({field:e,availableFields:t,onChange:n}){var p,f,m;const{t:r}=ve(),o=!!e.computed,a=((p=e.computed)==null?void 0:p.operation)||"sum",i=((f=e.computed)==null?void 0:f.operand_field_ids)||[],c=((m=e.computed)==null?void 0:m.precision)??2,l=_=>{n(_?{operation:"sum",operand_field_ids:[],precision:2}:null)},d=_=>{n({operation:a,operand_field_ids:i,precision:c,..._})},u=t.filter(_=>!i.includes(_.field_id));return s.jsxs("div",{className:"cj-rounded-lg cj-border cj-p-3 cj-space-y-3",children:[s.jsxs("div",{className:"cj-flex cj-items-start cj-justify-between cj-gap-3",children:[s.jsxs("div",{className:"cj-min-w-0",children:[s.jsx(Y,{className:"cj-text-sm cj-font-semibold",children:r("fc_field_computed")}),s.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground",children:r("fc_field_computed_hint")})]}),s.jsx(Vt,{checked:o,onCheckedChange:l})]}),o&&s.jsxs("div",{className:"cj-space-y-3",children:[s.jsxs("div",{className:"cj-grid cj-grid-cols-2 cj-gap-3",children:[s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-xs",children:r("fc_field_computed_operation")}),s.jsxs(Ae,{value:a,onValueChange:_=>d({operation:_}),children:[s.jsx(De,{className:"cj-mt-1",children:s.jsx(Oe,{})}),s.jsxs(Te,{children:[s.jsx(V,{value:"sum",children:r("fc_field_computed_op_sum")}),s.jsx(V,{value:"subtract",children:r("fc_field_computed_op_subtract")}),s.jsx(V,{value:"multiply",children:r("fc_field_computed_op_multiply")}),s.jsx(V,{value:"divide",children:r("fc_field_computed_op_divide")})]})]})]}),s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-xs",children:r("fc_field_computed_precision")}),s.jsx(pe,{type:"number",min:0,max:6,step:1,value:c,onChange:_=>d({precision:Math.max(0,parseInt(_.target.value||"0",10))}),className:"cj-mt-1"})]})]}),s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-xs",children:r("fc_field_computed_operands")}),s.jsxs("div",{className:"cj-mt-1 cj-space-y-2",children:[i.map((_,h)=>{const j=t.find(v=>v.field_id===_);return s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2 cj-rounded-lg cj-border cj-p-2",children:[s.jsxs("span",{className:"cj-text-xs cj-font-mono cj-text-muted-foreground",children:[h+1,"."]}),s.jsxs("div",{className:"cj-flex-1 cj-min-w-0",children:[s.jsx("div",{className:"cj-text-sm cj-truncate",children:j?j.label:r("fc_field_computed_missing_operand")}),j&&s.jsx("div",{className:"cj-text-[10px] cj-font-mono cj-text-muted-foreground cj-truncate",children:j.namespace})]}),s.jsx(te,{variant:"ghost",size:"icon",className:"cj-h-7 cj-w-7",onClick:()=>d({operand_field_ids:i.filter((v,b)=>b!==h)}),children:s.jsx(Tt,{className:"cj-h-3 cj-w-3"})})]},`${_}-${h}`)}),u.length>0?s.jsxs(Ae,{value:"",onValueChange:_=>{_&&d({operand_field_ids:[...i,_]})},children:[s.jsx(De,{className:"cj-h-9",children:s.jsx(Oe,{placeholder:r("fc_field_computed_add_operand")})}),s.jsx(Te,{children:u.map(_=>s.jsx(V,{value:_.field_id,children:_.label},_.field_id))})]}):s.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground cj-italic",children:i.length===0?r("fc_field_computed_no_fields"):r("fc_field_computed_all_added")})]})]})]})]})}function rm({specs:e=[],open:t,onOpenChange:n,onCreate:r}){const{t:o}=ve(),[a,i]=y.useState("catalog"),[c,l]=y.useState(""),[d,u]=y.useState(""),[p,f]=y.useState(""),[m,_]=y.useState("v1_string"),[h,j]=y.useState([]),v=y.useMemo(()=>e.filter(S=>S.label.toLowerCase().includes(c.toLowerCase())||S.namespace.toLowerCase().includes(c.toLowerCase())),[e,c]),b=()=>{u(""),f(""),_("v1_string"),j([]),l("")},w=m==="v2_single_option_select-1",N=d.trim()!=="";return s.jsx(ls,{open:t,onOpenChange:S=>{S||b(),n(S)},children:s.jsxs(ko,{className:"cj-max-w-lg cj-overflow-hidden",children:[s.jsxs(ai,{children:[s.jsx(ii,{children:o("fc_create_field_title")}),s.jsx(Yf,{children:o("fc_create_field_subtitle")})]}),s.jsxs("div",{className:"cj-flex cj-gap-1 cj-bg-muted cj-rounded-lg cj-p-1",children:[s.jsx("button",{onClick:()=>i("catalog"),className:`cj-flex-1 cj-h-8 cj-rounded-md cj-text-sm cj-font-medium ${a==="catalog"?"cj-bg-card cj-shadow-sm":"cj-text-muted-foreground"}`,children:o("fc_create_from_catalog",{count:e.length})}),s.jsx("button",{onClick:()=>i("custom"),className:`cj-flex-1 cj-h-8 cj-rounded-md cj-text-sm cj-font-medium ${a==="custom"?"cj-bg-card cj-shadow-sm":"cj-text-muted-foreground"}`,children:o("fc_create_custom")})]}),a==="catalog"?s.jsxs("div",{className:"cj-space-y-2 cj-min-w-0",children:[s.jsx(pe,{placeholder:o("fc_create_search_specs"),value:c,onChange:S=>l(S.target.value)}),s.jsx(qt,{className:"cj-h-[55vh] cj-max-h-[420px] cj-border cj-rounded-lg",children:s.jsxs("div",{className:"cj-divide-y",children:[v.map(S=>{var x,C;return s.jsxs("button",{onClick:()=>{r(S),b(),n(!1)},className:"cj-w-full cj-text-left cj-px-3 cj-py-2 hover:cj-bg-accent cj-flex cj-items-center cj-gap-2",children:[s.jsx(it,{variant:"secondary",className:`cj-text-[10px] ${((x=Cr[S.schema])==null?void 0:x.color)||"cj-bg-muted"} cj-text-white`,children:((C=Cr[S.schema])==null?void 0:C.label)||S.schema}),s.jsxs("div",{className:"cj-flex-1 cj-min-w-0",children:[s.jsx("div",{className:"cj-text-sm cj-font-medium cj-truncate",children:S.label}),s.jsx("div",{className:"cj-text-[11px] cj-font-mono cj-text-muted-foreground cj-truncate",children:S.namespace})]})]},S.id)}),v.length===0&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-py-6 cj-text-center",children:o("fc_create_no_specs")})]})})]}):s.jsx(qt,{className:"cj-h-[55vh] cj-max-h-[420px] cj--mx-1",children:s.jsxs("div",{className:"cj-space-y-3 cj-px-1",children:[s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-xs",children:o("fc_create_label_required")}),s.jsx(pe,{value:d,onChange:S=>u(S.target.value),placeholder:o("fc_create_label_placeholder"),className:"cj-mt-1"})]}),s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-xs",children:o("fc_create_namespace")}),s.jsx(pe,{value:p,onChange:S=>f(S.target.value),placeholder:o("fc_create_namespace_placeholder"),className:"cj-mt-1 cj-font-mono cj-text-sm"})]}),s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-xs",children:o("fc_create_schema")}),s.jsxs(Ae,{value:m,onValueChange:_,children:[s.jsx(De,{className:"cj-mt-1",children:s.jsx(Oe,{})}),s.jsx(Te,{children:Object.entries(Cr).map(([S,x])=>s.jsx(V,{value:S,children:s.jsx("div",{className:"cj-flex cj-items-center cj-gap-2",children:s.jsx(it,{className:`${x.color} cj-text-white cj-text-[10px]`,children:x.label})})},S))})]})]}),w&&s.jsxs("div",{children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-mb-1",children:[s.jsx(Y,{className:"cj-text-xs",children:o("fc_create_options")}),s.jsxs(te,{size:"sm",variant:"ghost",onClick:()=>j([...h,{data:"",label:""}]),children:[s.jsx(Et,{className:"cj-h-3 cj-w-3 cj-mr-1"}),o("fc_summary_add")]})]}),s.jsx("div",{className:"cj-space-y-2",children:h.map((S,x)=>s.jsxs("div",{className:"cj-flex cj-gap-2",children:[s.jsx(pe,{value:S.data,onChange:C=>j(h.map((E,M)=>M===x?{...E,data:C.target.value}:E)),placeholder:o("fc_create_option_value_placeholder"),className:"cj-flex-1 cj-h-8 cj-font-mono cj-text-sm"}),s.jsx(pe,{value:S.label,onChange:C=>j(h.map((E,M)=>M===x?{...E,label:C.target.value}:E)),placeholder:o("fc_create_option_label_placeholder"),className:"cj-flex-1 cj-h-8 cj-text-sm"}),s.jsx(te,{variant:"ghost",size:"icon",className:"cj-h-8 cj-w-8",onClick:()=>j(h.filter((C,E)=>E!==x)),children:s.jsx(Tt,{className:"cj-h-3 cj-w-3"})})]},x))})]})]})}),a==="custom"&&s.jsxs(si,{children:[s.jsx(te,{variant:"outline",onClick:()=>n(!1),children:o("fc_create_cancel")}),s.jsx(te,{disabled:!N,onClick:()=>{r({label:d.trim(),namespace:p.trim()||`custom_${Date.now()}`,schema:m,options:w?h:null,required:!1}),b(),n(!1)},children:o("fc_create_create")})]})]})})}const Br=g.forwardRef(({className:e,...t},n)=>s.jsx("textarea",{className:ne("cj-flex cj-min-h-[120px] cj-w-full cj-rounded-xl cj-border cj-border-input cj-bg-background cj-px-3 cj-py-3 cj-text-base cj-ring-offset-background placeholder:cj-text-muted-foreground focus-visible:cj-outline-none focus-visible:cj-ring-2 focus-visible:cj-ring-ring focus-visible:cj-ring-offset-2 disabled:cj-cursor-not-allowed disabled:cj-opacity-50 md:cj-text-sm",e),ref:n,...t}));Br.displayName="Textarea";var ua="Collapsible",[Vv]=_t(ua),[Uv,li]=Vv(ua),om=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...c}=e,[l,d]=tn({prop:r,defaultProp:o??!1,onChange:i,caller:ua});return s.jsx(Uv,{scope:n,disabled:a,contentId:Lt(),open:l,onOpenToggle:g.useCallback(()=>d(u=>!u),[d]),children:s.jsx(le.div,{"data-state":ui(l),"data-disabled":a?"":void 0,...c,ref:t})})});om.displayName=ua;var am="CollapsibleTrigger",sm=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=li(am,n);return s.jsx(le.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":ui(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:se(e.onClick,o.onOpenToggle)})});sm.displayName=am;var di="CollapsibleContent",im=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=li(di,e.__scopeCollapsible);return s.jsx(gt,{present:n||o.open,children:({present:a})=>s.jsx(Gv,{...r,ref:t,present:a})})});im.displayName=di;var Gv=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=li(di,n),[c,l]=g.useState(r),d=g.useRef(null),u=xe(t,d),p=g.useRef(0),f=p.current,m=g.useRef(0),_=m.current,h=i.open||c,j=g.useRef(h),v=g.useRef(void 0);return g.useEffect(()=>{const b=requestAnimationFrame(()=>j.current=!1);return()=>cancelAnimationFrame(b)},[]),Je(()=>{const b=d.current;if(b){v.current=v.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const w=b.getBoundingClientRect();p.current=w.height,m.current=w.width,j.current||(b.style.transitionDuration=v.current.transitionDuration,b.style.animationName=v.current.animationName),l(r)}},[i.open,r]),s.jsx(le.div,{"data-state":ui(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":_?`${_}px`:void 0,...e.style},children:h&&o})});function ui(e){return e?"open":"closed"}var Xv=om;const ds=Xv,us=sm,fs=im;function Kv({step:e,readOnly:t=!1}){const{t:n}=ve(),{formConfig:r,updateStepNavigation:o,setStepApiCall:a,addNavRule:i,updateNavRule:c,deleteNavRule:l}=pt(),[d,u]=y.useState(!0),p=r.steps.filter(_=>_.step_id!==e.step_id),f=e.navigation.api_call,m=r.fields.map(_=>({namespace:_.namespace,label:_.label,options:_.options||null}));return s.jsx("div",{className:"cj-rounded-2xl cj-bg-card cj-border cj-border-border cj-p-4",children:s.jsxs(ds,{open:d,onOpenChange:u,children:[s.jsx(us,{asChild:!0,children:s.jsxs("button",{className:"cj-w-full cj-flex cj-items-center cj-justify-between cj-gap-2 cj-text-left",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[s.jsx(Xl,{className:"cj-h-4 cj-w-4 cj-text-primary"}),s.jsx("span",{className:"cj-text-sm cj-font-semibold cj-uppercase cj-tracking-wide cj-text-muted-foreground",children:n("fc_nav_title")})]}),s.jsx(Ht,{className:`cj-h-4 cj-w-4 cj-transition-transform ${d?"cj-rotate-180":""}`})]})}),s.jsxs(fs,{className:"cj-pt-4 cj-space-y-4",children:[s.jsxs("div",{className:"cj-rounded-xl cj-border cj-border-border/60 cj-p-3 cj-space-y-3",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between",children:[s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-xs cj-font-semibold cj-uppercase",children:n("fc_nav_api_call")}),s.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground",children:n("fc_nav_api_call_hint")})]}),s.jsx(Vt,{checked:!!(f!=null&&f.enabled),disabled:t,onCheckedChange:_=>a(e.step_id,_?f||{enabled:!0,method:"POST",url:"",headers:{},body_template:""}:void 0)})]}),(f==null?void 0:f.enabled)&&s.jsxs("div",{className:"cj-space-y-2",children:[s.jsxs("div",{className:"cj-flex cj-gap-2",children:[s.jsxs(Ae,{value:f.method,onValueChange:_=>a(e.step_id,{...f,method:_}),disabled:t,children:[s.jsx(De,{className:"cj-w-28",children:s.jsx(Oe,{})}),s.jsxs(Te,{children:[s.jsx(V,{value:"GET",children:"GET"}),s.jsx(V,{value:"POST",children:"POST"}),s.jsx(V,{value:"PUT",children:"PUT"}),s.jsx(V,{value:"PATCH",children:"PATCH"}),s.jsx(V,{value:"DELETE",children:"DELETE"})]})]}),s.jsx(pe,{value:f.url,onChange:_=>a(e.step_id,{...f,url:_.target.value}),placeholder:"https://api.example.com/endpoint",className:"cj-flex-1 cj-font-mono cj-text-xs",disabled:t})]}),s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-[11px]",children:n("fc_nav_body_template")}),s.jsx(Br,{value:f.body_template||"",onChange:_=>a(e.step_id,{...f,body_template:_.target.value}),placeholder:'{ "name": "{{answers.full_name}}" }',className:"cj-mt-1 cj-font-mono cj-text-xs",rows:4,disabled:t}),s.jsxs("p",{className:"cj-text-[10px] cj-text-muted-foreground cj-mt-1",children:[n("fc_nav_body_template_hint_prefix")," ",s.jsx("code",{children:"{{answers.namespace}}"})," ",n("fc_nav_body_template_hint_suffix")]})]}),s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-[11px]",children:n("fc_nav_on_error")}),s.jsxs(Ae,{value:f.on_error||"block",onValueChange:_=>{const h=_==="block"||_==="continue"?_:`goto:${_.slice(5)}`;a(e.step_id,{...f,on_error:h})},disabled:t,children:[s.jsx(De,{className:"cj-mt-1 cj-h-8 cj-text-xs",children:s.jsx(Oe,{})}),s.jsxs(Te,{children:[s.jsx(V,{value:"block",children:n("fc_nav_on_error_block")}),s.jsx(V,{value:"continue",children:n("fc_nav_on_error_continue")}),p.map(_=>s.jsx(V,{value:`goto:${_.step_id}`,children:n("fc_nav_on_error_goto",{step:_.title||_.step_id})},_.step_id)),s.jsx(V,{value:"goto:__submit__",children:n("fc_nav_on_error_summary")})]})]}),s.jsx("p",{className:"cj-text-[10px] cj-text-muted-foreground cj-mt-1",children:n("fc_nav_on_error_hint")})]})]})]}),s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[s.jsx(Y,{className:"cj-text-xs cj-w-32",children:n("fc_nav_continue_button")}),s.jsx(pe,{value:e.navigation.button_label||"",onChange:_=>o(e.step_id,{button_label:_.target.value||void 0}),placeholder:n("fc_nav_continue_placeholder"),className:"cj-flex-1 cj-h-8 cj-text-sm",disabled:t})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-mb-2",children:[s.jsx(Y,{className:"cj-text-xs cj-font-semibold cj-uppercase",children:n("fc_nav_rules")}),!t&&s.jsxs(te,{size:"sm",variant:"ghost",className:"cj-h-7",onClick:()=>i(e.step_id),children:[s.jsx(Et,{className:"cj-h-3 cj-w-3 cj-mr-1"}),n("fc_nav_add_rule")]})]}),s.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground cj-mb-3",children:n("fc_nav_rules_hint")}),s.jsx("div",{className:"cj-space-y-2",children:e.navigation.rules.map((_,h)=>s.jsx(Jv,{rule:_,index:h,steps:p.map(j=>({id:j.step_id,title:j.title})),fields:m,readOnly:t,onUpdate:j=>c(e.step_id,_.rule_id,j),onDelete:()=>l(e.step_id,_.rule_id),canDelete:e.navigation.rules.length>1},_.rule_id))})]})]})]})})}function Jv({rule:e,index:t,steps:n,fields:r,readOnly:o,onUpdate:a,onDelete:i,canDelete:c}){const{t:l}=ve(),[d,u]=y.useState(!!e.condition),[p,f]=y.useState(()=>tr(e.condition)),[m,_]=y.useState(null),h=y.useRef(e.condition);y.useEffect(()=>{e.condition!==h.current&&(f(tr(e.condition)),h.current=e.condition,_(null))},[e.condition]);const j=b=>{for(const w of b.rules){if(!w.field||Po.includes(w.operator))continue;const N=r.find(S=>S.namespace===w.field);if(N!=null&&N.options&&N.options.length>0&&!w.value)return l("fc_nav_field_requires_value",{label:N.label})}return null},v=b=>{f(b);const w=j(b);if(w){_(w);return}_(null);const N=ci(b);h.current=N,a({condition:N})};return s.jsxs("div",{className:"cj-rounded-xl cj-border cj-border-border/60 cj-p-3 cj-bg-muted/20",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2 cj-mb-2",children:[s.jsx("span",{className:"cj-text-[11px] cj-font-bold cj-text-muted-foreground cj-uppercase",children:l("fc_nav_rule_n",{n:t+1})}),s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-1 cj-ml-auto",children:[s.jsx(Y,{className:"cj-text-[11px]",children:l("fc_nav_has_condition")}),s.jsx(Vt,{checked:d,disabled:o,onCheckedChange:b=>{u(b),_(null),b||(f(tr(null)),h.current=null,a({condition:null}))}}),c&&!o&&s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-6 cj-w-6",onClick:i,children:s.jsx(Fn,{className:"cj-h-3 cj-w-3 cj-text-destructive"})})]})]}),d&&s.jsxs("div",{className:"cj-mb-3 cj-rounded-lg cj-bg-card cj-p-3",children:[s.jsx(tm,{conditions:p,availableFields:r,onChange:v}),m&&s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-1.5 cj-mt-2 cj-text-[11px] cj-text-destructive",children:[s.jsx(Ps,{className:"cj-h-3.5 cj-w-3.5 cj-shrink-0"}),s.jsx("span",{children:m})]})]}),s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[s.jsx(Wo,{className:"cj-h-3.5 cj-w-3.5 cj-text-muted-foreground"}),s.jsx(Y,{className:"cj-text-xs",children:l("fc_nav_go_to")}),s.jsxs(Ae,{value:e.next_step_id,onValueChange:b=>a({next_step_id:b}),disabled:o,children:[s.jsx(De,{className:"cj-flex-1 cj-h-8 cj-text-sm",children:s.jsx(Oe,{})}),s.jsxs(Te,{children:[s.jsx(V,{value:"__submit__",children:l("fc_nav_submit_form")}),n.map(b=>s.jsx(V,{value:b.id,children:b.title},b.id))]})]})]})]})}function Qv({specs:e=[],readOnly:t=!1}){const{t:n}=ve(),{formConfig:r,activeStepId:o,updateStep:a,addRow:i,updateRow:c,deleteRow:l,moveRow:d,removeFieldFromRow:u,moveFieldInRow:p,addNewFieldToRow:f,setSelectedField:m,selectedFieldId:_}=pt(),h=r.steps.find(S=>S.step_id===o)||null,[j,v]=y.useState(!1),[b,w]=y.useState(null);if(!h)return s.jsx("div",{className:"cj-h-full cj-flex cj-items-center cj-justify-center cj-p-8 cj-text-center",children:s.jsx("div",{className:"cj-text-sm cj-text-muted-foreground",children:r.steps.length===0?n("fc_step_empty_create"):n("fc_step_empty_select")})});const N=r.steps.findIndex(S=>S.step_id===h.step_id)+1;return s.jsxs(qt,{className:"cj-h-full",children:[s.jsxs("div",{className:"cj-p-6 cj-space-y-4 cj-max-w-3xl cj-mx-auto",children:[s.jsxs("div",{className:"cj-rounded-2xl cj-bg-card cj-border cj-border-border cj-p-5 cj-space-y-4",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-3",children:[s.jsx("div",{className:"cj-h-9 cj-w-9 cj-rounded-full cj-bg-primary cj-text-primary-foreground cj-flex cj-items-center cj-justify-center cj-font-bold",children:N}),s.jsx(pe,{value:h.title,onChange:S=>a(h.step_id,{title:S.target.value}),placeholder:n("fc_step_title_placeholder"),disabled:t,className:"cj-flex-1 cj-text-lg cj-font-semibold cj-border-none cj-shadow-none cj-px-1 cj-bg-transparent focus-visible:cj-ring-1"})]}),s.jsxs("div",{className:"cj-grid cj-grid-cols-2 cj-gap-3",children:[s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-xs",children:n("fc_step_title_label")}),s.jsx(pe,{value:h.title,onChange:S=>a(h.step_id,{title:S.target.value}),disabled:t,className:"cj-mt-1"})]}),s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-xs",children:n("fc_step_description_label")}),s.jsx(pe,{value:h.description||"",onChange:S=>a(h.step_id,{description:S.target.value}),disabled:t,placeholder:n("fc_step_description_placeholder"),className:"cj-mt-1"})]})]})]}),h.rows.map((S,x)=>s.jsx(Zv,{row:S,index:x,isLast:x===h.rows.length-1,readOnly:t,onChangeLayout:C=>c(h.step_id,S.row_id,{layout:C}),onChangeTitle:C=>c(h.step_id,S.row_id,{title:C}),onToggleDivider:C=>c(h.step_id,S.row_id,{show_divider:C}),onDelete:()=>l(h.step_id,S.row_id),onMoveUp:()=>d(h.step_id,S.row_id,"up"),onMoveDown:()=>d(h.step_id,S.row_id,"down"),onAddField:()=>w(S.row_id),onSelectField:C=>{m(C),v(!0)},onRemoveField:C=>u(h.step_id,S.row_id,C),onMoveField:(C,E)=>p(h.step_id,S.row_id,C,E),fieldLookup:C=>r.fields.find(E=>E.field_id===C)||null},S.row_id)),!t&&s.jsxs(te,{variant:"outline",className:"cj-w-full cj-h-12 cj-rounded-xl cj-border-dashed",onClick:()=>i(h.step_id),children:[s.jsx(Et,{className:"cj-h-4 cj-w-4 cj-mr-2"}),n("fc_add_row")]}),s.jsx(Kv,{step:h,readOnly:t})]}),s.jsx(nm,{fieldId:_,open:j,onOpenChange:S=>{v(S),S||m(null)}}),s.jsx(rm,{specs:e,open:!!b,onOpenChange:S=>{S||w(null)},onCreate:S=>{b&&f(h.step_id,b,S)}})]})}function Zv({row:e,index:t,isLast:n,readOnly:r,onChangeLayout:o,onChangeTitle:a,onToggleDivider:i,onDelete:c,onMoveUp:l,onMoveDown:d,onAddField:u,onSelectField:p,onRemoveField:f,onMoveField:m,fieldLookup:_}){const{t:h}=ve(),[j,v]=y.useState(!1);return s.jsxs("div",{children:[e.show_divider&&s.jsx("div",{className:"cj-border-t-2 cj-border-dotted cj-border-border cj-mb-3","aria-hidden":"true"}),s.jsxs("div",{className:"cj-rounded-2xl cj-bg-card cj-border cj-border-border cj-p-4",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2 cj-mb-3",children:[s.jsx(Vl,{className:"cj-h-4 cj-w-4 cj-text-muted-foreground"}),s.jsx("span",{className:"cj-text-sm cj-font-medium",children:h("fc_row_n",{n:t+1})}),s.jsxs(Ae,{value:e.layout,onValueChange:b=>o(b),disabled:r,children:[s.jsx(De,{className:"cj-h-7 cj-w-32 cj-text-xs",children:s.jsx(Oe,{})}),s.jsxs(Te,{children:[s.jsx(V,{value:"horizontal",children:h("fc_layout_horizontal")}),s.jsx(V,{value:"vertical",children:h("fc_layout_vertical")})]})]}),!r&&s.jsxs("label",{className:"cj-flex cj-items-center cj-gap-1 cj-text-xs cj-text-muted-foreground cj-cursor-pointer",children:[s.jsx("input",{type:"checkbox",checked:!!e.show_divider,onChange:b=>i(b.target.checked),className:"cj-h-3 cj-w-3"}),h("fc_row_show_divider")]}),!r&&s.jsxs("div",{className:"cj-ml-auto cj-flex cj-items-center cj-gap-0.5",children:[s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-6 cj-w-6",disabled:t===0,onClick:l,children:s.jsx(_o,{className:"cj-h-3 cj-w-3"})}),s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-6 cj-w-6",disabled:n,onClick:d,children:s.jsx(Ht,{className:"cj-h-3 cj-w-3"})}),s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-6 cj-w-6",onClick:()=>v(!0),children:s.jsx(Fn,{className:"cj-h-3 cj-w-3 cj-text-destructive"})}),s.jsx($r,{open:j,onOpenChange:v,description:h("fc_confirm_delete_row"),onConfirm:c})]})]}),!r&&s.jsx("div",{className:"cj-mb-3",children:s.jsx(pe,{value:e.title||"",onChange:b=>a(b.target.value),placeholder:h("fc_row_title_placeholder"),className:"cj-h-8 cj-text-sm"})}),r&&e.title&&s.jsx("div",{className:"cj-text-sm cj-font-semibold cj-mb-2",children:e.title}),s.jsxs("div",{className:`cj-gap-3 ${e.layout==="horizontal"?"cj-flex cj-flex-wrap":"cj-flex cj-flex-col"}`,children:[e.field_ids.map((b,w)=>{const N=_(b);if(!N)return null;const S=la(N.schema);return s.jsxs("div",{className:`cj-group cj-relative cj-rounded-xl cj-border cj-border-border cj-bg-muted/30 hover:cj-border-primary/60 cj-px-3 cj-py-2 cj-cursor-pointer ${e.layout==="horizontal"?"cj-flex-1 cj-min-w-[180px]":"cj-w-full"}`,onClick:()=>p(b),children:[s.jsxs("div",{className:"cj-flex cj-items-start cj-gap-2",children:[s.jsxs("div",{className:"cj-flex-1 cj-min-w-0",children:[s.jsx(it,{variant:"secondary",className:`cj-text-[9px] cj-mb-1 ${S.color} cj-text-white`,children:S.label}),s.jsxs("div",{className:"cj-text-sm cj-font-medium cj-truncate",children:[N.label,N.required&&s.jsx("span",{className:"cj-text-destructive cj-ml-0.5",children:"*"})]}),s.jsx("div",{className:"cj-text-[10px] cj-font-mono cj-text-muted-foreground cj-truncate",children:N.namespace})]}),!r&&s.jsxs("div",{className:"cj-flex cj-flex-col cj-gap-0.5 cj-opacity-0 group-hover:cj-opacity-100 cj-transition-opacity",children:[s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-5 cj-w-5",onClick:x=>{x.stopPropagation(),p(b)},title:h("fc_edit"),children:s.jsx(X_,{className:"cj-h-3 cj-w-3"})}),s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-5 cj-w-5",onClick:x=>{x.stopPropagation(),f(b)},title:h("fc_remove_from_row"),children:s.jsx(Tt,{className:"cj-h-3 cj-w-3 cj-text-destructive"})})]})]}),!r&&e.field_ids.length>1&&s.jsxs("div",{className:"cj-absolute -cj-bottom-2 cj-left-1/2 -cj-translate-x-1/2 cj-flex cj-gap-0.5 cj-bg-card cj-rounded-full cj-shadow-sm cj-opacity-0 group-hover:cj-opacity-100",children:[s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-5 cj-w-5",disabled:w===0,onClick:x=>{x.stopPropagation(),m(b,"left")},children:s.jsx(_o,{className:"cj-h-3 cj-w-3 -cj-rotate-90"})}),s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-5 cj-w-5",disabled:w===e.field_ids.length-1,onClick:x=>{x.stopPropagation(),m(b,"right")},children:s.jsx(Ht,{className:"cj-h-3 cj-w-3 -cj-rotate-90"})})]})]},b)}),!r&&s.jsxs("button",{onClick:u,className:`cj-rounded-xl cj-border-2 cj-border-dashed cj-border-border hover:cj-border-primary/60 cj-text-xs cj-text-muted-foreground hover:cj-text-foreground cj-px-3 cj-py-2 cj-flex cj-items-center cj-justify-center cj-gap-1 ${e.layout==="horizontal"?"cj-flex-1 cj-min-w-[140px]":"cj-w-full cj-py-3"}`,children:[s.jsx(Et,{className:"cj-h-3.5 cj-w-3.5"}),h("fc_add_field_btn")]}),e.field_ids.length===0&&r&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-italic",children:h("fc_no_fields")})]})]})]})}function eb({readOnly:e=!1}){const{t}=ve(),{formConfig:n,updateSummary:r,addSummarySection:o,updateSummarySection:a,deleteSummarySection:i,addDisplayField:c,updateDisplayField:l,deleteDisplayField:d}=pt(),[u,p]=y.useState(null),{summary:f,fields:m,steps:_}=n;return s.jsxs("div",{className:"cj-flex cj-flex-col cj-h-full cj-bg-card",children:[s.jsx("div",{className:"cj-p-4 cj-border-b",children:s.jsx("h2",{className:"cj-text-sm cj-font-semibold",children:t("fc_summary_panel")})}),s.jsx(qt,{className:"cj-flex-1",children:s.jsxs("div",{className:"cj-p-4 cj-space-y-4",children:[s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-xs",children:t("fc_summary_title_label")}),s.jsx(pe,{value:f.title,onChange:h=>r({title:h.target.value}),disabled:e,className:"cj-mt-1"})]}),s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-gap-3 cj-rounded-lg cj-border cj-border-border cj-bg-muted/20 cj-p-3",children:[s.jsxs("div",{className:"cj-space-y-0.5",children:[s.jsx(Y,{htmlFor:"summary-show-sidebar",className:"cj-text-xs cj-font-medium",children:t("fc_summary_show_sidebar")}),s.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground",children:t("fc_summary_show_sidebar_hint")})]}),s.jsx(Vt,{id:"summary-show-sidebar",checked:f.show_sidebar??!0,onCheckedChange:h=>r({show_sidebar:h}),disabled:e})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-mb-2",children:[s.jsx(Y,{className:"cj-text-xs cj-font-semibold cj-uppercase",children:t("fc_summary_sections")}),!e&&s.jsxs(te,{size:"sm",variant:"outline",onClick:()=>o(),children:[s.jsx(Et,{className:"cj-h-3 cj-w-3 cj-mr-1"}),t("fc_summary_add_section")]})]}),s.jsxs("div",{className:"cj-space-y-3",children:[f.sections.map(h=>s.jsxs("div",{className:"cj-rounded-xl cj-border cj-border-border cj-p-3 cj-space-y-3 cj-bg-muted/20",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[s.jsx(pe,{value:h.title,onChange:j=>a(h.section_id,{title:j.target.value}),placeholder:t("fc_summary_section_title_placeholder"),disabled:e,className:"cj-flex-1 cj-h-8 cj-font-semibold"}),!e&&s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-7 cj-w-7",onClick:()=>p(h.section_id),children:s.jsx(Fn,{className:"cj-h-3.5 cj-w-3.5 cj-text-destructive"})})]}),s.jsxs("div",{className:"cj-grid cj-grid-cols-2 cj-gap-2",children:[s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-[10px]",children:t("fc_summary_visible_from")}),s.jsxs(Ae,{value:String(h.visible_from_step??1),onValueChange:j=>a(h.section_id,{visible_from_step:parseInt(j,10)||1}),disabled:e,children:[s.jsx(De,{className:"cj-mt-0.5 cj-h-8 cj-text-xs",children:s.jsx(Oe,{})}),s.jsx(Te,{children:_.map((j,v)=>s.jsx(V,{value:String(v+1),children:t("fc_summary_step_n",{n:v+1})},v))})]})]}),s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-[10px]",children:t("fc_summary_until_step")}),s.jsxs(Ae,{value:h.until_step?String(h.until_step):"all",onValueChange:j=>a(h.section_id,{until_step:j==="all"?void 0:parseInt(j,10)}),disabled:e,children:[s.jsx(De,{className:"cj-mt-0.5 cj-h-8 cj-text-xs",children:s.jsx(Oe,{})}),s.jsxs(Te,{children:[s.jsx(V,{value:"all",children:t("fc_summary_all_steps")}),_.map((j,v)=>s.jsx(V,{value:String(v+1),children:t("fc_summary_step_n",{n:v+1})},v))]})]})]})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-mb-1",children:[s.jsx(Y,{className:"cj-text-[10px] cj-uppercase cj-font-semibold",children:t("fc_summary_display_fields")}),!e&&s.jsxs(te,{size:"sm",variant:"ghost",className:"cj-h-6 cj-text-[11px]",onClick:()=>c(h.section_id),children:[s.jsx(Et,{className:"cj-h-3 cj-w-3 cj-mr-1"}),t("fc_summary_add")]})]}),s.jsxs("div",{className:"cj-space-y-2",children:[h.display_fields.map(j=>s.jsx(tb,{field:j,steps:_.map(v=>({id:v.step_id,title:v.title})),fields:m.map(v=>({id:v.field_id,label:v.label,namespace:v.namespace})),readOnly:e,onChange:v=>l(h.section_id,j.display_id,v),onDelete:()=>d(h.section_id,j.display_id)},j.display_id)),h.display_fields.length===0&&s.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground cj-italic",children:t("fc_summary_no_display_fields")})]})]})]},h.section_id)),f.sections.length===0&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-text-center cj-py-4",children:t("fc_summary_no_sections")})]})]})]})}),s.jsx($r,{open:u!==null,onOpenChange:h=>!h&&p(null),description:t("fc_summary_confirm_delete_section"),onConfirm:()=>{u&&i(u),p(null)}})]})}function tb({field:e,steps:t,fields:n,readOnly:r,onChange:o,onDelete:a}){const{t:i}=ve();return s.jsxs("div",{className:"cj-relative cj-rounded-lg cj-border cj-bg-card cj-p-2 cj-space-y-1.5",children:[!r&&s.jsx("button",{onClick:a,className:"cj-absolute cj-top-1 cj-right-1 cj-text-destructive hover:cj-bg-destructive/10 cj-rounded cj-p-0.5",children:s.jsx(Tt,{className:"cj-h-3 cj-w-3"})}),s.jsxs("div",{className:"cj-grid cj-grid-cols-2 cj-gap-1.5",children:[s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-[10px]",children:i("fc_summary_source")}),s.jsxs(Ae,{value:e.source,onValueChange:c=>o({source:c}),disabled:r,children:[s.jsx(De,{className:"cj-mt-0.5 cj-h-7 cj-text-xs",children:s.jsx(Oe,{})}),s.jsxs(Te,{children:[s.jsx(V,{value:"form_field",children:i("fc_summary_source_form_field")}),s.jsx(V,{value:"api_response",children:i("fc_summary_source_api_response")})]})]})]}),s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-[10px]",children:i("fc_summary_format")}),s.jsxs(Ae,{value:e.format||"text",onValueChange:c=>o({format:c}),disabled:r,children:[s.jsx(De,{className:"cj-mt-0.5 cj-h-7 cj-text-xs",children:s.jsx(Oe,{})}),s.jsxs(Te,{children:[s.jsx(V,{value:"text",children:i("fc_summary_format_text")}),s.jsx(V,{value:"number",children:i("fc_summary_format_number")}),s.jsx(V,{value:"currency",children:i("fc_summary_format_currency")}),s.jsx(V,{value:"date",children:i("fc_summary_format_date")}),s.jsx(V,{value:"datetime",children:i("fc_summary_format_datetime")})]})]})]})]}),s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-[10px]",children:i("fc_summary_display_label")}),s.jsx(pe,{value:e.label,onChange:c=>o({label:c.target.value}),placeholder:i("fc_summary_display_label_placeholder"),disabled:r,className:"cj-mt-0.5 cj-h-7 cj-text-xs"})]}),e.source==="form_field"?s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-[10px]",children:i("fc_summary_field")}),s.jsxs(Ae,{value:e.field_id||"",onValueChange:c=>o({field_id:c}),disabled:r,children:[s.jsx(De,{className:"cj-mt-0.5 cj-h-7 cj-text-xs",children:s.jsx(Oe,{placeholder:i("fc_summary_select")})}),s.jsx(Te,{children:n.map(c=>s.jsxs(V,{value:c.id,children:[c.label," ",s.jsxs("span",{className:"cj-text-muted-foreground",children:["(",c.namespace,")"]})]},c.id))})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-[10px]",children:i("fc_summary_from_step_api")}),s.jsxs(Ae,{value:e.step_id||"",onValueChange:c=>o({step_id:c}),disabled:r,children:[s.jsx(De,{className:"cj-mt-0.5 cj-h-7 cj-text-xs",children:s.jsx(Oe,{placeholder:i("fc_summary_select")})}),s.jsx(Te,{children:t.map(c=>s.jsx(V,{value:c.id,children:c.title},c.id))})]})]}),s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-[10px]",children:i("fc_summary_response_path")}),s.jsx(pe,{value:e.response_path||"",onChange:c=>o({response_path:c.target.value}),placeholder:"data.quote.premium",disabled:r,className:"cj-mt-0.5 cj-h-7 cj-text-xs cj-font-mono"})]})]})]})}function nb({specs:e=[],readOnly:t=!1}){const{t:n}=ve(),{formConfig:r,createField:o,createFieldFromSpec:a,deleteField:i,setSelectedField:c,setActiveStep:l,setActiveTab:d}=pt(),[u,p]=y.useState(""),[f,m]=y.useState("all"),[_,h]=y.useState(!1),[j,v]=y.useState(null),[b,w]=y.useState(null),N=y.useMemo(()=>{const M=new Map;for(const P of r.steps){const T=new Set;for(const k of P.rows)for(const z of k.field_ids)T.add(z);for(const k of T){const z=M.get(k)??[];z.push({step_id:P.step_id,title:P.title}),M.set(k,z)}}return M},[r.steps]),S=y.useMemo(()=>{var T;let M=0,P=0;for(const k of r.fields)(((T=N.get(k.field_id))==null?void 0:T.length)??0)>0?M++:P++;return{all:r.fields.length,used:M,unused:P}},[r.fields,N]),x=r.fields.filter(M=>{var z;const P=u.toLowerCase();if(!(M.label.toLowerCase().includes(P)||M.namespace.toLowerCase().includes(P)))return!1;const k=((z=N.get(M.field_id))==null?void 0:z.length)??0;return f==="used"?k>0:f==="unused"?k===0:!0}),C=M=>{l(M),d("steps")},E=M=>`cj-h-8 cj-px-3 cj-text-xs cj-rounded-lg cj-border cj-transition-colors ${M?"cj-bg-primary cj-text-primary-foreground cj-border-primary":"cj-bg-background cj-text-foreground cj-border-border hover:cj-bg-accent/40"}`;return s.jsx("div",{className:"cj-h-full cj-overflow-hidden cj-p-6",children:s.jsxs("div",{className:"cj-h-full cj-flex cj-flex-col cj-max-w-4xl cj-mx-auto cj-w-full cj-bg-card cj-border cj-border-border cj-rounded-2xl cj-p-6",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-mb-4",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"cj-text-lg cj-font-semibold",children:n("fc_fields_catalog")}),s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:n("fc_fields_catalog_hint")})]}),!t&&s.jsxs(te,{onClick:()=>h(!0),children:[s.jsx(Et,{className:"cj-h-4 cj-w-4 cj-mr-1"}),n("fc_fields_add")]})]}),s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2 cj-mb-3",children:[s.jsxs("div",{className:"cj-relative cj-flex-1",children:[s.jsx(Gl,{className:"cj-absolute cj-left-2.5 cj-top-2.5 cj-h-4 cj-w-4 cj-text-muted-foreground"}),s.jsx(pe,{placeholder:n("fc_fields_search"),value:u,onChange:M=>p(M.target.value),className:"cj-pl-8"})]}),s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-1",children:[s.jsxs("button",{type:"button",className:E(f==="all"),onClick:()=>m("all"),children:[n("fc_fields_filter_all")," ",s.jsx("span",{className:"cj-opacity-70 cj-ml-1",children:S.all})]}),s.jsxs("button",{type:"button",className:E(f==="used"),onClick:()=>m("used"),children:[n("fc_fields_filter_used")," ",s.jsx("span",{className:"cj-opacity-70 cj-ml-1",children:S.used})]}),s.jsxs("button",{type:"button",className:E(f==="unused"),onClick:()=>m("unused"),children:[n("fc_fields_filter_unused")," ",s.jsx("span",{className:"cj-opacity-70 cj-ml-1",children:S.unused})]})]})]}),s.jsx(qt,{className:"cj-flex-1 cj-rounded-xl cj-border",children:s.jsxs("div",{className:"cj-divide-y",children:[x.map(M=>{const P=la(M.schema),T=N.get(M.field_id)??[],k=T.length===0;return s.jsxs("div",{className:`cj-p-3 cj-flex cj-items-start cj-gap-3 hover:cj-bg-accent/40 ${k?"cj-bg-muted/30":""}`,children:[s.jsx(it,{variant:"secondary",className:`cj-text-[10px] ${P.color} cj-text-white cj-mt-0.5`,children:P.label}),s.jsxs("div",{className:"cj-flex-1 cj-min-w-0",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[s.jsxs("div",{className:"cj-text-sm cj-font-medium cj-truncate",children:[M.label,M.required&&s.jsx("span",{className:"cj-text-destructive cj-ml-1",children:"*"})]}),k?s.jsx(it,{variant:"outline",className:"cj-text-[10px] cj-border-destructive/40 cj-text-destructive",children:n("fc_fields_unused_badge")}):s.jsx(it,{variant:"outline",className:"cj-text-[10px] cj-border-primary/40 cj-text-primary",children:T.length===1?n("fc_fields_used_in_one",{count:T.length}):n("fc_fields_used_in_many",{count:T.length})})]}),s.jsx("div",{className:"cj-text-[11px] cj-font-mono cj-text-muted-foreground cj-truncate",children:M.namespace}),T.length>0&&s.jsx("div",{className:"cj-mt-2 cj-flex cj-flex-wrap cj-gap-1",children:T.map(z=>s.jsxs("button",{type:"button",onClick:()=>C(z.step_id),title:n("fc_fields_go_to_step",{title:z.title}),className:"cj-inline-flex cj-items-center cj-gap-1 cj-text-[11px] cj-px-2 cj-py-0.5 cj-rounded-md cj-border cj-border-border cj-bg-background hover:cj-bg-accent/60 cj-transition-colors",children:[s.jsx("span",{className:"cj-truncate cj-max-w-[160px]",children:z.title}),s.jsx(Wo,{className:"cj-h-3 cj-w-3 cj-opacity-60"})]},z.step_id))})]}),!t&&s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-1",children:[s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-7 cj-w-7",onClick:()=>{c(M.field_id),v(M.field_id)},children:s.jsx(Y_,{className:"cj-h-3.5 cj-w-3.5"})}),s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-7 cj-w-7",onClick:()=>w(M.field_id),children:s.jsx(Fn,{className:"cj-h-3.5 cj-w-3.5 cj-text-destructive"})})]})]},M.field_id)}),x.length===0&&s.jsx("p",{className:"cj-py-8 cj-text-center cj-text-xs cj-text-muted-foreground",children:r.fields.length===0?n("fc_fields_no_fields"):n("fc_fields_no_match")})]})}),s.jsx(rm,{specs:e,open:_,onOpenChange:h,onCreate:M=>{"claimspec_id"in M?a(M):o(M)}}),s.jsx(nm,{fieldId:j,open:!!j,onOpenChange:M=>!M&&v(null)}),s.jsx($r,{open:b!==null,onOpenChange:M=>!M&&w(null),description:n("fc_fields_confirm_delete"),onConfirm:()=>{b&&i(b),w(null)}})]})})}function rb({readOnly:e=!1}){var u,p;const{t}=ve(),{formConfig:n,updateInit:r}=pt(),o=n.init,a=Object.entries(o.values||{}),i=()=>{let f="namespace",m=1;for(;o.values[f]!==void 0;)f=`namespace_${m++}`;r({values:{...o.values,[f]:""}})},c=(f,m)=>{if(m===f)return;const _={...o.values};_[m]=_[f],delete _[f],r({values:_})},l=(f,m)=>{r({values:{...o.values,[f]:m}})},d=f=>{const m={...o.values};delete m[f],r({values:m})};return s.jsx(qt,{className:"cj-h-full",children:s.jsx("div",{className:"cj-p-6",children:s.jsxs("div",{className:"cj-max-w-3xl cj-mx-auto cj-w-full cj-bg-card cj-border cj-border-border cj-rounded-2xl cj-p-6 cj-space-y-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"cj-text-lg cj-font-semibold",children:t("fc_init_title")}),s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:t("fc_init_subtitle")})]}),s.jsxs("div",{className:"cj-rounded-xl cj-border cj-p-4 cj-space-y-3",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between",children:[s.jsx(Y,{className:"cj-text-sm cj-font-semibold",children:t("fc_init_static")}),!e&&s.jsxs(te,{size:"sm",variant:"outline",onClick:i,children:[s.jsx(Et,{className:"cj-h-3.5 cj-w-3.5 cj-mr-1"}),t("fc_init_add")]})]}),s.jsxs("div",{className:"cj-space-y-2",children:[a.map(([f,m])=>s.jsxs("div",{className:"cj-flex cj-gap-2 cj-items-center",children:[s.jsx(pe,{value:f,onChange:_=>c(f,_.target.value),className:"cj-flex-1 cj-font-mono cj-text-sm cj-h-9",disabled:e}),s.jsx(pe,{value:String(m??""),onChange:_=>l(f,_.target.value),className:"cj-flex-1 cj-h-9",disabled:e}),!e&&s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-8 cj-w-8",onClick:()=>d(f),children:s.jsx(Fn,{className:"cj-h-3.5 cj-w-3.5 cj-text-destructive"})})]},f)),a.length===0&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-italic cj-py-2",children:t("fc_init_no_values")})]})]}),s.jsxs("div",{className:"cj-rounded-xl cj-border cj-p-4 cj-space-y-3",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between",children:[s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-sm cj-font-semibold",children:t("fc_init_prefill")}),s.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground",children:t("fc_init_prefill_hint")})]}),s.jsx(Vt,{checked:!!((u=o.api)!=null&&u.enabled),disabled:e,onCheckedChange:f=>r({api:f?o.api||{enabled:!0,method:"GET",url:"",mapping:{}}:void 0})})]}),((p=o.api)==null?void 0:p.enabled)&&s.jsxs("div",{className:"cj-space-y-2",children:[s.jsxs("div",{className:"cj-flex cj-gap-2",children:[s.jsxs(Ae,{value:o.api.method,onValueChange:f=>r({api:{...o.api,method:f}}),disabled:e,children:[s.jsx(De,{className:"cj-w-28",children:s.jsx(Oe,{})}),s.jsxs(Te,{children:[s.jsx(V,{value:"GET",children:"GET"}),s.jsx(V,{value:"POST",children:"POST"})]})]}),s.jsx(pe,{value:o.api.url,onChange:f=>r({api:{...o.api,url:f.target.value}}),placeholder:"https://api.example.com/prefill",className:"cj-flex-1 cj-font-mono cj-text-xs",disabled:e})]}),s.jsxs("div",{children:[s.jsx(Y,{className:"cj-text-xs",children:t("fc_init_mapping")}),s.jsx(Br,{value:JSON.stringify(o.api.mapping||{},null,2),onChange:f=>{try{const m=JSON.parse(f.target.value);r({api:{...o.api,mapping:m}})}catch{}},className:"cj-mt-1 cj-font-mono cj-text-xs",rows:5,disabled:e})]})]})]})]})})})}var ob=e=>{switch(e){case"success":return ib;case"info":return lb;case"warning":return cb;case"error":return db;default:return null}},ab=Array(12).fill(0),sb=({visible:e,className:t})=>y.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},y.createElement("div",{className:"sonner-spinner"},ab.map((n,r)=>y.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),ib=y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},y.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),cb=y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},y.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),lb=y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},y.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),db=y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},y.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),ub=y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},y.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),y.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),fb=()=>{let[e,t]=y.useState(document.hidden);return y.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},ms=1,mb=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:ms++,a=this.toasts.find(c=>c.id===o),i=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),a?this.toasts=this.toasts.map(c=>c.id===o?(this.publish({...c,...e,id:o,title:n}),{...c,...e,id:o,dismissible:i,title:n}):c):this.addToast({title:n,...r,dismissible:i,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,a,i=r.then(async l=>{if(a=["resolve",l],y.isValidElement(l))o=!1,this.create({id:n,type:"default",message:l});else if(hb(l)&&!l.ok){o=!1;let d=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,u=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:d,description:u})}else if(t.success!==void 0){o=!1;let d=typeof t.success=="function"?await t.success(l):t.success,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:d,description:u})}}).catch(async l=>{if(a=["reject",l],t.error!==void 0){o=!1;let d=typeof t.error=="function"?await t.error(l):t.error,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:d,description:u})}}).finally(()=>{var l;o&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),c=()=>new Promise((l,d)=>i.then(()=>a[0]==="reject"?d(a[1]):l(a[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:c}:Object.assign(n,{unwrap:c})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||ms++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},st=new mb,pb=(e,t)=>{let n=(t==null?void 0:t.id)||ms++;return st.addToast({title:e,...t,id:n}),n},hb=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",_b=pb,gb=()=>st.toasts,jb=()=>st.getActiveToasts(),Mn=Object.assign(_b,{success:st.success,info:st.info,warning:st.warning,error:st.error,custom:st.custom,message:st.message,promise:st.promise,dismiss:st.dismiss,loading:st.loading},{getHistory:gb,getToasts:jb});function yb(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}yb(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
298
|
+
`);function ro(e){return e.label!==void 0}var xb=3,vb="32px",bb="16px",Tc=4e3,wb=356,Nb=14,Sb=20,Cb=200;function Nt(...e){return e.filter(Boolean).join(" ")}function kb(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var Pb=e=>{var t,n,r,o,a,i,c,l,d,u,p;let{invert:f,toast:m,unstyled:_,interacting:h,setHeights:j,visibleToasts:v,heights:b,index:w,toasts:N,expanded:S,removeToast:x,defaultRichColors:C,closeButton:E,style:M,cancelButtonStyle:P,actionButtonStyle:T,className:k="",descriptionClassName:z="",duration:D,position:W,gap:O,loadingIcon:$,expandByDefault:L,classNames:R,icons:X,closeButtonAriaLabel:de="Close toast",pauseWhenPageIsHidden:ie}=e,[I,F]=y.useState(null),[U,K]=y.useState(null),[A,H]=y.useState(!1),[Q,J]=y.useState(!1),[ae,ce]=y.useState(!1),[me,be]=y.useState(!1),[Ue,Qe]=y.useState(!1),[Ze,Ie]=y.useState(0),[ct,q]=y.useState(0),Z=y.useRef(m.duration||D||Tc),he=y.useRef(null),re=y.useRef(null),_e=w===0,Ce=w+1<=v,we=m.type,We=m.dismissible!==!1,vt=m.className||"",bt=m.descriptionClassName||"",Ge=y.useMemo(()=>b.findIndex(B=>B.toastId===m.id)||0,[b,m.id]),At=y.useMemo(()=>{var B;return(B=m.closeButton)!=null?B:E},[m.closeButton,E]),bn=y.useMemo(()=>m.duration||D||Tc,[m.duration,D]),wn=y.useRef(0),an=y.useRef(0),Gr=y.useRef(0),sn=y.useRef(null),[Xr,ya]=W.split("-"),mr=y.useMemo(()=>b.reduce((B,ke,Re)=>Re>=Ge?B:B+ke.height,0),[b,Ge]),fe=fb(),Ne=m.invert||f,oe=we==="loading";an.current=y.useMemo(()=>Ge*O+mr,[Ge,mr]),y.useEffect(()=>{Z.current=bn},[bn]),y.useEffect(()=>{H(!0)},[]),y.useEffect(()=>{let B=re.current;if(B){let ke=B.getBoundingClientRect().height;return q(ke),j(Re=>[{toastId:m.id,height:ke,position:m.position},...Re]),()=>j(Re=>Re.filter(lt=>lt.toastId!==m.id))}},[j,m.id]),y.useLayoutEffect(()=>{if(!A)return;let B=re.current,ke=B.style.height;B.style.height="auto";let Re=B.getBoundingClientRect().height;B.style.height=ke,q(Re),j(lt=>lt.find(nt=>nt.toastId===m.id)?lt.map(nt=>nt.toastId===m.id?{...nt,height:Re}:nt):[{toastId:m.id,height:Re,position:m.position},...lt])},[A,m.title,m.description,j,m.id]);let je=y.useCallback(()=>{J(!0),Ie(an.current),j(B=>B.filter(ke=>ke.toastId!==m.id)),setTimeout(()=>{x(m)},Cb)},[m,x,j,an]);y.useEffect(()=>{if(m.promise&&we==="loading"||m.duration===1/0||m.type==="loading")return;let B;return S||h||ie&&fe?(()=>{if(Gr.current<wn.current){let ke=new Date().getTime()-wn.current;Z.current=Z.current-ke}Gr.current=new Date().getTime()})():Z.current!==1/0&&(wn.current=new Date().getTime(),B=setTimeout(()=>{var ke;(ke=m.onAutoClose)==null||ke.call(m,m),je()},Z.current)),()=>clearTimeout(B)},[S,h,m,we,ie,fe,je]),y.useEffect(()=>{m.delete&&je()},[je,m.delete]);function tt(){var B,ke,Re;return X!=null&&X.loading?y.createElement("div",{className:Nt(R==null?void 0:R.loader,(B=m==null?void 0:m.classNames)==null?void 0:B.loader,"sonner-loader"),"data-visible":we==="loading"},X.loading):$?y.createElement("div",{className:Nt(R==null?void 0:R.loader,(ke=m==null?void 0:m.classNames)==null?void 0:ke.loader,"sonner-loader"),"data-visible":we==="loading"},$):y.createElement(sb,{className:Nt(R==null?void 0:R.loader,(Re=m==null?void 0:m.classNames)==null?void 0:Re.loader),visible:we==="loading"})}return y.createElement("li",{tabIndex:0,ref:re,className:Nt(k,vt,R==null?void 0:R.toast,(t=m==null?void 0:m.classNames)==null?void 0:t.toast,R==null?void 0:R.default,R==null?void 0:R[we],(n=m==null?void 0:m.classNames)==null?void 0:n[we]),"data-sonner-toast":"","data-rich-colors":(r=m.richColors)!=null?r:C,"data-styled":!(m.jsx||m.unstyled||_),"data-mounted":A,"data-promise":!!m.promise,"data-swiped":Ue,"data-removed":Q,"data-visible":Ce,"data-y-position":Xr,"data-x-position":ya,"data-index":w,"data-front":_e,"data-swiping":ae,"data-dismissible":We,"data-type":we,"data-invert":Ne,"data-swipe-out":me,"data-swipe-direction":U,"data-expanded":!!(S||L&&A),style:{"--index":w,"--toasts-before":w,"--z-index":N.length-w,"--offset":`${Q?Ze:an.current}px`,"--initial-height":L?"auto":`${ct}px`,...M,...m.style},onDragEnd:()=>{ce(!1),F(null),sn.current=null},onPointerDown:B=>{oe||!We||(he.current=new Date,Ie(an.current),B.target.setPointerCapture(B.pointerId),B.target.tagName!=="BUTTON"&&(ce(!0),sn.current={x:B.clientX,y:B.clientY}))},onPointerUp:()=>{var B,ke,Re,lt;if(me||!We)return;sn.current=null;let nt=Number(((B=re.current)==null?void 0:B.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),jt=Number(((ke=re.current)==null?void 0:ke.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Nn=new Date().getTime()-((Re=he.current)==null?void 0:Re.getTime()),wt=I==="x"?nt:jt,cn=Math.abs(wt)/Nn;if(Math.abs(wt)>=Sb||cn>.11){Ie(an.current),(lt=m.onDismiss)==null||lt.call(m,m),K(I==="x"?nt>0?"right":"left":jt>0?"down":"up"),je(),be(!0),Qe(!1);return}ce(!1),F(null)},onPointerMove:B=>{var ke,Re,lt,nt;if(!sn.current||!We||((ke=window.getSelection())==null?void 0:ke.toString().length)>0)return;let jt=B.clientY-sn.current.y,Nn=B.clientX-sn.current.x,wt=(Re=e.swipeDirections)!=null?Re:kb(W);!I&&(Math.abs(Nn)>1||Math.abs(jt)>1)&&F(Math.abs(Nn)>Math.abs(jt)?"x":"y");let cn={x:0,y:0};I==="y"?(wt.includes("top")||wt.includes("bottom"))&&(wt.includes("top")&&jt<0||wt.includes("bottom")&&jt>0)&&(cn.y=jt):I==="x"&&(wt.includes("left")||wt.includes("right"))&&(wt.includes("left")&&Nn<0||wt.includes("right")&&Nn>0)&&(cn.x=Nn),(Math.abs(cn.x)>0||Math.abs(cn.y)>0)&&Qe(!0),(lt=re.current)==null||lt.style.setProperty("--swipe-amount-x",`${cn.x}px`),(nt=re.current)==null||nt.style.setProperty("--swipe-amount-y",`${cn.y}px`)}},At&&!m.jsx?y.createElement("button",{"aria-label":de,"data-disabled":oe,"data-close-button":!0,onClick:oe||!We?()=>{}:()=>{var B;je(),(B=m.onDismiss)==null||B.call(m,m)},className:Nt(R==null?void 0:R.closeButton,(o=m==null?void 0:m.classNames)==null?void 0:o.closeButton)},(a=X==null?void 0:X.close)!=null?a:ub):null,m.jsx||y.isValidElement(m.title)?m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title:y.createElement(y.Fragment,null,we||m.icon||m.promise?y.createElement("div",{"data-icon":"",className:Nt(R==null?void 0:R.icon,(i=m==null?void 0:m.classNames)==null?void 0:i.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||tt():null,m.type!=="loading"?m.icon||(X==null?void 0:X[we])||ob(we):null):null,y.createElement("div",{"data-content":"",className:Nt(R==null?void 0:R.content,(c=m==null?void 0:m.classNames)==null?void 0:c.content)},y.createElement("div",{"data-title":"",className:Nt(R==null?void 0:R.title,(l=m==null?void 0:m.classNames)==null?void 0:l.title)},typeof m.title=="function"?m.title():m.title),m.description?y.createElement("div",{"data-description":"",className:Nt(z,bt,R==null?void 0:R.description,(d=m==null?void 0:m.classNames)==null?void 0:d.description)},typeof m.description=="function"?m.description():m.description):null),y.isValidElement(m.cancel)?m.cancel:m.cancel&&ro(m.cancel)?y.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||P,onClick:B=>{var ke,Re;ro(m.cancel)&&We&&((Re=(ke=m.cancel).onClick)==null||Re.call(ke,B),je())},className:Nt(R==null?void 0:R.cancelButton,(u=m==null?void 0:m.classNames)==null?void 0:u.cancelButton)},m.cancel.label):null,y.isValidElement(m.action)?m.action:m.action&&ro(m.action)?y.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||T,onClick:B=>{var ke,Re;ro(m.action)&&((Re=(ke=m.action).onClick)==null||Re.call(ke,B),!B.defaultPrevented&&je())},className:Nt(R==null?void 0:R.actionButton,(p=m==null?void 0:m.classNames)==null?void 0:p.actionButton)},m.action.label):null))};function Rc(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Eb(e,t){let n={};return[e,t].forEach((r,o)=>{let a=o===1,i=a?"--mobile-offset":"--offset",c=a?bb:vb;function l(d){["top","right","bottom","left"].forEach(u=>{n[`${i}-${u}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${i}-${d}`]=c:n[`${i}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):l(c)}),n}y.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:i,className:c,offset:l,mobileOffset:d,theme:u="light",richColors:p,duration:f,style:m,visibleToasts:_=xb,toastOptions:h,dir:j=Rc(),gap:v=Nb,loadingIcon:b,icons:w,containerAriaLabel:N="Notifications",pauseWhenPageIsHidden:S}=e,[x,C]=y.useState([]),E=y.useMemo(()=>Array.from(new Set([r].concat(x.filter(ie=>ie.position).map(ie=>ie.position)))),[x,r]),[M,P]=y.useState([]),[T,k]=y.useState(!1),[z,D]=y.useState(!1),[W,O]=y.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=y.useRef(null),L=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=y.useRef(null),X=y.useRef(!1),de=y.useCallback(ie=>{C(I=>{var F;return(F=I.find(U=>U.id===ie.id))!=null&&F.delete||st.dismiss(ie.id),I.filter(({id:U})=>U!==ie.id)})},[]);return y.useEffect(()=>st.subscribe(ie=>{if(ie.dismiss){C(I=>I.map(F=>F.id===ie.id?{...F,delete:!0}:F));return}setTimeout(()=>{Ns.flushSync(()=>{C(I=>{let F=I.findIndex(U=>U.id===ie.id);return F!==-1?[...I.slice(0,F),{...I[F],...ie},...I.slice(F+1)]:[ie,...I]})})})}),[]),y.useEffect(()=>{if(u!=="system"){O(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?O("dark"):O("light")),typeof window>"u")return;let ie=window.matchMedia("(prefers-color-scheme: dark)");try{ie.addEventListener("change",({matches:I})=>{O(I?"dark":"light")})}catch{ie.addListener(({matches:F})=>{try{O(F?"dark":"light")}catch(U){console.error(U)}})}},[u]),y.useEffect(()=>{x.length<=1&&k(!1)},[x]),y.useEffect(()=>{let ie=I=>{var F,U;o.every(K=>I[K]||I.code===K)&&(k(!0),(F=$.current)==null||F.focus()),I.code==="Escape"&&(document.activeElement===$.current||(U=$.current)!=null&&U.contains(document.activeElement))&&k(!1)};return document.addEventListener("keydown",ie),()=>document.removeEventListener("keydown",ie)},[o]),y.useEffect(()=>{if($.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,X.current=!1)}},[$.current]),y.createElement("section",{ref:t,"aria-label":`${N} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},E.map((ie,I)=>{var F;let[U,K]=ie.split("-");return x.length?y.createElement("ol",{key:ie,dir:j==="auto"?Rc():j,tabIndex:-1,ref:$,className:c,"data-sonner-toaster":!0,"data-theme":W,"data-y-position":U,"data-lifted":T&&x.length>1&&!a,"data-x-position":K,style:{"--front-toast-height":`${((F=M[0])==null?void 0:F.height)||0}px`,"--width":`${wb}px`,"--gap":`${v}px`,...m,...Eb(l,d)},onBlur:A=>{X.current&&!A.currentTarget.contains(A.relatedTarget)&&(X.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:A=>{A.target instanceof HTMLElement&&A.target.dataset.dismissible==="false"||X.current||(X.current=!0,R.current=A.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{z||k(!1)},onDragEnd:()=>k(!1),onPointerDown:A=>{A.target instanceof HTMLElement&&A.target.dataset.dismissible==="false"||D(!0)},onPointerUp:()=>D(!1)},x.filter(A=>!A.position&&I===0||A.position===ie).map((A,H)=>{var Q,J;return y.createElement(Pb,{key:A.id,icons:w,index:H,toast:A,defaultRichColors:p,duration:(Q=h==null?void 0:h.duration)!=null?Q:f,className:h==null?void 0:h.className,descriptionClassName:h==null?void 0:h.descriptionClassName,invert:n,visibleToasts:_,closeButton:(J=h==null?void 0:h.closeButton)!=null?J:i,interacting:z,position:ie,style:h==null?void 0:h.style,unstyled:h==null?void 0:h.unstyled,classNames:h==null?void 0:h.classNames,cancelButtonStyle:h==null?void 0:h.cancelButtonStyle,actionButtonStyle:h==null?void 0:h.actionButtonStyle,removeToast:de,toasts:x.filter(ae=>ae.position==A.position),heights:M.filter(ae=>ae.position==A.position),setHeights:P,expandByDefault:a,gap:v,loadingIcon:b,expanded:T,pauseWhenPageIsHidden:S,swipeDirections:e.swipeDirections})})):null}))});function Mb({readOnly:e=!1}){const{t}=ve(),{exportJourneySpec:n,importJourneySpec:r}=pt(),o=n(),a=JSON.stringify(o,null,2),[i,c]=y.useState(a),[l,d]=y.useState(null),[u,p]=y.useState(null),f=y.useRef(null),m=y.useRef(),_=i!==a,h=x=>{p(x),clearTimeout(m.current),m.current=setTimeout(()=>{p(null)},2200)};y.useEffect(()=>()=>{clearTimeout(m.current)},[]);const j=x=>u===x?s.jsx(ql,{"aria-label":"Success",className:"cj-h-3.5 cj-w-3.5 cj-ml-1 cj-text-green-600"}):null,v=()=>{c(JSON.stringify(n(),null,2)),d(null),h("refresh")},b=(x,C)=>{try{const E=JSON.parse(x);r(E),c(JSON.stringify(E,null,2)),d(null),h(C),Mn.success(t("fc_json_imported_ok"))}catch(E){d(E instanceof Error?E.message:t("fc_json_invalid")),Mn.error(t("fc_json_invalid"))}},w=x=>{var M;const C=(M=x.target.files)==null?void 0:M[0];if(!C)return;const E=new FileReader;E.onload=P=>{var k;const T=(k=P.target)==null?void 0:k.result;b(T,"upload")},E.onerror=()=>{Mn.error(t("fc_json_file_error"))},E.readAsText(C),x.target.value=""},N=()=>{navigator.clipboard.writeText(i).then(()=>{h("copy"),Mn.success(t("fc_json_copied"))})},S=()=>{const x=new Blob([i],{type:"application/json"}),C=URL.createObjectURL(x),E=document.createElement("a");E.href=C,E.download=`${o.journey_id}.json`,E.click(),URL.revokeObjectURL(C),h("download")};return s.jsx("div",{className:"cj-h-full cj-overflow-auto cj-p-6",children:s.jsxs("div",{className:"cj-max-w-4xl cj-mx-auto cj-w-full cj-bg-card cj-border cj-border-border cj-rounded-2xl cj-p-6 cj-flex cj-flex-col cj-gap-2 cj-min-h-full",children:[s.jsx("h2",{className:"cj-text-lg cj-font-semibold",children:t("fc_json_title")}),s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:t("fc_json_hint")}),s.jsxs("div",{className:"cj-flex cj-flex-wrap cj-gap-2",children:[s.jsxs(te,{size:"sm",variant:"outline",onClick:v,title:t("fc_json_refresh_hint"),children:[t("fc_json_refresh"),j("refresh")]}),s.jsxs(te,{size:"sm",variant:"outline",onClick:N,children:[s.jsx(T_,{className:"cj-h-3.5 cj-w-3.5 cj-mr-1"}),t("fc_json_copy"),j("copy")]}),s.jsxs(te,{size:"sm",variant:"outline",onClick:S,children:[s.jsx(A_,{className:"cj-h-3.5 cj-w-3.5 cj-mr-1"}),t("fc_json_download"),j("download")]}),!e&&s.jsxs(s.Fragment,{children:[s.jsxs(te,{size:"sm",variant:"outline",onClick:()=>{var x;return(x=f.current)==null?void 0:x.click()},children:[s.jsx(W_,{className:"cj-h-3.5 cj-w-3.5 cj-mr-1"}),t("fc_json_upload"),j("upload")]}),s.jsxs(te,{size:"sm",onClick:()=>b(i,"apply"),disabled:!_,title:t("fc_json_apply_hint"),children:[s.jsx(Es,{className:"cj-h-3.5 cj-w-3.5 cj-mr-1"}),t("fc_json_import"),j("apply")]}),s.jsx("input",{ref:f,type:"file",accept:".json,application/json",hidden:!0,onChange:w})]})]}),l&&s.jsx("div",{className:"cj-rounded-lg cj-border cj-border-destructive/40 cj-bg-destructive/10 cj-text-destructive cj-text-xs cj-p-2 cj-font-mono",children:l}),s.jsx(Br,{value:i,onChange:x=>c(x.target.value),className:"cj-flex-1 cj-font-mono cj-text-xs",readOnly:e})]})})}function Db(e){const t=[];if(e.steps.length===0)return t;const n=new Map;for(const f of e.steps)n.set(f.step_id,f);for(const f of e.steps)for(const m of f.navigation.rules)m.next_step_id!=="__submit__"&&(n.has(m.next_step_id)||t.push({type:"error",category:"broken-reference",message:`Navigation rule targets non-existent step "${m.next_step_id}".`,stepIds:[f.step_id]}));const r=new Set;if(e.steps.length>0){const f=[e.steps[0].step_id];for(r.add(e.steps[0].step_id);f.length>0;){const m=f.shift(),_=n.get(m);if(_)for(const h of _.navigation.rules)h.next_step_id!=="__submit__"&&!r.has(h.next_step_id)&&n.has(h.next_step_id)&&(r.add(h.next_step_id),f.push(h.next_step_id))}}for(const f of e.steps)r.has(f.step_id)||t.push({type:"warning",category:"unreachable-step",message:`Step "${f.title}" cannot be reached from the first step.`,stepIds:[f.step_id]});const o=new Map;for(const f of e.steps){o.has(f.step_id)||o.set(f.step_id,[]);for(const m of f.navigation.rules)m.next_step_id!=="__submit__"&&(o.has(m.next_step_id)||o.set(m.next_step_id,[]),o.get(m.next_step_id).push(f.step_id))}const a=new Set,i=[];for(const f of e.steps)for(const m of f.navigation.rules)if(m.next_step_id==="__submit__"){a.add(f.step_id),i.push(f.step_id);break}for(;i.length>0;){const f=i.shift(),m=o.get(f)||[];for(const _ of m)a.has(_)||(a.add(_),i.push(_))}for(const f of e.steps)f.navigation.rules.length!==0&&(a.has(f.step_id)||t.push({type:"error",category:"dead-end",message:`Step "${f.title}" has navigation rules but none lead to form submission.`,stepIds:[f.step_id]}));const c=new Map;for(const f of e.steps){c.has(f.step_id)||c.set(f.step_id,[]);for(const m of f.navigation.rules)m.next_step_id!=="__submit__"&&n.has(m.next_step_id)&&c.get(f.step_id).push(m.next_step_id)}const l=new Set,d=new Set,u=new Set;function p(f){l.add(f),d.add(f);let m=!1;for(const _ of c.get(f)||[])d.has(_)?(u.add(f),u.add(_),m=!0):l.has(_)||p(_)&&(m=!0);return d.delete(f),m}for(const f of e.steps)l.has(f.step_id)||p(f.step_id);if(u.size>0){const f=[...u].map(m=>{var _;return((_=n.get(m))==null?void 0:_.title)||m}).join(", ");t.push({type:"error",category:"cycle",message:`Navigation cycle detected involving: ${f}`,stepIds:[...u]})}for(const f of e.steps){if(f.navigation.rules.length<=1)continue;f.navigation.rules.some(_=>_.condition===null)||t.push({type:"warning",category:"no-fallback-rule",message:`Step "${f.title}" has multiple rules but no unconditional fallback rule.`,stepIds:[f.step_id]})}return t}const Tb=Rr("cj-relative cj-w-full cj-rounded-lg cj-border cj-p-4 [&>svg~*]:cj-pl-7 [&>svg+div]:cj-translate-y-[-3px] [&>svg]:cj-absolute [&>svg]:cj-left-4 [&>svg]:cj-top-4 [&>svg]:cj-text-foreground",{variants:{variant:{default:"cj-bg-background cj-text-foreground",destructive:"cj-border-destructive/50 cj-text-destructive dark:cj-border-destructive [&>svg]:cj-text-destructive"}},defaultVariants:{variant:"default"}}),ps=g.forwardRef(({className:e,variant:t,...n},r)=>s.jsx("div",{ref:r,role:"alert",className:ne(Tb({variant:t}),e),...n}));ps.displayName="Alert";const hs=g.forwardRef(({className:e,...t},n)=>s.jsx("h5",{ref:n,className:ne("cj-mb-1 cj-font-medium cj-leading-none cj-tracking-tight",e),...t}));hs.displayName="AlertTitle";const _s=g.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:ne("cj-text-sm [&_p]:cj-leading-relaxed",e),...t}));_s.displayName="AlertDescription";function Rb(e){const t=Ab(e),n=g.forwardRef((r,o)=>{const{children:a,...i}=r,c=g.Children.toArray(a),l=c.find(zb);if(l){const d=l.props.children,u=c.map(p=>p===l?g.Children.count(d)>1?g.Children.only(null):g.isValidElement(d)?d.props.children:null:p);return s.jsx(t,{...i,ref:o,children:g.isValidElement(d)?g.cloneElement(d,void 0,u):null})}return s.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function Ab(e){const t=g.forwardRef((n,r)=>{const{children:o,...a}=n;if(g.isValidElement(o)){const i=Wb(o),c=Ib(a,o.props);return o.type!==g.Fragment&&(c.ref=r?Wn(r,i):i),g.cloneElement(o,c)}return g.Children.count(o)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ob=Symbol("radix.slottable");function zb(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ob}function Ib(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...c)=>{const l=a(...c);return o(...c),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Wb(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var fa="Popover",[cm]=_t(fa,[ra]),Hr=ra(),[Fb,vn]=cm(fa),lm=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,c=Hr(t),l=g.useRef(null),[d,u]=g.useState(!1),[p,f]=tn({prop:r,defaultProp:o??!1,onChange:a,caller:fa});return s.jsx(nf,{...c,children:s.jsx(Fb,{scope:t,contentId:Lt(),triggerRef:l,open:p,onOpenChange:f,onOpenToggle:g.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:d,onCustomAnchorAdd:g.useCallback(()=>u(!0),[]),onCustomAnchorRemove:g.useCallback(()=>u(!1),[]),modal:i,children:n})})};lm.displayName=fa;var dm="PopoverAnchor",$b=g.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=vn(dm,n),a=Hr(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:c}=o;return g.useEffect(()=>(i(),()=>c()),[i,c]),s.jsx(ni,{...a,...r,ref:t})});$b.displayName=dm;var um="PopoverTrigger",fm=g.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=vn(um,n),a=Hr(n),i=xe(t,o.triggerRef),c=s.jsx(le.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":gm(o.open),...r,ref:i,onClick:se(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?c:s.jsx(ni,{asChild:!0,...a,children:c})});fm.displayName=um;var fi="PopoverPortal",[Lb,Bb]=cm(fi,{forceMount:void 0}),mm=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=vn(fi,t);return s.jsx(Lb,{scope:t,forceMount:n,children:s.jsx(gt,{present:n||a.open,children:s.jsx(Go,{asChild:!0,container:o,children:r})})})};mm.displayName=fi;var or="PopoverContent",pm=g.forwardRef((e,t)=>{const n=Bb(or,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=vn(or,e.__scopePopover);return s.jsx(gt,{present:r||a.open,children:a.modal?s.jsx(qb,{...o,ref:t}):s.jsx(Yb,{...o,ref:t})})});pm.displayName=or;var Hb=Rb("PopoverContent.RemoveScroll"),qb=g.forwardRef((e,t)=>{const n=vn(or,e.__scopePopover),r=g.useRef(null),o=xe(t,r),a=g.useRef(!1);return g.useEffect(()=>{const i=r.current;if(i)return Ls(i)},[]),s.jsx(Ko,{as:Hb,allowPinchZoom:!0,children:s.jsx(hm,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:se(e.onCloseAutoFocus,i=>{var c;i.preventDefault(),a.current||(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:se(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,d=c.button===2||l;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:se(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Yb=g.forwardRef((e,t)=>{const n=vn(or,e.__scopePopover),r=g.useRef(!1),o=g.useRef(!1);return s.jsx(hm,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,c;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(r.current||(c=n.triggerRef.current)==null||c.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var l,d;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),hm=g.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:u,...p}=e,f=vn(or,n),m=Hr(n);return $s(),s.jsx(Uo,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:s.jsx(Vo,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:u,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:s.jsx(rf,{"data-state":gm(f.open),role:"dialog",id:f.contentId,...m,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),_m="PopoverClose",Vb=g.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=vn(_m,n);return s.jsx(le.button,{type:"button",...r,ref:t,onClick:se(e.onClick,()=>o.onOpenChange(!1))})});Vb.displayName=_m;var Ub="PopoverArrow",Gb=g.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Hr(n);return s.jsx(of,{...o,...r,ref:t})});Gb.displayName=Ub;function gm(e){return e?"open":"closed"}var Xb=lm,Kb=fm,Jb=mm,jm=pm;const ma=Xb,pa=Kb,qr=g.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>{const a=ca();return s.jsx(Jb,{container:a??void 0,children:s.jsx(jm,{ref:o,align:t,sideOffset:n,className:ne("cj-z-50 cj-w-72 cj-rounded-md cj-border cj-bg-popover cj-p-4 cj-text-popover-foreground cj-shadow-md cj-outline-none data-[state=open]:cj-animate-in data-[state=closed]:cj-animate-out data-[state=closed]:cj-fade-out-0 data-[state=open]:cj-fade-in-0 data-[state=closed]:cj-zoom-out-95 data-[state=open]:cj-zoom-in-95 data-[side=bottom]:cj-slide-in-from-top-2 data-[side=left]:cj-slide-in-from-right-2 data-[side=right]:cj-slide-in-from-left-2 data-[side=top]:cj-slide-in-from-bottom-2",e),...r})})});qr.displayName=jm.displayName;function Qb(){const e=pt(m=>m.formConfig),t=pt(m=>m.setActiveStep),[n,r]=y.useState(!1),{t:o}=ve(),a=y.useMemo(()=>Db(e),[e]),i=y.useMemo(()=>{const m={},_=[];for(const h of a){const j=h.stepIds||[];if(j.length>0){const v=j[0];m[v]||(m[v]=[]),m[v].push(h)}else _.push(h)}return{byStep:m,general:_}},[a]),c=a.filter(m=>m.type==="error"),l=a.filter(m=>m.type==="warning"),d=m=>{var _;(_=m.stepIds)!=null&&_[0]&&t(m.stepIds[0])},u=a.length,p=m=>{var _;return((_=e.steps.find(h=>h.step_id===m))==null?void 0:_.title)||m},f=m=>o("fc_flow_validation_"+m.replace(/-/g,"_"))||m.replace(/-/g," ");return s.jsxs(ma,{open:n,onOpenChange:r,children:[s.jsx(pa,{asChild:!0,children:s.jsxs(te,{variant:"outline",size:"sm",className:c.length>0?"cj-border-destructive cj-text-destructive hover:cj-text-destructive":l.length>0?"cj-border-yellow-500 cj-text-yellow-600 hover:cj-text-yellow-600":"",children:[s.jsx(K_,{className:"cj-h-4 cj-w-4 cj-mr-1"}),o("fc_flow_validation_validate"),u>0&&s.jsx(it,{variant:c.length>0?"destructive":"secondary",className:"cj-ml-1.5 cj-h-5 cj-min-w-5 cj-px-1 cj-text-xs",children:u})]})}),s.jsxs(qr,{className:"cj-w-96 cj-p-0",align:"end",children:[s.jsxs("div",{className:"cj-p-3 cj-border-b",children:[s.jsx("h4",{className:"cj-font-semibold cj-text-sm",children:o("fc_flow_validation_title")}),s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-mt-0.5",children:a.length===0?o("fc_flow_validation_no_issues"):`${c.length} error(s), ${l.length} warning(s)`})]}),a.length===0?s.jsxs("div",{className:"cj-p-6 cj-flex cj-flex-col cj-items-center cj-gap-2 cj-text-muted-foreground",children:[s.jsx(Ui,{className:"cj-h-8 cj-w-8 cj-text-green-500"}),s.jsx("span",{className:"cj-text-sm cj-font-medium",children:o("fc_flow_validation_good")})]}):s.jsx(qt,{className:"cj-max-h-80",children:s.jsxs("div",{className:"cj-p-2 cj-space-y-1",children:[Object.entries(i.byStep).map(([m,_])=>{const h=_.filter(j=>j.type==="error");return s.jsxs(ds,{defaultOpen:_.length>0,children:[s.jsxs(us,{className:"cj-flex cj-items-center cj-gap-2 cj-w-full cj-px-2 cj-py-1.5 cj-rounded hover:cj-bg-accent/50 cj-transition-colors cj-text-sm cj-font-medium",children:[s.jsx(Ht,{className:"cj-h-3.5 cj-w-3.5 cj-text-muted-foreground cj-transition-transform [[data-state=closed]>&]:cj-rotate-[-90deg]"}),s.jsx("span",{children:p(m)}),_.length===0?s.jsx(Ui,{className:"cj-h-3.5 cj-w-3.5 cj-text-green-500 cj-ml-auto"}):s.jsx(it,{variant:h.length>0?"destructive":"secondary",className:"cj-ml-auto cj-h-5 cj-min-w-5 cj-px-1 cj-text-xs",children:_.length})]}),s.jsx(fs,{children:_.length===0?s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-pl-8 cj-py-1",children:o("fc_flow_validation_no_issues_step")}):s.jsx("div",{className:"cj-pl-2 cj-pr-1 cj-pb-1 cj-space-y-1.5",children:_.map((j,v)=>s.jsxs(ps,{variant:j.type==="error"?"destructive":"default",className:"cj-cursor-pointer hover:cj-bg-accent/50 cj-transition-colors cj-py-2",onClick:()=>d(j),children:[j.type==="error"?s.jsx(Gi,{className:"cj-h-4 cj-w-4"}):s.jsx(Xi,{className:"cj-h-4 cj-w-4 cj-text-yellow-500"}),s.jsx(hs,{className:"cj-text-xs cj-font-semibold cj-uppercase cj-tracking-wide",children:f(j.category)}),s.jsx(_s,{className:"cj-text-xs",children:j.message})]},v))})})]},m)}),i.general.length>0&&s.jsxs(ds,{defaultOpen:!0,children:[s.jsxs(us,{className:"cj-flex cj-items-center cj-gap-2 cj-w-full cj-px-2 cj-py-1.5 cj-rounded hover:cj-bg-accent/50 cj-transition-colors cj-text-sm cj-font-medium",children:[s.jsx(Ht,{className:"cj-h-3.5 cj-w-3.5 cj-text-muted-foreground cj-transition-transform [[data-state=closed]>&]:cj-rotate-[-90deg]"}),s.jsx("span",{children:o("fc_flow_validation_general")}),s.jsx(it,{variant:"secondary",className:"cj-ml-auto cj-h-5 cj-min-w-5 cj-px-1 cj-text-xs",children:i.general.length})]}),s.jsx(fs,{children:s.jsx("div",{className:"cj-pl-2 cj-pr-1 cj-pb-1 cj-space-y-1.5",children:i.general.map((m,_)=>s.jsxs(ps,{variant:m.type==="error"?"destructive":"default",className:"cj-cursor-pointer hover:cj-bg-accent/50 cj-transition-colors cj-py-2",onClick:()=>d(m),children:[m.type==="error"?s.jsx(Gi,{className:"cj-h-4 cj-w-4"}):s.jsx(Xi,{className:"cj-h-4 cj-w-4 cj-text-yellow-500"}),s.jsx(hs,{className:"cj-text-xs cj-font-semibold cj-uppercase cj-tracking-wide",children:f(m.category)}),s.jsx(_s,{className:"cj-text-xs",children:m.message})]},_))})})]})]})})]})]})}const Zb=Ys,ew=su,tw=Vs,ym=g.forwardRef(({className:e,...t},n)=>s.jsx(zr,{className:ne("cj-fixed cj-inset-0 cj-z-50 cj-bg-black/80 data-[state=open]:cj-animate-in data-[state=closed]:cj-animate-out data-[state=closed]:cj-fade-out-0 data-[state=open]:cj-fade-in-0",e),...t,ref:n}));ym.displayName=zr.displayName;const nw=Rr("cj-fixed cj-z-50 cj-gap-4 cj-bg-background cj-p-6 cj-shadow-lg cj-transition cj-ease-in-out data-[state=open]:cj-animate-in data-[state=closed]:cj-animate-out data-[state=closed]:cj-duration-300 data-[state=open]:cj-duration-500",{variants:{side:{top:"cj-inset-x-0 cj-top-0 cj-border-b data-[state=closed]:cj-slide-out-to-top data-[state=open]:cj-slide-in-from-top",bottom:"cj-inset-x-0 cj-bottom-0 cj-border-t data-[state=closed]:cj-slide-out-to-bottom data-[state=open]:cj-slide-in-from-bottom",left:"cj-inset-y-0 cj-left-0 cj-h-full cj-w-3/4 cj-border-r data-[state=closed]:cj-slide-out-to-left data-[state=open]:cj-slide-in-from-left sm:cj-max-w-sm",right:"cj-inset-y-0 cj-right-0 cj-h-full cj-w-3/4 cj-border-l data-[state=closed]:cj-slide-out-to-right data-[state=open]:cj-slide-in-from-right sm:cj-max-w-sm"}},defaultVariants:{side:"right"}}),xm=g.forwardRef(({side:e="right",className:t,children:n,...r},o)=>s.jsxs(tw,{children:[s.jsx(ym,{}),s.jsxs(Ir,{ref:o,className:ne(nw({side:e}),t),...r,children:[n,s.jsxs(Qo,{className:"cj-absolute cj-right-4 cj-top-4 cj-rounded-sm cj-opacity-70 cj-ring-offset-background cj-transition-opacity data-[state=open]:cj-bg-secondary hover:cj-opacity-100 focus:cj-outline-none focus:cj-ring-2 focus:cj-ring-ring focus:cj-ring-offset-2 disabled:cj-pointer-events-none",children:[s.jsx(Tt,{className:"cj-h-4 cj-w-4"}),s.jsx("span",{className:"cj-sr-only",children:"Close"})]})]})]}));xm.displayName=Ir.displayName;const vm=({className:e,...t})=>s.jsx("div",{className:ne("cj-flex cj-flex-col cj-space-y-2 cj-text-center sm:cj-text-left",e),...t});vm.displayName="SheetHeader";const bm=g.forwardRef(({className:e,...t},n)=>s.jsx(Wr,{ref:n,className:ne("cj-text-lg cj-font-semibold cj-text-foreground",e),...t}));bm.displayName=Wr.displayName;const rw=g.forwardRef(({className:e,...t},n)=>s.jsx(Fr,{ref:n,className:ne("cj-text-sm cj-text-muted-foreground",e),...t}));rw.displayName=Fr.displayName;const wm={compact:"8px",cozy:"16px",spacious:"24px"};function Nm(e){if(!e)return[];const t=[];return e.primaryColor&&t.push(`--claims-journey-primary: ${e.primaryColor};`),e.backgroundColor&&t.push(`--claims-journey-background: ${e.backgroundColor};`),e.cardColor&&t.push(`--claims-journey-card: ${e.cardColor};`),e.foregroundColor&&t.push(`--claims-journey-foreground: ${e.foregroundColor};`),e.fontFamilyHeading&&t.push(`--claims-journey-font-heading: ${e.fontFamilyHeading};`),e.fontFamilyBody&&t.push(`--claims-journey-font-body: ${e.fontFamilyBody};`),e.borderRadius!==void 0&&t.push(`--claims-journey-radius: ${e.borderRadius}rem;`),e.spacing&&t.push(`--claims-journey-spacing: ${wm[e.spacing]};`),e.fontSizeBase!==void 0&&t.push(`font-size: ${e.fontSizeBase}px;`),t}function ow(e,t){const n=Nm(e);return n.length?`${t} { ${n.join(" ")} }`:null}function Sm(e){const t={};return e&&(e.primaryColor&&(t["--claims-journey-primary"]=e.primaryColor),e.backgroundColor&&(t["--claims-journey-background"]=e.backgroundColor),e.cardColor&&(t["--claims-journey-card"]=e.cardColor),e.foregroundColor&&(t["--claims-journey-foreground"]=e.foregroundColor),e.fontFamilyHeading&&(t["--claims-journey-font-heading"]=e.fontFamilyHeading),e.fontFamilyBody&&(t["--claims-journey-font-body"]=e.fontFamilyBody),e.borderRadius!==void 0&&(t["--claims-journey-radius"]=`${e.borderRadius}rem`),e.spacing&&(t["--claims-journey-spacing"]=wm[e.spacing]),e.fontSizeBase!==void 0&&(t.fontSize=`${e.fontSizeBase}px`)),t}const Ac=[{label:"Poppins (default)",value:"'Poppins', sans-serif"},{label:"Roboto (default)",value:"'Roboto', sans-serif"},{label:"Inter",value:"'Inter', sans-serif"},{label:"System UI",value:"system-ui, sans-serif"},{label:"Georgia",value:"Georgia, serif"}];function aw(e){if(!e)return"#000000";const t=e.trim().match(/^(\d+(?:\.\d+)?)\s+(\d+(?:\.\d+)?)%\s+(\d+(?:\.\d+)?)%$/);if(!t)return"#000000";const n=parseFloat(t[1])/360,r=parseFloat(t[2])/100,o=parseFloat(t[3])/100,a=(u,p,f)=>(f<0&&(f+=1),f>1&&(f-=1),f<1/6?u+(p-u)*6*f:f<1/2?p:f<2/3?u+(p-u)*(2/3-f)*6:u);let i,c,l;if(r===0)i=c=l=o;else{const u=o<.5?o*(1+r):o+r-o*r,p=2*o-u;i=a(p,u,n+1/3),c=a(p,u,n),l=a(p,u,n-1/3)}const d=u=>Math.round(u*255).toString(16).padStart(2,"0");return`#${d(i)}${d(c)}${d(l)}`}function sw(e){const t=e.replace("#","").match(/^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i);if(!t)return"0 0% 0%";const n=parseInt(t[1],16)/255,r=parseInt(t[2],16)/255,o=parseInt(t[3],16)/255,a=Math.max(n,r,o),i=Math.min(n,r,o);let c=0,l=0;const d=(a+i)/2;if(a!==i){const u=a-i;switch(l=d>.5?u/(2-a-i):u/(a+i),a){case n:c=(r-o)/u+(r<o?6:0);break;case r:c=(o-n)/u+2;break;case o:c=(n-r)/u+4;break}c/=6}return`${Math.round(c*360)} ${Math.round(l*100)}% ${Math.round(d*100)}%`}function oo({label:e,value:t,onChange:n}){const{t:r}=ve(),o=aw(t);return s.jsxs("div",{className:"cj-space-y-1",children:[s.jsx(Y,{className:"cj-text-xs",children:e}),s.jsxs("div",{className:"cj-flex cj-gap-2 cj-items-center",children:[s.jsx("input",{type:"color",value:o,onChange:a=>n(sw(a.target.value)),className:"cj-h-9 cj-w-12 cj-rounded-md cj-border cj-border-input cj-bg-background cj-cursor-pointer cj-p-1","aria-label":r("theme_color_picker_aria",{label:e})}),s.jsx(pe,{value:t||"",onChange:a=>n(a.target.value),placeholder:r("theme_color_placeholder"),className:"cj-h-9 cj-text-xs cj-font-mono cj-flex-1"})]}),s.jsx("p",{className:"cj-text-[10px] cj-text-muted-foreground",children:r("theme_color_hint")})]})}function iw(){const{t:e}=ve(),{theme:t,updateTheme:n,resetTheme:r}=pt(),[o,a]=y.useState(null),i=l=>n(l),c=Sm(t);return s.jsxs(Zb,{children:[s.jsx(ew,{asChild:!0,children:s.jsxs(te,{size:"sm",variant:"outline",children:[s.jsx(q_,{className:"cj-h-4 cj-w-4 cj-mr-1"}),e("theme_button")]})}),s.jsx(xm,{className:"cj-w-[360px] sm:cj-w-[420px] cj-overflow-y-auto",ref:a,children:s.jsxs(ia.Provider,{value:o,children:[s.jsx(vm,{children:s.jsxs(bm,{className:"cj-flex cj-items-center cj-justify-between",children:[s.jsx("span",{children:e("theme_button")}),s.jsxs(te,{size:"sm",variant:"ghost",onClick:()=>r(),children:[s.jsx(Ul,{className:"cj-h-3 cj-w-3 cj-mr-1"}),e("theme_reset")]})]})}),s.jsxs("div",{className:"cj-space-y-4 cj-mt-4",children:[s.jsxs("section",{className:"cj-space-y-3",children:[s.jsx("h4",{className:"cj-text-xs cj-font-semibold cj-uppercase cj-tracking-wide cj-text-muted-foreground",children:e("theme_colors")}),s.jsx(oo,{label:e("theme_primary"),value:t.primaryColor,onChange:l=>i({primaryColor:l})}),s.jsx(oo,{label:e("theme_background"),value:t.backgroundColor,onChange:l=>i({backgroundColor:l})}),s.jsx(oo,{label:e("theme_card"),value:t.cardColor,onChange:l=>i({cardColor:l})}),s.jsx(oo,{label:e("theme_foreground"),value:t.foregroundColor,onChange:l=>i({foregroundColor:l})})]}),s.jsxs("section",{className:"cj-space-y-3",children:[s.jsx("h4",{className:"cj-text-xs cj-font-semibold cj-uppercase cj-tracking-wide cj-text-muted-foreground",children:e("theme_typography")}),s.jsxs("div",{className:"cj-space-y-1",children:[s.jsx(Y,{className:"cj-text-xs",children:e("theme_heading_font")}),s.jsxs(Ae,{value:t.fontFamilyHeading||void 0,onValueChange:l=>i({fontFamilyHeading:l}),children:[s.jsx(De,{className:"cj-h-9 cj-text-xs",children:s.jsx(Oe,{placeholder:e("theme_font_default")})}),s.jsx(Te,{children:Ac.map(l=>s.jsx(V,{value:l.value,children:l.label},l.value))})]})]}),s.jsxs("div",{className:"cj-space-y-1",children:[s.jsx(Y,{className:"cj-text-xs",children:e("theme_body_font")}),s.jsxs(Ae,{value:t.fontFamilyBody||void 0,onValueChange:l=>i({fontFamilyBody:l}),children:[s.jsx(De,{className:"cj-h-9 cj-text-xs",children:s.jsx(Oe,{placeholder:e("theme_font_default")})}),s.jsx(Te,{children:Ac.map(l=>s.jsx(V,{value:l.value,children:l.label},l.value))})]})]}),s.jsxs("div",{className:"cj-space-y-1",children:[s.jsx(Y,{className:"cj-text-xs",children:e("theme_font_size")}),s.jsx(pe,{type:"number",min:12,max:24,value:t.fontSizeBase??"",onChange:l=>i({fontSizeBase:l.target.value?Number(l.target.value):void 0}),placeholder:"16",className:"cj-h-9 cj-text-xs"})]})]}),s.jsxs("section",{className:"cj-space-y-3",children:[s.jsx("h4",{className:"cj-text-xs cj-font-semibold cj-uppercase cj-tracking-wide cj-text-muted-foreground",children:e("theme_shape_spacing")}),s.jsxs("div",{className:"cj-space-y-1",children:[s.jsx(Y,{className:"cj-text-xs",children:e("theme_border_radius")}),s.jsx(pe,{type:"number",step:"0.125",min:0,max:2,value:t.borderRadius??"",onChange:l=>i({borderRadius:l.target.value?Number(l.target.value):void 0}),placeholder:"0.75",className:"cj-h-9 cj-text-xs"})]}),s.jsxs("div",{className:"cj-space-y-1",children:[s.jsx(Y,{className:"cj-text-xs",children:e("theme_spacing")}),s.jsxs(Ae,{value:t.spacing||void 0,onValueChange:l=>i({spacing:l}),children:[s.jsx(De,{className:"cj-h-9 cj-text-xs",children:s.jsx(Oe,{placeholder:e("theme_spacing_cozy_default")})}),s.jsxs(Te,{children:[s.jsx(V,{value:"compact",children:e("theme_spacing_compact")}),s.jsx(V,{value:"cozy",children:e("theme_spacing_cozy")}),s.jsx(V,{value:"spacious",children:e("theme_spacing_spacious")})]})]})]})]}),s.jsxs("section",{className:"cj-space-y-2",children:[s.jsx("h4",{className:"cj-text-xs cj-font-semibold cj-uppercase cj-tracking-wide cj-text-muted-foreground",children:e("theme_live_preview")}),s.jsx("div",{className:"jb-widget-root jb-themed cj-rounded-lg cj-border cj-border-border cj-bg-background cj-text-foreground",style:{...c,padding:"var(--claims-journey-spacing, 16px)"},children:s.jsxs("div",{className:"cj-rounded-lg cj-border cj-border-border cj-bg-card cj-text-foreground",style:{padding:"var(--claims-journey-spacing, 16px)",display:"flex",flexDirection:"column",gap:"calc(var(--claims-journey-spacing, 16px) / 2)"},children:[s.jsx("h3",{className:"cj-m-0 cj-text-lg cj-font-semibold",style:{fontFamily:"var(--claims-journey-font-heading)"},children:e("theme_heading_sample")}),s.jsx("p",{className:"cj-m-0 cj-text-sm cj-text-muted-foreground",style:{fontFamily:"var(--claims-journey-font-body)"},children:e("theme_body_sample")}),s.jsx("input",{className:"cj-w-full cj-border cj-border-input cj-bg-background cj-text-foreground cj-text-sm cj-px-3 cj-rounded-md",style:{fontFamily:"var(--claims-journey-font-body)",borderRadius:"var(--claims-journey-radius)",minHeight:"calc(var(--claims-journey-spacing, 16px) * 2 + 16px)"},placeholder:e("theme_input_sample"),readOnly:!0}),s.jsx("button",{type:"button",className:"cj-bg-primary cj-text-primary-foreground cj-text-sm cj-font-medium cj-self-start cj-cursor-default",style:{fontFamily:"var(--claims-journey-font-body)",borderRadius:"var(--claims-journey-radius)",padding:"calc(var(--claims-journey-spacing, 16px) / 2) var(--claims-journey-spacing, 16px)",border:"none"},children:e("theme_primary_action")})]})})]})]})]})})]})}const gs="cj-theme-portal-vars",js="data-cj-themed-portals";let ao=0;const cw=["[data-radix-popper-content-wrapper]","[data-radix-popper-content-wrapper] *",'[role="dialog"]','[role="alertdialog"]',"[data-vaul-drawer]","[data-sonner-toaster]"].map(e=>`html[${js}="true"] ${e}`).join(`,
|
|
299
|
+
`);function lw(e){const t=Nm(e);return t.length?`${cw} {
|
|
300
300
|
${t.join(`
|
|
301
301
|
`)}
|
|
302
|
-
}`:""}function
|
|
302
|
+
}`:""}function Oc(){let e=document.getElementById(gs);return e||(e=document.createElement("style"),e.id=gs,document.head.appendChild(e)),e}function dw(e){y.useEffect(()=>(ao+=1,document.documentElement.setAttribute(js,"true"),Oc(),()=>{var t;ao=Math.max(0,ao-1),ao===0&&(document.documentElement.removeAttribute(js),(t=document.getElementById(gs))==null||t.remove())}),[]),y.useEffect(()=>{const t=Oc();t.innerHTML=lw(e)},[e])}function uw({specs:e=[],readOnly:t=!1,onSave:n,onPublish:r,onUnlockEdit:o,onOpenRunner:a}){const{t:i}=ve(),{activeTab:c,setActiveTab:l,isDirty:d,undo:u,redo:p,canUndo:f,canRedo:m,formConfig:_,theme:h}=pt(),j=Sm(h);return dw(h),s.jsxs("div",{className:"cj-h-full cj-w-full cj-flex cj-flex-col cj-bg-muted/20",style:j,children:[s.jsxs("header",{className:"cj-h-14 cj-border-b cj-bg-card cj-px-4 cj-flex cj-items-center cj-justify-between cj-shrink-0",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-3",children:[s.jsx("h1",{className:"cj-text-lg cj-font-semibold",children:i("fc_title")}),s.jsx(it,{variant:"secondary",className:"cj-text-[10px]",children:"v2.0"}),t&&s.jsxs(it,{variant:"secondary",className:"cj-gap-1",children:[s.jsx(B_,{className:"cj-h-3 cj-w-3"}),i("fc_read_only")]})]}),s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[!t&&s.jsxs(s.Fragment,{children:[s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-8 cj-w-8",onClick:u,disabled:!f(),title:i("fc_undo"),children:s.jsx(J_,{className:"cj-h-4 cj-w-4"})}),s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-8 cj-w-8",onClick:p,disabled:!m(),title:i("fc_redo"),children:s.jsx(V_,{className:"cj-h-4 cj-w-4"})}),s.jsx(iw,{})]}),_.steps.length>0&&s.jsx(Qb,{}),a&&_.steps.length>0&&s.jsxs(te,{size:"sm",variant:"outline",onClick:a,children:[s.jsx(O_,{className:"cj-h-4 cj-w-4 cj-mr-1"}),i("fc_preview_form")]}),!t&&n&&s.jsxs(te,{size:"sm",onClick:n,disabled:!d,className:"cj-relative",children:[s.jsx(U_,{className:"cj-h-4 cj-w-4 cj-mr-1"}),i("fc_save"),d&&s.jsx("span",{className:"cj-absolute -cj-top-1 -cj-right-1 cj-h-2.5 cj-w-2.5 cj-rounded-full cj-bg-destructive cj-border-2 cj-border-card"})]}),!t&&r&&s.jsxs(te,{size:"sm",variant:"default",onClick:r,children:[s.jsx(F_,{className:"cj-h-4 cj-w-4 cj-mr-1"}),i("fc_publish")]}),t&&o&&s.jsxs(te,{size:"sm",variant:"outline",onClick:o,children:[s.jsx(L_,{className:"cj-h-4 cj-w-4 cj-mr-1"}),i("fc_unlock_edit")]})]})]}),s.jsx("div",{className:"cj-border-b cj-bg-card cj-px-4",children:s.jsx(w_,{value:c,onValueChange:v=>l(v),children:s.jsxs($l,{className:"cj-h-10 cj-bg-transparent cj-p-0 cj-gap-1",children:[s.jsxs(yr,{value:"steps",className:"cj-h-10 cj-rounded-none cj-border-b-2 cj-border-transparent data-[state=active]:cj-border-primary data-[state=active]:cj-bg-transparent data-[state=active]:cj-shadow-none cj-px-3 cj-gap-1.5",children:[s.jsx($_,{className:"cj-h-3.5 cj-w-3.5"}),i("fc_tab_steps")]}),s.jsxs(yr,{value:"fields",className:"cj-h-10 cj-rounded-none cj-border-b-2 cj-border-transparent data-[state=active]:cj-border-primary data-[state=active]:cj-bg-transparent data-[state=active]:cj-shadow-none cj-px-3 cj-gap-1.5",children:[s.jsx(R_,{className:"cj-h-3.5 cj-w-3.5"}),i("fc_tab_fields")]}),s.jsxs(yr,{value:"init",className:"cj-h-10 cj-rounded-none cj-border-b-2 cj-border-transparent data-[state=active]:cj-border-primary data-[state=active]:cj-bg-transparent data-[state=active]:cj-shadow-none cj-px-3 cj-gap-1.5",children:[s.jsx(Xl,{className:"cj-h-3.5 cj-w-3.5"}),i("fc_tab_init")]}),s.jsxs(yr,{value:"json",className:"cj-h-10 cj-rounded-none cj-border-b-2 cj-border-transparent data-[state=active]:cj-border-primary data-[state=active]:cj-bg-transparent data-[state=active]:cj-shadow-none cj-px-3 cj-gap-1.5",children:[s.jsx(z_,{className:"cj-h-3.5 cj-w-3.5"}),i("fc_tab_json")]})]})})}),s.jsxs("div",{className:"cj-flex-1 cj-min-h-0 cj-overflow-hidden",children:[c==="steps"&&s.jsxs(Sg,{direction:"horizontal",children:[s.jsx(Pa,{defaultSize:22,minSize:18,maxSize:32,children:s.jsx(Ny,{readOnly:t})}),s.jsx(oc,{withHandle:!0}),s.jsx(Pa,{defaultSize:52,minSize:40,children:s.jsx(Qv,{specs:e,readOnly:t})}),s.jsx(oc,{withHandle:!0}),s.jsx(Pa,{defaultSize:26,minSize:22,maxSize:40,children:s.jsx(eb,{readOnly:t})})]}),c==="fields"&&s.jsx(nb,{specs:e,readOnly:t}),c==="init"&&s.jsx(rb,{readOnly:t}),c==="json"&&s.jsx(Mb,{readOnly:t})]})]})}const fw=y.createContext([]);function mw({specs:e=[],journey:t,onSave:n,onPublish:r,onUnlockEdit:o,onChange:a,onOpenRunner:i,readOnly:c=!1}){const{importJourneySpec:l,exportJourneySpec:d,markClean:u,formConfig:p}=pt(),f=y.useRef(null),[m,_]=y.useState(null);y.useEffect(()=>{f.current&&_(f.current)},[]),y.useEffect(()=>{t&&l(t)},[]),y.useEffect(()=>{a&&(p.steps.length>0||p.fields.length>0)&&a(d())},[p]);const h=y.useCallback(()=>{const v=d();n==null||n(v),u()},[d,n,u]),j=y.useCallback(()=>{r==null||r(d())},[d,r]);return s.jsx("div",{ref:f,className:"jb-widget-root cj-h-full cj-w-full cj-relative cj-overflow-hidden",children:s.jsx(ia.Provider,{value:m,children:s.jsx(fw.Provider,{value:e,children:s.jsx(uw,{specs:e,readOnly:c,onSave:!c&&n?h:void 0,onPublish:!c&&r?j:void 0,onUnlockEdit:c?o:void 0,onOpenRunner:i})})})})}function pw(e,t=[]){let n=[];function r(a,i){const c=g.createContext(i);c.displayName=a+"Context";const l=n.length;n=[...n,i];const d=p=>{var v;const{scope:f,children:m,..._}=p,h=((v=f==null?void 0:f[e])==null?void 0:v[l])||c,j=g.useMemo(()=>_,Object.values(_));return s.jsx(h.Provider,{value:j,children:m})};d.displayName=a+"Provider";function u(p,f){var h;const m=((h=f==null?void 0:f[e])==null?void 0:h[l])||c,_=g.useContext(m);if(_)return _;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[d,u]}const o=()=>{const a=n.map(i=>g.createContext(i));return function(c){const l=(c==null?void 0:c[e])||a;return g.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return o.scopeName=e,[r,hw(o,...t)]}function hw(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=r.reduce((c,{useScope:l,scopeName:d})=>{const p=l(a)[`__scope${d}`];return{...c,...p}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var _w=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Cm=_w.reduce((e,t)=>{const n=Oo(`Primitive.${t}`),r=g.forwardRef((o,a)=>{const{asChild:i,...c}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(l,{...c,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),mi="Progress",pi=100,[gw]=pw(mi),[jw,yw]=gw(mi),km=g.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=xw,...i}=e;(o||o===0)&&!zc(o)&&console.error(vw(`${o}`,"Progress"));const c=zc(o)?o:pi;r!==null&&!Ic(r,c)&&console.error(bw(`${r}`,"Progress"));const l=Ic(r,c)?r:null,d=Eo(l)?a(l,c):void 0;return s.jsx(jw,{scope:n,value:l,max:c,children:s.jsx(Cm.div,{"aria-valuemax":c,"aria-valuemin":0,"aria-valuenow":Eo(l)?l:void 0,"aria-valuetext":d,role:"progressbar","data-state":Mm(l,c),"data-value":l??void 0,"data-max":c,...i,ref:t})})});km.displayName=mi;var Pm="ProgressIndicator",Em=g.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=yw(Pm,n);return s.jsx(Cm.div,{"data-state":Mm(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Em.displayName=Pm;function xw(e,t){return`${Math.round(e/t*100)}%`}function Mm(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Eo(e){return typeof e=="number"}function zc(e){return Eo(e)&&!isNaN(e)&&e>0}function Ic(e,t){return Eo(e)&&!isNaN(e)&&e<=t&&e>=0}function vw(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${pi}\`.`}function bw(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
303
303
|
- a positive number
|
|
304
|
-
- less than the value passed to \`max\` (or ${
|
|
304
|
+
- less than the value passed to \`max\` (or ${pi} if no \`max\` prop is set)
|
|
305
305
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
306
306
|
|
|
307
|
-
Defaulting to \`null\`.`}var Em=Sm,bw=km;const Mm=_.forwardRef(({className:e,value:t,...n},r)=>s.jsx(Em,{ref:r,className:ne("cj-relative cj-h-4 cj-w-full cj-overflow-hidden cj-rounded-full cj-bg-secondary",e),...n,children:s.jsx(bw,{className:"cj-h-full cj-w-full cj-flex-1 cj-bg-primary cj-transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Mm.displayName=Em.displayName;function ww({label:e,value:t,onChange:n,placeholder:r,helpText:o,multiline:a=!1}){const{t:i}=we();return s.jsxs("div",{className:"cj-space-y-2",children:[s.jsx(q,{className:"cj-text-sm cj-font-medium",children:e}),a?s.jsx(Br,{value:t,onChange:c=>n(c.target.value),placeholder:r||i("placeholder_text"),className:"cj-min-h-[100px]"}):s.jsx(he,{type:"text",value:t,onChange:c=>n(c.target.value),placeholder:r||i("placeholder_text")}),o&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:o})]})}var mi="Radio",[Nw,Dm]=_t(mi),[Sw,Cw]=Nw(mi),Tm=_.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:i,value:c="on",onCheck:l,form:d,...u}=e,[m,f]=_.useState(null),p=ve(t,j=>f(j)),g=_.useRef(!1),h=m?d||!!m.closest("form"):!0;return s.jsxs(Sw,{scope:n,checked:o,disabled:i,children:[s.jsx(le.button,{type:"button",role:"radio","aria-checked":o,"data-state":zm(o),"data-disabled":i?"":void 0,disabled:i,value:c,...u,ref:p,onClick:se(e.onClick,j=>{o||l==null||l(),h&&(g.current=j.isPropagationStopped(),g.current||j.stopPropagation())})}),h&&s.jsx(Am,{control:m,bubbles:!g.current,name:r,value:c,checked:o,required:a,disabled:i,form:d,style:{transform:"translateX(-100%)"}})]})});Tm.displayName=mi;var Rm="RadioIndicator",Om=_.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=Cw(Rm,n);return s.jsx(gt,{present:r||a.checked,children:s.jsx(le.span,{"data-state":zm(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});Om.displayName=Rm;var kw="RadioBubbleInput",Am=_.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=_.useRef(null),c=ve(i,a),l=ti(n),d=Js(t);return _.useEffect(()=>{const u=i.current;if(!u)return;const m=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(m,"checked").set;if(l!==n&&p){const g=new Event("click",{bubbles:r});p.call(u,n),u.dispatchEvent(g)}},[l,n,r]),s.jsx(le.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:c,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Am.displayName=kw;function zm(e){return e?"checked":"unchecked"}var Pw=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],pa="RadioGroup",[Ew]=_t(pa,[zo,Dm]),Im=zo(),Wm=Dm(),[Mw,Dw]=Ew(pa),Fm=_.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:i=!1,disabled:c=!1,orientation:l,dir:d,loop:u=!0,onValueChange:m,...f}=e,p=Im(n),g=Or(d),[h,j]=tn({prop:a,defaultProp:o??null,onChange:m,caller:pa});return s.jsx(Mw,{scope:n,name:r,required:i,disabled:c,value:h,onValueChange:j,children:s.jsx(bl,{asChild:!0,...p,orientation:l,dir:g,loop:u,children:s.jsx(le.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":c?"":void 0,dir:g,...f,ref:t})})})});Fm.displayName=pa;var $m="RadioGroupItem",Lm=_.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=Dw($m,n),i=a.disabled||r,c=Im(n),l=Wm(n),d=_.useRef(null),u=ve(t,d),m=a.value===o.value,f=_.useRef(!1);return _.useEffect(()=>{const p=h=>{Pw.includes(h.key)&&(f.current=!0)},g=()=>f.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",g)}},[]),s.jsx(wl,{asChild:!0,...c,focusable:!i,active:m,children:s.jsx(Tm,{disabled:i,required:a.required,checked:m,...l,...o,name:a.name,ref:u,onCheck:()=>a.onValueChange(o.value),onKeyDown:se(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:se(o.onFocus,()=>{var p;f.current&&((p=d.current)==null||p.click())})})})});Lm.displayName=$m;var Tw="RadioGroupIndicator",Bm=_.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Wm(n);return s.jsx(Om,{...o,...r,ref:t})});Bm.displayName=Tw;var Hm=Fm,qm=Lm,Rw=Bm;const Ym=_.forwardRef(({className:e,...t},n)=>s.jsx(Hm,{className:ne("cj-gap-2",e),...t,ref:n}));Ym.displayName=Hm.displayName;const Vm=_.forwardRef(({className:e,...t},n)=>s.jsx(qm,{ref:n,className:ne("cj-aspect-square cj-h-5 cj-w-5 cj-rounded-full cj-border cj-border-primary cj-text-primary cj-ring-offset-background focus:cj-outline-none focus-visible:cj-ring-2 focus-visible:cj-ring-ring focus-visible:cj-ring-offset-2 disabled:cj-cursor-not-allowed disabled:cj-opacity-50 cj-shrink-0",e),...t,children:s.jsx(Rw,{className:"cj-flex cj-items-center cj-justify-center",children:s.jsx(E_,{className:"cj-h-3 cj-w-3 cj-fill-current cj-text-current"})})}));Vm.displayName=qm.displayName;function Ow({label:e,value:t,onChange:n,options:r,helpText:o,variant:a="auto"}){const{t:i}=we(),c=a==="auto"?r.length<=5?"radio":"dropdown":a,l=c==="radio-horizontal"?{gridTemplateColumns:"repeat(auto-fit, minmax(min(180px, 100%), 1fr))"}:void 0;return s.jsxs("div",{className:"cj-space-y-2",children:[s.jsx(q,{className:"cj-text-sm cj-font-medium",children:e}),(c==="radio"||c==="radio-horizontal")&&s.jsx(Ym,{value:t,onValueChange:n,className:c==="radio-horizontal"?"cj-grid cj-gap-2":"cj-space-y-1",style:l,children:r.map(d=>s.jsxs("label",{htmlFor:d.data,className:c==="radio-horizontal"?"cj-flex cj-min-w-0 cj-items-center cj-gap-2 cj-rounded-xl cj-border cj-border-border/40 cj-bg-card cj-px-3 cj-py-2.5 cj-cursor-pointer cj-transition-colors hover:cj-bg-accent/50 data-[state=checked]:cj-border-primary/40 data-[state=checked]:cj-bg-primary/5":"cj-flex cj-items-center cj-gap-3 cj-rounded-xl cj-border cj-border-border/40 cj-bg-card cj-px-4 cj-py-3.5 cj-cursor-pointer cj-transition-colors hover:cj-bg-accent/50 data-[state=checked]:cj-border-primary/40 data-[state=checked]:cj-bg-primary/5",children:[s.jsx(Vm,{value:d.data,id:d.data}),s.jsx("span",{className:"cj-min-w-0 cj-text-sm cj-font-normal cj-text-foreground cj-select-none",children:d.label})]},d.data))}),c==="dropdown"&&s.jsxs(Oe,{value:t,onValueChange:n,children:[s.jsx(De,{className:"cj-w-full cj-h-12",children:s.jsx(Ae,{placeholder:i("placeholder_select")})}),s.jsx(Te,{className:"cj-bg-popover cj-z-50",children:r.map(d=>s.jsx(B,{value:d.data,className:"cj-py-3",children:d.label},d.data))})]}),c==="segmented"&&s.jsx("div",{role:"radiogroup",className:"cj-grid cj-gap-2",style:{gridTemplateColumns:`repeat(${Math.min(r.length,4)}, minmax(0, 1fr))`},children:r.map(d=>{const u=t===d.data;return s.jsx("button",{type:"button",role:"radio","aria-checked":u,onClick:()=>n(d.data),className:["cj-flex cj-items-center cj-justify-center cj-text-center","cj-min-h-12 cj-px-4 cj-py-3 cj-rounded-xl cj-border cj-text-sm cj-font-medium","cj-transition-colors",u?"cj-border-primary cj-bg-primary/10 cj-text-primary":"cj-border-border/40 cj-bg-card cj-text-foreground hover:cj-bg-accent/50"].join(" "),children:d.label},d.data)})}),o&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:o})]})}function Ke(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function He(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Gm(e,t){const n=Ke(e);return isNaN(t)?He(e,NaN):(t&&n.setDate(n.getDate()+t),n)}const Um=6048e5,Aw=864e5,zw=6e4,Iw=36e5,Ww=1e3;let Fw={};function ur(){return Fw}function gn(e,t){var c,l,d,u;const n=ur(),r=(t==null?void 0:t.weekStartsOn)??((l=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(d=n.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,o=Ke(e),a=o.getDay(),i=(a<r?7:0)+a-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function ar(e){return gn(e,{weekStartsOn:1})}function Xm(e){const t=Ke(e),n=t.getFullYear(),r=He(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=ar(r),a=He(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const i=ar(a);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function Ac(e){const t=Ke(e);return t.setHours(0,0,0,0),t}function Mo(e){const t=Ke(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function $w(e,t){const n=Ac(e),r=Ac(t),o=+n-Mo(n),a=+r-Mo(r);return Math.round((o-a)/Aw)}function Lw(e){const t=Xm(e),n=He(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),ar(n)}function Bw(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function pi(e){if(!Bw(e)&&typeof e!="number")return!1;const t=Ke(e);return!isNaN(Number(t))}function Hw(e){const t=Ke(e),n=He(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const qw={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Yw=(e,t,n)=>{let r;const o=qw[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function en(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Vw={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Gw={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Uw={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Xw={date:en({formats:Vw,defaultWidth:"full"}),time:en({formats:Gw,defaultWidth:"full"}),dateTime:en({formats:Uw,defaultWidth:"full"})},Kw={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Jw=(e,t,n,r)=>Kw[e];function ot(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,c=n!=null&&n.width?String(n.width):i;o=e.formattingValues[c]||e.formattingValues[i]}else{const i=e.defaultWidth,c=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[c]||e.values[i]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const Qw={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Zw={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},e0={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},t0={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},n0={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},r0={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},o0=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},a0={ordinalNumber:o0,era:ot({values:Qw,defaultWidth:"wide"}),quarter:ot({values:Zw,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ot({values:e0,defaultWidth:"wide"}),day:ot({values:t0,defaultWidth:"wide"}),dayPeriod:ot({values:n0,defaultWidth:"wide",formattingValues:r0,defaultFormattingWidth:"wide"})};function at(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const i=a[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(c)?i0(c,m=>m.test(i)):s0(c,m=>m.test(i));let d;d=e.valueCallback?e.valueCallback(l):l,d=n.valueCallback?n.valueCallback(d):d;const u=t.slice(i.length);return{value:d,rest:u}}}function s0(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function i0(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function hi(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=n.valueCallback?n.valueCallback(i):i;const c=t.slice(o.length);return{value:i,rest:c}}}const c0=/^(\d+)(th|st|nd|rd)?/i,l0=/\d+/i,d0={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},u0={any:[/^b/i,/^(a|c)/i]},f0={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},m0={any:[/1/i,/2/i,/3/i,/4/i]},p0={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},h0={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},_0={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},g0={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},j0={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},y0={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},v0={ordinalNumber:hi({matchPattern:c0,parsePattern:l0,valueCallback:e=>parseInt(e,10)}),era:at({matchPatterns:d0,defaultMatchWidth:"wide",parsePatterns:u0,defaultParseWidth:"any"}),quarter:at({matchPatterns:f0,defaultMatchWidth:"wide",parsePatterns:m0,defaultParseWidth:"any",valueCallback:e=>e+1}),month:at({matchPatterns:p0,defaultMatchWidth:"wide",parsePatterns:h0,defaultParseWidth:"any"}),day:at({matchPatterns:_0,defaultMatchWidth:"wide",parsePatterns:g0,defaultParseWidth:"any"}),dayPeriod:at({matchPatterns:j0,defaultMatchWidth:"any",parsePatterns:y0,defaultParseWidth:"any"})},ha={code:"en-US",formatDistance:Yw,formatLong:Xw,formatRelative:Jw,localize:a0,match:v0,options:{weekStartsOn:0,firstWeekContainsDate:1}};function x0(e){const t=Ke(e);return $w(t,Hw(t))+1}function Km(e){const t=Ke(e),n=+ar(t)-+Lw(t);return Math.round(n/Um)+1}function _i(e,t){var u,m,f,p;const n=Ke(e),r=n.getFullYear(),o=ur(),a=(t==null?void 0:t.firstWeekContainsDate)??((m=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:m.firstWeekContainsDate)??o.firstWeekContainsDate??((p=(f=o.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,i=He(e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const c=gn(i,t),l=He(e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const d=gn(l,t);return n.getTime()>=c.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function b0(e,t){var c,l,d,u;const n=ur(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(d=n.locale)==null?void 0:d.options)==null?void 0:u.firstWeekContainsDate)??1,o=_i(e,t),a=He(e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),gn(a,t)}function Jm(e,t){const n=Ke(e),r=+gn(n,t)-+b0(n,t);return Math.round(r/Um)+1}function Pe(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const un={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Pe(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Pe(n+1,2)},d(e,t){return Pe(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Pe(e.getHours()%12||12,t.length)},H(e,t){return Pe(e.getHours(),t.length)},m(e,t){return Pe(e.getMinutes(),t.length)},s(e,t){return Pe(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Pe(o,t.length)}},qn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},zc={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return un.y(e,t)},Y:function(e,t,n,r){const o=_i(e,r),a=o>0?o:1-o;if(t==="YY"){const i=a%100;return Pe(i,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):Pe(a,t.length)},R:function(e,t){const n=Xm(e);return Pe(n,t.length)},u:function(e,t){const n=e.getFullYear();return Pe(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Pe(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Pe(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return un.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Pe(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Jm(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Pe(o,t.length)},I:function(e,t,n){const r=Km(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Pe(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):un.d(e,t)},D:function(e,t,n){const r=x0(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Pe(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Pe(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Pe(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Pe(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=qn.noon:r===0?o=qn.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=qn.evening:r>=12?o=qn.afternoon:r>=4?o=qn.morning:o=qn.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return un.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):un.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Pe(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Pe(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):un.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):un.s(e,t)},S:function(e,t){return un.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Wc(r);case"XXXX":case"XX":return kn(r);case"XXXXX":case"XXX":default:return kn(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Wc(r);case"xxxx":case"xx":return kn(r);case"xxxxx":case"xxx":default:return kn(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ic(r,":");case"OOOO":default:return"GMT"+kn(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ic(r,":");case"zzzz":default:return"GMT"+kn(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Pe(r,t.length)},T:function(e,t,n){const r=e.getTime();return Pe(r,t.length)}};function Ic(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+Pe(a,2)}function Wc(e,t){return e%60===0?(e>0?"-":"+")+Pe(Math.abs(e)/60,2):kn(e,t)}function kn(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Pe(Math.trunc(r/60),2),a=Pe(r%60,2);return n+o+t+a}const Fc=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Qm=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},w0=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Fc(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Fc(r,t)).replace("{{time}}",Qm(o,t))},js={p:Qm,P:w0},N0=/^D+$/,S0=/^Y+$/,C0=["D","DD","YY","YYYY"];function Zm(e){return N0.test(e)}function ep(e){return S0.test(e)}function ys(e,t,n){const r=k0(e,t,n);if(console.warn(r),C0.includes(e))throw new RangeError(r)}function k0(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const P0=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,E0=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,M0=/^'([^]*?)'?$/,D0=/''/g,T0=/[a-zA-Z]/;function Do(e,t,n){var u,m,f,p;const r=ur(),o=r.locale??ha,a=r.firstWeekContainsDate??((m=(u=r.locale)==null?void 0:u.options)==null?void 0:m.firstWeekContainsDate)??1,i=r.weekStartsOn??((p=(f=r.locale)==null?void 0:f.options)==null?void 0:p.weekStartsOn)??0,c=Ke(e);if(!pi(c))throw new RangeError("Invalid time value");let l=t.match(E0).map(g=>{const h=g[0];if(h==="p"||h==="P"){const j=js[h];return j(g,o.formatLong)}return g}).join("").match(P0).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const h=g[0];if(h==="'")return{isToken:!1,value:R0(g)};if(zc[h])return{isToken:!0,value:g};if(h.match(T0))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");return{isToken:!1,value:g}});o.localize.preprocessor&&(l=o.localize.preprocessor(c,l));const d={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return l.map(g=>{if(!g.isToken)return g.value;const h=g.value;(ep(h)||Zm(h))&&ys(h,t,String(e));const j=zc[h[0]];return j(c,h,o.localize,d)}).join("")}function R0(e){const t=e.match(M0);return t?t[1].replace(D0,"'"):e}function O0(){return Object.assign({},ur())}function A0(e){let n=Ke(e).getDay();return n===0&&(n=7),n}function z0(e,t){const n=t instanceof Date?He(t,0):new t(0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}const I0=10;class tp{constructor(){Y(this,"subPriority",0)}validate(t,n){return!0}}class W0 extends tp{constructor(t,n,r,o,a){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,a&&(this.subPriority=a)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class F0 extends tp{constructor(){super(...arguments);Y(this,"priority",I0);Y(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:He(n,z0(n,Date))}}class Se{run(t,n,r,o){const a=this.parse(t,n,r,o);return a?{setter:new W0(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(t,n,r){return!0}}class $0 extends Se{constructor(){super(...arguments);Y(this,"priority",140);Y(this,"incompatibleTokens",["R","u","t","T"])}parse(n,r,o){switch(r){case"G":case"GG":case"GGG":return o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"});case"GGGGG":return o.era(n,{width:"narrow"});case"GGGG":default:return o.era(n,{width:"wide"})||o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"})}}set(n,r,o){return r.era=o,n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}const Ye={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},zt={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Ve(e,t){return e&&{value:t(e.value),rest:e.rest}}function Le(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function It(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*Iw+a*zw+i*Ww),rest:t.slice(n[0].length)}}function np(e){return Le(Ye.anyDigitsSigned,e)}function qe(e,t){switch(e){case 1:return Le(Ye.singleDigit,t);case 2:return Le(Ye.twoDigits,t);case 3:return Le(Ye.threeDigits,t);case 4:return Le(Ye.fourDigits,t);default:return Le(new RegExp("^\\d{1,"+e+"}"),t)}}function To(e,t){switch(e){case 1:return Le(Ye.singleDigitSigned,t);case 2:return Le(Ye.twoDigitsSigned,t);case 3:return Le(Ye.threeDigitsSigned,t);case 4:return Le(Ye.fourDigitsSigned,t);default:return Le(new RegExp("^-?\\d{1,"+e+"}"),t)}}function gi(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function rp(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const a=r+50,i=Math.trunc(a/100)*100,c=e>=a%100;o=e+i-(c?100:0)}return n?o:1-o}function op(e){return e%400===0||e%4===0&&e%100!==0}class L0 extends Se{constructor(){super(...arguments);Y(this,"priority",130);Y(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const a=i=>({year:i,isTwoDigitYear:r==="yy"});switch(r){case"y":return Ve(qe(4,n),a);case"yo":return Ve(o.ordinalNumber(n,{unit:"year"}),a);default:return Ve(qe(r.length,n),a)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const a=n.getFullYear();if(o.isTwoDigitYear){const c=rp(o.year,a);return n.setFullYear(c,0,1),n.setHours(0,0,0,0),n}const i=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(i,0,1),n.setHours(0,0,0,0),n}}class B0 extends Se{constructor(){super(...arguments);Y(this,"priority",130);Y(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const a=i=>({year:i,isTwoDigitYear:r==="YY"});switch(r){case"Y":return Ve(qe(4,n),a);case"Yo":return Ve(o.ordinalNumber(n,{unit:"year"}),a);default:return Ve(qe(r.length,n),a)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,a){const i=_i(n,a);if(o.isTwoDigitYear){const l=rp(o.year,i);return n.setFullYear(l,0,a.firstWeekContainsDate),n.setHours(0,0,0,0),gn(n,a)}const c=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(c,0,a.firstWeekContainsDate),n.setHours(0,0,0,0),gn(n,a)}}class H0 extends Se{constructor(){super(...arguments);Y(this,"priority",130);Y(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return To(r==="R"?4:r.length,n)}set(n,r,o){const a=He(n,0);return a.setFullYear(o,0,4),a.setHours(0,0,0,0),ar(a)}}class q0 extends Se{constructor(){super(...arguments);Y(this,"priority",130);Y(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return To(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class Y0 extends Se{constructor(){super(...arguments);Y(this,"priority",120);Y(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"Q":case"QQ":return qe(r.length,n);case"Qo":return o.ordinalNumber(n,{unit:"quarter"});case"QQQ":return o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(n,{width:"wide",context:"formatting"})||o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class V0 extends Se{constructor(){super(...arguments);Y(this,"priority",120);Y(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"q":case"qq":return qe(r.length,n);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(n,{width:"wide",context:"standalone"})||o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class G0 extends Se{constructor(){super(...arguments);Y(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);Y(this,"priority",110)}parse(n,r,o){const a=i=>i-1;switch(r){case"M":return Ve(Le(Ye.month,n),a);case"MM":return Ve(qe(2,n),a);case"Mo":return Ve(o.ordinalNumber(n,{unit:"month"}),a);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class U0 extends Se{constructor(){super(...arguments);Y(this,"priority",110);Y(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const a=i=>i-1;switch(r){case"L":return Ve(Le(Ye.month,n),a);case"LL":return Ve(qe(2,n),a);case"Lo":return Ve(o.ordinalNumber(n,{unit:"month"}),a);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function X0(e,t,n){const r=Ke(e),o=Jm(r,n)-t;return r.setDate(r.getDate()-o*7),r}class K0 extends Se{constructor(){super(...arguments);Y(this,"priority",100);Y(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return Le(Ye.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return qe(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,a){return gn(X0(n,o,a),a)}}function J0(e,t){const n=Ke(e),r=Km(n)-t;return n.setDate(n.getDate()-r*7),n}class Q0 extends Se{constructor(){super(...arguments);Y(this,"priority",100);Y(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(n,r,o){switch(r){case"I":return Le(Ye.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return qe(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return ar(J0(n,o))}}const Z0=[31,28,31,30,31,30,31,31,30,31,30,31],e1=[31,29,31,30,31,30,31,31,30,31,30,31];class t1 extends Se{constructor(){super(...arguments);Y(this,"priority",90);Y(this,"subPriority",1);Y(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return Le(Ye.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return qe(r.length,n)}}validate(n,r){const o=n.getFullYear(),a=op(o),i=n.getMonth();return a?r>=1&&r<=e1[i]:r>=1&&r<=Z0[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class n1 extends Se{constructor(){super(...arguments);Y(this,"priority",90);Y(this,"subpriority",1);Y(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(n,r,o){switch(r){case"D":case"DD":return Le(Ye.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return qe(r.length,n)}}validate(n,r){const o=n.getFullYear();return op(o)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,o){return n.setMonth(0,o),n.setHours(0,0,0,0),n}}function ji(e,t,n){var m,f,p,g;const r=ur(),o=(n==null?void 0:n.weekStartsOn)??((f=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:f.weekStartsOn)??r.weekStartsOn??((g=(p=r.locale)==null?void 0:p.options)==null?void 0:g.weekStartsOn)??0,a=Ke(e),i=a.getDay(),l=(t%7+7)%7,d=7-o,u=t<0||t>6?t-(i+d)%7:(l+d)%7-(i+d)%7;return Gm(a,u)}class r1 extends Se{constructor(){super(...arguments);Y(this,"priority",90);Y(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,a){return n=ji(n,o,a),n.setHours(0,0,0,0),n}}class o1 extends Se{constructor(){super(...arguments);Y(this,"priority",90);Y(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,a){const i=c=>{const l=Math.floor((c-1)/7)*7;return(c+a.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return Ve(qe(r.length,n),i);case"eo":return Ve(o.ordinalNumber(n,{unit:"day"}),i);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,a){return n=ji(n,o,a),n.setHours(0,0,0,0),n}}class a1 extends Se{constructor(){super(...arguments);Y(this,"priority",90);Y(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,a){const i=c=>{const l=Math.floor((c-1)/7)*7;return(c+a.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return Ve(qe(r.length,n),i);case"co":return Ve(o.ordinalNumber(n,{unit:"day"}),i);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,a){return n=ji(n,o,a),n.setHours(0,0,0,0),n}}function s1(e,t){const n=Ke(e),r=A0(n),o=t-r;return Gm(n,o)}class i1 extends Se{constructor(){super(...arguments);Y(this,"priority",90);Y(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const a=i=>i===0?7:i;switch(r){case"i":case"ii":return qe(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return Ve(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),a);case"iiiii":return Ve(o.day(n,{width:"narrow",context:"formatting"}),a);case"iiiiii":return Ve(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),a);case"iiii":default:return Ve(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),a)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=s1(n,o),n.setHours(0,0,0,0),n}}class c1 extends Se{constructor(){super(...arguments);Y(this,"priority",80);Y(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(n,r,o){switch(r){case"a":case"aa":case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(gi(o),0,0,0),n}}class l1 extends Se{constructor(){super(...arguments);Y(this,"priority",80);Y(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(n,r,o){switch(r){case"b":case"bb":case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(gi(o),0,0,0),n}}class d1 extends Se{constructor(){super(...arguments);Y(this,"priority",80);Y(this,"incompatibleTokens",["a","b","t","T"])}parse(n,r,o){switch(r){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(gi(o),0,0,0),n}}class u1 extends Se{constructor(){super(...arguments);Y(this,"priority",70);Y(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return Le(Ye.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return qe(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const a=n.getHours()>=12;return a&&o<12?n.setHours(o+12,0,0,0):!a&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class f1 extends Se{constructor(){super(...arguments);Y(this,"priority",70);Y(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return Le(Ye.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return qe(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class m1 extends Se{constructor(){super(...arguments);Y(this,"priority",70);Y(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return Le(Ye.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return qe(r.length,n)}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.getHours()>=12&&o<12?n.setHours(o+12,0,0,0):n.setHours(o,0,0,0),n}}class p1 extends Se{constructor(){super(...arguments);Y(this,"priority",70);Y(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return Le(Ye.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return qe(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const a=o<=24?o%24:o;return n.setHours(a,0,0,0),n}}class h1 extends Se{constructor(){super(...arguments);Y(this,"priority",60);Y(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return Le(Ye.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return qe(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class _1 extends Se{constructor(){super(...arguments);Y(this,"priority",50);Y(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return Le(Ye.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return qe(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class g1 extends Se{constructor(){super(...arguments);Y(this,"priority",30);Y(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=a=>Math.trunc(a*Math.pow(10,-r.length+3));return Ve(qe(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class j1 extends Se{constructor(){super(...arguments);Y(this,"priority",10);Y(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return It(zt.basicOptionalMinutes,n);case"XX":return It(zt.basic,n);case"XXXX":return It(zt.basicOptionalSeconds,n);case"XXXXX":return It(zt.extendedOptionalSeconds,n);case"XXX":default:return It(zt.extended,n)}}set(n,r,o){return r.timestampIsSet?n:He(n,n.getTime()-Mo(n)-o)}}class y1 extends Se{constructor(){super(...arguments);Y(this,"priority",10);Y(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return It(zt.basicOptionalMinutes,n);case"xx":return It(zt.basic,n);case"xxxx":return It(zt.basicOptionalSeconds,n);case"xxxxx":return It(zt.extendedOptionalSeconds,n);case"xxx":default:return It(zt.extended,n)}}set(n,r,o){return r.timestampIsSet?n:He(n,n.getTime()-Mo(n)-o)}}class v1 extends Se{constructor(){super(...arguments);Y(this,"priority",40);Y(this,"incompatibleTokens","*")}parse(n){return np(n)}set(n,r,o){return[He(n,o*1e3),{timestampIsSet:!0}]}}class x1 extends Se{constructor(){super(...arguments);Y(this,"priority",20);Y(this,"incompatibleTokens","*")}parse(n){return np(n)}set(n,r,o){return[He(n,o),{timestampIsSet:!0}]}}const b1={G:new $0,y:new L0,Y:new B0,R:new H0,u:new q0,Q:new Y0,q:new V0,M:new G0,L:new U0,w:new K0,I:new Q0,d:new t1,D:new n1,E:new r1,e:new o1,c:new a1,i:new i1,a:new c1,b:new l1,B:new d1,h:new u1,H:new f1,K:new m1,k:new p1,m:new h1,s:new _1,S:new g1,X:new j1,x:new y1,t:new v1,T:new x1},w1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,N1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,S1=/^'([^]*?)'?$/,C1=/''/g,k1=/\S/,P1=/[a-zA-Z]/;function ap(e,t,n,r){var h,j,x,b;const o=O0(),a=o.locale??ha,i=o.firstWeekContainsDate??((j=(h=o.locale)==null?void 0:h.options)==null?void 0:j.firstWeekContainsDate)??1,c=o.weekStartsOn??((b=(x=o.locale)==null?void 0:x.options)==null?void 0:b.weekStartsOn)??0;if(t==="")return e===""?Ke(n):He(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:c,locale:a},d=[new F0],u=t.match(N1).map(w=>{const N=w[0];if(N in js){const S=js[N];return S(w,a.formatLong)}return w}).join("").match(w1),m=[];for(let w of u){ep(w)&&ys(w,t,e),Zm(w)&&ys(w,t,e);const N=w[0],S=b1[N];if(S){const{incompatibleTokens:y}=S;if(Array.isArray(y)){const E=m.find(P=>y.includes(P.token)||P.token===N);if(E)throw new RangeError(`The format string mustn't contain \`${E.fullToken}\` and \`${w}\` at the same time`)}else if(S.incompatibleTokens==="*"&&m.length>0)throw new RangeError(`The format string mustn't contain \`${w}\` and any other token at the same time`);m.push({token:N,fullToken:w});const C=S.run(e,w,a.match,l);if(!C)return He(n,NaN);d.push(C.setter),e=C.rest}else{if(N.match(P1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+N+"`");if(w==="''"?w="'":N==="'"&&(w=E1(w)),e.indexOf(w)===0)e=e.slice(w.length);else return He(n,NaN)}}if(e.length>0&&k1.test(e))return He(n,NaN);const f=d.map(w=>w.priority).sort((w,N)=>N-w).filter((w,N,S)=>S.indexOf(w)===N).map(w=>d.filter(N=>N.priority===w).sort((N,S)=>S.subPriority-N.subPriority)).map(w=>w[0]);let p=Ke(n);if(isNaN(p.getTime()))return He(n,NaN);const g={};for(const w of f){if(!w.validate(p,l))return He(n,NaN);const N=w.set(p,g,l);Array.isArray(N)?(p=N[0],Object.assign(g,N[1])):p=N}return He(n,p)}function E1(e){return e.match(S1)[1].replace(C1,"'")}const M1={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dรญa",other:"{{count}} dรญas"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 aรฑo",other:"alrededor de {{count}} aรฑos"},xYears:{one:"1 aรฑo",other:"{{count}} aรฑos"},overXYears:{one:"mรกs de 1 aรฑo",other:"mรกs de {{count}} aรฑos"},almostXYears:{one:"casi 1 aรฑo",other:"casi {{count}} aรฑos"}},D1=(e,t,n)=>{let r;const o=M1[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"en "+r:"hace "+r:r},T1={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},R1={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},O1={full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},A1={date:en({formats:T1,defaultWidth:"full"}),time:en({formats:R1,defaultWidth:"full"}),dateTime:en({formats:O1,defaultWidth:"full"})},z1={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'maรฑana a la' p",nextWeek:"eeee 'a la' p",other:"P"},I1={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'maรฑana a las' p",nextWeek:"eeee 'a las' p",other:"P"},W1=(e,t,n,r)=>t.getHours()!==1?I1[e]:z1[e],F1={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","despuรฉs de cristo"]},$1={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1ยบ trimestre","2ยบ trimestre","3ยบ trimestre","4ยบ trimestre"]},L1={narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},B1={narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sรก"],abbreviated:["dom","lun","mar","miรฉ","jue","vie","sรกb"],wide:["domingo","lunes","martes","miรฉrcoles","jueves","viernes","sรกbado"]},H1={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"maรฑana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"maรฑana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"maรฑana",afternoon:"tarde",evening:"tarde",night:"noche"}},q1={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la maรฑana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la maรฑana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la maรฑana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},Y1=(e,t)=>Number(e)+"ยบ",V1={ordinalNumber:Y1,era:ot({values:F1,defaultWidth:"wide"}),quarter:ot({values:$1,defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:ot({values:L1,defaultWidth:"wide"}),day:ot({values:B1,defaultWidth:"wide"}),dayPeriod:ot({values:H1,defaultWidth:"wide",formattingValues:q1,defaultFormattingWidth:"wide"})},G1=/^(\d+)(ยบ)?/i,U1=/\d+/i,X1={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uรบ]n|despu[eรฉ]s de cristo|era com[uรบ]n)/i},K1={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uรบ]n)/i,/^(despu[eรฉ]s de cristo|era com[uรบ]n)/i]},J1={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](ยบ)? trimestre/i},Q1={any:[/1/i,/2/i,/3/i,/4/i]},Z1={narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},eN={narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},tN={narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[รกa])/i,abbreviated:/^(dom|lun|mar|mi[รฉe]|jue|vie|s[รกa]b)/i,wide:/^(domingo|lunes|martes|mi[รฉe]rcoles|jueves|viernes|s[รกa]bado)/i},nN={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},rN={narrow:/^(a|p|mn|md|(de la|a las) (maรฑana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (maรฑana|tarde|noche))/i},oN={any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/maรฑana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},aN={ordinalNumber:hi({matchPattern:G1,parsePattern:U1,valueCallback:function(e){return parseInt(e,10)}}),era:at({matchPatterns:X1,defaultMatchWidth:"wide",parsePatterns:K1,defaultParseWidth:"any"}),quarter:at({matchPatterns:J1,defaultMatchWidth:"wide",parsePatterns:Q1,defaultParseWidth:"any",valueCallback:e=>e+1}),month:at({matchPatterns:Z1,defaultMatchWidth:"wide",parsePatterns:eN,defaultParseWidth:"any"}),day:at({matchPatterns:tN,defaultMatchWidth:"wide",parsePatterns:nN,defaultParseWidth:"any"}),dayPeriod:at({matchPatterns:rN,defaultMatchWidth:"any",parsePatterns:oN,defaultParseWidth:"any"})},sp={code:"es",formatDistance:D1,formatLong:A1,formatRelative:W1,localize:V1,match:aN,options:{weekStartsOn:1,firstWeekContainsDate:1}},sN={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"aproximadamente 1 hora",other:"aproximadamente {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"aproximadamente 1 semana",other:"aproximadamente {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"aproximadamente 1 mรชs",other:"aproximadamente {{count}} meses"},xMonths:{one:"1 mรชs",other:"{{count}} meses"},aboutXYears:{one:"aproximadamente 1 ano",other:"aproximadamente {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},iN=(e,t,n)=>{let r;const o=sN[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",String(t)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"daqui a "+r:"hรก "+r:r},cN={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d 'de' MMM 'de' y",short:"dd/MM/y"},lN={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dN={full:"{{date}} 'ร s' {{time}}",long:"{{date}} 'ร s' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},uN={date:en({formats:cN,defaultWidth:"full"}),time:en({formats:lN,defaultWidth:"full"}),dateTime:en({formats:dN,defaultWidth:"full"})},fN={lastWeek:e=>{const t=e.getDay();return"'"+(t===0||t===6?"รบltimo":"รบltima")+"' eeee 'ร s' p"},yesterday:"'ontem ร s' p",today:"'hoje ร s' p",tomorrow:"'amanhรฃ ร s' p",nextWeek:"eeee 'ร s' p",other:"P"},mN=(e,t,n,r)=>{const o=fN[e];return typeof o=="function"?o(t):o},pN={narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["antes de Cristo","depois de Cristo"]},hN={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1ยบ trimestre","2ยบ trimestre","3ยบ trimestre","4ยบ trimestre"]},_N={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","marรงo","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},gN={narrow:["d","s","t","q","q","s","s"],short:["dom","seg","ter","qua","qui","sex","sรกb"],abbreviated:["dom","seg","ter","qua","qui","sex","sรกb"],wide:["domingo","segunda-feira","terรงa-feira","quarta-feira","quinta-feira","sexta-feira","sรกbado"]},jN={narrow:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhรฃ",afternoon:"tarde",evening:"noite",night:"madrugada"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhรฃ",afternoon:"tarde",evening:"noite",night:"madrugada"},wide:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhรฃ",afternoon:"tarde",evening:"noite",night:"madrugada"}},yN={narrow:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhรฃ",afternoon:"da tarde",evening:"da noite",night:"da madrugada"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhรฃ",afternoon:"da tarde",evening:"da noite",night:"da madrugada"},wide:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhรฃ",afternoon:"da tarde",evening:"da noite",night:"da madrugada"}},vN=(e,t)=>Number(e)+"ยบ",xN={ordinalNumber:vN,era:ot({values:pN,defaultWidth:"wide"}),quarter:ot({values:hN,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ot({values:_N,defaultWidth:"wide"}),day:ot({values:gN,defaultWidth:"wide"}),dayPeriod:ot({values:jN,defaultWidth:"wide",formattingValues:yN,defaultFormattingWidth:"wide"})},bN=/^(\d+)(ยบ|ยช)?/i,wN=/\d+/i,NN={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes da era comum|depois de cristo|era comum)/i},SN={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes da era comum)/i,/^(depois de cristo|era comum)/i]},CN={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](ยบ|ยช)? trimestre/i},kN={any:[/1/i,/2/i,/3/i,/4/i]},PN={narrow:/^[jfmasond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|marรงo|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},EN={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ab/i,/^mai/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},MN={narrow:/^[dstq]/i,short:/^(dom|seg|ter|qua|qui|sex|s[รกa]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[รกa]b)/i,wide:/^(domingo|segunda-?\s?feira|terรงa-?\s?feira|quarta-?\s?feira|quinta-?\s?feira|sexta-?\s?feira|s[รกa]bado)/i},DN={narrow:[/^d/i,/^s/i,/^t/i,/^q/i,/^q/i,/^s/i,/^s/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[รกa]/i]},TN={narrow:/^(a|p|meia-?\s?noite|meio-?\s?dia|(da) (manh[รฃa]|tarde|noite|madrugada))/i,any:/^([ap]\.?\s?m\.?|meia-?\s?noite|meio-?\s?dia|(da) (manh[รฃa]|tarde|noite|madrugada))/i},RN={any:{am:/^a/i,pm:/^p/i,midnight:/^meia/i,noon:/^meio/i,morning:/manh[รฃa]/i,afternoon:/tarde/i,evening:/noite/i,night:/madrugada/i}},ON={ordinalNumber:hi({matchPattern:bN,parsePattern:wN,valueCallback:e=>parseInt(e,10)}),era:at({matchPatterns:NN,defaultMatchWidth:"wide",parsePatterns:SN,defaultParseWidth:"any"}),quarter:at({matchPatterns:CN,defaultMatchWidth:"wide",parsePatterns:kN,defaultParseWidth:"any",valueCallback:e=>e+1}),month:at({matchPatterns:PN,defaultMatchWidth:"wide",parsePatterns:EN,defaultParseWidth:"any"}),day:at({matchPatterns:MN,defaultMatchWidth:"wide",parsePatterns:DN,defaultParseWidth:"any"}),dayPeriod:at({matchPatterns:TN,defaultMatchWidth:"any",parsePatterns:RN,defaultParseWidth:"any"})},ip={code:"pt",formatDistance:iN,formatLong:uN,formatRelative:mN,localize:xN,match:ON,options:{weekStartsOn:1,firstWeekContainsDate:4}};function AN(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const Wa={},wr={};function Dn(e,t){try{const r=(Wa[e]||(Wa[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return r in wr?wr[r]:$c(r,r.split(":"))}catch{if(e in wr)return wr[e];const n=e==null?void 0:e.match(zN);return n?$c(e,n.slice(1)):NaN}}const zN=/([+-]\d\d):?(\d\d)?/;function $c(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return wr[e]=n*60+r>0?n*60+r+o:n*60-r-o}class Ft extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Dn(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),cp(this),vs(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new Ft(...n,t):new Ft(Date.now(),t)}withTimeZone(t){return new Ft(+this,t)}getTimezoneOffset(){const t=-Dn(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),vs(this),+this}[Symbol.for("constructDateFrom")](t){return new Ft(+new Date(t),this.timeZone)}}const Lc=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Lc.test(e))return;const t=e.replace(Lc,"$1UTC");Ft.prototype[t]&&(e.startsWith("get")?Ft.prototype[e]=function(){return this.internal[t]()}:(Ft.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),IN(this),+this},Ft.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),vs(this),+this}))});function vs(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-Dn(e.timeZone,e)*60))}function IN(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),cp(e)}function cp(e){const t=Dn(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),a=-new Date(+r).getTimezoneOffset(),i=o-a,c=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();i&&c&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+i);const l=o-n;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const d=new Date(+e);d.setUTCSeconds(0);const u=o>0?d.getSeconds():(d.getSeconds()-60)%60,m=Math.round(-(Dn(e.timeZone,e)*60))%60;(m||u)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+m),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+m+u));const f=Dn(e.timeZone,e),p=f>0?Math.floor(f):Math.ceil(f),h=-new Date(+e).getTimezoneOffset()-p,j=p!==n,x=h-l;if(j&&x){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+x);const b=Dn(e.timeZone,e),w=b>0?Math.floor(b):Math.ceil(b),N=p-w;N&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+N),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+N))}}class et extends Ft{static tz(t,...n){return n.length?new et(...n,t):new et(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${AN(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new et(+this,t)}[Symbol.for("constructDateFrom")](t){return new et(+new Date(t),this.timeZone)}}const lp=6048e5,WN=864e5,Bc=Symbol.for("constructDateFrom");function Xe(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Bc in e?e[Bc](t):e instanceof Date?new e.constructor(t):new Date(t)}function Me(e,t){return Xe(t||e,e)}function dp(e,t,n){const r=Me(e,n==null?void 0:n.in);return isNaN(t)?Xe(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function up(e,t,n){const r=Me(e,n==null?void 0:n.in);if(isNaN(t))return Xe(e,NaN);if(!t)return r;const o=r.getDate(),a=Xe(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const i=a.getDate();return o>=i?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let FN={};function Yr(){return FN}function sr(e,t){var c,l,d,u;const n=Yr(),r=(t==null?void 0:t.weekStartsOn)??((l=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(d=n.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,o=Me(e,t==null?void 0:t.in),a=o.getDay(),i=(a<r?7:0)+a-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function Dr(e,t){return sr(e,{...t,weekStartsOn:1})}function fp(e,t){const n=Me(e,t==null?void 0:t.in),r=n.getFullYear(),o=Xe(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=Dr(o),i=Xe(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const c=Dr(i);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function Hc(e){const t=Me(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function fr(e,...t){const n=Xe.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Tr(e,t){const n=Me(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function yi(e,t,n){const[r,o]=fr(n==null?void 0:n.in,e,t),a=Tr(r),i=Tr(o),c=+a-Hc(a),l=+i-Hc(i);return Math.round((c-l)/WN)}function $N(e,t){const n=fp(e,t),r=Xe(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Dr(r)}function LN(e,t,n){return dp(e,t*7,n)}function BN(e,t,n){return up(e,t*12,n)}function HN(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Xe.bind(null,o));const a=Me(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),Xe(r,n||NaN)}function qN(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Xe.bind(null,o));const a=Me(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),Xe(r,n||NaN)}function YN(e,t,n){const[r,o]=fr(n==null?void 0:n.in,e,t);return+Tr(r)==+Tr(o)}function mp(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function VN(e){return!(!mp(e)&&typeof e!="number"||isNaN(+Me(e)))}function pp(e,t,n){const[r,o]=fr(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return a*12+i}function GN(e,t){const n=Me(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function hp(e,t){const[n,r]=fr(e,t.start,t.end);return{start:n,end:r}}function UN(e,t){const{start:n,end:r}=hp(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setDate(1);let c=1;const l=[];for(;+i<=a;)l.push(Xe(n,i)),i.setMonth(i.getMonth()+c);return o?l.reverse():l}function XN(e,t){const n=Me(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function KN(e,t){const n=Me(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function _p(e,t){const n=Me(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function JN(e,t){const{start:n,end:r}=hp(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setMonth(0,1);let c=1;const l=[];for(;+i<=a;)l.push(Xe(n,i)),i.setFullYear(i.getFullYear()+c);return o?l.reverse():l}function gp(e,t){var c,l,d,u;const n=Yr(),r=(t==null?void 0:t.weekStartsOn)??((l=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(d=n.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,o=Me(e,t==null?void 0:t.in),a=o.getDay(),i=(a<r?-7:0)+6-(a-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}function QN(e,t){return gp(e,{...t,weekStartsOn:1})}const ZN={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},eS=(e,t,n)=>{let r;const o=ZN[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Fa(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const tS={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},nS={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},rS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},oS={date:Fa({formats:tS,defaultWidth:"full"}),time:Fa({formats:nS,defaultWidth:"full"}),dateTime:Fa({formats:rS,defaultWidth:"full"})},aS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},sS=(e,t,n,r)=>aS[e];function _r(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,c=n!=null&&n.width?String(n.width):i;o=e.formattingValues[c]||e.formattingValues[i]}else{const i=e.defaultWidth,c=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[c]||e.values[i]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const iS={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},cS={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},lS={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},dS={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},uS={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},fS={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},mS=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},pS={ordinalNumber:mS,era:_r({values:iS,defaultWidth:"wide"}),quarter:_r({values:cS,defaultWidth:"wide",argumentCallback:e=>e-1}),month:_r({values:lS,defaultWidth:"wide"}),day:_r({values:dS,defaultWidth:"wide"}),dayPeriod:_r({values:uS,defaultWidth:"wide",formattingValues:fS,defaultFormattingWidth:"wide"})};function gr(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const i=a[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(c)?_S(c,m=>m.test(i)):hS(c,m=>m.test(i));let d;d=e.valueCallback?e.valueCallback(l):l,d=n.valueCallback?n.valueCallback(d):d;const u=t.slice(i.length);return{value:d,rest:u}}}function hS(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function _S(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function gS(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=n.valueCallback?n.valueCallback(i):i;const c=t.slice(o.length);return{value:i,rest:c}}}const jS=/^(\d+)(th|st|nd|rd)?/i,yS=/\d+/i,vS={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},xS={any:[/^b/i,/^(a|c)/i]},bS={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},wS={any:[/1/i,/2/i,/3/i,/4/i]},NS={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},SS={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},CS={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},kS={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},PS={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ES={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},MS={ordinalNumber:gS({matchPattern:jS,parsePattern:yS,valueCallback:e=>parseInt(e,10)}),era:gr({matchPatterns:vS,defaultMatchWidth:"wide",parsePatterns:xS,defaultParseWidth:"any"}),quarter:gr({matchPatterns:bS,defaultMatchWidth:"wide",parsePatterns:wS,defaultParseWidth:"any",valueCallback:e=>e+1}),month:gr({matchPatterns:NS,defaultMatchWidth:"wide",parsePatterns:SS,defaultParseWidth:"any"}),day:gr({matchPatterns:CS,defaultMatchWidth:"wide",parsePatterns:kS,defaultParseWidth:"any"}),dayPeriod:gr({matchPatterns:PS,defaultMatchWidth:"any",parsePatterns:ES,defaultParseWidth:"any"})},Un={code:"en-US",formatDistance:eS,formatLong:oS,formatRelative:sS,localize:pS,match:MS,options:{weekStartsOn:0,firstWeekContainsDate:1}};function DS(e,t){const n=Me(e,t==null?void 0:t.in);return yi(n,_p(n))+1}function vi(e,t){const n=Me(e,t==null?void 0:t.in),r=+Dr(n)-+$N(n);return Math.round(r/lp)+1}function jp(e,t){var u,m,f,p;const n=Me(e,t==null?void 0:t.in),r=n.getFullYear(),o=Yr(),a=(t==null?void 0:t.firstWeekContainsDate)??((m=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:m.firstWeekContainsDate)??o.firstWeekContainsDate??((p=(f=o.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,i=Xe((t==null?void 0:t.in)||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const c=sr(i,t),l=Xe((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const d=sr(l,t);return+n>=+c?r+1:+n>=+d?r:r-1}function TS(e,t){var c,l,d,u;const n=Yr(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(d=n.locale)==null?void 0:d.options)==null?void 0:u.firstWeekContainsDate)??1,o=jp(e,t),a=Xe((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),sr(a,t)}function xi(e,t){const n=Me(e,t==null?void 0:t.in),r=+sr(n,t)-+TS(n,t);return Math.round(r/lp)+1}function Ee(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const fn={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ee(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ee(n+1,2)},d(e,t){return Ee(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Ee(e.getHours()%12||12,t.length)},H(e,t){return Ee(e.getHours(),t.length)},m(e,t){return Ee(e.getMinutes(),t.length)},s(e,t){return Ee(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ee(o,t.length)}},Yn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},qc={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return fn.y(e,t)},Y:function(e,t,n,r){const o=jp(e,r),a=o>0?o:1-o;if(t==="YY"){const i=a%100;return Ee(i,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):Ee(a,t.length)},R:function(e,t){const n=fp(e);return Ee(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ee(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ee(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ee(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return fn.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ee(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=xi(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ee(o,t.length)},I:function(e,t,n){const r=vi(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ee(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):fn.d(e,t)},D:function(e,t,n){const r=DS(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ee(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Ee(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Ee(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Ee(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Yn.noon:r===0?o=Yn.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Yn.evening:r>=12?o=Yn.afternoon:r>=4?o=Yn.morning:o=Yn.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return fn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):fn.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ee(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ee(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):fn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):fn.s(e,t)},S:function(e,t){return fn.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Vc(r);case"XXXX":case"XX":return Pn(r);case"XXXXX":case"XXX":default:return Pn(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Vc(r);case"xxxx":case"xx":return Pn(r);case"xxxxx":case"xxx":default:return Pn(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Yc(r,":");case"OOOO":default:return"GMT"+Pn(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Yc(r,":");case"zzzz":default:return"GMT"+Pn(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ee(r,t.length)},T:function(e,t,n){return Ee(+e,t.length)}};function Yc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+Ee(a,2)}function Vc(e,t){return e%60===0?(e>0?"-":"+")+Ee(Math.abs(e)/60,2):Pn(e,t)}function Pn(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ee(Math.trunc(r/60),2),a=Ee(r%60,2);return n+o+t+a}const Gc=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},yp=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},RS=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Gc(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Gc(r,t)).replace("{{time}}",yp(o,t))},OS={p:yp,P:RS},AS=/^D+$/,zS=/^Y+$/,IS=["D","DD","YY","YYYY"];function WS(e){return AS.test(e)}function FS(e){return zS.test(e)}function $S(e,t,n){const r=LS(e,t,n);if(console.warn(r),IS.includes(e))throw new RangeError(r)}function LS(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const BS=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,HS=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,qS=/^'([^]*?)'?$/,YS=/''/g,VS=/[a-zA-Z]/;function Nr(e,t,n){var u,m,f,p,g,h,j,x;const r=Yr(),o=(n==null?void 0:n.locale)??r.locale??Un,a=(n==null?void 0:n.firstWeekContainsDate)??((m=(u=n==null?void 0:n.locale)==null?void 0:u.options)==null?void 0:m.firstWeekContainsDate)??r.firstWeekContainsDate??((p=(f=r.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,i=(n==null?void 0:n.weekStartsOn)??((h=(g=n==null?void 0:n.locale)==null?void 0:g.options)==null?void 0:h.weekStartsOn)??r.weekStartsOn??((x=(j=r.locale)==null?void 0:j.options)==null?void 0:x.weekStartsOn)??0,c=Me(e,n==null?void 0:n.in);if(!VN(c))throw new RangeError("Invalid time value");let l=t.match(HS).map(b=>{const w=b[0];if(w==="p"||w==="P"){const N=OS[w];return N(b,o.formatLong)}return b}).join("").match(BS).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const w=b[0];if(w==="'")return{isToken:!1,value:GS(b)};if(qc[w])return{isToken:!0,value:b};if(w.match(VS))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:b}});o.localize.preprocessor&&(l=o.localize.preprocessor(c,l));const d={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return l.map(b=>{if(!b.isToken)return b.value;const w=b.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&FS(w)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&WS(w))&&$S(w,t,String(e));const N=qc[w[0]];return N(c,w,o.localize,d)}).join("")}function GS(e){const t=e.match(qS);return t?t[1].replace(YS,"'"):e}function US(e,t){const n=Me(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=Xe(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function XS(e,t){return Me(e,t==null?void 0:t.in).getMonth()}function KS(e,t){return Me(e,t==null?void 0:t.in).getFullYear()}function JS(e,t){return+Me(e)>+Me(t)}function QS(e,t){return+Me(e)<+Me(t)}function ZS(e,t,n){const[r,o]=fr(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function eC(e,t,n){const[r,o]=fr(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function tC(e,t,n){const r=Me(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),i=Xe(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const c=US(i);return r.setMonth(t,Math.min(a,c)),r}function nC(e,t,n){const r=Me(e,n==null?void 0:n.in);return isNaN(+r)?Xe(e,NaN):(r.setFullYear(t),r)}const Uc=5,rC=4;function oC(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,Uc*7-1);return t.getMonth(e)===t.getMonth(a)?Uc:rC}function vp(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-1*6):t.addDays(n,-1*(r-1))}function aC(e,t){const n=vp(e,t),r=oC(e,t);return t.addDays(n,r*7-1)}const xp={...Un,labels:{labelDayButton:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(i,c)=>Nr(i,c,{locale:Un,...n});let a=o(e,"PPPP");return t.today&&(a=`Today, ${a}`),t.selected&&(a=`${a}, selected`),a},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,a)=>Nr(o,a,{locale:Un,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(i,c)=>Nr(i,c,{locale:Un,...n});let a=o(e,"PPPP");return t!=null&&t.today&&(a=`Today, ${a}`),a},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,a)=>Nr(o,a,{locale:Un,...t}),r(e,"cccc")}}};class ht{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?et.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,a)=>{var i;return(i=this.overrides)!=null&&i.newDate?this.overrides.newDate(r,o,a):this.options.timeZone?new et(r,o,a,this.options.timeZone):new Date(r,o,a)},this.addDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addDays?this.overrides.addDays(r,o):dp(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):up(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):LN(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):BN(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):yi(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):pp(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):UN(r)},this.eachYearOfInterval=r=>{var c;const o=(c=this.overrides)!=null&&c.eachYearOfInterval?this.overrides.eachYearOfInterval(r):JN(r),a=new Set(o.map(l=>this.getYear(l)));if(a.size===o.length)return o;const i=[];return a.forEach(l=>{i.push(new Date(l,0,1))}),i},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):aC(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):QN(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):GN(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):gp(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):KN(r)},this.format=(r,o,a)=>{var c;const i=(c=this.overrides)!=null&&c.format?this.overrides.format(r,o,this.options):Nr(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(i):i},this.getISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(r):vi(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):XS(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):KS(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):xi(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):JS(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):QS(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):mp(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):YN(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):ZS(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):eC(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):HN(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):qN(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):tC(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):nC(r,o)},this.startOfBroadcastWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):vp(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):Tr(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):Dr(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):XN(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):sr(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):_p(r)},this.options={locale:xp,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){var n;const t=(n=this.options.locale)==null?void 0:n.code;return t&&ht.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:o}=this.options,a=n==null?void 0:n.code;if(a&&ht.yearFirstLocales.has(a))try{return new Intl.DateTimeFormat(a,{month:"long",year:"numeric",timeZone:r,numberingSystem:o}).format(t)}catch{}const i=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,i)}}ht.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const Xt=new ht;class bp{constructor(t,n,r=Xt){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r,this.isoDate=r.format(t,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class sC{constructor(t,n){this.date=t,this.weeks=n}}class iC{constructor(t,n){this.days=n,this.weekNumber=t}}function cC(e){return v.createElement("button",{...e})}function lC(e){return v.createElement("span",{...e})}function dC(e){const{size:t=24,orientation:n="left",className:r}=e;return v.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&v.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&v.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&v.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&v.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function uC(e){const{day:t,modifiers:n,...r}=e;return v.createElement("td",{...r})}function fC(e){const{day:t,modifiers:n,...r}=e,o=v.useRef(null);return v.useEffect(()=>{var a;n.focused&&((a=o.current)==null||a.focus())},[n.focused]),v.createElement("button",{ref:o,...r})}var ee;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(ee||(ee={}));var Fe;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(Fe||(Fe={}));var kt;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(kt||(kt={}));var ut;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(ut||(ut={}));function mC(e){const{options:t,className:n,components:r,classNames:o,...a}=e,i=[o[ee.Dropdown],n].join(" "),c=t==null?void 0:t.find(({value:l})=>l===a.value);return v.createElement("span",{"data-disabled":a.disabled,className:o[ee.DropdownRoot]},v.createElement(r.Select,{className:i,...a},t==null?void 0:t.map(({value:l,label:d,disabled:u})=>v.createElement(r.Option,{key:l,value:l,disabled:u},d))),v.createElement("span",{className:o[ee.CaptionLabel],"aria-hidden":!0},c==null?void 0:c.label,v.createElement(r.Chevron,{orientation:"down",size:18,className:o[ee.Chevron]})))}function pC(e){return v.createElement("div",{...e})}function hC(e){return v.createElement("div",{...e})}function _C(e){const{calendarMonth:t,displayIndex:n,...r}=e;return v.createElement("div",{...r},e.children)}function gC(e){const{calendarMonth:t,displayIndex:n,...r}=e;return v.createElement("div",{...r})}function jC(e){return v.createElement("table",{...e})}function yC(e){return v.createElement("div",{...e})}const wp=v.createContext(void 0);function Vr(){const e=v.useContext(wp);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function vC(e){const{components:t}=Vr();return v.createElement(t.Dropdown,{...e})}function xC(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:i,classNames:c,labels:{labelPrevious:l,labelNext:d}}=Vr(),u=v.useCallback(f=>{o&&(n==null||n(f))},[o,n]),m=v.useCallback(f=>{r&&(t==null||t(f))},[r,t]);return v.createElement("nav",{...a},v.createElement(i.PreviousMonthButton,{type:"button",className:c[ee.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":l(r),onClick:m},v.createElement(i.Chevron,{disabled:r?void 0:!0,className:c[ee.Chevron],orientation:"left"})),v.createElement(i.NextMonthButton,{type:"button",className:c[ee.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":d(o),onClick:u},v.createElement(i.Chevron,{disabled:o?void 0:!0,orientation:"right",className:c[ee.Chevron]})))}function bC(e){const{components:t}=Vr();return v.createElement(t.Button,{...e})}function wC(e){return v.createElement("option",{...e})}function NC(e){const{components:t}=Vr();return v.createElement(t.Button,{...e})}function SC(e){const{rootRef:t,...n}=e;return v.createElement("div",{...n,ref:t})}function CC(e){return v.createElement("select",{...e})}function kC(e){const{week:t,...n}=e;return v.createElement("tr",{...n})}function PC(e){return v.createElement("th",{...e})}function EC(e){return v.createElement("thead",{"aria-hidden":!0},v.createElement("tr",{...e}))}function MC(e){const{week:t,...n}=e;return v.createElement("th",{...n})}function DC(e){return v.createElement("th",{...e})}function TC(e){return v.createElement("tbody",{...e})}function RC(e){const{components:t}=Vr();return v.createElement(t.Dropdown,{...e})}const OC=Object.freeze(Object.defineProperty({__proto__:null,Button:cC,CaptionLabel:lC,Chevron:dC,Day:uC,DayButton:fC,Dropdown:mC,DropdownNav:pC,Footer:hC,Month:_C,MonthCaption:gC,MonthGrid:jC,Months:yC,MonthsDropdown:vC,Nav:xC,NextMonthButton:bC,Option:wC,PreviousMonthButton:NC,Root:SC,Select:CC,Week:kC,WeekNumber:MC,WeekNumberHeader:DC,Weekday:PC,Weekdays:EC,Weeks:TC,YearsDropdown:RC},Symbol.toStringTag,{value:"Module"}));function Qt(e,t,n=!1,r=Xt){let{from:o,to:a}=e;const{differenceInCalendarDays:i,isSameDay:c}=r;return o&&a?(i(a,o)<0&&([o,a]=[a,o]),i(t,o)>=(n?1:0)&&i(a,t)>=(n?1:0)):!n&&a?c(a,t):!n&&o?c(o,t):!1}function bi(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function _a(e){return!!(e&&typeof e=="object"&&"from"in e)}function wi(e){return!!(e&&typeof e=="object"&&"after"in e)}function Ni(e){return!!(e&&typeof e=="object"&&"before"in e)}function Np(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Sp(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Zt(e,t,n=Xt){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:i}=n;return r.some(c=>{if(typeof c=="boolean")return c;if(n.isDate(c))return o(e,c);if(Sp(c,n))return c.some(l=>o(e,l));if(_a(c))return Qt(c,e,!1,n);if(Np(c))return Array.isArray(c.dayOfWeek)?c.dayOfWeek.includes(e.getDay()):c.dayOfWeek===e.getDay();if(bi(c)){const l=a(c.before,e),d=a(c.after,e),u=l>0,m=d<0;return i(c.before,c.after)?m&&u:u||m}return wi(c)?a(e,c.after)>0:Ni(c)?a(c.before,e)>0:typeof c=="function"?c(e):!1})}function AC(e,t,n,r,o){const{disabled:a,hidden:i,modifiers:c,showOutsideDays:l,broadcastCalendar:d,today:u=o.today()}=t,{isSameDay:m,isSameMonth:f,startOfMonth:p,isBefore:g,endOfMonth:h,isAfter:j}=o,x=n&&p(n),b=r&&h(r),w={[Fe.focused]:[],[Fe.outside]:[],[Fe.disabled]:[],[Fe.hidden]:[],[Fe.today]:[]},N={};for(const S of e){const{date:y,displayMonth:C}=S,E=!!(C&&!f(y,C)),P=!!(x&&g(y,x)),k=!!(b&&j(y,b)),D=!!(a&&Zt(y,a,o)),M=!!(i&&Zt(y,i,o))||P||k||!d&&!l&&E||d&&l===!1&&E,A=m(y,u);E&&w.outside.push(S),D&&w.disabled.push(S),M&&w.hidden.push(S),A&&w.today.push(S),c&&Object.keys(c).forEach(z=>{const G=c==null?void 0:c[z];G&&Zt(y,G,o)&&(N[z]?N[z].push(S):N[z]=[S])})}return S=>{const y={[Fe.focused]:!1,[Fe.disabled]:!1,[Fe.hidden]:!1,[Fe.outside]:!1,[Fe.today]:!1},C={};for(const E in w){const P=w[E];y[E]=P.some(k=>k===S)}for(const E in N)C[E]=N[E].some(P=>P===S);return{...y,...C}}}function zC(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[Fe[a]]?o.push(t[Fe[a]]):t[kt[a]]&&o.push(t[kt[a]]),o),[t[ee.Day]])}function IC(e){return{...OC,...e}}function WC(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function FC(){const e={};for(const t in ee)e[ee[t]]=`rdp-${ee[t]}`;for(const t in Fe)e[Fe[t]]=`rdp-${Fe[t]}`;for(const t in kt)e[kt[t]]=`rdp-${kt[t]}`;for(const t in ut)e[ut[t]]=`rdp-${ut[t]}`;return e}function Cp(e,t,n){return(n??new ht(t)).formatMonthYear(e)}const $C=Cp;function LC(e,t,n){return(n??new ht(t)).format(e,"d")}function BC(e,t=Xt){return t.format(e,"LLLL")}function HC(e,t,n){return(n??new ht(t)).format(e,"cccccc")}function qC(e,t=Xt){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function YC(){return""}function kp(e,t=Xt){return t.format(e,"yyyy")}const VC=kp,GC=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Cp,formatDay:LC,formatMonthCaption:$C,formatMonthDropdown:BC,formatWeekNumber:qC,formatWeekNumberHeader:YC,formatWeekdayName:HC,formatYearCaption:VC,formatYearDropdown:kp},Symbol.toStringTag,{value:"Module"}));function UC(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...GC,...e}}function Si(e,t,n,r){let o=(r??new ht(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const XC=Si;function Ci(e,t,n){return(n??new ht(t)).formatMonthYear(e)}const KC=Ci;function Pp(e,t,n,r){let o=(r??new ht(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function Ep(e){return"Choose the Month"}function Mp(){return""}const JC="Go to the Next Month";function Dp(e,t){return JC}function Tp(e){return"Go to the Previous Month"}function Rp(e,t,n){return(n??new ht(t)).format(e,"cccc")}function Op(e,t){return`Week ${e}`}function Ap(e){return"Week Number"}function zp(e){return"Choose the Year"}const QC=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:KC,labelDay:XC,labelDayButton:Si,labelGrid:Ci,labelGridcell:Pp,labelMonthDropdown:Ep,labelNav:Mp,labelNext:Dp,labelPrevious:Tp,labelWeekNumber:Op,labelWeekNumberHeader:Ap,labelWeekday:Rp,labelYearDropdown:zp},Symbol.toStringTag,{value:"Module"})),St=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function ZC(e,t){var r;const n=((r=t.locale)==null?void 0:r.labels)??{};return{...QC,...e??{},labelDayButton:St(Si,e==null?void 0:e.labelDayButton,n.labelDayButton),labelMonthDropdown:St(Ep,e==null?void 0:e.labelMonthDropdown,n.labelMonthDropdown),labelNext:St(Dp,e==null?void 0:e.labelNext,n.labelNext),labelPrevious:St(Tp,e==null?void 0:e.labelPrevious,n.labelPrevious),labelWeekNumber:St(Op,e==null?void 0:e.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:St(zp,e==null?void 0:e.labelYearDropdown,n.labelYearDropdown),labelGrid:St(Ci,e==null?void 0:e.labelGrid,n.labelGrid),labelGridcell:St(Pp,e==null?void 0:e.labelGridcell,n.labelGridcell),labelNav:St(Mp,e==null?void 0:e.labelNav,n.labelNav),labelWeekNumberHeader:St(Ap,e==null?void 0:e.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:St(Rp,e==null?void 0:e.labelWeekday,n.labelWeekday)}}function ek(e,t,n,r,o){const{startOfMonth:a,startOfYear:i,endOfYear:c,eachMonthOfInterval:l,getMonth:d}=o;return l({start:i(e),end:c(e)}).map(f=>{const p=r.formatMonthDropdown(f,o),g=d(f),h=t&&f<a(t)||n&&f>a(n)||!1;return{value:g,label:p,disabled:h}})}function tk(e,t={},n={}){let r={...t==null?void 0:t[ee.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function nk(e,t,n,r){const o=r??e.today(),a=n?e.startOfBroadcastWeek(o,e):t?e.startOfISOWeek(o):e.startOfWeek(o),i=[];for(let c=0;c<7;c++){const l=e.addDays(a,c);i.push(l)}return i}function rk(e,t,n,r,o=!1){if(!e||!t)return;const{startOfYear:a,endOfYear:i,eachYearOfInterval:c,getYear:l}=r,d=a(e),u=i(t),m=c({start:d,end:u});return o&&m.reverse(),m.map(f=>{const p=n.formatYearDropdown(f,r);return{value:l(f),label:p,disabled:!1}})}function ok(e,t={}){var c;const{weekStartsOn:n,locale:r}=t,o=n??((c=r==null?void 0:r.options)==null?void 0:c.weekStartsOn)??0,a=l=>{const d=typeof l=="number"||typeof l=="string"?new Date(l):l;return new et(d.getFullYear(),d.getMonth(),d.getDate(),12,0,0,e)},i=l=>{const d=a(l);return new Date(d.getFullYear(),d.getMonth(),d.getDate(),0,0,0,0)};return{today:()=>a(et.tz(e)),newDate:(l,d,u)=>new et(l,d,u,12,0,0,e),startOfDay:l=>a(l),startOfWeek:(l,d)=>{const u=a(l),m=(d==null?void 0:d.weekStartsOn)??o,f=(u.getDay()-m+7)%7;return u.setDate(u.getDate()-f),u},startOfISOWeek:l=>{const d=a(l),u=(d.getDay()-1+7)%7;return d.setDate(d.getDate()-u),d},startOfMonth:l=>{const d=a(l);return d.setDate(1),d},startOfYear:l=>{const d=a(l);return d.setMonth(0,1),d},endOfWeek:(l,d)=>{const u=a(l),p=((((d==null?void 0:d.weekStartsOn)??o)+6)%7-u.getDay()+7)%7;return u.setDate(u.getDate()+p),u},endOfISOWeek:l=>{const d=a(l),u=(7-d.getDay())%7;return d.setDate(d.getDate()+u),d},endOfMonth:l=>{const d=a(l);return d.setMonth(d.getMonth()+1,0),d},endOfYear:l=>{const d=a(l);return d.setMonth(11,31),d},eachMonthOfInterval:l=>{const d=a(l.start),u=a(l.end),m=[],f=new et(d.getFullYear(),d.getMonth(),1,12,0,0,e),p=u.getFullYear()*12+u.getMonth();for(;f.getFullYear()*12+f.getMonth()<=p;)m.push(new et(f,e)),f.setMonth(f.getMonth()+1,1);return m},addDays:(l,d)=>{const u=a(l);return u.setDate(u.getDate()+d),u},addWeeks:(l,d)=>{const u=a(l);return u.setDate(u.getDate()+d*7),u},addMonths:(l,d)=>{const u=a(l);return u.setMonth(u.getMonth()+d),u},addYears:(l,d)=>{const u=a(l);return u.setFullYear(u.getFullYear()+d),u},eachYearOfInterval:l=>{const d=a(l.start),u=a(l.end),m=[],f=new et(d.getFullYear(),0,1,12,0,0,e);for(;f.getFullYear()<=u.getFullYear();)m.push(new et(f,e)),f.setFullYear(f.getFullYear()+1,0,1);return m},getWeek:(l,d)=>{var m;const u=i(l);return xi(u,{weekStartsOn:(d==null?void 0:d.weekStartsOn)??o,firstWeekContainsDate:(d==null?void 0:d.firstWeekContainsDate)??((m=r==null?void 0:r.options)==null?void 0:m.firstWeekContainsDate)??1})},getISOWeek:l=>{const d=i(l);return vi(d)},differenceInCalendarDays:(l,d)=>{const u=i(l),m=i(d);return yi(u,m)},differenceInCalendarMonths:(l,d)=>{const u=i(l),m=i(d);return pp(u,m)}}}const Gr=e=>e instanceof HTMLElement?e:null,$a=e=>[...e.querySelectorAll("[data-animated-month]")??[]],ak=e=>Gr(e.querySelector("[data-animated-month]")),La=e=>Gr(e.querySelector("[data-animated-caption]")),Ba=e=>Gr(e.querySelector("[data-animated-weeks]")),sk=e=>Gr(e.querySelector("[data-animated-nav]")),ik=e=>Gr(e.querySelector("[data-animated-weekdays]"));function ck(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const i=v.useRef(null),c=v.useRef(r),l=v.useRef(!1);v.useLayoutEffect(()=>{const d=c.current;if(c.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||d.length===0||r.length!==d.length)return;const u=a.isSameMonth(r[0].date,d[0].date),m=a.isAfter(r[0].date,d[0].date),f=m?n[ut.caption_after_enter]:n[ut.caption_before_enter],p=m?n[ut.weeks_after_enter]:n[ut.weeks_before_enter],g=i.current,h=e.current.cloneNode(!0);if(h instanceof HTMLElement?($a(h).forEach(w=>{if(!(w instanceof HTMLElement))return;const N=ak(w);N&&w.contains(N)&&w.removeChild(N);const S=La(w);S&&S.classList.remove(f);const y=Ba(w);y&&y.classList.remove(p)}),i.current=h):i.current=null,l.current||u||o)return;const j=g instanceof HTMLElement?$a(g):[],x=$a(e.current);if(x!=null&&x.every(b=>b instanceof HTMLElement)&&j&&j.every(b=>b instanceof HTMLElement)){l.current=!0,e.current.style.isolation="isolate";const b=sk(e.current);b&&(b.style.zIndex="1"),x.forEach((w,N)=>{const S=j[N];if(!S)return;w.style.position="relative",w.style.overflow="hidden";const y=La(w);y&&y.classList.add(f);const C=Ba(w);C&&C.classList.add(p);const E=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),b&&(b.style.zIndex=""),y&&y.classList.remove(f),C&&C.classList.remove(p),w.style.position="",w.style.overflow="",w.contains(S)&&w.removeChild(S)};S.style.pointerEvents="none",S.style.position="absolute",S.style.overflow="hidden",S.setAttribute("aria-hidden","true");const P=ik(S);P&&(P.style.opacity="0");const k=La(S);k&&(k.classList.add(m?n[ut.caption_before_exit]:n[ut.caption_after_exit]),k.addEventListener("animationend",E));const D=Ba(S);D&&D.classList.add(m?n[ut.weeks_before_exit]:n[ut.weeks_after_exit]),w.insertBefore(S,w.firstChild)})}})}function lk(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:i,fixedWeeks:c,broadcastCalendar:l}=n??{},{addDays:d,differenceInCalendarDays:u,differenceInCalendarMonths:m,endOfBroadcastWeek:f,endOfISOWeek:p,endOfMonth:g,endOfWeek:h,isAfter:j,startOfBroadcastWeek:x,startOfISOWeek:b,startOfWeek:w}=r,N=l?x(o,r):i?b(o):w(o),S=l?f(a):i?p(g(a)):h(g(a)),y=t&&(l?f(t):i?p(t):h(t)),C=y&&j(S,y)?y:S,E=u(C,N),P=m(a,o)+1,k=[];for(let A=0;A<=E;A++){const z=d(N,A);k.push(z)}const M=(l?35:42)*P;if(c&&k.length<M){const A=M-k.length;for(let z=0;z<A;z++){const G=d(k[k.length-1],1);k.push(G)}}return k}function dk(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,i)=>a.concat(i.days.slice()),t.slice());return n.concat(o.slice())},t.slice())}function uk(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let i=0;i<o;i++){const c=r.addMonths(e,i);if(t&&c>t)break;a.push(c)}return a}function Xc(e,t,n,r){const{month:o,defaultMonth:a,today:i=r.today(),numberOfMonths:c=1}=e;let l=o||a||i;const{differenceInCalendarMonths:d,addMonths:u,startOfMonth:m}=r;if(n&&d(n,l)<c-1){const f=-1*(c-1);l=u(n,f)}return t&&d(l,t)<0&&(l=t),m(l)}function fk(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:i,endOfMonth:c,endOfWeek:l,getISOWeek:d,getWeek:u,startOfBroadcastWeek:m,startOfISOWeek:f,startOfWeek:p}=r,g=e.reduce((h,j)=>{const x=n.broadcastCalendar?m(j,r):n.ISOWeek?f(j):p(j),b=n.broadcastCalendar?a(j):n.ISOWeek?i(c(j)):l(c(j)),w=t.filter(C=>C>=x&&C<=b),N=n.broadcastCalendar?35:42;if(n.fixedWeeks&&w.length<N){const C=t.filter(E=>{const P=N-w.length;return E>b&&E<=o(b,P)});w.push(...C)}const S=w.reduce((C,E)=>{const P=n.ISOWeek?d(E):u(E),k=C.find(M=>M.weekNumber===P),D=new bp(E,j,r);return k?k.days.push(D):C.push(new iC(P,[D])),C},[]),y=new sC(j,S);return h.push(y),h},[]);return n.reverseMonths?g.reverse():g}function mk(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:i,endOfMonth:c,addYears:l,endOfYear:d,newDate:u,today:m}=t,{fromYear:f,toYear:p,fromMonth:g,toMonth:h}=e;!n&&g&&(n=g),!n&&f&&(n=t.newDate(f,0,1)),!r&&h&&(r=h),!r&&p&&(r=u(p,11,31));const j=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=i(n):f?n=u(f,0,1):!n&&j&&(n=o(l(e.today??m(),-100))),r?r=c(r):p?r=u(p,11,31):!r&&j&&(r=d(e.today??m())),[n&&a(n),r&&a(r)]}function pk(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:i,addMonths:c,differenceInCalendarMonths:l}=r,d=o?a:1,u=i(e);if(!t)return c(u,d);if(!(l(t,e)<a))return c(u,d)}function hk(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:i,addMonths:c,differenceInCalendarMonths:l}=r,d=o?a??1:1,u=i(e);if(!t)return c(u,-d);if(!(l(u,t)<=0))return c(u,-d)}function _k(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function ga(e,t){const[n,r]=v.useState(e);return[t===void 0?n:t,r]}function gk(e,t){var N;const[n,r]=mk(e,t),{startOfMonth:o,endOfMonth:a}=t,i=Xc(e,n,r,t),[c,l]=ga(i,e.month?i:void 0);v.useEffect(()=>{const S=Xc(e,n,r,t);l(S)},[e.timeZone]);const{months:d,weeks:u,days:m,previousMonth:f,nextMonth:p}=v.useMemo(()=>{const S=uk(c,r,{numberOfMonths:e.numberOfMonths},t),y=lk(S,e.endMonth?a(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),C=fk(S,y,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),E=_k(C),P=dk(C),k=hk(c,n,e,t),D=pk(c,r,e,t);return{months:C,weeks:E,days:P,previousMonth:k,nextMonth:D}},[t,c.getTime(),r==null?void 0:r.getTime(),n==null?void 0:n.getTime(),e.disableNavigation,e.broadcastCalendar,(N=e.endMonth)==null?void 0:N.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:g,onMonthChange:h}=e,j=S=>u.some(y=>y.days.some(C=>C.isEqualTo(S))),x=S=>{if(g)return;let y=o(S);n&&y<o(n)&&(y=o(n)),r&&y>o(r)&&(y=o(r)),l(y),h==null||h(y)};return{months:d,weeks:u,days:m,navStart:n,navEnd:r,previousMonth:f,nextMonth:p,goToMonth:x,goToDay:S=>{j(S)||x(S.date)}}}var Ot;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Ot||(Ot={}));function Kc(e){return!e[Fe.disabled]&&!e[Fe.hidden]&&!e[Fe.outside]}function jk(e,t,n,r){let o,a=-1;for(const i of e){const c=t(i);Kc(c)&&(c[Fe.focused]&&a<Ot.FocusedModifier?(o=i,a=Ot.FocusedModifier):r!=null&&r.isEqualTo(i)&&a<Ot.LastFocused?(o=i,a=Ot.LastFocused):n(i.date)&&a<Ot.Selected?(o=i,a=Ot.Selected):c[Fe.today]&&a<Ot.Today&&(o=i,a=Ot.Today))}return o||(o=e.find(i=>Kc(t(i)))),o}function yk(e,t,n,r,o,a,i){const{ISOWeek:c,broadcastCalendar:l}=a,{addDays:d,addMonths:u,addWeeks:m,addYears:f,endOfBroadcastWeek:p,endOfISOWeek:g,endOfWeek:h,max:j,min:x,startOfBroadcastWeek:b,startOfISOWeek:w,startOfWeek:N}=i;let y={day:d,week:m,month:u,year:f,startOfWeek:C=>l?b(C,i):c?w(C):N(C),endOfWeek:C=>l?p(C):c?g(C):h(C)}[e](n,t==="after"?1:-1);return t==="before"&&r?y=j([r,y]):t==="after"&&o&&(y=x([o,y])),y}function Ip(e,t,n,r,o,a,i,c=0){if(c>365)return;const l=yk(e,t,n.date,r,o,a,i),d=!!(a.disabled&&Zt(l,a.disabled,i)),u=!!(a.hidden&&Zt(l,a.hidden,i)),m=l,f=new bp(l,m,i);return!d&&!u?f:Ip(e,t,f,r,o,a,i,c+1)}function vk(e,t,n,r,o){const{autoFocus:a}=e,[i,c]=v.useState(),l=jk(t.days,n,r||(()=>!1),i),[d,u]=v.useState(a?l:void 0);return{isFocusTarget:h=>!!(l!=null&&l.isEqualTo(h)),setFocused:u,focused:d,blur:()=>{c(d),u(void 0)},moveFocus:(h,j)=>{if(!d)return;const x=Ip(h,j,d,t.navStart,t.navEnd,e,o);x&&(e.disableNavigation&&!t.days.some(w=>w.isEqualTo(x))||(t.goToDay(x),u(x)))}}}function xk(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=ga(n,o?n:void 0),c=o?n:a,{isSameDay:l}=t,d=p=>(c==null?void 0:c.some(g=>l(g,p)))??!1,{min:u,max:m}=e;return{selected:c,select:(p,g,h)=>{let j=[...c??[]];if(d(p)){if((c==null?void 0:c.length)===u||r&&(c==null?void 0:c.length)===1)return;j=c==null?void 0:c.filter(x=>!l(x,p))}else(c==null?void 0:c.length)===m?j=[p]:j=[...j,p];return o||i(j),o==null||o(j,p,g,h),j},isSelected:d}}function bk(e,t,n=0,r=0,o=!1,a=Xt){const{from:i,to:c}=t||{},{isSameDay:l,isAfter:d,isBefore:u}=a;let m;if(!i&&!c)m={from:e,to:n>0?void 0:e};else if(i&&!c)l(i,e)?n===0?m={from:i,to:e}:o?m={from:i,to:void 0}:m=void 0:u(e,i)?m={from:e,to:i}:m={from:i,to:e};else if(i&&c)if(l(i,e)&&l(c,e))o?m={from:i,to:c}:m=void 0;else if(l(i,e))m={from:i,to:n>0?void 0:e};else if(l(c,e))m={from:e,to:n>0?void 0:e};else if(u(e,i))m={from:e,to:c};else if(d(e,i))m={from:i,to:e};else if(d(e,c))m={from:i,to:e};else throw new Error("Invalid range");if(m!=null&&m.from&&(m!=null&&m.to)){const f=a.differenceInCalendarDays(m.to,m.from);r>0&&f>r?m={from:e,to:void 0}:n>1&&f<n&&(m={from:e,to:void 0})}return m}function wk(e,t,n=Xt){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),i=Math.min(a,6);for(let c=0;c<=i;c++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function Jc(e,t,n=Xt){return Qt(e,t.from,!1,n)||Qt(e,t.to,!1,n)||Qt(t,e.from,!1,n)||Qt(t,e.to,!1,n)}function Nk(e,t,n=Xt){const r=Array.isArray(t)?t:[t];if(r.filter(c=>typeof c!="function").some(c=>typeof c=="boolean"?c:n.isDate(c)?Qt(e,c,!1,n):Sp(c,n)?c.some(l=>Qt(e,l,!1,n)):_a(c)?c.from&&c.to?Jc(e,{from:c.from,to:c.to},n):!1:Np(c)?wk(e,c.dayOfWeek,n):bi(c)?n.isAfter(c.before,c.after)?Jc(e,{from:n.addDays(c.after,1),to:n.addDays(c.before,-1)},n):Zt(e.from,c,n)||Zt(e.to,c,n):wi(c)||Ni(c)?Zt(e.from,c,n)||Zt(e.to,c,n):!1))return!0;const i=r.filter(c=>typeof c=="function");if(i.length){let c=e.from;const l=n.differenceInCalendarDays(e.to,e.from);for(let d=0;d<=l;d++){if(i.some(u=>u(c)))return!0;c=n.addDays(c,1)}}return!1}function Sk(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:i}=e,[c,l]=ga(o,i?o:void 0),d=i?o:c;return{selected:d,select:(f,p,g)=>{const{min:h,max:j}=e,x=f?bk(f,d,h,j,a,t):void 0;return r&&n&&(x!=null&&x.from)&&x.to&&Nk({from:x.from,to:x.to},n,t)&&(x.from=f,x.to=void 0),i||l(x),i==null||i(x,f,p,g),x},isSelected:f=>d&&Qt(d,f,!1,t)}}function Ck(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=ga(n,o?n:void 0),c=o?n:a,{isSameDay:l}=t;return{selected:c,select:(m,f,p)=>{let g=m;return!r&&c&&c&&l(m,c)&&(g=void 0),o||i(g),o==null||o(g,m,f,p),g},isSelected:m=>c?l(c,m):!1}}function kk(e,t){const n=Ck(e,t),r=xk(e,t),o=Sk(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function yt(e,t){return e instanceof et&&e.timeZone===t?e:new et(e,t)}function Vn(e,t,n){return yt(e,t)}function Qc(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?Vn(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?Vn(r,t):r):_a(e)?{...e,from:e.from?yt(e.from,t):e.from,to:e.to?yt(e.to,t):e.to}:bi(e)?{before:Vn(e.before,t),after:Vn(e.after,t)}:wi(e)?{after:Vn(e.after,t)}:Ni(e)?{before:Vn(e.before,t)}:e}function Ha(e,t,n){return e&&(Array.isArray(e)?e.map(r=>Qc(r,t)):Qc(e,t))}function Pk(e){var mr;let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=yt(t.today,n)),t.month&&(t.month=yt(t.month,n)),t.defaultMonth&&(t.defaultMonth=yt(t.defaultMonth,n)),t.startMonth&&(t.startMonth=yt(t.startMonth,n)),t.endMonth&&(t.endMonth=yt(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=yt(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=(mr=t.selected)==null?void 0:mr.map(ue=>yt(ue,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?yt(t.selected.from,n):t.selected.from,to:t.selected.to?yt(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=Ha(t.disabled,n)),t.hidden!==void 0&&(t.hidden=Ha(t.hidden,n)),t.modifiers)){const ue={};Object.keys(t.modifiers).forEach(Ne=>{var oe;ue[Ne]=Ha((oe=t.modifiers)==null?void 0:oe[Ne],n)}),t.modifiers=ue}const{components:r,formatters:o,labels:a,dateLib:i,locale:c,classNames:l}=v.useMemo(()=>{const ue={...xp,...t.locale},Ne=t.broadcastCalendar?1:t.weekStartsOn,oe=t.noonSafe&&t.timeZone?ok(t.timeZone,{weekStartsOn:Ne,locale:ue}):void 0,je=t.dateLib&&oe?{...oe,...t.dateLib}:t.dateLib??oe,tt=new ht({locale:ue,weekStartsOn:Ne,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},je);return{dateLib:tt,components:IC(t.components),formatters:UC(t.formatters),labels:ZC(t.labels,tt.options),locale:ue,classNames:{...FC(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:i.today()});const{captionLayout:d,mode:u,navLayout:m,numberOfMonths:f=1,onDayBlur:p,onDayClick:g,onDayFocus:h,onDayKeyDown:j,onDayMouseEnter:x,onDayMouseLeave:b,onNextClick:w,onPrevClick:N,showWeekNumber:S,styles:y}=t,{formatCaption:C,formatDay:E,formatMonthDropdown:P,formatWeekNumber:k,formatWeekNumberHeader:D,formatWeekdayName:M,formatYearDropdown:A}=o,z=gk(t,i),{days:G,months:W,navStart:Q,navEnd:V,previousMonth:R,nextMonth:K,goToMonth:fe}=z,ie=AC(G,t,Q,V,i),{isSelected:O,select:I,selected:H}=kk(t,i)??{},{blur:U,focused:T,isFocusTarget:$,moveFocus:J,setFocused:X}=vk(t,z,ie,O??(()=>!1),i),{labelDayButton:ae,labelGridcell:ce,labelGrid:me,labelMonthDropdown:xe,labelNav:Ge,labelPrevious:Qe,labelNext:Ze,labelWeekday:Ie,labelWeekNumber:ct,labelWeekNumberHeader:L,labelYearDropdown:Z}=a,_e=v.useMemo(()=>nk(i,t.ISOWeek,t.broadcastCalendar,t.today),[i,t.ISOWeek,t.broadcastCalendar,t.today]),re=u!==void 0||g!==void 0,pe=v.useCallback(()=>{R&&(fe(R),N==null||N(R))},[R,fe,N]),Ce=v.useCallback(()=>{K&&(fe(K),w==null||w(K))},[fe,K,w]),be=v.useCallback((ue,Ne)=>oe=>{oe.preventDefault(),oe.stopPropagation(),X(ue),!Ne.disabled&&(I==null||I(ue.date,Ne,oe),g==null||g(ue.date,Ne,oe))},[I,g,X]),We=v.useCallback((ue,Ne)=>oe=>{X(ue),h==null||h(ue.date,Ne,oe)},[h,X]),xt=v.useCallback((ue,Ne)=>oe=>{U(),p==null||p(ue.date,Ne,oe)},[U,p]),bt=v.useCallback((ue,Ne)=>oe=>{const je={ArrowLeft:[oe.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[oe.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[oe.shiftKey?"year":"week","after"],ArrowUp:[oe.shiftKey?"year":"week","before"],PageUp:[oe.shiftKey?"year":"month","before"],PageDown:[oe.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(je[oe.key]){oe.preventDefault(),oe.stopPropagation();const[tt,F]=je[oe.key];J(tt,F)}j==null||j(ue.date,Ne,oe)},[J,j,t.dir]),Ue=v.useCallback((ue,Ne)=>oe=>{x==null||x(ue.date,Ne,oe)},[x]),Rt=v.useCallback((ue,Ne)=>oe=>{b==null||b(ue.date,Ne,oe)},[b]),bn=v.useCallback(ue=>Ne=>{const oe=Number(Ne.target.value),je=i.setMonth(i.startOfMonth(ue),oe);fe(je)},[i,fe]),wn=v.useCallback(ue=>Ne=>{const oe=Number(Ne.target.value),je=i.setYear(i.startOfMonth(ue),oe);fe(je)},[i,fe]),{className:an,style:Ur}=v.useMemo(()=>({className:[l[ee.Root],t.className].filter(Boolean).join(" "),style:{...y==null?void 0:y[ee.Root],...t.style}}),[l,t.className,t.style,y]),sn=WC(t),Xr=v.useRef(null);ck(Xr,!!t.animate,{classNames:l,months:W,focused:T,dateLib:i});const ja={dayPickerProps:t,selected:H,select:I,isSelected:O,months:W,nextMonth:K,previousMonth:R,goToMonth:fe,getModifiers:ie,components:r,classNames:l,styles:y,labels:a,formatters:o};return v.createElement(wp.Provider,{value:ja},v.createElement(r.Root,{rootRef:t.animate?Xr:void 0,className:an,style:Ur,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...sn},v.createElement(r.Months,{className:l[ee.Months],style:y==null?void 0:y[ee.Months]},!t.hideNavigation&&!m&&v.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[ee.Nav],style:y==null?void 0:y[ee.Nav],"aria-label":Ge(),onPreviousClick:pe,onNextClick:Ce,previousMonth:R,nextMonth:K}),W.map((ue,Ne)=>v.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:l[ee.Month],style:y==null?void 0:y[ee.Month],key:Ne,displayIndex:Ne,calendarMonth:ue},m==="around"&&!t.hideNavigation&&Ne===0&&v.createElement(r.PreviousMonthButton,{type:"button",className:l[ee.PreviousMonthButton],tabIndex:R?void 0:-1,"aria-disabled":R?void 0:!0,"aria-label":Qe(R),onClick:pe,"data-animated-button":t.animate?"true":void 0},v.createElement(r.Chevron,{disabled:R?void 0:!0,className:l[ee.Chevron],orientation:t.dir==="rtl"?"right":"left"})),v.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:l[ee.MonthCaption],style:y==null?void 0:y[ee.MonthCaption],calendarMonth:ue,displayIndex:Ne},d!=null&&d.startsWith("dropdown")?v.createElement(r.DropdownNav,{className:l[ee.Dropdowns],style:y==null?void 0:y[ee.Dropdowns]},(()=>{const oe=d==="dropdown"||d==="dropdown-months"?v.createElement(r.MonthsDropdown,{key:"month",className:l[ee.MonthsDropdown],"aria-label":xe(),classNames:l,components:r,disabled:!!t.disableNavigation,onChange:bn(ue.date),options:ek(ue.date,Q,V,o,i),style:y==null?void 0:y[ee.Dropdown],value:i.getMonth(ue.date)}):v.createElement("span",{key:"month"},P(ue.date,i)),je=d==="dropdown"||d==="dropdown-years"?v.createElement(r.YearsDropdown,{key:"year",className:l[ee.YearsDropdown],"aria-label":Z(i.options),classNames:l,components:r,disabled:!!t.disableNavigation,onChange:wn(ue.date),options:rk(Q,V,o,i,!!t.reverseYears),style:y==null?void 0:y[ee.Dropdown],value:i.getYear(ue.date)}):v.createElement("span",{key:"year"},A(ue.date,i));return i.getMonthYearOrder()==="year-first"?[je,oe]:[oe,je]})(),v.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},C(ue.date,i.options,i))):v.createElement(r.CaptionLabel,{className:l[ee.CaptionLabel],role:"status","aria-live":"polite"},C(ue.date,i.options,i))),m==="around"&&!t.hideNavigation&&Ne===f-1&&v.createElement(r.NextMonthButton,{type:"button",className:l[ee.NextMonthButton],tabIndex:K?void 0:-1,"aria-disabled":K?void 0:!0,"aria-label":Ze(K),onClick:Ce,"data-animated-button":t.animate?"true":void 0},v.createElement(r.Chevron,{disabled:K?void 0:!0,className:l[ee.Chevron],orientation:t.dir==="rtl"?"left":"right"})),Ne===f-1&&m==="after"&&!t.hideNavigation&&v.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[ee.Nav],style:y==null?void 0:y[ee.Nav],"aria-label":Ge(),onPreviousClick:pe,onNextClick:Ce,previousMonth:R,nextMonth:K}),v.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":me(ue.date,i.options,i)||void 0,className:l[ee.MonthGrid],style:y==null?void 0:y[ee.MonthGrid]},!t.hideWeekdays&&v.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:l[ee.Weekdays],style:y==null?void 0:y[ee.Weekdays]},S&&v.createElement(r.WeekNumberHeader,{"aria-label":L(i.options),className:l[ee.WeekNumberHeader],style:y==null?void 0:y[ee.WeekNumberHeader],scope:"col"},D()),_e.map(oe=>v.createElement(r.Weekday,{"aria-label":Ie(oe,i.options,i),className:l[ee.Weekday],key:String(oe),style:y==null?void 0:y[ee.Weekday],scope:"col"},M(oe,i.options,i)))),v.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:l[ee.Weeks],style:y==null?void 0:y[ee.Weeks]},ue.weeks.map(oe=>v.createElement(r.Week,{className:l[ee.Week],key:oe.weekNumber,style:y==null?void 0:y[ee.Week],week:oe},S&&v.createElement(r.WeekNumber,{week:oe,style:y==null?void 0:y[ee.WeekNumber],"aria-label":ct(oe.weekNumber,{locale:c}),className:l[ee.WeekNumber],scope:"row",role:"rowheader"},k(oe.weekNumber,i)),oe.days.map(je=>{const{date:tt}=je,F=ie(je);if(F[Fe.focused]=!F.hidden&&!!(T!=null&&T.isEqualTo(je)),F[kt.selected]=(O==null?void 0:O(tt))||F.selected,_a(H)){const{from:nt,to:jt}=H;F[kt.range_start]=!!(nt&&jt&&i.isSameDay(tt,nt)),F[kt.range_end]=!!(nt&&jt&&i.isSameDay(tt,jt)),F[kt.range_middle]=Qt(H,tt,!0,i)}const ke=tk(F,y,t.modifiersStyles),Re=zC(F,l,t.modifiersClassNames),lt=!re&&!F.hidden?ce(tt,F,i.options,i):void 0;return v.createElement(r.Day,{key:`${je.isoDate}_${je.displayMonthId}`,day:je,modifiers:F,className:Re.join(" "),style:ke,role:"gridcell","aria-selected":F.selected||void 0,"aria-label":lt,"data-day":je.isoDate,"data-month":je.outside?je.dateMonthId:void 0,"data-selected":F.selected||void 0,"data-disabled":F.disabled||void 0,"data-hidden":F.hidden||void 0,"data-outside":je.outside||void 0,"data-focused":F.focused||void 0,"data-today":F.today||void 0},!F.hidden&&re?v.createElement(r.DayButton,{className:l[ee.DayButton],style:y==null?void 0:y[ee.DayButton],type:"button",day:je,modifiers:F,disabled:!F.focused&&F.disabled||void 0,"aria-disabled":F.focused&&F.disabled||void 0,tabIndex:$(je)?0:-1,"aria-label":ae(tt,F,i.options,i),onClick:be(je,F),onBlur:xt(je,F),onFocus:We(je,F),onKeyDown:bt(je,F),onMouseEnter:Ue(je,F),onMouseLeave:Rt(je,F)},E(tt,i.options,i)):!F.hidden&&E(je.date,i.options,i))})))))))),t.footer&&v.createElement(r.Footer,{className:l[ee.Footer],style:y==null?void 0:y[ee.Footer],role:"status","aria-live":"polite"},t.footer)))}function ki({className:e,classNames:t,showOutsideDays:n=!0,...r}){return s.jsx(Pk,{showOutsideDays:n,className:ne("cj-p-4",e),classNames:{months:"cj-flex cj-flex-col cj-space-y-4",month:"cj-space-y-4",month_caption:"cj-flex cj-justify-center cj-pt-1 cj-relative cj-items-center cj-pb-2",caption_label:"cj-hidden",nav:"cj-space-x-1 cj-flex cj-items-center",button_previous:ne("cj-inline-flex cj-items-center cj-justify-center cj-rounded-full cj-h-9 cj-w-9 cj-bg-transparent cj-border-none cj-p-0 cj-text-muted-foreground hover:cj-text-foreground hover:cj-bg-accent cj-transition-colors cj-cursor-pointer cj-absolute cj-left-1"),button_next:ne("cj-inline-flex cj-items-center cj-justify-center cj-rounded-full cj-h-9 cj-w-9 cj-bg-transparent cj-border-none cj-p-0 cj-text-muted-foreground hover:cj-text-foreground hover:cj-bg-accent cj-transition-colors cj-cursor-pointer cj-absolute cj-right-1"),month_grid:"cj-w-full cj-border-collapse",weekdays:"cj-flex",weekday:"cj-text-muted-foreground/70 cj-w-10 cj-font-medium cj-text-xs cj-uppercase cj-tracking-wider cj-pb-2",week:"cj-flex cj-w-full",day:"cj-h-10 cj-w-10 cj-text-center cj-text-sm cj-p-0 cj-relative [&:has([aria-selected].day-range-end)]:cj-rounded-r-full [&:has([aria-selected].day-outside)]:cj-bg-accent/50 [&:has([aria-selected])]:cj-bg-accent first:[&:has([aria-selected])]:cj-rounded-l-full last:[&:has([aria-selected])]:cj-rounded-r-full focus-within:cj-relative focus-within:cj-z-20",day_button:"cj-inline-flex cj-items-center cj-justify-center cj-h-10 cj-w-10 cj-rounded-full cj-bg-transparent cj-border-none cj-p-0 cj-font-normal cj-cursor-pointer cj-transition-colors hover:cj-bg-accent hover:cj-text-accent-foreground aria-selected:cj-opacity-100",range_end:"day-range-end",selected:"cj-bg-primary cj-text-primary-foreground cj-rounded-full hover:cj-bg-primary hover:cj-text-primary-foreground focus:cj-bg-primary focus:cj-text-primary-foreground",today:"cj-bg-primary cj-text-white cj-rounded-full cj-font-bold cj-ring-2 cj-ring-primary/50",outside:"day-outside cj-text-muted-foreground cj-opacity-40 aria-selected:cj-bg-accent/50 aria-selected:cj-text-muted-foreground aria-selected:cj-opacity-30",disabled:"cj-text-muted-foreground cj-opacity-50",range_middle:"aria-selected:cj-bg-accent aria-selected:cj-text-accent-foreground",hidden:"cj-invisible",dropdowns:"cj-flex cj-items-center cj-gap-1.5",dropdown_root:"cj-relative cj-inline-flex cj-items-center",dropdown:"cj-appearance-none cj-bg-muted/50 cj-border cj-border-border/40 cj-rounded-lg cj-h-8 cj-px-2 cj-pr-6 cj-text-sm cj-font-medium cj-text-foreground hover:cj-bg-accent focus-visible:cj-outline-none focus-visible:cj-ring-2 focus-visible:cj-ring-ring cj-cursor-pointer",years_dropdown:"cj-max-h-60",months_dropdown:"cj-max-h-60",...t},components:{Chevron:({orientation:o})=>o==="left"?s.jsx(C_,{className:"cj-h-4 cj-w-4"}):s.jsx(k_,{className:"cj-h-4 cj-w-4"})},...r})}ki.displayName="Calendar";const Zc={en:ha,es:sp,pt:ip},el={en:{fmt:"dd/MM/yyyy",placeholder:"DD/MM/YYYY"},es:{fmt:"dd/MM/yyyy",placeholder:"DD/MM/AAAA"},pt:{fmt:"dd/MM/yyyy",placeholder:"DD/MM/AAAA"},pl:{fmt:"dd/MM/yyyy",placeholder:"DD/MM/RRRR"}};function tl(e){const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return`${t}-${n}-${r}`}function Ek(e,t){const n=e.replace(/\D/g,"").slice(0,t.replace(/[^a-zA-Z]/g,"").length);if(!n)return"";let r="",o=0;for(const a of t){if(o>=n.length)break;/[a-zA-Z]/.test(a)?r+=n[o++]:r+=a}return r}function Mk({label:e,value:t,onChange:n,helpText:r,allowFuture:o=!1}){const{t:a,language:i}=we(),[c,l]=v.useState(!1),d=v.useMemo(()=>{if(!t)return;const y=/^(\d{4})-(\d{2})-(\d{2})$/.exec(t);if(y)return new Date(Number(y[1]),Number(y[2])-1,Number(y[3]));const C=new Date(t);return Number.isNaN(C.getTime())?void 0:C},[t]),u=v.useMemo(()=>Zc[i]||Zc.en,[i]),{fmt:m,placeholder:f}=el[i]||el.en,[p,g]=v.useState(d?Do(d,m):""),[h,j]=v.useState(!1);v.useEffect(()=>{g(d?Do(d,m):""),j(!1)},[d,m]);const x=new Date,b=1900,w=o?x.getFullYear()+20:x.getFullYear(),N=y=>{const C=y.trim();if(!C){j(!1),n("");return}const E=ap(C,m,new Date);if(!pi(E)){j(!0);return}if(!o&&E>x){j(!0);return}j(!1),n(tl(E))},S=y=>{y&&(n(tl(y)),l(!1))};return s.jsxs("div",{className:"cj-space-y-2",children:[s.jsx(q,{className:"cj-text-sm cj-font-medium",children:e}),s.jsxs("div",{className:"cj-relative",children:[s.jsx(he,{type:"text",inputMode:"numeric",value:p,placeholder:f,onChange:y=>{const C=Ek(y.target.value,m);g(C),h&&j(!1)},onBlur:y=>N(y.target.value),onKeyDown:y=>{y.key==="Enter"&&(y.preventDefault(),N(y.target.value))},"aria-invalid":h||void 0,className:ne("cj-pr-12",h&&"cj-border-destructive focus-visible:cj-ring-destructive")}),s.jsxs(fa,{open:c,onOpenChange:l,children:[s.jsx(ma,{asChild:!0,children:s.jsx(te,{type:"button",variant:"ghost",size:"icon","aria-label":a("widget_pick_date"),className:"cj-absolute cj-right-1 cj-top-1/2 -cj-translate-y-1/2 cj-h-10 cj-w-10 cj-rounded-lg cj-text-muted-foreground hover:cj-text-foreground",children:s.jsx($l,{className:"cj-h-4 cj-w-4"})})}),s.jsx(qr,{className:"cj-w-auto cj-p-0 cj-z-50 cj-rounded-2xl cj-shadow-lg cj-border-border/30",align:"end",sideOffset:8,children:s.jsx(ki,{mode:"single",selected:d,onSelect:S,defaultMonth:d??new Date,locale:u,autoFocus:!0,captionLayout:"dropdown",startMonth:new Date(b,0),endMonth:new Date(w,11),disabled:o?void 0:{after:x},className:ne("cj-p-4 cj-pointer-events-auto")})})]})]}),h&&s.jsx("p",{className:"cj-text-xs cj-text-destructive",children:a("widget_invalid_date")}),r&&!h&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r})]})}function Wp(e){const t=e.replace(/\D/g,"").slice(0,4);return t.length<=2?t:`${t.slice(0,2)}:${t.slice(2)}`}function Ro(e){return/^([01]\d|2[0-3]):[0-5]\d$/.test(e)}function Dk(e){if(!e)return"";if(/^\d{2}:\d{2}/.test(e))return e.slice(0,5);const t=new Date(e);if(Number.isNaN(t.getTime()))return"";const n=String(t.getHours()).padStart(2,"0"),r=String(t.getMinutes()).padStart(2,"0");return`${n}:${r}`}function Tk({label:e,value:t,onChange:n,helpText:r}){const{t:o}=we(),a=v.useMemo(()=>Dk(t),[t]),[i,c]=v.useState(a);v.useEffect(()=>{c(a)},[a]);const l=u=>{const m=Wp(u);if(c(m),!m){n("");return}Ro(m)&&n(m)},d=()=>{i&&!Ro(i)&&c(a)};return s.jsxs("div",{className:"cj-space-y-2",children:[s.jsx(q,{className:"cj-text-sm cj-font-medium",children:e}),s.jsx(he,{type:"text",inputMode:"numeric",pattern:"[0-2][0-9]:[0-5][0-9]",placeholder:"HH:mm",value:i,onChange:u=>l(u.target.value),onBlur:d,className:"cj-h-12 cj-rounded-xl","aria-label":e||o("widget_pick_time")}),r&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r})]})}const nl={en:ha,es:sp,pt:ip},rl={en:{fmt:"dd/MM/yyyy",placeholder:"DD/MM/YYYY"},es:{fmt:"dd/MM/yyyy",placeholder:"DD/MM/AAAA"},pt:{fmt:"dd/MM/yyyy",placeholder:"DD/MM/AAAA"},pl:{fmt:"dd/MM/yyyy",placeholder:"DD/MM/RRRR"}};function Rk(e,t){const n=e.replace(/\D/g,"").slice(0,t.replace(/[^a-zA-Z]/g,"").length);if(!n)return"";let r="",o=0;for(const a of t){if(o>=n.length)break;/[a-zA-Z]/.test(a)?r+=n[o++]:r+=a}return r}function Ok({label:e,value:t,onChange:n,helpText:r,allowFuture:o=!0}){const{t:a,language:i}=we(),[c,l]=v.useState(!1),d=t?new Date(t):void 0,u=d&&!Number.isNaN(d.getTime())?d:void 0,m=v.useMemo(()=>nl[i]||nl.en,[i]),{fmt:f,placeholder:p}=rl[i]||rl.en,g=v.useMemo(()=>{if(!u)return"";const k=String(u.getHours()).padStart(2,"0"),D=String(u.getMinutes()).padStart(2,"0");return`${k}:${D}`},[u]),[h,j]=v.useState(u?Do(u,f):""),[x,b]=v.useState(g),[w,N]=v.useState(!1);v.useEffect(()=>{j(u?Do(u,f):""),N(!1)},[u,f]),v.useEffect(()=>{b(g)},[g]);const S=new Date,y=k=>{const D=k.trim();if(!D){N(!1),n("");return}const M=ap(D,f,new Date);if(!pi(M)){N(!0);return}if(!o&&M>S){N(!0);return}u?M.setHours(u.getHours(),u.getMinutes(),0,0):M.setHours(12,0,0,0),N(!1),n(M.toISOString())},C=k=>{if(!k)return;const D=new Date(k);u?D.setHours(u.getHours(),u.getMinutes(),0,0):D.setHours(12,0,0,0),n(D.toISOString()),l(!1)},E=k=>{const D=Wp(k);if(b(D),!Ro(D))return;const[M,A]=D.split(":").map(Number),z=u?new Date(u):new Date;z.setHours(M,A,0,0),n(z.toISOString())},P=()=>{x&&!Ro(x)&&b(g)};return s.jsxs("div",{className:"cj-space-y-2",children:[s.jsx(q,{className:"cj-text-sm cj-font-medium",children:e}),s.jsxs("div",{className:"cj-flex cj-gap-2",children:[s.jsxs("div",{className:"cj-relative cj-flex-1",children:[s.jsx(he,{type:"text",inputMode:"numeric",value:h,placeholder:p,onChange:k=>{const D=Rk(k.target.value,f);j(D),w&&N(!1)},onBlur:k=>y(k.target.value),onKeyDown:k=>{k.key==="Enter"&&(k.preventDefault(),y(k.target.value))},"aria-invalid":w||void 0,className:ne("cj-pr-12",w&&"cj-border-destructive focus-visible:cj-ring-destructive")}),s.jsxs(fa,{open:c,onOpenChange:l,children:[s.jsx(ma,{asChild:!0,children:s.jsx(te,{type:"button",variant:"ghost",size:"icon","aria-label":a("widget_pick_date"),className:"cj-absolute cj-right-1 cj-top-1/2 -cj-translate-y-1/2 cj-h-10 cj-w-10 cj-rounded-lg cj-text-muted-foreground hover:cj-text-foreground",children:s.jsx($l,{className:"cj-h-4 cj-w-4"})})}),s.jsx(qr,{className:"cj-w-auto cj-p-0 cj-z-50 cj-rounded-2xl cj-shadow-lg cj-border-border/30",align:"end",sideOffset:8,children:s.jsx(ki,{mode:"single",selected:u,onSelect:C,defaultMonth:u??new Date,locale:m,autoFocus:!0,captionLayout:"dropdown",startMonth:new Date(1900,0),endMonth:new Date(o?S.getFullYear()+20:S.getFullYear(),11),disabled:o?void 0:{after:S},className:ne("cj-p-4 cj-pointer-events-auto")})})]})]}),s.jsx(he,{type:"text",inputMode:"numeric",pattern:"[0-2][0-9]:[0-5][0-9]",placeholder:"HH:mm",value:x,onChange:k=>E(k.target.value),onBlur:P,className:"cj-h-12 cj-rounded-xl cj-w-32","aria-label":a("widget_pick_time")})]}),w&&s.jsx("p",{className:"cj-text-xs cj-text-destructive",children:a("widget_invalid_date")}),r&&!w&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r})]})}function Ak({label:e,value:t,onChange:n,helpText:r,currency:o="EUR"}){const{t:a}=we(),[i,c]=v.useState("");v.useEffect(()=>{if(t){const p=parseFloat(t);isNaN(p)||c(l(p))}else c("")},[t]);const l=p=>new Intl.NumberFormat("de-DE",{minimumFractionDigits:2,maximumFractionDigits:2}).format(p),d=p=>{const g=p.replace(/\./g,"").replace(",",".");return parseFloat(g)||0},u=p=>{const h=p.target.value.replace(/[^\d.,]/g,"");c(h)},m=()=>{if(i){const p=d(i);n(p.toString()),c(l(p))}else n("")},f=p=>({EUR:"โฌ",USD:"$",GBP:"ยฃ"})[p]||p;return s.jsxs("div",{className:"cj-space-y-2",children:[s.jsx(q,{className:"cj-text-sm cj-font-medium",children:e}),s.jsxs("div",{className:"cj-relative",children:[s.jsx("span",{className:"cj-absolute cj-left-3 cj-top-1/2 -cj-translate-y-1/2 cj-text-muted-foreground",children:f(o)}),s.jsx(he,{type:"text",value:i,onChange:u,onBlur:m,placeholder:a("placeholder_currency"),className:"cj-pl-8"})]}),r&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r})]})}function so(e){return typeof e=="object"&&e!==null&&"filename"in e&&"url"in e}function zk({label:e,value:t,onChange:n,onFileSelect:r,helpText:o,accept:a,maxSizeMB:i}){const{t:c}=we(),l=v.useRef(null),[d,u]=v.useState(!1),[m,f]=v.useState(null),p=P=>{if(i&&P.size>i*1024*1024)return c("widget_file_too_large",{max:String(i),size:(P.size/1024/1024).toFixed(1)});if(a){const k=a.split(",").map(z=>z.trim().toLowerCase()),D=P.name.toLowerCase(),M=P.type.toLowerCase();if(!k.some(z=>z.startsWith(".")?D.endsWith(z):z.endsWith("/*")?M.startsWith(z.replace("/*","/")):M===z))return c("widget_file_type_rejected",{accept:a})}return null},g=async P=>{f(null);const k=p(P);if(k){f(k);return}if(!r){n(P.name);return}u(!0);try{const D=await r(P);so(D)?n(D):n(typeof D=="string"?D:P.name)}catch(D){f(D instanceof Error?D.message:c("widget_upload_failed")),n("")}finally{u(!1)}},h=P=>{if(P.preventDefault(),d)return;const k=P.dataTransfer.files;k.length>0&&g(k[0])},j=P=>{P.preventDefault()},x=()=>{var P;d||(P=l.current)==null||P.click()},b=P=>{const k=P.target.files;k&&k.length>0&&g(k[0]),P.target.value=""},w=P=>{P.stopPropagation(),n(""),f(null)},N=so(t)?!!t.url:!!t,S=so(t)?t.filename:t,y=so(t)?t.url:null,C=[];a&&C.push(c("widget_accepted_hint",{accept:a})),i&&C.push(c("widget_max_size_hint",{max:String(i)}));const E=C.length>0?C.join(" ยท "):null;return s.jsxs("div",{className:"cj-space-y-2",children:[s.jsx(q,{className:"cj-text-sm cj-font-medium",children:e}),s.jsx("input",{ref:l,type:"file",className:"cj-hidden",accept:a,onChange:b}),s.jsx("div",{onDrop:h,onDragOver:j,onClick:x,className:`cj-border-2 cj-border-dashed cj-rounded-lg cj-p-8 cj-text-center cj-transition-colors ${d?"cj-border-muted-foreground/25 cj-cursor-wait cj-opacity-60":m?"cj-border-destructive/50 cj-cursor-pointer hover:cj-border-destructive/75":"cj-border-muted-foreground/25 cj-cursor-pointer hover:cj-border-muted-foreground/50"}`,children:d?s.jsxs(s.Fragment,{children:[s.jsx(ks,{className:"cj-h-8 cj-w-8 cj-mx-auto cj-text-muted-foreground cj-mb-2 cj-animate-spin"}),s.jsx("p",{className:"cj-text-sm cj-text-muted-foreground",children:c("upload_uploading")})]}):N?s.jsxs(s.Fragment,{children:[s.jsx(z_,{className:"cj-h-8 cj-w-8 cj-mx-auto cj-text-muted-foreground cj-mb-2"}),s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-center cj-gap-2",children:[y?s.jsx("a",{href:y,target:"_blank",rel:"noopener noreferrer",onClick:P=>P.stopPropagation(),className:"cj-text-sm cj-font-medium cj-text-primary cj-underline cj-truncate cj-max-w-[240px]",title:S,children:S}):s.jsx("p",{className:"cj-text-sm cj-font-medium cj-truncate cj-max-w-[240px]",children:S}),s.jsx("button",{type:"button",onClick:w,className:"cj-text-muted-foreground hover:cj-text-foreground",children:s.jsx(Vt,{className:"cj-h-4 cj-w-4"})})]})]}):s.jsxs(s.Fragment,{children:[s.jsx(Vl,{className:"cj-h-8 cj-w-8 cj-mx-auto cj-text-muted-foreground cj-mb-2"}),s.jsx("p",{className:"cj-text-sm cj-text-muted-foreground",children:c("upload_drag_drop")})]})}),m&&s.jsxs("p",{className:"cj-text-xs cj-text-destructive cj-flex cj-items-center cj-gap-1",children:[s.jsx(Bl,{className:"cj-h-3 cj-w-3"})," ",m]}),(o||E)&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:o||E})]})}const qa=[{code:"US",name:"United States",dial:"+1",flag:"๐บ๐ธ"},{code:"GB",name:"United Kingdom",dial:"+44",flag:"๐ฌ๐ง"},{code:"CA",name:"Canada",dial:"+1",flag:"๐จ๐ฆ"},{code:"AU",name:"Australia",dial:"+61",flag:"๐ฆ๐บ"},{code:"DE",name:"Germany",dial:"+49",flag:"๐ฉ๐ช"},{code:"FR",name:"France",dial:"+33",flag:"๐ซ๐ท"},{code:"IT",name:"Italy",dial:"+39",flag:"๐ฎ๐น"},{code:"ES",name:"Spain",dial:"+34",flag:"๐ช๐ธ"},{code:"PT",name:"Portugal",dial:"+351",flag:"๐ต๐น"},{code:"NL",name:"Netherlands",dial:"+31",flag:"๐ณ๐ฑ"},{code:"BE",name:"Belgium",dial:"+32",flag:"๐ง๐ช"},{code:"CH",name:"Switzerland",dial:"+41",flag:"๐จ๐ญ"},{code:"AT",name:"Austria",dial:"+43",flag:"๐ฆ๐น"},{code:"SE",name:"Sweden",dial:"+46",flag:"๐ธ๐ช"},{code:"NO",name:"Norway",dial:"+47",flag:"๐ณ๐ด"},{code:"DK",name:"Denmark",dial:"+45",flag:"๐ฉ๐ฐ"},{code:"FI",name:"Finland",dial:"+358",flag:"๐ซ๐ฎ"},{code:"IE",name:"Ireland",dial:"+353",flag:"๐ฎ๐ช"},{code:"PL",name:"Poland",dial:"+48",flag:"๐ต๐ฑ"},{code:"CZ",name:"Czech Republic",dial:"+420",flag:"๐จ๐ฟ"},{code:"RO",name:"Romania",dial:"+40",flag:"๐ท๐ด"},{code:"HU",name:"Hungary",dial:"+36",flag:"๐ญ๐บ"},{code:"GR",name:"Greece",dial:"+30",flag:"๐ฌ๐ท"},{code:"TR",name:"Turkey",dial:"+90",flag:"๐น๐ท"},{code:"RU",name:"Russia",dial:"+7",flag:"๐ท๐บ"},{code:"JP",name:"Japan",dial:"+81",flag:"๐ฏ๐ต"},{code:"KR",name:"South Korea",dial:"+82",flag:"๐ฐ๐ท"},{code:"CN",name:"China",dial:"+86",flag:"๐จ๐ณ"},{code:"IN",name:"India",dial:"+91",flag:"๐ฎ๐ณ"},{code:"PK",name:"Pakistan",dial:"+92",flag:"๐ต๐ฐ"},{code:"BD",name:"Bangladesh",dial:"+880",flag:"๐ง๐ฉ"},{code:"ID",name:"Indonesia",dial:"+62",flag:"๐ฎ๐ฉ"},{code:"MY",name:"Malaysia",dial:"+60",flag:"๐ฒ๐พ"},{code:"SG",name:"Singapore",dial:"+65",flag:"๐ธ๐ฌ"},{code:"PH",name:"Philippines",dial:"+63",flag:"๐ต๐ญ"},{code:"TH",name:"Thailand",dial:"+66",flag:"๐น๐ญ"},{code:"VN",name:"Vietnam",dial:"+84",flag:"๐ป๐ณ"},{code:"AE",name:"UAE",dial:"+971",flag:"๐ฆ๐ช"},{code:"SA",name:"Saudi Arabia",dial:"+966",flag:"๐ธ๐ฆ"},{code:"IL",name:"Israel",dial:"+972",flag:"๐ฎ๐ฑ"},{code:"EG",name:"Egypt",dial:"+20",flag:"๐ช๐ฌ"},{code:"ZA",name:"South Africa",dial:"+27",flag:"๐ฟ๐ฆ"},{code:"NG",name:"Nigeria",dial:"+234",flag:"๐ณ๐ฌ"},{code:"KE",name:"Kenya",dial:"+254",flag:"๐ฐ๐ช"},{code:"BR",name:"Brazil",dial:"+55",flag:"๐ง๐ท"},{code:"MX",name:"Mexico",dial:"+52",flag:"๐ฒ๐ฝ"},{code:"AR",name:"Argentina",dial:"+54",flag:"๐ฆ๐ท"},{code:"CO",name:"Colombia",dial:"+57",flag:"๐จ๐ด"},{code:"CL",name:"Chile",dial:"+56",flag:"๐จ๐ฑ"},{code:"PE",name:"Peru",dial:"+51",flag:"๐ต๐ช"},{code:"NZ",name:"New Zealand",dial:"+64",flag:"๐ณ๐ฟ"}];function Ik({label:e,value:t,onChange:n,placeholder:r,helpText:o,onValidationChange:a}){const{t:i}=we(),[c,l]=v.useState(null),[d,u]=v.useState(qa[0]),[m,f]=v.useState(""),[p,g]=v.useState(!1),h=v.useMemo(()=>t?t.startsWith(d.dial)?t.slice(d.dial.length).trimStart():t.replace(/^\+\d+\s*/,""):"",[t,d.dial]),j=v.useMemo(()=>{if(!m)return qa;const N=m.toLowerCase();return qa.filter(S=>S.name.toLowerCase().includes(N)||S.code.toLowerCase().includes(N)||S.dial.includes(N))},[m]),x=N=>{const S=!!N&&!/^[\d\s\-()]{4,20}$/.test(N);l(S?i("widget_invalid_phone"):null),a==null||a(S)};v.useEffect(()=>{x(h)},[]);const b=N=>{const S=N.replace(/[^\d\s\-()]/g,""),y=S?`${d.dial} ${S}`:"";n(y),x(S)},w=N=>{u(N),g(!1),f(""),h&&n(`${N.dial} ${h}`)};return s.jsxs("div",{className:"cj-space-y-2",children:[s.jsx(q,{className:"cj-text-sm cj-font-medium",children:e}),s.jsxs("div",{className:"cj-flex cj-gap-1.5",children:[s.jsxs(fa,{open:p,onOpenChange:g,children:[s.jsx(ma,{asChild:!0,children:s.jsxs(te,{variant:"outline",role:"combobox","aria-expanded":p,className:"cj-w-[100px] cj-justify-between cj-px-2 cj-shrink-0",children:[s.jsx("span",{className:"cj-text-base cj-leading-none",children:d.flag}),s.jsx("span",{className:"cj-text-xs cj-text-muted-foreground",children:d.dial}),s.jsx(Bt,{className:"cj-h-3 cj-w-3 cj-opacity-50"})]})}),s.jsxs(qr,{className:"cj-w-[260px] cj-p-0",align:"start",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-border-b cj-px-3 cj-py-2",children:[s.jsx(Yl,{className:"cj-h-4 cj-w-4 cj-shrink-0 cj-text-muted-foreground cj-mr-2"}),s.jsx("input",{placeholder:i("widget_search_country"),value:m,onChange:N=>f(N.target.value),className:"cj-flex-1 cj-bg-transparent cj-text-sm cj-outline-none placeholder:cj-text-muted-foreground"})]}),s.jsx(Ht,{className:"cj-h-[200px]",children:s.jsxs("div",{className:"cj-p-1",children:[j.map(N=>s.jsxs("button",{onClick:()=>w(N),className:`cj-flex cj-w-full cj-items-center cj-gap-2 cj-rounded-sm cj-px-3 cj-py-2.5 cj-text-sm hover:cj-bg-accent hover:cj-text-accent-foreground cj-cursor-pointer cj-transition-colors ${d.code===N.code?"cj-bg-accent":""}`,children:[s.jsx("span",{className:"cj-text-base",children:N.flag}),s.jsx("span",{className:"cj-flex-1 cj-text-left cj-truncate",children:N.name}),s.jsx("span",{className:"cj-text-xs cj-text-muted-foreground",children:N.dial})]},N.code)),j.length===0&&s.jsx("p",{className:"cj-py-4 cj-text-center cj-text-sm cj-text-muted-foreground",children:i("widget_no_country")})]})})]})]}),s.jsx(he,{type:"tel",value:h,onChange:N=>b(N.target.value),placeholder:r||i("placeholder_phone"),className:"cj-flex-1"})]}),c&&s.jsx("p",{className:"cj-text-xs cj-text-destructive",children:c}),!c&&o&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:o})]})}function Wk({label:e,value:t,onChange:n,placeholder:r,helpText:o,onValidationChange:a}){const{t:i}=we(),[c,l]=v.useState(null),d=m=>{const f=!!m&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(m);l(f?i("widget_invalid_email"):null),a==null||a(f)};v.useEffect(()=>{d(t)},[]);const u=m=>{const f=m.trim();n(f),d(f)};return s.jsxs("div",{className:"cj-space-y-2",children:[s.jsx(q,{className:"cj-text-sm cj-font-medium",children:e}),s.jsxs("div",{className:"cj-relative",children:[s.jsx(B_,{className:"cj-absolute cj-left-3 cj-top-1/2 -cj-translate-y-1/2 cj-h-4 cj-w-4 cj-text-muted-foreground"}),s.jsx(he,{type:"email",value:t,onChange:m=>u(m.target.value),placeholder:r||i("placeholder_email"),className:"cj-pl-9"})]}),c&&s.jsx("p",{className:"cj-text-xs cj-text-destructive",children:c}),!c&&o&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:o})]})}let xs=!1,io=!1;const Ya=[];function Fk(e){return xs?Promise.resolve():io?new Promise(t=>{Ya.push(t)}):(io=!0,new Promise((t,n)=>{const r=document.createElement("script");r.src=`https://maps.googleapis.com/maps/api/js?key=${e}&libraries=places`,r.async=!0,r.onload=()=>{xs=!0,io=!1,t(),Ya.forEach(o=>o()),Ya.length=0},r.onerror=()=>{io=!1,n(new Error("Failed to load Google Maps"))},document.head.appendChild(r)}))}function $k({label:e,value:t,onChange:n,onValidationChange:r,googleMapsApiKey:o}){const{t:a}=we(),[i,c]=v.useState(""),[l,d]=v.useState([]),[u,m]=v.useState(!1),[f,p]=v.useState(!1),[g,h]=v.useState(xs),[j,x]=v.useState(!1),b=v.useRef(null),w=v.useRef(null),N=v.useRef(null),S=v.useRef();v.useEffect(()=>{if(t)try{const k=JSON.parse(t);k.address&&c(k.address)}catch{t&&c(t)}},[]),v.useEffect(()=>{if(!o){x(!0);return}Fk(o).then(()=>{h(!0),b.current=new window.google.maps.places.AutocompleteService,w.current=new window.google.maps.Geocoder}).catch(()=>x(!0))},[o]),v.useEffect(()=>{const k=D=>{N.current&&!N.current.contains(D.target)&&p(!1)};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[]);const y=v.useCallback(k=>{if(!b.current||k.length<3){d([]);return}m(!0),b.current.getPlacePredictions({input:k},(D,M)=>{m(!1),M===window.google.maps.places.PlacesServiceStatus.OK&&D?(d(D.map(A=>({place_id:A.place_id,description:A.description}))),p(!0)):d([])})},[]),C=k=>{const D=k.target.value;if(c(D),!D){n(""),d([]),p(!1);return}clearTimeout(S.current),S.current=setTimeout(()=>y(D),300)},E=k=>{p(!1),c(k.description),d([]),w.current&&w.current.geocode({placeId:k.place_id},(D,M)=>{if(M===window.google.maps.GeocoderStatus.OK&&(D!=null&&D[0])){const A=D[0].geometry.location,z={address:k.description,latitude:A.lat(),longitude:A.lng()};n(JSON.stringify(z))}else n(JSON.stringify({address:k.description,latitude:0,longitude:0}))})},P=()=>{c(""),n(""),d([]),p(!1)};return j||!o?s.jsxs("div",{className:"cj-space-y-2",children:[s.jsx(q,{children:e}),s.jsxs("div",{className:"cj-p-3 cj-border cj-border-dashed cj-rounded-lg cj-text-center cj-text-muted-foreground cj-text-sm",children:[s.jsx(xa,{className:"cj-h-5 cj-w-5 cj-mx-auto cj-mb-1 cj-opacity-50"}),a("location_no_api_key")]})]}):s.jsxs("div",{className:"cj-space-y-2",ref:N,children:[s.jsx(q,{children:e}),s.jsxs("div",{className:"cj-relative",children:[s.jsx(xa,{className:"cj-absolute cj-left-3 cj-top-1/2 cj--translate-y-1/2 cj-h-4 cj-w-4 cj-text-muted-foreground"}),s.jsx(he,{value:i,onChange:C,onFocus:()=>l.length>0&&p(!0),placeholder:a("location_placeholder"),className:"cj-pl-9 cj-pr-8",disabled:!g}),u&&s.jsx(ks,{className:"cj-absolute cj-right-3 cj-top-1/2 cj--translate-y-1/2 cj-h-4 cj-w-4 cj-animate-spin cj-text-muted-foreground"}),!u&&i&&s.jsx("button",{type:"button",onClick:P,className:"cj-absolute cj-right-3 cj-top-1/2 cj--translate-y-1/2 cj-text-muted-foreground hover:cj-text-foreground",children:s.jsx(Vt,{className:"cj-h-4 cj-w-4"})}),f&&l.length>0&&s.jsx("div",{className:"cj-absolute cj-z-50 cj-mt-1 cj-w-full cj-rounded-md cj-border cj-bg-popover cj-shadow-md cj-max-h-60 cj-overflow-y-auto",children:l.map(k=>s.jsxs("button",{type:"button",onClick:()=>E(k),className:"cj-w-full cj-text-left cj-px-3 cj-py-3 cj-text-sm hover:cj-bg-accent hover:cj-text-accent-foreground cj-flex cj-items-start cj-gap-2 cj-transition-colors",children:[s.jsx(xa,{className:"cj-h-4 cj-w-4 cj-mt-0.5 cj-shrink-0 cj-text-muted-foreground"}),s.jsx("span",{children:k.description})]},k.place_id))})]})]})}function Lk(e){if(typeof e=="boolean")return e;if(e==="true"||e==="1"||e===1)return!0;if(e==="false"||e==="0"||e===0)return!1}function Bk({label:e,value:t,onChange:n,helpText:r,variant:o="switch",options:a}){var u,m;const{t:i}=we(),c=Lk(t),l=((u=a==null?void 0:a[0])==null?void 0:u.label)??i("widget_yes"),d=((m=a==null?void 0:a[1])==null?void 0:m.label)??i("widget_no");return o==="segmented"?s.jsxs("div",{className:"cj-space-y-2",children:[e&&s.jsx(q,{className:"cj-text-sm cj-font-medium",children:e}),s.jsx("div",{role:"radiogroup",className:"cj-grid cj-grid-cols-2 cj-gap-2",children:[{val:!0,label:l},{val:!1,label:d}].map(f=>{const p=c===f.val;return s.jsx("button",{type:"button",role:"radio","aria-checked":p,onClick:()=>n(f.val),className:["cj-flex cj-items-center cj-justify-center cj-text-center","cj-min-h-12 cj-px-4 cj-py-3 cj-rounded-xl cj-border cj-text-sm cj-font-medium","cj-transition-colors",p?"cj-border-primary cj-bg-primary/10 cj-text-primary":"cj-border-border/40 cj-bg-card cj-text-foreground hover:cj-bg-accent/50"].join(" "),children:f.label},String(f.val))})}),r&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r})]}):s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-rounded-xl cj-border cj-border-border/40 cj-bg-card cj-px-4 cj-py-3.5",children:[s.jsxs("div",{className:"cj-flex-1 cj-pr-3",children:[e&&s.jsx(q,{className:"cj-text-sm cj-font-medium cj-text-foreground",children:e}),r&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-mt-1",children:r})]}),s.jsx(Yt,{checked:c===!0,onCheckedChange:f=>n(!!f)})]})}const Hk={text:"v1_string",textarea:"v1_string",select:"v2_single_option_select-1",radio:"v2_single_option_select-1",datepicker:"v2_date-1",timepicker:"v2_time-1",datetimepicker:"v2_datetime-1",currency:"v2_currency-1",upload:"v2_single_asset_upload",email:"v2_email-1",phone:"v2_phone-1",location:"v2_address_coordinates",boolean:"v2_boolean-1",switch:"v2_boolean-1"};function qk({nodeData:e,value:t,onChange:n,onValidationChange:r,onFileSelect:o,googleMapsApiKey:a,hideLabel:i=!1}){var g,h;const{t:c}=we(),{schema:l,label:d,options:u}=e,m=i?"":e.required?`${e.labelOverride||d} *`:e.labelOverride||d,f=t!=null?String(t):"";switch(e.widget&&Hk[e.widget]||l){case"v1_string":return s.jsx(ww,{label:m,value:f,onChange:n,multiline:e.widget==="textarea"});case"v2_single_option_select-1":return!u||u.length===0?s.jsx("div",{className:"cj-text-sm cj-text-muted-foreground",children:c("widget_no_options")}):s.jsx(Ow,{label:m,value:f,onChange:n,options:u,variant:e.ui_variant??"auto"});case"v2_date-1":return s.jsx(Mk,{label:m,value:f,onChange:n,allowFuture:e.allowFuture});case"v2_time-1":return s.jsx(Tk,{label:m,value:f,onChange:n});case"v2_datetime-1":return s.jsx(Ok,{label:m,value:f,onChange:n,allowFuture:e.allowFuture??!0});case"v2_currency-1":return s.jsx(Ak,{label:m,value:f,onChange:n});case"v2_single_asset_upload":return s.jsx(zk,{label:m,value:typeof t=="object"&&t!==null&&"filename"in t?t:f,onChange:n,onFileSelect:o,accept:(g=e.uploadConfig)==null?void 0:g.accept,maxSizeMB:(h=e.uploadConfig)==null?void 0:h.maxSizeMB});case"v2_phone-1":return s.jsx(Ik,{label:m,value:f,onChange:n,onValidationChange:r});case"v2_email-1":return s.jsx(Wk,{label:m,value:f,onChange:n,onValidationChange:r});case"v2_address_coordinates":return s.jsx($k,{label:m,value:f,onChange:n,onValidationChange:r,googleMapsApiKey:a});case"v2_boolean-1":return s.jsx(Bk,{label:m,value:t,onChange:n,options:u,variant:e.ui_variant??"switch"});default:return s.jsxs("div",{className:"cj-p-4 cj-border cj-border-dashed cj-rounded-lg cj-text-center cj-text-muted-foreground",children:[s.jsx("p",{className:"cj-text-sm",children:c("widget_unknown_schema",{schema:l})}),s.jsx("p",{className:"cj-text-xs cj-mt-1",children:c("widget_no_widget")})]})}}var Yk=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vk(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fp={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Yk,function(){Array.isArray||(Array.isArray=function(a){return Object.prototype.toString.call(a)==="[object Array]"});function n(a){for(var i=[],c=0,l=a.length;c<l;c++)i.indexOf(a[c])===-1&&i.push(a[c]);return i}var r={},o={"==":function(a,i){return a==i},"===":function(a,i){return a===i},"!=":function(a,i){return a!=i},"!==":function(a,i){return a!==i},">":function(a,i){return a>i},">=":function(a,i){return a>=i},"<":function(a,i,c){return c===void 0?a<i:a<i&&i<c},"<=":function(a,i,c){return c===void 0?a<=i:a<=i&&i<=c},"!!":function(a){return r.truthy(a)},"!":function(a){return!r.truthy(a)},"%":function(a,i){return a%i},log:function(a){return console.log(a),a},in:function(a,i){return!i||typeof i.indexOf>"u"?!1:i.indexOf(a)!==-1},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(a,i,c){if(c<0){var l=String(a).substr(i);return l.substr(0,l.length+c)}return String(a).substr(i,c)},"+":function(){return Array.prototype.reduce.call(arguments,function(a,i){return parseFloat(a,10)+parseFloat(i,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(a,i){return parseFloat(a,10)*parseFloat(i,10)})},"-":function(a,i){return i===void 0?-a:a-i},"/":function(a,i){return a/i},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(a,i){return a.concat(i)},[])},var:function(a,i){var c=i===void 0?null:i,l=this;if(typeof a>"u"||a===""||a===null)return l;for(var d=String(a).split("."),u=0;u<d.length;u++)if(l==null||(l=l[d[u]],l===void 0))return c;return l},missing:function(){for(var a=[],i=Array.isArray(arguments[0])?arguments[0]:arguments,c=0;c<i.length;c++){var l=i[c],d=r.apply({var:l},this);(d===null||d==="")&&a.push(l)}return a},missing_some:function(a,i){var c=r.apply({missing:i},this);return i.length-c.length>=a?[]:c}};return r.is_logic=function(a){return typeof a=="object"&&a!==null&&!Array.isArray(a)&&Object.keys(a).length===1},r.truthy=function(a){return Array.isArray(a)&&a.length===0?!1:!!a},r.get_operator=function(a){return Object.keys(a)[0]},r.get_values=function(a){return a[r.get_operator(a)]},r.apply=function(a,i){if(Array.isArray(a))return a.map(function(j){return r.apply(j,i)});if(!r.is_logic(a))return a;var c=r.get_operator(a),l=a[c],d,u,m,f,p;if(Array.isArray(l)||(l=[l]),c==="if"||c=="?:"){for(d=0;d<l.length-1;d+=2)if(r.truthy(r.apply(l[d],i)))return r.apply(l[d+1],i);return l.length===d+1?r.apply(l[d],i):null}else if(c==="and"){for(d=0;d<l.length;d+=1)if(u=r.apply(l[d],i),!r.truthy(u))return u;return u}else if(c==="or"){for(d=0;d<l.length;d+=1)if(u=r.apply(l[d],i),r.truthy(u))return u;return u}else{if(c==="filter")return f=r.apply(l[0],i),m=l[1],Array.isArray(f)?f.filter(function(j){return r.truthy(r.apply(m,j))}):[];if(c==="map")return f=r.apply(l[0],i),m=l[1],Array.isArray(f)?f.map(function(j){return r.apply(m,j)}):[];if(c==="reduce")return f=r.apply(l[0],i),m=l[1],p=typeof l[2]<"u"?r.apply(l[2],i):null,Array.isArray(f)?f.reduce(function(j,x){return r.apply(m,{current:x,accumulator:j})},p):p;if(c==="all"){if(f=r.apply(l[0],i),m=l[1],!Array.isArray(f)||!f.length)return!1;for(d=0;d<f.length;d+=1)if(!r.truthy(r.apply(m,f[d])))return!1;return!0}else if(c==="none"){if(f=r.apply(l[0],i),m=l[1],!Array.isArray(f)||!f.length)return!0;for(d=0;d<f.length;d+=1)if(r.truthy(r.apply(m,f[d])))return!1;return!0}else if(c==="some"){if(f=r.apply(l[0],i),m=l[1],!Array.isArray(f)||!f.length)return!1;for(d=0;d<f.length;d+=1)if(r.truthy(r.apply(m,f[d])))return!0;return!1}}if(l=l.map(function(j){return r.apply(j,i)}),o.hasOwnProperty(c)&&typeof o[c]=="function")return o[c].apply(i,l);if(c.indexOf(".")>0){var g=String(c).split("."),h=o;for(d=0;d<g.length;d++){if(!h.hasOwnProperty(g[d]))throw new Error("Unrecognized operation "+c+" (failed at "+g.slice(0,d+1).join(".")+")");h=h[g[d]]}return h.apply(i,l)}throw new Error("Unrecognized operation "+c)},r.uses_data=function(a){var i=[];if(r.is_logic(a)){var c=r.get_operator(a),l=a[c];Array.isArray(l)||(l=[l]),c==="var"?i.push(l[0]):l.forEach(function(d){i.push.apply(i,r.uses_data(d))})}return n(i)},r.add_operation=function(a,i){o[a]=i},r.rm_operation=function(a){delete o[a]},r.rule_like=function(a,i){if(i===a||i==="@")return!0;if(i==="number")return typeof a=="number";if(i==="string")return typeof a=="string";if(i==="array")return Array.isArray(a)&&!r.is_logic(a);if(r.is_logic(i)){if(r.is_logic(a)){var c=r.get_operator(i),l=r.get_operator(a);if(c==="@"||c===l)return r.rule_like(r.get_values(a,!1),r.get_values(i,!1))}return!1}if(Array.isArray(i))if(Array.isArray(a)){if(i.length!==a.length)return!1;for(var d=0;d<i.length;d+=1)if(!r.rule_like(a[d],i[d]))return!1;return!0}else return!1;return!1},r})})(Fp);var Gk=Fp.exports;const ol=Vk(Gk);function Uk(e,t){if(!t||t.length===0)return e;const n=r=>{const o=t.find(a=>a.data===String(r));return o?o.label:r};return Array.isArray(e)?e.map(n):n(e)}function co(e){return String(e).padStart(2,"0")}function Xk(e,t){const n=`${co(e.getDate())}/${co(e.getMonth()+1)}/${e.getFullYear()}`;return t?`${n} ${co(e.getHours())}:${co(e.getMinutes())}`:n}function Kk(e,t,n){if(e==null||e==="")return"โ";if(typeof e=="object"&&e!==null&&"filename"in e&&"url"in e)return e.filename;const r=Uk(e,n);switch(t){case"currency":return typeof r=="number"?new Intl.NumberFormat(void 0,{style:"currency",currency:"EUR"}).format(r):String(r);case"date":case"datetime":try{const o=new Date(String(r));return Xk(o,t==="datetime")}catch{return String(r)}default:return Array.isArray(r)?r.join(", "):String(r)}}function Jk(e){if(typeof e=="number")return e;if(typeof e=="string"){const t=e.trim().replace(/\s/g,"").replace(",","."),n=parseFloat(t);return Number.isFinite(n)?n:NaN}return NaN}function Qk(e,t){const n=t.filter(i=>typeof i=="number"&&!Number.isNaN(i));if(n.length===0)return null;let r;switch(e.operation){case"sum":r=n.reduce((i,c)=>i+c,0);break;case"subtract":r=n.slice(1).reduce((i,c)=>i-c,n[0]);break;case"multiply":r=n.reduce((i,c)=>i*c,1);break;case"divide":r=n.slice(1).reduce((i,c)=>c===0?NaN:i/c,n[0]);break;default:return null}if(!Number.isFinite(r))return null;const o=e.precision??2,a=Math.pow(10,Math.max(0,Math.min(10,o)));return Math.round(r*a)/a}function Zk(e,t){var o;if(t===null)return"โ";if(e.schema==="v2_currency-1"||e.widget==="currency")try{return new Intl.NumberFormat(void 0,{style:"currency",currency:"EUR"}).format(t)}catch{return String(t)}const r=((o=e.computed)==null?void 0:o.precision)??2;return t.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:r})}function po(e){var t;return!!(e.computed&&((t=e.computed.operand_field_ids)!=null&&t.length))}function eP(e){return{specId:e.specId||"custom",namespace:e.namespace,label:e.label,labelOverride:e.labelOverride,schema:e.schema,options:e.options??null,actor:e.actor||"customer",bindings:e.bindings||[{target_namespace:e.namespace}],widget:e.widget,required:!!e.required,uploadConfig:e.uploadConfig,allowFuture:e.allowFuture,ui_variant:e.ui_variant}}function tP(e){return rw(e,".jb-widget-root.jb-themed")}function jn(e,t){const n=e.bindings;return n!=null&&n.length?t[n[0].target_namespace]:t[e.namespace]}function nP(e,t,n){const r={...n},o=e.bindings;if(o!=null&&o.length)for(const a of o)r[a.target_namespace]=t;else r[e.namespace]=t;return r}function al(e,t){return e.replace(/\{\{\s*answers\.([\w.]+)\s*\}\}/g,(n,r)=>{const o=t[r];return o==null?"":typeof o=="object"?JSON.stringify(o):String(o)})}function Pi(e,t){if(!t)return e;const n=t.split(".");let r=e;for(const o of n)if(r&&typeof r=="object")r=r[o];else return;return r}function rP(e){const{journey:t}=e,n=v.useMemo(()=>t.form_config?Va(t.form_config):il(t),[t]),r=v.useMemo(()=>tP(t.theme),[t.theme]);return s.jsxs(s.Fragment,{children:[r&&s.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),s.jsx(oP,{...e,formConfig:n})]})}function oP({formConfig:e,onSubmit:t,onSave:n,onProgressChange:r,autoSaveOnStepChange:o=!0,onFileSelect:a,onStepApiCall:i,onStepApiError:c,onInitApiCall:l,enrichedOutput:d=!1,initialAnswers:u,googleMapsApiKey:m,fullScreen:f=!0,showWelcome:p=!0,showSummaryPanel:g}){const{t:h}=we(),{steps:j,fields:x,summary:b,init:w}=e,N=g??b.show_sidebar??!0,S=v.useMemo(()=>{const L=new Map;for(const Z of x)L.set(Z.field_id,Z);return L},[x]),[y,C]=v.useState(()=>({...(w==null?void 0:w.values)||{},...u||{}})),[E,P]=v.useState({}),[k,D]=v.useState(j[0]?[j[0].step_id]:[]),[M,A]=v.useState(p?"welcome":"form"),[z,G]=v.useState(!1),[W,Q]=v.useState(!1);v.useEffect(()=>{var Z;if(!((Z=w==null?void 0:w.api)!=null&&Z.enabled)||!w.api.url)return;let L=!1;return(async()=>{try{const _e=w.api.method||"GET",re=w.api.url,pe=l?await l({method:_e,url:re}):await fetch(re,{method:_e}).then(We=>We.json());if(L)return;const Ce=w.api.mapping||{},be={};for(const[We,xt]of Object.entries(Ce))be[We]=Pi(pe,xt);C(We=>({...We,...be}))}catch(_e){console.error("[FormRunner] init API failed",_e)}})(),()=>{L=!0}},[]);const V=k[k.length-1],R=j.find(L=>L.step_id===V),K=R?j.findIndex(L=>L.step_id===R.step_id):-1,fe=v.useCallback(L=>{var _e,re;const Z={...L};for(const pe of x){const Ce=(re=(_e=pe.bindings)==null?void 0:_e[0])==null?void 0:re.target_namespace,be=Ce?L[Ce]:L[pe.namespace];pe.namespace&&Z[pe.namespace]===void 0&&be!==void 0&&(Z[pe.namespace]=be)}return Z},[x]),ie=v.useCallback((L,Z,_e)=>{if(L==null)return _e;try{return!!ol.apply(L,{answers:fe(Z)})}catch(re){return console.warn("[FormRunner] field condition eval error",re),_e}},[fe]),O=v.useCallback((L,Z)=>ie(L.visibleWhen,Z,!0),[ie]),I=v.useCallback((L,Z)=>ie(L.enabledWhen,Z,!0),[ie]),H=v.useCallback((L,Z)=>L.requiredWhen!==null&&L.requiredWhen!==void 0?ie(L.requiredWhen,Z,!1):!!L.required,[ie]);v.useEffect(()=>{var Z,_e;if(!R)return;const L=[];for(const re of R.rows)for(const pe of re.field_ids){const Ce=S.get(pe);if(Ce&&!po(Ce)&&!O(Ce,y)){const be=((_e=(Z=Ce.bindings)==null?void 0:Z[0])==null?void 0:_e.target_namespace)||Ce.namespace;y[be]!==void 0&&y[be]!==null&&y[be]!==""&&L.push(be)}}L.length!==0&&C(re=>{const pe={...re};for(const Ce of L)delete pe[Ce];return pe})},[y,R,S,O]);const U=v.useCallback((L,Z)=>{C(_e=>nP(L,Z,_e))},[]),T=v.useCallback(async(L,Z)=>{if(a)return a(Z,L.namespace)},[a]);v.useEffect(()=>{var _e,re;const L=x.filter(po);if(L.length===0)return;const Z={};for(const pe of L){const Ce=(pe.computed.operand_field_ids||[]).map(Ue=>S.get(Ue)).filter(Ue=>!!Ue).map(Ue=>Jk(jn(Ue,y))),be=Qk(pe.computed,Ce),We=((re=(_e=pe.bindings)==null?void 0:_e[0])==null?void 0:re.target_namespace)||pe.namespace,xt=y[We];be!==(xt===void 0?null:xt)&&(Z[We]=be)}Object.keys(Z).length!==0&&C(pe=>({...pe,...Z}))},[y,x,S]);const $=v.useCallback(L=>{for(const Z of L.rows)for(const _e of Z.field_ids){const re=S.get(_e);if(!re||po(re)||!O(re,y)||!H(re,y))continue;const pe=jn(re,y);if(pe==null||pe==="")return!1}return!0},[y,S,O,H]),J=v.useCallback((L,Z)=>{const _e=[...L.navigation.rules].sort((re,pe)=>(pe.priority||0)-(re.priority||0));for(const re of _e){if(re.condition===null)return re.next_step_id;try{if(ol.apply(re.condition,{answers:Z}))return re.next_step_id}catch(pe){console.warn("[FormRunner] rule eval error",pe)}}return"__submit__"},[]),X=v.useMemo(()=>{if(!R)return k;const L=[...k],Z=new Set(L);let _e=R;for(;_e;){const re=J(_e,y);if(re==="__submit__"||Z.has(re))break;const pe=j.find(Ce=>Ce.step_id===re);if(!pe)break;L.push(re),Z.add(re),_e=pe}return L},[y,R,J,k,j]),ae=M==="form"?k.length:Math.max(K+1,1),ce=Math.max(X.length,ae,1),me=M==="summary"?100:M==="welcome"?0:Math.round(ae/ce*100),xe=v.useCallback(L=>{if(!d)return L;const Z={};for(const[_e,re]of Object.entries(L)){const pe=x.find(Ce=>{var be;return((be=Ce.bindings)==null?void 0:be.some(We=>We.target_namespace===_e))||Ce.namespace===_e});Z[_e]={data:re,schema:(pe==null?void 0:pe.schema)||"unknown"}}return Z},[d,x]),Ge=v.useCallback(L=>{if(!(!o||!n||!R))return n(xe(y),{reason:"step_change",currentStep:R,currentStepIndex:K+1,nextStepId:L})},[y,o,xe,K,R,n]);v.useEffect(()=>{!r||!R||r(xe(y),{reason:"progress",currentStep:R,currentStepIndex:K+1,stage:M})},[y,xe,K,R,r,M]);const Qe=v.useCallback(async()=>{if(!R)return;if(!$(R)){Q(!0),Mn.error(h("runner_toast_required_fields"));return}Q(!1),window.scrollTo({top:0,behavior:"smooth"});const L=R.navigation.api_call;if(L!=null&&L.enabled&&L.url){const re=al(L.url,y),pe={"Content-Type":"application/json",...L.headers||{}},Ce=L.body_template?al(L.body_template,y):void 0,be=L.method!=="GET"&&!!Ce;let We;if(be)try{We=JSON.parse(Ce)}catch{We=Ce}const xt={step_id:R.step_id,method:L.method,url:re,headers:pe,body:We,answers:y};G(!0);try{let bt=null;i?bt=await i(xt):bt=await(await fetch(re,{method:L.method,headers:pe,body:be?Ce:void 0})).json().catch(()=>null),P(Ue=>({...Ue,[R.step_id]:bt}))}catch(bt){if(console.error("[FormRunner] step API failed",bt),c)try{c(bt,xt)}catch(Rt){console.error("[FormRunner] onStepApiError handler threw",Rt)}const Ue=L.on_error??"block";if(Ue==="block"){c||Mn.error(h("runner_toast_api_failed")),G(!1);return}if(typeof Ue=="string"&&Ue.startsWith("goto:")){const Rt=Ue.slice(5);if(G(!1),Rt==="__submit__")A("summary");else if(k.includes(Rt))A("summary");else{const bn=Ge(Rt);bn&&await bn,D(wn=>[...wn,Rt])}return}}G(!1)}const Z=J(R,y);if(Z==="__submit__"){A("summary");return}if(k.includes(Z)){A("summary");return}const _e=Ge(Z);_e&&await _e,D(re=>[...re,Z])},[R,y,J,k,$,i,c,Ge,h]),Ze=v.useCallback(()=>{if(M==="summary"){A("form"),window.scrollTo({top:0,behavior:"smooth"});return}k.length>1&&(D(k.slice(0,-1)),window.scrollTo({top:0,behavior:"smooth"}))},[k,M]),Ie=v.useCallback(()=>{const L=xe(y);t?t(L):navigator.clipboard.writeText(JSON.stringify(L,null,2)).then(()=>{Mn.success(h("runner_toast_answers_copied"))})},[y,xe,t]),ct=v.useCallback(()=>{C({...(w==null?void 0:w.values)||{}}),P({}),D(j[0]?[j[0].step_id]:[]),A(p?"welcome":"form"),Q(!1)},[w,j,p]);return j.length===0?s.jsx("div",{className:`jb-widget-root jb-themed ${f?"cj-min-h-screen":"cj-h-full"} cj-bg-background cj-flex cj-items-center cj-justify-center cj-p-6`,children:s.jsx("p",{className:"cj-text-muted-foreground cj-text-base",children:"No form to display."})}):s.jsxs("div",{className:`jb-widget-root jb-themed ${f?"cj-min-h-screen":"cj-h-full"} cj-flex cj-flex-col cj-bg-background`,style:{fontFamily:"var(--claims-journey-font-body)"},children:[s.jsxs("header",{className:"cj-px-4 cj-py-3 sm:cj-px-6 cj-flex cj-items-center cj-justify-between cj-bg-card cj-border-b cj-border-border/40",children:[s.jsx("span",{className:"cj-text-xs cj-font-medium cj-text-muted-foreground cj-uppercase cj-tracking-wide",children:M==="summary"?b.title||"Summary":M==="welcome"?"":`Step ${ae} of ${ce}`}),s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-3",children:[n&&Object.keys(y).length>0&&M!=="summary"&&s.jsx("button",{onClick:()=>R&&n(xe(y),{reason:"manual",currentStep:R,currentStepIndex:K+1}),className:"cj-text-xs cj-text-muted-foreground hover:cj-text-foreground cj-bg-transparent cj-border-none cj-cursor-pointer",children:"Save & exit"}),s.jsxs("button",{onClick:ct,className:"cj-text-xs cj-text-muted-foreground hover:cj-text-foreground cj-bg-transparent cj-border-none cj-cursor-pointer cj-flex cj-items-center cj-gap-1",children:[s.jsx(ql,{className:"cj-h-3.5 cj-w-3.5"}),"Reset"]})]})]}),s.jsx("div",{className:"cj-px-4 sm:cj-px-6 cj-bg-card",children:s.jsx(Mm,{value:me,className:"cj-h-1 cj-rounded-none"})}),s.jsxs("main",{className:"cj-flex-1 cj-flex cj-flex-col md:cj-flex-row cj-items-stretch cj-w-full",children:[M==="form"&&N&&s.jsx("div",{className:"md:cj-hidden cj-border-b cj-border-border/40 cj-bg-card",children:s.jsx(aP,{formConfig:e,answers:y,apiResponses:E,currentStepIndex:K+1})}),s.jsx("div",{className:`cj-flex-1 ${N?"md:cj-w-[70%]":"md:cj-w-full"} cj-flex cj-justify-center cj-px-4 sm:cj-px-6 cj-py-6 md:cj-py-8 md:cj-px-3`,children:s.jsx("div",{className:"cj-w-full cj-max-w-4xl",children:M==="welcome"?s.jsx(cP,{onStart:()=>{A("form"),window.scrollTo({top:0,behavior:"smooth"})}}):M==="summary"?s.jsx(iP,{formConfig:e,answers:y,apiResponses:E,currentStepIndex:K+1,onBack:Ze,onSubmit:Ie}):R?s.jsx(sP,{step:R,fields:S,answers:y,onAnswerChange:U,onFileSelect:T,googleMapsApiKey:m,onNext:Qe,onBack:Ze,canGoBack:k.length>1,submitting:z,showValidation:W,stepIndex:ae,isFieldVisible:O,isFieldEnabled:I,isFieldRequired:H}):null})}),M==="form"&&N&&s.jsx("aside",{className:"cj-hidden md:cj-block md:cj-w-[30%] md:cj-shrink-0 cj-self-start cj-sticky cj-top-0 cj-px-4 sm:cj-px-6 cj-py-6 md:cj-py-8 md:cj-px-3",children:s.jsx("div",{className:"cj-rounded-2xl cj-bg-card cj-border cj-border-border/30 cj-p-5 sm:cj-p-7 cj-space-y-5 cj-max-h-[calc(100vh-5rem)] cj-overflow-y-auto",children:s.jsx($p,{formConfig:e,answers:y,apiResponses:E,currentStepIndex:K+1})})})]})]})}function $p({formConfig:e,answers:t,apiResponses:n,currentStepIndex:r}){const{summary:o,fields:a}=e,i=v.useMemo(()=>new Map(a.map(l=>[l.field_id,l])),[a]),c=v.useMemo(()=>{const l=[];if(o.sections.length===0){const d=[];return e.steps.forEach(u=>{u.rows.forEach(m=>{m.field_ids.forEach(f=>{const p=i.get(f);if(!p)return;const g=jn(p,t);d.push({label:p.label||p.namespace,value:bs(g,p.schema,p.options)})})})}),d.length>0&&l.push({id:"all",title:o.title||"Summary",rows:d}),l}return o.sections.forEach(d=>{const u=d.visible_from_step??1,m=d.until_step;if(r<u||m!==void 0&&r>m)return;const f=d.display_fields.map(p=>{let g,h;if(p.source==="form_field"&&p.field_id){const j=i.get(p.field_id);j&&(g=jn(j,t),h=j.options)}else if(p.source==="api_response"&&p.step_id){const j=n[p.step_id];g=Pi(j,p.response_path||"")}return{label:p.label||"(label)",value:bs(g,p.format,h)}});l.push({id:d.section_id,title:d.title,rows:f})}),l},[o,e.steps,i,t,n,r]);return s.jsxs("div",{children:[s.jsx("h2",{className:"cj-text-base cj-font-semibold cj-text-foreground cj-mb-6",style:{fontFamily:"var(--claims-journey-font-heading)"},children:o.title||"Summary"}),c.length===0?s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-italic",children:"Suas respostas aparecerรฃo aqui."}):s.jsx("div",{className:"cj-space-y-8",children:c.map((l,d)=>s.jsxs("div",{className:d>0?"cj-pt-8 cj-border-t cj-border-border/40":"",children:[s.jsx("h3",{className:"cj-text-xs cj-font-bold cj-uppercase cj-tracking-wider cj-text-muted-foreground cj-mb-4",children:l.title}),s.jsxs("div",{className:"cj-space-y-4",children:[l.rows.map((u,m)=>s.jsxs("div",{className:"cj-flex cj-flex-col cj-gap-2 cj-text-sm cj-leading-relaxed",children:[s.jsx("span",{className:"cj-text-muted-foreground cj-text-left",children:u.label}),s.jsx("span",{className:`cj-text-right cj-font-medium cj-break-words cj-pl-4 cj-leading-snug ${u.value==="โ"?"cj-text-muted-foreground/60":"cj-text-foreground"}`,children:u.value})]},m)),l.rows.length===0&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-italic",children:"โ"})]})]},l.id))})]})}function aP(e){const[t,n]=v.useState(!1),{formConfig:r,answers:o}=e,a=v.useMemo(()=>{let i=0;const c=new Map(r.fields.map(l=>[l.field_id,l]));return r.steps.forEach(l=>l.rows.forEach(d=>d.field_ids.forEach(u=>{const m=c.get(u);if(!m)return;const f=jn(m,o);f!=null&&f!==""&&i++}))),i},[r,o]);return s.jsxs("div",{children:[s.jsxs("button",{type:"button",onClick:()=>n(i=>!i),className:"cj-w-full cj-flex cj-items-center cj-justify-between cj-px-4 cj-py-3 cj-bg-transparent cj-border-none cj-cursor-pointer",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[s.jsx("div",{className:"cj-h-1.5 cj-w-1.5 cj-rounded-full cj-bg-primary"}),s.jsx("span",{className:"cj-text-xs cj-font-semibold cj-text-foreground",children:r.summary.title||"Summary"}),s.jsxs("span",{className:"cj-text-xs cj-text-muted-foreground",children:["ยท ",a," preenchidos"]})]}),s.jsx(Bt,{className:`cj-h-4 cj-w-4 cj-text-muted-foreground cj-transition-transform ${t?"cj-rotate-180":""}`})]}),t&&s.jsx("div",{className:"cj-px-4 cj-pb-4",children:s.jsx($p,{...e})})]})}const bs=Kk;function sP({step:e,fields:t,answers:n,onAnswerChange:r,onFileSelect:o,googleMapsApiKey:a,onNext:i,onBack:c,canGoBack:l,submitting:d,showValidation:u,stepIndex:m,isFieldVisible:f,isFieldEnabled:p,isFieldRequired:g}){return s.jsxs("div",{className:"cj-space-y-4",children:[s.jsxs("div",{className:"cj-rounded-2xl cj-bg-card cj-border cj-border-border/30 cj-p-5 sm:cj-p-7 cj-space-y-5",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-3",children:[s.jsx("div",{className:"cj-h-9 cj-w-9 cj-rounded-full cj-bg-primary cj-text-primary-foreground cj-flex cj-items-center cj-justify-center cj-font-bold cj-text-sm",children:m}),s.jsxs("div",{className:"cj-flex-1 cj-min-w-0",children:[s.jsx("h2",{className:"cj-text-lg cj-font-semibold cj-text-foreground",style:{fontFamily:"var(--claims-journey-font-heading)"},children:e.title}),e.description&&s.jsx("p",{className:"cj-text-sm cj-text-muted-foreground",children:e.description})]})]}),s.jsx("div",{className:"cj-space-y-4",children:e.rows.map(h=>{const j=h.field_ids.map(y=>t.get(y)).filter(y=>!!y).filter(y=>f(y,n));if(j.length===0)return null;const x=Math.min(j.length,3),b=h.layout==="horizontal",w=x===3?2:x===2?3:6,N=y=>{switch(y){case"1/3":return 2;case"1/2":return 3;case"2/3":return 4;case"full":return 6;default:return w}},S=y=>{switch(y){case 2:return"sm:cj-col-span-2";case 3:return"sm:cj-col-span-3";case 4:return"sm:cj-col-span-4";case 6:default:return"sm:cj-col-span-6"}};return s.jsxs("div",{className:"cj-space-y-3",children:[h.show_divider&&s.jsx("hr",{className:"cj-w-full cj-h-0 cj-m-0 cj-border-0 cj-border-t-2 cj-border-dotted cj-border-border","aria-hidden":"true"}),h.title&&s.jsx("h3",{className:"cj-text-base sm:cj-text-lg cj-font-semibold cj-text-foreground cj-leading-tight",children:h.title}),s.jsx("div",{className:b?"cj-grid cj-grid-cols-1 sm:cj-grid-cols-6 cj-gap-3":"cj-flex cj-flex-col cj-gap-3",children:j.map(y=>{const C=jn(y,n),E=p(y,n),P=b?S(N(y.width)):"";if(po(y)){const A=typeof C=="number"?C:null;return s.jsxs("div",{className:`cj-flex cj-flex-col cj-gap-1 ${P} ${E?"":"cj-opacity-60"}`,children:[s.jsx("label",{className:"cj-text-xs cj-font-medium cj-uppercase cj-tracking-wide cj-text-muted-foreground",children:y.labelOverride||y.label}),s.jsx("div",{className:"cj-min-h-[48px] cj-flex cj-items-center cj-rounded-xl cj-bg-muted/40 cj-px-4 cj-py-2 cj-text-base cj-font-semibold cj-text-foreground cj-tabular-nums",children:Zk(y,A)})]},y.field_id)}const k=g(y,n),D=u&&k&&(C==null||C===""),M={...eP(y),required:k};return s.jsx("div",{className:`${P} ${D?"cj-rounded-xl cj-ring-2 cj-ring-destructive/40 cj-p-2":""} ${E?"":"cj-opacity-60 cj-pointer-events-none"}`,"aria-disabled":!E||void 0,children:s.jsx(qk,{nodeData:M,value:C,onChange:A=>r(y,A),onFileSelect:A=>o(y,A),googleMapsApiKey:a})},y.field_id)})})]},h.row_id)})})]}),s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between",children:[s.jsxs(te,{variant:"ghost",size:"sm",onClick:c,disabled:!l||d,className:"cj-text-muted-foreground hover:cj-text-foreground",children:[s.jsx(Fl,{className:"cj-h-4 cj-w-4 cj-mr-1.5"}),"Back"]}),s.jsx(te,{size:"default",onClick:i,disabled:d,className:"cj-rounded-xl cj-px-6",children:d?s.jsxs(s.Fragment,{children:[s.jsx(ks,{className:"cj-h-4 cj-w-4 cj-mr-1.5 cj-animate-spin"}),"Loadingโฆ"]}):s.jsxs(s.Fragment,{children:[e.navigation.button_label||"Continue",s.jsx(Wo,{className:"cj-h-4 cj-w-4 cj-ml-1.5"})]})})]})]})}function iP({formConfig:e,answers:t,apiResponses:n,currentStepIndex:r,onBack:o,onSubmit:a}){const{t:i}=we(),{summary:c,fields:l}=e,d=new Map(l.map(g=>[g.field_id,g])),u=g=>typeof g=="object"&&g!==null&&"filename"in g&&"url"in g,m=(g,h,j)=>u(g)&&g.url?s.jsx("a",{href:g.url,target:"_blank",rel:"noopener noreferrer",className:"cj-text-primary cj-underline cj-break-all",onClick:x=>x.stopPropagation(),children:g.filename}):bs(g,h,j),f=[];e.steps.forEach(g=>{g.rows.forEach(h=>{h.field_ids.forEach(j=>{const x=d.get(j);if(!x)return;const b=jn(x,t);b==null||b===""||Array.isArray(b)&&b.length===0||f.push({id:j,label:x.label||x.namespace,value:b,format:x.schema,options:x.options})})})});const p=g=>f.length===0?s.jsx("div",{className:"cj-rounded-2xl cj-bg-card cj-border cj-border-border/30 cj-p-6 cj-text-sm cj-text-muted-foreground cj-text-center",children:i("runner_no_answers")}):s.jsxs("div",{className:"cj-rounded-2xl cj-bg-card cj-border cj-border-border/30 cj-overflow-hidden",children:[g&&s.jsx("div",{className:"cj-px-4 cj-py-3 cj-border-b cj-border-border/30 cj-bg-muted/30",children:s.jsx("h3",{className:"cj-text-sm cj-font-semibold",children:i("runner_summary_all_answers")})}),s.jsx("div",{className:"cj-divide-y cj-divide-border/30",children:f.map(h=>s.jsxs("div",{className:"cj-px-4 cj-py-3",children:[s.jsx("div",{className:"cj-text-xs cj-text-muted-foreground cj-font-medium",children:h.label}),s.jsx("div",{className:"cj-text-sm cj-font-medium cj-mt-0.5 cj-break-words",children:m(h.value,h.format,h.options)})]},h.id))})]});return s.jsxs("div",{className:"cj-space-y-4",children:[s.jsxs("div",{className:"cj-rounded-2xl cj-bg-card cj-border cj-border-border/30 cj-p-6 cj-text-center cj-space-y-2",children:[s.jsx(P_,{className:"cj-h-7 cj-w-7 cj-text-primary cj-mx-auto"}),s.jsx("h2",{className:"cj-text-xl cj-font-bold",style:{fontFamily:"var(--claims-journey-font-heading)"},children:c.title||"Summary"})]}),c.sections.length===0?p(!1):c.sections.map(g=>{const h=g.visible_from_step??1,j=g.until_step;return r<h||j!==void 0&&r>j?null:s.jsxs("div",{className:"cj-rounded-2xl cj-bg-card cj-border cj-border-border/30 cj-overflow-hidden",children:[s.jsx("div",{className:"cj-px-4 cj-py-3 cj-border-b cj-border-border/30 cj-bg-muted/30",children:s.jsx("h3",{className:"cj-text-sm cj-font-semibold",children:g.title})}),s.jsxs("div",{className:"cj-divide-y cj-divide-border/30",children:[g.display_fields.map(x=>{let b,w;if(x.source==="form_field"&&x.field_id){const N=d.get(x.field_id);N&&(b=jn(N,t),w=N.options)}else if(x.source==="api_response"&&x.step_id){const N=n[x.step_id];b=Pi(N,x.response_path||"")}return s.jsxs("div",{className:"cj-px-4 cj-py-3",children:[s.jsx("div",{className:"cj-text-xs cj-text-muted-foreground cj-font-medium",children:x.label||"(label)"}),s.jsx("div",{className:"cj-text-sm cj-font-medium cj-mt-0.5",children:m(b,x.format,w)})]},x.display_id)}),g.display_fields.length===0&&s.jsx("div",{className:"cj-px-4 cj-py-3 cj-text-xs cj-text-muted-foreground cj-italic",children:"No display fields configured."})]})]},g.section_id)}),c.sections.length>0&&p(!0),s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-pt-2",children:[s.jsxs(te,{variant:"ghost",size:"sm",onClick:o,className:"cj-text-muted-foreground hover:cj-text-foreground",children:[s.jsx(Fl,{className:"cj-h-4 cj-w-4 cj-mr-1.5"}),"Back"]}),s.jsxs(te,{size:"default",onClick:a,className:"cj-rounded-xl cj-px-6",children:[s.jsx(G_,{className:"cj-h-4 cj-w-4 cj-mr-1.5"}),"Submit"]})]})]})}function cP({onStart:e}){const{t}=we();return s.jsx("div",{className:"cj-w-full cj-max-w-xl cj-mx-auto cj-py-8",style:{fontFamily:"var(--claims-journey-font-body)"},children:s.jsxs("div",{className:"cj-rounded-2xl cj-bg-card cj-border cj-border-border/40 cj-p-8 sm:cj-p-10 cj-flex cj-flex-col cj-items-center cj-text-center cj-gap-6",children:[s.jsx("div",{className:"cj-h-16 cj-w-16 cj-rounded-full cj-bg-muted cj-flex cj-items-center cj-justify-center",children:s.jsx(A_,{className:"cj-h-7 cj-w-7 cj-text-muted-foreground"})}),s.jsxs("div",{className:"cj-space-y-3",children:[s.jsx("h1",{className:"cj-text-xl sm:cj-text-2xl cj-font-semibold cj-text-foreground",style:{fontFamily:"var(--claims-journey-font-heading)"},children:t("runner_onboarding_line1")}),s.jsx("p",{className:"cj-text-sm cj-text-muted-foreground",children:t("runner_onboarding_line2")})]}),s.jsxs(te,{size:"lg",onClick:e,className:"cj-w-full cj-rounded-xl cj-min-h-[56px] cj-text-base",children:[t("runner_start_claim"),s.jsx(Wo,{className:"cj-h-4 cj-w-4 cj-ml-2"})]})]})})}const lP="http://json-schema.org/draft-07/schema#",dP="https://habit.ai/schemas/form-config.schema.json",uP="FormConfig",fP="v2.0 linear form configuration: ordered steps, a flat field catalog, summary panel, and init values.",mP="object",pP=["steps","fields","summary","init"],hP=!1,_P={steps:{type:"array",items:{$ref:"#/definitions/FormStep"}},fields:{type:"array",items:{$ref:"#/definitions/FormField"}},summary:{$ref:"#/definitions/SummaryPanelConfig"},init:{$ref:"#/definitions/InitConfig"}},gP={HttpMethod:{type:"string",enum:["GET","POST","PUT","PATCH","DELETE"]},JsonLogic:{description:"JSON Logic expression evaluated against { answers, api_responses }. null means 'always true' (default rule).",type:["object","null"]},ClaimPropertySpecOption:{type:"object",required:["data","label"],additionalProperties:!1,properties:{data:{type:"string",description:"Stored value when this option is selected."},label:{type:"string",description:"Human-readable display text."},next:{type:"array",items:{type:"string"}}}},NodeBinding:{type:"object",required:["target_namespace"],additionalProperties:!1,properties:{target_namespace:{type:"string"}}},UploadConfig:{type:"object",additionalProperties:!1,properties:{accept:{type:"string",description:"HTML accept attribute (MIME types or extensions)."},maxSizeMB:{type:"number",minimum:0}}},FormField:{type:"object",required:["field_id","namespace","label","schema"],additionalProperties:!1,properties:{field_id:{type:"string",description:"Unique id; referenced from FormRow.field_ids."},namespace:{type:"string",description:"Answer key (dot-notation, e.g. 'insured.full_name')."},label:{type:"string"},labelOverride:{type:"string"},specId:{type:"string",description:"Source ClaimPropertySpec id, or 'custom'."},schema:{type:"string",description:"Schema type, e.g. 'v1_string', 'v2_date-1'."},options:{oneOf:[{type:"null"},{type:"array",items:{$ref:"#/definitions/ClaimPropertySpecOption"}}]},widget:{type:"string",description:"Widget override (e.g. 'email', 'textarea', 'phone')."},required:{type:"boolean"},actor:{type:"string",enum:["customer","operator"]},bindings:{type:"array",items:{$ref:"#/definitions/NodeBinding"}},uploadConfig:{$ref:"#/definitions/UploadConfig"},allowFuture:{type:"boolean",description:"Date/datetime widgets only."},placeholder:{type:"string"},helpText:{type:"string"},ui_variant:{type:"string",description:"Visual variant override. single_select: 'radio' | 'radio-horizontal' | 'dropdown' | 'segmented'. boolean: 'switch' | 'segmented'."}}},FormRow:{type:"object",required:["row_id","layout","field_ids"],additionalProperties:!1,properties:{row_id:{type:"string"},layout:{type:"string",enum:["horizontal","vertical"]},field_ids:{type:"array",items:{type:"string"},description:"FK to FormField.field_id."},title:{type:"string",description:"Optional section title rendered above the row."},show_divider:{type:"boolean",description:"Render a dotted divider above the row."}}},NavRule:{type:"object",required:["rule_id","condition","next_step_id"],additionalProperties:!1,properties:{rule_id:{type:"string"},condition:{$ref:"#/definitions/JsonLogic"},next_step_id:{type:"string",description:"Target FormStep.step_id or the literal '__submit__' to finish the form."},priority:{type:"integer",description:"Higher priority rules are evaluated first."}}},StepApiCall:{type:"object",required:["enabled","method","url"],additionalProperties:!1,properties:{enabled:{type:"boolean"},method:{$ref:"#/definitions/HttpMethod"},url:{type:"string",format:"uri"},headers:{type:"object",additionalProperties:{type:"string"}},body_template:{type:"string",description:"JSON string; '{{answers.foo}}' tokens are interpolated by the runner."},on_error:{type:"string",description:"Behavior on failure. 'block' (default) keeps the user on the step; 'continue' runs nav rules; 'goto:<step_id>' jumps to that step.",pattern:"^(block|continue|goto:.+)$",default:"block"}}},StepNavigation:{type:"object",required:["rules"],additionalProperties:!1,properties:{api_call:{$ref:"#/definitions/StepApiCall"},rules:{type:"array",items:{$ref:"#/definitions/NavRule"}},button_label:{type:"string"}}},FormStep:{type:"object",required:["step_id","title","rows","navigation"],additionalProperties:!1,properties:{step_id:{type:"string"},title:{type:"string"},description:{type:"string"},rows:{type:"array",items:{$ref:"#/definitions/FormRow"}},navigation:{$ref:"#/definitions/StepNavigation"}}},SummaryDisplayField:{type:"object",required:["display_id","source","label"],additionalProperties:!1,properties:{display_id:{type:"string"},source:{type:"string",enum:["form_field","api_response"]},field_id:{type:"string",description:"Required when source = 'form_field'."},step_id:{type:"string",description:"Required when source = 'api_response'."},response_path:{type:"string",description:"Dot-path inside the step's api_response."},label:{type:"string"},format:{type:"string",enum:["text","date","datetime","currency","number"]}},allOf:[{if:{properties:{source:{const:"form_field"}}},then:{required:["field_id"]}},{if:{properties:{source:{const:"api_response"}}},then:{required:["step_id","response_path"]}}]},SummarySection:{type:"object",required:["section_id","title","display_fields"],additionalProperties:!1,properties:{section_id:{type:"string"},title:{type:"string"},visible_from_step:{type:"integer",minimum:1,description:"1-based step index."},until_step:{type:"integer",minimum:1,description:"1-based step index."},display_fields:{type:"array",items:{$ref:"#/definitions/SummaryDisplayField"}}}},SummaryPanelConfig:{type:"object",required:["title","sections"],additionalProperties:!1,properties:{title:{type:"string"},show_pricing:{type:"boolean"},show_sidebar:{type:"boolean",description:"Show the live summary sidebar/accordion during the journey. Defaults to true."},sections:{type:"array",items:{$ref:"#/definitions/SummarySection"}}}},InitConfig:{type:"object",required:["values"],additionalProperties:!1,properties:{values:{type:"object",description:"Static initial answers keyed by namespace.",additionalProperties:!0},api:{type:"object",required:["enabled","method","url"],additionalProperties:!1,properties:{enabled:{type:"boolean"},method:{type:"string",enum:["GET","POST"]},url:{type:"string",format:"uri"},headers:{type:"object",additionalProperties:{type:"string"}},mapping:{type:"object",description:"namespace -> dot-path inside the prefill response.",additionalProperties:{type:"string"}}}}}}},jP={$schema:lP,$id:dP,title:uP,description:fP,type:mP,required:pP,additionalProperties:hP,properties:_P,definitions:gP},yP="http://json-schema.org/draft-07/schema#",vP="https://habit.ai/schemas/journey-spec.schema.json",xP="JourneySpec (v2.0)",bP="Portable envelope produced by JourneyBuilderWidget and consumed by FormRunnerWidget. v2.0 wraps a form_config; legacy v1.x nodes/edges/start_node_id are optional and preserved on re-export.",wP="object",NP=["journey_id","claimspec_id","version"],SP=!0,CP={journey_id:{type:"string",description:"Unique journey identifier."},claimspec_id:{type:"string",description:"Associated claim specification id."},version:{type:"string",description:"Schema version. Use '2.0' (or any '2.x.y') for the linear FormConfig model."},form_config:{$ref:"https://habit.ai/schemas/form-config.schema.json",description:"Source of truth in v2.0. When present, legacy nodes/edges/groups/mode are ignored at runtime."},theme:{$ref:"#/definitions/JourneyTheme"},mode:{type:"string",enum:["sequential","grouped"],description:"Legacy v1.x rendering mode."},nodes:{type:"array",description:"Legacy v1.x โ preserved on re-export.",items:{type:"object"}},edges:{type:"array",description:"Legacy v1.x โ preserved on re-export.",items:{type:"object"}},start_node_id:{type:["string","null"],description:"Legacy v1.x."},groups:{type:"array",description:"Legacy v1.x grouped layout.",items:{type:"object"}}},kP=[{required:["form_config"]},{required:["nodes","edges"]}],PP={JourneyTheme:{type:"object",description:"CSS variables injected on the runner/builder root. Colors are HSL triplets like '222 47% 11%'.",additionalProperties:!1,properties:{primaryColor:{type:"string"},backgroundColor:{type:"string"},cardColor:{type:"string"},foregroundColor:{type:"string"},fontFamilyHeading:{type:"string"},fontFamilyBody:{type:"string"},fontSizeBase:{type:"number",description:"Base font size in pixels."},borderRadius:{type:"number",description:"Border radius in rem."},spacing:{type:"string",enum:["compact","cozy","spacious"]}}}},EP={$schema:yP,$id:vP,title:xP,description:bP,type:wP,required:NP,additionalProperties:SP,properties:CP,anyOf:kP,definitions:PP};exports.FormRunnerWidget=rP;exports.JourneyBuilderWidget=fw;exports.PortalContainerContext=sa;exports.SCHEMA_TYPES=Cr;exports.formConfigSchema=jP;exports.getSchemaInfo=ca;exports.journeySpecSchema=EP;exports.setLanguage=Ed;exports.useTranslation=we;
|
|
307
|
+
Defaulting to \`null\`.`}var Dm=km,ww=Em;const Tm=g.forwardRef(({className:e,value:t,...n},r)=>s.jsx(Dm,{ref:r,className:ne("cj-relative cj-h-4 cj-w-full cj-overflow-hidden cj-rounded-full cj-bg-secondary",e),...n,children:s.jsx(ww,{className:"cj-h-full cj-w-full cj-flex-1 cj-bg-primary cj-transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Tm.displayName=Dm.displayName;function Nw({label:e,value:t,onChange:n,placeholder:r,helpText:o,multiline:a=!1}){const{t:i}=ve();return s.jsxs("div",{className:"cj-space-y-2",children:[s.jsx(Y,{className:"cj-text-sm cj-font-medium",children:e}),a?s.jsx(Br,{value:t,onChange:c=>n(c.target.value),placeholder:r||i("placeholder_text"),className:"cj-min-h-[100px]"}):s.jsx(pe,{type:"text",value:t,onChange:c=>n(c.target.value),placeholder:r||i("placeholder_text")}),o&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:o})]})}var hi="Radio",[Sw,Rm]=_t(hi),[Cw,kw]=Sw(hi),Am=g.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:i,value:c="on",onCheck:l,form:d,...u}=e,[p,f]=g.useState(null),m=xe(t,j=>f(j)),_=g.useRef(!1),h=p?d||!!p.closest("form"):!0;return s.jsxs(Cw,{scope:n,checked:o,disabled:i,children:[s.jsx(le.button,{type:"button",role:"radio","aria-checked":o,"data-state":Wm(o),"data-disabled":i?"":void 0,disabled:i,value:c,...u,ref:m,onClick:se(e.onClick,j=>{o||l==null||l(),h&&(_.current=j.isPropagationStopped(),_.current||j.stopPropagation())})}),h&&s.jsx(Im,{control:p,bubbles:!_.current,name:r,value:c,checked:o,required:a,disabled:i,form:d,style:{transform:"translateX(-100%)"}})]})});Am.displayName=hi;var Om="RadioIndicator",zm=g.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=kw(Om,n);return s.jsx(gt,{present:r||a.checked,children:s.jsx(le.span,{"data-state":Wm(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});zm.displayName=Om;var Pw="RadioBubbleInput",Im=g.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=g.useRef(null),c=xe(i,a),l=ri(n),d=Zs(t);return g.useEffect(()=>{const u=i.current;if(!u)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(l!==n&&m){const _=new Event("click",{bubbles:r});m.call(u,n),u.dispatchEvent(_)}},[l,n,r]),s.jsx(le.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:c,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Im.displayName=Pw;function Wm(e){return e?"checked":"unchecked"}var Ew=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ha="RadioGroup",[Mw]=_t(ha,[zo,Rm]),Fm=zo(),$m=Rm(),[Dw,Tw]=Mw(ha),Lm=g.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:i=!1,disabled:c=!1,orientation:l,dir:d,loop:u=!0,onValueChange:p,...f}=e,m=Fm(n),_=Ar(d),[h,j]=tn({prop:a,defaultProp:o??null,onChange:p,caller:ha});return s.jsx(Dw,{scope:n,name:r,required:i,disabled:c,value:h,onValueChange:j,children:s.jsx(Sl,{asChild:!0,...m,orientation:l,dir:_,loop:u,children:s.jsx(le.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":c?"":void 0,dir:_,...f,ref:t})})})});Lm.displayName=ha;var Bm="RadioGroupItem",Hm=g.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=Tw(Bm,n),i=a.disabled||r,c=Fm(n),l=$m(n),d=g.useRef(null),u=xe(t,d),p=a.value===o.value,f=g.useRef(!1);return g.useEffect(()=>{const m=h=>{Ew.includes(h.key)&&(f.current=!0)},_=()=>f.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",_),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",_)}},[]),s.jsx(Cl,{asChild:!0,...c,focusable:!i,active:p,children:s.jsx(Am,{disabled:i,required:a.required,checked:p,...l,...o,name:a.name,ref:u,onCheck:()=>a.onValueChange(o.value),onKeyDown:se(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:se(o.onFocus,()=>{var m;f.current&&((m=d.current)==null||m.click())})})})});Hm.displayName=Bm;var Rw="RadioGroupIndicator",qm=g.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=$m(n);return s.jsx(zm,{...o,...r,ref:t})});qm.displayName=Rw;var Ym=Lm,Vm=Hm,Aw=qm;const Um=g.forwardRef(({className:e,...t},n)=>s.jsx(Ym,{className:ne("cj-gap-2",e),...t,ref:n}));Um.displayName=Ym.displayName;const Gm=g.forwardRef(({className:e,...t},n)=>s.jsx(Vm,{ref:n,className:ne("cj-aspect-square cj-h-5 cj-w-5 cj-rounded-full cj-border cj-border-primary cj-text-primary cj-ring-offset-background focus:cj-outline-none focus-visible:cj-ring-2 focus-visible:cj-ring-ring focus-visible:cj-ring-offset-2 disabled:cj-cursor-not-allowed disabled:cj-opacity-50 cj-shrink-0",e),...t,children:s.jsx(Aw,{className:"cj-flex cj-items-center cj-justify-center",children:s.jsx(D_,{className:"cj-h-3 cj-w-3 cj-fill-current cj-text-current"})})}));Gm.displayName=Vm.displayName;function Ow({label:e,value:t,onChange:n,options:r,helpText:o,variant:a="auto"}){const{t:i}=ve(),c=a==="auto"?r.length<=5?"radio":"dropdown":a,l=c==="radio-horizontal"?{gridTemplateColumns:"repeat(auto-fit, minmax(min(180px, 100%), 1fr))"}:void 0;return s.jsxs("div",{className:"cj-space-y-2",children:[s.jsx(Y,{className:"cj-text-sm cj-font-medium",children:e}),(c==="radio"||c==="radio-horizontal")&&s.jsx(Um,{value:t,onValueChange:n,className:c==="radio-horizontal"?"cj-grid cj-gap-2":"cj-space-y-1",style:l,children:r.map(d=>s.jsxs("label",{htmlFor:d.data,className:c==="radio-horizontal"?"cj-flex cj-min-w-0 cj-items-center cj-gap-2 cj-rounded-xl cj-border cj-border-border/40 cj-bg-card cj-px-3 cj-py-2.5 cj-cursor-pointer cj-transition-colors hover:cj-bg-accent/50 data-[state=checked]:cj-border-primary/40 data-[state=checked]:cj-bg-primary/5":"cj-flex cj-items-center cj-gap-3 cj-rounded-xl cj-border cj-border-border/40 cj-bg-card cj-px-4 cj-py-3.5 cj-cursor-pointer cj-transition-colors hover:cj-bg-accent/50 data-[state=checked]:cj-border-primary/40 data-[state=checked]:cj-bg-primary/5",children:[s.jsx(Gm,{value:d.data,id:d.data}),s.jsx("span",{className:"cj-min-w-0 cj-text-sm cj-font-normal cj-text-foreground cj-select-none",children:d.label})]},d.data))}),c==="dropdown"&&s.jsxs(Ae,{value:t,onValueChange:n,children:[s.jsx(De,{className:"cj-w-full cj-h-12",children:s.jsx(Oe,{placeholder:i("placeholder_select")})}),s.jsx(Te,{className:"cj-bg-popover cj-z-50",children:r.map(d=>s.jsx(V,{value:d.data,className:"cj-py-3",children:d.label},d.data))})]}),c==="segmented"&&s.jsx("div",{role:"radiogroup",className:"cj-grid cj-gap-2",style:{gridTemplateColumns:`repeat(${Math.min(r.length,4)}, minmax(0, 1fr))`},children:r.map(d=>{const u=t===d.data;return s.jsx("button",{type:"button",role:"radio","aria-checked":u,onClick:()=>n(d.data),className:["cj-flex cj-items-center cj-justify-center cj-text-center","cj-min-h-12 cj-px-4 cj-py-3 cj-rounded-xl cj-border cj-text-sm cj-font-medium","cj-transition-colors",u?"cj-border-primary cj-bg-primary/10 cj-text-primary":"cj-border-border/40 cj-bg-card cj-text-foreground hover:cj-bg-accent/50"].join(" "),children:d.label},d.data)})}),o&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:o})]})}function Ke(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function He(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Xm(e,t){const n=Ke(e);return isNaN(t)?He(e,NaN):(t&&n.setDate(n.getDate()+t),n)}const Km=6048e5,zw=864e5,Iw=6e4,Ww=36e5,Fw=1e3;let $w={};function ur(){return $w}function gn(e,t){var c,l,d,u;const n=ur(),r=(t==null?void 0:t.weekStartsOn)??((l=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(d=n.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,o=Ke(e),a=o.getDay(),i=(a<r?7:0)+a-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function ar(e){return gn(e,{weekStartsOn:1})}function Jm(e){const t=Ke(e),n=t.getFullYear(),r=He(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=ar(r),a=He(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const i=ar(a);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function Wc(e){const t=Ke(e);return t.setHours(0,0,0,0),t}function Mo(e){const t=Ke(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Lw(e,t){const n=Wc(e),r=Wc(t),o=+n-Mo(n),a=+r-Mo(r);return Math.round((o-a)/zw)}function Bw(e){const t=Jm(e),n=He(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),ar(n)}function Hw(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function _i(e){if(!Hw(e)&&typeof e!="number")return!1;const t=Ke(e);return!isNaN(Number(t))}function qw(e){const t=Ke(e),n=He(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Yw={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Vw=(e,t,n)=>{let r;const o=Yw[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function en(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Uw={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Gw={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Xw={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Kw={date:en({formats:Uw,defaultWidth:"full"}),time:en({formats:Gw,defaultWidth:"full"}),dateTime:en({formats:Xw,defaultWidth:"full"})},Jw={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Qw=(e,t,n,r)=>Jw[e];function ot(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,c=n!=null&&n.width?String(n.width):i;o=e.formattingValues[c]||e.formattingValues[i]}else{const i=e.defaultWidth,c=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[c]||e.values[i]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const Zw={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},e0={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},t0={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},n0={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},r0={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},o0={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},a0=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},s0={ordinalNumber:a0,era:ot({values:Zw,defaultWidth:"wide"}),quarter:ot({values:e0,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ot({values:t0,defaultWidth:"wide"}),day:ot({values:n0,defaultWidth:"wide"}),dayPeriod:ot({values:r0,defaultWidth:"wide",formattingValues:o0,defaultFormattingWidth:"wide"})};function at(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const i=a[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(c)?c0(c,p=>p.test(i)):i0(c,p=>p.test(i));let d;d=e.valueCallback?e.valueCallback(l):l,d=n.valueCallback?n.valueCallback(d):d;const u=t.slice(i.length);return{value:d,rest:u}}}function i0(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function c0(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function gi(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=n.valueCallback?n.valueCallback(i):i;const c=t.slice(o.length);return{value:i,rest:c}}}const l0=/^(\d+)(th|st|nd|rd)?/i,d0=/\d+/i,u0={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},f0={any:[/^b/i,/^(a|c)/i]},m0={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},p0={any:[/1/i,/2/i,/3/i,/4/i]},h0={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},_0={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},g0={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},j0={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},y0={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},x0={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},v0={ordinalNumber:gi({matchPattern:l0,parsePattern:d0,valueCallback:e=>parseInt(e,10)}),era:at({matchPatterns:u0,defaultMatchWidth:"wide",parsePatterns:f0,defaultParseWidth:"any"}),quarter:at({matchPatterns:m0,defaultMatchWidth:"wide",parsePatterns:p0,defaultParseWidth:"any",valueCallback:e=>e+1}),month:at({matchPatterns:h0,defaultMatchWidth:"wide",parsePatterns:_0,defaultParseWidth:"any"}),day:at({matchPatterns:g0,defaultMatchWidth:"wide",parsePatterns:j0,defaultParseWidth:"any"}),dayPeriod:at({matchPatterns:y0,defaultMatchWidth:"any",parsePatterns:x0,defaultParseWidth:"any"})},_a={code:"en-US",formatDistance:Vw,formatLong:Kw,formatRelative:Qw,localize:s0,match:v0,options:{weekStartsOn:0,firstWeekContainsDate:1}};function b0(e){const t=Ke(e);return Lw(t,qw(t))+1}function Qm(e){const t=Ke(e),n=+ar(t)-+Bw(t);return Math.round(n/Km)+1}function ji(e,t){var u,p,f,m;const n=Ke(e),r=n.getFullYear(),o=ur(),a=(t==null?void 0:t.firstWeekContainsDate)??((p=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:p.firstWeekContainsDate)??o.firstWeekContainsDate??((m=(f=o.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??1,i=He(e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const c=gn(i,t),l=He(e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const d=gn(l,t);return n.getTime()>=c.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function w0(e,t){var c,l,d,u;const n=ur(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(d=n.locale)==null?void 0:d.options)==null?void 0:u.firstWeekContainsDate)??1,o=ji(e,t),a=He(e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),gn(a,t)}function Zm(e,t){const n=Ke(e),r=+gn(n,t)-+w0(n,t);return Math.round(r/Km)+1}function Pe(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const un={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Pe(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Pe(n+1,2)},d(e,t){return Pe(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Pe(e.getHours()%12||12,t.length)},H(e,t){return Pe(e.getHours(),t.length)},m(e,t){return Pe(e.getMinutes(),t.length)},s(e,t){return Pe(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Pe(o,t.length)}},qn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Fc={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return un.y(e,t)},Y:function(e,t,n,r){const o=ji(e,r),a=o>0?o:1-o;if(t==="YY"){const i=a%100;return Pe(i,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):Pe(a,t.length)},R:function(e,t){const n=Jm(e);return Pe(n,t.length)},u:function(e,t){const n=e.getFullYear();return Pe(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Pe(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Pe(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return un.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Pe(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Zm(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Pe(o,t.length)},I:function(e,t,n){const r=Qm(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Pe(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):un.d(e,t)},D:function(e,t,n){const r=b0(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Pe(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Pe(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Pe(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Pe(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=qn.noon:r===0?o=qn.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=qn.evening:r>=12?o=qn.afternoon:r>=4?o=qn.morning:o=qn.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return un.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):un.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Pe(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Pe(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):un.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):un.s(e,t)},S:function(e,t){return un.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Lc(r);case"XXXX":case"XX":return kn(r);case"XXXXX":case"XXX":default:return kn(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Lc(r);case"xxxx":case"xx":return kn(r);case"xxxxx":case"xxx":default:return kn(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+$c(r,":");case"OOOO":default:return"GMT"+kn(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+$c(r,":");case"zzzz":default:return"GMT"+kn(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Pe(r,t.length)},T:function(e,t,n){const r=e.getTime();return Pe(r,t.length)}};function $c(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+Pe(a,2)}function Lc(e,t){return e%60===0?(e>0?"-":"+")+Pe(Math.abs(e)/60,2):kn(e,t)}function kn(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Pe(Math.trunc(r/60),2),a=Pe(r%60,2);return n+o+t+a}const Bc=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},ep=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},N0=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Bc(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Bc(r,t)).replace("{{time}}",ep(o,t))},ys={p:ep,P:N0},S0=/^D+$/,C0=/^Y+$/,k0=["D","DD","YY","YYYY"];function tp(e){return S0.test(e)}function np(e){return C0.test(e)}function xs(e,t,n){const r=P0(e,t,n);if(console.warn(r),k0.includes(e))throw new RangeError(r)}function P0(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const E0=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,M0=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,D0=/^'([^]*?)'?$/,T0=/''/g,R0=/[a-zA-Z]/;function Do(e,t,n){var u,p,f,m;const r=ur(),o=r.locale??_a,a=r.firstWeekContainsDate??((p=(u=r.locale)==null?void 0:u.options)==null?void 0:p.firstWeekContainsDate)??1,i=r.weekStartsOn??((m=(f=r.locale)==null?void 0:f.options)==null?void 0:m.weekStartsOn)??0,c=Ke(e);if(!_i(c))throw new RangeError("Invalid time value");let l=t.match(M0).map(_=>{const h=_[0];if(h==="p"||h==="P"){const j=ys[h];return j(_,o.formatLong)}return _}).join("").match(E0).map(_=>{if(_==="''")return{isToken:!1,value:"'"};const h=_[0];if(h==="'")return{isToken:!1,value:A0(_)};if(Fc[h])return{isToken:!0,value:_};if(h.match(R0))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");return{isToken:!1,value:_}});o.localize.preprocessor&&(l=o.localize.preprocessor(c,l));const d={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return l.map(_=>{if(!_.isToken)return _.value;const h=_.value;(np(h)||tp(h))&&xs(h,t,String(e));const j=Fc[h[0]];return j(c,h,o.localize,d)}).join("")}function A0(e){const t=e.match(D0);return t?t[1].replace(T0,"'"):e}function O0(){return Object.assign({},ur())}function z0(e){let n=Ke(e).getDay();return n===0&&(n=7),n}function I0(e,t){const n=t instanceof Date?He(t,0):new t(0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}const W0=10;class rp{constructor(){G(this,"subPriority",0)}validate(t,n){return!0}}class F0 extends rp{constructor(t,n,r,o,a){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,a&&(this.subPriority=a)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class $0 extends rp{constructor(){super(...arguments);G(this,"priority",W0);G(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:He(n,I0(n,Date))}}class Se{run(t,n,r,o){const a=this.parse(t,n,r,o);return a?{setter:new F0(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(t,n,r){return!0}}class L0 extends Se{constructor(){super(...arguments);G(this,"priority",140);G(this,"incompatibleTokens",["R","u","t","T"])}parse(n,r,o){switch(r){case"G":case"GG":case"GGG":return o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"});case"GGGGG":return o.era(n,{width:"narrow"});case"GGGG":default:return o.era(n,{width:"wide"})||o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"})}}set(n,r,o){return r.era=o,n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}const Ye={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},It={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Ve(e,t){return e&&{value:t(e.value),rest:e.rest}}function Le(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Wt(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*Ww+a*Iw+i*Fw),rest:t.slice(n[0].length)}}function op(e){return Le(Ye.anyDigitsSigned,e)}function qe(e,t){switch(e){case 1:return Le(Ye.singleDigit,t);case 2:return Le(Ye.twoDigits,t);case 3:return Le(Ye.threeDigits,t);case 4:return Le(Ye.fourDigits,t);default:return Le(new RegExp("^\\d{1,"+e+"}"),t)}}function To(e,t){switch(e){case 1:return Le(Ye.singleDigitSigned,t);case 2:return Le(Ye.twoDigitsSigned,t);case 3:return Le(Ye.threeDigitsSigned,t);case 4:return Le(Ye.fourDigitsSigned,t);default:return Le(new RegExp("^-?\\d{1,"+e+"}"),t)}}function yi(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function ap(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const a=r+50,i=Math.trunc(a/100)*100,c=e>=a%100;o=e+i-(c?100:0)}return n?o:1-o}function sp(e){return e%400===0||e%4===0&&e%100!==0}class B0 extends Se{constructor(){super(...arguments);G(this,"priority",130);G(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const a=i=>({year:i,isTwoDigitYear:r==="yy"});switch(r){case"y":return Ve(qe(4,n),a);case"yo":return Ve(o.ordinalNumber(n,{unit:"year"}),a);default:return Ve(qe(r.length,n),a)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const a=n.getFullYear();if(o.isTwoDigitYear){const c=ap(o.year,a);return n.setFullYear(c,0,1),n.setHours(0,0,0,0),n}const i=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(i,0,1),n.setHours(0,0,0,0),n}}class H0 extends Se{constructor(){super(...arguments);G(this,"priority",130);G(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const a=i=>({year:i,isTwoDigitYear:r==="YY"});switch(r){case"Y":return Ve(qe(4,n),a);case"Yo":return Ve(o.ordinalNumber(n,{unit:"year"}),a);default:return Ve(qe(r.length,n),a)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,a){const i=ji(n,a);if(o.isTwoDigitYear){const l=ap(o.year,i);return n.setFullYear(l,0,a.firstWeekContainsDate),n.setHours(0,0,0,0),gn(n,a)}const c=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(c,0,a.firstWeekContainsDate),n.setHours(0,0,0,0),gn(n,a)}}class q0 extends Se{constructor(){super(...arguments);G(this,"priority",130);G(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return To(r==="R"?4:r.length,n)}set(n,r,o){const a=He(n,0);return a.setFullYear(o,0,4),a.setHours(0,0,0,0),ar(a)}}class Y0 extends Se{constructor(){super(...arguments);G(this,"priority",130);G(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return To(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class V0 extends Se{constructor(){super(...arguments);G(this,"priority",120);G(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"Q":case"QQ":return qe(r.length,n);case"Qo":return o.ordinalNumber(n,{unit:"quarter"});case"QQQ":return o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(n,{width:"wide",context:"formatting"})||o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class U0 extends Se{constructor(){super(...arguments);G(this,"priority",120);G(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"q":case"qq":return qe(r.length,n);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(n,{width:"wide",context:"standalone"})||o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class G0 extends Se{constructor(){super(...arguments);G(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);G(this,"priority",110)}parse(n,r,o){const a=i=>i-1;switch(r){case"M":return Ve(Le(Ye.month,n),a);case"MM":return Ve(qe(2,n),a);case"Mo":return Ve(o.ordinalNumber(n,{unit:"month"}),a);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class X0 extends Se{constructor(){super(...arguments);G(this,"priority",110);G(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const a=i=>i-1;switch(r){case"L":return Ve(Le(Ye.month,n),a);case"LL":return Ve(qe(2,n),a);case"Lo":return Ve(o.ordinalNumber(n,{unit:"month"}),a);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function K0(e,t,n){const r=Ke(e),o=Zm(r,n)-t;return r.setDate(r.getDate()-o*7),r}class J0 extends Se{constructor(){super(...arguments);G(this,"priority",100);G(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return Le(Ye.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return qe(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,a){return gn(K0(n,o,a),a)}}function Q0(e,t){const n=Ke(e),r=Qm(n)-t;return n.setDate(n.getDate()-r*7),n}class Z0 extends Se{constructor(){super(...arguments);G(this,"priority",100);G(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(n,r,o){switch(r){case"I":return Le(Ye.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return qe(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return ar(Q0(n,o))}}const e1=[31,28,31,30,31,30,31,31,30,31,30,31],t1=[31,29,31,30,31,30,31,31,30,31,30,31];class n1 extends Se{constructor(){super(...arguments);G(this,"priority",90);G(this,"subPriority",1);G(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return Le(Ye.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return qe(r.length,n)}}validate(n,r){const o=n.getFullYear(),a=sp(o),i=n.getMonth();return a?r>=1&&r<=t1[i]:r>=1&&r<=e1[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class r1 extends Se{constructor(){super(...arguments);G(this,"priority",90);G(this,"subpriority",1);G(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(n,r,o){switch(r){case"D":case"DD":return Le(Ye.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return qe(r.length,n)}}validate(n,r){const o=n.getFullYear();return sp(o)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,o){return n.setMonth(0,o),n.setHours(0,0,0,0),n}}function xi(e,t,n){var p,f,m,_;const r=ur(),o=(n==null?void 0:n.weekStartsOn)??((f=(p=n==null?void 0:n.locale)==null?void 0:p.options)==null?void 0:f.weekStartsOn)??r.weekStartsOn??((_=(m=r.locale)==null?void 0:m.options)==null?void 0:_.weekStartsOn)??0,a=Ke(e),i=a.getDay(),l=(t%7+7)%7,d=7-o,u=t<0||t>6?t-(i+d)%7:(l+d)%7-(i+d)%7;return Xm(a,u)}class o1 extends Se{constructor(){super(...arguments);G(this,"priority",90);G(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,a){return n=xi(n,o,a),n.setHours(0,0,0,0),n}}class a1 extends Se{constructor(){super(...arguments);G(this,"priority",90);G(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,a){const i=c=>{const l=Math.floor((c-1)/7)*7;return(c+a.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return Ve(qe(r.length,n),i);case"eo":return Ve(o.ordinalNumber(n,{unit:"day"}),i);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,a){return n=xi(n,o,a),n.setHours(0,0,0,0),n}}class s1 extends Se{constructor(){super(...arguments);G(this,"priority",90);G(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,a){const i=c=>{const l=Math.floor((c-1)/7)*7;return(c+a.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return Ve(qe(r.length,n),i);case"co":return Ve(o.ordinalNumber(n,{unit:"day"}),i);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,a){return n=xi(n,o,a),n.setHours(0,0,0,0),n}}function i1(e,t){const n=Ke(e),r=z0(n),o=t-r;return Xm(n,o)}class c1 extends Se{constructor(){super(...arguments);G(this,"priority",90);G(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const a=i=>i===0?7:i;switch(r){case"i":case"ii":return qe(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return Ve(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),a);case"iiiii":return Ve(o.day(n,{width:"narrow",context:"formatting"}),a);case"iiiiii":return Ve(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),a);case"iiii":default:return Ve(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),a)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=i1(n,o),n.setHours(0,0,0,0),n}}class l1 extends Se{constructor(){super(...arguments);G(this,"priority",80);G(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(n,r,o){switch(r){case"a":case"aa":case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(yi(o),0,0,0),n}}class d1 extends Se{constructor(){super(...arguments);G(this,"priority",80);G(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(n,r,o){switch(r){case"b":case"bb":case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(yi(o),0,0,0),n}}class u1 extends Se{constructor(){super(...arguments);G(this,"priority",80);G(this,"incompatibleTokens",["a","b","t","T"])}parse(n,r,o){switch(r){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(yi(o),0,0,0),n}}class f1 extends Se{constructor(){super(...arguments);G(this,"priority",70);G(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return Le(Ye.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return qe(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const a=n.getHours()>=12;return a&&o<12?n.setHours(o+12,0,0,0):!a&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class m1 extends Se{constructor(){super(...arguments);G(this,"priority",70);G(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return Le(Ye.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return qe(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class p1 extends Se{constructor(){super(...arguments);G(this,"priority",70);G(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return Le(Ye.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return qe(r.length,n)}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.getHours()>=12&&o<12?n.setHours(o+12,0,0,0):n.setHours(o,0,0,0),n}}class h1 extends Se{constructor(){super(...arguments);G(this,"priority",70);G(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return Le(Ye.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return qe(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const a=o<=24?o%24:o;return n.setHours(a,0,0,0),n}}class _1 extends Se{constructor(){super(...arguments);G(this,"priority",60);G(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return Le(Ye.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return qe(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class g1 extends Se{constructor(){super(...arguments);G(this,"priority",50);G(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return Le(Ye.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return qe(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class j1 extends Se{constructor(){super(...arguments);G(this,"priority",30);G(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=a=>Math.trunc(a*Math.pow(10,-r.length+3));return Ve(qe(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class y1 extends Se{constructor(){super(...arguments);G(this,"priority",10);G(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return Wt(It.basicOptionalMinutes,n);case"XX":return Wt(It.basic,n);case"XXXX":return Wt(It.basicOptionalSeconds,n);case"XXXXX":return Wt(It.extendedOptionalSeconds,n);case"XXX":default:return Wt(It.extended,n)}}set(n,r,o){return r.timestampIsSet?n:He(n,n.getTime()-Mo(n)-o)}}class x1 extends Se{constructor(){super(...arguments);G(this,"priority",10);G(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return Wt(It.basicOptionalMinutes,n);case"xx":return Wt(It.basic,n);case"xxxx":return Wt(It.basicOptionalSeconds,n);case"xxxxx":return Wt(It.extendedOptionalSeconds,n);case"xxx":default:return Wt(It.extended,n)}}set(n,r,o){return r.timestampIsSet?n:He(n,n.getTime()-Mo(n)-o)}}class v1 extends Se{constructor(){super(...arguments);G(this,"priority",40);G(this,"incompatibleTokens","*")}parse(n){return op(n)}set(n,r,o){return[He(n,o*1e3),{timestampIsSet:!0}]}}class b1 extends Se{constructor(){super(...arguments);G(this,"priority",20);G(this,"incompatibleTokens","*")}parse(n){return op(n)}set(n,r,o){return[He(n,o),{timestampIsSet:!0}]}}const w1={G:new L0,y:new B0,Y:new H0,R:new q0,u:new Y0,Q:new V0,q:new U0,M:new G0,L:new X0,w:new J0,I:new Z0,d:new n1,D:new r1,E:new o1,e:new a1,c:new s1,i:new c1,a:new l1,b:new d1,B:new u1,h:new f1,H:new m1,K:new p1,k:new h1,m:new _1,s:new g1,S:new j1,X:new y1,x:new x1,t:new v1,T:new b1},N1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,S1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,C1=/^'([^]*?)'?$/,k1=/''/g,P1=/\S/,E1=/[a-zA-Z]/;function ip(e,t,n,r){var h,j,v,b;const o=O0(),a=o.locale??_a,i=o.firstWeekContainsDate??((j=(h=o.locale)==null?void 0:h.options)==null?void 0:j.firstWeekContainsDate)??1,c=o.weekStartsOn??((b=(v=o.locale)==null?void 0:v.options)==null?void 0:b.weekStartsOn)??0;if(t==="")return e===""?Ke(n):He(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:c,locale:a},d=[new $0],u=t.match(S1).map(w=>{const N=w[0];if(N in ys){const S=ys[N];return S(w,a.formatLong)}return w}).join("").match(N1),p=[];for(let w of u){np(w)&&xs(w,t,e),tp(w)&&xs(w,t,e);const N=w[0],S=w1[N];if(S){const{incompatibleTokens:x}=S;if(Array.isArray(x)){const E=p.find(M=>x.includes(M.token)||M.token===N);if(E)throw new RangeError(`The format string mustn't contain \`${E.fullToken}\` and \`${w}\` at the same time`)}else if(S.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${w}\` and any other token at the same time`);p.push({token:N,fullToken:w});const C=S.run(e,w,a.match,l);if(!C)return He(n,NaN);d.push(C.setter),e=C.rest}else{if(N.match(E1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+N+"`");if(w==="''"?w="'":N==="'"&&(w=M1(w)),e.indexOf(w)===0)e=e.slice(w.length);else return He(n,NaN)}}if(e.length>0&&P1.test(e))return He(n,NaN);const f=d.map(w=>w.priority).sort((w,N)=>N-w).filter((w,N,S)=>S.indexOf(w)===N).map(w=>d.filter(N=>N.priority===w).sort((N,S)=>S.subPriority-N.subPriority)).map(w=>w[0]);let m=Ke(n);if(isNaN(m.getTime()))return He(n,NaN);const _={};for(const w of f){if(!w.validate(m,l))return He(n,NaN);const N=w.set(m,_,l);Array.isArray(N)?(m=N[0],Object.assign(_,N[1])):m=N}return He(n,m)}function M1(e){return e.match(C1)[1].replace(k1,"'")}const D1={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dรญa",other:"{{count}} dรญas"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 aรฑo",other:"alrededor de {{count}} aรฑos"},xYears:{one:"1 aรฑo",other:"{{count}} aรฑos"},overXYears:{one:"mรกs de 1 aรฑo",other:"mรกs de {{count}} aรฑos"},almostXYears:{one:"casi 1 aรฑo",other:"casi {{count}} aรฑos"}},T1=(e,t,n)=>{let r;const o=D1[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"en "+r:"hace "+r:r},R1={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},A1={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},O1={full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},z1={date:en({formats:R1,defaultWidth:"full"}),time:en({formats:A1,defaultWidth:"full"}),dateTime:en({formats:O1,defaultWidth:"full"})},I1={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'maรฑana a la' p",nextWeek:"eeee 'a la' p",other:"P"},W1={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'maรฑana a las' p",nextWeek:"eeee 'a las' p",other:"P"},F1=(e,t,n,r)=>t.getHours()!==1?W1[e]:I1[e],$1={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","despuรฉs de cristo"]},L1={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1ยบ trimestre","2ยบ trimestre","3ยบ trimestre","4ยบ trimestre"]},B1={narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},H1={narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sรก"],abbreviated:["dom","lun","mar","miรฉ","jue","vie","sรกb"],wide:["domingo","lunes","martes","miรฉrcoles","jueves","viernes","sรกbado"]},q1={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"maรฑana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"maรฑana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"maรฑana",afternoon:"tarde",evening:"tarde",night:"noche"}},Y1={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la maรฑana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la maรฑana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la maรฑana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},V1=(e,t)=>Number(e)+"ยบ",U1={ordinalNumber:V1,era:ot({values:$1,defaultWidth:"wide"}),quarter:ot({values:L1,defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:ot({values:B1,defaultWidth:"wide"}),day:ot({values:H1,defaultWidth:"wide"}),dayPeriod:ot({values:q1,defaultWidth:"wide",formattingValues:Y1,defaultFormattingWidth:"wide"})},G1=/^(\d+)(ยบ)?/i,X1=/\d+/i,K1={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uรบ]n|despu[eรฉ]s de cristo|era com[uรบ]n)/i},J1={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uรบ]n)/i,/^(despu[eรฉ]s de cristo|era com[uรบ]n)/i]},Q1={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](ยบ)? trimestre/i},Z1={any:[/1/i,/2/i,/3/i,/4/i]},eN={narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},tN={narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},nN={narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[รกa])/i,abbreviated:/^(dom|lun|mar|mi[รฉe]|jue|vie|s[รกa]b)/i,wide:/^(domingo|lunes|martes|mi[รฉe]rcoles|jueves|viernes|s[รกa]bado)/i},rN={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},oN={narrow:/^(a|p|mn|md|(de la|a las) (maรฑana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (maรฑana|tarde|noche))/i},aN={any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/maรฑana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},sN={ordinalNumber:gi({matchPattern:G1,parsePattern:X1,valueCallback:function(e){return parseInt(e,10)}}),era:at({matchPatterns:K1,defaultMatchWidth:"wide",parsePatterns:J1,defaultParseWidth:"any"}),quarter:at({matchPatterns:Q1,defaultMatchWidth:"wide",parsePatterns:Z1,defaultParseWidth:"any",valueCallback:e=>e+1}),month:at({matchPatterns:eN,defaultMatchWidth:"wide",parsePatterns:tN,defaultParseWidth:"any"}),day:at({matchPatterns:nN,defaultMatchWidth:"wide",parsePatterns:rN,defaultParseWidth:"any"}),dayPeriod:at({matchPatterns:oN,defaultMatchWidth:"any",parsePatterns:aN,defaultParseWidth:"any"})},cp={code:"es",formatDistance:T1,formatLong:z1,formatRelative:F1,localize:U1,match:sN,options:{weekStartsOn:1,firstWeekContainsDate:1}},iN={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"aproximadamente 1 hora",other:"aproximadamente {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"aproximadamente 1 semana",other:"aproximadamente {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"aproximadamente 1 mรชs",other:"aproximadamente {{count}} meses"},xMonths:{one:"1 mรชs",other:"{{count}} meses"},aboutXYears:{one:"aproximadamente 1 ano",other:"aproximadamente {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},cN=(e,t,n)=>{let r;const o=iN[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",String(t)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"daqui a "+r:"hรก "+r:r},lN={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d 'de' MMM 'de' y",short:"dd/MM/y"},dN={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},uN={full:"{{date}} 'ร s' {{time}}",long:"{{date}} 'ร s' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},fN={date:en({formats:lN,defaultWidth:"full"}),time:en({formats:dN,defaultWidth:"full"}),dateTime:en({formats:uN,defaultWidth:"full"})},mN={lastWeek:e=>{const t=e.getDay();return"'"+(t===0||t===6?"รบltimo":"รบltima")+"' eeee 'ร s' p"},yesterday:"'ontem ร s' p",today:"'hoje ร s' p",tomorrow:"'amanhรฃ ร s' p",nextWeek:"eeee 'ร s' p",other:"P"},pN=(e,t,n,r)=>{const o=mN[e];return typeof o=="function"?o(t):o},hN={narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["antes de Cristo","depois de Cristo"]},_N={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1ยบ trimestre","2ยบ trimestre","3ยบ trimestre","4ยบ trimestre"]},gN={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","marรงo","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},jN={narrow:["d","s","t","q","q","s","s"],short:["dom","seg","ter","qua","qui","sex","sรกb"],abbreviated:["dom","seg","ter","qua","qui","sex","sรกb"],wide:["domingo","segunda-feira","terรงa-feira","quarta-feira","quinta-feira","sexta-feira","sรกbado"]},yN={narrow:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhรฃ",afternoon:"tarde",evening:"noite",night:"madrugada"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhรฃ",afternoon:"tarde",evening:"noite",night:"madrugada"},wide:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhรฃ",afternoon:"tarde",evening:"noite",night:"madrugada"}},xN={narrow:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhรฃ",afternoon:"da tarde",evening:"da noite",night:"da madrugada"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhรฃ",afternoon:"da tarde",evening:"da noite",night:"da madrugada"},wide:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhรฃ",afternoon:"da tarde",evening:"da noite",night:"da madrugada"}},vN=(e,t)=>Number(e)+"ยบ",bN={ordinalNumber:vN,era:ot({values:hN,defaultWidth:"wide"}),quarter:ot({values:_N,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ot({values:gN,defaultWidth:"wide"}),day:ot({values:jN,defaultWidth:"wide"}),dayPeriod:ot({values:yN,defaultWidth:"wide",formattingValues:xN,defaultFormattingWidth:"wide"})},wN=/^(\d+)(ยบ|ยช)?/i,NN=/\d+/i,SN={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes da era comum|depois de cristo|era comum)/i},CN={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes da era comum)/i,/^(depois de cristo|era comum)/i]},kN={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](ยบ|ยช)? trimestre/i},PN={any:[/1/i,/2/i,/3/i,/4/i]},EN={narrow:/^[jfmasond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|marรงo|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},MN={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ab/i,/^mai/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},DN={narrow:/^[dstq]/i,short:/^(dom|seg|ter|qua|qui|sex|s[รกa]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[รกa]b)/i,wide:/^(domingo|segunda-?\s?feira|terรงa-?\s?feira|quarta-?\s?feira|quinta-?\s?feira|sexta-?\s?feira|s[รกa]bado)/i},TN={narrow:[/^d/i,/^s/i,/^t/i,/^q/i,/^q/i,/^s/i,/^s/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[รกa]/i]},RN={narrow:/^(a|p|meia-?\s?noite|meio-?\s?dia|(da) (manh[รฃa]|tarde|noite|madrugada))/i,any:/^([ap]\.?\s?m\.?|meia-?\s?noite|meio-?\s?dia|(da) (manh[รฃa]|tarde|noite|madrugada))/i},AN={any:{am:/^a/i,pm:/^p/i,midnight:/^meia/i,noon:/^meio/i,morning:/manh[รฃa]/i,afternoon:/tarde/i,evening:/noite/i,night:/madrugada/i}},ON={ordinalNumber:gi({matchPattern:wN,parsePattern:NN,valueCallback:e=>parseInt(e,10)}),era:at({matchPatterns:SN,defaultMatchWidth:"wide",parsePatterns:CN,defaultParseWidth:"any"}),quarter:at({matchPatterns:kN,defaultMatchWidth:"wide",parsePatterns:PN,defaultParseWidth:"any",valueCallback:e=>e+1}),month:at({matchPatterns:EN,defaultMatchWidth:"wide",parsePatterns:MN,defaultParseWidth:"any"}),day:at({matchPatterns:DN,defaultMatchWidth:"wide",parsePatterns:TN,defaultParseWidth:"any"}),dayPeriod:at({matchPatterns:RN,defaultMatchWidth:"any",parsePatterns:AN,defaultParseWidth:"any"})},lp={code:"pt",formatDistance:cN,formatLong:fN,formatRelative:pN,localize:bN,match:ON,options:{weekStartsOn:1,firstWeekContainsDate:4}};function zN(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const Fa={},wr={};function Dn(e,t){try{const r=(Fa[e]||(Fa[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return r in wr?wr[r]:Hc(r,r.split(":"))}catch{if(e in wr)return wr[e];const n=e==null?void 0:e.match(IN);return n?Hc(e,n.slice(1)):NaN}}const IN=/([+-]\d\d):?(\d\d)?/;function Hc(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return wr[e]=n*60+r>0?n*60+r+o:n*60-r-o}class $t extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Dn(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),dp(this),vs(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new $t(...n,t):new $t(Date.now(),t)}withTimeZone(t){return new $t(+this,t)}getTimezoneOffset(){const t=-Dn(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),vs(this),+this}[Symbol.for("constructDateFrom")](t){return new $t(+new Date(t),this.timeZone)}}const qc=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!qc.test(e))return;const t=e.replace(qc,"$1UTC");$t.prototype[t]&&(e.startsWith("get")?$t.prototype[e]=function(){return this.internal[t]()}:($t.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),WN(this),+this},$t.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),vs(this),+this}))});function vs(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-Dn(e.timeZone,e)*60))}function WN(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),dp(e)}function dp(e){const t=Dn(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),a=-new Date(+r).getTimezoneOffset(),i=o-a,c=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();i&&c&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+i);const l=o-n;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const d=new Date(+e);d.setUTCSeconds(0);const u=o>0?d.getSeconds():(d.getSeconds()-60)%60,p=Math.round(-(Dn(e.timeZone,e)*60))%60;(p||u)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+p),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+p+u));const f=Dn(e.timeZone,e),m=f>0?Math.floor(f):Math.ceil(f),h=-new Date(+e).getTimezoneOffset()-m,j=m!==n,v=h-l;if(j&&v){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+v);const b=Dn(e.timeZone,e),w=b>0?Math.floor(b):Math.ceil(b),N=m-w;N&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+N),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+N))}}class et extends $t{static tz(t,...n){return n.length?new et(...n,t):new et(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${zN(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new et(+this,t)}[Symbol.for("constructDateFrom")](t){return new et(+new Date(t),this.timeZone)}}const up=6048e5,FN=864e5,Yc=Symbol.for("constructDateFrom");function Xe(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Yc in e?e[Yc](t):e instanceof Date?new e.constructor(t):new Date(t)}function Me(e,t){return Xe(t||e,e)}function fp(e,t,n){const r=Me(e,n==null?void 0:n.in);return isNaN(t)?Xe(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function mp(e,t,n){const r=Me(e,n==null?void 0:n.in);if(isNaN(t))return Xe(e,NaN);if(!t)return r;const o=r.getDate(),a=Xe(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const i=a.getDate();return o>=i?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let $N={};function Yr(){return $N}function sr(e,t){var c,l,d,u;const n=Yr(),r=(t==null?void 0:t.weekStartsOn)??((l=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(d=n.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,o=Me(e,t==null?void 0:t.in),a=o.getDay(),i=(a<r?7:0)+a-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function Dr(e,t){return sr(e,{...t,weekStartsOn:1})}function pp(e,t){const n=Me(e,t==null?void 0:t.in),r=n.getFullYear(),o=Xe(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=Dr(o),i=Xe(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const c=Dr(i);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function Vc(e){const t=Me(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function fr(e,...t){const n=Xe.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Tr(e,t){const n=Me(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function vi(e,t,n){const[r,o]=fr(n==null?void 0:n.in,e,t),a=Tr(r),i=Tr(o),c=+a-Vc(a),l=+i-Vc(i);return Math.round((c-l)/FN)}function LN(e,t){const n=pp(e,t),r=Xe(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Dr(r)}function BN(e,t,n){return fp(e,t*7,n)}function HN(e,t,n){return mp(e,t*12,n)}function qN(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Xe.bind(null,o));const a=Me(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),Xe(r,n||NaN)}function YN(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Xe.bind(null,o));const a=Me(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),Xe(r,n||NaN)}function VN(e,t,n){const[r,o]=fr(n==null?void 0:n.in,e,t);return+Tr(r)==+Tr(o)}function hp(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function UN(e){return!(!hp(e)&&typeof e!="number"||isNaN(+Me(e)))}function _p(e,t,n){const[r,o]=fr(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return a*12+i}function GN(e,t){const n=Me(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function gp(e,t){const[n,r]=fr(e,t.start,t.end);return{start:n,end:r}}function XN(e,t){const{start:n,end:r}=gp(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setDate(1);let c=1;const l=[];for(;+i<=a;)l.push(Xe(n,i)),i.setMonth(i.getMonth()+c);return o?l.reverse():l}function KN(e,t){const n=Me(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function JN(e,t){const n=Me(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function jp(e,t){const n=Me(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function QN(e,t){const{start:n,end:r}=gp(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setMonth(0,1);let c=1;const l=[];for(;+i<=a;)l.push(Xe(n,i)),i.setFullYear(i.getFullYear()+c);return o?l.reverse():l}function yp(e,t){var c,l,d,u;const n=Yr(),r=(t==null?void 0:t.weekStartsOn)??((l=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(d=n.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,o=Me(e,t==null?void 0:t.in),a=o.getDay(),i=(a<r?-7:0)+6-(a-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}function ZN(e,t){return yp(e,{...t,weekStartsOn:1})}const eS={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},tS=(e,t,n)=>{let r;const o=eS[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function $a(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const nS={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},rS={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},oS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},aS={date:$a({formats:nS,defaultWidth:"full"}),time:$a({formats:rS,defaultWidth:"full"}),dateTime:$a({formats:oS,defaultWidth:"full"})},sS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},iS=(e,t,n,r)=>sS[e];function _r(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,c=n!=null&&n.width?String(n.width):i;o=e.formattingValues[c]||e.formattingValues[i]}else{const i=e.defaultWidth,c=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[c]||e.values[i]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const cS={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lS={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},dS={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},uS={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},fS={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},mS={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},pS=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},hS={ordinalNumber:pS,era:_r({values:cS,defaultWidth:"wide"}),quarter:_r({values:lS,defaultWidth:"wide",argumentCallback:e=>e-1}),month:_r({values:dS,defaultWidth:"wide"}),day:_r({values:uS,defaultWidth:"wide"}),dayPeriod:_r({values:fS,defaultWidth:"wide",formattingValues:mS,defaultFormattingWidth:"wide"})};function gr(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const i=a[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(c)?gS(c,p=>p.test(i)):_S(c,p=>p.test(i));let d;d=e.valueCallback?e.valueCallback(l):l,d=n.valueCallback?n.valueCallback(d):d;const u=t.slice(i.length);return{value:d,rest:u}}}function _S(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function gS(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function jS(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=n.valueCallback?n.valueCallback(i):i;const c=t.slice(o.length);return{value:i,rest:c}}}const yS=/^(\d+)(th|st|nd|rd)?/i,xS=/\d+/i,vS={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},bS={any:[/^b/i,/^(a|c)/i]},wS={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},NS={any:[/1/i,/2/i,/3/i,/4/i]},SS={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},CS={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},kS={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},PS={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ES={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},MS={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},DS={ordinalNumber:jS({matchPattern:yS,parsePattern:xS,valueCallback:e=>parseInt(e,10)}),era:gr({matchPatterns:vS,defaultMatchWidth:"wide",parsePatterns:bS,defaultParseWidth:"any"}),quarter:gr({matchPatterns:wS,defaultMatchWidth:"wide",parsePatterns:NS,defaultParseWidth:"any",valueCallback:e=>e+1}),month:gr({matchPatterns:SS,defaultMatchWidth:"wide",parsePatterns:CS,defaultParseWidth:"any"}),day:gr({matchPatterns:kS,defaultMatchWidth:"wide",parsePatterns:PS,defaultParseWidth:"any"}),dayPeriod:gr({matchPatterns:ES,defaultMatchWidth:"any",parsePatterns:MS,defaultParseWidth:"any"})},Gn={code:"en-US",formatDistance:tS,formatLong:aS,formatRelative:iS,localize:hS,match:DS,options:{weekStartsOn:0,firstWeekContainsDate:1}};function TS(e,t){const n=Me(e,t==null?void 0:t.in);return vi(n,jp(n))+1}function bi(e,t){const n=Me(e,t==null?void 0:t.in),r=+Dr(n)-+LN(n);return Math.round(r/up)+1}function xp(e,t){var u,p,f,m;const n=Me(e,t==null?void 0:t.in),r=n.getFullYear(),o=Yr(),a=(t==null?void 0:t.firstWeekContainsDate)??((p=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:p.firstWeekContainsDate)??o.firstWeekContainsDate??((m=(f=o.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??1,i=Xe((t==null?void 0:t.in)||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const c=sr(i,t),l=Xe((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const d=sr(l,t);return+n>=+c?r+1:+n>=+d?r:r-1}function RS(e,t){var c,l,d,u;const n=Yr(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(d=n.locale)==null?void 0:d.options)==null?void 0:u.firstWeekContainsDate)??1,o=xp(e,t),a=Xe((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),sr(a,t)}function wi(e,t){const n=Me(e,t==null?void 0:t.in),r=+sr(n,t)-+RS(n,t);return Math.round(r/up)+1}function Ee(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const fn={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ee(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ee(n+1,2)},d(e,t){return Ee(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Ee(e.getHours()%12||12,t.length)},H(e,t){return Ee(e.getHours(),t.length)},m(e,t){return Ee(e.getMinutes(),t.length)},s(e,t){return Ee(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ee(o,t.length)}},Yn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Uc={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return fn.y(e,t)},Y:function(e,t,n,r){const o=xp(e,r),a=o>0?o:1-o;if(t==="YY"){const i=a%100;return Ee(i,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):Ee(a,t.length)},R:function(e,t){const n=pp(e);return Ee(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ee(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ee(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ee(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return fn.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ee(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=wi(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ee(o,t.length)},I:function(e,t,n){const r=bi(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ee(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):fn.d(e,t)},D:function(e,t,n){const r=TS(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ee(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Ee(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Ee(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Ee(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Yn.noon:r===0?o=Yn.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Yn.evening:r>=12?o=Yn.afternoon:r>=4?o=Yn.morning:o=Yn.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return fn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):fn.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ee(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ee(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):fn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):fn.s(e,t)},S:function(e,t){return fn.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Xc(r);case"XXXX":case"XX":return Pn(r);case"XXXXX":case"XXX":default:return Pn(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Xc(r);case"xxxx":case"xx":return Pn(r);case"xxxxx":case"xxx":default:return Pn(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Gc(r,":");case"OOOO":default:return"GMT"+Pn(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Gc(r,":");case"zzzz":default:return"GMT"+Pn(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ee(r,t.length)},T:function(e,t,n){return Ee(+e,t.length)}};function Gc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+Ee(a,2)}function Xc(e,t){return e%60===0?(e>0?"-":"+")+Ee(Math.abs(e)/60,2):Pn(e,t)}function Pn(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ee(Math.trunc(r/60),2),a=Ee(r%60,2);return n+o+t+a}const Kc=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},vp=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},AS=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Kc(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Kc(r,t)).replace("{{time}}",vp(o,t))},OS={p:vp,P:AS},zS=/^D+$/,IS=/^Y+$/,WS=["D","DD","YY","YYYY"];function FS(e){return zS.test(e)}function $S(e){return IS.test(e)}function LS(e,t,n){const r=BS(e,t,n);if(console.warn(r),WS.includes(e))throw new RangeError(r)}function BS(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const HS=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,qS=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,YS=/^'([^]*?)'?$/,VS=/''/g,US=/[a-zA-Z]/;function Nr(e,t,n){var u,p,f,m,_,h,j,v;const r=Yr(),o=(n==null?void 0:n.locale)??r.locale??Gn,a=(n==null?void 0:n.firstWeekContainsDate)??((p=(u=n==null?void 0:n.locale)==null?void 0:u.options)==null?void 0:p.firstWeekContainsDate)??r.firstWeekContainsDate??((m=(f=r.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??1,i=(n==null?void 0:n.weekStartsOn)??((h=(_=n==null?void 0:n.locale)==null?void 0:_.options)==null?void 0:h.weekStartsOn)??r.weekStartsOn??((v=(j=r.locale)==null?void 0:j.options)==null?void 0:v.weekStartsOn)??0,c=Me(e,n==null?void 0:n.in);if(!UN(c))throw new RangeError("Invalid time value");let l=t.match(qS).map(b=>{const w=b[0];if(w==="p"||w==="P"){const N=OS[w];return N(b,o.formatLong)}return b}).join("").match(HS).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const w=b[0];if(w==="'")return{isToken:!1,value:GS(b)};if(Uc[w])return{isToken:!0,value:b};if(w.match(US))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:b}});o.localize.preprocessor&&(l=o.localize.preprocessor(c,l));const d={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return l.map(b=>{if(!b.isToken)return b.value;const w=b.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&$S(w)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&FS(w))&&LS(w,t,String(e));const N=Uc[w[0]];return N(c,w,o.localize,d)}).join("")}function GS(e){const t=e.match(YS);return t?t[1].replace(VS,"'"):e}function XS(e,t){const n=Me(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=Xe(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function KS(e,t){return Me(e,t==null?void 0:t.in).getMonth()}function JS(e,t){return Me(e,t==null?void 0:t.in).getFullYear()}function QS(e,t){return+Me(e)>+Me(t)}function ZS(e,t){return+Me(e)<+Me(t)}function eC(e,t,n){const[r,o]=fr(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function tC(e,t,n){const[r,o]=fr(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function nC(e,t,n){const r=Me(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),i=Xe(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const c=XS(i);return r.setMonth(t,Math.min(a,c)),r}function rC(e,t,n){const r=Me(e,n==null?void 0:n.in);return isNaN(+r)?Xe(e,NaN):(r.setFullYear(t),r)}const Jc=5,oC=4;function aC(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,Jc*7-1);return t.getMonth(e)===t.getMonth(a)?Jc:oC}function bp(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-1*6):t.addDays(n,-1*(r-1))}function sC(e,t){const n=bp(e,t),r=aC(e,t);return t.addDays(n,r*7-1)}const wp={...Gn,labels:{labelDayButton:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(i,c)=>Nr(i,c,{locale:Gn,...n});let a=o(e,"PPPP");return t.today&&(a=`Today, ${a}`),t.selected&&(a=`${a}, selected`),a},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,a)=>Nr(o,a,{locale:Gn,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(i,c)=>Nr(i,c,{locale:Gn,...n});let a=o(e,"PPPP");return t!=null&&t.today&&(a=`Today, ${a}`),a},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,a)=>Nr(o,a,{locale:Gn,...t}),r(e,"cccc")}}};class ht{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?et.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,a)=>{var i;return(i=this.overrides)!=null&&i.newDate?this.overrides.newDate(r,o,a):this.options.timeZone?new et(r,o,a,this.options.timeZone):new Date(r,o,a)},this.addDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addDays?this.overrides.addDays(r,o):fp(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):mp(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):BN(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):HN(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):vi(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):_p(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):XN(r)},this.eachYearOfInterval=r=>{var c;const o=(c=this.overrides)!=null&&c.eachYearOfInterval?this.overrides.eachYearOfInterval(r):QN(r),a=new Set(o.map(l=>this.getYear(l)));if(a.size===o.length)return o;const i=[];return a.forEach(l=>{i.push(new Date(l,0,1))}),i},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):sC(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):ZN(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):GN(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):yp(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):JN(r)},this.format=(r,o,a)=>{var c;const i=(c=this.overrides)!=null&&c.format?this.overrides.format(r,o,this.options):Nr(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(i):i},this.getISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(r):bi(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):KS(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):JS(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):wi(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):QS(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):ZS(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):hp(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):VN(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):eC(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):tC(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):qN(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):YN(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):nC(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):rC(r,o)},this.startOfBroadcastWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):bp(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):Tr(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):Dr(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):KN(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):sr(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):jp(r)},this.options={locale:wp,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){var n;const t=(n=this.options.locale)==null?void 0:n.code;return t&&ht.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:o}=this.options,a=n==null?void 0:n.code;if(a&&ht.yearFirstLocales.has(a))try{return new Intl.DateTimeFormat(a,{month:"long",year:"numeric",timeZone:r,numberingSystem:o}).format(t)}catch{}const i=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,i)}}ht.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const Xt=new ht;class Np{constructor(t,n,r=Xt){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r,this.isoDate=r.format(t,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class iC{constructor(t,n){this.date=t,this.weeks=n}}class cC{constructor(t,n){this.days=n,this.weekNumber=t}}function lC(e){return y.createElement("button",{...e})}function dC(e){return y.createElement("span",{...e})}function uC(e){const{size:t=24,orientation:n="left",className:r}=e;return y.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&y.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&y.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&y.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&y.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function fC(e){const{day:t,modifiers:n,...r}=e;return y.createElement("td",{...r})}function mC(e){const{day:t,modifiers:n,...r}=e,o=y.useRef(null);return y.useEffect(()=>{var a;n.focused&&((a=o.current)==null||a.focus())},[n.focused]),y.createElement("button",{ref:o,...r})}var ee;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(ee||(ee={}));var Fe;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(Fe||(Fe={}));var kt;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(kt||(kt={}));var ut;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(ut||(ut={}));function pC(e){const{options:t,className:n,components:r,classNames:o,...a}=e,i=[o[ee.Dropdown],n].join(" "),c=t==null?void 0:t.find(({value:l})=>l===a.value);return y.createElement("span",{"data-disabled":a.disabled,className:o[ee.DropdownRoot]},y.createElement(r.Select,{className:i,...a},t==null?void 0:t.map(({value:l,label:d,disabled:u})=>y.createElement(r.Option,{key:l,value:l,disabled:u},d))),y.createElement("span",{className:o[ee.CaptionLabel],"aria-hidden":!0},c==null?void 0:c.label,y.createElement(r.Chevron,{orientation:"down",size:18,className:o[ee.Chevron]})))}function hC(e){return y.createElement("div",{...e})}function _C(e){return y.createElement("div",{...e})}function gC(e){const{calendarMonth:t,displayIndex:n,...r}=e;return y.createElement("div",{...r},e.children)}function jC(e){const{calendarMonth:t,displayIndex:n,...r}=e;return y.createElement("div",{...r})}function yC(e){return y.createElement("table",{...e})}function xC(e){return y.createElement("div",{...e})}const Sp=y.createContext(void 0);function Vr(){const e=y.useContext(Sp);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function vC(e){const{components:t}=Vr();return y.createElement(t.Dropdown,{...e})}function bC(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:i,classNames:c,labels:{labelPrevious:l,labelNext:d}}=Vr(),u=y.useCallback(f=>{o&&(n==null||n(f))},[o,n]),p=y.useCallback(f=>{r&&(t==null||t(f))},[r,t]);return y.createElement("nav",{...a},y.createElement(i.PreviousMonthButton,{type:"button",className:c[ee.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":l(r),onClick:p},y.createElement(i.Chevron,{disabled:r?void 0:!0,className:c[ee.Chevron],orientation:"left"})),y.createElement(i.NextMonthButton,{type:"button",className:c[ee.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":d(o),onClick:u},y.createElement(i.Chevron,{disabled:o?void 0:!0,orientation:"right",className:c[ee.Chevron]})))}function wC(e){const{components:t}=Vr();return y.createElement(t.Button,{...e})}function NC(e){return y.createElement("option",{...e})}function SC(e){const{components:t}=Vr();return y.createElement(t.Button,{...e})}function CC(e){const{rootRef:t,...n}=e;return y.createElement("div",{...n,ref:t})}function kC(e){return y.createElement("select",{...e})}function PC(e){const{week:t,...n}=e;return y.createElement("tr",{...n})}function EC(e){return y.createElement("th",{...e})}function MC(e){return y.createElement("thead",{"aria-hidden":!0},y.createElement("tr",{...e}))}function DC(e){const{week:t,...n}=e;return y.createElement("th",{...n})}function TC(e){return y.createElement("th",{...e})}function RC(e){return y.createElement("tbody",{...e})}function AC(e){const{components:t}=Vr();return y.createElement(t.Dropdown,{...e})}const OC=Object.freeze(Object.defineProperty({__proto__:null,Button:lC,CaptionLabel:dC,Chevron:uC,Day:fC,DayButton:mC,Dropdown:pC,DropdownNav:hC,Footer:_C,Month:gC,MonthCaption:jC,MonthGrid:yC,Months:xC,MonthsDropdown:vC,Nav:bC,NextMonthButton:wC,Option:NC,PreviousMonthButton:SC,Root:CC,Select:kC,Week:PC,WeekNumber:DC,WeekNumberHeader:TC,Weekday:EC,Weekdays:MC,Weeks:RC,YearsDropdown:AC},Symbol.toStringTag,{value:"Module"}));function Qt(e,t,n=!1,r=Xt){let{from:o,to:a}=e;const{differenceInCalendarDays:i,isSameDay:c}=r;return o&&a?(i(a,o)<0&&([o,a]=[a,o]),i(t,o)>=(n?1:0)&&i(a,t)>=(n?1:0)):!n&&a?c(a,t):!n&&o?c(o,t):!1}function Ni(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function ga(e){return!!(e&&typeof e=="object"&&"from"in e)}function Si(e){return!!(e&&typeof e=="object"&&"after"in e)}function Ci(e){return!!(e&&typeof e=="object"&&"before"in e)}function Cp(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function kp(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Zt(e,t,n=Xt){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:i}=n;return r.some(c=>{if(typeof c=="boolean")return c;if(n.isDate(c))return o(e,c);if(kp(c,n))return c.some(l=>o(e,l));if(ga(c))return Qt(c,e,!1,n);if(Cp(c))return Array.isArray(c.dayOfWeek)?c.dayOfWeek.includes(e.getDay()):c.dayOfWeek===e.getDay();if(Ni(c)){const l=a(c.before,e),d=a(c.after,e),u=l>0,p=d<0;return i(c.before,c.after)?p&&u:u||p}return Si(c)?a(e,c.after)>0:Ci(c)?a(c.before,e)>0:typeof c=="function"?c(e):!1})}function zC(e,t,n,r,o){const{disabled:a,hidden:i,modifiers:c,showOutsideDays:l,broadcastCalendar:d,today:u=o.today()}=t,{isSameDay:p,isSameMonth:f,startOfMonth:m,isBefore:_,endOfMonth:h,isAfter:j}=o,v=n&&m(n),b=r&&h(r),w={[Fe.focused]:[],[Fe.outside]:[],[Fe.disabled]:[],[Fe.hidden]:[],[Fe.today]:[]},N={};for(const S of e){const{date:x,displayMonth:C}=S,E=!!(C&&!f(x,C)),M=!!(v&&_(x,v)),P=!!(b&&j(x,b)),T=!!(a&&Zt(x,a,o)),k=!!(i&&Zt(x,i,o))||M||P||!d&&!l&&E||d&&l===!1&&E,z=p(x,u);E&&w.outside.push(S),T&&w.disabled.push(S),k&&w.hidden.push(S),z&&w.today.push(S),c&&Object.keys(c).forEach(D=>{const W=c==null?void 0:c[D];W&&Zt(x,W,o)&&(N[D]?N[D].push(S):N[D]=[S])})}return S=>{const x={[Fe.focused]:!1,[Fe.disabled]:!1,[Fe.hidden]:!1,[Fe.outside]:!1,[Fe.today]:!1},C={};for(const E in w){const M=w[E];x[E]=M.some(P=>P===S)}for(const E in N)C[E]=N[E].some(M=>M===S);return{...x,...C}}}function IC(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[Fe[a]]?o.push(t[Fe[a]]):t[kt[a]]&&o.push(t[kt[a]]),o),[t[ee.Day]])}function WC(e){return{...OC,...e}}function FC(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function $C(){const e={};for(const t in ee)e[ee[t]]=`rdp-${ee[t]}`;for(const t in Fe)e[Fe[t]]=`rdp-${Fe[t]}`;for(const t in kt)e[kt[t]]=`rdp-${kt[t]}`;for(const t in ut)e[ut[t]]=`rdp-${ut[t]}`;return e}function Pp(e,t,n){return(n??new ht(t)).formatMonthYear(e)}const LC=Pp;function BC(e,t,n){return(n??new ht(t)).format(e,"d")}function HC(e,t=Xt){return t.format(e,"LLLL")}function qC(e,t,n){return(n??new ht(t)).format(e,"cccccc")}function YC(e,t=Xt){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function VC(){return""}function Ep(e,t=Xt){return t.format(e,"yyyy")}const UC=Ep,GC=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Pp,formatDay:BC,formatMonthCaption:LC,formatMonthDropdown:HC,formatWeekNumber:YC,formatWeekNumberHeader:VC,formatWeekdayName:qC,formatYearCaption:UC,formatYearDropdown:Ep},Symbol.toStringTag,{value:"Module"}));function XC(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...GC,...e}}function ki(e,t,n,r){let o=(r??new ht(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const KC=ki;function Pi(e,t,n){return(n??new ht(t)).formatMonthYear(e)}const JC=Pi;function Mp(e,t,n,r){let o=(r??new ht(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function Dp(e){return"Choose the Month"}function Tp(){return""}const QC="Go to the Next Month";function Rp(e,t){return QC}function Ap(e){return"Go to the Previous Month"}function Op(e,t,n){return(n??new ht(t)).format(e,"cccc")}function zp(e,t){return`Week ${e}`}function Ip(e){return"Week Number"}function Wp(e){return"Choose the Year"}const ZC=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:JC,labelDay:KC,labelDayButton:ki,labelGrid:Pi,labelGridcell:Mp,labelMonthDropdown:Dp,labelNav:Tp,labelNext:Rp,labelPrevious:Ap,labelWeekNumber:zp,labelWeekNumberHeader:Ip,labelWeekday:Op,labelYearDropdown:Wp},Symbol.toStringTag,{value:"Module"})),St=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function ek(e,t){var r;const n=((r=t.locale)==null?void 0:r.labels)??{};return{...ZC,...e??{},labelDayButton:St(ki,e==null?void 0:e.labelDayButton,n.labelDayButton),labelMonthDropdown:St(Dp,e==null?void 0:e.labelMonthDropdown,n.labelMonthDropdown),labelNext:St(Rp,e==null?void 0:e.labelNext,n.labelNext),labelPrevious:St(Ap,e==null?void 0:e.labelPrevious,n.labelPrevious),labelWeekNumber:St(zp,e==null?void 0:e.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:St(Wp,e==null?void 0:e.labelYearDropdown,n.labelYearDropdown),labelGrid:St(Pi,e==null?void 0:e.labelGrid,n.labelGrid),labelGridcell:St(Mp,e==null?void 0:e.labelGridcell,n.labelGridcell),labelNav:St(Tp,e==null?void 0:e.labelNav,n.labelNav),labelWeekNumberHeader:St(Ip,e==null?void 0:e.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:St(Op,e==null?void 0:e.labelWeekday,n.labelWeekday)}}function tk(e,t,n,r,o){const{startOfMonth:a,startOfYear:i,endOfYear:c,eachMonthOfInterval:l,getMonth:d}=o;return l({start:i(e),end:c(e)}).map(f=>{const m=r.formatMonthDropdown(f,o),_=d(f),h=t&&f<a(t)||n&&f>a(n)||!1;return{value:_,label:m,disabled:h}})}function nk(e,t={},n={}){let r={...t==null?void 0:t[ee.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function rk(e,t,n,r){const o=r??e.today(),a=n?e.startOfBroadcastWeek(o,e):t?e.startOfISOWeek(o):e.startOfWeek(o),i=[];for(let c=0;c<7;c++){const l=e.addDays(a,c);i.push(l)}return i}function ok(e,t,n,r,o=!1){if(!e||!t)return;const{startOfYear:a,endOfYear:i,eachYearOfInterval:c,getYear:l}=r,d=a(e),u=i(t),p=c({start:d,end:u});return o&&p.reverse(),p.map(f=>{const m=n.formatYearDropdown(f,r);return{value:l(f),label:m,disabled:!1}})}function ak(e,t={}){var c;const{weekStartsOn:n,locale:r}=t,o=n??((c=r==null?void 0:r.options)==null?void 0:c.weekStartsOn)??0,a=l=>{const d=typeof l=="number"||typeof l=="string"?new Date(l):l;return new et(d.getFullYear(),d.getMonth(),d.getDate(),12,0,0,e)},i=l=>{const d=a(l);return new Date(d.getFullYear(),d.getMonth(),d.getDate(),0,0,0,0)};return{today:()=>a(et.tz(e)),newDate:(l,d,u)=>new et(l,d,u,12,0,0,e),startOfDay:l=>a(l),startOfWeek:(l,d)=>{const u=a(l),p=(d==null?void 0:d.weekStartsOn)??o,f=(u.getDay()-p+7)%7;return u.setDate(u.getDate()-f),u},startOfISOWeek:l=>{const d=a(l),u=(d.getDay()-1+7)%7;return d.setDate(d.getDate()-u),d},startOfMonth:l=>{const d=a(l);return d.setDate(1),d},startOfYear:l=>{const d=a(l);return d.setMonth(0,1),d},endOfWeek:(l,d)=>{const u=a(l),m=((((d==null?void 0:d.weekStartsOn)??o)+6)%7-u.getDay()+7)%7;return u.setDate(u.getDate()+m),u},endOfISOWeek:l=>{const d=a(l),u=(7-d.getDay())%7;return d.setDate(d.getDate()+u),d},endOfMonth:l=>{const d=a(l);return d.setMonth(d.getMonth()+1,0),d},endOfYear:l=>{const d=a(l);return d.setMonth(11,31),d},eachMonthOfInterval:l=>{const d=a(l.start),u=a(l.end),p=[],f=new et(d.getFullYear(),d.getMonth(),1,12,0,0,e),m=u.getFullYear()*12+u.getMonth();for(;f.getFullYear()*12+f.getMonth()<=m;)p.push(new et(f,e)),f.setMonth(f.getMonth()+1,1);return p},addDays:(l,d)=>{const u=a(l);return u.setDate(u.getDate()+d),u},addWeeks:(l,d)=>{const u=a(l);return u.setDate(u.getDate()+d*7),u},addMonths:(l,d)=>{const u=a(l);return u.setMonth(u.getMonth()+d),u},addYears:(l,d)=>{const u=a(l);return u.setFullYear(u.getFullYear()+d),u},eachYearOfInterval:l=>{const d=a(l.start),u=a(l.end),p=[],f=new et(d.getFullYear(),0,1,12,0,0,e);for(;f.getFullYear()<=u.getFullYear();)p.push(new et(f,e)),f.setFullYear(f.getFullYear()+1,0,1);return p},getWeek:(l,d)=>{var p;const u=i(l);return wi(u,{weekStartsOn:(d==null?void 0:d.weekStartsOn)??o,firstWeekContainsDate:(d==null?void 0:d.firstWeekContainsDate)??((p=r==null?void 0:r.options)==null?void 0:p.firstWeekContainsDate)??1})},getISOWeek:l=>{const d=i(l);return bi(d)},differenceInCalendarDays:(l,d)=>{const u=i(l),p=i(d);return vi(u,p)},differenceInCalendarMonths:(l,d)=>{const u=i(l),p=i(d);return _p(u,p)}}}const Ur=e=>e instanceof HTMLElement?e:null,La=e=>[...e.querySelectorAll("[data-animated-month]")??[]],sk=e=>Ur(e.querySelector("[data-animated-month]")),Ba=e=>Ur(e.querySelector("[data-animated-caption]")),Ha=e=>Ur(e.querySelector("[data-animated-weeks]")),ik=e=>Ur(e.querySelector("[data-animated-nav]")),ck=e=>Ur(e.querySelector("[data-animated-weekdays]"));function lk(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const i=y.useRef(null),c=y.useRef(r),l=y.useRef(!1);y.useLayoutEffect(()=>{const d=c.current;if(c.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||d.length===0||r.length!==d.length)return;const u=a.isSameMonth(r[0].date,d[0].date),p=a.isAfter(r[0].date,d[0].date),f=p?n[ut.caption_after_enter]:n[ut.caption_before_enter],m=p?n[ut.weeks_after_enter]:n[ut.weeks_before_enter],_=i.current,h=e.current.cloneNode(!0);if(h instanceof HTMLElement?(La(h).forEach(w=>{if(!(w instanceof HTMLElement))return;const N=sk(w);N&&w.contains(N)&&w.removeChild(N);const S=Ba(w);S&&S.classList.remove(f);const x=Ha(w);x&&x.classList.remove(m)}),i.current=h):i.current=null,l.current||u||o)return;const j=_ instanceof HTMLElement?La(_):[],v=La(e.current);if(v!=null&&v.every(b=>b instanceof HTMLElement)&&j&&j.every(b=>b instanceof HTMLElement)){l.current=!0,e.current.style.isolation="isolate";const b=ik(e.current);b&&(b.style.zIndex="1"),v.forEach((w,N)=>{const S=j[N];if(!S)return;w.style.position="relative",w.style.overflow="hidden";const x=Ba(w);x&&x.classList.add(f);const C=Ha(w);C&&C.classList.add(m);const E=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),b&&(b.style.zIndex=""),x&&x.classList.remove(f),C&&C.classList.remove(m),w.style.position="",w.style.overflow="",w.contains(S)&&w.removeChild(S)};S.style.pointerEvents="none",S.style.position="absolute",S.style.overflow="hidden",S.setAttribute("aria-hidden","true");const M=ck(S);M&&(M.style.opacity="0");const P=Ba(S);P&&(P.classList.add(p?n[ut.caption_before_exit]:n[ut.caption_after_exit]),P.addEventListener("animationend",E));const T=Ha(S);T&&T.classList.add(p?n[ut.weeks_before_exit]:n[ut.weeks_after_exit]),w.insertBefore(S,w.firstChild)})}})}function dk(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:i,fixedWeeks:c,broadcastCalendar:l}=n??{},{addDays:d,differenceInCalendarDays:u,differenceInCalendarMonths:p,endOfBroadcastWeek:f,endOfISOWeek:m,endOfMonth:_,endOfWeek:h,isAfter:j,startOfBroadcastWeek:v,startOfISOWeek:b,startOfWeek:w}=r,N=l?v(o,r):i?b(o):w(o),S=l?f(a):i?m(_(a)):h(_(a)),x=t&&(l?f(t):i?m(t):h(t)),C=x&&j(S,x)?x:S,E=u(C,N),M=p(a,o)+1,P=[];for(let z=0;z<=E;z++){const D=d(N,z);P.push(D)}const k=(l?35:42)*M;if(c&&P.length<k){const z=k-P.length;for(let D=0;D<z;D++){const W=d(P[P.length-1],1);P.push(W)}}return P}function uk(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,i)=>a.concat(i.days.slice()),t.slice());return n.concat(o.slice())},t.slice())}function fk(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let i=0;i<o;i++){const c=r.addMonths(e,i);if(t&&c>t)break;a.push(c)}return a}function Qc(e,t,n,r){const{month:o,defaultMonth:a,today:i=r.today(),numberOfMonths:c=1}=e;let l=o||a||i;const{differenceInCalendarMonths:d,addMonths:u,startOfMonth:p}=r;if(n&&d(n,l)<c-1){const f=-1*(c-1);l=u(n,f)}return t&&d(l,t)<0&&(l=t),p(l)}function mk(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:i,endOfMonth:c,endOfWeek:l,getISOWeek:d,getWeek:u,startOfBroadcastWeek:p,startOfISOWeek:f,startOfWeek:m}=r,_=e.reduce((h,j)=>{const v=n.broadcastCalendar?p(j,r):n.ISOWeek?f(j):m(j),b=n.broadcastCalendar?a(j):n.ISOWeek?i(c(j)):l(c(j)),w=t.filter(C=>C>=v&&C<=b),N=n.broadcastCalendar?35:42;if(n.fixedWeeks&&w.length<N){const C=t.filter(E=>{const M=N-w.length;return E>b&&E<=o(b,M)});w.push(...C)}const S=w.reduce((C,E)=>{const M=n.ISOWeek?d(E):u(E),P=C.find(k=>k.weekNumber===M),T=new Np(E,j,r);return P?P.days.push(T):C.push(new cC(M,[T])),C},[]),x=new iC(j,S);return h.push(x),h},[]);return n.reverseMonths?_.reverse():_}function pk(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:i,endOfMonth:c,addYears:l,endOfYear:d,newDate:u,today:p}=t,{fromYear:f,toYear:m,fromMonth:_,toMonth:h}=e;!n&&_&&(n=_),!n&&f&&(n=t.newDate(f,0,1)),!r&&h&&(r=h),!r&&m&&(r=u(m,11,31));const j=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=i(n):f?n=u(f,0,1):!n&&j&&(n=o(l(e.today??p(),-100))),r?r=c(r):m?r=u(m,11,31):!r&&j&&(r=d(e.today??p())),[n&&a(n),r&&a(r)]}function hk(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:i,addMonths:c,differenceInCalendarMonths:l}=r,d=o?a:1,u=i(e);if(!t)return c(u,d);if(!(l(t,e)<a))return c(u,d)}function _k(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:i,addMonths:c,differenceInCalendarMonths:l}=r,d=o?a??1:1,u=i(e);if(!t)return c(u,-d);if(!(l(u,t)<=0))return c(u,-d)}function gk(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function ja(e,t){const[n,r]=y.useState(e);return[t===void 0?n:t,r]}function jk(e,t){var N;const[n,r]=pk(e,t),{startOfMonth:o,endOfMonth:a}=t,i=Qc(e,n,r,t),[c,l]=ja(i,e.month?i:void 0);y.useEffect(()=>{const S=Qc(e,n,r,t);l(S)},[e.timeZone]);const{months:d,weeks:u,days:p,previousMonth:f,nextMonth:m}=y.useMemo(()=>{const S=fk(c,r,{numberOfMonths:e.numberOfMonths},t),x=dk(S,e.endMonth?a(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),C=mk(S,x,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),E=gk(C),M=uk(C),P=_k(c,n,e,t),T=hk(c,r,e,t);return{months:C,weeks:E,days:M,previousMonth:P,nextMonth:T}},[t,c.getTime(),r==null?void 0:r.getTime(),n==null?void 0:n.getTime(),e.disableNavigation,e.broadcastCalendar,(N=e.endMonth)==null?void 0:N.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:_,onMonthChange:h}=e,j=S=>u.some(x=>x.days.some(C=>C.isEqualTo(S))),v=S=>{if(_)return;let x=o(S);n&&x<o(n)&&(x=o(n)),r&&x>o(r)&&(x=o(r)),l(x),h==null||h(x)};return{months:d,weeks:u,days:p,navStart:n,navEnd:r,previousMonth:f,nextMonth:m,goToMonth:v,goToDay:S=>{j(S)||v(S.date)}}}var Ot;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Ot||(Ot={}));function Zc(e){return!e[Fe.disabled]&&!e[Fe.hidden]&&!e[Fe.outside]}function yk(e,t,n,r){let o,a=-1;for(const i of e){const c=t(i);Zc(c)&&(c[Fe.focused]&&a<Ot.FocusedModifier?(o=i,a=Ot.FocusedModifier):r!=null&&r.isEqualTo(i)&&a<Ot.LastFocused?(o=i,a=Ot.LastFocused):n(i.date)&&a<Ot.Selected?(o=i,a=Ot.Selected):c[Fe.today]&&a<Ot.Today&&(o=i,a=Ot.Today))}return o||(o=e.find(i=>Zc(t(i)))),o}function xk(e,t,n,r,o,a,i){const{ISOWeek:c,broadcastCalendar:l}=a,{addDays:d,addMonths:u,addWeeks:p,addYears:f,endOfBroadcastWeek:m,endOfISOWeek:_,endOfWeek:h,max:j,min:v,startOfBroadcastWeek:b,startOfISOWeek:w,startOfWeek:N}=i;let x={day:d,week:p,month:u,year:f,startOfWeek:C=>l?b(C,i):c?w(C):N(C),endOfWeek:C=>l?m(C):c?_(C):h(C)}[e](n,t==="after"?1:-1);return t==="before"&&r?x=j([r,x]):t==="after"&&o&&(x=v([o,x])),x}function Fp(e,t,n,r,o,a,i,c=0){if(c>365)return;const l=xk(e,t,n.date,r,o,a,i),d=!!(a.disabled&&Zt(l,a.disabled,i)),u=!!(a.hidden&&Zt(l,a.hidden,i)),p=l,f=new Np(l,p,i);return!d&&!u?f:Fp(e,t,f,r,o,a,i,c+1)}function vk(e,t,n,r,o){const{autoFocus:a}=e,[i,c]=y.useState(),l=yk(t.days,n,r||(()=>!1),i),[d,u]=y.useState(a?l:void 0);return{isFocusTarget:h=>!!(l!=null&&l.isEqualTo(h)),setFocused:u,focused:d,blur:()=>{c(d),u(void 0)},moveFocus:(h,j)=>{if(!d)return;const v=Fp(h,j,d,t.navStart,t.navEnd,e,o);v&&(e.disableNavigation&&!t.days.some(w=>w.isEqualTo(v))||(t.goToDay(v),u(v)))}}}function bk(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=ja(n,o?n:void 0),c=o?n:a,{isSameDay:l}=t,d=m=>(c==null?void 0:c.some(_=>l(_,m)))??!1,{min:u,max:p}=e;return{selected:c,select:(m,_,h)=>{let j=[...c??[]];if(d(m)){if((c==null?void 0:c.length)===u||r&&(c==null?void 0:c.length)===1)return;j=c==null?void 0:c.filter(v=>!l(v,m))}else(c==null?void 0:c.length)===p?j=[m]:j=[...j,m];return o||i(j),o==null||o(j,m,_,h),j},isSelected:d}}function wk(e,t,n=0,r=0,o=!1,a=Xt){const{from:i,to:c}=t||{},{isSameDay:l,isAfter:d,isBefore:u}=a;let p;if(!i&&!c)p={from:e,to:n>0?void 0:e};else if(i&&!c)l(i,e)?n===0?p={from:i,to:e}:o?p={from:i,to:void 0}:p=void 0:u(e,i)?p={from:e,to:i}:p={from:i,to:e};else if(i&&c)if(l(i,e)&&l(c,e))o?p={from:i,to:c}:p=void 0;else if(l(i,e))p={from:i,to:n>0?void 0:e};else if(l(c,e))p={from:e,to:n>0?void 0:e};else if(u(e,i))p={from:e,to:c};else if(d(e,i))p={from:i,to:e};else if(d(e,c))p={from:i,to:e};else throw new Error("Invalid range");if(p!=null&&p.from&&(p!=null&&p.to)){const f=a.differenceInCalendarDays(p.to,p.from);r>0&&f>r?p={from:e,to:void 0}:n>1&&f<n&&(p={from:e,to:void 0})}return p}function Nk(e,t,n=Xt){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),i=Math.min(a,6);for(let c=0;c<=i;c++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function el(e,t,n=Xt){return Qt(e,t.from,!1,n)||Qt(e,t.to,!1,n)||Qt(t,e.from,!1,n)||Qt(t,e.to,!1,n)}function Sk(e,t,n=Xt){const r=Array.isArray(t)?t:[t];if(r.filter(c=>typeof c!="function").some(c=>typeof c=="boolean"?c:n.isDate(c)?Qt(e,c,!1,n):kp(c,n)?c.some(l=>Qt(e,l,!1,n)):ga(c)?c.from&&c.to?el(e,{from:c.from,to:c.to},n):!1:Cp(c)?Nk(e,c.dayOfWeek,n):Ni(c)?n.isAfter(c.before,c.after)?el(e,{from:n.addDays(c.after,1),to:n.addDays(c.before,-1)},n):Zt(e.from,c,n)||Zt(e.to,c,n):Si(c)||Ci(c)?Zt(e.from,c,n)||Zt(e.to,c,n):!1))return!0;const i=r.filter(c=>typeof c=="function");if(i.length){let c=e.from;const l=n.differenceInCalendarDays(e.to,e.from);for(let d=0;d<=l;d++){if(i.some(u=>u(c)))return!0;c=n.addDays(c,1)}}return!1}function Ck(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:i}=e,[c,l]=ja(o,i?o:void 0),d=i?o:c;return{selected:d,select:(f,m,_)=>{const{min:h,max:j}=e,v=f?wk(f,d,h,j,a,t):void 0;return r&&n&&(v!=null&&v.from)&&v.to&&Sk({from:v.from,to:v.to},n,t)&&(v.from=f,v.to=void 0),i||l(v),i==null||i(v,f,m,_),v},isSelected:f=>d&&Qt(d,f,!1,t)}}function kk(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=ja(n,o?n:void 0),c=o?n:a,{isSameDay:l}=t;return{selected:c,select:(p,f,m)=>{let _=p;return!r&&c&&c&&l(p,c)&&(_=void 0),o||i(_),o==null||o(_,p,f,m),_},isSelected:p=>c?l(c,p):!1}}function Pk(e,t){const n=kk(e,t),r=bk(e,t),o=Ck(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function yt(e,t){return e instanceof et&&e.timeZone===t?e:new et(e,t)}function Vn(e,t,n){return yt(e,t)}function tl(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?Vn(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?Vn(r,t):r):ga(e)?{...e,from:e.from?yt(e.from,t):e.from,to:e.to?yt(e.to,t):e.to}:Ni(e)?{before:Vn(e.before,t),after:Vn(e.after,t)}:Si(e)?{after:Vn(e.after,t)}:Ci(e)?{before:Vn(e.before,t)}:e}function qa(e,t,n){return e&&(Array.isArray(e)?e.map(r=>tl(r,t)):tl(e,t))}function Ek(e){var mr;let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=yt(t.today,n)),t.month&&(t.month=yt(t.month,n)),t.defaultMonth&&(t.defaultMonth=yt(t.defaultMonth,n)),t.startMonth&&(t.startMonth=yt(t.startMonth,n)),t.endMonth&&(t.endMonth=yt(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=yt(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=(mr=t.selected)==null?void 0:mr.map(fe=>yt(fe,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?yt(t.selected.from,n):t.selected.from,to:t.selected.to?yt(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=qa(t.disabled,n)),t.hidden!==void 0&&(t.hidden=qa(t.hidden,n)),t.modifiers)){const fe={};Object.keys(t.modifiers).forEach(Ne=>{var oe;fe[Ne]=qa((oe=t.modifiers)==null?void 0:oe[Ne],n)}),t.modifiers=fe}const{components:r,formatters:o,labels:a,dateLib:i,locale:c,classNames:l}=y.useMemo(()=>{const fe={...wp,...t.locale},Ne=t.broadcastCalendar?1:t.weekStartsOn,oe=t.noonSafe&&t.timeZone?ak(t.timeZone,{weekStartsOn:Ne,locale:fe}):void 0,je=t.dateLib&&oe?{...oe,...t.dateLib}:t.dateLib??oe,tt=new ht({locale:fe,weekStartsOn:Ne,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},je);return{dateLib:tt,components:WC(t.components),formatters:XC(t.formatters),labels:ek(t.labels,tt.options),locale:fe,classNames:{...$C(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:i.today()});const{captionLayout:d,mode:u,navLayout:p,numberOfMonths:f=1,onDayBlur:m,onDayClick:_,onDayFocus:h,onDayKeyDown:j,onDayMouseEnter:v,onDayMouseLeave:b,onNextClick:w,onPrevClick:N,showWeekNumber:S,styles:x}=t,{formatCaption:C,formatDay:E,formatMonthDropdown:M,formatWeekNumber:P,formatWeekNumberHeader:T,formatWeekdayName:k,formatYearDropdown:z}=o,D=jk(t,i),{days:W,months:O,navStart:$,navEnd:L,previousMonth:R,nextMonth:X,goToMonth:de}=D,ie=zC(W,t,$,L,i),{isSelected:I,select:F,selected:U}=Pk(t,i)??{},{blur:K,focused:A,isFocusTarget:H,moveFocus:Q,setFocused:J}=vk(t,D,ie,I??(()=>!1),i),{labelDayButton:ae,labelGridcell:ce,labelGrid:me,labelMonthDropdown:be,labelNav:Ue,labelPrevious:Qe,labelNext:Ze,labelWeekday:Ie,labelWeekNumber:ct,labelWeekNumberHeader:q,labelYearDropdown:Z}=a,he=y.useMemo(()=>rk(i,t.ISOWeek,t.broadcastCalendar,t.today),[i,t.ISOWeek,t.broadcastCalendar,t.today]),re=u!==void 0||_!==void 0,_e=y.useCallback(()=>{R&&(de(R),N==null||N(R))},[R,de,N]),Ce=y.useCallback(()=>{X&&(de(X),w==null||w(X))},[de,X,w]),we=y.useCallback((fe,Ne)=>oe=>{oe.preventDefault(),oe.stopPropagation(),J(fe),!Ne.disabled&&(F==null||F(fe.date,Ne,oe),_==null||_(fe.date,Ne,oe))},[F,_,J]),We=y.useCallback((fe,Ne)=>oe=>{J(fe),h==null||h(fe.date,Ne,oe)},[h,J]),vt=y.useCallback((fe,Ne)=>oe=>{K(),m==null||m(fe.date,Ne,oe)},[K,m]),bt=y.useCallback((fe,Ne)=>oe=>{const je={ArrowLeft:[oe.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[oe.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[oe.shiftKey?"year":"week","after"],ArrowUp:[oe.shiftKey?"year":"week","before"],PageUp:[oe.shiftKey?"year":"month","before"],PageDown:[oe.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(je[oe.key]){oe.preventDefault(),oe.stopPropagation();const[tt,B]=je[oe.key];Q(tt,B)}j==null||j(fe.date,Ne,oe)},[Q,j,t.dir]),Ge=y.useCallback((fe,Ne)=>oe=>{v==null||v(fe.date,Ne,oe)},[v]),At=y.useCallback((fe,Ne)=>oe=>{b==null||b(fe.date,Ne,oe)},[b]),bn=y.useCallback(fe=>Ne=>{const oe=Number(Ne.target.value),je=i.setMonth(i.startOfMonth(fe),oe);de(je)},[i,de]),wn=y.useCallback(fe=>Ne=>{const oe=Number(Ne.target.value),je=i.setYear(i.startOfMonth(fe),oe);de(je)},[i,de]),{className:an,style:Gr}=y.useMemo(()=>({className:[l[ee.Root],t.className].filter(Boolean).join(" "),style:{...x==null?void 0:x[ee.Root],...t.style}}),[l,t.className,t.style,x]),sn=FC(t),Xr=y.useRef(null);lk(Xr,!!t.animate,{classNames:l,months:O,focused:A,dateLib:i});const ya={dayPickerProps:t,selected:U,select:F,isSelected:I,months:O,nextMonth:X,previousMonth:R,goToMonth:de,getModifiers:ie,components:r,classNames:l,styles:x,labels:a,formatters:o};return y.createElement(Sp.Provider,{value:ya},y.createElement(r.Root,{rootRef:t.animate?Xr:void 0,className:an,style:Gr,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...sn},y.createElement(r.Months,{className:l[ee.Months],style:x==null?void 0:x[ee.Months]},!t.hideNavigation&&!p&&y.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[ee.Nav],style:x==null?void 0:x[ee.Nav],"aria-label":Ue(),onPreviousClick:_e,onNextClick:Ce,previousMonth:R,nextMonth:X}),O.map((fe,Ne)=>y.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:l[ee.Month],style:x==null?void 0:x[ee.Month],key:Ne,displayIndex:Ne,calendarMonth:fe},p==="around"&&!t.hideNavigation&&Ne===0&&y.createElement(r.PreviousMonthButton,{type:"button",className:l[ee.PreviousMonthButton],tabIndex:R?void 0:-1,"aria-disabled":R?void 0:!0,"aria-label":Qe(R),onClick:_e,"data-animated-button":t.animate?"true":void 0},y.createElement(r.Chevron,{disabled:R?void 0:!0,className:l[ee.Chevron],orientation:t.dir==="rtl"?"right":"left"})),y.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:l[ee.MonthCaption],style:x==null?void 0:x[ee.MonthCaption],calendarMonth:fe,displayIndex:Ne},d!=null&&d.startsWith("dropdown")?y.createElement(r.DropdownNav,{className:l[ee.Dropdowns],style:x==null?void 0:x[ee.Dropdowns]},(()=>{const oe=d==="dropdown"||d==="dropdown-months"?y.createElement(r.MonthsDropdown,{key:"month",className:l[ee.MonthsDropdown],"aria-label":be(),classNames:l,components:r,disabled:!!t.disableNavigation,onChange:bn(fe.date),options:tk(fe.date,$,L,o,i),style:x==null?void 0:x[ee.Dropdown],value:i.getMonth(fe.date)}):y.createElement("span",{key:"month"},M(fe.date,i)),je=d==="dropdown"||d==="dropdown-years"?y.createElement(r.YearsDropdown,{key:"year",className:l[ee.YearsDropdown],"aria-label":Z(i.options),classNames:l,components:r,disabled:!!t.disableNavigation,onChange:wn(fe.date),options:ok($,L,o,i,!!t.reverseYears),style:x==null?void 0:x[ee.Dropdown],value:i.getYear(fe.date)}):y.createElement("span",{key:"year"},z(fe.date,i));return i.getMonthYearOrder()==="year-first"?[je,oe]:[oe,je]})(),y.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},C(fe.date,i.options,i))):y.createElement(r.CaptionLabel,{className:l[ee.CaptionLabel],role:"status","aria-live":"polite"},C(fe.date,i.options,i))),p==="around"&&!t.hideNavigation&&Ne===f-1&&y.createElement(r.NextMonthButton,{type:"button",className:l[ee.NextMonthButton],tabIndex:X?void 0:-1,"aria-disabled":X?void 0:!0,"aria-label":Ze(X),onClick:Ce,"data-animated-button":t.animate?"true":void 0},y.createElement(r.Chevron,{disabled:X?void 0:!0,className:l[ee.Chevron],orientation:t.dir==="rtl"?"left":"right"})),Ne===f-1&&p==="after"&&!t.hideNavigation&&y.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[ee.Nav],style:x==null?void 0:x[ee.Nav],"aria-label":Ue(),onPreviousClick:_e,onNextClick:Ce,previousMonth:R,nextMonth:X}),y.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":me(fe.date,i.options,i)||void 0,className:l[ee.MonthGrid],style:x==null?void 0:x[ee.MonthGrid]},!t.hideWeekdays&&y.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:l[ee.Weekdays],style:x==null?void 0:x[ee.Weekdays]},S&&y.createElement(r.WeekNumberHeader,{"aria-label":q(i.options),className:l[ee.WeekNumberHeader],style:x==null?void 0:x[ee.WeekNumberHeader],scope:"col"},T()),he.map(oe=>y.createElement(r.Weekday,{"aria-label":Ie(oe,i.options,i),className:l[ee.Weekday],key:String(oe),style:x==null?void 0:x[ee.Weekday],scope:"col"},k(oe,i.options,i)))),y.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:l[ee.Weeks],style:x==null?void 0:x[ee.Weeks]},fe.weeks.map(oe=>y.createElement(r.Week,{className:l[ee.Week],key:oe.weekNumber,style:x==null?void 0:x[ee.Week],week:oe},S&&y.createElement(r.WeekNumber,{week:oe,style:x==null?void 0:x[ee.WeekNumber],"aria-label":ct(oe.weekNumber,{locale:c}),className:l[ee.WeekNumber],scope:"row",role:"rowheader"},P(oe.weekNumber,i)),oe.days.map(je=>{const{date:tt}=je,B=ie(je);if(B[Fe.focused]=!B.hidden&&!!(A!=null&&A.isEqualTo(je)),B[kt.selected]=(I==null?void 0:I(tt))||B.selected,ga(U)){const{from:nt,to:jt}=U;B[kt.range_start]=!!(nt&&jt&&i.isSameDay(tt,nt)),B[kt.range_end]=!!(nt&&jt&&i.isSameDay(tt,jt)),B[kt.range_middle]=Qt(U,tt,!0,i)}const ke=nk(B,x,t.modifiersStyles),Re=IC(B,l,t.modifiersClassNames),lt=!re&&!B.hidden?ce(tt,B,i.options,i):void 0;return y.createElement(r.Day,{key:`${je.isoDate}_${je.displayMonthId}`,day:je,modifiers:B,className:Re.join(" "),style:ke,role:"gridcell","aria-selected":B.selected||void 0,"aria-label":lt,"data-day":je.isoDate,"data-month":je.outside?je.dateMonthId:void 0,"data-selected":B.selected||void 0,"data-disabled":B.disabled||void 0,"data-hidden":B.hidden||void 0,"data-outside":je.outside||void 0,"data-focused":B.focused||void 0,"data-today":B.today||void 0},!B.hidden&&re?y.createElement(r.DayButton,{className:l[ee.DayButton],style:x==null?void 0:x[ee.DayButton],type:"button",day:je,modifiers:B,disabled:!B.focused&&B.disabled||void 0,"aria-disabled":B.focused&&B.disabled||void 0,tabIndex:H(je)?0:-1,"aria-label":ae(tt,B,i.options,i),onClick:we(je,B),onBlur:vt(je,B),onFocus:We(je,B),onKeyDown:bt(je,B),onMouseEnter:Ge(je,B),onMouseLeave:At(je,B)},E(tt,i.options,i)):!B.hidden&&E(je.date,i.options,i))})))))))),t.footer&&y.createElement(r.Footer,{className:l[ee.Footer],style:x==null?void 0:x[ee.Footer],role:"status","aria-live":"polite"},t.footer)))}function Ei({className:e,classNames:t,showOutsideDays:n=!0,...r}){return s.jsx(Ek,{showOutsideDays:n,className:ne("cj-p-4",e),classNames:{months:"cj-flex cj-flex-col cj-space-y-4",month:"cj-space-y-4",month_caption:"cj-flex cj-justify-center cj-pt-1 cj-relative cj-items-center cj-pb-2",caption_label:"cj-hidden",nav:"cj-space-x-1 cj-flex cj-items-center",button_previous:ne("cj-inline-flex cj-items-center cj-justify-center cj-rounded-full cj-h-9 cj-w-9 cj-bg-transparent cj-border-none cj-p-0 cj-text-muted-foreground hover:cj-text-foreground hover:cj-bg-accent cj-transition-colors cj-cursor-pointer cj-absolute cj-left-1"),button_next:ne("cj-inline-flex cj-items-center cj-justify-center cj-rounded-full cj-h-9 cj-w-9 cj-bg-transparent cj-border-none cj-p-0 cj-text-muted-foreground hover:cj-text-foreground hover:cj-bg-accent cj-transition-colors cj-cursor-pointer cj-absolute cj-right-1"),month_grid:"cj-w-full cj-border-collapse",weekdays:"cj-flex",weekday:"cj-text-muted-foreground/70 cj-w-10 cj-font-medium cj-text-xs cj-uppercase cj-tracking-wider cj-pb-2",week:"cj-flex cj-w-full",day:"cj-h-10 cj-w-10 cj-text-center cj-text-sm cj-p-0 cj-relative [&:has([aria-selected].day-range-end)]:cj-rounded-r-full [&:has([aria-selected].day-outside)]:cj-bg-accent/50 [&:has([aria-selected])]:cj-bg-accent first:[&:has([aria-selected])]:cj-rounded-l-full last:[&:has([aria-selected])]:cj-rounded-r-full focus-within:cj-relative focus-within:cj-z-20",day_button:"cj-inline-flex cj-items-center cj-justify-center cj-h-10 cj-w-10 cj-rounded-full cj-bg-transparent cj-border-none cj-p-0 cj-font-normal cj-cursor-pointer cj-transition-colors hover:cj-bg-accent hover:cj-text-accent-foreground aria-selected:cj-opacity-100",range_end:"day-range-end",selected:"cj-bg-primary cj-text-primary-foreground cj-rounded-full hover:cj-bg-primary hover:cj-text-primary-foreground focus:cj-bg-primary focus:cj-text-primary-foreground",today:"cj-bg-primary cj-text-white cj-rounded-full cj-font-bold cj-ring-2 cj-ring-primary/50",outside:"day-outside cj-text-muted-foreground cj-opacity-40 aria-selected:cj-bg-accent/50 aria-selected:cj-text-muted-foreground aria-selected:cj-opacity-30",disabled:"cj-text-muted-foreground cj-opacity-50",range_middle:"aria-selected:cj-bg-accent aria-selected:cj-text-accent-foreground",hidden:"cj-invisible",dropdowns:"cj-flex cj-items-center cj-gap-1.5",dropdown_root:"cj-relative cj-inline-flex cj-items-center",dropdown:"cj-appearance-none cj-bg-muted/50 cj-border cj-border-border/40 cj-rounded-lg cj-h-8 cj-px-2 cj-pr-6 cj-text-sm cj-font-medium cj-text-foreground hover:cj-bg-accent focus-visible:cj-outline-none focus-visible:cj-ring-2 focus-visible:cj-ring-ring cj-cursor-pointer",years_dropdown:"cj-max-h-60",months_dropdown:"cj-max-h-60",...t},components:{Chevron:({orientation:o})=>o==="left"?s.jsx(P_,{className:"cj-h-4 cj-w-4"}):s.jsx(E_,{className:"cj-h-4 cj-w-4"})},...r})}Ei.displayName="Calendar";const nl={en:_a,es:cp,pt:lp},rl={en:{fmt:"dd/MM/yyyy",placeholder:"DD/MM/YYYY"},es:{fmt:"dd/MM/yyyy",placeholder:"DD/MM/AAAA"},pt:{fmt:"dd/MM/yyyy",placeholder:"DD/MM/AAAA"},pl:{fmt:"dd/MM/yyyy",placeholder:"DD/MM/RRRR"}};function ol(e){const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return`${t}-${n}-${r}`}function Mk(e,t){const n=e.replace(/\D/g,"").slice(0,t.replace(/[^a-zA-Z]/g,"").length);if(!n)return"";let r="",o=0;for(const a of t){if(o>=n.length)break;/[a-zA-Z]/.test(a)?r+=n[o++]:r+=a}return r}function Dk({label:e,value:t,onChange:n,helpText:r,allowFuture:o=!1}){const{t:a,language:i}=ve(),[c,l]=y.useState(!1),d=y.useMemo(()=>{if(!t)return;const x=/^(\d{4})-(\d{2})-(\d{2})$/.exec(t);if(x)return new Date(Number(x[1]),Number(x[2])-1,Number(x[3]));const C=new Date(t);return Number.isNaN(C.getTime())?void 0:C},[t]),u=y.useMemo(()=>nl[i]||nl.en,[i]),{fmt:p,placeholder:f}=rl[i]||rl.en,[m,_]=y.useState(d?Do(d,p):""),[h,j]=y.useState(!1);y.useEffect(()=>{_(d?Do(d,p):""),j(!1)},[d,p]);const v=new Date,b=1900,w=o?v.getFullYear()+20:v.getFullYear(),N=x=>{const C=x.trim();if(!C){j(!1),n("");return}const E=ip(C,p,new Date);if(!_i(E)){j(!0);return}if(!o&&E>v){j(!0);return}j(!1),n(ol(E))},S=x=>{x&&(n(ol(x)),l(!1))};return s.jsxs("div",{className:"cj-space-y-2",children:[s.jsx(Y,{className:"cj-text-sm cj-font-medium",children:e}),s.jsxs("div",{className:"cj-relative",children:[s.jsx(pe,{type:"text",inputMode:"numeric",value:m,placeholder:f,onChange:x=>{const C=Mk(x.target.value,p);_(C),h&&j(!1)},onBlur:x=>N(x.target.value),onKeyDown:x=>{x.key==="Enter"&&(x.preventDefault(),N(x.target.value))},"aria-invalid":h||void 0,className:ne("cj-pr-12",h&&"cj-border-destructive focus-visible:cj-ring-destructive")}),s.jsxs(ma,{open:c,onOpenChange:l,children:[s.jsx(pa,{asChild:!0,children:s.jsx(te,{type:"button",variant:"ghost",size:"icon","aria-label":a("widget_pick_date"),className:"cj-absolute cj-right-1 cj-top-1/2 -cj-translate-y-1/2 cj-h-10 cj-w-10 cj-rounded-lg cj-text-muted-foreground hover:cj-text-foreground",children:s.jsx(Hl,{className:"cj-h-4 cj-w-4"})})}),s.jsx(qr,{className:"cj-w-auto cj-p-0 cj-z-50 cj-rounded-2xl cj-shadow-lg cj-border-border/30",align:"end",sideOffset:8,children:s.jsx(Ei,{mode:"single",selected:d,onSelect:S,defaultMonth:d??new Date,locale:u,autoFocus:!0,captionLayout:"dropdown",startMonth:new Date(b,0),endMonth:new Date(w,11),disabled:o?void 0:{after:v},className:ne("cj-p-4 cj-pointer-events-auto")})})]})]}),h&&s.jsx("p",{className:"cj-text-xs cj-text-destructive",children:a("widget_invalid_date")}),r&&!h&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r})]})}function $p(e){const t=e.replace(/\D/g,"").slice(0,4);return t.length<=2?t:`${t.slice(0,2)}:${t.slice(2)}`}function Ro(e){return/^([01]\d|2[0-3]):[0-5]\d$/.test(e)}function Tk(e){if(!e)return"";if(/^\d{2}:\d{2}/.test(e))return e.slice(0,5);const t=new Date(e);if(Number.isNaN(t.getTime()))return"";const n=String(t.getHours()).padStart(2,"0"),r=String(t.getMinutes()).padStart(2,"0");return`${n}:${r}`}function Rk({label:e,value:t,onChange:n,helpText:r}){const{t:o}=ve(),a=y.useMemo(()=>Tk(t),[t]),[i,c]=y.useState(a);y.useEffect(()=>{c(a)},[a]);const l=u=>{const p=$p(u);if(c(p),!p){n("");return}Ro(p)&&n(p)},d=()=>{i&&!Ro(i)&&c(a)};return s.jsxs("div",{className:"cj-space-y-2",children:[s.jsx(Y,{className:"cj-text-sm cj-font-medium",children:e}),s.jsx(pe,{type:"text",inputMode:"numeric",pattern:"[0-2][0-9]:[0-5][0-9]",placeholder:"HH:mm",value:i,onChange:u=>l(u.target.value),onBlur:d,className:"cj-h-12 cj-rounded-xl","aria-label":e||o("widget_pick_time")}),r&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r})]})}const al={en:_a,es:cp,pt:lp},sl={en:{fmt:"dd/MM/yyyy",placeholder:"DD/MM/YYYY"},es:{fmt:"dd/MM/yyyy",placeholder:"DD/MM/AAAA"},pt:{fmt:"dd/MM/yyyy",placeholder:"DD/MM/AAAA"},pl:{fmt:"dd/MM/yyyy",placeholder:"DD/MM/RRRR"}};function Ak(e,t){const n=e.replace(/\D/g,"").slice(0,t.replace(/[^a-zA-Z]/g,"").length);if(!n)return"";let r="",o=0;for(const a of t){if(o>=n.length)break;/[a-zA-Z]/.test(a)?r+=n[o++]:r+=a}return r}function Ok({label:e,value:t,onChange:n,helpText:r,allowFuture:o=!0}){const{t:a,language:i}=ve(),[c,l]=y.useState(!1),d=t?new Date(t):void 0,u=d&&!Number.isNaN(d.getTime())?d:void 0,p=y.useMemo(()=>al[i]||al.en,[i]),{fmt:f,placeholder:m}=sl[i]||sl.en,_=y.useMemo(()=>{if(!u)return"";const P=String(u.getHours()).padStart(2,"0"),T=String(u.getMinutes()).padStart(2,"0");return`${P}:${T}`},[u]),[h,j]=y.useState(u?Do(u,f):""),[v,b]=y.useState(_),[w,N]=y.useState(!1);y.useEffect(()=>{j(u?Do(u,f):""),N(!1)},[u,f]),y.useEffect(()=>{b(_)},[_]);const S=new Date,x=P=>{const T=P.trim();if(!T){N(!1),n("");return}const k=ip(T,f,new Date);if(!_i(k)){N(!0);return}if(!o&&k>S){N(!0);return}u?k.setHours(u.getHours(),u.getMinutes(),0,0):k.setHours(12,0,0,0),N(!1),n(k.toISOString())},C=P=>{if(!P)return;const T=new Date(P);u?T.setHours(u.getHours(),u.getMinutes(),0,0):T.setHours(12,0,0,0),n(T.toISOString()),l(!1)},E=P=>{const T=$p(P);if(b(T),!Ro(T))return;const[k,z]=T.split(":").map(Number),D=u?new Date(u):new Date;D.setHours(k,z,0,0),n(D.toISOString())},M=()=>{v&&!Ro(v)&&b(_)};return s.jsxs("div",{className:"cj-space-y-2",children:[s.jsx(Y,{className:"cj-text-sm cj-font-medium",children:e}),s.jsxs("div",{className:"cj-flex cj-gap-2",children:[s.jsxs("div",{className:"cj-relative cj-flex-1",children:[s.jsx(pe,{type:"text",inputMode:"numeric",value:h,placeholder:m,onChange:P=>{const T=Ak(P.target.value,f);j(T),w&&N(!1)},onBlur:P=>x(P.target.value),onKeyDown:P=>{P.key==="Enter"&&(P.preventDefault(),x(P.target.value))},"aria-invalid":w||void 0,className:ne("cj-pr-12",w&&"cj-border-destructive focus-visible:cj-ring-destructive")}),s.jsxs(ma,{open:c,onOpenChange:l,children:[s.jsx(pa,{asChild:!0,children:s.jsx(te,{type:"button",variant:"ghost",size:"icon","aria-label":a("widget_pick_date"),className:"cj-absolute cj-right-1 cj-top-1/2 -cj-translate-y-1/2 cj-h-10 cj-w-10 cj-rounded-lg cj-text-muted-foreground hover:cj-text-foreground",children:s.jsx(Hl,{className:"cj-h-4 cj-w-4"})})}),s.jsx(qr,{className:"cj-w-auto cj-p-0 cj-z-50 cj-rounded-2xl cj-shadow-lg cj-border-border/30",align:"end",sideOffset:8,children:s.jsx(Ei,{mode:"single",selected:u,onSelect:C,defaultMonth:u??new Date,locale:p,autoFocus:!0,captionLayout:"dropdown",startMonth:new Date(1900,0),endMonth:new Date(o?S.getFullYear()+20:S.getFullYear(),11),disabled:o?void 0:{after:S},className:ne("cj-p-4 cj-pointer-events-auto")})})]})]}),s.jsx(pe,{type:"text",inputMode:"numeric",pattern:"[0-2][0-9]:[0-5][0-9]",placeholder:"HH:mm",value:v,onChange:P=>E(P.target.value),onBlur:M,className:"cj-h-12 cj-rounded-xl cj-w-32","aria-label":a("widget_pick_time")})]}),w&&s.jsx("p",{className:"cj-text-xs cj-text-destructive",children:a("widget_invalid_date")}),r&&!w&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r})]})}function zk({label:e,value:t,onChange:n,helpText:r,currency:o="EUR"}){const{t:a}=ve(),[i,c]=y.useState("");y.useEffect(()=>{if(t){const m=parseFloat(t);isNaN(m)||c(l(m))}else c("")},[t]);const l=m=>new Intl.NumberFormat("de-DE",{minimumFractionDigits:2,maximumFractionDigits:2}).format(m),d=m=>{const _=m.replace(/\./g,"").replace(",",".");return parseFloat(_)||0},u=m=>{const h=m.target.value.replace(/[^\d.,]/g,"");c(h)},p=()=>{if(i){const m=d(i);n(m.toString()),c(l(m))}else n("")},f=m=>({EUR:"โฌ",USD:"$",GBP:"ยฃ"})[m]||m;return s.jsxs("div",{className:"cj-space-y-2",children:[s.jsx(Y,{className:"cj-text-sm cj-font-medium",children:e}),s.jsxs("div",{className:"cj-relative",children:[s.jsx("span",{className:"cj-absolute cj-left-3 cj-top-1/2 -cj-translate-y-1/2 cj-text-muted-foreground",children:f(o)}),s.jsx(pe,{type:"text",value:i,onChange:u,onBlur:p,placeholder:a("placeholder_currency"),className:"cj-pl-8"})]}),r&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r})]})}function so(e){return typeof e=="object"&&e!==null&&"filename"in e&&"url"in e}function Ik(e,t){const n=y.useCallback(o=>{var a,i;(i=(a=o.dataTransfer)==null?void 0:a.types)!=null&&i.includes("Files")&&o.preventDefault()},[]),r=y.useCallback(o=>{var c,l,d;const a=o.target;if(!a||!((c=e.current)!=null&&c.contains(a)))return;const i=o.dataTransfer;i!=null&&i.files.length&&((d=(l=e.current).__globalDropHandler)==null||d.call(l,i.files[0]))},[e]);y.useEffect(()=>(document.addEventListener("dragover",n,{capture:!0,passive:!1}),document.addEventListener("drop",r,{capture:!0,passive:!1}),()=>{document.removeEventListener("dragover",n),document.removeEventListener("drop",r)}),[n,r])}function Wk({label:e,value:t,onChange:n,onFileSelect:r,helpText:o,accept:a,maxSizeMB:i}){const{t:c}=ve(),l=y.useRef(null),[d,u]=y.useState(!1),[p,f]=y.useState(null),m=y.useRef(null),_=y.useRef(!1),h=k=>{if(i&&k.size>i*1024*1024)return c("widget_file_too_large",{max:String(i),size:(k.size/1024/1024).toFixed(1)});if(a){const z=a.split(",").map($=>$.trim().toLowerCase()),D=k.name.toLowerCase(),W=k.type.toLowerCase();if(!z.some($=>$.startsWith(".")?D.endsWith($):$.endsWith("/*")?W.startsWith($.replace("/*","/")):W===$))return c("widget_file_type_rejected",{accept:a})}return null},j=async k=>{f(null);const z=h(k);if(z){f(z),_.current=!1;return}if(!r){n(k.name),_.current=!1;return}_.current=!0;try{u(!0);const D=await r(k);so(D)?n(D):n(typeof D=="string"?D:k.name)}catch(D){f(D instanceof Error?D.message:c("widget_upload_failed")),n("")}finally{u(!1),_.current=!1}},v=y.useCallback(k=>{_.current||(_.current=!0,j(k))},[j]);y.useEffect(()=>{m.current.__globalDropHandler=v},[v]),Ik(m);const b=k=>{if(k.preventDefault(),d||_.current)return;const z=k.dataTransfer.files;z.length>0&&j(z[0])},w=k=>{k.preventDefault()},N=()=>{var k;d||(k=l.current)==null||k.click()},S=k=>{const z=k.target.files;z&&z.length>0&&j(z[0]),k.target.value=""},x=k=>{k.stopPropagation(),n(""),f(null)},C=so(t)?!!t.url:!!t,E=so(t)?t.filename:t,M=so(t)?t.url:null,P=[];a&&P.push(c("widget_accepted_hint",{accept:a})),i&&P.push(c("widget_max_size_hint",{max:String(i)}));const T=P.length>0?P.join(" ยท "):null;return s.jsxs("div",{className:"cj-space-y-2",children:[s.jsx(Y,{className:"cj-text-sm cj-font-medium",children:e}),s.jsx("input",{ref:l,type:"file",className:"cj-hidden",accept:a,onChange:S}),s.jsx("div",{ref:m,onDrop:b,onDragOver:w,onClick:N,className:`cj-border-2 cj-border-dashed cj-rounded-lg cj-p-8 cj-text-center cj-transition-colors ${d?"cj-border-muted-foreground/25 cj-cursor-wait cj-opacity-60":p?"cj-border-destructive/50 cj-cursor-pointer hover:cj-border-destructive/75":"cj-border-muted-foreground/25 cj-cursor-pointer hover:cj-border-muted-foreground/50"}`,children:d?s.jsxs(s.Fragment,{children:[s.jsx(Fo,{className:"cj-h-8 cj-w-8 cj-mx-auto cj-text-muted-foreground cj-mb-2 cj-animate-spin"}),s.jsx("p",{className:"cj-text-sm cj-text-muted-foreground",children:c("upload_uploading")})]}):C?s.jsxs(s.Fragment,{children:[s.jsx(Yl,{className:"cj-h-8 cj-w-8 cj-mx-auto cj-text-muted-foreground cj-mb-2"}),s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-center cj-gap-2",children:[M?s.jsx("a",{href:M,target:"_blank",rel:"noopener noreferrer",onClick:k=>k.stopPropagation(),className:"cj-text-sm cj-font-medium cj-text-primary cj-underline cj-truncate cj-max-w-[240px]",title:E,children:E}):s.jsx("p",{className:"cj-text-sm cj-font-medium cj-truncate cj-max-w-[240px]",children:E}),s.jsx("button",{type:"button",onClick:x,className:"cj-text-muted-foreground hover:cj-text-foreground",children:s.jsx(Tt,{className:"cj-h-4 cj-w-4"})})]})]}):s.jsxs(s.Fragment,{children:[s.jsx(Es,{className:"cj-h-8 cj-w-8 cj-mx-auto cj-text-muted-foreground cj-mb-2"}),s.jsx("p",{className:"cj-text-sm cj-text-muted-foreground",children:c("upload_drag_drop")})]})}),p&&s.jsxs("p",{className:"cj-text-xs cj-text-destructive cj-flex cj-items-center cj-gap-1",children:[s.jsx(Ps,{className:"cj-h-3 cj-w-3"})," ",p]}),(o||T)&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:o||T})]})}function Fk({label:e,value:t,onChange:n,onFileSelect:r,helpText:o,accept:a,maxSizeMB:i,maxFiles:c}){const{t:l}=ve(),d=y.useRef(null),[u,p]=y.useState(!1),[f,m]=y.useState(null),_=y.useRef(null),h=y.useRef(!1),j=y.useRef(t);j.current=t;const v=c?t.length>=c:!1,b=y.useCallback(async D=>{if(m(null),i&&D.size>i*1024*1024){m(l("widget_file_too_large",{max:String(i),size:(D.size/1024/1024).toFixed(1)})),h.current=!1;return}if(a){const W=a.split(",").map(R=>R.trim().toLowerCase()),O=D.name.toLowerCase(),$=D.type.toLowerCase();if(!W.some(R=>R.startsWith(".")?O.endsWith(R):R.endsWith("/*")?$.startsWith(R.replace("/*","/")):$===R)){m(l("widget_file_type_rejected",{accept:a})),h.current=!1;return}}h.current=!0;try{p(!0);const W=r?await Promise.resolve(r(D)):void 0,O=[...j.current,$k(W)?W:{filename:typeof W=="string"?W:D.name,url:""}];j.current=O,n(O)}catch(W){m(W instanceof Error?W.message:l("widget_upload_failed"))}finally{p(!1),h.current=!1}},[a,i,n,r,l]),w=y.useCallback(D=>{var W,O;(O=(W=D.dataTransfer)==null?void 0:W.types)!=null&&O.includes("Files")&&D.preventDefault()},[]),N=y.useCallback(D=>{var $,L,R;const W=D.target;if(!W||!(($=_.current)!=null&&$.contains(W)))return;const O=D.dataTransfer;O!=null&&O.files.length&&((R=(L=_.current).__globalDropHandler)==null||R.call(L,O.files))},[_]);y.useEffect(()=>(document.addEventListener("dragover",w,{capture:!0,passive:!1}),document.addEventListener("drop",N,{capture:!0,passive:!1}),()=>{document.removeEventListener("dragover",w),document.removeEventListener("drop",N)}),[w,N]);const S=y.useCallback(D=>{if(h.current)return;const W=c?c-t.length:1/0;if(W<=0)return;const O=Array.from(D).slice(0,W);if(O.length===0)return;const $=L=>{if(L.length===0)return;const[R,...X]=L;b(R).then(()=>{h.current||$(X)})};$(O)},[c,b,t.length]);y.useEffect(()=>{_.current.__globalDropHandler=S},[S]);const x=D=>{if(D.preventDefault(),u||h.current||v)return;const W=D.dataTransfer.files;if(W.length>0){const O=c?c-t.length:1/0,$=Array.from(W).slice(0,O);if($.length>0){const L=R=>{if(R.length===0)return;const[X,...de]=R;b(X).then(()=>{h.current||L(de)})};L($)}}},C=D=>{D.preventDefault()},E=()=>{var D;u||v||(D=d.current)==null||D.click()},M=D=>{const W=D.target.files;if(W&&W.length>0){const O=c?c-t.length:1/0,$=Array.from(W).slice(0,O);if($.length>0){const L=R=>{if(R.length===0)return;const[X,...de]=R;b(X).then(()=>{h.current||L(de)})};L($)}}D.target.value=""},P=(D,W)=>{W.stopPropagation();const O=t.filter(($,L)=>L!==D);n(O),m(null)},T=D=>D<1024?`${D} B`:D<1024*1024?`${(D/1024).toFixed(1)} KB`:`${(D/(1024*1024)).toFixed(1)} MB`,k=[];a&&k.push(l("widget_accepted_hint",{accept:a})),i&&k.push(l("widget_max_size_hint",{max:String(i)})),c&&k.push(`${t.length}${c?`/${c}`:""} file(s)`);const z=k.length>0?k.join(" ยท "):null;return s.jsxs("div",{className:"cj-space-y-2",children:[s.jsx(Y,{className:"cj-text-sm cj-font-medium",children:e}),s.jsx("input",{ref:d,type:"file",className:"cj-hidden",multiple:!0,accept:a,onChange:M}),s.jsxs("div",{className:"cj-space-y-2",children:[t.length>0&&s.jsx("ul",{className:"cj-space-y-1",children:t.map((D,W)=>s.jsxs("li",{className:"cj-flex cj-items-center cj-gap-2 cj-p-2 cj-bg-muted/50 cj-rounded-md cj-text-sm",children:[s.jsx(Yl,{className:"cj-h-4 cj-w-4 cj-text-muted-foreground cj-shrink-0"}),s.jsxs("div",{className:"cj-flex-1 cj-min-w-0",children:[D.url?s.jsx("a",{href:D.url,target:"_blank",rel:"noopener noreferrer",className:"cj-text-primary cj-underline cj-truncate cj-block",title:D.filename,onClick:O=>O.stopPropagation(),children:D.filename}):s.jsx("span",{className:"cj-truncate cj-block",title:D.filename,children:D.filename}),s.jsxs("div",{className:"cj-flex cj-gap-2 cj-text-xs cj-text-muted-foreground cj-mt-0.5",children:[D.size&&s.jsx("span",{children:T(D.size)}),D.mimetype&&s.jsx("span",{className:"cj-uppercase",children:D.mimetype.split("/")[1]||D.mimetype})]})]}),s.jsx("button",{type:"button",onClick:O=>P(W,O),className:"cj-text-muted-foreground hover:cj-text-foreground cj-p-1 cj-rounded cj-transition-colors cj-shrink-0",title:"Remove file",children:s.jsx(Tt,{className:"cj-h-3.5 cj-w-3.5"})})]},W))}),s.jsx("div",{ref:_,onDrop:x,onDragOver:C,onClick:E,className:`cj-border-2 cj-border-dashed cj-rounded-lg cj-p-6 cj-text-center cj-transition-colors ${v?"cj-border-muted/30 cj-cursor-not-allowed cj-opacity-50":u?"cj-border-muted-foreground/25 cj-cursor-wait cj-opacity-60":f?"cj-border-destructive/50 cj-cursor-pointer hover:cj-border-destructive/75":"cj-border-muted-foreground/25 cj-cursor-pointer hover:cj-border-muted-foreground/50"}`,children:u?s.jsxs(s.Fragment,{children:[s.jsx(Fo,{className:"cj-h-8 cj-w-8 cj-mx-auto cj-text-muted-foreground cj-mb-2 cj-animate-spin"}),s.jsx("p",{className:"cj-text-sm cj-text-muted-foreground",children:l("upload_uploading")})]}):s.jsxs(s.Fragment,{children:[s.jsx(Es,{className:"cj-h-8 cj-w-8 cj-mx-auto cj-text-muted-foreground cj-mb-2"}),s.jsx("p",{className:"cj-text-sm cj-text-muted-foreground",children:l("upload_drag_drop_multiple")}),!v&&c&&s.jsxs("p",{className:"cj-text-xs cj-text-muted-foreground cj-mt-1",children:[t.length," / ",c," file(s)"]}),v&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-mt-1 cj-font-medium cj-text-amber-600",children:l("upload_max_reached",{max:String(c)})})]})})]}),f&&s.jsxs("p",{className:"cj-text-xs cj-text-destructive cj-flex cj-items-center cj-gap-1",children:[s.jsx(Ps,{className:"cj-h-3 cj-w-3"})," ",f]}),(o||z)&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:o||z})]})}function $k(e){return typeof e=="object"&&e!==null&&"filename"in e&&"url"in e}const Ya=[{code:"US",name:"United States",dial:"+1",flag:"๐บ๐ธ"},{code:"GB",name:"United Kingdom",dial:"+44",flag:"๐ฌ๐ง"},{code:"CA",name:"Canada",dial:"+1",flag:"๐จ๐ฆ"},{code:"AU",name:"Australia",dial:"+61",flag:"๐ฆ๐บ"},{code:"DE",name:"Germany",dial:"+49",flag:"๐ฉ๐ช"},{code:"FR",name:"France",dial:"+33",flag:"๐ซ๐ท"},{code:"IT",name:"Italy",dial:"+39",flag:"๐ฎ๐น"},{code:"ES",name:"Spain",dial:"+34",flag:"๐ช๐ธ"},{code:"PT",name:"Portugal",dial:"+351",flag:"๐ต๐น"},{code:"NL",name:"Netherlands",dial:"+31",flag:"๐ณ๐ฑ"},{code:"BE",name:"Belgium",dial:"+32",flag:"๐ง๐ช"},{code:"CH",name:"Switzerland",dial:"+41",flag:"๐จ๐ญ"},{code:"AT",name:"Austria",dial:"+43",flag:"๐ฆ๐น"},{code:"SE",name:"Sweden",dial:"+46",flag:"๐ธ๐ช"},{code:"NO",name:"Norway",dial:"+47",flag:"๐ณ๐ด"},{code:"DK",name:"Denmark",dial:"+45",flag:"๐ฉ๐ฐ"},{code:"FI",name:"Finland",dial:"+358",flag:"๐ซ๐ฎ"},{code:"IE",name:"Ireland",dial:"+353",flag:"๐ฎ๐ช"},{code:"PL",name:"Poland",dial:"+48",flag:"๐ต๐ฑ"},{code:"CZ",name:"Czech Republic",dial:"+420",flag:"๐จ๐ฟ"},{code:"RO",name:"Romania",dial:"+40",flag:"๐ท๐ด"},{code:"HU",name:"Hungary",dial:"+36",flag:"๐ญ๐บ"},{code:"GR",name:"Greece",dial:"+30",flag:"๐ฌ๐ท"},{code:"TR",name:"Turkey",dial:"+90",flag:"๐น๐ท"},{code:"RU",name:"Russia",dial:"+7",flag:"๐ท๐บ"},{code:"JP",name:"Japan",dial:"+81",flag:"๐ฏ๐ต"},{code:"KR",name:"South Korea",dial:"+82",flag:"๐ฐ๐ท"},{code:"CN",name:"China",dial:"+86",flag:"๐จ๐ณ"},{code:"IN",name:"India",dial:"+91",flag:"๐ฎ๐ณ"},{code:"PK",name:"Pakistan",dial:"+92",flag:"๐ต๐ฐ"},{code:"BD",name:"Bangladesh",dial:"+880",flag:"๐ง๐ฉ"},{code:"ID",name:"Indonesia",dial:"+62",flag:"๐ฎ๐ฉ"},{code:"MY",name:"Malaysia",dial:"+60",flag:"๐ฒ๐พ"},{code:"SG",name:"Singapore",dial:"+65",flag:"๐ธ๐ฌ"},{code:"PH",name:"Philippines",dial:"+63",flag:"๐ต๐ญ"},{code:"TH",name:"Thailand",dial:"+66",flag:"๐น๐ญ"},{code:"VN",name:"Vietnam",dial:"+84",flag:"๐ป๐ณ"},{code:"AE",name:"UAE",dial:"+971",flag:"๐ฆ๐ช"},{code:"SA",name:"Saudi Arabia",dial:"+966",flag:"๐ธ๐ฆ"},{code:"IL",name:"Israel",dial:"+972",flag:"๐ฎ๐ฑ"},{code:"EG",name:"Egypt",dial:"+20",flag:"๐ช๐ฌ"},{code:"ZA",name:"South Africa",dial:"+27",flag:"๐ฟ๐ฆ"},{code:"NG",name:"Nigeria",dial:"+234",flag:"๐ณ๐ฌ"},{code:"KE",name:"Kenya",dial:"+254",flag:"๐ฐ๐ช"},{code:"BR",name:"Brazil",dial:"+55",flag:"๐ง๐ท"},{code:"MX",name:"Mexico",dial:"+52",flag:"๐ฒ๐ฝ"},{code:"AR",name:"Argentina",dial:"+54",flag:"๐ฆ๐ท"},{code:"CO",name:"Colombia",dial:"+57",flag:"๐จ๐ด"},{code:"CL",name:"Chile",dial:"+56",flag:"๐จ๐ฑ"},{code:"PE",name:"Peru",dial:"+51",flag:"๐ต๐ช"},{code:"NZ",name:"New Zealand",dial:"+64",flag:"๐ณ๐ฟ"}];function Lk({label:e,value:t,onChange:n,placeholder:r,helpText:o,onValidationChange:a}){const{t:i}=ve(),[c,l]=y.useState(null),[d,u]=y.useState(Ya[0]),[p,f]=y.useState(""),[m,_]=y.useState(!1),h=y.useMemo(()=>t?t.startsWith(d.dial)?t.slice(d.dial.length).trimStart():t.replace(/^\+\d+\s*/,""):"",[t,d.dial]),j=y.useMemo(()=>{if(!p)return Ya;const N=p.toLowerCase();return Ya.filter(S=>S.name.toLowerCase().includes(N)||S.code.toLowerCase().includes(N)||S.dial.includes(N))},[p]),v=N=>{const S=!!N&&!/^[\d\s\-()]{4,20}$/.test(N);l(S?i("widget_invalid_phone"):null),a==null||a(S)};y.useEffect(()=>{v(h)},[]);const b=N=>{const S=N.replace(/[^\d\s\-()]/g,""),x=S?`${d.dial} ${S}`:"";n(x),v(S)},w=N=>{u(N),_(!1),f(""),h&&n(`${N.dial} ${h}`)};return s.jsxs("div",{className:"cj-space-y-2",children:[s.jsx(Y,{className:"cj-text-sm cj-font-medium",children:e}),s.jsxs("div",{className:"cj-flex cj-gap-1.5",children:[s.jsxs(ma,{open:m,onOpenChange:_,children:[s.jsx(pa,{asChild:!0,children:s.jsxs(te,{variant:"outline",role:"combobox","aria-expanded":m,className:"cj-w-[100px] cj-justify-between cj-px-2 cj-shrink-0",children:[s.jsx("span",{className:"cj-text-base cj-leading-none",children:d.flag}),s.jsx("span",{className:"cj-text-xs cj-text-muted-foreground",children:d.dial}),s.jsx(Ht,{className:"cj-h-3 cj-w-3 cj-opacity-50"})]})}),s.jsxs(qr,{className:"cj-w-[260px] cj-p-0",align:"start",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-border-b cj-px-3 cj-py-2",children:[s.jsx(Gl,{className:"cj-h-4 cj-w-4 cj-shrink-0 cj-text-muted-foreground cj-mr-2"}),s.jsx("input",{placeholder:i("widget_search_country"),value:p,onChange:N=>f(N.target.value),className:"cj-flex-1 cj-bg-transparent cj-text-sm cj-outline-none placeholder:cj-text-muted-foreground"})]}),s.jsx(qt,{className:"cj-h-[200px]",children:s.jsxs("div",{className:"cj-p-1",children:[j.map(N=>s.jsxs("button",{onClick:()=>w(N),className:`cj-flex cj-w-full cj-items-center cj-gap-2 cj-rounded-sm cj-px-3 cj-py-2.5 cj-text-sm hover:cj-bg-accent hover:cj-text-accent-foreground cj-cursor-pointer cj-transition-colors ${d.code===N.code?"cj-bg-accent":""}`,children:[s.jsx("span",{className:"cj-text-base",children:N.flag}),s.jsx("span",{className:"cj-flex-1 cj-text-left cj-truncate",children:N.name}),s.jsx("span",{className:"cj-text-xs cj-text-muted-foreground",children:N.dial})]},N.code)),j.length===0&&s.jsx("p",{className:"cj-py-4 cj-text-center cj-text-sm cj-text-muted-foreground",children:i("widget_no_country")})]})})]})]}),s.jsx(pe,{type:"tel",value:h,onChange:N=>b(N.target.value),placeholder:r||i("placeholder_phone"),className:"cj-flex-1"})]}),c&&s.jsx("p",{className:"cj-text-xs cj-text-destructive",children:c}),!c&&o&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:o})]})}function Bk({label:e,value:t,onChange:n,placeholder:r,helpText:o,onValidationChange:a}){const{t:i}=ve(),[c,l]=y.useState(null),d=p=>{const f=!!p&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p);l(f?i("widget_invalid_email"):null),a==null||a(f)};y.useEffect(()=>{d(t)},[]);const u=p=>{const f=p.trim();n(f),d(f)};return s.jsxs("div",{className:"cj-space-y-2",children:[s.jsx(Y,{className:"cj-text-sm cj-font-medium",children:e}),s.jsxs("div",{className:"cj-relative",children:[s.jsx(H_,{className:"cj-absolute cj-left-3 cj-top-1/2 -cj-translate-y-1/2 cj-h-4 cj-w-4 cj-text-muted-foreground"}),s.jsx(pe,{type:"email",value:t,onChange:p=>u(p.target.value),placeholder:r||i("placeholder_email"),className:"cj-pl-9"})]}),c&&s.jsx("p",{className:"cj-text-xs cj-text-destructive",children:c}),!c&&o&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:o})]})}let bs=!1,io=!1;const Va=[];function Hk(e){return bs?Promise.resolve():io?new Promise(t=>{Va.push(t)}):(io=!0,new Promise((t,n)=>{const r=document.createElement("script");r.src=`https://maps.googleapis.com/maps/api/js?key=${e}&libraries=places`,r.async=!0,r.onload=()=>{bs=!0,io=!1,t(),Va.forEach(o=>o()),Va.length=0},r.onerror=()=>{io=!1,n(new Error("Failed to load Google Maps"))},document.head.appendChild(r)}))}function qk({label:e,value:t,onChange:n,onValidationChange:r,googleMapsApiKey:o}){const{t:a}=ve(),[i,c]=y.useState(""),[l,d]=y.useState([]),[u,p]=y.useState(!1),[f,m]=y.useState(!1),[_,h]=y.useState(bs),[j,v]=y.useState(!1),b=y.useRef(null),w=y.useRef(null),N=y.useRef(null),S=y.useRef();y.useEffect(()=>{if(t)try{const P=JSON.parse(t);P.address&&c(P.address)}catch{t&&c(t)}},[]),y.useEffect(()=>{if(!o){v(!0);return}Hk(o).then(()=>{h(!0),b.current=new window.google.maps.places.AutocompleteService,w.current=new window.google.maps.Geocoder}).catch(()=>v(!0))},[o]),y.useEffect(()=>{const P=T=>{N.current&&!N.current.contains(T.target)&&m(!1)};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[]);const x=y.useCallback(P=>{if(!b.current||P.length<3){d([]);return}p(!0),b.current.getPlacePredictions({input:P},(T,k)=>{p(!1),k===window.google.maps.places.PlacesServiceStatus.OK&&T?(d(T.map(z=>({place_id:z.place_id,description:z.description}))),m(!0)):d([])})},[]),C=P=>{const T=P.target.value;if(c(T),!T){n(""),d([]),m(!1);return}clearTimeout(S.current),S.current=setTimeout(()=>x(T),300)},E=P=>{m(!1),c(P.description),d([]),w.current&&w.current.geocode({placeId:P.place_id},(T,k)=>{if(k===window.google.maps.GeocoderStatus.OK&&(T!=null&&T[0])){const z=T[0].geometry.location,D={address:P.description,latitude:z.lat(),longitude:z.lng()};n(JSON.stringify(D))}else n(JSON.stringify({address:P.description,latitude:0,longitude:0}))})},M=()=>{c(""),n(""),d([]),m(!1)};return j||!o?s.jsxs("div",{className:"cj-space-y-2",children:[s.jsx(Y,{children:e}),s.jsxs("div",{className:"cj-p-3 cj-border cj-border-dashed cj-rounded-lg cj-text-center cj-text-muted-foreground cj-text-sm",children:[s.jsx(ba,{className:"cj-h-5 cj-w-5 cj-mx-auto cj-mb-1 cj-opacity-50"}),a("location_no_api_key")]})]}):s.jsxs("div",{className:"cj-space-y-2",ref:N,children:[s.jsx(Y,{children:e}),s.jsxs("div",{className:"cj-relative",children:[s.jsx(ba,{className:"cj-absolute cj-left-3 cj-top-1/2 cj--translate-y-1/2 cj-h-4 cj-w-4 cj-text-muted-foreground"}),s.jsx(pe,{value:i,onChange:C,onFocus:()=>l.length>0&&m(!0),placeholder:a("location_placeholder"),className:"cj-pl-9 cj-pr-8",disabled:!_}),u&&s.jsx(Fo,{className:"cj-absolute cj-right-3 cj-top-1/2 cj--translate-y-1/2 cj-h-4 cj-w-4 cj-animate-spin cj-text-muted-foreground"}),!u&&i&&s.jsx("button",{type:"button",onClick:M,className:"cj-absolute cj-right-3 cj-top-1/2 cj--translate-y-1/2 cj-text-muted-foreground hover:cj-text-foreground",children:s.jsx(Tt,{className:"cj-h-4 cj-w-4"})}),f&&l.length>0&&s.jsx("div",{className:"cj-absolute cj-z-50 cj-mt-1 cj-w-full cj-rounded-md cj-border cj-bg-popover cj-shadow-md cj-max-h-60 cj-overflow-y-auto",children:l.map(P=>s.jsxs("button",{type:"button",onClick:()=>E(P),className:"cj-w-full cj-text-left cj-px-3 cj-py-3 cj-text-sm hover:cj-bg-accent hover:cj-text-accent-foreground cj-flex cj-items-start cj-gap-2 cj-transition-colors",children:[s.jsx(ba,{className:"cj-h-4 cj-w-4 cj-mt-0.5 cj-shrink-0 cj-text-muted-foreground"}),s.jsx("span",{children:P.description})]},P.place_id))})]})]})}function Yk(e){if(typeof e=="boolean")return e;if(e==="true"||e==="1"||e===1)return!0;if(e==="false"||e==="0"||e===0)return!1}function Vk({label:e,value:t,onChange:n,helpText:r,variant:o="switch",options:a}){var u,p;const{t:i}=ve(),c=Yk(t),l=((u=a==null?void 0:a[0])==null?void 0:u.label)??i("widget_yes"),d=((p=a==null?void 0:a[1])==null?void 0:p.label)??i("widget_no");return o==="segmented"?s.jsxs("div",{className:"cj-space-y-2",children:[e&&s.jsx(Y,{className:"cj-text-sm cj-font-medium",children:e}),s.jsx("div",{role:"radiogroup",className:"cj-grid cj-grid-cols-2 cj-gap-2",children:[{val:!0,label:l},{val:!1,label:d}].map(f=>{const m=c===f.val;return s.jsx("button",{type:"button",role:"radio","aria-checked":m,onClick:()=>n(f.val),className:["cj-flex cj-items-center cj-justify-center cj-text-center","cj-min-h-12 cj-px-4 cj-py-3 cj-rounded-xl cj-border cj-text-sm cj-font-medium","cj-transition-colors",m?"cj-border-primary cj-bg-primary/10 cj-text-primary":"cj-border-border/40 cj-bg-card cj-text-foreground hover:cj-bg-accent/50"].join(" "),children:f.label},String(f.val))})}),r&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r})]}):s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-rounded-xl cj-border cj-border-border/40 cj-bg-card cj-px-4 cj-py-3.5",children:[s.jsxs("div",{className:"cj-flex-1 cj-pr-3",children:[e&&s.jsx(Y,{className:"cj-text-sm cj-font-medium cj-text-foreground",children:e}),r&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-mt-1",children:r})]}),s.jsx(Vt,{checked:c===!0,onCheckedChange:f=>n(!!f)})]})}const Uk={text:"v1_string",textarea:"v1_string",select:"v2_single_option_select-1",radio:"v2_single_option_select-1",datepicker:"v2_date-1",timepicker:"v2_time-1",datetimepicker:"v2_datetime-1",currency:"v2_currency-1",upload:"v2_single_asset_upload",email:"v2_email-1",phone:"v2_phone-1",location:"v2_address_coordinates",boolean:"v2_boolean-1",switch:"v2_boolean-1"};function Gk({nodeData:e,value:t,onChange:n,onValidationChange:r,onFileSelect:o,questionKey:a,googleMapsApiKey:i,hideLabel:c=!1}){var v,b,w,N,S,x;const{t:l}=ve(),{schema:d,label:u,options:p}=e,f=c?"":e.required?`${e.labelOverride||u} *`:e.labelOverride||u,m=t!=null?String(t):"",_=e.widget&&Uk[e.widget]||d,h=_==="v2_single_asset_upload"&&((v=e.uploadConfig)==null?void 0:v.multiple)===!0,j=y.useCallback(C=>o==null?void 0:o(C,a??e.namespace),[o,a,e.namespace]);switch(_){case"v1_string":return s.jsx(Nw,{label:f,value:m,onChange:n,multiline:e.widget==="textarea"});case"v2_single_option_select-1":return!p||p.length===0?s.jsx("div",{className:"cj-text-sm cj-text-muted-foreground",children:l("widget_no_options")}):s.jsx(Ow,{label:f,value:m,onChange:n,options:p,variant:e.ui_variant??"auto"});case"v2_date-1":return s.jsx(Dk,{label:f,value:m,onChange:n,allowFuture:e.allowFuture});case"v2_time-1":return s.jsx(Rk,{label:f,value:m,onChange:n});case"v2_datetime-1":return s.jsx(Ok,{label:f,value:m,onChange:n,allowFuture:e.allowFuture??!0});case"v2_currency-1":return s.jsx(zk,{label:f,value:m,onChange:n});case"v2_single_asset_upload":if(h){const C=Array.isArray(t)?t:[];return s.jsx(Fk,{label:f,value:C,onChange:n,onFileSelect:j,accept:(b=e.uploadConfig)==null?void 0:b.accept,maxSizeMB:(w=e.uploadConfig)==null?void 0:w.maxSizeMB,maxFiles:(N=e.uploadConfig)==null?void 0:N.maxFiles})}return s.jsx(Wk,{label:f,value:typeof t=="object"&&t!==null&&"filename"in t?t:m,onChange:n,onFileSelect:j,accept:(S=e.uploadConfig)==null?void 0:S.accept,maxSizeMB:(x=e.uploadConfig)==null?void 0:x.maxSizeMB});case"v2_multi_asset_upload":return null;case"v2_phone-1":return s.jsx(Lk,{label:f,value:m,onChange:n,onValidationChange:r});case"v2_email-1":return s.jsx(Bk,{label:f,value:m,onChange:n,onValidationChange:r});case"v2_address_coordinates":return s.jsx(qk,{label:f,value:m,onChange:n,onValidationChange:r,googleMapsApiKey:i});case"v2_boolean-1":return s.jsx(Vk,{label:f,value:t,onChange:n,options:p,variant:e.ui_variant??"switch"});default:return s.jsxs("div",{className:"cj-p-4 cj-border cj-border-dashed cj-rounded-lg cj-text-center cj-text-muted-foreground",children:[s.jsx("p",{className:"cj-text-sm",children:l("widget_unknown_schema",{schema:d})}),s.jsx("p",{className:"cj-text-xs cj-mt-1",children:l("widget_no_widget")})]})}}var Xk=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Kk(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lp={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Xk,function(){Array.isArray||(Array.isArray=function(a){return Object.prototype.toString.call(a)==="[object Array]"});function n(a){for(var i=[],c=0,l=a.length;c<l;c++)i.indexOf(a[c])===-1&&i.push(a[c]);return i}var r={},o={"==":function(a,i){return a==i},"===":function(a,i){return a===i},"!=":function(a,i){return a!=i},"!==":function(a,i){return a!==i},">":function(a,i){return a>i},">=":function(a,i){return a>=i},"<":function(a,i,c){return c===void 0?a<i:a<i&&i<c},"<=":function(a,i,c){return c===void 0?a<=i:a<=i&&i<=c},"!!":function(a){return r.truthy(a)},"!":function(a){return!r.truthy(a)},"%":function(a,i){return a%i},log:function(a){return console.log(a),a},in:function(a,i){return!i||typeof i.indexOf>"u"?!1:i.indexOf(a)!==-1},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(a,i,c){if(c<0){var l=String(a).substr(i);return l.substr(0,l.length+c)}return String(a).substr(i,c)},"+":function(){return Array.prototype.reduce.call(arguments,function(a,i){return parseFloat(a,10)+parseFloat(i,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(a,i){return parseFloat(a,10)*parseFloat(i,10)})},"-":function(a,i){return i===void 0?-a:a-i},"/":function(a,i){return a/i},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(a,i){return a.concat(i)},[])},var:function(a,i){var c=i===void 0?null:i,l=this;if(typeof a>"u"||a===""||a===null)return l;for(var d=String(a).split("."),u=0;u<d.length;u++)if(l==null||(l=l[d[u]],l===void 0))return c;return l},missing:function(){for(var a=[],i=Array.isArray(arguments[0])?arguments[0]:arguments,c=0;c<i.length;c++){var l=i[c],d=r.apply({var:l},this);(d===null||d==="")&&a.push(l)}return a},missing_some:function(a,i){var c=r.apply({missing:i},this);return i.length-c.length>=a?[]:c}};return r.is_logic=function(a){return typeof a=="object"&&a!==null&&!Array.isArray(a)&&Object.keys(a).length===1},r.truthy=function(a){return Array.isArray(a)&&a.length===0?!1:!!a},r.get_operator=function(a){return Object.keys(a)[0]},r.get_values=function(a){return a[r.get_operator(a)]},r.apply=function(a,i){if(Array.isArray(a))return a.map(function(j){return r.apply(j,i)});if(!r.is_logic(a))return a;var c=r.get_operator(a),l=a[c],d,u,p,f,m;if(Array.isArray(l)||(l=[l]),c==="if"||c=="?:"){for(d=0;d<l.length-1;d+=2)if(r.truthy(r.apply(l[d],i)))return r.apply(l[d+1],i);return l.length===d+1?r.apply(l[d],i):null}else if(c==="and"){for(d=0;d<l.length;d+=1)if(u=r.apply(l[d],i),!r.truthy(u))return u;return u}else if(c==="or"){for(d=0;d<l.length;d+=1)if(u=r.apply(l[d],i),r.truthy(u))return u;return u}else{if(c==="filter")return f=r.apply(l[0],i),p=l[1],Array.isArray(f)?f.filter(function(j){return r.truthy(r.apply(p,j))}):[];if(c==="map")return f=r.apply(l[0],i),p=l[1],Array.isArray(f)?f.map(function(j){return r.apply(p,j)}):[];if(c==="reduce")return f=r.apply(l[0],i),p=l[1],m=typeof l[2]<"u"?r.apply(l[2],i):null,Array.isArray(f)?f.reduce(function(j,v){return r.apply(p,{current:v,accumulator:j})},m):m;if(c==="all"){if(f=r.apply(l[0],i),p=l[1],!Array.isArray(f)||!f.length)return!1;for(d=0;d<f.length;d+=1)if(!r.truthy(r.apply(p,f[d])))return!1;return!0}else if(c==="none"){if(f=r.apply(l[0],i),p=l[1],!Array.isArray(f)||!f.length)return!0;for(d=0;d<f.length;d+=1)if(r.truthy(r.apply(p,f[d])))return!1;return!0}else if(c==="some"){if(f=r.apply(l[0],i),p=l[1],!Array.isArray(f)||!f.length)return!1;for(d=0;d<f.length;d+=1)if(r.truthy(r.apply(p,f[d])))return!0;return!1}}if(l=l.map(function(j){return r.apply(j,i)}),o.hasOwnProperty(c)&&typeof o[c]=="function")return o[c].apply(i,l);if(c.indexOf(".")>0){var _=String(c).split("."),h=o;for(d=0;d<_.length;d++){if(!h.hasOwnProperty(_[d]))throw new Error("Unrecognized operation "+c+" (failed at "+_.slice(0,d+1).join(".")+")");h=h[_[d]]}return h.apply(i,l)}throw new Error("Unrecognized operation "+c)},r.uses_data=function(a){var i=[];if(r.is_logic(a)){var c=r.get_operator(a),l=a[c];Array.isArray(l)||(l=[l]),c==="var"?i.push(l[0]):l.forEach(function(d){i.push.apply(i,r.uses_data(d))})}return n(i)},r.add_operation=function(a,i){o[a]=i},r.rm_operation=function(a){delete o[a]},r.rule_like=function(a,i){if(i===a||i==="@")return!0;if(i==="number")return typeof a=="number";if(i==="string")return typeof a=="string";if(i==="array")return Array.isArray(a)&&!r.is_logic(a);if(r.is_logic(i)){if(r.is_logic(a)){var c=r.get_operator(i),l=r.get_operator(a);if(c==="@"||c===l)return r.rule_like(r.get_values(a,!1),r.get_values(i,!1))}return!1}if(Array.isArray(i))if(Array.isArray(a)){if(i.length!==a.length)return!1;for(var d=0;d<i.length;d+=1)if(!r.rule_like(a[d],i[d]))return!1;return!0}else return!1;return!1},r})})(Lp);var Jk=Lp.exports;const il=Kk(Jk);function Qk(e,t){if(!t||t.length===0)return e;const n=r=>{const o=t.find(a=>a.data===String(r));return o?o.label:r};return Array.isArray(e)?e.map(n):n(e)}function co(e){return String(e).padStart(2,"0")}function Zk(e,t){const n=`${co(e.getDate())}/${co(e.getMonth()+1)}/${e.getFullYear()}`;return t?`${n} ${co(e.getHours())}:${co(e.getMinutes())}`:n}function eP(e,t,n){if(e==null||e==="")return"โ";if(Array.isArray(e))return e.length===0?"โ":e.map(a=>typeof a=="object"&&a!==null&&"filename"in a?a.filename:String(a)).join(", ");if(typeof e=="object"&&e!==null&&"filename"in e&&"url"in e)return e.filename;const r=Qk(e,n);switch(t){case"currency":return typeof r=="number"?new Intl.NumberFormat(void 0,{style:"currency",currency:"EUR"}).format(r):String(r);case"date":case"datetime":try{const o=new Date(String(r));return Zk(o,t==="datetime")}catch{return String(r)}default:return Array.isArray(r)?r.join(", "):String(r)}}function tP(e){if(typeof e=="number")return e;if(typeof e=="string"){const t=e.trim().replace(/\s/g,"").replace(",","."),n=parseFloat(t);return Number.isFinite(n)?n:NaN}return NaN}function nP(e,t){const n=t.filter(i=>typeof i=="number"&&!Number.isNaN(i));if(n.length===0)return null;let r;switch(e.operation){case"sum":r=n.reduce((i,c)=>i+c,0);break;case"subtract":r=n.slice(1).reduce((i,c)=>i-c,n[0]);break;case"multiply":r=n.reduce((i,c)=>i*c,1);break;case"divide":r=n.slice(1).reduce((i,c)=>c===0?NaN:i/c,n[0]);break;default:return null}if(!Number.isFinite(r))return null;const o=e.precision??2,a=Math.pow(10,Math.max(0,Math.min(10,o)));return Math.round(r*a)/a}function rP(e,t){var o;if(t===null)return"โ";if(e.schema==="v2_currency-1"||e.widget==="currency")try{return new Intl.NumberFormat(void 0,{style:"currency",currency:"EUR"}).format(t)}catch{return String(t)}const r=((o=e.computed)==null?void 0:o.precision)??2;return t.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:r})}function po(e){var t;return!!(e.computed&&((t=e.computed.operand_field_ids)!=null&&t.length))}function oP(e){return{specId:e.specId||"custom",namespace:e.namespace,label:e.label,labelOverride:e.labelOverride,schema:e.schema,options:e.options??null,actor:e.actor||"customer",bindings:e.bindings||[{target_namespace:e.namespace}],widget:e.widget,required:!!e.required,uploadConfig:e.uploadConfig,allowFuture:e.allowFuture,ui_variant:e.ui_variant}}function aP(e){return ow(e,".jb-widget-root.jb-themed")}function Mi(e,t){var n;return!!(e==null||e===""||Array.isArray(e)&&((n=t.uploadConfig)==null?void 0:n.multiple)===!0&&e.length===0)}function jn(e,t){const n=e.bindings;return n!=null&&n.length?t[n[0].target_namespace]:t[e.namespace]}function sP(e,t,n){const r={...n},o=e.bindings;if(o!=null&&o.length)for(const a of o)r[a.target_namespace]=t;else r[e.namespace]=t;return r}function cl(e,t){return e.replace(/\{\{\s*answers\.([\w.]+)\s*\}\}/g,(n,r)=>{const o=t[r];return o==null?"":typeof o=="object"?JSON.stringify(o):String(o)})}function Di(e,t){if(!t)return e;const n=t.split(".");let r=e;for(const o of n)if(r&&typeof r=="object")r=r[o];else return;return r}function iP(e){const{journey:t}=e,n=y.useMemo(()=>t.form_config?Ua(t.form_config):dl(t),[t]),r=y.useMemo(()=>aP(t.theme),[t.theme]);return s.jsxs(s.Fragment,{children:[r&&s.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),s.jsx(cP,{...e,formConfig:n})]})}function cP({formConfig:e,onSubmit:t,onSave:n,onProgressChange:r,autoSaveOnStepChange:o=!0,onFileSelect:a,onStepApiCall:i,onStepApiError:c,onInitApiCall:l,enrichedOutput:d=!1,initialAnswers:u,googleMapsApiKey:p,fullScreen:f=!0,showWelcome:m=!0,showSummaryPanel:_}){const{t:h}=ve(),{steps:j,fields:v,summary:b,init:w}=e,N=_??b.show_sidebar??!0,S=y.useMemo(()=>{const q=new Map;for(const Z of v)q.set(Z.field_id,Z);return q},[v]),[x,C]=y.useState(()=>({...(w==null?void 0:w.values)||{},...u||{}})),[E,M]=y.useState({}),[P,T]=y.useState(j[0]?[j[0].step_id]:[]),[k,z]=y.useState(m?"welcome":"form"),[D,W]=y.useState(!1),[O,$]=y.useState(!1);y.useEffect(()=>{var Z;if(!((Z=w==null?void 0:w.api)!=null&&Z.enabled)||!w.api.url)return;let q=!1;return(async()=>{try{const he=w.api.method||"GET",re=w.api.url,_e=l?await l({method:he,url:re}):await fetch(re,{method:he}).then(We=>We.json());if(q)return;const Ce=w.api.mapping||{},we={};for(const[We,vt]of Object.entries(Ce))we[We]=Di(_e,vt);C(We=>({...We,...we}))}catch(he){console.error("[FormRunner] init API failed",he)}})(),()=>{q=!0}},[]);const L=P[P.length-1],R=j.find(q=>q.step_id===L),X=R?j.findIndex(q=>q.step_id===R.step_id):-1,de=y.useCallback(q=>{var he,re;const Z={...q};for(const _e of v){const Ce=(re=(he=_e.bindings)==null?void 0:he[0])==null?void 0:re.target_namespace,we=Ce?q[Ce]:q[_e.namespace];_e.namespace&&Z[_e.namespace]===void 0&&we!==void 0&&(Z[_e.namespace]=we)}return Z},[v]),ie=y.useCallback((q,Z,he)=>{if(q==null)return he;try{return!!il.apply(q,{answers:de(Z)})}catch(re){return console.warn("[FormRunner] field condition eval error",re),he}},[de]),I=y.useCallback((q,Z)=>ie(q.visibleWhen,Z,!0),[ie]),F=y.useCallback((q,Z)=>ie(q.enabledWhen,Z,!0),[ie]),U=y.useCallback((q,Z)=>q.requiredWhen!==null&&q.requiredWhen!==void 0?ie(q.requiredWhen,Z,!1):!!q.required,[ie]);y.useEffect(()=>{var Z,he;if(!R)return;const q=[];for(const re of R.rows)for(const _e of re.field_ids){const Ce=S.get(_e);if(Ce&&!po(Ce)&&!I(Ce,x)){const we=((he=(Z=Ce.bindings)==null?void 0:Z[0])==null?void 0:he.target_namespace)||Ce.namespace;x[we]!==void 0&&x[we]!==null&&x[we]!==""&&q.push(we)}}q.length!==0&&C(re=>{const _e={...re};for(const Ce of q)delete _e[Ce];return _e})},[x,R,S,I]);const K=y.useCallback((q,Z)=>{C(he=>sP(q,Z,he))},[]),A=y.useCallback((q,Z)=>a==null?void 0:a(q,Z),[a]);y.useEffect(()=>{var he,re;const q=v.filter(po);if(q.length===0)return;const Z={};for(const _e of q){const Ce=(_e.computed.operand_field_ids||[]).map(Ge=>S.get(Ge)).filter(Ge=>!!Ge).map(Ge=>tP(jn(Ge,x))),we=nP(_e.computed,Ce),We=((re=(he=_e.bindings)==null?void 0:he[0])==null?void 0:re.target_namespace)||_e.namespace,vt=x[We];we!==(vt===void 0?null:vt)&&(Z[We]=we)}Object.keys(Z).length!==0&&C(_e=>({..._e,...Z}))},[x,v,S]);const H=y.useCallback(q=>{for(const Z of q.rows)for(const he of Z.field_ids){const re=S.get(he);if(!re||po(re)||!I(re,x)||!U(re,x))continue;const _e=jn(re,x);if(Mi(_e,re))return!1}return!0},[x,S,I,U]),Q=y.useCallback((q,Z)=>{const he=[...q.navigation.rules].sort((re,_e)=>(_e.priority||0)-(re.priority||0));for(const re of he){if(re.condition===null)return re.next_step_id;try{if(il.apply(re.condition,{answers:Z}))return re.next_step_id}catch(_e){console.warn("[FormRunner] rule eval error",_e)}}return"__submit__"},[]),J=y.useMemo(()=>{if(!R)return P;const q=[...P],Z=new Set(q);let he=R;for(;he;){const re=Q(he,x);if(re==="__submit__"||Z.has(re))break;const _e=j.find(Ce=>Ce.step_id===re);if(!_e)break;q.push(re),Z.add(re),he=_e}return q},[x,R,Q,P,j]),ae=k==="form"?P.length:Math.max(X+1,1),ce=Math.max(J.length,ae,1),me=k==="summary"?100:k==="welcome"?0:Math.round(ae/ce*100),be=y.useCallback(q=>{if(!d)return q;const Z={};for(const[he,re]of Object.entries(q)){const _e=v.find(Ce=>{var we;return((we=Ce.bindings)==null?void 0:we.some(We=>We.target_namespace===he))||Ce.namespace===he});Z[he]={data:re,schema:(_e==null?void 0:_e.schema)||"unknown"}}return Z},[d,v]),Ue=y.useCallback(q=>{if(!(!o||!n||!R))return n(be(x),{reason:"step_change",currentStep:R,currentStepIndex:X+1,nextStepId:q})},[x,o,be,X,R,n]);y.useEffect(()=>{!r||!R||r(be(x),{reason:"progress",currentStep:R,currentStepIndex:X+1,stage:k})},[x,be,X,R,r,k]);const Qe=y.useCallback(async()=>{if(!R)return;if(!H(R)){$(!0),Mn.error(h("runner_toast_required_fields"));return}$(!1),window.scrollTo({top:0,behavior:"smooth"});const q=R.navigation.api_call;if(q!=null&&q.enabled&&q.url){const re=cl(q.url,x),_e={"Content-Type":"application/json",...q.headers||{}},Ce=q.body_template?cl(q.body_template,x):void 0,we=q.method!=="GET"&&!!Ce;let We;if(we)try{We=JSON.parse(Ce)}catch{We=Ce}const vt={step_id:R.step_id,method:q.method,url:re,headers:_e,body:We,answers:x};W(!0);try{let bt=null;i?bt=await i(vt):bt=await(await fetch(re,{method:q.method,headers:_e,body:we?Ce:void 0})).json().catch(()=>null),M(Ge=>({...Ge,[R.step_id]:bt}))}catch(bt){if(console.error("[FormRunner] step API failed",bt),c)try{c(bt,vt)}catch(At){console.error("[FormRunner] onStepApiError handler threw",At)}const Ge=q.on_error??"block";if(Ge==="block"){c||Mn.error(h("runner_toast_api_failed")),W(!1);return}if(typeof Ge=="string"&&Ge.startsWith("goto:")){const At=Ge.slice(5);if(W(!1),At==="__submit__")z("summary");else if(P.includes(At))z("summary");else{const bn=Ue(At);bn&&await bn,T(wn=>[...wn,At])}return}}W(!1)}const Z=Q(R,x);if(Z==="__submit__"){z("summary");return}if(P.includes(Z)){z("summary");return}const he=Ue(Z);he&&await he,T(re=>[...re,Z])},[R,x,Q,P,H,i,c,Ue,h]),Ze=y.useCallback(()=>{if(k==="summary"){z("form"),window.scrollTo({top:0,behavior:"smooth"});return}P.length>1&&(T(P.slice(0,-1)),window.scrollTo({top:0,behavior:"smooth"}))},[P,k]),Ie=y.useCallback(()=>{const q=be(x);t?t(q):navigator.clipboard.writeText(JSON.stringify(q,null,2)).then(()=>{Mn.success(h("runner_toast_answers_copied"))})},[x,be,t]),ct=y.useCallback(()=>{C({...(w==null?void 0:w.values)||{}}),M({}),T(j[0]?[j[0].step_id]:[]),z(m?"welcome":"form"),$(!1)},[w,j,m]);return j.length===0?s.jsx("div",{className:`jb-widget-root jb-themed ${f?"cj-min-h-screen":"cj-h-full"} cj-bg-background cj-flex cj-items-center cj-justify-center cj-p-6`,children:s.jsx("p",{className:"cj-text-muted-foreground cj-text-base",children:"No form to display."})}):s.jsxs("div",{className:`jb-widget-root jb-themed ${f?"cj-min-h-screen":"cj-h-full"} cj-flex cj-flex-col cj-bg-background`,style:{fontFamily:"var(--claims-journey-font-body)"},children:[s.jsxs("header",{className:"cj-px-4 cj-py-3 sm:cj-px-6 cj-flex cj-items-center cj-justify-between cj-bg-card cj-border-b cj-border-border/40",children:[s.jsx("span",{className:"cj-text-xs cj-font-medium cj-text-muted-foreground cj-uppercase cj-tracking-wide",children:k==="summary"?b.title||"Summary":k==="welcome"?"":`Step ${ae} of ${ce}`}),s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-3",children:[n&&Object.keys(x).length>0&&k!=="summary"&&s.jsx("button",{onClick:()=>R&&n(be(x),{reason:"manual",currentStep:R,currentStepIndex:X+1}),className:"cj-text-xs cj-text-muted-foreground hover:cj-text-foreground cj-bg-transparent cj-border-none cj-cursor-pointer",children:"Save & exit"}),s.jsxs("button",{onClick:ct,className:"cj-text-xs cj-text-muted-foreground hover:cj-text-foreground cj-bg-transparent cj-border-none cj-cursor-pointer cj-flex cj-items-center cj-gap-1",children:[s.jsx(Ul,{className:"cj-h-3.5 cj-w-3.5"}),"Reset"]})]})]}),s.jsx("div",{className:"cj-px-4 sm:cj-px-6 cj-bg-card",children:s.jsx(Tm,{value:me,className:"cj-h-1 cj-rounded-none"})}),s.jsxs("main",{className:"cj-flex-1 cj-flex cj-flex-col md:cj-flex-row cj-items-stretch cj-w-full",children:[k==="form"&&N&&s.jsx("div",{className:"md:cj-hidden cj-border-b cj-border-border/40 cj-bg-card",children:s.jsx(lP,{formConfig:e,answers:x,apiResponses:E,currentStepIndex:X+1})}),s.jsx("div",{className:`cj-flex-1 ${N?"md:cj-w-[70%]":"md:cj-w-full"} cj-flex cj-justify-center cj-px-4 sm:cj-px-6 cj-py-6 md:cj-py-8 md:cj-px-3`,children:s.jsx("div",{className:"cj-w-full cj-max-w-4xl",children:k==="welcome"?s.jsx(fP,{onStart:()=>{z("form"),window.scrollTo({top:0,behavior:"smooth"})}}):k==="summary"?s.jsx(uP,{formConfig:e,answers:x,apiResponses:E,currentStepIndex:X+1,onBack:Ze,onSubmit:Ie}):R?s.jsx(dP,{step:R,fields:S,answers:x,onAnswerChange:K,onFileSelect:A,googleMapsApiKey:p,onNext:Qe,onBack:Ze,canGoBack:P.length>1,submitting:D,showValidation:O,stepIndex:ae,isFieldVisible:I,isFieldEnabled:F,isFieldRequired:U}):null})}),k==="form"&&N&&s.jsx("aside",{className:"cj-hidden md:cj-block md:cj-w-[30%] md:cj-shrink-0 cj-self-start cj-sticky cj-top-0 cj-px-4 sm:cj-px-6 cj-py-6 md:cj-py-8 md:cj-px-3",children:s.jsx("div",{className:"cj-rounded-2xl cj-bg-card cj-border cj-border-border/30 cj-p-5 sm:cj-p-7 cj-space-y-5 cj-max-h-[calc(100vh-5rem)] cj-overflow-y-auto",children:s.jsx(Bp,{formConfig:e,answers:x,apiResponses:E,currentStepIndex:X+1})})})]})]})}function Bp({formConfig:e,answers:t,apiResponses:n,currentStepIndex:r}){const{summary:o,fields:a}=e,i=y.useMemo(()=>new Map(a.map(l=>[l.field_id,l])),[a]),c=y.useMemo(()=>{const l=[];if(o.sections.length===0){const d=[];return e.steps.forEach(u=>{u.rows.forEach(p=>{p.field_ids.forEach(f=>{const m=i.get(f);if(!m)return;const _=jn(m,t);d.push({label:m.label||m.namespace,value:ws(_,m.schema,m.options)})})})}),d.length>0&&l.push({id:"all",title:o.title||"Summary",rows:d}),l}return o.sections.forEach(d=>{const u=d.visible_from_step??1,p=d.until_step;if(r<u||p!==void 0&&r>p)return;const f=d.display_fields.map(m=>{let _,h;if(m.source==="form_field"&&m.field_id){const j=i.get(m.field_id);j&&(_=jn(j,t),h=j.options)}else if(m.source==="api_response"&&m.step_id){const j=n[m.step_id];_=Di(j,m.response_path||"")}return{label:m.label||"(label)",value:ws(_,m.format,h)}});l.push({id:d.section_id,title:d.title,rows:f})}),l},[o,e.steps,i,t,n,r]);return s.jsxs("div",{children:[s.jsx("h2",{className:"cj-text-base cj-font-semibold cj-text-foreground cj-mb-6",style:{fontFamily:"var(--claims-journey-font-heading)"},children:o.title||"Summary"}),c.length===0?s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-italic",children:"Suas respostas aparecerรฃo aqui."}):s.jsx("div",{className:"cj-space-y-8",children:c.map((l,d)=>s.jsxs("div",{className:d>0?"cj-pt-8 cj-border-t cj-border-border/40":"",children:[s.jsx("h3",{className:"cj-text-xs cj-font-bold cj-uppercase cj-tracking-wider cj-text-muted-foreground cj-mb-4",children:l.title}),s.jsxs("div",{className:"cj-space-y-4",children:[l.rows.map((u,p)=>s.jsxs("div",{className:"cj-flex cj-flex-col cj-gap-2 cj-text-sm cj-leading-relaxed",children:[s.jsx("span",{className:"cj-text-muted-foreground cj-text-left",children:u.label}),s.jsx("span",{className:`cj-text-right cj-font-medium cj-break-words cj-pl-4 cj-leading-snug ${u.value==="โ"?"cj-text-muted-foreground/60":"cj-text-foreground"}`,children:u.value})]},p)),l.rows.length===0&&s.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-italic",children:"โ"})]})]},l.id))})]})}function lP(e){const[t,n]=y.useState(!1),{formConfig:r,answers:o}=e,a=y.useMemo(()=>{let i=0;const c=new Map(r.fields.map(l=>[l.field_id,l]));return r.steps.forEach(l=>l.rows.forEach(d=>d.field_ids.forEach(u=>{const p=c.get(u);if(!p)return;const f=jn(p,o);f!=null&&f!==""&&i++}))),i},[r,o]);return s.jsxs("div",{children:[s.jsxs("button",{type:"button",onClick:()=>n(i=>!i),className:"cj-w-full cj-flex cj-items-center cj-justify-between cj-px-4 cj-py-3 cj-bg-transparent cj-border-none cj-cursor-pointer",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[s.jsx("div",{className:"cj-h-1.5 cj-w-1.5 cj-rounded-full cj-bg-primary"}),s.jsx("span",{className:"cj-text-xs cj-font-semibold cj-text-foreground",children:r.summary.title||"Summary"}),s.jsxs("span",{className:"cj-text-xs cj-text-muted-foreground",children:["ยท ",a," preenchidos"]})]}),s.jsx(Ht,{className:`cj-h-4 cj-w-4 cj-text-muted-foreground cj-transition-transform ${t?"cj-rotate-180":""}`})]}),t&&s.jsx("div",{className:"cj-px-4 cj-pb-4",children:s.jsx(Bp,{...e})})]})}const ws=eP;function dP({step:e,fields:t,answers:n,onAnswerChange:r,onFileSelect:o,googleMapsApiKey:a,onNext:i,onBack:c,canGoBack:l,submitting:d,showValidation:u,stepIndex:p,isFieldVisible:f,isFieldEnabled:m,isFieldRequired:_}){return s.jsxs("div",{className:"cj-space-y-4",children:[s.jsxs("div",{className:"cj-rounded-2xl cj-bg-card cj-border cj-border-border/30 cj-p-5 sm:cj-p-7 cj-space-y-5",children:[s.jsxs("div",{className:"cj-flex cj-items-center cj-gap-3",children:[s.jsx("div",{className:"cj-h-9 cj-w-9 cj-rounded-full cj-bg-primary cj-text-primary-foreground cj-flex cj-items-center cj-justify-center cj-font-bold cj-text-sm",children:p}),s.jsxs("div",{className:"cj-flex-1 cj-min-w-0",children:[s.jsx("h2",{className:"cj-text-lg cj-font-semibold cj-text-foreground",style:{fontFamily:"var(--claims-journey-font-heading)"},children:e.title}),e.description&&s.jsx("p",{className:"cj-text-sm cj-text-muted-foreground",children:e.description})]})]}),s.jsx("div",{className:"cj-space-y-4",children:e.rows.map(h=>{const j=h.field_ids.map(x=>t.get(x)).filter(x=>!!x).filter(x=>f(x,n));if(j.length===0)return null;const v=Math.min(j.length,3),b=h.layout==="horizontal",w=v===3?2:v===2?3:6,N=x=>{switch(x){case"1/3":return 2;case"1/2":return 3;case"2/3":return 4;case"full":return 6;default:return w}},S=x=>{switch(x){case 2:return"sm:cj-col-span-2";case 3:return"sm:cj-col-span-3";case 4:return"sm:cj-col-span-4";case 6:default:return"sm:cj-col-span-6"}};return s.jsxs("div",{className:"cj-space-y-3",children:[h.show_divider&&s.jsx("hr",{className:"cj-w-full cj-h-0 cj-m-0 cj-border-0 cj-border-t-2 cj-border-dotted cj-border-border","aria-hidden":"true"}),h.title&&s.jsx("h3",{className:"cj-text-base sm:cj-text-lg cj-font-semibold cj-text-foreground cj-leading-tight",children:h.title}),s.jsx("div",{className:b?"cj-grid cj-grid-cols-1 sm:cj-grid-cols-6 cj-gap-3":"cj-flex cj-flex-col cj-gap-3",children:j.map(x=>{const C=jn(x,n),E=m(x,n),M=b?S(N(x.width)):"";if(po(x)){const z=typeof C=="number"?C:null;return s.jsxs("div",{className:`cj-flex cj-flex-col cj-gap-1 ${M} ${E?"":"cj-opacity-60"}`,children:[s.jsx("label",{className:"cj-text-xs cj-font-medium cj-uppercase cj-tracking-wide cj-text-muted-foreground",children:x.labelOverride||x.label}),s.jsx("div",{className:"cj-min-h-[48px] cj-flex cj-items-center cj-rounded-xl cj-bg-muted/40 cj-px-4 cj-py-2 cj-text-base cj-font-semibold cj-text-foreground cj-tabular-nums",children:rP(x,z)})]},x.field_id)}const P=_(x,n),T=u&&P&&Mi(C,x),k={...oP(x),required:P};return s.jsx("div",{className:`${M} ${T?"cj-rounded-xl cj-ring-2 cj-ring-destructive/40 cj-p-2":""} ${E?"":"cj-opacity-60 cj-pointer-events-none"}`,"aria-disabled":!E||void 0,children:s.jsx(Gk,{nodeData:k,value:C,onChange:z=>r(x,z),onFileSelect:o,questionKey:x.namespace,googleMapsApiKey:a})},x.field_id)})})]},h.row_id)})})]}),s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between",children:[s.jsxs(te,{variant:"ghost",size:"sm",onClick:c,disabled:!l||d,className:"cj-text-muted-foreground hover:cj-text-foreground",children:[s.jsx(Bl,{className:"cj-h-4 cj-w-4 cj-mr-1.5"}),"Back"]}),s.jsx(te,{size:"default",onClick:i,disabled:d,className:"cj-rounded-xl cj-px-6",children:d?s.jsxs(s.Fragment,{children:[s.jsx(Fo,{className:"cj-h-4 cj-w-4 cj-mr-1.5 cj-animate-spin"}),"Loadingโฆ"]}):s.jsxs(s.Fragment,{children:[e.navigation.button_label||"Continue",s.jsx(Wo,{className:"cj-h-4 cj-w-4 cj-ml-1.5"})]})})]})]})}function uP({formConfig:e,answers:t,apiResponses:n,currentStepIndex:r,onBack:o,onSubmit:a}){const{t:i}=ve(),{summary:c,fields:l}=e,d=new Map(l.map(_=>[_.field_id,_])),u=_=>typeof _=="object"&&_!==null&&"filename"in _&&"url"in _,p=(_,h,j)=>u(_)&&_.url?s.jsx("a",{href:_.url,target:"_blank",rel:"noopener noreferrer",className:"cj-text-primary cj-underline cj-break-all",onClick:v=>v.stopPropagation(),children:_.filename}):Array.isArray(_)&&_.length>0&&_.every(u)?s.jsx("span",{className:"cj-flex cj-flex-col cj-gap-1",children:_.map((v,b)=>s.jsx("a",{href:v.url,target:"_blank",rel:"noopener noreferrer",className:"cj-text-primary cj-underline cj-break-all",onClick:w=>w.stopPropagation(),children:v.filename},b))}):ws(_,h,j),f=[];e.steps.forEach(_=>{_.rows.forEach(h=>{h.field_ids.forEach(j=>{const v=d.get(j);if(!v)return;const b=jn(v,t);Mi(b,v)||Array.isArray(b)&&b.length===0||f.push({id:j,label:v.label||v.namespace,value:b,format:v.schema,options:v.options})})})});const m=_=>f.length===0?s.jsx("div",{className:"cj-rounded-2xl cj-bg-card cj-border cj-border-border/30 cj-p-6 cj-text-sm cj-text-muted-foreground cj-text-center",children:i("runner_no_answers")}):s.jsxs("div",{className:"cj-rounded-2xl cj-bg-card cj-border cj-border-border/30 cj-overflow-hidden",children:[_&&s.jsx("div",{className:"cj-px-4 cj-py-3 cj-border-b cj-border-border/30 cj-bg-muted/30",children:s.jsx("h3",{className:"cj-text-sm cj-font-semibold",children:i("runner_summary_all_answers")})}),s.jsx("div",{className:"cj-divide-y cj-divide-border/30",children:f.map(h=>s.jsxs("div",{className:"cj-px-4 cj-py-3",children:[s.jsx("div",{className:"cj-text-xs cj-text-muted-foreground cj-font-medium",children:h.label}),s.jsx("div",{className:"cj-text-sm cj-font-medium cj-mt-0.5 cj-break-words",children:p(h.value,h.format,h.options)})]},h.id))})]});return s.jsxs("div",{className:"cj-space-y-4",children:[s.jsxs("div",{className:"cj-rounded-2xl cj-bg-card cj-border cj-border-border/30 cj-p-6 cj-text-center cj-space-y-2",children:[s.jsx(M_,{className:"cj-h-7 cj-w-7 cj-text-primary cj-mx-auto"}),s.jsx("h2",{className:"cj-text-xl cj-font-bold",style:{fontFamily:"var(--claims-journey-font-heading)"},children:c.title||"Summary"})]}),c.sections.length===0?m(!1):c.sections.map(_=>{const h=_.visible_from_step??1,j=_.until_step;return r<h||j!==void 0&&r>j?null:s.jsxs("div",{className:"cj-rounded-2xl cj-bg-card cj-border cj-border-border/30 cj-overflow-hidden",children:[s.jsx("div",{className:"cj-px-4 cj-py-3 cj-border-b cj-border-border/30 cj-bg-muted/30",children:s.jsx("h3",{className:"cj-text-sm cj-font-semibold",children:_.title})}),s.jsxs("div",{className:"cj-divide-y cj-divide-border/30",children:[_.display_fields.map(v=>{let b,w;if(v.source==="form_field"&&v.field_id){const N=d.get(v.field_id);N&&(b=jn(N,t),w=N.options)}else if(v.source==="api_response"&&v.step_id){const N=n[v.step_id];b=Di(N,v.response_path||"")}return s.jsxs("div",{className:"cj-px-4 cj-py-3",children:[s.jsx("div",{className:"cj-text-xs cj-text-muted-foreground cj-font-medium",children:v.label||"(label)"}),s.jsx("div",{className:"cj-text-sm cj-font-medium cj-mt-0.5",children:p(b,v.format,w)})]},v.display_id)}),_.display_fields.length===0&&s.jsx("div",{className:"cj-px-4 cj-py-3 cj-text-xs cj-text-muted-foreground cj-italic",children:"No display fields configured."})]})]},_.section_id)}),c.sections.length>0&&m(!0),s.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-pt-2",children:[s.jsxs(te,{variant:"ghost",size:"sm",onClick:o,className:"cj-text-muted-foreground hover:cj-text-foreground",children:[s.jsx(Bl,{className:"cj-h-4 cj-w-4 cj-mr-1.5"}),"Back"]}),s.jsxs(te,{size:"default",onClick:a,className:"cj-rounded-xl cj-px-6",children:[s.jsx(G_,{className:"cj-h-4 cj-w-4 cj-mr-1.5"}),"Submit"]})]})]})}function fP({onStart:e}){const{t}=ve();return s.jsx("div",{className:"cj-w-full cj-max-w-xl cj-mx-auto cj-py-8",style:{fontFamily:"var(--claims-journey-font-body)"},children:s.jsxs("div",{className:"cj-rounded-2xl cj-bg-card cj-border cj-border-border/40 cj-p-8 sm:cj-p-10 cj-flex cj-flex-col cj-items-center cj-text-center cj-gap-6",children:[s.jsx("div",{className:"cj-h-16 cj-w-16 cj-rounded-full cj-bg-muted cj-flex cj-items-center cj-justify-center",children:s.jsx(I_,{className:"cj-h-7 cj-w-7 cj-text-muted-foreground"})}),s.jsxs("div",{className:"cj-space-y-3",children:[s.jsx("h1",{className:"cj-text-xl sm:cj-text-2xl cj-font-semibold cj-text-foreground",style:{fontFamily:"var(--claims-journey-font-heading)"},children:t("runner_onboarding_line1")}),s.jsx("p",{className:"cj-text-sm cj-text-muted-foreground",children:t("runner_onboarding_line2")})]}),s.jsxs(te,{size:"lg",onClick:e,className:"cj-w-full cj-rounded-xl cj-min-h-[56px] cj-text-base",children:[t("runner_start_claim"),s.jsx(Wo,{className:"cj-h-4 cj-w-4 cj-ml-2"})]})]})})}const mP="http://json-schema.org/draft-07/schema#",pP="https://habit.ai/schemas/form-config.schema.json",hP="FormConfig",_P="v2.0 linear form configuration: ordered steps, a flat field catalog, summary panel, and init values.",gP="object",jP=["steps","fields","summary","init"],yP=!1,xP={steps:{type:"array",items:{$ref:"#/definitions/FormStep"}},fields:{type:"array",items:{$ref:"#/definitions/FormField"}},summary:{$ref:"#/definitions/SummaryPanelConfig"},init:{$ref:"#/definitions/InitConfig"}},vP={HttpMethod:{type:"string",enum:["GET","POST","PUT","PATCH","DELETE"]},JsonLogic:{description:"JSON Logic expression evaluated against { answers, api_responses }. null means 'always true' (default rule).",type:["object","null"]},ClaimPropertySpecOption:{type:"object",required:["data","label"],additionalProperties:!1,properties:{data:{type:"string",description:"Stored value when this option is selected."},label:{type:"string",description:"Human-readable display text."},next:{type:"array",items:{type:"string"}}}},NodeBinding:{type:"object",required:["target_namespace"],additionalProperties:!1,properties:{target_namespace:{type:"string"}}},UploadConfig:{type:"object",additionalProperties:!1,properties:{accept:{type:"string",description:"HTML accept attribute (MIME types or extensions)."},maxSizeMB:{type:"number",minimum:0,description:"Maximum file size in MB."},multiple:{type:"boolean",description:"When true, the field accepts multiple files."},maxFiles:{type:"number",minimum:1,description:"Maximum number of files when multiple is true."}}},FormField:{type:"object",required:["field_id","namespace","label","schema"],additionalProperties:!1,properties:{field_id:{type:"string",description:"Unique id; referenced from FormRow.field_ids."},namespace:{type:"string",description:"Answer key (dot-notation, e.g. 'insured.full_name')."},label:{type:"string"},labelOverride:{type:"string"},specId:{type:"string",description:"Source ClaimPropertySpec id, or 'custom'."},schema:{type:"string",description:"Schema type, e.g. 'v1_string', 'v2_date-1'."},options:{oneOf:[{type:"null"},{type:"array",items:{$ref:"#/definitions/ClaimPropertySpecOption"}}]},widget:{type:"string",description:"Widget override (e.g. 'email', 'textarea', 'phone')."},required:{type:"boolean"},actor:{type:"string",enum:["customer","operator"]},bindings:{type:"array",items:{$ref:"#/definitions/NodeBinding"}},uploadConfig:{$ref:"#/definitions/UploadConfig"},allowFuture:{type:"boolean",description:"Date/datetime widgets only."},placeholder:{type:"string"},helpText:{type:"string"},ui_variant:{type:"string",description:"Visual variant override. single_select: 'radio' | 'radio-horizontal' | 'dropdown' | 'segmented'. boolean: 'switch' | 'segmented'."}}},FormRow:{type:"object",required:["row_id","layout","field_ids"],additionalProperties:!1,properties:{row_id:{type:"string"},layout:{type:"string",enum:["horizontal","vertical"]},field_ids:{type:"array",items:{type:"string"},description:"FK to FormField.field_id."},title:{type:"string",description:"Optional section title rendered above the row."},show_divider:{type:"boolean",description:"Render a dotted divider above the row."}}},NavRule:{type:"object",required:["rule_id","condition","next_step_id"],additionalProperties:!1,properties:{rule_id:{type:"string"},condition:{$ref:"#/definitions/JsonLogic"},next_step_id:{type:"string",description:"Target FormStep.step_id or the literal '__submit__' to finish the form."},priority:{type:"integer",description:"Higher priority rules are evaluated first."}}},StepApiCall:{type:"object",required:["enabled","method","url"],additionalProperties:!1,properties:{enabled:{type:"boolean"},method:{$ref:"#/definitions/HttpMethod"},url:{type:"string",format:"uri"},headers:{type:"object",additionalProperties:{type:"string"}},body_template:{type:"string",description:"JSON string; '{{answers.foo}}' tokens are interpolated by the runner."},on_error:{type:"string",description:"Behavior on failure. 'block' (default) keeps the user on the step; 'continue' runs nav rules; 'goto:<step_id>' jumps to that step.",pattern:"^(block|continue|goto:.+)$",default:"block"}}},StepNavigation:{type:"object",required:["rules"],additionalProperties:!1,properties:{api_call:{$ref:"#/definitions/StepApiCall"},rules:{type:"array",items:{$ref:"#/definitions/NavRule"}},button_label:{type:"string"}}},FormStep:{type:"object",required:["step_id","title","rows","navigation"],additionalProperties:!1,properties:{step_id:{type:"string"},title:{type:"string"},description:{type:"string"},rows:{type:"array",items:{$ref:"#/definitions/FormRow"}},navigation:{$ref:"#/definitions/StepNavigation"}}},SummaryDisplayField:{type:"object",required:["display_id","source","label"],additionalProperties:!1,properties:{display_id:{type:"string"},source:{type:"string",enum:["form_field","api_response"]},field_id:{type:"string",description:"Required when source = 'form_field'."},step_id:{type:"string",description:"Required when source = 'api_response'."},response_path:{type:"string",description:"Dot-path inside the step's api_response."},label:{type:"string"},format:{type:"string",enum:["text","date","datetime","currency","number"]}},allOf:[{if:{properties:{source:{const:"form_field"}}},then:{required:["field_id"]}},{if:{properties:{source:{const:"api_response"}}},then:{required:["step_id","response_path"]}}]},SummarySection:{type:"object",required:["section_id","title","display_fields"],additionalProperties:!1,properties:{section_id:{type:"string"},title:{type:"string"},visible_from_step:{type:"integer",minimum:1,description:"1-based step index."},until_step:{type:"integer",minimum:1,description:"1-based step index."},display_fields:{type:"array",items:{$ref:"#/definitions/SummaryDisplayField"}}}},SummaryPanelConfig:{type:"object",required:["title","sections"],additionalProperties:!1,properties:{title:{type:"string"},show_pricing:{type:"boolean"},show_sidebar:{type:"boolean",description:"Show the live summary sidebar/accordion during the journey. Defaults to true."},sections:{type:"array",items:{$ref:"#/definitions/SummarySection"}}}},InitConfig:{type:"object",required:["values"],additionalProperties:!1,properties:{values:{type:"object",description:"Static initial answers keyed by namespace.",additionalProperties:!0},api:{type:"object",required:["enabled","method","url"],additionalProperties:!1,properties:{enabled:{type:"boolean"},method:{type:"string",enum:["GET","POST"]},url:{type:"string",format:"uri"},headers:{type:"object",additionalProperties:{type:"string"}},mapping:{type:"object",description:"namespace -> dot-path inside the prefill response.",additionalProperties:{type:"string"}}}}}}},bP={$schema:mP,$id:pP,title:hP,description:_P,type:gP,required:jP,additionalProperties:yP,properties:xP,definitions:vP},wP="http://json-schema.org/draft-07/schema#",NP="https://habit.ai/schemas/journey-spec.schema.json",SP="JourneySpec (v2.0)",CP="Portable envelope produced by JourneyBuilderWidget and consumed by FormRunnerWidget. v2.0 wraps a form_config; legacy v1.x nodes/edges/start_node_id are optional and preserved on re-export.",kP="object",PP=["journey_id","claimspec_id","version"],EP=!0,MP={journey_id:{type:"string",description:"Unique journey identifier."},claimspec_id:{type:"string",description:"Associated claim specification id."},version:{type:"string",description:"Schema version. Use '2.0' (or any '2.x.y') for the linear FormConfig model."},form_config:{$ref:"https://habit.ai/schemas/form-config.schema.json",description:"Source of truth in v2.0. When present, legacy nodes/edges/groups/mode are ignored at runtime."},theme:{$ref:"#/definitions/JourneyTheme"},mode:{type:"string",enum:["sequential","grouped"],description:"Legacy v1.x rendering mode."},nodes:{type:"array",description:"Legacy v1.x โ preserved on re-export.",items:{type:"object"}},edges:{type:"array",description:"Legacy v1.x โ preserved on re-export.",items:{type:"object"}},start_node_id:{type:["string","null"],description:"Legacy v1.x."},groups:{type:"array",description:"Legacy v1.x grouped layout.",items:{type:"object"}}},DP=[{required:["form_config"]},{required:["nodes","edges"]}],TP={JourneyTheme:{type:"object",description:"CSS variables injected on the runner/builder root. Colors are HSL triplets like '222 47% 11%'.",additionalProperties:!1,properties:{primaryColor:{type:"string"},backgroundColor:{type:"string"},cardColor:{type:"string"},foregroundColor:{type:"string"},fontFamilyHeading:{type:"string"},fontFamilyBody:{type:"string"},fontSizeBase:{type:"number",description:"Base font size in pixels."},borderRadius:{type:"number",description:"Border radius in rem."},spacing:{type:"string",enum:["compact","cozy","spacious"]}}}},RP={$schema:wP,$id:NP,title:SP,description:CP,type:kP,required:PP,additionalProperties:EP,properties:MP,anyOf:DP,definitions:TP};exports.FormRunnerWidget=iP;exports.JourneyBuilderWidget=mw;exports.PortalContainerContext=ia;exports.SCHEMA_TYPES=Cr;exports.formConfigSchema=bP;exports.getSchemaInfo=la;exports.journeySpecSchema=RP;exports.setLanguage=Dd;exports.useTranslation=ve;
|