@mieweb/forms-editor 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -208
- package/dist/index.js +819 -759
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
- package/dist/index.css +0 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
|
|
2
|
+
(function() {
|
|
3
|
+
if (typeof document === 'undefined') return;
|
|
4
|
+
if (window.__QUESTIONNAIRE_EDITOR_CSS_INJECTED) return;
|
|
5
|
+
if (!document.querySelector('#questionnaire-editor-styles')) {
|
|
6
|
+
const style = document.createElement('style');
|
|
7
|
+
style.id = 'questionnaire-editor-styles';
|
|
8
|
+
style.textContent = "/*! tailwindcss v4.1.15 | 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@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\",\n \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\",\n \"Courier New\", monospace;\n --color-red-400: oklch(70.4% 0.191 22.216);\n --color-red-600: oklch(57.7% 0.245 27.325);\n --color-orange-50: oklch(98% 0.016 73.684);\n --color-orange-500: oklch(70.5% 0.213 47.604);\n --color-orange-600: oklch(64.6% 0.222 41.116);\n --color-orange-700: oklch(55.3% 0.195 38.402);\n --color-blue-50: oklch(97% 0.014 254.604);\n --color-blue-100: oklch(93.2% 0.032 255.585);\n --color-blue-200: oklch(88.2% 0.059 254.128);\n --color-blue-300: oklch(80.9% 0.105 251.813);\n --color-blue-400: oklch(70.7% 0.165 254.624);\n --color-blue-500: oklch(62.3% 0.214 259.815);\n --color-blue-600: oklch(54.6% 0.245 262.881);\n --color-blue-800: oklch(42.4% 0.199 265.638);\n --color-indigo-100: oklch(93% 0.034 272.788);\n --color-indigo-700: oklch(45.7% 0.24 277.023);\n --color-purple-50: oklch(97.7% 0.014 308.299);\n --color-purple-500: oklch(62.7% 0.265 303.9);\n --color-slate-50: oklch(98.4% 0.003 247.858);\n --color-slate-100: oklch(96.8% 0.007 247.896);\n --color-slate-200: oklch(92.9% 0.013 255.508);\n --color-slate-300: oklch(86.9% 0.022 252.894);\n --color-slate-400: oklch(70.4% 0.04 256.788);\n --color-slate-500: oklch(55.4% 0.046 257.417);\n --color-slate-600: oklch(44.6% 0.043 257.281);\n --color-slate-700: oklch(37.2% 0.044 257.287);\n --color-slate-900: oklch(20.8% 0.042 265.755);\n --color-gray-50: oklch(98.5% 0.002 247.839);\n --color-gray-100: oklch(96.7% 0.003 264.542);\n --color-gray-200: oklch(92.8% 0.006 264.531);\n --color-gray-300: oklch(87.2% 0.01 258.338);\n --color-gray-400: oklch(70.7% 0.022 261.325);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --color-gray-600: oklch(44.6% 0.03 256.802);\n --color-gray-700: oklch(37.3% 0.034 259.733);\n --color-gray-800: oklch(27.8% 0.033 256.848);\n --color-neutral-100: oklch(97% 0 0);\n --color-stone-900: oklch(21.6% 0.006 56.043);\n --color-black: #000;\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-md: 28rem;\n --container-xl: 36rem;\n --container-2xl: 42rem;\n --container-3xl: 48rem;\n --container-4xl: 56rem;\n --container-5xl: 64rem;\n --container-6xl: 72rem;\n --text-xs: 0.75rem;\n --text-xs--line-height: calc(1 / 0.75);\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-base: 1rem;\n --text-base--line-height: calc(1.5 / 1);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --text-3xl: 1.875rem;\n --text-3xl--line-height: calc(2.25 / 1.875);\n --text-4xl: 2.25rem;\n --text-4xl--line-height: calc(2.5 / 2.25);\n --text-5xl: 3rem;\n --text-5xl--line-height: 1;\n --font-weight-light: 300;\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --tracking-tight: -0.025em;\n --tracking-wide: 0.025em;\n --tracking-wider: 0.05em;\n --leading-tight: 1.25;\n --leading-relaxed: 1.625;\n --radius-md: 0.375rem;\n --radius-lg: 0.5rem;\n --radius-xl: 0.75rem;\n --radius-2xl: 1rem;\n --radius-3xl: 1.5rem;\n --blur-sm: 8px;\n --blur-lg: 16px;\n --blur-xl: 24px;\n --blur-2xl: 40px;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n --font-titillium: \"Titillium Web\", sans-serif;\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n & {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n ::-webkit-calendar-picker-indicator {\n line-height: 1;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type=\"button\"], [type=\"reset\"], [type=\"submit\"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden=\"until-found\"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .visible {\n visibility: visible;\n }\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border-width: 0;\n }\n .absolute {\n position: absolute;\n }\n .fixed {\n position: fixed;\n }\n .relative {\n position: relative;\n }\n .static {\n position: static;\n }\n .sticky {\n position: sticky;\n }\n .inset-0 {\n inset: calc(var(--spacing) * 0);\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-3 {\n top: calc(var(--spacing) * 3);\n }\n .top-5 {\n top: calc(var(--spacing) * 5);\n }\n .right-5 {\n right: calc(var(--spacing) * 5);\n }\n .right-7 {\n right: calc(var(--spacing) * 7);\n }\n .bottom-0 {\n bottom: calc(var(--spacing) * 0);\n }\n .bottom-5 {\n bottom: calc(var(--spacing) * 5);\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .z-10 {\n z-index: 10;\n }\n .z-30 {\n z-index: 30;\n }\n .z-49 {\n z-index: 49;\n }\n .z-50 {\n z-index: 50;\n }\n .z-\\[60\\] {\n z-index: 60;\n }\n .container {\n width: 100%;\n @media (width >= 40rem) {\n max-width: 40rem;\n }\n @media (width >= 48rem) {\n max-width: 48rem;\n }\n @media (width >= 64rem) {\n max-width: 64rem;\n }\n @media (width >= 80rem) {\n max-width: 80rem;\n }\n @media (width >= 96rem) {\n max-width: 96rem;\n }\n }\n .m-0 {\n margin: calc(var(--spacing) * 0);\n }\n .mx-29 {\n margin-inline: calc(var(--spacing) * 29);\n }\n .mx-auto {\n margin-inline: auto;\n }\n .my-1\\.5 {\n margin-block: calc(var(--spacing) * 1.5);\n }\n .my-2 {\n margin-block: calc(var(--spacing) * 2);\n }\n .mt-0\\.5 {\n margin-top: calc(var(--spacing) * 0.5);\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mt-2 {\n margin-top: calc(var(--spacing) * 2);\n }\n .mt-3 {\n margin-top: calc(var(--spacing) * 3);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mt-5 {\n margin-top: calc(var(--spacing) * 5);\n }\n .mt-6 {\n margin-top: calc(var(--spacing) * 6);\n }\n .mt-8 {\n margin-top: calc(var(--spacing) * 8);\n }\n .mt-12 {\n margin-top: calc(var(--spacing) * 12);\n }\n .mr-2 {\n margin-right: calc(var(--spacing) * 2);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-1\\.5 {\n margin-bottom: calc(var(--spacing) * 1.5);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .mb-2\\.5 {\n margin-bottom: calc(var(--spacing) * 2.5);\n }\n .mb-3 {\n margin-bottom: calc(var(--spacing) * 3);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .mb-5 {\n margin-bottom: calc(var(--spacing) * 5);\n }\n .mb-6 {\n margin-bottom: calc(var(--spacing) * 6);\n }\n .mb-12 {\n margin-bottom: calc(var(--spacing) * 12);\n }\n .mb-14 {\n margin-bottom: calc(var(--spacing) * 14);\n }\n .ml-2 {\n margin-left: calc(var(--spacing) * 2);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .hidden {\n display: none;\n }\n .inline {\n display: inline;\n }\n .inline-flex {\n display: inline-flex;\n }\n .h-2\\.5 {\n height: calc(var(--spacing) * 2.5);\n }\n .h-3\\.5 {\n height: calc(var(--spacing) * 3.5);\n }\n .h-4 {\n height: calc(var(--spacing) * 4);\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-6 {\n height: calc(var(--spacing) * 6);\n }\n .h-9 {\n height: calc(var(--spacing) * 9);\n }\n .h-10 {\n height: calc(var(--spacing) * 10);\n }\n .h-12 {\n height: calc(var(--spacing) * 12);\n }\n .h-72 {\n height: calc(var(--spacing) * 72);\n }\n .h-dvh {\n height: 100dvh;\n }\n .h-fit {\n height: fit-content;\n }\n .h-full {\n height: 100%;\n }\n .max-h-32 {\n max-height: calc(var(--spacing) * 32);\n }\n .max-h-56 {\n max-height: calc(var(--spacing) * 56);\n }\n .max-h-60 {\n max-height: calc(var(--spacing) * 60);\n }\n .max-h-96 {\n max-height: calc(var(--spacing) * 96);\n }\n .max-h-\\[70vh\\] {\n max-height: 70vh;\n }\n .max-h-\\[80vh\\] {\n max-height: 80vh;\n }\n .max-h-\\[300px\\] {\n max-height: 300px;\n }\n .max-h-\\[calc\\(100svh-19rem\\)\\] {\n max-height: calc(100svh - 19rem);\n }\n .min-h-24 {\n min-height: calc(var(--spacing) * 24);\n }\n .min-h-dvh {\n min-height: 100dvh;\n }\n .min-h-screen {\n min-height: 100vh;\n }\n .custom-scrollbar {\n &::-webkit-scrollbar {\n width: calc(var(--spacing) * 1.5);\n }\n &::-webkit-scrollbar-thumb {\n border-radius: calc(infinity * 1px);\n }\n &::-webkit-scrollbar-thumb {\n background-color: var(--color-gray-500);\n }\n &::-webkit-scrollbar-track {\n border-radius: calc(infinity * 1px);\n }\n &::-webkit-scrollbar-track {\n background-color: var(--color-gray-100);\n }\n }\n .w-2\\.5 {\n width: calc(var(--spacing) * 2.5);\n }\n .w-3\\.5 {\n width: calc(var(--spacing) * 3.5);\n }\n .w-4 {\n width: calc(var(--spacing) * 4);\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-6 {\n width: calc(var(--spacing) * 6);\n }\n .w-9 {\n width: calc(var(--spacing) * 9);\n }\n .w-12 {\n width: calc(var(--spacing) * 12);\n }\n .w-full {\n width: 100%;\n }\n .w-px {\n width: 1px;\n }\n .max-w-3xl {\n max-width: var(--container-3xl);\n }\n .max-w-4xl {\n max-width: var(--container-4xl);\n }\n .max-w-5xl {\n max-width: var(--container-5xl);\n }\n .max-w-6xl {\n max-width: var(--container-6xl);\n }\n .max-w-md {\n max-width: var(--container-md);\n }\n .max-w-xl {\n max-width: var(--container-xl);\n }\n .min-w-fit {\n min-width: fit-content;\n }\n .flex-1 {\n flex: 1;\n }\n .flex-shrink-0 {\n flex-shrink: 0;\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .cursor-pointer {\n cursor: pointer;\n }\n .resize-y {\n resize: vertical;\n }\n .grid-cols-1 {\n grid-template-columns: repeat(1, minmax(0, 1fr));\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-wrap {\n flex-wrap: wrap;\n }\n .items-center {\n align-items: center;\n }\n .items-end {\n align-items: flex-end;\n }\n .items-start {\n align-items: flex-start;\n }\n .justify-around {\n justify-content: space-around;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-end {\n justify-content: flex-end;\n }\n .gap-1\\.5 {\n gap: calc(var(--spacing) * 1.5);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-2\\.5 {\n gap: calc(var(--spacing) * 2.5);\n }\n .gap-3 {\n gap: calc(var(--spacing) * 3);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .gap-5 {\n gap: calc(var(--spacing) * 5);\n }\n .space-y-1 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-2 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-3 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .overflow-auto {\n overflow: auto;\n }\n .overflow-hidden {\n overflow: hidden;\n }\n .overflow-y-auto {\n overflow-y: auto;\n }\n .overflow-y-scroll {\n overflow-y: scroll;\n }\n .rounded {\n border-radius: 0.25rem;\n }\n .rounded-2xl {\n border-radius: var(--radius-2xl);\n }\n .rounded-3xl {\n border-radius: var(--radius-3xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--radius-lg);\n }\n .rounded-md {\n border-radius: var(--radius-md);\n }\n .rounded-xl {\n border-radius: var(--radius-xl);\n }\n .rounded-t-2xl {\n border-top-left-radius: var(--radius-2xl);\n border-top-right-radius: var(--radius-2xl);\n }\n .rounded-t-lg {\n border-top-left-radius: var(--radius-lg);\n border-top-right-radius: var(--radius-lg);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-0 {\n border-style: var(--tw-border-style);\n border-width: 0px;\n }\n .border-2 {\n border-style: var(--tw-border-style);\n border-width: 2px;\n }\n .border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-r {\n border-right-style: var(--tw-border-style);\n border-right-width: 1px;\n }\n .border-b {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 1px;\n }\n .border-l {\n border-left-style: var(--tw-border-style);\n border-left-width: 1px;\n }\n .border-dashed {\n --tw-border-style: dashed;\n border-style: dashed;\n }\n .border-\\[\\#0076a8\\] {\n border-color: #0076a8;\n }\n .border-black\\/10 {\n border-color: color-mix(in srgb, #000 10%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n border-color: color-mix(in oklab, var(--color-black) 10%, transparent);\n }\n }\n }\n .border-black\\/15 {\n border-color: color-mix(in srgb, #000 15%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n border-color: color-mix(in oklab, var(--color-black) 15%, transparent);\n }\n }\n }\n .border-black\\/20 {\n border-color: color-mix(in srgb, #000 20%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n border-color: color-mix(in oklab, var(--color-black) 20%, transparent);\n }\n }\n }\n .border-black\\/40 {\n border-color: color-mix(in srgb, #000 40%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n border-color: color-mix(in oklab, var(--color-black) 40%, transparent);\n }\n }\n }\n .border-blue-200 {\n border-color: var(--color-blue-200);\n }\n .border-blue-200\\/60 {\n border-color: color-mix(in srgb, oklch(88.2% 0.059 254.128) 60%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n border-color: color-mix(in oklab, var(--color-blue-200) 60%, transparent);\n }\n }\n }\n .border-blue-300 {\n border-color: var(--color-blue-300);\n }\n .border-blue-400 {\n border-color: var(--color-blue-400);\n }\n .border-gray-200 {\n border-color: var(--color-gray-200);\n }\n .border-gray-300 {\n border-color: var(--color-gray-300);\n }\n .border-orange-500 {\n border-color: var(--color-orange-500);\n }\n .border-slate-100\\/80 {\n border-color: color-mix(in srgb, oklch(96.8% 0.007 247.896) 80%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n border-color: color-mix(in oklab, var(--color-slate-100) 80%, transparent);\n }\n }\n }\n .border-slate-200 {\n border-color: var(--color-slate-200);\n }\n .border-slate-200\\/60 {\n border-color: color-mix(in srgb, oklch(92.9% 0.013 255.508) 60%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n border-color: color-mix(in oklab, var(--color-slate-200) 60%, transparent);\n }\n }\n }\n .border-slate-300 {\n border-color: var(--color-slate-300);\n }\n .border-transparent {\n border-color: transparent;\n }\n .border-white\\/30 {\n border-color: color-mix(in srgb, #fff 30%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n border-color: color-mix(in oklab, var(--color-white) 30%, transparent);\n }\n }\n }\n .border-white\\/40 {\n border-color: color-mix(in srgb, #fff 40%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n border-color: color-mix(in oklab, var(--color-white) 40%, transparent);\n }\n }\n }\n .bg-\\[\\#0076a8\\] {\n background-color: #0076a8;\n }\n .bg-black\\/5 {\n background-color: color-mix(in srgb, #000 5%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n background-color: color-mix(in oklab, var(--color-black) 5%, transparent);\n }\n }\n }\n .bg-black\\/6 {\n background-color: color-mix(in srgb, #000 6%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n background-color: color-mix(in oklab, var(--color-black) 6%, transparent);\n }\n }\n }\n .bg-black\\/10 {\n background-color: color-mix(in srgb, #000 10%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n background-color: color-mix(in oklab, var(--color-black) 10%, transparent);\n }\n }\n }\n .bg-black\\/50 {\n background-color: color-mix(in srgb, #000 50%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n background-color: color-mix(in oklab, var(--color-black) 50%, transparent);\n }\n }\n }\n .bg-blue-100\\/70 {\n background-color: color-mix(in srgb, oklch(93.2% 0.032 255.585) 70%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n background-color: color-mix(in oklab, var(--color-blue-100) 70%, transparent);\n }\n }\n }\n .bg-blue-500 {\n background-color: var(--color-blue-500);\n }\n .bg-gray-50 {\n background-color: var(--color-gray-50);\n }\n .bg-gray-100 {\n background-color: var(--color-gray-100);\n }\n .bg-gray-200 {\n background-color: var(--color-gray-200);\n }\n .bg-indigo-100 {\n background-color: var(--color-indigo-100);\n }\n .bg-neutral-100 {\n background-color: var(--color-neutral-100);\n }\n .bg-orange-50 {\n background-color: var(--color-orange-50);\n }\n .bg-orange-500 {\n background-color: var(--color-orange-500);\n }\n .bg-slate-50\\/60 {\n background-color: color-mix(in srgb, oklch(98.4% 0.003 247.858) 60%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n background-color: color-mix(in oklab, var(--color-slate-50) 60%, transparent);\n }\n }\n }\n .bg-slate-100 {\n background-color: var(--color-slate-100);\n }\n .bg-slate-100\\/60 {\n background-color: color-mix(in srgb, oklch(96.8% 0.007 247.896) 60%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n background-color: color-mix(in oklab, var(--color-slate-100) 60%, transparent);\n }\n }\n }\n .bg-slate-100\\/80 {\n background-color: color-mix(in srgb, oklch(96.8% 0.007 247.896) 80%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n background-color: color-mix(in oklab, var(--color-slate-100) 80%, transparent);\n }\n }\n }\n .bg-slate-300\\/50 {\n background-color: color-mix(in srgb, oklch(86.9% 0.022 252.894) 50%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n background-color: color-mix(in oklab, var(--color-slate-300) 50%, transparent);\n }\n }\n }\n .bg-transparent {\n background-color: transparent;\n }\n .bg-transparent\\/30 {\n background-color: color-mix(in oklab, transparent 30%, transparent);\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .bg-white\\/70 {\n background-color: color-mix(in srgb, #fff 70%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n background-color: color-mix(in oklab, var(--color-white) 70%, transparent);\n }\n }\n }\n .bg-white\\/75 {\n background-color: color-mix(in srgb, #fff 75%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n background-color: color-mix(in oklab, var(--color-white) 75%, transparent);\n }\n }\n }\n .bg-gradient-to-b {\n --tw-gradient-position: to bottom in oklab;\n background-image: linear-gradient(var(--tw-gradient-stops));\n }\n .bg-gradient-to-br {\n --tw-gradient-position: to bottom right in oklab;\n background-image: linear-gradient(var(--tw-gradient-stops));\n }\n .from-gray-50 {\n --tw-gradient-from: var(--color-gray-50);\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 .from-white {\n --tw-gradient-from: var(--color-white);\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 .to-gray-100 {\n --tw-gradient-to: var(--color-gray-100);\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 .to-slate-50 {\n --tw-gradient-to: var(--color-slate-50);\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 .p-0 {\n padding: calc(var(--spacing) * 0);\n }\n .p-1 {\n padding: calc(var(--spacing) * 1);\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .p-7 {\n padding: calc(var(--spacing) * 7);\n }\n .px-2 {\n padding-inline: calc(var(--spacing) * 2);\n }\n .px-3 {\n padding-inline: calc(var(--spacing) * 3);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .px-5 {\n padding-inline: calc(var(--spacing) * 5);\n }\n .px-6 {\n padding-inline: calc(var(--spacing) * 6);\n }\n .px-8 {\n padding-inline: calc(var(--spacing) * 8);\n }\n .px-9 {\n padding-inline: calc(var(--spacing) * 9);\n }\n .py-0\\.5 {\n padding-block: calc(var(--spacing) * 0.5);\n }\n .py-1 {\n padding-block: calc(var(--spacing) * 1);\n }\n .py-1\\.5 {\n padding-block: calc(var(--spacing) * 1.5);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .py-2\\.5 {\n padding-block: calc(var(--spacing) * 2.5);\n }\n .py-3 {\n padding-block: calc(var(--spacing) * 3);\n }\n .py-4 {\n padding-block: calc(var(--spacing) * 4);\n }\n .py-6 {\n padding-block: calc(var(--spacing) * 6);\n }\n .py-10 {\n padding-block: calc(var(--spacing) * 10);\n }\n .py-16 {\n padding-block: calc(var(--spacing) * 16);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pt-8 {\n padding-top: calc(var(--spacing) * 8);\n }\n .pr-2 {\n padding-right: calc(var(--spacing) * 2);\n }\n .pb-2\\.5 {\n padding-bottom: calc(var(--spacing) * 2.5);\n }\n .pb-4 {\n padding-bottom: calc(var(--spacing) * 4);\n }\n .pb-5 {\n padding-bottom: calc(var(--spacing) * 5);\n }\n .pb-8 {\n padding-bottom: calc(var(--spacing) * 8);\n }\n .pl-6 {\n padding-left: calc(var(--spacing) * 6);\n }\n .text-center {\n text-align: center;\n }\n .text-left {\n text-align: left;\n }\n .font-mono {\n font-family: var(--font-mono);\n }\n .font-sans {\n font-family: var(--font-sans);\n }\n .font-titillium {\n font-family: var(--font-titillium);\n }\n .text-3xl {\n font-size: var(--text-3xl);\n line-height: var(--tw-leading, var(--text-3xl--line-height));\n }\n .text-4xl {\n font-size: var(--text-4xl);\n line-height: var(--tw-leading, var(--text-4xl--line-height));\n }\n .text-base {\n font-size: var(--text-base);\n line-height: var(--tw-leading, var(--text-base--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .text-xs {\n font-size: var(--text-xs);\n line-height: var(--tw-leading, var(--text-xs--line-height));\n }\n .leading-relaxed {\n --tw-leading: var(--leading-relaxed);\n line-height: var(--leading-relaxed);\n }\n .leading-tight {\n --tw-leading: var(--leading-tight);\n line-height: var(--leading-tight);\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-light {\n --tw-font-weight: var(--font-weight-light);\n font-weight: var(--font-weight-light);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .tracking-tight {\n --tw-tracking: var(--tracking-tight);\n letter-spacing: var(--tracking-tight);\n }\n .tracking-wide {\n --tw-tracking: var(--tracking-wide);\n letter-spacing: var(--tracking-wide);\n }\n .tracking-wider {\n --tw-tracking: var(--tracking-wider);\n letter-spacing: var(--tracking-wider);\n }\n .break-words {\n overflow-wrap: break-word;\n }\n .whitespace-nowrap {\n white-space: nowrap;\n }\n .whitespace-pre-wrap {\n white-space: pre-wrap;\n }\n .text-black {\n color: var(--color-black);\n }\n .text-black\\/60 {\n color: color-mix(in srgb, #000 60%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n color: color-mix(in oklab, var(--color-black) 60%, transparent);\n }\n }\n }\n .text-blue-500 {\n color: var(--color-blue-500);\n }\n .text-blue-600 {\n color: var(--color-blue-600);\n }\n .text-blue-800 {\n color: var(--color-blue-800);\n }\n .text-gray-400 {\n color: var(--color-gray-400);\n }\n .text-gray-500 {\n color: var(--color-gray-500);\n }\n .text-gray-600 {\n color: var(--color-gray-600);\n }\n .text-gray-700 {\n color: var(--color-gray-700);\n }\n .text-gray-800 {\n color: var(--color-gray-800);\n }\n .text-indigo-700 {\n color: var(--color-indigo-700);\n }\n .text-orange-700 {\n color: var(--color-orange-700);\n }\n .text-red-400 {\n color: var(--color-red-400);\n }\n .text-red-600 {\n color: var(--color-red-600);\n }\n .text-slate-400 {\n color: var(--color-slate-400);\n }\n .text-slate-500 {\n color: var(--color-slate-500);\n }\n .text-slate-600 {\n color: var(--color-slate-600);\n }\n .text-slate-700 {\n color: var(--color-slate-700);\n }\n .text-slate-900 {\n color: var(--color-slate-900);\n }\n .text-stone-900 {\n color: var(--color-stone-900);\n }\n .text-white {\n color: var(--color-white);\n }\n .italic {\n font-style: italic;\n }\n .opacity-70 {\n opacity: 70%;\n }\n .opacity-100 {\n opacity: 100%;\n }\n .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 .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 .shadow-2xs {\n --tw-shadow: 0 1px var(--tw-shadow-color, rgb(0 0 0 / 0.05));\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 .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 .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 .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 .shadow-xl {\n --tw-shadow: 0 20px 25px -5px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 8px 10px -6px 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 .invert {\n --tw-invert: invert(100%);\n filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);\n }\n .backdrop-blur-2xl {\n --tw-backdrop-blur: blur(var(--blur-2xl));\n -webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);\n backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);\n }\n .backdrop-blur-lg {\n --tw-backdrop-blur: blur(var(--blur-lg));\n -webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);\n backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);\n }\n .backdrop-blur-sm {\n --tw-backdrop-blur: blur(var(--blur-sm));\n -webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);\n backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);\n }\n .backdrop-blur-xl {\n --tw-backdrop-blur: blur(var(--blur-xl));\n -webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);\n backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);\n }\n .backdrop-saturate-150 {\n --tw-backdrop-saturate: saturate(150%);\n -webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);\n backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);\n }\n .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(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-all {\n transition-property: all;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .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(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .outline-none {\n --tw-outline-style: none;\n outline-style: none;\n }\n .select-none {\n -webkit-user-select: none;\n user-select: none;\n }\n .group-hover\\:border-blue-500 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n border-color: var(--color-blue-500);\n }\n }\n }\n .group-hover\\:border-purple-500 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n border-color: var(--color-purple-500);\n }\n }\n }\n .group-hover\\:bg-blue-500 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n background-color: var(--color-blue-500);\n }\n }\n }\n .group-hover\\:bg-purple-500 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n background-color: var(--color-purple-500);\n }\n }\n }\n .hover\\:border-blue-500 {\n &:hover {\n @media (hover: hover) {\n border-color: var(--color-blue-500);\n }\n }\n }\n .hover\\:border-purple-500 {\n &:hover {\n @media (hover: hover) {\n border-color: var(--color-purple-500);\n }\n }\n }\n .hover\\:border-slate-300\\/60 {\n &:hover {\n @media (hover: hover) {\n border-color: color-mix(in srgb, oklch(86.9% 0.022 252.894) 60%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n border-color: color-mix(in oklab, var(--color-slate-300) 60%, transparent);\n }\n }\n }\n }\n }\n .hover\\:border-white\\/50 {\n &:hover {\n @media (hover: hover) {\n border-color: color-mix(in srgb, #fff 50%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n border-color: color-mix(in oklab, var(--color-white) 50%, transparent);\n }\n }\n }\n }\n }\n .hover\\:border-white\\/60 {\n &:hover {\n @media (hover: hover) {\n border-color: color-mix(in srgb, #fff 60%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n border-color: color-mix(in oklab, var(--color-white) 60%, transparent);\n }\n }\n }\n }\n }\n .hover\\:bg-black\\/5 {\n &:hover {\n @media (hover: hover) {\n background-color: color-mix(in srgb, #000 5%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n background-color: color-mix(in oklab, var(--color-black) 5%, transparent);\n }\n }\n }\n }\n }\n .hover\\:bg-blue-50 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-blue-50);\n }\n }\n }\n .hover\\:bg-blue-600 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-blue-600);\n }\n }\n }\n .hover\\:bg-gray-50 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-gray-50);\n }\n }\n }\n .hover\\:bg-orange-600 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-orange-600);\n }\n }\n }\n .hover\\:bg-purple-50 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-purple-50);\n }\n }\n }\n .hover\\:bg-slate-50 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-slate-50);\n }\n }\n }\n .hover\\:bg-white\\/80 {\n &:hover {\n @media (hover: hover) {\n background-color: color-mix(in srgb, #fff 80%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n background-color: color-mix(in oklab, var(--color-white) 80%, transparent);\n }\n }\n }\n }\n }\n .hover\\:bg-white\\/85 {\n &:hover {\n @media (hover: hover) {\n background-color: color-mix(in srgb, #fff 85%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n background-color: color-mix(in oklab, var(--color-white) 85%, transparent);\n }\n }\n }\n }\n }\n .hover\\:bg-white\\/90 {\n &:hover {\n @media (hover: hover) {\n background-color: color-mix(in srgb, #fff 90%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n & {\n background-color: color-mix(in oklab, var(--color-white) 90%, transparent);\n }\n }\n }\n }\n }\n .hover\\:text-slate-900 {\n &:hover {\n @media (hover: hover) {\n color: var(--color-slate-900);\n }\n }\n }\n .hover\\:shadow-\\[0_4px_16px_rgba\\(0\\,0\\,0\\,0\\.06\\)\\,inset_0_1px_0_rgba\\(255\\,255\\,255\\,0\\.9\\)\\] {\n &:hover {\n @media (hover: hover) {\n --tw-shadow: 0 4px 16px var(--tw-shadow-color, rgba(0,0,0,0.06)), inset 0 1px 0 var(--tw-shadow-color, rgba(255,255,255,0.9));\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 .hover\\:shadow-\\[0_12px_48px_rgba\\(0\\,0\\,0\\,0\\.12\\)\\,0_4px_12px_rgba\\(0\\,0\\,0\\,0\\.06\\)\\,inset_0_1px_0_rgba\\(255\\,255\\,255\\,0\\.8\\)\\] {\n &:hover {\n @media (hover: hover) {\n --tw-shadow: 0 12px 48px var(--tw-shadow-color, rgba(0,0,0,0.12)), 0 4px 12px var(--tw-shadow-color, rgba(0,0,0,0.06)), inset 0 1px 0 var(--tw-shadow-color, rgba(255,255,255,0.8));\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 .hover\\:shadow-\\[0_20px_48px_-12px_rgba\\(0\\,0\\,0\\,0\\.15\\)\\,0_4px_12px_rgba\\(0\\,0\\,0\\,0\\.06\\)\\,inset_0_1px_0_rgba\\(255\\,255\\,255\\,1\\)\\] {\n &:hover {\n @media (hover: hover) {\n --tw-shadow: 0 20px 48px -12px var(--tw-shadow-color, rgba(0,0,0,0.15)), 0 4px 12px var(--tw-shadow-color, rgba(0,0,0,0.06)), inset 0 1px 0 var(--tw-shadow-color, rgba(255,255,255,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 .hover\\:shadow-xl {\n &:hover {\n @media (hover: hover) {\n --tw-shadow: 0 20px 25px -5px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 8px 10px -6px 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 .focus\\:ring-0 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(0px + 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 .active\\:scale-95 {\n &:active {\n --tw-scale-x: 95%;\n --tw-scale-y: 95%;\n --tw-scale-z: 95%;\n scale: var(--tw-scale-x) var(--tw-scale-y);\n }\n }\n .sm\\:col-span-1 {\n @media (width >= 40rem) {\n grid-column: span 1 / span 1;\n }\n }\n .sm\\:col-span-2 {\n @media (width >= 40rem) {\n grid-column: span 2 / span 2;\n }\n }\n .sm\\:col-span-3 {\n @media (width >= 40rem) {\n grid-column: span 3 / span 3;\n }\n }\n .sm\\:max-w-2xl {\n @media (width >= 40rem) {\n max-width: var(--container-2xl);\n }\n }\n .sm\\:max-w-4xl {\n @media (width >= 40rem) {\n max-width: var(--container-4xl);\n }\n }\n .sm\\:grid-cols-2 {\n @media (width >= 40rem) {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n }\n .sm\\:grid-cols-7 {\n @media (width >= 40rem) {\n grid-template-columns: repeat(7, minmax(0, 1fr));\n }\n }\n .sm\\:items-center {\n @media (width >= 40rem) {\n align-items: center;\n }\n }\n .sm\\:rounded-2xl {\n @media (width >= 40rem) {\n border-radius: var(--radius-2xl);\n }\n }\n .sm\\:text-4xl {\n @media (width >= 40rem) {\n font-size: var(--text-4xl);\n line-height: var(--tw-leading, var(--text-4xl--line-height));\n }\n }\n .md\\:grid-cols-2 {\n @media (width >= 48rem) {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n }\n .md\\:px-12 {\n @media (width >= 48rem) {\n padding-inline: calc(var(--spacing) * 12);\n }\n }\n .md\\:text-5xl {\n @media (width >= 48rem) {\n font-size: var(--text-5xl);\n line-height: var(--tw-leading, var(--text-5xl--line-height));\n }\n }\n .lg\\:block {\n @media (width >= 64rem) {\n display: block;\n }\n }\n .lg\\:hidden {\n @media (width >= 64rem) {\n display: none;\n }\n }\n .lg\\:max-h-\\[calc\\(100dvh-15rem\\)\\] {\n @media (width >= 64rem) {\n max-height: calc(100dvh - 15rem);\n }\n }\n .lg\\:grid-cols-\\[280px_minmax\\(0\\,1fr\\)_320px\\] {\n @media (width >= 64rem) {\n grid-template-columns: 280px minmax(0,1fr) 320px;\n }\n }\n .lg\\:grid-cols-\\[minmax\\(0\\,1fr\\)\\] {\n @media (width >= 64rem) {\n grid-template-columns: minmax(0,1fr);\n }\n }\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-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-blur {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-brightness {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-contrast {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-grayscale {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-hue-rotate {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-invert {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-opacity {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-saturate {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-sepia {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-drop-shadow {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-drop-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-drop-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-drop-shadow-size {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-backdrop-blur {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-backdrop-brightness {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-backdrop-contrast {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-backdrop-grayscale {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-backdrop-hue-rotate {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-backdrop-invert {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-backdrop-opacity {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-backdrop-saturate {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-backdrop-sepia {\n syntax: \"*\";\n inherits: false;\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@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-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-blur: initial;\n --tw-brightness: initial;\n --tw-contrast: initial;\n --tw-grayscale: initial;\n --tw-hue-rotate: initial;\n --tw-invert: initial;\n --tw-opacity: initial;\n --tw-saturate: initial;\n --tw-sepia: initial;\n --tw-drop-shadow: initial;\n --tw-drop-shadow-color: initial;\n --tw-drop-shadow-alpha: 100%;\n --tw-drop-shadow-size: initial;\n --tw-backdrop-blur: initial;\n --tw-backdrop-brightness: initial;\n --tw-backdrop-contrast: initial;\n --tw-backdrop-grayscale: initial;\n --tw-backdrop-hue-rotate: initial;\n --tw-backdrop-invert: initial;\n --tw-backdrop-opacity: initial;\n --tw-backdrop-saturate: initial;\n --tw-backdrop-sepia: initial;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-scale-z: 1;\n }\n }\n}\n";
|
|
9
|
+
document.head.appendChild(style);
|
|
10
|
+
}
|
|
11
|
+
window.__QUESTIONNAIRE_EDITOR_CSS_INJECTED = true;
|
|
12
|
+
})();
|
|
13
|
+
import k, { useState as ne, useRef as Xe, useEffect as Z, useMemo as de, useCallback as ve } from "react";
|
|
14
|
+
import { useFormStore as Y, useFieldsArray as Qe, useUIApi as ee, adaptSchema as Ir, EYECLOSED_ICON as _r, EYEEDIT_ICON as Or, PLUSSQUARE_ICON as Ar, DATALOG_ICON as Pr, X_ICON as Dr, fieldTypes as ue, generateOptionId as Fr, useFormApi as Ze, useVisibleFields as $r, useUIStore as Mr, getFieldComponent as Lr } from "@mieweb/forms-engine";
|
|
15
|
+
import { AnimatePresence as Wr, motion as Q } from "framer-motion";
|
|
4
16
|
import qr from "js-yaml";
|
|
5
|
-
|
|
17
|
+
var xe = { exports: {} }, oe = {};
|
|
6
18
|
/**
|
|
7
19
|
* @license React
|
|
8
20
|
* react-jsx-runtime.production.min.js
|
|
@@ -12,21 +24,21 @@ import './index.css';var pe = { exports: {} }, ae = {};
|
|
|
12
24
|
* This source code is licensed under the MIT license found in the
|
|
13
25
|
* LICENSE file in the root directory of this source tree.
|
|
14
26
|
*/
|
|
15
|
-
var
|
|
16
|
-
function
|
|
17
|
-
if (
|
|
18
|
-
|
|
19
|
-
var t =
|
|
20
|
-
function
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
for (
|
|
24
|
-
if (
|
|
25
|
-
return { $$typeof:
|
|
27
|
+
var Be;
|
|
28
|
+
function Yr() {
|
|
29
|
+
if (Be) return oe;
|
|
30
|
+
Be = 1;
|
|
31
|
+
var t = k, s = Symbol.for("react.element"), a = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, d = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, f = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
32
|
+
function p(l, c, E) {
|
|
33
|
+
var g, v = {}, h = null, T = null;
|
|
34
|
+
E !== void 0 && (h = "" + E), c.key !== void 0 && (h = "" + c.key), c.ref !== void 0 && (T = c.ref);
|
|
35
|
+
for (g in c) o.call(c, g) && !f.hasOwnProperty(g) && (v[g] = c[g]);
|
|
36
|
+
if (l && l.defaultProps) for (g in c = l.defaultProps, c) v[g] === void 0 && (v[g] = c[g]);
|
|
37
|
+
return { $$typeof: s, type: l, key: h, ref: T, props: v, _owner: d.current };
|
|
26
38
|
}
|
|
27
|
-
return
|
|
39
|
+
return oe.Fragment = a, oe.jsx = p, oe.jsxs = p, oe;
|
|
28
40
|
}
|
|
29
|
-
var
|
|
41
|
+
var ce = {};
|
|
30
42
|
/**
|
|
31
43
|
* @license React
|
|
32
44
|
* react-jsx-runtime.development.js
|
|
@@ -36,91 +48,91 @@ var se = {};
|
|
|
36
48
|
* This source code is licensed under the MIT license found in the
|
|
37
49
|
* LICENSE file in the root directory of this source tree.
|
|
38
50
|
*/
|
|
39
|
-
var
|
|
40
|
-
function
|
|
41
|
-
return
|
|
42
|
-
var t =
|
|
43
|
-
function
|
|
51
|
+
var Ve;
|
|
52
|
+
function Ur() {
|
|
53
|
+
return Ve || (Ve = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
54
|
+
var t = k, s = Symbol.for("react.element"), a = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), d = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), p = Symbol.for("react.provider"), l = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), E = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), T = Symbol.for("react.offscreen"), b = Symbol.iterator, O = "@@iterator";
|
|
55
|
+
function x(e) {
|
|
44
56
|
if (e === null || typeof e != "object")
|
|
45
57
|
return null;
|
|
46
|
-
var
|
|
47
|
-
return typeof
|
|
58
|
+
var n = b && e[b] || e[O];
|
|
59
|
+
return typeof n == "function" ? n : null;
|
|
48
60
|
}
|
|
49
|
-
var
|
|
50
|
-
function
|
|
61
|
+
var F = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
62
|
+
function N(e) {
|
|
51
63
|
{
|
|
52
|
-
for (var
|
|
53
|
-
|
|
54
|
-
|
|
64
|
+
for (var n = arguments.length, i = new Array(n > 1 ? n - 1 : 0), m = 1; m < n; m++)
|
|
65
|
+
i[m - 1] = arguments[m];
|
|
66
|
+
R("error", e, i);
|
|
55
67
|
}
|
|
56
68
|
}
|
|
57
|
-
function
|
|
69
|
+
function R(e, n, i) {
|
|
58
70
|
{
|
|
59
|
-
var
|
|
60
|
-
C !== "" && (
|
|
61
|
-
var
|
|
71
|
+
var m = F.ReactDebugCurrentFrame, C = m.getStackAddendum();
|
|
72
|
+
C !== "" && (n += "%s", i = i.concat([C]));
|
|
73
|
+
var _ = i.map(function(w) {
|
|
62
74
|
return String(w);
|
|
63
75
|
});
|
|
64
|
-
|
|
76
|
+
_.unshift("Warning: " + n), Function.prototype.apply.call(console[e], console, _);
|
|
65
77
|
}
|
|
66
78
|
}
|
|
67
|
-
var
|
|
68
|
-
|
|
69
|
-
function
|
|
70
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
79
|
+
var S = !1, A = !1, H = !1, se = !1, z = !1, G;
|
|
80
|
+
G = Symbol.for("react.module.reference");
|
|
81
|
+
function W(e) {
|
|
82
|
+
return !!(typeof e == "string" || typeof e == "function" || e === o || e === f || z || e === d || e === E || e === g || se || e === T || S || A || H || typeof e == "object" && e !== null && (e.$$typeof === h || e.$$typeof === v || e.$$typeof === p || e.$$typeof === l || e.$$typeof === c || // This needs to include all possible module reference object
|
|
71
83
|
// types supported by any Flight configuration anywhere since
|
|
72
84
|
// we don't know which Flight build this will end up being used
|
|
73
85
|
// with.
|
|
74
|
-
e.$$typeof ===
|
|
86
|
+
e.$$typeof === G || e.getModuleId !== void 0));
|
|
75
87
|
}
|
|
76
|
-
function
|
|
77
|
-
var
|
|
78
|
-
if (
|
|
79
|
-
return
|
|
80
|
-
var C =
|
|
81
|
-
return C !== "" ?
|
|
88
|
+
function fe(e, n, i) {
|
|
89
|
+
var m = e.displayName;
|
|
90
|
+
if (m)
|
|
91
|
+
return m;
|
|
92
|
+
var C = n.displayName || n.name || "";
|
|
93
|
+
return C !== "" ? i + "(" + C + ")" : i;
|
|
82
94
|
}
|
|
83
|
-
function
|
|
95
|
+
function ae(e) {
|
|
84
96
|
return e.displayName || "Context";
|
|
85
97
|
}
|
|
86
|
-
function
|
|
98
|
+
function J(e) {
|
|
87
99
|
if (e == null)
|
|
88
100
|
return null;
|
|
89
|
-
if (typeof e.tag == "number" &&
|
|
101
|
+
if (typeof e.tag == "number" && N("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
90
102
|
return e.displayName || e.name || null;
|
|
91
103
|
if (typeof e == "string")
|
|
92
104
|
return e;
|
|
93
105
|
switch (e) {
|
|
94
|
-
case
|
|
106
|
+
case o:
|
|
95
107
|
return "Fragment";
|
|
96
|
-
case
|
|
108
|
+
case a:
|
|
97
109
|
return "Portal";
|
|
98
|
-
case
|
|
110
|
+
case f:
|
|
99
111
|
return "Profiler";
|
|
100
|
-
case
|
|
112
|
+
case d:
|
|
101
113
|
return "StrictMode";
|
|
102
|
-
case
|
|
114
|
+
case E:
|
|
103
115
|
return "Suspense";
|
|
104
|
-
case
|
|
116
|
+
case g:
|
|
105
117
|
return "SuspenseList";
|
|
106
118
|
}
|
|
107
119
|
if (typeof e == "object")
|
|
108
120
|
switch (e.$$typeof) {
|
|
109
|
-
case
|
|
110
|
-
var
|
|
111
|
-
return
|
|
112
|
-
case
|
|
113
|
-
var
|
|
114
|
-
return
|
|
115
|
-
case
|
|
116
|
-
return
|
|
117
|
-
case
|
|
118
|
-
var
|
|
119
|
-
return
|
|
120
|
-
case
|
|
121
|
-
var C = e,
|
|
121
|
+
case l:
|
|
122
|
+
var n = e;
|
|
123
|
+
return ae(n) + ".Consumer";
|
|
124
|
+
case p:
|
|
125
|
+
var i = e;
|
|
126
|
+
return ae(i._context) + ".Provider";
|
|
127
|
+
case c:
|
|
128
|
+
return fe(e, e.render, "ForwardRef");
|
|
129
|
+
case v:
|
|
130
|
+
var m = e.displayName || null;
|
|
131
|
+
return m !== null ? m : J(e.type) || "Memo";
|
|
132
|
+
case h: {
|
|
133
|
+
var C = e, _ = C._payload, w = C._init;
|
|
122
134
|
try {
|
|
123
|
-
return
|
|
135
|
+
return J(w(_));
|
|
124
136
|
} catch {
|
|
125
137
|
return null;
|
|
126
138
|
}
|
|
@@ -128,18 +140,18 @@ function Yr() {
|
|
|
128
140
|
}
|
|
129
141
|
return null;
|
|
130
142
|
}
|
|
131
|
-
var
|
|
132
|
-
function
|
|
143
|
+
var u = Object.assign, I = 0, P, B, D, U, y, K, le;
|
|
144
|
+
function ge() {
|
|
133
145
|
}
|
|
134
|
-
|
|
135
|
-
function
|
|
146
|
+
ge.__reactDisabledLog = !0;
|
|
147
|
+
function ye() {
|
|
136
148
|
{
|
|
137
|
-
if (
|
|
138
|
-
|
|
149
|
+
if (I === 0) {
|
|
150
|
+
P = console.log, B = console.info, D = console.warn, U = console.error, y = console.group, K = console.groupCollapsed, le = console.groupEnd;
|
|
139
151
|
var e = {
|
|
140
152
|
configurable: !0,
|
|
141
153
|
enumerable: !0,
|
|
142
|
-
value:
|
|
154
|
+
value: ge,
|
|
143
155
|
writable: !0
|
|
144
156
|
};
|
|
145
157
|
Object.defineProperties(console, {
|
|
@@ -152,79 +164,79 @@ function Yr() {
|
|
|
152
164
|
groupEnd: e
|
|
153
165
|
});
|
|
154
166
|
}
|
|
155
|
-
|
|
167
|
+
I++;
|
|
156
168
|
}
|
|
157
169
|
}
|
|
158
|
-
function
|
|
170
|
+
function sr() {
|
|
159
171
|
{
|
|
160
|
-
if (
|
|
172
|
+
if (I--, I === 0) {
|
|
161
173
|
var e = {
|
|
162
174
|
configurable: !0,
|
|
163
175
|
enumerable: !0,
|
|
164
176
|
writable: !0
|
|
165
177
|
};
|
|
166
178
|
Object.defineProperties(console, {
|
|
167
|
-
log:
|
|
168
|
-
value:
|
|
179
|
+
log: u({}, e, {
|
|
180
|
+
value: P
|
|
169
181
|
}),
|
|
170
|
-
info:
|
|
171
|
-
value:
|
|
182
|
+
info: u({}, e, {
|
|
183
|
+
value: B
|
|
172
184
|
}),
|
|
173
|
-
warn:
|
|
174
|
-
value:
|
|
185
|
+
warn: u({}, e, {
|
|
186
|
+
value: D
|
|
175
187
|
}),
|
|
176
|
-
error:
|
|
188
|
+
error: u({}, e, {
|
|
177
189
|
value: U
|
|
178
190
|
}),
|
|
179
|
-
group:
|
|
191
|
+
group: u({}, e, {
|
|
180
192
|
value: y
|
|
181
193
|
}),
|
|
182
|
-
groupCollapsed:
|
|
183
|
-
value:
|
|
194
|
+
groupCollapsed: u({}, e, {
|
|
195
|
+
value: K
|
|
184
196
|
}),
|
|
185
|
-
groupEnd:
|
|
186
|
-
value:
|
|
197
|
+
groupEnd: u({}, e, {
|
|
198
|
+
value: le
|
|
187
199
|
})
|
|
188
200
|
});
|
|
189
201
|
}
|
|
190
|
-
|
|
202
|
+
I < 0 && N("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
191
203
|
}
|
|
192
204
|
}
|
|
193
|
-
var
|
|
194
|
-
function
|
|
205
|
+
var je = F.ReactCurrentDispatcher, we;
|
|
206
|
+
function me(e, n, i) {
|
|
195
207
|
{
|
|
196
|
-
if (
|
|
208
|
+
if (we === void 0)
|
|
197
209
|
try {
|
|
198
210
|
throw Error();
|
|
199
211
|
} catch (C) {
|
|
200
|
-
var
|
|
201
|
-
|
|
212
|
+
var m = C.stack.trim().match(/\n( *(at )?)/);
|
|
213
|
+
we = m && m[1] || "";
|
|
202
214
|
}
|
|
203
215
|
return `
|
|
204
|
-
` +
|
|
216
|
+
` + we + e;
|
|
205
217
|
}
|
|
206
218
|
}
|
|
207
|
-
var
|
|
219
|
+
var Ee = !1, pe;
|
|
208
220
|
{
|
|
209
|
-
var
|
|
210
|
-
|
|
221
|
+
var ar = typeof WeakMap == "function" ? WeakMap : Map;
|
|
222
|
+
pe = new ar();
|
|
211
223
|
}
|
|
212
|
-
function
|
|
213
|
-
if (!e ||
|
|
224
|
+
function Re(e, n) {
|
|
225
|
+
if (!e || Ee)
|
|
214
226
|
return "";
|
|
215
227
|
{
|
|
216
|
-
var
|
|
217
|
-
if (
|
|
218
|
-
return
|
|
228
|
+
var i = pe.get(e);
|
|
229
|
+
if (i !== void 0)
|
|
230
|
+
return i;
|
|
219
231
|
}
|
|
220
|
-
var
|
|
221
|
-
|
|
232
|
+
var m;
|
|
233
|
+
Ee = !0;
|
|
222
234
|
var C = Error.prepareStackTrace;
|
|
223
235
|
Error.prepareStackTrace = void 0;
|
|
224
|
-
var
|
|
225
|
-
|
|
236
|
+
var _;
|
|
237
|
+
_ = je.current, je.current = null, ye();
|
|
226
238
|
try {
|
|
227
|
-
if (
|
|
239
|
+
if (n) {
|
|
228
240
|
var w = function() {
|
|
229
241
|
throw Error();
|
|
230
242
|
};
|
|
@@ -235,196 +247,196 @@ function Yr() {
|
|
|
235
247
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
236
248
|
try {
|
|
237
249
|
Reflect.construct(w, []);
|
|
238
|
-
} catch (
|
|
239
|
-
|
|
250
|
+
} catch (q) {
|
|
251
|
+
m = q;
|
|
240
252
|
}
|
|
241
253
|
Reflect.construct(e, [], w);
|
|
242
254
|
} else {
|
|
243
255
|
try {
|
|
244
256
|
w.call();
|
|
245
|
-
} catch (
|
|
246
|
-
|
|
257
|
+
} catch (q) {
|
|
258
|
+
m = q;
|
|
247
259
|
}
|
|
248
260
|
e.call(w.prototype);
|
|
249
261
|
}
|
|
250
262
|
} else {
|
|
251
263
|
try {
|
|
252
264
|
throw Error();
|
|
253
|
-
} catch (
|
|
254
|
-
|
|
265
|
+
} catch (q) {
|
|
266
|
+
m = q;
|
|
255
267
|
}
|
|
256
268
|
e();
|
|
257
269
|
}
|
|
258
|
-
} catch (
|
|
259
|
-
if (
|
|
260
|
-
for (var j =
|
|
261
|
-
`),
|
|
262
|
-
`),
|
|
263
|
-
|
|
264
|
-
for (;
|
|
265
|
-
if (j[
|
|
266
|
-
if (
|
|
270
|
+
} catch (q) {
|
|
271
|
+
if (q && m && typeof q.stack == "string") {
|
|
272
|
+
for (var j = q.stack.split(`
|
|
273
|
+
`), L = m.stack.split(`
|
|
274
|
+
`), $ = j.length - 1, M = L.length - 1; $ >= 1 && M >= 0 && j[$] !== L[M]; )
|
|
275
|
+
M--;
|
|
276
|
+
for (; $ >= 1 && M >= 0; $--, M--)
|
|
277
|
+
if (j[$] !== L[M]) {
|
|
278
|
+
if ($ !== 1 || M !== 1)
|
|
267
279
|
do
|
|
268
|
-
if (
|
|
280
|
+
if ($--, M--, M < 0 || j[$] !== L[M]) {
|
|
269
281
|
var V = `
|
|
270
|
-
` + j[
|
|
271
|
-
return e.displayName && V.includes("<anonymous>") && (V = V.replace("<anonymous>", e.displayName)), typeof e == "function" &&
|
|
282
|
+
` + j[$].replace(" at new ", " at ");
|
|
283
|
+
return e.displayName && V.includes("<anonymous>") && (V = V.replace("<anonymous>", e.displayName)), typeof e == "function" && pe.set(e, V), V;
|
|
272
284
|
}
|
|
273
|
-
while (
|
|
285
|
+
while ($ >= 1 && M >= 0);
|
|
274
286
|
break;
|
|
275
287
|
}
|
|
276
288
|
}
|
|
277
289
|
} finally {
|
|
278
|
-
|
|
290
|
+
Ee = !1, je.current = _, sr(), Error.prepareStackTrace = C;
|
|
279
291
|
}
|
|
280
|
-
var
|
|
281
|
-
return typeof e == "function" &&
|
|
292
|
+
var te = e ? e.displayName || e.name : "", X = te ? me(te) : "";
|
|
293
|
+
return typeof e == "function" && pe.set(e, X), X;
|
|
282
294
|
}
|
|
283
|
-
function
|
|
284
|
-
return
|
|
295
|
+
function lr(e, n, i) {
|
|
296
|
+
return Re(e, !1);
|
|
285
297
|
}
|
|
286
|
-
function
|
|
287
|
-
var
|
|
288
|
-
return !!(
|
|
298
|
+
function ir(e) {
|
|
299
|
+
var n = e.prototype;
|
|
300
|
+
return !!(n && n.isReactComponent);
|
|
289
301
|
}
|
|
290
|
-
function
|
|
302
|
+
function be(e, n, i) {
|
|
291
303
|
if (e == null)
|
|
292
304
|
return "";
|
|
293
305
|
if (typeof e == "function")
|
|
294
|
-
return
|
|
306
|
+
return Re(e, ir(e));
|
|
295
307
|
if (typeof e == "string")
|
|
296
|
-
return
|
|
308
|
+
return me(e);
|
|
297
309
|
switch (e) {
|
|
310
|
+
case E:
|
|
311
|
+
return me("Suspense");
|
|
298
312
|
case g:
|
|
299
|
-
return
|
|
300
|
-
case p:
|
|
301
|
-
return de("SuspenseList");
|
|
313
|
+
return me("SuspenseList");
|
|
302
314
|
}
|
|
303
315
|
if (typeof e == "object")
|
|
304
316
|
switch (e.$$typeof) {
|
|
305
|
-
case
|
|
306
|
-
return
|
|
307
|
-
case
|
|
308
|
-
return
|
|
309
|
-
case
|
|
310
|
-
var
|
|
317
|
+
case c:
|
|
318
|
+
return lr(e.render);
|
|
319
|
+
case v:
|
|
320
|
+
return be(e.type, n, i);
|
|
321
|
+
case h: {
|
|
322
|
+
var m = e, C = m._payload, _ = m._init;
|
|
311
323
|
try {
|
|
312
|
-
return
|
|
324
|
+
return be(_(C), n, i);
|
|
313
325
|
} catch {
|
|
314
326
|
}
|
|
315
327
|
}
|
|
316
328
|
}
|
|
317
329
|
return "";
|
|
318
330
|
}
|
|
319
|
-
var
|
|
320
|
-
function
|
|
331
|
+
var ie = Object.prototype.hasOwnProperty, Ie = {}, _e = F.ReactDebugCurrentFrame;
|
|
332
|
+
function he(e) {
|
|
321
333
|
if (e) {
|
|
322
|
-
var
|
|
323
|
-
|
|
334
|
+
var n = e._owner, i = be(e.type, e._source, n ? n.type : null);
|
|
335
|
+
_e.setExtraStackFrame(i);
|
|
324
336
|
} else
|
|
325
|
-
|
|
337
|
+
_e.setExtraStackFrame(null);
|
|
326
338
|
}
|
|
327
|
-
function
|
|
339
|
+
function or(e, n, i, m, C) {
|
|
328
340
|
{
|
|
329
|
-
var
|
|
341
|
+
var _ = Function.call.bind(ie);
|
|
330
342
|
for (var w in e)
|
|
331
|
-
if (
|
|
343
|
+
if (_(e, w)) {
|
|
332
344
|
var j = void 0;
|
|
333
345
|
try {
|
|
334
346
|
if (typeof e[w] != "function") {
|
|
335
|
-
var
|
|
336
|
-
throw
|
|
347
|
+
var L = Error((m || "React class") + ": " + i + " type `" + w + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[w] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
348
|
+
throw L.name = "Invariant Violation", L;
|
|
337
349
|
}
|
|
338
|
-
j = e[w](
|
|
339
|
-
} catch (
|
|
340
|
-
j =
|
|
350
|
+
j = e[w](n, w, m, i, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
351
|
+
} catch ($) {
|
|
352
|
+
j = $;
|
|
341
353
|
}
|
|
342
|
-
j && !(j instanceof Error) && (
|
|
354
|
+
j && !(j instanceof Error) && (he(C), N("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", m || "React class", i, w, typeof j), he(null)), j instanceof Error && !(j.message in Ie) && (Ie[j.message] = !0, he(C), N("Failed %s type: %s", i, j.message), he(null));
|
|
343
355
|
}
|
|
344
356
|
}
|
|
345
357
|
}
|
|
346
|
-
var
|
|
358
|
+
var cr = Array.isArray;
|
|
347
359
|
function Ne(e) {
|
|
348
|
-
return
|
|
360
|
+
return cr(e);
|
|
349
361
|
}
|
|
350
|
-
function
|
|
362
|
+
function dr(e) {
|
|
351
363
|
{
|
|
352
|
-
var
|
|
353
|
-
return
|
|
364
|
+
var n = typeof Symbol == "function" && Symbol.toStringTag, i = n && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
365
|
+
return i;
|
|
354
366
|
}
|
|
355
367
|
}
|
|
356
|
-
function
|
|
368
|
+
function ur(e) {
|
|
357
369
|
try {
|
|
358
|
-
return
|
|
370
|
+
return Oe(e), !1;
|
|
359
371
|
} catch {
|
|
360
372
|
return !0;
|
|
361
373
|
}
|
|
362
374
|
}
|
|
363
|
-
function
|
|
375
|
+
function Oe(e) {
|
|
364
376
|
return "" + e;
|
|
365
377
|
}
|
|
366
|
-
function
|
|
367
|
-
if (
|
|
368
|
-
return
|
|
378
|
+
function Ae(e) {
|
|
379
|
+
if (ur(e))
|
|
380
|
+
return N("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", dr(e)), Oe(e);
|
|
369
381
|
}
|
|
370
|
-
var
|
|
382
|
+
var Pe = F.ReactCurrentOwner, fr = {
|
|
371
383
|
key: !0,
|
|
372
384
|
ref: !0,
|
|
373
385
|
__self: !0,
|
|
374
386
|
__source: !0
|
|
375
|
-
},
|
|
376
|
-
function
|
|
377
|
-
if (
|
|
378
|
-
var
|
|
379
|
-
if (
|
|
387
|
+
}, De, Fe;
|
|
388
|
+
function mr(e) {
|
|
389
|
+
if (ie.call(e, "ref")) {
|
|
390
|
+
var n = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
391
|
+
if (n && n.isReactWarning)
|
|
380
392
|
return !1;
|
|
381
393
|
}
|
|
382
394
|
return e.ref !== void 0;
|
|
383
395
|
}
|
|
384
|
-
function
|
|
385
|
-
if (
|
|
386
|
-
var
|
|
387
|
-
if (
|
|
396
|
+
function pr(e) {
|
|
397
|
+
if (ie.call(e, "key")) {
|
|
398
|
+
var n = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
399
|
+
if (n && n.isReactWarning)
|
|
388
400
|
return !1;
|
|
389
401
|
}
|
|
390
402
|
return e.key !== void 0;
|
|
391
403
|
}
|
|
392
|
-
function
|
|
393
|
-
typeof e.ref == "string" &&
|
|
404
|
+
function br(e, n) {
|
|
405
|
+
typeof e.ref == "string" && Pe.current;
|
|
394
406
|
}
|
|
395
|
-
function
|
|
407
|
+
function hr(e, n) {
|
|
396
408
|
{
|
|
397
|
-
var
|
|
398
|
-
|
|
409
|
+
var i = function() {
|
|
410
|
+
De || (De = !0, N("%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://reactjs.org/link/special-props)", n));
|
|
399
411
|
};
|
|
400
|
-
|
|
401
|
-
get:
|
|
412
|
+
i.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
413
|
+
get: i,
|
|
402
414
|
configurable: !0
|
|
403
415
|
});
|
|
404
416
|
}
|
|
405
417
|
}
|
|
406
|
-
function
|
|
418
|
+
function xr(e, n) {
|
|
407
419
|
{
|
|
408
|
-
var
|
|
409
|
-
|
|
420
|
+
var i = function() {
|
|
421
|
+
Fe || (Fe = !0, N("%s: `ref` 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://reactjs.org/link/special-props)", n));
|
|
410
422
|
};
|
|
411
|
-
|
|
412
|
-
get:
|
|
423
|
+
i.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
424
|
+
get: i,
|
|
413
425
|
configurable: !0
|
|
414
426
|
});
|
|
415
427
|
}
|
|
416
428
|
}
|
|
417
|
-
var
|
|
429
|
+
var vr = function(e, n, i, m, C, _, w) {
|
|
418
430
|
var j = {
|
|
419
431
|
// This tag allows us to uniquely identify this as a React Element
|
|
420
|
-
$$typeof:
|
|
432
|
+
$$typeof: s,
|
|
421
433
|
// Built-in properties that belong on the element
|
|
422
434
|
type: e,
|
|
423
|
-
key:
|
|
424
|
-
ref:
|
|
435
|
+
key: n,
|
|
436
|
+
ref: i,
|
|
425
437
|
props: w,
|
|
426
438
|
// Record the component responsible for creating this element.
|
|
427
|
-
_owner:
|
|
439
|
+
_owner: _
|
|
428
440
|
};
|
|
429
441
|
return j._store = {}, Object.defineProperty(j._store, "validated", {
|
|
430
442
|
configurable: !1,
|
|
@@ -435,7 +447,7 @@ function Yr() {
|
|
|
435
447
|
configurable: !1,
|
|
436
448
|
enumerable: !1,
|
|
437
449
|
writable: !1,
|
|
438
|
-
value:
|
|
450
|
+
value: m
|
|
439
451
|
}), Object.defineProperty(j, "_source", {
|
|
440
452
|
configurable: !1,
|
|
441
453
|
enumerable: !1,
|
|
@@ -443,41 +455,41 @@ function Yr() {
|
|
|
443
455
|
value: C
|
|
444
456
|
}), Object.freeze && (Object.freeze(j.props), Object.freeze(j)), j;
|
|
445
457
|
};
|
|
446
|
-
function
|
|
458
|
+
function gr(e, n, i, m, C) {
|
|
447
459
|
{
|
|
448
|
-
var
|
|
449
|
-
|
|
450
|
-
for (
|
|
451
|
-
|
|
460
|
+
var _, w = {}, j = null, L = null;
|
|
461
|
+
i !== void 0 && (Ae(i), j = "" + i), pr(n) && (Ae(n.key), j = "" + n.key), mr(n) && (L = n.ref, br(n, C));
|
|
462
|
+
for (_ in n)
|
|
463
|
+
ie.call(n, _) && !fr.hasOwnProperty(_) && (w[_] = n[_]);
|
|
452
464
|
if (e && e.defaultProps) {
|
|
453
|
-
var
|
|
454
|
-
for (
|
|
455
|
-
w[
|
|
465
|
+
var $ = e.defaultProps;
|
|
466
|
+
for (_ in $)
|
|
467
|
+
w[_] === void 0 && (w[_] = $[_]);
|
|
456
468
|
}
|
|
457
|
-
if (j ||
|
|
458
|
-
var
|
|
459
|
-
j &&
|
|
469
|
+
if (j || L) {
|
|
470
|
+
var M = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
471
|
+
j && hr(w, M), L && xr(w, M);
|
|
460
472
|
}
|
|
461
|
-
return
|
|
473
|
+
return vr(e, j, L, C, m, Pe.current, w);
|
|
462
474
|
}
|
|
463
475
|
}
|
|
464
|
-
var
|
|
465
|
-
function
|
|
476
|
+
var ke = F.ReactCurrentOwner, $e = F.ReactDebugCurrentFrame;
|
|
477
|
+
function re(e) {
|
|
466
478
|
if (e) {
|
|
467
|
-
var
|
|
468
|
-
|
|
479
|
+
var n = e._owner, i = be(e.type, e._source, n ? n.type : null);
|
|
480
|
+
$e.setExtraStackFrame(i);
|
|
469
481
|
} else
|
|
470
|
-
|
|
482
|
+
$e.setExtraStackFrame(null);
|
|
471
483
|
}
|
|
472
|
-
var
|
|
473
|
-
|
|
474
|
-
function
|
|
475
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
484
|
+
var Ce;
|
|
485
|
+
Ce = !1;
|
|
486
|
+
function Se(e) {
|
|
487
|
+
return typeof e == "object" && e !== null && e.$$typeof === s;
|
|
476
488
|
}
|
|
477
|
-
function
|
|
489
|
+
function Me() {
|
|
478
490
|
{
|
|
479
|
-
if (
|
|
480
|
-
var e =
|
|
491
|
+
if (ke.current) {
|
|
492
|
+
var e = J(ke.current.type);
|
|
481
493
|
if (e)
|
|
482
494
|
return `
|
|
483
495
|
|
|
@@ -486,213 +498,207 @@ Check the render method of \`` + e + "`.";
|
|
|
486
498
|
return "";
|
|
487
499
|
}
|
|
488
500
|
}
|
|
489
|
-
function
|
|
501
|
+
function yr(e) {
|
|
490
502
|
return "";
|
|
491
503
|
}
|
|
492
|
-
var
|
|
493
|
-
function
|
|
504
|
+
var Le = {};
|
|
505
|
+
function jr(e) {
|
|
494
506
|
{
|
|
495
|
-
var
|
|
496
|
-
if (!
|
|
497
|
-
var
|
|
498
|
-
|
|
507
|
+
var n = Me();
|
|
508
|
+
if (!n) {
|
|
509
|
+
var i = typeof e == "string" ? e : e.displayName || e.name;
|
|
510
|
+
i && (n = `
|
|
499
511
|
|
|
500
|
-
Check the top-level render call using <` +
|
|
512
|
+
Check the top-level render call using <` + i + ">.");
|
|
501
513
|
}
|
|
502
|
-
return
|
|
514
|
+
return n;
|
|
503
515
|
}
|
|
504
516
|
}
|
|
505
|
-
function
|
|
517
|
+
function We(e, n) {
|
|
506
518
|
{
|
|
507
519
|
if (!e._store || e._store.validated || e.key != null)
|
|
508
520
|
return;
|
|
509
521
|
e._store.validated = !0;
|
|
510
|
-
var
|
|
511
|
-
if (
|
|
522
|
+
var i = jr(n);
|
|
523
|
+
if (Le[i])
|
|
512
524
|
return;
|
|
513
|
-
|
|
514
|
-
var
|
|
515
|
-
e && e._owner && e._owner !==
|
|
525
|
+
Le[i] = !0;
|
|
526
|
+
var m = "";
|
|
527
|
+
e && e._owner && e._owner !== ke.current && (m = " It was passed a child from " + J(e._owner.type) + "."), re(e), N('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', i, m), re(null);
|
|
516
528
|
}
|
|
517
529
|
}
|
|
518
|
-
function
|
|
530
|
+
function qe(e, n) {
|
|
519
531
|
{
|
|
520
532
|
if (typeof e != "object")
|
|
521
533
|
return;
|
|
522
534
|
if (Ne(e))
|
|
523
|
-
for (var
|
|
524
|
-
var
|
|
525
|
-
|
|
535
|
+
for (var i = 0; i < e.length; i++) {
|
|
536
|
+
var m = e[i];
|
|
537
|
+
Se(m) && We(m, n);
|
|
526
538
|
}
|
|
527
|
-
else if (
|
|
539
|
+
else if (Se(e))
|
|
528
540
|
e._store && (e._store.validated = !0);
|
|
529
541
|
else if (e) {
|
|
530
|
-
var C =
|
|
542
|
+
var C = x(e);
|
|
531
543
|
if (typeof C == "function" && C !== e.entries)
|
|
532
|
-
for (var
|
|
533
|
-
|
|
544
|
+
for (var _ = C.call(e), w; !(w = _.next()).done; )
|
|
545
|
+
Se(w.value) && We(w.value, n);
|
|
534
546
|
}
|
|
535
547
|
}
|
|
536
548
|
}
|
|
537
|
-
function
|
|
549
|
+
function wr(e) {
|
|
538
550
|
{
|
|
539
|
-
var
|
|
540
|
-
if (
|
|
551
|
+
var n = e.type;
|
|
552
|
+
if (n == null || typeof n == "string")
|
|
541
553
|
return;
|
|
542
|
-
var
|
|
543
|
-
if (typeof
|
|
544
|
-
|
|
545
|
-
else if (typeof
|
|
554
|
+
var i;
|
|
555
|
+
if (typeof n == "function")
|
|
556
|
+
i = n.propTypes;
|
|
557
|
+
else if (typeof n == "object" && (n.$$typeof === c || // Note: Memo only checks outer props here.
|
|
546
558
|
// Inner props are checked in the reconciler.
|
|
547
|
-
|
|
548
|
-
|
|
559
|
+
n.$$typeof === v))
|
|
560
|
+
i = n.propTypes;
|
|
549
561
|
else
|
|
550
562
|
return;
|
|
551
|
-
if (
|
|
552
|
-
var
|
|
553
|
-
|
|
554
|
-
} else if (
|
|
555
|
-
|
|
556
|
-
var C =
|
|
557
|
-
|
|
563
|
+
if (i) {
|
|
564
|
+
var m = J(n);
|
|
565
|
+
or(i, e.props, "prop", m, e);
|
|
566
|
+
} else if (n.PropTypes !== void 0 && !Ce) {
|
|
567
|
+
Ce = !0;
|
|
568
|
+
var C = J(n);
|
|
569
|
+
N("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", C || "Unknown");
|
|
558
570
|
}
|
|
559
|
-
typeof
|
|
571
|
+
typeof n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved && N("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
560
572
|
}
|
|
561
573
|
}
|
|
562
|
-
function
|
|
574
|
+
function Er(e) {
|
|
563
575
|
{
|
|
564
|
-
for (var
|
|
565
|
-
var
|
|
566
|
-
if (
|
|
567
|
-
|
|
576
|
+
for (var n = Object.keys(e.props), i = 0; i < n.length; i++) {
|
|
577
|
+
var m = n[i];
|
|
578
|
+
if (m !== "children" && m !== "key") {
|
|
579
|
+
re(e), N("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", m), re(null);
|
|
568
580
|
break;
|
|
569
581
|
}
|
|
570
582
|
}
|
|
571
|
-
e.ref !== null && (
|
|
583
|
+
e.ref !== null && (re(e), N("Invalid attribute `ref` supplied to `React.Fragment`."), re(null));
|
|
572
584
|
}
|
|
573
585
|
}
|
|
574
|
-
var
|
|
575
|
-
function
|
|
586
|
+
var Ye = {};
|
|
587
|
+
function Ue(e, n, i, m, C, _) {
|
|
576
588
|
{
|
|
577
|
-
var w =
|
|
589
|
+
var w = W(e);
|
|
578
590
|
if (!w) {
|
|
579
591
|
var j = "";
|
|
580
592
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (j += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
581
|
-
var
|
|
582
|
-
|
|
583
|
-
var
|
|
584
|
-
e === null ?
|
|
593
|
+
var L = yr();
|
|
594
|
+
L ? j += L : j += Me();
|
|
595
|
+
var $;
|
|
596
|
+
e === null ? $ = "null" : Ne(e) ? $ = "array" : e !== void 0 && e.$$typeof === s ? ($ = "<" + (J(e.type) || "Unknown") + " />", j = " Did you accidentally export a JSX literal instead of a component?") : $ = typeof e, N("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", $, j);
|
|
585
597
|
}
|
|
586
|
-
var
|
|
587
|
-
if (
|
|
588
|
-
return
|
|
598
|
+
var M = gr(e, n, i, C, _);
|
|
599
|
+
if (M == null)
|
|
600
|
+
return M;
|
|
589
601
|
if (w) {
|
|
590
|
-
var V =
|
|
602
|
+
var V = n.children;
|
|
591
603
|
if (V !== void 0)
|
|
592
|
-
if (
|
|
604
|
+
if (m)
|
|
593
605
|
if (Ne(V)) {
|
|
594
|
-
for (var
|
|
595
|
-
|
|
606
|
+
for (var te = 0; te < V.length; te++)
|
|
607
|
+
qe(V[te], e);
|
|
596
608
|
Object.freeze && Object.freeze(V);
|
|
597
609
|
} else
|
|
598
|
-
|
|
610
|
+
N("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
599
611
|
else
|
|
600
|
-
|
|
612
|
+
qe(V, e);
|
|
601
613
|
}
|
|
602
|
-
if (
|
|
603
|
-
var
|
|
604
|
-
return
|
|
605
|
-
}),
|
|
606
|
-
if (!
|
|
607
|
-
var
|
|
608
|
-
|
|
614
|
+
if (ie.call(n, "key")) {
|
|
615
|
+
var X = J(e), q = Object.keys(n).filter(function(Rr) {
|
|
616
|
+
return Rr !== "key";
|
|
617
|
+
}), Te = q.length > 0 ? "{key: someKey, " + q.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
618
|
+
if (!Ye[X + Te]) {
|
|
619
|
+
var Tr = q.length > 0 ? "{" + q.join(": ..., ") + ": ...}" : "{}";
|
|
620
|
+
N(`A props object containing a "key" prop is being spread into JSX:
|
|
609
621
|
let props = %s;
|
|
610
622
|
<%s {...props} />
|
|
611
623
|
React keys must be passed directly to JSX without using spread:
|
|
612
624
|
let props = %s;
|
|
613
|
-
<%s key={someKey} {...props} />`,
|
|
625
|
+
<%s key={someKey} {...props} />`, Te, X, Tr, X), Ye[X + Te] = !0;
|
|
614
626
|
}
|
|
615
627
|
}
|
|
616
|
-
return e ===
|
|
628
|
+
return e === o ? Er(M) : wr(M), M;
|
|
617
629
|
}
|
|
618
630
|
}
|
|
619
|
-
function
|
|
620
|
-
return
|
|
631
|
+
function Nr(e, n, i) {
|
|
632
|
+
return Ue(e, n, i, !0);
|
|
621
633
|
}
|
|
622
|
-
function
|
|
623
|
-
return
|
|
634
|
+
function kr(e, n, i) {
|
|
635
|
+
return Ue(e, n, i, !1);
|
|
624
636
|
}
|
|
625
|
-
var
|
|
626
|
-
|
|
627
|
-
})()),
|
|
637
|
+
var Cr = kr, Sr = Nr;
|
|
638
|
+
ce.Fragment = o, ce.jsx = Cr, ce.jsxs = Sr;
|
|
639
|
+
})()), ce;
|
|
628
640
|
}
|
|
629
|
-
var
|
|
630
|
-
function
|
|
631
|
-
return
|
|
641
|
+
var Je;
|
|
642
|
+
function Br() {
|
|
643
|
+
return Je || (Je = 1, process.env.NODE_ENV === "production" ? xe.exports = Yr() : xe.exports = Ur()), xe.exports;
|
|
632
644
|
}
|
|
633
|
-
var r =
|
|
634
|
-
function
|
|
645
|
+
var r = Br();
|
|
646
|
+
function er({
|
|
635
647
|
open: t,
|
|
636
|
-
onClose:
|
|
637
|
-
data:
|
|
638
|
-
title:
|
|
639
|
-
placement:
|
|
648
|
+
onClose: s,
|
|
649
|
+
data: a,
|
|
650
|
+
title: o = "Data Viewer",
|
|
651
|
+
placement: d = "center",
|
|
640
652
|
// "center" | "bottom"
|
|
641
|
-
pretty:
|
|
642
|
-
defaultMode:
|
|
653
|
+
pretty: f = 2,
|
|
654
|
+
defaultMode: p = "yaml",
|
|
643
655
|
// "json" | "yaml"
|
|
644
|
-
fileBaseName:
|
|
645
|
-
contentClassName:
|
|
656
|
+
fileBaseName: l = "form-data",
|
|
657
|
+
contentClassName: c = ""
|
|
646
658
|
}) {
|
|
647
|
-
const
|
|
648
|
-
const
|
|
659
|
+
const E = d === "center", [g, v] = k.useState(p === "yaml" ? "yaml" : "json"), h = k.useMemo(() => {
|
|
660
|
+
const x = Math.max(2, f | 0);
|
|
649
661
|
try {
|
|
650
|
-
return
|
|
651
|
-
indent: N,
|
|
652
|
-
lineWidth: 80,
|
|
653
|
-
noRefs: !0,
|
|
654
|
-
forceQuotes: !0,
|
|
655
|
-
skipInvalid: !0
|
|
656
|
-
}) : JSON.stringify(s ?? {}, null, N);
|
|
662
|
+
return g === "yaml" ? qr.dump(a ?? {}, { indent: x, lineWidth: 80, noRefs: !0, forceQuotes: !0, skipInvalid: !0 }) : JSON.stringify(a ?? {}, null, x);
|
|
657
663
|
} catch {
|
|
658
|
-
return
|
|
664
|
+
return g === "yaml" ? "# Failed to render YAML" : String(a);
|
|
659
665
|
}
|
|
660
|
-
}, [
|
|
661
|
-
|
|
662
|
-
const
|
|
663
|
-
|
|
664
|
-
},
|
|
665
|
-
|
|
666
|
+
}, [a, g, f]), T = (x) => x.stopPropagation(), b = (x) => {
|
|
667
|
+
T(x);
|
|
668
|
+
const F = g === "yaml", N = new Blob([h], { type: F ? "text/yaml" : "application/json" }), R = URL.createObjectURL(N), S = document.createElement("a");
|
|
669
|
+
S.href = R, S.download = `${l}.${F ? "yml" : "json"}`, S.click(), URL.revokeObjectURL(R);
|
|
670
|
+
}, O = async (x) => {
|
|
671
|
+
T(x);
|
|
666
672
|
try {
|
|
667
|
-
await navigator.clipboard.writeText(
|
|
673
|
+
await navigator.clipboard.writeText(h);
|
|
668
674
|
} catch {
|
|
669
675
|
}
|
|
670
676
|
};
|
|
671
677
|
return /* @__PURE__ */ r.jsx(Wr, { children: t && /* @__PURE__ */ r.jsx(
|
|
672
|
-
|
|
678
|
+
Q.div,
|
|
673
679
|
{
|
|
674
680
|
className: "fixed inset-0 z-[60] flex items-center justify-center",
|
|
675
681
|
initial: { opacity: 0 },
|
|
676
682
|
animate: { opacity: 1 },
|
|
677
683
|
exit: { opacity: 0 },
|
|
678
|
-
onMouseDown:
|
|
684
|
+
onMouseDown: s,
|
|
679
685
|
"aria-modal": "true",
|
|
680
686
|
role: "dialog",
|
|
681
687
|
children: /* @__PURE__ */ r.jsx("div", { className: "w-full h-full flex items-end sm:items-center justify-center sm:max-w-4xl", children: /* @__PURE__ */ r.jsxs(
|
|
682
|
-
|
|
688
|
+
Q.div,
|
|
683
689
|
{
|
|
684
|
-
onMouseDown:
|
|
685
|
-
initial: { y:
|
|
690
|
+
onMouseDown: T,
|
|
691
|
+
initial: { y: E ? 20 : "100%", opacity: E ? 0 : 1, scale: E ? 0.98 : 1 },
|
|
686
692
|
animate: { y: 0, opacity: 1, scale: 1 },
|
|
687
|
-
exit: { y:
|
|
693
|
+
exit: { y: E ? 20 : "100%", opacity: E ? 0 : 1, scale: E ? 0.98 : 1 },
|
|
688
694
|
transition: { type: "spring", stiffness: 160, damping: 20 },
|
|
689
|
-
className:
|
|
695
|
+
className: E ? "w-full sm:max-w-2xl sm:rounded-2xl rounded-t-2xl bg-white shadow-lg border border-black/10 max-h-[80vh] overflow-hidden" : "w-full mx-auto bg-black/5 border border-black/15 px-6 py-4 rounded-2xl backdrop-blur-xl overflow-hidden",
|
|
690
696
|
children: [
|
|
691
|
-
/* @__PURE__ */ r.jsxs("div", { className: `flex items-center justify-between ${
|
|
697
|
+
/* @__PURE__ */ r.jsxs("div", { className: `flex items-center justify-between ${E ? "px-4 py-3 border-b border-black/10" : ""}`, children: [
|
|
692
698
|
/* @__PURE__ */ r.jsxs("h3", { className: "font-semibold", children: [
|
|
693
|
-
|
|
699
|
+
o,
|
|
694
700
|
" (",
|
|
695
|
-
|
|
701
|
+
g.toUpperCase(),
|
|
696
702
|
")"
|
|
697
703
|
] }),
|
|
698
704
|
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -700,10 +706,10 @@ function nr({
|
|
|
700
706
|
/* @__PURE__ */ r.jsx(
|
|
701
707
|
"button",
|
|
702
708
|
{
|
|
703
|
-
className: `px-3 py-1 text-sm ${
|
|
704
|
-
"aria-pressed":
|
|
705
|
-
onClick: (
|
|
706
|
-
|
|
709
|
+
className: `px-3 py-1 text-sm ${g === "yaml" ? "bg-black/6" : "bg-gray-200 hover:bg-black/5"}`,
|
|
710
|
+
"aria-pressed": g === "yaml",
|
|
711
|
+
onClick: (x) => {
|
|
712
|
+
T(x), v("yaml");
|
|
707
713
|
},
|
|
708
714
|
children: "YAML"
|
|
709
715
|
}
|
|
@@ -711,48 +717,81 @@ function nr({
|
|
|
711
717
|
/* @__PURE__ */ r.jsx(
|
|
712
718
|
"button",
|
|
713
719
|
{
|
|
714
|
-
className: `px-3 py-1 text-sm ${
|
|
715
|
-
"aria-pressed":
|
|
716
|
-
onClick: (
|
|
717
|
-
|
|
720
|
+
className: `px-3 py-1 text-sm ${g === "json" ? "bg-black/6" : "bg-gray-200 hover:bg-black/5"}`,
|
|
721
|
+
"aria-pressed": g === "json",
|
|
722
|
+
onClick: (x) => {
|
|
723
|
+
T(x), v("json");
|
|
718
724
|
},
|
|
719
725
|
children: "JSON"
|
|
720
726
|
}
|
|
721
727
|
)
|
|
722
728
|
] }),
|
|
723
|
-
/* @__PURE__ */ r.jsx("button", { className: "px-3 py-1 rounded-lg border border-black/10 hover:bg-black/5 text-sm", onClick:
|
|
724
|
-
/* @__PURE__ */ r.jsx("button", { className: "px-3 py-1 rounded-lg border border-black/10 hover:bg-black/5 text-sm", onClick:
|
|
729
|
+
/* @__PURE__ */ r.jsx("button", { className: "px-3 py-1 rounded-lg border border-black/10 hover:bg-black/5 text-sm", onClick: O, children: "Copy" }),
|
|
730
|
+
/* @__PURE__ */ r.jsx("button", { className: "px-3 py-1 rounded-lg border border-black/10 hover:bg-black/5 text-sm", onClick: b, children: "Download" }),
|
|
725
731
|
/* @__PURE__ */ r.jsx(
|
|
726
732
|
"button",
|
|
727
733
|
{
|
|
728
734
|
className: "px-3 py-1 rounded-lg border border-black/10 hover:bg-black/5 text-sm",
|
|
729
|
-
onClick: (
|
|
730
|
-
|
|
735
|
+
onClick: (x) => {
|
|
736
|
+
T(x), s == null || s();
|
|
731
737
|
},
|
|
732
738
|
children: "Close"
|
|
733
739
|
}
|
|
734
740
|
)
|
|
735
741
|
] })
|
|
736
742
|
] }),
|
|
737
|
-
/* @__PURE__ */ r.jsx("div", { className:
|
|
743
|
+
/* @__PURE__ */ r.jsx("div", { className: E ? `p-4 overflow-auto max-h-[70vh] ${c}` : `mt-2 p-2 rounded-lg overflow-y-auto max-h-96 ${c}`, children: /* @__PURE__ */ r.jsx("pre", { className: "whitespace-pre-wrap break-words text-sm text-gray-700", children: h }) })
|
|
738
744
|
]
|
|
739
745
|
}
|
|
740
746
|
) })
|
|
741
747
|
}
|
|
742
748
|
) });
|
|
743
749
|
}
|
|
744
|
-
function
|
|
745
|
-
const [t,
|
|
750
|
+
function Vr() {
|
|
751
|
+
const [t, s] = ne(!1), [a, o] = ne(!1), [d, f] = ne(null), p = Y((x) => x.replaceAll), l = Qe(), c = ee(), E = c.state.isPreview, g = (x, F) => {
|
|
746
752
|
try {
|
|
747
|
-
const
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
753
|
+
const N = String(x).replace(/^\uFEFF/, "").trim(), R = JSON.parse(N);
|
|
754
|
+
let S, A = null;
|
|
755
|
+
if (F === "surveyjs") {
|
|
756
|
+
const H = Ir(R, "surveyjs");
|
|
757
|
+
if (S = H.fields || H, A = H.conversionReport, A) {
|
|
758
|
+
c.setConversionReport(A), console.log("[Editor] SurveyJS schema converted:", {
|
|
759
|
+
totalElements: A.totalElements,
|
|
760
|
+
convertedFields: A.convertedFields,
|
|
761
|
+
droppedFields: A.droppedFields.length,
|
|
762
|
+
warnings: A.warnings.length
|
|
763
|
+
});
|
|
764
|
+
const se = [
|
|
765
|
+
`✅ Converted ${A.convertedFields} of ${A.totalElements} fields`,
|
|
766
|
+
A.droppedFields.length > 0 ? `⚠️ Dropped ${A.droppedFields.length} unsupported fields` : null,
|
|
767
|
+
A.warnings.length > 0 ? `⚠️ ${A.warnings.length} conversion warnings (check console)` : null
|
|
768
|
+
].filter(Boolean).join(`
|
|
769
|
+
`);
|
|
770
|
+
if (alert(`SurveyJS Import Complete:
|
|
771
|
+
|
|
772
|
+
${se}`), A.warnings.length > 0) {
|
|
773
|
+
const z = A.warnings.filter((W) => W.impact === "high"), G = A.warnings.filter((W) => W.impact === "medium");
|
|
774
|
+
z.length > 0 && console.warn(`⚠️ HIGH IMPACT (${z.length}):`, z), G.length > 0 && console.warn(`⚠️ MEDIUM IMPACT (${G.length}):`, G);
|
|
775
|
+
}
|
|
776
|
+
A.droppedFields.length > 0 && console.error("❌ DROPPED FIELDS:", A.droppedFields);
|
|
777
|
+
}
|
|
778
|
+
} else
|
|
779
|
+
S = Array.isArray(R) ? R : R == null ? void 0 : R.fields;
|
|
780
|
+
if (!Array.isArray(S))
|
|
781
|
+
throw new Error("Expected array of fields or { fields: [] }");
|
|
782
|
+
p(S), c.selectedFieldId.clear(), c.preview.set(!1);
|
|
783
|
+
} catch (N) {
|
|
784
|
+
alert((N == null ? void 0 : N.message) || "Invalid JSON format");
|
|
752
785
|
}
|
|
753
|
-
},
|
|
786
|
+
}, v = (x) => {
|
|
787
|
+
f(x), o(!0);
|
|
788
|
+
}, h = (x) => {
|
|
789
|
+
d && g(d, x), o(!1), f(null);
|
|
790
|
+
}, T = () => {
|
|
791
|
+
o(!1), f(null);
|
|
792
|
+
}, b = () => {
|
|
754
793
|
c.preview.set(!0), c.selectedFieldId.clear();
|
|
755
|
-
},
|
|
794
|
+
}, O = () => {
|
|
756
795
|
c.preview.set(!1);
|
|
757
796
|
};
|
|
758
797
|
return /* @__PURE__ */ r.jsxs("header", { className: "sticky top-0 z-49 bg-transparent mx-auto", children: [
|
|
@@ -765,16 +804,16 @@ function Br() {
|
|
|
765
804
|
/* @__PURE__ */ r.jsx(
|
|
766
805
|
"button",
|
|
767
806
|
{
|
|
768
|
-
className: `py-3 rounded-xl text-sm font-medium ${
|
|
769
|
-
onClick:
|
|
807
|
+
className: `py-3 rounded-xl text-sm font-medium ${E ? "" : "bg-black/10"}`,
|
|
808
|
+
onClick: O,
|
|
770
809
|
children: "Builder"
|
|
771
810
|
}
|
|
772
811
|
),
|
|
773
812
|
/* @__PURE__ */ r.jsx(
|
|
774
813
|
"button",
|
|
775
814
|
{
|
|
776
|
-
className: `py-3 rounded-xl text-sm font-medium ${
|
|
777
|
-
onClick:
|
|
815
|
+
className: `py-3 rounded-xl text-sm font-medium ${E ? "bg-black/10" : ""}`,
|
|
816
|
+
onClick: b,
|
|
778
817
|
children: "Preview"
|
|
779
818
|
}
|
|
780
819
|
)
|
|
@@ -788,15 +827,15 @@ function Br() {
|
|
|
788
827
|
className: "hidden",
|
|
789
828
|
type: "file",
|
|
790
829
|
accept: ".json,application/json",
|
|
791
|
-
onChange: (
|
|
792
|
-
var
|
|
793
|
-
const
|
|
794
|
-
if (!
|
|
795
|
-
const
|
|
796
|
-
|
|
797
|
-
var
|
|
798
|
-
return
|
|
799
|
-
},
|
|
830
|
+
onChange: (x) => {
|
|
831
|
+
var R;
|
|
832
|
+
const F = (R = x.target.files) == null ? void 0 : R[0];
|
|
833
|
+
if (!F) return;
|
|
834
|
+
const N = new FileReader();
|
|
835
|
+
N.onload = (S) => {
|
|
836
|
+
var A;
|
|
837
|
+
return v(((A = S.target) == null ? void 0 : A.result) ?? "");
|
|
838
|
+
}, N.readAsText(F), x.target.value = "";
|
|
800
839
|
}
|
|
801
840
|
}
|
|
802
841
|
)
|
|
@@ -805,109 +844,153 @@ function Br() {
|
|
|
805
844
|
"button",
|
|
806
845
|
{
|
|
807
846
|
className: "px-4 py-2 rounded-xl border border-black/15 bg-white hover:bg-black/5 text-sm",
|
|
808
|
-
onClick: () =>
|
|
847
|
+
onClick: () => s(!0),
|
|
809
848
|
children: "Data Viewer"
|
|
810
849
|
}
|
|
811
850
|
)
|
|
812
851
|
] })
|
|
813
852
|
] }),
|
|
814
853
|
/* @__PURE__ */ r.jsx(
|
|
815
|
-
|
|
854
|
+
er,
|
|
816
855
|
{
|
|
817
856
|
open: t,
|
|
818
|
-
onClose: () =>
|
|
819
|
-
data:
|
|
857
|
+
onClose: () => s(!1),
|
|
858
|
+
data: l,
|
|
820
859
|
title: "Form Data",
|
|
821
860
|
placement: "bottom",
|
|
822
861
|
contentClassName: "custom-scrollbar"
|
|
823
862
|
}
|
|
824
|
-
)
|
|
863
|
+
),
|
|
864
|
+
a && /* @__PURE__ */ r.jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4", children: /* @__PURE__ */ r.jsxs("div", { className: "bg-white rounded-2xl shadow-2xl max-w-md w-full p-6", children: [
|
|
865
|
+
/* @__PURE__ */ r.jsxs("div", { className: "mb-6", children: [
|
|
866
|
+
/* @__PURE__ */ r.jsx("h3", { className: "text-xl font-semibold text-slate-900 mb-2", children: "Select Schema Type" }),
|
|
867
|
+
/* @__PURE__ */ r.jsx("p", { className: "text-sm text-slate-600", children: "Choose the format of the file you're importing" })
|
|
868
|
+
] }),
|
|
869
|
+
/* @__PURE__ */ r.jsxs("div", { className: "space-y-3 mb-6", children: [
|
|
870
|
+
/* @__PURE__ */ r.jsx(
|
|
871
|
+
"button",
|
|
872
|
+
{
|
|
873
|
+
onClick: () => h("inhouse"),
|
|
874
|
+
className: "w-full text-left p-4 rounded-xl border-2 border-slate-200 hover:border-blue-500 hover:bg-blue-50 transition-all group",
|
|
875
|
+
children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
876
|
+
/* @__PURE__ */ r.jsx("div", { className: "w-5 h-5 rounded-full border-2 border-slate-300 group-hover:border-blue-500 flex items-center justify-center flex-shrink-0 mt-0.5", children: /* @__PURE__ */ r.jsx("div", { className: "w-2.5 h-2.5 rounded-full bg-transparent group-hover:bg-blue-500" }) }),
|
|
877
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex-1", children: [
|
|
878
|
+
/* @__PURE__ */ r.jsx("div", { className: "font-semibold text-slate-900 mb-1", children: "Default Schema" }),
|
|
879
|
+
/* @__PURE__ */ r.jsx("div", { className: "text-sm text-slate-600", children: "Our internal questionnaire format" })
|
|
880
|
+
] })
|
|
881
|
+
] })
|
|
882
|
+
}
|
|
883
|
+
),
|
|
884
|
+
/* @__PURE__ */ r.jsx(
|
|
885
|
+
"button",
|
|
886
|
+
{
|
|
887
|
+
onClick: () => h("surveyjs"),
|
|
888
|
+
className: "w-full text-left p-4 rounded-xl border-2 border-slate-200 hover:border-purple-500 hover:bg-purple-50 transition-all group",
|
|
889
|
+
children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
890
|
+
/* @__PURE__ */ r.jsx("div", { className: "w-5 h-5 rounded-full border-2 border-slate-300 group-hover:border-purple-500 flex items-center justify-center flex-shrink-0 mt-0.5", children: /* @__PURE__ */ r.jsx("div", { className: "w-2.5 h-2.5 rounded-full bg-transparent group-hover:bg-purple-500" }) }),
|
|
891
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex-1", children: [
|
|
892
|
+
/* @__PURE__ */ r.jsx("div", { className: "font-semibold text-slate-900 mb-1", children: "SurveyJS Schema" }),
|
|
893
|
+
/* @__PURE__ */ r.jsx("div", { className: "text-sm text-slate-600", children: "Will be converted to our internal format" })
|
|
894
|
+
] })
|
|
895
|
+
] })
|
|
896
|
+
}
|
|
897
|
+
)
|
|
898
|
+
] }),
|
|
899
|
+
/* @__PURE__ */ r.jsx(
|
|
900
|
+
"button",
|
|
901
|
+
{
|
|
902
|
+
onClick: T,
|
|
903
|
+
className: "w-full px-4 py-2.5 rounded-xl border border-slate-300 bg-white hover:bg-slate-50 text-slate-700 font-medium text-sm transition-colors",
|
|
904
|
+
children: "Cancel"
|
|
905
|
+
}
|
|
906
|
+
)
|
|
907
|
+
] }) })
|
|
825
908
|
] });
|
|
826
909
|
}
|
|
827
910
|
function Jr() {
|
|
828
|
-
const [t,
|
|
829
|
-
|
|
830
|
-
},
|
|
831
|
-
|
|
832
|
-
},
|
|
833
|
-
|
|
911
|
+
const [t, s] = ne(!1), [a, o] = ne(!1), d = Xe(null), f = Y((h) => h.addField), p = Qe(), l = ee(), c = l.state.isPreview, E = () => {
|
|
912
|
+
s((h) => !h), o(!1);
|
|
913
|
+
}, g = () => {
|
|
914
|
+
o((h) => !h), s(!1);
|
|
915
|
+
}, v = () => {
|
|
916
|
+
l.preview.toggle(), s(!1), o(!1);
|
|
834
917
|
};
|
|
835
|
-
return
|
|
836
|
-
if (!t ||
|
|
837
|
-
const
|
|
838
|
-
const
|
|
839
|
-
|
|
918
|
+
return Z(() => {
|
|
919
|
+
if (!t || a) return;
|
|
920
|
+
const h = (T) => {
|
|
921
|
+
const b = d.current;
|
|
922
|
+
b && !b.contains(T.target) && (s(!1), o(!1));
|
|
840
923
|
};
|
|
841
|
-
return document.addEventListener("pointerdown",
|
|
842
|
-
}, [t,
|
|
924
|
+
return document.addEventListener("pointerdown", h), () => document.removeEventListener("pointerdown", h);
|
|
925
|
+
}, [t, a]), /* @__PURE__ */ r.jsxs("div", { className: "MobileToolBar fixed bottom-0 left-0 w-full text-stone-900 shadow-lg z-10", children: [
|
|
843
926
|
/* @__PURE__ */ r.jsxs(
|
|
844
|
-
|
|
927
|
+
Q.div,
|
|
845
928
|
{
|
|
846
929
|
initial: { y: "100%" },
|
|
847
930
|
animate: { y: "0%" },
|
|
848
931
|
transition: { duration: 0.8, ease: [0.25, 0.1, 0.25, 1] },
|
|
849
|
-
className: `flex ${
|
|
932
|
+
className: `flex ${c ? "justify-center" : "justify-around"} pb-5 max-w-xl sm:max-w-4xl mx-auto`,
|
|
850
933
|
children: [
|
|
851
934
|
/* @__PURE__ */ r.jsx(
|
|
852
|
-
|
|
935
|
+
Q.button,
|
|
853
936
|
{
|
|
854
|
-
onClick:
|
|
937
|
+
onClick: v,
|
|
855
938
|
initial: { opacity: 1, scale: 1, x: "0%" },
|
|
856
939
|
animate: {
|
|
857
|
-
opacity: t ||
|
|
858
|
-
scale: t ||
|
|
859
|
-
x:
|
|
940
|
+
opacity: t || a ? 0 : 1,
|
|
941
|
+
scale: t || a ? 0 : 1,
|
|
942
|
+
x: c ? "120%" : "0%"
|
|
860
943
|
},
|
|
861
|
-
className: `relative cursor-pointer ${
|
|
862
|
-
children:
|
|
944
|
+
className: `relative cursor-pointer ${c ? "mx-29" : ""} bg-black/5 rounded-2xl p-3 backdrop-blur-xl`,
|
|
945
|
+
children: c ? /* @__PURE__ */ r.jsx(Or, { className: "h-12 w-12" }) : /* @__PURE__ */ r.jsx(_r, { className: "h-12 w-12" })
|
|
863
946
|
}
|
|
864
947
|
),
|
|
865
|
-
!
|
|
866
|
-
|
|
948
|
+
!c && /* @__PURE__ */ r.jsx(
|
|
949
|
+
Q.button,
|
|
867
950
|
{
|
|
868
|
-
onClick:
|
|
951
|
+
onClick: E,
|
|
869
952
|
initial: { opacity: 1, scale: 1 },
|
|
870
953
|
animate: {
|
|
871
|
-
opacity: t ||
|
|
872
|
-
scale: t ||
|
|
954
|
+
opacity: t || a ? 0 : 1,
|
|
955
|
+
scale: t || a ? 0 : 1
|
|
873
956
|
},
|
|
874
957
|
className: "relative cursor-pointer bg-black/5 rounded-2xl p-3 backdrop-blur-xl",
|
|
875
|
-
children: /* @__PURE__ */ r.jsx(
|
|
958
|
+
children: /* @__PURE__ */ r.jsx(Ar, { className: "h-12 w-12" })
|
|
876
959
|
}
|
|
877
960
|
),
|
|
878
961
|
/* @__PURE__ */ r.jsx(
|
|
879
|
-
|
|
962
|
+
Q.button,
|
|
880
963
|
{
|
|
881
|
-
onClick:
|
|
964
|
+
onClick: g,
|
|
882
965
|
initial: { opacity: 1, scale: 1, x: "0%" },
|
|
883
966
|
animate: {
|
|
884
|
-
opacity:
|
|
885
|
-
scale:
|
|
886
|
-
x:
|
|
967
|
+
opacity: a || t ? 0 : 1,
|
|
968
|
+
scale: a || t ? 0 : 1,
|
|
969
|
+
x: c ? "-120%" : "0%"
|
|
887
970
|
},
|
|
888
|
-
className: `relative cursor-pointer ${
|
|
889
|
-
children: /* @__PURE__ */ r.jsx(
|
|
971
|
+
className: `relative cursor-pointer ${c ? "mx-29" : ""} bg-black/5 rounded-2xl p-3 backdrop-blur-xl`,
|
|
972
|
+
children: /* @__PURE__ */ r.jsx(Pr, { className: "h-12 w-12" })
|
|
890
973
|
}
|
|
891
974
|
)
|
|
892
975
|
]
|
|
893
976
|
}
|
|
894
977
|
),
|
|
895
978
|
/* @__PURE__ */ r.jsx(
|
|
896
|
-
|
|
979
|
+
er,
|
|
897
980
|
{
|
|
898
|
-
open:
|
|
899
|
-
onClose: () =>
|
|
900
|
-
data:
|
|
981
|
+
open: a,
|
|
982
|
+
onClose: () => o(!1),
|
|
983
|
+
data: p,
|
|
901
984
|
title: "Form Data",
|
|
902
985
|
placement: "bottom",
|
|
903
986
|
contentClassName: "custom-scrollbar"
|
|
904
987
|
}
|
|
905
988
|
),
|
|
906
989
|
/* @__PURE__ */ r.jsx(
|
|
907
|
-
|
|
990
|
+
Q.div,
|
|
908
991
|
{
|
|
909
|
-
ref:
|
|
910
|
-
onPointerDown: (
|
|
992
|
+
ref: d,
|
|
993
|
+
onPointerDown: (h) => h.stopPropagation(),
|
|
911
994
|
initial: { opacity: 0, y: "100%", scale: 0 },
|
|
912
995
|
animate: {
|
|
913
996
|
opacity: t ? 1 : 0,
|
|
@@ -917,108 +1000,108 @@ function Jr() {
|
|
|
917
1000
|
transition: { type: "spring", stiffness: 150, damping: 20 },
|
|
918
1001
|
className: "MobileToolBar-Modal fixed bottom-0 w-full mx-auto bg-black/5 border-black/15 border px-9 py-4 mb-2 rounded-2xl backdrop-blur-xl overflow-y-scroll",
|
|
919
1002
|
children: /* @__PURE__ */ r.jsxs("div", { className: "grid grid-cols-1 gap-2", children: [
|
|
920
|
-
/* @__PURE__ */ r.jsx("button", { className: "flex w-full justify-end", onClick: () =>
|
|
921
|
-
Object.keys(
|
|
1003
|
+
/* @__PURE__ */ r.jsx("button", { className: "flex w-full justify-end", onClick: () => s(!1), children: /* @__PURE__ */ r.jsx(Dr, {}) }),
|
|
1004
|
+
Object.keys(ue).map((h) => /* @__PURE__ */ r.jsxs(
|
|
922
1005
|
"button",
|
|
923
1006
|
{
|
|
924
1007
|
className: "px-4 pl-6 py-2 text-black text-left rounded hover:bg-slate-50",
|
|
925
1008
|
onClick: () => {
|
|
926
|
-
h
|
|
1009
|
+
f(h), s(!1);
|
|
927
1010
|
},
|
|
928
1011
|
children: [
|
|
929
1012
|
"Add ",
|
|
930
|
-
|
|
1013
|
+
ue[h].label
|
|
931
1014
|
]
|
|
932
1015
|
},
|
|
933
|
-
|
|
1016
|
+
h
|
|
934
1017
|
))
|
|
935
1018
|
] })
|
|
936
1019
|
}
|
|
937
1020
|
)
|
|
938
1021
|
] });
|
|
939
1022
|
}
|
|
940
|
-
const
|
|
1023
|
+
const ze = Object.entries(ue).map(([t, s]) => ({
|
|
941
1024
|
type: t,
|
|
942
|
-
label:
|
|
1025
|
+
label: s.label
|
|
943
1026
|
})), zr = ({ isPreview: t = !1 }) => {
|
|
944
1027
|
if (t) return null;
|
|
945
|
-
const
|
|
946
|
-
const
|
|
947
|
-
for (const { type:
|
|
948
|
-
return
|
|
949
|
-
}, [
|
|
1028
|
+
const s = Y((o) => o.addField), a = de(() => {
|
|
1029
|
+
const o = {};
|
|
1030
|
+
for (const { type: d } of ze) o[d] = () => s(d);
|
|
1031
|
+
return o;
|
|
1032
|
+
}, [s]);
|
|
950
1033
|
return /* @__PURE__ */ r.jsxs("div", { className: "p-4 bg-white border border-gray-200 rounded-lg shadow-sm", children: [
|
|
951
1034
|
/* @__PURE__ */ r.jsx("h3", { className: "text-lg font-semibold mb-3", children: "Tools" }),
|
|
952
|
-
/* @__PURE__ */ r.jsx("div", { className: "grid grid-cols-1 gap-2", children:
|
|
1035
|
+
/* @__PURE__ */ r.jsx("div", { className: "grid grid-cols-1 gap-2", children: ze.map(({ type: o, label: d }) => /* @__PURE__ */ r.jsxs(
|
|
953
1036
|
"button",
|
|
954
1037
|
{
|
|
955
1038
|
className: "px-3 py-2 text-left border border-black/10 rounded-md hover:bg-slate-50",
|
|
956
|
-
onClick:
|
|
1039
|
+
onClick: a[o],
|
|
957
1040
|
children: [
|
|
958
1041
|
"Add ",
|
|
959
|
-
|
|
1042
|
+
d
|
|
960
1043
|
]
|
|
961
1044
|
},
|
|
962
|
-
|
|
1045
|
+
o
|
|
963
1046
|
)) })
|
|
964
1047
|
] });
|
|
965
|
-
}, Gr =
|
|
966
|
-
function
|
|
1048
|
+
}, Gr = k.memo(zr, (t, s) => t.isPreview === s.isPreview);
|
|
1049
|
+
function rr({
|
|
967
1050
|
id: t = "",
|
|
968
|
-
label:
|
|
969
|
-
onCommit:
|
|
970
|
-
validate:
|
|
971
|
-
placeholder:
|
|
972
|
-
className:
|
|
1051
|
+
label: s = "ID",
|
|
1052
|
+
onCommit: a,
|
|
1053
|
+
validate: o,
|
|
1054
|
+
placeholder: d = "Enter unique ID…",
|
|
1055
|
+
className: f = ""
|
|
973
1056
|
}) {
|
|
974
|
-
const [
|
|
975
|
-
|
|
976
|
-
|
|
1057
|
+
const [p, l] = k.useState(t ?? ""), [c, E] = k.useState("");
|
|
1058
|
+
k.useEffect(() => {
|
|
1059
|
+
l(t ?? ""), E("");
|
|
977
1060
|
}, [t]);
|
|
978
|
-
const
|
|
979
|
-
const
|
|
980
|
-
if (!
|
|
981
|
-
|
|
1061
|
+
const g = k.useCallback(() => {
|
|
1062
|
+
const v = String(p ?? "").trim();
|
|
1063
|
+
if (!v) {
|
|
1064
|
+
E("ID cannot be empty."), l(t ?? "");
|
|
982
1065
|
return;
|
|
983
1066
|
}
|
|
984
|
-
if (
|
|
985
|
-
if (typeof
|
|
986
|
-
const
|
|
987
|
-
if (
|
|
988
|
-
|
|
1067
|
+
if (v !== (t ?? "")) {
|
|
1068
|
+
if (typeof o == "function") {
|
|
1069
|
+
const h = o(v, t ?? "");
|
|
1070
|
+
if (h) {
|
|
1071
|
+
E(h);
|
|
989
1072
|
return;
|
|
990
1073
|
}
|
|
991
1074
|
}
|
|
992
|
-
|
|
1075
|
+
a == null || a(v);
|
|
993
1076
|
}
|
|
994
|
-
}, [
|
|
995
|
-
return /* @__PURE__ */ r.jsxs("div", { className:
|
|
996
|
-
/* @__PURE__ */ r.jsx("label", { className: "block text-sm mb-1", children:
|
|
1077
|
+
}, [p, t, a, o]);
|
|
1078
|
+
return /* @__PURE__ */ r.jsxs("div", { className: f, children: [
|
|
1079
|
+
/* @__PURE__ */ r.jsx("label", { className: "block text-sm mb-1", children: s }),
|
|
997
1080
|
/* @__PURE__ */ r.jsx(
|
|
998
1081
|
"input",
|
|
999
1082
|
{
|
|
1000
1083
|
className: "w-full px-3 py-2 border border-black/20 rounded",
|
|
1001
|
-
value:
|
|
1002
|
-
onChange: (
|
|
1003
|
-
|
|
1084
|
+
value: p,
|
|
1085
|
+
onChange: (v) => {
|
|
1086
|
+
c && E(""), l(v.target.value);
|
|
1004
1087
|
},
|
|
1005
|
-
onBlur:
|
|
1006
|
-
onKeyDown: (
|
|
1007
|
-
|
|
1088
|
+
onBlur: g,
|
|
1089
|
+
onKeyDown: (v) => {
|
|
1090
|
+
v.key === "Enter" && (v.preventDefault(), g());
|
|
1008
1091
|
},
|
|
1009
|
-
placeholder:
|
|
1092
|
+
placeholder: d
|
|
1010
1093
|
}
|
|
1011
1094
|
),
|
|
1012
|
-
|
|
1095
|
+
c ? /* @__PURE__ */ r.jsx("p", { className: "text-xs text-red-600 mt-1", children: c }) : null
|
|
1013
1096
|
] });
|
|
1014
1097
|
}
|
|
1015
|
-
function
|
|
1098
|
+
function tr({ f: t, onUpdateField: s }) {
|
|
1016
1099
|
return /* @__PURE__ */ r.jsxs("div", { className: "space-y-3", children: [
|
|
1017
1100
|
/* @__PURE__ */ r.jsx(
|
|
1018
|
-
|
|
1101
|
+
rr,
|
|
1019
1102
|
{
|
|
1020
1103
|
id: t.id ?? "",
|
|
1021
|
-
onCommit: (
|
|
1104
|
+
onCommit: (a) => s == null ? void 0 : s("id", a)
|
|
1022
1105
|
}
|
|
1023
1106
|
),
|
|
1024
1107
|
/* @__PURE__ */ r.jsxs("div", { children: [
|
|
@@ -1028,7 +1111,7 @@ function sr({ f: t, onUpdateField: n }) {
|
|
|
1028
1111
|
{
|
|
1029
1112
|
className: "w-full px-3 py-2 border border-black/20 rounded",
|
|
1030
1113
|
value: t.question || "",
|
|
1031
|
-
onChange: (
|
|
1114
|
+
onChange: (a) => s("question", a.target.value),
|
|
1032
1115
|
placeholder: "Enter question text"
|
|
1033
1116
|
}
|
|
1034
1117
|
)
|
|
@@ -1039,7 +1122,7 @@ function sr({ f: t, onUpdateField: n }) {
|
|
|
1039
1122
|
{
|
|
1040
1123
|
type: "checkbox",
|
|
1041
1124
|
checked: !!t.required,
|
|
1042
|
-
onChange: (
|
|
1125
|
+
onChange: (a) => s("required", a.target.checked)
|
|
1043
1126
|
}
|
|
1044
1127
|
),
|
|
1045
1128
|
"Required"
|
|
@@ -1051,96 +1134,70 @@ function sr({ f: t, onUpdateField: n }) {
|
|
|
1051
1134
|
{
|
|
1052
1135
|
className: "w-full px-3 py-2 border border-black/20 rounded",
|
|
1053
1136
|
value: t.sublabel || "",
|
|
1054
|
-
onChange: (
|
|
1137
|
+
onChange: (a) => s("sublabel", a.target.value),
|
|
1055
1138
|
placeholder: "Helper text / description"
|
|
1056
1139
|
}
|
|
1057
1140
|
)
|
|
1058
1141
|
] })
|
|
1059
1142
|
] });
|
|
1060
1143
|
}
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
let _e;
|
|
1068
|
-
const Hr = new Uint8Array(16);
|
|
1069
|
-
function Xr() {
|
|
1070
|
-
if (!_e) {
|
|
1071
|
-
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
1072
|
-
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1073
|
-
_e = crypto.getRandomValues.bind(crypto);
|
|
1074
|
-
}
|
|
1075
|
-
return _e(Hr);
|
|
1076
|
-
}
|
|
1077
|
-
const Qr = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), He = { randomUUID: Qr };
|
|
1078
|
-
function Zr(t, n, s) {
|
|
1079
|
-
var c;
|
|
1080
|
-
if (He.randomUUID && !t)
|
|
1081
|
-
return He.randomUUID();
|
|
1082
|
-
t = t || {};
|
|
1083
|
-
const i = t.random ?? ((c = t.rng) == null ? void 0 : c.call(t)) ?? Xr();
|
|
1084
|
-
if (i.length < 16)
|
|
1085
|
-
throw new Error("Random bytes length must be >= 16");
|
|
1086
|
-
return i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, Kr(i);
|
|
1087
|
-
}
|
|
1088
|
-
function ir({ field: t, onUpdateField: n }) {
|
|
1089
|
-
const s = t.options || [], i = () => {
|
|
1090
|
-
n("options", [...s, { id: Zr(), value: "" }]);
|
|
1091
|
-
}, c = (m, o) => {
|
|
1092
|
-
n(
|
|
1144
|
+
function nr({ field: t, onUpdateField: s }) {
|
|
1145
|
+
const a = t.options || [], o = () => {
|
|
1146
|
+
const p = new Set(a.map((c) => c.id)), l = Fr("", p, t.id);
|
|
1147
|
+
s("options", [...a, { id: l, value: "" }]);
|
|
1148
|
+
}, d = (p, l) => {
|
|
1149
|
+
s(
|
|
1093
1150
|
"options",
|
|
1094
|
-
|
|
1151
|
+
a.map((c) => c.id === p ? { ...c, value: l } : c)
|
|
1095
1152
|
);
|
|
1096
|
-
},
|
|
1097
|
-
|
|
1153
|
+
}, f = (p) => {
|
|
1154
|
+
s(
|
|
1098
1155
|
"options",
|
|
1099
|
-
|
|
1156
|
+
a.filter((l) => l.id !== p)
|
|
1100
1157
|
);
|
|
1101
1158
|
};
|
|
1102
1159
|
return /* @__PURE__ */ r.jsxs("div", { className: "mt-3", children: [
|
|
1103
1160
|
/* @__PURE__ */ r.jsx("div", { className: "text-sm font-medium mb-1", children: "Options" }),
|
|
1104
|
-
|
|
1161
|
+
a.map((p) => /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-2 mb-2", children: [
|
|
1105
1162
|
/* @__PURE__ */ r.jsx(
|
|
1106
1163
|
"input",
|
|
1107
1164
|
{
|
|
1108
1165
|
className: "flex-1 px-3 py-2 border border-black/20 rounded",
|
|
1109
|
-
value:
|
|
1110
|
-
onChange: (
|
|
1166
|
+
value: p.value,
|
|
1167
|
+
onChange: (l) => d(p.id, l.target.value),
|
|
1111
1168
|
placeholder: "Option text"
|
|
1112
1169
|
}
|
|
1113
1170
|
),
|
|
1114
1171
|
/* @__PURE__ */ r.jsx(
|
|
1115
1172
|
"button",
|
|
1116
1173
|
{
|
|
1117
|
-
onClick: () =>
|
|
1174
|
+
onClick: () => f(p.id),
|
|
1118
1175
|
className: "px-2 py-1 text-sm border border-black/20 rounded hover:bg-slate-50",
|
|
1119
1176
|
children: "Remove"
|
|
1120
1177
|
}
|
|
1121
1178
|
)
|
|
1122
|
-
] },
|
|
1179
|
+
] }, p.id)),
|
|
1123
1180
|
/* @__PURE__ */ r.jsx(
|
|
1124
1181
|
"button",
|
|
1125
1182
|
{
|
|
1126
|
-
onClick:
|
|
1183
|
+
onClick: o,
|
|
1127
1184
|
className: "mt-1 px-3 py-2 text-sm border border-black/20 rounded hover:bg-slate-50",
|
|
1128
1185
|
children: "+ Add Option"
|
|
1129
1186
|
}
|
|
1130
1187
|
)
|
|
1131
1188
|
] });
|
|
1132
1189
|
}
|
|
1133
|
-
function
|
|
1134
|
-
const
|
|
1135
|
-
(
|
|
1136
|
-
[
|
|
1137
|
-
),
|
|
1190
|
+
function Kr({ f: t }) {
|
|
1191
|
+
const s = Ze(t.id), a = ve(
|
|
1192
|
+
(d, f) => s.field.update(d, f),
|
|
1193
|
+
[s]
|
|
1194
|
+
), o = de(
|
|
1138
1195
|
() => ["radio", "check", "selection"].includes(t.fieldType),
|
|
1139
1196
|
[t.fieldType]
|
|
1140
1197
|
);
|
|
1141
1198
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1142
1199
|
/* @__PURE__ */ r.jsx("h3", { className: "text-lg font-semibold mb-3", children: "Edit" }),
|
|
1143
|
-
/* @__PURE__ */ r.jsx(
|
|
1200
|
+
/* @__PURE__ */ r.jsx(tr, { f: t, onUpdateField: a }),
|
|
1144
1201
|
t.fieldType === "input" && /* @__PURE__ */ r.jsxs("div", { className: "mt-4", children: [
|
|
1145
1202
|
/* @__PURE__ */ r.jsx("div", { className: "text-sm font-medium mb-1", children: "Default Answer" }),
|
|
1146
1203
|
/* @__PURE__ */ r.jsx(
|
|
@@ -1148,74 +1205,74 @@ function et({ f: t }) {
|
|
|
1148
1205
|
{
|
|
1149
1206
|
className: "w-full px-3 py-2 border border-black/20 rounded",
|
|
1150
1207
|
value: t.answer || "",
|
|
1151
|
-
onChange: (
|
|
1208
|
+
onChange: (d) => a("answer", d.target.value),
|
|
1152
1209
|
placeholder: "Default value"
|
|
1153
1210
|
}
|
|
1154
1211
|
)
|
|
1155
1212
|
] }),
|
|
1156
|
-
|
|
1213
|
+
o && /* @__PURE__ */ r.jsx(nr, { field: t, onUpdateField: a })
|
|
1157
1214
|
] });
|
|
1158
1215
|
}
|
|
1159
|
-
function
|
|
1160
|
-
var
|
|
1161
|
-
const
|
|
1162
|
-
|
|
1163
|
-
var
|
|
1164
|
-
|
|
1165
|
-
}, [t.id]),
|
|
1166
|
-
if (!
|
|
1167
|
-
|
|
1216
|
+
function Hr({ section: t, onActiveChildChange: s }) {
|
|
1217
|
+
var v, h, T;
|
|
1218
|
+
const a = Ze(t.id), o = Array.isArray(t.fields) ? t.fields : [], [d, f] = ne(((v = o[0]) == null ? void 0 : v.id) || null);
|
|
1219
|
+
Z(() => {
|
|
1220
|
+
var b;
|
|
1221
|
+
f(((b = o[0]) == null ? void 0 : b.id) || null);
|
|
1222
|
+
}, [t.id]), Z(() => {
|
|
1223
|
+
if (!o.length) {
|
|
1224
|
+
d !== null && f(null);
|
|
1168
1225
|
return;
|
|
1169
1226
|
}
|
|
1170
|
-
|
|
1171
|
-
}, [
|
|
1172
|
-
|
|
1173
|
-
}, [t.id,
|
|
1174
|
-
const
|
|
1175
|
-
(
|
|
1176
|
-
[
|
|
1177
|
-
),
|
|
1178
|
-
() =>
|
|
1179
|
-
[
|
|
1180
|
-
),
|
|
1181
|
-
(
|
|
1182
|
-
if (
|
|
1183
|
-
if (
|
|
1184
|
-
const
|
|
1185
|
-
if (!
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
{ id:
|
|
1227
|
+
o.some((O) => O.id === d) || f(o[0].id);
|
|
1228
|
+
}, [o, d]), Z(() => {
|
|
1229
|
+
s == null || s(t.id, d || null);
|
|
1230
|
+
}, [t.id, d, s]);
|
|
1231
|
+
const p = ve(
|
|
1232
|
+
(b, O) => a.field.update(b, O),
|
|
1233
|
+
[a]
|
|
1234
|
+
), l = de(
|
|
1235
|
+
() => o.find((b) => b.id === d) || null,
|
|
1236
|
+
[o, d]
|
|
1237
|
+
), c = ve(
|
|
1238
|
+
(b, O) => {
|
|
1239
|
+
if (l) {
|
|
1240
|
+
if (b === "id") {
|
|
1241
|
+
const x = String(O ?? "").trim();
|
|
1242
|
+
if (!x) return;
|
|
1243
|
+
Y.getState().updateField(
|
|
1244
|
+
l.id,
|
|
1245
|
+
{ id: x },
|
|
1189
1246
|
{
|
|
1190
1247
|
sectionId: t.id,
|
|
1191
|
-
onIdChange: (
|
|
1192
|
-
|
|
1248
|
+
onIdChange: (F, N) => {
|
|
1249
|
+
f((R) => R === N ? F : R);
|
|
1193
1250
|
}
|
|
1194
1251
|
}
|
|
1195
1252
|
);
|
|
1196
1253
|
return;
|
|
1197
1254
|
}
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
{ [
|
|
1255
|
+
Y.getState().updateField(
|
|
1256
|
+
l.id,
|
|
1257
|
+
{ [b]: O },
|
|
1201
1258
|
{ sectionId: t.id }
|
|
1202
1259
|
);
|
|
1203
1260
|
}
|
|
1204
1261
|
},
|
|
1205
|
-
[
|
|
1206
|
-
),
|
|
1207
|
-
|
|
1208
|
-
}, [
|
|
1209
|
-
() =>
|
|
1210
|
-
[
|
|
1262
|
+
[l, t.id]
|
|
1263
|
+
), E = ve(() => {
|
|
1264
|
+
l && Y.getState().deleteField(l.id, { sectionId: t.id });
|
|
1265
|
+
}, [l, t.id]), g = de(
|
|
1266
|
+
() => l && ["radio", "check", "selection"].includes(l.fieldType),
|
|
1267
|
+
[l]
|
|
1211
1268
|
);
|
|
1212
1269
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1213
1270
|
/* @__PURE__ */ r.jsx("h3", { className: "text-lg font-semibold mb-3", children: "Edit Section" }),
|
|
1214
1271
|
/* @__PURE__ */ r.jsx(
|
|
1215
|
-
|
|
1272
|
+
rr,
|
|
1216
1273
|
{
|
|
1217
1274
|
id: t.id,
|
|
1218
|
-
onCommit: (
|
|
1275
|
+
onCommit: (b) => a.field.renameId(b)
|
|
1219
1276
|
}
|
|
1220
1277
|
),
|
|
1221
1278
|
/* @__PURE__ */ r.jsxs("div", { className: "mt-3", children: [
|
|
@@ -1225,54 +1282,54 @@ function rt({ section: t, onActiveChildChange: n }) {
|
|
|
1225
1282
|
{
|
|
1226
1283
|
className: "w-full px-3 py-2 border border-black/20 rounded",
|
|
1227
1284
|
value: t.title || "",
|
|
1228
|
-
onChange: (
|
|
1285
|
+
onChange: (b) => p("title", b.target.value),
|
|
1229
1286
|
placeholder: "Section title"
|
|
1230
1287
|
}
|
|
1231
1288
|
)
|
|
1232
1289
|
] }),
|
|
1233
1290
|
/* @__PURE__ */ r.jsxs("div", { className: "mt-6", children: [
|
|
1234
1291
|
/* @__PURE__ */ r.jsx("div", { className: "text-sm font-semibold mb-2", children: "Fields in this section" }),
|
|
1235
|
-
|
|
1236
|
-
/* @__PURE__ */ r.jsx("div", { className: "flex flex-wrap gap-2 mb-3", children:
|
|
1237
|
-
var
|
|
1292
|
+
o.length === 0 ? /* @__PURE__ */ r.jsx("div", { className: "text-sm text-gray-500", children: "No fields yet. Use the section’s mini toolbar to add fields." }) : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1293
|
+
/* @__PURE__ */ r.jsx("div", { className: "flex flex-wrap gap-2 mb-3", children: o.map((b) => {
|
|
1294
|
+
var O, x;
|
|
1238
1295
|
return /* @__PURE__ */ r.jsx(
|
|
1239
1296
|
"button",
|
|
1240
1297
|
{
|
|
1241
1298
|
className: [
|
|
1242
1299
|
"px-3 py-1.5 text-sm rounded border",
|
|
1243
|
-
|
|
1300
|
+
d === b.id ? "bg-black/5 border-black/20" : "bg-white border-black/10 hover:bg-slate-50"
|
|
1244
1301
|
].join(" "),
|
|
1245
|
-
onClick: () =>
|
|
1246
|
-
title:
|
|
1247
|
-
children: ((
|
|
1302
|
+
onClick: () => f(b.id),
|
|
1303
|
+
title: b.question || b.fieldType,
|
|
1304
|
+
children: ((O = b.question) == null ? void 0 : O.trim()) || ((x = ue[b.fieldType]) == null ? void 0 : x.label) || "Field"
|
|
1248
1305
|
},
|
|
1249
|
-
|
|
1306
|
+
b.id
|
|
1250
1307
|
);
|
|
1251
1308
|
}) }),
|
|
1252
|
-
|
|
1309
|
+
l && /* @__PURE__ */ r.jsxs("div", { className: "mt-2", children: [
|
|
1253
1310
|
/* @__PURE__ */ r.jsxs("div", { className: "text-sm font-semibold mb-2", children: [
|
|
1254
1311
|
"Editing: ",
|
|
1255
|
-
((
|
|
1312
|
+
((h = l.question) == null ? void 0 : h.trim()) || ((T = ue[l.fieldType]) == null ? void 0 : T.label)
|
|
1256
1313
|
] }),
|
|
1257
|
-
/* @__PURE__ */ r.jsx(
|
|
1258
|
-
|
|
1314
|
+
/* @__PURE__ */ r.jsx(tr, { f: l, onUpdateField: c }),
|
|
1315
|
+
l.fieldType === "input" && /* @__PURE__ */ r.jsxs("div", { className: "mt-4", children: [
|
|
1259
1316
|
/* @__PURE__ */ r.jsx("div", { className: "text-sm font-medium mb-1", children: "Default Answer" }),
|
|
1260
1317
|
/* @__PURE__ */ r.jsx(
|
|
1261
1318
|
"input",
|
|
1262
1319
|
{
|
|
1263
1320
|
className: "w-full px-3 py-2 border border-black/20 rounded",
|
|
1264
|
-
value:
|
|
1265
|
-
onChange: (
|
|
1321
|
+
value: l.answer || "",
|
|
1322
|
+
onChange: (b) => c("answer", b.target.value),
|
|
1266
1323
|
placeholder: "Default value"
|
|
1267
1324
|
}
|
|
1268
1325
|
)
|
|
1269
1326
|
] }),
|
|
1270
|
-
|
|
1327
|
+
g && /* @__PURE__ */ r.jsx(nr, { field: l, onUpdateField: c }),
|
|
1271
1328
|
/* @__PURE__ */ r.jsx(
|
|
1272
1329
|
"button",
|
|
1273
1330
|
{
|
|
1274
1331
|
className: "mt-3 px-3 py-2 text-sm text-red-400 border rounded",
|
|
1275
|
-
onClick:
|
|
1332
|
+
onClick: E,
|
|
1276
1333
|
children: "Delete this field"
|
|
1277
1334
|
}
|
|
1278
1335
|
)
|
|
@@ -1281,7 +1338,7 @@ function rt({ section: t, onActiveChildChange: n }) {
|
|
|
1281
1338
|
] })
|
|
1282
1339
|
] });
|
|
1283
1340
|
}
|
|
1284
|
-
function
|
|
1341
|
+
function Ge(t) {
|
|
1285
1342
|
switch (t) {
|
|
1286
1343
|
case "input":
|
|
1287
1344
|
return ["equals", "contains"];
|
|
@@ -1294,110 +1351,110 @@ function Xe(t) {
|
|
|
1294
1351
|
return ["equals"];
|
|
1295
1352
|
}
|
|
1296
1353
|
}
|
|
1297
|
-
function
|
|
1354
|
+
function Ke(t) {
|
|
1298
1355
|
if (t && typeof t == "object") {
|
|
1299
|
-
const
|
|
1300
|
-
return { id:
|
|
1356
|
+
const a = t.id ?? String(t.value ?? ""), o = String(t.value ?? t.label ?? t.id ?? "");
|
|
1357
|
+
return { id: a, value: o };
|
|
1301
1358
|
}
|
|
1302
|
-
const
|
|
1303
|
-
return { id:
|
|
1359
|
+
const s = String(t ?? "");
|
|
1360
|
+
return { id: s, value: s };
|
|
1304
1361
|
}
|
|
1305
|
-
function
|
|
1306
|
-
var
|
|
1307
|
-
const t =
|
|
1308
|
-
(
|
|
1309
|
-
const
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
}, [
|
|
1313
|
-
if (
|
|
1314
|
-
if (
|
|
1315
|
-
const
|
|
1316
|
-
t.selectedChildId.set(
|
|
1362
|
+
function Xr() {
|
|
1363
|
+
var fe, ae, J;
|
|
1364
|
+
const t = ee(), s = Y((u) => u.byId), a = Y((u) => u.setEnableWhen), o = Y((u) => u.updateField), d = ((fe = t == null ? void 0 : t.selectedFieldId) == null ? void 0 : fe.value) ?? null;
|
|
1365
|
+
(ae = t == null ? void 0 : t.selectedChildId) == null || ae.ParentId;
|
|
1366
|
+
const f = ((J = t == null ? void 0 : t.selectedChildId) == null ? void 0 : J.ChildId) ?? null, p = d ? s[d] : null, l = (p == null ? void 0 : p.fieldType) === "section", c = k.useMemo(() => l ? Array.isArray(p == null ? void 0 : p.fields) ? p.fields : [] : [], [l, p]), E = k.useMemo(() => !l || !f ? !1 : c.some((u) => u.id === f), [l, f, c]), g = k.useMemo(() => l && E ? `child:${f}` : "", [l, E, f]), [v, h] = k.useState(g);
|
|
1367
|
+
k.useEffect(() => {
|
|
1368
|
+
h(g);
|
|
1369
|
+
}, [g]), k.useEffect(() => {
|
|
1370
|
+
if (l)
|
|
1371
|
+
if (v && v.startsWith("child:")) {
|
|
1372
|
+
const u = v.slice(6);
|
|
1373
|
+
t.selectedChildId.set(d, u);
|
|
1317
1374
|
} else
|
|
1318
1375
|
t.selectedChildId.set(null, null);
|
|
1319
|
-
}, [
|
|
1320
|
-
const
|
|
1321
|
-
var
|
|
1322
|
-
const
|
|
1323
|
-
for (const
|
|
1324
|
-
if (
|
|
1325
|
-
if (
|
|
1326
|
-
const U = ((
|
|
1327
|
-
|
|
1328
|
-
var
|
|
1329
|
-
|
|
1376
|
+
}, [l, v, d, t]);
|
|
1377
|
+
const T = !!(l && v && v.startsWith("child:")), b = T ? v.slice(6) : null, O = T ? b : d, x = k.useMemo(() => O ? T ? c.find((u) => u.id === b) ?? null : s[O] ?? null : null, [s, O, T, b, c]), F = k.useMemo(() => {
|
|
1378
|
+
var I, P, B;
|
|
1379
|
+
const u = [];
|
|
1380
|
+
for (const D of Object.values(s))
|
|
1381
|
+
if (D)
|
|
1382
|
+
if (D.fieldType === "section" && Array.isArray(D.fields)) {
|
|
1383
|
+
const U = ((I = D.title) == null ? void 0 : I.trim()) || "Section";
|
|
1384
|
+
D.fields.forEach((y) => {
|
|
1385
|
+
var K;
|
|
1386
|
+
u.push({
|
|
1330
1387
|
id: y.id,
|
|
1331
|
-
parentId:
|
|
1332
|
-
label: `${U} › ${((
|
|
1388
|
+
parentId: D.id,
|
|
1389
|
+
label: `${U} › ${((K = y.question) == null ? void 0 : K.trim()) || y.id}`,
|
|
1333
1390
|
fieldType: y.fieldType,
|
|
1334
1391
|
options: Array.isArray(y.options) ? y.options : []
|
|
1335
1392
|
});
|
|
1336
1393
|
});
|
|
1337
1394
|
} else
|
|
1338
|
-
|
|
1339
|
-
id:
|
|
1395
|
+
u.push({
|
|
1396
|
+
id: D.id,
|
|
1340
1397
|
parentId: null,
|
|
1341
|
-
label: ((
|
|
1342
|
-
fieldType:
|
|
1343
|
-
options: Array.isArray(
|
|
1398
|
+
label: ((P = D.question) == null ? void 0 : P.trim()) || ((B = D.title) == null ? void 0 : B.trim()) || D.id,
|
|
1399
|
+
fieldType: D.fieldType,
|
|
1400
|
+
options: Array.isArray(D.options) ? D.options : []
|
|
1344
1401
|
});
|
|
1345
|
-
return
|
|
1346
|
-
}, [
|
|
1347
|
-
(
|
|
1348
|
-
[
|
|
1349
|
-
),
|
|
1350
|
-
(
|
|
1351
|
-
if (!
|
|
1352
|
-
const
|
|
1353
|
-
|
|
1402
|
+
return u;
|
|
1403
|
+
}, [s]), N = k.useCallback(
|
|
1404
|
+
(u) => F.find((I) => I.id === u) || null,
|
|
1405
|
+
[F]
|
|
1406
|
+
), R = k.useCallback(
|
|
1407
|
+
(u) => {
|
|
1408
|
+
if (!O) return;
|
|
1409
|
+
const I = u && Array.isArray(u.conditions) ? { logic: u.logic || "AND", conditions: u.conditions } : void 0;
|
|
1410
|
+
T && d ? o(O, { enableWhen: I }, { sectionId: d }) : a(O, I);
|
|
1354
1411
|
},
|
|
1355
|
-
[
|
|
1356
|
-
),
|
|
1357
|
-
const
|
|
1358
|
-
logic:
|
|
1412
|
+
[O, T, d, a, o]
|
|
1413
|
+
), S = k.useMemo(() => x != null && x.enableWhen && Array.isArray(x.enableWhen.conditions) ? { logic: x.enableWhen.logic || "AND", conditions: x.enableWhen.conditions } : { logic: "AND", conditions: [] }, [x]), A = k.useCallback(() => {
|
|
1414
|
+
const u = {
|
|
1415
|
+
logic: S.logic || "AND",
|
|
1359
1416
|
conditions: [
|
|
1360
|
-
...Array.isArray(
|
|
1417
|
+
...Array.isArray(S.conditions) ? S.conditions : [],
|
|
1361
1418
|
{ targetId: "", operator: "equals", value: "" }
|
|
1362
1419
|
]
|
|
1363
1420
|
};
|
|
1364
|
-
|
|
1365
|
-
}, [
|
|
1366
|
-
(
|
|
1367
|
-
const
|
|
1368
|
-
|
|
1421
|
+
R(u);
|
|
1422
|
+
}, [S, R]), H = k.useCallback(() => R(null), [R]), se = k.useCallback(
|
|
1423
|
+
(u) => {
|
|
1424
|
+
const P = (Array.isArray(S.conditions) ? S.conditions : []).filter((B, D) => D !== u);
|
|
1425
|
+
R({ ...S, conditions: P });
|
|
1369
1426
|
},
|
|
1370
|
-
[
|
|
1371
|
-
),
|
|
1372
|
-
(
|
|
1373
|
-
const
|
|
1374
|
-
if ("targetId" in
|
|
1375
|
-
const y =
|
|
1376
|
-
|
|
1377
|
-
const
|
|
1378
|
-
|
|
1427
|
+
[S, R]
|
|
1428
|
+
), z = k.useCallback(
|
|
1429
|
+
(u, I) => {
|
|
1430
|
+
const B = [...Array.isArray(S.conditions) ? S.conditions : []], U = { ...B[u] || { targetId: "", operator: "equals", value: "" }, ...I };
|
|
1431
|
+
if ("targetId" in I) {
|
|
1432
|
+
const y = N(U.targetId), K = Ge(y == null ? void 0 : y.fieldType);
|
|
1433
|
+
K.includes(U.operator) || (U.operator = K[0] || "equals");
|
|
1434
|
+
const le = Array.isArray(y == null ? void 0 : y.options) ? y.options.map(Ke) : [];
|
|
1435
|
+
le.length > 0 && (new Set(le.map((ye) => ye.id)).has(U.value) || (U.value = ""));
|
|
1379
1436
|
}
|
|
1380
|
-
|
|
1437
|
+
B[u] = U, R({ ...S, conditions: B });
|
|
1381
1438
|
},
|
|
1382
|
-
[
|
|
1383
|
-
),
|
|
1384
|
-
() =>
|
|
1385
|
-
[
|
|
1386
|
-
),
|
|
1439
|
+
[S, N, R]
|
|
1440
|
+
), G = k.useMemo(
|
|
1441
|
+
() => F.filter((u) => u.id !== O),
|
|
1442
|
+
[F, O]
|
|
1443
|
+
), W = !x || !O;
|
|
1387
1444
|
return /* @__PURE__ */ r.jsxs("div", { className: "space-y-2", children: [
|
|
1388
|
-
|
|
1445
|
+
l && /* @__PURE__ */ r.jsxs("div", { className: "flex gap-2 items-center", children: [
|
|
1389
1446
|
/* @__PURE__ */ r.jsx("label", { className: "text-sm", children: "Target:" }),
|
|
1390
1447
|
/* @__PURE__ */ r.jsxs(
|
|
1391
1448
|
"select",
|
|
1392
1449
|
{
|
|
1393
1450
|
className: "border p-1 rounded",
|
|
1394
|
-
value:
|
|
1395
|
-
onChange: (
|
|
1451
|
+
value: v,
|
|
1452
|
+
onChange: (u) => h(u.target.value),
|
|
1396
1453
|
children: [
|
|
1397
1454
|
/* @__PURE__ */ r.jsx("option", { value: "", children: "Section (this)" }),
|
|
1398
|
-
|
|
1399
|
-
var
|
|
1400
|
-
return /* @__PURE__ */ r.jsx("option", { value: `child:${
|
|
1455
|
+
c.map((u) => {
|
|
1456
|
+
var I, P;
|
|
1457
|
+
return /* @__PURE__ */ r.jsx("option", { value: `child:${u.id}`, children: ((I = u.question) == null ? void 0 : I.trim()) || ((P = u.title) == null ? void 0 : P.trim()) || u.id }, u.id);
|
|
1401
1458
|
})
|
|
1402
1459
|
]
|
|
1403
1460
|
}
|
|
@@ -1408,30 +1465,30 @@ function tt() {
|
|
|
1408
1465
|
/* @__PURE__ */ r.jsxs(
|
|
1409
1466
|
"select",
|
|
1410
1467
|
{
|
|
1411
|
-
value:
|
|
1412
|
-
onChange: (
|
|
1468
|
+
value: S.logic || "AND",
|
|
1469
|
+
onChange: (u) => R({ ...S, logic: u.target.value }),
|
|
1413
1470
|
className: "border p-1 rounded",
|
|
1414
|
-
disabled:
|
|
1471
|
+
disabled: W,
|
|
1415
1472
|
children: [
|
|
1416
1473
|
/* @__PURE__ */ r.jsx("option", { value: "AND", children: "AND" }),
|
|
1417
1474
|
/* @__PURE__ */ r.jsx("option", { value: "OR", children: "OR" })
|
|
1418
1475
|
]
|
|
1419
1476
|
}
|
|
1420
1477
|
),
|
|
1421
|
-
/* @__PURE__ */ r.jsx("button", { type: "button", className: "px-2 py-1 border rounded", onClick:
|
|
1422
|
-
/* @__PURE__ */ r.jsx("button", { type: "button", className: "px-2 py-1 border rounded", onClick:
|
|
1478
|
+
/* @__PURE__ */ r.jsx("button", { type: "button", className: "px-2 py-1 border rounded", onClick: A, disabled: W, children: "+ Condition" }),
|
|
1479
|
+
/* @__PURE__ */ r.jsx("button", { type: "button", className: "px-2 py-1 border rounded", onClick: H, disabled: W, children: "Clear" })
|
|
1423
1480
|
] }),
|
|
1424
|
-
(Array.isArray(
|
|
1425
|
-
const
|
|
1481
|
+
(Array.isArray(S.conditions) ? S.conditions : []).map((u, I) => {
|
|
1482
|
+
const P = N(u.targetId), B = Ge(P == null ? void 0 : P.fieldType), D = Array.isArray(P == null ? void 0 : P.options) ? P.options.map(Ke) : [], U = D.length > 0;
|
|
1426
1483
|
return /* @__PURE__ */ r.jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-7 gap-2 items-center opacity-100", children: [
|
|
1427
1484
|
/* @__PURE__ */ r.jsx(
|
|
1428
1485
|
"button",
|
|
1429
1486
|
{
|
|
1430
1487
|
type: "button",
|
|
1431
|
-
onClick: () =>
|
|
1488
|
+
onClick: () => se(I),
|
|
1432
1489
|
className: "px-2 py-1 border rounded sm:col-span-1",
|
|
1433
1490
|
title: "Remove condition",
|
|
1434
|
-
disabled:
|
|
1491
|
+
disabled: W,
|
|
1435
1492
|
children: "✕"
|
|
1436
1493
|
}
|
|
1437
1494
|
),
|
|
@@ -1439,12 +1496,12 @@ function tt() {
|
|
|
1439
1496
|
"select",
|
|
1440
1497
|
{
|
|
1441
1498
|
className: "border p-1 rounded sm:col-span-3",
|
|
1442
|
-
value:
|
|
1443
|
-
onChange: (y) =>
|
|
1444
|
-
disabled:
|
|
1499
|
+
value: u.targetId,
|
|
1500
|
+
onChange: (y) => z(I, { targetId: y.target.value }),
|
|
1501
|
+
disabled: W,
|
|
1445
1502
|
children: [
|
|
1446
1503
|
/* @__PURE__ */ r.jsx("option", { value: "", children: "— Select field —" }),
|
|
1447
|
-
|
|
1504
|
+
G.map((y) => /* @__PURE__ */ r.jsx("option", { value: y.id, children: y.label }, y.id))
|
|
1448
1505
|
]
|
|
1449
1506
|
}
|
|
1450
1507
|
),
|
|
@@ -1452,22 +1509,22 @@ function tt() {
|
|
|
1452
1509
|
"select",
|
|
1453
1510
|
{
|
|
1454
1511
|
className: "border p-1 rounded sm:col-span-1",
|
|
1455
|
-
value:
|
|
1456
|
-
onChange: (y) =>
|
|
1457
|
-
disabled:
|
|
1458
|
-
children: (
|
|
1512
|
+
value: u.operator,
|
|
1513
|
+
onChange: (y) => z(I, { operator: y.target.value }),
|
|
1514
|
+
disabled: W || !P,
|
|
1515
|
+
children: (P ? B : ["equals"]).map((y) => /* @__PURE__ */ r.jsx("option", { value: y, children: y }, y))
|
|
1459
1516
|
}
|
|
1460
1517
|
),
|
|
1461
1518
|
U ? /* @__PURE__ */ r.jsxs(
|
|
1462
1519
|
"select",
|
|
1463
1520
|
{
|
|
1464
1521
|
className: "border p-1 rounded sm:col-span-2",
|
|
1465
|
-
value:
|
|
1466
|
-
onChange: (y) =>
|
|
1467
|
-
disabled:
|
|
1522
|
+
value: u.value,
|
|
1523
|
+
onChange: (y) => z(I, { value: y.target.value }),
|
|
1524
|
+
disabled: W || !P,
|
|
1468
1525
|
children: [
|
|
1469
1526
|
/* @__PURE__ */ r.jsx("option", { value: "", children: "— Select option —" }),
|
|
1470
|
-
|
|
1527
|
+
D.map((y) => /* @__PURE__ */ r.jsx("option", { value: y.id, children: y.value }, y.id))
|
|
1471
1528
|
]
|
|
1472
1529
|
}
|
|
1473
1530
|
) : /* @__PURE__ */ r.jsx(
|
|
@@ -1475,36 +1532,36 @@ function tt() {
|
|
|
1475
1532
|
{
|
|
1476
1533
|
className: "border p-1 rounded sm:col-span-2",
|
|
1477
1534
|
placeholder: "Enter value",
|
|
1478
|
-
value:
|
|
1479
|
-
onChange: (y) =>
|
|
1480
|
-
disabled:
|
|
1535
|
+
value: u.value,
|
|
1536
|
+
onChange: (y) => z(I, { value: y.target.value }),
|
|
1537
|
+
disabled: W || !P
|
|
1481
1538
|
}
|
|
1482
1539
|
)
|
|
1483
|
-
] },
|
|
1540
|
+
] }, I);
|
|
1484
1541
|
})
|
|
1485
1542
|
] });
|
|
1486
1543
|
}
|
|
1487
|
-
function
|
|
1488
|
-
const t =
|
|
1489
|
-
|
|
1490
|
-
(
|
|
1544
|
+
function He() {
|
|
1545
|
+
const t = ee(), s = Y(
|
|
1546
|
+
k.useCallback(
|
|
1547
|
+
(l) => t.selectedFieldId.value ? l.byId[t.selectedFieldId.value] : null,
|
|
1491
1548
|
[t.selectedFieldId.value]
|
|
1492
1549
|
)
|
|
1493
|
-
), [
|
|
1494
|
-
(
|
|
1495
|
-
t.selectedChildId.set(
|
|
1550
|
+
), [a, o] = k.useState("EDIT"), d = k.useCallback(
|
|
1551
|
+
(l, c) => {
|
|
1552
|
+
t.selectedChildId.set(l, c);
|
|
1496
1553
|
},
|
|
1497
1554
|
[t.selectedChildId.set]
|
|
1498
1555
|
);
|
|
1499
|
-
if (
|
|
1500
|
-
t.selectedChildId.set(null, null),
|
|
1556
|
+
if (k.useEffect(() => {
|
|
1557
|
+
t.selectedChildId.set(null, null), o("EDIT");
|
|
1501
1558
|
}, [t.selectedFieldId.value]), t.state.isPreview) return null;
|
|
1502
|
-
const
|
|
1559
|
+
const f = !s, p = (s == null ? void 0 : s.fieldType) === "section";
|
|
1503
1560
|
return /* @__PURE__ */ r.jsxs(
|
|
1504
1561
|
"div",
|
|
1505
1562
|
{
|
|
1506
1563
|
className: `p-4 bg-white border border-gray-200 rounded-lg shadow-sm overflow-y-auto custom-scrollbar
|
|
1507
|
-
${
|
|
1564
|
+
${s ? "" : "max-h-32"} max-h-[calc(100svh-19rem)] lg:max-h-[calc(100dvh-15rem)]`,
|
|
1508
1565
|
children: [
|
|
1509
1566
|
/* @__PURE__ */ r.jsxs(
|
|
1510
1567
|
"div",
|
|
@@ -1516,9 +1573,9 @@ function Ze() {
|
|
|
1516
1573
|
"button",
|
|
1517
1574
|
{
|
|
1518
1575
|
type: "button",
|
|
1519
|
-
onClick: () =>
|
|
1520
|
-
"aria-selected":
|
|
1521
|
-
className: `px-3 py-1 text-sm ${
|
|
1576
|
+
onClick: () => o("EDIT"),
|
|
1577
|
+
"aria-selected": a === "EDIT",
|
|
1578
|
+
className: `px-3 py-1 text-sm ${a === "EDIT" ? "bg-gray-100 font-semibold" : "bg-white"}`,
|
|
1522
1579
|
children: "EDIT"
|
|
1523
1580
|
}
|
|
1524
1581
|
),
|
|
@@ -1526,52 +1583,52 @@ function Ze() {
|
|
|
1526
1583
|
"button",
|
|
1527
1584
|
{
|
|
1528
1585
|
type: "button",
|
|
1529
|
-
onClick: () =>
|
|
1530
|
-
"aria-selected":
|
|
1531
|
-
className: `px-3 py-1 text-sm border-l border-gray-200 ${
|
|
1586
|
+
onClick: () => o("LOGIC"),
|
|
1587
|
+
"aria-selected": a === "LOGIC",
|
|
1588
|
+
className: `px-3 py-1 text-sm border-l border-gray-200 ${a === "LOGIC" ? "bg-gray-100 font-semibold" : "bg-white"}`,
|
|
1532
1589
|
children: "LOGIC"
|
|
1533
1590
|
}
|
|
1534
1591
|
)
|
|
1535
1592
|
]
|
|
1536
1593
|
}
|
|
1537
1594
|
),
|
|
1538
|
-
|
|
1595
|
+
f && /* @__PURE__ */ r.jsxs("div", { className: "text-gray-600", children: [
|
|
1539
1596
|
/* @__PURE__ */ r.jsx("h3", { className: "text-lg font-semibold mb-2", children: "Edit" }),
|
|
1540
1597
|
/* @__PURE__ */ r.jsx("p", { children: "Select a field in the center panel to edit its properties." })
|
|
1541
1598
|
] }),
|
|
1542
|
-
!
|
|
1543
|
-
!
|
|
1544
|
-
|
|
1545
|
-
|
|
1599
|
+
!f && a === "EDIT" && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1600
|
+
!p && /* @__PURE__ */ r.jsx(Kr, { f: s }),
|
|
1601
|
+
p && /* @__PURE__ */ r.jsx(
|
|
1602
|
+
Hr,
|
|
1546
1603
|
{
|
|
1547
|
-
section:
|
|
1548
|
-
onActiveChildChange:
|
|
1604
|
+
section: s,
|
|
1605
|
+
onActiveChildChange: d
|
|
1549
1606
|
}
|
|
1550
1607
|
)
|
|
1551
1608
|
] }),
|
|
1552
|
-
!
|
|
1609
|
+
!f && a === "LOGIC" && /* @__PURE__ */ r.jsx(Xr, {})
|
|
1553
1610
|
]
|
|
1554
1611
|
}
|
|
1555
1612
|
);
|
|
1556
1613
|
}
|
|
1557
|
-
function
|
|
1558
|
-
const t =
|
|
1614
|
+
function Qr() {
|
|
1615
|
+
const t = ee(), { fields: s } = $r(t.state.isPreview), a = Mr((d) => d.hideUnsupportedFields), o = de(() => (a ? s.filter((f) => f.fieldType !== "unsupported") : s).map((f) => f.id), [s, a]);
|
|
1559
1616
|
return /* @__PURE__ */ r.jsx(
|
|
1560
1617
|
"div",
|
|
1561
1618
|
{
|
|
1562
1619
|
className: "w-full max-w-4xl mx-auto rounded-lg overflow-y-auto max-h-[calc(100svh-19rem)] lg:max-h-[calc(100dvh-15rem)] custom-scrollbar pr-2",
|
|
1563
1620
|
onClick: () => !t.state.isPreview && t.selectedFieldId.clear(),
|
|
1564
|
-
children:
|
|
1621
|
+
children: o.length === 0 ? /* @__PURE__ */ r.jsx(et, {}) : o.map((d) => /* @__PURE__ */ r.jsx(Zr, { id: d }, d))
|
|
1565
1622
|
}
|
|
1566
1623
|
);
|
|
1567
1624
|
}
|
|
1568
|
-
const
|
|
1569
|
-
const
|
|
1570
|
-
if (!
|
|
1571
|
-
const
|
|
1572
|
-
return
|
|
1625
|
+
const Zr = k.memo(function({ id: s }) {
|
|
1626
|
+
const a = Y(k.useCallback((d) => d.byId[s], [s]));
|
|
1627
|
+
if (!a) return null;
|
|
1628
|
+
const o = Lr(a.fieldType);
|
|
1629
|
+
return o ? /* @__PURE__ */ r.jsx("div", { className: "mb-1.5", "data-field-type": a.fieldType, "data-field-id": a.id, children: /* @__PURE__ */ r.jsx(o, { field: a }) }) : null;
|
|
1573
1630
|
});
|
|
1574
|
-
function
|
|
1631
|
+
function et() {
|
|
1575
1632
|
return /* @__PURE__ */ r.jsxs("div", { className: "flex flex-col items-center justify-center h-72 bg-gradient-to-br from-gray-50 to-gray-100 border-2 border-dashed border-blue-200 rounded-xl shadow-md text-center px-8 py-10", children: [
|
|
1576
1633
|
/* @__PURE__ */ r.jsx("div", { className: "text-xl font-semibold text-gray-700 mb-2", children: "Start building your questionnaire" }),
|
|
1577
1634
|
/* @__PURE__ */ r.jsxs("div", { className: "text-base text-gray-500", children: [
|
|
@@ -1585,32 +1642,32 @@ function st() {
|
|
|
1585
1642
|
] })
|
|
1586
1643
|
] });
|
|
1587
1644
|
}
|
|
1588
|
-
function
|
|
1589
|
-
const
|
|
1590
|
-
return /* @__PURE__ */ r.jsx("div", { className: "w-full max-w-6xl mx-auto px-4 h-fit rounded-lg mt-2", children: /* @__PURE__ */ r.jsxs("div", { className: `grid grid-cols-1 ${
|
|
1591
|
-
|
|
1592
|
-
/* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsx(
|
|
1593
|
-
|
|
1594
|
-
|
|
1645
|
+
function rt({ selectedField: t }) {
|
|
1646
|
+
const s = ee(), a = s.state.isPreview, o = s.state.isEditModalOpen, d = s.state.panelResetKey, f = !a, p = f ? "lg:grid-cols-[280px_minmax(0,1fr)_320px]" : "lg:grid-cols-[minmax(0,1fr)]";
|
|
1647
|
+
return /* @__PURE__ */ r.jsx("div", { className: "w-full max-w-6xl mx-auto px-4 h-fit rounded-lg mt-2", children: /* @__PURE__ */ r.jsxs("div", { className: `grid grid-cols-1 ${p} gap-3 h-full items-start`, children: [
|
|
1648
|
+
f && /* @__PURE__ */ r.jsx("div", { className: "hidden lg:block", children: /* @__PURE__ */ r.jsx(Gr, {}) }),
|
|
1649
|
+
/* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsx(Qr, {}) }),
|
|
1650
|
+
f && /* @__PURE__ */ r.jsx("div", { className: "hidden lg:block", children: /* @__PURE__ */ r.jsx(He, {}, d) }),
|
|
1651
|
+
f && /* @__PURE__ */ r.jsx("div", { className: "lg:hidden", children: o && t && /* @__PURE__ */ r.jsx(
|
|
1595
1652
|
"div",
|
|
1596
1653
|
{
|
|
1597
1654
|
className: "fixed inset-0 top-5 z-50 flex items-center justify-center bg-transparent/30 backdrop-blur-sm p-4",
|
|
1598
|
-
onClick: () =>
|
|
1655
|
+
onClick: () => s.modal.set(!1),
|
|
1599
1656
|
children: /* @__PURE__ */ r.jsxs(
|
|
1600
1657
|
"div",
|
|
1601
1658
|
{
|
|
1602
1659
|
className: "w-full max-w-md mx-auto relative bg-white rounded-lg overflow-hidden",
|
|
1603
|
-
onClick: (
|
|
1660
|
+
onClick: (l) => l.stopPropagation(),
|
|
1604
1661
|
children: [
|
|
1605
1662
|
/* @__PURE__ */ r.jsx(
|
|
1606
1663
|
"button",
|
|
1607
1664
|
{
|
|
1608
1665
|
className: "absolute top-3 right-7 text-gray-500",
|
|
1609
|
-
onClick: () =>
|
|
1666
|
+
onClick: () => s.modal.set(!1),
|
|
1610
1667
|
children: /* @__PURE__ */ r.jsx("span", { className: "text-3xl", children: "×" })
|
|
1611
1668
|
}
|
|
1612
1669
|
),
|
|
1613
|
-
/* @__PURE__ */ r.jsx(
|
|
1670
|
+
/* @__PURE__ */ r.jsx(He, {}, d)
|
|
1614
1671
|
]
|
|
1615
1672
|
}
|
|
1616
1673
|
)
|
|
@@ -1618,37 +1675,40 @@ function it({ selectedField: t }) {
|
|
|
1618
1675
|
) })
|
|
1619
1676
|
] }) });
|
|
1620
1677
|
}
|
|
1621
|
-
function
|
|
1678
|
+
function lt({
|
|
1622
1679
|
initialFields: t,
|
|
1623
|
-
onChange:
|
|
1624
|
-
className:
|
|
1625
|
-
showHeader:
|
|
1626
|
-
showMobileToolbar:
|
|
1627
|
-
startInPreview:
|
|
1680
|
+
onChange: s,
|
|
1681
|
+
className: a = "",
|
|
1682
|
+
showHeader: o = !0,
|
|
1683
|
+
showMobileToolbar: d = !0,
|
|
1684
|
+
startInPreview: f = !1,
|
|
1685
|
+
hideUnsupportedFields: p = !1
|
|
1628
1686
|
}) {
|
|
1629
|
-
const
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
}, [t,
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1687
|
+
const l = ee(), c = Xe(!1);
|
|
1688
|
+
Z(() => {
|
|
1689
|
+
c.current || (Array.isArray(t) && t.length && Y.getState().replaceAll(t), l.preview.set(!!f), c.current = !0);
|
|
1690
|
+
}, [t, f, l.preview]), Z(() => {
|
|
1691
|
+
l.setHideUnsupportedFields(p);
|
|
1692
|
+
}, [p, l]), Z(() => s ? Y.subscribe((v) => {
|
|
1693
|
+
const h = [];
|
|
1694
|
+
v.order.forEach((T) => {
|
|
1695
|
+
const b = v.byId[T];
|
|
1696
|
+
b && (h.push(b), b.fieldType === "section" && Array.isArray(b.fields) && h.push(...b.fields));
|
|
1697
|
+
}), s(h);
|
|
1698
|
+
}) : void 0, [s]);
|
|
1699
|
+
const E = Y(
|
|
1700
|
+
k.useCallback(
|
|
1701
|
+
(g) => l.selectedFieldId.value ? g.byId[l.selectedFieldId.value] : null,
|
|
1702
|
+
[l.selectedFieldId.value]
|
|
1643
1703
|
)
|
|
1644
1704
|
);
|
|
1645
|
-
return /* @__PURE__ */ r.jsxs("div", { className: `qb-editor-root min-h-screen bg-gray-100 font-titillium ${
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
/* @__PURE__ */ r.jsx(
|
|
1705
|
+
return /* @__PURE__ */ r.jsxs("div", { className: `qb-editor-root min-h-screen bg-gray-100 font-titillium ${a}`, children: [
|
|
1706
|
+
o && /* @__PURE__ */ r.jsx(Vr, {}),
|
|
1707
|
+
d && /* @__PURE__ */ r.jsx("div", { className: "lg:hidden", children: /* @__PURE__ */ r.jsx(Jr, {}) }),
|
|
1708
|
+
/* @__PURE__ */ r.jsx(rt, { selectedField: E })
|
|
1649
1709
|
] });
|
|
1650
1710
|
}
|
|
1651
1711
|
export {
|
|
1652
|
-
|
|
1712
|
+
lt as QuestionnaireEditor
|
|
1653
1713
|
};
|
|
1654
1714
|
//# sourceMappingURL=index.js.map
|