@habit.analytics/habit-claims-journey-components 2.2.0 โ 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/components/form-configurator/FlowValidationPanel.d.ts +1 -0
- package/dist/components/runner/FormRunnerWidget.d.ts +20 -2
- package/dist/i18n/locales/en.d.ts +13 -0
- package/dist/index.cjs +87 -67
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +6829 -6434
- package/dist/lib/flow-validation.d.ts +8 -0
- package/dist/schemas/form-config.schema.json.d.ts +1 -0
- package/dist/types/journey.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,287 +1,307 @@
|
|
|
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-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 Tp=Object.defineProperty;var Rp=(e,t,n)=>t in e?Tp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var V=(e,t,n)=>Rp(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),y=require("react"),hs=require("react-dom");function Jc(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 h=Jc(y),Eo=Jc(hs),wi=e=>{let t;const n=new Set,r=(d,u)=>{const f=typeof d=="function"?d(t):d;if(!Object.is(f,t)){const m=t;t=u??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(p=>p(t,m))}},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},Op=e=>e?wi(e):wi,Ap=e=>e;function zp(e,t=Ap){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 Ni=e=>{const t=Op(e),n=r=>zp(t,r);return Object.assign(n,t),n},Ip=e=>e?Ni(e):Ni,Fe=e=>`${e}_${Date.now()}_${Math.random().toString(36).slice(2,7)}`;function Si(){return{steps:[],fields:[],summary:{title:"Summary",show_pricing:!1,sections:[]},init:{values:{}}}}function Wp(e){return!!e&&typeof e=="object"&&"claimspec_id"in e}function Ci(e){return{field_id:Fe("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 ki(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:Fe("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 Qc(e){const t=(e.nodes||[]).map(a=>Fp(a)),n=new Map;(e.nodes||[]).forEach((a,s)=>n.set(a.node_id,t[s].field_id));const r=e.mode==="grouped"&&(e.groups||[]).length>0;let o;if(r){const a=Pi((e.groups||[]).map(s=>s.group_id),e.edges||[],e.start_node_id??null);o=a.map(s=>{const c=(e.groups||[]).find(u=>u.group_id===s),l=(c.sections||[]).map(u=>({row_id:Fe("row"),layout:"horizontal",field_ids:u.node_ids.map(f=>n.get(f)).filter(f=>!!f)})),d=Ei(s,e.edges||[],a,u=>u);return{step_id:s,title:c.title||"Step",description:"",rows:l.length>0?l:[{row_id:Fe("row"),layout:"horizontal",field_ids:[]}],navigation:d}})}else{const a=Pi((e.nodes||[]).map(s=>s.node_id),e.edges||[],e.start_node_id??null);o=a.map(s=>{const c=n.get(s),l=(e.nodes||[]).find(u=>u.node_id===s),d=Ei(s,e.edges||[],a,u=>u);return{step_id:s,title:l.label_override||l.label||l.question_key,description:"",rows:[{row_id:Fe("row"),layout:"horizontal",field_ids:c?[c]:[]}],navigation:d}})}return{steps:o,fields:t,summary:{title:"Summary",show_pricing:!1,sections:[]},init:{values:{}}}}function Fp(e){var t,n,r;return{field_id:Fe("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 Pi(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=[],s=new Set;let c=o;for(;c&&!s.has(c);){s.add(c),a.push(c);const d=t.filter(m=>m.from_node_id===c);if(d.length===0)break;const u=[...d].sort((m,p)=>(p.priority||0)-(m.priority||0)),f=u.find(m=>m.is_default);c=((f==null?void 0:f.to_node_id)||((l=u[0])==null?void 0:l.to_node_id))??null}for(const d of e)s.has(d)||a.push(d);return a}function Ei(e,t,n,r){const a=t.filter(s=>s.from_node_id===e).sort((s,c)=>(c.priority||0)-(s.priority||0)).map(s=>({rule_id:Fe("rule"),condition:s.condition||null,next_step_id:r(s.to_node_id),priority:s.priority||0}));if(a.length===0){const s=n.indexOf(e),c=s>=0&&s<n.length-1?r(n[s+1]):"__submit__";a.push({rule_id:Fe("rule"),condition:null,next_step_id:c,priority:0})}return{rules:a}}const kt=Ip((e,t)=>{const n=()=>{const{formConfig:a,theme:s}=t();return{formConfig:JSON.parse(JSON.stringify(a)),theme:JSON.parse(JSON.stringify(s))}},r=()=>{const a=n();e({_history:[...t()._history.slice(-50),a],_future:[],isDirty:!0})},o=a=>{r(),e({formConfig:a(t().formConfig)})};return{formConfig:Si(),theme:{},activeTab:"steps",activeStepId:null,selectedFieldId:null,isDirty:!1,_history:[],_future:[],_push:r,undo:()=>{const{_history:a}=t();if(a.length===0)return;const s=a[a.length-1],c=n();e({formConfig:s.formConfig,theme:s.theme,_history:a.slice(0,-1),_future:[...t()._future,c]})},redo:()=>{const{_future:a}=t();if(a.length===0)return;const s=a[a.length-1],c=n();e({formConfig:s.formConfig,theme:s.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 s=Fe("step");return o(c=>({...c,steps:[...c.steps,{step_id:s,title:a||`Step ${c.steps.length+1}`,description:"",rows:[{row_id:Fe("row"),layout:"horizontal",field_ids:[]}],navigation:{rules:[{rule_id:Fe("rule"),condition:null,next_step_id:"__submit__",priority:0}]}}]})),e({activeStepId:s}),s},updateStep:(a,s)=>o(c=>({...c,steps:c.steps.map(l=>l.step_id===a?{...l,...s}:l)})),deleteStep:a=>{var s;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:((s=t().formConfig.steps[0])==null?void 0:s.step_id)||null})},reorderSteps:a=>o(s=>({...s,steps:a.map(c=>s.steps.find(l=>l.step_id===c)).filter(c=>!!c)})),moveStep:(a,s)=>o(c=>{const l=c.steps.findIndex(f=>f.step_id===a);if(l<0)return c;const d=s==="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,s="horizontal")=>{const c=Fe("row");return o(l=>({...l,steps:l.steps.map(d=>d.step_id===a?{...d,rows:[...d.rows,{row_id:c,layout:s,field_ids:[]}]}:d)})),c},updateRow:(a,s,c)=>o(l=>({...l,steps:l.steps.map(d=>d.step_id===a?{...d,rows:d.rows.map(u=>u.row_id===s?{...u,...c}:u)}:d)})),deleteRow:(a,s)=>o(c=>({...c,steps:c.steps.map(l=>l.step_id===a?{...l,rows:l.rows.filter(d=>d.row_id!==s)}:l)})),moveRow:(a,s,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===s);if(u<0)return d;const f=c==="up"?u-1:u+1;if(f<0||f>=d.rows.length)return d;const m=[...d.rows];return[m[u],m[f]]=[m[f],m[u]],{...d,rows:m}})})),createField:a=>{const s=ki(a);return o(c=>({...c,fields:[...c.fields,s]})),s.field_id},createFieldFromSpec:a=>{const s=Ci(a);return o(c=>({...c,fields:[...c.fields,s]})),s.field_id},updateField:(a,s)=>o(c=>({...c,fields:c.fields.map(l=>l.field_id===a?{...l,...s}:l)})),deleteField:a=>{o(s=>({...s,fields:s.fields.filter(c=>c.field_id!==a),steps:s.steps.map(c=>({...c,rows:c.rows.map(l=>({...l,field_ids:l.field_ids.filter(d=>d!==a)}))})),summary:{...s.summary,sections:s.summary.sections.map(c=>({...c,display_fields:c.display_fields.filter(l=>l.field_id!==a)}))}})),t().selectedFieldId===a&&e({selectedFieldId:null})},addFieldToRow:(a,s,c)=>o(l=>({...l,steps:l.steps.map(d=>d.step_id===a?{...d,rows:d.rows.map(u=>u.row_id===s?u.field_ids.includes(c)?u:{...u,field_ids:[...u.field_ids,c]}:u)}:d)})),addNewFieldToRow:(a,s,c)=>{const l=Wp(c)?Ci(c):ki(c);return o(d=>({...d,fields:[...d.fields,l],steps:d.steps.map(u=>u.step_id===a?{...u,rows:u.rows.map(f=>f.row_id===s?{...f,field_ids:[...f.field_ids,l.field_id]}:f)}:u)})),e({selectedFieldId:l.field_id}),l.field_id},removeFieldFromRow:(a,s,c)=>o(l=>({...l,steps:l.steps.map(d=>d.step_id===a?{...d,rows:d.rows.map(u=>u.row_id===s?{...u,field_ids:u.field_ids.filter(f=>f!==c)}:u)}:d)})),moveFieldInRow:(a,s,c,l)=>o(d=>({...d,steps:d.steps.map(u=>u.step_id!==a?u:{...u,rows:u.rows.map(f=>{if(f.row_id!==s)return f;const m=f.field_ids.indexOf(c);if(m<0)return f;const p=l==="left"?m-1:m+1;if(p<0||p>=f.field_ids.length)return f;const g=[...f.field_ids];return[g[m],g[p]]=[g[p],g[m]],{...f,field_ids:g}})})})),updateStepNavigation:(a,s)=>o(c=>({...c,steps:c.steps.map(l=>l.step_id===a?{...l,navigation:{...l.navigation,...s}}:l)})),setStepApiCall:(a,s)=>o(c=>({...c,steps:c.steps.map(l=>l.step_id===a?{...l,navigation:{...l.navigation,api_call:s}}:l)})),addNavRule:a=>{const s=Fe("rule");return o(c=>({...c,steps:c.steps.map(l=>l.step_id===a?{...l,navigation:{...l.navigation,rules:[...l.navigation.rules,{rule_id:s,condition:null,next_step_id:"__submit__",priority:0}]}}:l)})),s},updateNavRule:(a,s,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===s?{...u,...c}:u)}}:d)})),deleteNavRule:(a,s)=>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!==s)}}:l)})),updateSummary:a=>o(s=>({...s,summary:{...s.summary,...a}})),addSummarySection:a=>{const s=Fe("section");return o(c=>({...c,summary:{...c.summary,sections:[...c.summary.sections,{section_id:s,title:a||"Section",display_fields:[]}]}})),s},updateSummarySection:(a,s)=>o(c=>({...c,summary:{...c.summary,sections:c.summary.sections.map(l=>l.section_id===a?{...l,...s}:l)}})),deleteSummarySection:a=>o(s=>({...s,summary:{...s.summary,sections:s.summary.sections.filter(c=>c.section_id!==a)}})),addDisplayField:(a,s="form_field")=>{const c=Fe("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:s,label:"",format:"text"}]}:d)}})),c},updateDisplayField:(a,s,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===s?{...u,...c}:u)}:d)}})),deleteDisplayField:(a,s)=>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!==s)}:l)}})),updateInit:a=>o(s=>({...s,init:{...s.init,...a}})),importJourneySpec:a=>{var c;const s=a.form_config?qa(a.form_config):Qc(a);e({formConfig:s,theme:a.theme||{},activeStepId:((c=s.steps[0])==null?void 0:c.step_id)||null,selectedFieldId:null,_history:[],_future:[],isDirty:!1})},loadFormConfig:(a,s)=>{var c;e({formConfig:qa(a),theme:s||{},activeStepId:((c=a.steps[0])==null?void 0:c.step_id)||null,selectedFieldId:null,_history:[],_future:[],isDirty:!1})},exportJourneySpec:a=>{const{formConfig:s,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:s};return c&&Object.keys(c).length>0&&(l.theme=c),l},reset:()=>{e({formConfig:Si(),theme:{},activeStepId:null,selectedFieldId:null,_history:[],_future:[],isDirty:!1})}}});function qa(e){var t,n,r,o,a;return{steps:(e.steps||[]).map(s=>{var c,l,d;return{step_id:s.step_id||Fe("step"),title:s.title||"Step",description:s.description||"",rows:(s.rows&&s.rows.length>0?s.rows:[{row_id:Fe("row"),layout:"horizontal",field_ids:[]}]).map(u=>({row_id:u.row_id||Fe("row"),layout:u.layout||"horizontal",field_ids:u.field_ids||[],title:u.title,show_divider:u.show_divider})),navigation:{api_call:(c=s.navigation)==null?void 0:c.api_call,button_label:(l=s.navigation)==null?void 0:l.button_label,rules:(d=s.navigation)!=null&&d.rules&&s.navigation.rules.length>0?s.navigation.rules.map(u=>({rule_id:u.rule_id||Fe("rule"),condition:u.condition||null,next_step_id:u.next_step_id||"__submit__",priority:u.priority||0})):[{rule_id:Fe("rule"),condition:null,next_step_id:"__submit__",priority:0}]}}}),fields:(e.fields||[]).map(s=>({...s,field_id:s.field_id||Fe("field")})),summary:{title:((t=e.summary)==null?void 0:t.title)||"Summary",show_pricing:!!((n=e.summary)!=null&&n.show_pricing),sections:(((r=e.summary)==null?void 0:r.sections)||[]).map(s=>({section_id:s.section_id||Fe("section"),title:s.title||"Section",visible_from_step:s.visible_from_step,until_step:s.until_step,display_fields:(s.display_fields||[]).map(c=>({...c,display_id:c.display_id||Fe("display"),format:c.format||"text"}))}))},init:{values:((o=e.init)==null?void 0:o.values)||{},api:(a=e.init)==null?void 0:a.api}}}function Mi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Tn(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Mi(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():Mi(e[o],null)}}}}function ve(...e){return h.useCallback(Tn(...e),e)}var $p=Symbol.for("react.lazy"),lo=h[" use ".trim().toString()];function Lp(e){return typeof e=="object"&&e!==null&&"then"in e}function Zc(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===$p&&"_payload"in e&&Lp(e._payload)}function Mo(e){const t=Hp(e),n=h.forwardRef((r,o)=>{let{children:a,...s}=r;Zc(a)&&typeof lo=="function"&&(a=lo(a._payload));const c=h.Children.toArray(a),l=c.find(Yp);if(l){const d=l.props.children,u=c.map(f=>f===l?h.Children.count(d)>1?h.Children.only(null):h.isValidElement(d)?d.props.children:null:f);return i.jsx(t,{...s,ref:o,children:h.isValidElement(d)?h.cloneElement(d,void 0,u):null})}return i.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var Bp=Mo("Slot");function Hp(e){const t=h.forwardRef((n,r)=>{let{children:o,...a}=n;if(Zc(o)&&typeof lo=="function"&&(o=lo(o._payload)),h.isValidElement(o)){const s=Up(o),c=Vp(a,o.props);return o.type!==h.Fragment&&(c.ref=r?Tn(r,s):s),h.cloneElement(o,c)}return h.Children.count(o)>1?h.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var qp=Symbol("radix.slottable");function Yp(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===qp}function Vp(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 Up(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 el(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=el(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function tl(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=el(e))&&(r&&(r+=" "),r+=t);return r}const Di=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ti=tl,Do=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ti(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(d=>{const u=n==null?void 0:n[d],f=a==null?void 0:a[d];if(u===null)return null;const m=Di(u)||Di(f);return o[d][m]}),c=n&&Object.entries(n).reduce((d,u)=>{let[f,m]=u;return m===void 0||(d[f]=m),d},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,u)=>{let{class:f,className:m,...p}=u;return Object.entries(p).every(g=>{let[_,j]=g;return Array.isArray(j)?j.includes({...a,...c}[_]):{...a,...c}[_]===j})?[...d,f,m]:d},[]);return Ti(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},_s="-",Gp=e=>{const t=Kp(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const c=s.split(_s);return c[0]===""&&c.length!==1&&c.shift(),nl(c,t)||Xp(s)},getConflictingClassGroupIds:(s,c)=>{const l=n[s]||[];return c&&r[s]?[...l,...r[s]]:l}}},nl=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?nl(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(_s);return(s=t.validators.find(({validator:c})=>c(a)))==null?void 0:s.classGroupId},Ri=/^\[(.+)\]$/,Xp=e=>{if(Ri.test(e)){const t=Ri.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Kp=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Qp(Object.entries(e.classGroups),n).forEach(([a,s])=>{Ya(s,r,a,t)}),r},Ya=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Oi(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(Jp(o)){Ya(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{Ya(s,Oi(t,a),n,r)})})},Oi=(e,t)=>{let n=e;return t.split(_s).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Jp=e=>e.isThemeGetter,Qp=(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(([s,c])=>[t+s,c])):a);return[n,o]}):e,Zp=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(a,s)=>{n.set(a,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let s=n.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return o(a,s),s},set(a,s){n.has(a)?n.set(a,s):o(a,s)}}},rl="!",eh=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length,s=c=>{const l=[];let d=0,u=0,f;for(let j=0;j<c.length;j++){let b=c[j];if(d===0){if(b===o&&(r||c.slice(j,j+a)===t)){l.push(c.slice(u,j)),u=j+a;continue}if(b==="/"){f=j;continue}}b==="["?d++:b==="]"&&d--}const m=l.length===0?c:c.substring(u),p=m.startsWith(rl),g=p?m.substring(1):m,_=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:_}};return n?c=>n({className:c,parseClassName:s}):s},th=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},nh=e=>({cache:Zp(e.cacheSize),parseClassName:eh(e),...Gp(e)}),rh=/\s+/,oh=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],s=e.trim().split(rh);let c="";for(let l=s.length-1;l>=0;l-=1){const d=s[l],{modifiers:u,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:p}=n(d);let g=!!p,_=r(g?m.substring(0,p):m);if(!_){if(!g){c=d+(c.length>0?" "+c:c);continue}if(_=r(m),!_){c=d+(c.length>0?" "+c:c);continue}g=!1}const j=th(u).join(":"),b=f?j+rl:j,x=b+_;if(a.includes(x))continue;a.push(x);const w=o(_,g);for(let N=0;N<w.length;++N){const S=w[N];a.push(b+S)}c=d+(c.length>0?" "+c:c)}return c};function ah(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ol(t))&&(r&&(r+=" "),r+=n);return r}const ol=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ol(e[r]))&&(n&&(n+=" "),n+=t);return n};function Ai(e,...t){let n,r,o,a=s;function s(l){const d=t.reduce((u,f)=>f(u),e());return n=nh(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=oh(l,n);return o(l,u),u}return function(){return a(ah.apply(null,arguments))}}const ze=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},al=/^\[(?:([a-z-]+):)?(.+)\]$/i,sh=/^\d+\/\d+$/,ih=new Set(["px","full","screen"]),ch=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lh=/\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$/,dh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,uh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Bt=e=>Yn(e)||ih.has(e)||sh.test(e),rn=e=>nr(e,"length",vh),Yn=e=>!!e&&!Number.isNaN(Number(e)),ga=e=>nr(e,"number",Yn),dr=e=>!!e&&Number.isInteger(Number(e)),mh=e=>e.endsWith("%")&&Yn(e.slice(0,-1)),_e=e=>al.test(e),on=e=>ch.test(e),ph=new Set(["length","size","percentage"]),hh=e=>nr(e,ph,sl),_h=e=>nr(e,"position",sl),gh=new Set(["image","url"]),jh=e=>nr(e,gh,bh),yh=e=>nr(e,"",xh),ur=()=>!0,nr=(e,t,n)=>{const r=al.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},vh=e=>lh.test(e)&&!dh.test(e),sl=()=>!1,xh=e=>uh.test(e),bh=e=>fh.test(e),zi=()=>{const e=ze("colors"),t=ze("spacing"),n=ze("blur"),r=ze("brightness"),o=ze("borderColor"),a=ze("borderRadius"),s=ze("borderSpacing"),c=ze("borderWidth"),l=ze("contrast"),d=ze("grayscale"),u=ze("hueRotate"),f=ze("invert"),m=ze("gap"),p=ze("gradientColorStops"),g=ze("gradientColorStopPositions"),_=ze("inset"),j=ze("margin"),b=ze("opacity"),x=ze("padding"),w=ze("saturate"),N=ze("scale"),S=ze("sepia"),v=ze("skew"),C=ze("space"),P=ze("translate"),k=()=>["auto","contain","none"],E=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",_e,t],D=()=>[_e,t],z=()=>["",Bt,rn],A=()=>["auto",Yn,_e],L=()=>["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"],Y=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",_e],se=()=>["auto","avoid","all","avoid-page","page","left","right","column"],fe=()=>[Yn,_e];return{cacheSize:500,separator:":",theme:{colors:[ur],spacing:[Bt,rn],blur:["none","",on,_e],brightness:fe(),borderColor:[e],borderRadius:["none","","full",on,_e],borderSpacing:D(),borderWidth:z(),contrast:fe(),grayscale:O(),hueRotate:fe(),invert:O(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[mh,rn],inset:M(),margin:M(),opacity:fe(),padding:D(),saturate:fe(),scale:fe(),sepia:O(),skew:fe(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",_e]}],container:["container"],columns:[{columns:[on]}],"break-after":[{"break-after":se()}],"break-before":[{"break-before":se()}],"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:[...L(),_e]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[_]}],"inset-x":[{"inset-x":[_]}],"inset-y":[{"inset-y":[_]}],start:[{start:[_]}],end:[{end:[_]}],top:[{top:[_]}],right:[{right:[_]}],bottom:[{bottom:[_]}],left:[{left:[_]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",dr,_e]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",_e]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",dr,_e]}],"grid-cols":[{"grid-cols":[ur]}],"col-start-end":[{col:["auto",{span:["full",dr,_e]},_e]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[ur]}],"row-start-end":[{row:["auto",{span:[dr,_e]},_e]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",_e]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",_e]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...Y()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Y(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Y(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],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",_e,t]}],"min-w":[{"min-w":[_e,t,"min","max","fit"]}],"max-w":[{"max-w":[_e,t,"none","full","min","max","fit","prose",{screen:[on]},on]}],h:[{h:[_e,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[_e,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[_e,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[_e,t,"auto","min","max","fit"]}],"font-size":[{text:["base",on,rn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ga]}],"font-family":[{font:[ur]}],"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",_e]}],"line-clamp":[{"line-clamp":["none",Yn,ga]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Bt,_e]}],"list-image":[{"list-image":["none",_e]}],"list-style-type":[{list:["none","disc","decimal",_e]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Bt,rn]}],"underline-offset":[{"underline-offset":["auto",Bt,_e]}],"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:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",_e]}],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",_e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...L(),_h]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",hh]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},jh]}],"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":[b]}],"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":[b]}],"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":[Bt,_e]}],"outline-w":[{outline:[Bt,rn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Bt,rn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",on,yh]}],"shadow-color":[{shadow:[ur]}],opacity:[{opacity:[b]}],"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",on,_e]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],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":[f]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",_e]}],duration:[{duration:fe()}],ease:[{ease:["linear","in","out","in-out",_e]}],delay:[{delay:fe()}],animate:[{animate:["none","spin","ping","pulse","bounce",_e]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[N]}],"scale-x":[{"scale-x":[N]}],"scale-y":[{"scale-y":[N]}],rotate:[{rotate:[dr,_e]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[v]}],"skew-y":[{"skew-y":[v]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",_e]}],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",_e]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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",_e]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Bt,rn,ga]}],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"]}}},wh=(e,{cacheSize:t,prefix:n,separator:r,experimentalParseClassName:o,extend:a={},override:s={}})=>{pr(e,"cacheSize",t),pr(e,"prefix",n),pr(e,"separator",r),pr(e,"experimentalParseClassName",o);for(const c in s)Nh(e[c],s[c]);for(const c in a)Sh(e[c],a[c]);return e},pr=(e,t,n)=>{n!==void 0&&(e[t]=n)},Nh=(e,t)=>{if(t)for(const n in t)pr(e,n,t[n])},Sh=(e,t)=>{if(t)for(const n in t){const r=t[n];r!==void 0&&(e[n]=(e[n]||[]).concat(r))}},Ch=(e,...t)=>typeof e=="function"?Ai(zi,e,...t):Ai(()=>wh(zi(),e),...t),kh=Ch({prefix:"cj-"});function re(...e){return kh(tl(e))}const gs=Do("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=h.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},a)=>{const s=r?Bp:"button";return i.jsx(s,{className:re(gs({variant:t,size:n,className:e})),ref:a,...o})});te.displayName="Button";const Ph=Do("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 bt({className:e,variant:t,...n}){return i.jsx("div",{className:re(Ph({variant:t}),e),...n})}function oe(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 Eh(e,t){const n=h.createContext(t),r=a=>{const{children:s,...c}=a,l=h.useMemo(()=>c,Object.values(c));return i.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function o(a){const s=h.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function ft(e,t=[]){let n=[];function r(a,s){const c=h.createContext(s),l=n.length;n=[...n,s];const d=f=>{var b;const{scope:m,children:p,...g}=f,_=((b=m==null?void 0:m[e])==null?void 0:b[l])||c,j=h.useMemo(()=>g,Object.values(g));return i.jsx(_.Provider,{value:j,children:p})};d.displayName=a+"Provider";function u(f,m){var _;const p=((_=m==null?void 0:m[e])==null?void 0:_[l])||c,g=h.useContext(p);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[d,u]}const o=()=>{const a=n.map(s=>h.createContext(s));return function(c){const l=(c==null?void 0:c[e])||a;return h.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return o.scopeName=e,[r,Mh(o,...t)]}function Mh(...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 s=r.reduce((c,{useScope:l,scopeName:d})=>{const f=l(a)[`__scope${d}`];return{...c,...f}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Ii(e){const t=Dh(e),n=h.forwardRef((r,o)=>{const{children:a,...s}=r,c=h.Children.toArray(a),l=c.find(Rh);if(l){const d=l.props.children,u=c.map(f=>f===l?h.Children.count(d)>1?h.Children.only(null):h.isValidElement(d)?d.props.children:null:f);return i.jsx(t,{...s,ref:o,children:h.isValidElement(d)?h.cloneElement(d,void 0,u):null})}return i.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function Dh(e){const t=h.forwardRef((n,r)=>{const{children:o,...a}=n;if(h.isValidElement(o)){const s=Ah(o),c=Oh(a,o.props);return o.type!==h.Fragment&&(c.ref=r?Tn(r,s):s),h.cloneElement(o,c)}return h.Children.count(o)>1?h.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Th=Symbol("radix.slottable");function Rh(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Th}function Oh(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 Ah(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 il(e){const t=e+"CollectionProvider",[n,r]=ft(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=_=>{const{scope:j,children:b}=_,x=y.useRef(null),w=y.useRef(new Map).current;return i.jsx(o,{scope:j,itemMap:w,collectionRef:x,children:b})};s.displayName=t;const c=e+"CollectionSlot",l=Ii(c),d=y.forwardRef((_,j)=>{const{scope:b,children:x}=_,w=a(c,b),N=ve(j,w.collectionRef);return i.jsx(l,{ref:N,children:x})});d.displayName=c;const u=e+"CollectionItemSlot",f="data-radix-collection-item",m=Ii(u),p=y.forwardRef((_,j)=>{const{scope:b,children:x,...w}=_,N=y.useRef(null),S=ve(j,N),v=a(u,b);return y.useEffect(()=>(v.itemMap.set(N,{ref:N,...w}),()=>void v.itemMap.delete(N))),i.jsx(m,{[f]:"",ref:S,children:x})});p.displayName=u;function g(_){const j=a(e+"CollectionConsumer",_);return y.useCallback(()=>{const x=j.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(j.itemMap.values()).sort((v,C)=>w.indexOf(v.ref.current)-w.indexOf(C.ref.current))},[j.collectionRef,j.itemMap])}return[{Provider:s,Slot:d,ItemSlot:p},g,r]}var Xe=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},zh=h[" useId ".trim().toString()]||(()=>{}),Ih=0;function At(e){const[t,n]=h.useState(zh());return Xe(()=>{n(r=>r??String(Ih++))},[e]),t?`radix-${t}`:""}function Wh(e){const t=Fh(e),n=h.forwardRef((r,o)=>{const{children:a,...s}=r,c=h.Children.toArray(a),l=c.find(Lh);if(l){const d=l.props.children,u=c.map(f=>f===l?h.Children.count(d)>1?h.Children.only(null):h.isValidElement(d)?d.props.children:null:f);return i.jsx(t,{...s,ref:o,children:h.isValidElement(d)?h.cloneElement(d,void 0,u):null})}return i.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function Fh(e){const t=h.forwardRef((n,r)=>{const{children:o,...a}=n;if(h.isValidElement(o)){const s=Hh(o),c=Bh(a,o.props);return o.type!==h.Fragment&&(c.ref=r?Tn(r,s):s),h.cloneElement(o,c)}return h.Children.count(o)>1?h.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var $h=Symbol("radix.slottable");function Lh(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$h}function Bh(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 Hh(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 qh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],de=qh.reduce((e,t)=>{const n=Wh(`Primitive.${t}`),r=h.forwardRef((o,a)=>{const{asChild:s,...c}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(l,{...c,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Yh(e,t){e&&Eo.flushSync(()=>e.dispatchEvent(t))}function tt(e){const t=h.useRef(e);return h.useEffect(()=>{t.current=e}),h.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var Vh=h[" useInsertionEffect ".trim().toString()]||Xe;function Ut({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=Uh({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:o;{const u=h.useRef(e!==void 0);h.useEffect(()=>{const f=u.current;f!==c&&console.warn(`${r} is changing from ${f?"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=h.useCallback(u=>{var f;if(c){const m=Gh(u)?u(e):u;m!==e&&((f=s.current)==null||f.call(s,m))}else a(u)},[c,e,a,s]);return[l,d]}function Uh({defaultProp:e,onChange:t}){const[n,r]=h.useState(e),o=h.useRef(n),a=h.useRef(t);return Vh(()=>{a.current=t},[t]),h.useEffect(()=>{var s;o.current!==n&&((s=a.current)==null||s.call(a,n),o.current=n)},[n,o]),[n,r,a]}function Gh(e){return typeof e=="function"}var Xh=h.createContext(void 0);function Er(e){const t=h.useContext(Xh);return e||t||"ltr"}var ja="rovingFocusGroup.onEntryFocus",Kh={bubbles:!1,cancelable:!0},Mr="RovingFocusGroup",[Va,cl,Jh]=il(Mr),[Qh,To]=ft(Mr,[Jh]),[Zh,e_]=Qh(Mr),ll=h.forwardRef((e,t)=>i.jsx(Va.Provider,{scope:e.__scopeRovingFocusGroup,children:i.jsx(Va.Slot,{scope:e.__scopeRovingFocusGroup,children:i.jsx(t_,{...e,ref:t})})}));ll.displayName=Mr;var t_=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:d,preventScrollOnEntryFocus:u=!1,...f}=e,m=h.useRef(null),p=ve(t,m),g=Er(a),[_,j]=Ut({prop:s,defaultProp:c??null,onChange:l,caller:Mr}),[b,x]=h.useState(!1),w=tt(d),N=cl(n),S=h.useRef(!1),[v,C]=h.useState(0);return h.useEffect(()=>{const P=m.current;if(P)return P.addEventListener(ja,w),()=>P.removeEventListener(ja,w)},[w]),i.jsx(Zh,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:_,onItemFocus:h.useCallback(P=>j(P),[j]),onItemShiftTab:h.useCallback(()=>x(!0),[]),onFocusableItemAdd:h.useCallback(()=>C(P=>P+1),[]),onFocusableItemRemove:h.useCallback(()=>C(P=>P-1),[]),children:i.jsx(de.div,{tabIndex:b||v===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:oe(e.onMouseDown,()=>{S.current=!0}),onFocus:oe(e.onFocus,P=>{const k=!S.current;if(P.target===P.currentTarget&&k&&!b){const E=new CustomEvent(ja,Kh);if(P.currentTarget.dispatchEvent(E),!E.defaultPrevented){const M=N().filter(W=>W.focusable),D=M.find(W=>W.active),z=M.find(W=>W.id===_),L=[D,z,...M].filter(Boolean).map(W=>W.ref.current);fl(L,u)}}S.current=!1}),onBlur:oe(e.onBlur,()=>x(!1))})})}),dl="RovingFocusGroupItem",ul=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:s,...c}=e,l=At(),d=a||l,u=e_(dl,n),f=u.currentTabStopId===d,m=cl(n),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:_}=u;return h.useEffect(()=>{if(r)return p(),()=>g()},[r,p,g]),i.jsx(Va.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:i.jsx(de.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...c,ref:t,onMouseDown:oe(e.onMouseDown,j=>{r?u.onItemFocus(d):j.preventDefault()}),onFocus:oe(e.onFocus,()=>u.onItemFocus(d)),onKeyDown:oe(e.onKeyDown,j=>{if(j.key==="Tab"&&j.shiftKey){u.onItemShiftTab();return}if(j.target!==j.currentTarget)return;const b=o_(j,u.orientation,u.dir);if(b!==void 0){if(j.metaKey||j.ctrlKey||j.altKey||j.shiftKey)return;j.preventDefault();let w=m().filter(N=>N.focusable).map(N=>N.ref.current);if(b==="last")w.reverse();else if(b==="prev"||b==="next"){b==="prev"&&w.reverse();const N=w.indexOf(j.currentTarget);w=u.loop?a_(w,N+1):w.slice(N+1)}setTimeout(()=>fl(w))}}),children:typeof s=="function"?s({isCurrentTabStop:f,hasTabStop:_!=null}):s})})});ul.displayName=dl;var n_={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function r_(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function o_(e,t,n){const r=r_(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return n_[r]}function fl(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function a_(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ml=ll,pl=ul;function s_(e,t){return h.useReducer((n,r)=>t[n][r]??n,e)}var mt=e=>{const{present:t,children:n}=e,r=i_(t),o=typeof n=="function"?n({present:r.isPresent}):h.Children.only(n),a=ve(r.ref,c_(o));return typeof n=="function"||r.isPresent?h.cloneElement(o,{ref:a}):null};mt.displayName="Presence";function i_(e){const[t,n]=h.useState(),r=h.useRef(null),o=h.useRef(e),a=h.useRef("none"),s=e?"mounted":"unmounted",[c,l]=s_(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const d=Yr(r.current);a.current=c==="mounted"?d:"none"},[c]),Xe(()=>{const d=r.current,u=o.current;if(u!==e){const m=a.current,p=Yr(d);e?l("MOUNT"):p==="none"||(d==null?void 0:d.display)==="none"?l("UNMOUNT"):l(u&&m!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Xe(()=>{if(t){let d;const u=t.ownerDocument.defaultView??window,f=p=>{const _=Yr(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&_&&(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)})}},m=p=>{p.target===t&&(a.current=Yr(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(d),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:h.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function Yr(e){return(e==null?void 0:e.animationName)||"none"}function c_(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 Ro="Tabs",[l_]=ft(Ro,[To]),hl=To(),[d_,js]=l_(Ro),_l=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:c,activationMode:l="automatic",...d}=e,u=Er(c),[f,m]=Ut({prop:r,onChange:o,defaultProp:a??"",caller:Ro});return i.jsx(d_,{scope:n,baseId:At(),value:f,onValueChange:m,orientation:s,dir:u,activationMode:l,children:i.jsx(de.div,{dir:u,"data-orientation":s,...d,ref:t})})});_l.displayName=Ro;var gl="TabsList",jl=h.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=js(gl,n),s=hl(n);return i.jsx(ml,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:i.jsx(de.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});jl.displayName=gl;var yl="TabsTrigger",vl=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=js(yl,n),c=hl(n),l=wl(s.baseId,r),d=Nl(s.baseId,r),u=r===s.value;return i.jsx(pl,{asChild:!0,...c,focusable:!o,active:u,children:i.jsx(de.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:oe(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?s.onValueChange(r):f.preventDefault()}),onKeyDown:oe(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&s.onValueChange(r)}),onFocus:oe(e.onFocus,()=>{const f=s.activationMode!=="manual";!u&&!o&&f&&s.onValueChange(r)})})})});vl.displayName=yl;var xl="TabsContent",bl=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,c=js(xl,n),l=wl(c.baseId,r),d=Nl(c.baseId,r),u=r===c.value,f=h.useRef(u);return h.useEffect(()=>{const m=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(m)},[]),i.jsx(mt,{present:o||u,children:({present:m})=>i.jsx(de.div,{"data-state":u?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":l,hidden:!m,id:d,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:m&&a})})});bl.displayName=xl;function wl(e,t){return`${e}-trigger-${t}`}function Nl(e,t){return`${e}-content-${t}`}var u_=_l,Sl=jl,Cl=vl,kl=bl;const f_=u_,Pl=h.forwardRef(({className:e,...t},n)=>i.jsx(Sl,{ref:n,className:re("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}));Pl.displayName=Sl.displayName;const hr=h.forwardRef(({className:e,...t},n)=>i.jsx(Cl,{ref:n,className:re("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}));hr.displayName=Cl.displayName;const m_=h.forwardRef(({className:e,...t},n)=>i.jsx(kl,{ref:n,className:re("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}));m_.displayName=kl.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-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;/**
|
|
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 w_=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Wl=(...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 N_={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 S_=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...c},l)=>v.createElement("svg",{ref:l,...N_,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Wl("lucide",o),...c},[...i.map(([d,u])=>v.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 de=(e,t)=>{const n=v.forwardRef(({className:r,...o},a)=>v.createElement(S_,{ref:a,iconNode:t,className:Wl(`lucide-${w_(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 Fl=de("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
|
|
32
|
+
*/const Wo=de("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 $l=de("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 Ll=de("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 Bt=de("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 C_=de("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 k_=de("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
|
|
62
|
+
*/const _o=de("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 Bl=de("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 P_=de("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 qi=de("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 Yi=de("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 E_=de("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 M_=de("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 D_=de("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 T_=de("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 R_=de("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 O_=de("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 A_=de("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 z_=de("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 I_=de("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 W_=de("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 Hl=de("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 F_=de("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 ks=de("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 $_=de("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 L_=de("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 B_=de("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 xa=de("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 H_=de("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 q_=de("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
|
|
182
|
+
*/const Et=de("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 Y_=de("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 ql=de("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 V_=de("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 Yl=de("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
|
|
207
|
+
*/const G_=de("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 U_=de("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 X_=de("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
|
|
222
|
+
*/const Fn=de("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 Wl=ge("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"}]]),Ao=y.createContext(null);Ao.displayName="PanelGroupContext";const Le={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"},vs=10,Cn=y.useLayoutEffect,Wi=h.useId,L_=typeof Wi=="function"?Wi:()=>null;let B_=0;function xs(e=null){const t=L_(),n=y.useRef(e||t||null);return n.current===null&&(n.current=""+B_++),e??n.current}function Fl({children:e,className:t="",collapsedSize:n,collapsible:r,defaultSize:o,forwardedRef:a,id:s,maxSize:c,minSize:l,onCollapse:d,onExpand:u,onResize:f,order:m,style:p,tagName:g="div",..._}){const j=y.useContext(Ao);if(j===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:b,expandPanel:x,getPanelSize:w,getPanelStyle:N,groupId:S,isPanelCollapsed:v,reevaluatePanelConstraints:C,registerPanel:P,resizePanel:k,unregisterPanel:E}=j,M=xs(s),D=y.useRef({callbacks:{onCollapse:d,onExpand:u,onResize:f},constraints:{collapsedSize:n,collapsible:r,defaultSize:o,maxSize:c,minSize:l},id:M,idIsFromProps:s!==void 0,order:m});y.useRef({didLogMissingDefaultSizeWarning:!1}),Cn(()=>{const{callbacks:A,constraints:L}=D.current,W={...L};D.current.id=M,D.current.idIsFromProps=s!==void 0,D.current.order=m,A.onCollapse=d,A.onExpand=u,A.onResize=f,L.collapsedSize=n,L.collapsible=r,L.defaultSize=o,L.maxSize=c,L.minSize=l,(W.collapsedSize!==L.collapsedSize||W.collapsible!==L.collapsible||W.maxSize!==L.maxSize||W.minSize!==L.minSize)&&C(D.current,W)}),Cn(()=>{const A=D.current;return P(A),()=>{E(A)}},[m,M,P,E]),y.useImperativeHandle(a,()=>({collapse:()=>{b(D.current)},expand:A=>{x(D.current,A)},getId(){return M},getSize(){return w(D.current)},isCollapsed(){return v(D.current)},isExpanded(){return!v(D.current)},resize:A=>{k(D.current,A)}}),[b,x,w,v,M,k]);const z=N(D.current,o);return y.createElement(g,{..._,children:e,className:t,id:M,style:{...z,...p},[Le.groupId]:S,[Le.panel]:"",[Le.panelCollapsible]:r||void 0,[Le.panelId]:M,[Le.panelSize]:parseFloat(""+z.flexGrow).toFixed(1)})}const $l=y.forwardRef((e,t)=>y.createElement(Fl,{...e,forwardedRef:t}));Fl.displayName="Panel";$l.displayName="forwardRef(Panel)";let Ua=null,oo=-1,ln=null;function H_(e,t){if(t){const n=(t&Yl)!==0,r=(t&Vl)!==0,o=(t&Ul)!==0,a=(t&Gl)!==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 q_(){ln!==null&&(document.head.removeChild(ln),Ua=null,ln=null,oo=-1)}function va(e,t){var n,r;const o=H_(e,t);if(Ua!==o){if(Ua=o,ln===null&&(ln=document.createElement("style"),document.head.appendChild(ln)),oo>=0){var a;(a=ln.sheet)===null||a===void 0||a.removeRule(oo)}oo=(n=(r=ln.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${o} !important;}`))!==null&&n!==void 0?n:-1}}function Ll(e){return e.type==="keydown"}function Bl(e){return e.type.startsWith("pointer")}function Hl(e){return e.type.startsWith("mouse")}function zo(e){if(Bl(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(Hl(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function Y_(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function V_(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 U_(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:Li(e),b:Li(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:$i(Fi(n.a)),b:$i(Fi(n.b))};if(o.a===o.b){const a=r.childNodes,s={a:n.a.at(-1),b:n.b.at(-1)};let c=a.length;for(;c--;){const l=a[c];if(l===s.a)return 1;if(l===s.b)return-1}}return Math.sign(o.a-o.b)}const G_=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function X_(e){var t;const n=getComputedStyle((t=ql(e))!==null&&t!==void 0?t:e).display;return n==="flex"||n==="inline-flex"}function K_(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||X_(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"||G_.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function Fi(e){let t=e.length;for(;t--;){const n=e[t];if(ye(n,"Missing node"),K_(n))return n}return null}function $i(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Li(e){const t=[];for(;e;)t.push(e),e=ql(e);return t}function ql(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const Yl=1,Vl=2,Ul=4,Gl=8,J_=Y_()==="coarse";let wt=[],Vn=!1,wn=new Map,Io=new Map;const wr=new Set;function Q_(e,t,n,r,o){var a;const{ownerDocument:s}=t,c={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:o},l=(a=wn.get(s))!==null&&a!==void 0?a:0;return wn.set(s,l+1),wr.add(c),fo(),function(){var u;Io.delete(e),wr.delete(c);const f=(u=wn.get(s))!==null&&u!==void 0?u:1;if(wn.set(s,f-1),fo(),f===1&&wn.delete(s),wt.includes(c)){const m=wt.indexOf(c);m>=0&&wt.splice(m,1),ws(),o("up",!0,null)}}}function Z_(e){const{target:t}=e,{x:n,y:r}=zo(e);Vn=!0,bs({target:t,x:n,y:r}),fo(),wt.length>0&&(mo("down",e),e.preventDefault(),Xl(t)||e.stopImmediatePropagation())}function xa(e){const{x:t,y:n}=zo(e);if(Vn&&e.buttons===0&&(Vn=!1,mo("up",e)),!Vn){const{target:r}=e;bs({target:r,x:t,y:n})}mo("move",e),ws(),wt.length>0&&e.preventDefault()}function ba(e){const{target:t}=e,{x:n,y:r}=zo(e);Io.clear(),Vn=!1,wt.length>0&&(e.preventDefault(),Xl(t)||e.stopImmediatePropagation()),mo("up",e),bs({target:t,x:n,y:r}),ws(),fo()}function Xl(e){let t=e;for(;t;){if(t.hasAttribute(Le.resizeHandle))return!0;t=t.parentElement}return!1}function bs({target:e,x:t,y:n}){wt.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),wr.forEach(o=>{const{element:a,hitAreaMargins:s}=o,c=a.getBoundingClientRect(),{bottom:l,left:d,right:u,top:f}=c,m=J_?s.coarse:s.fine;if(t>=d-m&&t<=u+m&&n>=f-m&&n<=l+m){if(r!==null&&document.contains(r)&&a!==r&&!a.contains(r)&&!r.contains(a)&&U_(r,a)>0){let g=r,_=!1;for(;g&&!g.contains(a);){if(V_(g.getBoundingClientRect(),c)){_=!0;break}g=g.parentElement}if(_)return}wt.push(o)}})}function wa(e,t){Io.set(e,t)}function ws(){let e=!1,t=!1;wt.forEach(r=>{const{direction:o}=r;o==="horizontal"?e=!0:t=!0});let n=0;Io.forEach(r=>{n|=r}),e&&t?va("intersection",n):e?va("horizontal",n):t?va("vertical",n):q_()}let Na=new AbortController;function fo(){Na.abort(),Na=new AbortController;const e={capture:!0,signal:Na.signal};wr.size&&(Vn?(wt.length>0&&wn.forEach((t,n)=>{const{body:r}=n;t>0&&(r.addEventListener("contextmenu",ba,e),r.addEventListener("pointerleave",xa,e),r.addEventListener("pointermove",xa,e))}),window.addEventListener("pointerup",ba,e),window.addEventListener("pointercancel",ba,e)):wn.forEach((t,n)=>{const{body:r}=n;t>0&&(r.addEventListener("pointerdown",Z_,e),r.addEventListener("pointermove",xa,e))}))}function mo(e,t){wr.forEach(n=>{const{setResizeHandlerState:r}=n,o=wt.includes(n);r(e,o,t)})}function eg(){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 kn(e,t,n=vs){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function Ht(e,t,n=vs){return kn(e,t,n)===0}function it(e,t,n){return kn(e,t,n)===0}function tg(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(!it(o,a,n))return!1}return!0}function qn({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:s=100,minSize:c=0}=r;if(kn(n,c)<0)if(a){const l=(o+c)/2;kn(n,l)<0?n=o:n=c}else n=c;return n=Math.min(s,n),n=parseFloat(n.toFixed(vs)),n}function _r({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:o,trigger:a}){if(it(e,0))return t;const s=[...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 f=e<0?l:c,m=n[f];ye(m,`Panel constraints not found for index ${f}`);const{collapsedSize:p=0,collapsible:g,minSize:_=0}=m;if(g){const j=t[f];if(ye(j!=null,`Previous layout not found for panel index ${f}`),it(j,p)){const b=_-j;kn(b,Math.abs(e))>0&&(e=e<0?0-b:b)}}}{const f=e<0?c:l,m=n[f];ye(m,`No panel constraints found for index ${f}`);const{collapsedSize:p=0,collapsible:g,minSize:_=0}=m;if(g){const j=t[f];if(ye(j!=null,`Previous layout not found for panel index ${f}`),it(j,_)){const b=j-p;kn(b,Math.abs(e))>0&&(e=e<0?0-b:b)}}}}{const f=e<0?1:-1;let m=e<0?l:c,p=0;for(;;){const _=t[m];ye(_!=null,`Previous layout not found for panel index ${m}`);const b=qn({panelConstraints:n,panelIndex:m,size:100})-_;if(p+=b,m+=f,m<0||m>=n.length)break}const g=Math.min(Math.abs(e),Math.abs(p));e=e<0?0-g:g}{let m=e<0?c:l;for(;m>=0&&m<n.length;){const p=Math.abs(e)-Math.abs(d),g=t[m];ye(g!=null,`Previous layout not found for panel index ${m}`);const _=g-p,j=qn({panelConstraints:n,panelIndex:m,size:_});if(!it(g,j)&&(d+=g-j,s[m]=j,d.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?m--:m++}}if(tg(o,s))return o;{const f=e<0?l:c,m=t[f];ye(m!=null,`Previous layout not found for panel index ${f}`);const p=m+d,g=qn({panelConstraints:n,panelIndex:f,size:p});if(s[f]=g,!it(g,p)){let _=p-g,b=e<0?l:c;for(;b>=0&&b<n.length;){const x=s[b];ye(x!=null,`Previous layout not found for panel index ${b}`);const w=x+_,N=qn({panelConstraints:n,panelIndex:b,size:w});if(it(x,N)||(_-=N-x,s[b]=N),it(_,0))break;e>0?b--:b++}}}const u=s.reduce((f,m)=>m+f,0);return it(u,100)?s:o}function ng({layout:e,panelsArray:t,pivotIndices:n}){let r=0,o=100,a=0,s=0;const c=n[0];ye(c!=null,"No pivot index found"),t.forEach((f,m)=>{const{constraints:p}=f,{maxSize:g=100,minSize:_=0}=p;m===c?(r=_,o=g):(a+=_,s+=g)});const l=Math.min(o,100-a),d=Math.max(r,100-s),u=e[c];return{valueMax:l,valueMin:d,valueNow:u}}function Nr(e,t=document){return Array.from(t.querySelectorAll(`[${Le.resizeHandleId}][data-panel-group-id="${e}"]`))}function Kl(e,t,n=document){const o=Nr(e,n).findIndex(a=>a.getAttribute(Le.resizeHandleId)===t);return o??null}function Jl(e,t,n){const r=Kl(e,t,n);return r!=null?[r,r+1]:[-1,-1]}function Ql(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 Wo(e,t=document){const n=t.querySelector(`[${Le.resizeHandleId}="${e}"]`);return n||null}function rg(e,t,n,r=document){var o,a,s,c;const l=Wo(t,r),d=Nr(e,r),u=l?d.indexOf(l):-1,f=(o=(a=n[u])===null||a===void 0?void 0:a.id)!==null&&o!==void 0?o:null,m=(s=(c=n[u+1])===null||c===void 0?void 0:c.id)!==null&&s!==void 0?s:null;return[f,m]}function og({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:o,panelGroupElement:a,setLayout:s}){y.useRef({didWarnAboutMissingResizeHandle:!1}),Cn(()=>{if(!a)return;const c=Nr(n,a);for(let l=0;l<o.length-1;l++){const{valueMax:d,valueMin:u,valueNow:f}=ng({layout:r,panelsArray:o,pivotIndices:[l,l+1]}),m=c[l];if(m!=null){const p=o[l];ye(p,`No panel data found for index "${l}"`),m.setAttribute("aria-controls",p.id),m.setAttribute("aria-valuemax",""+Math.round(d)),m.setAttribute("aria-valuemin",""+Math.round(u)),m.setAttribute("aria-valuenow",f!=null?""+Math.round(f):"")}}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=Ql(n,a);ye(d!=null,`No group found for id "${n}"`);const u=Nr(n,a);ye(u,`No resize handles found for group id "${n}"`);const f=u.map(m=>{const p=m.getAttribute(Le.resizeHandleId);ye(p,"Resize handle element has no handle id attribute");const[g,_]=rg(n,p,l,a);if(g==null||_==null)return()=>{};const j=b=>{if(!b.defaultPrevented)switch(b.key){case"Enter":{b.preventDefault();const x=l.findIndex(w=>w.id===g);if(x>=0){const w=l[x];ye(w,`No panel data found for index ${x}`);const N=r[x],{collapsedSize:S=0,collapsible:v,minSize:C=0}=w.constraints;if(N!=null&&v){const P=_r({delta:it(N,S)?C-S:S-N,initialLayout:r,panelConstraints:l.map(k=>k.constraints),pivotIndices:Jl(n,p,a),prevLayout:r,trigger:"keyboard"});r!==P&&s(P)}}break}}};return m.addEventListener("keydown",j),()=>{m.removeEventListener("keydown",j)}});return()=>{f.forEach(m=>m())}},[a,e,t,n,r,o,s])}function Bi(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 Zl(e,t){const n=e==="horizontal",{x:r,y:o}=zo(t);return n?r:o}function ag(e,t,n,r,o){const a=n==="horizontal",s=Wo(t,o);ye(s,`No resize handle element found for id "${t}"`);const c=s.getAttribute(Le.groupId);ye(c,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=r;const d=Zl(n,e),u=Ql(c,o);ye(u,`No group element found for id "${c}"`);const f=u.getBoundingClientRect(),m=a?f.width:f.height;return(d-l)/m*100}function sg(e,t,n,r,o,a){if(Ll(e)){const s=n==="horizontal";let c=0;e.shiftKey?c=100:o!=null?c=o:c=10;let l=0;switch(e.key){case"ArrowDown":l=s?0:c;break;case"ArrowLeft":l=s?-c:0;break;case"ArrowRight":l=s?c:0;break;case"ArrowUp":l=s?0:-c;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return r==null?0:ag(e,t,n,r,a)}function ig({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 s=n[a];ye(s,`Panel constraints not found for index ${a}`);const{defaultSize:c}=s;c!=null&&(r++,t[a]=c,o-=c)}for(let a=0;a<e.length;a++){const s=n[a];ye(s,`Panel constraints not found for index ${a}`);const{defaultSize:c}=s;if(c!=null)continue;const l=e.length-r,d=o/l;r++,t[a]=d,o-=d}return t}function An(e,t,n){t.forEach((r,o)=>{const a=e[o];ye(a,`Panel data not found for index ${o}`);const{callbacks:s,constraints:c,id:l}=a,{collapsedSize:d=0,collapsible:u}=c,f=n[l];if(f==null||r!==f){n[l]=r;const{onCollapse:m,onExpand:p,onResize:g}=s;g&&g(r,f),u&&(m||p)&&(p&&(f==null||Ht(f,d))&&!Ht(r,d)&&p(),m&&(f==null||!Ht(f,d))&&Ht(r,d)&&m())}})}function Vr(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 cg({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:o,precision:a=3}){const s=n[o];let c;return s==null?c=e!=null?e.toPrecision(a):"1":r.length===1?c="1":c=s.toPrecision(a),{flexBasis:0,flexGrow:c,flexShrink:1,overflow:"hidden",pointerEvents:t!==null?"none":void 0}}function lg(e,t=10){let n=null;return(...o)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}function Hi(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 ed(e){return`react-resizable-panels:${e}`}function td(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 nd(e,t){try{const n=ed(e),r=t.getItem(n);if(r){const o=JSON.parse(r);if(typeof o=="object"&&o!=null)return o}}catch{}return null}function dg(e,t,n){var r,o;const a=(r=nd(e,n))!==null&&r!==void 0?r:{},s=td(t);return(o=a[s])!==null&&o!==void 0?o:null}function ug(e,t,n,r,o){var a;const s=ed(e),c=td(t),l=(a=nd(e,o))!==null&&a!==void 0?a:{};l[c]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{o.setItem(s,JSON.stringify(l))}catch(d){console.error(d)}}function qi({layout:e,panelConstraints:t}){const n=[...e],r=n.reduce((a,s)=>a+s,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(a=>`${a}%`).join(", ")}`);if(!it(r,100)&&n.length>0)for(let a=0;a<t.length;a++){const s=n[a];ye(s!=null,`No layout data found for index ${a}`);const c=100/r*s;n[a]=c}let o=0;for(let a=0;a<t.length;a++){const s=n[a];ye(s!=null,`No layout data found for index ${a}`);const c=qn({panelConstraints:t,panelIndex:a,size:s});s!=c&&(o+=s-c,n[a]=c)}if(!it(o,0))for(let a=0;a<t.length;a++){const s=n[a];ye(s!=null,`No layout data found for index ${a}`);const c=s+o,l=qn({panelConstraints:t,panelIndex:a,size:c});if(s!==l&&(o-=l-s,n[a]=l,it(o,0)))break}return n}const fg=100,gr={getItem:e=>(Hi(gr),gr.getItem(e)),setItem:(e,t)=>{Hi(gr),gr.setItem(e,t)}},Yi={};function rd({autoSaveId:e=null,children:t,className:n="",direction:r,forwardedRef:o,id:a=null,onLayout:s=null,keyboardResizeBy:c=null,storage:l=gr,style:d,tagName:u="div",...f}){const m=xs(a),p=y.useRef(null),[g,_]=y.useState(null),[j,b]=y.useState([]),x=eg(),w=y.useRef({}),N=y.useRef(new Map),S=y.useRef(0),v=y.useRef({autoSaveId:e,direction:r,dragState:g,id:m,keyboardResizeBy:c,onLayout:s,storage:l}),C=y.useRef({layout:j,panelDataArray:[],panelDataArrayChanged:!1});y.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),y.useImperativeHandle(o,()=>({getId:()=>v.current.id,getLayout:()=>{const{layout:R}=C.current;return R},setLayout:R=>{const{onLayout:I}=v.current,{layout:H,panelDataArray:G}=C.current,T=qi({layout:R,panelConstraints:G.map(B=>B.constraints)});Bi(H,T)||(b(T),C.current.layout=T,I&&I(T),An(G,T,w.current))}}),[]),Cn(()=>{v.current.autoSaveId=e,v.current.direction=r,v.current.dragState=g,v.current.id=m,v.current.onLayout=s,v.current.storage=l}),og({committedValuesRef:v,eagerValuesRef:C,groupId:m,layout:j,panelDataArray:C.current.panelDataArray,setLayout:b,panelGroupElement:p.current}),y.useEffect(()=>{const{panelDataArray:R}=C.current;if(e){if(j.length===0||j.length!==R.length)return;let I=Yi[e];I==null&&(I=lg(ug,fg),Yi[e]=I);const H=[...R],G=new Map(N.current);I(e,H,G,j,l)}},[e,j,l]),y.useEffect(()=>{});const P=y.useCallback(R=>{const{onLayout:I}=v.current,{layout:H,panelDataArray:G}=C.current;if(R.constraints.collapsible){const T=G.map(ie=>ie.constraints),{collapsedSize:B=0,panelSize:ee,pivotIndices:K}=yn(G,R,H);if(ye(ee!=null,`Panel size not found for panel "${R.id}"`),!Ht(ee,B)){N.current.set(R.id,ee);const ce=Bn(G,R)===G.length-1?ee-B:B-ee,pe=_r({delta:ce,initialLayout:H,panelConstraints:T,pivotIndices:K,prevLayout:H,trigger:"imperative-api"});Vr(H,pe)||(b(pe),C.current.layout=pe,I&&I(pe),An(G,pe,w.current))}}},[]),k=y.useCallback((R,I)=>{const{onLayout:H}=v.current,{layout:G,panelDataArray:T}=C.current;if(R.constraints.collapsible){const B=T.map(Ee=>Ee.constraints),{collapsedSize:ee=0,panelSize:K=0,minSize:ie=0,pivotIndices:ce}=yn(T,R,G),pe=I??ie;if(Ht(K,ee)){const Ee=N.current.get(R.id),F=Ee!=null&&Ee>=pe?Ee:pe,le=Bn(T,R)===T.length-1?K-F:F-K,X=_r({delta:le,initialLayout:G,panelConstraints:B,pivotIndices:ce,prevLayout:G,trigger:"imperative-api"});Vr(G,X)||(b(X),C.current.layout=X,H&&H(X),An(T,X,w.current))}}},[]),E=y.useCallback(R=>{const{layout:I,panelDataArray:H}=C.current,{panelSize:G}=yn(H,R,I);return ye(G!=null,`Panel size not found for panel "${R.id}"`),G},[]),M=y.useCallback((R,I)=>{const{panelDataArray:H}=C.current,G=Bn(H,R);return cg({defaultSize:I,dragState:g,layout:j,panelData:H,panelIndex:G})},[g,j]),D=y.useCallback(R=>{const{layout:I,panelDataArray:H}=C.current,{collapsedSize:G=0,collapsible:T,panelSize:B}=yn(H,R,I);return ye(B!=null,`Panel size not found for panel "${R.id}"`),T===!0&&Ht(B,G)},[]),z=y.useCallback(R=>{const{layout:I,panelDataArray:H}=C.current,{collapsedSize:G=0,collapsible:T,panelSize:B}=yn(H,R,I);return ye(B!=null,`Panel size not found for panel "${R.id}"`),!T||kn(B,G)>0},[]),A=y.useCallback(R=>{const{panelDataArray:I}=C.current;I.push(R),I.sort((H,G)=>{const T=H.order,B=G.order;return T==null&&B==null?0:T==null?-1:B==null?1:T-B}),C.current.panelDataArrayChanged=!0,x()},[x]);Cn(()=>{if(C.current.panelDataArrayChanged){C.current.panelDataArrayChanged=!1;const{autoSaveId:R,onLayout:I,storage:H}=v.current,{layout:G,panelDataArray:T}=C.current;let B=null;if(R){const K=dg(R,T,H);K&&(N.current=new Map(Object.entries(K.expandToSizes)),B=K.layout)}B==null&&(B=ig({panelDataArray:T}));const ee=qi({layout:B,panelConstraints:T.map(K=>K.constraints)});Bi(G,ee)||(b(ee),C.current.layout=ee,I&&I(ee),An(T,ee,w.current))}}),Cn(()=>{const R=C.current;return()=>{R.layout=[]}},[]);const L=y.useCallback(R=>{let I=!1;const H=p.current;return H&&window.getComputedStyle(H,null).getPropertyValue("direction")==="rtl"&&(I=!0),function(T){T.preventDefault();const B=p.current;if(!B)return()=>null;const{direction:ee,dragState:K,id:ie,keyboardResizeBy:ce,onLayout:pe}=v.current,{layout:Ee,panelDataArray:F}=C.current,{initialLayout:J}=K??{},le=Jl(ie,R,B);let X=sg(T,R,ee,K,ce,B);const ae=ee==="horizontal";ae&&I&&(X=-X);const Ce=F.map(Ie=>Ie.constraints),xe=_r({delta:X,initialLayout:J??Ee,panelConstraints:Ce,pivotIndices:le,prevLayout:Ee,trigger:Ll(T)?"keyboard":"mouse-or-touch"}),qe=!Vr(Ee,xe);(Bl(T)||Hl(T))&&S.current!=X&&(S.current=X,!qe&&X!==0?ae?wa(R,X<0?Yl:Vl):wa(R,X<0?Ul:Gl):wa(R,0)),qe&&(b(xe),C.current.layout=xe,pe&&pe(xe),An(F,xe,w.current))}},[]),W=y.useCallback((R,I)=>{const{onLayout:H}=v.current,{layout:G,panelDataArray:T}=C.current,B=T.map(Ee=>Ee.constraints),{panelSize:ee,pivotIndices:K}=yn(T,R,G);ye(ee!=null,`Panel size not found for panel "${R.id}"`);const ce=Bn(T,R)===T.length-1?ee-I:I-ee,pe=_r({delta:ce,initialLayout:G,panelConstraints:B,pivotIndices:K,prevLayout:G,trigger:"imperative-api"});Vr(G,pe)||(b(pe),C.current.layout=pe,H&&H(pe),An(T,pe,w.current))},[]),Q=y.useCallback((R,I)=>{const{layout:H,panelDataArray:G}=C.current,{collapsedSize:T=0,collapsible:B}=I,{collapsedSize:ee=0,collapsible:K,maxSize:ie=100,minSize:ce=0}=R.constraints,{panelSize:pe}=yn(G,R,H);pe!=null&&(B&&K&&Ht(pe,T)?Ht(T,ee)||W(R,ee):pe<ce?W(R,ce):pe>ie&&W(R,ie))},[W]),Y=y.useCallback((R,I)=>{const{direction:H}=v.current,{layout:G}=C.current;if(!p.current)return;const T=Wo(R,p.current);ye(T,`Drag handle element not found for id "${R}"`);const B=Zl(H,I);_({dragHandleId:R,dragHandleRect:T.getBoundingClientRect(),initialCursorPosition:B,initialLayout:G})},[]),O=y.useCallback(()=>{_(null)},[]),se=y.useCallback(R=>{const{panelDataArray:I}=C.current,H=Bn(I,R);H>=0&&(I.splice(H,1),delete w.current[R.id],C.current.panelDataArrayChanged=!0,x())},[x]),fe=y.useMemo(()=>({collapsePanel:P,direction:r,dragState:g,expandPanel:k,getPanelSize:E,getPanelStyle:M,groupId:m,isPanelCollapsed:D,isPanelExpanded:z,reevaluatePanelConstraints:Q,registerPanel:A,registerResizeHandle:L,resizePanel:W,startDragging:Y,stopDragging:O,unregisterPanel:se,panelGroupElement:p.current}),[P,g,r,k,E,M,m,D,z,Q,A,L,W,Y,O,se]),ue={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return y.createElement(Ao.Provider,{value:fe},y.createElement(u,{...f,children:t,className:n,id:a,ref:p,style:{...ue,...d},[Le.group]:"",[Le.groupDirection]:r,[Le.groupId]:m}))}const od=y.forwardRef((e,t)=>y.createElement(rd,{...e,forwardedRef:t}));rd.displayName="PanelGroup";od.displayName="forwardRef(PanelGroup)";function Bn(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function yn(e,t,n){const r=Bn(e,t),a=r===e.length-1?[r-1,r]:[r,r+1],s=n[r];return{...t.constraints,panelSize:s,pivotIndices:a}}function mg({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){y.useEffect(()=>{if(e||n==null||r==null)return;const o=Wo(t,r);if(o==null)return;const a=s=>{if(!s.defaultPrevented)switch(s.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{s.preventDefault(),n(s);break}case"F6":{s.preventDefault();const c=o.getAttribute(Le.groupId);ye(c,`No group element found for id "${c}"`);const l=Nr(c,r),d=Kl(c,t,r);ye(d!==null,`No resize element found for id "${t}"`);const u=s.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 ad({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:r,id:o,onBlur:a,onClick:s,onDragging:c,onFocus:l,onPointerDown:d,onPointerUp:u,style:f={},tabIndex:m=0,tagName:p="div",...g}){var _,j;const b=y.useRef(null),x=y.useRef({onClick:s,onDragging:c,onPointerDown:d,onPointerUp:u});y.useEffect(()=>{x.current.onClick=s,x.current.onDragging=c,x.current.onPointerDown=d,x.current.onPointerUp=u});const w=y.useContext(Ao);if(w===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:S,registerResizeHandle:v,startDragging:C,stopDragging:P,panelGroupElement:k}=w,E=xs(o),[M,D]=y.useState("inactive"),[z,A]=y.useState(!1),[L,W]=y.useState(null),Q=y.useRef({state:M});Cn(()=>{Q.current.state=M}),y.useEffect(()=>{if(n)W(null);else{const fe=v(E);W(()=>fe)}},[n,E,v]);const Y=(_=r==null?void 0:r.coarse)!==null&&_!==void 0?_:15,O=(j=r==null?void 0:r.fine)!==null&&j!==void 0?j:5;y.useEffect(()=>{if(n||L==null)return;const fe=b.current;ye(fe,"Element ref not attached");let ue=!1;return Q_(E,fe,N,{coarse:Y,fine:O},(I,H,G)=>{if(!H){D("inactive");return}switch(I){case"down":{D("drag"),ue=!1,ye(G,'Expected event to be defined for "down" action'),C(E,G);const{onDragging:T,onPointerDown:B}=x.current;T==null||T(!0),B==null||B();break}case"move":{const{state:T}=Q.current;ue=!0,T!=="drag"&&D("hover"),ye(G,'Expected event to be defined for "move" action'),L(G);break}case"up":{D("hover"),P();const{onClick:T,onDragging:B,onPointerUp:ee}=x.current;B==null||B(!1),ee==null||ee(),ue||T==null||T();break}}})},[Y,N,n,O,v,E,L,C,P]),mg({disabled:n,handleId:E,resizeHandler:L,panelGroupElement:k});const se={touchAction:"none",userSelect:"none"};return y.createElement(p,{...g,children:e,className:t,id:o,onBlur:()=>{A(!1),a==null||a()},onFocus:()=>{A(!0),l==null||l()},ref:b,role:"separator",style:{...se,...f},tabIndex:m,[Le.groupDirection]:N,[Le.groupId]:S,[Le.resizeHandle]:"",[Le.resizeHandleActive]:M==="drag"?"pointer":z?"keyboard":void 0,[Le.resizeHandleEnabled]:!n,[Le.resizeHandleId]:E,[Le.resizeHandleState]:M})}ad.displayName="PanelResizeHandle";const pg=({className:e,...t})=>i.jsx(od,{className:re("cj-flex cj-h-full cj-w-full data-[panel-group-direction=vertical]:cj-flex-col",e),...t}),Sa=$l,Vi=({withHandle:e,className:t,...n})=>i.jsx(ad,{className:re("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&&i.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:i.jsx(Ol,{className:"cj-h-2.5 cj-w-2.5"})})});function Ga(e,[t,n]){return Math.min(n,Math.max(t,e))}function hg(e,t){return h.useReducer((n,r)=>t[n][r]??n,e)}var Ns="ScrollArea",[sd]=ft(Ns),[_g,_t]=sd(Ns),id=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:a=600,...s}=e,[c,l]=h.useState(null),[d,u]=h.useState(null),[f,m]=h.useState(null),[p,g]=h.useState(null),[_,j]=h.useState(null),[b,x]=h.useState(0),[w,N]=h.useState(0),[S,v]=h.useState(!1),[C,P]=h.useState(!1),k=ve(t,M=>l(M)),E=Er(o);return i.jsx(_g,{scope:n,type:r,dir:E,scrollHideDelay:a,scrollArea:c,viewport:d,onViewportChange:u,content:f,onContentChange:m,scrollbarX:p,onScrollbarXChange:g,scrollbarXEnabled:S,onScrollbarXEnabledChange:v,scrollbarY:_,onScrollbarYChange:j,scrollbarYEnabled:C,onScrollbarYEnabledChange:P,onCornerWidthChange:x,onCornerHeightChange:N,children:i.jsx(de.div,{dir:E,...s,ref:k,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});id.displayName=Ns;var cd="ScrollAreaViewport",ld=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...a}=e,s=_t(cd,n),c=h.useRef(null),l=ve(t,c,s.onViewportChange);return i.jsxs(i.Fragment,{children:[i.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}),i.jsx(de.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:i.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});ld.displayName=cd;var Ft="ScrollAreaScrollbar",Ss=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=_t(Ft,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=o,c=e.orientation==="horizontal";return h.useEffect(()=>(c?a(!0):s(!0),()=>{c?a(!1):s(!1)}),[c,a,s]),o.type==="hover"?i.jsx(gg,{...r,ref:t,forceMount:n}):o.type==="scroll"?i.jsx(jg,{...r,ref:t,forceMount:n}):o.type==="auto"?i.jsx(dd,{...r,ref:t,forceMount:n}):o.type==="always"?i.jsx(Cs,{...r,ref:t}):null});Ss.displayName=Ft;var gg=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=_t(Ft,e.__scopeScrollArea),[a,s]=h.useState(!1);return h.useEffect(()=>{const c=o.scrollArea;let l=0;if(c){const d=()=>{window.clearTimeout(l),s(!0)},u=()=>{l=window.setTimeout(()=>s(!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]),i.jsx(mt,{present:n||a,children:i.jsx(dd,{"data-state":a?"visible":"hidden",...r,ref:t})})}),jg=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=_t(Ft,e.__scopeScrollArea),a=e.orientation==="horizontal",s=$o(()=>l("SCROLL_END"),100),[c,l]=hg("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 h.useEffect(()=>{if(c==="idle"){const d=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(d)}},[c,o.scrollHideDelay,l]),h.useEffect(()=>{const d=o.viewport,u=a?"scrollLeft":"scrollTop";if(d){let f=d[u];const m=()=>{const p=d[u];f!==p&&(l("SCROLL"),s()),f=p};return d.addEventListener("scroll",m),()=>d.removeEventListener("scroll",m)}},[o.viewport,a,l,s]),i.jsx(mt,{present:n||c!=="hidden",children:i.jsx(Cs,{"data-state":c==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:oe(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:oe(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),dd=h.forwardRef((e,t)=>{const n=_t(Ft,e.__scopeScrollArea),{forceMount:r,...o}=e,[a,s]=h.useState(!1),c=e.orientation==="horizontal",l=$o(()=>{if(n.viewport){const d=n.viewport.offsetWidth<n.viewport.scrollWidth,u=n.viewport.offsetHeight<n.viewport.scrollHeight;s(c?d:u)}},10);return Jn(n.viewport,l),Jn(n.content,l),i.jsx(mt,{present:r||a,children:i.jsx(Cs,{"data-state":a?"visible":"hidden",...o,ref:t})})}),Cs=h.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=_t(Ft,e.__scopeScrollArea),a=h.useRef(null),s=h.useRef(0),[c,l]=h.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=hd(c.viewport,c.content),u={...r,sizes:c,onSizesChange:l,hasThumb:d>0&&d<1,onThumbChange:m=>a.current=m,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:m=>s.current=m};function f(m,p){return Ng(m,s.current,c,p)}return n==="horizontal"?i.jsx(yg,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const m=o.viewport.scrollLeft,p=Ui(m,c,o.dir);a.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollLeft=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollLeft=f(m,o.dir))}}):n==="vertical"?i.jsx(vg,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const m=o.viewport.scrollTop,p=Ui(m,c);a.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollTop=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollTop=f(m))}}):null}),yg=h.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=_t(Ft,e.__scopeScrollArea),[s,c]=h.useState(),l=h.useRef(null),d=ve(t,l,a.onScrollbarXChange);return h.useEffect(()=>{l.current&&c(getComputedStyle(l.current))},[l]),i.jsx(fd,{"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":Fo(n)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,f)=>{if(a.viewport){const m=a.viewport.scrollLeft+u.deltaX;e.onWheelScroll(m),gd(m,f)&&u.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:ho(s.paddingLeft),paddingEnd:ho(s.paddingRight)}})}})}),vg=h.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=_t(Ft,e.__scopeScrollArea),[s,c]=h.useState(),l=h.useRef(null),d=ve(t,l,a.onScrollbarYChange);return h.useEffect(()=>{l.current&&c(getComputedStyle(l.current))},[l]),i.jsx(fd,{"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":Fo(n)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,f)=>{if(a.viewport){const m=a.viewport.scrollTop+u.deltaY;e.onWheelScroll(m),gd(m,f)&&u.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:ho(s.paddingTop),paddingEnd:ho(s.paddingBottom)}})}})}),[xg,ud]=sd(Ft),fd=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:c,onThumbPositionChange:l,onDragScroll:d,onWheelScroll:u,onResize:f,...m}=e,p=_t(Ft,n),[g,_]=h.useState(null),j=ve(t,k=>_(k)),b=h.useRef(null),x=h.useRef(""),w=p.viewport,N=r.content-r.viewport,S=tt(u),v=tt(l),C=$o(f,10);function P(k){if(b.current){const E=k.clientX-b.current.left,M=k.clientY-b.current.top;d({x:E,y:M})}}return h.useEffect(()=>{const k=E=>{const M=E.target;(g==null?void 0:g.contains(M))&&S(E,N)};return document.addEventListener("wheel",k,{passive:!1}),()=>document.removeEventListener("wheel",k,{passive:!1})},[w,g,N,S]),h.useEffect(v,[r,v]),Jn(g,C),Jn(p.content,C),i.jsx(xg,{scope:n,scrollbar:g,hasThumb:o,onThumbChange:tt(a),onThumbPointerUp:tt(s),onThumbPositionChange:v,onThumbPointerDown:tt(c),children:i.jsx(de.div,{...m,ref:j,style:{position:"absolute",...m.style},onPointerDown:oe(e.onPointerDown,k=>{k.button===0&&(k.target.setPointerCapture(k.pointerId),b.current=g.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),P(k))}),onPointerMove:oe(e.onPointerMove,P),onPointerUp:oe(e.onPointerUp,k=>{const E=k.target;E.hasPointerCapture(k.pointerId)&&E.releasePointerCapture(k.pointerId),document.body.style.webkitUserSelect=x.current,p.viewport&&(p.viewport.style.scrollBehavior=""),b.current=null})})})}),po="ScrollAreaThumb",md=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ud(po,e.__scopeScrollArea);return i.jsx(mt,{present:n||o.hasThumb,children:i.jsx(bg,{ref:t,...r})})}),bg=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,a=_t(po,n),s=ud(po,n),{onThumbPositionChange:c}=s,l=ve(t,f=>s.onThumbChange(f)),d=h.useRef(void 0),u=$o(()=>{d.current&&(d.current(),d.current=void 0)},100);return h.useEffect(()=>{const f=a.viewport;if(f){const m=()=>{if(u(),!d.current){const p=Sg(f,c);d.current=p,c()}};return c(),f.addEventListener("scroll",m),()=>f.removeEventListener("scroll",m)}},[a.viewport,u,c]),i.jsx(de.div,{"data-state":s.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:oe(e.onPointerDownCapture,f=>{const p=f.target.getBoundingClientRect(),g=f.clientX-p.left,_=f.clientY-p.top;s.onThumbPointerDown({x:g,y:_})}),onPointerUp:oe(e.onPointerUp,s.onThumbPointerUp)})});md.displayName=po;var ks="ScrollAreaCorner",pd=h.forwardRef((e,t)=>{const n=_t(ks,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?i.jsx(wg,{...e,ref:t}):null});pd.displayName=ks;var wg=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=_t(ks,n),[a,s]=h.useState(0),[c,l]=h.useState(0),d=!!(a&&c);return Jn(o.scrollbarX,()=>{var f;const u=((f=o.scrollbarX)==null?void 0:f.offsetHeight)||0;o.onCornerHeightChange(u),l(u)}),Jn(o.scrollbarY,()=>{var f;const u=((f=o.scrollbarY)==null?void 0:f.offsetWidth)||0;o.onCornerWidthChange(u),s(u)}),d?i.jsx(de.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 ho(e){return e?parseInt(e,10):0}function hd(e,t){const n=e/t;return isNaN(n)?0:n}function Fo(e){const t=hd(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Ng(e,t,n,r="ltr"){const o=Fo(n),a=o/2,s=t||a,c=o-s,l=n.scrollbar.paddingStart+s,d=n.scrollbar.size-n.scrollbar.paddingEnd-c,u=n.content-n.viewport,f=r==="ltr"?[0,u]:[u*-1,0];return _d([l,d],f)(e)}function Ui(e,t,n="ltr"){const r=Fo(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,s=t.content-t.viewport,c=a-r,l=n==="ltr"?[0,s]:[s*-1,0],d=Ga(e,l);return _d([0,s],[0,c])(d)}function _d(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 gd(e,t){return e>0&&e<t}var Sg=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const a={left:e.scrollLeft,top:e.scrollTop},s=n.left!==a.left,c=n.top!==a.top;(s||c)&&t(),n=a,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function $o(e,t){const n=tt(e),r=h.useRef(0);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),h.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Jn(e,t){const n=tt(t);Xe(()=>{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 jd=id,Cg=ld,kg=pd;const Gt=h.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(jd,{ref:r,className:re("cj-relative cj-overflow-hidden",e),...n,children:[i.jsx(Cg,{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}),i.jsx(yd,{}),i.jsx(kg,{})]}));Gt.displayName=jd.displayName;const yd=h.forwardRef(({className:e,orientation:t="vertical",...n},r)=>i.jsx(Ss,{ref:r,orientation:t,className:re("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:i.jsx(md,{className:"cj-relative cj-flex-1 cj-rounded-full cj-bg-border"})}));yd.displayName=Ss.displayName;const Xa={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_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_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"},Pg={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_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_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"},Eg={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_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_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"},Mg={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_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_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"},Gi={en:Xa,es:Pg,pt:Eg,pl:Mg},Ps="language",Sr="en";function Dg(){try{return localStorage.getItem(Ps)||Sr}catch{return Sr}}let xr=[],Es=Dg();function Tg(e){return xr.push(e),()=>{xr=xr.filter(t=>t!==e)}}function Rg(){return Es}function vd(e){try{localStorage.setItem(Ps,e)}catch{}Es=e,xr.forEach(t=>t())}typeof window<"u"&&window.addEventListener("storage",e=>{e.key===Ps&&(Es=e.newValue||Sr,xr.forEach(t=>t()))});function be(){const e=y.useSyncExternalStore(Tg,Rg,()=>Sr),t=Gi[e]||Gi[Sr]||Xa;return{t:y.useCallback((r,o)=>{let a=t[r]??Xa[r]??r;if(o)for(const[s,c]of Object.entries(o))a=a.replace(new RegExp(`\\{\\{${s}\\}\\}`,"g"),String(c));return a},[t]),language:e,setLanguage:vd}}function Og(e,t=globalThis==null?void 0:globalThis.document){const n=tt(e);h.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 Ag="DismissableLayer",Ka="dismissableLayer.update",zg="dismissableLayer.pointerDownOutside",Ig="dismissableLayer.focusOutside",Xi,xd=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Lo=h.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:c,...l}=e,d=h.useContext(xd),[u,f]=h.useState(null),m=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=h.useState({}),g=ve(t,C=>f(C)),_=Array.from(d.layers),[j]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=_.indexOf(j),x=u?_.indexOf(u):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,N=x>=b,S=$g(C=>{const P=C.target,k=[...d.branches].some(E=>E.contains(P));!N||k||(o==null||o(C),s==null||s(C),C.defaultPrevented||c==null||c())},m),v=Lg(C=>{const P=C.target;[...d.branches].some(E=>E.contains(P))||(a==null||a(C),s==null||s(C),C.defaultPrevented||c==null||c())},m);return Og(C=>{x===d.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&c&&(C.preventDefault(),c()))},m),h.useEffect(()=>{if(u)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Xi=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),Ki(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Xi)}},[u,m,n,d]),h.useEffect(()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),Ki())},[u,d]),h.useEffect(()=>{const C=()=>p({});return document.addEventListener(Ka,C),()=>document.removeEventListener(Ka,C)},[]),i.jsx(de.div,{...l,ref:g,style:{pointerEvents:w?N?"auto":"none":void 0,...e.style},onFocusCapture:oe(e.onFocusCapture,v.onFocusCapture),onBlurCapture:oe(e.onBlurCapture,v.onBlurCapture),onPointerDownCapture:oe(e.onPointerDownCapture,S.onPointerDownCapture)})});Lo.displayName=Ag;var Wg="DismissableLayerBranch",Fg=h.forwardRef((e,t)=>{const n=h.useContext(xd),r=h.useRef(null),o=ve(t,r);return h.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),i.jsx(de.div,{...e,ref:o})});Fg.displayName=Wg;function $g(e,t=globalThis==null?void 0:globalThis.document){const n=tt(e),r=h.useRef(!1),o=h.useRef(()=>{});return h.useEffect(()=>{const a=c=>{if(c.target&&!r.current){let l=function(){bd(zg,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},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Lg(e,t=globalThis==null?void 0:globalThis.document){const n=tt(e),r=h.useRef(!1);return h.useEffect(()=>{const o=a=>{a.target&&!r.current&&bd(Ig,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 Ki(){const e=new CustomEvent(Ka);document.dispatchEvent(e)}function bd(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?Yh(o,a):o.dispatchEvent(a)}var Ca="focusScope.autoFocusOnMount",ka="focusScope.autoFocusOnUnmount",Ji={bubbles:!1,cancelable:!0},Bg="FocusScope",Bo=h.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[c,l]=h.useState(null),d=tt(o),u=tt(a),f=h.useRef(null),m=ve(t,_=>l(_)),p=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(r){let _=function(w){if(p.paused||!c)return;const N=w.target;c.contains(N)?f.current=N:cn(f.current,{select:!0})},j=function(w){if(p.paused||!c)return;const N=w.relatedTarget;N!==null&&(c.contains(N)||cn(f.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(const S of w)S.removedNodes.length>0&&cn(c)};document.addEventListener("focusin",_),document.addEventListener("focusout",j);const x=new MutationObserver(b);return c&&x.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",j),x.disconnect()}}},[r,c,p.paused]),h.useEffect(()=>{if(c){Zi.add(p);const _=document.activeElement;if(!c.contains(_)){const b=new CustomEvent(Ca,Ji);c.addEventListener(Ca,d),c.dispatchEvent(b),b.defaultPrevented||(Hg(Gg(wd(c)),{select:!0}),document.activeElement===_&&cn(c))}return()=>{c.removeEventListener(Ca,d),setTimeout(()=>{const b=new CustomEvent(ka,Ji);c.addEventListener(ka,u),c.dispatchEvent(b),b.defaultPrevented||cn(_??document.body,{select:!0}),c.removeEventListener(ka,u),Zi.remove(p)},0)}}},[c,d,u,p]);const g=h.useCallback(_=>{if(!n&&!r||p.paused)return;const j=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,b=document.activeElement;if(j&&b){const x=_.currentTarget,[w,N]=qg(x);w&&N?!_.shiftKey&&b===N?(_.preventDefault(),n&&cn(w,{select:!0})):_.shiftKey&&b===w&&(_.preventDefault(),n&&cn(N,{select:!0})):b===x&&_.preventDefault()}},[n,r,p.paused]);return i.jsx(de.div,{tabIndex:-1,...s,ref:m,onKeyDown:g})});Bo.displayName=Bg;function Hg(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(cn(r,{select:t}),document.activeElement!==n)return}function qg(e){const t=wd(e),n=Qi(t,e),r=Qi(t.reverse(),e);return[n,r]}function wd(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 Qi(e,t){for(const n of e)if(!Yg(n,{upTo:t}))return n}function Yg(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 Vg(e){return e instanceof HTMLInputElement&&"select"in e}function cn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Vg(e)&&t&&e.select()}}var Zi=Ug();function Ug(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ec(e,t),e.unshift(t)},remove(t){var n;e=ec(e,t),(n=e[0])==null||n.resume()}}}function ec(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Gg(e){return e.filter(t=>t.tagName!=="A")}var Xg="Portal",Ho=h.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[o,a]=h.useState(!1);Xe(()=>a(!0),[]);const s=n||o&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return s?hs.createPortal(i.jsx(de.div,{...r,ref:t}),s):null});Ho.displayName=Xg;var Pa=0;function Ms(){h.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??tc()),document.body.insertAdjacentElement("beforeend",e[1]??tc()),Pa++,()=>{Pa===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Pa--}},[])}function tc(){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 Mt=function(){return Mt=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},Mt.apply(this,arguments)};function Nd(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 Kg(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 ao="right-scroll-bar-position",so="width-before-scroll-bar",Jg="with-scroll-bars-hidden",Qg="--removed-body-scroll-bar-size";function Ea(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Zg(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 ej=typeof window<"u"?h.useLayoutEffect:h.useEffect,nc=new WeakMap;function tj(e,t){var n=Zg(null,function(r){return e.forEach(function(o){return Ea(o,r)})});return ej(function(){var r=nc.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(c){a.has(c)||Ea(c,null)}),a.forEach(function(c){o.has(c)||Ea(c,s)})}nc.set(n,e)},[e]),n}function nj(e){return e}function rj(e,t){t===void 0&&(t=nj);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 s=t(a,r);return n.push(s),function(){n=n.filter(function(c){return c!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(c){return a(c)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var c=n;n=[],c.forEach(a),s=n}var l=function(){var u=s;s=[],u.forEach(a)},d=function(){return Promise.resolve().then(l)};d(),n={push:function(u){s.push(u),d()},filter:function(u){return s=s.filter(u),n}}}};return o}function oj(e){e===void 0&&(e={});var t=rj(null);return t.options=Mt({async:!0,ssr:!1},e),t}var Sd=function(e){var t=e.sideCar,n=Nd(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 h.createElement(r,Mt({},n))};Sd.isSideCarExport=!0;function aj(e,t){return e.useMedium(t),Sd}var Cd=oj(),Ma=function(){},qo=h.forwardRef(function(e,t){var n=h.useRef(null),r=h.useState({onScrollCapture:Ma,onWheelCapture:Ma,onTouchMoveCapture:Ma}),o=r[0],a=r[1],s=e.forwardProps,c=e.children,l=e.className,d=e.removeScrollBar,u=e.enabled,f=e.shards,m=e.sideCar,p=e.noRelative,g=e.noIsolation,_=e.inert,j=e.allowPinchZoom,b=e.as,x=b===void 0?"div":b,w=e.gapMode,N=Nd(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=m,v=tj([n,t]),C=Mt(Mt({},N),o);return h.createElement(h.Fragment,null,u&&h.createElement(S,{sideCar:Cd,removeScrollBar:d,shards:f,noRelative:p,noIsolation:g,inert:_,setCallbacks:a,allowPinchZoom:!!j,lockRef:n,gapMode:w}),s?h.cloneElement(h.Children.only(c),Mt(Mt({},C),{ref:v})):h.createElement(x,Mt({},C,{className:l,ref:v}),c))});qo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};qo.classNames={fullWidth:so,zeroRight:ao};var sj=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ij(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=sj();return t&&e.setAttribute("nonce",t),e}function cj(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function lj(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var dj=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ij())&&(cj(t,n),lj(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},uj=function(){var e=dj();return function(t,n){h.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},kd=function(){var e=uj(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},fj={left:0,top:0,right:0,gap:0},Da=function(e){return parseInt(e||"",10)||0},mj=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[Da(n),Da(r),Da(o)]},pj=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return fj;var t=mj(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])}},hj=kd(),Un="data-scroll-locked",_j=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
228
|
-
|
|
227
|
+
*/const Vi=de("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
|
+
* @license lucide-react v0.462.0 - ISC
|
|
229
|
+
*
|
|
230
|
+
* This source code is licensed under the ISC license.
|
|
231
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
232
|
+
*/const K_=de("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
|
+
* @license lucide-react v0.462.0 - ISC
|
|
234
|
+
*
|
|
235
|
+
* This source code is licensed under the ISC license.
|
|
236
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
237
|
+
*/const Vl=de("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
|
+
* @license lucide-react v0.462.0 - ISC
|
|
239
|
+
*
|
|
240
|
+
* This source code is licensed under the ISC license.
|
|
241
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
242
|
+
*/const Vt=de("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
243
|
+
* @license lucide-react v0.462.0 - ISC
|
|
244
|
+
*
|
|
245
|
+
* This source code is licensed under the ISC license.
|
|
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(ij,` {
|
|
229
249
|
overflow: hidden `).concat(r,`;
|
|
230
250
|
padding-right: `).concat(c,"px ").concat(r,`;
|
|
231
251
|
}
|
|
232
|
-
body[`).concat(
|
|
252
|
+
body[`).concat(Qn,`] {
|
|
233
253
|
overflow: hidden `).concat(r,`;
|
|
234
254
|
overscroll-behavior: contain;
|
|
235
255
|
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
236
256
|
padding-left: `.concat(o,`px;
|
|
237
257
|
padding-top: `).concat(a,`px;
|
|
238
|
-
padding-right: `).concat(
|
|
258
|
+
padding-right: `).concat(i,`px;
|
|
239
259
|
margin-left:0;
|
|
240
260
|
margin-top:0;
|
|
241
261
|
margin-right: `).concat(c,"px ").concat(r,`;
|
|
242
262
|
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
243
263
|
}
|
|
244
264
|
|
|
245
|
-
.`).concat(
|
|
265
|
+
.`).concat(uo,` {
|
|
246
266
|
right: `).concat(c,"px ").concat(r,`;
|
|
247
267
|
}
|
|
248
268
|
|
|
249
|
-
.`).concat(
|
|
269
|
+
.`).concat(fo,` {
|
|
250
270
|
margin-right: `).concat(c,"px ").concat(r,`;
|
|
251
271
|
}
|
|
252
272
|
|
|
253
|
-
.`).concat(
|
|
273
|
+
.`).concat(uo," .").concat(uo,` {
|
|
254
274
|
right: 0 `).concat(r,`;
|
|
255
275
|
}
|
|
256
276
|
|
|
257
|
-
.`).concat(
|
|
277
|
+
.`).concat(fo," .").concat(fo,` {
|
|
258
278
|
margin-right: 0 `).concat(r,`;
|
|
259
279
|
}
|
|
260
280
|
|
|
261
|
-
body[`).concat(
|
|
262
|
-
`).concat(
|
|
281
|
+
body[`).concat(Qn,`] {
|
|
282
|
+
`).concat(cj,": ").concat(c,`px;
|
|
263
283
|
}
|
|
264
|
-
`)},
|
|
284
|
+
`)},fc=function(){var e=parseInt(document.body.getAttribute(Qn)||"0",10);return isFinite(e)?e:0},kj=function(){_.useEffect(function(){return document.body.setAttribute(Qn,(fc()+1).toString()),function(){var e=fc()-1;e<=0?document.body.removeAttribute(Qn):document.body.setAttribute(Qn,e.toString())}},[])},Pj=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;kj();var a=_.useMemo(function(){return Nj(o)},[o]);return _.createElement(Sj,{styles:Cj(a,!t,o,n?"":"!important")})},Za=!1;if(typeof window<"u")try{var Qr=Object.defineProperty({},"passive",{get:function(){return Za=!0,!0}});window.addEventListener("test",Qr,Qr),window.removeEventListener("test",Qr,Qr)}catch{Za=!1}var Ln=Za?{passive:!1}:!1,Ej=function(e){return e.tagName==="TEXTAREA"},Id=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Ej(e)&&n[t]==="visible")},Mj=function(e){return Id(e,"overflowY")},Dj=function(e){return Id(e,"overflowX")},mc=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Wd(e,r);if(o){var a=Fd(e,r),i=a[1],c=a[2];if(i>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Tj=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Rj=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Wd=function(e,t){return e==="v"?Mj(t):Dj(t)},Fd=function(e,t){return e==="v"?Tj(t):Rj(t)},Oj=function(e,t){return e==="h"&&t==="rtl"?-1:1},Aj=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,m=0,f=0;do{if(!c)break;var p=Fd(e,c),g=p[0],h=p[1],j=p[2],x=h-j-a*g;(g||x)&&Wd(e,c)&&(m+=x,f+=g);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(m)<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]},pc=function(e){return[e.deltaX,e.deltaY]},hc=function(e){return e&&"current"in e?e.current:e},zj=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ij=function(e){return`
|
|
265
285
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
266
286
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
267
|
-
`)},Pj=0,In=[];function Ej(e){var t=h.useRef([]),n=h.useRef([0,0]),r=h.useRef(),o=h.useState(Pj++)[0],a=h.useState(kd)[0],s=h.useRef(e);h.useEffect(function(){s.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var _=Kg([e.lockRef.current],(e.shards||[]).map(sc),!0).filter(Boolean);return _.forEach(function(j){return j.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),_.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=h.useCallback(function(_,j){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!s.current.allowPinchZoom;var b=Gr(_),x=n.current,w="deltaX"in _?_.deltaX:x[0]-b[0],N="deltaY"in _?_.deltaY:x[1]-b[1],S,v=_.target,C=Math.abs(w)>Math.abs(N)?"h":"v";if("touches"in _&&C==="h"&&v.type==="range")return!1;var P=window.getSelection(),k=P&&P.anchorNode,E=k?k===v||k.contains(v):!1;if(E)return!1;var M=oc(C,v);if(!M)return!0;if(M?S=C:(S=C==="v"?"h":"v",M=oc(C,v)),!M)return!1;if(!r.current&&"changedTouches"in _&&(w||N)&&(r.current=S),!S)return!0;var D=r.current||S;return Sj(D,j,_,D==="h"?w:N)},[]),l=h.useCallback(function(_){var j=_;if(!(!In.length||In[In.length-1]!==a)){var b="deltaY"in j?ac(j):Gr(j),x=t.current.filter(function(S){return S.name===j.type&&(S.target===j.target||j.target===S.shadowParent)&&Cj(S.delta,b)})[0];if(x&&x.should){j.cancelable&&j.preventDefault();return}if(!x){var w=(s.current.shards||[]).map(sc).filter(Boolean).filter(function(S){return S.contains(j.target)}),N=w.length>0?c(j,w[0]):!s.current.noIsolation;N&&j.cancelable&&j.preventDefault()}}},[]),d=h.useCallback(function(_,j,b,x){var w={name:_,delta:j,target:b,should:x,shadowParent:Mj(b)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(N){return N!==w})},1)},[]),u=h.useCallback(function(_){n.current=Gr(_),r.current=void 0},[]),f=h.useCallback(function(_){d(_.type,ac(_),_.target,c(_,e.lockRef.current))},[]),m=h.useCallback(function(_){d(_.type,Gr(_),_.target,c(_,e.lockRef.current))},[]);h.useEffect(function(){return In.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",l,zn),document.addEventListener("touchmove",l,zn),document.addEventListener("touchstart",u,zn),function(){In=In.filter(function(_){return _!==a}),document.removeEventListener("wheel",l,zn),document.removeEventListener("touchmove",l,zn),document.removeEventListener("touchstart",u,zn)}},[]);var p=e.removeScrollBar,g=e.inert;return h.createElement(h.Fragment,null,g?h.createElement(a,{styles:kj(o)}):null,p?h.createElement(jj,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Mj(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Dj=aj(Cd,Ej);var Yo=h.forwardRef(function(e,t){return h.createElement(qo,Mt({},e,{ref:t,sideCar:Dj}))});Yo.classNames=qo.classNames;var Tj=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Wn=new WeakMap,Xr=new WeakMap,Kr={},Ta=0,Dd=function(e){return e&&(e.host||Dd(e.parentNode))},Rj=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Dd(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})},Oj=function(e,t,n,r){var o=Rj(t,Array.isArray(e)?e:[e]);Kr[n]||(Kr[n]=new WeakMap);var a=Kr[n],s=[],c=new Set,l=new Set(o),d=function(f){!f||c.has(f)||(c.add(f),d(f.parentNode))};o.forEach(d);var u=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(m){if(c.has(m))u(m);else try{var p=m.getAttribute(r),g=p!==null&&p!=="false",_=(Wn.get(m)||0)+1,j=(a.get(m)||0)+1;Wn.set(m,_),a.set(m,j),s.push(m),_===1&&g&&Xr.set(m,!0),j===1&&m.setAttribute(n,"true"),g||m.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",m,b)}})};return u(t),c.clear(),Ta++,function(){s.forEach(function(f){var m=Wn.get(f)-1,p=a.get(f)-1;Wn.set(f,m),a.set(f,p),m||(Xr.has(f)||f.removeAttribute(r),Xr.delete(f)),p||f.removeAttribute(n)}),Ta--,Ta||(Wn=new WeakMap,Wn=new WeakMap,Xr=new WeakMap,Kr={})}},Ds=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Tj(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Oj(r,o,n,"aria-hidden")):function(){return null}};function Aj(e){const t=zj(e),n=h.forwardRef((r,o)=>{const{children:a,...s}=r,c=h.Children.toArray(a),l=c.find(Wj);if(l){const d=l.props.children,u=c.map(f=>f===l?h.Children.count(d)>1?h.Children.only(null):h.isValidElement(d)?d.props.children:null:f);return i.jsx(t,{...s,ref:o,children:h.isValidElement(d)?h.cloneElement(d,void 0,u):null})}return i.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function zj(e){const t=h.forwardRef((n,r)=>{const{children:o,...a}=n;if(h.isValidElement(o)){const s=$j(o),c=Fj(a,o.props);return o.type!==h.Fragment&&(c.ref=r?Tn(r,s):s),h.cloneElement(o,c)}return h.Children.count(o)>1?h.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ij=Symbol("radix.slottable");function Wj(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ij}function Fj(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 $j(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 Vo="Dialog",[Td,Rd]=ft(Vo),[Lj,Pt]=Td(Vo),Od=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,c=h.useRef(null),l=h.useRef(null),[d,u]=Ut({prop:r,defaultProp:o??!1,onChange:a,caller:Vo});return i.jsx(Lj,{scope:t,triggerRef:c,contentRef:l,contentId:At(),titleId:At(),descriptionId:At(),open:d,onOpenChange:u,onOpenToggle:h.useCallback(()=>u(f=>!f),[u]),modal:s,children:n})};Od.displayName=Vo;var Ad="DialogTrigger",zd=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Pt(Ad,n),a=ve(t,o.triggerRef);return i.jsx(de.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Os(o.open),...r,ref:a,onClick:oe(e.onClick,o.onOpenToggle)})});zd.displayName=Ad;var Ts="DialogPortal",[Bj,Id]=Td(Ts,{forceMount:void 0}),Wd=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Pt(Ts,t);return i.jsx(Bj,{scope:t,forceMount:n,children:h.Children.map(r,s=>i.jsx(mt,{present:n||a.open,children:i.jsx(Ho,{asChild:!0,container:o,children:s})}))})};Wd.displayName=Ts;var _o="DialogOverlay",Fd=h.forwardRef((e,t)=>{const n=Id(_o,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Pt(_o,e.__scopeDialog);return a.modal?i.jsx(mt,{present:r||a.open,children:i.jsx(qj,{...o,ref:t})}):null});Fd.displayName=_o;var Hj=Aj("DialogOverlay.RemoveScroll"),qj=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Pt(_o,n);return i.jsx(Yo,{as:Hj,allowPinchZoom:!0,shards:[o.contentRef],children:i.jsx(de.div,{"data-state":Os(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Pn="DialogContent",$d=h.forwardRef((e,t)=>{const n=Id(Pn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Pt(Pn,e.__scopeDialog);return i.jsx(mt,{present:r||a.open,children:a.modal?i.jsx(Yj,{...o,ref:t}):i.jsx(Vj,{...o,ref:t})})});$d.displayName=Pn;var Yj=h.forwardRef((e,t)=>{const n=Pt(Pn,e.__scopeDialog),r=h.useRef(null),o=ve(t,n.contentRef,r);return h.useEffect(()=>{const a=r.current;if(a)return Ds(a)},[]),i.jsx(Ld,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:oe(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:oe(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0;(s.button===2||c)&&a.preventDefault()}),onFocusOutside:oe(e.onFocusOutside,a=>a.preventDefault())})}),Vj=h.forwardRef((e,t)=>{const n=Pt(Pn,e.__scopeDialog),r=h.useRef(!1),o=h.useRef(!1);return i.jsx(Ld,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,c;(s=e.onCloseAutoFocus)==null||s.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 s=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Ld=h.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,c=Pt(Pn,n),l=h.useRef(null),d=ve(t,l);return Ms(),i.jsxs(i.Fragment,{children:[i.jsx(Bo,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:i.jsx(Lo,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Os(c.open),...s,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(Gj,{titleId:c.titleId}),i.jsx(Kj,{contentRef:l,descriptionId:c.descriptionId})]})]})}),Rs="DialogTitle",Bd=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Pt(Rs,n);return i.jsx(de.h2,{id:o.titleId,...r,ref:t})});Bd.displayName=Rs;var Hd="DialogDescription",qd=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Pt(Hd,n);return i.jsx(de.p,{id:o.descriptionId,...r,ref:t})});qd.displayName=Hd;var Yd="DialogClose",Vd=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Pt(Yd,n);return i.jsx(de.button,{type:"button",...r,ref:t,onClick:oe(e.onClick,()=>o.onOpenChange(!1))})});Vd.displayName=Yd;function Os(e){return e?"open":"closed"}var Ud="DialogTitleWarning",[Uj,Gd]=Eh(Ud,{contentName:Pn,titleName:Rs,docsSlug:"dialog"}),Gj=({titleId:e})=>{const t=Gd(Ud),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
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.
|
|
268
288
|
|
|
269
289
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
270
290
|
|
|
271
|
-
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 _.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},ay="DialogDescriptionWarning",sy=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ru(ay).contentName}}.`;return _.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},Hs=Hd,ou=Yd,qs=Gd,zr=Ud,Ir=Xd,Wr=Jd,Fr=Zd,Jo=tu,iy=Symbol("radix.slottable");function cy(e){const t=({children:n})=>s.jsx(s.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=iy,t}var au="AlertDialog",[ly]=_t(au,[Bd]),on=Bd(),su=e=>{const{__scopeAlertDialog:t,...n}=e,r=on(t);return s.jsx(Hs,{...r,...n,modal:!0})};su.displayName=au;var dy="AlertDialogTrigger",uy=_.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=on(n);return s.jsx(ou,{...o,...r,ref:t})});uy.displayName=dy;var fy="AlertDialogPortal",iu=e=>{const{__scopeAlertDialog:t,...n}=e,r=on(t);return s.jsx(qs,{...r,...n})};iu.displayName=fy;var my="AlertDialogOverlay",cu=_.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=on(n);return s.jsx(zr,{...o,...r,ref:t})});cu.displayName=my;var Zn="AlertDialogContent",[py,hy]=ly(Zn),_y=cy("AlertDialogContent"),lu=_.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,a=on(n),i=_.useRef(null),c=ve(t,i),l=_.useRef(null);return s.jsx(ry,{contentName:Zn,titleName:du,docsSlug:"alert-dialog",children:s.jsx(py,{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(_y,{children:r}),s.jsx(jy,{contentRef:i})]})})})});lu.displayName=Zn;var du="AlertDialogTitle",uu=_.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=on(n);return s.jsx(Wr,{...o,...r,ref:t})});uu.displayName=du;var fu="AlertDialogDescription",mu=_.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=on(n);return s.jsx(Fr,{...o,...r,ref:t})});mu.displayName=fu;var gy="AlertDialogAction",pu=_.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=on(n);return s.jsx(Jo,{...o,...r,ref:t})});pu.displayName=gy;var hu="AlertDialogCancel",_u=_.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=hy(hu,n),a=on(n),i=ve(t,o);return s.jsx(Jo,{...a,...r,ref:i})});_u.displayName=hu;var jy=({contentRef:e})=>{const t=`\`${Zn}\` requires a description for the component to be accessible for screen reader users.
|
|
272
292
|
|
|
273
|
-
You can add a description to the \`${
|
|
293
|
+
You can add a description to the \`${Zn}\` by passing a \`${fu}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
274
294
|
|
|
275
|
-
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 \`${
|
|
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.
|
|
276
296
|
|
|
277
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return h.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},ly=Jd,dy=Qd,cu=Zd,lu=eu,du=au,uu=iu,fu=nu,mu=ou;const uy=ly,fy=dy,pu=h.forwardRef(({className:e,...t},n)=>i.jsx(cu,{className:re("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}));pu.displayName=cu.displayName;const hu=h.forwardRef(({className:e,...t},n)=>i.jsxs(fy,{children:[i.jsx(pu,{}),i.jsx(lu,{ref:n,className:re("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})]}));hu.displayName=lu.displayName;const _u=({className:e,...t})=>i.jsx("div",{className:re("cj-flex cj-flex-col cj-space-y-2 cj-text-center sm:cj-text-left",e),...t});_u.displayName="AlertDialogHeader";const gu=({className:e,...t})=>i.jsx("div",{className:re("cj-flex cj-flex-col-reverse sm:cj-flex-row sm:cj-justify-end sm:cj-space-x-2",e),...t});gu.displayName="AlertDialogFooter";const ju=h.forwardRef(({className:e,...t},n)=>i.jsx(fu,{ref:n,className:re("cj-text-lg cj-font-semibold",e),...t}));ju.displayName=fu.displayName;const yu=h.forwardRef(({className:e,...t},n)=>i.jsx(mu,{ref:n,className:re("cj-text-sm cj-text-muted-foreground",e),...t}));yu.displayName=mu.displayName;const vu=h.forwardRef(({className:e,...t},n)=>i.jsx(du,{ref:n,className:re(gs(),e),...t}));vu.displayName=du.displayName;const xu=h.forwardRef(({className:e,...t},n)=>i.jsx(uu,{ref:n,className:re(gs({variant:"outline"}),"cj-mt-2 sm:cj-mt-0",e),...t}));xu.displayName=uu.displayName;function Ar({open:e,onOpenChange:t,title:n,description:r,confirmLabel:o,cancelLabel:a,destructive:s=!0,onConfirm:c}){const{t:l}=be();return i.jsx(uy,{open:e,onOpenChange:t,children:i.jsxs(hu,{children:[i.jsxs(_u,{children:[i.jsx(ju,{children:n??l("fc_confirm_title")}),i.jsx(yu,{children:r})]}),i.jsxs(gu,{children:[i.jsx(xu,{children:a??l("cancel")}),i.jsx(vu,{onClick:c,className:s?"cj-bg-destructive cj-text-destructive-foreground hover:cj-bg-destructive/90":void 0,children:o??l("delete")})]})]})})}function my({readOnly:e=!1}){const{t}=be(),{formConfig:n,activeStepId:r,setActiveStep:o,addStep:a,deleteStep:s,moveStep:c}=kt(),[l,d]=y.useState(null);return i.jsxs("div",{className:"cj-flex cj-flex-col cj-h-full cj-bg-card",children:[i.jsxs("div",{className:"cj-p-4 cj-border-b cj-flex cj-items-center cj-justify-between",children:[i.jsx("h2",{className:"cj-text-sm cj-font-semibold",children:t("fc_form_steps")}),!e&&i.jsxs(te,{size:"sm",variant:"outline",onClick:()=>a(),children:[i.jsx(Nt,{className:"cj-h-3.5 cj-w-3.5 cj-mr-1"}),t("fc_add_step")]})]}),i.jsx(Gt,{className:"cj-flex-1 cj-min-w-0",children:i.jsxs("div",{className:"cj-p-3 cj-space-y-2 cj-min-w-0",children:[n.steps.map((u,f)=>{const m=u.step_id===r,p=u.rows.reduce((g,_)=>g+_.field_ids.length,0);return i.jsx("div",{onClick:()=>o(u.step_id),className:`cj-rounded-xl cj-border-2 cj-p-3 cj-cursor-pointer cj-transition-colors ${m?"cj-border-primary cj-bg-primary/5":"cj-border-border cj-bg-card hover:cj-border-primary/40"}`,children:i.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[i.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 ${m?"cj-bg-primary cj-text-primary-foreground":"cj-bg-muted cj-text-muted-foreground"}`,children:f+1}),i.jsxs("div",{className:"cj-flex-1 cj-min-w-0",children:[i.jsx("div",{className:"cj-text-sm cj-font-semibold cj-truncate",children:u.title||t("fc_step_untitled")}),i.jsx("div",{className:"cj-text-[11px] cj-text-muted-foreground",children:t("fc_step_meta",{rows:u.rows.length,fields:p})})]}),!e&&m&&i.jsxs("div",{className:"cj-flex cj-items-center cj-gap-0.5",children:[i.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-6 cj-w-6",disabled:f===0,onClick:g=>{g.stopPropagation(),c(u.step_id,"up")},children:i.jsx(uo,{className:"cj-h-3 cj-w-3"})}),i.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-6 cj-w-6",disabled:f===n.steps.length-1,onClick:g=>{g.stopPropagation(),c(u.step_id,"down")},children:i.jsx(dn,{className:"cj-h-3 cj-w-3"})}),i.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-6 cj-w-6",onClick:g=>{g.stopPropagation(),d(u.step_id)},children:i.jsx(Rn,{className:"cj-h-3 cj-w-3 cj-text-destructive"})})]})]})},u.step_id)}),n.steps.length===0&&i.jsxs("div",{className:"cj-py-12 cj-text-center cj-text-xs cj-text-muted-foreground",children:[t("fc_no_steps"),!e&&i.jsxs(i.Fragment,{children:[i.jsx("br",{}),t("fc_no_steps_hint_click")," ",i.jsxs("strong",{children:["+ ",t("fc_add_step")]})," ",t("fc_no_steps_hint_to_begin")]})]})]})}),i.jsx(Ar,{open:l!==null,onOpenChange:u=>!u&&d(null),description:t("fc_confirm_delete_step"),onConfirm:()=>{l&&s(l),d(null)}})]})}const he=h.forwardRef(({className:e,type:t,...n},r)=>i.jsx("input",{type:t,className:re("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 py=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],hy=py.reduce((e,t)=>{const n=Mo(`Primitive.${t}`),r=h.forwardRef((o,a)=>{const{asChild:s,...c}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(l,{...c,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),_y="Label",bu=h.forwardRef((e,t)=>i.jsx(hy.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())}}));bu.displayName=_y;var wu=bu;const gy=Do("cj-text-sm cj-font-medium cj-leading-none peer-disabled:cj-cursor-not-allowed peer-disabled:cj-opacity-70"),U=h.forwardRef(({className:e,...t},n)=>i.jsx(wu,{ref:n,className:re(gy(),e),...t}));U.displayName=wu.displayName;const jy=["top","right","bottom","left"],un=Math.min,lt=Math.max,go=Math.round,Jr=Math.floor,zt=e=>({x:e,y:e}),yy={left:"right",right:"left",bottom:"top",top:"bottom"},vy={start:"end",end:"start"};function Qa(e,t,n){return lt(e,un(t,n))}function Xt(e,t){return typeof e=="function"?e(t):e}function Kt(e){return e.split("-")[0]}function rr(e){return e.split("-")[1]}function Is(e){return e==="x"?"y":"x"}function Ws(e){return e==="y"?"height":"width"}const xy=new Set(["top","bottom"]);function Rt(e){return xy.has(Kt(e))?"y":"x"}function Fs(e){return Is(Rt(e))}function by(e,t,n){n===void 0&&(n=!1);const r=rr(e),o=Fs(e),a=Ws(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=jo(s)),[s,jo(s)]}function wy(e){const t=jo(e);return[Za(e),t,Za(t)]}function Za(e){return e.replace(/start|end/g,t=>vy[t])}const ic=["left","right"],cc=["right","left"],Ny=["top","bottom"],Sy=["bottom","top"];function Cy(e,t,n){switch(e){case"top":case"bottom":return n?t?cc:ic:t?ic:cc;case"left":case"right":return t?Ny:Sy;default:return[]}}function ky(e,t,n,r){const o=rr(e);let a=Cy(Kt(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(Za)))),a}function jo(e){return e.replace(/left|right|bottom|top/g,t=>yy[t])}function Py(e){return{top:0,right:0,bottom:0,left:0,...e}}function Nu(e){return typeof e!="number"?Py(e):{top:e,right:e,bottom:e,left:e}}function yo(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 lc(e,t,n){let{reference:r,floating:o}=e;const a=Rt(t),s=Fs(t),c=Ws(s),l=Kt(t),d=a==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,m=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:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(rr(t)){case"start":p[s]-=m*(n&&d?-1:1);break;case"end":p[s]+=m*(n&&d?-1:1);break}return p}async function Ey(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:c,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:m=!1,padding:p=0}=Xt(t,e),g=Nu(p),j=c[m?f==="floating"?"reference":"floating":f],b=yo(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})),x=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.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=yo(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:w,strategy:l}):x);return{top:(b.top-S.top+g.top)/N.y,bottom:(S.bottom-b.bottom+g.bottom)/N.y,left:(b.left-S.left+g.left)/N.x,right:(S.right-b.right+g.right)/N.x}}const My=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,c=a.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=lc(d,r,l),m=r,p={},g=0;for(let j=0;j<c.length;j++){var _;const{name:b,fn:x}=c[j],{x:w,y:N,data:S,reset:v}=await x({x:u,y:f,initialPlacement:r,placement:m,strategy:o,middlewareData:p,rects:d,platform:{...s,detectOverflow:(_=s.detectOverflow)!=null?_:Ey},elements:{reference:e,floating:t}});u=w??u,f=N??f,p={...p,[b]:{...p[b],...S}},v&&g<=50&&(g++,typeof v=="object"&&(v.placement&&(m=v.placement),v.rects&&(d=v.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):v.rects),{x:u,y:f}=lc(d,m,l)),j=-1)}return{x:u,y:f,placement:m,strategy:o,middlewareData:p}},Dy=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:c,middlewareData:l}=t,{element:d,padding:u=0}=Xt(e,t)||{};if(d==null)return{};const f=Nu(u),m={x:n,y:r},p=Fs(o),g=Ws(p),_=await s.getDimensions(d),j=p==="y",b=j?"top":"left",x=j?"bottom":"right",w=j?"clientHeight":"clientWidth",N=a.reference[g]+a.reference[p]-m[p]-a.floating[g],S=m[p]-a.reference[p],v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let C=v?v[w]:0;(!C||!await(s.isElement==null?void 0:s.isElement(v)))&&(C=c.floating[w]||a.floating[g]);const P=N/2-S/2,k=C/2-_[g]/2-1,E=un(f[b],k),M=un(f[x],k),D=E,z=C-_[g]-M,A=C/2-_[g]/2+P,L=Qa(D,A,z),W=!l.arrow&&rr(o)!=null&&A!==L&&a.reference[g]/2-(A<D?E:M)-_[g]/2<0,Q=W?A<D?A-D:A-z:0;return{[p]:m[p]+Q,data:{[p]:L,centerOffset:A-L-Q,...W&&{alignmentOffset:Q}},reset:W}}}),Ty=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:c,platform:l,elements:d}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:_=!0,...j}=Xt(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const b=Kt(o),x=Rt(c),w=Kt(c)===c,N=await(l.isRTL==null?void 0:l.isRTL(d.floating)),S=m||(w||!_?[jo(c)]:wy(c)),v=g!=="none";!m&&v&&S.push(...ky(c,_,g,N));const C=[c,...S],P=await l.detectOverflow(t,j),k=[];let E=((r=a.flip)==null?void 0:r.overflows)||[];if(u&&k.push(P[b]),f){const A=by(o,s,N);k.push(P[A[0]],P[A[1]])}if(E=[...E,{placement:o,overflows:k}],!k.every(A=>A<=0)){var M,D;const A=(((M=a.flip)==null?void 0:M.index)||0)+1,L=C[A];if(L&&(!(f==="alignment"?x!==Rt(L):!1)||E.every(Y=>Rt(Y.placement)===x?Y.overflows[0]>0:!0)))return{data:{index:A,overflows:E},reset:{placement:L}};let W=(D=E.filter(Q=>Q.overflows[0]<=0).sort((Q,Y)=>Q.overflows[1]-Y.overflows[1])[0])==null?void 0:D.placement;if(!W)switch(p){case"bestFit":{var z;const Q=(z=E.filter(Y=>{if(v){const O=Rt(Y.placement);return O===x||O==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(O=>O>0).reduce((O,se)=>O+se,0)]).sort((Y,O)=>Y[1]-O[1])[0])==null?void 0:z[0];Q&&(W=Q);break}case"initialPlacement":W=c;break}if(o!==W)return{reset:{placement:W}}}return{}}}};function dc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function uc(e){return jy.some(t=>e[t]>=0)}const Ry=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...a}=Xt(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...a,elementContext:"reference"}),c=dc(s,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:uc(c)}}}case"escaped":{const s=await r.detectOverflow(t,{...a,altBoundary:!0}),c=dc(s,n.floating);return{data:{escapedOffsets:c,escaped:uc(c)}}}default:return{}}}}},Su=new Set(["left","top"]);async function Oy(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Kt(n),c=rr(n),l=Rt(n)==="y",d=Su.has(s)?-1:1,u=a&&l?-1:1,f=Xt(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof g=="number"&&(p=c==="end"?g*-1:g),l?{x:p*u,y:m*d}:{x:m*d,y:p*u}}const Ay=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:c}=t,l=await Oy(t,e);return s===((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:s}}}}},zy=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:s=!0,crossAxis:c=!1,limiter:l={fn:b=>{let{x,y:w}=b;return{x,y:w}}},...d}=Xt(e,t),u={x:n,y:r},f=await a.detectOverflow(t,d),m=Rt(Kt(o)),p=Is(m);let g=u[p],_=u[m];if(s){const b=p==="y"?"top":"left",x=p==="y"?"bottom":"right",w=g+f[b],N=g-f[x];g=Qa(w,g,N)}if(c){const b=m==="y"?"top":"left",x=m==="y"?"bottom":"right",w=_+f[b],N=_-f[x];_=Qa(w,_,N)}const j=l.fn({...t,[p]:g,[m]:_});return{...j,data:{x:j.x-n,y:j.y-r,enabled:{[p]:s,[m]:c}}}}}},Iy=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:c=0,mainAxis:l=!0,crossAxis:d=!0}=Xt(e,t),u={x:n,y:r},f=Rt(o),m=Is(f);let p=u[m],g=u[f];const _=Xt(c,t),j=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:0,crossAxis:0,..._};if(l){const w=m==="y"?"height":"width",N=a.reference[m]-a.floating[w]+j.mainAxis,S=a.reference[m]+a.reference[w]-j.mainAxis;p<N?p=N:p>S&&(p=S)}if(d){var b,x;const w=m==="y"?"width":"height",N=Su.has(Kt(o)),S=a.reference[f]-a.floating[w]+(N&&((b=s.offset)==null?void 0:b[f])||0)+(N?0:j.crossAxis),v=a.reference[f]+a.reference[w]+(N?0:((x=s.offset)==null?void 0:x[f])||0)-(N?j.crossAxis:0);g<S?g=S:g>v&&(g=v)}return{[m]:p,[f]:g}}}},Wy=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:c}=t,{apply:l=()=>{},...d}=Xt(e,t),u=await s.detectOverflow(t,d),f=Kt(o),m=rr(o),p=Rt(o)==="y",{width:g,height:_}=a.floating;let j,b;f==="top"||f==="bottom"?(j=f,b=m===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(b=f,j=m==="end"?"top":"bottom");const x=_-u.top-u.bottom,w=g-u.left-u.right,N=un(_-u[j],x),S=un(g-u[b],w),v=!t.middlewareData.shift;let C=N,P=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=x),v&&!m){const E=lt(u.left,0),M=lt(u.right,0),D=lt(u.top,0),z=lt(u.bottom,0);p?P=g-2*(E!==0||M!==0?E+M:lt(u.left,u.right)):C=_-2*(D!==0||z!==0?D+z:lt(u.top,u.bottom))}await l({...t,availableWidth:P,availableHeight:C});const k=await s.getDimensions(c.floating);return g!==k.width||_!==k.height?{reset:{rects:!0}}:{}}}};function Go(){return typeof window<"u"}function or(e){return Cu(e)?(e.nodeName||"").toLowerCase():"#document"}function dt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $t(e){var t;return(t=(Cu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Cu(e){return Go()?e instanceof Node||e instanceof dt(e).Node:!1}function St(e){return Go()?e instanceof Element||e instanceof dt(e).Element:!1}function It(e){return Go()?e instanceof HTMLElement||e instanceof dt(e).HTMLElement:!1}function fc(e){return!Go()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof dt(e).ShadowRoot}const Fy=new Set(["inline","contents"]);function zr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ct(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Fy.has(o)}const $y=new Set(["table","td","th"]);function Ly(e){return $y.has(or(e))}const By=[":popover-open",":modal"];function Xo(e){return By.some(t=>{try{return e.matches(t)}catch{return!1}})}const Hy=["transform","translate","scale","rotate","perspective"],qy=["transform","translate","scale","rotate","perspective","filter"],Yy=["paint","layout","strict","content"];function $s(e){const t=Ls(),n=St(e)?Ct(e):e;return Hy.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)||qy.some(r=>(n.willChange||"").includes(r))||Yy.some(r=>(n.contain||"").includes(r))}function Vy(e){let t=fn(e);for(;It(t)&&!Qn(t);){if($s(t))return t;if(Xo(t))return null;t=fn(t)}return null}function Ls(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Uy=new Set(["html","body","#document"]);function Qn(e){return Uy.has(or(e))}function Ct(e){return dt(e).getComputedStyle(e)}function Ko(e){return St(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function fn(e){if(or(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fc(e)&&e.host||$t(e);return fc(t)?t.host:t}function ku(e){const t=fn(e);return Qn(t)?e.ownerDocument?e.ownerDocument.body:e.body:It(t)&&zr(t)?t:ku(t)}function Cr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ku(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=dt(o);if(a){const c=es(s);return t.concat(s,s.visualViewport||[],zr(o)?o:[],c&&n?Cr(c):[])}return t.concat(o,Cr(o,[],n))}function es(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Pu(e){const t=Ct(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=It(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,c=go(n)!==a||go(r)!==s;return c&&(n=a,r=s),{width:n,height:r,$:c}}function Bs(e){return St(e)?e:e.contextElement}function Xn(e){const t=Bs(e);if(!It(t))return zt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Pu(t);let s=(a?go(n.width):n.width)/r,c=(a?go(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const Gy=zt(0);function Eu(e){const t=dt(e);return!Ls()||!t.visualViewport?Gy:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xy(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==dt(e)?!1:t}function En(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Bs(e);let s=zt(1);t&&(r?St(r)&&(s=Xn(r)):s=Xn(e));const c=Xy(a,n,r)?Eu(a):zt(0);let l=(o.left+c.x)/s.x,d=(o.top+c.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(a){const m=dt(a),p=r&&St(r)?dt(r):r;let g=m,_=es(g);for(;_&&r&&p!==g;){const j=Xn(_),b=_.getBoundingClientRect(),x=Ct(_),w=b.left+(_.clientLeft+parseFloat(x.paddingLeft))*j.x,N=b.top+(_.clientTop+parseFloat(x.paddingTop))*j.y;l*=j.x,d*=j.y,u*=j.x,f*=j.y,l+=w,d+=N,g=dt(_),_=es(g)}}return yo({width:u,height:f,x:l,y:d})}function Jo(e,t){const n=Ko(e).scrollLeft;return t?t.left+n:En($t(e)).left+n}function Mu(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Jo(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Ky(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=$t(r),c=t?Xo(t.floating):!1;if(r===s||c&&a)return n;let l={scrollLeft:0,scrollTop:0},d=zt(1);const u=zt(0),f=It(r);if((f||!f&&!a)&&((or(r)!=="body"||zr(s))&&(l=Ko(r)),It(r))){const p=En(r);d=Xn(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const m=s&&!f&&!a?Mu(s,l):zt(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-l.scrollLeft*d.x+u.x+m.x,y:n.y*d.y-l.scrollTop*d.y+u.y+m.y}}function Jy(e){return Array.from(e.getClientRects())}function Qy(e){const t=$t(e),n=Ko(e),r=e.ownerDocument.body,o=lt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=lt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Jo(e);const c=-n.scrollTop;return Ct(r).direction==="rtl"&&(s+=lt(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:c}}const mc=25;function Zy(e,t){const n=dt(e),r=$t(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,c=0,l=0;if(o){a=o.width,s=o.height;const u=Ls();(!u||u&&t==="fixed")&&(c=o.offsetLeft,l=o.offsetTop)}const d=Jo(r);if(d<=0){const u=r.ownerDocument,f=u.body,m=getComputedStyle(f),p=u.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(r.clientWidth-f.clientWidth-p);g<=mc&&(a-=g)}else d<=mc&&(a+=d);return{width:a,height:s,x:c,y:l}}const ev=new Set(["absolute","fixed"]);function tv(e,t){const n=En(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=It(e)?Xn(e):zt(1),s=e.clientWidth*a.x,c=e.clientHeight*a.y,l=o*a.x,d=r*a.y;return{width:s,height:c,x:l,y:d}}function pc(e,t,n){let r;if(t==="viewport")r=Zy(e,n);else if(t==="document")r=Qy($t(e));else if(St(t))r=tv(t,n);else{const o=Eu(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return yo(r)}function Du(e,t){const n=fn(e);return n===t||!St(n)||Qn(n)?!1:Ct(n).position==="fixed"||Du(n,t)}function nv(e,t){const n=t.get(e);if(n)return n;let r=Cr(e,[],!1).filter(c=>St(c)&&or(c)!=="body"),o=null;const a=Ct(e).position==="fixed";let s=a?fn(e):e;for(;St(s)&&!Qn(s);){const c=Ct(s),l=$s(s);!l&&c.position==="fixed"&&(o=null),(a?!l&&!o:!l&&c.position==="static"&&!!o&&ev.has(o.position)||zr(s)&&!l&&Du(e,s))?r=r.filter(u=>u!==s):o=c,s=fn(s)}return t.set(e,r),r}function rv(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Xo(t)?[]:nv(t,this._c):[].concat(n),r],c=s[0],l=s.reduce((d,u)=>{const f=pc(t,u,o);return d.top=lt(f.top,d.top),d.right=un(f.right,d.right),d.bottom=un(f.bottom,d.bottom),d.left=lt(f.left,d.left),d},pc(t,c,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ov(e){const{width:t,height:n}=Pu(e);return{width:t,height:n}}function av(e,t,n){const r=It(t),o=$t(t),a=n==="fixed",s=En(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const l=zt(0);function d(){l.x=Jo(o)}if(r||!r&&!a)if((or(t)!=="body"||zr(o))&&(c=Ko(t)),r){const p=En(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?Mu(o,c):zt(0),f=s.left+c.scrollLeft-l.x-u.x,m=s.top+c.scrollTop-l.y-u.y;return{x:f,y:m,width:s.width,height:s.height}}function Ra(e){return Ct(e).position==="static"}function hc(e,t){if(!It(e)||Ct(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return $t(e)===n&&(n=n.ownerDocument.body),n}function Tu(e,t){const n=dt(e);if(Xo(e))return n;if(!It(e)){let o=fn(e);for(;o&&!Qn(o);){if(St(o)&&!Ra(o))return o;o=fn(o)}return n}let r=hc(e,t);for(;r&&Ly(r)&&Ra(r);)r=hc(r,t);return r&&Qn(r)&&Ra(r)&&!$s(r)?n:r||Vy(e)||n}const sv=async function(e){const t=this.getOffsetParent||Tu,n=this.getDimensions,r=await n(e.floating);return{reference:av(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function iv(e){return Ct(e).direction==="rtl"}const cv={convertOffsetParentRelativeRectToViewportRelativeRect:Ky,getDocumentElement:$t,getClippingRect:rv,getOffsetParent:Tu,getElementRects:sv,getClientRects:Jy,getDimensions:ov,getScale:Xn,isElement:St,isRTL:iv};function Ru(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function lv(e,t){let n=null,r;const o=$t(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),a();const d=e.getBoundingClientRect(),{left:u,top:f,width:m,height:p}=d;if(c||t(),!m||!p)return;const g=Jr(f),_=Jr(o.clientWidth-(u+m)),j=Jr(o.clientHeight-(f+p)),b=Jr(u),w={rootMargin:-g+"px "+-_+"px "+-j+"px "+-b+"px",threshold:lt(0,un(1,l))||1};let N=!0;function S(v){const C=v[0].intersectionRatio;if(C!==l){if(!N)return s();C?s(!1,C):r=setTimeout(()=>{s(!1,1e-7)},1e3)}C===1&&!Ru(d,e.getBoundingClientRect())&&s(),N=!1}try{n=new IntersectionObserver(S,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(e)}return s(!0),a}function dv(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,d=Bs(e),u=o||a?[...d?Cr(d):[],...Cr(t)]:[];u.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),a&&b.addEventListener("resize",n)});const f=d&&c?lv(d,n):null;let m=-1,p=null;s&&(p=new ResizeObserver(b=>{let[x]=b;x&&x.target===d&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),d&&!l&&p.observe(d),p.observe(t));let g,_=l?En(e):null;l&&j();function j(){const b=En(e);_&&!Ru(_,b)&&n(),_=b,g=requestAnimationFrame(j)}return n(),()=>{var b;u.forEach(x=>{o&&x.removeEventListener("scroll",n),a&&x.removeEventListener("resize",n)}),f==null||f(),(b=p)==null||b.disconnect(),p=null,l&&cancelAnimationFrame(g)}}const uv=Ay,fv=zy,mv=Ty,pv=Wy,hv=Ry,_c=Dy,_v=Iy,gv=(e,t,n)=>{const r=new Map,o={platform:cv,...n},a={...o.platform,_c:r};return My(e,t,{...o,platform:a})};var jv=typeof document<"u",yv=function(){},io=jv?y.useLayoutEffect:yv;function vo(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(!vo(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)&&!vo(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Ou(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function gc(e,t){const n=Ou(e);return Math.round(t*n)/n}function Oa(e){const t=h.useRef(e);return io(()=>{t.current=e}),t}function vv(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:c=!0,whileElementsMounted:l,open:d}=e,[u,f]=h.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=h.useState(r);vo(m,r)||p(r);const[g,_]=h.useState(null),[j,b]=h.useState(null),x=h.useCallback(Y=>{Y!==v.current&&(v.current=Y,_(Y))},[]),w=h.useCallback(Y=>{Y!==C.current&&(C.current=Y,b(Y))},[]),N=a||g,S=s||j,v=h.useRef(null),C=h.useRef(null),P=h.useRef(u),k=l!=null,E=Oa(l),M=Oa(o),D=Oa(d),z=h.useCallback(()=>{if(!v.current||!C.current)return;const Y={placement:t,strategy:n,middleware:m};M.current&&(Y.platform=M.current),gv(v.current,C.current,Y).then(O=>{const se={...O,isPositioned:D.current!==!1};A.current&&!vo(P.current,se)&&(P.current=se,Eo.flushSync(()=>{f(se)}))})},[m,t,n,M,D]);io(()=>{d===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(Y=>({...Y,isPositioned:!1})))},[d]);const A=h.useRef(!1);io(()=>(A.current=!0,()=>{A.current=!1}),[]),io(()=>{if(N&&(v.current=N),S&&(C.current=S),N&&S){if(E.current)return E.current(N,S,z);z()}},[N,S,z,E,k]);const L=h.useMemo(()=>({reference:v,floating:C,setReference:x,setFloating:w}),[x,w]),W=h.useMemo(()=>({reference:N,floating:S}),[N,S]),Q=h.useMemo(()=>{const Y={position:n,left:0,top:0};if(!W.floating)return Y;const O=gc(W.floating,u.x),se=gc(W.floating,u.y);return c?{...Y,transform:"translate("+O+"px, "+se+"px)",...Ou(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:se}},[n,c,W.floating,u.x,u.y]);return h.useMemo(()=>({...u,update:z,refs:L,elements:W,floatingStyles:Q}),[u,z,L,W,Q])}const xv=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?_c({element:r.current,padding:o}).fn(n):{}:r?_c({element:r,padding:o}).fn(n):{}}}},bv=(e,t)=>({...uv(e),options:[e,t]}),wv=(e,t)=>({...fv(e),options:[e,t]}),Nv=(e,t)=>({..._v(e),options:[e,t]}),Sv=(e,t)=>({...mv(e),options:[e,t]}),Cv=(e,t)=>({...pv(e),options:[e,t]}),kv=(e,t)=>({...hv(e),options:[e,t]}),Pv=(e,t)=>({...xv(e),options:[e,t]});var Ev="Arrow",Au=h.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return i.jsx(de.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:i.jsx("polygon",{points:"0,0 30,0 15,10"})})});Au.displayName=Ev;var Mv=Au;function Hs(e){const[t,n]=h.useState(void 0);return Xe(()=>{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 s,c;if("borderBoxSize"in a){const l=a.borderBoxSize,d=Array.isArray(l)?l[0]:l;s=d.inlineSize,c=d.blockSize}else s=e.offsetWidth,c=e.offsetHeight;n({width:s,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var qs="Popper",[zu,Qo]=ft(qs),[Dv,Iu]=zu(qs),Wu=e=>{const{__scopePopper:t,children:n}=e,[r,o]=h.useState(null);return i.jsx(Dv,{scope:t,anchor:r,onAnchorChange:o,children:n})};Wu.displayName=qs;var Fu="PopperAnchor",$u=h.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Iu(Fu,n),s=h.useRef(null),c=ve(t,s),l=h.useRef(null);return h.useEffect(()=>{const d=l.current;l.current=(r==null?void 0:r.current)||s.current,d!==l.current&&a.onAnchorChange(l.current)}),r?null:i.jsx(de.div,{...o,ref:c})});$u.displayName=Fu;var Ys="PopperContent",[Tv,Rv]=zu(Ys),Lu=h.forwardRef((e,t)=>{var T,B,ee,K,ie,ce;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:g,..._}=e,j=Iu(Ys,n),[b,x]=h.useState(null),w=ve(t,pe=>x(pe)),[N,S]=h.useState(null),v=Hs(N),C=(v==null?void 0:v.width)??0,P=(v==null?void 0:v.height)??0,k=r+(a!=="center"?"-"+a:""),E=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},M=Array.isArray(d)?d:[d],D=M.length>0,z={padding:E,boundary:M.filter(Av),altBoundary:D},{refs:A,floatingStyles:L,placement:W,isPositioned:Q,middlewareData:Y}=vv({strategy:"fixed",placement:k,whileElementsMounted:(...pe)=>dv(...pe,{animationFrame:p==="always"}),elements:{reference:j.anchor},middleware:[bv({mainAxis:o+P,alignmentAxis:s}),l&&wv({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Nv():void 0,...z}),l&&Sv({...z}),Cv({...z,apply:({elements:pe,rects:Ee,availableWidth:F,availableHeight:J})=>{const{width:le,height:X}=Ee.reference,ae=pe.floating.style;ae.setProperty("--radix-popper-available-width",`${F}px`),ae.setProperty("--radix-popper-available-height",`${J}px`),ae.setProperty("--radix-popper-anchor-width",`${le}px`),ae.setProperty("--radix-popper-anchor-height",`${X}px`)}}),N&&Pv({element:N,padding:c}),zv({arrowWidth:C,arrowHeight:P}),m&&kv({strategy:"referenceHidden",...z})]}),[O,se]=qu(W),fe=tt(g);Xe(()=>{Q&&(fe==null||fe())},[Q,fe]);const ue=(T=Y.arrow)==null?void 0:T.x,R=(B=Y.arrow)==null?void 0:B.y,I=((ee=Y.arrow)==null?void 0:ee.centerOffset)!==0,[H,G]=h.useState();return Xe(()=>{b&&G(window.getComputedStyle(b).zIndex)},[b]),i.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:Q?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[(K=Y.transformOrigin)==null?void 0:K.x,(ie=Y.transformOrigin)==null?void 0:ie.y].join(" "),...((ce=Y.hide)==null?void 0:ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i.jsx(Tv,{scope:n,placedSide:O,onArrowChange:S,arrowX:ue,arrowY:R,shouldHideArrow:I,children:i.jsx(de.div,{"data-side":O,"data-align":se,..._,ref:w,style:{..._.style,animation:Q?void 0:"none"}})})})});Lu.displayName=Ys;var Bu="PopperArrow",Ov={top:"bottom",right:"left",bottom:"top",left:"right"},Hu=h.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=Rv(Bu,r),s=Ov[a.placedSide];return i.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]: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:i.jsx(Mv,{...o,ref:n,style:{...o.style,display:"block"}})})});Hu.displayName=Bu;function Av(e){return e!==null}var zv=e=>({name:"transformOrigin",options:e,fn(t){var j,b,x;const{placement:n,rects:r,middlewareData:o}=t,s=((j=o.arrow)==null?void 0:j.centerOffset)!==0,c=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[d,u]=qu(n),f={start:"0%",center:"50%",end:"100%"}[u],m=(((b=o.arrow)==null?void 0:b.x)??0)+c/2,p=(((x=o.arrow)==null?void 0:x.y)??0)+l/2;let g="",_="";return d==="bottom"?(g=s?f:`${m}px`,_=`${-l}px`):d==="top"?(g=s?f:`${m}px`,_=`${r.floating.height+l}px`):d==="right"?(g=`${-l}px`,_=s?f:`${p}px`):d==="left"&&(g=`${r.floating.width+l}px`,_=s?f:`${p}px`),{data:{x:g,y:_}}}});function qu(e){const[t,n="center"]=e.split("-");return[t,n]}var Yu=Wu,Vs=$u,Vu=Lu,Uu=Hu;function Iv(e){const t=Wv(e),n=h.forwardRef((r,o)=>{const{children:a,...s}=r,c=h.Children.toArray(a),l=c.find($v);if(l){const d=l.props.children,u=c.map(f=>f===l?h.Children.count(d)>1?h.Children.only(null):h.isValidElement(d)?d.props.children:null:f);return i.jsx(t,{...s,ref:o,children:h.isValidElement(d)?h.cloneElement(d,void 0,u):null})}return i.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function Wv(e){const t=h.forwardRef((n,r)=>{const{children:o,...a}=n;if(h.isValidElement(o)){const s=Bv(o),c=Lv(a,o.props);return o.type!==h.Fragment&&(c.ref=r?Tn(r,s):s),h.cloneElement(o,c)}return h.Children.count(o)>1?h.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Fv=Symbol("radix.slottable");function $v(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Fv}function Lv(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 Bv(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 Us(e){const t=h.useRef({value:e,previous:e});return h.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Gu=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"}),Hv="VisuallyHidden",qv=h.forwardRef((e,t)=>i.jsx(de.span,{...e,ref:t,style:{...Gu,...e.style}}));qv.displayName=Hv;var Yv=[" ","Enter","ArrowUp","ArrowDown"],Vv=[" ","Enter"],Mn="Select",[Zo,ea,Uv]=il(Mn),[ar]=ft(Mn,[Uv,Qo]),ta=Qo(),[Gv,hn]=ar(Mn),[Xv,Kv]=ar(Mn),Xu=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:c,onValueChange:l,dir:d,name:u,autoComplete:f,disabled:m,required:p,form:g}=e,_=ta(t),[j,b]=h.useState(null),[x,w]=h.useState(null),[N,S]=h.useState(!1),v=Er(d),[C,P]=Ut({prop:r,defaultProp:o??!1,onChange:a,caller:Mn}),[k,E]=Ut({prop:s,defaultProp:c,onChange:l,caller:Mn}),M=h.useRef(null),D=j?g||!!j.closest("form"):!0,[z,A]=h.useState(new Set),L=Array.from(z).map(W=>W.props.value).join(";");return i.jsx(Yu,{..._,children:i.jsxs(Gv,{required:p,scope:t,trigger:j,onTriggerChange:b,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:N,onValueNodeHasChildrenChange:S,contentId:At(),value:k,onValueChange:E,open:C,onOpenChange:P,dir:v,triggerPointerDownPosRef:M,disabled:m,children:[i.jsx(Zo.Provider,{scope:t,children:i.jsx(Xv,{scope:e.__scopeSelect,onNativeOptionAdd:h.useCallback(W=>{A(Q=>new Set(Q).add(W))},[]),onNativeOptionRemove:h.useCallback(W=>{A(Q=>{const Y=new Set(Q);return Y.delete(W),Y})},[]),children:n})}),D?i.jsxs(vf,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:f,value:k,onChange:W=>E(W.target.value),disabled:m,form:g,children:[k===void 0?i.jsx("option",{value:""}):null,Array.from(z)]},L):null]})})};Xu.displayName=Mn;var Ku="SelectTrigger",Ju=h.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=ta(n),s=hn(Ku,n),c=s.disabled||r,l=ve(t,s.onTriggerChange),d=ea(n),u=h.useRef("touch"),[f,m,p]=bf(_=>{const j=d().filter(w=>!w.disabled),b=j.find(w=>w.value===s.value),x=wf(j,_,b);x!==void 0&&s.onValueChange(x.value)}),g=_=>{c||(s.onOpenChange(!0),p()),_&&(s.triggerPointerDownPosRef.current={x:Math.round(_.pageX),y:Math.round(_.pageY)})};return i.jsx(Vs,{asChild:!0,...a,children:i.jsx(de.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":xf(s.value)?"":void 0,...o,ref:l,onClick:oe(o.onClick,_=>{_.currentTarget.focus(),u.current!=="mouse"&&g(_)}),onPointerDown:oe(o.onPointerDown,_=>{u.current=_.pointerType;const j=_.target;j.hasPointerCapture(_.pointerId)&&j.releasePointerCapture(_.pointerId),_.button===0&&_.ctrlKey===!1&&_.pointerType==="mouse"&&(g(_),_.preventDefault())}),onKeyDown:oe(o.onKeyDown,_=>{const j=f.current!=="";!(_.ctrlKey||_.altKey||_.metaKey)&&_.key.length===1&&m(_.key),!(j&&_.key===" ")&&Yv.includes(_.key)&&(g(),_.preventDefault())})})})});Ju.displayName=Ku;var Qu="SelectValue",Zu=h.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...c}=e,l=hn(Qu,n),{onValueNodeHasChildrenChange:d}=l,u=a!==void 0,f=ve(t,l.onValueNodeChange);return Xe(()=>{d(u)},[d,u]),i.jsx(de.span,{...c,ref:f,style:{pointerEvents:"none"},children:xf(l.value)?i.jsx(i.Fragment,{children:s}):a})});Zu.displayName=Qu;var Jv="SelectIcon",ef=h.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return i.jsx(de.span,{"aria-hidden":!0,...o,ref:t,children:r||"โผ"})});ef.displayName=Jv;var Qv="SelectPortal",tf=e=>i.jsx(Ho,{asChild:!0,...e});tf.displayName=Qv;var Dn="SelectContent",nf=h.forwardRef((e,t)=>{const n=hn(Dn,e.__scopeSelect),[r,o]=h.useState();if(Xe(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?Eo.createPortal(i.jsx(rf,{scope:e.__scopeSelect,children:i.jsx(Zo.Slot,{scope:e.__scopeSelect,children:i.jsx("div",{children:e.children})})}),a):null}return i.jsx(of,{...e,ref:t})});nf.displayName=Dn;var vt=10,[rf,_n]=ar(Dn),Zv="SelectContentImpl",ex=Iv("SelectContent.RemoveScroll"),of=h.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:c,sideOffset:l,align:d,alignOffset:u,arrowPadding:f,collisionBoundary:m,collisionPadding:p,sticky:g,hideWhenDetached:_,avoidCollisions:j,...b}=e,x=hn(Dn,n),[w,N]=h.useState(null),[S,v]=h.useState(null),C=ve(t,T=>N(T)),[P,k]=h.useState(null),[E,M]=h.useState(null),D=ea(n),[z,A]=h.useState(!1),L=h.useRef(!1);h.useEffect(()=>{if(w)return Ds(w)},[w]),Ms();const W=h.useCallback(T=>{const[B,...ee]=D().map(ce=>ce.ref.current),[K]=ee.slice(-1),ie=document.activeElement;for(const ce of T)if(ce===ie||(ce==null||ce.scrollIntoView({block:"nearest"}),ce===B&&S&&(S.scrollTop=0),ce===K&&S&&(S.scrollTop=S.scrollHeight),ce==null||ce.focus(),document.activeElement!==ie))return},[D,S]),Q=h.useCallback(()=>W([P,w]),[W,P,w]);h.useEffect(()=>{z&&Q()},[z,Q]);const{onOpenChange:Y,triggerPointerDownPosRef:O}=x;h.useEffect(()=>{if(w){let T={x:0,y:0};const B=K=>{var ie,ce;T={x:Math.abs(Math.round(K.pageX)-(((ie=O.current)==null?void 0:ie.x)??0)),y:Math.abs(Math.round(K.pageY)-(((ce=O.current)==null?void 0:ce.y)??0))}},ee=K=>{T.x<=10&&T.y<=10?K.preventDefault():w.contains(K.target)||Y(!1),document.removeEventListener("pointermove",B),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",B),document.addEventListener("pointerup",ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",B),document.removeEventListener("pointerup",ee,{capture:!0})}}},[w,Y,O]),h.useEffect(()=>{const T=()=>Y(!1);return window.addEventListener("blur",T),window.addEventListener("resize",T),()=>{window.removeEventListener("blur",T),window.removeEventListener("resize",T)}},[Y]);const[se,fe]=bf(T=>{const B=D().filter(ie=>!ie.disabled),ee=B.find(ie=>ie.ref.current===document.activeElement),K=wf(B,T,ee);K&&setTimeout(()=>K.ref.current.focus())}),ue=h.useCallback((T,B,ee)=>{const K=!L.current&&!ee;(x.value!==void 0&&x.value===B||K)&&(k(T),K&&(L.current=!0))},[x.value]),R=h.useCallback(()=>w==null?void 0:w.focus(),[w]),I=h.useCallback((T,B,ee)=>{const K=!L.current&&!ee;(x.value!==void 0&&x.value===B||K)&&M(T)},[x.value]),H=r==="popper"?ts:af,G=H===ts?{side:c,sideOffset:l,align:d,alignOffset:u,arrowPadding:f,collisionBoundary:m,collisionPadding:p,sticky:g,hideWhenDetached:_,avoidCollisions:j}:{};return i.jsx(rf,{scope:n,content:w,viewport:S,onViewportChange:v,itemRefCallback:ue,selectedItem:P,onItemLeave:R,itemTextRefCallback:I,focusSelectedItem:Q,selectedItemText:E,position:r,isPositioned:z,searchRef:se,children:i.jsx(Yo,{as:ex,allowPinchZoom:!0,children:i.jsx(Bo,{asChild:!0,trapped:x.open,onMountAutoFocus:T=>{T.preventDefault()},onUnmountAutoFocus:oe(o,T=>{var B;(B=x.trigger)==null||B.focus({preventScroll:!0}),T.preventDefault()}),children:i.jsx(Lo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:T=>T.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:i.jsx(H,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:T=>T.preventDefault(),...b,...G,onPlaced:()=>A(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:oe(b.onKeyDown,T=>{const B=T.ctrlKey||T.altKey||T.metaKey;if(T.key==="Tab"&&T.preventDefault(),!B&&T.key.length===1&&fe(T.key),["ArrowUp","ArrowDown","Home","End"].includes(T.key)){let K=D().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);if(["ArrowUp","End"].includes(T.key)&&(K=K.slice().reverse()),["ArrowUp","ArrowDown"].includes(T.key)){const ie=T.target,ce=K.indexOf(ie);K=K.slice(ce+1)}setTimeout(()=>W(K)),T.preventDefault()}})})})})})})});of.displayName=Zv;var tx="SelectItemAlignedPosition",af=h.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=hn(Dn,n),s=_n(Dn,n),[c,l]=h.useState(null),[d,u]=h.useState(null),f=ve(t,C=>u(C)),m=ea(n),p=h.useRef(!1),g=h.useRef(!0),{viewport:_,selectedItem:j,selectedItemText:b,focusSelectedItem:x}=s,w=h.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&d&&_&&j&&b){const C=a.trigger.getBoundingClientRect(),P=d.getBoundingClientRect(),k=a.valueNode.getBoundingClientRect(),E=b.getBoundingClientRect();if(a.dir!=="rtl"){const ie=E.left-P.left,ce=k.left-ie,pe=C.left-ce,Ee=C.width+pe,F=Math.max(Ee,P.width),J=window.innerWidth-vt,le=Ga(ce,[vt,Math.max(vt,J-F)]);c.style.minWidth=Ee+"px",c.style.left=le+"px"}else{const ie=P.right-E.right,ce=window.innerWidth-k.right-ie,pe=window.innerWidth-C.right-ce,Ee=C.width+pe,F=Math.max(Ee,P.width),J=window.innerWidth-vt,le=Ga(ce,[vt,Math.max(vt,J-F)]);c.style.minWidth=Ee+"px",c.style.right=le+"px"}const M=m(),D=window.innerHeight-vt*2,z=_.scrollHeight,A=window.getComputedStyle(d),L=parseInt(A.borderTopWidth,10),W=parseInt(A.paddingTop,10),Q=parseInt(A.borderBottomWidth,10),Y=parseInt(A.paddingBottom,10),O=L+W+z+Y+Q,se=Math.min(j.offsetHeight*5,O),fe=window.getComputedStyle(_),ue=parseInt(fe.paddingTop,10),R=parseInt(fe.paddingBottom,10),I=C.top+C.height/2-vt,H=D-I,G=j.offsetHeight/2,T=j.offsetTop+G,B=L+W+T,ee=O-B;if(B<=I){const ie=M.length>0&&j===M[M.length-1].ref.current;c.style.bottom="0px";const ce=d.clientHeight-_.offsetTop-_.offsetHeight,pe=Math.max(H,G+(ie?R:0)+ce+Q),Ee=B+pe;c.style.height=Ee+"px"}else{const ie=M.length>0&&j===M[0].ref.current;c.style.top="0px";const pe=Math.max(I,L+_.offsetTop+(ie?ue:0)+G)+ee;c.style.height=pe+"px",_.scrollTop=B-I+_.offsetTop}c.style.margin=`${vt}px 0`,c.style.minHeight=se+"px",c.style.maxHeight=D+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[m,a.trigger,a.valueNode,c,d,_,j,b,a.dir,r]);Xe(()=>w(),[w]);const[N,S]=h.useState();Xe(()=>{d&&S(window.getComputedStyle(d).zIndex)},[d]);const v=h.useCallback(C=>{C&&g.current===!0&&(w(),x==null||x(),g.current=!1)},[w,x]);return i.jsx(rx,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:p,onScrollButtonChange:v,children:i.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:i.jsx(de.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});af.displayName=tx;var nx="SelectPopperPosition",ts=h.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=vt,...a}=e,s=ta(n);return i.jsx(Vu,{...s,...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)"}})});ts.displayName=nx;var[rx,Gs]=ar(Dn,{}),ns="SelectViewport",sf=h.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=_n(ns,n),s=Gs(ns,n),c=ve(t,a.onViewportChange),l=h.useRef(0);return i.jsxs(i.Fragment,{children:[i.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}),i.jsx(Zo.Slot,{scope:n,children:i.jsx(de.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:oe(o.onScroll,d=>{const u=d.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:m}=s;if(m!=null&&m.current&&f){const p=Math.abs(l.current-u.scrollTop);if(p>0){const g=window.innerHeight-vt*2,_=parseFloat(f.style.minHeight),j=parseFloat(f.style.height),b=Math.max(_,j);if(b<g){const x=b+p,w=Math.min(g,x),N=x-w;f.style.height=w+"px",f.style.bottom==="0px"&&(u.scrollTop=N>0?N:0,f.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});sf.displayName=ns;var cf="SelectGroup",[ox,ax]=ar(cf),sx=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=At();return i.jsx(ox,{scope:n,id:o,children:i.jsx(de.div,{role:"group","aria-labelledby":o,...r,ref:t})})});sx.displayName=cf;var lf="SelectLabel",df=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ax(lf,n);return i.jsx(de.div,{id:o.id,...r,ref:t})});df.displayName=lf;var xo="SelectItem",[ix,uf]=ar(xo),ff=h.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,c=hn(xo,n),l=_n(xo,n),d=c.value===r,[u,f]=h.useState(a??""),[m,p]=h.useState(!1),g=ve(t,x=>{var w;return(w=l.itemRefCallback)==null?void 0:w.call(l,x,r,o)}),_=At(),j=h.useRef("touch"),b=()=>{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 i.jsx(ix,{scope:n,value:r,disabled:o,textId:_,isSelected:d,onItemTextChange:h.useCallback(x=>{f(w=>w||((x==null?void 0:x.textContent)??"").trim())},[]),children:i.jsx(Zo.ItemSlot,{scope:n,value:r,disabled:o,textValue:u,children:i.jsx(de.div,{role:"option","aria-labelledby":_,"data-highlighted":m?"":void 0,"aria-selected":d&&m,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:g,onFocus:oe(s.onFocus,()=>p(!0)),onBlur:oe(s.onBlur,()=>p(!1)),onClick:oe(s.onClick,()=>{j.current!=="mouse"&&b()}),onPointerUp:oe(s.onPointerUp,()=>{j.current==="mouse"&&b()}),onPointerDown:oe(s.onPointerDown,x=>{j.current=x.pointerType}),onPointerMove:oe(s.onPointerMove,x=>{var w;j.current=x.pointerType,o?(w=l.onItemLeave)==null||w.call(l):j.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:oe(s.onPointerLeave,x=>{var w;x.currentTarget===document.activeElement&&((w=l.onItemLeave)==null||w.call(l))}),onKeyDown:oe(s.onKeyDown,x=>{var N;((N=l.searchRef)==null?void 0:N.current)!==""&&x.key===" "||(Vv.includes(x.key)&&b(),x.key===" "&&x.preventDefault())})})})})});ff.displayName=xo;var jr="SelectItemText",mf=h.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=hn(jr,n),c=_n(jr,n),l=uf(jr,n),d=Kv(jr,n),[u,f]=h.useState(null),m=ve(t,b=>f(b),l.onItemTextChange,b=>{var x;return(x=c.itemTextRefCallback)==null?void 0:x.call(c,b,l.value,l.disabled)}),p=u==null?void 0:u.textContent,g=h.useMemo(()=>i.jsx("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:_,onNativeOptionRemove:j}=d;return Xe(()=>(_(g),()=>j(g)),[_,j,g]),i.jsxs(i.Fragment,{children:[i.jsx(de.span,{id:l.textId,...a,ref:m}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Eo.createPortal(a.children,s.valueNode):null]})});mf.displayName=jr;var pf="SelectItemIndicator",hf=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return uf(pf,n).isSelected?i.jsx(de.span,{"aria-hidden":!0,...r,ref:t}):null});hf.displayName=pf;var rs="SelectScrollUpButton",_f=h.forwardRef((e,t)=>{const n=_n(rs,e.__scopeSelect),r=Gs(rs,e.__scopeSelect),[o,a]=h.useState(!1),s=ve(t,r.onScrollButtonChange);return Xe(()=>{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?i.jsx(jf,{...e,ref:s,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop-l.offsetHeight)}}):null});_f.displayName=rs;var os="SelectScrollDownButton",gf=h.forwardRef((e,t)=>{const n=_n(os,e.__scopeSelect),r=Gs(os,e.__scopeSelect),[o,a]=h.useState(!1),s=ve(t,r.onScrollButtonChange);return Xe(()=>{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?i.jsx(jf,{...e,ref:s,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop+l.offsetHeight)}}):null});gf.displayName=os;var jf=h.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=_n("SelectScrollButton",n),s=h.useRef(null),c=ea(n),l=h.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return h.useEffect(()=>()=>l(),[l]),Xe(()=>{var u;const d=c().find(f=>f.ref.current===document.activeElement);(u=d==null?void 0:d.ref.current)==null||u.scrollIntoView({block:"nearest"})},[c]),i.jsx(de.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:oe(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:oe(o.onPointerMove,()=>{var d;(d=a.onItemLeave)==null||d.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:oe(o.onPointerLeave,()=>{l()})})}),cx="SelectSeparator",yf=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return i.jsx(de.div,{"aria-hidden":!0,...r,ref:t})});yf.displayName=cx;var as="SelectArrow",lx=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ta(n),a=hn(as,n),s=_n(as,n);return a.open&&s.position==="popper"?i.jsx(Uu,{...o,...r,ref:t}):null});lx.displayName=as;var dx="SelectBubbleInput",vf=h.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=h.useRef(null),a=ve(r,o),s=Us(t);return h.useEffect(()=>{const c=o.current;if(!c)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&u){const f=new Event("change",{bubbles:!0});u.call(c,t),c.dispatchEvent(f)}},[s,t]),i.jsx(de.select,{...n,style:{...Gu,...n.style},ref:a,defaultValue:t})});vf.displayName=dx;function xf(e){return e===""||e===void 0}function bf(e){const t=tt(e),n=h.useRef(""),r=h.useRef(0),o=h.useCallback(s=>{const c=n.current+s;t(c),function l(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(c)},[t]),a=h.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function wf(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 s=ux(e,Math.max(a,0));o.length===1&&(s=s.filter(d=>d!==n));const l=s.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function ux(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var fx=Xu,Nf=Ju,mx=Zu,px=ef,hx=tf,Sf=nf,_x=sf,Cf=df,kf=ff,gx=mf,jx=hf,Pf=_f,Ef=gf,Mf=yf;const na=y.createContext(null);function ra(){return y.useContext(na)}const Oe=fx,Ae=mx,De=h.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(Nf,{ref:r,className:re("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,i.jsx(px,{asChild:!0,children:i.jsx(dn,{className:"cj-h-4 cj-w-4 cj-opacity-50"})})]}));De.displayName=Nf.displayName;const Df=h.forwardRef(({className:e,...t},n)=>i.jsx(Pf,{ref:n,className:re("cj-flex cj-cursor-default cj-items-center cj-justify-center cj-py-1",e),...t,children:i.jsx(uo,{className:"cj-h-4 cj-w-4"})}));Df.displayName=Pf.displayName;const Tf=h.forwardRef(({className:e,...t},n)=>i.jsx(Ef,{ref:n,className:re("cj-flex cj-cursor-default cj-items-center cj-justify-center cj-py-1",e),...t,children:i.jsx(dn,{className:"cj-h-4 cj-w-4"})}));Tf.displayName=Ef.displayName;const Te=h.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>{const a=ra();return i.jsx(hx,{container:a??void 0,children:i.jsxs(Sf,{ref:o,className:re("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:[i.jsx(Df,{}),i.jsx(_x,{className:re("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}),i.jsx(Tf,{})]})})});Te.displayName=Sf.displayName;const yx=h.forwardRef(({className:e,...t},n)=>i.jsx(Cf,{ref:n,className:re("cj-py-1.5 cj-pl-8 cj-pr-2 cj-text-sm cj-font-semibold",e),...t}));yx.displayName=Cf.displayName;const q=h.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(kf,{ref:r,className:re("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:[i.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:i.jsx(jx,{children:i.jsx(Tl,{className:"cj-h-4 cj-w-4"})})}),i.jsx(gx,{children:t})]}));q.displayName=kf.displayName;const vx=h.forwardRef(({className:e,...t},n)=>i.jsx(Mf,{ref:n,className:re("-cj-mx-1 cj-my-1 cj-h-px cj-bg-muted",e),...t}));vx.displayName=Mf.displayName;const br={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 oa(e){return br[e]||{label:e,color:"cj-bg-muted"}}const ss=As,xx=zs,Rf=h.forwardRef(({className:e,...t},n)=>{const r=ra();return i.jsx(Dr,{ref:n,className:re(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})});Rf.displayName=Dr.displayName;const bo=h.forwardRef(({className:e,children:t,...n},r)=>{const o=ra(),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 i.jsxs(xx,{container:o??void 0,children:[i.jsx(Rf,{}),i.jsxs(Tr,{ref:r,className:re(a,e),...n,children:[t,i.jsxs(Uo,{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:[i.jsx(Wt,{className:"cj-h-4 cj-w-4"}),i.jsx("span",{className:"cj-sr-only",children:"Close"})]})]})]})});bo.displayName=Tr.displayName;const Xs=({className:e,...t})=>i.jsx("div",{className:re("cj-flex cj-flex-col cj-space-y-1.5 cj-text-center sm:cj-text-left",e),...t});Xs.displayName="DialogHeader";const Ks=({className:e,...t})=>i.jsx("div",{className:re("cj-flex cj-flex-col-reverse sm:cj-flex-row sm:cj-justify-end sm:cj-space-x-2",e),...t});Ks.displayName="DialogFooter";const Js=h.forwardRef(({className:e,...t},n)=>i.jsx(Rr,{ref:n,className:re("cj-text-lg cj-font-semibold cj-leading-none cj-tracking-tight",e),...t}));Js.displayName=Rr.displayName;const Of=h.forwardRef(({className:e,...t},n)=>i.jsx(Or,{ref:n,className:re("cj-text-sm cj-text-muted-foreground",e),...t}));Of.displayName=Or.displayName;var aa="Switch",[bx]=ft(aa),[wx,Nx]=bx(aa),Af=h.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:s,disabled:c,value:l="on",onCheckedChange:d,form:u,...f}=e,[m,p]=h.useState(null),g=ve(t,w=>p(w)),_=h.useRef(!1),j=m?u||!!m.closest("form"):!0,[b,x]=Ut({prop:o,defaultProp:a??!1,onChange:d,caller:aa});return i.jsxs(wx,{scope:n,checked:b,disabled:c,children:[i.jsx(de.button,{type:"button",role:"switch","aria-checked":b,"aria-required":s,"data-state":Ff(b),"data-disabled":c?"":void 0,disabled:c,value:l,...f,ref:g,onClick:oe(e.onClick,w=>{x(N=>!N),j&&(_.current=w.isPropagationStopped(),_.current||w.stopPropagation())})}),j&&i.jsx(Wf,{control:m,bubbles:!_.current,name:r,value:l,checked:b,required:s,disabled:c,form:u,style:{transform:"translateX(-100%)"}})]})});Af.displayName=aa;var zf="SwitchThumb",If=h.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=Nx(zf,n);return i.jsx(de.span,{"data-state":Ff(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});If.displayName=zf;var Sx="SwitchBubbleInput",Wf=h.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const s=h.useRef(null),c=ve(s,a),l=Us(n),d=Hs(t);return h.useEffect(()=>{const u=s.current;if(!u)return;const f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&p){const g=new Event("click",{bubbles:r});p.call(u,n),u.dispatchEvent(g)}},[l,n,r]),i.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}})});Wf.displayName=Sx;function Ff(e){return e?"checked":"unchecked"}var $f=Af,Cx=If;const Jt=h.forwardRef(({className:e,...t},n)=>i.jsx($f,{className:re("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:i.jsx(Cx,{className:re("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")})}));Jt.displayName=$f.displayName;var kx=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Px=kx.reduce((e,t)=>{const n=Mo(`Primitive.${t}`),r=h.forwardRef((o,a)=>{const{asChild:s,...c}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(l,{...c,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Ex="Separator",jc="horizontal",Mx=["horizontal","vertical"],Lf=h.forwardRef((e,t)=>{const{decorative:n,orientation:r=jc,...o}=e,a=Dx(r)?r:jc,c=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return i.jsx(Px.div,{"data-orientation":a,...c,...o,ref:t})});Lf.displayName=Ex;function Dx(e){return Mx.includes(e)}var Bf=Lf;const vn=h.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>i.jsx(Bf,{ref:o,decorative:n,orientation:t,className:re("cj-shrink-0 cj-bg-border",t==="horizontal"?"cj-h-[1px] cj-w-full":"cj-h-full cj-w-[1px]",e),...r}));vn.displayName=Bf.displayName;const Hf=[{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"}],wo=["is_null","is_not_null"];function yc(e){const t=Object.keys(e)[0];if(t==="=="||t==="!="){const a=e[t];if(!Array.isArray(a)||a.length!==2)return null;const s=a[0];if(!(s!=null&&s.var))return null;const c=s.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(!Hf.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 Kn(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(yc).filter(Boolean);if(a.length>0)return{mode:n,rules:a}}return t}const r=yc(e);return r?{mode:"and",rules:[r]}:t}function Qs(e){const t=e.rules.filter(r=>r.field&&(r.value||wo.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 Tx(){return{field:"",operator:"==",value:""}}function Rx({rule:e,availableFields:t,canRemove:n,onChange:r,onRemove:o}){const a=wo.includes(e.operator),s=t.find(l=>l.namespace===e.field),c=s!=null&&s.options&&s.options.length>0?s.options:null;return i.jsxs("div",{className:"cj-flex cj-items-start cj-gap-1.5 cj-group",children:[i.jsxs("div",{className:"cj-flex-1 cj-space-y-1.5",children:[i.jsxs(Oe,{value:e.field,onValueChange:l=>r({field:l,value:""}),children:[i.jsx(De,{className:"cj-h-8 cj-text-xs",children:i.jsx(Ae,{placeholder:"Field"})}),i.jsx(Te,{children:t.map(l=>i.jsx(q,{value:l.namespace,children:l.label},l.namespace))})]}),i.jsxs(Oe,{value:e.operator,onValueChange:l=>r({operator:l,...wo.includes(l)?{value:""}:{}}),children:[i.jsx(De,{className:"cj-h-8 cj-text-xs",children:i.jsx(Ae,{})}),i.jsx(Te,{children:Hf.map(l=>i.jsx(q,{value:l.value,children:l.label},l.value))})]}),!a&&(c?i.jsxs(Oe,{value:e.value,onValueChange:l=>r({value:l}),children:[i.jsx(De,{className:"cj-h-8 cj-text-xs",children:i.jsx(Ae,{placeholder:"Select value"})}),i.jsx(Te,{children:c.map(l=>i.jsx(q,{value:l.data,children:l.label},l.data))})]}):i.jsx(he,{className:"cj-h-8 cj-text-xs",placeholder:"Value",value:e.value,onChange:l=>r({value:l.target.value})}))]}),n&&i.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:i.jsx(Wt,{className:"cj-h-3.5 cj-w-3.5"})})]})}function qf({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,f)=>f===c?{...u,...l}:u);n({...e,rules:d})},a=()=>{n({...e,rules:[...e.rules,Tx()]})},s=c=>{n({...e,rules:e.rules.filter((l,d)=>d!==c)})};return i.jsxs("div",{className:"cj-space-y-3",children:[e.rules.length>1&&i.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[i.jsx("span",{className:"cj-text-xs cj-text-muted-foreground",children:"Combine with:"}),i.jsx(bt,{variant:e.mode==="and"?"default":"outline",className:"cj-cursor-pointer cj-text-[10px]",onClick:r,children:"AND"}),i.jsx(bt,{variant:e.mode==="or"?"default":"outline",className:"cj-cursor-pointer cj-text-[10px]",onClick:r,children:"OR"})]}),i.jsx("div",{className:"cj-space-y-3",children:e.rules.map((c,l)=>i.jsxs("div",{children:[l>0&&i.jsx("div",{className:"cj-text-center cj-text-[10px] cj-text-muted-foreground cj-font-medium cj-py-1 cj-uppercase",children:e.mode}),i.jsx(Rx,{rule:c,availableFields:t,canRemove:e.rules.length>1,onChange:d=>o(l,d),onRemove:()=>s(l)})]},l))}),i.jsxs(te,{variant:"outline",size:"sm",className:"cj-w-full cj-h-7 cj-text-xs",onClick:a,children:[i.jsx(Nt,{className:"cj-h-3 cj-w-3 cj-mr-1"}),"Add condition"]})]})}function Yf({fieldId:e,open:t,onOpenChange:n}){const{t:r}=be(),{formConfig:o,updateField:a,deleteField:s}=kt(),c=y.useMemo(()=>o.fields.find(v=>v.field_id===e)||null,[o.fields,e]),[l,d]=y.useState(c),[u,f]=y.useState(!1);y.useEffect(()=>{d(c)},[c]);const m=y.useMemo(()=>o.fields.filter(v=>v.field_id!==e).map(v=>({namespace:v.namespace,label:v.label,options:v.options||null})),[o.fields,e]);if(!l||!c)return i.jsx(ss,{open:t,onOpenChange:n,children:i.jsx(bo,{children:i.jsx("p",{className:"cj-text-sm cj-text-muted-foreground",children:r("fc_field_no_selected")})})});const p=oa(l.schema),g=l.schema==="v2_single_option_select-1",_=l.schema==="v2_boolean-1"||l.widget==="boolean"||l.widget==="switch",j=l.schema==="v2_single_asset_upload"||l.widget==="upload",b=l.schema==="v2_date-1"||l.schema==="v2_datetime-1"||l.widget==="datepicker"||l.widget==="datetimepicker",x=v=>{d(C=>C&&{...C,...v}),a(c.field_id,v)},w=l.options||[],N=l.uploadConfig||{},S=(v,C)=>{const P=Qs(C);x({[v]:P})};return i.jsxs(ss,{open:t,onOpenChange:n,children:[i.jsxs(bo,{className:"cj-max-w-2xl cj-overflow-hidden",style:{display:"flex",flexDirection:"column",maxHeight:"85vh",height:"85vh"},children:[i.jsx(Xs,{className:"cj-flex-shrink-0",children:i.jsxs(Js,{className:"cj-flex cj-items-center cj-gap-2",children:[r("fc_field_props"),i.jsx(bt,{variant:"secondary",className:`${p.color} cj-text-white`,children:p.label})]})}),i.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:i.jsxs("div",{className:"cj-space-y-4 cj-py-2",children:[i.jsxs("div",{className:"cj-grid cj-grid-cols-2 cj-gap-3",children:[i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-xs",children:r("fc_field_label")}),i.jsx(he,{value:l.label,onChange:v=>x({label:v.target.value}),className:"cj-mt-1"})]}),i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-xs",children:r("fc_field_namespace")}),i.jsx(he,{value:l.namespace,onChange:v=>x({namespace:v.target.value}),className:"cj-mt-1 cj-font-mono cj-text-sm"})]})]}),i.jsxs("div",{className:"cj-grid cj-grid-cols-2 cj-gap-3",children:[i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-xs",children:r("fc_field_placeholder")}),i.jsx(he,{value:l.placeholder||"",onChange:v=>x({placeholder:v.target.value||void 0}),className:"cj-mt-1"})]}),i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-xs",children:r("fc_field_help")}),i.jsx(he,{value:l.helpText||"",onChange:v=>x({helpText:v.target.value||void 0}),className:"cj-mt-1"})]})]}),i.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-rounded-lg cj-border cj-p-3",children:[i.jsxs("div",{children:[i.jsx(U,{children:r("fc_field_required")}),i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r("fc_field_required_hint")})]}),i.jsx(Jt,{checked:!!l.required,onCheckedChange:v=>x({required:v})})]}),i.jsx(vn,{}),i.jsxs("div",{className:"cj-grid cj-grid-cols-2 cj-gap-3",children:[i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-xs",children:r("fc_field_actor")}),i.jsxs(Oe,{value:l.actor||"customer",onValueChange:v=>x({actor:v}),children:[i.jsx(De,{className:"cj-mt-1",children:i.jsx(Ae,{})}),i.jsxs(Te,{children:[i.jsx(q,{value:"customer",children:r("fc_field_actor_customer")}),i.jsx(q,{value:"operator",children:r("fc_field_actor_operator")})]})]})]}),i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-xs",children:r("fc_field_widget")}),i.jsxs(Oe,{value:l.widget||"auto",onValueChange:v=>x({widget:v==="auto"?void 0:v}),children:[i.jsx(De,{className:"cj-mt-1",children:i.jsx(Ae,{})}),i.jsxs(Te,{children:[i.jsx(q,{value:"auto",children:r("fc_field_widget_auto")}),i.jsx(q,{value:"text",children:r("fc_field_widget_text")}),i.jsx(q,{value:"textarea",children:r("fc_field_widget_textarea")}),i.jsx(q,{value:"select",children:r("fc_field_widget_select")}),i.jsx(q,{value:"radio",children:r("fc_field_widget_radio")}),i.jsx(q,{value:"datepicker",children:r("fc_field_widget_date")}),i.jsx(q,{value:"timepicker",children:r("fc_field_widget_time")}),i.jsx(q,{value:"datetimepicker",children:r("fc_field_widget_datetime")}),i.jsx(q,{value:"currency",children:r("fc_field_widget_currency")}),i.jsx(q,{value:"upload",children:r("fc_field_widget_upload")}),i.jsx(q,{value:"email",children:r("fc_field_widget_email")}),i.jsx(q,{value:"phone",children:r("fc_field_widget_phone")}),i.jsx(q,{value:"location",children:r("fc_field_widget_location")}),i.jsx(q,{value:"boolean",children:r("fc_field_widget_boolean")})]})]})]})]}),b&&i.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-rounded-lg cj-border cj-p-3",children:[i.jsxs("div",{children:[i.jsx(U,{children:r("fc_field_allow_future")}),i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r("fc_field_allow_future_hint")})]}),i.jsx(Jt,{checked:l.allowFuture??l.schema==="v2_datetime-1",onCheckedChange:v=>x({allowFuture:v})})]}),g&&i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-xs",children:r("fc_field_display_style")}),i.jsxs(Oe,{value:l.ui_variant||"auto",onValueChange:v=>x({ui_variant:v==="auto"?void 0:v}),children:[i.jsx(De,{className:"cj-mt-1",children:i.jsx(Ae,{})}),i.jsxs(Te,{children:[i.jsx(q,{value:"auto",children:r("fc_field_display_auto")}),i.jsx(q,{value:"radio",children:r("fc_field_display_radio")}),i.jsx(q,{value:"radio-horizontal",children:r("fc_field_display_radio_horizontal")}),i.jsx(q,{value:"dropdown",children:r("fc_field_display_dropdown")}),i.jsx(q,{value:"segmented",children:r("fc_field_display_segmented")})]})]}),i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-mt-1",children:r("fc_field_display_hint")})]}),_&&i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-xs",children:r("fc_field_display_style")}),i.jsxs(Oe,{value:l.ui_variant||"switch",onValueChange:v=>x({ui_variant:v==="switch"?void 0:v}),children:[i.jsx(De,{className:"cj-mt-1",children:i.jsx(Ae,{})}),i.jsxs(Te,{children:[i.jsx(q,{value:"switch",children:r("fc_field_display_switch")}),i.jsx(q,{value:"segmented",children:r("fc_field_display_yesno")})]})]}),i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-mt-1",children:r("fc_field_boolean_hint")})]}),g&&i.jsxs(i.Fragment,{children:[i.jsx(vn,{}),i.jsxs("div",{children:[i.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-mb-2",children:[i.jsx(U,{children:r("fc_field_options")}),i.jsxs(te,{variant:"ghost",size:"sm",onClick:()=>x({options:[...w,{data:"",label:""}]}),children:[i.jsx(Nt,{className:"cj-h-3 cj-w-3 cj-mr-1"}),r("fc_summary_add")]})]}),i.jsxs("div",{className:"cj-space-y-2",children:[w.map((v,C)=>i.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2 cj-rounded-lg cj-border cj-p-2",children:[i.jsxs("div",{className:"cj-flex-1 cj-space-y-1",children:[i.jsx(he,{value:v.data,onChange:P=>x({options:w.map((k,E)=>E===C?{...k,data:P.target.value}:k)}),placeholder:r("fc_create_option_value_placeholder"),className:"cj-h-8 cj-font-mono cj-text-sm"}),i.jsx(he,{value:v.label,onChange:P=>x({options:w.map((k,E)=>E===C?{...k,label:P.target.value}:k)}),placeholder:r("fc_create_option_label_placeholder"),className:"cj-h-8 cj-text-sm"})]}),i.jsx(te,{variant:"ghost",size:"icon",className:"cj-h-8 cj-w-8",onClick:()=>x({options:w.filter((P,k)=>k!==C)}),children:i.jsx(Wt,{className:"cj-h-3 cj-w-3"})})]},C)),w.length===0&&i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-italic",children:r("fc_field_no_options")})]})]})]}),j&&i.jsxs(i.Fragment,{children:[i.jsx(vn,{}),i.jsxs("div",{className:"cj-space-y-3",children:[i.jsx(U,{children:r("fc_field_upload_validation")}),i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-xs",children:r("fc_field_upload_accept")}),i.jsx(he,{value:N.accept||"",onChange:v=>x({uploadConfig:{...N,accept:v.target.value||void 0}}),placeholder:"image/*,.pdf",className:"cj-mt-1 cj-font-mono cj-text-sm"})]}),i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-xs",children:r("fc_field_upload_max")}),i.jsx(he,{type:"number",min:0,step:.5,value:N.maxSizeMB??"",onChange:v=>x({uploadConfig:{...N,maxSizeMB:v.target.value?parseFloat(v.target.value):void 0}}),className:"cj-mt-1 cj-w-32"})]})]})]}),i.jsx(vn,{}),i.jsxs("div",{className:"cj-space-y-2",children:[i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-sm cj-font-semibold",children:r("fc_field_width")}),i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r("fc_field_width_hint")})]}),i.jsxs(Oe,{value:l.width??"auto",onValueChange:v=>x({width:v==="auto"?void 0:v}),children:[i.jsx(De,{className:"cj-w-48",children:i.jsx(Ae,{})}),i.jsxs(Te,{children:[i.jsx(q,{value:"auto",children:r("fc_field_width_auto")}),i.jsx(q,{value:"1/3",children:"1/3"}),i.jsx(q,{value:"1/2",children:"1/2"}),i.jsx(q,{value:"2/3",children:"2/3"}),i.jsx(q,{value:"full",children:r("fc_field_width_full")})]})]})]}),i.jsx(vn,{}),i.jsx(Ox,{field:l,availableFields:o.fields.filter(v=>v.field_id!==c.field_id&&!v.computed),onChange:v=>x({computed:v})}),i.jsx(vn,{}),i.jsxs("div",{className:"cj-space-y-3",children:[i.jsxs("div",{children:[i.jsx(U,{children:r("fc_field_dynamic_rules")}),i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r("fc_field_dynamic_rules_hint")})]}),i.jsx(Aa,{title:r("fc_field_visible_when"),hint:r("fc_field_visible_when_hint"),value:l.visibleWhen??null,onChange:v=>S("visibleWhen",v),availableFields:m,disabledLabel:r("fc_field_always_visible")}),i.jsx(Aa,{title:r("fc_field_enabled_when"),hint:r("fc_field_enabled_when_hint"),value:l.enabledWhen??null,onChange:v=>S("enabledWhen",v),availableFields:m,disabledLabel:r("fc_field_always_enabled")}),i.jsx(Aa,{title:r("fc_field_required_when"),hint:r("fc_field_required_when_hint"),value:l.requiredWhen??null,onChange:v=>S("requiredWhen",v),availableFields:m,disabledLabel:r("fc_field_required_static")})]})]})}),i.jsxs(Ks,{className:"cj-flex cj-items-center cj-justify-between sm:cj-justify-between",children:[i.jsxs(te,{variant:"destructive",size:"sm",onClick:()=>f(!0),children:[i.jsx(Rn,{className:"cj-h-4 cj-w-4 cj-mr-1"}),r("fc_field_delete")]}),i.jsx(te,{onClick:()=>n(!1),children:r("fc_field_done")})]})]}),i.jsx(Ar,{open:u,onOpenChange:f,description:r("fc_field_confirm_delete"),onConfirm:()=>{s(c.field_id),f(!1),n(!1)}})]})}function Aa({title:e,hint:t,value:n,onChange:r,availableFields:o,disabledLabel:a}){const[s,c]=y.useState(n!=null),[l,d]=y.useState(()=>Kn(n)),u=y.useRef(n?JSON.stringify(n):null);y.useEffect(()=>{const p=n?JSON.stringify(n):null;p!==u.current&&(d(Kn(n)),u.current=p),c(n!=null)},[n]);const f=p=>{c(p),p||(d(Kn(null)),u.current=null,r({mode:"and",rules:[]}))},m=p=>{d(p);const g=Qs(p);u.current=g?JSON.stringify(g):null,r(p)};return i.jsxs("div",{className:"cj-rounded-lg cj-border cj-p-3 cj-space-y-2",children:[i.jsxs("div",{className:"cj-flex cj-items-start cj-justify-between cj-gap-3",children:[i.jsxs("div",{className:"cj-min-w-0",children:[i.jsx(U,{className:"cj-text-xs cj-font-semibold",children:e}),t&&i.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground",children:t})]}),i.jsx(Jt,{checked:s,onCheckedChange:f})]}),s?i.jsx(qf,{conditions:l,availableFields:o,onChange:m}):i.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground cj-italic",children:a})]})}function Ox({field:e,availableFields:t,onChange:n}){var f,m,p;const{t:r}=be(),o=!!e.computed,a=((f=e.computed)==null?void 0:f.operation)||"sum",s=((m=e.computed)==null?void 0:m.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:s,precision:c,...g})},u=t.filter(g=>!s.includes(g.field_id));return i.jsxs("div",{className:"cj-rounded-lg cj-border cj-p-3 cj-space-y-3",children:[i.jsxs("div",{className:"cj-flex cj-items-start cj-justify-between cj-gap-3",children:[i.jsxs("div",{className:"cj-min-w-0",children:[i.jsx(U,{className:"cj-text-sm cj-font-semibold",children:r("fc_field_computed")}),i.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground",children:r("fc_field_computed_hint")})]}),i.jsx(Jt,{checked:o,onCheckedChange:l})]}),o&&i.jsxs("div",{className:"cj-space-y-3",children:[i.jsxs("div",{className:"cj-grid cj-grid-cols-2 cj-gap-3",children:[i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-xs",children:r("fc_field_computed_operation")}),i.jsxs(Oe,{value:a,onValueChange:g=>d({operation:g}),children:[i.jsx(De,{className:"cj-mt-1",children:i.jsx(Ae,{})}),i.jsxs(Te,{children:[i.jsx(q,{value:"sum",children:r("fc_field_computed_op_sum")}),i.jsx(q,{value:"subtract",children:r("fc_field_computed_op_subtract")}),i.jsx(q,{value:"multiply",children:r("fc_field_computed_op_multiply")}),i.jsx(q,{value:"divide",children:r("fc_field_computed_op_divide")})]})]})]}),i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-xs",children:r("fc_field_computed_precision")}),i.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"})]})]}),i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-xs",children:r("fc_field_computed_operands")}),i.jsxs("div",{className:"cj-mt-1 cj-space-y-2",children:[s.map((g,_)=>{const j=t.find(b=>b.field_id===g);return i.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2 cj-rounded-lg cj-border cj-p-2",children:[i.jsxs("span",{className:"cj-text-xs cj-font-mono cj-text-muted-foreground",children:[_+1,"."]}),i.jsxs("div",{className:"cj-flex-1 cj-min-w-0",children:[i.jsx("div",{className:"cj-text-sm cj-truncate",children:j?j.label:r("fc_field_computed_missing_operand")}),j&&i.jsx("div",{className:"cj-text-[10px] cj-font-mono cj-text-muted-foreground cj-truncate",children:j.namespace})]}),i.jsx(te,{variant:"ghost",size:"icon",className:"cj-h-7 cj-w-7",onClick:()=>d({operand_field_ids:s.filter((b,x)=>x!==_)}),children:i.jsx(Wt,{className:"cj-h-3 cj-w-3"})})]},`${g}-${_}`)}),u.length>0?i.jsxs(Oe,{value:"",onValueChange:g=>{g&&d({operand_field_ids:[...s,g]})},children:[i.jsx(De,{className:"cj-h-9",children:i.jsx(Ae,{placeholder:r("fc_field_computed_add_operand")})}),i.jsx(Te,{children:u.map(g=>i.jsx(q,{value:g.field_id,children:g.label},g.field_id))})]}):i.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground cj-italic",children:s.length===0?r("fc_field_computed_no_fields"):r("fc_field_computed_all_added")})]})]})]})]})}function Vf({specs:e=[],open:t,onOpenChange:n,onCreate:r}){const{t:o}=be(),[a,s]=y.useState("catalog"),[c,l]=y.useState(""),[d,u]=y.useState(""),[f,m]=y.useState(""),[p,g]=y.useState("v1_string"),[_,j]=y.useState([]),b=y.useMemo(()=>e.filter(S=>S.label.toLowerCase().includes(c.toLowerCase())||S.namespace.toLowerCase().includes(c.toLowerCase())),[e,c]),x=()=>{u(""),m(""),g("v1_string"),j([]),l("")},w=p==="v2_single_option_select-1",N=d.trim()!=="";return i.jsx(ss,{open:t,onOpenChange:S=>{S||x(),n(S)},children:i.jsxs(bo,{className:"cj-max-w-lg cj-overflow-hidden",children:[i.jsxs(Xs,{children:[i.jsx(Js,{children:o("fc_create_field_title")}),i.jsx(Of,{children:o("fc_create_field_subtitle")})]}),i.jsxs("div",{className:"cj-flex cj-gap-1 cj-bg-muted cj-rounded-lg cj-p-1",children:[i.jsx("button",{onClick:()=>s("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})}),i.jsx("button",{onClick:()=>s("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"?i.jsxs("div",{className:"cj-space-y-2 cj-min-w-0",children:[i.jsx(he,{placeholder:o("fc_create_search_specs"),value:c,onChange:S=>l(S.target.value)}),i.jsx(Gt,{className:"cj-h-[55vh] cj-max-h-[420px] cj-border cj-rounded-lg",children:i.jsxs("div",{className:"cj-divide-y",children:[b.map(S=>{var v,C;return i.jsxs("button",{onClick:()=>{r(S),x(),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:[i.jsx(bt,{variant:"secondary",className:`cj-text-[10px] ${((v=br[S.schema])==null?void 0:v.color)||"cj-bg-muted"} cj-text-white`,children:((C=br[S.schema])==null?void 0:C.label)||S.schema}),i.jsxs("div",{className:"cj-flex-1 cj-min-w-0",children:[i.jsx("div",{className:"cj-text-sm cj-font-medium cj-truncate",children:S.label}),i.jsx("div",{className:"cj-text-[11px] cj-font-mono cj-text-muted-foreground cj-truncate",children:S.namespace})]})]},S.id)}),b.length===0&&i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-py-6 cj-text-center",children:o("fc_create_no_specs")})]})})]}):i.jsx(Gt,{className:"cj-h-[55vh] cj-max-h-[420px] cj--mx-1",children:i.jsxs("div",{className:"cj-space-y-3 cj-px-1",children:[i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-xs",children:o("fc_create_label_required")}),i.jsx(he,{value:d,onChange:S=>u(S.target.value),placeholder:o("fc_create_label_placeholder"),className:"cj-mt-1"})]}),i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-xs",children:o("fc_create_namespace")}),i.jsx(he,{value:f,onChange:S=>m(S.target.value),placeholder:o("fc_create_namespace_placeholder"),className:"cj-mt-1 cj-font-mono cj-text-sm"})]}),i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-xs",children:o("fc_create_schema")}),i.jsxs(Oe,{value:p,onValueChange:g,children:[i.jsx(De,{className:"cj-mt-1",children:i.jsx(Ae,{})}),i.jsx(Te,{children:Object.entries(br).map(([S,v])=>i.jsx(q,{value:S,children:i.jsx("div",{className:"cj-flex cj-items-center cj-gap-2",children:i.jsx(bt,{className:`${v.color} cj-text-white cj-text-[10px]`,children:v.label})})},S))})]})]}),w&&i.jsxs("div",{children:[i.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-mb-1",children:[i.jsx(U,{className:"cj-text-xs",children:o("fc_create_options")}),i.jsxs(te,{size:"sm",variant:"ghost",onClick:()=>j([..._,{data:"",label:""}]),children:[i.jsx(Nt,{className:"cj-h-3 cj-w-3 cj-mr-1"}),o("fc_summary_add")]})]}),i.jsx("div",{className:"cj-space-y-2",children:_.map((S,v)=>i.jsxs("div",{className:"cj-flex cj-gap-2",children:[i.jsx(he,{value:S.data,onChange:C=>j(_.map((P,k)=>k===v?{...P,data:C.target.value}:P)),placeholder:o("fc_create_option_value_placeholder"),className:"cj-flex-1 cj-h-8 cj-font-mono cj-text-sm"}),i.jsx(he,{value:S.label,onChange:C=>j(_.map((P,k)=>k===v?{...P,label:C.target.value}:P)),placeholder:o("fc_create_option_label_placeholder"),className:"cj-flex-1 cj-h-8 cj-text-sm"}),i.jsx(te,{variant:"ghost",size:"icon",className:"cj-h-8 cj-w-8",onClick:()=>j(_.filter((C,P)=>P!==v)),children:i.jsx(Wt,{className:"cj-h-3 cj-w-3"})})]},v))})]})]})}),a==="custom"&&i.jsxs(Ks,{children:[i.jsx(te,{variant:"outline",onClick:()=>n(!1),children:o("fc_create_cancel")}),i.jsx(te,{disabled:!N,onClick:()=>{r({label:d.trim(),namespace:f.trim()||`custom_${Date.now()}`,schema:p,options:w?_:null,required:!1}),x(),n(!1)},children:o("fc_create_create")})]})]})})}const Ir=h.forwardRef(({className:e,...t},n)=>i.jsx("textarea",{className:re("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}));Ir.displayName="Textarea";var sa="Collapsible",[Ax]=ft(sa),[zx,Zs]=Ax(sa),Uf=h.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...c}=e,[l,d]=Ut({prop:r,defaultProp:o??!1,onChange:s,caller:sa});return i.jsx(zx,{scope:n,disabled:a,contentId:At(),open:l,onOpenToggle:h.useCallback(()=>d(u=>!u),[d]),children:i.jsx(de.div,{"data-state":ti(l),"data-disabled":a?"":void 0,...c,ref:t})})});Uf.displayName=sa;var Gf="CollapsibleTrigger",Xf=h.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Zs(Gf,n);return i.jsx(de.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":ti(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:oe(e.onClick,o.onOpenToggle)})});Xf.displayName=Gf;var ei="CollapsibleContent",Kf=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Zs(ei,e.__scopeCollapsible);return i.jsx(mt,{present:n||o.open,children:({present:a})=>i.jsx(Ix,{...r,ref:t,present:a})})});Kf.displayName=ei;var Ix=h.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=Zs(ei,n),[c,l]=h.useState(r),d=h.useRef(null),u=ve(t,d),f=h.useRef(0),m=f.current,p=h.useRef(0),g=p.current,_=s.open||c,j=h.useRef(_),b=h.useRef(void 0);return h.useEffect(()=>{const x=requestAnimationFrame(()=>j.current=!1);return()=>cancelAnimationFrame(x)},[]),Xe(()=>{const x=d.current;if(x){b.current=b.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const w=x.getBoundingClientRect();f.current=w.height,p.current=w.width,j.current||(x.style.transitionDuration=b.current.transitionDuration,x.style.animationName=b.current.animationName),l(r)}},[s.open,r]),i.jsx(de.div,{"data-state":ti(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!_,...a,ref:u,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:_&&o})});function ti(e){return e?"open":"closed"}var Wx=Uf;const Fx=Wx,$x=Xf,Lx=Kf;function Bx({step:e,readOnly:t=!1}){const{t:n}=be(),{formConfig:r,updateStepNavigation:o,setStepApiCall:a,addNavRule:s,updateNavRule:c,deleteNavRule:l}=kt(),[d,u]=y.useState(!0),f=r.steps.filter(g=>g.step_id!==e.step_id),m=e.navigation.api_call,p=r.fields.map(g=>({namespace:g.namespace,label:g.label,options:g.options||null}));return i.jsx("div",{className:"cj-rounded-2xl cj-bg-card cj-border cj-border-border cj-p-4",children:i.jsxs(Fx,{open:d,onOpenChange:u,children:[i.jsx($x,{asChild:!0,children:i.jsxs("button",{className:"cj-w-full cj-flex cj-items-center cj-justify-between cj-gap-2 cj-text-left",children:[i.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[i.jsx(Wl,{className:"cj-h-4 cj-w-4 cj-text-primary"}),i.jsx("span",{className:"cj-text-sm cj-font-semibold cj-uppercase cj-tracking-wide cj-text-muted-foreground",children:n("fc_nav_title")})]}),i.jsx(dn,{className:`cj-h-4 cj-w-4 cj-transition-transform ${d?"cj-rotate-180":""}`})]})}),i.jsxs(Lx,{className:"cj-pt-4 cj-space-y-4",children:[i.jsxs("div",{className:"cj-rounded-xl cj-border cj-border-border/60 cj-p-3 cj-space-y-3",children:[i.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between",children:[i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-xs cj-font-semibold cj-uppercase",children:n("fc_nav_api_call")}),i.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground",children:n("fc_nav_api_call_hint")})]}),i.jsx(Jt,{checked:!!(m!=null&&m.enabled),disabled:t,onCheckedChange:g=>a(e.step_id,g?m||{enabled:!0,method:"POST",url:"",headers:{},body_template:""}:void 0)})]}),(m==null?void 0:m.enabled)&&i.jsxs("div",{className:"cj-space-y-2",children:[i.jsxs("div",{className:"cj-flex cj-gap-2",children:[i.jsxs(Oe,{value:m.method,onValueChange:g=>a(e.step_id,{...m,method:g}),disabled:t,children:[i.jsx(De,{className:"cj-w-28",children:i.jsx(Ae,{})}),i.jsxs(Te,{children:[i.jsx(q,{value:"GET",children:"GET"}),i.jsx(q,{value:"POST",children:"POST"}),i.jsx(q,{value:"PUT",children:"PUT"}),i.jsx(q,{value:"PATCH",children:"PATCH"}),i.jsx(q,{value:"DELETE",children:"DELETE"})]})]}),i.jsx(he,{value:m.url,onChange:g=>a(e.step_id,{...m,url:g.target.value}),placeholder:"https://api.example.com/endpoint",className:"cj-flex-1 cj-font-mono cj-text-xs",disabled:t})]}),i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-[11px]",children:n("fc_nav_body_template")}),i.jsx(Ir,{value:m.body_template||"",onChange:g=>a(e.step_id,{...m,body_template:g.target.value}),placeholder:'{ "name": "{{answers.full_name}}" }',className:"cj-mt-1 cj-font-mono cj-text-xs",rows:4,disabled:t}),i.jsxs("p",{className:"cj-text-[10px] cj-text-muted-foreground cj-mt-1",children:[n("fc_nav_body_template_hint_prefix")," ",i.jsx("code",{children:"{{answers.namespace}}"})," ",n("fc_nav_body_template_hint_suffix")]})]}),i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-[11px]",children:n("fc_nav_on_error")}),i.jsxs(Oe,{value:m.on_error||"block",onValueChange:g=>{const _=g==="block"||g==="continue"?g:`goto:${g.slice(5)}`;a(e.step_id,{...m,on_error:_})},disabled:t,children:[i.jsx(De,{className:"cj-mt-1 cj-h-8 cj-text-xs",children:i.jsx(Ae,{})}),i.jsxs(Te,{children:[i.jsx(q,{value:"block",children:n("fc_nav_on_error_block")}),i.jsx(q,{value:"continue",children:n("fc_nav_on_error_continue")}),f.map(g=>i.jsx(q,{value:`goto:${g.step_id}`,children:n("fc_nav_on_error_goto",{step:g.title||g.step_id})},g.step_id)),i.jsx(q,{value:"goto:__submit__",children:n("fc_nav_on_error_summary")})]})]}),i.jsx("p",{className:"cj-text-[10px] cj-text-muted-foreground cj-mt-1",children:n("fc_nav_on_error_hint")})]})]})]}),i.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[i.jsx(U,{className:"cj-text-xs cj-w-32",children:n("fc_nav_continue_button")}),i.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})]}),i.jsxs("div",{children:[i.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-mb-2",children:[i.jsx(U,{className:"cj-text-xs cj-font-semibold cj-uppercase",children:n("fc_nav_rules")}),!t&&i.jsxs(te,{size:"sm",variant:"ghost",className:"cj-h-7",onClick:()=>s(e.step_id),children:[i.jsx(Nt,{className:"cj-h-3 cj-w-3 cj-mr-1"}),n("fc_nav_add_rule")]})]}),i.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground cj-mb-3",children:n("fc_nav_rules_hint")}),i.jsx("div",{className:"cj-space-y-2",children:e.navigation.rules.map((g,_)=>i.jsx(Hx,{rule:g,index:_,steps:f.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 Hx({rule:e,index:t,steps:n,fields:r,readOnly:o,onUpdate:a,onDelete:s,canDelete:c}){const{t:l}=be(),[d,u]=y.useState(!!e.condition),[f,m]=y.useState(()=>Kn(e.condition)),[p,g]=y.useState(null),_=y.useRef(e.condition);y.useEffect(()=>{e.condition!==_.current&&(m(Kn(e.condition)),_.current=e.condition,g(null))},[e.condition]);const j=x=>{for(const w of x.rules){if(!w.field||wo.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},b=x=>{m(x);const w=j(x);if(w){g(w);return}g(null);const N=Qs(x);_.current=N,a({condition:N})};return i.jsxs("div",{className:"cj-rounded-xl cj-border cj-border-border/60 cj-p-3 cj-bg-muted/20",children:[i.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2 cj-mb-2",children:[i.jsx("span",{className:"cj-text-[11px] cj-font-bold cj-text-muted-foreground cj-uppercase",children:l("fc_nav_rule_n",{n:t+1})}),i.jsxs("div",{className:"cj-flex cj-items-center cj-gap-1 cj-ml-auto",children:[i.jsx(U,{className:"cj-text-[11px]",children:l("fc_nav_has_condition")}),i.jsx(Jt,{checked:d,disabled:o,onCheckedChange:x=>{u(x),g(null),x||(m(Kn(null)),_.current=null,a({condition:null}))}}),c&&!o&&i.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-6 cj-w-6",onClick:s,children:i.jsx(Rn,{className:"cj-h-3 cj-w-3 cj-text-destructive"})})]})]}),d&&i.jsxs("div",{className:"cj-mb-3 cj-rounded-lg cj-bg-card cj-p-3",children:[i.jsx(qf,{conditions:f,availableFields:r,onChange:b}),p&&i.jsxs("div",{className:"cj-flex cj-items-center cj-gap-1.5 cj-mt-2 cj-text-[11px] cj-text-destructive",children:[i.jsx(Rl,{className:"cj-h-3.5 cj-w-3.5 cj-shrink-0"}),i.jsx("span",{children:p})]})]}),i.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[i.jsx(Oo,{className:"cj-h-3.5 cj-w-3.5 cj-text-muted-foreground"}),i.jsx(U,{className:"cj-text-xs",children:l("fc_nav_go_to")}),i.jsxs(Oe,{value:e.next_step_id,onValueChange:x=>a({next_step_id:x}),disabled:o,children:[i.jsx(De,{className:"cj-flex-1 cj-h-8 cj-text-sm",children:i.jsx(Ae,{})}),i.jsxs(Te,{children:[i.jsx(q,{value:"__submit__",children:l("fc_nav_submit_form")}),n.map(x=>i.jsx(q,{value:x.id,children:x.title},x.id))]})]})]})]})}function qx({specs:e=[],readOnly:t=!1}){const{t:n}=be(),{formConfig:r,activeStepId:o,updateStep:a,addRow:s,updateRow:c,deleteRow:l,moveRow:d,removeFieldFromRow:u,moveFieldInRow:f,addNewFieldToRow:m,setSelectedField:p,selectedFieldId:g}=kt(),_=r.steps.find(S=>S.step_id===o)||null,[j,b]=y.useState(!1),[x,w]=y.useState(null);if(!_)return i.jsx("div",{className:"cj-h-full cj-flex cj-items-center cj-justify-center cj-p-8 cj-text-center",children:i.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===_.step_id)+1;return i.jsxs(Gt,{className:"cj-h-full",children:[i.jsxs("div",{className:"cj-p-6 cj-space-y-4 cj-max-w-3xl cj-mx-auto",children:[i.jsxs("div",{className:"cj-rounded-2xl cj-bg-card cj-border cj-border-border cj-p-5 cj-space-y-4",children:[i.jsxs("div",{className:"cj-flex cj-items-center cj-gap-3",children:[i.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}),i.jsx(he,{value:_.title,onChange:S=>a(_.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"})]}),i.jsxs("div",{className:"cj-grid cj-grid-cols-2 cj-gap-3",children:[i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-xs",children:n("fc_step_title_label")}),i.jsx(he,{value:_.title,onChange:S=>a(_.step_id,{title:S.target.value}),disabled:t,className:"cj-mt-1"})]}),i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-xs",children:n("fc_step_description_label")}),i.jsx(he,{value:_.description||"",onChange:S=>a(_.step_id,{description:S.target.value}),disabled:t,placeholder:n("fc_step_description_placeholder"),className:"cj-mt-1"})]})]})]}),_.rows.map((S,v)=>i.jsx(Yx,{row:S,index:v,isLast:v===_.rows.length-1,readOnly:t,onChangeLayout:C=>c(_.step_id,S.row_id,{layout:C}),onChangeTitle:C=>c(_.step_id,S.row_id,{title:C}),onToggleDivider:C=>c(_.step_id,S.row_id,{show_divider:C}),onDelete:()=>l(_.step_id,S.row_id),onMoveUp:()=>d(_.step_id,S.row_id,"up"),onMoveDown:()=>d(_.step_id,S.row_id,"down"),onAddField:()=>w(S.row_id),onSelectField:C=>{p(C),b(!0)},onRemoveField:C=>u(_.step_id,S.row_id,C),onMoveField:(C,P)=>f(_.step_id,S.row_id,C,P),fieldLookup:C=>r.fields.find(P=>P.field_id===C)||null},S.row_id)),!t&&i.jsxs(te,{variant:"outline",className:"cj-w-full cj-h-12 cj-rounded-xl cj-border-dashed",onClick:()=>s(_.step_id),children:[i.jsx(Nt,{className:"cj-h-4 cj-w-4 cj-mr-2"}),n("fc_add_row")]}),i.jsx(Bx,{step:_,readOnly:t})]}),i.jsx(Yf,{fieldId:g,open:j,onOpenChange:S=>{b(S),S||p(null)}}),i.jsx(Vf,{specs:e,open:!!x,onOpenChange:S=>{S||w(null)},onCreate:S=>{x&&m(_.step_id,x,S)}})]})}function Yx({row:e,index:t,isLast:n,readOnly:r,onChangeLayout:o,onChangeTitle:a,onToggleDivider:s,onDelete:c,onMoveUp:l,onMoveDown:d,onAddField:u,onSelectField:f,onRemoveField:m,onMoveField:p,fieldLookup:g}){const{t:_}=be(),[j,b]=y.useState(!1);return i.jsxs("div",{children:[e.show_divider&&i.jsx("div",{className:"cj-border-t-2 cj-border-dotted cj-border-border cj-mb-3","aria-hidden":"true"}),i.jsxs("div",{className:"cj-rounded-2xl cj-bg-card cj-border cj-border-border cj-p-4",children:[i.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2 cj-mb-3",children:[i.jsx(Ol,{className:"cj-h-4 cj-w-4 cj-text-muted-foreground"}),i.jsx("span",{className:"cj-text-sm cj-font-medium",children:_("fc_row_n",{n:t+1})}),i.jsxs(Oe,{value:e.layout,onValueChange:x=>o(x),disabled:r,children:[i.jsx(De,{className:"cj-h-7 cj-w-32 cj-text-xs",children:i.jsx(Ae,{})}),i.jsxs(Te,{children:[i.jsx(q,{value:"horizontal",children:_("fc_layout_horizontal")}),i.jsx(q,{value:"vertical",children:_("fc_layout_vertical")})]})]}),!r&&i.jsxs("label",{className:"cj-flex cj-items-center cj-gap-1 cj-text-xs cj-text-muted-foreground cj-cursor-pointer",children:[i.jsx("input",{type:"checkbox",checked:!!e.show_divider,onChange:x=>s(x.target.checked),className:"cj-h-3 cj-w-3"}),_("fc_row_show_divider")]}),!r&&i.jsxs("div",{className:"cj-ml-auto cj-flex cj-items-center cj-gap-0.5",children:[i.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-6 cj-w-6",disabled:t===0,onClick:l,children:i.jsx(uo,{className:"cj-h-3 cj-w-3"})}),i.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-6 cj-w-6",disabled:n,onClick:d,children:i.jsx(dn,{className:"cj-h-3 cj-w-3"})}),i.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-6 cj-w-6",onClick:()=>b(!0),children:i.jsx(Rn,{className:"cj-h-3 cj-w-3 cj-text-destructive"})}),i.jsx(Ar,{open:j,onOpenChange:b,description:_("fc_confirm_delete_row"),onConfirm:c})]})]}),!r&&i.jsx("div",{className:"cj-mb-3",children:i.jsx(he,{value:e.title||"",onChange:x=>a(x.target.value),placeholder:_("fc_row_title_placeholder"),className:"cj-h-8 cj-text-sm"})}),r&&e.title&&i.jsx("div",{className:"cj-text-sm cj-font-semibold cj-mb-2",children:e.title}),i.jsxs("div",{className:`cj-gap-3 ${e.layout==="horizontal"?"cj-flex cj-flex-wrap":"cj-flex cj-flex-col"}`,children:[e.field_ids.map((x,w)=>{const N=g(x);if(!N)return null;const S=oa(N.schema);return i.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:()=>f(x),children:[i.jsxs("div",{className:"cj-flex cj-items-start cj-gap-2",children:[i.jsxs("div",{className:"cj-flex-1 cj-min-w-0",children:[i.jsx(bt,{variant:"secondary",className:`cj-text-[9px] cj-mb-1 ${S.color} cj-text-white`,children:S.label}),i.jsxs("div",{className:"cj-text-sm cj-font-medium cj-truncate",children:[N.label,N.required&&i.jsx("span",{className:"cj-text-destructive cj-ml-0.5",children:"*"})]}),i.jsx("div",{className:"cj-text-[10px] cj-font-mono cj-text-muted-foreground cj-truncate",children:N.namespace})]}),!r&&i.jsxs("div",{className:"cj-flex cj-flex-col cj-gap-0.5 cj-opacity-0 group-hover:cj-opacity-100 cj-transition-opacity",children:[i.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-5 cj-w-5",onClick:v=>{v.stopPropagation(),f(x)},title:_("fc_edit"),children:i.jsx(F_,{className:"cj-h-3 cj-w-3"})}),i.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-5 cj-w-5",onClick:v=>{v.stopPropagation(),m(x)},title:_("fc_remove_from_row"),children:i.jsx(Wt,{className:"cj-h-3 cj-w-3 cj-text-destructive"})})]})]}),!r&&e.field_ids.length>1&&i.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:[i.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-5 cj-w-5",disabled:w===0,onClick:v=>{v.stopPropagation(),p(x,"left")},children:i.jsx(uo,{className:"cj-h-3 cj-w-3 -cj-rotate-90"})}),i.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-5 cj-w-5",disabled:w===e.field_ids.length-1,onClick:v=>{v.stopPropagation(),p(x,"right")},children:i.jsx(dn,{className:"cj-h-3 cj-w-3 -cj-rotate-90"})})]})]},x)}),!r&&i.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:[i.jsx(Nt,{className:"cj-h-3.5 cj-w-3.5"}),_("fc_add_field_btn")]}),e.field_ids.length===0&&r&&i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-italic",children:_("fc_no_fields")})]})]})]})}function Vx({readOnly:e=!1}){const{t}=be(),{formConfig:n,updateSummary:r,addSummarySection:o,updateSummarySection:a,deleteSummarySection:s,addDisplayField:c,updateDisplayField:l,deleteDisplayField:d}=kt(),[u,f]=y.useState(null),{summary:m,fields:p,steps:g}=n;return i.jsxs("div",{className:"cj-flex cj-flex-col cj-h-full cj-bg-card",children:[i.jsx("div",{className:"cj-p-4 cj-border-b",children:i.jsx("h2",{className:"cj-text-sm cj-font-semibold",children:t("fc_summary_panel")})}),i.jsx(Gt,{className:"cj-flex-1",children:i.jsxs("div",{className:"cj-p-4 cj-space-y-4",children:[i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-xs",children:t("fc_summary_title_label")}),i.jsx(he,{value:m.title,onChange:_=>r({title:_.target.value}),disabled:e,className:"cj-mt-1"})]}),i.jsxs("div",{children:[i.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-mb-2",children:[i.jsx(U,{className:"cj-text-xs cj-font-semibold cj-uppercase",children:t("fc_summary_sections")}),!e&&i.jsxs(te,{size:"sm",variant:"outline",onClick:()=>o(),children:[i.jsx(Nt,{className:"cj-h-3 cj-w-3 cj-mr-1"}),t("fc_summary_add_section")]})]}),i.jsxs("div",{className:"cj-space-y-3",children:[m.sections.map(_=>i.jsxs("div",{className:"cj-rounded-xl cj-border cj-border-border cj-p-3 cj-space-y-3 cj-bg-muted/20",children:[i.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[i.jsx(he,{value:_.title,onChange:j=>a(_.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&&i.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-7 cj-w-7",onClick:()=>f(_.section_id),children:i.jsx(Rn,{className:"cj-h-3.5 cj-w-3.5 cj-text-destructive"})})]}),i.jsxs("div",{className:"cj-grid cj-grid-cols-2 cj-gap-2",children:[i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-[10px]",children:t("fc_summary_visible_from")}),i.jsxs(Oe,{value:String(_.visible_from_step??1),onValueChange:j=>a(_.section_id,{visible_from_step:parseInt(j,10)||1}),disabled:e,children:[i.jsx(De,{className:"cj-mt-0.5 cj-h-8 cj-text-xs",children:i.jsx(Ae,{})}),i.jsx(Te,{children:g.map((j,b)=>i.jsx(q,{value:String(b+1),children:t("fc_summary_step_n",{n:b+1})},b))})]})]}),i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-[10px]",children:t("fc_summary_until_step")}),i.jsxs(Oe,{value:_.until_step?String(_.until_step):"all",onValueChange:j=>a(_.section_id,{until_step:j==="all"?void 0:parseInt(j,10)}),disabled:e,children:[i.jsx(De,{className:"cj-mt-0.5 cj-h-8 cj-text-xs",children:i.jsx(Ae,{})}),i.jsxs(Te,{children:[i.jsx(q,{value:"all",children:t("fc_summary_all_steps")}),g.map((j,b)=>i.jsx(q,{value:String(b+1),children:t("fc_summary_step_n",{n:b+1})},b))]})]})]})]}),i.jsxs("div",{children:[i.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-mb-1",children:[i.jsx(U,{className:"cj-text-[10px] cj-uppercase cj-font-semibold",children:t("fc_summary_display_fields")}),!e&&i.jsxs(te,{size:"sm",variant:"ghost",className:"cj-h-6 cj-text-[11px]",onClick:()=>c(_.section_id),children:[i.jsx(Nt,{className:"cj-h-3 cj-w-3 cj-mr-1"}),t("fc_summary_add")]})]}),i.jsxs("div",{className:"cj-space-y-2",children:[_.display_fields.map(j=>i.jsx(Ux,{field:j,steps:g.map(b=>({id:b.step_id,title:b.title})),fields:p.map(b=>({id:b.field_id,label:b.label,namespace:b.namespace})),readOnly:e,onChange:b=>l(_.section_id,j.display_id,b),onDelete:()=>d(_.section_id,j.display_id)},j.display_id)),_.display_fields.length===0&&i.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground cj-italic",children:t("fc_summary_no_display_fields")})]})]})]},_.section_id)),m.sections.length===0&&i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-text-center cj-py-4",children:t("fc_summary_no_sections")})]})]})]})}),i.jsx(Ar,{open:u!==null,onOpenChange:_=>!_&&f(null),description:t("fc_summary_confirm_delete_section"),onConfirm:()=>{u&&s(u),f(null)}})]})}function Ux({field:e,steps:t,fields:n,readOnly:r,onChange:o,onDelete:a}){const{t:s}=be();return i.jsxs("div",{className:"cj-relative cj-rounded-lg cj-border cj-bg-card cj-p-2 cj-space-y-1.5",children:[!r&&i.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:i.jsx(Wt,{className:"cj-h-3 cj-w-3"})}),i.jsxs("div",{className:"cj-grid cj-grid-cols-2 cj-gap-1.5",children:[i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-[10px]",children:s("fc_summary_source")}),i.jsxs(Oe,{value:e.source,onValueChange:c=>o({source:c}),disabled:r,children:[i.jsx(De,{className:"cj-mt-0.5 cj-h-7 cj-text-xs",children:i.jsx(Ae,{})}),i.jsxs(Te,{children:[i.jsx(q,{value:"form_field",children:s("fc_summary_source_form_field")}),i.jsx(q,{value:"api_response",children:s("fc_summary_source_api_response")})]})]})]}),i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-[10px]",children:s("fc_summary_format")}),i.jsxs(Oe,{value:e.format||"text",onValueChange:c=>o({format:c}),disabled:r,children:[i.jsx(De,{className:"cj-mt-0.5 cj-h-7 cj-text-xs",children:i.jsx(Ae,{})}),i.jsxs(Te,{children:[i.jsx(q,{value:"text",children:s("fc_summary_format_text")}),i.jsx(q,{value:"number",children:s("fc_summary_format_number")}),i.jsx(q,{value:"currency",children:s("fc_summary_format_currency")}),i.jsx(q,{value:"date",children:s("fc_summary_format_date")}),i.jsx(q,{value:"datetime",children:s("fc_summary_format_datetime")})]})]})]})]}),i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-[10px]",children:s("fc_summary_display_label")}),i.jsx(he,{value:e.label,onChange:c=>o({label:c.target.value}),placeholder:s("fc_summary_display_label_placeholder"),disabled:r,className:"cj-mt-0.5 cj-h-7 cj-text-xs"})]}),e.source==="form_field"?i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-[10px]",children:s("fc_summary_field")}),i.jsxs(Oe,{value:e.field_id||"",onValueChange:c=>o({field_id:c}),disabled:r,children:[i.jsx(De,{className:"cj-mt-0.5 cj-h-7 cj-text-xs",children:i.jsx(Ae,{placeholder:s("fc_summary_select")})}),i.jsx(Te,{children:n.map(c=>i.jsxs(q,{value:c.id,children:[c.label," ",i.jsxs("span",{className:"cj-text-muted-foreground",children:["(",c.namespace,")"]})]},c.id))})]})]}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-[10px]",children:s("fc_summary_from_step_api")}),i.jsxs(Oe,{value:e.step_id||"",onValueChange:c=>o({step_id:c}),disabled:r,children:[i.jsx(De,{className:"cj-mt-0.5 cj-h-7 cj-text-xs",children:i.jsx(Ae,{placeholder:s("fc_summary_select")})}),i.jsx(Te,{children:t.map(c=>i.jsx(q,{value:c.id,children:c.title},c.id))})]})]}),i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-[10px]",children:s("fc_summary_response_path")}),i.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 Gx({specs:e=[],readOnly:t=!1}){const{t:n}=be(),{formConfig:r,createField:o,createFieldFromSpec:a,deleteField:s,setSelectedField:c,setActiveStep:l,setActiveTab:d}=kt(),[u,f]=y.useState(""),[m,p]=y.useState("all"),[g,_]=y.useState(!1),[j,b]=y.useState(null),[x,w]=y.useState(null),N=y.useMemo(()=>{const k=new Map;for(const E of r.steps){const M=new Set;for(const D of E.rows)for(const z of D.field_ids)M.add(z);for(const D of M){const z=k.get(D)??[];z.push({step_id:E.step_id,title:E.title}),k.set(D,z)}}return k},[r.steps]),S=y.useMemo(()=>{var M;let k=0,E=0;for(const D of r.fields)(((M=N.get(D.field_id))==null?void 0:M.length)??0)>0?k++:E++;return{all:r.fields.length,used:k,unused:E}},[r.fields,N]),v=r.fields.filter(k=>{var z;const E=u.toLowerCase();if(!(k.label.toLowerCase().includes(E)||k.namespace.toLowerCase().includes(E)))return!1;const D=((z=N.get(k.field_id))==null?void 0:z.length)??0;return m==="used"?D>0:m==="unused"?D===0:!0}),C=k=>{l(k),d("steps")},P=k=>`cj-h-8 cj-px-3 cj-text-xs cj-rounded-lg cj-border cj-transition-colors ${k?"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 i.jsx("div",{className:"cj-h-full cj-overflow-hidden cj-p-6",children:i.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:[i.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-mb-4",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"cj-text-lg cj-font-semibold",children:n("fc_fields_catalog")}),i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:n("fc_fields_catalog_hint")})]}),!t&&i.jsxs(te,{onClick:()=>_(!0),children:[i.jsx(Nt,{className:"cj-h-4 cj-w-4 cj-mr-1"}),n("fc_fields_add")]})]}),i.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2 cj-mb-3",children:[i.jsxs("div",{className:"cj-relative cj-flex-1",children:[i.jsx(zl,{className:"cj-absolute cj-left-2.5 cj-top-2.5 cj-h-4 cj-w-4 cj-text-muted-foreground"}),i.jsx(he,{placeholder:n("fc_fields_search"),value:u,onChange:k=>f(k.target.value),className:"cj-pl-8"})]}),i.jsxs("div",{className:"cj-flex cj-items-center cj-gap-1",children:[i.jsxs("button",{type:"button",className:P(m==="all"),onClick:()=>p("all"),children:[n("fc_fields_filter_all")," ",i.jsx("span",{className:"cj-opacity-70 cj-ml-1",children:S.all})]}),i.jsxs("button",{type:"button",className:P(m==="used"),onClick:()=>p("used"),children:[n("fc_fields_filter_used")," ",i.jsx("span",{className:"cj-opacity-70 cj-ml-1",children:S.used})]}),i.jsxs("button",{type:"button",className:P(m==="unused"),onClick:()=>p("unused"),children:[n("fc_fields_filter_unused")," ",i.jsx("span",{className:"cj-opacity-70 cj-ml-1",children:S.unused})]})]})]}),i.jsx(Gt,{className:"cj-flex-1 cj-rounded-xl cj-border",children:i.jsxs("div",{className:"cj-divide-y",children:[v.map(k=>{const E=oa(k.schema),M=N.get(k.field_id)??[],D=M.length===0;return i.jsxs("div",{className:`cj-p-3 cj-flex cj-items-start cj-gap-3 hover:cj-bg-accent/40 ${D?"cj-bg-muted/30":""}`,children:[i.jsx(bt,{variant:"secondary",className:`cj-text-[10px] ${E.color} cj-text-white cj-mt-0.5`,children:E.label}),i.jsxs("div",{className:"cj-flex-1 cj-min-w-0",children:[i.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[i.jsxs("div",{className:"cj-text-sm cj-font-medium cj-truncate",children:[k.label,k.required&&i.jsx("span",{className:"cj-text-destructive cj-ml-1",children:"*"})]}),D?i.jsx(bt,{variant:"outline",className:"cj-text-[10px] cj-border-destructive/40 cj-text-destructive",children:n("fc_fields_unused_badge")}):i.jsx(bt,{variant:"outline",className:"cj-text-[10px] cj-border-primary/40 cj-text-primary",children:M.length===1?n("fc_fields_used_in_one",{count:M.length}):n("fc_fields_used_in_many",{count:M.length})})]}),i.jsx("div",{className:"cj-text-[11px] cj-font-mono cj-text-muted-foreground cj-truncate",children:k.namespace}),M.length>0&&i.jsx("div",{className:"cj-mt-2 cj-flex cj-flex-wrap cj-gap-1",children:M.map(z=>i.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:[i.jsx("span",{className:"cj-truncate cj-max-w-[160px]",children:z.title}),i.jsx(Oo,{className:"cj-h-3 cj-w-3 cj-opacity-60"})]},z.step_id))})]}),!t&&i.jsxs("div",{className:"cj-flex cj-items-center cj-gap-1",children:[i.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-7 cj-w-7",onClick:()=>{c(k.field_id),b(k.field_id)},children:i.jsx(A_,{className:"cj-h-3.5 cj-w-3.5"})}),i.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-7 cj-w-7",onClick:()=>w(k.field_id),children:i.jsx(Rn,{className:"cj-h-3.5 cj-w-3.5 cj-text-destructive"})})]})]},k.field_id)}),v.length===0&&i.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")})]})}),i.jsx(Vf,{specs:e,open:g,onOpenChange:_,onCreate:k=>{"claimspec_id"in k?a(k):o(k)}}),i.jsx(Yf,{fieldId:j,open:!!j,onOpenChange:k=>!k&&b(null)}),i.jsx(Ar,{open:x!==null,onOpenChange:k=>!k&&w(null),description:n("fc_fields_confirm_delete"),onConfirm:()=>{x&&s(x),w(null)}})]})})}function Xx({readOnly:e=!1}){var u,f;const{t}=be(),{formConfig:n,updateInit:r}=kt(),o=n.init,a=Object.entries(o.values||{}),s=()=>{let m="namespace",p=1;for(;o.values[m]!==void 0;)m=`namespace_${p++}`;r({values:{...o.values,[m]:""}})},c=(m,p)=>{if(p===m)return;const g={...o.values};g[p]=g[m],delete g[m],r({values:g})},l=(m,p)=>{r({values:{...o.values,[m]:p}})},d=m=>{const p={...o.values};delete p[m],r({values:p})};return i.jsx(Gt,{className:"cj-h-full",children:i.jsx("div",{className:"cj-p-6",children:i.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:[i.jsxs("div",{children:[i.jsx("h2",{className:"cj-text-lg cj-font-semibold",children:t("fc_init_title")}),i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:t("fc_init_subtitle")})]}),i.jsxs("div",{className:"cj-rounded-xl cj-border cj-p-4 cj-space-y-3",children:[i.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between",children:[i.jsx(U,{className:"cj-text-sm cj-font-semibold",children:t("fc_init_static")}),!e&&i.jsxs(te,{size:"sm",variant:"outline",onClick:s,children:[i.jsx(Nt,{className:"cj-h-3.5 cj-w-3.5 cj-mr-1"}),t("fc_init_add")]})]}),i.jsxs("div",{className:"cj-space-y-2",children:[a.map(([m,p])=>i.jsxs("div",{className:"cj-flex cj-gap-2 cj-items-center",children:[i.jsx(he,{value:m,onChange:g=>c(m,g.target.value),className:"cj-flex-1 cj-font-mono cj-text-sm cj-h-9",disabled:e}),i.jsx(he,{value:String(p??""),onChange:g=>l(m,g.target.value),className:"cj-flex-1 cj-h-9",disabled:e}),!e&&i.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-8 cj-w-8",onClick:()=>d(m),children:i.jsx(Rn,{className:"cj-h-3.5 cj-w-3.5 cj-text-destructive"})})]},m)),a.length===0&&i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-italic cj-py-2",children:t("fc_init_no_values")})]})]}),i.jsxs("div",{className:"cj-rounded-xl cj-border cj-p-4 cj-space-y-3",children:[i.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between",children:[i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-sm cj-font-semibold",children:t("fc_init_prefill")}),i.jsx("p",{className:"cj-text-[11px] cj-text-muted-foreground",children:t("fc_init_prefill_hint")})]}),i.jsx(Jt,{checked:!!((u=o.api)!=null&&u.enabled),disabled:e,onCheckedChange:m=>r({api:m?o.api||{enabled:!0,method:"GET",url:"",mapping:{}}:void 0})})]}),((f=o.api)==null?void 0:f.enabled)&&i.jsxs("div",{className:"cj-space-y-2",children:[i.jsxs("div",{className:"cj-flex cj-gap-2",children:[i.jsxs(Oe,{value:o.api.method,onValueChange:m=>r({api:{...o.api,method:m}}),disabled:e,children:[i.jsx(De,{className:"cj-w-28",children:i.jsx(Ae,{})}),i.jsxs(Te,{children:[i.jsx(q,{value:"GET",children:"GET"}),i.jsx(q,{value:"POST",children:"POST"})]})]}),i.jsx(he,{value:o.api.url,onChange:m=>r({api:{...o.api,url:m.target.value}}),placeholder:"https://api.example.com/prefill",className:"cj-flex-1 cj-font-mono cj-text-xs",disabled:e})]}),i.jsxs("div",{children:[i.jsx(U,{className:"cj-text-xs",children:t("fc_init_mapping")}),i.jsx(Ir,{value:JSON.stringify(o.api.mapping||{},null,2),onChange:m=>{try{const p=JSON.parse(m.target.value);r({api:{...o.api,mapping:p}})}catch{}},className:"cj-mt-1 cj-font-mono cj-text-xs",rows:5,disabled:e})]})]})]})]})})})}var Kx=e=>{switch(e){case"success":return Zx;case"info":return tb;case"warning":return eb;case"error":return nb;default:return null}},Jx=Array(12).fill(0),Qx=({visible:e,className:t})=>y.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},y.createElement("div",{className:"sonner-spinner"},Jx.map((n,r)=>y.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Zx=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"})),eb=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"})),tb=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"})),nb=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"})),rb=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"})),ob=()=>{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},is=1,ab=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:is++,a=this.toasts.find(c=>c.id===o),s=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:s,title:n}):c):this.addToast({title:n,...r,dismissible:s,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,s=r.then(async l=>{if(a=["resolve",l],y.isValidElement(l))o=!1,this.create({id:n,type:"default",message:l});else if(ib(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)=>s.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)||is++;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}},at=new ab,sb=(e,t)=>{let n=(t==null?void 0:t.id)||is++;return at.addToast({title:e,...t,id:n}),n},ib=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",cb=sb,lb=()=>at.toasts,db=()=>at.getActiveToasts(),Nn=Object.assign(cb,{success:at.success,info:at.info,warning:at.warning,error:at.error,custom:at.custom,message:at.message,promise:at.promise,dismiss:at.dismiss,loading:at.loading},{getHistory:lb,getToasts:db});function ub(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))}ub(`: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%)}
|
|
278
|
-
`);function Qr(e){return e.label!==void 0}var fb=3,mb="32px",pb="16px",vc=4e3,hb=356,_b=14,gb=20,jb=200;function jt(...e){return e.filter(Boolean).join(" ")}function yb(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var vb=e=>{var t,n,r,o,a,s,c,l,d,u,f;let{invert:m,toast:p,unstyled:g,interacting:_,setHeights:j,visibleToasts:b,heights:x,index:w,toasts:N,expanded:S,removeToast:v,defaultRichColors:C,closeButton:P,style:k,cancelButtonStyle:E,actionButtonStyle:M,className:D="",descriptionClassName:z="",duration:A,position:L,gap:W,loadingIcon:Q,expandByDefault:Y,classNames:O,icons:se,closeButtonAriaLabel:fe="Close toast",pauseWhenPageIsHidden:ue}=e,[R,I]=y.useState(null),[H,G]=y.useState(null),[T,B]=y.useState(!1),[ee,K]=y.useState(!1),[ie,ce]=y.useState(!1),[pe,Ee]=y.useState(!1),[F,J]=y.useState(!1),[le,X]=y.useState(0),[ae,Ce]=y.useState(0),xe=y.useRef(p.duration||A||vc),qe=y.useRef(null),Ie=y.useRef(null),ot=w===0,Ke=w+1<=b,Je=p.type,Zt=p.dismissible!==!1,ma=p.className||"",pa=p.descriptionClassName||"",On=y.useMemo(()=>x.findIndex($=>$.toastId===p.id)||0,[x,p.id]),ha=y.useMemo(()=>{var $;return($=p.closeButton)!=null?$:P},[p.closeButton,P]),Br=y.useMemo(()=>p.duration||A||vc,[p.duration,A]),cr=y.useRef(0),en=y.useRef(0),Hr=y.useRef(0),tn=y.useRef(null),[qr,_a]=L.split("-"),lr=y.useMemo(()=>x.reduce(($,Se,Re)=>Re>=On?$:$+Se.height,0),[x,On]),me=ob(),we=p.invert||m,ne=Je==="loading";en.current=y.useMemo(()=>On*W+lr,[On,lr]),y.useEffect(()=>{xe.current=Br},[Br]),y.useEffect(()=>{B(!0)},[]),y.useEffect(()=>{let $=Ie.current;if($){let Se=$.getBoundingClientRect().height;return Ce(Se),j(Re=>[{toastId:p.id,height:Se,position:p.position},...Re]),()=>j(Re=>Re.filter(st=>st.toastId!==p.id))}},[j,p.id]),y.useLayoutEffect(()=>{if(!T)return;let $=Ie.current,Se=$.style.height;$.style.height="auto";let Re=$.getBoundingClientRect().height;$.style.height=Se,Ce(Re),j(st=>st.find(et=>et.toastId===p.id)?st.map(et=>et.toastId===p.id?{...et,height:Re}:et):[{toastId:p.id,height:Re,position:p.position},...st])},[T,p.title,p.description,j,p.id]);let je=y.useCallback(()=>{K(!0),X(en.current),j($=>$.filter(Se=>Se.toastId!==p.id)),setTimeout(()=>{v(p)},jb)},[p,v,j,en]);y.useEffect(()=>{if(p.promise&&Je==="loading"||p.duration===1/0||p.type==="loading")return;let $;return S||_||ue&&me?(()=>{if(Hr.current<cr.current){let Se=new Date().getTime()-cr.current;xe.current=xe.current-Se}Hr.current=new Date().getTime()})():xe.current!==1/0&&(cr.current=new Date().getTime(),$=setTimeout(()=>{var Se;(Se=p.onAutoClose)==null||Se.call(p,p),je()},xe.current)),()=>clearTimeout($)},[S,_,p,Je,ue,me,je]),y.useEffect(()=>{p.delete&&je()},[je,p.delete]);function Ze(){var $,Se,Re;return se!=null&&se.loading?y.createElement("div",{className:jt(O==null?void 0:O.loader,($=p==null?void 0:p.classNames)==null?void 0:$.loader,"sonner-loader"),"data-visible":Je==="loading"},se.loading):Q?y.createElement("div",{className:jt(O==null?void 0:O.loader,(Se=p==null?void 0:p.classNames)==null?void 0:Se.loader,"sonner-loader"),"data-visible":Je==="loading"},Q):y.createElement(Qx,{className:jt(O==null?void 0:O.loader,(Re=p==null?void 0:p.classNames)==null?void 0:Re.loader),visible:Je==="loading"})}return y.createElement("li",{tabIndex:0,ref:Ie,className:jt(D,ma,O==null?void 0:O.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,O==null?void 0:O.default,O==null?void 0:O[Je],(n=p==null?void 0:p.classNames)==null?void 0:n[Je]),"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":F,"data-removed":ee,"data-visible":Ke,"data-y-position":qr,"data-x-position":_a,"data-index":w,"data-front":ot,"data-swiping":ie,"data-dismissible":Zt,"data-type":Je,"data-invert":we,"data-swipe-out":pe,"data-swipe-direction":H,"data-expanded":!!(S||Y&&T),style:{"--index":w,"--toasts-before":w,"--z-index":N.length-w,"--offset":`${ee?le:en.current}px`,"--initial-height":Y?"auto":`${ae}px`,...k,...p.style},onDragEnd:()=>{ce(!1),I(null),tn.current=null},onPointerDown:$=>{ne||!Zt||(qe.current=new Date,X(en.current),$.target.setPointerCapture($.pointerId),$.target.tagName!=="BUTTON"&&(ce(!0),tn.current={x:$.clientX,y:$.clientY}))},onPointerUp:()=>{var $,Se,Re,st;if(pe||!Zt)return;tn.current=null;let et=Number((($=Ie.current)==null?void 0:$.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),pt=Number(((Se=Ie.current)==null?void 0:Se.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),jn=new Date().getTime()-((Re=qe.current)==null?void 0:Re.getTime()),gt=R==="x"?et:pt,nn=Math.abs(gt)/jn;if(Math.abs(gt)>=gb||nn>.11){X(en.current),(st=p.onDismiss)==null||st.call(p,p),G(R==="x"?et>0?"right":"left":pt>0?"down":"up"),je(),Ee(!0),J(!1);return}ce(!1),I(null)},onPointerMove:$=>{var Se,Re,st,et;if(!tn.current||!Zt||((Se=window.getSelection())==null?void 0:Se.toString().length)>0)return;let pt=$.clientY-tn.current.y,jn=$.clientX-tn.current.x,gt=(Re=e.swipeDirections)!=null?Re:yb(L);!R&&(Math.abs(jn)>1||Math.abs(pt)>1)&&I(Math.abs(jn)>Math.abs(pt)?"x":"y");let nn={x:0,y:0};R==="y"?(gt.includes("top")||gt.includes("bottom"))&&(gt.includes("top")&&pt<0||gt.includes("bottom")&&pt>0)&&(nn.y=pt):R==="x"&&(gt.includes("left")||gt.includes("right"))&&(gt.includes("left")&&jn<0||gt.includes("right")&&jn>0)&&(nn.x=jn),(Math.abs(nn.x)>0||Math.abs(nn.y)>0)&&J(!0),(st=Ie.current)==null||st.style.setProperty("--swipe-amount-x",`${nn.x}px`),(et=Ie.current)==null||et.style.setProperty("--swipe-amount-y",`${nn.y}px`)}},ha&&!p.jsx?y.createElement("button",{"aria-label":fe,"data-disabled":ne,"data-close-button":!0,onClick:ne||!Zt?()=>{}:()=>{var $;je(),($=p.onDismiss)==null||$.call(p,p)},className:jt(O==null?void 0:O.closeButton,(o=p==null?void 0:p.classNames)==null?void 0:o.closeButton)},(a=se==null?void 0:se.close)!=null?a:rb):null,p.jsx||y.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:y.createElement(y.Fragment,null,Je||p.icon||p.promise?y.createElement("div",{"data-icon":"",className:jt(O==null?void 0:O.icon,(s=p==null?void 0:p.classNames)==null?void 0:s.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||Ze():null,p.type!=="loading"?p.icon||(se==null?void 0:se[Je])||Kx(Je):null):null,y.createElement("div",{"data-content":"",className:jt(O==null?void 0:O.content,(c=p==null?void 0:p.classNames)==null?void 0:c.content)},y.createElement("div",{"data-title":"",className:jt(O==null?void 0:O.title,(l=p==null?void 0:p.classNames)==null?void 0:l.title)},typeof p.title=="function"?p.title():p.title),p.description?y.createElement("div",{"data-description":"",className:jt(z,pa,O==null?void 0:O.description,(d=p==null?void 0:p.classNames)==null?void 0:d.description)},typeof p.description=="function"?p.description():p.description):null),y.isValidElement(p.cancel)?p.cancel:p.cancel&&Qr(p.cancel)?y.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||E,onClick:$=>{var Se,Re;Qr(p.cancel)&&Zt&&((Re=(Se=p.cancel).onClick)==null||Re.call(Se,$),je())},className:jt(O==null?void 0:O.cancelButton,(u=p==null?void 0:p.classNames)==null?void 0:u.cancelButton)},p.cancel.label):null,y.isValidElement(p.action)?p.action:p.action&&Qr(p.action)?y.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||M,onClick:$=>{var Se,Re;Qr(p.action)&&((Re=(Se=p.action).onClick)==null||Re.call(Se,$),!$.defaultPrevented&&je())},className:jt(O==null?void 0:O.actionButton,(f=p==null?void 0:p.classNames)==null?void 0:f.actionButton)},p.action.label):null))};function xc(){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 xb(e,t){let n={};return[e,t].forEach((r,o)=>{let a=o===1,s=a?"--mobile-offset":"--offset",c=a?pb:mb;function l(d){["top","right","bottom","left"].forEach(u=>{n[`${s}-${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[`${s}-${d}`]=c:n[`${s}-${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:s,className:c,offset:l,mobileOffset:d,theme:u="light",richColors:f,duration:m,style:p,visibleToasts:g=fb,toastOptions:_,dir:j=xc(),gap:b=_b,loadingIcon:x,icons:w,containerAriaLabel:N="Notifications",pauseWhenPageIsHidden:S}=e,[v,C]=y.useState([]),P=y.useMemo(()=>Array.from(new Set([r].concat(v.filter(ue=>ue.position).map(ue=>ue.position)))),[v,r]),[k,E]=y.useState([]),[M,D]=y.useState(!1),[z,A]=y.useState(!1),[L,W]=y.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Q=y.useRef(null),Y=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=y.useRef(null),se=y.useRef(!1),fe=y.useCallback(ue=>{C(R=>{var I;return(I=R.find(H=>H.id===ue.id))!=null&&I.delete||at.dismiss(ue.id),R.filter(({id:H})=>H!==ue.id)})},[]);return y.useEffect(()=>at.subscribe(ue=>{if(ue.dismiss){C(R=>R.map(I=>I.id===ue.id?{...I,delete:!0}:I));return}setTimeout(()=>{hs.flushSync(()=>{C(R=>{let I=R.findIndex(H=>H.id===ue.id);return I!==-1?[...R.slice(0,I),{...R[I],...ue},...R.slice(I+1)]:[ue,...R]})})})}),[]),y.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 ue=window.matchMedia("(prefers-color-scheme: dark)");try{ue.addEventListener("change",({matches:R})=>{W(R?"dark":"light")})}catch{ue.addListener(({matches:I})=>{try{W(I?"dark":"light")}catch(H){console.error(H)}})}},[u]),y.useEffect(()=>{v.length<=1&&D(!1)},[v]),y.useEffect(()=>{let ue=R=>{var I,H;o.every(G=>R[G]||R.code===G)&&(D(!0),(I=Q.current)==null||I.focus()),R.code==="Escape"&&(document.activeElement===Q.current||(H=Q.current)!=null&&H.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",ue),()=>document.removeEventListener("keydown",ue)},[o]),y.useEffect(()=>{if(Q.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,se.current=!1)}},[Q.current]),y.createElement("section",{ref:t,"aria-label":`${N} ${Y}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((ue,R)=>{var I;let[H,G]=ue.split("-");return v.length?y.createElement("ol",{key:ue,dir:j==="auto"?xc():j,tabIndex:-1,ref:Q,className:c,"data-sonner-toaster":!0,"data-theme":L,"data-y-position":H,"data-lifted":M&&v.length>1&&!a,"data-x-position":G,style:{"--front-toast-height":`${((I=k[0])==null?void 0:I.height)||0}px`,"--width":`${hb}px`,"--gap":`${b}px`,...p,...xb(l,d)},onBlur:T=>{se.current&&!T.currentTarget.contains(T.relatedTarget)&&(se.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:T=>{T.target instanceof HTMLElement&&T.target.dataset.dismissible==="false"||se.current||(se.current=!0,O.current=T.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{z||D(!1)},onDragEnd:()=>D(!1),onPointerDown:T=>{T.target instanceof HTMLElement&&T.target.dataset.dismissible==="false"||A(!0)},onPointerUp:()=>A(!1)},v.filter(T=>!T.position&&R===0||T.position===ue).map((T,B)=>{var ee,K;return y.createElement(vb,{key:T.id,icons:w,index:B,toast:T,defaultRichColors:f,duration:(ee=_==null?void 0:_.duration)!=null?ee:m,className:_==null?void 0:_.className,descriptionClassName:_==null?void 0:_.descriptionClassName,invert:n,visibleToasts:g,closeButton:(K=_==null?void 0:_.closeButton)!=null?K:s,interacting:z,position:ue,style:_==null?void 0:_.style,unstyled:_==null?void 0:_.unstyled,classNames:_==null?void 0:_.classNames,cancelButtonStyle:_==null?void 0:_.cancelButtonStyle,actionButtonStyle:_==null?void 0:_.actionButtonStyle,removeToast:fe,toasts:v.filter(ie=>ie.position==T.position),heights:k.filter(ie=>ie.position==T.position),setHeights:E,expandByDefault:a,gap:b,loadingIcon:x,expanded:M,pauseWhenPageIsHidden:S,swipeDirections:e.swipeDirections})})):null}))});function bb({readOnly:e=!1}){const{t}=be(),{exportJourneySpec:n,importJourneySpec:r}=kt(),o=n(),a=JSON.stringify(o,null,2),[s,c]=y.useState(a),[l,d]=y.useState(null),[u,f]=y.useState(null),m=y.useRef(null),p=y.useRef(),g=s!==a,_=v=>{f(v),clearTimeout(p.current),p.current=setTimeout(()=>{f(null)},2200)};y.useEffect(()=>()=>{clearTimeout(p.current)},[]);const j=v=>u===v?i.jsx(Tl,{"aria-label":"Success",className:"cj-h-3.5 cj-w-3.5 cj-ml-1 cj-text-green-600"}):null,b=()=>{c(JSON.stringify(n(),null,2)),d(null),_("refresh")},x=(v,C)=>{try{const P=JSON.parse(v);r(P),c(JSON.stringify(P,null,2)),d(null),_(C),Nn.success(t("fc_json_imported_ok"))}catch(P){d(P instanceof Error?P.message:t("fc_json_invalid")),Nn.error(t("fc_json_invalid"))}},w=v=>{var k;const C=(k=v.target.files)==null?void 0:k[0];if(!C)return;const P=new FileReader;P.onload=E=>{var D;const M=(D=E.target)==null?void 0:D.result;x(M,"upload")},P.onerror=()=>{Nn.error(t("fc_json_file_error"))},P.readAsText(C),v.target.value=""},N=()=>{navigator.clipboard.writeText(s).then(()=>{_("copy"),Nn.success(t("fc_json_copied"))})},S=()=>{const v=new Blob([s],{type:"application/json"}),C=URL.createObjectURL(v),P=document.createElement("a");P.href=C,P.download=`${o.journey_id}.json`,P.click(),URL.revokeObjectURL(C),_("download")};return i.jsx("div",{className:"cj-h-full cj-overflow-auto cj-p-6",children:i.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:[i.jsx("h2",{className:"cj-text-lg cj-font-semibold",children:t("fc_json_title")}),i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:t("fc_json_hint")}),i.jsxs("div",{className:"cj-flex cj-flex-wrap cj-gap-2",children:[i.jsxs(te,{size:"sm",variant:"outline",onClick:b,title:t("fc_json_refresh_hint"),children:[t("fc_json_refresh"),j("refresh")]}),i.jsxs(te,{size:"sm",variant:"outline",onClick:N,children:[i.jsx(x_,{className:"cj-h-3.5 cj-w-3.5 cj-mr-1"}),t("fc_json_copy"),j("copy")]}),i.jsxs(te,{size:"sm",variant:"outline",onClick:S,children:[i.jsx(w_,{className:"cj-h-3.5 cj-w-3.5 cj-mr-1"}),t("fc_json_download"),j("download")]}),!e&&i.jsxs(i.Fragment,{children:[i.jsxs(te,{size:"sm",variant:"outline",onClick:()=>{var v;return(v=m.current)==null?void 0:v.click()},children:[i.jsx(P_,{className:"cj-h-3.5 cj-w-3.5 cj-mr-1"}),t("fc_json_upload"),j("upload")]}),i.jsxs(te,{size:"sm",onClick:()=>x(s,"apply"),disabled:!g,title:t("fc_json_apply_hint"),children:[i.jsx(Il,{className:"cj-h-3.5 cj-w-3.5 cj-mr-1"}),t("fc_json_import"),j("apply")]}),i.jsx("input",{ref:m,type:"file",accept:".json,application/json",hidden:!0,onChange:w})]})]}),l&&i.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}),i.jsx(Ir,{value:s,onChange:v=>c(v.target.value),className:"cj-flex-1 cj-font-mono cj-text-xs",readOnly:e})]})})}const wb=As,Nb=Xd,Sb=zs,Jf=h.forwardRef(({className:e,...t},n)=>i.jsx(Dr,{className:re("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}));Jf.displayName=Dr.displayName;const Cb=Do("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"}}),Qf=h.forwardRef(({side:e="right",className:t,children:n,...r},o)=>i.jsxs(Sb,{children:[i.jsx(Jf,{}),i.jsxs(Tr,{ref:o,className:re(Cb({side:e}),t),...r,children:[n,i.jsxs(Uo,{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:[i.jsx(Wt,{className:"cj-h-4 cj-w-4"}),i.jsx("span",{className:"cj-sr-only",children:"Close"})]})]})]}));Qf.displayName=Tr.displayName;const Zf=({className:e,...t})=>i.jsx("div",{className:re("cj-flex cj-flex-col cj-space-y-2 cj-text-center sm:cj-text-left",e),...t});Zf.displayName="SheetHeader";const em=h.forwardRef(({className:e,...t},n)=>i.jsx(Rr,{ref:n,className:re("cj-text-lg cj-font-semibold cj-text-foreground",e),...t}));em.displayName=Rr.displayName;const kb=h.forwardRef(({className:e,...t},n)=>i.jsx(Or,{ref:n,className:re("cj-text-sm cj-text-muted-foreground",e),...t}));kb.displayName=Or.displayName;const tm={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: ${tm[e.spacing]};`),e.fontSizeBase!==void 0&&t.push(`font-size: ${e.fontSizeBase}px;`),t}function Pb(e,t){const n=nm(e);return n.length?`${t} { ${n.join(" ")} }`:null}function rm(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"]=tm[e.spacing]),e.fontSizeBase!==void 0&&(t.fontSize=`${e.fontSizeBase}px`)),t}const bc=[{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 Eb(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,f,m)=>(m<0&&(m+=1),m>1&&(m-=1),m<1/6?u+(f-u)*6*m:m<1/2?f:m<2/3?u+(f-u)*(2/3-m)*6:u);let s,c,l;if(r===0)s=c=l=o;else{const u=o<.5?o*(1+r):o+r-o*r,f=2*o-u;s=a(f,u,n+1/3),c=a(f,u,n),l=a(f,u,n-1/3)}const d=u=>Math.round(u*255).toString(16).padStart(2,"0");return`#${d(s)}${d(c)}${d(l)}`}function Mb(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),s=Math.min(n,r,o);let c=0,l=0;const d=(a+s)/2;if(a!==s){const u=a-s;switch(l=d>.5?u/(2-a-s):u/(a+s),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 Zr({label:e,value:t,onChange:n}){const{t:r}=be(),o=Eb(t);return i.jsxs("div",{className:"cj-space-y-1",children:[i.jsx(U,{className:"cj-text-xs",children:e}),i.jsxs("div",{className:"cj-flex cj-gap-2 cj-items-center",children:[i.jsx("input",{type:"color",value:o,onChange:a=>n(Mb(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})}),i.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"})]}),i.jsx("p",{className:"cj-text-[10px] cj-text-muted-foreground",children:r("theme_color_hint")})]})}function Db(){const{t:e}=be(),{theme:t,updateTheme:n,resetTheme:r}=kt(),[o,a]=y.useState(null),s=l=>n(l),c=rm(t);return i.jsxs(wb,{children:[i.jsx(Nb,{asChild:!0,children:i.jsxs(te,{size:"sm",variant:"outline",children:[i.jsx(O_,{className:"cj-h-4 cj-w-4 cj-mr-1"}),e("theme_button")]})}),i.jsx(Qf,{className:"cj-w-[360px] sm:cj-w-[420px] cj-overflow-y-auto",ref:a,children:i.jsxs(na.Provider,{value:o,children:[i.jsx(Zf,{children:i.jsxs(em,{className:"cj-flex cj-items-center cj-justify-between",children:[i.jsx("span",{children:e("theme_button")}),i.jsxs(te,{size:"sm",variant:"ghost",onClick:()=>r(),children:[i.jsx(Al,{className:"cj-h-3 cj-w-3 cj-mr-1"}),e("theme_reset")]})]})}),i.jsxs("div",{className:"cj-space-y-4 cj-mt-4",children:[i.jsxs("section",{className:"cj-space-y-3",children:[i.jsx("h4",{className:"cj-text-xs cj-font-semibold cj-uppercase cj-tracking-wide cj-text-muted-foreground",children:e("theme_colors")}),i.jsx(Zr,{label:e("theme_primary"),value:t.primaryColor,onChange:l=>s({primaryColor:l})}),i.jsx(Zr,{label:e("theme_background"),value:t.backgroundColor,onChange:l=>s({backgroundColor:l})}),i.jsx(Zr,{label:e("theme_card"),value:t.cardColor,onChange:l=>s({cardColor:l})}),i.jsx(Zr,{label:e("theme_foreground"),value:t.foregroundColor,onChange:l=>s({foregroundColor:l})})]}),i.jsxs("section",{className:"cj-space-y-3",children:[i.jsx("h4",{className:"cj-text-xs cj-font-semibold cj-uppercase cj-tracking-wide cj-text-muted-foreground",children:e("theme_typography")}),i.jsxs("div",{className:"cj-space-y-1",children:[i.jsx(U,{className:"cj-text-xs",children:e("theme_heading_font")}),i.jsxs(Oe,{value:t.fontFamilyHeading||void 0,onValueChange:l=>s({fontFamilyHeading:l}),children:[i.jsx(De,{className:"cj-h-9 cj-text-xs",children:i.jsx(Ae,{placeholder:e("theme_font_default")})}),i.jsx(Te,{children:bc.map(l=>i.jsx(q,{value:l.value,children:l.label},l.value))})]})]}),i.jsxs("div",{className:"cj-space-y-1",children:[i.jsx(U,{className:"cj-text-xs",children:e("theme_body_font")}),i.jsxs(Oe,{value:t.fontFamilyBody||void 0,onValueChange:l=>s({fontFamilyBody:l}),children:[i.jsx(De,{className:"cj-h-9 cj-text-xs",children:i.jsx(Ae,{placeholder:e("theme_font_default")})}),i.jsx(Te,{children:bc.map(l=>i.jsx(q,{value:l.value,children:l.label},l.value))})]})]}),i.jsxs("div",{className:"cj-space-y-1",children:[i.jsx(U,{className:"cj-text-xs",children:e("theme_font_size")}),i.jsx(he,{type:"number",min:12,max:24,value:t.fontSizeBase??"",onChange:l=>s({fontSizeBase:l.target.value?Number(l.target.value):void 0}),placeholder:"16",className:"cj-h-9 cj-text-xs"})]})]}),i.jsxs("section",{className:"cj-space-y-3",children:[i.jsx("h4",{className:"cj-text-xs cj-font-semibold cj-uppercase cj-tracking-wide cj-text-muted-foreground",children:e("theme_shape_spacing")}),i.jsxs("div",{className:"cj-space-y-1",children:[i.jsx(U,{className:"cj-text-xs",children:e("theme_border_radius")}),i.jsx(he,{type:"number",step:"0.125",min:0,max:2,value:t.borderRadius??"",onChange:l=>s({borderRadius:l.target.value?Number(l.target.value):void 0}),placeholder:"0.75",className:"cj-h-9 cj-text-xs"})]}),i.jsxs("div",{className:"cj-space-y-1",children:[i.jsx(U,{className:"cj-text-xs",children:e("theme_spacing")}),i.jsxs(Oe,{value:t.spacing||void 0,onValueChange:l=>s({spacing:l}),children:[i.jsx(De,{className:"cj-h-9 cj-text-xs",children:i.jsx(Ae,{placeholder:e("theme_spacing_cozy_default")})}),i.jsxs(Te,{children:[i.jsx(q,{value:"compact",children:e("theme_spacing_compact")}),i.jsx(q,{value:"cozy",children:e("theme_spacing_cozy")}),i.jsx(q,{value:"spacious",children:e("theme_spacing_spacious")})]})]})]})]}),i.jsxs("section",{className:"cj-space-y-2",children:[i.jsx("h4",{className:"cj-text-xs cj-font-semibold cj-uppercase cj-tracking-wide cj-text-muted-foreground",children:e("theme_live_preview")}),i.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:i.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:[i.jsx("h3",{className:"cj-m-0 cj-text-lg cj-font-semibold",style:{fontFamily:"var(--claims-journey-font-heading)"},children:e("theme_heading_sample")}),i.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")}),i.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}),i.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 cs="cj-theme-portal-vars",ls="data-cj-themed-portals";let eo=0;const Tb=["[data-radix-popper-content-wrapper]","[data-radix-popper-content-wrapper] *",'[role="dialog"]','[role="alertdialog"]',"[data-vaul-drawer]","[data-sonner-toaster]"].map(e=>`html[${ls}="true"] ${e}`).join(`,
|
|
279
|
-
`);function
|
|
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 cw(e){const t=bm(e);return t.length?`${iw} {
|
|
280
300
|
${t.join(`
|
|
281
301
|
`)}
|
|
282
|
-
}`:""}function
|
|
302
|
+
}`:""}function Tc(){let e=document.getElementById(_s);return e||(e=document.createElement("style"),e.id=_s,document.head.appendChild(e)),e}function lw(e){v.useEffect(()=>(ao+=1,document.documentElement.setAttribute(gs,"true"),Tc(),()=>{var t;ao=Math.max(0,ao-1),ao===0&&(document.documentElement.removeAttribute(gs),(t=document.getElementById(_s))==null||t.remove())}),[]),v.useEffect(()=>{const t=Tc();t.innerHTML=cw(e)},[e])}function dw({specs:e=[],readOnly:t=!1,onSave:n,onPublish:r,onUnlockEdit:o,onOpenRunner:a}){const{t:i}=we(),{activeTab:c,setActiveTab:l,isDirty:d,undo:u,redo:m,canUndo:f,canRedo:p,formConfig:g,theme:h}=pt(),j=wm(h);return lw(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(L_,{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(K_,{className:"cj-h-4 cj-w-4"})}),s.jsx(te,{size:"icon",variant:"ghost",className:"cj-h-8 cj-w-8",onClick:m,disabled:!p(),title:i("fc_redo"),children:s.jsx(Y_,{className:"cj-h-4 cj-w-4"})}),s.jsx(sw,{})]}),g.steps.length>0&&s.jsx(Jb,{}),a&&g.steps.length>0&&s.jsxs(te,{size:"sm",variant:"outline",onClick:a,children:[s.jsx(R_,{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(V_,{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(W_,{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($_,{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(x_,{value:c,onValueChange:x=>l(x),children:s.jsxs(Il,{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(F_,{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(D_,{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(Gl,{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(O_,{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(Ng,{direction:"horizontal",children:[s.jsx(ka,{defaultSize:22,minSize:18,maxSize:32,children:s.jsx(wy,{readOnly:t})}),s.jsx(tc,{withHandle:!0}),s.jsx(ka,{defaultSize:52,minSize:40,children:s.jsx(Jx,{specs:e,readOnly:t})}),s.jsx(tc,{withHandle:!0}),s.jsx(ka,{defaultSize:26,minSize:22,maxSize:40,children:s.jsx(Zx,{readOnly:t})})]}),c==="fields"&&s.jsx(tb,{specs:e,readOnly:t}),c==="init"&&s.jsx(nb,{readOnly:t}),c==="json"&&s.jsx(Eb,{readOnly:t})]})]})}const uw=v.createContext([]);function fw({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:m}=pt(),f=v.useRef(null),[p,g]=v.useState(null);v.useEffect(()=>{f.current&&g(f.current)},[]),v.useEffect(()=>{t&&l(t)},[]),v.useEffect(()=>{a&&(m.steps.length>0||m.fields.length>0)&&a(d())},[m]);const h=v.useCallback(()=>{const x=d();n==null||n(x),u()},[d,n,u]),j=v.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(sa.Provider,{value:p,children:s.jsx(uw.Provider,{value:e,children:s.jsx(dw,{specs:e,readOnly:c,onSave:!c&&n?h:void 0,onPublish:!c&&r?j:void 0,onUnlockEdit:c?o:void 0,onOpenRunner:i})})})})}function mw(e,t=[]){let n=[];function r(a,i){const c=_.createContext(i);c.displayName=a+"Context";const 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,pw(o,...t)]}function pw(...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}var hw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Nm=hw.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}},{}),ui="Progress",fi=100,[_w]=mw(ui),[gw,jw]=_w(ui),Sm=_.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=yw,...i}=e;(o||o===0)&&!Rc(o)&&console.error(vw(`${o}`,"Progress"));const c=Rc(o)?o:fi;r!==null&&!Oc(r,c)&&console.error(xw(`${r}`,"Progress"));const l=Oc(r,c)?r:null,d=Eo(l)?a(l,c):void 0;return s.jsx(gw,{scope:n,value:l,max:c,children:s.jsx(Nm.div,{"aria-valuemax":c,"aria-valuemin":0,"aria-valuenow":Eo(l)?l:void 0,"aria-valuetext":d,role:"progressbar","data-state":Pm(l,c),"data-value":l??void 0,"data-max":c,...i,ref:t})})});Sm.displayName=ui;var Cm="ProgressIndicator",km=_.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=jw(Cm,n);return s.jsx(Nm.div,{"data-state":Pm(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});km.displayName=Cm;function yw(e,t){return`${Math.round(e/t*100)}%`}function Pm(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Eo(e){return typeof e=="number"}function Rc(e){return Eo(e)&&!isNaN(e)&&e>0}function Oc(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 \`${fi}\`.`}function xw(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
283
303
|
- a positive number
|
|
284
|
-
- less than the value passed to \`max\` (or ${
|
|
304
|
+
- less than the value passed to \`max\` (or ${fi} if no \`max\` prop is set)
|
|
285
305
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
286
306
|
|
|
287
|
-
Defaulting to \`null\`.`}var lm=am,Ub=im;const dm=h.forwardRef(({className:e,value:t,...n},r)=>i.jsx(lm,{ref:r,className:re("cj-relative cj-h-4 cj-w-full cj-overflow-hidden cj-rounded-full cj-bg-secondary",e),...n,children:i.jsx(Ub,{className:"cj-h-full cj-w-full cj-flex-1 cj-bg-primary cj-transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));dm.displayName=lm.displayName;function Gb({label:e,value:t,onChange:n,placeholder:r,helpText:o,multiline:a=!1}){const{t:s}=be();return i.jsxs("div",{className:"cj-space-y-2",children:[i.jsx(U,{className:"cj-text-sm cj-font-medium",children:e}),a?i.jsx(Ir,{value:t,onChange:c=>n(c.target.value),placeholder:r||s("placeholder_text"),className:"cj-min-h-[100px]"}):i.jsx(he,{type:"text",value:t,onChange:c=>n(c.target.value),placeholder:r||s("placeholder_text")}),o&&i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:o})]})}var oi="Radio",[Xb,um]=ft(oi),[Kb,Jb]=Xb(oi),fm=h.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:s,value:c="on",onCheck:l,form:d,...u}=e,[f,m]=h.useState(null),p=ve(t,j=>m(j)),g=h.useRef(!1),_=f?d||!!f.closest("form"):!0;return i.jsxs(Kb,{scope:n,checked:o,disabled:s,children:[i.jsx(de.button,{type:"button",role:"radio","aria-checked":o,"data-state":_m(o),"data-disabled":s?"":void 0,disabled:s,value:c,...u,ref:p,onClick:oe(e.onClick,j=>{o||l==null||l(),_&&(g.current=j.isPropagationStopped(),g.current||j.stopPropagation())})}),_&&i.jsx(hm,{control:f,bubbles:!g.current,name:r,value:c,checked:o,required:a,disabled:s,form:d,style:{transform:"translateX(-100%)"}})]})});fm.displayName=oi;var mm="RadioIndicator",pm=h.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=Jb(mm,n);return i.jsx(mt,{present:r||a.checked,children:i.jsx(de.span,{"data-state":_m(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});pm.displayName=mm;var Qb="RadioBubbleInput",hm=h.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const s=h.useRef(null),c=ve(s,a),l=Us(n),d=Hs(t);return h.useEffect(()=>{const u=s.current;if(!u)return;const f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&p){const g=new Event("click",{bubbles:r});p.call(u,n),u.dispatchEvent(g)}},[l,n,r]),i.jsx(de.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}})});hm.displayName=Qb;function _m(e){return e?"checked":"unchecked"}var Zb=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ia="RadioGroup",[ew]=ft(ia,[To,um]),gm=To(),jm=um(),[tw,nw]=ew(ia),ym=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:s=!1,disabled:c=!1,orientation:l,dir:d,loop:u=!0,onValueChange:f,...m}=e,p=gm(n),g=Er(d),[_,j]=Ut({prop:a,defaultProp:o??null,onChange:f,caller:ia});return i.jsx(tw,{scope:n,name:r,required:s,disabled:c,value:_,onValueChange:j,children:i.jsx(ml,{asChild:!0,...p,orientation:l,dir:g,loop:u,children:i.jsx(de.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":c?"":void 0,dir:g,...m,ref:t})})})});ym.displayName=ia;var vm="RadioGroupItem",xm=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=nw(vm,n),s=a.disabled||r,c=gm(n),l=jm(n),d=h.useRef(null),u=ve(t,d),f=a.value===o.value,m=h.useRef(!1);return h.useEffect(()=>{const p=_=>{Zb.includes(_.key)&&(m.current=!0)},g=()=>m.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",g)}},[]),i.jsx(pl,{asChild:!0,...c,focusable:!s,active:f,children:i.jsx(fm,{disabled:s,required:a.required,checked:f,...l,...o,name:a.name,ref:u,onCheck:()=>a.onValueChange(o.value),onKeyDown:oe(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:oe(o.onFocus,()=>{var p;m.current&&((p=d.current)==null||p.click())})})})});xm.displayName=vm;var rw="RadioGroupIndicator",bm=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=jm(n);return i.jsx(pm,{...o,...r,ref:t})});bm.displayName=rw;var wm=ym,Nm=xm,ow=bm;const Sm=h.forwardRef(({className:e,...t},n)=>i.jsx(wm,{className:re("cj-gap-2",e),...t,ref:n}));Sm.displayName=wm.displayName;const Cm=h.forwardRef(({className:e,...t},n)=>i.jsx(Nm,{ref:n,className:re("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:i.jsx(ow,{className:"cj-flex cj-items-center cj-justify-center",children:i.jsx(v_,{className:"cj-h-3 cj-w-3 cj-fill-current cj-text-current"})})}));Cm.displayName=Nm.displayName;function aw({label:e,value:t,onChange:n,options:r,helpText:o,variant:a="auto"}){const{t:s}=be(),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 i.jsxs("div",{className:"cj-space-y-2",children:[i.jsx(U,{className:"cj-text-sm cj-font-medium",children:e}),(c==="radio"||c==="radio-horizontal")&&i.jsx(Sm,{value:t,onValueChange:n,className:c==="radio-horizontal"?"cj-grid cj-gap-2":"cj-space-y-1",style:l,children:r.map(d=>i.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:[i.jsx(Cm,{value:d.data,id:d.data}),i.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"&&i.jsxs(Oe,{value:t,onValueChange:n,children:[i.jsx(De,{className:"cj-w-full cj-h-12",children:i.jsx(Ae,{placeholder:s("placeholder_select")})}),i.jsx(Te,{className:"cj-bg-popover cj-z-50",children:r.map(d=>i.jsx(q,{value:d.data,className:"cj-py-3",children:d.label},d.data))})]}),c==="segmented"&&i.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 i.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&&i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:o})]})}function Ge(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 Be(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function km(e,t){const n=Ge(e);return isNaN(t)?Be(e,NaN):(t&&n.setDate(n.getDate()+t),n)}const Pm=6048e5,sw=864e5,iw=6e4,cw=36e5,lw=1e3;let dw={};function sr(){return dw}function mn(e,t){var c,l,d,u;const n=sr(),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=Ge(e),a=o.getDay(),s=(a<r?7:0)+a-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function Zn(e){return mn(e,{weekStartsOn:1})}function Em(e){const t=Ge(e),n=t.getFullYear(),r=Be(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=Zn(r),a=Be(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const s=Zn(a);return t.getTime()>=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function Cc(e){const t=Ge(e);return t.setHours(0,0,0,0),t}function So(e){const t=Ge(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 uw(e,t){const n=Cc(e),r=Cc(t),o=+n-So(n),a=+r-So(r);return Math.round((o-a)/sw)}function fw(e){const t=Em(e),n=Be(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Zn(n)}function mw(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ai(e){if(!mw(e)&&typeof e!="number")return!1;const t=Ge(e);return!isNaN(Number(t))}function pw(e){const t=Ge(e),n=Be(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const hw={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"}},_w=(e,t,n)=>{let r;const o=hw[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 Vt(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const gw={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},jw={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},yw={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},vw={date:Vt({formats:gw,defaultWidth:"full"}),time:Vt({formats:jw,defaultWidth:"full"}),dateTime:Vt({formats:yw,defaultWidth:"full"})},xw={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},bw=(e,t,n,r)=>xw[e];function nt(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,c=n!=null&&n.width?String(n.width):s;o=e.formattingValues[c]||e.formattingValues[s]}else{const s=e.defaultWidth,c=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[c]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const ww={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Nw={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Sw={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"]},Cw={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"]},kw={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"}},Pw={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"}},Ew=(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"},Mw={ordinalNumber:Ew,era:nt({values:ww,defaultWidth:"wide"}),quarter:nt({values:Nw,defaultWidth:"wide",argumentCallback:e=>e-1}),month:nt({values:Sw,defaultWidth:"wide"}),day:nt({values:Cw,defaultWidth:"wide"}),dayPeriod:nt({values:kw,defaultWidth:"wide",formattingValues:Pw,defaultFormattingWidth:"wide"})};function rt(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 s=a[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(c)?Tw(c,f=>f.test(s)):Dw(c,f=>f.test(s));let d;d=e.valueCallback?e.valueCallback(l):l,d=n.valueCallback?n.valueCallback(d):d;const u=t.slice(s.length);return{value:d,rest:u}}}function Dw(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Tw(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function si(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 s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const c=t.slice(o.length);return{value:s,rest:c}}}const Rw=/^(\d+)(th|st|nd|rd)?/i,Ow=/\d+/i,Aw={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},zw={any:[/^b/i,/^(a|c)/i]},Iw={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ww={any:[/1/i,/2/i,/3/i,/4/i]},Fw={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},$w={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]},Lw={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},Bw={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]},Hw={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},qw={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}},Yw={ordinalNumber:si({matchPattern:Rw,parsePattern:Ow,valueCallback:e=>parseInt(e,10)}),era:rt({matchPatterns:Aw,defaultMatchWidth:"wide",parsePatterns:zw,defaultParseWidth:"any"}),quarter:rt({matchPatterns:Iw,defaultMatchWidth:"wide",parsePatterns:Ww,defaultParseWidth:"any",valueCallback:e=>e+1}),month:rt({matchPatterns:Fw,defaultMatchWidth:"wide",parsePatterns:$w,defaultParseWidth:"any"}),day:rt({matchPatterns:Lw,defaultMatchWidth:"wide",parsePatterns:Bw,defaultParseWidth:"any"}),dayPeriod:rt({matchPatterns:Hw,defaultMatchWidth:"any",parsePatterns:qw,defaultParseWidth:"any"})},ca={code:"en-US",formatDistance:_w,formatLong:vw,formatRelative:bw,localize:Mw,match:Yw,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Vw(e){const t=Ge(e);return uw(t,pw(t))+1}function Mm(e){const t=Ge(e),n=+Zn(t)-+fw(t);return Math.round(n/Pm)+1}function ii(e,t){var u,f,m,p;const n=Ge(e),r=n.getFullYear(),o=sr(),a=(t==null?void 0:t.firstWeekContainsDate)??((f=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??o.firstWeekContainsDate??((p=(m=o.locale)==null?void 0:m.options)==null?void 0:p.firstWeekContainsDate)??1,s=Be(e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const c=mn(s,t),l=Be(e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const d=mn(l,t);return n.getTime()>=c.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function Uw(e,t){var c,l,d,u;const n=sr(),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=ii(e,t),a=Be(e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),mn(a,t)}function Dm(e,t){const n=Ge(e),r=+mn(n,t)-+Uw(n,t);return Math.round(r/Pm)+1}function ke(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const an={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ke(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ke(n+1,2)},d(e,t){return ke(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 ke(e.getHours()%12||12,t.length)},H(e,t){return ke(e.getHours(),t.length)},m(e,t){return ke(e.getMinutes(),t.length)},s(e,t){return ke(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return ke(o,t.length)}},Fn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},kc={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 an.y(e,t)},Y:function(e,t,n,r){const o=ii(e,r),a=o>0?o:1-o;if(t==="YY"){const s=a%100;return ke(s,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):ke(a,t.length)},R:function(e,t){const n=Em(e);return ke(n,t.length)},u:function(e,t){const n=e.getFullYear();return ke(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 ke(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 ke(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 an.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 ke(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=Dm(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ke(o,t.length)},I:function(e,t,n){const r=Mm(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ke(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):an.d(e,t)},D:function(e,t,n){const r=Vw(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ke(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 ke(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 ke(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 ke(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=Fn.noon:r===0?o=Fn.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=Fn.evening:r>=12?o=Fn.afternoon:r>=4?o=Fn.morning:o=Fn.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 an.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):an.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ke(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ke(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):an.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):an.s(e,t)},S:function(e,t){return an.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Ec(r);case"XXXX":case"XX":return xn(r);case"XXXXX":case"XXX":default:return xn(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Ec(r);case"xxxx":case"xx":return xn(r);case"xxxxx":case"xxx":default:return xn(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Pc(r,":");case"OOOO":default:return"GMT"+xn(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Pc(r,":");case"zzzz":default:return"GMT"+xn(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return ke(r,t.length)},T:function(e,t,n){const r=e.getTime();return ke(r,t.length)}};function Pc(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+ke(a,2)}function Ec(e,t){return e%60===0?(e>0?"-":"+")+ke(Math.abs(e)/60,2):xn(e,t)}function xn(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ke(Math.trunc(r/60),2),a=ke(r%60,2);return n+o+t+a}const Mc=(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"})}},Tm=(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"})}},Gw=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Mc(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}}",Mc(r,t)).replace("{{time}}",Tm(o,t))},ds={p:Tm,P:Gw},Xw=/^D+$/,Kw=/^Y+$/,Jw=["D","DD","YY","YYYY"];function Rm(e){return Xw.test(e)}function Om(e){return Kw.test(e)}function us(e,t,n){const r=Qw(e,t,n);if(console.warn(r),Jw.includes(e))throw new RangeError(r)}function Qw(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 Zw=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,e0=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,t0=/^'([^]*?)'?$/,n0=/''/g,r0=/[a-zA-Z]/;function Co(e,t,n){var u,f,m,p;const r=sr(),o=r.locale??ca,a=r.firstWeekContainsDate??((f=(u=r.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,s=r.weekStartsOn??((p=(m=r.locale)==null?void 0:m.options)==null?void 0:p.weekStartsOn)??0,c=Ge(e);if(!ai(c))throw new RangeError("Invalid time value");let l=t.match(e0).map(g=>{const _=g[0];if(_==="p"||_==="P"){const j=ds[_];return j(g,o.formatLong)}return g}).join("").match(Zw).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const _=g[0];if(_==="'")return{isToken:!1,value:o0(g)};if(kc[_])return{isToken:!0,value:g};if(_.match(r0))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_+"`");return{isToken:!1,value:g}});o.localize.preprocessor&&(l=o.localize.preprocessor(c,l));const d={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return l.map(g=>{if(!g.isToken)return g.value;const _=g.value;(Om(_)||Rm(_))&&us(_,t,String(e));const j=kc[_[0]];return j(c,_,o.localize,d)}).join("")}function o0(e){const t=e.match(t0);return t?t[1].replace(n0,"'"):e}function a0(){return Object.assign({},sr())}function s0(e){let n=Ge(e).getDay();return n===0&&(n=7),n}function i0(e,t){const n=t instanceof Date?Be(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 c0=10;class Am{constructor(){V(this,"subPriority",0)}validate(t,n){return!0}}class l0 extends Am{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 d0 extends Am{constructor(){super(...arguments);V(this,"priority",c0);V(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:Be(n,i0(n,Date))}}class Ne{run(t,n,r,o){const a=this.parse(t,n,r,o);return a?{setter:new l0(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(t,n,r){return!0}}class u0 extends Ne{constructor(){super(...arguments);V(this,"priority",140);V(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}/},Dt={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 $e(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Tt(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,s=n[5]?parseInt(n[5],10):0;return{value:r*(o*cw+a*iw+s*lw),rest:t.slice(n[0].length)}}function zm(e){return $e(Ye.anyDigitsSigned,e)}function He(e,t){switch(e){case 1:return $e(Ye.singleDigit,t);case 2:return $e(Ye.twoDigits,t);case 3:return $e(Ye.threeDigits,t);case 4:return $e(Ye.fourDigits,t);default:return $e(new RegExp("^\\d{1,"+e+"}"),t)}}function ko(e,t){switch(e){case 1:return $e(Ye.singleDigitSigned,t);case 2:return $e(Ye.twoDigitsSigned,t);case 3:return $e(Ye.threeDigitsSigned,t);case 4:return $e(Ye.fourDigitsSigned,t);default:return $e(new RegExp("^-?\\d{1,"+e+"}"),t)}}function ci(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 Im(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const a=r+50,s=Math.trunc(a/100)*100,c=e>=a%100;o=e+s-(c?100:0)}return n?o:1-o}function Wm(e){return e%400===0||e%4===0&&e%100!==0}class f0 extends Ne{constructor(){super(...arguments);V(this,"priority",130);V(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const a=s=>({year:s,isTwoDigitYear:r==="yy"});switch(r){case"y":return Ve(He(4,n),a);case"yo":return Ve(o.ordinalNumber(n,{unit:"year"}),a);default:return Ve(He(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=Im(o.year,a);return n.setFullYear(c,0,1),n.setHours(0,0,0,0),n}const s=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(s,0,1),n.setHours(0,0,0,0),n}}class m0 extends Ne{constructor(){super(...arguments);V(this,"priority",130);V(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const a=s=>({year:s,isTwoDigitYear:r==="YY"});switch(r){case"Y":return Ve(He(4,n),a);case"Yo":return Ve(o.ordinalNumber(n,{unit:"year"}),a);default:return Ve(He(r.length,n),a)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,a){const s=ii(n,a);if(o.isTwoDigitYear){const l=Im(o.year,s);return n.setFullYear(l,0,a.firstWeekContainsDate),n.setHours(0,0,0,0),mn(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),mn(n,a)}}class p0 extends Ne{constructor(){super(...arguments);V(this,"priority",130);V(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return ko(r==="R"?4:r.length,n)}set(n,r,o){const a=Be(n,0);return a.setFullYear(o,0,4),a.setHours(0,0,0,0),Zn(a)}}class h0 extends Ne{constructor(){super(...arguments);V(this,"priority",130);V(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return ko(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class _0 extends Ne{constructor(){super(...arguments);V(this,"priority",120);V(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 He(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 g0 extends Ne{constructor(){super(...arguments);V(this,"priority",120);V(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 He(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 j0 extends Ne{constructor(){super(...arguments);V(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);V(this,"priority",110)}parse(n,r,o){const a=s=>s-1;switch(r){case"M":return Ve($e(Ye.month,n),a);case"MM":return Ve(He(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 y0 extends Ne{constructor(){super(...arguments);V(this,"priority",110);V(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const a=s=>s-1;switch(r){case"L":return Ve($e(Ye.month,n),a);case"LL":return Ve(He(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 v0(e,t,n){const r=Ge(e),o=Dm(r,n)-t;return r.setDate(r.getDate()-o*7),r}class x0 extends Ne{constructor(){super(...arguments);V(this,"priority",100);V(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return $e(Ye.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return He(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,a){return mn(v0(n,o,a),a)}}function b0(e,t){const n=Ge(e),r=Mm(n)-t;return n.setDate(n.getDate()-r*7),n}class w0 extends Ne{constructor(){super(...arguments);V(this,"priority",100);V(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 $e(Ye.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return He(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return Zn(b0(n,o))}}const N0=[31,28,31,30,31,30,31,31,30,31,30,31],S0=[31,29,31,30,31,30,31,31,30,31,30,31];class C0 extends Ne{constructor(){super(...arguments);V(this,"priority",90);V(this,"subPriority",1);V(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return $e(Ye.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return He(r.length,n)}}validate(n,r){const o=n.getFullYear(),a=Wm(o),s=n.getMonth();return a?r>=1&&r<=S0[s]:r>=1&&r<=N0[s]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class k0 extends Ne{constructor(){super(...arguments);V(this,"priority",90);V(this,"subpriority",1);V(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 $e(Ye.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return He(r.length,n)}}validate(n,r){const o=n.getFullYear();return Wm(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 li(e,t,n){var f,m,p,g;const r=sr(),o=(n==null?void 0:n.weekStartsOn)??((m=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:m.weekStartsOn)??r.weekStartsOn??((g=(p=r.locale)==null?void 0:p.options)==null?void 0:g.weekStartsOn)??0,a=Ge(e),s=a.getDay(),l=(t%7+7)%7,d=7-o,u=t<0||t>6?t-(s+d)%7:(l+d)%7-(s+d)%7;return km(a,u)}class P0 extends Ne{constructor(){super(...arguments);V(this,"priority",90);V(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=li(n,o,a),n.setHours(0,0,0,0),n}}class E0 extends Ne{constructor(){super(...arguments);V(this,"priority",90);V(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,a){const s=c=>{const l=Math.floor((c-1)/7)*7;return(c+a.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return Ve(He(r.length,n),s);case"eo":return Ve(o.ordinalNumber(n,{unit:"day"}),s);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=li(n,o,a),n.setHours(0,0,0,0),n}}class M0 extends Ne{constructor(){super(...arguments);V(this,"priority",90);V(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,a){const s=c=>{const l=Math.floor((c-1)/7)*7;return(c+a.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return Ve(He(r.length,n),s);case"co":return Ve(o.ordinalNumber(n,{unit:"day"}),s);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=li(n,o,a),n.setHours(0,0,0,0),n}}function D0(e,t){const n=Ge(e),r=s0(n),o=t-r;return km(n,o)}class T0 extends Ne{constructor(){super(...arguments);V(this,"priority",90);V(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const a=s=>s===0?7:s;switch(r){case"i":case"ii":return He(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=D0(n,o),n.setHours(0,0,0,0),n}}class R0 extends Ne{constructor(){super(...arguments);V(this,"priority",80);V(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(ci(o),0,0,0),n}}class O0 extends Ne{constructor(){super(...arguments);V(this,"priority",80);V(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(ci(o),0,0,0),n}}class A0 extends Ne{constructor(){super(...arguments);V(this,"priority",80);V(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(ci(o),0,0,0),n}}class z0 extends Ne{constructor(){super(...arguments);V(this,"priority",70);V(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return $e(Ye.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return He(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 I0 extends Ne{constructor(){super(...arguments);V(this,"priority",70);V(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return $e(Ye.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return He(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class W0 extends Ne{constructor(){super(...arguments);V(this,"priority",70);V(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return $e(Ye.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return He(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 F0 extends Ne{constructor(){super(...arguments);V(this,"priority",70);V(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return $e(Ye.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return He(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 $0 extends Ne{constructor(){super(...arguments);V(this,"priority",60);V(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return $e(Ye.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return He(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class L0 extends Ne{constructor(){super(...arguments);V(this,"priority",50);V(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return $e(Ye.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return He(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class B0 extends Ne{constructor(){super(...arguments);V(this,"priority",30);V(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=a=>Math.trunc(a*Math.pow(10,-r.length+3));return Ve(He(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class H0 extends Ne{constructor(){super(...arguments);V(this,"priority",10);V(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return Tt(Dt.basicOptionalMinutes,n);case"XX":return Tt(Dt.basic,n);case"XXXX":return Tt(Dt.basicOptionalSeconds,n);case"XXXXX":return Tt(Dt.extendedOptionalSeconds,n);case"XXX":default:return Tt(Dt.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Be(n,n.getTime()-So(n)-o)}}class q0 extends Ne{constructor(){super(...arguments);V(this,"priority",10);V(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return Tt(Dt.basicOptionalMinutes,n);case"xx":return Tt(Dt.basic,n);case"xxxx":return Tt(Dt.basicOptionalSeconds,n);case"xxxxx":return Tt(Dt.extendedOptionalSeconds,n);case"xxx":default:return Tt(Dt.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Be(n,n.getTime()-So(n)-o)}}class Y0 extends Ne{constructor(){super(...arguments);V(this,"priority",40);V(this,"incompatibleTokens","*")}parse(n){return zm(n)}set(n,r,o){return[Be(n,o*1e3),{timestampIsSet:!0}]}}class V0 extends Ne{constructor(){super(...arguments);V(this,"priority",20);V(this,"incompatibleTokens","*")}parse(n){return zm(n)}set(n,r,o){return[Be(n,o),{timestampIsSet:!0}]}}const U0={G:new u0,y:new f0,Y:new m0,R:new p0,u:new h0,Q:new _0,q:new g0,M:new j0,L:new y0,w:new x0,I:new w0,d:new C0,D:new k0,E:new P0,e:new E0,c:new M0,i:new T0,a:new R0,b:new O0,B:new A0,h:new z0,H:new I0,K:new W0,k:new F0,m:new $0,s:new L0,S:new B0,X:new H0,x:new q0,t:new Y0,T:new V0},G0=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,X0=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,K0=/^'([^]*?)'?$/,J0=/''/g,Q0=/\S/,Z0=/[a-zA-Z]/;function Fm(e,t,n,r){var _,j,b,x;const o=a0(),a=o.locale??ca,s=o.firstWeekContainsDate??((j=(_=o.locale)==null?void 0:_.options)==null?void 0:j.firstWeekContainsDate)??1,c=o.weekStartsOn??((x=(b=o.locale)==null?void 0:b.options)==null?void 0:x.weekStartsOn)??0;if(t==="")return e===""?Ge(n):Be(n,NaN);const l={firstWeekContainsDate:s,weekStartsOn:c,locale:a},d=[new d0],u=t.match(X0).map(w=>{const N=w[0];if(N in ds){const S=ds[N];return S(w,a.formatLong)}return w}).join("").match(G0),f=[];for(let w of u){Om(w)&&us(w,t,e),Rm(w)&&us(w,t,e);const N=w[0],S=U0[N];if(S){const{incompatibleTokens:v}=S;if(Array.isArray(v)){const P=f.find(k=>v.includes(k.token)||k.token===N);if(P)throw new RangeError(`The format string mustn't contain \`${P.fullToken}\` and \`${w}\` at the same time`)}else if(S.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${w}\` and any other token at the same time`);f.push({token:N,fullToken:w});const C=S.run(e,w,a.match,l);if(!C)return Be(n,NaN);d.push(C.setter),e=C.rest}else{if(N.match(Z0))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 Be(n,NaN)}}if(e.length>0&&Q0.test(e))return Be(n,NaN);const m=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=Ge(n);if(isNaN(p.getTime()))return Be(n,NaN);const g={};for(const w of m){if(!w.validate(p,l))return Be(n,NaN);const N=w.set(p,g,l);Array.isArray(N)?(p=N[0],Object.assign(g,N[1])):p=N}return Be(n,p)}function e1(e){return e.match(K0)[1].replace(J0,"'")}const t1={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"}},n1=(e,t,n)=>{let r;const o=t1[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"},o1={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},a1={full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},s1={date:Vt({formats:r1,defaultWidth:"full"}),time:Vt({formats:o1,defaultWidth:"full"}),dateTime:Vt({formats:a1,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"},c1={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"},l1=(e,t,n,r)=>t.getHours()!==1?c1[e]:i1[e],d1={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","despuรฉs de cristo"]},u1={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1ยบ trimestre","2ยบ trimestre","3ยบ trimestre","4ยบ trimestre"]},f1={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"]},m1={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"]},p1={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"}},h1={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"}},_1=(e,t)=>Number(e)+"ยบ",g1={ordinalNumber:_1,era:nt({values:d1,defaultWidth:"wide"}),quarter:nt({values:u1,defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:nt({values:f1,defaultWidth:"wide"}),day:nt({values:m1,defaultWidth:"wide"}),dayPeriod:nt({values:p1,defaultWidth:"wide",formattingValues:h1,defaultFormattingWidth:"wide"})},j1=/^(\d+)(ยบ)?/i,y1=/\d+/i,v1={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},x1={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]},b1={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](ยบ)? trimestre/i},w1={any:[/1/i,/2/i,/3/i,/4/i]},N1={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},S1={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]},C1={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},k1={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]},P1={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},E1={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}},M1={ordinalNumber:si({matchPattern:j1,parsePattern:y1,valueCallback:function(e){return parseInt(e,10)}}),era:rt({matchPatterns:v1,defaultMatchWidth:"wide",parsePatterns:x1,defaultParseWidth:"any"}),quarter:rt({matchPatterns:b1,defaultMatchWidth:"wide",parsePatterns:w1,defaultParseWidth:"any",valueCallback:e=>e+1}),month:rt({matchPatterns:N1,defaultMatchWidth:"wide",parsePatterns:S1,defaultParseWidth:"any"}),day:rt({matchPatterns:C1,defaultMatchWidth:"wide",parsePatterns:k1,defaultParseWidth:"any"}),dayPeriod:rt({matchPatterns:P1,defaultMatchWidth:"any",parsePatterns:E1,defaultParseWidth:"any"})},$m={code:"es",formatDistance:n1,formatLong:s1,formatRelative:l1,localize:g1,match:M1,options:{weekStartsOn:1,firstWeekContainsDate:1}},D1={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"}},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}}",String(t)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"daqui a "+r:"hรก "+r:r},R1={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d 'de' MMM 'de' y",short:"dd/MM/y"},O1={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},A1={full:"{{date}} 'ร s' {{time}}",long:"{{date}} 'ร s' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},z1={date:Vt({formats:R1,defaultWidth:"full"}),time:Vt({formats:O1,defaultWidth:"full"}),dateTime:Vt({formats:A1,defaultWidth:"full"})},I1={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"},W1=(e,t,n,r)=>{const o=I1[e];return typeof o=="function"?o(t):o},F1={narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["antes de Cristo","depois de Cristo"]},$1={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1ยบ trimestre","2ยบ trimestre","3ยบ trimestre","4ยบ trimestre"]},L1={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"]},B1={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"]},H1={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"}},q1={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"}},Y1=(e,t)=>Number(e)+"ยบ",V1={ordinalNumber:Y1,era:nt({values:F1,defaultWidth:"wide"}),quarter:nt({values:$1,defaultWidth:"wide",argumentCallback:e=>e-1}),month:nt({values:L1,defaultWidth:"wide"}),day:nt({values:B1,defaultWidth:"wide"}),dayPeriod:nt({values:H1,defaultWidth:"wide",formattingValues:q1,defaultFormattingWidth:"wide"})},U1=/^(\d+)(ยบ|ยช)?/i,G1=/\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 da era comum|depois de cristo|era comum)/i},K1={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes da era comum)/i,/^(depois de cristo|era comum)/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:/^[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]},tN={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},nN={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},oN={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}},aN={ordinalNumber:si({matchPattern:U1,parsePattern:G1,valueCallback:e=>parseInt(e,10)}),era:rt({matchPatterns:X1,defaultMatchWidth:"wide",parsePatterns:K1,defaultParseWidth:"any"}),quarter:rt({matchPatterns:J1,defaultMatchWidth:"wide",parsePatterns:Q1,defaultParseWidth:"any",valueCallback:e=>e+1}),month:rt({matchPatterns:Z1,defaultMatchWidth:"wide",parsePatterns:eN,defaultParseWidth:"any"}),day:rt({matchPatterns:tN,defaultMatchWidth:"wide",parsePatterns:nN,defaultParseWidth:"any"}),dayPeriod:rt({matchPatterns:rN,defaultMatchWidth:"any",parsePatterns:oN,defaultParseWidth:"any"})},Lm={code:"pt",formatDistance:T1,formatLong:z1,formatRelative:W1,localize:V1,match:aN,options:{weekStartsOn:1,firstWeekContainsDate:4}};function sN(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 za={},yr={};function Sn(e,t){try{const r=(za[e]||(za[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return r in yr?yr[r]:Dc(r,r.split(":"))}catch{if(e in yr)return yr[e];const n=e==null?void 0:e.match(iN);return n?Dc(e,n.slice(1)):NaN}}const iN=/([+-]\d\d):?(\d\d)?/;function Dc(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return yr[e]=n*60+r>0?n*60+r+o:n*60-r-o}class Ot extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Sn(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)),Bm(this),fs(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new Ot(...n,t):new Ot(Date.now(),t)}withTimeZone(t){return new Ot(+this,t)}getTimezoneOffset(){const t=-Sn(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),fs(this),+this}[Symbol.for("constructDateFrom")](t){return new Ot(+new Date(t),this.timeZone)}}const Tc=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Tc.test(e))return;const t=e.replace(Tc,"$1UTC");Ot.prototype[t]&&(e.startsWith("get")?Ot.prototype[e]=function(){return this.internal[t]()}:(Ot.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),cN(this),+this},Ot.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),fs(this),+this}))});function fs(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-Sn(e.timeZone,e)*60))}function cN(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()),Bm(e)}function Bm(e){const t=Sn(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(),s=o-a,c=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();s&&c&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+s);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,f=Math.round(-(Sn(e.timeZone,e)*60))%60;(f||u)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+f),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+f+u));const m=Sn(e.timeZone,e),p=m>0?Math.floor(m):Math.ceil(m),_=-new Date(+e).getTimezoneOffset()-p,j=p!==n,b=_-l;if(j&&b){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+b);const x=Sn(e.timeZone,e),w=x>0?Math.floor(x):Math.ceil(x),N=p-w;N&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+N),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+N))}}class Qe extends Ot{static tz(t,...n){return n.length?new Qe(...n,t):new Qe(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} (${sN(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 Qe(+this,t)}[Symbol.for("constructDateFrom")](t){return new Qe(+new Date(t),this.timeZone)}}const Hm=6048e5,lN=864e5,Rc=Symbol.for("constructDateFrom");function Ue(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Rc in e?e[Rc](t):e instanceof Date?new e.constructor(t):new Date(t)}function Me(e,t){return Ue(t||e,e)}function qm(e,t,n){const r=Me(e,n==null?void 0:n.in);return isNaN(t)?Ue(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Ym(e,t,n){const r=Me(e,n==null?void 0:n.in);if(isNaN(t))return Ue(e,NaN);if(!t)return r;const o=r.getDate(),a=Ue(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const s=a.getDate();return o>=s?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let dN={};function Wr(){return dN}function er(e,t){var c,l,d,u;const n=Wr(),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(),s=(a<r?7:0)+a-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function kr(e,t){return er(e,{...t,weekStartsOn:1})}function Vm(e,t){const n=Me(e,t==null?void 0:t.in),r=n.getFullYear(),o=Ue(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=kr(o),s=Ue(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const c=kr(s);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function Oc(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 ir(e,...t){const n=Ue.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Pr(e,t){const n=Me(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function di(e,t,n){const[r,o]=ir(n==null?void 0:n.in,e,t),a=Pr(r),s=Pr(o),c=+a-Oc(a),l=+s-Oc(s);return Math.round((c-l)/lN)}function uN(e,t){const n=Vm(e,t),r=Ue(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),kr(r)}function fN(e,t,n){return qm(e,t*7,n)}function mN(e,t,n){return Ym(e,t*12,n)}function pN(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Ue.bind(null,o));const a=Me(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),Ue(r,n||NaN)}function hN(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Ue.bind(null,o));const a=Me(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),Ue(r,n||NaN)}function _N(e,t,n){const[r,o]=ir(n==null?void 0:n.in,e,t);return+Pr(r)==+Pr(o)}function Um(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function gN(e){return!(!Um(e)&&typeof e!="number"||isNaN(+Me(e)))}function Gm(e,t,n){const[r,o]=ir(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),s=r.getMonth()-o.getMonth();return a*12+s}function jN(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 Xm(e,t){const[n,r]=ir(e,t.start,t.end);return{start:n,end:r}}function yN(e,t){const{start:n,end:r}=Xm(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0),s.setDate(1);let c=1;const l=[];for(;+s<=a;)l.push(Ue(n,s)),s.setMonth(s.getMonth()+c);return o?l.reverse():l}function vN(e,t){const n=Me(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function xN(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 Km(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 bN(e,t){const{start:n,end:r}=Xm(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0),s.setMonth(0,1);let c=1;const l=[];for(;+s<=a;)l.push(Ue(n,s)),s.setFullYear(s.getFullYear()+c);return o?l.reverse():l}function Jm(e,t){var c,l,d,u;const n=Wr(),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(),s=(a<r?-7:0)+6-(a-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}function wN(e,t){return Jm(e,{...t,weekStartsOn:1})}const NN={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"}},SN=(e,t,n)=>{let r;const o=NN[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 Ia(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const CN={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},kN={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},PN={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},EN={date:Ia({formats:CN,defaultWidth:"full"}),time:Ia({formats:kN,defaultWidth:"full"}),dateTime:Ia({formats:PN,defaultWidth:"full"})},MN={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},DN=(e,t,n,r)=>MN[e];function fr(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,c=n!=null&&n.width?String(n.width):s;o=e.formattingValues[c]||e.formattingValues[s]}else{const s=e.defaultWidth,c=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[c]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const TN={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},RN={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ON={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"]},AN={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"]},zN={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"}},IN={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"}},WN=(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"},FN={ordinalNumber:WN,era:fr({values:TN,defaultWidth:"wide"}),quarter:fr({values:RN,defaultWidth:"wide",argumentCallback:e=>e-1}),month:fr({values:ON,defaultWidth:"wide"}),day:fr({values:AN,defaultWidth:"wide"}),dayPeriod:fr({values:zN,defaultWidth:"wide",formattingValues:IN,defaultFormattingWidth:"wide"})};function mr(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 s=a[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(c)?LN(c,f=>f.test(s)):$N(c,f=>f.test(s));let d;d=e.valueCallback?e.valueCallback(l):l,d=n.valueCallback?n.valueCallback(d):d;const u=t.slice(s.length);return{value:d,rest:u}}}function $N(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function LN(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function BN(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 s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const c=t.slice(o.length);return{value:s,rest:c}}}const HN=/^(\d+)(th|st|nd|rd)?/i,qN=/\d+/i,YN={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},VN={any:[/^b/i,/^(a|c)/i]},UN={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},GN={any:[/1/i,/2/i,/3/i,/4/i]},XN={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},KN={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]},JN={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},QN={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]},ZN={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}},tS={ordinalNumber:BN({matchPattern:HN,parsePattern:qN,valueCallback:e=>parseInt(e,10)}),era:mr({matchPatterns:YN,defaultMatchWidth:"wide",parsePatterns:VN,defaultParseWidth:"any"}),quarter:mr({matchPatterns:UN,defaultMatchWidth:"wide",parsePatterns:GN,defaultParseWidth:"any",valueCallback:e=>e+1}),month:mr({matchPatterns:XN,defaultMatchWidth:"wide",parsePatterns:KN,defaultParseWidth:"any"}),day:mr({matchPatterns:JN,defaultMatchWidth:"wide",parsePatterns:QN,defaultParseWidth:"any"}),dayPeriod:mr({matchPatterns:ZN,defaultMatchWidth:"any",parsePatterns:eS,defaultParseWidth:"any"})},Hn={code:"en-US",formatDistance:SN,formatLong:EN,formatRelative:DN,localize:FN,match:tS,options:{weekStartsOn:0,firstWeekContainsDate:1}};function nS(e,t){const n=Me(e,t==null?void 0:t.in);return di(n,Km(n))+1}function ui(e,t){const n=Me(e,t==null?void 0:t.in),r=+kr(n)-+uN(n);return Math.round(r/Hm)+1}function Qm(e,t){var u,f,m,p;const n=Me(e,t==null?void 0:t.in),r=n.getFullYear(),o=Wr(),a=(t==null?void 0:t.firstWeekContainsDate)??((f=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??o.firstWeekContainsDate??((p=(m=o.locale)==null?void 0:m.options)==null?void 0:p.firstWeekContainsDate)??1,s=Ue((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const c=er(s,t),l=Ue((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const d=er(l,t);return+n>=+c?r+1:+n>=+d?r:r-1}function rS(e,t){var c,l,d,u;const n=Wr(),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=Qm(e,t),a=Ue((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),er(a,t)}function fi(e,t){const n=Me(e,t==null?void 0:t.in),r=+er(n,t)-+rS(n,t);return Math.round(r/Hm)+1}function Pe(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const sn={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)}},$n={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ac={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 sn.y(e,t)},Y:function(e,t,n,r){const o=Qm(e,r),a=o>0?o:1-o;if(t==="YY"){const s=a%100;return Pe(s,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):Pe(a,t.length)},R:function(e,t){const n=Vm(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 sn.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=fi(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Pe(o,t.length)},I:function(e,t,n){const r=ui(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"}):sn.d(e,t)},D:function(e,t,n){const r=nS(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=$n.noon:r===0?o=$n.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=$n.evening:r>=12?o=$n.afternoon:r>=4?o=$n.morning:o=$n.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 sn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):sn.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"}):sn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):sn.s(e,t)},S:function(e,t){return sn.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Ic(r);case"XXXX":case"XX":return bn(r);case"XXXXX":case"XXX":default:return bn(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Ic(r);case"xxxx":case"xx":return bn(r);case"xxxxx":case"xxx":default:return bn(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+zc(r,":");case"OOOO":default:return"GMT"+bn(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+zc(r,":");case"zzzz":default:return"GMT"+bn(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Pe(r,t.length)},T:function(e,t,n){return Pe(+e,t.length)}};function zc(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 Ic(e,t){return e%60===0?(e>0?"-":"+")+Pe(Math.abs(e)/60,2):bn(e,t)}function bn(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 Wc=(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"})}},Zm=(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"})}},oS=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Wc(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}}",Wc(r,t)).replace("{{time}}",Zm(o,t))},aS={p:Zm,P:oS},sS=/^D+$/,iS=/^Y+$/,cS=["D","DD","YY","YYYY"];function lS(e){return sS.test(e)}function dS(e){return iS.test(e)}function uS(e,t,n){const r=fS(e,t,n);if(console.warn(r),cS.includes(e))throw new RangeError(r)}function fS(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 mS=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pS=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,hS=/^'([^]*?)'?$/,_S=/''/g,gS=/[a-zA-Z]/;function vr(e,t,n){var u,f,m,p,g,_,j,b;const r=Wr(),o=(n==null?void 0:n.locale)??r.locale??Hn,a=(n==null?void 0:n.firstWeekContainsDate)??((f=(u=n==null?void 0:n.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??r.firstWeekContainsDate??((p=(m=r.locale)==null?void 0:m.options)==null?void 0:p.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((_=(g=n==null?void 0:n.locale)==null?void 0:g.options)==null?void 0:_.weekStartsOn)??r.weekStartsOn??((b=(j=r.locale)==null?void 0:j.options)==null?void 0:b.weekStartsOn)??0,c=Me(e,n==null?void 0:n.in);if(!gN(c))throw new RangeError("Invalid time value");let l=t.match(pS).map(x=>{const w=x[0];if(w==="p"||w==="P"){const N=aS[w];return N(x,o.formatLong)}return x}).join("").match(mS).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const w=x[0];if(w==="'")return{isToken:!1,value:jS(x)};if(Ac[w])return{isToken:!0,value:x};if(w.match(gS))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:x}});o.localize.preprocessor&&(l=o.localize.preprocessor(c,l));const d={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return l.map(x=>{if(!x.isToken)return x.value;const w=x.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&dS(w)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&lS(w))&&uS(w,t,String(e));const N=Ac[w[0]];return N(c,w,o.localize,d)}).join("")}function jS(e){const t=e.match(hS);return t?t[1].replace(_S,"'"):e}function yS(e,t){const n=Me(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=Ue(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function vS(e,t){return Me(e,t==null?void 0:t.in).getMonth()}function xS(e,t){return Me(e,t==null?void 0:t.in).getFullYear()}function bS(e,t){return+Me(e)>+Me(t)}function wS(e,t){return+Me(e)<+Me(t)}function NS(e,t,n){const[r,o]=ir(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function SS(e,t,n){const[r,o]=ir(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function CS(e,t,n){const r=Me(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),s=Ue(e,0);s.setFullYear(o,t,15),s.setHours(0,0,0,0);const c=yS(s);return r.setMonth(t,Math.min(a,c)),r}function kS(e,t,n){const r=Me(e,n==null?void 0:n.in);return isNaN(+r)?Ue(e,NaN):(r.setFullYear(t),r)}const Fc=5,PS=4;function ES(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,Fc*7-1);return t.getMonth(e)===t.getMonth(a)?Fc:PS}function ep(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 MS(e,t){const n=ep(e,t),r=ES(e,t);return t.addDays(n,r*7-1)}const tp={...Hn,labels:{labelDayButton:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(s,c)=>vr(s,c,{locale:Hn,...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)=>vr(o,a,{locale:Hn,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(s,c)=>vr(s,c,{locale:Hn,...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)=>vr(o,a,{locale:Hn,...t}),r(e,"cccc")}}};class ut{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?Qe.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,a)=>{var s;return(s=this.overrides)!=null&&s.newDate?this.overrides.newDate(r,o,a):this.options.timeZone?new Qe(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):qm(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):Ym(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):fN(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):mN(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):di(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):Gm(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):yN(r)},this.eachYearOfInterval=r=>{var c;const o=(c=this.overrides)!=null&&c.eachYearOfInterval?this.overrides.eachYearOfInterval(r):bN(r),a=new Set(o.map(l=>this.getYear(l)));if(a.size===o.length)return o;const s=[];return a.forEach(l=>{s.push(new Date(l,0,1))}),s},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):MS(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):wN(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):jN(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):Jm(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):xN(r)},this.format=(r,o,a)=>{var c;const s=(c=this.overrides)!=null&&c.format?this.overrides.format(r,o,this.options):vr(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(s):s},this.getISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(r):ui(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):vS(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):xS(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):fi(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):bS(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):wS(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):Um(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):_N(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):NS(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):SS(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):pN(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):hN(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):CS(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):kS(r,o)},this.startOfBroadcastWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):ep(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):Pr(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):kr(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):vN(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):er(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):Km(r)},this.options={locale:tp,...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&&ut.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&&ut.yearFirstLocales.has(a))try{return new Intl.DateTimeFormat(a,{month:"long",year:"numeric",timeZone:r,numberingSystem:o}).format(t)}catch{}const s=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,s)}}ut.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 Lt=new ut;class np{constructor(t,n,r=Lt){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 DS{constructor(t,n){this.date=t,this.weeks=n}}class TS{constructor(t,n){this.days=n,this.weekNumber=t}}function RS(e){return y.createElement("button",{...e})}function OS(e){return y.createElement("span",{...e})}function AS(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 zS(e){const{day:t,modifiers:n,...r}=e;return y.createElement("td",{...r})}function IS(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 Z;(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"})(Z||(Z={}));var We;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(We||(We={}));var xt;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(xt||(xt={}));var ct;(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"})(ct||(ct={}));function WS(e){const{options:t,className:n,components:r,classNames:o,...a}=e,s=[o[Z.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[Z.DropdownRoot]},y.createElement(r.Select,{className:s,...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[Z.CaptionLabel],"aria-hidden":!0},c==null?void 0:c.label,y.createElement(r.Chevron,{orientation:"down",size:18,className:o[Z.Chevron]})))}function FS(e){return y.createElement("div",{...e})}function $S(e){return y.createElement("div",{...e})}function LS(e){const{calendarMonth:t,displayIndex:n,...r}=e;return y.createElement("div",{...r},e.children)}function BS(e){const{calendarMonth:t,displayIndex:n,...r}=e;return y.createElement("div",{...r})}function HS(e){return y.createElement("table",{...e})}function qS(e){return y.createElement("div",{...e})}const rp=y.createContext(void 0);function Fr(){const e=y.useContext(rp);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function YS(e){const{components:t}=Fr();return y.createElement(t.Dropdown,{...e})}function VS(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:s,classNames:c,labels:{labelPrevious:l,labelNext:d}}=Fr(),u=y.useCallback(m=>{o&&(n==null||n(m))},[o,n]),f=y.useCallback(m=>{r&&(t==null||t(m))},[r,t]);return y.createElement("nav",{...a},y.createElement(s.PreviousMonthButton,{type:"button",className:c[Z.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":l(r),onClick:f},y.createElement(s.Chevron,{disabled:r?void 0:!0,className:c[Z.Chevron],orientation:"left"})),y.createElement(s.NextMonthButton,{type:"button",className:c[Z.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":d(o),onClick:u},y.createElement(s.Chevron,{disabled:o?void 0:!0,orientation:"right",className:c[Z.Chevron]})))}function US(e){const{components:t}=Fr();return y.createElement(t.Button,{...e})}function GS(e){return y.createElement("option",{...e})}function XS(e){const{components:t}=Fr();return y.createElement(t.Button,{...e})}function KS(e){const{rootRef:t,...n}=e;return y.createElement("div",{...n,ref:t})}function JS(e){return y.createElement("select",{...e})}function QS(e){const{week:t,...n}=e;return y.createElement("tr",{...n})}function ZS(e){return y.createElement("th",{...e})}function eC(e){return y.createElement("thead",{"aria-hidden":!0},y.createElement("tr",{...e}))}function tC(e){const{week:t,...n}=e;return y.createElement("th",{...n})}function nC(e){return y.createElement("th",{...e})}function rC(e){return y.createElement("tbody",{...e})}function oC(e){const{components:t}=Fr();return y.createElement(t.Dropdown,{...e})}const aC=Object.freeze(Object.defineProperty({__proto__:null,Button:RS,CaptionLabel:OS,Chevron:AS,Day:zS,DayButton:IS,Dropdown:WS,DropdownNav:FS,Footer:$S,Month:LS,MonthCaption:BS,MonthGrid:HS,Months:qS,MonthsDropdown:YS,Nav:VS,NextMonthButton:US,Option:GS,PreviousMonthButton:XS,Root:KS,Select:JS,Week:QS,WeekNumber:tC,WeekNumberHeader:nC,Weekday:ZS,Weekdays:eC,Weeks:rC,YearsDropdown:oC},Symbol.toStringTag,{value:"Module"}));function qt(e,t,n=!1,r=Lt){let{from:o,to:a}=e;const{differenceInCalendarDays:s,isSameDay:c}=r;return o&&a?(s(a,o)<0&&([o,a]=[a,o]),s(t,o)>=(n?1:0)&&s(a,t)>=(n?1:0)):!n&&a?c(a,t):!n&&o?c(o,t):!1}function mi(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function la(e){return!!(e&&typeof e=="object"&&"from"in e)}function pi(e){return!!(e&&typeof e=="object"&&"after"in e)}function hi(e){return!!(e&&typeof e=="object"&&"before"in e)}function op(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function ap(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Yt(e,t,n=Lt){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:s}=n;return r.some(c=>{if(typeof c=="boolean")return c;if(n.isDate(c))return o(e,c);if(ap(c,n))return c.some(l=>o(e,l));if(la(c))return qt(c,e,!1,n);if(op(c))return Array.isArray(c.dayOfWeek)?c.dayOfWeek.includes(e.getDay()):c.dayOfWeek===e.getDay();if(mi(c)){const l=a(c.before,e),d=a(c.after,e),u=l>0,f=d<0;return s(c.before,c.after)?f&&u:u||f}return pi(c)?a(e,c.after)>0:hi(c)?a(c.before,e)>0:typeof c=="function"?c(e):!1})}function sC(e,t,n,r,o){const{disabled:a,hidden:s,modifiers:c,showOutsideDays:l,broadcastCalendar:d,today:u=o.today()}=t,{isSameDay:f,isSameMonth:m,startOfMonth:p,isBefore:g,endOfMonth:_,isAfter:j}=o,b=n&&p(n),x=r&&_(r),w={[We.focused]:[],[We.outside]:[],[We.disabled]:[],[We.hidden]:[],[We.today]:[]},N={};for(const S of e){const{date:v,displayMonth:C}=S,P=!!(C&&!m(v,C)),k=!!(b&&g(v,b)),E=!!(x&&j(v,x)),M=!!(a&&Yt(v,a,o)),D=!!(s&&Yt(v,s,o))||k||E||!d&&!l&&P||d&&l===!1&&P,z=f(v,u);P&&w.outside.push(S),M&&w.disabled.push(S),D&&w.hidden.push(S),z&&w.today.push(S),c&&Object.keys(c).forEach(A=>{const L=c==null?void 0:c[A];L&&Yt(v,L,o)&&(N[A]?N[A].push(S):N[A]=[S])})}return S=>{const v={[We.focused]:!1,[We.disabled]:!1,[We.hidden]:!1,[We.outside]:!1,[We.today]:!1},C={};for(const P in w){const k=w[P];v[P]=k.some(E=>E===S)}for(const P in N)C[P]=N[P].some(k=>k===S);return{...v,...C}}}function iC(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[We[a]]?o.push(t[We[a]]):t[xt[a]]&&o.push(t[xt[a]]),o),[t[Z.Day]])}function cC(e){return{...aC,...e}}function lC(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 dC(){const e={};for(const t in Z)e[Z[t]]=`rdp-${Z[t]}`;for(const t in We)e[We[t]]=`rdp-${We[t]}`;for(const t in xt)e[xt[t]]=`rdp-${xt[t]}`;for(const t in ct)e[ct[t]]=`rdp-${ct[t]}`;return e}function sp(e,t,n){return(n??new ut(t)).formatMonthYear(e)}const uC=sp;function fC(e,t,n){return(n??new ut(t)).format(e,"d")}function mC(e,t=Lt){return t.format(e,"LLLL")}function pC(e,t,n){return(n??new ut(t)).format(e,"cccccc")}function hC(e,t=Lt){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function _C(){return""}function ip(e,t=Lt){return t.format(e,"yyyy")}const gC=ip,jC=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:sp,formatDay:fC,formatMonthCaption:uC,formatMonthDropdown:mC,formatWeekNumber:hC,formatWeekNumberHeader:_C,formatWeekdayName:pC,formatYearCaption:gC,formatYearDropdown:ip},Symbol.toStringTag,{value:"Module"}));function yC(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...jC,...e}}function _i(e,t,n,r){let o=(r??new ut(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const vC=_i;function gi(e,t,n){return(n??new ut(t)).formatMonthYear(e)}const xC=gi;function cp(e,t,n,r){let o=(r??new ut(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function lp(e){return"Choose the Month"}function dp(){return""}const bC="Go to the Next Month";function up(e,t){return bC}function fp(e){return"Go to the Previous Month"}function mp(e,t,n){return(n??new ut(t)).format(e,"cccc")}function pp(e,t){return`Week ${e}`}function hp(e){return"Week Number"}function _p(e){return"Choose the Year"}const wC=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:xC,labelDay:vC,labelDayButton:_i,labelGrid:gi,labelGridcell:cp,labelMonthDropdown:lp,labelNav:dp,labelNext:up,labelPrevious:fp,labelWeekNumber:pp,labelWeekNumberHeader:hp,labelWeekday:mp,labelYearDropdown:_p},Symbol.toStringTag,{value:"Module"})),yt=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function NC(e,t){var r;const n=((r=t.locale)==null?void 0:r.labels)??{};return{...wC,...e??{},labelDayButton:yt(_i,e==null?void 0:e.labelDayButton,n.labelDayButton),labelMonthDropdown:yt(lp,e==null?void 0:e.labelMonthDropdown,n.labelMonthDropdown),labelNext:yt(up,e==null?void 0:e.labelNext,n.labelNext),labelPrevious:yt(fp,e==null?void 0:e.labelPrevious,n.labelPrevious),labelWeekNumber:yt(pp,e==null?void 0:e.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:yt(_p,e==null?void 0:e.labelYearDropdown,n.labelYearDropdown),labelGrid:yt(gi,e==null?void 0:e.labelGrid,n.labelGrid),labelGridcell:yt(cp,e==null?void 0:e.labelGridcell,n.labelGridcell),labelNav:yt(dp,e==null?void 0:e.labelNav,n.labelNav),labelWeekNumberHeader:yt(hp,e==null?void 0:e.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:yt(mp,e==null?void 0:e.labelWeekday,n.labelWeekday)}}function SC(e,t,n,r,o){const{startOfMonth:a,startOfYear:s,endOfYear:c,eachMonthOfInterval:l,getMonth:d}=o;return l({start:s(e),end:c(e)}).map(m=>{const p=r.formatMonthDropdown(m,o),g=d(m),_=t&&m<a(t)||n&&m>a(n)||!1;return{value:g,label:p,disabled:_}})}function CC(e,t={},n={}){let r={...t==null?void 0:t[Z.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function kC(e,t,n,r){const o=r??e.today(),a=n?e.startOfBroadcastWeek(o,e):t?e.startOfISOWeek(o):e.startOfWeek(o),s=[];for(let c=0;c<7;c++){const l=e.addDays(a,c);s.push(l)}return s}function PC(e,t,n,r,o=!1){if(!e||!t)return;const{startOfYear:a,endOfYear:s,eachYearOfInterval:c,getYear:l}=r,d=a(e),u=s(t),f=c({start:d,end:u});return o&&f.reverse(),f.map(m=>{const p=n.formatYearDropdown(m,r);return{value:l(m),label:p,disabled:!1}})}function EC(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 Qe(d.getFullYear(),d.getMonth(),d.getDate(),12,0,0,e)},s=l=>{const d=a(l);return new Date(d.getFullYear(),d.getMonth(),d.getDate(),0,0,0,0)};return{today:()=>a(Qe.tz(e)),newDate:(l,d,u)=>new Qe(l,d,u,12,0,0,e),startOfDay:l=>a(l),startOfWeek:(l,d)=>{const u=a(l),f=(d==null?void 0:d.weekStartsOn)??o,m=(u.getDay()-f+7)%7;return u.setDate(u.getDate()-m),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),f=[],m=new Qe(d.getFullYear(),d.getMonth(),1,12,0,0,e),p=u.getFullYear()*12+u.getMonth();for(;m.getFullYear()*12+m.getMonth()<=p;)f.push(new Qe(m,e)),m.setMonth(m.getMonth()+1,1);return f},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),f=[],m=new Qe(d.getFullYear(),0,1,12,0,0,e);for(;m.getFullYear()<=u.getFullYear();)f.push(new Qe(m,e)),m.setFullYear(m.getFullYear()+1,0,1);return f},getWeek:(l,d)=>{var f;const u=s(l);return fi(u,{weekStartsOn:(d==null?void 0:d.weekStartsOn)??o,firstWeekContainsDate:(d==null?void 0:d.firstWeekContainsDate)??((f=r==null?void 0:r.options)==null?void 0:f.firstWeekContainsDate)??1})},getISOWeek:l=>{const d=s(l);return ui(d)},differenceInCalendarDays:(l,d)=>{const u=s(l),f=s(d);return di(u,f)},differenceInCalendarMonths:(l,d)=>{const u=s(l),f=s(d);return Gm(u,f)}}}const $r=e=>e instanceof HTMLElement?e:null,Wa=e=>[...e.querySelectorAll("[data-animated-month]")??[]],MC=e=>$r(e.querySelector("[data-animated-month]")),Fa=e=>$r(e.querySelector("[data-animated-caption]")),$a=e=>$r(e.querySelector("[data-animated-weeks]")),DC=e=>$r(e.querySelector("[data-animated-nav]")),TC=e=>$r(e.querySelector("[data-animated-weekdays]"));function RC(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const s=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),f=a.isAfter(r[0].date,d[0].date),m=f?n[ct.caption_after_enter]:n[ct.caption_before_enter],p=f?n[ct.weeks_after_enter]:n[ct.weeks_before_enter],g=s.current,_=e.current.cloneNode(!0);if(_ instanceof HTMLElement?(Wa(_).forEach(w=>{if(!(w instanceof HTMLElement))return;const N=MC(w);N&&w.contains(N)&&w.removeChild(N);const S=Fa(w);S&&S.classList.remove(m);const v=$a(w);v&&v.classList.remove(p)}),s.current=_):s.current=null,l.current||u||o)return;const j=g instanceof HTMLElement?Wa(g):[],b=Wa(e.current);if(b!=null&&b.every(x=>x instanceof HTMLElement)&&j&&j.every(x=>x instanceof HTMLElement)){l.current=!0,e.current.style.isolation="isolate";const x=DC(e.current);x&&(x.style.zIndex="1"),b.forEach((w,N)=>{const S=j[N];if(!S)return;w.style.position="relative",w.style.overflow="hidden";const v=Fa(w);v&&v.classList.add(m);const C=$a(w);C&&C.classList.add(p);const P=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),x&&(x.style.zIndex=""),v&&v.classList.remove(m),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 k=TC(S);k&&(k.style.opacity="0");const E=Fa(S);E&&(E.classList.add(f?n[ct.caption_before_exit]:n[ct.caption_after_exit]),E.addEventListener("animationend",P));const M=$a(S);M&&M.classList.add(f?n[ct.weeks_before_exit]:n[ct.weeks_after_exit]),w.insertBefore(S,w.firstChild)})}})}function OC(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:s,fixedWeeks:c,broadcastCalendar:l}=n??{},{addDays:d,differenceInCalendarDays:u,differenceInCalendarMonths:f,endOfBroadcastWeek:m,endOfISOWeek:p,endOfMonth:g,endOfWeek:_,isAfter:j,startOfBroadcastWeek:b,startOfISOWeek:x,startOfWeek:w}=r,N=l?b(o,r):s?x(o):w(o),S=l?m(a):s?p(g(a)):_(g(a)),v=t&&(l?m(t):s?p(t):_(t)),C=v&&j(S,v)?v:S,P=u(C,N),k=f(a,o)+1,E=[];for(let z=0;z<=P;z++){const A=d(N,z);E.push(A)}const D=(l?35:42)*k;if(c&&E.length<D){const z=D-E.length;for(let A=0;A<z;A++){const L=d(E[E.length-1],1);E.push(L)}}return E}function AC(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,s)=>a.concat(s.days.slice()),t.slice());return n.concat(o.slice())},t.slice())}function zC(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let s=0;s<o;s++){const c=r.addMonths(e,s);if(t&&c>t)break;a.push(c)}return a}function $c(e,t,n,r){const{month:o,defaultMonth:a,today:s=r.today(),numberOfMonths:c=1}=e;let l=o||a||s;const{differenceInCalendarMonths:d,addMonths:u,startOfMonth:f}=r;if(n&&d(n,l)<c-1){const m=-1*(c-1);l=u(n,m)}return t&&d(l,t)<0&&(l=t),f(l)}function IC(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:s,endOfMonth:c,endOfWeek:l,getISOWeek:d,getWeek:u,startOfBroadcastWeek:f,startOfISOWeek:m,startOfWeek:p}=r,g=e.reduce((_,j)=>{const b=n.broadcastCalendar?f(j,r):n.ISOWeek?m(j):p(j),x=n.broadcastCalendar?a(j):n.ISOWeek?s(c(j)):l(c(j)),w=t.filter(C=>C>=b&&C<=x),N=n.broadcastCalendar?35:42;if(n.fixedWeeks&&w.length<N){const C=t.filter(P=>{const k=N-w.length;return P>x&&P<=o(x,k)});w.push(...C)}const S=w.reduce((C,P)=>{const k=n.ISOWeek?d(P):u(P),E=C.find(D=>D.weekNumber===k),M=new np(P,j,r);return E?E.days.push(M):C.push(new TS(k,[M])),C},[]),v=new DS(j,S);return _.push(v),_},[]);return n.reverseMonths?g.reverse():g}function WC(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:s,endOfMonth:c,addYears:l,endOfYear:d,newDate:u,today:f}=t,{fromYear:m,toYear:p,fromMonth:g,toMonth:_}=e;!n&&g&&(n=g),!n&&m&&(n=t.newDate(m,0,1)),!r&&_&&(r=_),!r&&p&&(r=u(p,11,31));const j=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=s(n):m?n=u(m,0,1):!n&&j&&(n=o(l(e.today??f(),-100))),r?r=c(r):p?r=u(p,11,31):!r&&j&&(r=d(e.today??f())),[n&&a(n),r&&a(r)]}function FC(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:s,addMonths:c,differenceInCalendarMonths:l}=r,d=o?a:1,u=s(e);if(!t)return c(u,d);if(!(l(t,e)<a))return c(u,d)}function $C(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:s,addMonths:c,differenceInCalendarMonths:l}=r,d=o?a??1:1,u=s(e);if(!t)return c(u,-d);if(!(l(u,t)<=0))return c(u,-d)}function LC(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function da(e,t){const[n,r]=y.useState(e);return[t===void 0?n:t,r]}function BC(e,t){var N;const[n,r]=WC(e,t),{startOfMonth:o,endOfMonth:a}=t,s=$c(e,n,r,t),[c,l]=da(s,e.month?s:void 0);y.useEffect(()=>{const S=$c(e,n,r,t);l(S)},[e.timeZone]);const{months:d,weeks:u,days:f,previousMonth:m,nextMonth:p}=y.useMemo(()=>{const S=zC(c,r,{numberOfMonths:e.numberOfMonths},t),v=OC(S,e.endMonth?a(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),C=IC(S,v,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),P=LC(C),k=AC(C),E=$C(c,n,e,t),M=FC(c,r,e,t);return{months:C,weeks:P,days:k,previousMonth:E,nextMonth:M}},[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:_}=e,j=S=>u.some(v=>v.days.some(C=>C.isEqualTo(S))),b=S=>{if(g)return;let v=o(S);n&&v<o(n)&&(v=o(n)),r&&v>o(r)&&(v=o(r)),l(v),_==null||_(v)};return{months:d,weeks:u,days:f,navStart:n,navEnd:r,previousMonth:m,nextMonth:p,goToMonth:b,goToDay:S=>{j(S)||b(S.date)}}}var Et;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Et||(Et={}));function Lc(e){return!e[We.disabled]&&!e[We.hidden]&&!e[We.outside]}function HC(e,t,n,r){let o,a=-1;for(const s of e){const c=t(s);Lc(c)&&(c[We.focused]&&a<Et.FocusedModifier?(o=s,a=Et.FocusedModifier):r!=null&&r.isEqualTo(s)&&a<Et.LastFocused?(o=s,a=Et.LastFocused):n(s.date)&&a<Et.Selected?(o=s,a=Et.Selected):c[We.today]&&a<Et.Today&&(o=s,a=Et.Today))}return o||(o=e.find(s=>Lc(t(s)))),o}function qC(e,t,n,r,o,a,s){const{ISOWeek:c,broadcastCalendar:l}=a,{addDays:d,addMonths:u,addWeeks:f,addYears:m,endOfBroadcastWeek:p,endOfISOWeek:g,endOfWeek:_,max:j,min:b,startOfBroadcastWeek:x,startOfISOWeek:w,startOfWeek:N}=s;let v={day:d,week:f,month:u,year:m,startOfWeek:C=>l?x(C,s):c?w(C):N(C),endOfWeek:C=>l?p(C):c?g(C):_(C)}[e](n,t==="after"?1:-1);return t==="before"&&r?v=j([r,v]):t==="after"&&o&&(v=b([o,v])),v}function gp(e,t,n,r,o,a,s,c=0){if(c>365)return;const l=qC(e,t,n.date,r,o,a,s),d=!!(a.disabled&&Yt(l,a.disabled,s)),u=!!(a.hidden&&Yt(l,a.hidden,s)),f=l,m=new np(l,f,s);return!d&&!u?m:gp(e,t,m,r,o,a,s,c+1)}function YC(e,t,n,r,o){const{autoFocus:a}=e,[s,c]=y.useState(),l=HC(t.days,n,r||(()=>!1),s),[d,u]=y.useState(a?l:void 0);return{isFocusTarget:_=>!!(l!=null&&l.isEqualTo(_)),setFocused:u,focused:d,blur:()=>{c(d),u(void 0)},moveFocus:(_,j)=>{if(!d)return;const b=gp(_,j,d,t.navStart,t.navEnd,e,o);b&&(e.disableNavigation&&!t.days.some(w=>w.isEqualTo(b))||(t.goToDay(b),u(b)))}}}function VC(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=da(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:f}=e;return{selected:c,select:(p,g,_)=>{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(b=>!l(b,p))}else(c==null?void 0:c.length)===f?j=[p]:j=[...j,p];return o||s(j),o==null||o(j,p,g,_),j},isSelected:d}}function UC(e,t,n=0,r=0,o=!1,a=Lt){const{from:s,to:c}=t||{},{isSameDay:l,isAfter:d,isBefore:u}=a;let f;if(!s&&!c)f={from:e,to:n>0?void 0:e};else if(s&&!c)l(s,e)?n===0?f={from:s,to:e}:o?f={from:s,to:void 0}:f=void 0:u(e,s)?f={from:e,to:s}:f={from:s,to:e};else if(s&&c)if(l(s,e)&&l(c,e))o?f={from:s,to:c}:f=void 0;else if(l(s,e))f={from:s,to:n>0?void 0:e};else if(l(c,e))f={from:e,to:n>0?void 0:e};else if(u(e,s))f={from:e,to:c};else if(d(e,s))f={from:s,to:e};else if(d(e,c))f={from:s,to:e};else throw new Error("Invalid range");if(f!=null&&f.from&&(f!=null&&f.to)){const m=a.differenceInCalendarDays(f.to,f.from);r>0&&m>r?f={from:e,to:void 0}:n>1&&m<n&&(f={from:e,to:void 0})}return f}function GC(e,t,n=Lt){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),s=Math.min(a,6);for(let c=0;c<=s;c++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function Bc(e,t,n=Lt){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 XC(e,t,n=Lt){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):ap(c,n)?c.some(l=>qt(e,l,!1,n)):la(c)?c.from&&c.to?Bc(e,{from:c.from,to:c.to},n):!1:op(c)?GC(e,c.dayOfWeek,n):mi(c)?n.isAfter(c.before,c.after)?Bc(e,{from:n.addDays(c.after,1),to:n.addDays(c.before,-1)},n):Yt(e.from,c,n)||Yt(e.to,c,n):pi(c)||hi(c)?Yt(e.from,c,n)||Yt(e.to,c,n):!1))return!0;const s=r.filter(c=>typeof c=="function");if(s.length){let c=e.from;const l=n.differenceInCalendarDays(e.to,e.from);for(let d=0;d<=l;d++){if(s.some(u=>u(c)))return!0;c=n.addDays(c,1)}}return!1}function KC(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:s}=e,[c,l]=da(o,s?o:void 0),d=s?o:c;return{selected:d,select:(m,p,g)=>{const{min:_,max:j}=e,b=m?UC(m,d,_,j,a,t):void 0;return r&&n&&(b!=null&&b.from)&&b.to&&XC({from:b.from,to:b.to},n,t)&&(b.from=m,b.to=void 0),s||l(b),s==null||s(b,m,p,g),b},isSelected:m=>d&&qt(d,m,!1,t)}}function JC(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=da(n,o?n:void 0),c=o?n:a,{isSameDay:l}=t;return{selected:c,select:(f,m,p)=>{let g=f;return!r&&c&&c&&l(f,c)&&(g=void 0),o||s(g),o==null||o(g,f,m,p),g},isSelected:f=>c?l(c,f):!1}}function QC(e,t){const n=JC(e,t),r=VC(e,t),o=KC(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function ht(e,t){return e instanceof Qe&&e.timeZone===t?e:new Qe(e,t)}function Ln(e,t,n){return ht(e,t)}function Hc(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?Ln(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?Ln(r,t):r):la(e)?{...e,from:e.from?ht(e.from,t):e.from,to:e.to?ht(e.to,t):e.to}:mi(e)?{before:Ln(e.before,t),after:Ln(e.after,t)}:pi(e)?{after:Ln(e.after,t)}:hi(e)?{before:Ln(e.before,t)}:e}function La(e,t,n){return e&&(Array.isArray(e)?e.map(r=>Hc(r,t)):Hc(e,t))}function ZC(e){var lr;let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=ht(t.today,n)),t.month&&(t.month=ht(t.month,n)),t.defaultMonth&&(t.defaultMonth=ht(t.defaultMonth,n)),t.startMonth&&(t.startMonth=ht(t.startMonth,n)),t.endMonth&&(t.endMonth=ht(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=ht(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=(lr=t.selected)==null?void 0:lr.map(me=>ht(me,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?ht(t.selected.from,n):t.selected.from,to:t.selected.to?ht(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=La(t.disabled,n)),t.hidden!==void 0&&(t.hidden=La(t.hidden,n)),t.modifiers)){const me={};Object.keys(t.modifiers).forEach(we=>{var ne;me[we]=La((ne=t.modifiers)==null?void 0:ne[we],n)}),t.modifiers=me}const{components:r,formatters:o,labels:a,dateLib:s,locale:c,classNames:l}=y.useMemo(()=>{const me={...tp,...t.locale},we=t.broadcastCalendar?1:t.weekStartsOn,ne=t.noonSafe&&t.timeZone?EC(t.timeZone,{weekStartsOn:we,locale:me}):void 0,je=t.dateLib&&ne?{...ne,...t.dateLib}:t.dateLib??ne,Ze=new ut({locale:me,weekStartsOn:we,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},je);return{dateLib:Ze,components:cC(t.components),formatters:yC(t.formatters),labels:NC(t.labels,Ze.options),locale:me,classNames:{...dC(),...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:s.today()});const{captionLayout:d,mode:u,navLayout:f,numberOfMonths:m=1,onDayBlur:p,onDayClick:g,onDayFocus:_,onDayKeyDown:j,onDayMouseEnter:b,onDayMouseLeave:x,onNextClick:w,onPrevClick:N,showWeekNumber:S,styles:v}=t,{formatCaption:C,formatDay:P,formatMonthDropdown:k,formatWeekNumber:E,formatWeekNumberHeader:M,formatWeekdayName:D,formatYearDropdown:z}=o,A=BC(t,s),{days:L,months:W,navStart:Q,navEnd:Y,previousMonth:O,nextMonth:se,goToMonth:fe}=A,ue=sC(L,t,Q,Y,s),{isSelected:R,select:I,selected:H}=QC(t,s)??{},{blur:G,focused:T,isFocusTarget:B,moveFocus:ee,setFocused:K}=YC(t,A,ue,R??(()=>!1),s),{labelDayButton:ie,labelGridcell:ce,labelGrid:pe,labelMonthDropdown:Ee,labelNav:F,labelPrevious:J,labelNext:le,labelWeekday:X,labelWeekNumber:ae,labelWeekNumberHeader:Ce,labelYearDropdown:xe}=a,qe=y.useMemo(()=>kC(s,t.ISOWeek,t.broadcastCalendar,t.today),[s,t.ISOWeek,t.broadcastCalendar,t.today]),Ie=u!==void 0||g!==void 0,ot=y.useCallback(()=>{O&&(fe(O),N==null||N(O))},[O,fe,N]),Ke=y.useCallback(()=>{se&&(fe(se),w==null||w(se))},[fe,se,w]),Je=y.useCallback((me,we)=>ne=>{ne.preventDefault(),ne.stopPropagation(),K(me),!we.disabled&&(I==null||I(me.date,we,ne),g==null||g(me.date,we,ne))},[I,g,K]),Zt=y.useCallback((me,we)=>ne=>{K(me),_==null||_(me.date,we,ne)},[_,K]),ma=y.useCallback((me,we)=>ne=>{G(),p==null||p(me.date,we,ne)},[G,p]),pa=y.useCallback((me,we)=>ne=>{const je={ArrowLeft:[ne.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[ne.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[ne.shiftKey?"year":"week","after"],ArrowUp:[ne.shiftKey?"year":"week","before"],PageUp:[ne.shiftKey?"year":"month","before"],PageDown:[ne.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(je[ne.key]){ne.preventDefault(),ne.stopPropagation();const[Ze,$]=je[ne.key];ee(Ze,$)}j==null||j(me.date,we,ne)},[ee,j,t.dir]),On=y.useCallback((me,we)=>ne=>{b==null||b(me.date,we,ne)},[b]),ha=y.useCallback((me,we)=>ne=>{x==null||x(me.date,we,ne)},[x]),Br=y.useCallback(me=>we=>{const ne=Number(we.target.value),je=s.setMonth(s.startOfMonth(me),ne);fe(je)},[s,fe]),cr=y.useCallback(me=>we=>{const ne=Number(we.target.value),je=s.setYear(s.startOfMonth(me),ne);fe(je)},[s,fe]),{className:en,style:Hr}=y.useMemo(()=>({className:[l[Z.Root],t.className].filter(Boolean).join(" "),style:{...v==null?void 0:v[Z.Root],...t.style}}),[l,t.className,t.style,v]),tn=lC(t),qr=y.useRef(null);RC(qr,!!t.animate,{classNames:l,months:W,focused:T,dateLib:s});const _a={dayPickerProps:t,selected:H,select:I,isSelected:R,months:W,nextMonth:se,previousMonth:O,goToMonth:fe,getModifiers:ue,components:r,classNames:l,styles:v,labels:a,formatters:o};return y.createElement(rp.Provider,{value:_a},y.createElement(r.Root,{rootRef:t.animate?qr:void 0,className:en,style:Hr,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"],...tn},y.createElement(r.Months,{className:l[Z.Months],style:v==null?void 0:v[Z.Months]},!t.hideNavigation&&!f&&y.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[Z.Nav],style:v==null?void 0:v[Z.Nav],"aria-label":F(),onPreviousClick:ot,onNextClick:Ke,previousMonth:O,nextMonth:se}),W.map((me,we)=>y.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:l[Z.Month],style:v==null?void 0:v[Z.Month],key:we,displayIndex:we,calendarMonth:me},f==="around"&&!t.hideNavigation&&we===0&&y.createElement(r.PreviousMonthButton,{type:"button",className:l[Z.PreviousMonthButton],tabIndex:O?void 0:-1,"aria-disabled":O?void 0:!0,"aria-label":J(O),onClick:ot,"data-animated-button":t.animate?"true":void 0},y.createElement(r.Chevron,{disabled:O?void 0:!0,className:l[Z.Chevron],orientation:t.dir==="rtl"?"right":"left"})),y.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:l[Z.MonthCaption],style:v==null?void 0:v[Z.MonthCaption],calendarMonth:me,displayIndex:we},d!=null&&d.startsWith("dropdown")?y.createElement(r.DropdownNav,{className:l[Z.Dropdowns],style:v==null?void 0:v[Z.Dropdowns]},(()=>{const ne=d==="dropdown"||d==="dropdown-months"?y.createElement(r.MonthsDropdown,{key:"month",className:l[Z.MonthsDropdown],"aria-label":Ee(),classNames:l,components:r,disabled:!!t.disableNavigation,onChange:Br(me.date),options:SC(me.date,Q,Y,o,s),style:v==null?void 0:v[Z.Dropdown],value:s.getMonth(me.date)}):y.createElement("span",{key:"month"},k(me.date,s)),je=d==="dropdown"||d==="dropdown-years"?y.createElement(r.YearsDropdown,{key:"year",className:l[Z.YearsDropdown],"aria-label":xe(s.options),classNames:l,components:r,disabled:!!t.disableNavigation,onChange:cr(me.date),options:PC(Q,Y,o,s,!!t.reverseYears),style:v==null?void 0:v[Z.Dropdown],value:s.getYear(me.date)}):y.createElement("span",{key:"year"},z(me.date,s));return s.getMonthYearOrder()==="year-first"?[je,ne]:[ne,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(me.date,s.options,s))):y.createElement(r.CaptionLabel,{className:l[Z.CaptionLabel],role:"status","aria-live":"polite"},C(me.date,s.options,s))),f==="around"&&!t.hideNavigation&&we===m-1&&y.createElement(r.NextMonthButton,{type:"button",className:l[Z.NextMonthButton],tabIndex:se?void 0:-1,"aria-disabled":se?void 0:!0,"aria-label":le(se),onClick:Ke,"data-animated-button":t.animate?"true":void 0},y.createElement(r.Chevron,{disabled:se?void 0:!0,className:l[Z.Chevron],orientation:t.dir==="rtl"?"left":"right"})),we===m-1&&f==="after"&&!t.hideNavigation&&y.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[Z.Nav],style:v==null?void 0:v[Z.Nav],"aria-label":F(),onPreviousClick:ot,onNextClick:Ke,previousMonth:O,nextMonth:se}),y.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":pe(me.date,s.options,s)||void 0,className:l[Z.MonthGrid],style:v==null?void 0:v[Z.MonthGrid]},!t.hideWeekdays&&y.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:l[Z.Weekdays],style:v==null?void 0:v[Z.Weekdays]},S&&y.createElement(r.WeekNumberHeader,{"aria-label":Ce(s.options),className:l[Z.WeekNumberHeader],style:v==null?void 0:v[Z.WeekNumberHeader],scope:"col"},M()),qe.map(ne=>y.createElement(r.Weekday,{"aria-label":X(ne,s.options,s),className:l[Z.Weekday],key:String(ne),style:v==null?void 0:v[Z.Weekday],scope:"col"},D(ne,s.options,s)))),y.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:l[Z.Weeks],style:v==null?void 0:v[Z.Weeks]},me.weeks.map(ne=>y.createElement(r.Week,{className:l[Z.Week],key:ne.weekNumber,style:v==null?void 0:v[Z.Week],week:ne},S&&y.createElement(r.WeekNumber,{week:ne,style:v==null?void 0:v[Z.WeekNumber],"aria-label":ae(ne.weekNumber,{locale:c}),className:l[Z.WeekNumber],scope:"row",role:"rowheader"},E(ne.weekNumber,s)),ne.days.map(je=>{const{date:Ze}=je,$=ue(je);if($[We.focused]=!$.hidden&&!!(T!=null&&T.isEqualTo(je)),$[xt.selected]=(R==null?void 0:R(Ze))||$.selected,la(H)){const{from:et,to:pt}=H;$[xt.range_start]=!!(et&&pt&&s.isSameDay(Ze,et)),$[xt.range_end]=!!(et&&pt&&s.isSameDay(Ze,pt)),$[xt.range_middle]=qt(H,Ze,!0,s)}const Se=CC($,v,t.modifiersStyles),Re=iC($,l,t.modifiersClassNames),st=!Ie&&!$.hidden?ce(Ze,$,s.options,s):void 0;return y.createElement(r.Day,{key:`${je.isoDate}_${je.displayMonthId}`,day:je,modifiers:$,className:Re.join(" "),style:Se,role:"gridcell","aria-selected":$.selected||void 0,"aria-label":st,"data-day":je.isoDate,"data-month":je.outside?je.dateMonthId:void 0,"data-selected":$.selected||void 0,"data-disabled":$.disabled||void 0,"data-hidden":$.hidden||void 0,"data-outside":je.outside||void 0,"data-focused":$.focused||void 0,"data-today":$.today||void 0},!$.hidden&&Ie?y.createElement(r.DayButton,{className:l[Z.DayButton],style:v==null?void 0:v[Z.DayButton],type:"button",day:je,modifiers:$,disabled:!$.focused&&$.disabled||void 0,"aria-disabled":$.focused&&$.disabled||void 0,tabIndex:B(je)?0:-1,"aria-label":ie(Ze,$,s.options,s),onClick:Je(je,$),onBlur:ma(je,$),onFocus:Zt(je,$),onKeyDown:pa(je,$),onMouseEnter:On(je,$),onMouseLeave:ha(je,$)},P(Ze,s.options,s)):!$.hidden&&P(je.date,s.options,s))})))))))),t.footer&&y.createElement(r.Footer,{className:l[Z.Footer],style:v==null?void 0:v[Z.Footer],role:"status","aria-live":"polite"},t.footer)))}function ji({className:e,classNames:t,showOutsideDays:n=!0,...r}){return i.jsx(ZC,{showOutsideDays:n,className:re("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:re("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:re("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"?i.jsx(g_,{className:"cj-h-4 cj-w-4"}):i.jsx(j_,{className:"cj-h-4 cj-w-4"})},...r})}ji.displayName="Calendar";function ek(e){const t=tk(e),n=h.forwardRef((r,o)=>{const{children:a,...s}=r,c=h.Children.toArray(a),l=c.find(rk);if(l){const d=l.props.children,u=c.map(f=>f===l?h.Children.count(d)>1?h.Children.only(null):h.isValidElement(d)?d.props.children:null:f);return i.jsx(t,{...s,ref:o,children:h.isValidElement(d)?h.cloneElement(d,void 0,u):null})}return i.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function tk(e){const t=h.forwardRef((n,r)=>{const{children:o,...a}=n;if(h.isValidElement(o)){const s=ak(o),c=ok(a,o.props);return o.type!==h.Fragment&&(c.ref=r?Tn(r,s):s),h.cloneElement(o,c)}return h.Children.count(o)>1?h.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nk=Symbol("radix.slottable");function rk(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nk}function ok(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 ak(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",[jp]=ft(ua,[Qo]),Lr=Qo(),[sk,gn]=jp(ua),yp=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,c=Lr(t),l=h.useRef(null),[d,u]=h.useState(!1),[f,m]=Ut({prop:r,defaultProp:o??!1,onChange:a,caller:ua});return i.jsx(Yu,{...c,children:i.jsx(sk,{scope:t,contentId:At(),triggerRef:l,open:f,onOpenChange:m,onOpenToggle:h.useCallback(()=>m(p=>!p),[m]),hasCustomAnchor:d,onCustomAnchorAdd:h.useCallback(()=>u(!0),[]),onCustomAnchorRemove:h.useCallback(()=>u(!1),[]),modal:s,children:n})})};yp.displayName=ua;var vp="PopoverAnchor",ik=h.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=gn(vp,n),a=Lr(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:c}=o;return h.useEffect(()=>(s(),()=>c()),[s,c]),i.jsx(Vs,{...a,...r,ref:t})});ik.displayName=vp;var xp="PopoverTrigger",bp=h.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=gn(xp,n),a=Lr(n),s=ve(t,o.triggerRef),c=i.jsx(de.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":kp(o.open),...r,ref:s,onClick:oe(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?c:i.jsx(Vs,{asChild:!0,...a,children:c})});bp.displayName=xp;var yi="PopoverPortal",[ck,lk]=jp(yi,{forceMount:void 0}),wp=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=gn(yi,t);return i.jsx(ck,{scope:t,forceMount:n,children:i.jsx(mt,{present:n||a.open,children:i.jsx(Ho,{asChild:!0,container:o,children:r})})})};wp.displayName=yi;var tr="PopoverContent",Np=h.forwardRef((e,t)=>{const n=lk(tr,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=gn(tr,e.__scopePopover);return i.jsx(mt,{present:r||a.open,children:a.modal?i.jsx(uk,{...o,ref:t}):i.jsx(fk,{...o,ref:t})})});Np.displayName=tr;var dk=ek("PopoverContent.RemoveScroll"),uk=h.forwardRef((e,t)=>{const n=gn(tr,e.__scopePopover),r=h.useRef(null),o=ve(t,r),a=h.useRef(!1);return h.useEffect(()=>{const s=r.current;if(s)return Ds(s)},[]),i.jsx(Yo,{as:dk,allowPinchZoom:!0,children:i.jsx(Sp,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:oe(e.onCloseAutoFocus,s=>{var c;s.preventDefault(),a.current||(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:oe(e.onPointerDownOutside,s=>{const c=s.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,d=c.button===2||l;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:oe(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),fk=h.forwardRef((e,t)=>{const n=gn(tr,e.__scopePopover),r=h.useRef(!1),o=h.useRef(!1);return i.jsx(Sp,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,c;(s=e.onCloseAutoFocus)==null||s.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 s=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Sp=h.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:u,...f}=e,m=gn(tr,n),p=Lr(n);return Ms(),i.jsx(Bo,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:i.jsx(Lo,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:u,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>m.onOpenChange(!1),children:i.jsx(Vu,{"data-state":kp(m.open),role:"dialog",id:m.contentId,...p,...f,ref:t,style:{...f.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)"}})})})}),Cp="PopoverClose",mk=h.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=gn(Cp,n);return i.jsx(de.button,{type:"button",...r,ref:t,onClick:oe(e.onClick,()=>o.onOpenChange(!1))})});mk.displayName=Cp;var pk="PopoverArrow",hk=h.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Lr(n);return i.jsx(Uu,{...o,...r,ref:t})});hk.displayName=pk;function kp(e){return e?"open":"closed"}var _k=yp,gk=bp,jk=wp,Pp=Np;const vi=_k,xi=gk,fa=h.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>{const a=ra();return i.jsx(jk,{container:a??void 0,children:i.jsx(Pp,{ref:o,align:t,sideOffset:n,className:re("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})})});fa.displayName=Pp.displayName;const qc={en:ca,es:$m,pt:Lm},Yc={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 Vc(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 yk(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 vk({label:e,value:t,onChange:n,helpText:r,allowFuture:o=!1}){const{t:a,language:s}=be(),[c,l]=y.useState(!1),d=y.useMemo(()=>{if(!t)return;const v=/^(\d{4})-(\d{2})-(\d{2})$/.exec(t);if(v)return new Date(Number(v[1]),Number(v[2])-1,Number(v[3]));const C=new Date(t);return Number.isNaN(C.getTime())?void 0:C},[t]),u=y.useMemo(()=>qc[s]||qc.en,[s]),{fmt:f,placeholder:m}=Yc[s]||Yc.en,[p,g]=y.useState(d?Co(d,f):""),[_,j]=y.useState(!1);y.useEffect(()=>{g(d?Co(d,f):""),j(!1)},[d,f]);const b=new Date,x=1900,w=o?b.getFullYear()+20:b.getFullYear(),N=v=>{const C=v.trim();if(!C){j(!1),n("");return}const P=Fm(C,f,new Date);if(!ai(P)){j(!0);return}if(!o&&P>b){j(!0);return}j(!1),n(Vc(P))},S=v=>{v&&(n(Vc(v)),l(!1))};return i.jsxs("div",{className:"cj-space-y-2",children:[i.jsx(U,{className:"cj-text-sm cj-font-medium",children:e}),i.jsxs("div",{className:"cj-relative",children:[i.jsx(he,{type:"text",inputMode:"numeric",value:p,placeholder:m,onChange:v=>{const C=yk(v.target.value,f);g(C),_&&j(!1)},onBlur:v=>N(v.target.value),onKeyDown:v=>{v.key==="Enter"&&(v.preventDefault(),N(v.target.value))},"aria-invalid":_||void 0,className:re("cj-pr-12",_&&"cj-border-destructive focus-visible:cj-ring-destructive")}),i.jsxs(vi,{open:c,onOpenChange:l,children:[i.jsx(xi,{asChild:!0,children:i.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:i.jsx(Dl,{className:"cj-h-4 cj-w-4"})})}),i.jsx(fa,{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:i.jsx(ji,{mode:"single",selected:d,onSelect:S,defaultMonth:d??new Date,locale:u,autoFocus:!0,captionLayout:"dropdown",startMonth:new Date(x,0),endMonth:new Date(w,11),disabled:o?void 0:{after:b},className:re("cj-p-4 cj-pointer-events-auto")})})]})]}),_&&i.jsx("p",{className:"cj-text-xs cj-text-destructive",children:a("widget_invalid_date")}),r&&!_&&i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r})]})}function Ep(e){const t=e.replace(/\D/g,"").slice(0,4);return t.length<=2?t:`${t.slice(0,2)}:${t.slice(2)}`}function Po(e){return/^([01]\d|2[0-3]):[0-5]\d$/.test(e)}function xk(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 bk({label:e,value:t,onChange:n,helpText:r}){const{t:o}=be(),a=y.useMemo(()=>xk(t),[t]),[s,c]=y.useState(a);y.useEffect(()=>{c(a)},[a]);const l=u=>{const f=Ep(u);if(c(f),!f){n("");return}Po(f)&&n(f)},d=()=>{s&&!Po(s)&&c(a)};return i.jsxs("div",{className:"cj-space-y-2",children:[i.jsx(U,{className:"cj-text-sm cj-font-medium",children:e}),i.jsx(he,{type:"text",inputMode:"numeric",pattern:"[0-2][0-9]:[0-5][0-9]",placeholder:"HH:mm",value:s,onChange:u=>l(u.target.value),onBlur:d,className:"cj-h-12 cj-rounded-xl","aria-label":e||o("widget_pick_time")}),r&&i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r})]})}const Uc={en:ca,es:$m,pt:Lm},Gc={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 wk(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 Nk({label:e,value:t,onChange:n,helpText:r,allowFuture:o=!0}){const{t:a,language:s}=be(),[c,l]=y.useState(!1),d=t?new Date(t):void 0,u=d&&!Number.isNaN(d.getTime())?d:void 0,f=y.useMemo(()=>Uc[s]||Uc.en,[s]),{fmt:m,placeholder:p}=Gc[s]||Gc.en,g=y.useMemo(()=>{if(!u)return"";const E=String(u.getHours()).padStart(2,"0"),M=String(u.getMinutes()).padStart(2,"0");return`${E}:${M}`},[u]),[_,j]=y.useState(u?Co(u,m):""),[b,x]=y.useState(g),[w,N]=y.useState(!1);y.useEffect(()=>{j(u?Co(u,m):""),N(!1)},[u,m]),y.useEffect(()=>{x(g)},[g]);const S=new Date,v=E=>{const M=E.trim();if(!M){N(!1),n("");return}const D=Fm(M,m,new Date);if(!ai(D)){N(!0);return}if(!o&&D>S){N(!0);return}u?D.setHours(u.getHours(),u.getMinutes(),0,0):D.setHours(12,0,0,0),N(!1),n(D.toISOString())},C=E=>{if(!E)return;const M=new Date(E);u?M.setHours(u.getHours(),u.getMinutes(),0,0):M.setHours(12,0,0,0),n(M.toISOString()),l(!1)},P=E=>{const M=Ep(E);if(x(M),!Po(M))return;const[D,z]=M.split(":").map(Number),A=u?new Date(u):new Date;A.setHours(D,z,0,0),n(A.toISOString())},k=()=>{b&&!Po(b)&&x(g)};return i.jsxs("div",{className:"cj-space-y-2",children:[i.jsx(U,{className:"cj-text-sm cj-font-medium",children:e}),i.jsxs("div",{className:"cj-flex cj-gap-2",children:[i.jsxs("div",{className:"cj-relative cj-flex-1",children:[i.jsx(he,{type:"text",inputMode:"numeric",value:_,placeholder:p,onChange:E=>{const M=wk(E.target.value,m);j(M),w&&N(!1)},onBlur:E=>v(E.target.value),onKeyDown:E=>{E.key==="Enter"&&(E.preventDefault(),v(E.target.value))},"aria-invalid":w||void 0,className:re("cj-pr-12",w&&"cj-border-destructive focus-visible:cj-ring-destructive")}),i.jsxs(vi,{open:c,onOpenChange:l,children:[i.jsx(xi,{asChild:!0,children:i.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:i.jsx(Dl,{className:"cj-h-4 cj-w-4"})})}),i.jsx(fa,{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:i.jsx(ji,{mode:"single",selected:u,onSelect:C,defaultMonth:u??new Date,locale:f,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:re("cj-p-4 cj-pointer-events-auto")})})]})]}),i.jsx(he,{type:"text",inputMode:"numeric",pattern:"[0-2][0-9]:[0-5][0-9]",placeholder:"HH:mm",value:b,onChange:E=>P(E.target.value),onBlur:k,className:"cj-h-12 cj-rounded-xl cj-w-32","aria-label":a("widget_pick_time")})]}),w&&i.jsx("p",{className:"cj-text-xs cj-text-destructive",children:a("widget_invalid_date")}),r&&!w&&i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r})]})}function Sk({label:e,value:t,onChange:n,helpText:r,currency:o="EUR"}){const{t:a}=be(),[s,c]=y.useState("");y.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 _=p.target.value.replace(/[^\d.,]/g,"");c(_)},f=()=>{if(s){const p=d(s);n(p.toString()),c(l(p))}else n("")},m=p=>({EUR:"โฌ",USD:"$",GBP:"ยฃ"})[p]||p;return i.jsxs("div",{className:"cj-space-y-2",children:[i.jsx(U,{className:"cj-text-sm cj-font-medium",children:e}),i.jsxs("div",{className:"cj-relative",children:[i.jsx("span",{className:"cj-absolute cj-left-3 cj-top-1/2 -cj-translate-y-1/2 cj-text-muted-foreground",children:m(o)}),i.jsx(he,{type:"text",value:s,onChange:u,onBlur:f,placeholder:a("placeholder_currency"),className:"cj-pl-8"})]}),r&&i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r})]})}function to(e){return typeof e=="object"&&e!==null&&"filename"in e&&"url"in e}function Ck({label:e,value:t,onChange:n,onFileSelect:r,helpText:o,accept:a,maxSizeMB:s}){const{t:c}=be(),l=y.useRef(null),[d,u]=y.useState(!1),[f,m]=y.useState(null),p=k=>{if(s&&k.size>s*1024*1024)return c("widget_file_too_large",{max:String(s),size:(k.size/1024/1024).toFixed(1)});if(a){const E=a.split(",").map(A=>A.trim().toLowerCase()),M=k.name.toLowerCase(),D=k.type.toLowerCase();if(!E.some(A=>A.startsWith(".")?M.endsWith(A):A.endsWith("/*")?D.startsWith(A.replace("/*","/")):D===A))return c("widget_file_type_rejected",{accept:a})}return null},g=async k=>{m(null);const E=p(k);if(E){m(E);return}if(!r){n(k.name);return}u(!0);try{const M=await r(k);to(M)?n(M):n(typeof M=="string"?M:k.name)}catch(M){m(M instanceof Error?M.message:c("widget_upload_failed")),n("")}finally{u(!1)}},_=k=>{if(k.preventDefault(),d)return;const E=k.dataTransfer.files;E.length>0&&g(E[0])},j=k=>{k.preventDefault()},b=()=>{var k;d||(k=l.current)==null||k.click()},x=k=>{const E=k.target.files;E&&E.length>0&&g(E[0]),k.target.value=""},w=k=>{k.stopPropagation(),n(""),m(null)},N=to(t)?!!t.url:!!t,S=to(t)?t.filename:t,v=to(t)?t.url:null,C=[];a&&C.push(c("widget_accepted_hint",{accept:a})),s&&C.push(c("widget_max_size_hint",{max:String(s)}));const P=C.length>0?C.join(" ยท "):null;return i.jsxs("div",{className:"cj-space-y-2",children:[i.jsx(U,{className:"cj-text-sm cj-font-medium",children:e}),i.jsx("input",{ref:l,type:"file",className:"cj-hidden",accept:a,onChange:x}),i.jsx("div",{onDrop:_,onDragOver:j,onClick:b,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":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:d?i.jsxs(i.Fragment,{children:[i.jsx(ys,{className:"cj-h-8 cj-w-8 cj-mx-auto cj-text-muted-foreground cj-mb-2 cj-animate-spin"}),i.jsx("p",{className:"cj-text-sm cj-text-muted-foreground",children:c("upload_uploading")})]}):N?i.jsxs(i.Fragment,{children:[i.jsx(k_,{className:"cj-h-8 cj-w-8 cj-mx-auto cj-text-muted-foreground cj-mb-2"}),i.jsxs("div",{className:"cj-flex cj-items-center cj-justify-center cj-gap-2",children:[v?i.jsx("a",{href:v,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:S,children:S}):i.jsx("p",{className:"cj-text-sm cj-font-medium cj-truncate cj-max-w-[240px]",children:S}),i.jsx("button",{type:"button",onClick:w,className:"cj-text-muted-foreground hover:cj-text-foreground",children:i.jsx(Wt,{className:"cj-h-4 cj-w-4"})})]})]}):i.jsxs(i.Fragment,{children:[i.jsx(Il,{className:"cj-h-8 cj-w-8 cj-mx-auto cj-text-muted-foreground cj-mb-2"}),i.jsx("p",{className:"cj-text-sm cj-text-muted-foreground",children:c("upload_drag_drop")})]})}),f&&i.jsxs("p",{className:"cj-text-xs cj-text-destructive cj-flex cj-items-center cj-gap-1",children:[i.jsx(Rl,{className:"cj-h-3 cj-w-3"})," ",f]}),(o||P)&&i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:o||P})]})}const Ba=[{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 kk({label:e,value:t,onChange:n,placeholder:r,helpText:o,onValidationChange:a}){const{t:s}=be(),[c,l]=y.useState(null),[d,u]=y.useState(Ba[0]),[f,m]=y.useState(""),[p,g]=y.useState(!1),_=y.useMemo(()=>t?t.startsWith(d.dial)?t.slice(d.dial.length).trimStart():t.replace(/^\+\d+\s*/,""):"",[t,d.dial]),j=y.useMemo(()=>{if(!f)return Ba;const N=f.toLowerCase();return Ba.filter(S=>S.name.toLowerCase().includes(N)||S.code.toLowerCase().includes(N)||S.dial.includes(N))},[f]),b=N=>{const S=!!N&&!/^[\d\s\-()]{4,20}$/.test(N);l(S?s("widget_invalid_phone"):null),a==null||a(S)};y.useEffect(()=>{b(_)},[]);const x=N=>{const S=N.replace(/[^\d\s\-()]/g,""),v=S?`${d.dial} ${S}`:"";n(v),b(S)},w=N=>{u(N),g(!1),m(""),_&&n(`${N.dial} ${_}`)};return i.jsxs("div",{className:"cj-space-y-2",children:[i.jsx(U,{className:"cj-text-sm cj-font-medium",children:e}),i.jsxs("div",{className:"cj-flex cj-gap-1.5",children:[i.jsxs(vi,{open:p,onOpenChange:g,children:[i.jsx(xi,{asChild:!0,children:i.jsxs(te,{variant:"outline",role:"combobox","aria-expanded":p,className:"cj-w-[100px] cj-justify-between cj-px-2 cj-shrink-0",children:[i.jsx("span",{className:"cj-text-base cj-leading-none",children:d.flag}),i.jsx("span",{className:"cj-text-xs cj-text-muted-foreground",children:d.dial}),i.jsx(dn,{className:"cj-h-3 cj-w-3 cj-opacity-50"})]})}),i.jsxs(fa,{className:"cj-w-[260px] cj-p-0",align:"start",children:[i.jsxs("div",{className:"cj-flex cj-items-center cj-border-b cj-px-3 cj-py-2",children:[i.jsx(zl,{className:"cj-h-4 cj-w-4 cj-shrink-0 cj-text-muted-foreground cj-mr-2"}),i.jsx("input",{placeholder:s("widget_search_country"),value:f,onChange:N=>m(N.target.value),className:"cj-flex-1 cj-bg-transparent cj-text-sm cj-outline-none placeholder:cj-text-muted-foreground"})]}),i.jsx(Gt,{className:"cj-h-[200px]",children:i.jsxs("div",{className:"cj-p-1",children:[j.map(N=>i.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:[i.jsx("span",{className:"cj-text-base",children:N.flag}),i.jsx("span",{className:"cj-flex-1 cj-text-left cj-truncate",children:N.name}),i.jsx("span",{className:"cj-text-xs cj-text-muted-foreground",children:N.dial})]},N.code)),j.length===0&&i.jsx("p",{className:"cj-py-4 cj-text-center cj-text-sm cj-text-muted-foreground",children:s("widget_no_country")})]})})]})]}),i.jsx(he,{type:"tel",value:_,onChange:N=>x(N.target.value),placeholder:r||s("placeholder_phone"),className:"cj-flex-1"})]}),c&&i.jsx("p",{className:"cj-text-xs cj-text-destructive",children:c}),!c&&o&&i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:o})]})}function Pk({label:e,value:t,onChange:n,placeholder:r,helpText:o,onValidationChange:a}){const{t:s}=be(),[c,l]=y.useState(null),d=f=>{const m=!!f&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(f);l(m?s("widget_invalid_email"):null),a==null||a(m)};y.useEffect(()=>{d(t)},[]);const u=f=>{const m=f.trim();n(m),d(m)};return i.jsxs("div",{className:"cj-space-y-2",children:[i.jsx(U,{className:"cj-text-sm cj-font-medium",children:e}),i.jsxs("div",{className:"cj-relative",children:[i.jsx(R_,{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"}),i.jsx(he,{type:"email",value:t,onChange:f=>u(f.target.value),placeholder:r||s("placeholder_email"),className:"cj-pl-9"})]}),c&&i.jsx("p",{className:"cj-text-xs cj-text-destructive",children:c}),!c&&o&&i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:o})]})}let ms=!1,no=!1;const Ha=[];function Ek(e){return ms?Promise.resolve():no?new Promise(t=>{Ha.push(t)}):(no=!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=()=>{ms=!0,no=!1,t(),Ha.forEach(o=>o()),Ha.length=0},r.onerror=()=>{no=!1,n(new Error("Failed to load Google Maps"))},document.head.appendChild(r)}))}function Mk({label:e,value:t,onChange:n,onValidationChange:r,googleMapsApiKey:o}){const{t:a}=be(),[s,c]=y.useState(""),[l,d]=y.useState([]),[u,f]=y.useState(!1),[m,p]=y.useState(!1),[g,_]=y.useState(ms),[j,b]=y.useState(!1),x=y.useRef(null),w=y.useRef(null),N=y.useRef(null),S=y.useRef();y.useEffect(()=>{if(t)try{const E=JSON.parse(t);E.address&&c(E.address)}catch{t&&c(t)}},[]),y.useEffect(()=>{if(!o){b(!0);return}Ek(o).then(()=>{_(!0),x.current=new window.google.maps.places.AutocompleteService,w.current=new window.google.maps.Geocoder}).catch(()=>b(!0))},[o]),y.useEffect(()=>{const E=M=>{N.current&&!N.current.contains(M.target)&&p(!1)};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[]);const v=y.useCallback(E=>{if(!x.current||E.length<3){d([]);return}f(!0),x.current.getPlacePredictions({input:E},(M,D)=>{f(!1),D===window.google.maps.places.PlacesServiceStatus.OK&&M?(d(M.map(z=>({place_id:z.place_id,description:z.description}))),p(!0)):d([])})},[]),C=E=>{const M=E.target.value;if(c(M),!M){n(""),d([]),p(!1);return}clearTimeout(S.current),S.current=setTimeout(()=>v(M),300)},P=E=>{p(!1),c(E.description),d([]),w.current&&w.current.geocode({placeId:E.place_id},(M,D)=>{if(D===window.google.maps.GeocoderStatus.OK&&(M!=null&&M[0])){const z=M[0].geometry.location,A={address:E.description,latitude:z.lat(),longitude:z.lng()};n(JSON.stringify(A))}else n(JSON.stringify({address:E.description,latitude:0,longitude:0}))})},k=()=>{c(""),n(""),d([]),p(!1)};return j||!o?i.jsxs("div",{className:"cj-space-y-2",children:[i.jsx(U,{children:e}),i.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:[i.jsx(ya,{className:"cj-h-5 cj-w-5 cj-mx-auto cj-mb-1 cj-opacity-50"}),a("location_no_api_key")]})]}):i.jsxs("div",{className:"cj-space-y-2",ref:N,children:[i.jsx(U,{children:e}),i.jsxs("div",{className:"cj-relative",children:[i.jsx(ya,{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"}),i.jsx(he,{value:s,onChange:C,onFocus:()=>l.length>0&&p(!0),placeholder:a("location_placeholder"),className:"cj-pl-9 cj-pr-8",disabled:!g}),u&&i.jsx(ys,{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&&s&&i.jsx("button",{type:"button",onClick:k,className:"cj-absolute cj-right-3 cj-top-1/2 cj--translate-y-1/2 cj-text-muted-foreground hover:cj-text-foreground",children:i.jsx(Wt,{className:"cj-h-4 cj-w-4"})}),m&&l.length>0&&i.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(E=>i.jsxs("button",{type:"button",onClick:()=>P(E),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:[i.jsx(ya,{className:"cj-h-4 cj-w-4 cj-mt-0.5 cj-shrink-0 cj-text-muted-foreground"}),i.jsx("span",{children:E.description})]},E.place_id))})]})]})}function Dk(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 Tk({label:e,value:t,onChange:n,helpText:r,variant:o="switch",options:a}){var u,f;const{t:s}=be(),c=Dk(t),l=((u=a==null?void 0:a[0])==null?void 0:u.label)??s("widget_yes"),d=((f=a==null?void 0:a[1])==null?void 0:f.label)??s("widget_no");return o==="segmented"?i.jsxs("div",{className:"cj-space-y-2",children:[e&&i.jsx(U,{className:"cj-text-sm cj-font-medium",children:e}),i.jsx("div",{role:"radiogroup",className:"cj-grid cj-grid-cols-2 cj-gap-2",children:[{val:!0,label:l},{val:!1,label:d}].map(m=>{const p=c===m.val;return i.jsx("button",{type:"button",role:"radio","aria-checked":p,onClick:()=>n(m.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:m.label},String(m.val))})}),r&&i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground",children:r})]}):i.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:[i.jsxs("div",{className:"cj-flex-1 cj-pr-3",children:[e&&i.jsx(U,{className:"cj-text-sm cj-font-medium cj-text-foreground",children:e}),r&&i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-mt-1",children:r})]}),i.jsx(Jt,{checked:c===!0,onCheckedChange:m=>n(!!m)})]})}const Rk={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 Ok({nodeData:e,value:t,onChange:n,onValidationChange:r,onFileSelect:o,googleMapsApiKey:a,hideLabel:s=!1}){var g,_;const{t:c}=be(),{schema:l,label:d,options:u}=e,f=s?"":e.required?`${e.labelOverride||d} *`:e.labelOverride||d,m=t!=null?String(t):"";switch(e.widget&&Rk[e.widget]||l){case"v1_string":return i.jsx(Gb,{label:f,value:m,onChange:n,multiline:e.widget==="textarea"});case"v2_single_option_select-1":return!u||u.length===0?i.jsx("div",{className:"cj-text-sm cj-text-muted-foreground",children:c("widget_no_options")}):i.jsx(aw,{label:f,value:m,onChange:n,options:u,variant:e.ui_variant??"auto"});case"v2_date-1":return i.jsx(vk,{label:f,value:m,onChange:n,allowFuture:e.allowFuture});case"v2_time-1":return i.jsx(bk,{label:f,value:m,onChange:n});case"v2_datetime-1":return i.jsx(Nk,{label:f,value:m,onChange:n,allowFuture:e.allowFuture??!0});case"v2_currency-1":return i.jsx(Sk,{label:f,value:m,onChange:n});case"v2_single_asset_upload":return i.jsx(Ck,{label:f,value:typeof t=="object"&&t!==null&&"filename"in t?t:m,onChange:n,onFileSelect:o,accept:(g=e.uploadConfig)==null?void 0:g.accept,maxSizeMB:(_=e.uploadConfig)==null?void 0:_.maxSizeMB});case"v2_phone-1":return i.jsx(kk,{label:f,value:m,onChange:n,onValidationChange:r});case"v2_email-1":return i.jsx(Pk,{label:f,value:m,onChange:n,onValidationChange:r});case"v2_address_coordinates":return i.jsx(Mk,{label:f,value:m,onChange:n,onValidationChange:r,googleMapsApiKey:a});case"v2_boolean-1":return i.jsx(Tk,{label:f,value:t,onChange:n,options:u,variant:e.ui_variant??"switch"});default:return i.jsxs("div",{className:"cj-p-4 cj-border cj-border-dashed cj-rounded-lg cj-text-center cj-text-muted-foreground",children:[i.jsx("p",{className:"cj-text-sm",children:c("widget_unknown_schema",{schema:l})}),i.jsx("p",{className:"cj-text-xs cj-mt-1",children:c("widget_no_widget")})]})}}var Ak=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function zk(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mp={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Ak,function(){Array.isArray||(Array.isArray=function(a){return Object.prototype.toString.call(a)==="[object Array]"});function n(a){for(var s=[],c=0,l=a.length;c<l;c++)s.indexOf(a[c])===-1&&s.push(a[c]);return s}var r={},o={"==":function(a,s){return a==s},"===":function(a,s){return a===s},"!=":function(a,s){return a!=s},"!==":function(a,s){return a!==s},">":function(a,s){return a>s},">=":function(a,s){return a>=s},"<":function(a,s,c){return c===void 0?a<s:a<s&&s<c},"<=":function(a,s,c){return c===void 0?a<=s:a<=s&&s<=c},"!!":function(a){return r.truthy(a)},"!":function(a){return!r.truthy(a)},"%":function(a,s){return a%s},log:function(a){return console.log(a),a},in:function(a,s){return!s||typeof s.indexOf>"u"?!1:s.indexOf(a)!==-1},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(a,s,c){if(c<0){var l=String(a).substr(s);return l.substr(0,l.length+c)}return String(a).substr(s,c)},"+":function(){return Array.prototype.reduce.call(arguments,function(a,s){return parseFloat(a,10)+parseFloat(s,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(a,s){return parseFloat(a,10)*parseFloat(s,10)})},"-":function(a,s){return s===void 0?-a:a-s},"/":function(a,s){return a/s},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,s){return a.concat(s)},[])},var:function(a,s){var c=s===void 0?null:s,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=[],s=Array.isArray(arguments[0])?arguments[0]:arguments,c=0;c<s.length;c++){var l=s[c],d=r.apply({var:l},this);(d===null||d==="")&&a.push(l)}return a},missing_some:function(a,s){var c=r.apply({missing:s},this);return s.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,s){if(Array.isArray(a))return a.map(function(j){return r.apply(j,s)});if(!r.is_logic(a))return a;var c=r.get_operator(a),l=a[c],d,u,f,m,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],s)))return r.apply(l[d+1],s);return l.length===d+1?r.apply(l[d],s):null}else if(c==="and"){for(d=0;d<l.length;d+=1)if(u=r.apply(l[d],s),!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],s),r.truthy(u))return u;return u}else{if(c==="filter")return m=r.apply(l[0],s),f=l[1],Array.isArray(m)?m.filter(function(j){return r.truthy(r.apply(f,j))}):[];if(c==="map")return m=r.apply(l[0],s),f=l[1],Array.isArray(m)?m.map(function(j){return r.apply(f,j)}):[];if(c==="reduce")return m=r.apply(l[0],s),f=l[1],p=typeof l[2]<"u"?r.apply(l[2],s):null,Array.isArray(m)?m.reduce(function(j,b){return r.apply(f,{current:b,accumulator:j})},p):p;if(c==="all"){if(m=r.apply(l[0],s),f=l[1],!Array.isArray(m)||!m.length)return!1;for(d=0;d<m.length;d+=1)if(!r.truthy(r.apply(f,m[d])))return!1;return!0}else if(c==="none"){if(m=r.apply(l[0],s),f=l[1],!Array.isArray(m)||!m.length)return!0;for(d=0;d<m.length;d+=1)if(r.truthy(r.apply(f,m[d])))return!1;return!0}else if(c==="some"){if(m=r.apply(l[0],s),f=l[1],!Array.isArray(m)||!m.length)return!1;for(d=0;d<m.length;d+=1)if(r.truthy(r.apply(f,m[d])))return!0;return!1}}if(l=l.map(function(j){return r.apply(j,s)}),o.hasOwnProperty(c)&&typeof o[c]=="function")return o[c].apply(s,l);if(c.indexOf(".")>0){var g=String(c).split("."),_=o;for(d=0;d<g.length;d++){if(!_.hasOwnProperty(g[d]))throw new Error("Unrecognized operation "+c+" (failed at "+g.slice(0,d+1).join(".")+")");_=_[g[d]]}return _.apply(s,l)}throw new Error("Unrecognized operation "+c)},r.uses_data=function(a){var s=[];if(r.is_logic(a)){var c=r.get_operator(a),l=a[c];Array.isArray(l)||(l=[l]),c==="var"?s.push(l[0]):l.forEach(function(d){s.push.apply(s,r.uses_data(d))})}return n(s)},r.add_operation=function(a,s){o[a]=s},r.rm_operation=function(a){delete o[a]},r.rule_like=function(a,s){if(s===a||s==="@")return!0;if(s==="number")return typeof a=="number";if(s==="string")return typeof a=="string";if(s==="array")return Array.isArray(a)&&!r.is_logic(a);if(r.is_logic(s)){if(r.is_logic(a)){var c=r.get_operator(s),l=r.get_operator(a);if(c==="@"||c===l)return r.rule_like(r.get_values(a,!1),r.get_values(s,!1))}return!1}if(Array.isArray(s))if(Array.isArray(a)){if(s.length!==a.length)return!1;for(var d=0;d<s.length;d+=1)if(!r.rule_like(a[d],s[d]))return!1;return!0}else return!1;return!1},r})})(Mp);var Ik=Mp.exports;const Xc=zk(Ik);function Wk(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 ro(e){return String(e).padStart(2,"0")}function Fk(e,t){const n=`${ro(e.getDate())}/${ro(e.getMonth()+1)}/${e.getFullYear()}`;return t?`${n} ${ro(e.getHours())}:${ro(e.getMinutes())}`:n}function $k(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=Wk(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 Fk(o,t==="datetime")}catch{return String(r)}default:return Array.isArray(r)?r.join(", "):String(r)}}function Lk(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 Bk(e,t){const n=t.filter(s=>typeof s=="number"&&!Number.isNaN(s));if(n.length===0)return null;let r;switch(e.operation){case"sum":r=n.reduce((s,c)=>s+c,0);break;case"subtract":r=n.slice(1).reduce((s,c)=>s-c,n[0]);break;case"multiply":r=n.reduce((s,c)=>s*c,1);break;case"divide":r=n.slice(1).reduce((s,c)=>c===0?NaN:s/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 Hk(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 co(e){var t;return!!(e.computed&&((t=e.computed.operand_field_ids)!=null&&t.length))}function qk(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 Yk(e){return Pb(e,".jb-widget-root.jb-themed")}function pn(e,t){const n=e.bindings;return n!=null&&n.length?t[n[0].target_namespace]:t[e.namespace]}function Vk(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 Kc(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 bi(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 Uk(e){const{journey:t}=e,n=y.useMemo(()=>t.form_config?qa(t.form_config):Qc(t),[t]),r=y.useMemo(()=>Yk(t.theme),[t.theme]);return i.jsxs(i.Fragment,{children:[r&&i.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),i.jsx(Gk,{...e,formConfig:n})]})}function Gk({formConfig:e,onSubmit:t,onSave:n,onFileSelect:r,onStepApiCall:o,onStepApiError:a,onInitApiCall:s,enrichedOutput:c=!1,initialAnswers:l,googleMapsApiKey:d,fullScreen:u=!0,showWelcome:f=!0}){const{t:m}=be(),{steps:p,fields:g,summary:_,init:j}=e,b=y.useMemo(()=>{const F=new Map;for(const J of g)F.set(J.field_id,J);return F},[g]),[x,w]=y.useState(()=>({...(j==null?void 0:j.values)||{},...l||{}})),[N,S]=y.useState({}),[v,C]=y.useState(p[0]?[p[0].step_id]:[]),[P,k]=y.useState(f?"welcome":"form"),[E,M]=y.useState(!1),[D,z]=y.useState(!1);y.useEffect(()=>{var J;if(!((J=j==null?void 0:j.api)!=null&&J.enabled)||!j.api.url)return;let F=!1;return(async()=>{try{const le=j.api.method||"GET",X=j.api.url,ae=s?await s({method:le,url:X}):await fetch(X,{method:le}).then(qe=>qe.json());if(F)return;const Ce=j.api.mapping||{},xe={};for(const[qe,Ie]of Object.entries(Ce))xe[qe]=bi(ae,Ie);w(qe=>({...qe,...xe}))}catch(le){console.error("[FormRunner] init API failed",le)}})(),()=>{F=!0}},[]);const A=v[v.length-1],L=p.find(F=>F.step_id===A),W=L?p.findIndex(F=>F.step_id===L.step_id):-1,Q=y.useCallback(F=>{var le,X;const J={...F};for(const ae of g){const Ce=(X=(le=ae.bindings)==null?void 0:le[0])==null?void 0:X.target_namespace,xe=Ce?F[Ce]:F[ae.namespace];ae.namespace&&J[ae.namespace]===void 0&&xe!==void 0&&(J[ae.namespace]=xe)}return J},[g]),Y=y.useCallback((F,J,le)=>{if(F==null)return le;try{return!!Xc.apply(F,{answers:Q(J)})}catch(X){return console.warn("[FormRunner] field condition eval error",X),le}},[Q]),O=y.useCallback((F,J)=>Y(F.visibleWhen,J,!0),[Y]),se=y.useCallback((F,J)=>Y(F.enabledWhen,J,!0),[Y]),fe=y.useCallback((F,J)=>F.requiredWhen!==null&&F.requiredWhen!==void 0?Y(F.requiredWhen,J,!1):!!F.required,[Y]);y.useEffect(()=>{var J,le;if(!L)return;const F=[];for(const X of L.rows)for(const ae of X.field_ids){const Ce=b.get(ae);if(Ce&&!co(Ce)&&!O(Ce,x)){const xe=((le=(J=Ce.bindings)==null?void 0:J[0])==null?void 0:le.target_namespace)||Ce.namespace;x[xe]!==void 0&&x[xe]!==null&&x[xe]!==""&&F.push(xe)}}F.length!==0&&w(X=>{const ae={...X};for(const Ce of F)delete ae[Ce];return ae})},[x,L,b,O]);const ue=y.useCallback((F,J)=>{w(le=>Vk(F,J,le))},[]),R=y.useCallback(async(F,J)=>{if(r)return r(J,F.namespace)},[r]);y.useEffect(()=>{var le,X;const F=g.filter(co);if(F.length===0)return;const J={};for(const ae of F){const Ce=(ae.computed.operand_field_ids||[]).map(Ke=>b.get(Ke)).filter(Ke=>!!Ke).map(Ke=>Lk(pn(Ke,x))),xe=Bk(ae.computed,Ce),qe=((X=(le=ae.bindings)==null?void 0:le[0])==null?void 0:X.target_namespace)||ae.namespace,Ie=x[qe];xe!==(Ie===void 0?null:Ie)&&(J[qe]=xe)}Object.keys(J).length!==0&&w(ae=>({...ae,...J}))},[x,g,b]);const I=y.useCallback(F=>{for(const J of F.rows)for(const le of J.field_ids){const X=b.get(le);if(!X||co(X)||!O(X,x)||!fe(X,x))continue;const ae=pn(X,x);if(ae==null||ae==="")return!1}return!0},[x,b,O,fe]),H=y.useCallback((F,J)=>{const le=[...F.navigation.rules].sort((X,ae)=>(ae.priority||0)-(X.priority||0));for(const X of le){if(X.condition===null)return X.next_step_id;try{if(Xc.apply(X.condition,{answers:J}))return X.next_step_id}catch(ae){console.warn("[FormRunner] rule eval error",ae)}}return"__submit__"},[]),G=y.useMemo(()=>{if(!L)return v;const F=[...v],J=new Set(F);let le=L;for(;le;){const X=H(le,x);if(X==="__submit__"||J.has(X))break;const ae=p.find(Ce=>Ce.step_id===X);if(!ae)break;F.push(X),J.add(X),le=ae}return F},[x,L,H,v,p]),T=P==="form"?v.length:Math.max(W+1,1),B=Math.max(G.length,T,1),ee=P==="summary"?100:P==="welcome"?0:Math.round(T/B*100),K=y.useCallback(async()=>{if(!L)return;if(!I(L)){z(!0),Nn.error(m("runner_toast_required_fields"));return}z(!1),window.scrollTo({top:0,behavior:"smooth"});const F=L.navigation.api_call;if(F!=null&&F.enabled&&F.url){const le=Kc(F.url,x),X={"Content-Type":"application/json",...F.headers||{}},ae=F.body_template?Kc(F.body_template,x):void 0,Ce=F.method!=="GET"&&!!ae;let xe;if(Ce)try{xe=JSON.parse(ae)}catch{xe=ae}const qe={step_id:L.step_id,method:F.method,url:le,headers:X,body:xe,answers:x};M(!0);try{let Ie=null;o?Ie=await o(qe):Ie=await(await fetch(le,{method:F.method,headers:X,body:Ce?ae:void 0})).json().catch(()=>null),S(ot=>({...ot,[L.step_id]:Ie}))}catch(Ie){if(console.error("[FormRunner] step API failed",Ie),a)try{a(Ie,qe)}catch(Ke){console.error("[FormRunner] onStepApiError handler threw",Ke)}const ot=F.on_error??"block";if(ot==="block"){a||Nn.error(m("runner_toast_api_failed")),M(!1);return}if(typeof ot=="string"&&ot.startsWith("goto:")){const Ke=ot.slice(5);M(!1),Ke==="__submit__"||v.includes(Ke)?k("summary"):C(Je=>[...Je,Ke]);return}}M(!1)}const J=H(L,x);if(J==="__submit__"){k("summary");return}if(v.includes(J)){k("summary");return}C(le=>[...le,J])},[L,x,H,v,I,o,a]),ie=y.useCallback(()=>{if(P==="summary"){k("form"),window.scrollTo({top:0,behavior:"smooth"});return}v.length>1&&(C(v.slice(0,-1)),window.scrollTo({top:0,behavior:"smooth"}))},[v,P]),ce=y.useCallback(F=>{if(!c)return F;const J={};for(const[le,X]of Object.entries(F)){const ae=g.find(Ce=>{var xe;return((xe=Ce.bindings)==null?void 0:xe.some(qe=>qe.target_namespace===le))||Ce.namespace===le});J[le]={data:X,schema:(ae==null?void 0:ae.schema)||"unknown"}}return J},[c,g]),pe=y.useCallback(()=>{const F=ce(x);t?t(F):navigator.clipboard.writeText(JSON.stringify(F,null,2)).then(()=>{Nn.success(m("runner_toast_answers_copied"))})},[x,ce,t]),Ee=y.useCallback(()=>{w({...(j==null?void 0:j.values)||{}}),S({}),C(p[0]?[p[0].step_id]:[]),k(f?"welcome":"form"),z(!1)},[j,p,f]);return p.length===0?i.jsx("div",{className:`jb-widget-root jb-themed ${u?"cj-min-h-screen":"cj-h-full"} cj-bg-background cj-flex cj-items-center cj-justify-center cj-p-6`,children:i.jsx("p",{className:"cj-text-muted-foreground cj-text-base",children:"No form to display."})}):i.jsxs("div",{className:`jb-widget-root jb-themed ${u?"cj-min-h-screen":"cj-h-full"} cj-flex cj-flex-col cj-bg-background`,style:{fontFamily:"var(--claims-journey-font-body)"},children:[i.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:[i.jsx("span",{className:"cj-text-xs cj-font-medium cj-text-muted-foreground cj-uppercase cj-tracking-wide",children:P==="summary"?_.title||"Summary":P==="welcome"?"":`Step ${T} of ${B}`}),i.jsxs("div",{className:"cj-flex cj-items-center cj-gap-3",children:[n&&Object.keys(x).length>0&&P!=="summary"&&i.jsx("button",{onClick:()=>n(ce(x)),className:"cj-text-xs cj-text-muted-foreground hover:cj-text-foreground cj-bg-transparent cj-border-none cj-cursor-pointer",children:"Save & exit"}),i.jsxs("button",{onClick:Ee,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:[i.jsx(Al,{className:"cj-h-3.5 cj-w-3.5"}),"Reset"]})]})]}),i.jsx("div",{className:"cj-px-4 sm:cj-px-6 cj-bg-card",children:i.jsx(dm,{value:ee,className:"cj-h-1 cj-rounded-none"})}),i.jsxs("main",{className:"cj-flex-1 cj-flex cj-flex-col md:cj-flex-row cj-items-stretch cj-w-full",children:[P==="form"&&i.jsx("div",{className:"md:cj-hidden cj-border-b cj-border-border/40 cj-bg-card",children:i.jsx(Xk,{formConfig:e,answers:x,apiResponses:N,currentStepIndex:W+1})}),i.jsx("div",{className:"cj-flex-1 md:cj-w-[70%] cj-flex cj-justify-center cj-px-4 sm:cj-px-6 cj-py-6 md:cj-py-8 md:cj-px-3",children:i.jsx("div",{className:"cj-w-full cj-max-w-4xl",children:P==="welcome"?i.jsx(Qk,{onStart:()=>{k("form"),window.scrollTo({top:0,behavior:"smooth"})}}):P==="summary"?i.jsx(Jk,{formConfig:e,answers:x,apiResponses:N,currentStepIndex:W+1,onBack:ie,onSubmit:pe}):L?i.jsx(Kk,{step:L,fields:b,answers:x,onAnswerChange:ue,onFileSelect:R,googleMapsApiKey:d,onNext:K,onBack:ie,canGoBack:v.length>1,submitting:E,showValidation:D,stepIndex:T,isFieldVisible:O,isFieldEnabled:se,isFieldRequired:fe}):null})}),P==="form"&&i.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:i.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:i.jsx(Dp,{formConfig:e,answers:x,apiResponses:N,currentStepIndex:W+1})})})]})]})}function Dp({formConfig:e,answers:t,apiResponses:n,currentStepIndex:r}){const{summary:o,fields:a}=e,s=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(f=>{f.field_ids.forEach(m=>{const p=s.get(m);if(!p)return;const g=pn(p,t);d.push({label:p.label||p.namespace,value:ps(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,f=d.until_step;if(r<u||f!==void 0&&r>f)return;const m=d.display_fields.map(p=>{let g,_;if(p.source==="form_field"&&p.field_id){const j=s.get(p.field_id);j&&(g=pn(j,t),_=j.options)}else if(p.source==="api_response"&&p.step_id){const j=n[p.step_id];g=bi(j,p.response_path||"")}return{label:p.label||"(label)",value:ps(g,p.format,_)}});l.push({id:d.section_id,title:d.title,rows:m})}),l},[o,e.steps,s,t,n,r]);return i.jsxs("div",{children:[i.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?i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-italic",children:"Suas respostas aparecerรฃo aqui."}):i.jsx("div",{className:"cj-space-y-8",children:c.map((l,d)=>i.jsxs("div",{className:d>0?"cj-pt-8 cj-border-t cj-border-border/40":"",children:[i.jsx("h3",{className:"cj-text-xs cj-font-bold cj-uppercase cj-tracking-wider cj-text-muted-foreground cj-mb-4",children:l.title}),i.jsxs("div",{className:"cj-space-y-4",children:[l.rows.map((u,f)=>i.jsxs("div",{className:"cj-flex cj-flex-col cj-gap-2 cj-text-sm cj-leading-relaxed",children:[i.jsx("span",{className:"cj-text-muted-foreground cj-text-left",children:u.label}),i.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})]},f)),l.rows.length===0&&i.jsx("p",{className:"cj-text-xs cj-text-muted-foreground cj-italic",children:"โ"})]})]},l.id))})]})}function Xk(e){const[t,n]=y.useState(!1),{formConfig:r,answers:o}=e,a=y.useMemo(()=>{let s=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 f=c.get(u);if(!f)return;const m=pn(f,o);m!=null&&m!==""&&s++}))),s},[r,o]);return i.jsxs("div",{children:[i.jsxs("button",{type:"button",onClick:()=>n(s=>!s),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:[i.jsxs("div",{className:"cj-flex cj-items-center cj-gap-2",children:[i.jsx("div",{className:"cj-h-1.5 cj-w-1.5 cj-rounded-full cj-bg-primary"}),i.jsx("span",{className:"cj-text-xs cj-font-semibold cj-text-foreground",children:r.summary.title||"Summary"}),i.jsxs("span",{className:"cj-text-xs cj-text-muted-foreground",children:["ยท ",a," preenchidos"]})]}),i.jsx(dn,{className:`cj-h-4 cj-w-4 cj-text-muted-foreground cj-transition-transform ${t?"cj-rotate-180":""}`})]}),t&&i.jsx("div",{className:"cj-px-4 cj-pb-4",children:i.jsx(Dp,{...e})})]})}const ps=$k;function Kk({step:e,fields:t,answers:n,onAnswerChange:r,onFileSelect:o,googleMapsApiKey:a,onNext:s,onBack:c,canGoBack:l,submitting:d,showValidation:u,stepIndex:f,isFieldVisible:m,isFieldEnabled:p,isFieldRequired:g}){return i.jsxs("div",{className:"cj-space-y-4",children:[i.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:[i.jsxs("div",{className:"cj-flex cj-items-center cj-gap-3",children:[i.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:f}),i.jsxs("div",{className:"cj-flex-1 cj-min-w-0",children:[i.jsx("h2",{className:"cj-text-lg cj-font-semibold cj-text-foreground",style:{fontFamily:"var(--claims-journey-font-heading)"},children:e.title}),e.description&&i.jsx("p",{className:"cj-text-sm cj-text-muted-foreground",children:e.description})]})]}),i.jsx("div",{className:"cj-space-y-4",children:e.rows.map(_=>{const j=_.field_ids.map(v=>t.get(v)).filter(v=>!!v).filter(v=>m(v,n));if(j.length===0)return null;const b=Math.min(j.length,3),x=_.layout==="horizontal",w=b===3?2:b===2?3:6,N=v=>{switch(v){case"1/3":return 2;case"1/2":return 3;case"2/3":return 4;case"full":return 6;default:return w}},S=v=>{switch(v){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 i.jsxs("div",{className:"cj-space-y-3",children:[_.show_divider&&i.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"}),_.title&&i.jsx("h3",{className:"cj-text-base sm:cj-text-lg cj-font-semibold cj-text-foreground cj-leading-tight",children:_.title}),i.jsx("div",{className:x?"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(v=>{const C=pn(v,n),P=p(v,n),k=x?S(N(v.width)):"";if(co(v)){const z=typeof C=="number"?C:null;return i.jsxs("div",{className:`cj-flex cj-flex-col cj-gap-1 ${k} ${P?"":"cj-opacity-60"}`,children:[i.jsx("label",{className:"cj-text-xs cj-font-medium cj-uppercase cj-tracking-wide cj-text-muted-foreground",children:v.labelOverride||v.label}),i.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:Hk(v,z)})]},v.field_id)}const E=g(v,n),M=u&&E&&(C==null||C===""),D={...qk(v),required:E};return i.jsx("div",{className:`${k} ${M?"cj-rounded-xl cj-ring-2 cj-ring-destructive/40 cj-p-2":""} ${P?"":"cj-opacity-60 cj-pointer-events-none"}`,"aria-disabled":!P||void 0,children:i.jsx(Ok,{nodeData:D,value:C,onChange:z=>r(v,z),onFileSelect:z=>o(v,z),googleMapsApiKey:a})},v.field_id)})})]},_.row_id)})})]}),i.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between",children:[i.jsxs(te,{variant:"ghost",size:"sm",onClick:c,disabled:!l||d,className:"cj-text-muted-foreground hover:cj-text-foreground",children:[i.jsx(Ml,{className:"cj-h-4 cj-w-4 cj-mr-1.5"}),"Back"]}),i.jsx(te,{size:"default",onClick:s,disabled:d,className:"cj-rounded-xl cj-px-6",children:d?i.jsxs(i.Fragment,{children:[i.jsx(ys,{className:"cj-h-4 cj-w-4 cj-mr-1.5 cj-animate-spin"}),"Loadingโฆ"]}):i.jsxs(i.Fragment,{children:[e.navigation.button_label||"Continue",i.jsx(Oo,{className:"cj-h-4 cj-w-4 cj-ml-1.5"})]})})]})]})}function Jk({formConfig:e,answers:t,apiResponses:n,currentStepIndex:r,onBack:o,onSubmit:a}){const{t:s}=be(),{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,f=(g,_,j)=>u(g)&&g.url?i.jsx("a",{href:g.url,target:"_blank",rel:"noopener noreferrer",className:"cj-text-primary cj-underline cj-break-all",onClick:b=>b.stopPropagation(),children:g.filename}):ps(g,_,j),m=[];e.steps.forEach(g=>{g.rows.forEach(_=>{_.field_ids.forEach(j=>{const b=d.get(j);if(!b)return;const x=pn(b,t);x==null||x===""||Array.isArray(x)&&x.length===0||m.push({id:j,label:b.label||b.namespace,value:x,format:b.schema,options:b.options})})})});const p=g=>m.length===0?i.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:s("runner_no_answers")}):i.jsxs("div",{className:"cj-rounded-2xl cj-bg-card cj-border cj-border-border/30 cj-overflow-hidden",children:[g&&i.jsx("div",{className:"cj-px-4 cj-py-3 cj-border-b cj-border-border/30 cj-bg-muted/30",children:i.jsx("h3",{className:"cj-text-sm cj-font-semibold",children:s("runner_summary_all_answers")})}),i.jsx("div",{className:"cj-divide-y cj-divide-border/30",children:m.map(_=>i.jsxs("div",{className:"cj-px-4 cj-py-3",children:[i.jsx("div",{className:"cj-text-xs cj-text-muted-foreground cj-font-medium",children:_.label}),i.jsx("div",{className:"cj-text-sm cj-font-medium cj-mt-0.5 cj-break-words",children:f(_.value,_.format,_.options)})]},_.id))})]});return i.jsxs("div",{className:"cj-space-y-4",children:[i.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:[i.jsx(y_,{className:"cj-h-7 cj-w-7 cj-text-primary cj-mx-auto"}),i.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 _=g.visible_from_step??1,j=g.until_step;return r<_||j!==void 0&&r>j?null:i.jsxs("div",{className:"cj-rounded-2xl cj-bg-card cj-border cj-border-border/30 cj-overflow-hidden",children:[i.jsx("div",{className:"cj-px-4 cj-py-3 cj-border-b cj-border-border/30 cj-bg-muted/30",children:i.jsx("h3",{className:"cj-text-sm cj-font-semibold",children:g.title})}),i.jsxs("div",{className:"cj-divide-y cj-divide-border/30",children:[g.display_fields.map(b=>{let x,w;if(b.source==="form_field"&&b.field_id){const N=d.get(b.field_id);N&&(x=pn(N,t),w=N.options)}else if(b.source==="api_response"&&b.step_id){const N=n[b.step_id];x=bi(N,b.response_path||"")}return i.jsxs("div",{className:"cj-px-4 cj-py-3",children:[i.jsx("div",{className:"cj-text-xs cj-text-muted-foreground cj-font-medium",children:b.label||"(label)"}),i.jsx("div",{className:"cj-text-sm cj-font-medium cj-mt-0.5",children:f(x,b.format,w)})]},b.display_id)}),g.display_fields.length===0&&i.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),i.jsxs("div",{className:"cj-flex cj-items-center cj-justify-between cj-pt-2",children:[i.jsxs(te,{variant:"ghost",size:"sm",onClick:o,className:"cj-text-muted-foreground hover:cj-text-foreground",children:[i.jsx(Ml,{className:"cj-h-4 cj-w-4 cj-mr-1.5"}),"Back"]}),i.jsxs(te,{size:"default",onClick:a,className:"cj-rounded-xl cj-px-6",children:[i.jsx(W_,{className:"cj-h-4 cj-w-4 cj-mr-1.5"}),"Submit"]})]})]})}function Qk({onStart:e}){const{t}=be();return i.jsx("div",{className:"cj-w-full cj-max-w-xl cj-mx-auto cj-py-8",style:{fontFamily:"var(--claims-journey-font-body)"},children:i.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:[i.jsx("div",{className:"cj-h-16 cj-w-16 cj-rounded-full cj-bg-muted cj-flex cj-items-center cj-justify-center",children:i.jsx(C_,{className:"cj-h-7 cj-w-7 cj-text-muted-foreground"})}),i.jsxs("div",{className:"cj-space-y-3",children:[i.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")}),i.jsx("p",{className:"cj-text-sm cj-text-muted-foreground",children:t("runner_onboarding_line2")})]}),i.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"),i.jsx(Oo,{className:"cj-h-4 cj-w-4 cj-ml-2"})]})]})})}const Zk="http://json-schema.org/draft-07/schema#",eP="https://habit.ai/schemas/form-config.schema.json",tP="FormConfig",nP="v2.0 linear form configuration: ordered steps, a flat field catalog, summary panel, and init values.",rP="object",oP=["steps","fields","summary","init"],aP=!1,sP={steps:{type:"array",items:{$ref:"#/definitions/FormStep"}},fields:{type:"array",items:{$ref:"#/definitions/FormField"}},summary:{$ref:"#/definitions/SummaryPanelConfig"},init:{$ref:"#/definitions/InitConfig"}},iP={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"},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"}}}}}}},cP={$schema:Zk,$id:eP,title:tP,description:nP,type:rP,required:oP,additionalProperties:aP,properties:sP,definitions:iP},lP="http://json-schema.org/draft-07/schema#",dP="https://habit.ai/schemas/journey-spec.schema.json",uP="JourneySpec (v2.0)",fP="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.",mP="object",pP=["journey_id","claimspec_id","version"],hP=!0,_P={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"}}},gP=[{required:["form_config"]},{required:["nodes","edges"]}],jP={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"]}}}},yP={$schema:lP,$id:dP,title:uP,description:fP,type:mP,required:pP,additionalProperties:hP,properties:_P,anyOf:gP,definitions:jP};exports.FormRunnerWidget=Uk;exports.JourneyBuilderWidget=Ib;exports.PortalContainerContext=na;exports.SCHEMA_TYPES=br;exports.formConfigSchema=cP;exports.getSchemaInfo=oa;exports.journeySpecSchema=yP;exports.setLanguage=vd;exports.useTranslation=be;
|
|
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;
|