@mieweb/forms-editor 2.1.1 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -5,343 +5,343 @@
5
5
  if (!document.querySelector('#questionnaire-editor-styles')) {
6
6
  const style = document.createElement('style');
7
7
  style.id = 'questionnaire-editor-styles';
8
- style.textContent = "/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */\n@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap');\n@layer properties;\n:root, :host {\n --mie-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',\n monospace;\n --mie-color-blue-500: oklch(62.3% 0.214 259.815);\n --mie-color-blue-600: oklch(54.6% 0.245 262.881);\n --mie-color-gray-200: oklch(92.8% 0.006 264.531);\n --mie-color-gray-900: oklch(21% 0.034 264.665);\n --mie-color-white: #fff;\n --mie-spacing: 0.25rem;\n --mie-container-md: 28rem;\n --mie-container-xl: 36rem;\n --mie-container-4xl: 56rem;\n --mie-container-7xl: 80rem;\n --mie-text-xs: 0.75rem;\n --mie-text-xs--line-height: calc(1 / 0.75);\n --mie-text-sm: 0.875rem;\n --mie-text-sm--line-height: calc(1.25 / 0.875);\n --mie-text-base: 1rem;\n --mie-text-base--line-height: calc(1.5 / 1);\n --mie-text-lg: 1.125rem;\n --mie-text-lg--line-height: calc(1.75 / 1.125);\n --mie-text-xl: 1.25rem;\n --mie-text-xl--line-height: calc(1.75 / 1.25);\n --mie-font-weight-light: 300;\n --mie-font-weight-normal: 400;\n --mie-font-weight-medium: 500;\n --mie-font-weight-semibold: 600;\n --mie-tracking-wide: 0.025em;\n --mie-leading-relaxed: 1.625;\n --mie-radius-md: 0.375rem;\n --mie-radius-lg: 0.5rem;\n --mie-radius-xl: 0.75rem;\n --mie-radius-2xl: 1rem;\n --mie-default-transition-duration: 150ms;\n --mie-default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --mie-font-titillium: \"Titillium Web\", sans-serif;\n --mie-color-mieprimary: #3b82f6;\n --mie-color-miesecondary: #6b7280;\n --mie-color-mieaccent: #10b981;\n --mie-color-miedanger: #ef4444;\n --mie-color-miewarning: #f97316;\n --mie-color-miesurface: #ffffff;\n --mie-color-mieborder: #e5e7eb;\n --mie-color-mieborderinactive: #9ca3af;\n --mie-color-mietext: #111827;\n --mie-color-mietextsecondary: #f8fafc;\n --mie-color-mietextmuted: #6b7280;\n --mie-color-miebackground: #f9fafb;\n --mie-color-miebackgroundsecondary: #f3f4f6;\n --mie-color-miebackgroundhover: #eceef1;\n --mie-color-mieoverlay: rgba(0, 0, 0, 0.5);\n}\n.mie\\:pointer-events-none {\n pointer-events: none;\n}\n.mie\\:absolute {\n position: absolute;\n}\n.mie\\:fixed {\n position: fixed;\n}\n.mie\\:relative {\n position: relative;\n}\n.mie\\:sticky {\n position: sticky;\n}\n.mie\\:inset-0 {\n inset: calc(var(--mie-spacing) * 0);\n}\n.mie\\:top-0 {\n top: calc(var(--mie-spacing) * 0);\n}\n.mie\\:top-1\\/2 {\n top: calc(1/2 * 100%);\n}\n.mie\\:top-2 {\n top: calc(var(--mie-spacing) * 2);\n}\n.mie\\:top-3 {\n top: calc(var(--mie-spacing) * 3);\n}\n.mie\\:top-11 {\n top: calc(var(--mie-spacing) * 11);\n}\n.mie\\:right-0 {\n right: calc(var(--mie-spacing) * 0);\n}\n.mie\\:right-2 {\n right: calc(var(--mie-spacing) * 2);\n}\n.mie\\:right-3 {\n right: calc(var(--mie-spacing) * 3);\n}\n.mie\\:bottom-0 {\n bottom: calc(var(--mie-spacing) * 0);\n}\n.mie\\:bottom-5 {\n bottom: calc(var(--mie-spacing) * 5);\n}\n.mie\\:bottom-full {\n bottom: 100%;\n}\n.mie\\:-left-2 {\n left: calc(var(--mie-spacing) * -2);\n}\n.mie\\:left-0 {\n left: calc(var(--mie-spacing) * 0);\n}\n.mie\\:left-5 {\n left: calc(var(--mie-spacing) * 5);\n}\n.mie\\:z-10 {\n z-index: 10;\n}\n.mie\\:z-20 {\n z-index: 20;\n}\n.mie\\:z-40 {\n z-index: 40;\n}\n.mie\\:z-50 {\n z-index: 50;\n}\n.mie\\:z-9999 {\n z-index: 9999;\n}\n.mie\\:m-0 {\n margin: calc(var(--mie-spacing) * 0);\n}\n.mie\\:-mx-6 {\n margin-inline: calc(var(--mie-spacing) * -6);\n}\n.mie\\:mx-4 {\n margin-inline: calc(var(--mie-spacing) * 4);\n}\n.mie\\:mx-auto {\n margin-inline: auto;\n}\n.mie\\:my-2 {\n margin-block: calc(var(--mie-spacing) * 2);\n}\n.mie\\:-mt-6 {\n margin-top: calc(var(--mie-spacing) * -6);\n}\n.mie\\:mt-1 {\n margin-top: calc(var(--mie-spacing) * 1);\n}\n.mie\\:mt-2 {\n margin-top: calc(var(--mie-spacing) * 2);\n}\n.mie\\:mt-3 {\n margin-top: calc(var(--mie-spacing) * 3);\n}\n.mie\\:mt-4 {\n margin-top: calc(var(--mie-spacing) * 4);\n}\n.mie\\:mb-1 {\n margin-bottom: calc(var(--mie-spacing) * 1);\n}\n.mie\\:mb-1\\.5 {\n margin-bottom: calc(var(--mie-spacing) * 1.5);\n}\n.mie\\:mb-2 {\n margin-bottom: calc(var(--mie-spacing) * 2);\n}\n.mie\\:mb-3 {\n margin-bottom: calc(var(--mie-spacing) * 3);\n}\n.mie\\:mb-4 {\n margin-bottom: calc(var(--mie-spacing) * 4);\n}\n.mie\\:mb-6 {\n margin-bottom: calc(var(--mie-spacing) * 6);\n}\n.mie\\:ml-2 {\n margin-left: calc(var(--mie-spacing) * 2);\n}\n.mie\\:ml-auto {\n margin-left: auto;\n}\n.mie\\:block {\n display: block;\n}\n.mie\\:flex {\n display: flex;\n}\n.mie\\:grid {\n display: grid;\n}\n.mie\\:hidden {\n display: none;\n}\n.mie\\:inline-flex {\n display: inline-flex;\n}\n.mie\\:h-1 {\n height: calc(var(--mie-spacing) * 1);\n}\n.mie\\:h-3 {\n height: calc(var(--mie-spacing) * 3);\n}\n.mie\\:h-3\\.5 {\n height: calc(var(--mie-spacing) * 3.5);\n}\n.mie\\:h-4 {\n height: calc(var(--mie-spacing) * 4);\n}\n.mie\\:h-5 {\n height: calc(var(--mie-spacing) * 5);\n}\n.mie\\:h-6 {\n height: calc(var(--mie-spacing) * 6);\n}\n.mie\\:h-7 {\n height: calc(var(--mie-spacing) * 7);\n}\n.mie\\:h-8 {\n height: calc(var(--mie-spacing) * 8);\n}\n.mie\\:h-10 {\n height: calc(var(--mie-spacing) * 10);\n}\n.mie\\:h-11 {\n height: calc(var(--mie-spacing) * 11);\n}\n.mie\\:h-12 {\n height: calc(var(--mie-spacing) * 12);\n}\n.mie\\:h-24 {\n height: calc(var(--mie-spacing) * 24);\n}\n.mie\\:h-72 {\n height: calc(var(--mie-spacing) * 72);\n}\n.mie\\:h-auto {\n height: auto;\n}\n.mie\\:h-fit {\n height: fit-content;\n}\n.mie\\:h-full {\n height: 100%;\n}\n.mie\\:max-h-32 {\n max-height: calc(var(--mie-spacing) * 32);\n}\n.mie\\:max-h-48 {\n max-height: calc(var(--mie-spacing) * 48);\n}\n.mie\\:max-h-56 {\n max-height: calc(var(--mie-spacing) * 56);\n}\n.mie\\:max-h-60 {\n max-height: calc(var(--mie-spacing) * 60);\n}\n.mie\\:max-h-64 {\n max-height: calc(var(--mie-spacing) * 64);\n}\n.mie\\:max-h-75 {\n max-height: calc(var(--mie-spacing) * 75);\n}\n.mie\\:max-h-\\[60vh\\] {\n max-height: 60vh;\n}\n.mie\\:max-h-\\[calc\\(100svh-13rem\\)\\] {\n max-height: calc(100svh - 13rem);\n}\n.mie\\:max-h-\\[calc\\(100svh-24rem\\)\\] {\n max-height: calc(100svh - 24rem);\n}\n.mie\\:max-h-none {\n max-height: none;\n}\n.mie\\:min-h-10 {\n min-height: calc(var(--mie-spacing) * 10);\n}\n.mie\\:min-h-24 {\n min-height: calc(var(--mie-spacing) * 24);\n}\n.mie\\:min-h-64 {\n min-height: calc(var(--mie-spacing) * 64);\n}\n.mie\\:w-1\\/2 {\n width: calc(1/2 * 100%);\n}\n.mie\\:w-3 {\n width: calc(var(--mie-spacing) * 3);\n}\n.mie\\:w-3\\.5 {\n width: calc(var(--mie-spacing) * 3.5);\n}\n.mie\\:w-3\\/4 {\n width: calc(3/4 * 100%);\n}\n.mie\\:w-4 {\n width: calc(var(--mie-spacing) * 4);\n}\n.mie\\:w-5 {\n width: calc(var(--mie-spacing) * 5);\n}\n.mie\\:w-6 {\n width: calc(var(--mie-spacing) * 6);\n}\n.mie\\:w-7 {\n width: calc(var(--mie-spacing) * 7);\n}\n.mie\\:w-8 {\n width: calc(var(--mie-spacing) * 8);\n}\n.mie\\:w-12 {\n width: calc(var(--mie-spacing) * 12);\n}\n.mie\\:w-20 {\n width: calc(var(--mie-spacing) * 20);\n}\n.mie\\:w-32 {\n width: calc(var(--mie-spacing) * 32);\n}\n.mie\\:w-fit {\n width: fit-content;\n}\n.mie\\:w-full {\n width: 100%;\n}\n.mie\\:w-px {\n width: 1px;\n}\n.mie\\:max-w-4xl {\n max-width: var(--mie-container-4xl);\n}\n.mie\\:max-w-7xl {\n max-width: var(--mie-container-7xl);\n}\n.mie\\:max-w-\\[80vw\\] {\n max-width: 80vw;\n}\n.mie\\:max-w-full {\n max-width: 100%;\n}\n.mie\\:max-w-md {\n max-width: var(--mie-container-md);\n}\n.mie\\:max-w-xl {\n max-width: var(--mie-container-xl);\n}\n.mie\\:min-w-0 {\n min-width: calc(var(--mie-spacing) * 0);\n}\n.mie\\:min-w-\\[44px\\] {\n min-width: 44px;\n}\n.mie\\:flex-1 {\n flex: 1;\n}\n.mie\\:shrink-0 {\n flex-shrink: 0;\n}\n.mie\\:-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n}\n.mie\\:scale-105 {\n --tw-scale-x: 105%;\n --tw-scale-y: 105%;\n --tw-scale-z: 105%;\n scale: var(--tw-scale-x) var(--tw-scale-y);\n}\n.mie\\:rotate-180 {\n rotate: 180deg;\n}\n.mie\\:cursor-not-allowed {\n cursor: not-allowed;\n}\n.mie\\:cursor-pointer {\n cursor: pointer;\n}\n.mie\\:touch-manipulation {\n touch-action: manipulation;\n}\n.mie\\:resize-y {\n resize: vertical;\n}\n.mie\\:appearance-none {\n appearance: none;\n}\n.mie\\:grid-cols-1 {\n grid-template-columns: repeat(1, minmax(0, 1fr));\n}\n.mie\\:grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n.mie\\:flex-col {\n flex-direction: column;\n}\n.mie\\:flex-wrap {\n flex-wrap: wrap;\n}\n.mie\\:items-center {\n align-items: center;\n}\n.mie\\:items-end {\n align-items: flex-end;\n}\n.mie\\:items-start {\n align-items: flex-start;\n}\n.mie\\:justify-between {\n justify-content: space-between;\n}\n.mie\\:justify-center {\n justify-content: center;\n}\n.mie\\:justify-end {\n justify-content: flex-end;\n}\n.mie\\:justify-evenly {\n justify-content: space-evenly;\n}\n.mie\\:justify-start {\n justify-content: flex-start;\n}\n.mie\\:gap-0 {\n gap: calc(var(--mie-spacing) * 0);\n}\n.mie\\:gap-1 {\n gap: calc(var(--mie-spacing) * 1);\n}\n.mie\\:gap-1\\.5 {\n gap: calc(var(--mie-spacing) * 1.5);\n}\n.mie\\:gap-2 {\n gap: calc(var(--mie-spacing) * 2);\n}\n.mie\\:gap-3 {\n gap: calc(var(--mie-spacing) * 3);\n}\n.mie\\:gap-4 {\n gap: calc(var(--mie-spacing) * 4);\n}\n.mie\\:space-y-1 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--mie-spacing) * 1) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--mie-spacing) * 1) * calc(1 - var(--tw-space-y-reverse)));\n }\n}\n.mie\\:space-y-2 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--mie-spacing) * 2) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--mie-spacing) * 2) * calc(1 - var(--tw-space-y-reverse)));\n }\n}\n.mie\\:space-y-3 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--mie-spacing) * 3) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--mie-spacing) * 3) * calc(1 - var(--tw-space-y-reverse)));\n }\n}\n.mie\\:space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--mie-spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--mie-spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n}\n.mie\\:truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.mie\\:overflow-auto {\n overflow: auto;\n}\n.mie\\:overflow-hidden {\n overflow: hidden;\n}\n.mie\\:overflow-visible {\n overflow: visible;\n}\n.mie\\:overflow-y-auto {\n overflow-y: auto;\n}\n.mie\\:rounded {\n border-radius: 0.25rem;\n}\n.mie\\:rounded-2xl {\n border-radius: var(--mie-radius-2xl);\n}\n.mie\\:rounded-full {\n border-radius: calc(infinity * 1px);\n}\n.mie\\:rounded-lg {\n border-radius: var(--mie-radius-lg);\n}\n.mie\\:rounded-md {\n border-radius: var(--mie-radius-md);\n}\n.mie\\:rounded-xl {\n border-radius: var(--mie-radius-xl);\n}\n.mie\\:rounded-t-2xl {\n border-top-left-radius: var(--mie-radius-2xl);\n border-top-right-radius: var(--mie-radius-2xl);\n}\n.mie\\:rounded-t-lg {\n border-top-left-radius: var(--mie-radius-lg);\n border-top-right-radius: var(--mie-radius-lg);\n}\n.mie\\:border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n}\n.mie\\:border-0 {\n border-style: var(--tw-border-style);\n border-width: 0px;\n}\n.mie\\:border-2 {\n border-style: var(--tw-border-style);\n border-width: 2px;\n}\n.mie\\:border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n}\n.mie\\:border-b {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 1px;\n}\n.mie\\:border-dashed {\n --tw-border-style: dashed;\n border-style: dashed;\n}\n.mie\\:border-gray-200 {\n border-color: var(--mie-color-gray-200);\n}\n.mie\\:border-mieborder {\n border-color: var(--mie-color-mieborder);\n}\n.mie\\:border-mieborderinactive {\n border-color: var(--mie-color-mieborderinactive);\n}\n.mie\\:border-miedanger\\/30 {\n border-color: var(--mie-color-miedanger);\n @supports (color: color-mix(in lab, red, red)) {\n border-color: color-mix(in oklab, var(--mie-color-miedanger) 30%, transparent);\n }\n}\n.mie\\:border-miedanger\\/50 {\n border-color: var(--mie-color-miedanger);\n @supports (color: color-mix(in lab, red, red)) {\n border-color: color-mix(in oklab, var(--mie-color-miedanger) 50%, transparent);\n }\n}\n.mie\\:border-mieprimary {\n border-color: var(--mie-color-mieprimary);\n}\n.mie\\:border-mieprimary\\/30 {\n border-color: var(--mie-color-mieprimary);\n @supports (color: color-mix(in lab, red, red)) {\n border-color: color-mix(in oklab, var(--mie-color-mieprimary) 30%, transparent);\n }\n}\n.mie\\:border-mieprimary\\/50 {\n border-color: var(--mie-color-mieprimary);\n @supports (color: color-mix(in lab, red, red)) {\n border-color: color-mix(in oklab, var(--mie-color-mieprimary) 50%, transparent);\n }\n}\n.mie\\:border-miewarning {\n border-color: var(--mie-color-miewarning);\n}\n.mie\\:border-transparent {\n border-color: transparent;\n}\n.mie\\:bg-blue-500 {\n background-color: var(--mie-color-blue-500);\n}\n.mie\\:bg-miebackground {\n background-color: var(--mie-color-miebackground);\n}\n.mie\\:bg-miebackgroundsecondary {\n background-color: var(--mie-color-miebackgroundsecondary);\n}\n.mie\\:bg-mieborder {\n background-color: var(--mie-color-mieborder);\n}\n.mie\\:bg-miedanger\\/10 {\n background-color: var(--mie-color-miedanger);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--mie-color-miedanger) 10%, transparent);\n }\n}\n.mie\\:bg-mieoverlay {\n background-color: var(--mie-color-mieoverlay);\n}\n.mie\\:bg-mieprimary {\n background-color: var(--mie-color-mieprimary);\n}\n.mie\\:bg-mieprimary\\/10 {\n background-color: var(--mie-color-mieprimary);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--mie-color-mieprimary) 10%, transparent);\n }\n}\n.mie\\:bg-mieprimary\\/20 {\n background-color: var(--mie-color-mieprimary);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--mie-color-mieprimary) 20%, transparent);\n }\n}\n.mie\\:bg-miesurface {\n background-color: var(--mie-color-miesurface);\n}\n.mie\\:bg-mietext {\n background-color: var(--mie-color-mietext);\n}\n.mie\\:bg-miewarning {\n background-color: var(--mie-color-miewarning);\n}\n.mie\\:bg-miewarning\\/10 {\n background-color: var(--mie-color-miewarning);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--mie-color-miewarning) 10%, transparent);\n }\n}\n.mie\\:bg-transparent {\n background-color: transparent;\n}\n.mie\\:bg-white {\n background-color: var(--mie-color-white);\n}\n.mie\\:bg-linear-to-br {\n --tw-gradient-position: to bottom right;\n @supports (background-image: linear-gradient(in lab, red, red)) {\n --tw-gradient-position: to bottom right in oklab;\n }\n background-image: linear-gradient(var(--tw-gradient-stops));\n}\n.mie\\:from-miebackground {\n --tw-gradient-from: var(--mie-color-miebackground);\n --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));\n}\n.mie\\:from-mieprimary\\/10 {\n --tw-gradient-from: var(--mie-color-mieprimary);\n @supports (color: color-mix(in lab, red, red)) {\n --tw-gradient-from: color-mix(in oklab, var(--mie-color-mieprimary) 10%, transparent);\n }\n --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));\n}\n.mie\\:to-miebackground {\n --tw-gradient-to: var(--mie-color-miebackground);\n --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));\n}\n.mie\\:to-mieborder\\/30 {\n --tw-gradient-to: var(--mie-color-mieborder);\n @supports (color: color-mix(in lab, red, red)) {\n --tw-gradient-to: color-mix(in oklab, var(--mie-color-mieborder) 30%, transparent);\n }\n --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));\n}\n.mie\\:object-contain {\n object-fit: contain;\n}\n.mie\\:p-0 {\n padding: calc(var(--mie-spacing) * 0);\n}\n.mie\\:p-1 {\n padding: calc(var(--mie-spacing) * 1);\n}\n.mie\\:p-1\\.5 {\n padding: calc(var(--mie-spacing) * 1.5);\n}\n.mie\\:p-2 {\n padding: calc(var(--mie-spacing) * 2);\n}\n.mie\\:p-3 {\n padding: calc(var(--mie-spacing) * 3);\n}\n.mie\\:p-4 {\n padding: calc(var(--mie-spacing) * 4);\n}\n.mie\\:p-6 {\n padding: calc(var(--mie-spacing) * 6);\n}\n.mie\\:p-8 {\n padding: calc(var(--mie-spacing) * 8);\n}\n.mie\\:px-0 {\n padding-inline: calc(var(--mie-spacing) * 0);\n}\n.mie\\:px-0\\.5 {\n padding-inline: calc(var(--mie-spacing) * 0.5);\n}\n.mie\\:px-2 {\n padding-inline: calc(var(--mie-spacing) * 2);\n}\n.mie\\:px-2\\.5 {\n padding-inline: calc(var(--mie-spacing) * 2.5);\n}\n.mie\\:px-3 {\n padding-inline: calc(var(--mie-spacing) * 3);\n}\n.mie\\:px-4 {\n padding-inline: calc(var(--mie-spacing) * 4);\n}\n.mie\\:px-6 {\n padding-inline: calc(var(--mie-spacing) * 6);\n}\n.mie\\:px-8 {\n padding-inline: calc(var(--mie-spacing) * 8);\n}\n.mie\\:py-0\\.5 {\n padding-block: calc(var(--mie-spacing) * 0.5);\n}\n.mie\\:py-1 {\n padding-block: calc(var(--mie-spacing) * 1);\n}\n.mie\\:py-1\\.5 {\n padding-block: calc(var(--mie-spacing) * 1.5);\n}\n.mie\\:py-2 {\n padding-block: calc(var(--mie-spacing) * 2);\n}\n.mie\\:py-2\\.5 {\n padding-block: calc(var(--mie-spacing) * 2.5);\n}\n.mie\\:py-3 {\n padding-block: calc(var(--mie-spacing) * 3);\n}\n.mie\\:py-4 {\n padding-block: calc(var(--mie-spacing) * 4);\n}\n.mie\\:py-5 {\n padding-block: calc(var(--mie-spacing) * 5);\n}\n.mie\\:py-10 {\n padding-block: calc(var(--mie-spacing) * 10);\n}\n.mie\\:pt-1 {\n padding-top: calc(var(--mie-spacing) * 1);\n}\n.mie\\:pt-2 {\n padding-top: calc(var(--mie-spacing) * 2);\n}\n.mie\\:pt-3 {\n padding-top: calc(var(--mie-spacing) * 3);\n}\n.mie\\:pt-4 {\n padding-top: calc(var(--mie-spacing) * 4);\n}\n.mie\\:pt-6 {\n padding-top: calc(var(--mie-spacing) * 6);\n}\n.mie\\:pr-10 {\n padding-right: calc(var(--mie-spacing) * 10);\n}\n.mie\\:pr-16 {\n padding-right: calc(var(--mie-spacing) * 16);\n}\n.mie\\:pb-2 {\n padding-bottom: calc(var(--mie-spacing) * 2);\n}\n.mie\\:pb-4 {\n padding-bottom: calc(var(--mie-spacing) * 4);\n}\n.mie\\:pb-8 {\n padding-bottom: calc(var(--mie-spacing) * 8);\n}\n.mie\\:pl-32 {\n padding-left: calc(var(--mie-spacing) * 32);\n}\n.mie\\:text-center {\n text-align: center;\n}\n.mie\\:text-left {\n text-align: left;\n}\n.mie\\:font-mono {\n font-family: var(--mie-font-mono);\n}\n.mie\\:font-titillium {\n font-family: var(--mie-font-titillium);\n}\n.mie\\:text-base {\n font-size: var(--mie-text-base);\n line-height: var(--tw-leading, var(--mie-text-base--line-height));\n}\n.mie\\:text-lg {\n font-size: var(--mie-text-lg);\n line-height: var(--tw-leading, var(--mie-text-lg--line-height));\n}\n.mie\\:text-sm {\n font-size: var(--mie-text-sm);\n line-height: var(--tw-leading, var(--mie-text-sm--line-height));\n}\n.mie\\:text-xl {\n font-size: var(--mie-text-xl);\n line-height: var(--tw-leading, var(--mie-text-xl--line-height));\n}\n.mie\\:text-xs {\n font-size: var(--mie-text-xs);\n line-height: var(--tw-leading, var(--mie-text-xs--line-height));\n}\n.mie\\:leading-relaxed {\n --tw-leading: var(--mie-leading-relaxed);\n line-height: var(--mie-leading-relaxed);\n}\n.mie\\:font-light {\n --tw-font-weight: var(--mie-font-weight-light);\n font-weight: var(--mie-font-weight-light);\n}\n.mie\\:font-medium {\n --tw-font-weight: var(--mie-font-weight-medium);\n font-weight: var(--mie-font-weight-medium);\n}\n.mie\\:font-normal {\n --tw-font-weight: var(--mie-font-weight-normal);\n font-weight: var(--mie-font-weight-normal);\n}\n.mie\\:font-semibold {\n --tw-font-weight: var(--mie-font-weight-semibold);\n font-weight: var(--mie-font-weight-semibold);\n}\n.mie\\:tracking-wide {\n --tw-tracking: var(--mie-tracking-wide);\n letter-spacing: var(--mie-tracking-wide);\n}\n.mie\\:wrap-break-word {\n overflow-wrap: break-word;\n}\n.mie\\:whitespace-nowrap {\n white-space: nowrap;\n}\n.mie\\:whitespace-pre-line {\n white-space: pre-line;\n}\n.mie\\:text-gray-900 {\n color: var(--mie-color-gray-900);\n}\n.mie\\:text-mieborder {\n color: var(--mie-color-mieborder);\n}\n.mie\\:text-miedanger {\n color: var(--mie-color-miedanger);\n}\n.mie\\:text-mieprimary {\n color: var(--mie-color-mieprimary);\n}\n.mie\\:text-miesurface {\n color: var(--mie-color-miesurface);\n}\n.mie\\:text-mietext {\n color: var(--mie-color-mietext);\n}\n.mie\\:text-mietextmuted {\n color: var(--mie-color-mietextmuted);\n}\n.mie\\:text-mietextmuted\\/50 {\n color: var(--mie-color-mietextmuted);\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, var(--mie-color-mietextmuted) 50%, transparent);\n }\n}\n.mie\\:text-mietextmuted\\/70 {\n color: var(--mie-color-mietextmuted);\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, var(--mie-color-mietextmuted) 70%, transparent);\n }\n}\n.mie\\:text-mietextsecondary {\n color: var(--mie-color-mietextsecondary);\n}\n.mie\\:text-miewarning {\n color: var(--mie-color-miewarning);\n}\n.mie\\:uppercase {\n text-transform: uppercase;\n}\n.mie\\:italic {\n font-style: italic;\n}\n.mie\\:accent-mieprimary {\n accent-color: var(--mie-color-mieprimary);\n}\n.mie\\:opacity-0 {\n opacity: 0%;\n}\n.mie\\:opacity-50 {\n opacity: 50%;\n}\n.mie\\:shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n}\n.mie\\:shadow-2xl {\n --tw-shadow: 0 25px 50px -12px var(--tw-shadow-color, rgb(0 0 0 / 0.25));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n}\n.mie\\:shadow-lg {\n --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n}\n.mie\\:shadow-md {\n --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n}\n.mie\\:shadow-sm {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n}\n.mie\\:ring-2 {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n}\n.mie\\:ring-mieprimary {\n --tw-ring-color: var(--mie-color-mieprimary);\n}\n.mie\\:ring-offset-2 {\n --tw-ring-offset-width: 2px;\n --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n}\n.mie\\:transition {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, content-visibility, overlay, pointer-events;\n transition-timing-function: var(--tw-ease, var(--mie-default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--mie-default-transition-duration));\n}\n.mie\\:transition-all {\n transition-property: all;\n transition-timing-function: var(--tw-ease, var(--mie-default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--mie-default-transition-duration));\n}\n.mie\\:transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--mie-default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--mie-default-transition-duration));\n}\n.mie\\:transition-transform {\n transition-property: transform, translate, scale, rotate;\n transition-timing-function: var(--tw-ease, var(--mie-default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--mie-default-transition-duration));\n}\n.mie\\:duration-150 {\n --tw-duration: 150ms;\n transition-duration: 150ms;\n}\n.mie\\:outline-none {\n --tw-outline-style: none;\n outline-style: none;\n}\n.mie\\:select-none {\n -webkit-user-select: none;\n user-select: none;\n}\n.mie\\:group-hover\\:text-mietextsecondary {\n &:is(:where(.mie\\:group):hover *) {\n @media (hover: hover) {\n color: var(--mie-color-mietextsecondary);\n }\n }\n}\n.mie\\:placeholder\\:text-mietextmuted {\n &::placeholder {\n color: var(--mie-color-mietextmuted);\n }\n}\n.mie\\:hover\\:scale-105 {\n &:hover {\n @media (hover: hover) {\n --tw-scale-x: 105%;\n --tw-scale-y: 105%;\n --tw-scale-z: 105%;\n scale: var(--tw-scale-x) var(--tw-scale-y);\n }\n }\n}\n.mie\\:hover\\:border-mieprimary {\n &:hover {\n @media (hover: hover) {\n border-color: var(--mie-color-mieprimary);\n }\n }\n}\n.mie\\:hover\\:border-mieprimary\\/50 {\n &:hover {\n @media (hover: hover) {\n border-color: var(--mie-color-mieprimary);\n @supports (color: color-mix(in lab, red, red)) {\n border-color: color-mix(in oklab, var(--mie-color-mieprimary) 50%, transparent);\n }\n }\n }\n}\n.mie\\:hover\\:border-mietextmuted {\n &:hover {\n @media (hover: hover) {\n border-color: var(--mie-color-mietextmuted);\n }\n }\n}\n.mie\\:hover\\:bg-blue-600 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--mie-color-blue-600);\n }\n }\n}\n.mie\\:hover\\:bg-miebackground {\n &:hover {\n @media (hover: hover) {\n background-color: var(--mie-color-miebackground);\n }\n }\n}\n.mie\\:hover\\:bg-miebackgroundhover {\n &:hover {\n @media (hover: hover) {\n background-color: var(--mie-color-miebackgroundhover);\n }\n }\n}\n.mie\\:hover\\:bg-mieborder {\n &:hover {\n @media (hover: hover) {\n background-color: var(--mie-color-mieborder);\n }\n }\n}\n.mie\\:hover\\:bg-miedanger\\/10 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--mie-color-miedanger);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--mie-color-miedanger) 10%, transparent);\n }\n }\n }\n}\n.mie\\:hover\\:bg-miedanger\\/20 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--mie-color-miedanger);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--mie-color-miedanger) 20%, transparent);\n }\n }\n }\n}\n.mie\\:hover\\:bg-mieprimary {\n &:hover {\n @media (hover: hover) {\n background-color: var(--mie-color-mieprimary);\n }\n }\n}\n.mie\\:hover\\:bg-mieprimary\\/10 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--mie-color-mieprimary);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--mie-color-mieprimary) 10%, transparent);\n }\n }\n }\n}\n.mie\\:hover\\:bg-mieprimary\\/80 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--mie-color-mieprimary);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--mie-color-mieprimary) 80%, transparent);\n }\n }\n }\n}\n.mie\\:hover\\:bg-mieprimary\\/90 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--mie-color-mieprimary);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--mie-color-mieprimary) 90%, transparent);\n }\n }\n }\n}\n.mie\\:hover\\:bg-miesurface {\n &:hover {\n @media (hover: hover) {\n background-color: var(--mie-color-miesurface);\n }\n }\n}\n.mie\\:hover\\:bg-miewarning\\/90 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--mie-color-miewarning);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--mie-color-miewarning) 90%, transparent);\n }\n }\n }\n}\n.mie\\:hover\\:from-mieprimary\\/20 {\n &:hover {\n @media (hover: hover) {\n --tw-gradient-from: var(--mie-color-mieprimary);\n @supports (color: color-mix(in lab, red, red)) {\n --tw-gradient-from: color-mix(in oklab, var(--mie-color-mieprimary) 20%, transparent);\n }\n --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));\n }\n }\n}\n.mie\\:hover\\:to-miebackground {\n &:hover {\n @media (hover: hover) {\n --tw-gradient-to: var(--mie-color-miebackground);\n --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));\n }\n }\n}\n.mie\\:hover\\:text-miedanger {\n &:hover {\n @media (hover: hover) {\n color: var(--mie-color-miedanger);\n }\n }\n}\n.mie\\:hover\\:text-mieprimary {\n &:hover {\n @media (hover: hover) {\n color: var(--mie-color-mieprimary);\n }\n }\n}\n.mie\\:hover\\:text-mietext {\n &:hover {\n @media (hover: hover) {\n color: var(--mie-color-mietext);\n }\n }\n}\n.mie\\:hover\\:text-mietextsecondary {\n &:hover {\n @media (hover: hover) {\n color: var(--mie-color-mietextsecondary);\n }\n }\n}\n.mie\\:hover\\:shadow {\n &:hover {\n @media (hover: hover) {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n}\n.mie\\:hover\\:ring-2 {\n &:hover {\n @media (hover: hover) {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n}\n.mie\\:hover\\:ring-mieborder {\n &:hover {\n @media (hover: hover) {\n --tw-ring-color: var(--mie-color-mieborder);\n }\n }\n}\n.mie\\:focus\\:border-mieprimary {\n &:focus {\n border-color: var(--mie-color-mieprimary);\n }\n}\n.mie\\:focus\\:ring-1 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n}\n.mie\\:focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n}\n.mie\\:focus\\:ring-mieprimary {\n &:focus {\n --tw-ring-color: var(--mie-color-mieprimary);\n }\n}\n.mie\\:focus\\:ring-mieprimary\\/30 {\n &:focus {\n --tw-ring-color: var(--mie-color-mieprimary);\n @supports (color: color-mix(in lab, red, red)) {\n --tw-ring-color: color-mix(in oklab, var(--mie-color-mieprimary) 30%, transparent);\n }\n }\n}\n.mie\\:focus\\:ring-offset-2 {\n &:focus {\n --tw-ring-offset-width: 2px;\n --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n }\n}\n.mie\\:focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n}\n.mie\\:disabled\\:cursor-not-allowed {\n &:disabled {\n cursor: not-allowed;\n }\n}\n.mie\\:disabled\\:opacity-40 {\n &:disabled {\n opacity: 40%;\n }\n}\n.mie\\:disabled\\:opacity-50 {\n &:disabled {\n opacity: 50%;\n }\n}\n.mie\\:sm\\:grid-cols-2 {\n @media (width >= 40rem) {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n}\n.mie\\:md\\:w-80 {\n @media (width >= 48rem) {\n width: calc(var(--mie-spacing) * 80);\n }\n}\n.mie\\:md\\:max-w-\\[75vw\\] {\n @media (width >= 48rem) {\n max-width: 75vw;\n }\n}\n.mie\\:md\\:flex-row {\n @media (width >= 48rem) {\n flex-direction: row;\n }\n}\n.mie\\:md\\:px-6 {\n @media (width >= 48rem) {\n padding-inline: calc(var(--mie-spacing) * 6);\n }\n}\n.mie\\:lg\\:block {\n @media (width >= 64rem) {\n display: block;\n }\n}\n.mie\\:lg\\:flex {\n @media (width >= 64rem) {\n display: flex;\n }\n}\n.mie\\:lg\\:hidden {\n @media (width >= 64rem) {\n display: none;\n }\n}\n.mie\\:lg\\:h-4 {\n @media (width >= 64rem) {\n height: calc(var(--mie-spacing) * 4);\n }\n}\n.mie\\:lg\\:max-h-\\[calc\\(100dvh-11rem\\)\\] {\n @media (width >= 64rem) {\n max-height: calc(100dvh - 11rem);\n }\n}\n.mie\\:lg\\:max-h-\\[calc\\(100dvh-20rem\\)\\] {\n @media (width >= 64rem) {\n max-height: calc(100dvh - 20rem);\n }\n}\n.mie\\:lg\\:w-4 {\n @media (width >= 64rem) {\n width: calc(var(--mie-spacing) * 4);\n }\n}\n.mie\\:lg\\:w-72 {\n @media (width >= 64rem) {\n width: calc(var(--mie-spacing) * 72);\n }\n}\n.mie\\:lg\\:w-90 {\n @media (width >= 64rem) {\n width: calc(var(--mie-spacing) * 90);\n }\n}\n.mie\\:lg\\:max-w-full {\n @media (width >= 64rem) {\n max-width: 100%;\n }\n}\n.mie\\:lg\\:grid-cols-2 {\n @media (width >= 64rem) {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n}\n.mie\\:lg\\:flex-row {\n @media (width >= 64rem) {\n flex-direction: row;\n }\n}\n.mie\\:lg\\:items-center {\n @media (width >= 64rem) {\n align-items: center;\n }\n}\n.mie\\:lg\\:justify-center {\n @media (width >= 64rem) {\n justify-content: center;\n }\n}\n.mie\\:lg\\:gap-2 {\n @media (width >= 64rem) {\n gap: calc(var(--mie-spacing) * 2);\n }\n}\n.mie\\:lg\\:gap-3 {\n @media (width >= 64rem) {\n gap: calc(var(--mie-spacing) * 3);\n }\n}\n.mie\\:lg\\:px-3 {\n @media (width >= 64rem) {\n padding-inline: calc(var(--mie-spacing) * 3);\n }\n}\n.mie\\:lg\\:px-4 {\n @media (width >= 64rem) {\n padding-inline: calc(var(--mie-spacing) * 4);\n }\n}\n.mie\\:lg\\:px-6 {\n @media (width >= 64rem) {\n padding-inline: calc(var(--mie-spacing) * 6);\n }\n}\n.mie\\:lg\\:py-2 {\n @media (width >= 64rem) {\n padding-block: calc(var(--mie-spacing) * 2);\n }\n}\n.mie\\:lg\\:pr-2 {\n @media (width >= 64rem) {\n padding-right: calc(var(--mie-spacing) * 2);\n }\n}\n.mie\\:lg\\:pb-4 {\n @media (width >= 64rem) {\n padding-bottom: calc(var(--mie-spacing) * 4);\n }\n}\n.mie\\:lg\\:text-sm {\n @media (width >= 64rem) {\n font-size: var(--mie-text-sm);\n line-height: var(--tw-leading, var(--mie-text-sm--line-height));\n }\n}\n@layer base {\n .qb-editor-root, .qb-editor-root *, .qb-editor-root *::before, .qb-editor-root *::after {\n box-sizing: border-box;\n border-width: 0;\n border-style: solid;\n border-color: currentColor;\n }\n .qb-editor-root {\n font-family: \"Titillium Web\", ui-sans-serif, system-ui, sans-serif;\n }\n .qb-editor-root input, .qb-editor-root textarea, .qb-editor-root select, .qb-editor-root button {\n font-family: inherit;\n font-size: inherit;\n }\n}\ndiv:focus-visible, button:focus-visible {\n outline: none;\n}\n.qb-editor-root.dark {\n --mie-color-mieprimary: #6b7fa3;\n --mie-color-miesecondary: #9ca3af;\n --mie-color-mieaccent: #34d399;\n --mie-color-miedanger: #f87171;\n --mie-color-miewarning: #fb923c;\n --mie-color-miesurface: #252526;\n --mie-color-mieborder: #3c3c3c;\n --mie-color-mieborderinactive: #5a5a5a;\n --mie-color-mietext: #d4d4d4;\n --mie-color-mietextsecondary: #1e1e1e;\n --mie-color-mietextmuted: #808080;\n --mie-color-miebackground: #1e1e1e;\n --mie-color-miebackgroundsecondary: #252526;\n --mie-color-miebackgroundhover: #2a2d2e;\n --mie-color-mieoverlay: rgba(0, 0, 0, 0.7);\n}\n.mie\\:custom-scrollbar::-webkit-scrollbar {\n width: 4px;\n}\n.mie\\:custom-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n}\n.mie\\:custom-scrollbar::-webkit-scrollbar-thumb {\n background: transparent;\n border-radius: 9999px;\n transition: background 0.2s;\n}\n.mie\\:custom-scrollbar:hover::-webkit-scrollbar-thumb {\n background: #d1d5db;\n}\n.mie\\:custom-scrollbar {\n scrollbar-width: thin;\n scrollbar-color: transparent transparent;\n}\n.mie\\:custom-scrollbar:hover {\n scrollbar-color: #d1d5db transparent;\n}\n@property --tw-translate-x {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-scale-x {\n syntax: \"*\";\n inherits: false;\n initial-value: 1;\n}\n@property --tw-scale-y {\n syntax: \"*\";\n inherits: false;\n initial-value: 1;\n}\n@property --tw-scale-z {\n syntax: \"*\";\n inherits: false;\n initial-value: 1;\n}\n@property --tw-space-y-reverse {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: \"*\";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-gradient-position {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-gradient-from {\n syntax: \"<color>\";\n inherits: false;\n initial-value: #0000;\n}\n@property --tw-gradient-via {\n syntax: \"<color>\";\n inherits: false;\n initial-value: #0000;\n}\n@property --tw-gradient-to {\n syntax: \"<color>\";\n inherits: false;\n initial-value: #0000;\n}\n@property --tw-gradient-stops {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-gradient-via-stops {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-gradient-from-position {\n syntax: \"<length-percentage>\";\n inherits: false;\n initial-value: 0%;\n}\n@property --tw-gradient-via-position {\n syntax: \"<length-percentage>\";\n inherits: false;\n initial-value: 50%;\n}\n@property --tw-gradient-to-position {\n syntax: \"<length-percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-leading {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-font-weight {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-tracking {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: \"<length>\";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: \"*\";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-duration {\n syntax: \"*\";\n inherits: false;\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-scale-z: 1;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-gradient-position: initial;\n --tw-gradient-from: #0000;\n --tw-gradient-via: #0000;\n --tw-gradient-to: #0000;\n --tw-gradient-stops: initial;\n --tw-gradient-via-stops: initial;\n --tw-gradient-from-position: 0%;\n --tw-gradient-via-position: 50%;\n --tw-gradient-to-position: 100%;\n --tw-leading: initial;\n --tw-font-weight: initial;\n --tw-tracking: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-duration: initial;\n }\n }\n}\n";
8
+ style.textContent = "/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */\n@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap');\n@layer properties;\n:root, :host {\n --mie-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',\n monospace;\n --mie-color-blue-500: oklch(62.3% 0.214 259.815);\n --mie-color-blue-600: oklch(54.6% 0.245 262.881);\n --mie-color-gray-200: oklch(92.8% 0.006 264.531);\n --mie-color-gray-900: oklch(21% 0.034 264.665);\n --mie-color-white: #fff;\n --mie-spacing: 0.25rem;\n --mie-container-md: 28rem;\n --mie-container-xl: 36rem;\n --mie-container-4xl: 56rem;\n --mie-container-7xl: 80rem;\n --mie-text-xs: 0.75rem;\n --mie-text-xs--line-height: calc(1 / 0.75);\n --mie-text-sm: 0.875rem;\n --mie-text-sm--line-height: calc(1.25 / 0.875);\n --mie-text-base: 1rem;\n --mie-text-base--line-height: calc(1.5 / 1);\n --mie-text-lg: 1.125rem;\n --mie-text-lg--line-height: calc(1.75 / 1.125);\n --mie-text-xl: 1.25rem;\n --mie-text-xl--line-height: calc(1.75 / 1.25);\n --mie-font-weight-light: 300;\n --mie-font-weight-normal: 400;\n --mie-font-weight-medium: 500;\n --mie-font-weight-semibold: 600;\n --mie-tracking-wide: 0.025em;\n --mie-leading-relaxed: 1.625;\n --mie-radius-md: 0.375rem;\n --mie-radius-lg: 0.5rem;\n --mie-radius-xl: 0.75rem;\n --mie-radius-2xl: 1rem;\n --mie-default-transition-duration: 150ms;\n --mie-default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --mie-font-titillium: \"Titillium Web\", sans-serif;\n --mie-color-mieprimary: #3b82f6;\n --mie-color-miesecondary: #6b7280;\n --mie-color-mieaccent: #10b981;\n --mie-color-miedanger: #ef4444;\n --mie-color-miewarning: #f97316;\n --mie-color-miesurface: #ffffff;\n --mie-color-mieborder: #e5e7eb;\n --mie-color-mieborderinactive: #9ca3af;\n --mie-color-mietext: #111827;\n --mie-color-mietextsecondary: #f8fafc;\n --mie-color-mietextmuted: #6b7280;\n --mie-color-miebackground: #f9fafb;\n --mie-color-miebackgroundsecondary: #f3f4f6;\n --mie-color-miebackgroundhover: #eceef1;\n --mie-color-mieoverlay: rgba(0, 0, 0, 0.5);\n}\n.mie\\:pointer-events-none {\n pointer-events: none;\n}\n.mie\\:absolute {\n position: absolute;\n}\n.mie\\:fixed {\n position: fixed;\n}\n.mie\\:relative {\n position: relative;\n}\n.mie\\:sticky {\n position: sticky;\n}\n.mie\\:inset-0 {\n inset: calc(var(--mie-spacing) * 0);\n}\n.mie\\:top-0 {\n top: calc(var(--mie-spacing) * 0);\n}\n.mie\\:top-1\\/2 {\n top: calc(1/2 * 100%);\n}\n.mie\\:top-2 {\n top: calc(var(--mie-spacing) * 2);\n}\n.mie\\:top-3 {\n top: calc(var(--mie-spacing) * 3);\n}\n.mie\\:top-11 {\n top: calc(var(--mie-spacing) * 11);\n}\n.mie\\:right-0 {\n right: calc(var(--mie-spacing) * 0);\n}\n.mie\\:right-2 {\n right: calc(var(--mie-spacing) * 2);\n}\n.mie\\:right-3 {\n right: calc(var(--mie-spacing) * 3);\n}\n.mie\\:bottom-0 {\n bottom: calc(var(--mie-spacing) * 0);\n}\n.mie\\:bottom-5 {\n bottom: calc(var(--mie-spacing) * 5);\n}\n.mie\\:bottom-full {\n bottom: 100%;\n}\n.mie\\:-left-2 {\n left: calc(var(--mie-spacing) * -2);\n}\n.mie\\:left-0 {\n left: calc(var(--mie-spacing) * 0);\n}\n.mie\\:left-5 {\n left: calc(var(--mie-spacing) * 5);\n}\n.mie\\:z-10 {\n z-index: 10;\n}\n.mie\\:z-20 {\n z-index: 20;\n}\n.mie\\:z-40 {\n z-index: 40;\n}\n.mie\\:z-50 {\n z-index: 50;\n}\n.mie\\:z-9999 {\n z-index: 9999;\n}\n.mie\\:m-0 {\n margin: calc(var(--mie-spacing) * 0);\n}\n.mie\\:-mx-6 {\n margin-inline: calc(var(--mie-spacing) * -6);\n}\n.mie\\:mx-4 {\n margin-inline: calc(var(--mie-spacing) * 4);\n}\n.mie\\:mx-auto {\n margin-inline: auto;\n}\n.mie\\:my-2 {\n margin-block: calc(var(--mie-spacing) * 2);\n}\n.mie\\:-mt-6 {\n margin-top: calc(var(--mie-spacing) * -6);\n}\n.mie\\:mt-1 {\n margin-top: calc(var(--mie-spacing) * 1);\n}\n.mie\\:mt-2 {\n margin-top: calc(var(--mie-spacing) * 2);\n}\n.mie\\:mt-3 {\n margin-top: calc(var(--mie-spacing) * 3);\n}\n.mie\\:mt-4 {\n margin-top: calc(var(--mie-spacing) * 4);\n}\n.mie\\:mb-1 {\n margin-bottom: calc(var(--mie-spacing) * 1);\n}\n.mie\\:mb-1\\.5 {\n margin-bottom: calc(var(--mie-spacing) * 1.5);\n}\n.mie\\:mb-2 {\n margin-bottom: calc(var(--mie-spacing) * 2);\n}\n.mie\\:mb-3 {\n margin-bottom: calc(var(--mie-spacing) * 3);\n}\n.mie\\:mb-4 {\n margin-bottom: calc(var(--mie-spacing) * 4);\n}\n.mie\\:mb-6 {\n margin-bottom: calc(var(--mie-spacing) * 6);\n}\n.mie\\:ml-2 {\n margin-left: calc(var(--mie-spacing) * 2);\n}\n.mie\\:ml-auto {\n margin-left: auto;\n}\n.mie\\:block {\n display: block;\n}\n.mie\\:flex {\n display: flex;\n}\n.mie\\:grid {\n display: grid;\n}\n.mie\\:hidden {\n display: none;\n}\n.mie\\:inline-block {\n display: inline-block;\n}\n.mie\\:inline-flex {\n display: inline-flex;\n}\n.mie\\:h-1 {\n height: calc(var(--mie-spacing) * 1);\n}\n.mie\\:h-3 {\n height: calc(var(--mie-spacing) * 3);\n}\n.mie\\:h-3\\.5 {\n height: calc(var(--mie-spacing) * 3.5);\n}\n.mie\\:h-4 {\n height: calc(var(--mie-spacing) * 4);\n}\n.mie\\:h-5 {\n height: calc(var(--mie-spacing) * 5);\n}\n.mie\\:h-6 {\n height: calc(var(--mie-spacing) * 6);\n}\n.mie\\:h-7 {\n height: calc(var(--mie-spacing) * 7);\n}\n.mie\\:h-8 {\n height: calc(var(--mie-spacing) * 8);\n}\n.mie\\:h-10 {\n height: calc(var(--mie-spacing) * 10);\n}\n.mie\\:h-11 {\n height: calc(var(--mie-spacing) * 11);\n}\n.mie\\:h-12 {\n height: calc(var(--mie-spacing) * 12);\n}\n.mie\\:h-24 {\n height: calc(var(--mie-spacing) * 24);\n}\n.mie\\:h-72 {\n height: calc(var(--mie-spacing) * 72);\n}\n.mie\\:h-auto {\n height: auto;\n}\n.mie\\:h-fit {\n height: fit-content;\n}\n.mie\\:h-full {\n height: 100%;\n}\n.mie\\:max-h-32 {\n max-height: calc(var(--mie-spacing) * 32);\n}\n.mie\\:max-h-48 {\n max-height: calc(var(--mie-spacing) * 48);\n}\n.mie\\:max-h-56 {\n max-height: calc(var(--mie-spacing) * 56);\n}\n.mie\\:max-h-60 {\n max-height: calc(var(--mie-spacing) * 60);\n}\n.mie\\:max-h-64 {\n max-height: calc(var(--mie-spacing) * 64);\n}\n.mie\\:max-h-75 {\n max-height: calc(var(--mie-spacing) * 75);\n}\n.mie\\:max-h-\\[60vh\\] {\n max-height: 60vh;\n}\n.mie\\:max-h-\\[calc\\(100svh-13rem\\)\\] {\n max-height: calc(100svh - 13rem);\n}\n.mie\\:max-h-\\[calc\\(100svh-24rem\\)\\] {\n max-height: calc(100svh - 24rem);\n}\n.mie\\:max-h-none {\n max-height: none;\n}\n.mie\\:min-h-10 {\n min-height: calc(var(--mie-spacing) * 10);\n}\n.mie\\:min-h-24 {\n min-height: calc(var(--mie-spacing) * 24);\n}\n.mie\\:min-h-64 {\n min-height: calc(var(--mie-spacing) * 64);\n}\n.mie\\:w-1\\/2 {\n width: calc(1/2 * 100%);\n}\n.mie\\:w-3 {\n width: calc(var(--mie-spacing) * 3);\n}\n.mie\\:w-3\\.5 {\n width: calc(var(--mie-spacing) * 3.5);\n}\n.mie\\:w-3\\/4 {\n width: calc(3/4 * 100%);\n}\n.mie\\:w-4 {\n width: calc(var(--mie-spacing) * 4);\n}\n.mie\\:w-5 {\n width: calc(var(--mie-spacing) * 5);\n}\n.mie\\:w-6 {\n width: calc(var(--mie-spacing) * 6);\n}\n.mie\\:w-7 {\n width: calc(var(--mie-spacing) * 7);\n}\n.mie\\:w-8 {\n width: calc(var(--mie-spacing) * 8);\n}\n.mie\\:w-12 {\n width: calc(var(--mie-spacing) * 12);\n}\n.mie\\:w-20 {\n width: calc(var(--mie-spacing) * 20);\n}\n.mie\\:w-32 {\n width: calc(var(--mie-spacing) * 32);\n}\n.mie\\:w-fit {\n width: fit-content;\n}\n.mie\\:w-full {\n width: 100%;\n}\n.mie\\:w-px {\n width: 1px;\n}\n.mie\\:max-w-4xl {\n max-width: var(--mie-container-4xl);\n}\n.mie\\:max-w-7xl {\n max-width: var(--mie-container-7xl);\n}\n.mie\\:max-w-\\[80vw\\] {\n max-width: 80vw;\n}\n.mie\\:max-w-full {\n max-width: 100%;\n}\n.mie\\:max-w-md {\n max-width: var(--mie-container-md);\n}\n.mie\\:max-w-xl {\n max-width: var(--mie-container-xl);\n}\n.mie\\:min-w-0 {\n min-width: calc(var(--mie-spacing) * 0);\n}\n.mie\\:min-w-\\[44px\\] {\n min-width: 44px;\n}\n.mie\\:flex-1 {\n flex: 1;\n}\n.mie\\:shrink-0 {\n flex-shrink: 0;\n}\n.mie\\:-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n}\n.mie\\:scale-105 {\n --tw-scale-x: 105%;\n --tw-scale-y: 105%;\n --tw-scale-z: 105%;\n scale: var(--tw-scale-x) var(--tw-scale-y);\n}\n.mie\\:rotate-180 {\n rotate: 180deg;\n}\n.mie\\:cursor-not-allowed {\n cursor: not-allowed;\n}\n.mie\\:cursor-pointer {\n cursor: pointer;\n}\n.mie\\:touch-manipulation {\n touch-action: manipulation;\n}\n.mie\\:resize-y {\n resize: vertical;\n}\n.mie\\:appearance-none {\n appearance: none;\n}\n.mie\\:grid-cols-1 {\n grid-template-columns: repeat(1, minmax(0, 1fr));\n}\n.mie\\:grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n.mie\\:flex-col {\n flex-direction: column;\n}\n.mie\\:flex-wrap {\n flex-wrap: wrap;\n}\n.mie\\:items-center {\n align-items: center;\n}\n.mie\\:items-end {\n align-items: flex-end;\n}\n.mie\\:items-start {\n align-items: flex-start;\n}\n.mie\\:justify-between {\n justify-content: space-between;\n}\n.mie\\:justify-center {\n justify-content: center;\n}\n.mie\\:justify-end {\n justify-content: flex-end;\n}\n.mie\\:justify-evenly {\n justify-content: space-evenly;\n}\n.mie\\:justify-start {\n justify-content: flex-start;\n}\n.mie\\:gap-0 {\n gap: calc(var(--mie-spacing) * 0);\n}\n.mie\\:gap-1 {\n gap: calc(var(--mie-spacing) * 1);\n}\n.mie\\:gap-1\\.5 {\n gap: calc(var(--mie-spacing) * 1.5);\n}\n.mie\\:gap-2 {\n gap: calc(var(--mie-spacing) * 2);\n}\n.mie\\:gap-3 {\n gap: calc(var(--mie-spacing) * 3);\n}\n.mie\\:gap-4 {\n gap: calc(var(--mie-spacing) * 4);\n}\n.mie\\:space-y-1 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--mie-spacing) * 1) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--mie-spacing) * 1) * calc(1 - var(--tw-space-y-reverse)));\n }\n}\n.mie\\:space-y-2 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--mie-spacing) * 2) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--mie-spacing) * 2) * calc(1 - var(--tw-space-y-reverse)));\n }\n}\n.mie\\:space-y-3 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--mie-spacing) * 3) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--mie-spacing) * 3) * calc(1 - var(--tw-space-y-reverse)));\n }\n}\n.mie\\:space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--mie-spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--mie-spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n}\n.mie\\:truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.mie\\:overflow-auto {\n overflow: auto;\n}\n.mie\\:overflow-hidden {\n overflow: hidden;\n}\n.mie\\:overflow-visible {\n overflow: visible;\n}\n.mie\\:overflow-y-auto {\n overflow-y: auto;\n}\n.mie\\:rounded {\n border-radius: 0.25rem;\n}\n.mie\\:rounded-2xl {\n border-radius: var(--mie-radius-2xl);\n}\n.mie\\:rounded-full {\n border-radius: calc(infinity * 1px);\n}\n.mie\\:rounded-lg {\n border-radius: var(--mie-radius-lg);\n}\n.mie\\:rounded-md {\n border-radius: var(--mie-radius-md);\n}\n.mie\\:rounded-xl {\n border-radius: var(--mie-radius-xl);\n}\n.mie\\:rounded-t-2xl {\n border-top-left-radius: var(--mie-radius-2xl);\n border-top-right-radius: var(--mie-radius-2xl);\n}\n.mie\\:rounded-t-lg {\n border-top-left-radius: var(--mie-radius-lg);\n border-top-right-radius: var(--mie-radius-lg);\n}\n.mie\\:border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n}\n.mie\\:border-0 {\n border-style: var(--tw-border-style);\n border-width: 0px;\n}\n.mie\\:border-2 {\n border-style: var(--tw-border-style);\n border-width: 2px;\n}\n.mie\\:border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n}\n.mie\\:border-b {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 1px;\n}\n.mie\\:border-dashed {\n --tw-border-style: dashed;\n border-style: dashed;\n}\n.mie\\:border-gray-200 {\n border-color: var(--mie-color-gray-200);\n}\n.mie\\:border-mieborder {\n border-color: var(--mie-color-mieborder);\n}\n.mie\\:border-mieborderinactive {\n border-color: var(--mie-color-mieborderinactive);\n}\n.mie\\:border-miedanger\\/50 {\n border-color: var(--mie-color-miedanger);\n @supports (color: color-mix(in lab, red, red)) {\n border-color: color-mix(in oklab, var(--mie-color-miedanger) 50%, transparent);\n }\n}\n.mie\\:border-mieprimary {\n border-color: var(--mie-color-mieprimary);\n}\n.mie\\:border-mieprimary\\/30 {\n border-color: var(--mie-color-mieprimary);\n @supports (color: color-mix(in lab, red, red)) {\n border-color: color-mix(in oklab, var(--mie-color-mieprimary) 30%, transparent);\n }\n}\n.mie\\:border-mieprimary\\/50 {\n border-color: var(--mie-color-mieprimary);\n @supports (color: color-mix(in lab, red, red)) {\n border-color: color-mix(in oklab, var(--mie-color-mieprimary) 50%, transparent);\n }\n}\n.mie\\:border-miewarning {\n border-color: var(--mie-color-miewarning);\n}\n.mie\\:border-transparent {\n border-color: transparent;\n}\n.mie\\:bg-blue-500 {\n background-color: var(--mie-color-blue-500);\n}\n.mie\\:bg-miebackground {\n background-color: var(--mie-color-miebackground);\n}\n.mie\\:bg-miebackgroundsecondary {\n background-color: var(--mie-color-miebackgroundsecondary);\n}\n.mie\\:bg-mieborder {\n background-color: var(--mie-color-mieborder);\n}\n.mie\\:bg-miedanger\\/10 {\n background-color: var(--mie-color-miedanger);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--mie-color-miedanger) 10%, transparent);\n }\n}\n.mie\\:bg-mieoverlay {\n background-color: var(--mie-color-mieoverlay);\n}\n.mie\\:bg-mieprimary {\n background-color: var(--mie-color-mieprimary);\n}\n.mie\\:bg-mieprimary\\/10 {\n background-color: var(--mie-color-mieprimary);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--mie-color-mieprimary) 10%, transparent);\n }\n}\n.mie\\:bg-mieprimary\\/20 {\n background-color: var(--mie-color-mieprimary);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--mie-color-mieprimary) 20%, transparent);\n }\n}\n.mie\\:bg-miesurface {\n background-color: var(--mie-color-miesurface);\n}\n.mie\\:bg-mietext {\n background-color: var(--mie-color-mietext);\n}\n.mie\\:bg-miewarning {\n background-color: var(--mie-color-miewarning);\n}\n.mie\\:bg-miewarning\\/10 {\n background-color: var(--mie-color-miewarning);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--mie-color-miewarning) 10%, transparent);\n }\n}\n.mie\\:bg-transparent {\n background-color: transparent;\n}\n.mie\\:bg-white {\n background-color: var(--mie-color-white);\n}\n.mie\\:bg-linear-to-br {\n --tw-gradient-position: to bottom right;\n @supports (background-image: linear-gradient(in lab, red, red)) {\n --tw-gradient-position: to bottom right in oklab;\n }\n background-image: linear-gradient(var(--tw-gradient-stops));\n}\n.mie\\:from-miebackground {\n --tw-gradient-from: var(--mie-color-miebackground);\n --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));\n}\n.mie\\:from-mieprimary\\/10 {\n --tw-gradient-from: var(--mie-color-mieprimary);\n @supports (color: color-mix(in lab, red, red)) {\n --tw-gradient-from: color-mix(in oklab, var(--mie-color-mieprimary) 10%, transparent);\n }\n --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));\n}\n.mie\\:to-miebackground {\n --tw-gradient-to: var(--mie-color-miebackground);\n --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));\n}\n.mie\\:to-mieborder\\/30 {\n --tw-gradient-to: var(--mie-color-mieborder);\n @supports (color: color-mix(in lab, red, red)) {\n --tw-gradient-to: color-mix(in oklab, var(--mie-color-mieborder) 30%, transparent);\n }\n --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));\n}\n.mie\\:object-contain {\n object-fit: contain;\n}\n.mie\\:p-0 {\n padding: calc(var(--mie-spacing) * 0);\n}\n.mie\\:p-1 {\n padding: calc(var(--mie-spacing) * 1);\n}\n.mie\\:p-1\\.5 {\n padding: calc(var(--mie-spacing) * 1.5);\n}\n.mie\\:p-2 {\n padding: calc(var(--mie-spacing) * 2);\n}\n.mie\\:p-3 {\n padding: calc(var(--mie-spacing) * 3);\n}\n.mie\\:p-4 {\n padding: calc(var(--mie-spacing) * 4);\n}\n.mie\\:p-6 {\n padding: calc(var(--mie-spacing) * 6);\n}\n.mie\\:p-8 {\n padding: calc(var(--mie-spacing) * 8);\n}\n.mie\\:px-0 {\n padding-inline: calc(var(--mie-spacing) * 0);\n}\n.mie\\:px-0\\.5 {\n padding-inline: calc(var(--mie-spacing) * 0.5);\n}\n.mie\\:px-2 {\n padding-inline: calc(var(--mie-spacing) * 2);\n}\n.mie\\:px-2\\.5 {\n padding-inline: calc(var(--mie-spacing) * 2.5);\n}\n.mie\\:px-3 {\n padding-inline: calc(var(--mie-spacing) * 3);\n}\n.mie\\:px-4 {\n padding-inline: calc(var(--mie-spacing) * 4);\n}\n.mie\\:px-6 {\n padding-inline: calc(var(--mie-spacing) * 6);\n}\n.mie\\:px-8 {\n padding-inline: calc(var(--mie-spacing) * 8);\n}\n.mie\\:py-0\\.5 {\n padding-block: calc(var(--mie-spacing) * 0.5);\n}\n.mie\\:py-1 {\n padding-block: calc(var(--mie-spacing) * 1);\n}\n.mie\\:py-1\\.5 {\n padding-block: calc(var(--mie-spacing) * 1.5);\n}\n.mie\\:py-2 {\n padding-block: calc(var(--mie-spacing) * 2);\n}\n.mie\\:py-2\\.5 {\n padding-block: calc(var(--mie-spacing) * 2.5);\n}\n.mie\\:py-3 {\n padding-block: calc(var(--mie-spacing) * 3);\n}\n.mie\\:py-4 {\n padding-block: calc(var(--mie-spacing) * 4);\n}\n.mie\\:py-5 {\n padding-block: calc(var(--mie-spacing) * 5);\n}\n.mie\\:py-10 {\n padding-block: calc(var(--mie-spacing) * 10);\n}\n.mie\\:pt-1 {\n padding-top: calc(var(--mie-spacing) * 1);\n}\n.mie\\:pt-2 {\n padding-top: calc(var(--mie-spacing) * 2);\n}\n.mie\\:pt-3 {\n padding-top: calc(var(--mie-spacing) * 3);\n}\n.mie\\:pt-4 {\n padding-top: calc(var(--mie-spacing) * 4);\n}\n.mie\\:pt-6 {\n padding-top: calc(var(--mie-spacing) * 6);\n}\n.mie\\:pr-10 {\n padding-right: calc(var(--mie-spacing) * 10);\n}\n.mie\\:pr-16 {\n padding-right: calc(var(--mie-spacing) * 16);\n}\n.mie\\:pb-2 {\n padding-bottom: calc(var(--mie-spacing) * 2);\n}\n.mie\\:pb-4 {\n padding-bottom: calc(var(--mie-spacing) * 4);\n}\n.mie\\:pb-6 {\n padding-bottom: calc(var(--mie-spacing) * 6);\n}\n.mie\\:pb-8 {\n padding-bottom: calc(var(--mie-spacing) * 8);\n}\n.mie\\:pl-32 {\n padding-left: calc(var(--mie-spacing) * 32);\n}\n.mie\\:text-center {\n text-align: center;\n}\n.mie\\:text-left {\n text-align: left;\n}\n.mie\\:font-mono {\n font-family: var(--mie-font-mono);\n}\n.mie\\:font-titillium {\n font-family: var(--mie-font-titillium);\n}\n.mie\\:text-base {\n font-size: var(--mie-text-base);\n line-height: var(--tw-leading, var(--mie-text-base--line-height));\n}\n.mie\\:text-lg {\n font-size: var(--mie-text-lg);\n line-height: var(--tw-leading, var(--mie-text-lg--line-height));\n}\n.mie\\:text-sm {\n font-size: var(--mie-text-sm);\n line-height: var(--tw-leading, var(--mie-text-sm--line-height));\n}\n.mie\\:text-xl {\n font-size: var(--mie-text-xl);\n line-height: var(--tw-leading, var(--mie-text-xl--line-height));\n}\n.mie\\:text-xs {\n font-size: var(--mie-text-xs);\n line-height: var(--tw-leading, var(--mie-text-xs--line-height));\n}\n.mie\\:leading-relaxed {\n --tw-leading: var(--mie-leading-relaxed);\n line-height: var(--mie-leading-relaxed);\n}\n.mie\\:font-light {\n --tw-font-weight: var(--mie-font-weight-light);\n font-weight: var(--mie-font-weight-light);\n}\n.mie\\:font-medium {\n --tw-font-weight: var(--mie-font-weight-medium);\n font-weight: var(--mie-font-weight-medium);\n}\n.mie\\:font-normal {\n --tw-font-weight: var(--mie-font-weight-normal);\n font-weight: var(--mie-font-weight-normal);\n}\n.mie\\:font-semibold {\n --tw-font-weight: var(--mie-font-weight-semibold);\n font-weight: var(--mie-font-weight-semibold);\n}\n.mie\\:tracking-wide {\n --tw-tracking: var(--mie-tracking-wide);\n letter-spacing: var(--mie-tracking-wide);\n}\n.mie\\:wrap-break-word {\n overflow-wrap: break-word;\n}\n.mie\\:whitespace-nowrap {\n white-space: nowrap;\n}\n.mie\\:whitespace-pre-line {\n white-space: pre-line;\n}\n.mie\\:text-gray-900 {\n color: var(--mie-color-gray-900);\n}\n.mie\\:text-mieborder {\n color: var(--mie-color-mieborder);\n}\n.mie\\:text-miedanger {\n color: var(--mie-color-miedanger);\n}\n.mie\\:text-mieprimary {\n color: var(--mie-color-mieprimary);\n}\n.mie\\:text-miesurface {\n color: var(--mie-color-miesurface);\n}\n.mie\\:text-mietext {\n color: var(--mie-color-mietext);\n}\n.mie\\:text-mietextmuted {\n color: var(--mie-color-mietextmuted);\n}\n.mie\\:text-mietextmuted\\/50 {\n color: var(--mie-color-mietextmuted);\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, var(--mie-color-mietextmuted) 50%, transparent);\n }\n}\n.mie\\:text-mietextmuted\\/70 {\n color: var(--mie-color-mietextmuted);\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, var(--mie-color-mietextmuted) 70%, transparent);\n }\n}\n.mie\\:text-mietextsecondary {\n color: var(--mie-color-mietextsecondary);\n}\n.mie\\:text-miewarning {\n color: var(--mie-color-miewarning);\n}\n.mie\\:text-white {\n color: var(--mie-color-white);\n}\n.mie\\:uppercase {\n text-transform: uppercase;\n}\n.mie\\:italic {\n font-style: italic;\n}\n.mie\\:accent-mieprimary {\n accent-color: var(--mie-color-mieprimary);\n}\n.mie\\:opacity-0 {\n opacity: 0%;\n}\n.mie\\:opacity-50 {\n opacity: 50%;\n}\n.mie\\:shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n}\n.mie\\:shadow-2xl {\n --tw-shadow: 0 25px 50px -12px var(--tw-shadow-color, rgb(0 0 0 / 0.25));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n}\n.mie\\:shadow-lg {\n --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n}\n.mie\\:shadow-md {\n --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n}\n.mie\\:shadow-sm {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n}\n.mie\\:ring-2 {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n}\n.mie\\:ring-mieprimary {\n --tw-ring-color: var(--mie-color-mieprimary);\n}\n.mie\\:ring-offset-2 {\n --tw-ring-offset-width: 2px;\n --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n}\n.mie\\:transition {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, content-visibility, overlay, pointer-events;\n transition-timing-function: var(--tw-ease, var(--mie-default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--mie-default-transition-duration));\n}\n.mie\\:transition-all {\n transition-property: all;\n transition-timing-function: var(--tw-ease, var(--mie-default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--mie-default-transition-duration));\n}\n.mie\\:transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--mie-default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--mie-default-transition-duration));\n}\n.mie\\:transition-transform {\n transition-property: transform, translate, scale, rotate;\n transition-timing-function: var(--tw-ease, var(--mie-default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--mie-default-transition-duration));\n}\n.mie\\:duration-150 {\n --tw-duration: 150ms;\n transition-duration: 150ms;\n}\n.mie\\:outline-none {\n --tw-outline-style: none;\n outline-style: none;\n}\n.mie\\:select-none {\n -webkit-user-select: none;\n user-select: none;\n}\n.mie\\:group-hover\\:text-mietextsecondary {\n &:is(:where(.mie\\:group):hover *) {\n @media (hover: hover) {\n color: var(--mie-color-mietextsecondary);\n }\n }\n}\n.mie\\:placeholder\\:text-mietextmuted {\n &::placeholder {\n color: var(--mie-color-mietextmuted);\n }\n}\n.mie\\:hover\\:scale-105 {\n &:hover {\n @media (hover: hover) {\n --tw-scale-x: 105%;\n --tw-scale-y: 105%;\n --tw-scale-z: 105%;\n scale: var(--tw-scale-x) var(--tw-scale-y);\n }\n }\n}\n.mie\\:hover\\:border-mieprimary {\n &:hover {\n @media (hover: hover) {\n border-color: var(--mie-color-mieprimary);\n }\n }\n}\n.mie\\:hover\\:border-mieprimary\\/50 {\n &:hover {\n @media (hover: hover) {\n border-color: var(--mie-color-mieprimary);\n @supports (color: color-mix(in lab, red, red)) {\n border-color: color-mix(in oklab, var(--mie-color-mieprimary) 50%, transparent);\n }\n }\n }\n}\n.mie\\:hover\\:border-mietextmuted {\n &:hover {\n @media (hover: hover) {\n border-color: var(--mie-color-mietextmuted);\n }\n }\n}\n.mie\\:hover\\:bg-blue-600 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--mie-color-blue-600);\n }\n }\n}\n.mie\\:hover\\:bg-miebackground {\n &:hover {\n @media (hover: hover) {\n background-color: var(--mie-color-miebackground);\n }\n }\n}\n.mie\\:hover\\:bg-miebackgroundhover {\n &:hover {\n @media (hover: hover) {\n background-color: var(--mie-color-miebackgroundhover);\n }\n }\n}\n.mie\\:hover\\:bg-mieborder {\n &:hover {\n @media (hover: hover) {\n background-color: var(--mie-color-mieborder);\n }\n }\n}\n.mie\\:hover\\:bg-miedanger\\/10 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--mie-color-miedanger);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--mie-color-miedanger) 10%, transparent);\n }\n }\n }\n}\n.mie\\:hover\\:bg-miedanger\\/20 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--mie-color-miedanger);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--mie-color-miedanger) 20%, transparent);\n }\n }\n }\n}\n.mie\\:hover\\:bg-mieprimary {\n &:hover {\n @media (hover: hover) {\n background-color: var(--mie-color-mieprimary);\n }\n }\n}\n.mie\\:hover\\:bg-mieprimary\\/10 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--mie-color-mieprimary);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--mie-color-mieprimary) 10%, transparent);\n }\n }\n }\n}\n.mie\\:hover\\:bg-mieprimary\\/80 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--mie-color-mieprimary);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--mie-color-mieprimary) 80%, transparent);\n }\n }\n }\n}\n.mie\\:hover\\:bg-mieprimary\\/90 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--mie-color-mieprimary);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--mie-color-mieprimary) 90%, transparent);\n }\n }\n }\n}\n.mie\\:hover\\:bg-miesurface {\n &:hover {\n @media (hover: hover) {\n background-color: var(--mie-color-miesurface);\n }\n }\n}\n.mie\\:hover\\:bg-miewarning\\/90 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--mie-color-miewarning);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--mie-color-miewarning) 90%, transparent);\n }\n }\n }\n}\n.mie\\:hover\\:from-mieprimary\\/20 {\n &:hover {\n @media (hover: hover) {\n --tw-gradient-from: var(--mie-color-mieprimary);\n @supports (color: color-mix(in lab, red, red)) {\n --tw-gradient-from: color-mix(in oklab, var(--mie-color-mieprimary) 20%, transparent);\n }\n --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));\n }\n }\n}\n.mie\\:hover\\:to-miebackground {\n &:hover {\n @media (hover: hover) {\n --tw-gradient-to: var(--mie-color-miebackground);\n --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));\n }\n }\n}\n.mie\\:hover\\:text-miedanger {\n &:hover {\n @media (hover: hover) {\n color: var(--mie-color-miedanger);\n }\n }\n}\n.mie\\:hover\\:text-mieprimary {\n &:hover {\n @media (hover: hover) {\n color: var(--mie-color-mieprimary);\n }\n }\n}\n.mie\\:hover\\:text-mietext {\n &:hover {\n @media (hover: hover) {\n color: var(--mie-color-mietext);\n }\n }\n}\n.mie\\:hover\\:text-mietextsecondary {\n &:hover {\n @media (hover: hover) {\n color: var(--mie-color-mietextsecondary);\n }\n }\n}\n.mie\\:hover\\:shadow {\n &:hover {\n @media (hover: hover) {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n}\n.mie\\:hover\\:ring-2 {\n &:hover {\n @media (hover: hover) {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n}\n.mie\\:hover\\:ring-mieborder {\n &:hover {\n @media (hover: hover) {\n --tw-ring-color: var(--mie-color-mieborder);\n }\n }\n}\n.mie\\:focus\\:border-mieprimary {\n &:focus {\n border-color: var(--mie-color-mieprimary);\n }\n}\n.mie\\:focus\\:ring-1 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n}\n.mie\\:focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n}\n.mie\\:focus\\:ring-mieprimary {\n &:focus {\n --tw-ring-color: var(--mie-color-mieprimary);\n }\n}\n.mie\\:focus\\:ring-mieprimary\\/30 {\n &:focus {\n --tw-ring-color: var(--mie-color-mieprimary);\n @supports (color: color-mix(in lab, red, red)) {\n --tw-ring-color: color-mix(in oklab, var(--mie-color-mieprimary) 30%, transparent);\n }\n }\n}\n.mie\\:focus\\:ring-offset-2 {\n &:focus {\n --tw-ring-offset-width: 2px;\n --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n }\n}\n.mie\\:focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n}\n.mie\\:disabled\\:cursor-not-allowed {\n &:disabled {\n cursor: not-allowed;\n }\n}\n.mie\\:disabled\\:opacity-40 {\n &:disabled {\n opacity: 40%;\n }\n}\n.mie\\:disabled\\:opacity-50 {\n &:disabled {\n opacity: 50%;\n }\n}\n.mie\\:sm\\:grid-cols-2 {\n @media (width >= 40rem) {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n}\n.mie\\:md\\:w-80 {\n @media (width >= 48rem) {\n width: calc(var(--mie-spacing) * 80);\n }\n}\n.mie\\:md\\:max-w-\\[75vw\\] {\n @media (width >= 48rem) {\n max-width: 75vw;\n }\n}\n.mie\\:md\\:flex-row {\n @media (width >= 48rem) {\n flex-direction: row;\n }\n}\n.mie\\:md\\:px-6 {\n @media (width >= 48rem) {\n padding-inline: calc(var(--mie-spacing) * 6);\n }\n}\n.mie\\:lg\\:block {\n @media (width >= 64rem) {\n display: block;\n }\n}\n.mie\\:lg\\:flex {\n @media (width >= 64rem) {\n display: flex;\n }\n}\n.mie\\:lg\\:hidden {\n @media (width >= 64rem) {\n display: none;\n }\n}\n.mie\\:lg\\:h-4 {\n @media (width >= 64rem) {\n height: calc(var(--mie-spacing) * 4);\n }\n}\n.mie\\:lg\\:max-h-\\[calc\\(100dvh-11rem\\)\\] {\n @media (width >= 64rem) {\n max-height: calc(100dvh - 11rem);\n }\n}\n.mie\\:lg\\:max-h-\\[calc\\(100dvh-20rem\\)\\] {\n @media (width >= 64rem) {\n max-height: calc(100dvh - 20rem);\n }\n}\n.mie\\:lg\\:w-4 {\n @media (width >= 64rem) {\n width: calc(var(--mie-spacing) * 4);\n }\n}\n.mie\\:lg\\:w-72 {\n @media (width >= 64rem) {\n width: calc(var(--mie-spacing) * 72);\n }\n}\n.mie\\:lg\\:w-90 {\n @media (width >= 64rem) {\n width: calc(var(--mie-spacing) * 90);\n }\n}\n.mie\\:lg\\:max-w-full {\n @media (width >= 64rem) {\n max-width: 100%;\n }\n}\n.mie\\:lg\\:grid-cols-2 {\n @media (width >= 64rem) {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n}\n.mie\\:lg\\:flex-row {\n @media (width >= 64rem) {\n flex-direction: row;\n }\n}\n.mie\\:lg\\:items-center {\n @media (width >= 64rem) {\n align-items: center;\n }\n}\n.mie\\:lg\\:justify-center {\n @media (width >= 64rem) {\n justify-content: center;\n }\n}\n.mie\\:lg\\:gap-2 {\n @media (width >= 64rem) {\n gap: calc(var(--mie-spacing) * 2);\n }\n}\n.mie\\:lg\\:gap-3 {\n @media (width >= 64rem) {\n gap: calc(var(--mie-spacing) * 3);\n }\n}\n.mie\\:lg\\:px-3 {\n @media (width >= 64rem) {\n padding-inline: calc(var(--mie-spacing) * 3);\n }\n}\n.mie\\:lg\\:px-4 {\n @media (width >= 64rem) {\n padding-inline: calc(var(--mie-spacing) * 4);\n }\n}\n.mie\\:lg\\:px-6 {\n @media (width >= 64rem) {\n padding-inline: calc(var(--mie-spacing) * 6);\n }\n}\n.mie\\:lg\\:py-2 {\n @media (width >= 64rem) {\n padding-block: calc(var(--mie-spacing) * 2);\n }\n}\n.mie\\:lg\\:pr-2 {\n @media (width >= 64rem) {\n padding-right: calc(var(--mie-spacing) * 2);\n }\n}\n.mie\\:lg\\:pb-4 {\n @media (width >= 64rem) {\n padding-bottom: calc(var(--mie-spacing) * 4);\n }\n}\n.mie\\:lg\\:text-sm {\n @media (width >= 64rem) {\n font-size: var(--mie-text-sm);\n line-height: var(--tw-leading, var(--mie-text-sm--line-height));\n }\n}\n@layer base {\n .qb-editor-root, .qb-editor-root *, .qb-editor-root *::before, .qb-editor-root *::after {\n box-sizing: border-box;\n border-width: 0;\n border-style: solid;\n border-color: currentColor;\n }\n .qb-editor-root {\n font-family: \"Titillium Web\", ui-sans-serif, system-ui, sans-serif;\n }\n .qb-editor-root input, .qb-editor-root textarea, .qb-editor-root select, .qb-editor-root button {\n font-family: inherit;\n font-size: inherit;\n }\n}\ndiv:focus-visible, button:focus-visible {\n outline: none;\n}\n.qb-editor-root.dark {\n --mie-color-mieprimary: #6b7fa3;\n --mie-color-miesecondary: #9ca3af;\n --mie-color-mieaccent: #34d399;\n --mie-color-miedanger: #f87171;\n --mie-color-miewarning: #fb923c;\n --mie-color-miesurface: #252526;\n --mie-color-mieborder: #3c3c3c;\n --mie-color-mieborderinactive: #5a5a5a;\n --mie-color-mietext: #d4d4d4;\n --mie-color-mietextsecondary: #1e1e1e;\n --mie-color-mietextmuted: #808080;\n --mie-color-miebackground: #1e1e1e;\n --mie-color-miebackgroundsecondary: #252526;\n --mie-color-miebackgroundhover: #2a2d2e;\n --mie-color-mieoverlay: rgba(0, 0, 0, 0.7);\n}\n.mie\\:custom-scrollbar::-webkit-scrollbar {\n width: 4px;\n}\n.mie\\:custom-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n}\n.mie\\:custom-scrollbar::-webkit-scrollbar-thumb {\n background: transparent;\n border-radius: 9999px;\n transition: background 0.2s;\n}\n.mie\\:custom-scrollbar:hover::-webkit-scrollbar-thumb {\n background: #d1d5db;\n}\n.mie\\:custom-scrollbar {\n scrollbar-width: thin;\n scrollbar-color: transparent transparent;\n}\n.mie\\:custom-scrollbar:hover {\n scrollbar-color: #d1d5db transparent;\n}\n@property --tw-translate-x {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-scale-x {\n syntax: \"*\";\n inherits: false;\n initial-value: 1;\n}\n@property --tw-scale-y {\n syntax: \"*\";\n inherits: false;\n initial-value: 1;\n}\n@property --tw-scale-z {\n syntax: \"*\";\n inherits: false;\n initial-value: 1;\n}\n@property --tw-space-y-reverse {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: \"*\";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-gradient-position {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-gradient-from {\n syntax: \"<color>\";\n inherits: false;\n initial-value: #0000;\n}\n@property --tw-gradient-via {\n syntax: \"<color>\";\n inherits: false;\n initial-value: #0000;\n}\n@property --tw-gradient-to {\n syntax: \"<color>\";\n inherits: false;\n initial-value: #0000;\n}\n@property --tw-gradient-stops {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-gradient-via-stops {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-gradient-from-position {\n syntax: \"<length-percentage>\";\n inherits: false;\n initial-value: 0%;\n}\n@property --tw-gradient-via-position {\n syntax: \"<length-percentage>\";\n inherits: false;\n initial-value: 50%;\n}\n@property --tw-gradient-to-position {\n syntax: \"<length-percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-leading {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-font-weight {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-tracking {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: \"<length>\";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: \"*\";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-duration {\n syntax: \"*\";\n inherits: false;\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-scale-z: 1;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-gradient-position: initial;\n --tw-gradient-from: #0000;\n --tw-gradient-via: #0000;\n --tw-gradient-to: #0000;\n --tw-gradient-stops: initial;\n --tw-gradient-via-stops: initial;\n --tw-gradient-from-position: 0%;\n --tw-gradient-via-position: 50%;\n --tw-gradient-to-position: 100%;\n --tw-leading: initial;\n --tw-font-weight: initial;\n --tw-tracking: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-duration: initial;\n }\n }\n}\n";
9
9
  document.head.appendChild(style);
10
10
  }
