treege 3.0.0-beta.22 → 3.0.0-beta.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{TreegeEditor-Cpv8Ar_L.js → TreegeEditor-WqTXkYl3.js} +8 -6
- package/dist/TreegeRenderer-BSR_ez96.js +1813 -0
- package/dist/editor/types/editor.d.ts +4 -0
- package/dist/editor.js +1 -1
- package/dist/main.js +2 -2
- package/dist/renderer.js +1 -2
- package/package.json +1 -1
- package/dist/TreegeRenderer-Ci_Ym86Y.js +0 -1812
|
@@ -0,0 +1,1813 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(`/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}.react-flow{--xy-edge-stroke-default:#b1b1b7;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#555;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#ffffff80;--xy-minimap-background-color-default:#fff;--xy-minimap-mask-background-color-default:#f0f0f099;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#e2e2e2;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:transparent;--xy-background-pattern-dots-color-default:#91919a;--xy-background-pattern-lines-color-default:#eee;--xy-background-pattern-cross-color-default:#e2e2e2;background-color:var(--xy-background-color,var(--xy-background-color-default));--xy-node-border-default:1px solid #bbb;--xy-node-border-selected-default:1px solid #555;--xy-handle-background-color-default:#333;--xy-selection-background-color-default:#9696b41a;--xy-selection-border-default:1px dotted #9b9b9bcc;--xy-resize-background-color-default:#3367d9;direction:ltr}.react-flow.dark{--xy-edge-stroke-default:#3e3e3e;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#727272;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#96969640;--xy-minimap-background-color-default:#141414;--xy-minimap-mask-background-color-default:#3c3c3c99;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#2b2b2b;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:#141414;--xy-background-pattern-dots-color-default:#777;--xy-background-pattern-lines-color-default:#777;--xy-background-pattern-cross-color-default:#777;--xy-node-color-default:#f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props,var(--xy-background-color,var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__pane{z-index:1}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width,var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke,var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width,var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{pointer-events:none;position:absolute;overflow:visible}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:.5s linear infinite dashdraw}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected,var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;user-select:none}.react-flow__arrowhead polyline{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:.5s linear infinite dashdraw}svg.react-flow__connectionline{z-index:1001;position:absolute;overflow:visible}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{-webkit-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default;position:absolute}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:0 0;pointer-events:none}.react-flow__nodesselection-rect{pointer-events:all;cursor:grab;position:absolute}.react-flow__handle{pointer-events:none;background-color:var(--xy-handle-background-color,var(--xy-handle-background-color-default));min-width:5px;min-height:5px;position:absolute}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;bottom:0;left:50%;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__pane.selection .react-flow__panel{pointer-events:none}.react-flow__panel{z-index:5;margin:15px;position:absolute}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-15px)translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-15px)translateY(-50%)}.react-flow__attribution{background:var(--xy-attribution-background-color,var(--xy-attribution-background-color-default));margin:0;padding:2px 3px;font-size:10px}.react-flow__attribution a{color:#999;text-decoration:none}@keyframes dashdraw{0%{stroke-dashoffset:10px}}.react-flow__edgelabel-renderer{pointer-events:none;-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__viewport-portal{-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__minimap{background:var(--xy-minimap-background-color-props,var(--xy-minimap-background-color,var(--xy-minimap-background-color-default)))}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var(--xy-minimap-mask-background-color-props,var(--xy-minimap-mask-background-color,var(--xy-minimap-mask-background-color-default)));stroke:var(--xy-minimap-mask-stroke-color-props,var(--xy-minimap-mask-stroke-color,var(--xy-minimap-mask-stroke-color-default)));stroke-width:var(--xy-minimap-mask-stroke-width-props,var(--xy-minimap-mask-stroke-width,var(--xy-minimap-mask-stroke-width-default)))}.react-flow__minimap-node{fill:var(--xy-minimap-node-background-color-props,var(--xy-minimap-node-background-color,var(--xy-minimap-node-background-color-default)));stroke:var(--xy-minimap-node-stroke-color-props,var(--xy-minimap-node-stroke-color,var(--xy-minimap-node-stroke-color-default)));stroke-width:var(--xy-minimap-node-stroke-width-props,var(--xy-minimap-node-stroke-width,var(--xy-minimap-node-stroke-width-default)))}.react-flow__background-pattern.dots{fill:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-dots-color-default)))}.react-flow__background-pattern.lines{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-lines-color-default)))}.react-flow__background-pattern.cross{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-cross-color-default)))}.react-flow__controls{flex-direction:column;display:flex}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{justify-content:center;align-items:center;width:26px;height:26px;padding:4px;display:flex}.react-flow__controls-button svg{fill:currentColor;width:100%;max-width:12px;max-height:12px}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{border:var(--xy-node-border,var(--xy-node-border-default));color:var(--xy-node-color,var(--xy-node-color-default))}.react-flow__node-input.selected,.react-flow__node-input:focus,.react-flow__node-input:focus-visible,.react-flow__node-default.selected,.react-flow__node-default:focus,.react-flow__node-default:focus-visible,.react-flow__node-output.selected,.react-flow__node-output:focus,.react-flow__node-output:focus-visible,.react-flow__node-group.selected,.react-flow__node-group:focus,.react-flow__node-group:focus-visible{border:var(--xy-node-border-selected,var(--xy-node-border-selected-default));outline:none}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color,var(--xy-selection-background-color-default));border:var(--xy-selection-border,var(--xy-selection-border-default))}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{background-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border:1px solid #fff;border-radius:1px;width:5px;height:5px;translate:-50% -50%}.react-flow__resize-control.handle.left{top:50%;left:0}.react-flow__resize-control.handle.right{top:50%;left:100%}.react-flow__resize-control.handle.top{top:0;left:50%}.react-flow__resize-control.handle.bottom{top:100%;left:50%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border-style:solid;border-width:0}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;height:100%;top:0;transform:translate(-50%)}.react-flow__resize-control.line.left{border-left-width:1px;left:0}.react-flow__resize-control.line.right{border-right-width:1px;left:100%}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{width:100%;height:1px;left:0;transform:translateY(-50%)}.react-flow__resize-control.line.top{border-top-width:1px;top:0}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-300:oklch(80.8% .114 19.571);--color-red-500:oklch(63.7% .237 25.331);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-green-50:oklch(98.2% .018 155.826);--color-green-300:oklch(87.1% .15 154.449);--color-green-800:oklch(44.8% .119 151.328);--color-green-900:oklch(39.3% .095 152.535);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-lg:32rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-widest:.1em;--radius-xs:.125rem;--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-card:var(--treege-card);--color-ring:var(--treege-ring);--color-chart-2:var(--treege-chart-2);--color-chart-3:var(--treege-chart-3);--color-chart-4:var(--treege-chart-4)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--treege-border)}body{color:var(--treege-foreground)}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing)*0)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.-top-3\\.5{top:calc(var(--spacing)*-3.5)}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.top-4{top:calc(var(--spacing)*4)}.top-5{top:calc(var(--spacing)*5)}.top-\\[50\\%\\]{top:50%}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-3{right:calc(var(--spacing)*3)}.right-4{right:calc(var(--spacing)*4)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.left-5{left:calc(var(--spacing)*5)}.left-6{left:calc(var(--spacing)*6)}.left-\\[50\\%\\]{left:50%}.z-50{z-index:50}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing)*1)}.my-4{margin-block:calc(var(--spacing)*4)}.my-8{margin-block:calc(var(--spacing)*8)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-8{margin-top:calc(var(--spacing)*8)}.mt-10{margin-top:calc(var(--spacing)*10)}.mt-auto{margin-top:auto}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-10{margin-bottom:calc(var(--spacing)*10)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.table{display:table}.field-sizing-content{field-sizing:content}.aspect-square{aspect-ratio:1}.size-\\(--cell-size\\){width:var(--cell-size);height:var(--cell-size)}.size-2{width:calc(var(--spacing)*2);height:calc(var(--spacing)*2)}.size-2\\.5{width:calc(var(--spacing)*2.5);height:calc(var(--spacing)*2.5)}.size-3\\.5{width:calc(var(--spacing)*3.5);height:calc(var(--spacing)*3.5)}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-8{width:calc(var(--spacing)*8);height:calc(var(--spacing)*8)}.size-9{width:calc(var(--spacing)*9);height:calc(var(--spacing)*9)}.size-10{width:calc(var(--spacing)*10);height:calc(var(--spacing)*10)}.size-auto{width:auto;height:auto}.size-full{width:100%;height:100%}.\\!h-3{height:calc(var(--spacing)*3)!important}.\\!h-6{height:calc(var(--spacing)*6)!important}.h-\\(--cell-size\\){height:var(--cell-size)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-\\[1\\.15rem\\]{height:1.15rem}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-\\(--radix-dropdown-menu-content-available-height\\){max-height:var(--radix-dropdown-menu-content-available-height)}.max-h-\\(--radix-select-content-available-height\\){max-height:var(--radix-select-content-available-height)}.max-h-150{max-height:calc(var(--spacing)*150)}.max-h-\\[300px\\]{max-height:300px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-16{min-height:calc(var(--spacing)*16)}.\\!w-3{width:calc(var(--spacing)*3)!important}.\\!w-6{width:calc(var(--spacing)*6)!important}.w-\\(--cell-size\\){width:var(--cell-size)}.w-2\\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\\/4{width:75%}.w-4{width:calc(var(--spacing)*4)}.w-4\\/12{width:33.3333%}.w-8{width:calc(var(--spacing)*8)}.w-8\\/12{width:66.6667%}.w-12{width:calc(var(--spacing)*12)}.w-32{width:calc(var(--spacing)*32)}.w-72{width:calc(var(--spacing)*72)}.w-80{width:calc(var(--spacing)*80)}.w-96{width:calc(var(--spacing)*96)}.w-\\[300px\\]{width:300px}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-50{max-width:calc(var(--spacing)*50)}.max-w-\\[350px\\]{max-width:350px}.max-w-\\[calc\\(100\\%-2rem\\)\\]{max-width:calc(100% - 2rem)}.max-w-full{max-width:100%}.min-w-\\(--cell-size\\){min-width:var(--cell-size)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.origin-\\(--radix-dropdown-menu-content-transform-origin\\){transform-origin:var(--radix-dropdown-menu-content-transform-origin)}.origin-\\(--radix-popover-content-transform-origin\\){transform-origin:var(--radix-popover-content-transform-origin)}.origin-\\(--radix-select-content-transform-origin\\){transform-origin:var(--radix-select-content-transform-origin)}.origin-\\(--radix-tooltip-content-transform-origin\\){transform-origin:var(--radix-tooltip-content-transform-origin)}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-\\[-50\\%\\]{--tw-translate-x:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\\[-50\\%\\]{--tw-translate-y:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\\[calc\\(-50\\%_-_2px\\)\\]{--tw-translate-y: calc(-50% - 2px) ;translate:var(--tw-translate-x)var(--tw-translate-y)}.rotate-45{rotate:45deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-in{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize-none{resize:none}.scroll-my-1{scroll-margin-block:calc(var(--spacing)*1)}.scroll-py-1{scroll-padding-block:calc(var(--spacing)*1)}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.place-content-center{place-content:center}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing)*0)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-5{gap:calc(var(--spacing)*5)}.gap-6{gap:calc(var(--spacing)*6)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}.gap-x-3{column-gap:calc(var(--spacing)*3)}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.gap-y-3{row-gap:calc(var(--spacing)*3)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[2px\\]{border-radius:2px}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--treege-radius)}.rounded-md{border-radius:calc(var(--treege-radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--treege-radius) - 4px)}.rounded-xs{border-radius:var(--radius-xs)}.rounded-l-md{border-top-left-radius:calc(var(--treege-radius) - 2px);border-bottom-left-radius:calc(var(--treege-radius) - 2px)}.rounded-r-md{border-top-right-radius:calc(var(--treege-radius) - 2px);border-bottom-right-radius:calc(var(--treege-radius) - 2px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-gray-300{border-color:var(--color-gray-300)}.border-input{border-color:var(--treege-input)}.border-transparent{border-color:#0000}.border-t-transparent{border-top-color:#0000}.border-l-transparent{border-left-color:#0000}.\\!bg-primary{background-color:var(--treege-primary)!important}.bg-accent{background-color:var(--treege-accent)}.bg-background{background-color:var(--treege-background)}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-blue-300{background-color:var(--color-blue-300)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-border{background-color:var(--treege-border)}.bg-chart-2{background-color:var(--treege-chart-2)}.bg-destructive{background-color:var(--treege-destructive)}.bg-foreground{background-color:var(--treege-foreground)}.bg-green-50{background-color:var(--color-green-50)}.bg-muted,.bg-muted\\/20{background-color:var(--treege-muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\\/20{background-color:color-mix(in oklab,var(--treege-muted)20%,transparent)}}.bg-muted\\/30{background-color:var(--treege-muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\\/30{background-color:color-mix(in oklab,var(--treege-muted)30%,transparent)}}.bg-popover{background-color:var(--treege-popover)}.bg-primary{background-color:var(--treege-primary)}.bg-purple-600{background-color:var(--color-purple-600)}.bg-red-50{background-color:var(--color-red-50)}.bg-secondary{background-color:var(--treege-secondary)}.bg-transparent{background-color:#0000}.fill-current{fill:currentColor}.fill-foreground{fill:var(--treege-foreground)}.fill-primary{fill:var(--treege-primary)}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.p-px{padding:1px}.px-\\(--cell-size\\){padding-inline:var(--cell-size)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.pt-2{padding-top:calc(var(--spacing)*2)}.pr-1{padding-right:calc(var(--spacing)*1)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-8{padding-right:calc(var(--spacing)*8)}.pr-10{padding-right:calc(var(--spacing)*10)}.pb-1\\.5{padding-bottom:calc(var(--spacing)*1.5)}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-8{padding-left:calc(var(--spacing)*8)}.text-center{text-align:center}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[0\\.8rem\\]{font-size:.8rem}.leading-none{--tw-leading:1;line-height:1}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.text-nowrap{text-wrap:nowrap}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-\\[\\#13d3b4\\]{color:#13d3b4}.text-\\[--treege-color-primary\\]{color:--treege-color-primary}.text-accent-foreground{color:var(--treege-accent-foreground)}.text-background{color:var(--treege-background)}.text-current{color:currentColor}.text-destructive{color:var(--treege-destructive)}.text-foreground{color:var(--treege-foreground)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-green-800{color:var(--color-green-800)}.text-muted-foreground{color:var(--treege-muted-foreground)}.text-popover-foreground{color:var(--treege-popover-foreground)}.text-primary{color:var(--treege-primary)}.text-primary-foreground{color:var(--treege-primary-foreground)}.text-red-500{color:var(--color-red-500)}.text-red-800{color:var(--color-red-800)}.text-secondary-foreground{color:var(--treege-secondary-foreground)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.\\[color-scheme\\:light\\]{color-scheme:light}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-100{opacity:1}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-offset-background{--tw-ring-offset-color:var(--treege-background)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.drop-shadow-\\[0_0px_35px\\]{--tw-drop-shadow-size:drop-shadow(0 0px 35px var(--tw-drop-shadow-color,currentcolor));--tw-drop-shadow:var(--tw-drop-shadow-size);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,)}.drop-shadow-blue-600{--tw-drop-shadow-color:oklch(54.6% .245 262.881)}@supports (color:color-mix(in lab,red,red)){.drop-shadow-blue-600{--tw-drop-shadow-color:color-mix(in oklab,var(--color-blue-600)var(--tw-drop-shadow-alpha),transparent)}}.drop-shadow-blue-600{--tw-drop-shadow:var(--tw-drop-shadow-size)}.filter{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,)}.transition{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;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[color\\,box-shadow\\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.fade-in-0{--tw-enter-opacity:0}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.zoom-in-95{--tw-enter-scale:.95}.\\[--cell-size\\:--spacing\\(8\\)\\]{--cell-size:calc(var(--spacing)*8)}.group-data-\\[disabled\\=true\\]\\:pointer-events-none:is(:where(.group)[data-disabled=true] *){pointer-events:none}.group-data-\\[disabled\\=true\\]\\:opacity-50:is(:where(.group)[data-disabled=true] *){opacity:.5}.group-data-\\[focused\\=true\\]\\/day\\:relative:is(:where(.group\\/day)[data-focused=true] *){position:relative}.group-data-\\[focused\\=true\\]\\/day\\:z-10:is(:where(.group\\/day)[data-focused=true] *){z-index:10}.group-data-\\[focused\\=true\\]\\/day\\:border-ring:is(:where(.group\\/day)[data-focused=true] *){border-color:var(--treege-ring)}.group-data-\\[focused\\=true\\]\\/day\\:ring-\\[3px\\]:is(:where(.group\\/day)[data-focused=true] *){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.group-data-\\[focused\\=true\\]\\/day\\:ring-ring\\/50:is(:where(.group\\/day)[data-focused=true] *){--tw-ring-color:var(--treege-ring)}@supports (color:color-mix(in lab,red,red)){.group-data-\\[focused\\=true\\]\\/day\\:ring-ring\\/50:is(:where(.group\\/day)[data-focused=true] *){--tw-ring-color:color-mix(in oklab,var(--treege-ring)50%,transparent)}}.peer-disabled\\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.selection\\:bg-primary ::selection{background-color:var(--treege-primary)}.selection\\:bg-primary::selection{background-color:var(--treege-primary)}.selection\\:text-primary-foreground ::selection{color:var(--treege-primary-foreground)}.selection\\:text-primary-foreground::selection{color:var(--treege-primary-foreground)}.file\\:inline-flex::file-selector-button{display:inline-flex}.file\\:h-7::file-selector-button{height:calc(var(--spacing)*7)}.file\\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\\:bg-transparent::file-selector-button{background-color:#0000}.file\\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\\:text-foreground::file-selector-button{color:var(--treege-foreground)}.placeholder\\:text-muted-foreground::placeholder{color:var(--treege-muted-foreground)}@media(hover:hover){.hover\\:\\!bg-primary\\/80:hover{background-color:var(--treege-primary)!important}@supports (color:color-mix(in lab,red,red)){.hover\\:\\!bg-primary\\/80:hover{background-color:color-mix(in oklab,var(--treege-primary)80%,transparent)!important}}.hover\\:bg-accent:hover{background-color:var(--treege-accent)}.hover\\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\\:bg-destructive\\/90:hover{background-color:var(--treege-destructive)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-destructive\\/90:hover{background-color:color-mix(in oklab,var(--treege-destructive)90%,transparent)}}.hover\\:bg-primary\\/90:hover{background-color:var(--treege-primary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab,var(--treege-primary)90%,transparent)}}.hover\\:bg-purple-700:hover{background-color:var(--color-purple-700)}.hover\\:bg-secondary\\/80:hover{background-color:var(--treege-secondary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-secondary\\/80:hover{background-color:color-mix(in oklab,var(--treege-secondary)80%,transparent)}}.hover\\:text-accent-foreground:hover{color:var(--treege-accent-foreground)}.hover\\:text-primary:hover{color:var(--treege-primary)}.hover\\:no-underline:hover{text-decoration-line:none}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-100:hover{opacity:1}}.focus\\:bg-accent:focus{background-color:var(--treege-accent)}.focus\\:text-accent-foreground:focus{color:var(--treege-accent-foreground)}.focus\\:text-destructive:focus{color:var(--treege-destructive)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.focus\\:ring-ring:focus{--tw-ring-color:var(--treege-ring)}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus\\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:border-ring:focus-visible{border-color:var(--treege-ring)}.focus-visible\\:ring-\\[3px\\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-destructive\\/20:focus-visible{--tw-ring-color:var(--treege-destructive)}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-destructive\\/20:focus-visible{--tw-ring-color:color-mix(in oklab,var(--treege-destructive)20%,transparent)}}.focus-visible\\:ring-ring\\/50:focus-visible{--tw-ring-color:var(--treege-ring)}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-ring\\/50:focus-visible{--tw-ring-color:color-mix(in oklab,var(--treege-ring)50%,transparent)}}.focus-visible\\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.has-focus\\:border-ring:has(:focus){border-color:var(--treege-ring)}.has-focus\\:ring-\\[3px\\]:has(:focus){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.has-focus\\:ring-ring\\/50:has(:focus){--tw-ring-color:var(--treege-ring)}@supports (color:color-mix(in lab,red,red)){.has-focus\\:ring-ring\\/50:has(:focus){--tw-ring-color:color-mix(in oklab,var(--treege-ring)50%,transparent)}}.has-\\[\\>svg\\]\\:px-2\\.5:has(>svg){padding-inline:calc(var(--spacing)*2.5)}.has-\\[\\>svg\\]\\:px-3:has(>svg){padding-inline:calc(var(--spacing)*3)}.has-\\[\\>svg\\]\\:px-4:has(>svg){padding-inline:calc(var(--spacing)*4)}.aria-disabled\\:opacity-50[aria-disabled=true]{opacity:.5}.aria-invalid\\:border-destructive[aria-invalid=true]{border-color:var(--treege-destructive)}.aria-invalid\\:ring-destructive\\/20[aria-invalid=true]{--tw-ring-color:var(--treege-destructive)}@supports (color:color-mix(in lab,red,red)){.aria-invalid\\:ring-destructive\\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--treege-destructive)20%,transparent)}}.aria-selected\\:text-muted-foreground[aria-selected=true]{color:var(--treege-muted-foreground)}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[disabled\\=true\\]\\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\\[disabled\\=true\\]\\:opacity-50[data-disabled=true]{opacity:.5}.data-\\[inset\\]\\:pl-8[data-inset]{padding-left:calc(var(--spacing)*8)}.data-\\[orientation\\=horizontal\\]\\:h-px[data-orientation=horizontal]{height:1px}.data-\\[orientation\\=horizontal\\]\\:w-full[data-orientation=horizontal]{width:100%}.data-\\[orientation\\=vertical\\]\\:h-full[data-orientation=vertical]{height:100%}.data-\\[orientation\\=vertical\\]\\:w-px[data-orientation=vertical]{width:1px}.data-\\[placeholder\\]\\:text-muted-foreground[data-placeholder]{color:var(--treege-muted-foreground)}.data-\\[range-end\\=true\\]\\:rounded-md[data-range-end=true]{border-radius:calc(var(--treege-radius) - 2px)}.data-\\[range-end\\=true\\]\\:rounded-r-md[data-range-end=true]{border-top-right-radius:calc(var(--treege-radius) - 2px);border-bottom-right-radius:calc(var(--treege-radius) - 2px)}.data-\\[range-end\\=true\\]\\:bg-primary[data-range-end=true]{background-color:var(--treege-primary)}.data-\\[range-end\\=true\\]\\:text-primary-foreground[data-range-end=true]{color:var(--treege-primary-foreground)}.data-\\[range-middle\\=true\\]\\:rounded-none[data-range-middle=true]{border-radius:0}.data-\\[range-middle\\=true\\]\\:bg-accent[data-range-middle=true]{background-color:var(--treege-accent)}.data-\\[range-middle\\=true\\]\\:text-accent-foreground[data-range-middle=true]{color:var(--treege-accent-foreground)}.data-\\[range-start\\=true\\]\\:rounded-md[data-range-start=true]{border-radius:calc(var(--treege-radius) - 2px)}.data-\\[range-start\\=true\\]\\:rounded-l-md[data-range-start=true]{border-top-left-radius:calc(var(--treege-radius) - 2px);border-bottom-left-radius:calc(var(--treege-radius) - 2px)}.data-\\[range-start\\=true\\]\\:bg-primary[data-range-start=true]{background-color:var(--treege-primary)}.data-\\[range-start\\=true\\]\\:text-primary-foreground[data-range-start=true]{color:var(--treege-primary-foreground)}.data-\\[selected-single\\=true\\]\\:bg-primary[data-selected-single=true]{background-color:var(--treege-primary)}.data-\\[selected-single\\=true\\]\\:text-primary-foreground[data-selected-single=true]{color:var(--treege-primary-foreground)}.data-\\[selected\\=true\\]\\:rounded-none[data-selected=true]{border-radius:0}.data-\\[selected\\=true\\]\\:bg-accent[data-selected=true]{background-color:var(--treege-accent)}.data-\\[selected\\=true\\]\\:text-accent-foreground[data-selected=true]{color:var(--treege-accent-foreground)}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\\[size\\=default\\]\\:h-9[data-size=default]{height:calc(var(--spacing)*9)}.data-\\[size\\=sm\\]\\:h-8[data-size=sm]{height:calc(var(--spacing)*8)}:is(.\\*\\*\\:data-\\[slot\\=command-input-wrapper\\]\\:h-12 *)[data-slot=command-input-wrapper]{height:calc(var(--spacing)*12)}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:flex>*)[data-slot=select-value]{display:flex}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing)*2)}.data-\\[state\\=checked\\]\\:translate-x-\\[calc\\(100\\%-2px\\)\\][data-state=checked]{--tw-translate-x: calc(100% - 2px) ;translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[state\\=checked\\]\\:border-primary[data-state=checked]{border-color:var(--treege-primary)}.data-\\[state\\=checked\\]\\:bg-primary[data-state=checked]{background-color:var(--treege-primary)}.data-\\[state\\=checked\\]\\:text-primary-foreground[data-state=checked]{color:var(--treege-primary-foreground)}.data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\\[state\\=closed\\]\\:duration-300[data-state=closed]{--tw-duration:.3s;transition-duration:.3s}.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=closed\\]\\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y:100%}.data-\\[state\\=closed\\]\\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x:-100%}.data-\\[state\\=closed\\]\\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x:100%}.data-\\[state\\=closed\\]\\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y:-100%}.data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\\[state\\=open\\]\\:bg-accent[data-state=open]{background-color:var(--treege-accent)}.data-\\[state\\=open\\]\\:bg-secondary[data-state=open]{background-color:var(--treege-secondary)}.data-\\[state\\=open\\]\\:text-accent-foreground[data-state=open]{color:var(--treege-accent-foreground)}.data-\\[state\\=open\\]\\:text-muted-foreground[data-state=open]{color:var(--treege-muted-foreground)}.data-\\[state\\=open\\]\\:duration-500[data-state=open]{--tw-duration:.5s;transition-duration:.5s}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[state\\=open\\]\\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y:100%}.data-\\[state\\=open\\]\\:slide-in-from-left[data-state=open]{--tw-enter-translate-x:-100%}.data-\\[state\\=open\\]\\:slide-in-from-right[data-state=open]{--tw-enter-translate-x:100%}.data-\\[state\\=open\\]\\:slide-in-from-top[data-state=open]{--tw-enter-translate-y:-100%}.data-\\[state\\=unchecked\\]\\:translate-x-0[data-state=unchecked]{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[state\\=unchecked\\]\\:bg-input[data-state=unchecked]{background-color:var(--treege-input)}.data-\\[variant\\=destructive\\]\\:text-destructive[data-variant=destructive]{color:var(--treege-destructive)}.data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10[data-variant=destructive]:focus{background-color:var(--treege-destructive)}@supports (color:color-mix(in lab,red,red)){.data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10[data-variant=destructive]:focus{background-color:color-mix(in oklab,var(--treege-destructive)10%,transparent)}}.data-\\[variant\\=destructive\\]\\:focus\\:text-destructive[data-variant=destructive]:focus{color:var(--treege-destructive)}@media(min-width:40rem){.sm\\:max-w-\\[550px\\]{max-width:550px}.sm\\:max-w-lg{max-width:var(--container-lg)}.sm\\:max-w-sm{max-width:var(--container-sm)}.sm\\:flex-row{flex-direction:row}.sm\\:justify-end{justify-content:flex-end}.sm\\:text-left{text-align:left}}@media(min-width:48rem){.md\\:flex-row{flex-direction:row}.md\\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}.dark\\:border-input:is(.dark *){border-color:var(--treege-input)}.dark\\:bg-blue-600:is(.dark *){background-color:var(--color-blue-600)}.dark\\:bg-destructive\\/60:is(.dark *){background-color:var(--treege-destructive)}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-destructive\\/60:is(.dark *){background-color:color-mix(in oklab,var(--treege-destructive)60%,transparent)}}.dark\\:bg-green-900\\/20:is(.dark *){background-color:#0d542b33}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-green-900\\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-green-900)20%,transparent)}}.dark\\:bg-input\\/30:is(.dark *){background-color:var(--treege-input)}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-input\\/30:is(.dark *){background-color:color-mix(in oklab,var(--treege-input)30%,transparent)}}.dark\\:bg-red-900\\/20:is(.dark *){background-color:#82181a33}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-red-900\\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-red-900)20%,transparent)}}.dark\\:text-green-300:is(.dark *){color:var(--color-green-300)}.dark\\:text-red-300:is(.dark *){color:var(--color-red-300)}.dark\\:\\[color-scheme\\:dark\\]:is(.dark *){color-scheme:dark}@media(hover:hover){.dark\\:hover\\:bg-accent\\/50:is(.dark *):hover{background-color:var(--treege-accent)}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-accent\\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--treege-accent)50%,transparent)}}.dark\\:hover\\:bg-input\\/50:is(.dark *):hover{background-color:var(--treege-input)}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-input\\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--treege-input)50%,transparent)}}.dark\\:hover\\:text-accent-foreground:is(.dark *):hover{color:var(--treege-accent-foreground)}}.dark\\:focus-visible\\:ring-destructive\\/40:is(.dark *):focus-visible{--tw-ring-color:var(--treege-destructive)}@supports (color:color-mix(in lab,red,red)){.dark\\:focus-visible\\:ring-destructive\\/40:is(.dark *):focus-visible{--tw-ring-color:color-mix(in oklab,var(--treege-destructive)40%,transparent)}}.dark\\:aria-invalid\\:ring-destructive\\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--treege-destructive)}@supports (color:color-mix(in lab,red,red)){.dark\\:aria-invalid\\:ring-destructive\\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--treege-destructive)40%,transparent)}}.dark\\:data-\\[state\\=checked\\]\\:bg-primary:is(.dark *)[data-state=checked]{background-color:var(--treege-primary)}.dark\\:data-\\[state\\=checked\\]\\:bg-primary-foreground:is(.dark *)[data-state=checked]{background-color:var(--treege-primary-foreground)}.dark\\:data-\\[state\\=unchecked\\]\\:bg-foreground:is(.dark *)[data-state=unchecked]{background-color:var(--treege-foreground)}.dark\\:data-\\[state\\=unchecked\\]\\:bg-input\\/80:is(.dark *)[data-state=unchecked]{background-color:var(--treege-input)}@supports (color:color-mix(in lab,red,red)){.dark\\:data-\\[state\\=unchecked\\]\\:bg-input\\/80:is(.dark *)[data-state=unchecked]{background-color:color-mix(in oklab,var(--treege-input)80%,transparent)}}.dark\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/20:is(.dark *)[data-variant=destructive]:focus{background-color:var(--treege-destructive)}@supports (color:color-mix(in lab,red,red)){.dark\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/20:is(.dark *)[data-variant=destructive]:focus{background-color:color-mix(in oklab,var(--treege-destructive)20%,transparent)}}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:px-2 [cmdk-group-heading]{padding-inline:calc(var(--spacing)*2)}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:py-1\\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing)*1.5)}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:text-xs [cmdk-group-heading]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:font-medium [cmdk-group-heading]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:text-muted-foreground [cmdk-group-heading]{color:var(--treege-muted-foreground)}.\\[\\&_\\[cmdk-group\\]\\]\\:px-2 [cmdk-group]{padding-inline:calc(var(--spacing)*2)}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:calc(var(--spacing)*0)}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:h-5 [cmdk-input-wrapper] svg{height:calc(var(--spacing)*5)}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:w-5 [cmdk-input-wrapper] svg{width:calc(var(--spacing)*5)}.\\[\\&_\\[cmdk-input\\]\\]\\:h-12 [cmdk-input]{height:calc(var(--spacing)*12)}.\\[\\&_\\[cmdk-item\\]\\]\\:px-2 [cmdk-item]{padding-inline:calc(var(--spacing)*2)}.\\[\\&_\\[cmdk-item\\]\\]\\:py-3 [cmdk-item]{padding-block:calc(var(--spacing)*3)}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:h-5 [cmdk-item] svg{height:calc(var(--spacing)*5)}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:w-5 [cmdk-item] svg{width:calc(var(--spacing)*5)}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg:not([class*=size-]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'text-\\'\\]\\)\\]\\:text-muted-foreground svg:not([class*=text-]){color:var(--treege-muted-foreground)}.\\[\\&\\:first-child\\[data-selected\\=true\\]_button\\]\\:rounded-l-md:first-child[data-selected=true] button{border-top-left-radius:calc(var(--treege-radius) - 2px);border-bottom-left-radius:calc(var(--treege-radius) - 2px)}:is(.rtl\\:\\*\\*\\:\\[\\.rdp-button\\\\_next\\>svg\\]\\:rotate-180:where(:dir(rtl),[dir=rtl],[dir=rtl] *) *):is(.rdp-button_next>svg),:is(.rtl\\:\\*\\*\\:\\[\\.rdp-button\\\\_previous\\>svg\\]\\:rotate-180:where(:dir(rtl),[dir=rtl],[dir=rtl] *) *):is(.rdp-button_previous>svg){rotate:180deg}:is(.\\*\\:\\[span\\]\\:last\\:flex>*):is(span):last-child{display:flex}:is(.\\*\\:\\[span\\]\\:last\\:items-center>*):is(span):last-child{align-items:center}:is(.\\*\\:\\[span\\]\\:last\\:gap-2>*):is(span):last-child{gap:calc(var(--spacing)*2)}:is(.data-\\[variant\\=destructive\\]\\:\\*\\:\\[svg\\]\\:\\!text-destructive[data-variant=destructive]>*):is(svg){color:var(--treege-destructive)!important}.\\[\\&\\:last-child\\[data-selected\\=true\\]_button\\]\\:rounded-r-md:last-child[data-selected=true] button{border-top-right-radius:calc(var(--treege-radius) - 2px);border-bottom-right-radius:calc(var(--treege-radius) - 2px)}.\\[\\&\\>span\\]\\:text-xs>span{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\\[\\&\\>span\\]\\:opacity-70>span{opacity:.7}.\\[\\&\\>svg\\]\\:pointer-events-none>svg{pointer-events:none}.\\[\\&\\>svg\\]\\:size-3>svg{width:calc(var(--spacing)*3);height:calc(var(--spacing)*3)}.\\[\\&\\>svg\\]\\:size-3\\.5>svg{width:calc(var(--spacing)*3.5);height:calc(var(--spacing)*3.5)}.\\[\\&\\>svg\\]\\:text-muted-foreground>svg{color:var(--treege-muted-foreground)}[data-slot=card-content] .\\[\\[data-slot\\=card-content\\]_\\&\\]\\:bg-transparent,[data-slot=popover-content] .\\[\\[data-slot\\=popover-content\\]_\\&\\]\\:bg-transparent{background-color:#0000}@media(hover:hover){a.\\[a\\&\\]\\:hover\\:bg-accent:hover{background-color:var(--treege-accent)}a.\\[a\\&\\]\\:hover\\:bg-destructive\\/90:hover{background-color:var(--treege-destructive)}@supports (color:color-mix(in lab,red,red)){a.\\[a\\&\\]\\:hover\\:bg-destructive\\/90:hover{background-color:color-mix(in oklab,var(--treege-destructive)90%,transparent)}}a.\\[a\\&\\]\\:hover\\:bg-primary\\/90:hover{background-color:var(--treege-primary)}@supports (color:color-mix(in lab,red,red)){a.\\[a\\&\\]\\:hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab,var(--treege-primary)90%,transparent)}}a.\\[a\\&\\]\\:hover\\:bg-secondary\\/90:hover{background-color:var(--treege-secondary)}@supports (color:color-mix(in lab,red,red)){a.\\[a\\&\\]\\:hover\\:bg-secondary\\/90:hover{background-color:color-mix(in oklab,var(--treege-secondary)90%,transparent)}}a.\\[a\\&\\]\\:hover\\:text-accent-foreground:hover{color:var(--treege-accent-foreground)}}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}:root{--treege-radius:.625rem;--treege-background:oklch(100% 0 0);--treege-foreground:oklch(14.5% 0 0);--treege-card:oklch(100% 0 0);--treege-card-foreground:oklch(14.5% 0 0);--treege-popover:oklch(100% 0 0);--treege-popover-foreground:oklch(14.5% 0 0);--treege-primary:oklch(20.5% 0 0);--treege-primary-foreground:oklch(98.5% 0 0);--treege-secondary:oklch(97% 0 0);--treege-secondary-foreground:oklch(20.5% 0 0);--treege-muted:oklch(97% 0 0);--treege-muted-foreground:oklch(55.6% 0 0);--treege-accent:oklch(97% 0 0);--treege-accent-foreground:oklch(20.5% 0 0);--treege-destructive:oklch(57.7% .245 27.325);--treege-border:oklch(92.2% 0 0);--treege-input:oklch(92.2% 0 0);--treege-ring:oklch(70.8% 0 0);--treege-chart-1:oklch(64.6% .222 41.116);--treege-chart-2:oklch(60% .118 184.704);--treege-chart-3:oklch(39.8% .07 227.392);--treege-chart-4:oklch(82.8% .189 84.429);--treege-chart-5:oklch(76.9% .188 70.08);--sidebar:oklch(98.5% 0 0);--sidebar-foreground:oklch(14.5% 0 0);--sidebar-primary:oklch(20.5% 0 0);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(97% 0 0);--sidebar-accent-foreground:oklch(20.5% 0 0);--sidebar-border:oklch(92.2% 0 0);--sidebar-ring:oklch(70.8% 0 0)}.dark{--treege-background:oklch(14.5% 0 0);--treege-foreground:oklch(98.5% 0 0);--treege-card:oklch(20.5% 0 0);--treege-card-foreground:oklch(98.5% 0 0);--treege-popover:oklch(20.5% 0 0);--treege-popover-foreground:oklch(98.5% 0 0);--treege-primary:oklch(92.2% 0 0);--treege-primary-foreground:oklch(20.5% 0 0);--treege-secondary:oklch(26.9% 0 0);--treege-secondary-foreground:oklch(98.5% 0 0);--treege-muted:oklch(26.9% 0 0);--treege-muted-foreground:oklch(70.8% 0 0);--treege-accent:oklch(26.9% 0 0);--treege-accent-foreground:oklch(98.5% 0 0);--treege-destructive:oklch(70.4% .191 22.216);--treege-border:oklch(100% 0 0/.1);--treege-input:oklch(100% 0 0/.15);--treege-ring:oklch(55.6% 0 0);--treege-chart-1:oklch(48.8% .243 264.376);--treege-chart-2:oklch(69.6% .17 162.48);--treege-chart-3:oklch(76.9% .188 70.08);--treege-chart-4:oklch(62.7% .265 303.9);--treege-chart-5:oklch(64.5% .246 16.439);--sidebar:oklch(20.5% 0 0);--sidebar-foreground:oklch(98.5% 0 0);--sidebar-primary:oklch(48.8% .243 264.376);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(26.9% 0 0);--sidebar-accent-foreground:oklch(98.5% 0 0);--sidebar-border:oklch(100% 0 0/.1);--sidebar-ring:oklch(55.6% 0 0)}:root{--node-width:280px;--node-height:150px;--node-border-radius:40px;--treege-color-primary:#13d3b4;--treege-color-tertiary:#0065a8;--treege-color-secondary:#007ff6;--treege-color-submit-primary:#ff4757;--treege-color-submit-secondary:#ff6b81;--treege-color-submit-tertiary:#ee5a6f}button{cursor:pointer;-webkit-user-select:none;user-select:none}#root{width:100vw;height:100vh}div.react-flow__node,div.react-flow__node.react-flow__node-input{border:0}div.react-flow__node__wrapper{padding:calc(var(--spacing)*7);width:270px;height:150px;box-shadow:0 0 20px 6px oklch(from var(--treege-color-primary)l c h/10%),0 0 20px oklch(from var(--treege-color-tertiary)l c h/10%);background:linear-gradient(oklch(from var(--color-card)l c h/33%),oklch(from var(--color-card)l c h/33%))padding-box,linear-gradient(145deg,oklch(from var(--treege-color-primary)l c h/40%),#0000,oklch(from var(--treege-color-secondary)l c h/40%))border-box;border:3px solid #0000;border-radius:40px;flex-direction:column;justify-content:center;display:flex}div.react-flow__node__wrapper.in-group{background:linear-gradient(oklch(from var(--color-card)l c h/33%),oklch(from var(--color-card)l c h/33%))padding-box,linear-gradient(145deg,oklch(from var(--color-chart-2)l c h/33%),#0000,oklch(from var(--color-chart-2)l c h/33%))border-box}div.react-flow__node.selected .react-flow__node__wrapper{box-shadow:0 0 20px 6px oklch(from var(--treege-color-primary)l c h/30%),0 0 20px oklch(from var(--treege-color-tertiary)l c h/30%)}div.react-flow__node__wrapper.submit-type{box-shadow:0 0 20px 6px oklch(from var(--treege-color-submit-primary)l c h/10%),0 0 20px oklch(from var(--treege-color-submit-tertiary)l c h/10%);background:linear-gradient(oklch(from var(--color-card)l c h/33%),oklch(from var(--color-card)l c h/33%))padding-box,linear-gradient(145deg,oklch(from var(--treege-color-submit-primary)l c h/40%),#0000,oklch(from var(--treege-color-submit-secondary)l c h/40%))border-box}div.react-flow__node.selected .react-flow__node__wrapper.submit-type{box-shadow:0 0 20px 6px oklch(from var(--treege-color-submit-primary)l c h/30%),0 0 20px oklch(from var(--treege-color-submit-tertiary)l c h/30%)}div.react-flow__node-group,div.react-flow__node-group.selected{background:oklch(from var(--color-chart-2)l c h/5%);box-shadow:none;border:3px dashed var(--color-chart-2)}div.react-flow__node-group .react-flow__resize-control{opacity:0;padding:4px;transition:opacity .2s}div.react-flow__node-group:hover .react-flow__resize-control,.react-flow__resize-control:hover{opacity:1}div.react-flow__handle{background-color:var(--treege-muted-foreground);height:calc(var(--spacing)*6);width:calc(var(--spacing)*6);cursor:pointer;border-radius:calc(var(--treege-radius) - 4px);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration));justify-content:center;align-items:center;display:flex}@media(hover:hover){div.react-flow__handle:hover{background-color:var(--treege-primary)}@supports (color:color-mix(in lab,red,red)){div.react-flow__handle:hover{background-color:color-mix(in oklab,var(--treege-primary)80%,transparent)}}}path.react-flow__edge-path{stroke:var(--treege-muted-foreground)}.button-edge__label{pointer-events:all;transform-origin:50%;position:absolute}.button-edge__button{border:5px solid var(--xy-minimap-background-color-default);background-color:var(--color-ring);width:30px;height:30px;color:var(--treege-primary);cursor:pointer;border-radius:50%;padding-top:0;font-size:12px}.button-edge__button:hover{background-color:var(--treege-destructive);color:#fff}.w-tc-editor{border-radius:calc(var(--treege-radius) - 2px);border-style:var(--tw-border-style);border-width:1px;border-color:var(--treege-input);background-color:var(--treege-input)}@supports (color:color-mix(in lab,red,red)){.w-tc-editor{background-color:color-mix(in oklab,var(--treege-input)30%,transparent)}}.w-tc-editor:is(.dark *){background-color:var(--treege-input)}@supports (color:color-mix(in lab,red,red)){.w-tc-editor:is(.dark *){background-color:color-mix(in oklab,var(--treege-input)30%,transparent)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}`)),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
2
|
+
import { j as t, i as G, L as ye, b as Qe, e as It, F as O, f as A, I as X, C as Ee, h as Oe, k as ke, l as _e, m as Pe, n as k, o as _, P as pe, p as he, B as ce, q as ge, r as Xe, s as y, t as Le, v as Be, S as Ye, w as Ze, x as et, y as tt, z as st, A as rt, D as At, E as Dt, G as Ne, g as ae, N as fe, a as Rt, c as Et, T as Ot } from "./ThemeContext-BIT4DHqC.js";
|
|
3
|
+
import * as qe from "react";
|
|
4
|
+
import { createContext as nt, useContext as at, useMemo as U, useRef as K, useState as L, useCallback as Q, useEffect as J, forwardRef as kt } from "react";
|
|
5
|
+
import He from "dompurify";
|
|
6
|
+
import { MapPin as Ue, ChevronsUpDown as ot, Check as it, ChevronLeftIcon as _t, ChevronRightIcon as Pt, ChevronDownIcon as Me, Loader2 as we, CircleIcon as Mt } from "lucide-react";
|
|
7
|
+
import { getDefaultClassNames as lt, DayPicker as $t } from "react-day-picker";
|
|
8
|
+
import * as oe from "@radix-ui/react-tooltip";
|
|
9
|
+
import * as Ae from "@radix-ui/react-radio-group";
|
|
10
|
+
import "cmdk";
|
|
11
|
+
import "@radix-ui/react-dialog";
|
|
12
|
+
import "clsx";
|
|
13
|
+
import "tailwind-merge";
|
|
14
|
+
import "@radix-ui/react-label";
|
|
15
|
+
import "@radix-ui/react-popover";
|
|
16
|
+
import "@radix-ui/react-checkbox";
|
|
17
|
+
import "@radix-ui/react-select";
|
|
18
|
+
import "@radix-ui/react-switch";
|
|
19
|
+
import "@radix-ui/react-separator";
|
|
20
|
+
const ct = nt(void 0), dt = () => at(ct), Zs = ({
|
|
21
|
+
children: e,
|
|
22
|
+
components: r,
|
|
23
|
+
googleApiKey: n,
|
|
24
|
+
language: s,
|
|
25
|
+
theme: a,
|
|
26
|
+
validationMode: i
|
|
27
|
+
}) => {
|
|
28
|
+
const o = {
|
|
29
|
+
components: r,
|
|
30
|
+
googleApiKey: n,
|
|
31
|
+
language: s,
|
|
32
|
+
theme: a,
|
|
33
|
+
validationMode: i
|
|
34
|
+
};
|
|
35
|
+
return /* @__PURE__ */ t.jsx(ct.Provider, { value: o, children: e });
|
|
36
|
+
}, We = (e) => e == null ? null : typeof e == "boolean" || typeof e == "number" ? e : typeof e == "string" ? e === "" ? null : e : typeof e == "object" ? JSON.stringify(e) : String(e), zt = (e, r, n) => {
|
|
37
|
+
const s = We(e), a = We(r);
|
|
38
|
+
if (s === null || a === null)
|
|
39
|
+
switch (n) {
|
|
40
|
+
case "===":
|
|
41
|
+
return s === a;
|
|
42
|
+
case "!==":
|
|
43
|
+
return s !== a;
|
|
44
|
+
default:
|
|
45
|
+
return !1;
|
|
46
|
+
}
|
|
47
|
+
if ([">", "<", ">=", "<="].includes(n)) {
|
|
48
|
+
const i = Number(s), o = Number(a);
|
|
49
|
+
if (!(Number.isNaN(i) || Number.isNaN(o)))
|
|
50
|
+
switch (n) {
|
|
51
|
+
case ">":
|
|
52
|
+
return i > o;
|
|
53
|
+
case "<":
|
|
54
|
+
return i < o;
|
|
55
|
+
case ">=":
|
|
56
|
+
return i >= o;
|
|
57
|
+
case "<=":
|
|
58
|
+
return i <= o;
|
|
59
|
+
default:
|
|
60
|
+
return !1;
|
|
61
|
+
}
|
|
62
|
+
return !1;
|
|
63
|
+
}
|
|
64
|
+
switch (n) {
|
|
65
|
+
case "===": {
|
|
66
|
+
const i = Number(s), o = Number(a);
|
|
67
|
+
return Number.isNaN(i) || Number.isNaN(o) ? String(s) === String(a) : i === o;
|
|
68
|
+
}
|
|
69
|
+
case "!==": {
|
|
70
|
+
const i = Number(s), o = Number(a);
|
|
71
|
+
return Number.isNaN(i) || Number.isNaN(o) ? String(s) !== String(a) : i !== o;
|
|
72
|
+
}
|
|
73
|
+
default:
|
|
74
|
+
return !1;
|
|
75
|
+
}
|
|
76
|
+
}, ve = (e, r, n) => {
|
|
77
|
+
const { field: s, operator: a, value: i } = e;
|
|
78
|
+
if (!(s && a) || i === void 0)
|
|
79
|
+
return !0;
|
|
80
|
+
let o = r[s];
|
|
81
|
+
if (o === void 0 && n) {
|
|
82
|
+
const c = n.get(s);
|
|
83
|
+
c && G(c) && (o = r[c.id]);
|
|
84
|
+
}
|
|
85
|
+
return zt(o, i, a);
|
|
86
|
+
}, Vt = (e, r, n) => {
|
|
87
|
+
if (!e || e.length === 0)
|
|
88
|
+
return !0;
|
|
89
|
+
if (e.length === 1)
|
|
90
|
+
return ve(e[0], r, n);
|
|
91
|
+
let s = ve(e[0], r, n);
|
|
92
|
+
for (let a = 1; a < e.length; a += 1) {
|
|
93
|
+
const i = e[a], o = ve(i, r, n), c = e[a - 1].logicalOperator || ye.AND;
|
|
94
|
+
if (c === ye.AND) {
|
|
95
|
+
if (s = s && o, !s)
|
|
96
|
+
return !1;
|
|
97
|
+
} else if (c === ye.OR && (s = s || o, s))
|
|
98
|
+
return !0;
|
|
99
|
+
}
|
|
100
|
+
return s;
|
|
101
|
+
}, Lt = (e) => e.filter(G), $e = (e) => {
|
|
102
|
+
if (e.data.name)
|
|
103
|
+
return e.data.name;
|
|
104
|
+
if (e.data.label) {
|
|
105
|
+
if (e.data.label.en)
|
|
106
|
+
return e.data.label.en;
|
|
107
|
+
const r = Object.values(e.data.label).find(Boolean);
|
|
108
|
+
if (r)
|
|
109
|
+
return r;
|
|
110
|
+
}
|
|
111
|
+
return e.id;
|
|
112
|
+
}, Bt = (e, r) => {
|
|
113
|
+
const n = r.find((s) => s.id === e);
|
|
114
|
+
return n ? $e(n) : void 0;
|
|
115
|
+
}, Se = (e) => e == null || typeof e == "string" && e.trim() === "" ? !0 : Array.isArray(e) && e.length === 0, qt = (e, r) => {
|
|
116
|
+
if (!e)
|
|
117
|
+
return !1;
|
|
118
|
+
const n = r[e];
|
|
119
|
+
return n != null;
|
|
120
|
+
}, ze = (e, r) => {
|
|
121
|
+
const n = {};
|
|
122
|
+
return r.forEach((s) => {
|
|
123
|
+
const a = s.id, i = $e(s);
|
|
124
|
+
e[a] !== void 0 && (n[i] = e[a]);
|
|
125
|
+
}), n;
|
|
126
|
+
}, Ge = (e, r, n) => {
|
|
127
|
+
if (!r)
|
|
128
|
+
return e;
|
|
129
|
+
switch (r) {
|
|
130
|
+
case "toString":
|
|
131
|
+
return String(e);
|
|
132
|
+
case "toNumber":
|
|
133
|
+
return Number(e);
|
|
134
|
+
case "toBoolean":
|
|
135
|
+
if (typeof e == "string") {
|
|
136
|
+
const s = e.trim().toLowerCase();
|
|
137
|
+
if (["true", "1", "yes", "on"].includes(s))
|
|
138
|
+
return !0;
|
|
139
|
+
if (["false", "0", "no", "off", ""].includes(s))
|
|
140
|
+
return !1;
|
|
141
|
+
}
|
|
142
|
+
return typeof e == "number" ? e !== 0 : typeof e == "boolean" ? e : !!e;
|
|
143
|
+
case "toArray":
|
|
144
|
+
return Array.isArray(e) ? e : [e];
|
|
145
|
+
case "toObject":
|
|
146
|
+
if (n && Array.isArray(n)) {
|
|
147
|
+
if (typeof e != "object" || e === null)
|
|
148
|
+
return e;
|
|
149
|
+
const s = {};
|
|
150
|
+
return n.forEach((a) => {
|
|
151
|
+
a.sourceKey && a.targetKey && (s[a.targetKey] = e[a.sourceKey]);
|
|
152
|
+
}), s;
|
|
153
|
+
}
|
|
154
|
+
return e;
|
|
155
|
+
default:
|
|
156
|
+
return e;
|
|
157
|
+
}
|
|
158
|
+
}, Ke = (e, r) => {
|
|
159
|
+
if (Object.is(e, r))
|
|
160
|
+
return !0;
|
|
161
|
+
if (!(e && r) || typeof e != "object" || typeof r != "object")
|
|
162
|
+
return !1;
|
|
163
|
+
try {
|
|
164
|
+
return JSON.stringify(e) === JSON.stringify(r);
|
|
165
|
+
} catch {
|
|
166
|
+
return !1;
|
|
167
|
+
}
|
|
168
|
+
}, Ht = (e, r, n) => {
|
|
169
|
+
const s = {};
|
|
170
|
+
return e.forEach((a) => {
|
|
171
|
+
const { defaultValue: i } = a.data;
|
|
172
|
+
if (!i || i.type !== "reference" || !i.referenceField)
|
|
173
|
+
return;
|
|
174
|
+
const o = a.id, { referenceField: c, transformFunction: l, objectMapping: m } = i, u = r[c], d = n[c];
|
|
175
|
+
if (u === d || u === void 0 || u === null)
|
|
176
|
+
return;
|
|
177
|
+
const f = Ge(u, l, m), g = Ge(d, l, m), h = r[o], p = Ke(h, g), j = Ke(h, f);
|
|
178
|
+
!p || j || (s[o] = f);
|
|
179
|
+
}), s;
|
|
180
|
+
}, Ut = (e) => {
|
|
181
|
+
const r = /* @__PURE__ */ new Map();
|
|
182
|
+
return e.forEach((n) => {
|
|
183
|
+
const s = r.get(n.source);
|
|
184
|
+
s ? s.push(n) : r.set(n.source, [n]);
|
|
185
|
+
}), r;
|
|
186
|
+
}, Wt = (e, r, n) => {
|
|
187
|
+
const s = [], a = [], i = [];
|
|
188
|
+
e.forEach((m) => {
|
|
189
|
+
const u = m.data?.isFallback, d = m.data?.conditions?.length;
|
|
190
|
+
u ? i.push(m) : d ? a.push(m) : s.push(m);
|
|
191
|
+
});
|
|
192
|
+
const o = [...s];
|
|
193
|
+
if (a.length === 0)
|
|
194
|
+
return i.length > 0 && o.length === 0 && o.push(...i), { edgesToFollow: o, waitingForInput: !1 };
|
|
195
|
+
if (!a.every((m) => {
|
|
196
|
+
const u = m.data?.conditions;
|
|
197
|
+
return u ? u.every((d) => {
|
|
198
|
+
if (!d.field)
|
|
199
|
+
return !0;
|
|
200
|
+
const f = n.get(d.field), g = G(f) ? f.id : d.field;
|
|
201
|
+
return qt(g, r);
|
|
202
|
+
}) : !1;
|
|
203
|
+
}))
|
|
204
|
+
return i.length > 0 && o.push(...i), { edgesToFollow: o, waitingForInput: o.length === 0 };
|
|
205
|
+
const l = a.filter((m) => Vt(m.data?.conditions, r, n));
|
|
206
|
+
return l.length > 0 ? (o.push(...l), { edgesToFollow: o, waitingForInput: !1 }) : (o.push(...i), { edgesToFollow: o, waitingForInput: !1 });
|
|
207
|
+
}, ut = (e, r) => !r.some((n) => n.target === e), Gt = (e, r) => {
|
|
208
|
+
const n = e.filter((s) => ut(s.id, r));
|
|
209
|
+
return n.find(G) || n[0];
|
|
210
|
+
}, Kt = (e, r, n, s) => {
|
|
211
|
+
e.forEach((a) => {
|
|
212
|
+
const i = s.get(a);
|
|
213
|
+
if (!i)
|
|
214
|
+
return;
|
|
215
|
+
let { parentId: o } = i;
|
|
216
|
+
const c = /* @__PURE__ */ new Set();
|
|
217
|
+
for (; o && !c.has(o); ) {
|
|
218
|
+
if (c.add(o), r.add(o), !n.has(o)) {
|
|
219
|
+
const l = n.get(a);
|
|
220
|
+
l !== void 0 && n.set(o, l);
|
|
221
|
+
}
|
|
222
|
+
o = s.get(o)?.parentId;
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
}, Jt = (e, r, n) => {
|
|
226
|
+
const s = Gt(e, r);
|
|
227
|
+
if (!s)
|
|
228
|
+
return {
|
|
229
|
+
endOfPathReached: !0,
|
|
230
|
+
visibleNodeIds: /* @__PURE__ */ new Set(),
|
|
231
|
+
visibleNodes: [],
|
|
232
|
+
visibleRootNodes: []
|
|
233
|
+
};
|
|
234
|
+
const a = new Map(e.map((p) => [p.id, p])), i = Ut(r), o = [], c = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set();
|
|
235
|
+
let m = !1;
|
|
236
|
+
const u = (p) => {
|
|
237
|
+
if (l.has(p))
|
|
238
|
+
return;
|
|
239
|
+
l.add(p);
|
|
240
|
+
const j = a.get(p);
|
|
241
|
+
if (!j)
|
|
242
|
+
return;
|
|
243
|
+
c.add(p), o.push(j);
|
|
244
|
+
const I = i.get(p) || [], { edgesToFollow: M, waitingForInput: D } = Wt(I, n, a);
|
|
245
|
+
if (D) {
|
|
246
|
+
m = !0;
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
M.forEach((w) => {
|
|
250
|
+
u(w.target);
|
|
251
|
+
});
|
|
252
|
+
};
|
|
253
|
+
u(s.id);
|
|
254
|
+
const d = new Map(o.map((p, j) => [p.id, j])), f = new Set(c);
|
|
255
|
+
Kt(c, f, d, a);
|
|
256
|
+
const g = e.filter((p) => f.has(p.id)).sort((p, j) => (d.get(p.id) ?? Number.MAX_SAFE_INTEGER) - (d.get(j.id) ?? Number.MAX_SAFE_INTEGER)), h = g.filter((p) => !(p.parentId && f.has(p.parentId)));
|
|
257
|
+
return {
|
|
258
|
+
endOfPathReached: !m,
|
|
259
|
+
visibleNodeIds: f,
|
|
260
|
+
visibleNodes: g,
|
|
261
|
+
visibleRootNodes: h
|
|
262
|
+
};
|
|
263
|
+
}, Qt = (e) => {
|
|
264
|
+
if (e.length === 1)
|
|
265
|
+
return e[0];
|
|
266
|
+
const r = new Set(e.map((s) => s.id)), n = /* @__PURE__ */ new Set();
|
|
267
|
+
return e.forEach((s) => {
|
|
268
|
+
s.nodes.forEach((a) => {
|
|
269
|
+
if (Qe(a)) {
|
|
270
|
+
const i = a.data.targetId;
|
|
271
|
+
i && r.has(i) && n.add(i);
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
}), e.find((s) => !n.has(s.id)) || e[0];
|
|
275
|
+
}, mt = (e, r, n, s, a = /* @__PURE__ */ new Set()) => {
|
|
276
|
+
const i = /* @__PURE__ */ new Set();
|
|
277
|
+
for (const o of e)
|
|
278
|
+
if (n.has(o)) {
|
|
279
|
+
const c = s.get(o), l = c ? r.get(c) : void 0;
|
|
280
|
+
if (l) {
|
|
281
|
+
if (c && a.has(c))
|
|
282
|
+
continue;
|
|
283
|
+
c && a.add(c);
|
|
284
|
+
const m = new Set(l.nodes.map((d) => d.id)), u = mt(m, r, n, s, a);
|
|
285
|
+
for (const d of u)
|
|
286
|
+
i.add(d);
|
|
287
|
+
}
|
|
288
|
+
} else
|
|
289
|
+
i.add(o);
|
|
290
|
+
return i;
|
|
291
|
+
}, Xt = (e, r) => {
|
|
292
|
+
const n = /* @__PURE__ */ new Set();
|
|
293
|
+
return r.forEach((s) => {
|
|
294
|
+
e.has(s.source) && e.has(s.target) && n.add(s.source);
|
|
295
|
+
}), Array.from(e).filter((s) => !n.has(s));
|
|
296
|
+
}, ft = (e) => {
|
|
297
|
+
if (!e)
|
|
298
|
+
return { edges: [], id: "empty", nodes: [] };
|
|
299
|
+
const r = Array.isArray(e) ? e : [e];
|
|
300
|
+
if (r.length === 0)
|
|
301
|
+
return { edges: [], id: "empty", nodes: [] };
|
|
302
|
+
const n = Qt(r);
|
|
303
|
+
if (r.length === 1)
|
|
304
|
+
return n;
|
|
305
|
+
const s = new Map(r.map((f) => [f.id, f])), a = [], i = [...n.edges], o = /* @__PURE__ */ new Set([n.id]), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(), u = (f) => {
|
|
306
|
+
const g = [];
|
|
307
|
+
return f.forEach((h) => {
|
|
308
|
+
if (!Qe(h)) {
|
|
309
|
+
g.push(h);
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
const p = h.data.targetId;
|
|
313
|
+
if (!p)
|
|
314
|
+
return;
|
|
315
|
+
const j = s.get(p);
|
|
316
|
+
if (!j) {
|
|
317
|
+
console.warn(`Flow with id "${p}" not found`);
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
const I = j.nodes.find((M) => !M.parentId);
|
|
321
|
+
if (!I) {
|
|
322
|
+
console.warn(`Flow "${p}" has no root node; preserving FlowNode "${h.id}"`), g.push(h);
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
c.set(h.id, I.id), l.set(h.id, p), o.has(p) || (o.add(p), i.push(...j.edges), g.push(...u(j.nodes)));
|
|
326
|
+
}), g;
|
|
327
|
+
};
|
|
328
|
+
a.push(...u(n.nodes)), i.forEach((f) => {
|
|
329
|
+
if (c.has(f.source)) {
|
|
330
|
+
const g = m.get(f.source);
|
|
331
|
+
g ? g.push(f) : m.set(f.source, [f]);
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
const d = i.map((f) => {
|
|
335
|
+
if (c.has(f.source))
|
|
336
|
+
return null;
|
|
337
|
+
const g = c.get(f.target);
|
|
338
|
+
return g ? { ...f, target: g } : f;
|
|
339
|
+
}).filter((f) => f !== null);
|
|
340
|
+
return c.forEach((f, g) => {
|
|
341
|
+
const h = m.get(g);
|
|
342
|
+
if (!h?.length)
|
|
343
|
+
return;
|
|
344
|
+
const p = l.get(g), j = p ? s.get(p) : void 0;
|
|
345
|
+
if (!j)
|
|
346
|
+
return;
|
|
347
|
+
const I = new Set(j.nodes.map((w) => w.id)), M = mt(
|
|
348
|
+
I,
|
|
349
|
+
s,
|
|
350
|
+
c,
|
|
351
|
+
l,
|
|
352
|
+
new Set(p ? [p] : [])
|
|
353
|
+
);
|
|
354
|
+
Xt(M, d).forEach((w) => {
|
|
355
|
+
h.forEach((x) => {
|
|
356
|
+
const b = c.get(x.target) ?? x.target, v = x.id ?? `${g}__${x.target}`;
|
|
357
|
+
d.push({
|
|
358
|
+
...x,
|
|
359
|
+
id: `${w}__${v}`,
|
|
360
|
+
source: w,
|
|
361
|
+
target: b
|
|
362
|
+
});
|
|
363
|
+
});
|
|
364
|
+
});
|
|
365
|
+
}), {
|
|
366
|
+
edges: d,
|
|
367
|
+
id: n.id,
|
|
368
|
+
nodes: a
|
|
369
|
+
};
|
|
370
|
+
}, pt = nt(null), Yt = ({ children: e, value: r }) => /* @__PURE__ */ t.jsx(pt.Provider, { value: r, children: e }), xe = () => {
|
|
371
|
+
const r = at(pt) ?? {
|
|
372
|
+
flows: null,
|
|
373
|
+
formErrors: {},
|
|
374
|
+
formValues: {},
|
|
375
|
+
googleApiKey: void 0,
|
|
376
|
+
inputNodes: [],
|
|
377
|
+
language: "",
|
|
378
|
+
setFieldValue: () => {
|
|
379
|
+
}
|
|
380
|
+
}, n = U(() => r.flows ? ft(r.flows).edges : [], [r.flows]);
|
|
381
|
+
return {
|
|
382
|
+
...r,
|
|
383
|
+
edges: n
|
|
384
|
+
};
|
|
385
|
+
}, Zt = ["b", "i", "em", "strong", "u", "br", "p", "span"], es = ["class"], te = (e, r = {}) => {
|
|
386
|
+
if (e == null || e === "")
|
|
387
|
+
return "";
|
|
388
|
+
const n = String(e), { plainTextOnly: s = !0, allowedTags: a, allowedAttributes: i } = r;
|
|
389
|
+
if (s)
|
|
390
|
+
return He.sanitize(n, {
|
|
391
|
+
ALLOWED_ATTR: [],
|
|
392
|
+
ALLOWED_TAGS: []
|
|
393
|
+
});
|
|
394
|
+
const o = a ?? Zt, c = i ?? es;
|
|
395
|
+
return He.sanitize(n, {
|
|
396
|
+
// Additional security options
|
|
397
|
+
ALLOW_DATA_ATTR: !1,
|
|
398
|
+
// Prevent data-* attributes
|
|
399
|
+
ALLOW_UNKNOWN_PROTOCOLS: !1,
|
|
400
|
+
// Only allow http, https, mailto, etc.
|
|
401
|
+
ALLOWED_ATTR: c,
|
|
402
|
+
ALLOWED_TAGS: o,
|
|
403
|
+
FORBID_ATTR: ["style"],
|
|
404
|
+
// Prevent inline styles
|
|
405
|
+
FORBID_TAGS: ["style", "script"],
|
|
406
|
+
// Explicitly forbid these
|
|
407
|
+
KEEP_CONTENT: !0,
|
|
408
|
+
// Keep text content when removing tags
|
|
409
|
+
RETURN_DOM: !1,
|
|
410
|
+
// Return string, not DOM
|
|
411
|
+
RETURN_DOM_FRAGMENT: !1
|
|
412
|
+
// Return string, not DOM fragment
|
|
413
|
+
});
|
|
414
|
+
}, Je = 100, De = (e, r = {}, n = 0, s = /* @__PURE__ */ new WeakSet()) => {
|
|
415
|
+
if (n > Je)
|
|
416
|
+
return console.warn(`sanitizeHttpResponse: Maximum depth (${Je}) exceeded.`), typeof e == "string" ? te(e, r) : "[Max Depth Exceeded]";
|
|
417
|
+
if (e == null)
|
|
418
|
+
return e;
|
|
419
|
+
if (typeof e == "string")
|
|
420
|
+
return te(e, r);
|
|
421
|
+
if (Array.isArray(e))
|
|
422
|
+
return e.map((a) => De(a, r, n + 1, s));
|
|
423
|
+
if (typeof e == "object") {
|
|
424
|
+
if (s.has(e))
|
|
425
|
+
return console.warn("sanitizeHttpResponse: Circular reference detected. Breaking cycle to prevent infinite recursion."), "[Circular Reference]";
|
|
426
|
+
s.add(e);
|
|
427
|
+
const a = {};
|
|
428
|
+
for (const [i, o] of Object.entries(e))
|
|
429
|
+
a[i] = De(o, r, n + 1, s);
|
|
430
|
+
return s.delete(e), a;
|
|
431
|
+
}
|
|
432
|
+
return e;
|
|
433
|
+
}, B = (e) => {
|
|
434
|
+
const r = xe(), n = e ?? r.language, s = It(n);
|
|
435
|
+
return U(
|
|
436
|
+
() => (a) => {
|
|
437
|
+
const i = s(a);
|
|
438
|
+
return typeof a == "object" && a !== null ? te(i) : i;
|
|
439
|
+
},
|
|
440
|
+
[s]
|
|
441
|
+
);
|
|
442
|
+
}, ts = (e, r = {}, n = "en") => {
|
|
443
|
+
const s = U(() => ft(e), [e]), { nodes: a, edges: i } = s, o = U(() => Lt(a), [a]), c = B(n), l = K({}), [m, u] = L({}), [d, f] = L(() => {
|
|
444
|
+
const x = { ...r };
|
|
445
|
+
return a.forEach((b) => {
|
|
446
|
+
if (G(b)) {
|
|
447
|
+
const v = b.id;
|
|
448
|
+
if (x[v] !== void 0)
|
|
449
|
+
return;
|
|
450
|
+
const { defaultValue: F } = b.data;
|
|
451
|
+
if (!F)
|
|
452
|
+
return;
|
|
453
|
+
if (F.type === "static" && F.staticValue !== void 0 && (x[v] = F.staticValue), F.type === "reference" && F.referenceField) {
|
|
454
|
+
const { referenceField: P } = F, q = x[P];
|
|
455
|
+
q !== void 0 && (x[v] = q);
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}), x;
|
|
459
|
+
}), { endOfPathReached: g, visibleNodes: h, visibleRootNodes: p } = U(
|
|
460
|
+
() => Jt(a, i, d),
|
|
461
|
+
[a, i, d]
|
|
462
|
+
), j = Q((x, b) => {
|
|
463
|
+
f((v) => ({
|
|
464
|
+
...v,
|
|
465
|
+
[x]: b
|
|
466
|
+
})), u((v) => {
|
|
467
|
+
const F = { ...v };
|
|
468
|
+
return delete F[x], F;
|
|
469
|
+
});
|
|
470
|
+
}, []), I = Q((x) => {
|
|
471
|
+
Object.keys(x).length !== 0 && (f((b) => ({
|
|
472
|
+
...b,
|
|
473
|
+
...x
|
|
474
|
+
})), u((b) => {
|
|
475
|
+
const v = { ...b };
|
|
476
|
+
return Object.keys(x).forEach((F) => {
|
|
477
|
+
delete v[F];
|
|
478
|
+
}), v;
|
|
479
|
+
}));
|
|
480
|
+
}, []), M = Q(
|
|
481
|
+
(x) => {
|
|
482
|
+
const b = {};
|
|
483
|
+
h.forEach((P) => {
|
|
484
|
+
if (G(P)) {
|
|
485
|
+
const q = P.id, ee = d[q];
|
|
486
|
+
if (P.data.required && Se(ee)) {
|
|
487
|
+
b[q] = c(P.data.errorMessage) || c("validation.required");
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
490
|
+
if (!Se(ee) && P.data.pattern)
|
|
491
|
+
try {
|
|
492
|
+
new RegExp(P.data.pattern).test(String(ee)) || (b[q] = c(P.data.errorMessage) || c("validation.invalidFormat"));
|
|
493
|
+
} catch (Y) {
|
|
494
|
+
console.error(`Invalid pattern for field ${q}:`, Y);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
});
|
|
498
|
+
const v = x ? x(d, h) : {}, F = {
|
|
499
|
+
...b,
|
|
500
|
+
...v
|
|
501
|
+
};
|
|
502
|
+
return u(F), {
|
|
503
|
+
errors: F,
|
|
504
|
+
hasCustomErrors: Object.keys(v).length > 0,
|
|
505
|
+
isValid: Object.keys(F).length === 0
|
|
506
|
+
};
|
|
507
|
+
},
|
|
508
|
+
[h, d, c]
|
|
509
|
+
), D = U(() => {
|
|
510
|
+
const x = [];
|
|
511
|
+
return h.forEach((b) => {
|
|
512
|
+
if (!G(b))
|
|
513
|
+
return;
|
|
514
|
+
const v = b.id, F = d[v];
|
|
515
|
+
if (b.data.required && Se(F)) {
|
|
516
|
+
const P = c(b.data.label) || v;
|
|
517
|
+
x.push(P);
|
|
518
|
+
}
|
|
519
|
+
}), x;
|
|
520
|
+
}, [h, d, c]);
|
|
521
|
+
return {
|
|
522
|
+
canSubmit: !U(() => h.some((x) => G(x) && x.data.type === "submit"), [h]) && g && a.length > 0,
|
|
523
|
+
formErrors: m,
|
|
524
|
+
formValues: d,
|
|
525
|
+
inputNodes: o,
|
|
526
|
+
mergedFlow: s,
|
|
527
|
+
missingRequiredFields: D,
|
|
528
|
+
prevFormValuesRef: l,
|
|
529
|
+
setFieldValue: j,
|
|
530
|
+
setFormErrors: u,
|
|
531
|
+
setMultipleFieldValues: I,
|
|
532
|
+
t: c,
|
|
533
|
+
validateForm: M,
|
|
534
|
+
visibleNodes: h,
|
|
535
|
+
visibleRootNodes: p
|
|
536
|
+
};
|
|
537
|
+
}, ss = ({ children: e, onSubmit: r }) => /* @__PURE__ */ t.jsx("form", { onSubmit: r, className: "mx-auto max-w-2xl gap-y-3", children: e }), rs = ({ node: e, children: r }) => {
|
|
538
|
+
const n = B();
|
|
539
|
+
return /* @__PURE__ */ t.jsxs("section", { className: "mb-6 rounded-lg border p-4", children: [
|
|
540
|
+
e.data.label && /* @__PURE__ */ t.jsx("h3", { className: "mb-4 font-semibold text-lg", children: n(e.data.label) }),
|
|
541
|
+
r
|
|
542
|
+
] });
|
|
543
|
+
}, ns = async (e, r) => {
|
|
544
|
+
if (!e || e.trim().length < 3)
|
|
545
|
+
return [];
|
|
546
|
+
try {
|
|
547
|
+
const n = await fetch(
|
|
548
|
+
`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(e)}&format=jsonv2&addressdetails=1&limit=5`,
|
|
549
|
+
{
|
|
550
|
+
headers: {
|
|
551
|
+
Accept: "application/json",
|
|
552
|
+
"User-Agent": "Treege Renderer",
|
|
553
|
+
...r && { "Accept-Language": r }
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
);
|
|
557
|
+
return n.ok ? (await n.json()).map((a) => ({
|
|
558
|
+
label: a.display_name,
|
|
559
|
+
value: a.display_name
|
|
560
|
+
})) : [];
|
|
561
|
+
} catch (n) {
|
|
562
|
+
return console.error("Nominatim fetch error:", n), [];
|
|
563
|
+
}
|
|
564
|
+
}, as = (e) => !e || e.trim().length < 3 ? Promise.resolve([]) : new Promise((r) => {
|
|
565
|
+
if (!window.google?.maps?.places) {
|
|
566
|
+
console.warn("Google Places SDK not loaded yet"), r([]);
|
|
567
|
+
return;
|
|
568
|
+
}
|
|
569
|
+
new window.google.maps.places.AutocompleteService().getPlacePredictions({ input: e }, (s, a) => {
|
|
570
|
+
if (a !== google.maps.places.PlacesServiceStatus.OK || !s) {
|
|
571
|
+
console.warn("Google Places API status:", a), r([]);
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
574
|
+
r(
|
|
575
|
+
s.map((i) => ({
|
|
576
|
+
label: i.description,
|
|
577
|
+
value: i.description
|
|
578
|
+
}))
|
|
579
|
+
);
|
|
580
|
+
});
|
|
581
|
+
}), os = ({ node: e, value: r, setValue: n, error: s, label: a, placeholder: i, helperText: o, id: c, name: l }) => {
|
|
582
|
+
const [m, u] = L(""), [d, f] = L([]), [g, h] = L(!1), { googleApiKey: p, language: j } = xe(), I = B(), M = Q(
|
|
583
|
+
(w) => {
|
|
584
|
+
n(w.value), u(w.value), h(!1);
|
|
585
|
+
},
|
|
586
|
+
[n]
|
|
587
|
+
);
|
|
588
|
+
J(() => {
|
|
589
|
+
if (!m || m.trim().length < 3) {
|
|
590
|
+
f([]);
|
|
591
|
+
return;
|
|
592
|
+
}
|
|
593
|
+
const w = setTimeout(async () => {
|
|
594
|
+
const x = p ? await as(m) : await ns(m, j);
|
|
595
|
+
f(x);
|
|
596
|
+
}, 300);
|
|
597
|
+
return () => clearTimeout(w);
|
|
598
|
+
}, [m, p, j]);
|
|
599
|
+
const D = Q(
|
|
600
|
+
(w) => {
|
|
601
|
+
n(w), u(w), w.length >= 3 && h(!0);
|
|
602
|
+
},
|
|
603
|
+
[n]
|
|
604
|
+
);
|
|
605
|
+
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
606
|
+
p && /* @__PURE__ */ t.jsx("script", { async: !0, src: `https://maps.googleapis.com/maps/api/js?key=${p}&libraries=places` }),
|
|
607
|
+
/* @__PURE__ */ t.jsxs(O, { className: "mb-4", children: [
|
|
608
|
+
/* @__PURE__ */ t.jsxs(A, { htmlFor: c, children: [
|
|
609
|
+
a || e.data.name,
|
|
610
|
+
e.data.required && /* @__PURE__ */ t.jsx("span", { className: "text-red-500", children: "*" })
|
|
611
|
+
] }),
|
|
612
|
+
/* @__PURE__ */ t.jsxs("div", { className: "relative", children: [
|
|
613
|
+
/* @__PURE__ */ t.jsx(
|
|
614
|
+
X,
|
|
615
|
+
{
|
|
616
|
+
type: "text",
|
|
617
|
+
id: c,
|
|
618
|
+
name: l,
|
|
619
|
+
value: r || "",
|
|
620
|
+
onChange: (w) => D(w.target.value),
|
|
621
|
+
onFocus: () => {
|
|
622
|
+
d.length > 0 && h(!0);
|
|
623
|
+
},
|
|
624
|
+
placeholder: i || I("renderer.defaultAddressInput.enterAddress"),
|
|
625
|
+
className: "pr-10",
|
|
626
|
+
autoComplete: "off"
|
|
627
|
+
}
|
|
628
|
+
),
|
|
629
|
+
/* @__PURE__ */ t.jsx(Ue, { className: "-translate-y-1/2 pointer-events-none absolute top-1/2 right-3 h-4 w-4 text-muted-foreground" }),
|
|
630
|
+
g && /* @__PURE__ */ t.jsx("div", { className: "absolute z-50 mt-1 w-full rounded-md border bg-popover shadow-md", children: /* @__PURE__ */ t.jsx(Ee, { children: /* @__PURE__ */ t.jsxs(Oe, { children: [
|
|
631
|
+
/* @__PURE__ */ t.jsx(ke, { children: I("renderer.defaultAddressInput.noAddressesFound") }),
|
|
632
|
+
/* @__PURE__ */ t.jsx(_e, { children: d.map((w, x) => /* @__PURE__ */ t.jsxs(
|
|
633
|
+
Pe,
|
|
634
|
+
{
|
|
635
|
+
value: w.value,
|
|
636
|
+
onSelect: () => M(w),
|
|
637
|
+
onMouseDown: (b) => b.preventDefault(),
|
|
638
|
+
children: [
|
|
639
|
+
/* @__PURE__ */ t.jsx(Ue, { className: "mr-2 h-4 w-4" }),
|
|
640
|
+
w.label
|
|
641
|
+
]
|
|
642
|
+
},
|
|
643
|
+
x
|
|
644
|
+
)) })
|
|
645
|
+
] }) }) })
|
|
646
|
+
] }),
|
|
647
|
+
s && /* @__PURE__ */ t.jsx(k, { children: s }),
|
|
648
|
+
o && !s && /* @__PURE__ */ t.jsx(_, { children: o })
|
|
649
|
+
] })
|
|
650
|
+
] });
|
|
651
|
+
}, is = ({
|
|
652
|
+
node: e,
|
|
653
|
+
value: r,
|
|
654
|
+
setValue: n,
|
|
655
|
+
error: s,
|
|
656
|
+
label: a,
|
|
657
|
+
placeholder: i,
|
|
658
|
+
helperText: o,
|
|
659
|
+
id: c
|
|
660
|
+
}) => {
|
|
661
|
+
const l = B(), [m, u] = L(!1), d = `${c}-trigger`, f = `${c}-error`, g = e.data.options || [], h = g.find((p) => p.value === r);
|
|
662
|
+
return /* @__PURE__ */ t.jsxs(O, { className: "mb-4", children: [
|
|
663
|
+
/* @__PURE__ */ t.jsxs(A, { htmlFor: d, children: [
|
|
664
|
+
a || e.data.name,
|
|
665
|
+
e.data.required && /* @__PURE__ */ t.jsx("span", { className: "text-red-500", children: "*" })
|
|
666
|
+
] }),
|
|
667
|
+
/* @__PURE__ */ t.jsxs(pe, { open: m, onOpenChange: u, children: [
|
|
668
|
+
/* @__PURE__ */ t.jsx(he, { asChild: !0, children: /* @__PURE__ */ t.jsxs(
|
|
669
|
+
ce,
|
|
670
|
+
{
|
|
671
|
+
id: d,
|
|
672
|
+
variant: "outline",
|
|
673
|
+
role: "combobox",
|
|
674
|
+
"aria-expanded": m,
|
|
675
|
+
"aria-invalid": !!s || void 0,
|
|
676
|
+
"aria-describedby": s ? f : void 0,
|
|
677
|
+
className: "w-full justify-between font-normal",
|
|
678
|
+
children: [
|
|
679
|
+
r ? h?.label ? l(h.label) : r : i || l("renderer.defaultAutocompleteInput.selectOption"),
|
|
680
|
+
/* @__PURE__ */ t.jsx(ot, { className: "ml-2 size-4 shrink-0 opacity-50" })
|
|
681
|
+
]
|
|
682
|
+
}
|
|
683
|
+
) }),
|
|
684
|
+
/* @__PURE__ */ t.jsx(ge, { className: "w-full p-0", align: "start", children: /* @__PURE__ */ t.jsxs(Ee, { children: [
|
|
685
|
+
/* @__PURE__ */ t.jsx(Xe, { placeholder: i || l("renderer.defaultAutocompleteInput.search") }),
|
|
686
|
+
/* @__PURE__ */ t.jsxs(Oe, { children: [
|
|
687
|
+
/* @__PURE__ */ t.jsx(ke, { children: l("renderer.defaultAutocompleteInput.noResults") }),
|
|
688
|
+
/* @__PURE__ */ t.jsx(_e, { children: g.map((p) => /* @__PURE__ */ t.jsxs(
|
|
689
|
+
Pe,
|
|
690
|
+
{
|
|
691
|
+
value: p.value,
|
|
692
|
+
disabled: p.disabled,
|
|
693
|
+
onSelect: (j) => {
|
|
694
|
+
n(j === r ? "" : j), u(!1);
|
|
695
|
+
},
|
|
696
|
+
children: [
|
|
697
|
+
/* @__PURE__ */ t.jsx(it, { className: y("mr-2 size-4", r === p.value ? "opacity-100" : "opacity-0") }),
|
|
698
|
+
l(p.label)
|
|
699
|
+
]
|
|
700
|
+
},
|
|
701
|
+
p.value
|
|
702
|
+
)) })
|
|
703
|
+
] })
|
|
704
|
+
] }) })
|
|
705
|
+
] }),
|
|
706
|
+
s && /* @__PURE__ */ t.jsx(k, { id: f, children: s }),
|
|
707
|
+
o && !s && /* @__PURE__ */ t.jsx(_, { children: o })
|
|
708
|
+
] });
|
|
709
|
+
}, ls = ({ node: e, value: r, setValue: n, error: s, label: a, helperText: i, id: o, name: c }) => {
|
|
710
|
+
const l = B();
|
|
711
|
+
if (e.data.options && e.data.options.length > 0) {
|
|
712
|
+
const m = Array.isArray(r) ? r.map(String) : [], u = (d, f) => {
|
|
713
|
+
const g = f ? [...m, d] : m.filter((h) => h !== d);
|
|
714
|
+
n(g);
|
|
715
|
+
};
|
|
716
|
+
return /* @__PURE__ */ t.jsxs(O, { className: "mb-4", children: [
|
|
717
|
+
/* @__PURE__ */ t.jsxs(A, { className: "mb-1", children: [
|
|
718
|
+
a || e.data.name,
|
|
719
|
+
e.data.required && /* @__PURE__ */ t.jsx("span", { className: "text-red-500", children: "*" })
|
|
720
|
+
] }),
|
|
721
|
+
/* @__PURE__ */ t.jsx("div", { className: "space-y-2", children: e.data.options.map((d, f) => /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
722
|
+
/* @__PURE__ */ t.jsx(
|
|
723
|
+
Le,
|
|
724
|
+
{
|
|
725
|
+
id: `${o}-${d.value}`,
|
|
726
|
+
name: c,
|
|
727
|
+
checked: m.includes(String(d.value)),
|
|
728
|
+
onCheckedChange: (g) => u(String(d.value), !!g),
|
|
729
|
+
disabled: d.disabled
|
|
730
|
+
}
|
|
731
|
+
),
|
|
732
|
+
/* @__PURE__ */ t.jsx(A, { htmlFor: `${o}-${d.value}`, className: "cursor-pointer font-normal text-sm", children: l(d.label) ? l(d.label) : d.value })
|
|
733
|
+
] }, d.value + f)) }),
|
|
734
|
+
s && /* @__PURE__ */ t.jsx(k, { children: s }),
|
|
735
|
+
i && !s && /* @__PURE__ */ t.jsx(_, { children: i })
|
|
736
|
+
] });
|
|
737
|
+
}
|
|
738
|
+
return /* @__PURE__ */ t.jsxs(O, { className: "mb-4", children: [
|
|
739
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
740
|
+
/* @__PURE__ */ t.jsx(
|
|
741
|
+
Le,
|
|
742
|
+
{
|
|
743
|
+
id: o,
|
|
744
|
+
name: c,
|
|
745
|
+
checked: typeof r == "boolean" ? r : !1,
|
|
746
|
+
onCheckedChange: (m) => n(!!m)
|
|
747
|
+
}
|
|
748
|
+
),
|
|
749
|
+
/* @__PURE__ */ t.jsxs("div", { children: [
|
|
750
|
+
/* @__PURE__ */ t.jsxs(A, { htmlFor: o, className: "cursor-pointer font-medium text-sm", children: [
|
|
751
|
+
a || e.data.name,
|
|
752
|
+
e.data.required && /* @__PURE__ */ t.jsx("span", { className: "text-red-500", children: "*" })
|
|
753
|
+
] }),
|
|
754
|
+
i && !s && /* @__PURE__ */ t.jsx(_, { children: i })
|
|
755
|
+
] })
|
|
756
|
+
] }),
|
|
757
|
+
s && /* @__PURE__ */ t.jsx(k, { children: s })
|
|
758
|
+
] });
|
|
759
|
+
};
|
|
760
|
+
function ht({
|
|
761
|
+
className: e,
|
|
762
|
+
classNames: r,
|
|
763
|
+
showOutsideDays: n = !0,
|
|
764
|
+
captionLayout: s = "label",
|
|
765
|
+
buttonVariant: a = "ghost",
|
|
766
|
+
formatters: i,
|
|
767
|
+
components: o,
|
|
768
|
+
...c
|
|
769
|
+
}) {
|
|
770
|
+
const l = lt();
|
|
771
|
+
return /* @__PURE__ */ t.jsx(
|
|
772
|
+
$t,
|
|
773
|
+
{
|
|
774
|
+
showOutsideDays: n,
|
|
775
|
+
className: y(
|
|
776
|
+
"group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
777
|
+
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
778
|
+
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
779
|
+
e
|
|
780
|
+
),
|
|
781
|
+
captionLayout: s,
|
|
782
|
+
formatters: {
|
|
783
|
+
formatMonthDropdown: (m) => m.toLocaleString("default", { month: "short" }),
|
|
784
|
+
...i
|
|
785
|
+
},
|
|
786
|
+
classNames: {
|
|
787
|
+
button_next: y(
|
|
788
|
+
Be({ variant: a }),
|
|
789
|
+
"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
|
|
790
|
+
l.button_next
|
|
791
|
+
),
|
|
792
|
+
button_previous: y(
|
|
793
|
+
Be({ variant: a }),
|
|
794
|
+
"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
|
|
795
|
+
l.button_previous
|
|
796
|
+
),
|
|
797
|
+
caption_label: y(
|
|
798
|
+
"select-none font-medium",
|
|
799
|
+
s === "label" ? "text-sm" : "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",
|
|
800
|
+
l.caption_label
|
|
801
|
+
),
|
|
802
|
+
day: y(
|
|
803
|
+
"relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",
|
|
804
|
+
l.day
|
|
805
|
+
),
|
|
806
|
+
disabled: y("text-muted-foreground opacity-50", l.disabled),
|
|
807
|
+
dropdown: y("absolute bg-popover inset-0 opacity-0", l.dropdown),
|
|
808
|
+
dropdown_root: y(
|
|
809
|
+
"relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",
|
|
810
|
+
l.dropdown_root
|
|
811
|
+
),
|
|
812
|
+
dropdowns: y("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5", l.dropdowns),
|
|
813
|
+
hidden: y("invisible", l.hidden),
|
|
814
|
+
month: y("flex flex-col w-full gap-4", l.month),
|
|
815
|
+
month_caption: y("flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)", l.month_caption),
|
|
816
|
+
months: y("flex gap-4 flex-col md:flex-row relative", l.months),
|
|
817
|
+
nav: y("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between", l.nav),
|
|
818
|
+
outside: y("text-muted-foreground aria-selected:text-muted-foreground", l.outside),
|
|
819
|
+
range_end: y("rounded-r-md bg-accent", l.range_end),
|
|
820
|
+
range_middle: y("rounded-none", l.range_middle),
|
|
821
|
+
range_start: y("rounded-l-md bg-accent", l.range_start),
|
|
822
|
+
root: y("w-fit", l.root),
|
|
823
|
+
table: "w-full border-collapse",
|
|
824
|
+
today: y("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none", l.today),
|
|
825
|
+
week: y("flex w-full mt-2", l.week),
|
|
826
|
+
week_number: y("text-[0.8rem] select-none text-muted-foreground", l.week_number),
|
|
827
|
+
week_number_header: y("select-none w-(--cell-size)", l.week_number_header),
|
|
828
|
+
weekday: y("text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none", l.weekday),
|
|
829
|
+
weekdays: y("flex", l.weekdays),
|
|
830
|
+
...r
|
|
831
|
+
},
|
|
832
|
+
components: {
|
|
833
|
+
Chevron: ({ className: m, orientation: u, ...d }) => u === "left" ? /* @__PURE__ */ t.jsx(_t, { className: y("size-4", m), ...d }) : u === "right" ? /* @__PURE__ */ t.jsx(Pt, { className: y("size-4", m), ...d }) : /* @__PURE__ */ t.jsx(Me, { className: y("size-4", m), ...d }),
|
|
834
|
+
DayButton: cs,
|
|
835
|
+
Root: ({ className: m, rootRef: u, ...d }) => /* @__PURE__ */ t.jsx("div", { "data-slot": "calendar", ref: u, className: y(m), ...d }),
|
|
836
|
+
WeekNumber: ({ children: m, ...u }) => /* @__PURE__ */ t.jsx("td", { ...u, children: /* @__PURE__ */ t.jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children: m }) }),
|
|
837
|
+
...o
|
|
838
|
+
},
|
|
839
|
+
...c
|
|
840
|
+
}
|
|
841
|
+
);
|
|
842
|
+
}
|
|
843
|
+
function cs({ className: e, day: r, modifiers: n, ...s }) {
|
|
844
|
+
const a = lt(), i = qe.useRef(null);
|
|
845
|
+
return qe.useEffect(() => {
|
|
846
|
+
n.focused && i.current?.focus();
|
|
847
|
+
}, [n.focused]), /* @__PURE__ */ t.jsx(
|
|
848
|
+
ce,
|
|
849
|
+
{
|
|
850
|
+
ref: i,
|
|
851
|
+
variant: "ghost",
|
|
852
|
+
size: "icon",
|
|
853
|
+
"data-day": r.date.toLocaleDateString(),
|
|
854
|
+
"data-selected-single": n.selected && !n.range_start && !n.range_end && !n.range_middle,
|
|
855
|
+
"data-range-start": n.range_start,
|
|
856
|
+
"data-range-end": n.range_end,
|
|
857
|
+
"data-range-middle": n.range_middle,
|
|
858
|
+
className: y(
|
|
859
|
+
"flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-start=true]:rounded-l-md data-[range-end=true]:bg-primary data-[range-middle=true]:bg-accent data-[range-start=true]:bg-primary data-[selected-single=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:text-accent-foreground data-[range-start=true]:text-primary-foreground data-[selected-single=true]:text-primary-foreground group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70",
|
|
860
|
+
a.day,
|
|
861
|
+
e
|
|
862
|
+
),
|
|
863
|
+
...s
|
|
864
|
+
}
|
|
865
|
+
);
|
|
866
|
+
}
|
|
867
|
+
const ds = ({ node: e, value: r, setValue: n, error: s, label: a, placeholder: i, helperText: o, id: c, name: l }) => {
|
|
868
|
+
const [m, u] = L(!1), d = B(), f = r ? new Date(r) : void 0, g = (h) => {
|
|
869
|
+
if (e.data.disablePast) {
|
|
870
|
+
const p = /* @__PURE__ */ new Date();
|
|
871
|
+
return p.setHours(0, 0, 0, 0), h < p;
|
|
872
|
+
}
|
|
873
|
+
return !1;
|
|
874
|
+
};
|
|
875
|
+
return /* @__PURE__ */ t.jsxs(O, { className: "mb-4", children: [
|
|
876
|
+
/* @__PURE__ */ t.jsxs(A, { htmlFor: c, children: [
|
|
877
|
+
a || e.data.name,
|
|
878
|
+
e.data.required && /* @__PURE__ */ t.jsx("span", { className: "text-red-500", children: "*" })
|
|
879
|
+
] }),
|
|
880
|
+
/* @__PURE__ */ t.jsxs(pe, { open: m, onOpenChange: u, children: [
|
|
881
|
+
/* @__PURE__ */ t.jsx(he, { asChild: !0, children: /* @__PURE__ */ t.jsxs(ce, { variant: "outline", id: c, name: l, className: "w-full justify-between font-normal", children: [
|
|
882
|
+
f ? f.toLocaleDateString() : i || d("renderer.defaultInputs.selectDate"),
|
|
883
|
+
/* @__PURE__ */ t.jsx(Me, { className: "size-4" })
|
|
884
|
+
] }) }),
|
|
885
|
+
/* @__PURE__ */ t.jsx(ge, { className: "w-auto overflow-hidden p-0", align: "start", children: /* @__PURE__ */ t.jsx(
|
|
886
|
+
ht,
|
|
887
|
+
{
|
|
888
|
+
mode: "single",
|
|
889
|
+
selected: f,
|
|
890
|
+
captionLayout: "dropdown",
|
|
891
|
+
disabled: g,
|
|
892
|
+
onSelect: (h) => {
|
|
893
|
+
n(h ? h.toISOString() : ""), u(!1);
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
) })
|
|
897
|
+
] }),
|
|
898
|
+
s && /* @__PURE__ */ t.jsx(k, { children: s }),
|
|
899
|
+
o && !s && /* @__PURE__ */ t.jsx(_, { children: o })
|
|
900
|
+
] });
|
|
901
|
+
}, us = ({ node: e, value: r, setValue: n, error: s, label: a, helperText: i, id: o }) => {
|
|
902
|
+
const [c, l] = L(!1), m = B(), u = Array.isArray(r) ? r : [], d = u[0] ? new Date(u[0]) : void 0, f = u[1] ? new Date(u[1]) : void 0, g = (j) => {
|
|
903
|
+
n([j?.from ? j.from.toISOString() : void 0, j?.to ? j.to.toISOString() : void 0]);
|
|
904
|
+
}, h = () => d && f ? `${d.toLocaleDateString()} - ${f.toLocaleDateString()}` : d ? d.toLocaleDateString() : m("renderer.defaultInputs.selectDateRange"), p = (j) => {
|
|
905
|
+
if (e.data.disablePast) {
|
|
906
|
+
const I = /* @__PURE__ */ new Date();
|
|
907
|
+
return I.setHours(0, 0, 0, 0), j < I;
|
|
908
|
+
}
|
|
909
|
+
return !1;
|
|
910
|
+
};
|
|
911
|
+
return /* @__PURE__ */ t.jsxs(O, { className: "mb-4", children: [
|
|
912
|
+
/* @__PURE__ */ t.jsxs(A, { htmlFor: o, children: [
|
|
913
|
+
a || e.data.name,
|
|
914
|
+
e.data.required && /* @__PURE__ */ t.jsx("span", { className: "text-red-500", children: "*" })
|
|
915
|
+
] }),
|
|
916
|
+
/* @__PURE__ */ t.jsxs(pe, { open: c, onOpenChange: l, children: [
|
|
917
|
+
/* @__PURE__ */ t.jsx(he, { asChild: !0, children: /* @__PURE__ */ t.jsxs(ce, { id: o, variant: "outline", className: "w-full justify-between font-normal", children: [
|
|
918
|
+
h(),
|
|
919
|
+
/* @__PURE__ */ t.jsx(Me, { className: "size-4" })
|
|
920
|
+
] }) }),
|
|
921
|
+
/* @__PURE__ */ t.jsx(ge, { className: "w-auto overflow-hidden p-0", align: "start", children: /* @__PURE__ */ t.jsx(
|
|
922
|
+
ht,
|
|
923
|
+
{
|
|
924
|
+
mode: "range",
|
|
925
|
+
selected: { from: d, to: f },
|
|
926
|
+
captionLayout: "dropdown",
|
|
927
|
+
disabled: p,
|
|
928
|
+
onSelect: g,
|
|
929
|
+
numberOfMonths: 2
|
|
930
|
+
}
|
|
931
|
+
) })
|
|
932
|
+
] }),
|
|
933
|
+
s && /* @__PURE__ */ t.jsx(k, { children: s }),
|
|
934
|
+
i && !s && /* @__PURE__ */ t.jsx(_, { children: i })
|
|
935
|
+
] });
|
|
936
|
+
}, gt = (e) => new Promise((r, n) => {
|
|
937
|
+
const s = new FileReader();
|
|
938
|
+
s.onload = () => {
|
|
939
|
+
const a = s.result;
|
|
940
|
+
r({
|
|
941
|
+
data: a,
|
|
942
|
+
lastModified: e.lastModified,
|
|
943
|
+
name: e.name,
|
|
944
|
+
size: e.size,
|
|
945
|
+
type: e.type
|
|
946
|
+
});
|
|
947
|
+
}, s.onerror = () => {
|
|
948
|
+
n(new Error(`Failed to read file: ${e.name}`));
|
|
949
|
+
}, s.readAsDataURL(e);
|
|
950
|
+
}), er = (e) => {
|
|
951
|
+
const r = e.data.split(",")[1], n = atob(r), s = new ArrayBuffer(n.length), a = new Uint8Array(s);
|
|
952
|
+
for (let o = 0; o < n.length; o++)
|
|
953
|
+
a[o] = n.charCodeAt(o);
|
|
954
|
+
const i = new Blob([s], { type: e.type });
|
|
955
|
+
return new File([i], e.name, {
|
|
956
|
+
lastModified: e.lastModified,
|
|
957
|
+
type: e.type
|
|
958
|
+
});
|
|
959
|
+
}, ms = (e) => Promise.all(e.map((r) => gt(r))), fs = ({ node: e, setValue: r, error: n, label: s, placeholder: a, helperText: i, name: o, id: c }) => {
|
|
960
|
+
const l = async (m) => {
|
|
961
|
+
const { files: u } = m.target;
|
|
962
|
+
if (!u || u.length === 0) {
|
|
963
|
+
r(null);
|
|
964
|
+
return;
|
|
965
|
+
}
|
|
966
|
+
if (e.data.multiple) {
|
|
967
|
+
const f = await ms(Array.from(u));
|
|
968
|
+
r(f);
|
|
969
|
+
return;
|
|
970
|
+
}
|
|
971
|
+
const d = await gt(u[0]);
|
|
972
|
+
r(d);
|
|
973
|
+
};
|
|
974
|
+
return /* @__PURE__ */ t.jsxs(O, { className: "mb-4", children: [
|
|
975
|
+
/* @__PURE__ */ t.jsxs(A, { htmlFor: c, children: [
|
|
976
|
+
s || e.data.name,
|
|
977
|
+
e.data.required && /* @__PURE__ */ t.jsx("span", { className: "text-red-500", children: "*" })
|
|
978
|
+
] }),
|
|
979
|
+
/* @__PURE__ */ t.jsx(X, { type: "file", name: o, id: c, onChange: l, multiple: e.data.multiple, placeholder: a }),
|
|
980
|
+
n && /* @__PURE__ */ t.jsx(k, { children: n }),
|
|
981
|
+
i && !n && /* @__PURE__ */ t.jsx(_, { children: i })
|
|
982
|
+
] });
|
|
983
|
+
}, ps = ({ value: e, name: r, id: n }) => /* @__PURE__ */ t.jsx(X, { type: "hidden", id: n, name: r, value: e ?? "" });
|
|
984
|
+
function Ve({ delayDuration: e = 0, ...r }) {
|
|
985
|
+
return /* @__PURE__ */ t.jsx(oe.Provider, { "data-slot": "tooltip-provider", delayDuration: e, ...r });
|
|
986
|
+
}
|
|
987
|
+
function xt({ ...e }) {
|
|
988
|
+
return /* @__PURE__ */ t.jsx(Ve, { children: /* @__PURE__ */ t.jsx(oe.Root, { "data-slot": "tooltip", ...e }) });
|
|
989
|
+
}
|
|
990
|
+
function bt({ ...e }) {
|
|
991
|
+
return /* @__PURE__ */ t.jsx(oe.Trigger, { "data-slot": "tooltip-trigger", ...e });
|
|
992
|
+
}
|
|
993
|
+
function jt({ className: e, sideOffset: r = 0, children: n, ...s }) {
|
|
994
|
+
return /* @__PURE__ */ t.jsx(oe.Portal, { children: /* @__PURE__ */ t.jsxs(
|
|
995
|
+
oe.Content,
|
|
996
|
+
{
|
|
997
|
+
"data-slot": "tooltip-content",
|
|
998
|
+
sideOffset: r,
|
|
999
|
+
className: y(
|
|
1000
|
+
"fade-in-0 zoom-in-95 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in text-balance rounded-md bg-foreground px-3 py-1.5 text-background text-xs data-[state=closed]:animate-out",
|
|
1001
|
+
e
|
|
1002
|
+
),
|
|
1003
|
+
...s,
|
|
1004
|
+
children: [
|
|
1005
|
+
n,
|
|
1006
|
+
/* @__PURE__ */ t.jsx(oe.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" })
|
|
1007
|
+
]
|
|
1008
|
+
}
|
|
1009
|
+
) });
|
|
1010
|
+
}
|
|
1011
|
+
const Fe = (e, r) => r ? r.split(".").reduce((s, a) => {
|
|
1012
|
+
if (s == null)
|
|
1013
|
+
return;
|
|
1014
|
+
const i = a.match(/^(\w+)\[(\d+)]$/);
|
|
1015
|
+
if (i) {
|
|
1016
|
+
const [, o, c] = i, l = s[o];
|
|
1017
|
+
return Array.isArray(l) ? l[Number.parseInt(c, 10)] : l;
|
|
1018
|
+
}
|
|
1019
|
+
return s[a];
|
|
1020
|
+
}, e) : e, Re = (e) => {
|
|
1021
|
+
const r = e.matchAll(/{{([\w-]+)}}/g);
|
|
1022
|
+
return Array.from(r, (n) => n[1]);
|
|
1023
|
+
}, Ce = (e, r) => Re(e).every((s) => {
|
|
1024
|
+
const a = r[s];
|
|
1025
|
+
return a != null && a !== "";
|
|
1026
|
+
}), Te = (e, r, n = !1) => e.replace(/{{([\w-]+)}}/g, (s, a) => {
|
|
1027
|
+
const i = String(r[a] || "");
|
|
1028
|
+
return n ? encodeURIComponent(i) : i;
|
|
1029
|
+
}), hs = ({ node: e, value: r, setValue: n, error: s, label: a, placeholder: i, helperText: o, id: c, name: l }) => {
|
|
1030
|
+
const [m, u] = L(!1), [d, f] = L(null), [g, h] = L([]), [p, j] = L(""), [I, M] = L(!1), { formValues: D, inputNodes: w } = xe(), x = B(), { httpConfig: b } = e.data, v = K(!1), F = K(""), P = K(b), q = K(D), ee = K(w), Y = K(n), de = K(null), se = U(() => b?.url ? Re(b.url) : [], [b?.url]), re = se.length > 0, ie = U(() => se.map((C) => `${C}:${String(D[C] ?? "")}`).join("|"), [se, D]), le = U(() => b?.url ? re ? Ce(b.url, D) : !0 : !1, [b?.url, re, D]), W = Q(
|
|
1031
|
+
async (C) => {
|
|
1032
|
+
const T = P.current, V = q.current, N = Y.current;
|
|
1033
|
+
if (!T?.url) {
|
|
1034
|
+
f(x("renderer.defaultHttpInput.noUrlConfigured"));
|
|
1035
|
+
return;
|
|
1036
|
+
}
|
|
1037
|
+
if (!(T.url && !Ce(T.url, V))) {
|
|
1038
|
+
u(!0), f(null);
|
|
1039
|
+
try {
|
|
1040
|
+
const $ = Te(T.url, V, !0), R = T.searchParam && C ? `${$}${$.includes("?") ? "&" : "?"}${T.searchParam}=${encodeURIComponent(C)}` : $, E = {};
|
|
1041
|
+
T.headers?.forEach((ne) => {
|
|
1042
|
+
E[ne.key] = Te(ne.value, V);
|
|
1043
|
+
});
|
|
1044
|
+
const S = ["POST", "PUT", "PATCH"].includes(T.method || "") ? T.sendFormData ? JSON.stringify(ze(V, ee.current)) : T.body ? Te(T.body, V) : void 0 : void 0, z = await fetch(R, {
|
|
1045
|
+
body: S || void 0,
|
|
1046
|
+
headers: {
|
|
1047
|
+
"Content-Type": "application/json",
|
|
1048
|
+
...E
|
|
1049
|
+
},
|
|
1050
|
+
method: T.method || "GET"
|
|
1051
|
+
});
|
|
1052
|
+
if (!z.ok) {
|
|
1053
|
+
f(`HTTP Error ${z.status}: ${z.statusText}`), u(!1);
|
|
1054
|
+
return;
|
|
1055
|
+
}
|
|
1056
|
+
const H = await z.json(), ue = De(H), Z = T.responsePath ? Fe(ue, T.responsePath) : ue;
|
|
1057
|
+
if (T.responseMapping && Array.isArray(Z)) {
|
|
1058
|
+
const { valueField: ne = "value", labelField: be = "label" } = T.responseMapping, je = Z.map((me) => ({
|
|
1059
|
+
label: String(Fe(me, be) || ""),
|
|
1060
|
+
value: String(Fe(me, ne) || "")
|
|
1061
|
+
}));
|
|
1062
|
+
h(je);
|
|
1063
|
+
} else
|
|
1064
|
+
N(typeof Z == "string" ? Z : JSON.stringify(Z));
|
|
1065
|
+
} catch ($) {
|
|
1066
|
+
const R = $ instanceof Error ? $.message : x("renderer.defaultHttpInput.fetchFailed");
|
|
1067
|
+
f(R), console.error("HTTP Input fetch error:", $);
|
|
1068
|
+
} finally {
|
|
1069
|
+
u(!1);
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
},
|
|
1073
|
+
[x]
|
|
1074
|
+
);
|
|
1075
|
+
if (J(() => {
|
|
1076
|
+
P.current = b, q.current = D, ee.current = w, Y.current = n, de.current = W;
|
|
1077
|
+
}, [b, D, w, n, W]), J(() => {
|
|
1078
|
+
if (v.current)
|
|
1079
|
+
return;
|
|
1080
|
+
v.current = !0;
|
|
1081
|
+
const C = P.current, T = q.current, V = de.current, N = C?.url && Ce(C.url, T);
|
|
1082
|
+
if (C?.fetchOnMount && N && V && (V(), C.url)) {
|
|
1083
|
+
const $ = Re(C.url);
|
|
1084
|
+
F.current = $.map((R) => `${R}:${String(T[R] ?? "")}`).join("|");
|
|
1085
|
+
}
|
|
1086
|
+
}, []), J(() => {
|
|
1087
|
+
if (!v.current || !re || F.current === ie || !le)
|
|
1088
|
+
return;
|
|
1089
|
+
const C = setTimeout(() => {
|
|
1090
|
+
W(), F.current = ie;
|
|
1091
|
+
}, 500);
|
|
1092
|
+
return () => clearTimeout(C);
|
|
1093
|
+
}, [ie, re, le, W]), J(() => {
|
|
1094
|
+
if (!(b?.searchParam && p))
|
|
1095
|
+
return;
|
|
1096
|
+
const C = setTimeout(() => {
|
|
1097
|
+
W(p);
|
|
1098
|
+
}, 300);
|
|
1099
|
+
return () => clearTimeout(C);
|
|
1100
|
+
}, [p, b?.searchParam, W]), b?.responseMapping) {
|
|
1101
|
+
const C = Array.isArray(r) ? r[0] : r, T = g.find((S) => S.value === C);
|
|
1102
|
+
if (b.searchParam) {
|
|
1103
|
+
const z = m && b?.showLoading ? /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1104
|
+
/* @__PURE__ */ t.jsx(we, { className: "h-4 w-4 animate-spin" }),
|
|
1105
|
+
/* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: T?.label || i || x("renderer.defaultHttpInput.search") })
|
|
1106
|
+
] }) : T?.label || i || x("renderer.defaultHttpInput.search");
|
|
1107
|
+
return /* @__PURE__ */ t.jsxs(O, { className: "mb-4", children: [
|
|
1108
|
+
/* @__PURE__ */ t.jsxs(A, { children: [
|
|
1109
|
+
a || e.data.name,
|
|
1110
|
+
e.data.required && /* @__PURE__ */ t.jsx("span", { className: "text-red-500", children: "*" })
|
|
1111
|
+
] }),
|
|
1112
|
+
/* @__PURE__ */ t.jsxs(pe, { open: I, onOpenChange: M, children: [
|
|
1113
|
+
/* @__PURE__ */ t.jsx(he, { asChild: !0, children: /* @__PURE__ */ t.jsxs(ce, { variant: "outline", role: "combobox", "aria-expanded": I, className: "w-full justify-between", children: [
|
|
1114
|
+
z,
|
|
1115
|
+
/* @__PURE__ */ t.jsx(ot, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
1116
|
+
] }) }),
|
|
1117
|
+
/* @__PURE__ */ t.jsx(ge, { className: "w-[300px] p-0", align: "start", children: /* @__PURE__ */ t.jsxs(Ee, { shouldFilter: !1, children: [
|
|
1118
|
+
/* @__PURE__ */ t.jsx(
|
|
1119
|
+
Xe,
|
|
1120
|
+
{
|
|
1121
|
+
placeholder: x("renderer.defaultHttpInput.search"),
|
|
1122
|
+
value: p,
|
|
1123
|
+
onValueChange: (H) => {
|
|
1124
|
+
j(H), f(null);
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
),
|
|
1128
|
+
/* @__PURE__ */ t.jsxs(Oe, { children: [
|
|
1129
|
+
m && /* @__PURE__ */ t.jsx("div", { className: "flex items-center justify-center p-4", children: /* @__PURE__ */ t.jsx(we, { className: "h-4 w-4 animate-spin" }) }),
|
|
1130
|
+
!m && d && /* @__PURE__ */ t.jsxs("div", { className: "p-4 text-destructive text-sm", children: [
|
|
1131
|
+
/* @__PURE__ */ t.jsx("div", { children: d }),
|
|
1132
|
+
/* @__PURE__ */ t.jsx("button", { type: "button", onClick: () => W(p), className: "mt-2 block text-primary hover:underline", children: x("renderer.defaultHttpInput.retry") })
|
|
1133
|
+
] }),
|
|
1134
|
+
!(m || d) && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1135
|
+
/* @__PURE__ */ t.jsx(ke, { children: x("renderer.defaultHttpInput.noResults") }),
|
|
1136
|
+
/* @__PURE__ */ t.jsx(_e, { children: g.map((H) => /* @__PURE__ */ t.jsxs(
|
|
1137
|
+
Pe,
|
|
1138
|
+
{
|
|
1139
|
+
value: H.value,
|
|
1140
|
+
onSelect: () => {
|
|
1141
|
+
n(H.value), M(!1);
|
|
1142
|
+
},
|
|
1143
|
+
children: [
|
|
1144
|
+
/* @__PURE__ */ t.jsx(it, { className: y("mr-2 h-4 w-4", r === H.value ? "opacity-100" : "opacity-0") }),
|
|
1145
|
+
H.label
|
|
1146
|
+
]
|
|
1147
|
+
},
|
|
1148
|
+
H.value
|
|
1149
|
+
)) })
|
|
1150
|
+
] })
|
|
1151
|
+
] })
|
|
1152
|
+
] }) })
|
|
1153
|
+
] }),
|
|
1154
|
+
s && /* @__PURE__ */ t.jsx(k, { children: s }),
|
|
1155
|
+
o && !s && /* @__PURE__ */ t.jsx(_, { children: o })
|
|
1156
|
+
] });
|
|
1157
|
+
}
|
|
1158
|
+
const V = m && b?.showLoading, N = se.filter((S) => {
|
|
1159
|
+
const z = D[S];
|
|
1160
|
+
return z == null || z === "";
|
|
1161
|
+
}), $ = N.map((S) => Bt(S, w) || S), R = g.length === 0 && !V ? d || (N.length > 0 ? `${x("renderer.defaultHttpInput.waitingForRequiredFields")}: ${$.join(", ")}` : x("renderer.defaultHttpInput.noDataAvailable")) : void 0, E = /* @__PURE__ */ t.jsxs(
|
|
1162
|
+
Ye,
|
|
1163
|
+
{
|
|
1164
|
+
value: Array.isArray(r) ? r[0] ?? "" : r ?? "",
|
|
1165
|
+
onValueChange: (S) => n(S),
|
|
1166
|
+
disabled: V || g.length === 0,
|
|
1167
|
+
name: l,
|
|
1168
|
+
children: [
|
|
1169
|
+
/* @__PURE__ */ t.jsxs(Ze, { id: c, name: l, className: "w-full", children: [
|
|
1170
|
+
V && /* @__PURE__ */ t.jsx(we, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
1171
|
+
/* @__PURE__ */ t.jsx(et, { placeholder: i || x("renderer.defaultHttpInput.selectOption") })
|
|
1172
|
+
] }),
|
|
1173
|
+
/* @__PURE__ */ t.jsx(tt, { children: /* @__PURE__ */ t.jsx(st, { children: g.map((S, z) => /* @__PURE__ */ t.jsx(rt, { value: S.value, children: S.label }, S.value + z)) }) })
|
|
1174
|
+
]
|
|
1175
|
+
}
|
|
1176
|
+
);
|
|
1177
|
+
return /* @__PURE__ */ t.jsxs(O, { className: "mb-4", children: [
|
|
1178
|
+
/* @__PURE__ */ t.jsxs(A, { htmlFor: c, children: [
|
|
1179
|
+
a || e.data.name,
|
|
1180
|
+
e.data.required && /* @__PURE__ */ t.jsx("span", { className: "text-red-500", children: "*" })
|
|
1181
|
+
] }),
|
|
1182
|
+
R ? /* @__PURE__ */ t.jsx(Ve, { children: /* @__PURE__ */ t.jsxs(xt, { children: [
|
|
1183
|
+
/* @__PURE__ */ t.jsx(bt, { asChild: !0, children: /* @__PURE__ */ t.jsx("div", { className: "w-full", children: E }) }),
|
|
1184
|
+
/* @__PURE__ */ t.jsx(jt, { children: /* @__PURE__ */ t.jsx("p", { children: R }) })
|
|
1185
|
+
] }) }) : E,
|
|
1186
|
+
s && /* @__PURE__ */ t.jsx(k, { children: s }),
|
|
1187
|
+
o && !s && /* @__PURE__ */ t.jsx(_, { children: o })
|
|
1188
|
+
] });
|
|
1189
|
+
}
|
|
1190
|
+
return /* @__PURE__ */ t.jsxs(O, { className: "mb-4", children: [
|
|
1191
|
+
/* @__PURE__ */ t.jsxs(A, { htmlFor: c, children: [
|
|
1192
|
+
a || e.data.name,
|
|
1193
|
+
e.data.required && /* @__PURE__ */ t.jsx("span", { className: "text-red-500", children: "*" })
|
|
1194
|
+
] }),
|
|
1195
|
+
/* @__PURE__ */ t.jsx(X, { type: "text", name: l, id: c, value: typeof r == "string" ? r : JSON.stringify(r), readOnly: !0, disabled: !0 }),
|
|
1196
|
+
s && /* @__PURE__ */ t.jsx(k, { children: s }),
|
|
1197
|
+
o && !s && /* @__PURE__ */ t.jsx(_, { children: o })
|
|
1198
|
+
] });
|
|
1199
|
+
}, gs = ({ node: e, value: r, setValue: n, error: s, label: a, placeholder: i, helperText: o, name: c, id: l }) => /* @__PURE__ */ t.jsxs(O, { className: "mb-4", children: [
|
|
1200
|
+
/* @__PURE__ */ t.jsxs(A, { htmlFor: l, children: [
|
|
1201
|
+
a || e.data.name,
|
|
1202
|
+
e.data.required && /* @__PURE__ */ t.jsx("span", { className: "text-red-500", children: "*" })
|
|
1203
|
+
] }),
|
|
1204
|
+
/* @__PURE__ */ t.jsx(
|
|
1205
|
+
X,
|
|
1206
|
+
{
|
|
1207
|
+
id: l,
|
|
1208
|
+
type: "number",
|
|
1209
|
+
name: c,
|
|
1210
|
+
value: r ?? "",
|
|
1211
|
+
onChange: (m) => n(m.target.value === "" ? null : Number(m.target.value)),
|
|
1212
|
+
placeholder: i
|
|
1213
|
+
}
|
|
1214
|
+
),
|
|
1215
|
+
s && /* @__PURE__ */ t.jsx(k, { children: s }),
|
|
1216
|
+
o && !s && /* @__PURE__ */ t.jsx(_, { children: o })
|
|
1217
|
+
] }), xs = ({ node: e, value: r, setValue: n, error: s, label: a, placeholder: i, helperText: o, name: c, id: l }) => /* @__PURE__ */ t.jsxs(O, { className: "mb-4", children: [
|
|
1218
|
+
/* @__PURE__ */ t.jsxs(A, { htmlFor: l, children: [
|
|
1219
|
+
a || e.data.name,
|
|
1220
|
+
e.data.required && /* @__PURE__ */ t.jsx("span", { className: "text-red-500", children: "*" })
|
|
1221
|
+
] }),
|
|
1222
|
+
/* @__PURE__ */ t.jsx(
|
|
1223
|
+
X,
|
|
1224
|
+
{
|
|
1225
|
+
id: l,
|
|
1226
|
+
name: c,
|
|
1227
|
+
type: "password",
|
|
1228
|
+
value: r ?? "",
|
|
1229
|
+
onChange: (m) => n(m.target.value),
|
|
1230
|
+
placeholder: i,
|
|
1231
|
+
autoComplete: "new-password"
|
|
1232
|
+
}
|
|
1233
|
+
),
|
|
1234
|
+
s && /* @__PURE__ */ t.jsx(k, { children: s }),
|
|
1235
|
+
o && !s && /* @__PURE__ */ t.jsx(_, { children: o })
|
|
1236
|
+
] });
|
|
1237
|
+
function bs({ className: e, ...r }) {
|
|
1238
|
+
return /* @__PURE__ */ t.jsx(Ae.Root, { "data-slot": "radio-group", className: y("grid gap-3", e), ...r });
|
|
1239
|
+
}
|
|
1240
|
+
function js({ className: e, ...r }) {
|
|
1241
|
+
return /* @__PURE__ */ t.jsx(
|
|
1242
|
+
Ae.Item,
|
|
1243
|
+
{
|
|
1244
|
+
"data-slot": "radio-group-item",
|
|
1245
|
+
className: y(
|
|
1246
|
+
"aspect-square size-4 shrink-0 rounded-full border border-input text-primary shadow-xs outline-none transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40",
|
|
1247
|
+
e
|
|
1248
|
+
),
|
|
1249
|
+
...r,
|
|
1250
|
+
children: /* @__PURE__ */ t.jsx(Ae.Indicator, { "data-slot": "radio-group-indicator", className: "relative flex items-center justify-center", children: /* @__PURE__ */ t.jsx(Mt, { className: "-translate-x-1/2 -translate-y-1/2 absolute top-1/2 left-1/2 size-2 fill-primary" }) })
|
|
1251
|
+
}
|
|
1252
|
+
);
|
|
1253
|
+
}
|
|
1254
|
+
const ys = ({ node: e, value: r, setValue: n, error: s, label: a, helperText: i, id: o, name: c }) => {
|
|
1255
|
+
const l = B(), m = r ? String(r) : "";
|
|
1256
|
+
return /* @__PURE__ */ t.jsxs(O, { className: "mb-4", children: [
|
|
1257
|
+
/* @__PURE__ */ t.jsxs(A, { className: "mb-1", htmlFor: o, children: [
|
|
1258
|
+
a || e.data.name,
|
|
1259
|
+
e.data.required && /* @__PURE__ */ t.jsx("span", { className: "text-red-500", children: "*" })
|
|
1260
|
+
] }),
|
|
1261
|
+
/* @__PURE__ */ t.jsx(bs, { value: m, onValueChange: (u) => n(u), id: o, name: c, children: e.data.options?.map((u, d) => /* @__PURE__ */ t.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
1262
|
+
/* @__PURE__ */ t.jsx(js, { value: String(u.value), id: `${o}-${u.value}`, disabled: u.disabled }),
|
|
1263
|
+
/* @__PURE__ */ t.jsx(A, { htmlFor: `${o}-${u.value}`, className: "cursor-pointer font-normal text-sm", children: l(u.label) ? l(u.label) : u.value })
|
|
1264
|
+
] }, u.value + d)) }),
|
|
1265
|
+
s && /* @__PURE__ */ t.jsx(k, { children: s }),
|
|
1266
|
+
i && !s && /* @__PURE__ */ t.jsx(_, { children: i })
|
|
1267
|
+
] });
|
|
1268
|
+
}, Ns = ({ node: e, value: r, setValue: n, error: s, label: a, placeholder: i, helperText: o, name: c, id: l }) => {
|
|
1269
|
+
const m = B(), u = r ? String(r) : "";
|
|
1270
|
+
return /* @__PURE__ */ t.jsxs(O, { className: "mb-4", children: [
|
|
1271
|
+
/* @__PURE__ */ t.jsxs(A, { htmlFor: l, children: [
|
|
1272
|
+
a || e.data.name,
|
|
1273
|
+
e.data.required && /* @__PURE__ */ t.jsx("span", { className: "text-red-500", children: "*" })
|
|
1274
|
+
] }),
|
|
1275
|
+
/* @__PURE__ */ t.jsxs(Ye, { name: c, value: u, onValueChange: (d) => n(d), children: [
|
|
1276
|
+
/* @__PURE__ */ t.jsx(Ze, { id: l, name: c, className: "w-full", children: /* @__PURE__ */ t.jsx(et, { placeholder: i || m("renderer.defaultSelectInput.selectOption") }) }),
|
|
1277
|
+
/* @__PURE__ */ t.jsx(tt, { children: /* @__PURE__ */ t.jsx(st, { children: e.data.options?.map((d, f) => /* @__PURE__ */ t.jsx(rt, { value: String(d.value), disabled: d.disabled, children: m(d.label) ? m(d.label) : d.value }, `${d.value}-${f}`)) }) })
|
|
1278
|
+
] }),
|
|
1279
|
+
s && /* @__PURE__ */ t.jsx(k, { children: s }),
|
|
1280
|
+
o && !s && /* @__PURE__ */ t.jsx(_, { children: o })
|
|
1281
|
+
] });
|
|
1282
|
+
}, yt = kt(
|
|
1283
|
+
({ label: e, id: r, disabled: n, onBlur: s, onClick: a, onFocus: i, onPointerDown: o, onPointerLeave: c, onPointerMove: l, ...m }, u) => {
|
|
1284
|
+
const d = B();
|
|
1285
|
+
return /* @__PURE__ */ t.jsx(
|
|
1286
|
+
"button",
|
|
1287
|
+
{
|
|
1288
|
+
ref: u,
|
|
1289
|
+
id: r,
|
|
1290
|
+
onBlur: s,
|
|
1291
|
+
onClick: a,
|
|
1292
|
+
onFocus: i,
|
|
1293
|
+
onPointerDown: o,
|
|
1294
|
+
disabled: n,
|
|
1295
|
+
onPointerLeave: c,
|
|
1296
|
+
onPointerMove: l,
|
|
1297
|
+
type: "submit",
|
|
1298
|
+
className: "mt-4 rounded-md bg-blue-500 px-4 py-2 font-medium text-white transition-colors hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1299
|
+
...m,
|
|
1300
|
+
children: e || d("renderer.defaultSubmitButton.submit")
|
|
1301
|
+
}
|
|
1302
|
+
);
|
|
1303
|
+
}
|
|
1304
|
+
), Nt = ({ children: e, missingFields: r = [] }) => {
|
|
1305
|
+
const n = r.length > 0, s = B();
|
|
1306
|
+
return n ? /* @__PURE__ */ t.jsx(Ve, { children: /* @__PURE__ */ t.jsxs(xt, { children: [
|
|
1307
|
+
/* @__PURE__ */ t.jsx(bt, { asChild: !0, children: e }),
|
|
1308
|
+
/* @__PURE__ */ t.jsx(jt, { children: /* @__PURE__ */ t.jsxs("div", { className: "space-y-1", children: [
|
|
1309
|
+
/* @__PURE__ */ t.jsxs("p", { className: "font-semibold", children: [
|
|
1310
|
+
s("renderer.defaultSubmitButton.requiredFieldsMissing"),
|
|
1311
|
+
":"
|
|
1312
|
+
] }),
|
|
1313
|
+
/* @__PURE__ */ t.jsx("ul", { className: "list-inside list-disc", children: r.map((a, i) => /* @__PURE__ */ t.jsx("li", { children: a }, i)) })
|
|
1314
|
+
] }) })
|
|
1315
|
+
] }) }) : e;
|
|
1316
|
+
}, ws = ({ missingRequiredFields: e, isSubmitting: r, label: n }) => {
|
|
1317
|
+
const s = dt(), a = s?.components?.submitButton, i = s?.components?.submitButtonWrapper, o = a || yt, c = i || Nt;
|
|
1318
|
+
return /* @__PURE__ */ t.jsx(c, { missingFields: e, children: /* @__PURE__ */ t.jsx(o, { label: n, disabled: r }) });
|
|
1319
|
+
}, vs = ({ node: e, value: r, setValue: n, error: s, label: a, helperText: i, name: o, id: c }) => /* @__PURE__ */ t.jsxs(O, { className: "mb-4", children: [
|
|
1320
|
+
/* @__PURE__ */ t.jsxs(A, { htmlFor: c, children: [
|
|
1321
|
+
a || e.data.name,
|
|
1322
|
+
e.data.required && /* @__PURE__ */ t.jsx("span", { className: "text-red-500", children: "*" })
|
|
1323
|
+
] }),
|
|
1324
|
+
/* @__PURE__ */ t.jsx(At, { id: c, name: o, checked: r, onCheckedChange: n }),
|
|
1325
|
+
i && !s && /* @__PURE__ */ t.jsx(_, { children: i }),
|
|
1326
|
+
s && /* @__PURE__ */ t.jsx(k, { children: s })
|
|
1327
|
+
] }), Ss = ({ node: e, value: r, setValue: n, error: s, label: a, placeholder: i, helperText: o, name: c, id: l }) => /* @__PURE__ */ t.jsxs(O, { className: "mb-4", children: [
|
|
1328
|
+
/* @__PURE__ */ t.jsxs(A, { htmlFor: l, children: [
|
|
1329
|
+
a || e.data.name,
|
|
1330
|
+
e.data.required && /* @__PURE__ */ t.jsx("span", { className: "text-red-500", children: "*" })
|
|
1331
|
+
] }),
|
|
1332
|
+
/* @__PURE__ */ t.jsx(
|
|
1333
|
+
Dt,
|
|
1334
|
+
{
|
|
1335
|
+
id: l,
|
|
1336
|
+
name: c,
|
|
1337
|
+
value: r ?? "",
|
|
1338
|
+
onChange: (m) => n(m.target.value),
|
|
1339
|
+
placeholder: i,
|
|
1340
|
+
className: "w-full rounded-md border px-3 py-2",
|
|
1341
|
+
rows: 4
|
|
1342
|
+
}
|
|
1343
|
+
),
|
|
1344
|
+
s && /* @__PURE__ */ t.jsx(k, { children: s }),
|
|
1345
|
+
o && !s && /* @__PURE__ */ t.jsx(_, { children: o })
|
|
1346
|
+
] }), Fs = ({ node: e, value: r, setValue: n, error: s, label: a, placeholder: i, helperText: o, name: c, id: l }) => /* @__PURE__ */ t.jsxs(O, { className: "mb-4", children: [
|
|
1347
|
+
/* @__PURE__ */ t.jsxs(A, { htmlFor: l, children: [
|
|
1348
|
+
a || e.data.name,
|
|
1349
|
+
e.data.required && /* @__PURE__ */ t.jsx("span", { className: "text-red-500", children: "*" })
|
|
1350
|
+
] }),
|
|
1351
|
+
/* @__PURE__ */ t.jsx(X, { type: "text", id: l, name: c, value: r ?? "", onChange: (m) => n(m.target.value), placeholder: i }),
|
|
1352
|
+
s && /* @__PURE__ */ t.jsx(k, { children: s }),
|
|
1353
|
+
o && !s && /* @__PURE__ */ t.jsx(_, { children: o })
|
|
1354
|
+
] }), Cs = ({ node: e, value: r, setValue: n, error: s, label: a, placeholder: i, helperText: o, name: c, id: l }) => /* @__PURE__ */ t.jsxs(O, { className: "mb-4", children: [
|
|
1355
|
+
/* @__PURE__ */ t.jsxs(A, { htmlFor: l, children: [
|
|
1356
|
+
a || e.data.name,
|
|
1357
|
+
e.data.required && /* @__PURE__ */ t.jsx("span", { className: "text-red-500", children: "*" })
|
|
1358
|
+
] }),
|
|
1359
|
+
/* @__PURE__ */ t.jsx(
|
|
1360
|
+
X,
|
|
1361
|
+
{
|
|
1362
|
+
type: "time",
|
|
1363
|
+
id: l,
|
|
1364
|
+
name: c,
|
|
1365
|
+
value: r ?? "",
|
|
1366
|
+
onChange: (m) => n(m.target.value),
|
|
1367
|
+
placeholder: i,
|
|
1368
|
+
className: "bg-background [color-scheme:light] dark:[color-scheme:dark]"
|
|
1369
|
+
}
|
|
1370
|
+
),
|
|
1371
|
+
s && /* @__PURE__ */ t.jsx(k, { children: s }),
|
|
1372
|
+
o && !s && /* @__PURE__ */ t.jsx(_, { children: o })
|
|
1373
|
+
] }), Ts = ({ node: e, value: r, setValue: n, error: s, label: a, helperText: i, id: o, name: c }) => {
|
|
1374
|
+
const l = B(), m = Array.isArray(r) ? r : [], u = m[0] || "", d = m[1] || "", f = (h) => {
|
|
1375
|
+
n([h, d]);
|
|
1376
|
+
}, g = (h) => {
|
|
1377
|
+
n([u, h]);
|
|
1378
|
+
};
|
|
1379
|
+
return /* @__PURE__ */ t.jsxs(O, { className: "mb-4", children: [
|
|
1380
|
+
/* @__PURE__ */ t.jsxs(A, { htmlFor: `${o}-start`, children: [
|
|
1381
|
+
a || e.data.name,
|
|
1382
|
+
e.data.required && /* @__PURE__ */ t.jsx("span", { className: "text-red-500", children: "*" })
|
|
1383
|
+
] }),
|
|
1384
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex gap-2", children: [
|
|
1385
|
+
/* @__PURE__ */ t.jsx(
|
|
1386
|
+
X,
|
|
1387
|
+
{
|
|
1388
|
+
id: `${o}-start`,
|
|
1389
|
+
name: `${c}-start`,
|
|
1390
|
+
"aria-label": `${a || e.data.name} - ${l("renderer.defaultInputs.startTime")}`,
|
|
1391
|
+
"aria-invalid": !!s,
|
|
1392
|
+
"aria-describedby": s ? `${e.id}-error` : void 0,
|
|
1393
|
+
type: "time",
|
|
1394
|
+
value: u,
|
|
1395
|
+
onChange: (h) => f(h.target.value),
|
|
1396
|
+
placeholder: l("renderer.defaultInputs.startTime"),
|
|
1397
|
+
className: "flex-1 bg-background [color-scheme:light] dark:[color-scheme:dark]"
|
|
1398
|
+
}
|
|
1399
|
+
),
|
|
1400
|
+
/* @__PURE__ */ t.jsx(
|
|
1401
|
+
X,
|
|
1402
|
+
{
|
|
1403
|
+
id: `${o}-end`,
|
|
1404
|
+
name: `${c}-end`,
|
|
1405
|
+
"aria-label": `${a || e.data.name} - ${l("renderer.defaultInputs.endTime")}`,
|
|
1406
|
+
"aria-invalid": !!s,
|
|
1407
|
+
"aria-describedby": s ? `${e.id}-error` : void 0,
|
|
1408
|
+
type: "time",
|
|
1409
|
+
value: d,
|
|
1410
|
+
onChange: (h) => g(h.target.value),
|
|
1411
|
+
placeholder: l("renderer.defaultInputs.endTime"),
|
|
1412
|
+
className: "flex-1 bg-background [color-scheme:light] dark:[color-scheme:dark]"
|
|
1413
|
+
}
|
|
1414
|
+
)
|
|
1415
|
+
] }),
|
|
1416
|
+
s && /* @__PURE__ */ t.jsx(k, { children: s }),
|
|
1417
|
+
i && !s && /* @__PURE__ */ t.jsx(_, { children: i })
|
|
1418
|
+
] });
|
|
1419
|
+
}, Is = {
|
|
1420
|
+
address: os,
|
|
1421
|
+
autocomplete: is,
|
|
1422
|
+
checkbox: ls,
|
|
1423
|
+
date: ds,
|
|
1424
|
+
daterange: us,
|
|
1425
|
+
file: fs,
|
|
1426
|
+
hidden: ps,
|
|
1427
|
+
http: hs,
|
|
1428
|
+
number: gs,
|
|
1429
|
+
password: xs,
|
|
1430
|
+
radio: ys,
|
|
1431
|
+
select: Ns,
|
|
1432
|
+
submit: ws,
|
|
1433
|
+
switch: vs,
|
|
1434
|
+
text: Fs,
|
|
1435
|
+
textarea: Ss,
|
|
1436
|
+
time: Cs,
|
|
1437
|
+
timerange: Ts
|
|
1438
|
+
}, As = ({ node: e }) => {
|
|
1439
|
+
const n = B()(e.data?.label);
|
|
1440
|
+
return n ? /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-x-3", children: [
|
|
1441
|
+
/* @__PURE__ */ t.jsx(Ne, { className: "my-8 flex-1" }),
|
|
1442
|
+
/* @__PURE__ */ t.jsx("h4", { className: "font-semibold text-sm", children: n }),
|
|
1443
|
+
/* @__PURE__ */ t.jsx(Ne, { className: "my-8 flex-1" })
|
|
1444
|
+
] }) : /* @__PURE__ */ t.jsx(Ne, { className: "my-8" });
|
|
1445
|
+
}, Ds = ({ node: e }) => {
|
|
1446
|
+
const { edges: r } = xe(), n = B(), s = ut(e.id, r);
|
|
1447
|
+
return /* @__PURE__ */ t.jsx("h2", { className: y("mb-5 font-bold text-2xl", !s && "mt-10"), children: n(e.data?.label) });
|
|
1448
|
+
}, Rs = {
|
|
1449
|
+
divider: As,
|
|
1450
|
+
title: Ds
|
|
1451
|
+
}, Es = async (e) => {
|
|
1452
|
+
try {
|
|
1453
|
+
const { url: r, method: n = "GET", headers: s = [], body: a } = e;
|
|
1454
|
+
if (!r || r.trim() === "")
|
|
1455
|
+
return {
|
|
1456
|
+
error: "No URL provided",
|
|
1457
|
+
success: !1
|
|
1458
|
+
};
|
|
1459
|
+
const i = {
|
|
1460
|
+
"Content-Type": "application/json"
|
|
1461
|
+
};
|
|
1462
|
+
s.forEach((u) => {
|
|
1463
|
+
u.key && u.value && (i[u.key] = u.value);
|
|
1464
|
+
});
|
|
1465
|
+
const o = {
|
|
1466
|
+
headers: i,
|
|
1467
|
+
method: n
|
|
1468
|
+
};
|
|
1469
|
+
a && n && ["POST", "PUT", "PATCH"].includes(n) && (o.body = a);
|
|
1470
|
+
const c = await fetch(r, o);
|
|
1471
|
+
let l;
|
|
1472
|
+
return c.headers.get("content-type")?.includes("application/json") ? l = await c.json() : l = await c.text(), c.ok ? {
|
|
1473
|
+
data: l,
|
|
1474
|
+
status: c.status,
|
|
1475
|
+
statusText: c.statusText,
|
|
1476
|
+
success: !0
|
|
1477
|
+
} : {
|
|
1478
|
+
data: l,
|
|
1479
|
+
error: `HTTP ${c.status}: ${c.statusText}`,
|
|
1480
|
+
status: c.status,
|
|
1481
|
+
statusText: c.statusText,
|
|
1482
|
+
success: !1
|
|
1483
|
+
};
|
|
1484
|
+
} catch (r) {
|
|
1485
|
+
return {
|
|
1486
|
+
error: r instanceof Error ? r.message : "An unknown error occurred",
|
|
1487
|
+
success: !1
|
|
1488
|
+
};
|
|
1489
|
+
}
|
|
1490
|
+
}, Ie = (e, r, n = {}) => {
|
|
1491
|
+
if (!e)
|
|
1492
|
+
return "";
|
|
1493
|
+
const { encode: s = !1, json: a = !1 } = n;
|
|
1494
|
+
return e.replace(/\{\{([\w-]+)}}/g, (i, o) => {
|
|
1495
|
+
const c = r[o.trim()];
|
|
1496
|
+
if (c == null)
|
|
1497
|
+
return a ? "null" : "";
|
|
1498
|
+
const l = typeof c == "string" ? te(c) : c;
|
|
1499
|
+
if (s)
|
|
1500
|
+
return encodeURIComponent(String(l));
|
|
1501
|
+
if (a) {
|
|
1502
|
+
if (typeof l == "string")
|
|
1503
|
+
return `"${l.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
|
|
1504
|
+
if (typeof l == "number" || typeof l == "boolean")
|
|
1505
|
+
return String(l);
|
|
1506
|
+
if (typeof l == "object")
|
|
1507
|
+
return JSON.stringify(l);
|
|
1508
|
+
}
|
|
1509
|
+
return String(l);
|
|
1510
|
+
});
|
|
1511
|
+
}, Os = (e, r) => e ? e.replace(/\{\{response\.([\w.-]+)}}/g, (n, s) => {
|
|
1512
|
+
const a = ks(r, s.trim());
|
|
1513
|
+
return a != null ? String(a) : "";
|
|
1514
|
+
}) : "", ks = (e, r) => {
|
|
1515
|
+
if (!(!e || typeof e != "object"))
|
|
1516
|
+
return r.split(".").reduce((n, s) => {
|
|
1517
|
+
if (!(n == null || typeof n != "object"))
|
|
1518
|
+
return n[s];
|
|
1519
|
+
}, e);
|
|
1520
|
+
}, _s = async (e, r, n) => {
|
|
1521
|
+
if (!e.url || e.url.trim() === "")
|
|
1522
|
+
return {
|
|
1523
|
+
error: "No URL configured for submission",
|
|
1524
|
+
success: !1
|
|
1525
|
+
};
|
|
1526
|
+
const s = Ie(e.url, r, { encode: !0 });
|
|
1527
|
+
if (!s || s.trim() === "")
|
|
1528
|
+
return {
|
|
1529
|
+
error: "Invalid URL after template replacement",
|
|
1530
|
+
success: !1
|
|
1531
|
+
};
|
|
1532
|
+
const a = e.headers?.map((l) => ({
|
|
1533
|
+
key: l.key,
|
|
1534
|
+
value: Ie(l.value, r)
|
|
1535
|
+
})), i = e.sendFormData ? JSON.stringify(ze(r, n)) : e.body ? Ie(e.body, r, { json: !0 }) : void 0, o = await Es({
|
|
1536
|
+
body: i,
|
|
1537
|
+
headers: a,
|
|
1538
|
+
method: e.method || "POST",
|
|
1539
|
+
url: s
|
|
1540
|
+
});
|
|
1541
|
+
if (!o.success)
|
|
1542
|
+
return {
|
|
1543
|
+
data: o.data,
|
|
1544
|
+
error: o.error,
|
|
1545
|
+
success: !1
|
|
1546
|
+
};
|
|
1547
|
+
const c = e.redirectUrl ? (() => {
|
|
1548
|
+
const l = Os(e.redirectUrl, o.data);
|
|
1549
|
+
return l && l.trim() !== "" ? l : void 0;
|
|
1550
|
+
})() : void 0;
|
|
1551
|
+
return {
|
|
1552
|
+
data: o.data,
|
|
1553
|
+
redirectUrl: c,
|
|
1554
|
+
success: !0
|
|
1555
|
+
};
|
|
1556
|
+
}, Ps = (e) => {
|
|
1557
|
+
if (!e)
|
|
1558
|
+
return;
|
|
1559
|
+
e.startsWith("http://") || e.startsWith("https://") ? window.location.href = e : window.history?.pushState ? (window.history.pushState({}, "", e), window.dispatchEvent(new PopStateEvent("popstate"))) : window.location.href = e;
|
|
1560
|
+
}, Ms = (e, r, n, s) => {
|
|
1561
|
+
const [a, i] = L(!1), [o, c] = L(null), l = U(() => {
|
|
1562
|
+
const d = e.find((f) => G(f) && f.data?.type === "submit");
|
|
1563
|
+
return d && G(d) ? d : null;
|
|
1564
|
+
}, [e]), m = Q(
|
|
1565
|
+
async (d) => {
|
|
1566
|
+
if (!l?.data?.submitConfig)
|
|
1567
|
+
return null;
|
|
1568
|
+
const f = l.data.submitConfig;
|
|
1569
|
+
if (!f.url || f.url.trim() === "")
|
|
1570
|
+
return null;
|
|
1571
|
+
c(null), f.showLoading !== !1 && i(!0);
|
|
1572
|
+
try {
|
|
1573
|
+
const g = await _s(f, r, s);
|
|
1574
|
+
if (g.success) {
|
|
1575
|
+
const h = ae(f.successMessage, n);
|
|
1576
|
+
if (h && c({ message: h, type: "success" }), d && d(g.data), g.redirectUrl) {
|
|
1577
|
+
const p = g.redirectUrl;
|
|
1578
|
+
setTimeout(() => Ps(p), 1e3);
|
|
1579
|
+
}
|
|
1580
|
+
} else {
|
|
1581
|
+
const h = ae(f.errorMessage, n) || g.error || "An error occurred during submission";
|
|
1582
|
+
c({ message: h, type: "error" });
|
|
1583
|
+
}
|
|
1584
|
+
return g;
|
|
1585
|
+
} catch (g) {
|
|
1586
|
+
const h = ae(f.errorMessage, n) || (g instanceof Error ? g.message : "An unexpected error occurred");
|
|
1587
|
+
return c({ message: h, type: "error" }), {
|
|
1588
|
+
error: h,
|
|
1589
|
+
success: !1
|
|
1590
|
+
};
|
|
1591
|
+
} finally {
|
|
1592
|
+
i(!1);
|
|
1593
|
+
}
|
|
1594
|
+
},
|
|
1595
|
+
[l, r, n, s]
|
|
1596
|
+
);
|
|
1597
|
+
return {
|
|
1598
|
+
clearSubmitMessage: Q(() => {
|
|
1599
|
+
c(null);
|
|
1600
|
+
}, []),
|
|
1601
|
+
handleSubmitWithConfig: m,
|
|
1602
|
+
hasSubmitConfig: !!l?.data?.submitConfig,
|
|
1603
|
+
isSubmitting: a,
|
|
1604
|
+
submitButtonNode: l,
|
|
1605
|
+
submitMessage: o
|
|
1606
|
+
};
|
|
1607
|
+
}, tr = ({
|
|
1608
|
+
components: e,
|
|
1609
|
+
flows: r,
|
|
1610
|
+
googleApiKey: n,
|
|
1611
|
+
language: s,
|
|
1612
|
+
onChange: a,
|
|
1613
|
+
onSubmit: i,
|
|
1614
|
+
theme: o,
|
|
1615
|
+
validate: c,
|
|
1616
|
+
validationMode: l,
|
|
1617
|
+
initialValues: m = {}
|
|
1618
|
+
}) => {
|
|
1619
|
+
const u = dt(), d = {
|
|
1620
|
+
components: {
|
|
1621
|
+
form: e?.form ?? u?.components?.form,
|
|
1622
|
+
group: e?.group ?? u?.components?.group,
|
|
1623
|
+
inputs: { ...u?.components?.inputs, ...e?.inputs },
|
|
1624
|
+
submitButton: e?.submitButton ?? u?.components?.submitButton,
|
|
1625
|
+
submitButtonWrapper: e?.submitButtonWrapper ?? u?.components?.submitButtonWrapper,
|
|
1626
|
+
ui: { ...u?.components?.ui, ...e?.ui }
|
|
1627
|
+
},
|
|
1628
|
+
googleApiKey: n ?? u?.googleApiKey,
|
|
1629
|
+
language: s ?? u?.language ?? "en",
|
|
1630
|
+
theme: o ?? u?.theme ?? "dark",
|
|
1631
|
+
validationMode: l ?? u?.validationMode ?? "onSubmit"
|
|
1632
|
+
}, {
|
|
1633
|
+
canSubmit: f,
|
|
1634
|
+
mergedFlow: g,
|
|
1635
|
+
formErrors: h,
|
|
1636
|
+
formValues: p,
|
|
1637
|
+
inputNodes: j,
|
|
1638
|
+
missingRequiredFields: I,
|
|
1639
|
+
prevFormValuesRef: M,
|
|
1640
|
+
visibleNodes: D,
|
|
1641
|
+
visibleRootNodes: w,
|
|
1642
|
+
setFieldValue: x,
|
|
1643
|
+
setMultipleFieldValues: b,
|
|
1644
|
+
validateForm: v,
|
|
1645
|
+
t: F
|
|
1646
|
+
} = ts(r, m, d.language), { handleSubmitWithConfig: P, hasSubmitConfig: q, isSubmitting: ee, submitMessage: Y, clearSubmitMessage: de } = Ms(
|
|
1647
|
+
D,
|
|
1648
|
+
p,
|
|
1649
|
+
d.language,
|
|
1650
|
+
j
|
|
1651
|
+
), se = d.components.form || ss, re = d.components.submitButton || yt, ie = d.components.submitButtonWrapper || Nt, le = K(a), W = K(c), C = U(() => ze(p, j), [p, j]), T = Q(
|
|
1652
|
+
async (N) => {
|
|
1653
|
+
N.preventDefault();
|
|
1654
|
+
const { isValid: $, errors: R } = v(W.current);
|
|
1655
|
+
if (!$) {
|
|
1656
|
+
const E = Object.keys(R)[0];
|
|
1657
|
+
E && document.getElementById(E)?.focus();
|
|
1658
|
+
return;
|
|
1659
|
+
}
|
|
1660
|
+
if (q) {
|
|
1661
|
+
const E = await P((S) => {
|
|
1662
|
+
i && i(C, { httpResponse: S });
|
|
1663
|
+
});
|
|
1664
|
+
if (E === null) {
|
|
1665
|
+
i?.(C);
|
|
1666
|
+
return;
|
|
1667
|
+
}
|
|
1668
|
+
if (!E.success)
|
|
1669
|
+
return;
|
|
1670
|
+
} else i && i(C);
|
|
1671
|
+
},
|
|
1672
|
+
[v, q, P, i, C]
|
|
1673
|
+
), V = Q(
|
|
1674
|
+
(N) => {
|
|
1675
|
+
const { type: $ } = N;
|
|
1676
|
+
switch ($) {
|
|
1677
|
+
case fe.input: {
|
|
1678
|
+
if (!G(N))
|
|
1679
|
+
return null;
|
|
1680
|
+
const R = N.data, E = R.type || "text", S = d.components.inputs?.[E], z = Is[E], H = S || z, ue = (Tt) => x(Z, Tt), Z = N.id, ne = p[Z], be = h[Z], je = ae(R.label, d.language), me = ae(R.placeholder, d.language), wt = ae(R.helperText, d.language), vt = $e(N), St = te(je), Ft = te(me), Ct = te(wt);
|
|
1681
|
+
return /* @__PURE__ */ t.jsx(
|
|
1682
|
+
H,
|
|
1683
|
+
{
|
|
1684
|
+
id: N.id,
|
|
1685
|
+
node: N,
|
|
1686
|
+
value: ne,
|
|
1687
|
+
error: be,
|
|
1688
|
+
label: St,
|
|
1689
|
+
placeholder: Ft,
|
|
1690
|
+
helperText: Ct,
|
|
1691
|
+
name: vt,
|
|
1692
|
+
setValue: ue,
|
|
1693
|
+
missingRequiredFields: I
|
|
1694
|
+
},
|
|
1695
|
+
N.id
|
|
1696
|
+
);
|
|
1697
|
+
}
|
|
1698
|
+
case fe.group: {
|
|
1699
|
+
if (!Et(N))
|
|
1700
|
+
return null;
|
|
1701
|
+
const R = d.components.group || rs, E = D.filter((S) => S.parentId === N.id);
|
|
1702
|
+
return /* @__PURE__ */ t.jsx(R, { node: N, children: E.map((S) => V(S)) }, N.id);
|
|
1703
|
+
}
|
|
1704
|
+
case fe.ui: {
|
|
1705
|
+
if (!Rt(N))
|
|
1706
|
+
return null;
|
|
1707
|
+
const E = N.data.type || "title", S = d.components.ui?.[E], z = Rs[E], H = S || z;
|
|
1708
|
+
return /* @__PURE__ */ t.jsx(H, { node: N }, N.id);
|
|
1709
|
+
}
|
|
1710
|
+
case fe.flow:
|
|
1711
|
+
return null;
|
|
1712
|
+
default:
|
|
1713
|
+
return console.warn("Unknown node type:", $), null;
|
|
1714
|
+
}
|
|
1715
|
+
},
|
|
1716
|
+
[d.components, d.language, D, p, h, x, I]
|
|
1717
|
+
);
|
|
1718
|
+
return J(() => {
|
|
1719
|
+
le.current = a;
|
|
1720
|
+
}, [a]), J(() => {
|
|
1721
|
+
W.current = c;
|
|
1722
|
+
}, [c]), J(() => {
|
|
1723
|
+
le.current?.(C);
|
|
1724
|
+
}, [C]), J(() => {
|
|
1725
|
+
d.validationMode === "onChange" && v(W.current);
|
|
1726
|
+
}, [d.validationMode, v]), J(() => {
|
|
1727
|
+
const N = Ht(j, p, M.current);
|
|
1728
|
+
Object.keys(N).length > 0 && b(N), M.current = p;
|
|
1729
|
+
}, [p, j, b, M]), /* @__PURE__ */ t.jsx("div", { className: "treege", children: /* @__PURE__ */ t.jsx(Ot, { theme: d.theme, storageKey: "treege-renderer-theme", children: /* @__PURE__ */ t.jsxs(
|
|
1730
|
+
Yt,
|
|
1731
|
+
{
|
|
1732
|
+
value: {
|
|
1733
|
+
flows: g,
|
|
1734
|
+
formErrors: h,
|
|
1735
|
+
formValues: p,
|
|
1736
|
+
googleApiKey: d.googleApiKey,
|
|
1737
|
+
inputNodes: j,
|
|
1738
|
+
language: d.language,
|
|
1739
|
+
setFieldValue: x
|
|
1740
|
+
},
|
|
1741
|
+
children: [
|
|
1742
|
+
/* @__PURE__ */ t.jsxs(se, { onSubmit: T, children: [
|
|
1743
|
+
w.map((N) => V(N)),
|
|
1744
|
+
f && /* @__PURE__ */ t.jsx(ie, { missingFields: I, children: /* @__PURE__ */ t.jsx(re, { label: F("renderer.defaultSubmitButton.submit"), disabled: ee }) })
|
|
1745
|
+
] }),
|
|
1746
|
+
/* @__PURE__ */ t.jsx("p", { className: "py-2 text-muted-foreground text-xs", children: "Powered by Treege" }),
|
|
1747
|
+
Y && /* @__PURE__ */ t.jsx(
|
|
1748
|
+
"div",
|
|
1749
|
+
{
|
|
1750
|
+
className: `my-4 rounded-md p-4 ${Y.type === "success" ? "bg-green-50 text-green-800 dark:bg-green-900/20 dark:text-green-300" : "bg-red-50 text-red-800 dark:bg-red-900/20 dark:text-red-300"}`,
|
|
1751
|
+
role: "alert",
|
|
1752
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1753
|
+
/* @__PURE__ */ t.jsx("p", { className: "font-medium text-sm", children: Y.message }),
|
|
1754
|
+
/* @__PURE__ */ t.jsx(
|
|
1755
|
+
"button",
|
|
1756
|
+
{
|
|
1757
|
+
type: "button",
|
|
1758
|
+
onClick: de,
|
|
1759
|
+
className: "ml-4 font-medium text-sm underline hover:no-underline focus:outline-none",
|
|
1760
|
+
children: F("common.close")
|
|
1761
|
+
}
|
|
1762
|
+
)
|
|
1763
|
+
] })
|
|
1764
|
+
}
|
|
1765
|
+
)
|
|
1766
|
+
]
|
|
1767
|
+
}
|
|
1768
|
+
) }) });
|
|
1769
|
+
};
|
|
1770
|
+
export {
|
|
1771
|
+
gt as A,
|
|
1772
|
+
er as B,
|
|
1773
|
+
ms as C,
|
|
1774
|
+
rs as D,
|
|
1775
|
+
ut as E,
|
|
1776
|
+
Gt as F,
|
|
1777
|
+
Jt as G,
|
|
1778
|
+
ft as H,
|
|
1779
|
+
Se as I,
|
|
1780
|
+
qt as J,
|
|
1781
|
+
ze as K,
|
|
1782
|
+
Ge as L,
|
|
1783
|
+
Ht as M,
|
|
1784
|
+
te as N,
|
|
1785
|
+
De as O,
|
|
1786
|
+
Zs as T,
|
|
1787
|
+
ts as a,
|
|
1788
|
+
tr as b,
|
|
1789
|
+
os as c,
|
|
1790
|
+
is as d,
|
|
1791
|
+
ls as e,
|
|
1792
|
+
ds as f,
|
|
1793
|
+
us as g,
|
|
1794
|
+
fs as h,
|
|
1795
|
+
ps as i,
|
|
1796
|
+
hs as j,
|
|
1797
|
+
gs as k,
|
|
1798
|
+
xs as l,
|
|
1799
|
+
ys as m,
|
|
1800
|
+
Ns as n,
|
|
1801
|
+
vs as o,
|
|
1802
|
+
Ss as p,
|
|
1803
|
+
Fs as q,
|
|
1804
|
+
Cs as r,
|
|
1805
|
+
Ts as s,
|
|
1806
|
+
Is as t,
|
|
1807
|
+
dt as u,
|
|
1808
|
+
As as v,
|
|
1809
|
+
Ds as w,
|
|
1810
|
+
Rs as x,
|
|
1811
|
+
ve as y,
|
|
1812
|
+
Vt as z
|
|
1813
|
+
};
|