@socotra/ec-react-components 2.27.1-next.0 → 2.27.1-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -232,7 +232,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
232
232
  `)},Ume=function(){var e=parseInt(document.body.getAttribute(Um)||"0",10);return isFinite(e)?e:0},Vkt=function(){he.useEffect(function(){return document.body.setAttribute(Um,(Ume()+1).toString()),function(){var e=Ume()-1;e<=0?document.body.removeAttribute(Um):document.body.setAttribute(Um,e.toString())}},[])},Zkt=function(e){var t=e.noRelative,n=e.noImportant,a=e.gapMode,r=a===void 0?"margin":a;Vkt();var o=he.useMemo(function(){return Rkt(r)},[r]);return he.createElement(Ukt,{styles:qkt(o,!t,r,n?"":"!important")})},o2=!1;if(typeof window<"u")try{var rx=Object.defineProperty({},"passive",{get:function(){return o2=!0,!0}});window.addEventListener("test",rx,rx),window.removeEventListener("test",rx,rx)}catch{o2=!1}var qm=o2?{passive:!1}:!1,Gkt=function(e){return e.tagName==="TEXTAREA"},qme=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Gkt(e)&&n[t]==="visible")},Wkt=function(e){return qme(e,"overflowY")},Hkt=function(e){return qme(e,"overflowX")},Vme=function(e,t){var n=t.ownerDocument,a=t;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var r=Zme(e,a);if(r){var o=Gme(e,a),s=o[1],d=o[2];if(s>d)return!0}a=a.parentNode}while(a&&a!==n.body);return!1},Jkt=function(e){var t=e.scrollTop,n=e.scrollHeight,a=e.clientHeight;return[t,n,a]},Xkt=function(e){var t=e.scrollLeft,n=e.scrollWidth,a=e.clientWidth;return[t,n,a]},Zme=function(e,t){return e==="v"?Wkt(t):Hkt(t)},Gme=function(e,t){return e==="v"?Jkt(t):Xkt(t)},Kkt=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ykt=function(e,t,n,a,r){var o=Kkt(e,window.getComputedStyle(t).direction),s=o*a,d=n.target,y=t.contains(d),g=!1,b=s>0,_=0,x=0;do{if(!d)break;var C=Gme(e,d),k=C[0],S=C[1],w=C[2],E=S-w-o*k;(k||E)&&Zme(e,d)&&(_+=E,x+=k);var P=d.parentNode;d=P&&P.nodeType===Node.DOCUMENT_FRAGMENT_NODE?P.host:P}while(!y&&d!==document.body||y&&(t.contains(d)||t===d));return(b&&Math.abs(_)<1||!b&&Math.abs(x)<1)&&(g=!0),g},ax=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Wme=function(e){return[e.deltaX,e.deltaY]},Hme=function(e){return e&&"current"in e?e.current:e},Qkt=function(e,t){return e[0]===t[0]&&e[1]===t[1]},eLt=function(e){return`
233
233
  .block-interactivity-`.concat(e,` {pointer-events: none;}