11
11
  window.__QUESTIONNAIRE_EDITOR_CSS_INJECTED = true;
12
12
  })();
13
- import l, { useCallback as de, useMemo as Ee, memo as Ce, useState as ue, useRef as U, useEffect as J } from "react";
14
- import { useFormStore as V, useFormDefinition as $e, useAlert as Ue, useUIApi as B, VEDITOR_ICON as ii, CODE_ICON as ti, PICTURE_ICON as ri, UPLOAD_ICON as ni, DOWNLOAD_ICON as si, parseAndDetect as fe, adaptSchema as pe, fieldTypes as K, TOOLS_ICON as oi, X_ICON as ai, PAPERCLIP_ICON as mi, MATRIX_ICON as li, RANKING_ICON as ci, SELECTINPUT_ICON as di, FOLDERS_ICON as ui, TEXTINPUT_ICON as fi, CustomCheckbox as pi, TRASHCANTWO_ICON as re, useFormApi as Ne, FormStoreContext as Oe, ARROWDOWN_ICON as hi, NUMERIC_EXPRESSION_FORMATS as xi, EDIT_ICON as bi, EYEEDIT_ICON as gi, useVisibleFields as vi, useUIStore as yi, getFieldComponent as ji, MIE_FORMS_SCHEMA_TYPE as ve, createFormStore as wi, createUIStore as Ei, UIStoreContext as Ni, AlertProvider as Ci } from "@mieweb/forms-engine";
15
- import ae from "js-yaml";
16
- import { useStore as Oi } from "zustand";
17
- var me = { exports: {} }, Z = {};
18
- var Te;
19
- function Ti() {
20
- if (Te) return Z;
21
- Te = 1;
13
+ import c, { useCallback as ue, useMemo as Ee, memo as Oe, useState as fe, useRef as V, useEffect as J } from "react";
14
+ import { useFormStore as Y, useFormDefinition as Ue, useAlert as ze, useUIApi as B, VEDITOR_ICON as ti, CODE_ICON as ri, PICTURE_ICON as ni, UPLOAD_ICON as oi, DOWNLOAD_ICON as si, parseAndDetect as pe, adaptSchema as he, fieldTypes as X, TOOLS_ICON as ai, X_ICON as li, PAPERCLIP_ICON as mi, MATRIX_ICON as ci, RANKING_ICON as di, SELECTINPUT_ICON as ui, FOLDERS_ICON as fi, TEXTINPUT_ICON as pi, useInstanceId as K, CustomCheckbox as hi, TRASHCANTWO_ICON as oe, useFormApi as Ne, FormStoreContext as Te, ARROWDOWN_ICON as xi, NUMERIC_EXPRESSION_FORMATS as bi, EDIT_ICON as gi, EYEEDIT_ICON as vi, useVisibleFields as yi, useUIStore as ji, getFieldComponent as wi, MIE_FORMS_SCHEMA_TYPE as ye, createFormStore as Ci, createUIStore as Ei, UIStoreContext as Ni, AlertProvider as Oi } from "@mieweb/forms-engine";
15
+ import ee from "js-yaml";
16
+ import { useStore as Ti } from "zustand";
17
+ var me = { exports: {} }, ie = {};
18
+ var Ie;
19
+ function Ii() {
20
+ if (Ie) return ie;
21
+ Ie = 1;
22
22
  var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
23
- function r(n, s, o) {
24
- var d = null;
25
- if (o !== void 0 && (d = "" + o), s.key !== void 0 && (d = "" + s.key), "key" in s) {
26
- o = {};
27
- for (var m in s)
28
- m !== "key" && (o[m] = s[m]);
29
- } else o = s;
30
- return s = o.ref, {
23
+ function r(n, o, a) {
24
+ var m = null;
25
+ if (a !== void 0 && (m = "" + a), o.key !== void 0 && (m = "" + o.key), "key" in o) {
26
+ a = {};
27
+ for (var l in o)
28
+ l !== "key" && (a[l] = o[l]);
29
+ } else a = o;
30
+ return o = a.ref, {
31
31
  $$typeof: e,
32
32
  type: n,
33
- key: d,
34
- ref: s !== void 0 ? s : null,
35
- props: o
33
+ key: m,
34
+ ref: o !== void 0 ? o : null,
35
+ props: a
36
36
  };
37
37
  }
38
- return Z.Fragment = t, Z.jsx = r, Z.jsxs = r, Z;
38
+ return ie.Fragment = t, ie.jsx = r, ie.jsxs = r, ie;
39
39
  }
40
- var ee = {};
41
- var Ie;
42
- function Ii() {
43
- return Ie || (Ie = 1, process.env.NODE_ENV !== "production" && (function() {
44
- function e(a) {
45
- if (a == null) return null;
46
- if (typeof a == "function")
47
- return a.$$typeof === P ? null : a.displayName || a.name || null;
48
- if (typeof a == "string") return a;
49
- switch (a) {
50
- case k:
40
+ var te = {};
41
+ var Se;
42
+ function Si() {
43
+ return Se || (Se = 1, process.env.NODE_ENV !== "production" && (function() {
44
+ function e(s) {
45
+ if (s == null) return null;
46
+ if (typeof s == "function")
47
+ return s.$$typeof === w ? null : s.displayName || s.name || null;
48
+ if (typeof s == "string") return s;
49
+ switch (s) {
50
+ case E:
51
51
  return "Fragment";
52
- case w:
52
+ case y:
53
53
  return "Profiler";
54
- case R:
54
+ case T:
55
55
  return "StrictMode";
56
- case b:
56
+ case O:
57
57
  return "Suspense";
58
- case f:
58
+ case x:
59
59
  return "SuspenseList";
60
60
  case I:
61
61
  return "Activity";
62
62
  }
63
- if (typeof a == "object")
64
- switch (typeof a.tag == "number" && console.error(
63
+ if (typeof s == "object")
64
+ switch (typeof s.tag == "number" && console.error(
65
65
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
66
- ), a.$$typeof) {
67
- case j:
66
+ ), s.$$typeof) {
67
+ case F:
68
68
  return "Portal";
69
- case T:
70
- return a.displayName || "Context";
71
69
  case A:
72
- return (a._context.displayName || "Context") + ".Consumer";
73
- case x:
74
- var v = a.render;
75
- return a = a.displayName, a || (a = v.displayName || v.name || "", a = a !== "" ? "ForwardRef(" + a + ")" : "ForwardRef"), a;
76
- case O:
77
- return v = a.displayName || null, v !== null ? v : e(a.type) || "Memo";
78
- case E:
79
- v = a._payload, a = a._init;
70
+ return s.displayName || "Context";
71
+ case R:
72
+ return (s._context.displayName || "Context") + ".Consumer";
73
+ case b:
74
+ var C = s.render;
75
+ return s = s.displayName, s || (s = C.displayName || C.name || "", s = s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef"), s;
76
+ case q:
77
+ return C = s.displayName || null, C !== null ? C : e(s.type) || "Memo";
78
+ case P:
79
+ C = s._payload, s = s._init;
80
80
  try {
81
- return e(a(v));
81
+ return e(s(C));
82
82
  } catch {
83
83
  }
84
84
  }
85
85
  return null;
86
86
  }
87
- function t(a) {
88
- return "" + a;
87
+ function t(s) {
88
+ return "" + s;
89
89
  }
90
- function r(a) {
90
+ function r(s) {
91
91
  try {
92
- t(a);
93
- var v = !1;
92
+ t(s);
93
+ var C = !1;
94
94
  } catch {
95
- v = !0;
95
+ C = !0;
96
96
  }
97
- if (v) {
98
- v = console;
99
- var y = v.error, D = typeof Symbol == "function" && Symbol.toStringTag && a[Symbol.toStringTag] || a.constructor.name || "Object";
100
- return y.call(
101
- v,
97
+ if (C) {
98
+ C = console;
99
+ var $ = C.error, j = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
100
+ return $.call(
101
+ C,
102
102
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
103
- D
104
- ), t(a);
103
+ j
104
+ ), t(s);
105
105
  }
106
106
  }
107
- function n(a) {
108
- if (a === k) return "<>";
109
- if (typeof a == "object" && a !== null && a.$$typeof === E)
107
+ function n(s) {
108
+ if (s === E) return "<>";
109
+ if (typeof s == "object" && s !== null && s.$$typeof === P)
110
110
  return "<...>";
111
111
  try {
112
- var v = e(a);
113
- return v ? "<" + v + ">" : "<...>";
112
+ var C = e(s);
113
+ return C ? "<" + C + ">" : "<...>";
114
114
  } catch {
115
115
  return "<...>";
116
116
  }
117
117
  }
118
- function s() {
119
- var a = p.A;
120
- return a === null ? null : a.getOwner();
121
- }
122
118
  function o() {
119
+ var s = S.A;
120
+ return s === null ? null : s.getOwner();
121
+ }
122
+ function a() {
123
123
  return Error("react-stack-top-frame");
124
124
  }
125
- function d(a) {
126
- if (C.call(a, "key")) {
127
- var v = Object.getOwnPropertyDescriptor(a, "key").get;
128
- if (v && v.isReactWarning) return !1;
125
+ function m(s) {
126
+ if (f.call(s, "key")) {
127
+ var C = Object.getOwnPropertyDescriptor(s, "key").get;
128
+ if (C && C.isReactWarning) return !1;
129
129
  }
130
- return a.key !== void 0;
130
+ return s.key !== void 0;
131
131
  }
132
- function m(a, v) {
133
- function y() {
134
- F || (F = !0, console.error(
132
+ function l(s, C) {
133
+ function $() {
134
+ k || (k = !0, console.error(
135
135
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
136
- v
136
+ C
137
137
  ));
138
138
  }
139
- y.isReactWarning = !0, Object.defineProperty(a, "key", {
140
- get: y,
139
+ $.isReactWarning = !0, Object.defineProperty(s, "key", {
140
+ get: $,
141
141
  configurable: !0
142
142
  });
143
143
  }
144
- function c() {
145
- var a = e(this.type);
146
- return $[a] || ($[a] = !0, console.error(
144
+ function d() {
145
+ var s = e(this.type);
146
+ return _[s] || (_[s] = !0, console.error(
147
147
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
148
- )), a = this.props.ref, a !== void 0 ? a : null;
148
+ )), s = this.props.ref, s !== void 0 ? s : null;
149
149
  }
150
- function u(a, v, y, D, oe, be) {
151
- var L = y.ref;
152
- return a = {
153
- $$typeof: _,
154
- type: a,
155
- key: v,
156
- props: y,
157
- _owner: D
158
- }, (L !== void 0 ? L : null) !== null ? Object.defineProperty(a, "ref", {
150
+ function u(s, C, $, j, le, ge) {
151
+ var U = $.ref;
152
+ return s = {
153
+ $$typeof: W,
154
+ type: s,
155
+ key: C,
156
+ props: $,
157
+ _owner: j
158
+ }, (U !== void 0 ? U : null) !== null ? Object.defineProperty(s, "ref", {
159
159
  enumerable: !1,
160
- get: c
161
- }) : Object.defineProperty(a, "ref", { enumerable: !1, value: null }), a._store = {}, Object.defineProperty(a._store, "validated", {
160
+ get: d
161
+ }) : Object.defineProperty(s, "ref", { enumerable: !1, value: null }), s._store = {}, Object.defineProperty(s._store, "validated", {
162
162
  configurable: !1,
163
163
  enumerable: !1,
164
164
  writable: !0,
165
165
  value: 0
166
- }), Object.defineProperty(a, "_debugInfo", {
166
+ }), Object.defineProperty(s, "_debugInfo", {
167
167
  configurable: !1,
168
168
  enumerable: !1,
169
169
  writable: !0,
170
170
  value: null
171
- }), Object.defineProperty(a, "_debugStack", {
171
+ }), Object.defineProperty(s, "_debugStack", {
172
172
  configurable: !1,
173
173
  enumerable: !1,
174
174
  writable: !0,
175
- value: oe
176
- }), Object.defineProperty(a, "_debugTask", {
175
+ value: le
176
+ }), Object.defineProperty(s, "_debugTask", {
177
177
  configurable: !1,
178
178
  enumerable: !1,
179
179
  writable: !0,
180
- value: be
181
- }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
180
+ value: ge
181
+ }), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
182
182
  }
183
- function h(a, v, y, D, oe, be) {
184
- var L = v.children;
185
- if (L !== void 0)
186
- if (D)
187
- if (M(L)) {
188
- for (D = 0; D < L.length; D++)
189
- g(L[D]);
190
- Object.freeze && Object.freeze(L);
183
+ function p(s, C, $, j, le, ge) {
184
+ var U = C.children;
185
+ if (U !== void 0)
186
+ if (j)
187
+ if (g(U)) {
188
+ for (j = 0; j < U.length; j++)
189
+ h(U[j]);
190
+ Object.freeze && Object.freeze(U);
191
191
  } else
192
192
  console.error(
193
193
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
194
194
  );
195
- else g(L);
196
- if (C.call(v, "key")) {
197
- L = e(a);
198
- var X = Object.keys(v).filter(function(ei) {
199
- return ei !== "key";
195
+ else h(U);
196
+ if (f.call(C, "key")) {
197
+ U = e(s);
198
+ var Q = Object.keys(C).filter(function(ii) {
199
+ return ii !== "key";
200
200
  });
201
- D = 0 < X.length ? "{key: someKey, " + X.join(": ..., ") + ": ...}" : "{key: someKey}", Y[L + D] || (X = 0 < X.length ? "{" + X.join(": ..., ") + ": ...}" : "{}", console.error(
201
+ j = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", z[U + j] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error(
202
202
  `A props object containing a "key" prop is being spread into JSX:
203
203
  let props = %s;
204
204
  <%s {...props} />
205
205
  React keys must be passed directly to JSX without using spread:
206
206
  let props = %s;
207
207
  <%s key={someKey} {...props} />`,
208
- D,
209
- L,
210
- X,
211
- L
212
- ), Y[L + D] = !0);
208
+ j,
209
+ U,
210
+ Q,
211
+ U
212
+ ), z[U + j] = !0);
213
213
  }
214
- if (L = null, y !== void 0 && (r(y), L = "" + y), d(v) && (r(v.key), L = "" + v.key), "key" in v) {
215
- y = {};
216
- for (var ge in v)
217
- ge !== "key" && (y[ge] = v[ge]);
218
- } else y = v;
219
- return L && m(
220
- y,
221
- typeof a == "function" ? a.displayName || a.name || "Unknown" : a
214
+ if (U = null, $ !== void 0 && (r($), U = "" + $), m(C) && (r(C.key), U = "" + C.key), "key" in C) {
215
+ $ = {};
216
+ for (var ve in C)
217
+ ve !== "key" && ($[ve] = C[ve]);
218
+ } else $ = C;
219
+ return U && l(
220
+ $,
221
+ typeof s == "function" ? s.displayName || s.name || "Unknown" : s
222
222
  ), u(
223
- a,
224
- L,
225
- y,
226
- s(),
227
- oe,
228
- be
223
+ s,
224
+ U,
225
+ $,
226
+ o(),
227
+ le,
228
+ ge
229
229
  );
230
230
  }
231
- function g(a) {
232
- S(a) ? a._store && (a._store.validated = 1) : typeof a == "object" && a !== null && a.$$typeof === E && (a._payload.status === "fulfilled" ? S(a._payload.value) && a._payload.value._store && (a._payload.value._store.validated = 1) : a._store && (a._store.validated = 1));
231
+ function h(s) {
232
+ N(s) ? s._store && (s._store.validated = 1) : typeof s == "object" && s !== null && s.$$typeof === P && (s._payload.status === "fulfilled" ? N(s._payload.value) && s._payload.value._store && (s._payload.value._store.validated = 1) : s._store && (s._store.validated = 1));
233
233
  }
234
- function S(a) {
235
- return typeof a == "object" && a !== null && a.$$typeof === _;
234
+ function N(s) {
235
+ return typeof s == "object" && s !== null && s.$$typeof === W;
236
236
  }
237
- var q = l, _ = /* @__PURE__ */ Symbol.for("react.transitional.element"), j = /* @__PURE__ */ Symbol.for("react.portal"), k = /* @__PURE__ */ Symbol.for("react.fragment"), R = /* @__PURE__ */ Symbol.for("react.strict_mode"), w = /* @__PURE__ */ Symbol.for("react.profiler"), A = /* @__PURE__ */ Symbol.for("react.consumer"), T = /* @__PURE__ */ Symbol.for("react.context"), x = /* @__PURE__ */ Symbol.for("react.forward_ref"), b = /* @__PURE__ */ Symbol.for("react.suspense"), f = /* @__PURE__ */ Symbol.for("react.suspense_list"), O = /* @__PURE__ */ Symbol.for("react.memo"), E = /* @__PURE__ */ Symbol.for("react.lazy"), I = /* @__PURE__ */ Symbol.for("react.activity"), P = /* @__PURE__ */ Symbol.for("react.client.reference"), p = q.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, C = Object.prototype.hasOwnProperty, M = Array.isArray, N = console.createTask ? console.createTask : function() {
237
+ var M = c, W = /* @__PURE__ */ Symbol.for("react.transitional.element"), F = /* @__PURE__ */ Symbol.for("react.portal"), E = /* @__PURE__ */ Symbol.for("react.fragment"), T = /* @__PURE__ */ Symbol.for("react.strict_mode"), y = /* @__PURE__ */ Symbol.for("react.profiler"), R = /* @__PURE__ */ Symbol.for("react.consumer"), A = /* @__PURE__ */ Symbol.for("react.context"), b = /* @__PURE__ */ Symbol.for("react.forward_ref"), O = /* @__PURE__ */ Symbol.for("react.suspense"), x = /* @__PURE__ */ Symbol.for("react.suspense_list"), q = /* @__PURE__ */ Symbol.for("react.memo"), P = /* @__PURE__ */ Symbol.for("react.lazy"), I = /* @__PURE__ */ Symbol.for("react.activity"), w = /* @__PURE__ */ Symbol.for("react.client.reference"), S = M.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, f = Object.prototype.hasOwnProperty, g = Array.isArray, v = console.createTask ? console.createTask : function() {
238
238
  return null;
239
239
  };
240
- q = {
241
- react_stack_bottom_frame: function(a) {
242
- return a();
240
+ M = {
241
+ react_stack_bottom_frame: function(s) {
242
+ return s();
243
243
  }
244
244
  };
245
- var F, $ = {}, z = q.react_stack_bottom_frame.bind(
246
- q,
247
- o
248
- )(), H = N(n(o)), Y = {};
249
- ee.Fragment = k, ee.jsx = function(a, v, y) {
250
- var D = 1e4 > p.recentlyCreatedOwnerStacks++;
251
- return h(
252
- a,
253
- v,
254
- y,
245
+ var k, _ = {}, D = M.react_stack_bottom_frame.bind(
246
+ M,
247
+ a
248
+ )(), L = v(n(a)), z = {};
249
+ te.Fragment = E, te.jsx = function(s, C, $) {
250
+ var j = 1e4 > S.recentlyCreatedOwnerStacks++;
251
+ return p(
252
+ s,
253
+ C,
254
+ $,
255
255
  !1,
256
- D ? Error("react-stack-top-frame") : z,
257
- D ? N(n(a)) : H
256
+ j ? Error("react-stack-top-frame") : D,
257
+ j ? v(n(s)) : L
258
258
  );
259
- }, ee.jsxs = function(a, v, y) {
260
- var D = 1e4 > p.recentlyCreatedOwnerStacks++;
261
- return h(
262
- a,
263
- v,
264
- y,
259
+ }, te.jsxs = function(s, C, $) {
260
+ var j = 1e4 > S.recentlyCreatedOwnerStacks++;
261
+ return p(
262
+ s,
263
+ C,
264
+ $,
265
265
  !0,
266
- D ? Error("react-stack-top-frame") : z,
267
- D ? N(n(a)) : H
266
+ j ? Error("react-stack-top-frame") : D,
267
+ j ? v(n(s)) : L
268
268
  );
269
269
  };
270
- })()), ee;
270
+ })()), te;
271
271
  }
272
- var Se;
273
- function Si() {
274
- return Se || (Se = 1, process.env.NODE_ENV === "production" ? me.exports = Ti() : me.exports = Ii()), me.exports;
275
- }
276
- var i = Si();
272
+ var ke;
277
273
  function ki() {
278
- const [e, t] = l.useState(!1), [r, n] = l.useState(null), s = V((w) => w.replaceAll), o = $e(), { showAlert: d } = Ue(), m = B(), c = m.state.isPreview, u = m.state.isCodeEditor ?? !1, h = m.state.codeEditorHasError ?? !1, g = (w) => {
274
+ return ke || (ke = 1, process.env.NODE_ENV === "production" ? me.exports = Ii() : me.exports = Si()), me.exports;
275
+ }
276
+ var i = ki();
277
+ function Ri() {
278
+ const [e, t] = c.useState(!1), [r, n] = c.useState(null), o = Y((y) => y.replaceAll), a = Ue(), { showAlert: m } = ze(), l = B(), d = l.state.isPreview, u = l.state.isCodeEditor ?? !1, p = l.state.codeEditorHasError ?? !1, h = (y) => {
279
279
  try {
280
- const A = String(w).replace(/^\uFEFF/, "").trim(), { data: T, schemaType: x } = fe(A);
281
- if (x !== "mieforms" && x !== "surveyjs") {
282
- d(
280
+ const R = String(y).replace(/^\uFEFF/, "").trim(), { data: A, schemaType: b } = pe(R);
281
+ if (b !== "mieforms" && b !== "surveyjs") {
282
+ m(
283
283
  `Expected: MIE Forms or SurveyJS
284
- Detected: ${x}`,
284
+ Detected: ${b}`,
285
285
  { title: "Unsupported Schema Format" }
286
286
  );
287
287
  return;
288
288
  }
289
- n({ data: T, detectedSchemaType: x }), t(!0);
290
- } catch (A) {
291
- d(
292
- A?.message || "Invalid file format",
289
+ n({ data: A, detectedSchemaType: b }), t(!0);
290
+ } catch (R) {
291
+ m(
292
+ R?.message || "Invalid file format",
293
293
  { title: "Failed to Parse File" }
294
294
  );
295
295
  }
296
- }, S = (w) => {
296
+ }, N = (y) => {
297
297
  if (r)
298
298
  try {
299
- const { data: A } = r, T = pe(A, w), x = T.fields || [];
300
- if (!Array.isArray(x))
299
+ const { data: R } = r, A = he(R, y), b = A.fields || [];
300
+ if (!Array.isArray(b))
301
301
  throw new Error("Expected array of fields");
302
- T.conversionReport && m.setConversionReport(T.conversionReport);
303
- const b = {
304
- schemaType: w === "surveyjs" ? "mieforms-v1.0" : A.schemaType || "mieforms-v1.0",
305
- ...T.conversionReport?.surveyMetadata || {},
306
- fields: x
302
+ A.conversionReport && l.setConversionReport(A.conversionReport);
303
+ const O = {
304
+ schemaType: y === "surveyjs" ? "mieforms-v1.0" : R.schemaType || "mieforms-v1.0",
305
+ ...A.conversionReport?.surveyMetadata || {},
306
+ fields: b
307
307
  };
308
- if (w === "mieforms") {
309
- const { fields: f, schemaType: O, ...E } = A;
310
- Object.keys(E).length > 0 && Object.assign(b, E);
308
+ if (y === "mieforms") {
309
+ const { fields: x, schemaType: q, ...P } = R;
310
+ Object.keys(P).length > 0 && Object.assign(O, P);
311
311
  }
312
- if (s(b), m.selectedFieldId.clear(), m.preview.set(!1), w === "surveyjs" && T.conversionReport) {
313
- const f = T.conversionReport, O = f.unsupportedFields?.length || 0;
314
- d(
312
+ if (o(O), l.selectedFieldId.clear(), l.preview.set(!1), y === "surveyjs" && A.conversionReport) {
313
+ const x = A.conversionReport, q = x.unsupportedFields?.length || 0;
314
+ m(
315
315
  `Format: SurveyJS → MIE Forms
316
316
 
317
- Converted: ${f.convertedFields || 0} field(s)
318
- Unsupported: ${O} field(s)${O > 0 ? " ⚠️" : ""}`,
317
+ Converted: ${x.convertedFields || 0} field(s)
318
+ Unsupported: ${q} field(s)${q > 0 ? " ⚠️" : ""}`,
319
319
  { title: "✅ Import Successful" }
320
320
  );
321
321
  } else
322
- d(
323
- `Format: ${w === "surveyjs" ? "SurveyJS" : "MIE Forms"}
324
- Loaded ${x.length} field(s)`,
322
+ m(
323
+ `Format: ${y === "surveyjs" ? "SurveyJS" : "MIE Forms"}
324
+ Loaded ${b.length} field(s)`,
325
325
  { title: "✅ Import Successful" }
326
326
  );
327
327
  t(!1), n(null);
328
- } catch (A) {
329
- d(
330
- A?.message || "Invalid format",
328
+ } catch (R) {
329
+ m(
330
+ R?.message || "Invalid format",
331
331
  { title: "Import Failed" }
332
332
  ), t(!1), n(null);
333
333
  }
334
- }, q = () => {
334
+ }, M = () => {
335
335
  t(!1), n(null);
336
- }, _ = () => {
337
- m.preview.set(!1), m.codeEditor.set(!1);
338
- }, j = () => {
339
- m.preview.set(!1), m.codeEditor.set(!0);
340
- }, k = () => {
341
- m.preview.set(!0), m.codeEditor.set(!1), m.selectedFieldId.clear();
342
- }, R = () => {
343
- const w = JSON.stringify(o, null, 2), A = new Blob([w], { type: "application/json" }), T = URL.createObjectURL(A), x = document.createElement("a");
344
- x.href = T, x.download = "questionnaire.json", x.click(), URL.revokeObjectURL(T);
336
+ }, W = () => {
337
+ l.preview.set(!1), l.codeEditor.set(!1);
338
+ }, F = () => {
339
+ l.preview.set(!1), l.codeEditor.set(!0);
340
+ }, E = () => {
341
+ l.preview.set(!0), l.codeEditor.set(!1), l.selectedFieldId.clear();
342
+ }, T = () => {
343
+ const y = JSON.stringify(a, null, 2), R = new Blob([y], { type: "application/json" }), A = URL.createObjectURL(R), b = document.createElement("a");
344
+ b.href = A, b.download = "questionnaire.json", b.click(), URL.revokeObjectURL(A);
345
345
  };
346
346
  return /* @__PURE__ */ i.jsxs("header", { className: "editor-header mie:w-full mie:bg-miesurface mie:border mie:border-mieborder mie:rounded-lg mie:shadow-sm", children: [
347
347
  /* @__PURE__ */ i.jsx("div", { className: "mie:px-4 mie:py-4", children: /* @__PURE__ */ i.jsxs("div", { className: "mie:flex mie:flex-wrap mie:items-center mie:justify-between mie:gap-3", children: [
@@ -349,12 +349,12 @@ Loaded ${x.length} field(s)`,
349
349
  /* @__PURE__ */ i.jsxs(
350
350
  "button",
351
351
  {
352
- className: `mie:flex mie:items-center mie:justify-center mie:gap-2 mie:px-2 mie:lg:px-4 mie:py-2 mie:lg:py-2 mie:rounded-lg mie:text-xs mie:lg:text-sm mie:font-medium mie:transition-colors mie:border-0 mie:outline-none mie:focus:outline-none ${!c && !u ? "mie:bg-mieprimary mie:text-mietextsecondary mie:shadow-sm" : h ? "mie:bg-transparent mie:text-mietextmuted/50 mie:cursor-not-allowed" : "mie:bg-transparent mie:text-mietextmuted mie:hover:text-mietext mie:hover:bg-miesurface"}`,
353
- onClick: _,
354
- disabled: h,
355
- title: h ? "Fix code errors before switching" : "Visual Editor",
352
+ className: `mie:flex mie:items-center mie:justify-center mie:gap-2 mie:px-2 mie:lg:px-4 mie:py-2 mie:lg:py-2 mie:rounded-lg mie:text-xs mie:lg:text-sm mie:font-medium mie:transition-colors mie:border-0 mie:outline-none mie:focus:outline-none ${!d && !u ? "mie:bg-mieprimary mie:text-mietextsecondary mie:shadow-sm" : p ? "mie:bg-transparent mie:text-mietextmuted/50 mie:cursor-not-allowed" : "mie:bg-transparent mie:text-mietextmuted mie:hover:text-mietext mie:hover:bg-miesurface"}`,
353
+ onClick: W,
354
+ disabled: p,
355
+ title: p ? "Fix code errors before switching" : "Visual Editor",
356
356
  children: [
357
- /* @__PURE__ */ i.jsx(ii, { className: "mie:w-5 mie:h-5" }),
357
+ /* @__PURE__ */ i.jsx(ti, { className: "mie:w-5 mie:h-5" }),
358
358
  /* @__PURE__ */ i.jsx("span", { children: "Build" })
359
359
  ]
360
360
  }
@@ -363,10 +363,10 @@ Loaded ${x.length} field(s)`,
363
363
  "button",
364
364
  {
365
365
  className: `mie:flex mie:items-center mie:justify-center mie:gap-2 mie:px-2 mie:lg:px-4 mie:py-2 mie:lg:py-2 mie:rounded-lg mie:text-xs mie:lg:text-sm mie:font-medium mie:transition-colors mie:border-0 mie:outline-none mie:focus:outline-none ${u ? "mie:bg-mieprimary mie:text-mietextsecondary mie:shadow-sm" : "mie:bg-transparent mie:text-mietextmuted mie:hover:text-mietext mie:hover:bg-miesurface"}`,
366
- onClick: j,
366
+ onClick: F,
367
367
  title: "Code Editor",
368
368
  children: [
369
- /* @__PURE__ */ i.jsx(ti, { className: "mie:w-5 mie:h-5" }),
369
+ /* @__PURE__ */ i.jsx(ri, { className: "mie:w-5 mie:h-5" }),
370
370
  /* @__PURE__ */ i.jsx("span", { children: "Code" })
371
371
  ]
372
372
  }
@@ -374,12 +374,12 @@ Loaded ${x.length} field(s)`,
374
374
  /* @__PURE__ */ i.jsxs(
375
375
  "button",
376
376
  {
377
- className: `mie:flex mie:items-center mie:justify-center mie:gap-2 mie:px-2 mie:lg:px-4 mie:py-2 mie:lg:py-2 mie:rounded-lg mie:text-xs mie:lg:text-sm mie:font-medium mie:transition-colors mie:border-0 mie:outline-none mie:focus:outline-none ${c ? "mie:bg-mieprimary mie:text-mietextsecondary mie:shadow-sm" : h ? "mie:bg-transparent mie:text-mietextmuted/50 mie:cursor-not-allowed" : "mie:bg-transparent mie:text-mietextmuted mie:hover:text-mietext mie:hover:bg-miesurface"}`,
378
- onClick: k,
379
- disabled: h,
380
- title: h ? "Fix code errors before switching" : "Preview Form",
377
+ className: `mie:flex mie:items-center mie:justify-center mie:gap-2 mie:px-2 mie:lg:px-4 mie:py-2 mie:lg:py-2 mie:rounded-lg mie:text-xs mie:lg:text-sm mie:font-medium mie:transition-colors mie:border-0 mie:outline-none mie:focus:outline-none ${d ? "mie:bg-mieprimary mie:text-mietextsecondary mie:shadow-sm" : p ? "mie:bg-transparent mie:text-mietextmuted/50 mie:cursor-not-allowed" : "mie:bg-transparent mie:text-mietextmuted mie:hover:text-mietext mie:hover:bg-miesurface"}`,
378
+ onClick: E,
379
+ disabled: p,
380
+ title: p ? "Fix code errors before switching" : "Preview Form",
381
381
  children: [
382
- /* @__PURE__ */ i.jsx(ri, { className: "mie:w-5 mie:h-5" }),
382
+ /* @__PURE__ */ i.jsx(ni, { className: "mie:w-5 mie:h-5" }),
383
383
  /* @__PURE__ */ i.jsx("span", { children: "Preview" })
384
384
  ]
385
385
  }
@@ -387,7 +387,7 @@ Loaded ${x.length} field(s)`,
387
387
  ] }),
388
388
  /* @__PURE__ */ i.jsxs("div", { className: "header-actions mie:flex mie:gap-1 mie:items-center", children: [
389
389
  /* @__PURE__ */ i.jsxs("label", { className: "header-import-label mie:group mie:px-2 mie:py-2 mie:lg:px-3 mie:lg:py-2 mie:rounded-lg mie:border mie:border-mieborder mie:bg-miesurface mie:hover:bg-mieprimary mie:hover:text-mietextsecondary mie:hover:border-mieprimary mie:cursor-pointer mie:text-xs mie:lg:text-sm mie:font-medium mie:transition-colors mie:flex mie:items-center mie:lg:gap-2 mie:gap-0 mie:text-mietext", children: [
390
- /* @__PURE__ */ i.jsx(ni, { className: "mie:w-4 mie:h-4 mie:lg:w-4 mie:lg:h-4 mie:text-mietext mie:group-hover:text-mietextsecondary mie:transition-colors" }),
390
+ /* @__PURE__ */ i.jsx(oi, { className: "mie:w-4 mie:h-4 mie:lg:w-4 mie:lg:h-4 mie:text-mietext mie:group-hover:text-mietextsecondary mie:transition-colors" }),
391
391
  /* @__PURE__ */ i.jsx("span", { className: "mie:hidden min-[445px]:inline", children: "Import" }),
392
392
  /* @__PURE__ */ i.jsx(
393
393
  "input",
@@ -395,11 +395,11 @@ Loaded ${x.length} field(s)`,
395
395
  className: "mie:hidden",
396
396
  type: "file",
397
397
  accept: ".json,.yaml,.yml,application/json,text/yaml",
398
- onChange: (w) => {
399
- const A = w.target.files?.[0];
400
- if (!A) return;
401
- const T = new FileReader();
402
- T.onload = (x) => g(x.target?.result ?? ""), T.readAsText(A), w.target.value = "";
398
+ onChange: (y) => {
399
+ const R = y.target.files?.[0];
400
+ if (!R) return;
401
+ const A = new FileReader();
402
+ A.onload = (b) => h(b.target?.result ?? ""), A.readAsText(R), y.target.value = "";
403
403
  }
404
404
  }
405
405
  )
@@ -408,7 +408,7 @@ Loaded ${x.length} field(s)`,
408
408
  "button",
409
409
  {
410
410
  className: "mie:group mie:px-2 mie:py-2 mie:lg:px-3 mie:lg:py-2 mie:rounded-lg mie:border mie:border-mieborder mie:bg-miesurface mie:hover:bg-mieprimary mie:hover:text-mietextsecondary mie:hover:border-mieprimary mie:text-xs mie:lg:text-sm mie:font-medium mie:transition-colors mie:flex mie:items-center mie:lg:gap-2 mie:gap-0 mie:outline-none mie:focus:outline-none mie:text-mietext",
411
- onClick: R,
411
+ onClick: T,
412
412
  title: "Export",
413
413
  children: [
414
414
  /* @__PURE__ */ i.jsx(si, { className: "mie:w-4 mie:h-4 mie:lg:w-4 mie:lg:h-4 mie:text-mietext mie:group-hover:text-mietextsecondary mie:transition-colors" }),
@@ -432,7 +432,7 @@ Loaded ${x.length} field(s)`,
432
432
  /* @__PURE__ */ i.jsx(
433
433
  "button",
434
434
  {
435
- onClick: () => S(r.detectedSchemaType),
435
+ onClick: () => N(r.detectedSchemaType),
436
436
  className: "mie:flex-1 mie:px-6 mie:py-3 mie:rounded-xl mie:bg-mieprimary mie:text-miesurface mie:font-semibold mie:hover:bg-mieprimary/90 mie:transition-colors mie:shadow-sm mie:hover:shadow",
437
437
  children: "Yes, Import"
438
438
  }
@@ -440,7 +440,7 @@ Loaded ${x.length} field(s)`,
440
440
  /* @__PURE__ */ i.jsx(
441
441
  "button",
442
442
  {
443
- onClick: q,
443
+ onClick: M,
444
444
  className: "mie:flex-1 mie:px-6 mie:py-3 mie:rounded-xl mie:border-2 mie:border-mieborder mie:bg-miesurface mie:hover:bg-miebackground mie:text-mietext mie:font-semibold mie:transition-colors",
445
445
  children: "Abort"
446
446
  }
@@ -449,58 +449,58 @@ Loaded ${x.length} field(s)`,
449
449
  ] }) })
450
450
  ] });
451
451
  }
452
- const Ri = (e) => {
452
+ const Ai = (e) => {
453
453
  switch (e) {
454
454
  case "Text Fields":
455
- return fi;
455
+ return pi;
456
456
  case "Organization":
457
- return ui;
457
+ return fi;
458
458
  case "Selection Fields":
459
- return di;
459
+ return ui;
460
460
  case "Rating & Ranking":
461
- return ci;
461
+ return di;
462
462
  case "Matrix Fields":
463
- return li;
463
+ return ci;
464
464
  case "Rich Content":
465
465
  return mi;
466
466
  default:
467
467
  return null;
468
468
  }
469
- }, Ai = ({ isPreview: e = !1 }) => {
469
+ }, $i = ({ isPreview: e = !1 }) => {
470
470
  if (e) return null;
471
- const t = V((u) => u.addField), r = B(), n = V(
472
- de(
471
+ const t = Y((u) => u.addField), r = B(), n = Y(
472
+ ue(
473
473
  (u) => r.selectedFieldId.value ? u.byId[r.selectedFieldId.value] : null,
474
474
  [r.selectedFieldId.value]
475
475
  )
476
- ), s = n?.fieldType === "section", o = n?.title || "Section", d = l.useCallback(() => {
476
+ ), o = n?.fieldType === "section", a = n?.title || "Section", m = c.useCallback(() => {
477
477
  r.selectedFieldId.set(null);
478
478
  }, [r.selectedFieldId]);
479
- l.useEffect(() => {
480
- const u = (h) => {
481
- h.key === "Escape" && (h.preventDefault(), h.stopPropagation(), d());
479
+ c.useEffect(() => {
480
+ const u = (p) => {
481
+ p.key === "Escape" && (p.preventDefault(), p.stopPropagation(), m());
482
482
  };
483
483
  return window.addEventListener("keydown", u), () => window.removeEventListener("keydown", u);
484
- }, [d]);
485
- const m = Ee(() => {
484
+ }, [m]);
485
+ const l = Ee(() => {
486
486
  const u = {};
487
- return Object.entries(K).filter(([h]) => h !== "unsupported").forEach(([h, g]) => {
488
- const S = g.category || "Other";
489
- u[S] || (u[S] = []), u[S].push({
490
- type: h,
491
- label: g.label
487
+ return Object.entries(X).filter(([p]) => p !== "unsupported").forEach(([p, h]) => {
488
+ const N = h.category || "Other";
489
+ u[N] || (u[N] = []), u[N].push({
490
+ type: p,
491
+ label: h.label
492
492
  });
493
493
  }), u;
494
- }, []), c = Ee(() => {
494
+ }, []), d = Ee(() => {
495
495
  const u = {};
496
- return Object.values(m).forEach((h) => {
497
- h.forEach(({ type: g }) => {
498
- u[g] = () => {
499
- s && n?.id ? t(g, { sectionId: n.id }) : t(g);
496
+ return Object.values(l).forEach((p) => {
497
+ p.forEach(({ type: h }) => {
498
+ u[h] = () => {
499
+ o && n?.id ? t(h, { sectionId: n.id }) : t(h);
500
500
  };
501
501
  });
502
502
  }), u;
503
- }, [m, t, s, n?.id]);
503
+ }, [l, t, o, n?.id]);
504
504
  return /* @__PURE__ */ i.jsx(
505
505
  "div",
506
506
  {
@@ -509,99 +509,101 @@ const Ri = (e) => {
509
509
  children: /* @__PURE__ */ i.jsxs("div", { className: "tool-panel-container mie:pb-4 mie:rounded-lg mie:shadow-sm", children: [
510
510
  /* @__PURE__ */ i.jsxs("h3", { className: "tool-panel-title mie:sticky mie:top-0 mie:z-20 mie:bg-miesurface mie:text-base mie:font-semibold mie:text-mietext mie:pb-2 mie:pt-3 mie:px-4 mie:border-b mie:border-mieborder mie:flex mie:items-center mie:justify-between mie:gap-2", children: [
511
511
  /* @__PURE__ */ i.jsxs("span", { className: "mie:flex mie:items-center mie:gap-2 mie:min-w-0", children: [
512
- /* @__PURE__ */ i.jsx(oi, { className: "mie:w-5 mie:h-5 mie:text-mietext mie:shrink-0" }),
513
- /* @__PURE__ */ i.jsx("span", { className: "mie:truncate mie:text-mietext", children: s ? `Add to "${o}"` : "Tools" })
512
+ /* @__PURE__ */ i.jsx(ai, { className: "mie:w-5 mie:h-5 mie:text-mietext mie:shrink-0" }),
513
+ /* @__PURE__ */ i.jsx("span", { className: "mie:truncate mie:text-mietext", children: o ? `Add to "${a}"` : "Tools" })
514
514
  ] }),
515
- s && /* @__PURE__ */ i.jsx(
515
+ o && /* @__PURE__ */ i.jsx(
516
516
  "button",
517
517
  {
518
- onClick: d,
518
+ onClick: m,
519
519
  className: "mie:bg-transparent mie:text-mietextmuted mie:hover:text-miedanger mie:hover:bg-miedanger/10 mie:p-1 mie:rounded mie:transition-colors mie:shrink-0",
520
520
  title: "Unselect section",
521
- children: /* @__PURE__ */ i.jsx(ai, { className: "mie:w-5 mie:h-5" })
521
+ children: /* @__PURE__ */ i.jsx(li, { className: "mie:w-5 mie:h-5" })
522
522
  }
523
523
  )
524
524
  ] }),
525
- Object.entries(m).map(([u, h]) => /* @__PURE__ */ i.jsxs("div", { className: "tool-category", children: [
525
+ Object.entries(l).map(([u, p]) => /* @__PURE__ */ i.jsxs("div", { className: "tool-category", children: [
526
526
  /* @__PURE__ */ i.jsxs("h4", { className: "mie:sticky mie:top-11 mie:z-10 mie:bg-miebackground mie:text-sm mie:font-semibold mie:text-mietext mie:px-4 mie:py-3 mie:border-b mie:border-mieborder mie:uppercase mie:tracking-wide mie:flex mie:items-center mie:gap-2", children: [
527
527
  (() => {
528
- const g = Ri(u);
529
- return g ? /* @__PURE__ */ i.jsx(g, { className: "mie:w-4 mie:h-4 mie:text-mietextmuted" }) : null;
528
+ const h = Ai(u);
529
+ return h ? /* @__PURE__ */ i.jsx(h, { className: "mie:w-4 mie:h-4 mie:text-mietextmuted" }) : null;
530
530
  })(),
531
531
  u
532
532
  ] }),
533
- /* @__PURE__ */ i.jsx("div", { className: "tool-items mie:grid mie:grid-cols-1 mie:gap-2 mie:px-4 mie:py-3", children: h.map(({ type: g, label: S }) => {
534
- const q = s && g === "section";
533
+ /* @__PURE__ */ i.jsx("div", { className: "tool-items mie:grid mie:grid-cols-1 mie:gap-2 mie:px-4 mie:py-3", children: p.map(({ type: h, label: N }) => {
534
+ const M = o && h === "section";
535
535
  return /* @__PURE__ */ i.jsxs(
536
536
  "button",
537
537
  {
538
- disabled: q,
539
- className: `mie:px-3 mie:py-2 mie:text-sm mie:text-left mie:border mie:rounded-md mie:transition-colors mie:duration-150 ${q ? "mie:border-mieborder mie:bg-miebackground mie:text-mietextmuted/50 mie:cursor-not-allowed" : "mie:bg-miesurface mie:text-mietext mie:border-mieborder mie:hover:bg-mieprimary/10 mie:hover:border-mieprimary/50 mie:hover:text-mieprimary"}`,
540
- onClick: c[g],
541
- title: q ? "Cannot add section to a section" : `Add ${S}`,
538
+ disabled: M,
539
+ className: `mie:px-3 mie:py-2 mie:text-sm mie:text-left mie:border mie:rounded-md mie:transition-colors mie:duration-150 ${M ? "mie:border-mieborder mie:bg-miebackground mie:text-mietextmuted/50 mie:cursor-not-allowed" : "mie:bg-miesurface mie:text-mietext mie:border-mieborder mie:hover:bg-mieprimary/10 mie:hover:border-mieprimary/50 mie:hover:text-mieprimary"}`,
540
+ onClick: d[h],
541
+ title: M ? "Cannot add section to a section" : `Add ${N}`,
542
542
  children: [
543
543
  "+ ",
544
- S
544
+ N
545
545
  ]
546
546
  },
547
- g
547
+ h
548
548
  );
549
549
  }) })
550
550
  ] }, u))
551
551
  ] })
552
552
  }
553
553
  );
554
- }, ke = l.memo(Ai, (e, t) => e.isPreview === t.isPreview);
555
- function ze({
554
+ }, Re = c.memo($i, (e, t) => e.isPreview === t.isPreview);
555
+ function Ve({
556
556
  id: e = "",
557
557
  label: t = "ID",
558
558
  onCommit: r,
559
559
  validate: n,
560
- placeholder: s = "Enter unique ID…",
561
- className: o = ""
560
+ placeholder: o = "Enter unique ID…",
561
+ className: a = ""
562
562
  }) {
563
- const [d, m] = l.useState(e ?? ""), [c, u] = l.useState("");
564
- l.useEffect(() => {
565
- m(e ?? ""), u("");
563
+ const m = K(), [l, d] = c.useState(e ?? ""), [u, p] = c.useState("");
564
+ c.useEffect(() => {
565
+ d(e ?? ""), p("");
566
566
  }, [e]);
567
- const h = l.useCallback(() => {
568
- const g = String(d ?? "").trim();
569
- if (!g) {
570
- u("ID cannot be empty."), m(e ?? "");
567
+ const h = c.useCallback(() => {
568
+ const N = String(l ?? "").trim();
569
+ if (!N) {
570
+ p("ID cannot be empty."), d(e ?? "");
571
571
  return;
572
572
  }
573
- if (g !== (e ?? "")) {
573
+ if (N !== (e ?? "")) {
574
574
  if (typeof n == "function") {
575
- const S = n(g, e ?? "");
576
- if (S) {
577
- u(S);
575
+ const M = n(N, e ?? "");
576
+ if (M) {
577
+ p(M);
578
578
  return;
579
579
  }
580
580
  }
581
- r?.(g);
581
+ r?.(N);
582
582
  }
583
- }, [d, e, r, n]);
584
- return /* @__PURE__ */ i.jsxs("div", { className: o ? `draft-id-editor-container ${o}` : "draft-id-editor-container", children: [
585
- /* @__PURE__ */ i.jsx("label", { className: "mie:block mie:text-sm mie:text-mietext mie:mb-1", children: t }),
583
+ }, [l, e, r, n]);
584
+ return /* @__PURE__ */ i.jsxs("div", { className: a ? `draft-id-editor-container ${a}` : "draft-id-editor-container", children: [
585
+ /* @__PURE__ */ i.jsx("label", { htmlFor: `${m}-editor-field-id-${e}`, className: "mie:block mie:text-sm mie:text-mietext mie:mb-1", children: t }),
586
586
  /* @__PURE__ */ i.jsx(
587
587
  "input",
588
588
  {
589
+ id: `${m}-editor-field-id-${e}`,
590
+ "aria-label": t,
589
591
  className: "mie:w-full mie:px-3 mie:py-2 mie:border mie:border-mieborder mie:bg-miesurface mie:text-mietext mie:rounded mie:focus:border-mieprimary mie:focus:ring-1 mie:focus:ring-mieprimary mie:outline-none mie:transition-colors",
590
- value: d,
591
- onChange: (g) => {
592
- c && u(""), m(g.target.value);
592
+ value: l,
593
+ onChange: (N) => {
594
+ u && p(""), d(N.target.value);
593
595
  },
594
596
  onBlur: h,
595
- onKeyDown: (g) => {
596
- g.key === "Enter" && (g.preventDefault(), h());
597
+ onKeyDown: (N) => {
598
+ N.key === "Enter" && (N.preventDefault(), h());
597
599
  },
598
- placeholder: s
600
+ placeholder: o
599
601
  }
600
602
  ),
601
- c ? /* @__PURE__ */ i.jsx("p", { className: "mie:text-xs mie:text-miedanger mie:mt-1", children: c }) : null
603
+ u ? /* @__PURE__ */ i.jsx("p", { className: "mie:text-xs mie:text-miedanger mie:mt-1", children: u }) : null
602
604
  ] });
603
605
  }
604
- const Pi = [
606
+ const Fi = [
605
607
  { value: "string", label: "String" },
606
608
  { value: "number", label: "Number" },
607
609
  { value: "email", label: "Email" },
@@ -611,7 +613,7 @@ const Pi = [
611
613
  { value: "month", label: "Month" },
612
614
  { value: "time", label: "Time" },
613
615
  { value: "range", label: "Range" }
614
- ], Mi = {
616
+ ], Pi = {
615
617
  Length: [
616
618
  { value: "mm", label: "Millimeters (mm)" },
617
619
  { value: "cm", label: "Centimeters (cm)" },
@@ -649,32 +651,36 @@ const Pi = [
649
651
  { value: "mmHg", label: "mmHg (blood pressure)" }
650
652
  ]
651
653
  };
652
- function Fi({ field: e, onUpdate: t }) {
653
- const r = e.inputType || "text", n = e.unit || "", s = r === "number" || r === "range";
654
+ function Mi({ field: e, onUpdate: t }) {
655
+ const r = K(), n = e.inputType || "text", o = e.unit || "", a = n === "number" || n === "range";
654
656
  return /* @__PURE__ */ i.jsxs("div", { className: "mie:space-y-3", children: [
655
657
  /* @__PURE__ */ i.jsxs("div", { children: [
656
- /* @__PURE__ */ i.jsx("label", { className: "mie:block mie:text-sm mie:text-mietext mie:mb-1", children: "Input Type" }),
658
+ /* @__PURE__ */ i.jsx("label", { htmlFor: `${r}-editor-input-type-${e.id}`, className: "mie:block mie:text-sm mie:text-mietext mie:mb-1", children: "Input Type" }),
657
659
  /* @__PURE__ */ i.jsx(
658
660
  "select",
659
661
  {
662
+ id: `${r}-editor-input-type-${e.id}`,
663
+ "aria-label": "Input Type",
660
664
  className: "mie:w-full mie:px-3 mie:py-2 mie:border mie:border-mieborder mie:bg-miesurface mie:text-mietext mie:rounded mie:focus:border-mieprimary mie:focus:ring-1 mie:focus:ring-mieprimary mie:outline-none mie:cursor-pointer mie:transition-colors",
661
- value: r,
662
- onChange: (o) => t("inputType", o.target.value),
663
- children: Pi.map((o) => /* @__PURE__ */ i.jsx("option", { value: o.value, children: o.label }, o.value))
665
+ value: n,
666
+ onChange: (m) => t("inputType", m.target.value),
667
+ children: Fi.map((m) => /* @__PURE__ */ i.jsx("option", { value: m.value, children: m.label }, m.value))
664
668
  }
665
669
  )
666
670
  ] }),
667
- s && /* @__PURE__ */ i.jsxs("div", { children: [
668
- /* @__PURE__ */ i.jsx("label", { className: "mie:block mie:text-sm mie:text-mietext mie:mb-1", children: "Unit (optional)" }),
671
+ a && /* @__PURE__ */ i.jsxs("div", { children: [
672
+ /* @__PURE__ */ i.jsx("label", { htmlFor: `${r}-editor-unit-${e.id}`, className: "mie:block mie:text-sm mie:text-mietext mie:mb-1", children: "Unit (optional)" }),
669
673
  /* @__PURE__ */ i.jsxs(
670
674
  "select",
671
675
  {
676
+ id: `${r}-editor-unit-${e.id}`,
677
+ "aria-label": "Unit (optional)",
672
678
  className: "mie:w-full mie:px-3 mie:py-2 mie:border mie:border-mieborder mie:bg-miesurface mie:text-mietext mie:rounded mie:focus:border-mieprimary mie:focus:ring-1 mie:focus:ring-mieprimary mie:outline-none mie:cursor-pointer mie:transition-colors",
673
- value: n,
674
- onChange: (o) => t("unit", o.target.value),
679
+ value: o,
680
+ onChange: (m) => t("unit", m.target.value),
675
681
  children: [
676
682
  /* @__PURE__ */ i.jsx("option", { value: "", children: "None" }),
677
- Object.entries(Mi).map(([o, d]) => /* @__PURE__ */ i.jsx("optgroup", { label: o, children: d.map((m) => /* @__PURE__ */ i.jsx("option", { value: m.value, children: m.label }, m.value)) }, o))
683
+ Object.entries(Pi).map(([m, l]) => /* @__PURE__ */ i.jsx("optgroup", { label: m, children: l.map((d) => /* @__PURE__ */ i.jsx("option", { value: d.value, children: d.label }, d.value)) }, m))
678
684
  ]
679
685
  }
680
686
  )
@@ -682,142 +688,151 @@ function Fi({ field: e, onUpdate: t }) {
682
688
  ] });
683
689
  }
684
690
  function We({ f: e, onUpdateField: t }) {
685
- const r = V(l.useCallback((s) => s.byId, [])), n = l.useCallback((s, o) => {
686
- if (!s?.trim()) return "ID cannot be empty.";
687
- if (s === o) return "";
688
- const d = new Set(Object.keys(r));
689
- return Object.values(r).forEach((m) => {
690
- m?.fieldType === "section" && Array.isArray(m.fields) && m.fields.forEach((c) => d.add(c.id));
691
- }), d.has(s) ? `ID "${s}" already exists.` : "";
692
- }, [r]);
691
+ const r = K(), n = Y(c.useCallback((a) => a.byId, [])), o = c.useCallback((a, m) => {
692
+ if (!a?.trim()) return "ID cannot be empty.";
693
+ if (a === m) return "";
694
+ const l = new Set(Object.keys(n));
695
+ return Object.values(n).forEach((d) => {
696
+ d?.fieldType === "section" && Array.isArray(d.fields) && d.fields.forEach((u) => l.add(u.id));
697
+ }), l.has(a) ? `ID "${a}" already exists.` : "";
698
+ }, [n]);
693
699
  return /* @__PURE__ */ i.jsxs("div", { className: "common-editor-container mie:space-y-3", children: [
694
700
  /* @__PURE__ */ i.jsx(
695
- ze,
701
+ Ve,
696
702
  {
697
703
  id: e.id ?? "",
698
- validate: n,
699
- onCommit: (s) => t?.("id", s)
704
+ validate: o,
705
+ onCommit: (a) => t?.("id", a)
700
706
  }
701
707
  ),
702
708
  /* @__PURE__ */ i.jsxs("div", { children: [
703
- /* @__PURE__ */ i.jsx("label", { className: "mie:block mie:text-sm mie:text-mietext mie:mb-1", children: "Label / Question" }),
709
+ /* @__PURE__ */ i.jsx("label", { htmlFor: `${r}-editor-question-${e.id}`, className: "mie:block mie:text-sm mie:text-mietext mie:mb-1", children: "Label / Question" }),
704
710
  /* @__PURE__ */ i.jsx(
705
711
  "input",
706
712
  {
713
+ id: `${r}-editor-question-${e.id}`,
714
+ "aria-label": "Label / Question",
707
715
  className: "mie:w-full mie:px-3 mie:py-2 mie:border mie:border-mieborder mie:bg-miesurface mie:text-mietext mie:rounded mie:focus:border-mieprimary mie:focus:ring-1 mie:focus:ring-mieprimary mie:outline-none mie:transition-colors",
708
716
  value: e.question || "",
709
- onChange: (s) => t?.("question", s.target.value),
717
+ onChange: (a) => t?.("question", a.target.value),
710
718
  placeholder: "Enter question text"
711
719
  }
712
720
  )
713
721
  ] }),
714
- (e.fieldType === "text" || e.fieldType === "longtext") && /* @__PURE__ */ i.jsx(Fi, { field: e, onUpdate: t }),
722
+ (e.fieldType === "text" || e.fieldType === "longtext") && /* @__PURE__ */ i.jsx(Mi, { field: e, onUpdate: t }),
715
723
  /* @__PURE__ */ i.jsxs("div", { className: "mie:min-w-0", children: [
716
- /* @__PURE__ */ i.jsx("label", { className: "mie:block mie:text-sm mie:text-mietext mie:mb-1", children: "Sublabel (optional)" }),
724
+ /* @__PURE__ */ i.jsx("label", { htmlFor: `${r}-editor-sublabel-${e.id}`, className: "mie:block mie:text-sm mie:text-mietext mie:mb-1", children: "Sublabel (optional)" }),
717
725
  /* @__PURE__ */ i.jsx(
718
726
  "textarea",
719
727
  {
728
+ id: `${r}-editor-sublabel-${e.id}`,
729
+ "aria-label": "Sublabel (optional)",
720
730
  className: "mie:w-full mie:min-w-0 mie:max-h-32 mie:px-3 mie:py-2 mie:border mie:border-mieborder mie:bg-miesurface mie:text-mietext mie:rounded mie:resize-y mie:focus:border-mieprimary mie:focus:ring-1 mie:focus:ring-mieprimary mie:outline-none mie:transition-colors",
721
731
  value: e.sublabel || "",
722
- onChange: (s) => t("sublabel", s.target.value),
732
+ onChange: (a) => t("sublabel", a.target.value),
723
733
  placeholder: "Helper text / description"
724
734
  }
725
735
  )
726
736
  ] }),
727
- /* @__PURE__ */ i.jsx("div", { children: /* @__PURE__ */ i.jsxs("label", { className: "mie:inline-flex mie:items-center mie:gap-2 mie:text-sm mie:text-mietext mie:cursor-pointer", children: [
737
+ /* @__PURE__ */ i.jsxs("div", { className: "required-checkbox-group mie:inline-flex mie:items-center mie:gap-2 mie:text-sm mie:text-mietext", children: [
728
738
  /* @__PURE__ */ i.jsx(
729
- pi,
739
+ hi,
730
740
  {
741
+ id: `${r}-editor-required-${e.id}`,
731
742
  checked: !!e.required,
732
- onChange: (s) => t?.("required", s),
743
+ onChange: (a) => t?.("required", a),
733
744
  size: "md"
734
745
  }
735
746
  ),
736
- "Required"
737
- ] }) })
747
+ /* @__PURE__ */ i.jsx("label", { htmlFor: `${r}-editor-required-${e.id}`, className: "mie:cursor-pointer", children: "Required" })
748
+ ] })
738
749
  ] });
739
750
  }
740
- function Ve({ field: e, api: t }) {
741
- const r = e.options || [], n = e.fieldType === "boolean", s = e.fieldType === "multitext", o = l.useRef(null), d = l.useRef(r.length), m = s ? "Text Inputs" : "Options", c = s ? "Text Input" : "Option", u = s ? "Input label" : "Option text";
742
- return l.useEffect(() => {
743
- if (r.length > d.current && o.current) {
744
- const h = o.current.lastElementChild;
751
+ function He({ field: e, api: t }) {
752
+ const r = K(), n = e.options || [], o = e.fieldType === "boolean", a = e.fieldType === "multitext", m = c.useRef(null), l = c.useRef(n.length), d = a ? "Text Inputs" : "Options", u = a ? "Text Input" : "Option", p = a ? "Input label" : "Option text";
753
+ return c.useEffect(() => {
754
+ if (n.length > l.current && m.current) {
755
+ const h = m.current.lastElementChild;
745
756
  h && h.scrollIntoView({ behavior: "smooth", block: "nearest" });
746
757
  }
747
- d.current = r.length;
748
- }, [r.length]), /* @__PURE__ */ i.jsxs("div", { className: "mie:space-y-3", children: [
749
- /* @__PURE__ */ i.jsx("label", { className: "mie:block mie:text-sm mie:font-medium mie:text-mietext", children: m }),
750
- /* @__PURE__ */ i.jsx("div", { ref: o, className: "mie:space-y-2", children: r.map((h) => /* @__PURE__ */ i.jsxs("div", { className: "mie:flex mie:items-center mie:gap-2 mie:px-3 mie:py-2 mie:border mie:border-mieborder mie:rounded-lg mie:shadow-sm mie:hover:border-mieprimary/50 mie:transition-colors", children: [
758
+ l.current = n.length;
759
+ }, [n.length]), /* @__PURE__ */ i.jsxs("div", { className: "mie:space-y-3", children: [
760
+ /* @__PURE__ */ i.jsx("span", { className: "mie:block mie:text-sm mie:font-medium mie:text-mietext", children: d }),
761
+ /* @__PURE__ */ i.jsx("div", { ref: m, className: "mie:space-y-2", children: n.map((h) => /* @__PURE__ */ i.jsxs("div", { className: "mie:flex mie:items-center mie:gap-2 mie:px-3 mie:py-2 mie:border mie:border-mieborder mie:rounded-lg mie:shadow-sm mie:hover:border-mieprimary/50 mie:transition-colors", children: [
751
762
  /* @__PURE__ */ i.jsx(
752
763
  "input",
753
764
  {
765
+ id: `${r}-editor-option-${e.id}-${h.id}`,
766
+ "aria-label": `${d} option ${h.id}`,
754
767
  className: "mie:flex-1 mie:min-w-0 mie:outline-none mie:bg-transparent",
755
768
  value: h.value,
756
- onChange: (g) => t.option.update(h.id, g.target.value),
757
- placeholder: u
769
+ onChange: (N) => t.option.update(h.id, N.target.value),
770
+ placeholder: p
758
771
  }
759
772
  ),
760
- !n && /* @__PURE__ */ i.jsx(
773
+ !o && /* @__PURE__ */ i.jsx(
761
774
  "button",
762
775
  {
763
776
  onClick: () => t.option.remove(h.id),
764
777
  className: "mie:shrink-0 mie:bg-transparent mie:text-mietextmuted/70 mie:hover:text-miedanger mie:transition-colors",
765
778
  title: "Remove option",
766
- children: /* @__PURE__ */ i.jsx(re, { className: "mie:w-5 mie:h-5" })
779
+ children: /* @__PURE__ */ i.jsx(oe, { className: "mie:w-5 mie:h-5" })
767
780
  }
768
781
  )
769
782
  ] }, h.id)) }),
770
- !n && /* @__PURE__ */ i.jsxs(
783
+ !o && /* @__PURE__ */ i.jsxs(
771
784
  "button",
772
785
  {
773
786
  onClick: () => t.option.add(""),
774
787
  className: "mie:w-full mie:px-3 mie:py-2 mie:text-sm mie:font-medium mie:bg-miesurface mie:text-mieprimary mie:border mie:border-mieprimary/50 mie:rounded-lg mie:hover:bg-mieprimary/10 mie:transition-colors",
775
788
  children: [
776
789
  "+ Add ",
777
- c
790
+ u
778
791
  ]
779
792
  }
780
793
  )
781
794
  ] });
782
795
  }
783
- function He({ field: e, api: t }) {
784
- const r = e.rows || [], n = e.columns || [], s = l.useRef(null), o = l.useRef(null), d = l.useRef(r.length), m = l.useRef(n.length);
785
- return l.useEffect(() => {
786
- if (r.length > d.current && s.current) {
787
- const c = s.current.lastElementChild;
788
- c && c.scrollIntoView({ behavior: "smooth", block: "nearest" });
796
+ function Ye({ field: e, api: t }) {
797
+ const r = K(), n = e.rows || [], o = e.columns || [], a = c.useRef(null), m = c.useRef(null), l = c.useRef(n.length), d = c.useRef(o.length);
798
+ return c.useEffect(() => {
799
+ if (n.length > l.current && a.current) {
800
+ const u = a.current.lastElementChild;
801
+ u && u.scrollIntoView({ behavior: "smooth", block: "nearest" });
789
802
  }
790
- d.current = r.length;
791
- }, [r.length]), l.useEffect(() => {
792
- if (n.length > m.current && o.current) {
793
- const c = o.current.lastElementChild;
794
- c && c.scrollIntoView({ behavior: "smooth", block: "nearest" });
803
+ l.current = n.length;
804
+ }, [n.length]), c.useEffect(() => {
805
+ if (o.length > d.current && m.current) {
806
+ const u = m.current.lastElementChild;
807
+ u && u.scrollIntoView({ behavior: "smooth", block: "nearest" });
795
808
  }
796
- m.current = n.length;
797
- }, [n.length]), /* @__PURE__ */ i.jsxs("div", { className: "mie:space-y-4", children: [
809
+ d.current = o.length;
810
+ }, [o.length]), /* @__PURE__ */ i.jsxs("div", { className: "mie:space-y-4", children: [
798
811
  /* @__PURE__ */ i.jsxs("div", { className: "mie:space-y-3", children: [
799
- /* @__PURE__ */ i.jsx("label", { className: "mie:block mie:text-sm mie:font-medium mie:text-mietext", children: "Rows" }),
800
- /* @__PURE__ */ i.jsx("div", { ref: s, className: "mie:space-y-2", children: r.map((c) => /* @__PURE__ */ i.jsxs("div", { className: "mie:flex mie:items-center mie:gap-2 mie:px-3 mie:py-2 mie:border mie:border-mieborder mie:rounded-lg mie:shadow-sm mie:hover:border-mieprimary/50 mie:transition-colors", children: [
812
+ /* @__PURE__ */ i.jsx("span", { className: "mie:block mie:text-sm mie:font-medium mie:text-mietext", children: "Rows" }),
813
+ /* @__PURE__ */ i.jsx("div", { ref: a, className: "mie:space-y-2", children: n.map((u) => /* @__PURE__ */ i.jsxs("div", { className: "mie:flex mie:items-center mie:gap-2 mie:px-3 mie:py-2 mie:border mie:border-mieborder mie:rounded-lg mie:shadow-sm mie:hover:border-mieprimary/50 mie:transition-colors", children: [
801
814
  /* @__PURE__ */ i.jsx(
802
815
  "input",
803
816
  {
817
+ id: `${r}-editor-matrix-row-${e.id}-${u.id}`,
818
+ "aria-label": `Row ${u.id}`,
804
819
  className: "mie:flex-1 mie:min-w-0 mie:outline-none mie:bg-transparent mie:text-mietext mie:placeholder:text-mietextmuted",
805
- value: c.value,
806
- onChange: (u) => t.row.update(c.id, u.target.value),
820
+ value: u.value,
821
+ onChange: (p) => t.row.update(u.id, p.target.value),
807
822
  placeholder: "Row text"
808
823
  }
809
824
  ),
810
825
  /* @__PURE__ */ i.jsx(
811
826
  "button",
812
827
  {
813
- onClick: () => t.row.remove(c.id),
828
+ onClick: () => t.row.remove(u.id),
814
829
  className: "mie:shrink-0 mie:bg-transparent mie:text-mietextmuted/70 mie:hover:text-miedanger mie:transition-colors",
815
830
  title: "Remove row",
816
- children: /* @__PURE__ */ i.jsx(re, { className: "mie:w-5 mie:h-5" })
831
+ children: /* @__PURE__ */ i.jsx(oe, { className: "mie:w-5 mie:h-5" })
817
832
  }
818
833
  )
819
- ] }, c.id)) }),
820
- r.length >= 10 ? /* @__PURE__ */ i.jsx("div", { className: "mie:px-3 mie:py-2 mie:text-sm mie:text-mietextmuted mie:text-center mie:bg-miebackground mie:rounded-lg", children: "Max rows reached (10)" }) : /* @__PURE__ */ i.jsx(
834
+ ] }, u.id)) }),
835
+ n.length >= 10 ? /* @__PURE__ */ i.jsx("div", { className: "mie:px-3 mie:py-2 mie:text-sm mie:text-mietextmuted mie:text-center mie:bg-miebackground mie:rounded-lg", children: "Max rows reached (10)" }) : /* @__PURE__ */ i.jsx(
821
836
  "button",
822
837
  {
823
838
  onClick: () => t.row.add(""),
@@ -827,28 +842,30 @@ function He({ field: e, api: t }) {
827
842
  )
828
843
  ] }),
829
844
  /* @__PURE__ */ i.jsxs("div", { className: "mie:space-y-3", children: [
830
- /* @__PURE__ */ i.jsx("label", { className: "mie:block mie:text-sm mie:font-medium mie:text-mietext", children: "Columns" }),
831
- /* @__PURE__ */ i.jsx("div", { ref: o, className: "mie:space-y-2", children: n.map((c) => /* @__PURE__ */ i.jsxs("div", { className: "mie:flex mie:items-center mie:gap-2 mie:px-3 mie:py-2 mie:border mie:border-mieborder mie:rounded-lg mie:shadow-sm mie:hover:border-mieprimary/50 mie:transition-colors", children: [
845
+ /* @__PURE__ */ i.jsx("span", { className: "mie:block mie:text-sm mie:font-medium mie:text-mietext", children: "Columns" }),
846
+ /* @__PURE__ */ i.jsx("div", { ref: m, className: "mie:space-y-2", children: o.map((u) => /* @__PURE__ */ i.jsxs("div", { className: "mie:flex mie:items-center mie:gap-2 mie:px-3 mie:py-2 mie:border mie:border-mieborder mie:rounded-lg mie:shadow-sm mie:hover:border-mieprimary/50 mie:transition-colors", children: [
832
847
  /* @__PURE__ */ i.jsx(
833
848
  "input",
834
849
  {
850
+ id: `${r}-editor-matrix-col-${e.id}-${u.id}`,
851
+ "aria-label": `Column ${u.id}`,
835
852
  className: "mie:flex-1 mie:min-w-0 mie:outline-none mie:bg-transparent mie:text-mietext mie:placeholder:text-mietextmuted",
836
- value: c.value,
837
- onChange: (u) => t.column.update(c.id, u.target.value),
853
+ value: u.value,
854
+ onChange: (p) => t.column.update(u.id, p.target.value),
838
855
  placeholder: "Column text"
839
856
  }
840
857
  ),
841
858
  /* @__PURE__ */ i.jsx(
842
859
  "button",
843
860
  {
844
- onClick: () => t.column.remove(c.id),
861
+ onClick: () => t.column.remove(u.id),
845
862
  className: "mie:shrink-0 mie:bg-transparent mie:text-mietextmuted/70 mie:hover:text-miedanger mie:transition-colors",
846
863
  title: "Remove column",
847
- children: /* @__PURE__ */ i.jsx(re, { className: "mie:w-5 mie:h-5" })
864
+ children: /* @__PURE__ */ i.jsx(oe, { className: "mie:w-5 mie:h-5" })
848
865
  }
849
866
  )
850
- ] }, c.id)) }),
851
- n.length >= 10 ? /* @__PURE__ */ i.jsx("div", { className: "mie:px-3 mie:py-2 mie:text-sm mie:text-mietextmuted mie:text-center mie:bg-miebackground mie:rounded-lg", children: "Max columns reached (10)" }) : /* @__PURE__ */ i.jsx(
867
+ ] }, u.id)) }),
868
+ o.length >= 10 ? /* @__PURE__ */ i.jsx("div", { className: "mie:px-3 mie:py-2 mie:text-sm mie:text-mietextmuted mie:text-center mie:bg-miebackground mie:rounded-lg", children: "Max columns reached (10)" }) : /* @__PURE__ */ i.jsx(
852
869
  "button",
853
870
  {
854
871
  onClick: () => t.column.add(""),
@@ -860,107 +877,111 @@ function He({ field: e, api: t }) {
860
877
  ] });
861
878
  }
862
879
  function _i({ f: e }) {
863
- const t = Ne(e.id), r = l.useCallback(
864
- (d, m) => t.field.update(d, m),
865
- [t]
866
- ), n = K[e.fieldType] || {}, s = n.hasOptions || !1, o = n.hasMatrix || !1;
880
+ const t = K(), r = Ne(e.id), n = c.useCallback(
881
+ (l, d) => r.field.update(l, d),
882
+ [r]
883
+ ), o = X[e.fieldType] || {}, a = o.hasOptions || !1, m = o.hasMatrix || !1;
867
884
  return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
868
- /* @__PURE__ */ i.jsx(We, { f: e, onUpdateField: r }),
885
+ /* @__PURE__ */ i.jsx(We, { f: e, onUpdateField: n }),
869
886
  e.fieldType === "input" && /* @__PURE__ */ i.jsxs("div", { className: "non-section-editor-default-answer mie:mt-4", children: [
870
- /* @__PURE__ */ i.jsx("div", { className: "mie:text-sm mie:font-medium mie:mb-1", children: "Default Answer" }),
887
+ /* @__PURE__ */ i.jsx("label", { htmlFor: `${t}-editor-default-answer-${e.id}`, className: "mie:block mie:text-sm mie:font-medium mie:text-mietext mie:mb-1", children: "Default Answer" }),
871
888
  /* @__PURE__ */ i.jsx(
872
889
  "input",
873
890
  {
891
+ id: `${t}-editor-default-answer-${e.id}`,
892
+ "aria-label": "Default Answer",
874
893
  className: "mie:w-full mie:px-3 mie:py-2 mie:border mie:border-mieborder mie:bg-miesurface mie:text-mietext mie:rounded mie:focus:border-mieprimary mie:focus:ring-1 mie:focus:ring-mieprimary mie:outline-none mie:transition-colors",
875
894
  value: e.answer || "",
876
- onChange: (d) => r("answer", d.target.value),
895
+ onChange: (l) => n("answer", l.target.value),
877
896
  placeholder: "Default value"
878
897
  }
879
898
  )
880
899
  ] }),
881
- s && /* @__PURE__ */ i.jsx(Ve, { field: e, api: t }),
882
- o && /* @__PURE__ */ i.jsx(He, { field: e, api: t })
900
+ a && /* @__PURE__ */ i.jsx(He, { field: e, api: r }),
901
+ m && /* @__PURE__ */ i.jsx(Ye, { field: e, api: r })
883
902
  ] });
884
903
  }
885
904
  function Di({ section: e, onActiveChildChange: t }) {
886
- const r = Ne(e.id), n = l.useContext(Oe), s = B();
887
- if (!n) throw new Error("Missing FormStoreContext.Provider in the tree");
888
- const o = Array.isArray(e.fields) ? e.fields : [], d = s.selectedChildId.ParentId, m = s.selectedChildId.ChildId, c = l.useMemo(() => d === e.id && m && o.some((b) => b.id === m) ? m : o[0]?.id || null, []), [u, h] = l.useState(c), g = l.useRef(m);
889
- l.useEffect(() => {
890
- g.current !== m && (g.current = m, d === e.id && m && m !== u && h(m));
891
- }, [d, m, e.id, u]), l.useEffect(() => {
892
- if (!o.length) {
893
- u !== null && h(null);
905
+ const r = K(), n = Ne(e.id), o = c.useContext(Te), a = B();
906
+ if (!o) throw new Error("Missing FormStoreContext.Provider in the tree");
907
+ const m = Array.isArray(e.fields) ? e.fields : [], l = a.selectedChildId.ParentId, d = a.selectedChildId.ChildId, u = c.useMemo(() => l === e.id && d && m.some((x) => x.id === d) ? d : m[0]?.id || null, []), [p, h] = c.useState(u), N = c.useRef(d);
908
+ c.useEffect(() => {
909
+ N.current !== d && (N.current = d, l === e.id && d && d !== p && h(d));
910
+ }, [l, d, e.id, p]), c.useEffect(() => {
911
+ if (!m.length) {
912
+ p !== null && h(null);
894
913
  return;
895
914
  }
896
- o.some((f) => f.id === u) || h(o[0].id);
897
- }, [o, u]), l.useEffect(() => {
898
- t?.(e.id, u || null);
899
- }, [e.id, u, t]);
900
- const S = l.useCallback(
901
- (b) => {
902
- h(b), s.selectedChildId.set(e.id, b);
915
+ m.some((q) => q.id === p) || h(m[0].id);
916
+ }, [m, p]), c.useEffect(() => {
917
+ t?.(e.id, p || null);
918
+ }, [e.id, p, t]);
919
+ const M = c.useCallback(
920
+ (x) => {
921
+ h(x), a.selectedChildId.set(e.id, x);
903
922
  },
904
- [e.id, s.selectedChildId]
905
- ), q = l.useCallback((b) => b.question?.trim() || K[b.fieldType]?.label || "Untitled", []), _ = l.useCallback(
906
- (b, f) => r.field.update(b, f),
907
- [r]
908
- ), j = l.useMemo(
909
- () => o.find((b) => b.id === u) || null,
910
- [o, u]
911
- ), k = Ne(j?.id || "", e.id), R = j && k ? k : null, w = l.useCallback(
912
- (b, f) => {
913
- if (j) {
914
- if (b === "id") {
915
- const O = String(f ?? "").trim();
916
- if (!O) return;
917
- n.getState().updateField(
918
- j.id,
919
- { id: O },
923
+ [e.id, a.selectedChildId]
924
+ ), W = c.useCallback((x) => x.question?.trim() || X[x.fieldType]?.label || "Untitled", []), F = c.useCallback(
925
+ (x, q) => n.field.update(x, q),
926
+ [n]
927
+ ), E = c.useMemo(
928
+ () => m.find((x) => x.id === p) || null,
929
+ [m, p]
930
+ ), T = Ne(E?.id || "", e.id), y = E && T ? T : null, R = c.useCallback(
931
+ (x, q) => {
932
+ if (E) {
933
+ if (x === "id") {
934
+ const P = String(q ?? "").trim();
935
+ if (!P) return;
936
+ o.getState().updateField(
937
+ E.id,
938
+ { id: P },
920
939
  {
921
940
  sectionId: e.id,
922
- onIdChange: (E, I) => {
923
- h((P) => P === I ? E : P);
941
+ onIdChange: (I, w) => {
942
+ h((S) => S === w ? I : S);
924
943
  }
925
944
  }
926
945
  );
927
946
  return;
928
947
  }
929
- n.getState().updateField(
930
- j.id,
931
- { [b]: f },
948
+ o.getState().updateField(
949
+ E.id,
950
+ { [x]: q },
932
951
  { sectionId: e.id }
933
952
  );
934
953
  }
935
954
  },
936
- [j, e.id, n]
937
- ), A = l.useCallback(() => {
938
- j && n.getState().deleteField(j.id, { sectionId: e.id });
939
- }, [j, e.id, n]), T = l.useMemo(
940
- () => j && (K[j.fieldType] || {}).hasOptions || !1,
941
- [j]
942
- ), x = l.useMemo(
943
- () => j && (K[j.fieldType] || {}).hasMatrix || !1,
944
- [j]
955
+ [E, e.id, o]
956
+ ), A = c.useCallback(() => {
957
+ E && o.getState().deleteField(E.id, { sectionId: e.id });
958
+ }, [E, e.id, o]), b = c.useMemo(
959
+ () => E && (X[E.fieldType] || {}).hasOptions || !1,
960
+ [E]
961
+ ), O = c.useMemo(
962
+ () => E && (X[E.fieldType] || {}).hasMatrix || !1,
963
+ [E]
945
964
  );
946
965
  return /* @__PURE__ */ i.jsxs("div", { className: "mie:space-y-4", children: [
947
966
  /* @__PURE__ */ i.jsxs("div", { className: "mie:space-y-3", children: [
948
967
  /* @__PURE__ */ i.jsx("h3", { className: "mie:text-sm mie:font-semibold mie:text-mietext mie:uppercase mie:tracking-wide", children: "Section Properties" }),
949
968
  /* @__PURE__ */ i.jsx(
950
- ze,
969
+ Ve,
951
970
  {
952
971
  id: e.id,
953
- onCommit: (b) => r.field.renameId(b)
972
+ onCommit: (x) => n.field.renameId(x)
954
973
  }
955
974
  ),
956
975
  /* @__PURE__ */ i.jsxs("div", { className: "section-editor-title", children: [
957
- /* @__PURE__ */ i.jsx("label", { className: "mie:block mie:text-sm mie:font-medium mie:text-mietext mie:mb-1", children: "Section Title" }),
976
+ /* @__PURE__ */ i.jsx("label", { htmlFor: `${r}-editor-section-title-${e.id}`, className: "mie:block mie:text-sm mie:font-medium mie:text-mietext mie:mb-1", children: "Section Title" }),
958
977
  /* @__PURE__ */ i.jsx(
959
978
  "input",
960
979
  {
980
+ id: `${r}-editor-section-title-${e.id}`,
981
+ "aria-label": "Section Title",
961
982
  className: "mie:w-full mie:px-3 mie:py-2 mie:border mie:border-mieborder mie:bg-miesurface mie:text-mietext mie:rounded mie:focus:border-mieprimary mie:focus:ring-1 mie:focus:ring-mieprimary/30 mie:outline-none",
962
983
  value: e.title || "",
963
- onChange: (b) => _("title", b.target.value),
984
+ onChange: (x) => F("title", x.target.value),
964
985
  placeholder: "e.g., Patient Information"
965
986
  }
966
987
  )
@@ -969,10 +990,10 @@ function Di({ section: e, onActiveChildChange: t }) {
969
990
  /* @__PURE__ */ i.jsxs("div", { className: "mie:space-y-3", children: [
970
991
  /* @__PURE__ */ i.jsxs("h3", { className: "mie:text-sm mie:font-semibold mie:text-mietext mie:uppercase mie:tracking-wide", children: [
971
992
  "Fields (",
972
- o.length,
993
+ m.length,
973
994
  ")"
974
995
  ] }),
975
- o.length === 0 ? /* @__PURE__ */ i.jsxs("div", { className: "mie:flex mie:flex-col mie:items-center mie:justify-center mie:p-6 mie:bg-miebackground mie:border-2 mie:border-dashed mie:border-mieborder mie:rounded-lg mie:text-center", children: [
996
+ m.length === 0 ? /* @__PURE__ */ i.jsxs("div", { className: "mie:flex mie:flex-col mie:items-center mie:justify-center mie:p-6 mie:bg-miebackground mie:border-2 mie:border-dashed mie:border-mieborder mie:rounded-lg mie:text-center", children: [
976
997
  /* @__PURE__ */ i.jsx("p", { className: "mie:text-sm mie:text-mietextmuted", children: "No fields in this section" }),
977
998
  /* @__PURE__ */ i.jsx("p", { className: "mie:text-xs mie:text-mietextmuted/70 mie:mt-1", children: "Use the Tool Panel to add fields" })
978
999
  ] }) : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
@@ -980,21 +1001,23 @@ function Di({ section: e, onActiveChildChange: t }) {
980
1001
  /* @__PURE__ */ i.jsx(
981
1002
  "select",
982
1003
  {
1004
+ id: `${r}-editor-section-child-${e.id}`,
1005
+ "aria-label": "Section child field selector",
983
1006
  className: "mie:w-full mie:px-3 mie:py-2 mie:pr-10 mie:border mie:border-mieborder mie:rounded mie:bg-miesurface mie:text-mietext mie:focus:border-mieprimary mie:focus:ring-1 mie:focus:ring-mieprimary/30 mie:outline-none mie:appearance-none mie:cursor-pointer",
984
- value: u || "",
985
- onChange: (b) => S(b.target.value),
986
- children: o.map((b) => /* @__PURE__ */ i.jsxs("option", { value: b.id, children: [
987
- q(b),
1007
+ value: p || "",
1008
+ onChange: (x) => M(x.target.value),
1009
+ children: m.map((x) => /* @__PURE__ */ i.jsxs("option", { value: x.id, children: [
1010
+ W(x),
988
1011
  " — ",
989
- K[b.fieldType]?.label
990
- ] }, b.id))
1012
+ X[x.fieldType]?.label
1013
+ ] }, x.id))
991
1014
  }
992
1015
  ),
993
- /* @__PURE__ */ i.jsx(hi, { className: "mie:absolute mie:right-3 mie:top-1/2 mie:-translate-y-1/2 mie:w-4 mie:h-4 mie:text-mietextmuted mie:pointer-events-none" })
1016
+ /* @__PURE__ */ i.jsx(xi, { className: "mie:absolute mie:right-3 mie:top-1/2 mie:-translate-y-1/2 mie:w-4 mie:h-4 mie:text-mietextmuted mie:pointer-events-none" })
994
1017
  ] }),
995
- j && /* @__PURE__ */ i.jsxs("div", { className: "mie:space-y-4 mie:p-4 mie:bg-miebackground mie:border mie:border-mieborder mie:rounded-lg", children: [
1018
+ E && /* @__PURE__ */ i.jsxs("div", { className: "mie:space-y-4 mie:p-4 mie:bg-miebackground mie:border mie:border-mieborder mie:rounded-lg", children: [
996
1019
  /* @__PURE__ */ i.jsxs("div", { className: "mie:flex mie:items-center mie:justify-between", children: [
997
- /* @__PURE__ */ i.jsx("span", { className: "mie:inline-flex mie:items-center mie:px-2.5 mie:py-0.5 mie:rounded-full mie:text-xs mie:font-medium mie:bg-mieprimary/10 mie:text-mieprimary", children: K[j.fieldType]?.label || j.fieldType }),
1020
+ /* @__PURE__ */ i.jsx("span", { className: "mie:inline-flex mie:items-center mie:px-2.5 mie:py-0.5 mie:rounded-full mie:text-xs mie:font-medium mie:bg-mieprimary/10 mie:text-mieprimary", children: X[E.fieldType]?.label || E.fieldType }),
998
1021
  /* @__PURE__ */ i.jsxs(
999
1022
  "button",
1000
1023
  {
@@ -1002,35 +1025,37 @@ function Di({ section: e, onActiveChildChange: t }) {
1002
1025
  onClick: A,
1003
1026
  title: "Delete this field",
1004
1027
  children: [
1005
- /* @__PURE__ */ i.jsx(re, { className: "mie:w-3.5 mie:h-3.5" }),
1028
+ /* @__PURE__ */ i.jsx(oe, { className: "mie:w-3.5 mie:h-3.5" }),
1006
1029
  "Delete"
1007
1030
  ]
1008
1031
  }
1009
1032
  )
1010
1033
  ] }),
1011
- /* @__PURE__ */ i.jsx(We, { f: j, onUpdateField: w }),
1012
- j.fieldType === "input" && /* @__PURE__ */ i.jsxs("div", { className: "section-editor-default-answer", children: [
1013
- /* @__PURE__ */ i.jsx("label", { className: "mie:block mie:text-sm mie:font-medium mie:text-mietext mie:mb-1", children: "Default Answer" }),
1034
+ /* @__PURE__ */ i.jsx(We, { f: E, onUpdateField: R }),
1035
+ E.fieldType === "input" && /* @__PURE__ */ i.jsxs("div", { className: "section-editor-default-answer", children: [
1036
+ /* @__PURE__ */ i.jsx("label", { htmlFor: `${r}-editor-default-answer-${E.id}`, className: "mie:block mie:text-sm mie:font-medium mie:text-mietext mie:mb-1", children: "Default Answer" }),
1014
1037
  /* @__PURE__ */ i.jsx(
1015
1038
  "input",
1016
1039
  {
1040
+ id: `${r}-editor-default-answer-${E.id}`,
1041
+ "aria-label": "Default Answer",
1017
1042
  className: "mie:w-full mie:px-3 mie:py-2 mie:border mie:border-mieborder mie:bg-miesurface mie:text-mietext mie:rounded mie:focus:border-mieprimary mie:focus:ring-1 mie:focus:ring-mieprimary/30 mie:outline-none",
1018
- value: j.answer || "",
1019
- onChange: (b) => w("answer", b.target.value),
1043
+ value: E.answer || "",
1044
+ onChange: (x) => R("answer", x.target.value),
1020
1045
  placeholder: "Default value"
1021
1046
  }
1022
1047
  )
1023
1048
  ] }),
1024
- T && R && /* @__PURE__ */ i.jsx(Ve, { field: j, api: R }),
1025
- x && R && /* @__PURE__ */ i.jsx(He, { field: j, api: R })
1049
+ b && y && /* @__PURE__ */ i.jsx(He, { field: E, api: y }),
1050
+ O && y && /* @__PURE__ */ i.jsx(Ye, { field: E, api: y })
1026
1051
  ] })
1027
1052
  ] })
1028
1053
  ] })
1029
1054
  ] });
1030
1055
  }
1031
- function Re(e, t, r) {
1056
+ function Ae(e, t, r) {
1032
1057
  if (e === "expression")
1033
- return xi.includes(t) ? ["equals", "notEquals", "greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual"] : ["equals", "notEquals", "contains", "empty", "notEmpty"];
1058
+ return bi.includes(t) ? ["equals", "notEquals", "greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual"] : ["equals", "notEquals", "contains", "empty", "notEmpty"];
1034
1059
  switch (e) {
1035
1060
  case "text":
1036
1061
  case "longtext":
@@ -1089,7 +1114,7 @@ function Li(e) {
1089
1114
  return e;
1090
1115
  }
1091
1116
  }
1092
- function Ae(e) {
1117
+ function $e(e) {
1093
1118
  if (e && typeof e == "object") {
1094
1119
  const r = e.id ?? String(e.value ?? ""), n = String(e.value ?? e.label ?? e.id ?? "");
1095
1120
  return { id: r, value: n };
@@ -1097,113 +1122,117 @@ function Ae(e) {
1097
1122
  const t = String(e ?? "");
1098
1123
  return { id: t, value: t };
1099
1124
  }
1100
- function $i() {
1101
- const e = B(), t = V((p) => p.byId), r = V((p) => p.setEnableWhen), n = V((p) => p.updateField), s = e?.selectedFieldId?.value ?? null;
1125
+ function Ui() {
1126
+ const e = B(), t = Y((f) => f.byId), r = Y((f) => f.setEnableWhen), n = Y((f) => f.updateField), o = e?.selectedFieldId?.value ?? null;
1102
1127
  e?.selectedChildId?.ParentId;
1103
- const o = e?.selectedChildId?.ChildId ?? null, d = s ? t[s] : null, m = d?.fieldType === "section", c = l.useMemo(() => m ? Array.isArray(d?.fields) ? d.fields : [] : [], [m, d]), u = l.useMemo(() => !m || !o ? !1 : c.some((p) => p.id === o), [m, o, c]), h = l.useMemo(() => m && u ? `child:${o}` : "", [m, u, o]), [g, S] = l.useState(h);
1104
- l.useEffect(() => {
1105
- S(h);
1128
+ const a = e?.selectedChildId?.ChildId ?? null, m = o ? t[o] : null, l = K(), d = m?.fieldType === "section", u = c.useMemo(() => d ? Array.isArray(m?.fields) ? m.fields : [] : [], [d, m]), p = c.useMemo(() => !d || !a ? !1 : u.some((f) => f.id === a), [d, a, u]), h = c.useMemo(() => d && p ? `child:${a}` : "", [d, p, a]), [N, M] = c.useState(h);
1129
+ c.useEffect(() => {
1130
+ M(h);
1106
1131
  }, [h]);
1107
- const q = l.useCallback((p) => {
1108
- if (S(p), !!m)
1109
- if (p && p.startsWith("child:")) {
1110
- const C = p.slice(6);
1111
- e.selectedChildId.set(s, C);
1132
+ const W = c.useCallback((f) => {
1133
+ if (M(f), !!d)
1134
+ if (f && f.startsWith("child:")) {
1135
+ const g = f.slice(6);
1136
+ e.selectedChildId.set(o, g);
1112
1137
  } else
1113
1138
  e.selectedChildId.set(null, null);
1114
- }, [m, s, e]), _ = !!(m && g && g.startsWith("child:")), j = _ ? g.slice(6) : null, k = _ ? j : s, R = l.useMemo(() => k ? _ ? c.find((p) => p.id === j) ?? null : t[k] ?? null : null, [t, k, _, j, c]), w = l.useMemo(() => {
1115
- const p = [];
1116
- for (const C of Object.values(t))
1117
- if (C)
1118
- if (C.fieldType === "section" && Array.isArray(C.fields)) {
1119
- const M = C.title?.trim() || "Section";
1120
- C.fields.forEach((N) => {
1121
- p.push({
1122
- id: N.id,
1123
- parentId: C.id,
1124
- label: `${M} › ${N.question?.trim() || N.id}`,
1125
- fieldType: N.fieldType,
1126
- displayFormat: N.displayFormat,
1127
- options: Array.isArray(N.options) ? N.options : []
1139
+ }, [d, o, e]), F = !!(d && N && N.startsWith("child:")), E = F ? N.slice(6) : null, T = F ? E : o, y = c.useMemo(() => T ? F ? u.find((f) => f.id === E) ?? null : t[T] ?? null : null, [t, T, F, E, u]), R = c.useMemo(() => {
1140
+ const f = [];
1141
+ for (const g of Object.values(t))
1142
+ if (g)
1143
+ if (g.fieldType === "section" && Array.isArray(g.fields)) {
1144
+ const v = g.title?.trim() || "Section";
1145
+ g.fields.forEach((k) => {
1146
+ f.push({
1147
+ id: k.id,
1148
+ parentId: g.id,
1149
+ label: `${v} › ${k.question?.trim() || k.id}`,
1150
+ fieldType: k.fieldType,
1151
+ displayFormat: k.displayFormat,
1152
+ options: Array.isArray(k.options) ? k.options : []
1128
1153
  });
1129
1154
  });
1130
1155
  } else
1131
- p.push({
1132
- id: C.id,
1156
+ f.push({
1157
+ id: g.id,
1133
1158
  parentId: null,
1134
- label: C.question?.trim() || C.title?.trim() || C.id,
1135
- fieldType: C.fieldType,
1136
- displayFormat: C.displayFormat,
1137
- options: Array.isArray(C.options) ? C.options : []
1159
+ label: g.question?.trim() || g.title?.trim() || g.id,
1160
+ fieldType: g.fieldType,
1161
+ displayFormat: g.displayFormat,
1162
+ options: Array.isArray(g.options) ? g.options : []
1138
1163
  });
1139
- return p;
1140
- }, [t]), A = l.useCallback(
1141
- (p) => w.find((C) => C.id === p) || null,
1142
- [w]
1143
- ), T = l.useCallback(
1144
- (p) => {
1145
- if (!k) return;
1146
- const C = p && Array.isArray(p.conditions) ? { logic: p.logic || "AND", conditions: p.conditions } : void 0;
1147
- _ && s ? n(k, { enableWhen: C }, { sectionId: s }) : r(k, C);
1164
+ return f;
1165
+ }, [t]), A = c.useCallback(
1166
+ (f) => R.find((g) => g.id === f) || null,
1167
+ [R]
1168
+ ), b = c.useCallback(
1169
+ (f) => {
1170
+ if (!T) return;
1171
+ const g = f && Array.isArray(f.conditions) ? { logic: f.logic || "AND", conditions: f.conditions } : void 0;
1172
+ F && o ? n(T, { enableWhen: g }, { sectionId: o }) : r(T, g);
1148
1173
  },
1149
- [k, _, s, r, n]
1150
- ), x = l.useMemo(() => R?.enableWhen && Array.isArray(R.enableWhen.conditions) ? { logic: R.enableWhen.logic || "AND", conditions: R.enableWhen.conditions } : { logic: "AND", conditions: [] }, [R]), b = l.useCallback(() => {
1151
- const p = {
1152
- logic: x.logic || "AND",
1174
+ [T, F, o, r, n]
1175
+ ), O = c.useMemo(() => y?.enableWhen && Array.isArray(y.enableWhen.conditions) ? { logic: y.enableWhen.logic || "AND", conditions: y.enableWhen.conditions } : { logic: "AND", conditions: [] }, [y]), x = c.useCallback(() => {
1176
+ const f = {
1177
+ logic: O.logic || "AND",
1153
1178
  conditions: [
1154
- ...Array.isArray(x.conditions) ? x.conditions : [],
1179
+ ...Array.isArray(O.conditions) ? O.conditions : [],
1155
1180
  { targetId: "", operator: "equals", value: "" }
1156
1181
  ]
1157
1182
  };
1158
- T(p);
1159
- }, [x, T]), f = l.useCallback(() => T(null), [T]), O = l.useCallback(
1160
- (p) => {
1161
- const M = (Array.isArray(x.conditions) ? x.conditions : []).filter((N, F) => F !== p);
1162
- T({ ...x, conditions: M });
1183
+ b(f);
1184
+ }, [O, b]), q = c.useCallback(() => b(null), [b]), P = c.useCallback(
1185
+ (f) => {
1186
+ const v = (Array.isArray(O.conditions) ? O.conditions : []).filter((k, _) => _ !== f);
1187
+ b({ ...O, conditions: v });
1163
1188
  },
1164
- [x, T]
1165
- ), E = l.useCallback(
1166
- (p, C) => {
1167
- const N = [...Array.isArray(x.conditions) ? x.conditions : []], $ = { ...N[p] || { targetId: "", operator: "equals", value: "" }, ...C };
1168
- if ("targetId" in C) {
1169
- const z = A($.targetId), H = Re(z?.fieldType, z?.displayFormat, z?.inputType);
1170
- H.includes($.operator) || ($.operator = H[0] || "equals");
1171
- const Y = Array.isArray(z?.options) ? z.options.map(Ae) : [];
1172
- Y.length > 0 && (new Set(Y.map((v) => v.id)).has($.value) || ($.value = ""));
1189
+ [O, b]
1190
+ ), I = c.useCallback(
1191
+ (f, g) => {
1192
+ const k = [...Array.isArray(O.conditions) ? O.conditions : []], D = { ...k[f] || { targetId: "", operator: "equals", value: "" }, ...g };
1193
+ if ("targetId" in g) {
1194
+ const L = A(D.targetId), z = Ae(L?.fieldType, L?.displayFormat, L?.inputType);
1195
+ z.includes(D.operator) || (D.operator = z[0] || "equals");
1196
+ const s = Array.isArray(L?.options) ? L.options.map($e) : [];
1197
+ s.length > 0 && (new Set(s.map(($) => $.id)).has(D.value) || (D.value = ""));
1173
1198
  }
1174
- N[p] = $, T({ ...x, conditions: N });
1199
+ k[f] = D, b({ ...O, conditions: k });
1175
1200
  },
1176
- [x, A, T]
1177
- ), I = l.useMemo(
1178
- () => w.filter((p) => p.id !== k),
1179
- [w, k]
1180
- ), P = !R || !k;
1201
+ [O, A, b]
1202
+ ), w = c.useMemo(
1203
+ () => R.filter((f) => f.id !== T),
1204
+ [R, T]
1205
+ ), S = !y || !T;
1181
1206
  return /* @__PURE__ */ i.jsxs("div", { className: "logic-editor-container mie:space-y-4", children: [
1182
- m && /* @__PURE__ */ i.jsxs("div", { className: "mie:space-y-2", children: [
1183
- /* @__PURE__ */ i.jsx("label", { className: "mie:block mie:text-sm mie:font-medium mie:text-mietext", children: "Target Field" }),
1207
+ d && /* @__PURE__ */ i.jsxs("div", { className: "mie:space-y-2", children: [
1208
+ /* @__PURE__ */ i.jsx("label", { htmlFor: `${l}-editor-logic-target-${T}`, className: "mie:block mie:text-sm mie:font-medium mie:text-mietext", children: "Target Field" }),
1184
1209
  /* @__PURE__ */ i.jsxs(
1185
1210
  "select",
1186
1211
  {
1212
+ id: `${l}-editor-logic-target-${T}`,
1213
+ "aria-label": "Target Field",
1187
1214
  className: "mie:w-full mie:px-3 mie:py-2 mie:border mie:border-mieborder mie:rounded-lg mie:focus:border-mieprimary mie:focus:ring-1 mie:focus:ring-mieprimary/30 mie:outline-none mie:bg-miesurface mie:text-mietext mie:cursor-pointer mie:transition-colors",
1188
- value: g,
1189
- onChange: (p) => q(p.target.value),
1215
+ value: N,
1216
+ onChange: (f) => W(f.target.value),
1190
1217
  children: [
1191
1218
  /* @__PURE__ */ i.jsx("option", { value: "", children: "Section (this)" }),
1192
- c.map((p) => /* @__PURE__ */ i.jsx("option", { value: `child:${p.id}`, children: p.question?.trim() || p.title?.trim() || p.id }, p.id))
1219
+ u.map((f) => /* @__PURE__ */ i.jsx("option", { value: `child:${f.id}`, children: f.question?.trim() || f.title?.trim() || f.id }, f.id))
1193
1220
  ]
1194
1221
  }
1195
1222
  )
1196
1223
  ] }),
1197
1224
  /* @__PURE__ */ i.jsxs("div", { className: "mie:space-y-3", children: [
1198
1225
  /* @__PURE__ */ i.jsxs("div", { className: "mie:space-y-2", children: [
1199
- /* @__PURE__ */ i.jsx("label", { className: "mie:block mie:text-sm mie:font-medium mie:text-mietext", children: "Logic Operator" }),
1226
+ /* @__PURE__ */ i.jsx("label", { htmlFor: `${l}-editor-logic-operator-${T}`, className: "mie:block mie:text-sm mie:font-medium mie:text-mietext", children: "Logic Operator" }),
1200
1227
  /* @__PURE__ */ i.jsxs(
1201
1228
  "select",
1202
1229
  {
1203
- value: x.logic || "AND",
1204
- onChange: (p) => T({ ...x, logic: p.target.value }),
1230
+ id: `${l}-editor-logic-operator-${T}`,
1231
+ "aria-label": "Logic Operator",
1232
+ value: O.logic || "AND",
1233
+ onChange: (f) => b({ ...O, logic: f.target.value }),
1205
1234
  className: "mie:w-full mie:px-3 mie:py-2 mie:border mie:border-mieborder mie:rounded-lg mie:focus:border-mieprimary mie:focus:ring-1 mie:focus:ring-mieprimary/30 mie:outline-none mie:bg-miesurface mie:text-mietext mie:cursor-pointer mie:transition-colors",
1206
- disabled: P,
1235
+ disabled: S,
1207
1236
  children: [
1208
1237
  /* @__PURE__ */ i.jsx("option", { value: "AND", children: "AND — All conditions must be true" }),
1209
1238
  /* @__PURE__ */ i.jsx("option", { value: "OR", children: "OR — Any condition must be true" })
@@ -1217,8 +1246,8 @@ function $i() {
1217
1246
  {
1218
1247
  type: "button",
1219
1248
  className: "mie:flex-1 mie:px-3 mie:py-2 mie:text-sm mie:font-medium mie:bg-miesurface mie:text-mieprimary mie:border mie:border-mieprimary/50 mie:rounded-lg mie:hover:bg-mieprimary/10 mie:transition-colors mie:disabled:opacity-50 mie:disabled:cursor-not-allowed",
1220
- onClick: b,
1221
- disabled: P,
1249
+ onClick: x,
1250
+ disabled: S,
1222
1251
  children: "+ Add Condition"
1223
1252
  }
1224
1253
  ),
@@ -1227,74 +1256,78 @@ function $i() {
1227
1256
  {
1228
1257
  type: "button",
1229
1258
  className: "mie:px-3 mie:py-2 mie:text-sm mie:font-medium mie:bg-miesurface mie:text-miedanger mie:border mie:border-miedanger/50 mie:rounded-lg mie:hover:bg-miedanger/10 mie:transition-colors mie:disabled:opacity-50 mie:disabled:cursor-not-allowed",
1230
- onClick: f,
1231
- disabled: P,
1259
+ onClick: q,
1260
+ disabled: S,
1232
1261
  children: "Clear All"
1233
1262
  }
1234
1263
  )
1235
1264
  ] })
1236
1265
  ] }),
1237
- x.conditions.length > 0 && /* @__PURE__ */ i.jsxs("div", { className: "mie:space-y-3", children: [
1266
+ O.conditions.length > 0 && /* @__PURE__ */ i.jsxs("div", { className: "mie:space-y-3", children: [
1238
1267
  /* @__PURE__ */ i.jsxs("h4", { className: "mie:text-sm mie:font-medium mie:text-mietext", children: [
1239
1268
  "Conditions (",
1240
- x.conditions.length,
1269
+ O.conditions.length,
1241
1270
  ")"
1242
1271
  ] }),
1243
- /* @__PURE__ */ i.jsx("div", { className: "mie:space-y-3", children: x.conditions.map((p, C) => {
1244
- const M = A(p.targetId), N = Re(M?.fieldType, M?.displayFormat, M?.inputType), F = M ? qi(M.fieldType) : [], $ = F.length > 0, z = Array.isArray(M?.options) ? M.options.map(Ae) : [], H = z.length > 0, Y = !["empty", "notEmpty"].includes(p.operator), v = ["greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual"].includes(p.operator);
1272
+ /* @__PURE__ */ i.jsx("div", { className: "mie:space-y-3", children: O.conditions.map((f, g) => {
1273
+ const v = A(f.targetId), k = Ae(v?.fieldType, v?.displayFormat, v?.inputType), _ = v ? qi(v.fieldType) : [], D = _.length > 0, L = Array.isArray(v?.options) ? v.options.map($e) : [], z = L.length > 0, s = !["empty", "notEmpty"].includes(f.operator), $ = ["greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual"].includes(f.operator);
1245
1274
  return /* @__PURE__ */ i.jsxs("div", { className: "mie:p-3 mie:bg-miebackground mie:border mie:border-mieborder mie:rounded-lg mie:space-y-2", children: [
1246
1275
  /* @__PURE__ */ i.jsxs("div", { className: "mie:flex mie:items-center mie:justify-between mie:mb-2", children: [
1247
1276
  /* @__PURE__ */ i.jsxs("span", { className: "mie:text-xs mie:font-semibold mie:text-mietextmuted mie:uppercase mie:tracking-wide", children: [
1248
1277
  "Condition ",
1249
- C + 1
1278
+ g + 1
1250
1279
  ] }),
1251
1280
  /* @__PURE__ */ i.jsx(
1252
1281
  "button",
1253
1282
  {
1254
1283
  type: "button",
1255
- onClick: () => O(C),
1284
+ onClick: () => P(g),
1256
1285
  className: "mie:bg-transparent mie:text-mietextmuted/70 mie:hover:text-miedanger mie:transition-colors mie:border-0 mie:outline-none mie:focus:outline-none",
1257
1286
  title: "Remove condition",
1258
- disabled: P,
1259
- children: /* @__PURE__ */ i.jsx(re, { className: "mie:w-4 mie:h-4" })
1287
+ disabled: S,
1288
+ children: /* @__PURE__ */ i.jsx(oe, { className: "mie:w-4 mie:h-4" })
1260
1289
  }
1261
1290
  )
1262
1291
  ] }),
1263
1292
  /* @__PURE__ */ i.jsxs("div", { className: "mie:space-y-2", children: [
1264
1293
  /* @__PURE__ */ i.jsxs("div", { children: [
1265
- /* @__PURE__ */ i.jsx("label", { className: "mie:block mie:text-xs mie:font-medium mie:text-mietextmuted mie:mb-1", children: "When Field" }),
1294
+ /* @__PURE__ */ i.jsx("label", { htmlFor: `${l}-editor-logic-when-${T}-${g}`, className: "mie:block mie:text-xs mie:font-medium mie:text-mietextmuted mie:mb-1", children: "When Field" }),
1266
1295
  /* @__PURE__ */ i.jsxs(
1267
1296
  "select",
1268
1297
  {
1298
+ id: `${l}-editor-logic-when-${T}-${g}`,
1299
+ "aria-label": "When Field",
1269
1300
  className: "mie:w-full mie:px-3 mie:py-2 mie:border mie:border-mieborder mie:rounded-lg mie:focus:border-mieprimary mie:focus:ring-1 mie:focus:ring-mieprimary/30 mie:outline-none mie:bg-miesurface mie:text-mietext mie:text-sm mie:cursor-pointer mie:transition-colors",
1270
- value: p.targetId,
1271
- onChange: (y) => E(C, { targetId: y.target.value }),
1272
- disabled: P,
1301
+ value: f.targetId,
1302
+ onChange: (j) => I(g, { targetId: j.target.value }),
1303
+ disabled: S,
1273
1304
  children: [
1274
1305
  /* @__PURE__ */ i.jsx("option", { value: "", children: "— Select field —" }),
1275
- I.map((y) => /* @__PURE__ */ i.jsx("option", { value: y.id, children: y.label }, y.id))
1306
+ w.map((j) => /* @__PURE__ */ i.jsx("option", { value: j.id, children: j.label }, j.id))
1276
1307
  ]
1277
1308
  }
1278
1309
  )
1279
1310
  ] }),
1280
- $ && /* @__PURE__ */ i.jsxs("div", { children: [
1281
- /* @__PURE__ */ i.jsx("label", { className: "mie:block mie:text-xs mie:font-medium mie:text-mietextmuted mie:mb-1", children: "Property (optional)" }),
1311
+ D && /* @__PURE__ */ i.jsxs("div", { children: [
1312
+ /* @__PURE__ */ i.jsx("label", { htmlFor: `${l}-editor-logic-property-${T}-${g}`, className: "mie:block mie:text-xs mie:font-medium mie:text-mietextmuted mie:mb-1", children: "Property (optional)" }),
1282
1313
  /* @__PURE__ */ i.jsxs(
1283
1314
  "select",
1284
1315
  {
1316
+ id: `${l}-editor-logic-property-${T}-${g}`,
1317
+ "aria-label": "Property (optional)",
1285
1318
  className: "mie:w-full mie:px-3 mie:py-2 mie:border mie:border-mieborder mie:rounded-lg mie:focus:border-mieprimary mie:focus:ring-1 mie:focus:ring-mieprimary/30 mie:outline-none mie:bg-miesurface mie:text-mietext mie:text-sm mie:cursor-pointer mie:transition-colors",
1286
- value: p.propertyAccessor || "",
1287
- onChange: (y) => E(C, { propertyAccessor: y.target.value || void 0 }),
1288
- disabled: P || !M,
1319
+ value: f.propertyAccessor || "",
1320
+ onChange: (j) => I(g, { propertyAccessor: j.target.value || void 0 }),
1321
+ disabled: S || !v,
1289
1322
  children: [
1290
1323
  /* @__PURE__ */ i.jsx("option", { value: "", children: "— Direct value —" }),
1291
- F.map((y) => /* @__PURE__ */ i.jsxs("option", { value: y, children: [
1324
+ _.map((j) => /* @__PURE__ */ i.jsxs("option", { value: j, children: [
1292
1325
  ".",
1293
- y,
1326
+ j,
1294
1327
  " (get ",
1295
- y,
1328
+ j,
1296
1329
  ")"
1297
- ] }, y))
1330
+ ] }, j))
1298
1331
  ]
1299
1332
  }
1300
1333
  ),
@@ -1302,67 +1335,73 @@ function $i() {
1302
1335
  ] }),
1303
1336
  /* @__PURE__ */ i.jsxs("div", { className: "mie:grid mie:grid-cols-2 mie:gap-2", children: [
1304
1337
  /* @__PURE__ */ i.jsxs("div", { children: [
1305
- /* @__PURE__ */ i.jsx("label", { className: "mie:block mie:text-xs mie:font-medium mie:text-mietextmuted mie:mb-1", children: "Operator" }),
1338
+ /* @__PURE__ */ i.jsx("label", { htmlFor: `${l}-editor-logic-operator-cond-${T}-${g}`, className: "mie:block mie:text-xs mie:font-medium mie:text-mietextmuted mie:mb-1", children: "Operator" }),
1306
1339
  /* @__PURE__ */ i.jsx(
1307
1340
  "select",
1308
1341
  {
1342
+ id: `${l}-editor-logic-operator-cond-${T}-${g}`,
1343
+ "aria-label": "Operator",
1309
1344
  className: "mie:w-full mie:px-3 mie:py-2 mie:border mie:border-mieborder mie:rounded-lg mie:focus:border-mieprimary mie:focus:ring-1 mie:focus:ring-mieprimary/30 mie:outline-none mie:bg-miesurface mie:text-mietext mie:text-sm mie:cursor-pointer mie:transition-colors",
1310
- value: p.operator,
1311
- onChange: (y) => E(C, { operator: y.target.value }),
1312
- disabled: P || !M,
1313
- children: (M ? N : ["equals"]).map((y) => /* @__PURE__ */ i.jsx("option", { value: y, children: Li(y) }, y))
1345
+ value: f.operator,
1346
+ onChange: (j) => I(g, { operator: j.target.value }),
1347
+ disabled: S || !v,
1348
+ children: (v ? k : ["equals"]).map((j) => /* @__PURE__ */ i.jsx("option", { value: j, children: Li(j) }, j))
1314
1349
  }
1315
1350
  )
1316
1351
  ] }),
1317
1352
  /* @__PURE__ */ i.jsxs("div", { children: [
1318
- /* @__PURE__ */ i.jsx("label", { className: "mie:block mie:text-xs mie:font-medium mie:text-mietextmuted mie:mb-1", children: "Value" }),
1319
- Y ? H && !p.propertyAccessor && !v ? /* @__PURE__ */ i.jsxs(
1353
+ /* @__PURE__ */ i.jsx("label", { htmlFor: `${l}-editor-logic-value-${T}-${g}`, className: "mie:block mie:text-xs mie:font-medium mie:text-mietextmuted mie:mb-1", children: "Value" }),
1354
+ s ? z && !f.propertyAccessor && !$ ? /* @__PURE__ */ i.jsxs(
1320
1355
  "select",
1321
1356
  {
1357
+ id: `${l}-editor-logic-value-${T}-${g}`,
1358
+ "aria-label": "Value",
1322
1359
  className: "mie:w-full mie:px-3 mie:py-2 mie:border mie:border-mieborder mie:rounded-lg mie:focus:border-mieprimary mie:focus:ring-1 mie:focus:ring-mieprimary/30 mie:outline-none mie:bg-miesurface mie:text-mietext mie:text-sm mie:cursor-pointer mie:transition-colors",
1323
- value: p.value,
1324
- onChange: (y) => E(C, { value: y.target.value }),
1325
- disabled: P || !M,
1360
+ value: f.value,
1361
+ onChange: (j) => I(g, { value: j.target.value }),
1362
+ disabled: S || !v,
1326
1363
  children: [
1327
1364
  /* @__PURE__ */ i.jsx("option", { value: "", children: "— Select option —" }),
1328
- z.map((y) => /* @__PURE__ */ i.jsx("option", { value: y.id, children: y.value }, y.id))
1365
+ L.map((j) => /* @__PURE__ */ i.jsx("option", { value: j.id, children: j.value }, j.id))
1329
1366
  ]
1330
1367
  }
1331
1368
  ) : /* @__PURE__ */ i.jsx(
1332
1369
  "input",
1333
1370
  {
1371
+ id: `${l}-editor-logic-value-${T}-${g}`,
1372
+ "aria-label": "Value",
1334
1373
  className: "mie:w-full mie:px-3 mie:py-2 mie:border mie:border-mieborder mie:rounded-lg mie:focus:border-mieprimary mie:focus:ring-1 mie:focus:ring-mieprimary/30 mie:outline-none mie:bg-miesurface mie:text-mietext mie:text-sm mie:transition-colors",
1335
- placeholder: p.propertyAccessor || v ? "Enter number" : "Enter value",
1336
- type: p.propertyAccessor || v ? "number" : "text",
1337
- value: p.value,
1338
- onChange: (y) => E(C, { value: y.target.value }),
1339
- disabled: P || !M
1374
+ placeholder: f.propertyAccessor || $ ? "Enter number" : "Enter value",
1375
+ type: f.propertyAccessor || $ ? "number" : "text",
1376
+ value: f.value,
1377
+ onChange: (j) => I(g, { value: j.target.value }),
1378
+ disabled: S || !v
1340
1379
  }
1341
1380
  ) : /* @__PURE__ */ i.jsx("div", { className: "mie:w-full mie:px-3 mie:py-2 mie:border mie:border-mieborder mie:rounded-lg mie:bg-miebackground mie:text-sm mie:text-mietextmuted mie:flex mie:items-center", children: "(no value needed)" })
1342
1381
  ] })
1343
1382
  ] })
1344
1383
  ] })
1345
- ] }, C);
1384
+ ] }, g);
1346
1385
  }) })
1347
1386
  ] })
1348
1387
  ] });
1349
1388
  }
1350
- function Pe({ isMobileModal: e = !1 }) {
1351
- const t = B(), r = V(
1352
- l.useCallback(
1353
- (c) => t.selectedFieldId.value ? c.byId[t.selectedFieldId.value] : null,
1389
+ function Fe({ isMobileModal: e = !1 }) {
1390
+ const t = B(), r = Y(
1391
+ c.useCallback(
1392
+ (d) => t.selectedFieldId.value ? d.byId[t.selectedFieldId.value] : null,
1354
1393
  [t.selectedFieldId.value]
1355
1394
  )
1356
- ), [n, s] = l.useState("EDIT"), o = l.useCallback(
1357
- (c, u) => {
1358
- t.selectedChildId.set(c, u);
1395
+ ), [n, o] = c.useState("EDIT"), a = c.useCallback(
1396
+ (d, u) => {
1397
+ t.selectedChildId.set(d, u);
1359
1398
  },
1360
1399
  [t.selectedChildId.set]
1361
1400
  );
1362
- if (l.useEffect(() => {
1363
- t.selectedChildId.set(null, null), s("EDIT");
1401
+ if (c.useEffect(() => {
1402
+ t.selectedChildId.set(null, null), o("EDIT");
1364
1403
  }, [t.selectedFieldId.value]), t.state.isPreview) return null;
1365
- const d = !r, m = r?.fieldType === "section";
1404
+ const m = !r, l = r?.fieldType === "section";
1366
1405
  return /* @__PURE__ */ i.jsxs(
1367
1406
  "div",
1368
1407
  {
@@ -1373,10 +1412,10 @@ function Pe({ isMobileModal: e = !1 }) {
1373
1412
  "button",
1374
1413
  {
1375
1414
  type: "button",
1376
- onClick: () => s("EDIT"),
1415
+ onClick: () => o("EDIT"),
1377
1416
  className: `mie:flex-1 mie:flex mie:items-center mie:justify-center mie:gap-2 mie:px-3 mie:py-2 mie:rounded-lg mie:text-xs mie:font-medium mie:transition-colors mie:border-0 mie:outline-none mie:focus:outline-none ${n === "EDIT" ? "mie:bg-mieprimary mie:text-mietextsecondary mie:shadow-sm" : "mie:bg-transparent mie:text-mietextmuted mie:hover:text-mietext mie:hover:bg-miesurface"}`,
1378
1417
  children: [
1379
- /* @__PURE__ */ i.jsx(bi, { className: "mie:w-4 mie:h-4" }),
1418
+ /* @__PURE__ */ i.jsx(gi, { className: "mie:w-4 mie:h-4" }),
1380
1419
  /* @__PURE__ */ i.jsx("span", { children: "Edit" })
1381
1420
  ]
1382
1421
  }
@@ -1385,59 +1424,59 @@ function Pe({ isMobileModal: e = !1 }) {
1385
1424
  "button",
1386
1425
  {
1387
1426
  type: "button",
1388
- onClick: () => s("LOGIC"),
1427
+ onClick: () => o("LOGIC"),
1389
1428
  className: `mie:flex-1 mie:flex mie:items-center mie:justify-center mie:gap-2 mie:px-3 mie:py-2 mie:rounded-lg mie:text-xs mie:font-medium mie:transition-colors mie:border-0 mie:outline-none mie:focus:outline-none ${n === "LOGIC" ? "mie:bg-mieprimary mie:text-mietextsecondary mie:shadow-sm" : "mie:bg-transparent mie:text-mietextmuted mie:hover:text-mietext mie:hover:bg-miesurface"}`,
1390
1429
  children: [
1391
- /* @__PURE__ */ i.jsx(gi, { className: "mie:w-4 mie:h-4" }),
1430
+ /* @__PURE__ */ i.jsx(vi, { className: "mie:w-4 mie:h-4" }),
1392
1431
  /* @__PURE__ */ i.jsx("span", { children: "Logic" })
1393
1432
  ]
1394
1433
  }
1395
1434
  )
1396
1435
  ] }) }),
1397
1436
  /* @__PURE__ */ i.jsxs("div", { className: "mie:p-4", children: [
1398
- d && /* @__PURE__ */ i.jsx("div", { className: "edit-panel-empty mie:text-mietextmuted", children: /* @__PURE__ */ i.jsx("p", { children: "Select a field in the center panel to edit its properties." }) }),
1399
- !d && n === "EDIT" && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
1400
- !m && /* @__PURE__ */ i.jsx(_i, { f: r }),
1401
- m && /* @__PURE__ */ i.jsx(
1437
+ m && /* @__PURE__ */ i.jsx("div", { className: "edit-panel-empty mie:text-mietextmuted", children: /* @__PURE__ */ i.jsx("p", { children: "Select a field in the center panel to edit its properties." }) }),
1438
+ !m && n === "EDIT" && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
1439
+ !l && /* @__PURE__ */ i.jsx(_i, { f: r }),
1440
+ l && /* @__PURE__ */ i.jsx(
1402
1441
  Di,
1403
1442
  {
1404
1443
  section: r,
1405
- onActiveChildChange: o
1444
+ onActiveChildChange: a
1406
1445
  }
1407
1446
  )
1408
1447
  ] }),
1409
- !d && n === "LOGIC" && /* @__PURE__ */ i.jsx($i, {})
1448
+ !m && n === "LOGIC" && /* @__PURE__ */ i.jsx(Ui, {})
1410
1449
  ] })
1411
1450
  ]
1412
1451
  }
1413
1452
  );
1414
1453
  }
1415
- function Ui() {
1416
- const e = B(), { fields: t } = vi(e.state.isPreview), r = yi((m) => m.hideUnsupportedFields), n = V((m) => m.order), s = l.useRef(null), o = l.useRef(0), d = Ee(() => (r ? t.filter((c) => c.fieldType !== "unsupported") : t).map((c) => c.id), [t, r]);
1417
- return l.useEffect(() => {
1454
+ function zi() {
1455
+ const e = B(), { fields: t } = yi(e.state.isPreview), r = ji((l) => l.hideUnsupportedFields), n = Y((l) => l.order), o = c.useRef(null), a = c.useRef(0), m = Ee(() => (r ? t.filter((d) => d.fieldType !== "unsupported") : t).map((d) => d.id), [t, r]);
1456
+ return c.useEffect(() => {
1418
1457
  if (!e.state.isPreview) {
1419
- if (n.length > o.current) {
1420
- const m = n[n.length - 1], c = s.current?.querySelector(`[data-field-id="${m}"]`);
1421
- c && (c.scrollIntoView({ behavior: "smooth", block: "nearest" }), e.selectedFieldId.set(m));
1458
+ if (n.length > a.current) {
1459
+ const l = n[n.length - 1], d = o.current?.querySelector(`[data-field-id="${l}"]`);
1460
+ d && (d.scrollIntoView({ behavior: "smooth", block: "nearest" }), e.selectedFieldId.set(l));
1422
1461
  }
1423
- o.current = n.length;
1462
+ a.current = n.length;
1424
1463
  }
1425
1464
  }, [n, e.selectedFieldId, e.state.isPreview]), /* @__PURE__ */ i.jsx(
1426
1465
  "div",
1427
1466
  {
1428
- ref: s,
1467
+ ref: o,
1429
1468
  className: `form-builder-main
1430
1469
  ${e.state.isPreview ? "mie:max-w-4xl" : "mie:max-w-xl"}
1431
1470
  mie:mx-auto mie:rounded-lg mie:overflow-y-auto mie:max-h-[calc(100svh-13rem)] mie:lg:max-h-[calc(100dvh-11rem)] mie:custom-scrollbar mie:lg:pr-2`,
1432
1471
  onClick: () => !e.state.isPreview && e.selectedFieldId.clear(),
1433
- children: d.length === 0 ? /* @__PURE__ */ i.jsx(Wi, {}) : d.map((m) => /* @__PURE__ */ i.jsx(zi, { id: m }, m))
1472
+ children: m.length === 0 ? /* @__PURE__ */ i.jsx(Wi, {}) : m.map((l) => /* @__PURE__ */ i.jsx(Vi, { id: l }, l))
1434
1473
  }
1435
1474
  );
1436
1475
  }
1437
- const zi = l.memo(function({ id: t }) {
1438
- const r = V(l.useCallback((s) => s.byId[t], [t]));
1476
+ const Vi = c.memo(function({ id: t }) {
1477
+ const r = Y(c.useCallback((o) => o.byId[t], [t]));
1439
1478
  if (!r) return null;
1440
- const n = ji(r.fieldType);
1479
+ const n = wi(r.fieldType);
1441
1480
  return n ? /* @__PURE__ */ i.jsx("div", { className: "mie:mb-1.5", "data-field-type": r.fieldType, "data-field-id": r.id, children: /* @__PURE__ */ i.jsx(n, { field: r }) }) : null;
1442
1481
  });
1443
1482
  function Wi() {
@@ -1467,50 +1506,50 @@ function Wi() {
1467
1506
  }
1468
1507
  );
1469
1508
  }
1470
- function Me(e, t) {
1509
+ function Pe(e, t) {
1471
1510
  (t == null || t > e.length) && (t = e.length);
1472
1511
  for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
1473
1512
  return n;
1474
1513
  }
1475
- function Vi(e) {
1514
+ function Hi(e) {
1476
1515
  if (Array.isArray(e)) return e;
1477
1516
  }
1478
- function Hi(e, t, r) {
1479
- return (t = Qi(t)) in e ? Object.defineProperty(e, t, {
1517
+ function Yi(e, t, r) {
1518
+ return (t = Zi(t)) in e ? Object.defineProperty(e, t, {
1480
1519
  value: r,
1481
1520
  enumerable: !0,
1482
1521
  configurable: !0,
1483
1522
  writable: !0
1484
1523
  }) : e[t] = r, e;
1485
1524
  }
1486
- function Yi(e, t) {
1525
+ function Ji(e, t) {
1487
1526
  var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
1488
1527
  if (r != null) {
1489
- var n, s, o, d, m = [], c = !0, u = !1;
1528
+ var n, o, a, m, l = [], d = !0, u = !1;
1490
1529
  try {
1491
- if (o = (r = r.call(e)).next, t !== 0) for (; !(c = (n = o.call(r)).done) && (m.push(n.value), m.length !== t); c = !0) ;
1492
- } catch (h) {
1493
- u = !0, s = h;
1530
+ if (a = (r = r.call(e)).next, t !== 0) for (; !(d = (n = a.call(r)).done) && (l.push(n.value), l.length !== t); d = !0) ;
1531
+ } catch (p) {
1532
+ u = !0, o = p;
1494
1533
  } finally {
1495
1534
  try {
1496
- if (!c && r.return != null && (d = r.return(), Object(d) !== d)) return;
1535
+ if (!d && r.return != null && (m = r.return(), Object(m) !== m)) return;
1497
1536
  } finally {
1498
- if (u) throw s;
1537
+ if (u) throw o;
1499
1538
  }
1500
1539
  }
1501
- return m;
1540
+ return l;
1502
1541
  }
1503
1542
  }
1504
- function Ji() {
1543
+ function Bi() {
1505
1544
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1506
1545
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1507
1546
  }
1508
- function Fe(e, t) {
1547
+ function Me(e, t) {
1509
1548
  var r = Object.keys(e);
1510
1549
  if (Object.getOwnPropertySymbols) {
1511
1550
  var n = Object.getOwnPropertySymbols(e);
1512
- t && (n = n.filter(function(s) {
1513
- return Object.getOwnPropertyDescriptor(e, s).enumerable;
1551
+ t && (n = n.filter(function(o) {
1552
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
1514
1553
  })), r.push.apply(r, n);
1515
1554
  }
1516
1555
  return r;
@@ -1518,24 +1557,24 @@ function Fe(e, t) {
1518
1557
  function _e(e) {
1519
1558
  for (var t = 1; t < arguments.length; t++) {
1520
1559
  var r = arguments[t] != null ? arguments[t] : {};
1521
- t % 2 ? Fe(Object(r), !0).forEach(function(n) {
1522
- Hi(e, n, r[n]);
1523
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Fe(Object(r)).forEach(function(n) {
1560
+ t % 2 ? Me(Object(r), !0).forEach(function(n) {
1561
+ Yi(e, n, r[n]);
1562
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Me(Object(r)).forEach(function(n) {
1524
1563
  Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
1525
1564
  });
1526
1565
  }
1527
1566
  return e;
1528
1567
  }
1529
- function Bi(e, t) {
1568
+ function Gi(e, t) {
1530
1569
  if (e == null) return {};
1531
- var r, n, s = Gi(e, t);
1570
+ var r, n, o = Ki(e, t);
1532
1571
  if (Object.getOwnPropertySymbols) {
1533
- var o = Object.getOwnPropertySymbols(e);
1534
- for (n = 0; n < o.length; n++) r = o[n], t.indexOf(r) === -1 && {}.propertyIsEnumerable.call(e, r) && (s[r] = e[r]);
1572
+ var a = Object.getOwnPropertySymbols(e);
1573
+ for (n = 0; n < a.length; n++) r = a[n], t.indexOf(r) === -1 && {}.propertyIsEnumerable.call(e, r) && (o[r] = e[r]);
1535
1574
  }
1536
- return s;
1575
+ return o;
1537
1576
  }
1538
- function Gi(e, t) {
1577
+ function Ki(e, t) {
1539
1578
  if (e == null) return {};
1540
1579
  var r = {};
1541
1580
  for (var n in e) if ({}.hasOwnProperty.call(e, n)) {
@@ -1544,10 +1583,10 @@ function Gi(e, t) {
1544
1583
  }
1545
1584
  return r;
1546
1585
  }
1547
- function Ki(e, t) {
1548
- return Vi(e) || Yi(e, t) || Zi(e, t) || Ji();
1549
- }
1550
1586
  function Xi(e, t) {
1587
+ return Hi(e) || Ji(e, t) || et(e, t) || Bi();
1588
+ }
1589
+ function Qi(e, t) {
1551
1590
  if (typeof e != "object" || !e) return e;
1552
1591
  var r = e[Symbol.toPrimitive];
1553
1592
  if (r !== void 0) {
@@ -1557,18 +1596,18 @@ function Xi(e, t) {
1557
1596
  }
1558
1597
  return (t === "string" ? String : Number)(e);
1559
1598
  }
1560
- function Qi(e) {
1561
- var t = Xi(e, "string");
1599
+ function Zi(e) {
1600
+ var t = Qi(e, "string");
1562
1601
  return typeof t == "symbol" ? t : t + "";
1563
1602
  }
1564
- function Zi(e, t) {
1603
+ function et(e, t) {
1565
1604
  if (e) {
1566
- if (typeof e == "string") return Me(e, t);
1605
+ if (typeof e == "string") return Pe(e, t);
1567
1606
  var r = {}.toString.call(e).slice(8, -1);
1568
- return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Me(e, t) : void 0;
1607
+ return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Pe(e, t) : void 0;
1569
1608
  }
1570
1609
  }
1571
- function et(e, t, r) {
1610
+ function it(e, t, r) {
1572
1611
  return t in e ? Object.defineProperty(e, t, {
1573
1612
  value: r,
1574
1613
  enumerable: !0,
@@ -1580,8 +1619,8 @@ function De(e, t) {
1580
1619
  var r = Object.keys(e);
1581
1620
  if (Object.getOwnPropertySymbols) {
1582
1621
  var n = Object.getOwnPropertySymbols(e);
1583
- t && (n = n.filter(function(s) {
1584
- return Object.getOwnPropertyDescriptor(e, s).enumerable;
1622
+ t && (n = n.filter(function(o) {
1623
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
1585
1624
  })), r.push.apply(r, n);
1586
1625
  }
1587
1626
  return r;
@@ -1590,65 +1629,65 @@ function qe(e) {
1590
1629
  for (var t = 1; t < arguments.length; t++) {
1591
1630
  var r = arguments[t] != null ? arguments[t] : {};
1592
1631
  t % 2 ? De(Object(r), !0).forEach(function(n) {
1593
- et(e, n, r[n]);
1632
+ it(e, n, r[n]);
1594
1633
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : De(Object(r)).forEach(function(n) {
1595
1634
  Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
1596
1635
  });
1597
1636
  }
1598
1637
  return e;
1599
1638
  }
1600
- function it() {
1639
+ function tt() {
1601
1640
  for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
1602
1641
  t[r] = arguments[r];
1603
1642
  return function(n) {
1604
- return t.reduceRight(function(s, o) {
1605
- return o(s);
1643
+ return t.reduceRight(function(o, a) {
1644
+ return a(o);
1606
1645
  }, n);
1607
1646
  };
1608
1647
  }
1609
- function ie(e) {
1648
+ function re(e) {
1610
1649
  return function t() {
1611
- for (var r = this, n = arguments.length, s = new Array(n), o = 0; o < n; o++)
1612
- s[o] = arguments[o];
1613
- return s.length >= e.length ? e.apply(this, s) : function() {
1614
- for (var d = arguments.length, m = new Array(d), c = 0; c < d; c++)
1615
- m[c] = arguments[c];
1616
- return t.apply(r, [].concat(s, m));
1650
+ for (var r = this, n = arguments.length, o = new Array(n), a = 0; a < n; a++)
1651
+ o[a] = arguments[a];
1652
+ return o.length >= e.length ? e.apply(this, o) : function() {
1653
+ for (var m = arguments.length, l = new Array(m), d = 0; d < m; d++)
1654
+ l[d] = arguments[d];
1655
+ return t.apply(r, [].concat(o, l));
1617
1656
  };
1618
1657
  };
1619
1658
  }
1620
- function he(e) {
1659
+ function xe(e) {
1621
1660
  return {}.toString.call(e).includes("Object");
1622
1661
  }
1623
- function tt(e) {
1662
+ function rt(e) {
1624
1663
  return !Object.keys(e).length;
1625
1664
  }
1626
- function ne(e) {
1665
+ function se(e) {
1627
1666
  return typeof e == "function";
1628
1667
  }
1629
- function rt(e, t) {
1668
+ function nt(e, t) {
1630
1669
  return Object.prototype.hasOwnProperty.call(e, t);
1631
1670
  }
1632
- function nt(e, t) {
1633
- return he(t) || G("changeType"), Object.keys(t).some(function(r) {
1634
- return !rt(e, r);
1671
+ function ot(e, t) {
1672
+ return xe(t) || G("changeType"), Object.keys(t).some(function(r) {
1673
+ return !nt(e, r);
1635
1674
  }) && G("changeField"), t;
1636
1675
  }
1637
1676
  function st(e) {
1638
- ne(e) || G("selectorType");
1677
+ se(e) || G("selectorType");
1639
1678
  }
1640
- function ot(e) {
1641
- ne(e) || he(e) || G("handlerType"), he(e) && Object.values(e).some(function(t) {
1642
- return !ne(t);
1679
+ function at(e) {
1680
+ se(e) || xe(e) || G("handlerType"), xe(e) && Object.values(e).some(function(t) {
1681
+ return !se(t);
1643
1682
  }) && G("handlersType");
1644
1683
  }
1645
- function at(e) {
1646
- e || G("initialIsRequired"), he(e) || G("initialType"), tt(e) && G("initialContent");
1684
+ function lt(e) {
1685
+ e || G("initialIsRequired"), xe(e) || G("initialType"), rt(e) && G("initialContent");
1647
1686
  }
1648
1687
  function mt(e, t) {
1649
1688
  throw new Error(e[t] || e.default);
1650
1689
  }
1651
- var lt = {
1690
+ var ct = {
1652
1691
  initialIsRequired: "initial state is required",
1653
1692
  initialType: "initial state should be an object",
1654
1693
  initialContent: "initial state shouldn't be an empty object",
@@ -1658,76 +1697,76 @@ var lt = {
1658
1697
  changeType: "provided value of changes should be an object",
1659
1698
  changeField: 'it seams you want to change a field in the state which is not specified in the "initial" state',
1660
1699
  default: "an unknown error accured in `state-local` package"
1661
- }, G = ie(mt)(lt), le = {
1662
- changes: nt,
1700
+ }, G = re(mt)(ct), ce = {
1701
+ changes: ot,
1663
1702
  selector: st,
1664
- handler: ot,
1665
- initial: at
1703
+ handler: at,
1704
+ initial: lt
1666
1705
  };
1667
- function ct(e) {
1706
+ function dt(e) {
1668
1707
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1669
- le.initial(e), le.handler(t);
1708
+ ce.initial(e), ce.handler(t);
1670
1709
  var r = {
1671
1710
  current: e
1672
- }, n = ie(ft)(r, t), s = ie(ut)(r), o = ie(le.changes)(e), d = ie(dt)(r);
1673
- function m() {
1674
- var u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(h) {
1675
- return h;
1711
+ }, n = re(pt)(r, t), o = re(ft)(r), a = re(ce.changes)(e), m = re(ut)(r);
1712
+ function l() {
1713
+ var u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(p) {
1714
+ return p;
1676
1715
  };
1677
- return le.selector(u), u(r.current);
1716
+ return ce.selector(u), u(r.current);
1678
1717
  }
1679
- function c(u) {
1680
- it(n, s, o, d)(u);
1718
+ function d(u) {
1719
+ tt(n, o, a, m)(u);
1681
1720
  }
1682
- return [m, c];
1683
- }
1684
- function dt(e, t) {
1685
- return ne(t) ? t(e.current) : t;
1721
+ return [l, d];
1686
1722
  }
1687
1723
  function ut(e, t) {
1724
+ return se(t) ? t(e.current) : t;
1725
+ }
1726
+ function ft(e, t) {
1688
1727
  return e.current = qe(qe({}, e.current), t), t;
1689
1728
  }
1690
- function ft(e, t, r) {
1691
- return ne(t) ? t(e.current) : Object.keys(r).forEach(function(n) {
1692
- var s;
1693
- return (s = t[n]) === null || s === void 0 ? void 0 : s.call(t, e.current[n]);
1729
+ function pt(e, t, r) {
1730
+ return se(t) ? t(e.current) : Object.keys(r).forEach(function(n) {
1731
+ var o;
1732
+ return (o = t[n]) === null || o === void 0 ? void 0 : o.call(t, e.current[n]);
1694
1733
  }), r;
1695
1734
  }
1696
- var pt = {
1697
- create: ct
1698
- }, ht = {
1735
+ var ht = {
1736
+ create: dt
1737
+ }, xt = {
1699
1738
  paths: {
1700
1739
  vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"
1701
1740
  }
1702
1741
  };
1703
- function xt(e) {
1742
+ function bt(e) {
1704
1743
  return function t() {
1705
- for (var r = this, n = arguments.length, s = new Array(n), o = 0; o < n; o++)
1706
- s[o] = arguments[o];
1707
- return s.length >= e.length ? e.apply(this, s) : function() {
1708
- for (var d = arguments.length, m = new Array(d), c = 0; c < d; c++)
1709
- m[c] = arguments[c];
1710
- return t.apply(r, [].concat(s, m));
1744
+ for (var r = this, n = arguments.length, o = new Array(n), a = 0; a < n; a++)
1745
+ o[a] = arguments[a];
1746
+ return o.length >= e.length ? e.apply(this, o) : function() {
1747
+ for (var m = arguments.length, l = new Array(m), d = 0; d < m; d++)
1748
+ l[d] = arguments[d];
1749
+ return t.apply(r, [].concat(o, l));
1711
1750
  };
1712
1751
  };
1713
1752
  }
1714
- function bt(e) {
1753
+ function gt(e) {
1715
1754
  return {}.toString.call(e).includes("Object");
1716
1755
  }
1717
- function gt(e) {
1718
- return e || Le("configIsRequired"), bt(e) || Le("configType"), e.urls ? (vt(), {
1756
+ function vt(e) {
1757
+ return e || Le("configIsRequired"), gt(e) || Le("configType"), e.urls ? (yt(), {
1719
1758
  paths: {
1720
1759
  vs: e.urls.monacoBase
1721
1760
  }
1722
1761
  }) : e;
1723
1762
  }
1724
- function vt() {
1725
- console.warn(Ye.deprecation);
1763
+ function yt() {
1764
+ console.warn(Je.deprecation);
1726
1765
  }
1727
- function yt(e, t) {
1766
+ function jt(e, t) {
1728
1767
  throw new Error(e[t] || e.default);
1729
1768
  }
1730
- var Ye = {
1769
+ var Je = {
1731
1770
  configIsRequired: "the configuration object is required",
1732
1771
  configType: "the configuration object should be an object",
1733
1772
  default: "an unknown error accured in `@monaco-editor/loader` package",
@@ -1741,333 +1780,335 @@ var Ye = {
1741
1780
 
1742
1781
  For more please check the link https://github.com/suren-atoyan/monaco-loader#config
1743
1782
  `
1744
- }, Le = xt(yt)(Ye), jt = {
1745
- config: gt
1746
- }, wt = function() {
1783
+ }, Le = bt(jt)(Je), wt = {
1784
+ config: vt
1785
+ }, Ct = function() {
1747
1786
  for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
1748
1787
  r[n] = arguments[n];
1749
- return function(s) {
1750
- return r.reduceRight(function(o, d) {
1751
- return d(o);
1752
- }, s);
1788
+ return function(o) {
1789
+ return r.reduceRight(function(a, m) {
1790
+ return m(a);
1791
+ }, o);
1753
1792
  };
1754
1793
  };
1755
- function Je(e, t) {
1794
+ function Be(e, t) {
1756
1795
  return Object.keys(t).forEach(function(r) {
1757
- t[r] instanceof Object && e[r] && Object.assign(t[r], Je(e[r], t[r]));
1796
+ t[r] instanceof Object && e[r] && Object.assign(t[r], Be(e[r], t[r]));
1758
1797
  }), _e(_e({}, e), t);
1759
1798
  }
1760
1799
  var Et = {
1761
1800
  type: "cancelation",
1762
1801
  msg: "operation is manually canceled"
1763
1802
  };
1764
- function ye(e) {
1765
- var t = !1, r = new Promise(function(n, s) {
1766
- e.then(function(o) {
1767
- return t ? s(Et) : n(o);
1768
- }), e.catch(s);
1803
+ function je(e) {
1804
+ var t = !1, r = new Promise(function(n, o) {
1805
+ e.then(function(a) {
1806
+ return t ? o(Et) : n(a);
1807
+ }), e.catch(o);
1769
1808
  });
1770
1809
  return r.cancel = function() {
1771
1810
  return t = !0;
1772
1811
  }, r;
1773
1812
  }
1774
- var Nt = ["monaco"], Ct = pt.create({
1775
- config: ht,
1813
+ var Nt = ["monaco"], Ot = ht.create({
1814
+ config: xt,
1776
1815
  isInitialized: !1,
1777
1816
  resolve: null,
1778
1817
  reject: null,
1779
1818
  monaco: null
1780
- }), Be = Ki(Ct, 2), se = Be[0], xe = Be[1];
1781
- function Ot(e) {
1782
- var t = jt.config(e), r = t.monaco, n = Bi(t, Nt);
1783
- xe(function(s) {
1819
+ }), Ge = Xi(Ot, 2), ae = Ge[0], be = Ge[1];
1820
+ function Tt(e) {
1821
+ var t = wt.config(e), r = t.monaco, n = Gi(t, Nt);
1822
+ be(function(o) {
1784
1823
  return {
1785
- config: Je(s.config, n),
1824
+ config: Be(o.config, n),
1786
1825
  monaco: r
1787
1826
  };
1788
1827
  });
1789
1828
  }
1790
- function Tt() {
1791
- var e = se(function(t) {
1792
- var r = t.monaco, n = t.isInitialized, s = t.resolve;
1829
+ function It() {
1830
+ var e = ae(function(t) {
1831
+ var r = t.monaco, n = t.isInitialized, o = t.resolve;
1793
1832
  return {
1794
1833
  monaco: r,
1795
1834
  isInitialized: n,
1796
- resolve: s
1835
+ resolve: o
1797
1836
  };
1798
1837
  });
1799
1838
  if (!e.isInitialized) {
1800
- if (xe({
1839
+ if (be({
1801
1840
  isInitialized: !0
1802
1841
  }), e.monaco)
1803
- return e.resolve(e.monaco), ye(je);
1842
+ return e.resolve(e.monaco), je(we);
1804
1843
  if (window.monaco && window.monaco.editor)
1805
- return Ge(window.monaco), e.resolve(window.monaco), ye(je);
1806
- wt(It, kt)(Rt);
1844
+ return Ke(window.monaco), e.resolve(window.monaco), je(we);
1845
+ Ct(St, Rt)(At);
1807
1846
  }
1808
- return ye(je);
1847
+ return je(we);
1809
1848
  }
1810
- function It(e) {
1849
+ function St(e) {
1811
1850
  return document.body.appendChild(e);
1812
1851
  }
1813
- function St(e) {
1852
+ function kt(e) {
1814
1853
  var t = document.createElement("script");
1815
1854
  return e && (t.src = e), t;
1816
1855
  }
1817
- function kt(e) {
1818
- var t = se(function(n) {
1819
- var s = n.config, o = n.reject;
1856
+ function Rt(e) {
1857
+ var t = ae(function(n) {
1858
+ var o = n.config, a = n.reject;
1820
1859
  return {
1821
- config: s,
1822
- reject: o
1860
+ config: o,
1861
+ reject: a
1823
1862
  };
1824
- }), r = St("".concat(t.config.paths.vs, "/loader.js"));
1863
+ }), r = kt("".concat(t.config.paths.vs, "/loader.js"));
1825
1864
  return r.onload = function() {
1826
1865
  return e();
1827
1866
  }, r.onerror = t.reject, r;
1828
1867
  }
1829
- function Rt() {
1830
- var e = se(function(r) {
1831
- var n = r.config, s = r.resolve, o = r.reject;
1868
+ function At() {
1869
+ var e = ae(function(r) {
1870
+ var n = r.config, o = r.resolve, a = r.reject;
1832
1871
  return {
1833
1872
  config: n,
1834
- resolve: s,
1835
- reject: o
1873
+ resolve: o,
1874
+ reject: a
1836
1875
  };
1837
1876
  }), t = window.require;
1838
1877
  t.config(e.config), t(["vs/editor/editor.main"], function(r) {
1839
1878
  var n = r.m || r;
1840
- Ge(n), e.resolve(n);
1879
+ Ke(n), e.resolve(n);
1841
1880
  }, function(r) {
1842
1881
  e.reject(r);
1843
1882
  });
1844
1883
  }
1845
- function Ge(e) {
1846
- se().monaco || xe({
1884
+ function Ke(e) {
1885
+ ae().monaco || be({
1847
1886
  monaco: e
1848
1887
  });
1849
1888
  }
1850
- function At() {
1851
- return se(function(e) {
1889
+ function $t() {
1890
+ return ae(function(e) {
1852
1891
  var t = e.monaco;
1853
1892
  return t;
1854
1893
  });
1855
1894
  }
1856
- var je = new Promise(function(e, t) {
1857
- return xe({
1895
+ var we = new Promise(function(e, t) {
1896
+ return be({
1858
1897
  resolve: e,
1859
1898
  reject: t
1860
1899
  });
1861
- }), Ke = {
1862
- config: Ot,
1863
- init: Tt,
1864
- __getMonacoInstance: At
1865
- }, Pt = { wrapper: { display: "flex", position: "relative", textAlign: "initial" }, fullWidth: { width: "100%" }, hide: { display: "none" } }, we = Pt, Mt = { container: { display: "flex", height: "100%", width: "100%", justifyContent: "center", alignItems: "center" } }, Ft = Mt;
1900
+ }), Xe = {
1901
+ config: Tt,
1902
+ init: It,
1903
+ __getMonacoInstance: $t
1904
+ }, Ft = { wrapper: { display: "flex", position: "relative", textAlign: "initial" }, fullWidth: { width: "100%" }, hide: { display: "none" } }, Ce = Ft, Pt = { container: { display: "flex", height: "100%", width: "100%", justifyContent: "center", alignItems: "center" } }, Mt = Pt;
1866
1905
  function _t({ children: e }) {
1867
- return l.createElement("div", { style: Ft.container }, e);
1906
+ return c.createElement("div", { style: Mt.container }, e);
1868
1907
  }
1869
1908
  var Dt = _t, qt = Dt;
1870
- function Lt({ width: e, height: t, isEditorReady: r, loading: n, _ref: s, className: o, wrapperProps: d }) {
1871
- return l.createElement("section", { style: { ...we.wrapper, width: e, height: t }, ...d }, !r && l.createElement(qt, null, n), l.createElement("div", { ref: s, style: { ...we.fullWidth, ...!r && we.hide }, className: o }));
1909
+ function Lt({ width: e, height: t, isEditorReady: r, loading: n, _ref: o, className: a, wrapperProps: m }) {
1910
+ return c.createElement("section", { style: { ...Ce.wrapper, width: e, height: t }, ...m }, !r && c.createElement(qt, null, n), c.createElement("div", { ref: o, style: { ...Ce.fullWidth, ...!r && Ce.hide }, className: a }));
1872
1911
  }
1873
- var $t = Lt, Xe = Ce($t);
1874
- function Ut(e) {
1912
+ var Ut = Lt, Qe = Oe(Ut);
1913
+ function zt(e) {
1875
1914
  J(e, []);
1876
1915
  }
1877
- var Qe = Ut;
1878
- function zt(e, t, r = !0) {
1879
- let n = U(!0);
1916
+ var Ze = zt;
1917
+ function Vt(e, t, r = !0) {
1918
+ let n = V(!0);
1880
1919
  J(n.current || !r ? () => {
1881
1920
  n.current = !1;
1882
1921
  } : e, t);
1883
1922
  }
1884
- var W = zt;
1885
- function te() {
1923
+ var H = Vt;
1924
+ function ne() {
1886
1925
  }
1887
- function Q(e, t, r, n) {
1888
- return Wt(e, n) || Vt(e, t, r, n);
1926
+ function Z(e, t, r, n) {
1927
+ return Wt(e, n) || Ht(e, t, r, n);
1889
1928
  }
1890
1929
  function Wt(e, t) {
1891
- return e.editor.getModel(Ze(e, t));
1930
+ return e.editor.getModel(ei(e, t));
1892
1931
  }
1893
- function Vt(e, t, r, n) {
1894
- return e.editor.createModel(t, r, n ? Ze(e, n) : void 0);
1932
+ function Ht(e, t, r, n) {
1933
+ return e.editor.createModel(t, r, n ? ei(e, n) : void 0);
1895
1934
  }
1896
- function Ze(e, t) {
1935
+ function ei(e, t) {
1897
1936
  return e.Uri.parse(t);
1898
1937
  }
1899
- function Ht({ original: e, modified: t, language: r, originalLanguage: n, modifiedLanguage: s, originalModelPath: o, modifiedModelPath: d, keepCurrentOriginalModel: m = !1, keepCurrentModifiedModel: c = !1, theme: u = "light", loading: h = "Loading...", options: g = {}, height: S = "100%", width: q = "100%", className: _, wrapperProps: j = {}, beforeMount: k = te, onMount: R = te }) {
1900
- let [w, A] = ue(!1), [T, x] = ue(!0), b = U(null), f = U(null), O = U(null), E = U(R), I = U(k), P = U(!1);
1901
- Qe(() => {
1902
- let N = Ke.init();
1903
- return N.then((F) => (f.current = F) && x(!1)).catch((F) => F?.type !== "cancelation" && console.error("Monaco initialization: error:", F)), () => b.current ? M() : N.cancel();
1904
- }), W(() => {
1905
- if (b.current && f.current) {
1906
- let N = b.current.getOriginalEditor(), F = Q(f.current, e || "", n || r || "text", o || "");
1907
- F !== N.getModel() && N.setModel(F);
1938
+ function Yt({ original: e, modified: t, language: r, originalLanguage: n, modifiedLanguage: o, originalModelPath: a, modifiedModelPath: m, keepCurrentOriginalModel: l = !1, keepCurrentModifiedModel: d = !1, theme: u = "light", loading: p = "Loading...", options: h = {}, height: N = "100%", width: M = "100%", className: W, wrapperProps: F = {}, beforeMount: E = ne, onMount: T = ne }) {
1939
+ let [y, R] = fe(!1), [A, b] = fe(!0), O = V(null), x = V(null), q = V(null), P = V(T), I = V(E), w = V(!1);
1940
+ Ze(() => {
1941
+ let v = Xe.init();
1942
+ return v.then((k) => (x.current = k) && b(!1)).catch((k) => k?.type !== "cancelation" && console.error("Monaco initialization: error:", k)), () => O.current ? g() : v.cancel();
1943
+ }), H(() => {
1944
+ if (O.current && x.current) {
1945
+ let v = O.current.getOriginalEditor(), k = Z(x.current, e || "", n || r || "text", a || "");
1946
+ k !== v.getModel() && v.setModel(k);
1908
1947
  }
1909
- }, [o], w), W(() => {
1910
- if (b.current && f.current) {
1911
- let N = b.current.getModifiedEditor(), F = Q(f.current, t || "", s || r || "text", d || "");
1912
- F !== N.getModel() && N.setModel(F);
1948
+ }, [a], y), H(() => {
1949
+ if (O.current && x.current) {
1950
+ let v = O.current.getModifiedEditor(), k = Z(x.current, t || "", o || r || "text", m || "");
1951
+ k !== v.getModel() && v.setModel(k);
1913
1952
  }
1914
- }, [d], w), W(() => {
1915
- let N = b.current.getModifiedEditor();
1916
- N.getOption(f.current.editor.EditorOption.readOnly) ? N.setValue(t || "") : t !== N.getValue() && (N.executeEdits("", [{ range: N.getModel().getFullModelRange(), text: t || "", forceMoveMarkers: !0 }]), N.pushUndoStop());
1917
- }, [t], w), W(() => {
1918
- b.current?.getModel()?.original.setValue(e || "");
1919
- }, [e], w), W(() => {
1920
- let { original: N, modified: F } = b.current.getModel();
1921
- f.current.editor.setModelLanguage(N, n || r || "text"), f.current.editor.setModelLanguage(F, s || r || "text");
1922
- }, [r, n, s], w), W(() => {
1923
- f.current?.editor.setTheme(u);
1924
- }, [u], w), W(() => {
1925
- b.current?.updateOptions(g);
1926
- }, [g], w);
1927
- let p = de(() => {
1928
- if (!f.current) return;
1929
- I.current(f.current);
1930
- let N = Q(f.current, e || "", n || r || "text", o || ""), F = Q(f.current, t || "", s || r || "text", d || "");
1931
- b.current?.setModel({ original: N, modified: F });
1932
- }, [r, t, s, e, n, o, d]), C = de(() => {
1933
- !P.current && O.current && (b.current = f.current.editor.createDiffEditor(O.current, { automaticLayout: !0, ...g }), p(), f.current?.editor.setTheme(u), A(!0), P.current = !0);
1934
- }, [g, u, p]);
1953
+ }, [m], y), H(() => {
1954
+ let v = O.current.getModifiedEditor();
1955
+ v.getOption(x.current.editor.EditorOption.readOnly) ? v.setValue(t || "") : t !== v.getValue() && (v.executeEdits("", [{ range: v.getModel().getFullModelRange(), text: t || "", forceMoveMarkers: !0 }]), v.pushUndoStop());
1956
+ }, [t], y), H(() => {
1957
+ O.current?.getModel()?.original.setValue(e || "");
1958
+ }, [e], y), H(() => {
1959
+ let { original: v, modified: k } = O.current.getModel();
1960
+ x.current.editor.setModelLanguage(v, n || r || "text"), x.current.editor.setModelLanguage(k, o || r || "text");
1961
+ }, [r, n, o], y), H(() => {
1962
+ x.current?.editor.setTheme(u);
1963
+ }, [u], y), H(() => {
1964
+ O.current?.updateOptions(h);
1965
+ }, [h], y);
1966
+ let S = ue(() => {
1967
+ if (!x.current) return;
1968
+ I.current(x.current);
1969
+ let v = Z(x.current, e || "", n || r || "text", a || ""), k = Z(x.current, t || "", o || r || "text", m || "");
1970
+ O.current?.setModel({ original: v, modified: k });
1971
+ }, [r, t, o, e, n, a, m]), f = ue(() => {
1972
+ !w.current && q.current && (O.current = x.current.editor.createDiffEditor(q.current, { automaticLayout: !0, ...h }), S(), x.current?.editor.setTheme(u), R(!0), w.current = !0);
1973
+ }, [h, u, S]);
1935
1974
  J(() => {
1936
- w && E.current(b.current, f.current);
1937
- }, [w]), J(() => {
1938
- !T && !w && C();
1939
- }, [T, w, C]);
1940
- function M() {
1941
- let N = b.current?.getModel();
1942
- m || N?.original?.dispose(), c || N?.modified?.dispose(), b.current?.dispose();
1975
+ y && P.current(O.current, x.current);
1976
+ }, [y]), J(() => {
1977
+ !A && !y && f();
1978
+ }, [A, y, f]);
1979
+ function g() {
1980
+ let v = O.current?.getModel();
1981
+ l || v?.original?.dispose(), d || v?.modified?.dispose(), O.current?.dispose();
1943
1982
  }
1944
- return l.createElement(Xe, { width: q, height: S, isEditorReady: w, loading: h, _ref: O, className: _, wrapperProps: j });
1983
+ return c.createElement(Qe, { width: M, height: N, isEditorReady: y, loading: p, _ref: q, className: W, wrapperProps: F });
1945
1984
  }
1946
- var Yt = Ht;
1947
- Ce(Yt);
1948
- function Jt(e) {
1949
- let t = U();
1985
+ var Jt = Yt;
1986
+ Oe(Jt);
1987
+ function Bt(e) {
1988
+ let t = V();
1950
1989
  return J(() => {
1951
1990
  t.current = e;
1952
1991
  }, [e]), t.current;
1953
1992
  }
1954
- var Bt = Jt, ce = /* @__PURE__ */ new Map();
1955
- function Gt({ defaultValue: e, defaultLanguage: t, defaultPath: r, value: n, language: s, path: o, theme: d = "light", line: m, loading: c = "Loading...", options: u = {}, overrideServices: h = {}, saveViewState: g = !0, keepCurrentModel: S = !1, width: q = "100%", height: _ = "100%", className: j, wrapperProps: k = {}, beforeMount: R = te, onMount: w = te, onChange: A, onValidate: T = te }) {
1956
- let [x, b] = ue(!1), [f, O] = ue(!0), E = U(null), I = U(null), P = U(null), p = U(w), C = U(R), M = U(), N = U(n), F = Bt(o), $ = U(!1), z = U(!1);
1957
- Qe(() => {
1958
- let a = Ke.init();
1959
- return a.then((v) => (E.current = v) && O(!1)).catch((v) => v?.type !== "cancelation" && console.error("Monaco initialization: error:", v)), () => I.current ? Y() : a.cancel();
1960
- }), W(() => {
1961
- let a = Q(E.current, e || n || "", t || s || "", o || r || "");
1962
- a !== I.current?.getModel() && (g && ce.set(F, I.current?.saveViewState()), I.current?.setModel(a), g && I.current?.restoreViewState(ce.get(o)));
1963
- }, [o], x), W(() => {
1993
+ var Gt = Bt, de = /* @__PURE__ */ new Map();
1994
+ function Kt({ defaultValue: e, defaultLanguage: t, defaultPath: r, value: n, language: o, path: a, theme: m = "light", line: l, loading: d = "Loading...", options: u = {}, overrideServices: p = {}, saveViewState: h = !0, keepCurrentModel: N = !1, width: M = "100%", height: W = "100%", className: F, wrapperProps: E = {}, beforeMount: T = ne, onMount: y = ne, onChange: R, onValidate: A = ne }) {
1995
+ let [b, O] = fe(!1), [x, q] = fe(!0), P = V(null), I = V(null), w = V(null), S = V(y), f = V(T), g = V(), v = V(n), k = Gt(a), _ = V(!1), D = V(!1);
1996
+ Ze(() => {
1997
+ let s = Xe.init();
1998
+ return s.then((C) => (P.current = C) && q(!1)).catch((C) => C?.type !== "cancelation" && console.error("Monaco initialization: error:", C)), () => I.current ? z() : s.cancel();
1999
+ }), H(() => {
2000
+ let s = Z(P.current, e || n || "", t || o || "", a || r || "");
2001
+ s !== I.current?.getModel() && (h && de.set(k, I.current?.saveViewState()), I.current?.setModel(s), h && I.current?.restoreViewState(de.get(a)));
2002
+ }, [a], b), H(() => {
1964
2003
  I.current?.updateOptions(u);
1965
- }, [u], x), W(() => {
1966
- !I.current || n === void 0 || (I.current.getOption(E.current.editor.EditorOption.readOnly) ? I.current.setValue(n) : n !== I.current.getValue() && (z.current = !0, I.current.executeEdits("", [{ range: I.current.getModel().getFullModelRange(), text: n, forceMoveMarkers: !0 }]), I.current.pushUndoStop(), z.current = !1));
1967
- }, [n], x), W(() => {
1968
- let a = I.current?.getModel();
1969
- a && s && E.current?.editor.setModelLanguage(a, s);
1970
- }, [s], x), W(() => {
1971
- m !== void 0 && I.current?.revealLine(m);
1972
- }, [m], x), W(() => {
1973
- E.current?.editor.setTheme(d);
1974
- }, [d], x);
1975
- let H = de(() => {
1976
- if (!(!P.current || !E.current) && !$.current) {
1977
- C.current(E.current);
1978
- let a = o || r, v = Q(E.current, n || e || "", t || s || "", a || "");
1979
- I.current = E.current?.editor.create(P.current, { model: v, automaticLayout: !0, ...u }, h), g && I.current.restoreViewState(ce.get(a)), E.current.editor.setTheme(d), m !== void 0 && I.current.revealLine(m), b(!0), $.current = !0;
2004
+ }, [u], b), H(() => {
2005
+ !I.current || n === void 0 || (I.current.getOption(P.current.editor.EditorOption.readOnly) ? I.current.setValue(n) : n !== I.current.getValue() && (D.current = !0, I.current.executeEdits("", [{ range: I.current.getModel().getFullModelRange(), text: n, forceMoveMarkers: !0 }]), I.current.pushUndoStop(), D.current = !1));
2006
+ }, [n], b), H(() => {
2007
+ let s = I.current?.getModel();
2008
+ s && o && P.current?.editor.setModelLanguage(s, o);
2009
+ }, [o], b), H(() => {
2010
+ l !== void 0 && I.current?.revealLine(l);
2011
+ }, [l], b), H(() => {
2012
+ P.current?.editor.setTheme(m);
2013
+ }, [m], b);
2014
+ let L = ue(() => {
2015
+ if (!(!w.current || !P.current) && !_.current) {
2016
+ f.current(P.current);
2017
+ let s = a || r, C = Z(P.current, n || e || "", t || o || "", s || "");
2018
+ I.current = P.current?.editor.create(w.current, { model: C, automaticLayout: !0, ...u }, p), h && I.current.restoreViewState(de.get(s)), P.current.editor.setTheme(m), l !== void 0 && I.current.revealLine(l), O(!0), _.current = !0;
1980
2019
  }
1981
- }, [e, t, r, n, s, o, u, h, g, d, m]);
2020
+ }, [e, t, r, n, o, a, u, p, h, m, l]);
1982
2021
  J(() => {
1983
- x && p.current(I.current, E.current);
1984
- }, [x]), J(() => {
1985
- !f && !x && H();
1986
- }, [f, x, H]), N.current = n, J(() => {
1987
- x && A && (M.current?.dispose(), M.current = I.current?.onDidChangeModelContent((a) => {
1988
- z.current || A(I.current.getValue(), a);
2022
+ b && S.current(I.current, P.current);
2023
+ }, [b]), J(() => {
2024
+ !x && !b && L();
2025
+ }, [x, b, L]), v.current = n, J(() => {
2026
+ b && R && (g.current?.dispose(), g.current = I.current?.onDidChangeModelContent((s) => {
2027
+ D.current || R(I.current.getValue(), s);
1989
2028
  }));
1990
- }, [x, A]), J(() => {
1991
- if (x) {
1992
- let a = E.current.editor.onDidChangeMarkers((v) => {
1993
- let y = I.current.getModel()?.uri;
1994
- if (y && v.find((D) => D.path === y.path)) {
1995
- let D = E.current.editor.getModelMarkers({ resource: y });
1996
- T?.(D);
2029
+ }, [b, R]), J(() => {
2030
+ if (b) {
2031
+ let s = P.current.editor.onDidChangeMarkers((C) => {
2032
+ let $ = I.current.getModel()?.uri;
2033
+ if ($ && C.find((j) => j.path === $.path)) {
2034
+ let j = P.current.editor.getModelMarkers({ resource: $ });
2035
+ A?.(j);
1997
2036
  }
1998
2037
  });
1999
2038
  return () => {
2000
- a?.dispose();
2039
+ s?.dispose();
2001
2040
  };
2002
2041
  }
2003
2042
  return () => {
2004
2043
  };
2005
- }, [x, T]);
2006
- function Y() {
2007
- M.current?.dispose(), S ? g && ce.set(o, I.current.saveViewState()) : I.current.getModel()?.dispose(), I.current.dispose();
2044
+ }, [b, A]);
2045
+ function z() {
2046
+ g.current?.dispose(), N ? h && de.set(a, I.current.saveViewState()) : I.current.getModel()?.dispose(), I.current.dispose();
2008
2047
  }
2009
- return l.createElement(Xe, { width: q, height: _, isEditorReady: x, loading: c, _ref: P, className: j, wrapperProps: k });
2010
- }
2011
- var Kt = Gt, Xt = Ce(Kt), Qt = Xt;
2012
- function Zt() {
2013
- const e = $e(), t = V((f) => f.replaceAll), r = B(), { showAlert: n } = Ue(), s = l.useRef(null), o = l.useRef(""), d = l.useRef(null), m = l.useRef(!1), [c, u] = l.useState("yaml"), [h, g] = l.useState(!1);
2014
- l.useEffect(() => {
2015
- const f = document.querySelector(".qb-editor-root");
2016
- if (!f) return;
2017
- const O = () => {
2018
- g(f.classList.contains("dark"));
2048
+ return c.createElement(Qe, { width: M, height: W, isEditorReady: b, loading: d, _ref: w, className: F, wrapperProps: E });
2049
+ }
2050
+ var Xt = Kt, Qt = Oe(Xt), Zt = Qt;
2051
+ function er() {
2052
+ const e = Ue(), t = Y((w) => w.replaceAll), r = B(), { showAlert: n } = ze(), o = c.useRef(null), a = c.useRef(""), m = c.useRef(null), l = c.useRef(!1), d = c.useRef(t), u = c.useRef(r), p = c.useRef(e), [h, N] = c.useState("yaml"), M = c.useRef(h), [W, F] = c.useState(!1);
2053
+ c.useEffect(() => {
2054
+ const w = document.querySelector(".qb-editor-root");
2055
+ if (!w) return;
2056
+ const S = () => {
2057
+ F(w.classList.contains("dark"));
2019
2058
  };
2020
- O();
2021
- const E = new MutationObserver(O);
2022
- return E.observe(f, { attributes: !0, attributeFilter: ["class"] }), () => E.disconnect();
2059
+ S();
2060
+ const f = new MutationObserver(S);
2061
+ return f.observe(w, { attributes: !0, attributeFilter: ["class"] }), () => f.disconnect();
2023
2062
  }, []);
2024
- const [S, q] = l.useState(640), [_, j] = l.useState(() => {
2063
+ const [E, T] = c.useState(640), [y, R] = c.useState(() => {
2025
2064
  try {
2026
- return ae.dump(e, { indent: 2, lineWidth: -1 });
2065
+ return ee.dump(e, { indent: 2, lineWidth: -1 });
2027
2066
  } catch {
2028
2067
  return "";
2029
2068
  }
2030
- }), [k, R] = l.useState("");
2031
- l.useEffect(() => {
2069
+ }), [A, b] = c.useState("");
2070
+ c.useEffect(() => {
2032
2071
  r.setCodeEditorHasError(!1);
2033
- }, []);
2034
- const w = l.useCallback((f) => c === "json" ? JSON.parse(f) : ae.load(f), [c]), A = l.useCallback((f) => c === "json" ? JSON.stringify(f, null, 2) : ae.dump(f, { indent: 2, lineWidth: -1 }), [c]);
2035
- l.useEffect(() => {
2036
- const f = () => {
2037
- if (s.current) {
2038
- const O = s.current.getBoundingClientRect().top, E = window.innerHeight - O - 20;
2039
- q(Math.max(400, E));
2072
+ }, []), c.useEffect(() => {
2073
+ d.current = t, u.current = r, p.current = e, M.current = h;
2074
+ });
2075
+ const O = c.useCallback((w) => h === "json" ? JSON.parse(w) : ee.load(w), [h]), x = c.useCallback((w) => h === "json" ? JSON.stringify(w, null, 2) : ee.dump(w, { indent: 2, lineWidth: -1 }), [h]);
2076
+ c.useEffect(() => {
2077
+ const w = () => {
2078
+ if (o.current) {
2079
+ const S = o.current.getBoundingClientRect().top, f = window.innerHeight - S - 20;
2080
+ T(Math.max(400, f));
2040
2081
  }
2041
2082
  };
2042
- return f(), window.addEventListener("resize", f), () => window.removeEventListener("resize", f);
2043
- }, []), l.useEffect(() => {
2044
- if (!m.current)
2083
+ return w(), window.addEventListener("resize", w), () => window.removeEventListener("resize", w);
2084
+ }, []), c.useEffect(() => {
2085
+ if (!l.current)
2045
2086
  try {
2046
- const f = A(e);
2047
- j(f), o.current = f, R(""), r.setCodeEditorHasError(!1);
2048
- } catch (f) {
2049
- R(`Failed to serialize: ${f.message}`), r.setCodeEditorHasError(!0);
2087
+ const w = x(e);
2088
+ R(w), a.current = w, b(""), r.setCodeEditorHasError(!1);
2089
+ } catch (w) {
2090
+ b(`Failed to serialize: ${w.message}`), r.setCodeEditorHasError(!0);
2050
2091
  }
2051
- }, [e, A, r]);
2052
- const T = (f) => {
2053
- j(f || ""), o.current = f || "", m.current = !0;
2092
+ }, [e, x, r]);
2093
+ const q = (w) => {
2094
+ R(w || ""), a.current = w || "", l.current = !0;
2054
2095
  try {
2055
- const O = w(f || "{}");
2056
- if (!O || typeof O != "object")
2096
+ const S = O(w || "{}");
2097
+ if (!S || typeof S != "object")
2057
2098
  throw new Error("Invalid form data: must be an object");
2058
- R(""), r.setCodeEditorHasError(!1);
2059
- } catch (O) {
2060
- const E = `Invalid ${c.toUpperCase()}: ${O.message}`;
2061
- R(E), r.setCodeEditorHasError(!0);
2099
+ b(""), r.setCodeEditorHasError(!1);
2100
+ } catch (S) {
2101
+ const f = `Invalid ${h.toUpperCase()}: ${S.message}`;
2102
+ b(f), r.setCodeEditorHasError(!0);
2062
2103
  }
2063
- }, x = (f) => {
2064
- d.current = f, f.onDidPaste((O) => {
2065
- const E = _, I = f.getModel().getValue();
2104
+ }, P = (w) => {
2105
+ m.current = w, w.onDidPaste((S) => {
2106
+ const f = y, g = w.getModel().getValue();
2066
2107
  try {
2067
- const P = w(I);
2068
- if (P && typeof P == "object") {
2069
- const { schemaType: p } = fe(P);
2070
- p === "surveyjs" && n(
2108
+ const v = O(g);
2109
+ if (v && typeof v == "object") {
2110
+ const { schemaType: k } = pe(v);
2111
+ k === "surveyjs" && n(
2071
2112
  `This SurveyJS schema will be converted to MIE Forms format.
2072
2113
 
2073
2114
  Do you want to proceed with the conversion?`,
@@ -2076,20 +2117,20 @@ Do you want to proceed with the conversion?`,
2076
2117
  confirmText: "Yes, Convert",
2077
2118
  cancelText: "No, Cancel Paste",
2078
2119
  onConfirm: () => {
2079
- const { fields: C, conversionReport: M } = pe(P, p), N = {
2080
- schemaType: P.schemaType || ve,
2081
- ...M?.surveyMetadata || {},
2082
- fields: C
2120
+ const { fields: _, conversionReport: D } = he(v, k), L = {
2121
+ schemaType: v.schemaType || ye,
2122
+ ...D?.surveyMetadata || {},
2123
+ fields: _
2083
2124
  };
2084
- t(N);
2085
- const F = A(N);
2086
- j(F), o.current = F, f.setValue(F), R(""), m.current = !1, M && (r.setConversionReport(M), setTimeout(() => {
2087
- const $ = M?.unsupportedFields?.length || 0;
2125
+ t(L);
2126
+ const z = x(L);
2127
+ R(z), a.current = z, w.setValue(z), b(""), l.current = !1, D && (r.setConversionReport(D), setTimeout(() => {
2128
+ const s = D?.unsupportedFields?.length || 0;
2088
2129
  n(
2089
2130
  `This schema has been converted to MIE Forms format.
2090
2131
 
2091
- Converted: ${M?.convertedFields || 0} field(s)
2092
- Unsupported: ${$} field(s)${$ > 0 ? " ⚠️" : ""}
2132
+ Converted: ${D?.convertedFields || 0} field(s)
2133
+ Unsupported: ${s} field(s)${s > 0 ? " ⚠️" : ""}
2093
2134
 
2094
2135
  Please use MIE Forms schema inside of code editor for the best experience in the future.`,
2095
2136
  { title: "ℹ️ SurveyJS Schema Detected" }
@@ -2097,7 +2138,7 @@ Please use MIE Forms schema inside of code editor for the best experience in the
2097
2138
  }, 100));
2098
2139
  },
2099
2140
  onCancel: () => {
2100
- f.setValue(E), j(E), o.current = E;
2141
+ w.setValue(f), R(f), a.current = f;
2101
2142
  }
2102
2143
  }
2103
2144
  );
@@ -2105,90 +2146,92 @@ Please use MIE Forms schema inside of code editor for the best experience in the
2105
2146
  } catch {
2106
2147
  }
2107
2148
  });
2108
- }, b = (f) => {
2149
+ }, I = (w) => {
2109
2150
  try {
2110
- const O = w(_), E = f === "json" ? JSON.stringify(O, null, 2) : ae.dump(O, { indent: 2, lineWidth: -1 });
2111
- j(E), o.current = E, u(f), R(""), r.setCodeEditorHasError(!1);
2112
- } catch (O) {
2113
- R(`Cannot convert: ${O.message}`), r.setCodeEditorHasError(!0);
2151
+ const S = O(y), f = w === "json" ? JSON.stringify(S, null, 2) : ee.dump(S, { indent: 2, lineWidth: -1 });
2152
+ R(f), a.current = f, N(w), b(""), r.setCodeEditorHasError(!1);
2153
+ } catch (S) {
2154
+ b(`Cannot convert: ${S.message}`), r.setCodeEditorHasError(!0);
2114
2155
  }
2115
2156
  };
2116
- return l.useEffect(() => () => {
2117
- const f = o.current?.trim();
2118
- if (!f) {
2119
- t({ schemaType: ve, fields: [] }), m.current = !1;
2157
+ return c.useEffect(() => () => {
2158
+ const w = a.current?.trim(), S = M.current, f = p.current, g = d.current, v = u.current, k = (_) => S === "json" ? JSON.parse(_) : ee.load(_);
2159
+ if (!w) {
2160
+ g({ schemaType: ye, fields: [] }), l.current = !1;
2120
2161
  return;
2121
2162
  }
2122
2163
  try {
2123
- const O = w(f);
2124
- if (!O || typeof O != "object" || JSON.stringify(e) === JSON.stringify(O)) return;
2125
- const { schemaType: E } = fe(O), { fields: I, conversionReport: P } = pe(O, E), p = {
2126
- schemaType: O.schemaType || ve,
2127
- ...P?.surveyMetadata || {},
2128
- fields: I
2164
+ const _ = k(w);
2165
+ if (!_ || typeof _ != "object" || JSON.stringify(f) === JSON.stringify(_)) return;
2166
+ const { schemaType: D } = pe(_), { fields: L, conversionReport: z } = he(_, D), s = {
2167
+ schemaType: _.schemaType || ye,
2168
+ ...z?.surveyMetadata || {},
2169
+ fields: L
2129
2170
  };
2130
- P && r.setConversionReport(P), t(p), r.setCodeEditorHasError(!1), m.current = !1;
2171
+ z && v.setConversionReport(z), g(s), v.setCodeEditorHasError(!1), l.current = !1;
2131
2172
  } catch {
2132
2173
  }
2133
- }, [w, t, r, e]), /* @__PURE__ */ i.jsxs("div", { ref: s, className: "code-editor-container mie:flex mie:flex-col mie:bg-miebackground mie:max-w-7xl mie:w-full", style: { height: `${S}px` }, children: [
2174
+ }, []), /* @__PURE__ */ i.jsxs("div", { ref: o, className: "code-editor-container mie:flex mie:flex-col mie:bg-miebackground mie:max-w-7xl mie:w-full", style: { height: `${E}px` }, children: [
2134
2175
  /* @__PURE__ */ i.jsxs("div", { className: "code-editor-header mie:flex mie:items-center mie:justify-between mie:gap-3 mie:p-4 mie:bg-miesurface mie:border-b mie:border-mieborder", children: [
2135
2176
  /* @__PURE__ */ i.jsx("div", { className: "mie:flex mie:items-center mie:gap-2", children: /* @__PURE__ */ i.jsxs("div", { className: "mie:flex mie:gap-1 mie:rounded-lg mie:border mie:border-mieborder mie:bg-miebackground mie:p-1", children: [
2136
2177
  /* @__PURE__ */ i.jsx(
2137
2178
  "button",
2138
2179
  {
2139
- onClick: () => b("yaml"),
2140
- className: `mie:px-3 mie:py-1 mie:rounded-md mie:text-sm mie:font-medium mie:transition-colors mie:border-0 mie:outline-none mie:focus:outline-none ${c === "yaml" ? "mie:bg-mieprimary mie:text-mietextsecondary mie:shadow-sm" : "mie:bg-transparent mie:text-mietextmuted mie:hover:text-mietext mie:hover:bg-miesurface"}`,
2180
+ onClick: () => I("yaml"),
2181
+ className: `mie:px-3 mie:py-1 mie:rounded-md mie:text-sm mie:font-medium mie:transition-colors mie:border-0 mie:outline-none mie:focus:outline-none ${h === "yaml" ? "mie:bg-mieprimary mie:text-mietextsecondary mie:shadow-sm" : "mie:bg-transparent mie:text-mietextmuted mie:hover:text-mietext mie:hover:bg-miesurface"}`,
2141
2182
  children: "YAML"
2142
2183
  }
2143
2184
  ),
2144
2185
  /* @__PURE__ */ i.jsx(
2145
2186
  "button",
2146
2187
  {
2147
- onClick: () => b("json"),
2148
- className: `mie:px-3 mie:py-1 mie:rounded-md mie:text-sm mie:font-medium mie:transition-colors mie:border-0 mie:outline-none mie:focus:outline-none ${c === "json" ? "mie:bg-mieprimary mie:text-mietextsecondary mie:shadow-sm" : "mie:bg-transparent mie:text-mietextmuted mie:hover:text-mietext mie:hover:bg-miesurface"}`,
2188
+ onClick: () => I("json"),
2189
+ className: `mie:px-3 mie:py-1 mie:rounded-md mie:text-sm mie:font-medium mie:transition-colors mie:border-0 mie:outline-none mie:focus:outline-none ${h === "json" ? "mie:bg-mieprimary mie:text-mietextsecondary mie:shadow-sm" : "mie:bg-transparent mie:text-mietextmuted mie:hover:text-mietext mie:hover:bg-miesurface"}`,
2149
2190
  children: "JSON"
2150
2191
  }
2151
2192
  )
2152
2193
  ] }) }),
2153
2194
  /* @__PURE__ */ i.jsxs("div", { className: "mie:flex mie:items-center mie:gap-2", children: [
2154
2195
  /* @__PURE__ */ i.jsx("div", { className: "mie:text-xs mie:text-mietextmuted mie:px-3 mie:py-1", children: "Auto-saves when switching tabs" }),
2155
- k && /* @__PURE__ */ i.jsx("div", { className: "mie:text-xs mie:text-miedanger mie:bg-miedanger/10 mie:px-3 mie:py-1 mie:rounded-lg", children: k })
2196
+ A && /* @__PURE__ */ i.jsx("div", { className: "mie:text-xs mie:text-miedanger mie:bg-miedanger/10 mie:px-3 mie:py-1 mie:rounded-lg", children: A })
2156
2197
  ] })
2157
2198
  ] }),
2158
2199
  /* @__PURE__ */ i.jsx("div", { className: "code-editor-content mie:flex-1 mie:overflow-hidden", children: /* @__PURE__ */ i.jsx(
2159
- Qt,
2200
+ Zt,
2160
2201
  {
2161
2202
  height: "100%",
2162
- language: c,
2163
- value: _,
2164
- onChange: T,
2165
- onMount: x,
2166
- theme: h ? "vs-dark" : "light",
2203
+ language: h,
2204
+ value: y,
2205
+ onChange: q,
2206
+ onMount: P,
2207
+ theme: W ? "vs-dark" : "light",
2167
2208
  options: {
2168
2209
  minimap: { enabled: !1 },
2169
2210
  fontSize: 13,
2170
2211
  lineHeight: 1.5,
2171
2212
  wordWrap: "on",
2172
- formatOnPaste: !0,
2173
- formatOnType: !0,
2213
+ formatOnPaste: !1,
2214
+ formatOnType: !1,
2174
2215
  tabSize: 2,
2175
2216
  automaticLayout: !0,
2176
2217
  scrollBeyondLastLine: !1,
2177
2218
  padding: { top: 16 },
2178
- contextmenu: !0
2219
+ contextmenu: !0,
2220
+ accessibilitySupport: "auto",
2221
+ ariaLabel: "Code editor for form schema"
2179
2222
  }
2180
2223
  }
2181
2224
  ) })
2182
2225
  ] });
2183
2226
  }
2184
- function er({ selectedField: e }) {
2185
- const t = B(), [r, n] = l.useState(!1), s = t.state.isPreview, o = t.state.isCodeEditor, d = t.state.isEditModalOpen, m = t.state.panelResetKey, c = !s;
2227
+ function ir({ selectedField: e }) {
2228
+ const t = B(), [r, n] = c.useState(!1), o = t.state.isPreview, a = t.state.isCodeEditor, m = t.state.isEditModalOpen, l = t.state.panelResetKey, d = !o;
2186
2229
  return /* @__PURE__ */ i.jsxs("div", { className: "layout-container mie:w-full mie:h-fit mie:rounded-lg mie:mt-3", children: [
2187
- o ? /* @__PURE__ */ i.jsx("div", { className: "mie:border mie:border-mieborder mie:rounded-lg", children: /* @__PURE__ */ i.jsx(Zt, {}) }) : /* @__PURE__ */ i.jsxs("div", { className: "layout-grid mie:flex mie:lg:gap-3 mie:h-full", children: [
2188
- c && /* @__PURE__ */ i.jsx("div", { className: "layout-tool-panel mie:hidden mie:lg:block mie:lg:w-72", children: /* @__PURE__ */ i.jsx(ke, {}) }),
2189
- /* @__PURE__ */ i.jsx("div", { className: "layout-main-content mie:flex-1 mie:min-w-0", children: /* @__PURE__ */ i.jsx(Ui, {}) }),
2190
- c && /* @__PURE__ */ i.jsx("div", { className: "layout-edit-panel mie:hidden mie:lg:block mie:lg:w-90 mie:md:w-80", children: /* @__PURE__ */ i.jsx(Pe, {}, m) }),
2191
- c && /* @__PURE__ */ i.jsx("div", { className: "layout-mobile-modal mie:lg:hidden", children: d && e && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
2230
+ a ? /* @__PURE__ */ i.jsx("div", { className: "mie:border mie:border-mieborder mie:rounded-lg", children: /* @__PURE__ */ i.jsx(er, {}) }) : /* @__PURE__ */ i.jsxs("div", { className: "layout-grid mie:flex mie:lg:gap-3 mie:h-full", children: [
2231
+ d && /* @__PURE__ */ i.jsx("div", { className: "layout-tool-panel mie:hidden mie:lg:block mie:lg:w-72", children: /* @__PURE__ */ i.jsx(Re, {}) }),
2232
+ /* @__PURE__ */ i.jsx("div", { className: "layout-main-content mie:flex-1 mie:min-w-0", children: /* @__PURE__ */ i.jsx(zi, {}) }),
2233
+ d && /* @__PURE__ */ i.jsx("div", { className: "layout-edit-panel mie:hidden mie:lg:block mie:lg:w-90 mie:md:w-80", children: /* @__PURE__ */ i.jsx(Fe, {}, l) }),
2234
+ d && /* @__PURE__ */ i.jsx("div", { className: "layout-mobile-modal mie:lg:hidden", children: m && e && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
2192
2235
  /* @__PURE__ */ i.jsx(
2193
2236
  "div",
2194
2237
  {
@@ -2196,10 +2239,10 @@ function er({ selectedField: e }) {
2196
2239
  onClick: () => t.modal.set(!1)
2197
2240
  }
2198
2241
  ),
2199
- /* @__PURE__ */ i.jsx("div", { className: "mie:fixed mie:bottom-0 mie:left-0 mie:right-0 mie:z-50 mie:bg-miesurface mie:rounded-t-2xl mie:shadow-2xl mie:max-h-[60vh] mie:overflow-y-auto mie:custom-scrollbar mie:lg:hidden", children: /* @__PURE__ */ i.jsx(Pe, { isMobileModal: !0 }, m) })
2242
+ /* @__PURE__ */ i.jsx("div", { className: "mie:fixed mie:bottom-0 mie:left-0 mie:right-0 mie:z-50 mie:bg-miesurface mie:rounded-t-2xl mie:shadow-2xl mie:max-h-[60vh] mie:overflow-y-auto mie:custom-scrollbar mie:lg:hidden", children: /* @__PURE__ */ i.jsx(Fe, { isMobileModal: !0 }, l) })
2200
2243
  ] }) })
2201
2244
  ] }),
2202
- c && !o && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
2245
+ d && !a && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
2203
2246
  /* @__PURE__ */ i.jsx(
2204
2247
  "button",
2205
2248
  {
@@ -2217,70 +2260,70 @@ function er({ selectedField: e }) {
2217
2260
  onClick: () => n(!1)
2218
2261
  }
2219
2262
  ),
2220
- /* @__PURE__ */ i.jsx("div", { className: "mie:fixed mie:bottom-0 mie:left-0 mie:right-0 mie:z-50 mie:bg-miesurface mie:rounded-t-2xl mie:shadow-2xl mie:max-h-[60vh] mie:overflow-y-auto mie:custom-scrollbar mie:lg:hidden", children: /* @__PURE__ */ i.jsx(ke, {}) })
2263
+ /* @__PURE__ */ i.jsx("div", { className: "mie:fixed mie:bottom-0 mie:left-0 mie:right-0 mie:z-50 mie:bg-miesurface mie:rounded-t-2xl mie:shadow-2xl mie:max-h-[60vh] mie:overflow-y-auto mie:custom-scrollbar mie:lg:hidden", children: /* @__PURE__ */ i.jsx(Re, {}) })
2221
2264
  ] })
2222
2265
  ] })
2223
2266
  ] });
2224
2267
  }
2225
- function ir({
2268
+ function tr({
2226
2269
  initialFormData: e,
2227
2270
  schemaType: t,
2228
2271
  onChange: r,
2229
2272
  className: n = "",
2230
- showHeader: s = !0,
2231
- startInPreview: o = !1,
2232
- hideUnsupportedFields: d = !1,
2233
- theme: m = "light"
2273
+ showHeader: o = !0,
2274
+ startInPreview: a = !1,
2275
+ hideUnsupportedFields: m = !1,
2276
+ theme: l = "light"
2234
2277
  }) {
2235
- const [c, u] = l.useState("json"), h = B(), g = l.useRef(!1), S = l.useContext(Oe);
2236
- l.useEffect(() => {
2237
- if (!(g.current || !S)) {
2278
+ const [d, u] = c.useState("json"), p = B(), h = c.useRef(!1), N = c.useContext(Te);
2279
+ c.useEffect(() => {
2280
+ if (!(h.current || !N)) {
2238
2281
  if (e)
2239
2282
  try {
2240
- const { data: j, schemaType: k } = fe(e, t), R = pe(j, k);
2241
- R.conversionReport && h.setConversionReport(R.conversionReport);
2242
- const w = {
2243
- schemaType: k === "surveyjs" ? "mieforms-v1.0" : j.schemaType || "mieforms-v1.0",
2244
- fields: R.fields || []
2283
+ const { data: F, schemaType: E } = pe(e, t), T = he(F, E);
2284
+ T.conversionReport && p.setConversionReport(T.conversionReport);
2285
+ const y = {
2286
+ schemaType: E === "surveyjs" ? "mieforms-v1.0" : F.schemaType || "mieforms-v1.0",
2287
+ fields: T.fields || []
2245
2288
  };
2246
- if (k === "surveyjs" && R.conversionReport?.surveyMetadata)
2247
- Object.assign(w, R.conversionReport.surveyMetadata);
2248
- else if (k === "mieforms") {
2249
- const { fields: A, schemaType: T, ...x } = j;
2250
- Object.keys(x).length > 0 && Object.assign(w, x);
2289
+ if (E === "surveyjs" && T.conversionReport?.surveyMetadata)
2290
+ Object.assign(y, T.conversionReport.surveyMetadata);
2291
+ else if (E === "mieforms") {
2292
+ const { fields: R, schemaType: A, ...b } = F;
2293
+ Object.keys(b).length > 0 && Object.assign(y, b);
2251
2294
  }
2252
- Array.isArray(w.fields) && w.fields.length && S.getState().replaceAll(w);
2295
+ Array.isArray(y.fields) && y.fields.length && N.getState().replaceAll(y);
2253
2296
  } catch {
2254
- S.getState().replaceAll({ schemaType: "mieforms-v1.0", fields: [] });
2297
+ N.getState().replaceAll({ schemaType: "mieforms-v1.0", fields: [] });
2255
2298
  }
2256
- h.preview.set(!!o), g.current = !0;
2299
+ p.preview.set(!!a), h.current = !0;
2257
2300
  }
2258
- }, [e, t, o, h, S]), l.useEffect(() => {
2259
- h.setHideUnsupportedFields(d);
2260
- }, [d, h]), l.useEffect(() => {
2261
- if (!(!r || !S))
2262
- return S.subscribe((j) => {
2301
+ }, [e, t, a, p, N]), c.useEffect(() => {
2302
+ p.setHideUnsupportedFields(m);
2303
+ }, [m, p]), c.useEffect(() => {
2304
+ if (!(!r || !N))
2305
+ return N.subscribe((F) => {
2263
2306
  r({
2264
- schemaType: j.schemaType || "mieforms-v1.0",
2265
- ...j.schemaMetadata,
2266
- fields: j.order.map((k) => j.byId[k])
2307
+ schemaType: F.schemaType || "mieforms-v1.0",
2308
+ ...F.schemaMetadata,
2309
+ fields: F.order.map((E) => F.byId[E])
2267
2310
  });
2268
2311
  });
2269
- }, [r, S]);
2270
- const q = Oi(
2271
- S,
2272
- (j) => h.selectedFieldId.value ? j.byId[h.selectedFieldId.value] : null
2273
- ), _ = m === "dark";
2274
- return /* @__PURE__ */ i.jsx("div", { className: `qb-editor-root editor-container mie:w-full mie:max-w-7xl mie:mx-auto mie:bg-miebackground mie:font-titillium ${_ ? "dark" : ""} ${n}`, children: /* @__PURE__ */ i.jsxs(Ci, { children: [
2275
- s && /* @__PURE__ */ i.jsx(ki, { codeFormat: c, onCodeFormatChange: u }),
2276
- /* @__PURE__ */ i.jsx(er, { selectedField: q, codeFormat: c })
2312
+ }, [r, N]);
2313
+ const M = Ti(
2314
+ N,
2315
+ (F) => p.selectedFieldId.value ? F.byId[p.selectedFieldId.value] : null
2316
+ ), W = l === "dark";
2317
+ return /* @__PURE__ */ i.jsx("div", { className: `qb-editor-root editor-container mie:w-full mie:max-w-7xl mie:mx-auto mie:bg-miebackground mie:font-titillium ${W ? "dark" : ""} ${n}`, children: /* @__PURE__ */ i.jsxs(Oi, { children: [
2318
+ o && /* @__PURE__ */ i.jsx(Ri, { codeFormat: d, onCodeFormatChange: u }),
2319
+ /* @__PURE__ */ i.jsx(ir, { selectedField: M, codeFormat: d })
2277
2320
  ] }) });
2278
2321
  }
2279
- function or(e) {
2280
- const t = l.useRef(wi()).current, r = l.useRef(Ei()).current;
2281
- return /* @__PURE__ */ i.jsx(Oe.Provider, { value: t, children: /* @__PURE__ */ i.jsx(Ni.Provider, { value: r, children: /* @__PURE__ */ i.jsx(ir, { ...e }) }) });
2322
+ function ar(e) {
2323
+ const t = c.useRef(Ci()).current, r = c.useRef(Ei()).current;
2324
+ return /* @__PURE__ */ i.jsx(Te.Provider, { value: t, children: /* @__PURE__ */ i.jsx(Ni.Provider, { value: r, children: /* @__PURE__ */ i.jsx(tr, { ...e }) }) });
2282
2325
  }
2283
2326
  export {
2284
- or as QuestionnaireEditor
2327
+ ar as QuestionnaireEditor
2285
2328
  };
2286
2329
  //# sourceMappingURL=index.js.map