234
234
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
235
- `)},tLt=0,Vm=[];function nLt(e){var t=he.useRef([]),n=he.useRef([0,0]),a=he.useRef(),r=he.useState(tLt++)[0],o=he.useState(Rme)[0],s=he.useRef(e);he.useEffect(function(){s.current=e},[e]),he.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var S=eSt([e.lockRef.current],(e.shards||[]).map(Hme),!0).filter(Boolean);return S.forEach(function(w){return w.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),S.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var d=he.useCallback(function(S,w){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!s.current.allowPinchZoom;var E=ax(S),P=n.current,F="deltaX"in S?S.deltaX:P[0]-E[0],j="deltaY"in S?S.deltaY:P[1]-E[1],q,Q=S.target,ae=Math.abs(F)>Math.abs(j)?"h":"v";if("touches"in S&&ae==="h"&&Q.type==="range")return!1;var ge=Vme(ae,Q);if(!ge)return!0;if(ge?q=ae:(q=ae==="v"?"h":"v",ge=Vme(ae,Q)),!ge)return!1;if(!a.current&&"changedTouches"in S&&(F||j)&&(a.current=q),!q)return!0;var _e=a.current||q;return Ykt(_e,w,S,_e==="h"?F:j)},[]),y=he.useCallback(function(S){var w=S;if(!(!Vm.length||Vm[Vm.length-1]!==o)){var E="deltaY"in w?Wme(w):ax(w),P=t.current.filter(function(q){return q.name===w.type&&(q.target===w.target||w.target===q.shadowParent)&&Qkt(q.delta,E)})[0];if(P&&P.should){w.cancelable&&w.preventDefault();return}if(!P){var F=(s.current.shards||[]).map(Hme).filter(Boolean).filter(function(q){return q.contains(w.target)}),j=F.length>0?d(w,F[0]):!s.current.noIsolation;j&&w.cancelable&&w.preventDefault()}}},[]),g=he.useCallback(function(S,w,E,P){var F={name:S,delta:w,target:E,should:P,shadowParent:rLt(E)};t.current.push(F),setTimeout(function(){t.current=t.current.filter(function(j){return j!==F})},1)},[]),b=he.useCallback(function(S){n.current=ax(S),a.current=void 0},[]),_=he.useCallback(function(S){g(S.type,Wme(S),S.target,d(S,e.lockRef.current))},[]),x=he.useCallback(function(S){g(S.type,ax(S),S.target,d(S,e.lockRef.current))},[]);he.useEffect(function(){return Vm.push(o),e.setCallbacks({onScrollCapture:_,onWheelCapture:_,onTouchMoveCapture:x}),document.addEventListener("wheel",y,qm),document.addEventListener("touchmove",y,qm),document.addEventListener("touchstart",b,qm),function(){Vm=Vm.filter(function(S){return S!==o}),document.removeEventListener("wheel",y,qm),document.removeEventListener("touchmove",y,qm),document.removeEventListener("touchstart",b,qm)}},[]);var C=e.removeScrollBar,k=e.inert;return he.createElement(he.Fragment,null,k?he.createElement(o,{styles:eLt(r)}):null,C?he.createElement(Zkt,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function rLt(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const aLt=Lkt(Mme,nLt);var Jme=he.forwardRef(function(e,t){return he.createElement(nx,js({},e,{ref:t,sideCar:aLt}))});Jme.classNames=nx.classNames;var ox="Popover",[Xme,yNt]=Cu(ox,[Ame]),Zy=Ame(),[oLt,ml]=Xme(ox),Kme=e=>{const{__scopePopover:t,children:n,open:a,defaultOpen:r,onOpenChange:o,modal:s=!1}=e,d=Zy(t),y=he.useRef(null),[g,b]=he.useState(!1),[_,x]=ld({prop:a,defaultProp:r??!1,onChange:o,caller:ox});return ee.jsx(vkt,{...d,children:ee.jsx(oLt,{scope:t,contentId:N4(),triggerRef:y,open:_,onOpenChange:x,onOpenToggle:he.useCallback(()=>x(C=>!C),[x]),hasCustomAnchor:g,onCustomAnchorAdd:he.useCallback(()=>b(!0),[]),onCustomAnchorRemove:he.useCallback(()=>b(!1),[]),modal:s,children:n})})};Kme.displayName=ox;var Yme="PopoverAnchor",Qme=he.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,r=ml(Yme,n),o=Zy(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:d}=r;return he.useEffect(()=>(s(),()=>d()),[s,d]),ee.jsx(Ome,{...o,...a,ref:t})});Qme.displayName=Yme;var ehe="PopoverTrigger",iLt=he.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,r=ml(ehe,n),o=Zy(n),s=da(t,r.triggerRef),d=ee.jsx(cr.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":ohe(r.open),...a,ref:s,onClick:Tr(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?d:ee.jsx(Ome,{asChild:!0,...o,children:d})});iLt.displayName=ehe;var i2="PopoverPortal",[sLt,uLt]=Xme(i2,{forceMount:void 0}),the=e=>{const{__scopePopover:t,forceMount:n,children:a,container:r}=e,o=ml(i2,t);return ee.jsx(sLt,{scope:t,forceMount:n,children:ee.jsx(wm,{present:n||o.open,children:ee.jsx(zme,{asChild:!0,container:r,children:a})})})};the.displayName=i2;var Zm="PopoverContent",nhe=he.forwardRef((e,t)=>{const n=uLt(Zm,e.__scopePopover),{forceMount:a=n.forceMount,...r}=e,o=ml(Zm,e.__scopePopover);return ee.jsx(wm,{present:a||o.open,children:o.modal?ee.jsx(lLt,{...r,ref:t}):ee.jsx(dLt,{...r,ref:t})})});nhe.displayName=Zm;var cLt=uy("PopoverContent.RemoveScroll"),lLt=he.forwardRef((e,t)=>{const n=ml(Zm,e.__scopePopover),a=he.useRef(null),r=da(t,a),o=he.useRef(!1);return he.useEffect(()=>{const s=a.current;if(s)return xkt(s)},[]),ee.jsx(Jme,{as:cLt,allowPinchZoom:!0,children:ee.jsx(rhe,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Tr(e.onCloseAutoFocus,s=>{var d;s.preventDefault(),o.current||(d=n.triggerRef.current)==null||d.focus()}),onPointerDownOutside:Tr(e.onPointerDownOutside,s=>{const d=s.detail.originalEvent,y=d.button===0&&d.ctrlKey===!0,g=d.button===2||y;o.current=g},{checkForDefaultPrevented:!1}),onFocusOutside:Tr(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),dLt=he.forwardRef((e,t)=>{const n=ml(Zm,e.__scopePopover),a=he.useRef(!1),r=he.useRef(!1);return ee.jsx(rhe,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s,d;(s=e.onCloseAutoFocus)==null||s.call(e,o),o.defaultPrevented||(a.current||(d=n.triggerRef.current)==null||d.focus(),o.preventDefault()),a.current=!1,r.current=!1},onInteractOutside:o=>{var y,g;(y=e.onInteractOutside)==null||y.call(e,o),o.defaultPrevented||(a.current=!0,o.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=o.target;((g=n.triggerRef.current)==null?void 0:g.contains(s))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&r.current&&o.preventDefault()}})}),rhe=he.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:a,onOpenAutoFocus:r,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:d,onPointerDownOutside:y,onFocusOutside:g,onInteractOutside:b,..._}=e,x=ml(Zm,n),C=Zy(n);return ekt(),ee.jsx(bme,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:r,onUnmountAutoFocus:o,children:ee.jsx(mme,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:b,onEscapeKeyDown:d,onPointerDownOutside:y,onFocusOutside:g,onDismiss:()=>x.onOpenChange(!1),children:ee.jsx(ykt,{"data-state":ohe(x.open),role:"dialog",id:x.contentId,...C,..._,ref:t,style:{..._.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),ahe="PopoverClose",fLt=he.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,r=ml(ahe,n);return ee.jsx(cr.button,{type:"button",...a,ref:t,onClick:Tr(e.onClick,()=>r.onOpenChange(!1))})});fLt.displayName=ahe;var pLt="PopoverArrow",mLt=he.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,r=Zy(n);return ee.jsx(gkt,{...r,...a,ref:t})});mLt.displayName=pLt;function ohe(e){return e?"open":"closed"}var hLt=Kme,vLt=the,ihe=nhe;const yLt=hLt,she=he.forwardRef(({className:e,align:t="center",sideOffset:n=4,...a},r)=>ee.jsx(vLt,{children:ee.jsx(ihe,{ref:r,align:t,sideOffset:n,className:qt("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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",e),...a})}));she.displayName=ihe.displayName;const gLt=$m("",{variants:{variant:{h1:"scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",h2:"scroll-m-20 text-3xl font-semibold tracking-tight",h3:"scroll-m-20 text-2xl font-semibold tracking-tight",h4:"scroll-m-20 text-xl font-semibold tracking-tight",h5:"scroll-m-20 text-lg font-semibold tracking-tight",h6:"scroll-m-20 text-base font-semibold tracking-tight",caption:"text-sm font-medium leading-none",nav:"text-xs leading-4 text-zinc-400",lead:"text-xl text-muted-foreground",muted:"text-sm text-muted-foreground",body1:"text-base",body2:"text-sm",blockquote:"border-l-2 pl-6 italic",inlineCode:"relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold"}},defaultVariants:{variant:"body1"}}),uhe=he.forwardRef(({className:e,variant:t,asChild:n=!1,...a},r)=>{const o=n?fie:"span";return ee.jsx(o,{className:qt("max-w-full break-words",gLt({variant:t,className:e})),ref:r,...a})});uhe.displayName="Typography";function che({displayTimeZoneText:e,className:t,...n}){const[a,r]=L.useState(!1);return ee.jsx(yLt,{modal:!0,open:a,onOpenChange:r,children:ee.jsxs(OTt,{validationBehavior:"aria",className:qt("group flex flex-col gap-1",t),...n,onChange:o=>{var s;(s=n.onChange)==null||s.call(n,o),r(!1)},children:[ee.jsxs(G3,{className:"flex flex-1 rounded-md border p-2",children:[ee.jsx(Qme,{children:ee.jsx(Vw,{className:P4({size:"xSmall",variant:"ghost"}),onClick:()=>r(!0),children:ee.jsx(Iwt,{className:qt("size-4",n.isDisabled&&"opacity-50")})})}),ee.jsx(DTt,{className:"flex w-full flex-row flex-wrap items-center",children:o=>o.type==="timeZoneName"?ee.jsx(uhe,{className:"mx-2 flex flex-1 justify-end text-xs opacity-50",children:o.text}):ee.jsx(kTt,{segment:o,className:qt("rounded-sm tabular-nums caret-transparent outline-none placeholder-shown:italic",!o.isEditable||n.isDisabled?"opacity-50":"focus:bg-primary focus:text-white")})})]}),ee.jsx(she,{className:"w-fit border-0 p-0",children:ee.jsx(ITt,{children:ee.jsxs(yTt,{className:"rounded-sm border p-3",children:[ee.jsxs("header",{className:"flex flex-row justify-between pb-4",children:[ee.jsx(Vw,{slot:"previous",className:P4({size:"xSmall",variant:"ghost"}),children:ee.jsx(Awt,{})}),ee.jsx(zTt,{className:"font-bold"}),ee.jsx(Vw,{slot:"next",className:P4({size:"xSmall",variant:"ghost"}),children:ee.jsx(Cwt,{})})]}),ee.jsxs(gTt,{className:"border-separate border-spacing-1",children:[ee.jsx(eme,{children:o=>ee.jsx(tme,{className:"text-xs font-semibold",children:o})}),ee.jsx(nme,{children:o=>ee.jsx(wTt,{date:o,className:qt("flex size-9 cursor-default items-center justify-center rounded-sm outline-none ring-primary/70 ring-offset-2 outside-month:text-secondary hover:bg-zinc-100 focus-visible:ring pressed:bg-zinc-500 selected:bg-primary selected:text-white",n.isDateUnavailable&&n.isDateUnavailable(o)&&"opacity-50")})})]})]})})})]})})}const lhe=(e,t)=>{if(!e)return null;let n;return e.includes("T")?n=Ui(jce(e,t)):n=zce(e),n},bLt=e=>{const{data:t,id:n,enabled:a,uischema:r,schema:o,path:s,handleChange:d}=e,y=ln(o,"timezone",Fs()),g=yi(a,r),b=L.useMemo(()=>{const _=lhe(t,y);return _||lhe(o.default,y)},[o,y,t]);return ee.jsx(che,{value:b??null,hourCycle:24,granularity:"day",onChange:_=>{d(s,_?_.toString():null)},"aria-label":n,isDisabled:!g,name:n,autoFocus:r.options&&r.options.focus,displayTimeZoneText:y})},$Lt=tn(3,rA),_Lt=Vr(ka(bLt)),wLt=(e,t)=>{const n=ju(e);return Sce(n,t)},xLt=e=>{const t=Fs(),{data:n,id:a,enabled:r,uischema:o,schema:s,path:d,handleChange:y}=e,g=ln(s,"timezone",t),b=yi(r,o),_=ln(s,"isClearable",!0),x=(F,j)=>{if(!F)return null;let q=null;try{q=jce(F,j)}catch{q=null}return q},C=L.useMemo(()=>{const F=x(n,g);return F||x(s.default,g)},[s,g,n]),{datePicker:k,focus:S}=o.options||{},{value:w,onChange:E,...P}=bs({hourCycle:24,granularity:"second",isDisabled:!b,name:a,autoFocus:S,displayTimeZoneText:g,"aria-label":a},k);return ee.jsx(che,{value:C??null,onChange:F=>{F?y(d,wLt(F,g).toAbsoluteString()):_&&y(d,null),E==null||E(F)},...P})},ILt=tn(3,aA),ELt=Vr(ka(xLt)),ALt=e=>{const{data:t,className:n,id:a,enabled:r,schema:o,uischema:s,path:d,handleChange:y,options:g,t:b}=e,_=L.useMemo(()=>b("enum.none",M0["enum.none"],{schema:o,uischema:s,path:d}),[b,o,s,d]),x=L.useRef(null),C=ln(o,"isClearable",!0),k=L.useMemo(()=>{const w=o.default;return g==null?void 0:g.find(E=>E.value===w)},[o,g]),S=yi(r,s);return ee.jsx(yy,{isClearable:C,placeholder:_,ref:x,id:a,instanceId:a,options:g,name:a,value:g==null?void 0:g.find(w=>w.value===t),defaultValue:k,isDisabled:!S,isMulti:!1,className:qt(n),onChange:w=>{y(d,w==null?void 0:w.value)},closeMenuOnSelect:!0})},CLt=tn(3,bh),SLt=hA(ws(R0(ALt))),dhe=e=>{const{data:t,id:n,enabled:a,uischema:r,path:o,handleChange:s,schema:d}=e,y=L.useMemo(()=>d.type==="integer"?0:d.multipleOf?-Math.log10(d.multipleOf):void 0,[d.multipleOf,d.type]),[g,b]=L.useState(!1),_=t||(g?t:d.default),x=yi(a,r);return ee.jsx(ume,{id:n,autoFocus:r.options&&r.options.focus,value:_??null,onChange:C=>{s(o,isNaN(C)?void 0:C),b(!0)},minValue:d.minimum??void 0,maxValue:d.maximum??void 0,isDisabled:!x,step:d.multipleOf??void 0,formatOptions:{signDisplay:"auto",maximumFractionDigits:y},children:ee.jsxs(sme,{className:"relative",children:[ee.jsx(cme,{}),ee.jsx(lme,{})]})})},DLt=tn(3,D0),TLt=Vr(ka(dhe)),kLt=tn(3,tA),LLt=Vr(ka(dhe)),PLt=()=>{const[e,t]=L.useState(!1),n=L.useCallback(()=>t(!0),[]),a=L.useCallback(()=>t(!1),[]);return[e,n,a]};var NLt=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function OLt(e){var t=e.defaultOptions,n=t===void 0?!1:t,a=e.cacheOptions,r=a===void 0?!1:a,o=e.loadOptions;e.options;var s=e.isLoading,d=s===void 0?!1:s,y=e.onInputChange,g=e.filterOption,b=g===void 0?null:g,_=Ps(e,NLt),x=_.inputValue,C=L.useRef(void 0),k=L.useRef(!1),S=L.useState(Array.isArray(n)?n:void 0),w=fa(S,2),E=w[0],P=w[1],F=L.useState(typeof x<"u"?x:""),j=fa(F,2),q=j[0],Q=j[1],ae=L.useState(n===!0),ge=fa(ae,2),_e=ge[0],me=ge[1],G=L.useState(void 0),xe=fa(G,2),Ae=xe[0],ue=xe[1],De=L.useState([]),de=fa(De,2),Ve=de[0],Be=de[1],at=L.useState(!1),Ee=fa(at,2),se=Ee[0],ye=Ee[1],re=L.useState({}),W=fa(re,2),H=W[0],te=W[1],$e=L.useState(void 0),we=fa($e,2),Se=we[0],Ne=we[1],Ze=L.useState(void 0),Oe=fa(Ze,2),ot=Oe[0],mt=Oe[1];r!==ot&&(te({}),mt(r)),n!==Se&&(P(Array.isArray(n)?n:void 0),Ne(n)),L.useEffect(function(){return k.current=!0,function(){k.current=!1}},[]);var gt=L.useCallback(function(hr,B){if(!o)return B();var On=o(hr,B);On&&typeof On.then=="function"&&On.then(B,function(){return B()})},[o]);L.useEffect(function(){n===!0&&gt(q,function(hr){k.current&&(P(hr||[]),me(!!C.current))})},[]);var Vt=L.useCallback(function(hr,B){var On=pIt(hr,B,y);if(!On){C.current=void 0,Q(""),ue(""),Be([]),me(!1),ye(!1);return}if(r&&H[On])Q(On),ue(On),Be(H[On]),me(!1),ye(!1);else{var ha=C.current={};Q(On),me(!0),ye(!Ae),gt(On,function(Pa){k&&ha===C.current&&(C.current=void 0,me(!1),ue(On),Be(Pa||[]),ye(!1),te(Pa?yt(yt({},H),{},xm({},On,Pa)):H))})}},[r,gt,Ae,H,y]),Nn=se?[]:q&&Ae?Ve:E||[];return yt(yt({},_),{},{options:Nn,isLoading:_e||d,onInputChange:Vt,filterOption:b})}var zLt=L.forwardRef(function(e,t){var n=OLt(e),a=Gie(n);return he.createElement(SP,_t({ref:t},a))}),jLt=zLt;const FLt=L.forwardRef((e,t)=>ee.jsx(jLt,{ref:t,unstyled:!0,id:e.id,inputId:e.id,components:{DropdownIndicator:lue,ClearIndicator:due,MultiValueRemove:fue,MultiValueContainer:pue,ValueContainer:hue,MenuList:vue,Option:yue,MultiValueLabel:mue},classNames:{control:({isFocused:n,isDisabled:a})=>qt(["border-input ring-offset-background shadow-xs max-h-36 w-full overflow-y-auto rounded-md border bg-transparent px-3 text-sm",n?"ring-ring ring-1":"",a?"cursor-not-allowed opacity-50":""]),menu:()=>"text-sm mt-2 p-1 relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",option:({isFocused:n,isSelected:a})=>qt("relative flex w-full cursor-default select-none items-center break-words rounded-sm px-4 py-1.5 pr-2 outline-none",n?"bg-accent text-accent-foreground":"",a?"bg-primary text-white":""),multiValueLabel:()=>"dark:text-white",valueContainer:()=>"flex flex-row flex-wrap gap-2 py-2.5"},...e}));FLt.displayName="AsyncAutocomplete";const BLt=({config:e,id:t,schema:n,visible:a,errors:r,description:o,label:s,required:d,path:y,options:g,data:b,addItem:_,removeItem:x,handleChange:C,enabled:k,rootSchema:S,...w})=>{const[E,P,F]=PLt(),j=r.length===0,q=bs({},e,w.uischema.options),Q=!fA(a,o,E,q.showUnfocusedDescription),ae=L.useRef(null),ge=n.default,_e=yi(k,w.uischema);return a?a&&ee.jsxs("div",{className:"control root_properties_singleSelect flex flex-col gap-2",children:[ee.jsxs("label",{htmlFor:t,className:"break-words text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:[s,d?"*":""]}),ee.jsx(yy,{isClearable:!0,ref:ae,id:t,instanceId:t,onFocus:P,onBlur:F,options:g,name:"basePayment",value:g==null?void 0:g.filter(me=>b==null?void 0:b.includes(me.value)),defaultValue:ge,isDisabled:!_e,isMulti:!0,onChange:me=>{C(y,me.map(G=>G.value))},closeMenuOnSelect:!0}),ee.jsx("div",{className:"validation validation_error text-destructive text-sm font-medium",children:j?Q?o:null:r})]}):null},MLt=e=>e.oneOf!==void 0&&e.oneOf.length>0&&e.oneOf.every(t=>t.const!==void 0),RLt=e=>e.type==="string"&&e.enum!==void 0,ULt=tn(5,Dn(Pn("Control"),Dn(Fa(e=>ga(e,"array")&&!Array.isArray(e.items)&&e.uniqueItems===!0),C0("items",(e,t)=>{const n=e.$ref?co(t,e.$ref,t):e;return MLt(n)||RLt(n)})))),qLt=_ze(BLt),VLt=e=>{const{data:t,className:n,id:a,enabled:r,schema:o,uischema:s,path:d,handleChange:y,options:g,t:b}=e,_=L.useMemo(()=>b("enum.none",M0["enum.none"],{schema:o,uischema:s,path:d}),[b,o,s,d]),x=L.useRef(null),C=L.useMemo(()=>o.default?g==null?void 0:g.find(S=>S.value===o.default):null,[o,g]),k=yi(r,s);return ee.jsx(yy,{isClearable:!0,placeholder:_,ref:x,id:a,instanceId:a,options:g,name:"basePayment",value:g==null?void 0:g.find(S=>S.value===t),defaultValue:C,isDisabled:!k,isMulti:!1,className:n,onChange:S=>{y(d,S==null?void 0:S.value)},closeMenuOnSelect:!0})},ZLt=tn(3,b7),GLt=B7(ws(VLt)),WLt=e=>{var _;const{data:t,schema:n,className:a,id:r,enabled:o,uischema:s,path:d,handleChange:y}=e,g=n.default,b=yi(o,s);return ee.jsx(eP,{onValueChange:x=>{y(d,x)},value:t,className:qt("flex flex-row pt-2",a),disabled:!b,id:r,autoFocus:s.options&&s.options.focus,defaultValue:g,children:(_=n==null?void 0:n.enum)==null?void 0:_.map(x=>ee.jsxs("div",{className:"flex items-center space-x-2",children:[ee.jsx(ly,{value:x,id:`${d}.${x}`}),ee.jsx(_m,{htmlFor:`${d}.${x}`,className:"cursor-pointer",children:x})]},x))})},HLt=tn(5,Dn(bh,Fa(e=>{var t;return e&&((t=e.tag)==null?void 0:t.includes("radio-group"))}))),JLt=Vr(ka(WLt));function XLt({className:e,...t}){return ee.jsx("textarea",{"data-slot":"textarea",className:qt("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}const KLt=e=>{const{data:t,className:n,id:a,enabled:r,uischema:o,schema:s,path:d,handleChange:y}=e,[g,b]=L.useState(!1),_=t||(g?t:s.default),x=yi(r,o);return ee.jsx(XLt,{value:_||"",onChange:C=>{y(d,C.target.value),b(!0)},className:n,id:a,disabled:!x,autoFocus:o.options&&o.options.focus})},YLt=tn(3,nA),QLt=Vr(KLt),fhe=he.forwardRef(({className:e,type:t,...n},a)=>ee.jsx("input",{type:t,className:qt("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:a,...n}));fhe.displayName="Input";const ePt=e=>{const{config:t,data:n,className:a,id:r,enabled:o,uischema:s,schema:d,path:y,handleChange:g}=e,b=d.maxLength,_=bs({},t,s.options),x=yi(o,s),[C,k]=L.useState(!1),S=n||(C?n:d.default);return ee.jsx(fhe,{type:_.format==="password"?"password":"text",value:S||"",onChange:w=>{g(y,w.target.value===""?void 0:w.target.value),k(!0)},className:a,id:r,disabled:!x,autoFocus:_.focus,placeholder:_.placeholder,maxLength:_.restrict?b:void 0,size:_.trim?b:void 0})},tPt=tn(2,T0),nPt=Vr(ka(ePt));var ix="Collapsible",[rPt,phe]=Cu(ix),[aPt,s2]=rPt(ix),mhe=he.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:a,defaultOpen:r,disabled:o,onOpenChange:s,...d}=e,[y,g]=ld({prop:a,defaultProp:r??!1,onChange:s,caller:ix});return ee.jsx(aPt,{scope:n,disabled:o,contentId:N4(),open:y,onOpenToggle:he.useCallback(()=>g(b=>!b),[g]),children:ee.jsx(cr.div,{"data-state":c2(y),"data-disabled":o?"":void 0,...d,ref:t})})});mhe.displayName=ix;var hhe="CollapsibleTrigger",vhe=he.forwardRef((e,t)=>{const{__scopeCollapsible:n,...a}=e,r=s2(hhe,n);return ee.jsx(cr.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":c2(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...a,ref:t,onClick:Tr(e.onClick,r.onOpenToggle)})});vhe.displayName=hhe;var u2="CollapsibleContent",yhe=he.forwardRef((e,t)=>{const{forceMount:n,...a}=e,r=s2(u2,e.__scopeCollapsible);return ee.jsx(wm,{present:n||r.open,children:({present:o})=>ee.jsx(oPt,{...a,ref:t,present:o})})});yhe.displayName=u2;var oPt=he.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:a,children:r,...o}=e,s=s2(u2,n),[d,y]=he.useState(a),g=he.useRef(null),b=da(t,g),_=he.useRef(0),x=_.current,C=he.useRef(0),k=C.current,S=s.open||d,w=he.useRef(S),E=he.useRef(void 0);return he.useEffect(()=>{const P=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(P)},[]),Su(()=>{const P=g.current;if(P){E.current=E.current||{transitionDuration:P.style.transitionDuration,animationName:P.style.animationName},P.style.transitionDuration="0s",P.style.animationName="none";const F=P.getBoundingClientRect();_.current=F.height,C.current=F.width,w.current||(P.style.transitionDuration=E.current.transitionDuration,P.style.animationName=E.current.animationName),y(a)}},[s.open,a]),ee.jsx(cr.div,{"data-state":c2(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!S,...o,ref:b,style:{"--radix-collapsible-content-height":x?`${x}px`:void 0,"--radix-collapsible-content-width":k?`${k}px`:void 0,...e.style},children:S&&r})});function c2(e){return e?"open":"closed"}var iPt=mhe,sPt=vhe,uPt=yhe,qi="Accordion",cPt=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[l2,lPt,dPt]=yie(qi),[sx,gNt]=Cu(qi,[dPt,phe]),d2=phe(),ghe=L.forwardRef((e,t)=>{const{type:n,...a}=e,r=a,o=a;return ee.jsx(l2.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?ee.jsx(hPt,{...o,ref:t}):ee.jsx(mPt,{...r,ref:t})})});ghe.displayName=qi;var[bhe,fPt]=sx(qi),[$he,pPt]=sx(qi,{collapsible:!1}),mPt=L.forwardRef((e,t)=>{const{value:n,defaultValue:a,onValueChange:r=()=>{},collapsible:o=!1,...s}=e,[d,y]=ld({prop:n,defaultProp:a??"",onChange:r,caller:qi});return ee.jsx(bhe,{scope:e.__scopeAccordion,value:L.useMemo(()=>d?[d]:[],[d]),onItemOpen:y,onItemClose:L.useCallback(()=>o&&y(""),[o,y]),children:ee.jsx($he,{scope:e.__scopeAccordion,collapsible:o,children:ee.jsx(_he,{...s,ref:t})})})}),hPt=L.forwardRef((e,t)=>{const{value:n,defaultValue:a,onValueChange:r=()=>{},...o}=e,[s,d]=ld({prop:n,defaultProp:a??[],onChange:r,caller:qi}),y=L.useCallback(b=>d((_=[])=>[..._,b]),[d]),g=L.useCallback(b=>d((_=[])=>_.filter(x=>x!==b)),[d]);return ee.jsx(bhe,{scope:e.__scopeAccordion,value:s,onItemOpen:y,onItemClose:g,children:ee.jsx($he,{scope:e.__scopeAccordion,collapsible:!0,children:ee.jsx(_he,{...o,ref:t})})})}),[vPt,ux]=sx(qi),_he=L.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:a,dir:r,orientation:o="vertical",...s}=e,d=L.useRef(null),y=da(d,t),g=lPt(n),_=HL(r)==="ltr",x=Tr(e.onKeyDown,C=>{var ge;if(!cPt.includes(C.key))return;const k=C.target,S=g().filter(_e=>{var me;return!((me=_e.ref.current)!=null&&me.disabled)}),w=S.findIndex(_e=>_e.ref.current===k),E=S.length;if(w===-1)return;C.preventDefault();let P=w;const F=0,j=E-1,q=()=>{P=w+1,P>j&&(P=F)},Q=()=>{P=w-1,P<F&&(P=j)};switch(C.key){case"Home":P=F;break;case"End":P=j;break;case"ArrowRight":o==="horizontal"&&(_?q():Q());break;case"ArrowDown":o==="vertical"&&q();break;case"ArrowLeft":o==="horizontal"&&(_?Q():q());break;case"ArrowUp":o==="vertical"&&Q();break}const ae=P%E;(ge=S[ae].ref.current)==null||ge.focus()});return ee.jsx(vPt,{scope:n,disabled:a,direction:r,orientation:o,children:ee.jsx(l2.Slot,{scope:n,children:ee.jsx(cr.div,{...s,"data-orientation":o,ref:y,onKeyDown:a?void 0:x})})})}),cx="AccordionItem",[yPt,f2]=sx(cx),whe=L.forwardRef((e,t)=>{const{__scopeAccordion:n,value:a,...r}=e,o=ux(cx,n),s=fPt(cx,n),d=d2(n),y=N4(),g=a&&s.value.includes(a)||!1,b=o.disabled||e.disabled;return ee.jsx(yPt,{scope:n,open:g,disabled:b,triggerId:y,children:ee.jsx(iPt,{"data-orientation":o.orientation,"data-state":She(g),...d,...r,ref:t,disabled:b,open:g,onOpenChange:_=>{_?s.onItemOpen(a):s.onItemClose(a)}})})});whe.displayName=cx;var xhe="AccordionHeader",Ihe=L.forwardRef((e,t)=>{const{__scopeAccordion:n,...a}=e,r=ux(qi,n),o=f2(xhe,n);return ee.jsx(cr.h3,{"data-orientation":r.orientation,"data-state":She(o.open),"data-disabled":o.disabled?"":void 0,...a,ref:t})});Ihe.displayName=xhe;var p2="AccordionTrigger",Ehe=L.forwardRef((e,t)=>{const{__scopeAccordion:n,...a}=e,r=ux(qi,n),o=f2(p2,n),s=pPt(p2,n),d=d2(n);return ee.jsx(l2.ItemSlot,{scope:n,children:ee.jsx(sPt,{"aria-disabled":o.open&&!s.collapsible||void 0,"data-orientation":r.orientation,id:o.triggerId,...d,...a,ref:t})})});Ehe.displayName=p2;var Ahe="AccordionContent",Che=L.forwardRef((e,t)=>{const{__scopeAccordion:n,...a}=e,r=ux(qi,n),o=f2(Ahe,n),s=d2(n);return ee.jsx(uPt,{role:"region","aria-labelledby":o.triggerId,"data-orientation":r.orientation,...s,...a,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});Che.displayName=Ahe;function She(e){return e?"open":"closed"}var gPt=ghe,bPt=whe,$Pt=Ihe,Dhe=Ehe,The=Che;const khe=gPt,m2=he.forwardRef(({className:e,...t},n)=>ee.jsx(bPt,{ref:n,className:qt("border-b",e),...t}));m2.displayName="AccordionItem";const h2=he.forwardRef(({className:e,children:t,...n},a)=>ee.jsx($Pt,{className:"flex",children:ee.jsxs(Dhe,{ref:a,className:qt("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,ee.jsx(QL,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));h2.displayName=Dhe.displayName;const v2=he.forwardRef(({className:e,children:t,...n},a)=>ee.jsx(The,{ref:a,className:"text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:ee.jsx("div",{className:qt("pb-4 pt-0",e),children:t})}));v2.displayName=The.displayName;const y2=he.forwardRef(({className:e,...t},n)=>ee.jsx("div",{ref:n,className:qt("rounded-lg border bg-card text-card-foreground shadow-xs",e),...t}));y2.displayName="Card";const _Pt=he.forwardRef(({className:e,...t},n)=>ee.jsx("div",{ref:n,className:qt("flex flex-col space-y-1.5 p-6",e),...t}));_Pt.displayName="CardHeader";const wPt=he.forwardRef(({className:e,...t},n)=>ee.jsx("div",{ref:n,className:qt("text-2xl font-semibold leading-none tracking-tight",e),...t}));wPt.displayName="CardTitle";const xPt=he.forwardRef(({className:e,...t},n)=>ee.jsx("div",{ref:n,className:qt("text-sm text-muted-foreground",e),...t}));xPt.displayName="CardDescription";const g2=he.forwardRef(({className:e,...t},n)=>ee.jsx("div",{ref:n,className:qt("p-6 pt-0",e),...t}));g2.displayName="CardContent";const IPt=he.forwardRef(({className:e,...t},n)=>ee.jsx("div",{ref:n,className:qt("flex items-center p-6 pt-0",e),...t}));IPt.displayName="CardFooter";const{convertToValidClassName:EPt}=jc,APt=({classNames:e,data:t,label:n,path:a,schema:r,errors:o,addItem:s,removeItems:d,uischema:y,uischemas:g,getStyleAsClassName:b,renderers:_,rootSchema:x,translations:C,enabled:k})=>{var xe,Ae;const S=y,w=L.useMemo(()=>uA(g??[],r,y.scope,a,void 0,y,x),[g,r,a,y,x]),E=o.length===0,F=[b?b("array.control.validation"):""].concat(E?"":b?b("array.control.validation.error"):"").join(" "),j=b?b("array.control.add"):"",q=b?b("array.control.label"):"",Q=b?b("array.child.controls"):"",ae=b?b("array.child.controls.delete"):"",ge=[b?b("array.control"):"",EPt(S.scope)].join(" "),_e=()=>{s&&s(a,_h(r,x))()},me=ue=>{d&&d(a,[ue])()},G=((Ae=(xe=x.properties)==null?void 0:xe[a])==null?void 0:Ae.title)??n;return ee.jsxs("div",{className:ge,children:[ee.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[ee.jsx("span",{className:qt("text-lg font-bold",q),children:G}),ee.jsx("div",{className:qt("text-destructive",F),children:o})]}),ee.jsxs(khe,{type:"multiple",className:qt("space-y-4 pb-4",e==null?void 0:e.children),children:[(t==null?void 0:t.length)>0?Vx(0,t.length).map(ue=>{const De=b0(a,`${ue}`);return ee.jsxs(m2,{value:`item-${ue}`,className:"rounded-lg border",children:[ee.jsxs("div",{className:"flex flex-row gap-0 [&>h3]:flex-grow",children:[ee.jsx(h2,{className:"hover:bg-muted/50 flex items-center justify-between gap-2 rounded-xl px-4 py-2 transition-colors",children:ee.jsx("div",{className:qt("flex items-center space-x-2",Q),children:ee.jsxs("span",{className:q,children:[G," ",ue+1]})})}),ee.jsxs(Br,{type:"button",variant:"ghost",size:"icon",className:ae,onClick:()=>{me(ue)},disabled:!k,children:[ee.jsx(Rie,{className:"h-4 w-4"}),ee.jsx("span",{className:"sr-only",children:C.removeAriaLabel})]})]}),ee.jsx(v2,{className:"p-4",children:ee.jsx(kl,{schema:r,uischema:w||y,path:De,renderers:_},De)})]},ue)}):ee.jsx(y2,{className:"border-2 border-dashed",children:ee.jsx(g2,{className:"flex flex-col items-center justify-center p-8 text-center",children:ee.jsxs(Br,{type:"button",disabled:!k,onClick:_e,variant:"outline",children:[ee.jsx(j4,{className:"mr-2 h-4 w-4"}),C.addTooltip]})})}),(t==null?void 0:t.length)>0&&ee.jsxs(Br,{onClick:_e,type:"button",className:j,disabled:!k,variant:"outline",children:[ee.jsx(j4,{className:"mr-2 h-4 w-4"}),C.addTooltip]})]})]})},CPt=({schema:e,uischema:t,data:n,path:a,rootSchema:r,uischemas:o,addItem:s,getStyle:d,getStyleAsClassName:y,removeItems:g,moveUp:b,moveDown:_,id:x,visible:C,enabled:k,errors:S,translations:w})=>{const E=t,P=jc.createLabelDescriptionFrom(E,e),F=P.show?P.text:"",j=`control ${jc.convertToValidClassName(E.scope)}`,q=y?y("array.layout"):"",Q=y?y("array.button"):"",ae=y?y("array.children"):"",ge={wrapper:j,fieldSet:q,button:Q,children:ae};return C?ee.jsx(APt,{classNames:ge,data:n,label:F??"",path:a,schema:e,errors:S,arraySchema:e,addItem:s,removeItems:g,moveUp:b,moveDown:_,uischema:t,uischemas:o,getStyleAsClassName:y,rootSchema:r,id:x,visible:C,enabled:k,getStyle:d,translations:w}):null},SPt=tn(5,gp(oA,iA)),DPt=$o(N0(ws(O0(CPt)))),TPt=({renderers:e,cells:t,uischemas:n,schema:a,label:r,path:o,visible:s,enabled:d,uischema:y,rootSchema:g})=>{const b=L.useMemo(()=>{const _=uA(n,a,y.scope,o,()=>It(o)?pp.uiSchema(a,"VerticalLayout",void 0,g):{...pp.uiSchema(a,"Group",void 0,g),label:r},y,g);return{..._,elements:"elements"in _&&_.elements?_.elements.map(x=>({...x,options:{...y.options??{},...x.options??{}}})):[]}},[n,a,o,r,y,g]);return s?ee.jsx(kl,{visible:s,enabled:d,schema:a,uischema:b,path:o,renderers:e,cells:t}):null},kPt=tn(2,g7),LPt=yze(TPt),{convertToValidClassName:PPt}=jc,{isPrimitiveArrayControl:NPt,rankWith:OPt}=E7;class zPt extends L.Component{constructor(){super(...arguments);ove(this,"confirmDelete",(n,a)=>{const r=n.substring(0,n.lastIndexOf("."));this.props.removeItems&&this.props.removeItems(r,[a])()})}render(){const{addItem:n,uischema:a,schema:r,rootSchema:o,path:s,data:d,visible:y,errors:g,label:b,getStyleAsClassName:_,childErrors:x,translations:C,enabled:k}=this.props,S=a,w=(_==null?void 0:_("array.table.table"))||"",E=(_==null?void 0:_("array.table.label"))||"",P=(_==null?void 0:_("array.table.button"))||"",F=(_==null?void 0:_("array.table.validation"))||"",j=[(_==null?void 0:_("array.table"))||"",PPt(S.scope)].join(" "),q=ge=>({type:"Control",label:!1,scope:r.type==="object"?`#/properties/${ge}`:"#"}),Q=g.length===0,ae=[F].concat(Q?"":(_==null?void 0:_("array.table.validation.error"))||"").join(" ");return ee.jsxs("div",{className:j,hidden:!y,children:[d&&d.length?ee.jsxs("table",{className:w,children:[ee.jsx("thead",{children:ee.jsx("tr",{children:r.properties?F0(B0,z0(ge=>r.properties?r.properties[ge].type!=="array":!1),j0(ge=>ee.jsx("th",{children:r.properties&&(r.properties[ge].title??Y7(ge))},ge)))(r.properties):ee.jsx("th",{className:E,children:b})})}),ee.jsxs("tbody",{children:[!d||!Array.isArray(d)||d.length===0?ee.jsx("tr",{children:ee.jsx("td",{children:C.noDataMessage})}):d.map((ge,_e)=>{const me=fp.compose(s,`${_e}`),G=lh(x,De=>gh(De).startsWith(me)),xe=(_==null?void 0:_("array.validation"))||"",Ae=(_==null?void 0:_("array.validation.error"))||"",ue=G?[xe].concat(Ae).join(" "):xe;return ee.jsxs("tr",{children:[r.properties?F0(B0,z0(De=>r.properties?r.properties[De].type!=="array":!1),j0(De=>{const de=fp.compose(me,De.toString());return ee.jsx("td",{children:ee.jsx(Eh,{schema:Si.schema(r,`#/properties/${hh(De)}`,o),uischema:q(hh(De)),path:me+"."+De})},de)}))(r.properties):ee.jsxs("td",{children:[ee.jsx(Eh,{schema:r,uischema:q(),path:me}),G&&ee.jsx("span",{className:qt("text-destructive text-xs",ue),children:vA(G.map(De=>De.message),", ")})]},fp.compose(me,_e.toString())),ee.jsx("td",{children:ee.jsxs(Br,{type:"button",variant:"ghost",size:"icon",onClick:()=>{this.confirmDelete(me,_e)},disabled:!k,children:[ee.jsx(Rie,{className:"h-4 w-4"}),ee.jsx("span",{className:"sr-only",children:C.removeTooltip})]})})]},me)}),ee.jsx("tr",{children:ee.jsx("td",{children:ee.jsxs(Br,{type:"button",variant:"outline",className:P,disabled:!k,onClick:n(s,_h(r,o)),children:[ee.jsx(j4,{className:"mr-2 h-4 w-4"}),C.addTooltip]})})})]})]}):ee.jsx(y2,{className:"border-2 border-dashed",children:ee.jsx(g2,{className:"flex flex-col items-center justify-center p-8 text-center",children:ee.jsxs(Br,{type:"button",variant:"outline",disabled:!k,onClick:n(s,_h(r,o)),children:[ee.jsx(j4,{className:"mr-2 h-4 w-4"}),C.addTooltip]})})}),ee.jsx("div",{className:ae,children:Q?"":g})]})}}const jPt=$o(N0(ws(O0(zPt)))),FPt=OPt(4,NPt);var lx="Checkbox",[BPt,bNt]=Cu(lx),[MPt,b2]=BPt(lx);function RPt(e){const{__scopeCheckbox:t,checked:n,children:a,defaultChecked:r,disabled:o,form:s,name:d,onCheckedChange:y,required:g,value:b="on",internal_do_not_use_render:_}=e,[x,C]=ld({prop:n,defaultProp:r??!1,onChange:y,caller:lx}),[k,S]=he.useState(null),[w,E]=he.useState(null),P=he.useRef(!1),F=k?!!s||!!k.closest("form"):!0,j={checked:x,disabled:o,setChecked:C,control:k,setControl:S,name:d,form:s,value:b,hasConsumerStoppedPropagationRef:P,required:g,defaultChecked:hl(r)?!1:r,isFormControl:F,bubbleInput:w,setBubbleInput:E};return ee.jsx(MPt,{scope:t,...j,children:UPt(_)?_(j):a})}var Lhe="CheckboxTrigger",Phe=he.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...a},r)=>{const{control:o,value:s,disabled:d,checked:y,required:g,setControl:b,setChecked:_,hasConsumerStoppedPropagationRef:x,isFormControl:C,bubbleInput:k}=b2(Lhe,e),S=da(r,b),w=he.useRef(y);return he.useEffect(()=>{const E=o==null?void 0:o.form;if(E){const P=()=>_(w.current);return E.addEventListener("reset",P),()=>E.removeEventListener("reset",P)}},[o,_]),ee.jsx(cr.button,{type:"button",role:"checkbox","aria-checked":hl(y)?"mixed":y,"aria-required":g,"data-state":Fhe(y),"data-disabled":d?"":void 0,disabled:d,value:s,...a,ref:S,onKeyDown:Tr(t,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:Tr(n,E=>{_(P=>hl(P)?!0:!P),k&&C&&(x.current=E.isPropagationStopped(),x.current||E.stopPropagation())})})});Phe.displayName=Lhe;var $2=he.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:a,checked:r,defaultChecked:o,required:s,disabled:d,value:y,onCheckedChange:g,form:b,..._}=e;return ee.jsx(RPt,{__scopeCheckbox:n,checked:r,defaultChecked:o,disabled:d,required:s,onCheckedChange:g,name:a,form:b,value:y,internal_do_not_use_render:({isFormControl:x})=>ee.jsxs(ee.Fragment,{children:[ee.jsx(Phe,{..._,ref:t,__scopeCheckbox:n}),x&&ee.jsx(jhe,{__scopeCheckbox:n})]})})});$2.displayName=lx;var Nhe="CheckboxIndicator",Ohe=he.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:a,...r}=e,o=b2(Nhe,n);return ee.jsx(wm,{present:a||hl(o.checked)||o.checked===!0,children:ee.jsx(cr.span,{"data-state":Fhe(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});Ohe.displayName=Nhe;var zhe="CheckboxBubbleInput",jhe=he.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:a,hasConsumerStoppedPropagationRef:r,checked:o,defaultChecked:s,required:d,disabled:y,name:g,value:b,form:_,bubbleInput:x,setBubbleInput:C}=b2(zhe,e),k=da(n,C),S=Iie(o),w=KL(a);he.useEffect(()=>{const P=x;if(!P)return;const F=window.HTMLInputElement.prototype,q=Object.getOwnPropertyDescriptor(F,"checked").set,Q=!r.current;if(S!==o&&q){const ae=new Event("click",{bubbles:Q});P.indeterminate=hl(o),q.call(P,hl(o)?!1:o),P.dispatchEvent(ae)}},[x,S,o,r]);const E=he.useRef(hl(o)?!1:o);return ee.jsx(cr.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??E.current,required:d,disabled:y,name:g,value:b,form:_,...t,tabIndex:-1,ref:k,style:{...t.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});jhe.displayName=zhe;function UPt(e){return typeof e=="function"}function hl(e){return e==="indeterminate"}function Fhe(e){return hl(e)?"indeterminate":e?"checked":"unchecked"}const Bhe=he.forwardRef(({className:e,...t},n)=>ee.jsx($2,{ref:n,className:qt("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:ee.jsx(Ohe,{className:qt("flex items-center justify-center text-current"),children:ee.jsx(Ewt,{className:"h-4 w-4"})})}));Bhe.displayName=$2.displayName;const qPt=({className:e,children:t,visible:n})=>ee.jsx("div",{className:e,hidden:n==null?!1:!n,children:t}),VPt=(e,t,n,a,r)=>{const{renderers:o,cells:s}=$p();return It(e.elements)?[]:e.elements.map((d,y)=>ee.jsx("div",{className:n,children:ee.jsx(kl,{renderers:o,cells:s,uischema:d,schema:t,path:a,enabled:r})},`${a}-${y}`))},ZPt=tn(1,Pn("CollapsingVerticalLayout")),GPt=e=>{const{data:t,...n}=e;return ee.jsx(WPt,{...n})},WPt=L.memo(function({schema:t,uischema:n,path:a,visible:r,enabled:o,getStyle:s,getStyleAsClassName:d}){var ge,_e,me;const y=((ge=n.options)==null?void 0:ge.defaultOpen)??!1,g=((_e=n.options)==null?void 0:_e.editOnCheckboxClick)??!1,b=((me=n.options)==null?void 0:me.titles)??{},_=L.useMemo(()=>({...n,options:{...n.options??{},readonly:!1},elements:n.elements.map(G=>({...G,options:{...G.options??{},readonly:!1}}))}),[n]),[x,C]=L.useState(!1),[k,S]=L.useState(!1),[w,E]=L.useState(n),P=w,F=P.elements?P.elements.length:0,j=d&&d("vertical.layout"),q=["vertical-layout-item"].concat(s?s("vertical.layout.item",F):[]).join(" "),Q=async()=>{var xe,Ae,ue,De;S(!0),E(n),await((De=(xe=n.options)==null?void 0:xe.handleSave)==null?void 0:De.call(xe,((ue=(Ae=n.options)==null?void 0:Ae.getSubmittedData)==null?void 0:ue.call(Ae))??{}))?C(!1):E(_),S(!1)},ae=G=>{var xe,Ae;G?E(_):(E(n),(Ae=(xe=n.options)==null?void 0:xe.handleReset)==null||Ae.call(xe)),C(G)};return ee.jsx("fieldset",{className:"group-layout pb-4",children:ee.jsx(khe,{type:"single",collapsible:!0,defaultValue:y?"item-1":void 0,children:ee.jsxs(m2,{value:"item-1",className:"[&>div]:data-[state=open]:overflow-visible",children:[ee.jsx(h2,{className:"text-muted-foreground text-sm font-normal",children:w.label}),ee.jsx(v2,{className:"py-2",children:ee.jsxs("div",{className:"flex flex-row items-start justify-between gap-2",children:[ee.jsx(qPt,{className:j,uischema:w,schema:t,visible:r,enabled:o,path:a,getStyle:s,getStyleAsClassName:d,children:VPt(P,t,q,a,o)}),g?ee.jsx("div",{className:"flex items-center gap-2",children:x?ee.jsxs(ee.Fragment,{children:[ee.jsx(Br,{variant:"outline",onClick:()=>ae(!1),disabled:k,size:"small",children:b.cancel??"Cancel"}),ee.jsxs(Br,{onClick:G=>{G.preventDefault(),G.stopPropagation(),Q()},disabled:k,className:"flex items-center justify-between gap-2",size:"small",children:[k&&ee.jsx(Twt,{className:"size-4 animate-spin"}),b.save??"Save"]})]}):ee.jsxs(ee.Fragment,{children:[ee.jsx(Bhe,{id:"edit-mode",checked:x,onCheckedChange:G=>ae(G),disabled:k}),ee.jsx(_m,{htmlFor:"edit-mode",children:b.editStaticData??"Edit static data"})]})}):null]})})]})})})}),HPt=$o(Ih(GPt,!1)),_i=[...pFe,{tester:kPt,renderer:LPt},{tester:ZPt,renderer:HPt},{tester:SPt,renderer:DPt},{tester:FPt,renderer:jPt},{tester:ULt,renderer:qLt}],wi=[...mFe,{tester:CLt,cell:SLt},{tester:Lwt,cell:Pwt},{tester:VTt,cell:ZTt},{tester:NAt,cell:OAt},{tester:$Lt,cell:_Lt},{tester:ILt,cell:ELt},{tester:ZLt,cell:GLt},{tester:DLt,cell:TLt},{tester:kLt,cell:LLt},{tester:tPt,cell:nPt},{tester:YLt,cell:QLt},{tester:HLt,cell:JLt}],dx=({getEvaluatedConstraints:e,enabled:t=!0,dependencyMap:n})=>{const a=L.useMemo(()=>t&&!It(n)&&!!e,[t,n,e]),[r,o]=L.useState(void 0),[s,d]=L.useTransition(),[y,g]=L.useState(a);L.useEffect(()=>{g(a)},[a,g]);const b=L.useRef(!1),_=L.useCallback(()=>{a&&g(!0)},[a,g]);return L.useEffect(()=>{!e||b.current||!y||(b.current=!0,d(async()=>{const x=await e();o(x),b.current=!1,g(!1)}))},[e,y]),{isFetching:s,evaluatedConstraints:r,refetchConstraints:_,constraintsActive:a}};var fx={exports:{}};/**
235
+ `)},tLt=0,Vm=[];function nLt(e){var t=he.useRef([]),n=he.useRef([0,0]),a=he.useRef(),r=he.useState(tLt++)[0],o=he.useState(Rme)[0],s=he.useRef(e);he.useEffect(function(){s.current=e},[e]),he.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var S=eSt([e.lockRef.current],(e.shards||[]).map(Hme),!0).filter(Boolean);return S.forEach(function(w){return w.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),S.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var d=he.useCallback(function(S,w){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!s.current.allowPinchZoom;var E=ax(S),P=n.current,F="deltaX"in S?S.deltaX:P[0]-E[0],j="deltaY"in S?S.deltaY:P[1]-E[1],q,Q=S.target,ae=Math.abs(F)>Math.abs(j)?"h":"v";if("touches"in S&&ae==="h"&&Q.type==="range")return!1;var ge=Vme(ae,Q);if(!ge)return!0;if(ge?q=ae:(q=ae==="v"?"h":"v",ge=Vme(ae,Q)),!ge)return!1;if(!a.current&&"changedTouches"in S&&(F||j)&&(a.current=q),!q)return!0;var _e=a.current||q;return Ykt(_e,w,S,_e==="h"?F:j)},[]),y=he.useCallback(function(S){var w=S;if(!(!Vm.length||Vm[Vm.length-1]!==o)){var E="deltaY"in w?Wme(w):ax(w),P=t.current.filter(function(q){return q.name===w.type&&(q.target===w.target||w.target===q.shadowParent)&&Qkt(q.delta,E)})[0];if(P&&P.should){w.cancelable&&w.preventDefault();return}if(!P){var F=(s.current.shards||[]).map(Hme).filter(Boolean).filter(function(q){return q.contains(w.target)}),j=F.length>0?d(w,F[0]):!s.current.noIsolation;j&&w.cancelable&&w.preventDefault()}}},[]),g=he.useCallback(function(S,w,E,P){var F={name:S,delta:w,target:E,should:P,shadowParent:rLt(E)};t.current.push(F),setTimeout(function(){t.current=t.current.filter(function(j){return j!==F})},1)},[]),b=he.useCallback(function(S){n.current=ax(S),a.current=void 0},[]),_=he.useCallback(function(S){g(S.type,Wme(S),S.target,d(S,e.lockRef.current))},[]),x=he.useCallback(function(S){g(S.type,ax(S),S.target,d(S,e.lockRef.current))},[]);he.useEffect(function(){return Vm.push(o),e.setCallbacks({onScrollCapture:_,onWheelCapture:_,onTouchMoveCapture:x}),document.addEventListener("wheel",y,qm),document.addEventListener("touchmove",y,qm),document.addEventListener("touchstart",b,qm),function(){Vm=Vm.filter(function(S){return S!==o}),document.removeEventListener("wheel",y,qm),document.removeEventListener("touchmove",y,qm),document.removeEventListener("touchstart",b,qm)}},[]);var C=e.removeScrollBar,k=e.inert;return he.createElement(he.Fragment,null,k?he.createElement(o,{styles:eLt(r)}):null,C?he.createElement(Zkt,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function rLt(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const aLt=Lkt(Mme,nLt);var Jme=he.forwardRef(function(e,t){return he.createElement(nx,js({},e,{ref:t,sideCar:aLt}))});Jme.classNames=nx.classNames;var ox="Popover",[Xme,yNt]=Cu(ox,[Ame]),Zy=Ame(),[oLt,ml]=Xme(ox),Kme=e=>{const{__scopePopover:t,children:n,open:a,defaultOpen:r,onOpenChange:o,modal:s=!1}=e,d=Zy(t),y=he.useRef(null),[g,b]=he.useState(!1),[_,x]=ld({prop:a,defaultProp:r??!1,onChange:o,caller:ox});return ee.jsx(vkt,{...d,children:ee.jsx(oLt,{scope:t,contentId:N4(),triggerRef:y,open:_,onOpenChange:x,onOpenToggle:he.useCallback(()=>x(C=>!C),[x]),hasCustomAnchor:g,onCustomAnchorAdd:he.useCallback(()=>b(!0),[]),onCustomAnchorRemove:he.useCallback(()=>b(!1),[]),modal:s,children:n})})};Kme.displayName=ox;var Yme="PopoverAnchor",Qme=he.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,r=ml(Yme,n),o=Zy(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:d}=r;return he.useEffect(()=>(s(),()=>d()),[s,d]),ee.jsx(Ome,{...o,...a,ref:t})});Qme.displayName=Yme;var ehe="PopoverTrigger",iLt=he.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,r=ml(ehe,n),o=Zy(n),s=da(t,r.triggerRef),d=ee.jsx(cr.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":ohe(r.open),...a,ref:s,onClick:Tr(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?d:ee.jsx(Ome,{asChild:!0,...o,children:d})});iLt.displayName=ehe;var i2="PopoverPortal",[sLt,uLt]=Xme(i2,{forceMount:void 0}),the=e=>{const{__scopePopover:t,forceMount:n,children:a,container:r}=e,o=ml(i2,t);return ee.jsx(sLt,{scope:t,forceMount:n,children:ee.jsx(wm,{present:n||o.open,children:ee.jsx(zme,{asChild:!0,container:r,children:a})})})};the.displayName=i2;var Zm="PopoverContent",nhe=he.forwardRef((e,t)=>{const n=uLt(Zm,e.__scopePopover),{forceMount:a=n.forceMount,...r}=e,o=ml(Zm,e.__scopePopover);return ee.jsx(wm,{present:a||o.open,children:o.modal?ee.jsx(lLt,{...r,ref:t}):ee.jsx(dLt,{...r,ref:t})})});nhe.displayName=Zm;var cLt=uy("PopoverContent.RemoveScroll"),lLt=he.forwardRef((e,t)=>{const n=ml(Zm,e.__scopePopover),a=he.useRef(null),r=da(t,a),o=he.useRef(!1);return he.useEffect(()=>{const s=a.current;if(s)return xkt(s)},[]),ee.jsx(Jme,{as:cLt,allowPinchZoom:!0,children:ee.jsx(rhe,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Tr(e.onCloseAutoFocus,s=>{var d;s.preventDefault(),o.current||(d=n.triggerRef.current)==null||d.focus()}),onPointerDownOutside:Tr(e.onPointerDownOutside,s=>{const d=s.detail.originalEvent,y=d.button===0&&d.ctrlKey===!0,g=d.button===2||y;o.current=g},{checkForDefaultPrevented:!1}),onFocusOutside:Tr(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),dLt=he.forwardRef((e,t)=>{const n=ml(Zm,e.__scopePopover),a=he.useRef(!1),r=he.useRef(!1);return ee.jsx(rhe,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s,d;(s=e.onCloseAutoFocus)==null||s.call(e,o),o.defaultPrevented||(a.current||(d=n.triggerRef.current)==null||d.focus(),o.preventDefault()),a.current=!1,r.current=!1},onInteractOutside:o=>{var y,g;(y=e.onInteractOutside)==null||y.call(e,o),o.defaultPrevented||(a.current=!0,o.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=o.target;((g=n.triggerRef.current)==null?void 0:g.contains(s))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&r.current&&o.preventDefault()}})}),rhe=he.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:a,onOpenAutoFocus:r,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:d,onPointerDownOutside:y,onFocusOutside:g,onInteractOutside:b,..._}=e,x=ml(Zm,n),C=Zy(n);return ekt(),ee.jsx(bme,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:r,onUnmountAutoFocus:o,children:ee.jsx(mme,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:b,onEscapeKeyDown:d,onPointerDownOutside:y,onFocusOutside:g,onDismiss:()=>x.onOpenChange(!1),children:ee.jsx(ykt,{"data-state":ohe(x.open),role:"dialog",id:x.contentId,...C,..._,ref:t,style:{..._.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),ahe="PopoverClose",fLt=he.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,r=ml(ahe,n);return ee.jsx(cr.button,{type:"button",...a,ref:t,onClick:Tr(e.onClick,()=>r.onOpenChange(!1))})});fLt.displayName=ahe;var pLt="PopoverArrow",mLt=he.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,r=Zy(n);return ee.jsx(gkt,{...r,...a,ref:t})});mLt.displayName=pLt;function ohe(e){return e?"open":"closed"}var hLt=Kme,vLt=the,ihe=nhe;const yLt=hLt,she=he.forwardRef(({className:e,align:t="center",sideOffset:n=4,...a},r)=>ee.jsx(vLt,{children:ee.jsx(ihe,{ref:r,align:t,sideOffset:n,className:qt("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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",e),...a})}));she.displayName=ihe.displayName;const gLt=$m("",{variants:{variant:{h1:"scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",h2:"scroll-m-20 text-3xl font-semibold tracking-tight",h3:"scroll-m-20 text-2xl font-semibold tracking-tight",h4:"scroll-m-20 text-xl font-semibold tracking-tight",h5:"scroll-m-20 text-lg font-semibold tracking-tight",h6:"scroll-m-20 text-base font-semibold tracking-tight",caption:"text-sm font-medium leading-none",nav:"text-xs leading-4 text-zinc-400",lead:"text-xl text-muted-foreground",muted:"text-sm text-muted-foreground",body1:"text-base",body2:"text-sm",blockquote:"border-l-2 pl-6 italic",inlineCode:"relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold"}},defaultVariants:{variant:"body1"}}),uhe=he.forwardRef(({className:e,variant:t,asChild:n=!1,...a},r)=>{const o=n?fie:"span";return ee.jsx(o,{className:qt("max-w-full break-words",gLt({variant:t,className:e})),ref:r,...a})});uhe.displayName="Typography";function che({displayTimeZoneText:e,className:t,...n}){const[a,r]=L.useState(!1);return ee.jsx(yLt,{modal:!0,open:a,onOpenChange:r,children:ee.jsxs(OTt,{validationBehavior:"aria",className:qt("group flex flex-col gap-1",t),...n,onChange:o=>{var s;(s=n.onChange)==null||s.call(n,o),r(!1)},children:[ee.jsxs(G3,{className:"flex flex-1 rounded-md border p-2",children:[ee.jsx(Qme,{children:ee.jsx(Vw,{className:P4({size:"xSmall",variant:"ghost"}),onClick:()=>r(!0),children:ee.jsx(Iwt,{className:qt("size-4",n.isDisabled&&"opacity-50")})})}),ee.jsx(DTt,{className:"flex w-full flex-row flex-wrap items-center",children:o=>o.type==="timeZoneName"?ee.jsx(uhe,{className:"mx-2 flex flex-1 justify-end text-xs opacity-50",children:o.text}):ee.jsx(kTt,{segment:o,className:qt("rounded-sm tabular-nums caret-transparent outline-none placeholder-shown:italic",!o.isEditable||n.isDisabled?"opacity-50":"focus:bg-primary focus:text-white")})})]}),ee.jsx(she,{className:"w-fit border-0 p-0",children:ee.jsx(ITt,{children:ee.jsxs(yTt,{className:"rounded-sm border p-3",children:[ee.jsxs("header",{className:"flex flex-row justify-between pb-4",children:[ee.jsx(Vw,{slot:"previous",className:P4({size:"xSmall",variant:"ghost"}),children:ee.jsx(Awt,{})}),ee.jsx(zTt,{className:"font-bold"}),ee.jsx(Vw,{slot:"next",className:P4({size:"xSmall",variant:"ghost"}),children:ee.jsx(Cwt,{})})]}),ee.jsxs(gTt,{className:"border-separate border-spacing-1",children:[ee.jsx(eme,{children:o=>ee.jsx(tme,{className:"text-xs font-semibold",children:o})}),ee.jsx(nme,{children:o=>ee.jsx(wTt,{date:o,className:qt("flex size-9 cursor-default items-center justify-center rounded-sm outline-none ring-primary/70 ring-offset-2 outside-month:text-secondary hover:bg-zinc-100 focus-visible:ring pressed:bg-zinc-500 selected:bg-primary selected:text-white",n.isDateUnavailable&&n.isDateUnavailable(o)&&"opacity-50")})})]})]})})})]})})}const lhe=(e,t)=>{if(!e)return null;let n;return e.includes("T")?n=Ui(jce(e,t)):n=zce(e),n},bLt=e=>{const{data:t,id:n,enabled:a,uischema:r,schema:o,path:s,handleChange:d}=e,y=ln(o,"timezone",Fs()),g=yi(a,r),b=L.useMemo(()=>{const _=lhe(t,y);return _||lhe(o.default,y)},[o,y,t]);return ee.jsx(che,{value:b??null,hourCycle:24,granularity:"day",onChange:_=>{d(s,_?_.toString():null)},"aria-label":n,isDisabled:!g,name:n,autoFocus:r.options&&r.options.focus,displayTimeZoneText:y})},$Lt=tn(3,rA),_Lt=Vr(ka(bLt)),wLt=(e,t)=>{const n=ju(e);return Sce(n,t)},xLt=e=>{const t=Fs(),{data:n,id:a,enabled:r,uischema:o,schema:s,path:d,handleChange:y}=e,g=ln(s,"timezone",t),b=yi(r,o),_=ln(s,"isClearable",!0),x=(F,j)=>{if(!F)return null;let q=null;try{q=jce(F,j)}catch{q=null}return q},C=L.useMemo(()=>{const F=x(n,g);return F||x(s.default,g)},[s,g,n]),{datePicker:k,focus:S}=o.options||{},{value:w,onChange:E,...P}=bs({hourCycle:24,granularity:"second",isDisabled:!b,name:a,autoFocus:S,displayTimeZoneText:g,"aria-label":a},k);return ee.jsx(che,{value:C??null,onChange:F=>{F?y(d,wLt(F,g).toAbsoluteString()):_&&y(d,null),E==null||E(F)},...P})},ILt=tn(3,aA),ELt=Vr(ka(xLt)),ALt=e=>{const{data:t,className:n,id:a,enabled:r,schema:o,uischema:s,path:d,handleChange:y,options:g,t:b}=e,_=L.useMemo(()=>b("enum.none",M0["enum.none"],{schema:o,uischema:s,path:d}),[b,o,s,d]),x=L.useRef(null),C=ln(o,"isClearable",!0),k=L.useMemo(()=>{const w=o.default;return g==null?void 0:g.find(E=>E.value===w)},[o,g]),S=yi(r,s);return ee.jsx(yy,{isClearable:C,placeholder:_,ref:x,id:a,instanceId:a,options:g,name:a,value:g==null?void 0:g.find(w=>w.value===t),defaultValue:k,isDisabled:!S,isMulti:!1,className:qt(n),onChange:w=>{y(d,w==null?void 0:w.value)},closeMenuOnSelect:!0})},CLt=tn(3,bh),SLt=hA(ws(R0(ALt))),dhe=e=>{const{data:t,id:n,enabled:a,uischema:r,path:o,handleChange:s,schema:d}=e,y=L.useMemo(()=>d.type==="integer"?0:d.multipleOf?-Math.log10(d.multipleOf):void 0,[d.multipleOf,d.type]),[g,b]=L.useState(!1),_=t||(g?t:d.default),x=yi(a,r);return ee.jsx(ume,{id:n,autoFocus:r.options&&r.options.focus,value:_??null,onChange:C=>{s(o,isNaN(C)?void 0:C),b(!0)},minValue:d.minimum??void 0,maxValue:d.maximum??void 0,isDisabled:!x,step:d.multipleOf??void 0,formatOptions:{signDisplay:"auto",maximumFractionDigits:y,useGrouping:!1},children:ee.jsxs(sme,{className:"relative",children:[ee.jsx(cme,{}),ee.jsx(lme,{})]})})},DLt=tn(3,D0),TLt=Vr(ka(dhe)),kLt=tn(3,tA),LLt=Vr(ka(dhe)),PLt=()=>{const[e,t]=L.useState(!1),n=L.useCallback(()=>t(!0),[]),a=L.useCallback(()=>t(!1),[]);return[e,n,a]};var NLt=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function OLt(e){var t=e.defaultOptions,n=t===void 0?!1:t,a=e.cacheOptions,r=a===void 0?!1:a,o=e.loadOptions;e.options;var s=e.isLoading,d=s===void 0?!1:s,y=e.onInputChange,g=e.filterOption,b=g===void 0?null:g,_=Ps(e,NLt),x=_.inputValue,C=L.useRef(void 0),k=L.useRef(!1),S=L.useState(Array.isArray(n)?n:void 0),w=fa(S,2),E=w[0],P=w[1],F=L.useState(typeof x<"u"?x:""),j=fa(F,2),q=j[0],Q=j[1],ae=L.useState(n===!0),ge=fa(ae,2),_e=ge[0],me=ge[1],G=L.useState(void 0),xe=fa(G,2),Ae=xe[0],ue=xe[1],De=L.useState([]),de=fa(De,2),Ve=de[0],Be=de[1],at=L.useState(!1),Ee=fa(at,2),se=Ee[0],ye=Ee[1],re=L.useState({}),W=fa(re,2),H=W[0],te=W[1],$e=L.useState(void 0),we=fa($e,2),Se=we[0],Ne=we[1],Ze=L.useState(void 0),Oe=fa(Ze,2),ot=Oe[0],mt=Oe[1];r!==ot&&(te({}),mt(r)),n!==Se&&(P(Array.isArray(n)?n:void 0),Ne(n)),L.useEffect(function(){return k.current=!0,function(){k.current=!1}},[]);var gt=L.useCallback(function(hr,B){if(!o)return B();var On=o(hr,B);On&&typeof On.then=="function"&&On.then(B,function(){return B()})},[o]);L.useEffect(function(){n===!0&&gt(q,function(hr){k.current&&(P(hr||[]),me(!!C.current))})},[]);var Vt=L.useCallback(function(hr,B){var On=pIt(hr,B,y);if(!On){C.current=void 0,Q(""),ue(""),Be([]),me(!1),ye(!1);return}if(r&&H[On])Q(On),ue(On),Be(H[On]),me(!1),ye(!1);else{var ha=C.current={};Q(On),me(!0),ye(!Ae),gt(On,function(Pa){k&&ha===C.current&&(C.current=void 0,me(!1),ue(On),Be(Pa||[]),ye(!1),te(Pa?yt(yt({},H),{},xm({},On,Pa)):H))})}},[r,gt,Ae,H,y]),Nn=se?[]:q&&Ae?Ve:E||[];return yt(yt({},_),{},{options:Nn,isLoading:_e||d,onInputChange:Vt,filterOption:b})}var zLt=L.forwardRef(function(e,t){var n=OLt(e),a=Gie(n);return he.createElement(SP,_t({ref:t},a))}),jLt=zLt;const FLt=L.forwardRef((e,t)=>ee.jsx(jLt,{ref:t,unstyled:!0,id:e.id,inputId:e.id,components:{DropdownIndicator:lue,ClearIndicator:due,MultiValueRemove:fue,MultiValueContainer:pue,ValueContainer:hue,MenuList:vue,Option:yue,MultiValueLabel:mue},classNames:{control:({isFocused:n,isDisabled:a})=>qt(["border-input ring-offset-background shadow-xs max-h-36 w-full overflow-y-auto rounded-md border bg-transparent px-3 text-sm",n?"ring-ring ring-1":"",a?"cursor-not-allowed opacity-50":""]),menu:()=>"text-sm mt-2 p-1 relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",option:({isFocused:n,isSelected:a})=>qt("relative flex w-full cursor-default select-none items-center break-words rounded-sm px-4 py-1.5 pr-2 outline-none",n?"bg-accent text-accent-foreground":"",a?"bg-primary text-white":""),multiValueLabel:()=>"dark:text-white",valueContainer:()=>"flex flex-row flex-wrap gap-2 py-2.5"},...e}));FLt.displayName="AsyncAutocomplete";const BLt=({config:e,id:t,schema:n,visible:a,errors:r,description:o,label:s,required:d,path:y,options:g,data:b,addItem:_,removeItem:x,handleChange:C,enabled:k,rootSchema:S,...w})=>{const[E,P,F]=PLt(),j=r.length===0,q=bs({},e,w.uischema.options),Q=!fA(a,o,E,q.showUnfocusedDescription),ae=L.useRef(null),ge=n.default,_e=yi(k,w.uischema);return a?a&&ee.jsxs("div",{className:"control root_properties_singleSelect flex flex-col gap-2",children:[ee.jsxs("label",{htmlFor:t,className:"break-words text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:[s,d?"*":""]}),ee.jsx(yy,{isClearable:!0,ref:ae,id:t,instanceId:t,onFocus:P,onBlur:F,options:g,name:"basePayment",value:g==null?void 0:g.filter(me=>b==null?void 0:b.includes(me.value)),defaultValue:ge,isDisabled:!_e,isMulti:!0,onChange:me=>{C(y,me.map(G=>G.value))},closeMenuOnSelect:!0}),ee.jsx("div",{className:"validation validation_error text-destructive text-sm font-medium",children:j?Q?o:null:r})]}):null},MLt=e=>e.oneOf!==void 0&&e.oneOf.length>0&&e.oneOf.every(t=>t.const!==void 0),RLt=e=>e.type==="string"&&e.enum!==void 0,ULt=tn(5,Dn(Pn("Control"),Dn(Fa(e=>ga(e,"array")&&!Array.isArray(e.items)&&e.uniqueItems===!0),C0("items",(e,t)=>{const n=e.$ref?co(t,e.$ref,t):e;return MLt(n)||RLt(n)})))),qLt=_ze(BLt),VLt=e=>{const{data:t,className:n,id:a,enabled:r,schema:o,uischema:s,path:d,handleChange:y,options:g,t:b}=e,_=L.useMemo(()=>b("enum.none",M0["enum.none"],{schema:o,uischema:s,path:d}),[b,o,s,d]),x=L.useRef(null),C=L.useMemo(()=>o.default?g==null?void 0:g.find(S=>S.value===o.default):null,[o,g]),k=yi(r,s);return ee.jsx(yy,{isClearable:!0,placeholder:_,ref:x,id:a,instanceId:a,options:g,name:"basePayment",value:g==null?void 0:g.find(S=>S.value===t),defaultValue:C,isDisabled:!k,isMulti:!1,className:n,onChange:S=>{y(d,S==null?void 0:S.value)},closeMenuOnSelect:!0})},ZLt=tn(3,b7),GLt=B7(ws(VLt)),WLt=e=>{var _;const{data:t,schema:n,className:a,id:r,enabled:o,uischema:s,path:d,handleChange:y}=e,g=n.default,b=yi(o,s);return ee.jsx(eP,{onValueChange:x=>{y(d,x)},value:t,className:qt("flex flex-row pt-2",a),disabled:!b,id:r,autoFocus:s.options&&s.options.focus,defaultValue:g,children:(_=n==null?void 0:n.enum)==null?void 0:_.map(x=>ee.jsxs("div",{className:"flex items-center space-x-2",children:[ee.jsx(ly,{value:x,id:`${d}.${x}`}),ee.jsx(_m,{htmlFor:`${d}.${x}`,className:"cursor-pointer",children:x})]},x))})},HLt=tn(5,Dn(bh,Fa(e=>{var t;return e&&((t=e.tag)==null?void 0:t.includes("radio-group"))}))),JLt=Vr(ka(WLt));function XLt({className:e,...t}){return ee.jsx("textarea",{"data-slot":"textarea",className:qt("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}const KLt=e=>{const{data:t,className:n,id:a,enabled:r,uischema:o,schema:s,path:d,handleChange:y}=e,[g,b]=L.useState(!1),_=t||(g?t:s.default),x=yi(r,o);return ee.jsx(XLt,{value:_||"",onChange:C=>{y(d,C.target.value),b(!0)},className:n,id:a,disabled:!x,autoFocus:o.options&&o.options.focus})},YLt=tn(3,nA),QLt=Vr(KLt),fhe=he.forwardRef(({className:e,type:t,...n},a)=>ee.jsx("input",{type:t,className:qt("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:a,...n}));fhe.displayName="Input";const ePt=e=>{const{config:t,data:n,className:a,id:r,enabled:o,uischema:s,schema:d,path:y,handleChange:g}=e,b=d.maxLength,_=bs({},t,s.options),x=yi(o,s),[C,k]=L.useState(!1),S=n||(C?n:d.default);return ee.jsx(fhe,{type:_.format==="password"?"password":"text",value:S||"",onChange:w=>{g(y,w.target.value===""?void 0:w.target.value),k(!0)},className:a,id:r,disabled:!x,autoFocus:_.focus,placeholder:_.placeholder,maxLength:_.restrict?b:void 0,size:_.trim?b:void 0})},tPt=tn(2,T0),nPt=Vr(ka(ePt));var ix="Collapsible",[rPt,phe]=Cu(ix),[aPt,s2]=rPt(ix),mhe=he.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:a,defaultOpen:r,disabled:o,onOpenChange:s,...d}=e,[y,g]=ld({prop:a,defaultProp:r??!1,onChange:s,caller:ix});return ee.jsx(aPt,{scope:n,disabled:o,contentId:N4(),open:y,onOpenToggle:he.useCallback(()=>g(b=>!b),[g]),children:ee.jsx(cr.div,{"data-state":c2(y),"data-disabled":o?"":void 0,...d,ref:t})})});mhe.displayName=ix;var hhe="CollapsibleTrigger",vhe=he.forwardRef((e,t)=>{const{__scopeCollapsible:n,...a}=e,r=s2(hhe,n);return ee.jsx(cr.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":c2(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...a,ref:t,onClick:Tr(e.onClick,r.onOpenToggle)})});vhe.displayName=hhe;var u2="CollapsibleContent",yhe=he.forwardRef((e,t)=>{const{forceMount:n,...a}=e,r=s2(u2,e.__scopeCollapsible);return ee.jsx(wm,{present:n||r.open,children:({present:o})=>ee.jsx(oPt,{...a,ref:t,present:o})})});yhe.displayName=u2;var oPt=he.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:a,children:r,...o}=e,s=s2(u2,n),[d,y]=he.useState(a),g=he.useRef(null),b=da(t,g),_=he.useRef(0),x=_.current,C=he.useRef(0),k=C.current,S=s.open||d,w=he.useRef(S),E=he.useRef(void 0);return he.useEffect(()=>{const P=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(P)},[]),Su(()=>{const P=g.current;if(P){E.current=E.current||{transitionDuration:P.style.transitionDuration,animationName:P.style.animationName},P.style.transitionDuration="0s",P.style.animationName="none";const F=P.getBoundingClientRect();_.current=F.height,C.current=F.width,w.current||(P.style.transitionDuration=E.current.transitionDuration,P.style.animationName=E.current.animationName),y(a)}},[s.open,a]),ee.jsx(cr.div,{"data-state":c2(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!S,...o,ref:b,style:{"--radix-collapsible-content-height":x?`${x}px`:void 0,"--radix-collapsible-content-width":k?`${k}px`:void 0,...e.style},children:S&&r})});function c2(e){return e?"open":"closed"}var iPt=mhe,sPt=vhe,uPt=yhe,qi="Accordion",cPt=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[l2,lPt,dPt]=yie(qi),[sx,gNt]=Cu(qi,[dPt,phe]),d2=phe(),ghe=L.forwardRef((e,t)=>{const{type:n,...a}=e,r=a,o=a;return ee.jsx(l2.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?ee.jsx(hPt,{...o,ref:t}):ee.jsx(mPt,{...r,ref:t})})});ghe.displayName=qi;var[bhe,fPt]=sx(qi),[$he,pPt]=sx(qi,{collapsible:!1}),mPt=L.forwardRef((e,t)=>{const{value:n,defaultValue:a,onValueChange:r=()=>{},collapsible:o=!1,...s}=e,[d,y]=ld({prop:n,defaultProp:a??"",onChange:r,caller:qi});return ee.jsx(bhe,{scope:e.__scopeAccordion,value:L.useMemo(()=>d?[d]:[],[d]),onItemOpen:y,onItemClose:L.useCallback(()=>o&&y(""),[o,y]),children:ee.jsx($he,{scope:e.__scopeAccordion,collapsible:o,children:ee.jsx(_he,{...s,ref:t})})})}),hPt=L.forwardRef((e,t)=>{const{value:n,defaultValue:a,onValueChange:r=()=>{},...o}=e,[s,d]=ld({prop:n,defaultProp:a??[],onChange:r,caller:qi}),y=L.useCallback(b=>d((_=[])=>[..._,b]),[d]),g=L.useCallback(b=>d((_=[])=>_.filter(x=>x!==b)),[d]);return ee.jsx(bhe,{scope:e.__scopeAccordion,value:s,onItemOpen:y,onItemClose:g,children:ee.jsx($he,{scope:e.__scopeAccordion,collapsible:!0,children:ee.jsx(_he,{...o,ref:t})})})}),[vPt,ux]=sx(qi),_he=L.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:a,dir:r,orientation:o="vertical",...s}=e,d=L.useRef(null),y=da(d,t),g=lPt(n),_=HL(r)==="ltr",x=Tr(e.onKeyDown,C=>{var ge;if(!cPt.includes(C.key))return;const k=C.target,S=g().filter(_e=>{var me;return!((me=_e.ref.current)!=null&&me.disabled)}),w=S.findIndex(_e=>_e.ref.current===k),E=S.length;if(w===-1)return;C.preventDefault();let P=w;const F=0,j=E-1,q=()=>{P=w+1,P>j&&(P=F)},Q=()=>{P=w-1,P<F&&(P=j)};switch(C.key){case"Home":P=F;break;case"End":P=j;break;case"ArrowRight":o==="horizontal"&&(_?q():Q());break;case"ArrowDown":o==="vertical"&&q();break;case"ArrowLeft":o==="horizontal"&&(_?Q():q());break;case"ArrowUp":o==="vertical"&&Q();break}const ae=P%E;(ge=S[ae].ref.current)==null||ge.focus()});return ee.jsx(vPt,{scope:n,disabled:a,direction:r,orientation:o,children:ee.jsx(l2.Slot,{scope:n,children:ee.jsx(cr.div,{...s,"data-orientation":o,ref:y,onKeyDown:a?void 0:x})})})}),cx="AccordionItem",[yPt,f2]=sx(cx),whe=L.forwardRef((e,t)=>{const{__scopeAccordion:n,value:a,...r}=e,o=ux(cx,n),s=fPt(cx,n),d=d2(n),y=N4(),g=a&&s.value.includes(a)||!1,b=o.disabled||e.disabled;return ee.jsx(yPt,{scope:n,open:g,disabled:b,triggerId:y,children:ee.jsx(iPt,{"data-orientation":o.orientation,"data-state":She(g),...d,...r,ref:t,disabled:b,open:g,onOpenChange:_=>{_?s.onItemOpen(a):s.onItemClose(a)}})})});whe.displayName=cx;var xhe="AccordionHeader",Ihe=L.forwardRef((e,t)=>{const{__scopeAccordion:n,...a}=e,r=ux(qi,n),o=f2(xhe,n);return ee.jsx(cr.h3,{"data-orientation":r.orientation,"data-state":She(o.open),"data-disabled":o.disabled?"":void 0,...a,ref:t})});Ihe.displayName=xhe;var p2="AccordionTrigger",Ehe=L.forwardRef((e,t)=>{const{__scopeAccordion:n,...a}=e,r=ux(qi,n),o=f2(p2,n),s=pPt(p2,n),d=d2(n);return ee.jsx(l2.ItemSlot,{scope:n,children:ee.jsx(sPt,{"aria-disabled":o.open&&!s.collapsible||void 0,"data-orientation":r.orientation,id:o.triggerId,...d,...a,ref:t})})});Ehe.displayName=p2;var Ahe="AccordionContent",Che=L.forwardRef((e,t)=>{const{__scopeAccordion:n,...a}=e,r=ux(qi,n),o=f2(Ahe,n),s=d2(n);return ee.jsx(uPt,{role:"region","aria-labelledby":o.triggerId,"data-orientation":r.orientation,...s,...a,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});Che.displayName=Ahe;function She(e){return e?"open":"closed"}var gPt=ghe,bPt=whe,$Pt=Ihe,Dhe=Ehe,The=Che;const khe=gPt,m2=he.forwardRef(({className:e,...t},n)=>ee.jsx(bPt,{ref:n,className:qt("border-b",e),...t}));m2.displayName="AccordionItem";const h2=he.forwardRef(({className:e,children:t,...n},a)=>ee.jsx($Pt,{className:"flex",children:ee.jsxs(Dhe,{ref:a,className:qt("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,ee.jsx(QL,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));h2.displayName=Dhe.displayName;const v2=he.forwardRef(({className:e,children:t,...n},a)=>ee.jsx(The,{ref:a,className:"text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:ee.jsx("div",{className:qt("pb-4 pt-0",e),children:t})}));v2.displayName=The.displayName;const y2=he.forwardRef(({className:e,...t},n)=>ee.jsx("div",{ref:n,className:qt("rounded-lg border bg-card text-card-foreground shadow-xs",e),...t}));y2.displayName="Card";const _Pt=he.forwardRef(({className:e,...t},n)=>ee.jsx("div",{ref:n,className:qt("flex flex-col space-y-1.5 p-6",e),...t}));_Pt.displayName="CardHeader";const wPt=he.forwardRef(({className:e,...t},n)=>ee.jsx("div",{ref:n,className:qt("text-2xl font-semibold leading-none tracking-tight",e),...t}));wPt.displayName="CardTitle";const xPt=he.forwardRef(({className:e,...t},n)=>ee.jsx("div",{ref:n,className:qt("text-sm text-muted-foreground",e),...t}));xPt.displayName="CardDescription";const g2=he.forwardRef(({className:e,...t},n)=>ee.jsx("div",{ref:n,className:qt("p-6 pt-0",e),...t}));g2.displayName="CardContent";const IPt=he.forwardRef(({className:e,...t},n)=>ee.jsx("div",{ref:n,className:qt("flex items-center p-6 pt-0",e),...t}));IPt.displayName="CardFooter";const{convertToValidClassName:EPt}=jc,APt=({classNames:e,data:t,label:n,path:a,schema:r,errors:o,addItem:s,removeItems:d,uischema:y,uischemas:g,getStyleAsClassName:b,renderers:_,rootSchema:x,translations:C,enabled:k})=>{var xe,Ae;const S=y,w=L.useMemo(()=>uA(g??[],r,y.scope,a,void 0,y,x),[g,r,a,y,x]),E=o.length===0,F=[b?b("array.control.validation"):""].concat(E?"":b?b("array.control.validation.error"):"").join(" "),j=b?b("array.control.add"):"",q=b?b("array.control.label"):"",Q=b?b("array.child.controls"):"",ae=b?b("array.child.controls.delete"):"",ge=[b?b("array.control"):"",EPt(S.scope)].join(" "),_e=()=>{s&&s(a,_h(r,x))()},me=ue=>{d&&d(a,[ue])()},G=((Ae=(xe=x.properties)==null?void 0:xe[a])==null?void 0:Ae.title)??n;return ee.jsxs("div",{className:ge,children:[ee.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[ee.jsx("span",{className:qt("text-lg font-bold",q),children:G}),ee.jsx("div",{className:qt("text-destructive",F),children:o})]}),ee.jsxs(khe,{type:"multiple",className:qt("space-y-4 pb-4",e==null?void 0:e.children),children:[(t==null?void 0:t.length)>0?Vx(0,t.length).map(ue=>{const De=b0(a,`${ue}`);return ee.jsxs(m2,{value:`item-${ue}`,className:"rounded-lg border",children:[ee.jsxs("div",{className:"flex flex-row gap-0 [&>h3]:flex-grow",children:[ee.jsx(h2,{className:"hover:bg-muted/50 flex items-center justify-between gap-2 rounded-xl px-4 py-2 transition-colors",children:ee.jsx("div",{className:qt("flex items-center space-x-2",Q),children:ee.jsxs("span",{className:q,children:[G," ",ue+1]})})}),ee.jsxs(Br,{type:"button",variant:"ghost",size:"icon",className:ae,onClick:()=>{me(ue)},disabled:!k,children:[ee.jsx(Rie,{className:"h-4 w-4"}),ee.jsx("span",{className:"sr-only",children:C.removeAriaLabel})]})]}),ee.jsx(v2,{className:"p-4",children:ee.jsx(kl,{schema:r,uischema:w||y,path:De,renderers:_},De)})]},ue)}):ee.jsx(y2,{className:"border-2 border-dashed",children:ee.jsx(g2,{className:"flex flex-col items-center justify-center p-8 text-center",children:ee.jsxs(Br,{type:"button",disabled:!k,onClick:_e,variant:"outline",children:[ee.jsx(j4,{className:"mr-2 h-4 w-4"}),C.addTooltip]})})}),(t==null?void 0:t.length)>0&&ee.jsxs(Br,{onClick:_e,type:"button",className:j,disabled:!k,variant:"outline",children:[ee.jsx(j4,{className:"mr-2 h-4 w-4"}),C.addTooltip]})]})]})},CPt=({schema:e,uischema:t,data:n,path:a,rootSchema:r,uischemas:o,addItem:s,getStyle:d,getStyleAsClassName:y,removeItems:g,moveUp:b,moveDown:_,id:x,visible:C,enabled:k,errors:S,translations:w})=>{const E=t,P=jc.createLabelDescriptionFrom(E,e),F=P.show?P.text:"",j=`control ${jc.convertToValidClassName(E.scope)}`,q=y?y("array.layout"):"",Q=y?y("array.button"):"",ae=y?y("array.children"):"",ge={wrapper:j,fieldSet:q,button:Q,children:ae};return C?ee.jsx(APt,{classNames:ge,data:n,label:F??"",path:a,schema:e,errors:S,arraySchema:e,addItem:s,removeItems:g,moveUp:b,moveDown:_,uischema:t,uischemas:o,getStyleAsClassName:y,rootSchema:r,id:x,visible:C,enabled:k,getStyle:d,translations:w}):null},SPt=tn(5,gp(oA,iA)),DPt=$o(N0(ws(O0(CPt)))),TPt=({renderers:e,cells:t,uischemas:n,schema:a,label:r,path:o,visible:s,enabled:d,uischema:y,rootSchema:g})=>{const b=L.useMemo(()=>{const _=uA(n,a,y.scope,o,()=>It(o)?pp.uiSchema(a,"VerticalLayout",void 0,g):{...pp.uiSchema(a,"Group",void 0,g),label:r},y,g);return{..._,elements:"elements"in _&&_.elements?_.elements.map(x=>({...x,options:{...y.options??{},...x.options??{}}})):[]}},[n,a,o,r,y,g]);return s?ee.jsx(kl,{visible:s,enabled:d,schema:a,uischema:b,path:o,renderers:e,cells:t}):null},kPt=tn(2,g7),LPt=yze(TPt),{convertToValidClassName:PPt}=jc,{isPrimitiveArrayControl:NPt,rankWith:OPt}=E7;class zPt extends L.Component{constructor(){super(...arguments);ove(this,"confirmDelete",(n,a)=>{const r=n.substring(0,n.lastIndexOf("."));this.props.removeItems&&this.props.removeItems(r,[a])()})}render(){const{addItem:n,uischema:a,schema:r,rootSchema:o,path:s,data:d,visible:y,errors:g,label:b,getStyleAsClassName:_,childErrors:x,translations:C,enabled:k}=this.props,S=a,w=(_==null?void 0:_("array.table.table"))||"",E=(_==null?void 0:_("array.table.label"))||"",P=(_==null?void 0:_("array.table.button"))||"",F=(_==null?void 0:_("array.table.validation"))||"",j=[(_==null?void 0:_("array.table"))||"",PPt(S.scope)].join(" "),q=ge=>({type:"Control",label:!1,scope:r.type==="object"?`#/properties/${ge}`:"#"}),Q=g.length===0,ae=[F].concat(Q?"":(_==null?void 0:_("array.table.validation.error"))||"").join(" ");return ee.jsxs("div",{className:j,hidden:!y,children:[d&&d.length?ee.jsxs("table",{className:w,children:[ee.jsx("thead",{children:ee.jsx("tr",{children:r.properties?F0(B0,z0(ge=>r.properties?r.properties[ge].type!=="array":!1),j0(ge=>ee.jsx("th",{children:r.properties&&(r.properties[ge].title??Y7(ge))},ge)))(r.properties):ee.jsx("th",{className:E,children:b})})}),ee.jsxs("tbody",{children:[!d||!Array.isArray(d)||d.length===0?ee.jsx("tr",{children:ee.jsx("td",{children:C.noDataMessage})}):d.map((ge,_e)=>{const me=fp.compose(s,`${_e}`),G=lh(x,De=>gh(De).startsWith(me)),xe=(_==null?void 0:_("array.validation"))||"",Ae=(_==null?void 0:_("array.validation.error"))||"",ue=G?[xe].concat(Ae).join(" "):xe;return ee.jsxs("tr",{children:[r.properties?F0(B0,z0(De=>r.properties?r.properties[De].type!=="array":!1),j0(De=>{const de=fp.compose(me,De.toString());return ee.jsx("td",{children:ee.jsx(Eh,{schema:Si.schema(r,`#/properties/${hh(De)}`,o),uischema:q(hh(De)),path:me+"."+De})},de)}))(r.properties):ee.jsxs("td",{children:[ee.jsx(Eh,{schema:r,uischema:q(),path:me}),G&&ee.jsx("span",{className:qt("text-destructive text-xs",ue),children:vA(G.map(De=>De.message),", ")})]},fp.compose(me,_e.toString())),ee.jsx("td",{children:ee.jsxs(Br,{type:"button",variant:"ghost",size:"icon",onClick:()=>{this.confirmDelete(me,_e)},disabled:!k,children:[ee.jsx(Rie,{className:"h-4 w-4"}),ee.jsx("span",{className:"sr-only",children:C.removeTooltip})]})})]},me)}),ee.jsx("tr",{children:ee.jsx("td",{children:ee.jsxs(Br,{type:"button",variant:"outline",className:P,disabled:!k,onClick:n(s,_h(r,o)),children:[ee.jsx(j4,{className:"mr-2 h-4 w-4"}),C.addTooltip]})})})]})]}):ee.jsx(y2,{className:"border-2 border-dashed",children:ee.jsx(g2,{className:"flex flex-col items-center justify-center p-8 text-center",children:ee.jsxs(Br,{type:"button",variant:"outline",disabled:!k,onClick:n(s,_h(r,o)),children:[ee.jsx(j4,{className:"mr-2 h-4 w-4"}),C.addTooltip]})})}),ee.jsx("div",{className:ae,children:Q?"":g})]})}}const jPt=$o(N0(ws(O0(zPt)))),FPt=OPt(4,NPt);var lx="Checkbox",[BPt,bNt]=Cu(lx),[MPt,b2]=BPt(lx);function RPt(e){const{__scopeCheckbox:t,checked:n,children:a,defaultChecked:r,disabled:o,form:s,name:d,onCheckedChange:y,required:g,value:b="on",internal_do_not_use_render:_}=e,[x,C]=ld({prop:n,defaultProp:r??!1,onChange:y,caller:lx}),[k,S]=he.useState(null),[w,E]=he.useState(null),P=he.useRef(!1),F=k?!!s||!!k.closest("form"):!0,j={checked:x,disabled:o,setChecked:C,control:k,setControl:S,name:d,form:s,value:b,hasConsumerStoppedPropagationRef:P,required:g,defaultChecked:hl(r)?!1:r,isFormControl:F,bubbleInput:w,setBubbleInput:E};return ee.jsx(MPt,{scope:t,...j,children:UPt(_)?_(j):a})}var Lhe="CheckboxTrigger",Phe=he.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...a},r)=>{const{control:o,value:s,disabled:d,checked:y,required:g,setControl:b,setChecked:_,hasConsumerStoppedPropagationRef:x,isFormControl:C,bubbleInput:k}=b2(Lhe,e),S=da(r,b),w=he.useRef(y);return he.useEffect(()=>{const E=o==null?void 0:o.form;if(E){const P=()=>_(w.current);return E.addEventListener("reset",P),()=>E.removeEventListener("reset",P)}},[o,_]),ee.jsx(cr.button,{type:"button",role:"checkbox","aria-checked":hl(y)?"mixed":y,"aria-required":g,"data-state":Fhe(y),"data-disabled":d?"":void 0,disabled:d,value:s,...a,ref:S,onKeyDown:Tr(t,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:Tr(n,E=>{_(P=>hl(P)?!0:!P),k&&C&&(x.current=E.isPropagationStopped(),x.current||E.stopPropagation())})})});Phe.displayName=Lhe;var $2=he.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:a,checked:r,defaultChecked:o,required:s,disabled:d,value:y,onCheckedChange:g,form:b,..._}=e;return ee.jsx(RPt,{__scopeCheckbox:n,checked:r,defaultChecked:o,disabled:d,required:s,onCheckedChange:g,name:a,form:b,value:y,internal_do_not_use_render:({isFormControl:x})=>ee.jsxs(ee.Fragment,{children:[ee.jsx(Phe,{..._,ref:t,__scopeCheckbox:n}),x&&ee.jsx(jhe,{__scopeCheckbox:n})]})})});$2.displayName=lx;var Nhe="CheckboxIndicator",Ohe=he.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:a,...r}=e,o=b2(Nhe,n);return ee.jsx(wm,{present:a||hl(o.checked)||o.checked===!0,children:ee.jsx(cr.span,{"data-state":Fhe(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});Ohe.displayName=Nhe;var zhe="CheckboxBubbleInput",jhe=he.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:a,hasConsumerStoppedPropagationRef:r,checked:o,defaultChecked:s,required:d,disabled:y,name:g,value:b,form:_,bubbleInput:x,setBubbleInput:C}=b2(zhe,e),k=da(n,C),S=Iie(o),w=KL(a);he.useEffect(()=>{const P=x;if(!P)return;const F=window.HTMLInputElement.prototype,q=Object.getOwnPropertyDescriptor(F,"checked").set,Q=!r.current;if(S!==o&&q){const ae=new Event("click",{bubbles:Q});P.indeterminate=hl(o),q.call(P,hl(o)?!1:o),P.dispatchEvent(ae)}},[x,S,o,r]);const E=he.useRef(hl(o)?!1:o);return ee.jsx(cr.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??E.current,required:d,disabled:y,name:g,value:b,form:_,...t,tabIndex:-1,ref:k,style:{...t.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});jhe.displayName=zhe;function UPt(e){return typeof e=="function"}function hl(e){return e==="indeterminate"}function Fhe(e){return hl(e)?"indeterminate":e?"checked":"unchecked"}const Bhe=he.forwardRef(({className:e,...t},n)=>ee.jsx($2,{ref:n,className:qt("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:ee.jsx(Ohe,{className:qt("flex items-center justify-center text-current"),children:ee.jsx(Ewt,{className:"h-4 w-4"})})}));Bhe.displayName=$2.displayName;const qPt=({className:e,children:t,visible:n})=>ee.jsx("div",{className:e,hidden:n==null?!1:!n,children:t}),VPt=(e,t,n,a,r)=>{const{renderers:o,cells:s}=$p();return It(e.elements)?[]:e.elements.map((d,y)=>ee.jsx("div",{className:n,children:ee.jsx(kl,{renderers:o,cells:s,uischema:d,schema:t,path:a,enabled:r})},`${a}-${y}`))},ZPt=tn(1,Pn("CollapsingVerticalLayout")),GPt=e=>{const{data:t,...n}=e;return ee.jsx(WPt,{...n})},WPt=L.memo(function({schema:t,uischema:n,path:a,visible:r,enabled:o,getStyle:s,getStyleAsClassName:d}){var ge,_e,me;const y=((ge=n.options)==null?void 0:ge.defaultOpen)??!1,g=((_e=n.options)==null?void 0:_e.editOnCheckboxClick)??!1,b=((me=n.options)==null?void 0:me.titles)??{},_=L.useMemo(()=>({...n,options:{...n.options??{},readonly:!1},elements:n.elements.map(G=>({...G,options:{...G.options??{},readonly:!1}}))}),[n]),[x,C]=L.useState(!1),[k,S]=L.useState(!1),[w,E]=L.useState(n),P=w,F=P.elements?P.elements.length:0,j=d&&d("vertical.layout"),q=["vertical-layout-item"].concat(s?s("vertical.layout.item",F):[]).join(" "),Q=async()=>{var xe,Ae,ue,De;S(!0),E(n),await((De=(xe=n.options)==null?void 0:xe.handleSave)==null?void 0:De.call(xe,((ue=(Ae=n.options)==null?void 0:Ae.getSubmittedData)==null?void 0:ue.call(Ae))??{}))?C(!1):E(_),S(!1)},ae=G=>{var xe,Ae;G?E(_):(E(n),(Ae=(xe=n.options)==null?void 0:xe.handleReset)==null||Ae.call(xe)),C(G)};return ee.jsx("fieldset",{className:"group-layout pb-4",children:ee.jsx(khe,{type:"single",collapsible:!0,defaultValue:y?"item-1":void 0,children:ee.jsxs(m2,{value:"item-1",className:"[&>div]:data-[state=open]:overflow-visible",children:[ee.jsx(h2,{className:"text-muted-foreground text-sm font-normal",children:w.label}),ee.jsx(v2,{className:"py-2",children:ee.jsxs("div",{className:"flex flex-row items-start justify-between gap-2",children:[ee.jsx(qPt,{className:j,uischema:w,schema:t,visible:r,enabled:o,path:a,getStyle:s,getStyleAsClassName:d,children:VPt(P,t,q,a,o)}),g?ee.jsx("div",{className:"flex items-center gap-2",children:x?ee.jsxs(ee.Fragment,{children:[ee.jsx(Br,{variant:"outline",onClick:()=>ae(!1),disabled:k,size:"small",children:b.cancel??"Cancel"}),ee.jsxs(Br,{onClick:G=>{G.preventDefault(),G.stopPropagation(),Q()},disabled:k,className:"flex items-center justify-between gap-2",size:"small",children:[k&&ee.jsx(Twt,{className:"size-4 animate-spin"}),b.save??"Save"]})]}):ee.jsxs(ee.Fragment,{children:[ee.jsx(Bhe,{id:"edit-mode",checked:x,onCheckedChange:G=>ae(G),disabled:k}),ee.jsx(_m,{htmlFor:"edit-mode",children:b.editStaticData??"Edit static data"})]})}):null]})})]})})})}),HPt=$o(Ih(GPt,!1)),_i=[...pFe,{tester:kPt,renderer:LPt},{tester:ZPt,renderer:HPt},{tester:SPt,renderer:DPt},{tester:FPt,renderer:jPt},{tester:ULt,renderer:qLt}],wi=[...mFe,{tester:CLt,cell:SLt},{tester:Lwt,cell:Pwt},{tester:VTt,cell:ZTt},{tester:NAt,cell:OAt},{tester:$Lt,cell:_Lt},{tester:ILt,cell:ELt},{tester:ZLt,cell:GLt},{tester:DLt,cell:TLt},{tester:kLt,cell:LLt},{tester:tPt,cell:nPt},{tester:YLt,cell:QLt},{tester:HLt,cell:JLt}],dx=({getEvaluatedConstraints:e,enabled:t=!0,dependencyMap:n})=>{const a=L.useMemo(()=>t&&!It(n)&&!!e,[t,n,e]),[r,o]=L.useState(void 0),[s,d]=L.useTransition(),[y,g]=L.useState(a);L.useEffect(()=>{g(a)},[a,g]);const b=L.useRef(!1),_=L.useCallback(()=>{a&&g(!0)},[a,g]);return L.useEffect(()=>{!e||b.current||!y||(b.current=!0,d(async()=>{const x=await e();o(x),b.current=!1,g(!1)}))},[e,y]),{isFetching:s,evaluatedConstraints:r,refetchConstraints:_,constraintsActive:a}};var fx={exports:{}};/**
236
236
  * @license
237
237
  * Lodash <https://lodash.com/>
238
238
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>