@pramen/admin 0.0.47 → 0.0.49
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.html +1 -1
- package/dist/{main.3q5j5mrq.js → main.n708tert.js} +1 -1
- package/package.json +1 -1
- package/src/api.ts +12 -9
package/dist/index.html
CHANGED
|
@@ -248,4 +248,4 @@ React keys must be passed directly to JSX without using spread:
|
|
|
248
248
|
* {
|
|
249
249
|
overscroll-behavior: contain;
|
|
250
250
|
}
|
|
251
|
-
}`.trim(),document.head.prepend(u);let b=(v)=>{if(v.touches.length===2||i)return;if(!r||r===document.documentElement||r===document.body){v.preventDefault();return}if(r.scrollHeight===r.clientHeight&&r.scrollWidth===r.clientWidth)v.preventDefault()},m=(v)=>{let h=ce(v),T=v.relatedTarget;if(T&&vs(T))T.focus({preventScroll:!0}),tE(T,vs(h));else if(!T)h.parentElement?.closest("[tabindex]")?.focus({preventScroll:!0})},g=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(v){let h=tt(),T=h!=null&&vs(h);if(g.call(this,{...v,preventScroll:!0}),!v||!v.preventScroll)tE(this,T)};let x=Lo(I1(document,"touchstart",c,{passive:!1,capture:!0}),I1(document,"touchmove",b,{passive:!1,capture:!0}),I1(document,"blur",m,!0));return()=>{o(),x(),u.remove(),HTMLElement.prototype.focus=g}}function T0(o,r,i){let c=o.style[r];return o.style[r]=i,()=>{o.style[r]=c}}function I1(o,r,i,c){return o.addEventListener(r,i,c),()=>{o.removeEventListener(r,i,c)}}function tE(o,r){if(r||!_f)aE(o);else _f.addEventListener("resize",()=>aE(o),{once:!0})}function aE(o){let r=document.scrollingElement||document.documentElement,i=o;while(i&&i!==r){let c=yf(i);if(c!==document.documentElement&&c!==document.body&&c!==i){let u=c.getBoundingClientRect(),f=i.getBoundingClientRect();if(f.top<u.top||f.bottom>u.top+i.clientHeight){let b=u.bottom;if(_f)b=Math.min(b,_f.offsetTop+_f.height);let m=f.top-u.top-((b-u.top)/2-f.height/2);c.scrollTo({top:Math.max(0,Math.min(c.scrollHeight-c.clientHeight,c.scrollTop+m)),behavior:"smooth"})}}i=c.parentElement}}var oE=F(J(),1);function H1(o,r){let{triggerRef:i,popoverRef:c,groupRef:u,isNonModal:f,isKeyboardDismissDisabled:b,shouldCloseOnInteractOutside:m,...g}=o,x=g.trigger==="SubmenuTrigger",{overlayProps:v,underlayProps:h}=C0({isOpen:r.isOpen,onClose:r.close,shouldCloseOnBlur:!0,isDismissable:!f||x,isKeyboardDismissDisabled:b,shouldCloseOnInteractOutside:m},u??c),{overlayProps:T,arrowProps:R,placement:w,triggerAnchorPoint:L}=WC({...g,targetRef:i,overlayRef:c,isOpen:r.isOpen,onClose:f&&!x?r.close:null});return R0({isDisabled:f||!r.isOpen}),oE.useEffect(()=>{if(r.isOpen&&c.current)if(f)return HC(u?.current??c.current);else return $0([u?.current??c.current],{shouldUseInert:!0})},[f,r.isOpen,c,u]),{popoverProps:be(v,T),arrowProps:R,underlayProps:h,placement:w,triggerAnchorPoint:L}}var F1={};F1={dismiss:"تجاهل"};var U1={};U1={dismiss:"Отхвърляне"};var V1={};V1={dismiss:"Odstranit"};var K1={};K1={dismiss:"Luk"};var j1={};j1={dismiss:"Schließen"};var G1={};G1={dismiss:"Απόρριψη"};var q1={};q1={dismiss:"Dismiss"};var Y1={};Y1={dismiss:"Descartar"};var X1={};X1={dismiss:"Lõpeta"};var Q1={};Q1={dismiss:"Hylkää"};var Z1={};Z1={dismiss:"Rejeter"};var W1={};W1={dismiss:"התעלם"};var J1={};J1={dismiss:"Odbaci"};var ev={};ev={dismiss:"Elutasítás"};var tv={};tv={dismiss:"Ignora"};var av={};av={dismiss:"閉じる"};var ov={};ov={dismiss:"무시"};var nv={};nv={dismiss:"Atmesti"};var rv={};rv={dismiss:"Nerādīt"};var lv={};lv={dismiss:"Lukk"};var iv={};iv={dismiss:"Negeren"};var sv={};sv={dismiss:"Zignoruj"};var cv={};cv={dismiss:"Descartar"};var uv={};uv={dismiss:"Dispensar"};var dv={};dv={dismiss:"Revocare"};var fv={};fv={dismiss:"Пропустить"};var pv={};pv={dismiss:"Zrušiť"};var mv={};mv={dismiss:"Opusti"};var bv={};bv={dismiss:"Odbaci"};var gv={};gv={dismiss:"Avvisa"};var hv={};hv={dismiss:"Kapat"};var $v={};$v={dismiss:"Скасувати"};var yv={};yv={dismiss:"取消"};var vv={};vv={dismiss:"關閉"};var xv={};xv={"ar-AE":F1,"bg-BG":U1,"cs-CZ":V1,"da-DK":K1,"de-DE":j1,"el-GR":G1,"en-US":q1,"es-ES":Y1,"et-EE":X1,"fi-FI":Q1,"fr-FR":Z1,"he-IL":W1,"hr-HR":J1,"hu-HU":ev,"it-IT":tv,"ja-JP":av,"ko-KR":ov,"lt-LT":nv,"lv-LV":rv,"nb-NO":lv,"nl-NL":iv,"pl-PL":sv,"pt-BR":cv,"pt-PT":uv,"ro-RO":dv,"ru-RU":fv,"sk-SK":pv,"sl-SI":mv,"sr-SP":bv,"sv-SE":gv,"tr-TR":hv,"uk-UA":$v,"zh-CN":yv,"zh-TW":vv};var Sv=F(J(),1);function eO(o){return o&&o.__esModule?o.default:o}function hu(o){let{onDismiss:r,...i}=o,c=Ss(eO(xv),"@react-aria/overlays"),u=ni(i,c.format("dismiss")),f=()=>{if(r)r()};return Sv.default.createElement(G9,null,Sv.default.createElement("button",{...u,tabIndex:-1,onClick:f,style:{width:1,height:1}}))}var ks=F(J(),1);function nE({children:o}){let r=ks.useMemo(()=>({register:()=>{}}),[]);return ks.default.createElement(gf.Provider,{value:r},o)}var zf=F(J(),1),tO=zf.createContext({});function rE(){return zf.useContext(tO)??{}}var Pn=F(J(),1),lE=F(sr(),1),iE=Pn.default.createContext(null);function $u(o){let r=Xa(),{portalContainer:i=r?null:document.body,isExiting:c}=o,[u,f]=Pn.useState(!1),b=Pn.useMemo(()=>({contain:u,setContain:f}),[u,f]),{getContainer:m}=rE();if(!o.portalContainer&&m)i=m();if(!i)return null;let g=o.children;if(!o.disableFocusManagement)g=Pn.default.createElement(Df,{restoreFocus:!0,contain:(o.shouldContainFocus||u)&&!c},g);return g=Pn.default.createElement(iE.Provider,{value:b},Pn.default.createElement(nE,null,g)),lE.default.createPortal(g,i)}function w0(){let r=Pn.useContext(iE)?.setContain;Le(()=>{r?.(!0)},[r])}var D0=F(J(),1);function _s(o){let[r,i]=Tn(o.isOpen,o.defaultOpen||!1,o.onOpenChange),c=D0.useCallback(()=>{i(!0)},[i]),u=D0.useCallback(()=>{i(!1)},[i]),f=D0.useCallback(()=>{i(!r)},[i,r]);return{isOpen:r,setOpen:i,open:c,close:u,toggle:f}}var gt=F(J(),1);var sE=F(sr(),1),yu=F(J(),1);function hi(o,r=!0){let[i,c]=yu.useState(!0),u=i&&r;return Le(()=>{if(u&&o.current&&"getAnimations"in o.current){for(let f of o.current.getAnimations())if(f instanceof CSSTransition)f.cancel()}},[o,u]),cE(o,u,yu.useCallback(()=>c(!1),[])),u}function $i(o,r){let[i,c]=yu.useState(r?"open":"closed");switch(i){case"open":if(!r)c("exiting");break;case"closed":case"exiting":if(r)c("open");break}let u=i==="exiting";return cE(o,u,yu.useCallback(()=>{c((f)=>f==="exiting"?"closed":f)},[])),u}function cE(o,r,i){Le(()=>{if(r&&o.current){if(!("getAnimations"in o.current)){i();return}let c=o.current.getAnimations();if(c.length===0){i();return}let u=!1;return Promise.allSettled(c.map((f)=>f.finished)).then(()=>{if(!u)sE.flushSync(()=>{i()})}),()=>{u=!0}}},[o,r,i])}var A0=gt.createContext(null),uE=gt.createContext(null),yi=gt.forwardRef(function(r,i){[r,i]=bt(r,i,A0);let c=gt.useContext(vr),u=_s(r),f=r.isOpen!=null||r.defaultOpen!=null||!c?u:c,b=$i(i,f.isOpen)||r.isExiting||!1,m=Ky(),{direction:g}=Pa();if(m){let x=r.children;if(typeof x==="function")x=x({trigger:r.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null});return gt.default.createElement(gt.default.Fragment,null,x)}if(f&&!f.isOpen&&!b)return null;return gt.default.createElement(aO,{...r,triggerRef:r.triggerRef,state:f,popoverRef:i,isExiting:b,dir:g})});function aO({state:o,isExiting:r,UNSTABLE_portalContainer:i,clearContexts:c,...u}){let f=gt.useRef(null),b=gt.useRef(null),m=gt.useContext(uE),g=m&&u.trigger==="SubmenuTrigger",{popoverProps:x,underlayProps:v,arrowProps:h,placement:T,triggerAnchorPoint:R}=H1({...u,offset:u.offset??8,arrowRef:f,groupRef:g?m:b},o),w=u.popoverRef,L=hi(w,!!T)||u.isEntering||!1,M=dt({...u,defaultClassName:"react-aria-Popover",values:{trigger:u.trigger||null,placement:T,isEntering:L,isExiting:r}}),H=!u.isNonModal||u.trigger==="SubmenuTrigger",[I,X]=gt.useState(!1);Le(()=>{if(w.current)X(H&&!w.current.querySelector("[role=dialog]"))},[w,H]),gt.useEffect(()=>{if(I&&(u.trigger!=="SubmenuTrigger"||mr()!=="pointer")&&w.current&&!pr(w.current))Za(w.current)},[I,w,u.trigger]);let Z=gt.useMemo(()=>{let j=M.children;if(c)for(let ye of c)j=gt.default.createElement(ye.Provider,{value:null},j);return j},[M.children,c]),[ge,he]=gt.useState(null),ae=gt.useCallback(()=>{if(u.triggerRef.current)he(u.triggerRef.current.getBoundingClientRect().width+"px")},[u.triggerRef]);Le(ae,[ae]),gu({ref:M.style?.["--trigger-width"]?void 0:u.triggerRef,onResize:ae});let U={...x.style,"--trigger-anchor-point":R?`${R.x}px ${R.y}px`:void 0,...M.style,"--trigger-width":M.style?.["--trigger-width"]||ge},te=gt.default.createElement(qe.div,{...be(_e(u,{global:!0}),x),...M,role:I?"dialog":void 0,tabIndex:I?-1:void 0,"aria-label":u["aria-label"],"aria-labelledby":u["aria-labelledby"],ref:w,slot:u.slot||void 0,style:U,dir:u.dir,"data-trigger":u.trigger,"data-placement":T,"data-entering":L||void 0,"data-exiting":r||void 0},!u.isNonModal&>.default.createElement(hu,{onDismiss:o.close}),gt.default.createElement(BC.Provider,{value:{...h,placement:T,ref:f}},Z),gt.default.createElement(hu,{onDismiss:o.close}));if(!g)return gt.default.createElement($u,{...u,shouldContainFocus:I,isExiting:r,portalContainer:i},!u.isNonModal&&o.isOpen&>.default.createElement("div",{"data-testid":"underlay",...v,style:{position:"fixed",inset:0}}),gt.default.createElement("div",{ref:b,style:{display:"contents"}},gt.default.createElement(uE.Provider,{value:b},te)));return gt.default.createElement($u,{...u,shouldContainFocus:I,isExiting:r,portalContainer:i??m?.current??void 0},te)}var P0=F(J(),1),dE=P0.createContext({});var Cv={};Cv={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var Ev={};Ev={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var Tv={};Tv={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var Rv={};Rv={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var wv={};wv={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var Dv={};Dv={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var Av={};Av={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var Pv={};Pv={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var Mv={};Mv={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var Ov={};Ov={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var Nv={};Nv={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var Lv={};Lv={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var kv={};kv={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var _v={};_v={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var zv={};zv={longPressMessage:"Premi a lungo o premi Alt + Freccia giù per aprire il menu"};var Bv={};Bv={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var Iv={};Iv={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var Hv={};Hv={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var Fv={};Fv={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var Uv={};Uv={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var Vv={};Vv={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var Kv={};Kv={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var jv={};jv={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var Gv={};Gv={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var qv={};qv={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var Yv={};Yv={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var Xv={};Xv={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var Qv={};Qv={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var Zv={};Zv={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var Wv={};Wv={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var Jv={};Jv={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var e2={};e2={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var t2={};t2={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var a2={};a2={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var o2={};o2={"ar-AE":Cv,"bg-BG":Ev,"cs-CZ":Tv,"da-DK":Rv,"de-DE":wv,"el-GR":Dv,"en-US":Av,"es-ES":Pv,"et-EE":Mv,"fi-FI":Ov,"fr-FR":Nv,"he-IL":Lv,"hr-HR":kv,"hu-HU":_v,"it-IT":zv,"ja-JP":Bv,"ko-KR":Iv,"lt-LT":Hv,"lv-LV":Fv,"nb-NO":Uv,"nl-NL":Vv,"pl-PL":Kv,"pt-BR":jv,"pt-PT":Gv,"ro-RO":qv,"ru-RU":Yv,"sk-SK":Xv,"sl-SI":Qv,"sr-SP":Zv,"sv-SE":Wv,"tr-TR":Jv,"uk-UA":e2,"zh-CN":t2,"zh-TW":a2};var fE=F(J(),1);function pE(o,r,i){let{type:c}=o,{isOpen:u}=r;fE.useEffect(()=>{if(i&&i.current)z1.set(i.current,r.close)});let f=void 0;if(c==="menu")f=!0;else if(c==="listbox")f="listbox";let b=vt();return{triggerProps:{"aria-haspopup":f,"aria-expanded":u,"aria-controls":u?b:void 0,onPress:r.toggle},overlayProps:{id:b}}}function oO(o){return o&&o.__esModule?o.default:o}function n2(o,r,i){let{type:c="menu",isDisabled:u,trigger:f="press"}=o,b=vt(),{triggerProps:m,overlayProps:g}=pE({type:c},r,i),x=(R)=>{if(u)return;if(f==="longPress"&&!R.altKey)return;if(i&&i.current)switch(R.key){case"Enter":case" ":if(f==="longPress"||R.isDefaultPrevented())return;case"ArrowDown":if(!("continuePropagation"in R))R.stopPropagation();R.preventDefault(),r.toggle("first");break;case"ArrowUp":if(!("continuePropagation"in R))R.stopPropagation();R.preventDefault(),r.toggle("last");break;default:if("continuePropagation"in R)R.continuePropagation()}},v=Ss(oO(o2),"@react-aria/menu"),{longPressProps:h}=f0({isDisabled:u||f!=="longPress",accessibilityDescription:v.format("longPressMessage"),onLongPressStart(){r.close()},onLongPress(){r.open("first")}}),T={preventFocusOnPress:!0,onPressStart(R){if(R.pointerType!=="touch"&&R.pointerType!=="keyboard"&&!u)Sa(R.target),r.open(R.pointerType==="virtual"?"first":null)},onPress(R){if(R.pointerType==="touch"&&!u)Sa(R.target),r.toggle()}};return delete m.onPress,{menuTriggerProps:{...m,...f==="press"?T:h,id:b,onKeyDown:x},menuProps:{...g,"aria-labelledby":b,autoFocus:r.focusStrategy||!0,onClose:r.close}}}var mE=new WeakMap;var r2=F(J(),1);function l2(o,r,i){let{id:c,key:u,closeOnSelect:f,shouldCloseOnSelect:b,isVirtualized:m,"aria-haspopup":g,onPressStart:x,onPressUp:v,onPress:h,onPressChange:T,onPressEnd:R,onClick:w,onHoverStart:L,onHoverChange:M,onHoverEnd:H,onKeyDown:I,onKeyUp:X,onFocus:Z,onFocusChange:ge,onBlur:he,selectionManager:ae=r.selectionManager}=o,U=!!g,te=U&&o["aria-expanded"]==="true",j=o.isDisabled??ae.isDisabled(u),ye=o.isSelected??ae.isSelected(u),de=mE.get(r),re=r.collection.getItem(u),O=o.onClose||de.onClose,z=hs(),K=()=>{if(U)return;if(re?.props?.onAction)re.props.onAction();else if(o.onAction)o.onAction(u);if(de.onAction){let Te=de.onAction;Te(u)}},V="menuitem";if(!U){if(ae.selectionMode==="single")V="menuitemradio";else if(ae.selectionMode==="multiple")V="menuitemcheckbox"}let le=on(),Q=on(),C=on(),W={id:c,"aria-disabled":j||void 0,role:V,"aria-label":o["aria-label"],"aria-labelledby":le,"aria-describedby":[o["aria-describedby"],Q,C].filter(Boolean).join(" ")||void 0,"aria-controls":o["aria-controls"],"aria-haspopup":g,"aria-expanded":o["aria-expanded"]};if(ae.selectionMode!=="none"&&!U)W["aria-checked"]=ye;if(m){let Te=Number(re?.index);W["aria-posinset"]=Number.isNaN(Te)?void 0:Te+1,W["aria-setsize"]=Pf(r.collection)}let ve=r2.useRef(!1),Ce=(Te)=>{T?.(Te),ve.current=Te},Ne=r2.useRef(null),He=(Te)=>{if(Te.pointerType!=="keyboard")Ne.current={pointerType:Te.pointerType};if(Te.pointerType==="mouse"){if(!ve.current)Te.target.click()}v?.(Te)},xe=(Te)=>{w?.(Te),K(),u9(Te,z,re.props.href,re?.props.routerOptions);let Fo=Ne.current?.pointerType==="keyboard"?Ne.current?.key==="Enter"||ae.selectionMode==="none"||ae.isLink(u):ae.selectionMode!=="multiple"||ae.isLink(u);if(Fo=b??f??Fo,O&&!U&&Fo)O();Ne.current=null},{itemProps:Xe,isFocused:ht}=pu({id:c,selectionManager:ae,key:u,ref:i,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:de.shouldUseVirtualFocus}),{pressProps:ft,isPressed:un}=ui({onPressStart:x,onPress:h,onPressUp:He,onPressChange:Ce,onPressEnd:R,isDisabled:j}),{hoverProps:me}=Oa({isDisabled:j,onHoverStart(Te){if(!En()&&!(te&&g))ae.setFocused(!0),ae.setFocusedKey(u);L?.(Te)},onHoverChange:M,onHoverEnd:H}),{keyboardProps:se}=Ts({onKeyDown:(Te)=>{if(Te.repeat){Te.continuePropagation();return}switch(Te.key){case" ":Ne.current={pointerType:"keyboard",key:" "},ce(Te).click(),ai("keyboard");break;case"Enter":if(Ne.current={pointerType:"keyboard",key:"Enter"},ce(Te).tagName!=="A")ce(Te).click();ai("keyboard");break;default:if(!U)Te.continuePropagation();I?.(Te);break}},onKeyUp:X}),{focusableProps:Ge}=ii({onBlur:he,onFocus:Z,onFocusChange:ge},i),pa=_e(re?.props);delete pa.id;let It=Wc(re?.props);return{menuItemProps:{...W,...be(pa,It,U?{onFocus:Xe.onFocus,"data-collection":Xe["data-collection"],"data-key":Xe["data-key"]}:Xe,ft,me,se,Ge,de.shouldUseVirtualFocus||U?{onMouseDown:(Te)=>Te.preventDefault()}:void 0,j?void 0:{onClick:xe}),tabIndex:Xe.tabIndex!=null&&te&&!de.shouldUseVirtualFocus?-1:Xe.tabIndex},labelProps:{id:le},descriptionProps:{id:Q},keyboardShortcutProps:{id:C},isFocused:ht,isFocusVisible:ht&&ae.isFocused&&En()&&!te,isSelected:ye,isPressed:un,isDisabled:j}}var fo=F(J(),1);var gE=fo.createContext(null);var nO=fo.createContext(null);class rO extends Bo{static{this.type="submenutrigger"}filter(o,r,i){let c=o.getItem(this.firstChildKey);if(c&&i(c.textValue,this)){let u=this.clone();return r.addDescendants(u,o),u}return null}}var bE=fo.createContext(null),zs=hr(su,function(r,i,c){[r,i]=bt(r,i,bE);let u=fr(bE)?.id,f=fo.useContext(gE),b=Qa(i),m=fo.useContext(nO),{isVirtualized:g}=fo.useContext(ol),{menuItemProps:x,labelProps:v,descriptionProps:h,keyboardShortcutProps:T,...R}=l2({...r,id:u,key:c.key,selectionManager:m,isVirtualized:g},f,b),{hoverProps:w,isHovered:L}=Oa({isDisabled:R.isDisabled}),M=dt({...r,id:void 0,children:c.rendered,defaultClassName:"react-aria-MenuItem",values:{...R,isHovered:L,isFocusVisible:R.isFocusVisible,selectionMode:m.selectionMode,selectionBehavior:m.selectionBehavior,hasSubmenu:!!r["aria-haspopup"],isOpen:r["aria-expanded"]==="true"}}),H=r.href?qe.a:qe.div,I=_e(r,{global:!0});return delete I.id,delete I.onClick,fo.default.createElement(H,{...be(I,M,x,w),ref:b,"data-disabled":R.isDisabled||void 0,"data-hovered":L||void 0,"data-focused":R.isFocused||void 0,"data-focus-visible":R.isFocusVisible||void 0,"data-pressed":R.isPressed||void 0,"data-selected":R.isSelected||void 0,"data-selection-mode":m.selectionMode==="none"?void 0:m.selectionMode,"data-has-submenu":!!r["aria-haspopup"]||void 0,"data-open":r["aria-expanded"]==="true"||void 0},fo.default.createElement(xa,{values:[[rn,{slots:{[dr]:v,label:v,description:h}}],[dE,T],[du,{isSelected:R.isSelected}]]},M.children))});var vu=F(J(),1);function i2(o,r){let{role:i="dialog"}=o,c=on();c=o["aria-label"]?void 0:c;let u=vu.useRef(!1);vu.useEffect(()=>{if(r.current&&!pr(r.current)){Za(r.current);let b=setTimeout(()=>{if(tt()===r.current||tt()===document.body){if(u.current=!0,r.current)r.current.blur(),Za(r.current);u.current=!1}},500);return()=>{clearTimeout(b)}}},[r]),w0();let f=vu.useRef(!1);return vu.useEffect(()=>{if(!f.current&&r.current){let b=r.current,m=b.hasAttribute("aria-label"),g=b.hasAttribute("aria-labelledby");if(!m&&!g)console.warn("A dialog must have a title for accessibility. Either provide an aria-label or aria-labelledby prop, or render a heading element inside the dialog."),f.current=!0}}),{dialogProps:{..._e(o,{labelable:!0}),role:i,tabIndex:-1,"aria-labelledby":o["aria-labelledby"]||c,onBlur:(b)=>{if(u.current)b.stopPropagation()}},titleProps:{id:c}}}var Mn=F(J(),1);var hE=Mn.createContext(null),vr=Mn.createContext(null);var Bf=Mn.forwardRef(function(r,i){let c=r["aria-labelledby"];[r,i]=bt(r,i,hE);let{dialogProps:u,titleProps:f}=i2({...r,"aria-labelledby":c},i),b=Mn.useContext(vr);if(!u["aria-label"]&&!u["aria-labelledby"])if(r["aria-labelledby"])u["aria-labelledby"]=r["aria-labelledby"];else console.warn('If a Dialog does not contain a <Heading slot="title">, it must have an aria-label or aria-labelledby attribute for accessibility.');let m=dt({defaultClassName:"react-aria-Dialog",className:r.className,style:r.style,children:r.children,values:{close:b?.close||(()=>{})}}),g=_e(r,{global:!0});return Mn.default.createElement(qe.section,{...be(g,m,u),render:r.render,ref:i,slot:r.slot||void 0},Mn.default.createElement(xa,{values:[[Fb,{slots:{[dr]:{},title:{...f,level:2}}}],[br,{slots:{[dr]:{},close:{onPress:()=>b?.close()}}}]]},m.children))});var M0=F(J(),1);function s2(o,r){let{inputElementType:i="input",isDisabled:c=!1,isRequired:u=!1,isReadOnly:f=!1,type:b="text",validationBehavior:m="aria"}=o,[g,x]=Tn(o.value,o.defaultValue||"",o.onChange),{focusableProps:v}=ii(o,r),h=xf({...o,value:g}),{isInvalid:T,validationErrors:R,validationDetails:w}=h.displayValidation,{labelProps:L,fieldProps:M,descriptionProps:H,errorMessageProps:I}=jb({...o,isInvalid:T,errorMessage:o.errorMessage||R}),X=_e(o,{labelable:!0}),Z={type:b,pattern:o.pattern},[ge]=M0.useState(g);return Gb(r,o.defaultValue??ge,x),Yb(o,h,r),{labelProps:L,inputProps:be(X,i==="input"?Z:void 0,{disabled:c,readOnly:f,required:u&&m==="native","aria-required":u&&m==="aria"||void 0,"aria-invalid":T||void 0,"aria-errormessage":o["aria-errormessage"],"aria-activedescendant":o["aria-activedescendant"],"aria-autocomplete":o["aria-autocomplete"],"aria-haspopup":o["aria-haspopup"],"aria-controls":o["aria-controls"],value:g,onChange:(he)=>x(ce(he).value),autoComplete:o.autoComplete,autoCapitalize:o.autoCapitalize,maxLength:o.maxLength,minLength:o.minLength,name:o.name,form:o.form,placeholder:o.placeholder,inputMode:o.inputMode,autoCorrect:o.autoCorrect,spellCheck:o.spellCheck,[parseInt(M0.default.version,10)>=17?"enterKeyHint":"enterkeyhint"]:o.enterKeyHint,onCopy:o.onCopy,onCut:o.onCut,onPaste:o.onPaste,onCompositionEnd:o.onCompositionEnd,onCompositionStart:o.onCompositionStart,onCompositionUpdate:o.onCompositionUpdate,onSelect:o.onSelect,onBeforeInput:o.onBeforeInput,onInput:o.onInput,...v,...M}),descriptionProps:H,errorMessageProps:I,isInvalid:T,validationErrors:R,validationDetails:w}}var $E=F(J(),1);function c2(o={}){let{locale:r}=Pa();return $E.useMemo(()=>new Intl.ListFormat(r,o),[r,o])}var yE=F(sr(),1),Bs=F(J(),1);function u2(o,r,i){let{isDisabled:c}=o,u=vt(),f=vt(),b=Xa(),m=Bs.useRef(null),g=Bs.useCallback(()=>{m.current=requestAnimationFrame(()=>{if(i.current)i.current.setAttribute("hidden","until-found")}),yE.flushSync(()=>{r.toggle()})},[i,r]);xs(i,"beforematch",g);let x=Bs.useRef(null);return Le(()=>{if(m.current)cancelAnimationFrame(m.current);if(i.current&&!b){let v=i.current;if(x.current==null||typeof v.getAnimations!=="function")if(r.isExpanded)v.removeAttribute("hidden"),v.style.setProperty("--disclosure-panel-width","auto"),v.style.setProperty("--disclosure-panel-height","auto");else v.setAttribute("hidden","until-found"),v.style.setProperty("--disclosure-panel-width","0px"),v.style.setProperty("--disclosure-panel-height","0px");else if(r.isExpanded!==x.current)if(r.isExpanded)v.removeAttribute("hidden"),v.style.setProperty("--disclosure-panel-width",v.scrollWidth+"px"),v.style.setProperty("--disclosure-panel-height",v.scrollHeight+"px"),Promise.all(v.getAnimations().map((h)=>h.finished)).then(()=>{v.style.setProperty("--disclosure-panel-width","auto"),v.style.setProperty("--disclosure-panel-height","auto")}).catch(()=>{});else v.style.setProperty("--disclosure-panel-width",v.scrollWidth+"px"),v.style.setProperty("--disclosure-panel-height",v.scrollHeight+"px"),window.getComputedStyle(v).height,v.style.setProperty("--disclosure-panel-width","0px"),v.style.setProperty("--disclosure-panel-height","0px"),Promise.all(v.getAnimations().map((h)=>h.finished)).then(()=>v.setAttribute("hidden","until-found")).catch(()=>{});x.current=r.isExpanded}},[c,i,r.isExpanded,b]),Bs.useEffect(()=>()=>{if(m.current)cancelAnimationFrame(m.current)},[]),{buttonProps:{id:u,"aria-expanded":r.isExpanded,"aria-controls":f,onPress:(v)=>{if(!c&&v.pointerType!=="keyboard")r.toggle()},isDisabled:c,onPressStart(v){if(v.pointerType==="keyboard"&&!c)r.toggle()}},panelProps:{id:f,role:"group","aria-labelledby":u,"aria-hidden":!r.isExpanded,hidden:b?!r.isExpanded:void 0}}}var O0=F(J(),1);function d2(o){let[r,i]=Tn(o.isExpanded,o.defaultExpanded||!1,o.onExpandedChange),c=O0.useCallback(()=>{i(!0)},[i]),u=O0.useCallback(()=>{i(!1)},[i]),f=O0.useCallback(()=>{i(!r)},[i,r]);return{isExpanded:r,setExpanded:i,expand:c,collapse:u,toggle:f}}var Na=F(J(),1);var vE=Na.createContext(null);var xE=Na.createContext(null),SE=Na.createContext(null),CE=Na.createContext(null),f2=Na.forwardRef(function(r,i){[r,i]=bt(r,i,xE);let c=Na.useContext(vE),{id:u,...f}=r,b=vt();u||=b;let m=c?c.expandedKeys.has(u):r.isExpanded,g=d2({...r,isExpanded:m,onExpandedChange(H){if(c)c.toggleKey(u);r.onExpandedChange?.(H)}}),x=Na.default.useRef(null),v=r.isDisabled||c?.isDisabled||!1,{buttonProps:h,panelProps:T}=u2({...r,isExpanded:m,isDisabled:v},g,x),{isFocusVisible:R,focusProps:w}=Ma({within:!0}),L=dt({...r,id:void 0,defaultClassName:"react-aria-Disclosure",values:{isExpanded:g.isExpanded,isDisabled:v,isFocusVisibleWithin:R,state:g}}),M=_e(f,{global:!0});return Na.default.createElement(xa,{values:[[br,{slots:{[dr]:{},trigger:h}}],[CE,{panelProps:T,panelRef:x}],[SE,g]]},Na.default.createElement(qe.div,{...be(M,L,w),ref:i,"data-expanded":g.isExpanded||void 0,"data-disabled":v||void 0,"data-focus-visible-within":R||void 0},L.children))}),p2=Na.forwardRef(function(r,i){let{role:c="group"}=r,{panelProps:u,panelRef:f}=Na.useContext(CE),{isFocusVisible:b,focusProps:m}=Ma({within:!0}),g=dt({...r,defaultClassName:"react-aria-DisclosurePanel",values:{isFocusVisibleWithin:b}}),x=_e(r,{global:!0,labelable:!0});return Na.default.createElement(qe.div,{...be(x,g,u,m),ref:ur(i,f),role:c,"data-focus-visible-within":b||void 0},Na.default.createElement(xa,{values:[[br,null]]},r.children))});var m2={};m2={colorSwatchPicker:"تغييرات الألوان",dropzoneLabel:"DropZone",selectPlaceholder:"حدد عنصرًا",tableResizer:"أداة تغيير الحجم"};var b2={};b2={colorSwatchPicker:"Цветови мостри",dropzoneLabel:"DropZone",selectPlaceholder:"Изберете предмет",tableResizer:"Преоразмерител"};var g2={};g2={colorSwatchPicker:"Vzorky barev",dropzoneLabel:"Místo pro přetažení",selectPlaceholder:"Vyberte položku",tableResizer:"Změna velikosti"};var h2={};h2={colorSwatchPicker:"Farveprøver",dropzoneLabel:"DropZone",selectPlaceholder:"Vælg et element",tableResizer:"Størrelsesændring"};var $2={};$2={colorSwatchPicker:"Farbfelder",dropzoneLabel:"Ablegebereich",selectPlaceholder:"Element wählen",tableResizer:"Größenanpassung"};var y2={};y2={colorSwatchPicker:"Χρωματικά δείγματα",dropzoneLabel:"DropZone",selectPlaceholder:"Επιλέξτε ένα αντικείμενο",tableResizer:"Αλλαγή μεγέθους"};var v2={};v2={selectPlaceholder:"Select an item",tableResizer:"Resizer",dropzoneLabel:"DropZone",colorSwatchPicker:"Color swatches"};var x2={};x2={colorSwatchPicker:"Muestras de colores",dropzoneLabel:"DropZone",selectPlaceholder:"Seleccionar un artículo",tableResizer:"Cambiador de tamaño"};var S2={};S2={colorSwatchPicker:"Värvinäidised",dropzoneLabel:"DropZone",selectPlaceholder:"Valige üksus",tableResizer:"Suuruse muutja"};var C2={};C2={colorSwatchPicker:"Värimallit",dropzoneLabel:"DropZone",selectPlaceholder:"Valitse kohde",tableResizer:"Koon muuttaja"};var E2={};E2={colorSwatchPicker:"Échantillons de couleurs",dropzoneLabel:"DropZone",selectPlaceholder:"Sélectionner un élément",tableResizer:"Redimensionneur"};var T2={};T2={colorSwatchPicker:"דוגמיות צבע",dropzoneLabel:"DropZone",selectPlaceholder:"בחר פריט",tableResizer:"שינוי גודל"};var R2={};R2={colorSwatchPicker:"Uzorci boja",dropzoneLabel:"Zona spuštanja",selectPlaceholder:"Odaberite stavku",tableResizer:"Promjena veličine"};var w2={};w2={colorSwatchPicker:"Színtárak",dropzoneLabel:"DropZone",selectPlaceholder:"Válasszon ki egy elemet",tableResizer:"Átméretező"};var D2={};D2={colorSwatchPicker:"Campioni di colore",dropzoneLabel:"Zona di rilascio",selectPlaceholder:"Seleziona un elemento",tableResizer:"Ridimensionamento"};var A2={};A2={colorSwatchPicker:"カラースウォッチ",dropzoneLabel:"ドロップゾーン",selectPlaceholder:"項目を選択",tableResizer:"サイズ変更ツール"};var P2={};P2={colorSwatchPicker:"색상 견본",dropzoneLabel:"드롭 영역",selectPlaceholder:"항목 선택",tableResizer:"크기 조정기"};var M2={};M2={colorSwatchPicker:"Spalvų pavyzdžiai",dropzoneLabel:"„DropZone“",selectPlaceholder:"Pasirinkite elementą",tableResizer:"Dydžio keitiklis"};var O2={};O2={colorSwatchPicker:"Krāsu paraugi",dropzoneLabel:"DropZone",selectPlaceholder:"Izvēlēties vienumu",tableResizer:"Izmēra mainītājs"};var N2={};N2={colorSwatchPicker:"Fargekart",dropzoneLabel:"Droppsone",selectPlaceholder:"Velg et element",tableResizer:"Størrelsesendrer"};var L2={};L2={colorSwatchPicker:"kleurstalen",dropzoneLabel:"DropZone",selectPlaceholder:"Selecteer een item",tableResizer:"Resizer"};var k2={};k2={colorSwatchPicker:"Próbki kolorów",dropzoneLabel:"Strefa upuszczania",selectPlaceholder:"Wybierz element",tableResizer:"Zmiana rozmiaru"};var _2={};_2={colorSwatchPicker:"Amostras de cores",dropzoneLabel:"DropZone",selectPlaceholder:"Selecione um item",tableResizer:"Redimensionador"};var z2={};z2={colorSwatchPicker:"Amostras de cores",dropzoneLabel:"DropZone",selectPlaceholder:"Selecione um item",tableResizer:"Redimensionador"};var B2={};B2={colorSwatchPicker:"Specimene de culoare",dropzoneLabel:"Zonă de plasare",selectPlaceholder:"Selectați un element",tableResizer:"Instrument de redimensionare"};var I2={};I2={colorSwatchPicker:"Цветовые образцы",dropzoneLabel:"DropZone",selectPlaceholder:"Выберите элемент",tableResizer:"Средство изменения размера"};var H2={};H2={colorSwatchPicker:"Vzorkovníky farieb",dropzoneLabel:"DropZone",selectPlaceholder:"Vyberte položku",tableResizer:"Nástroj na zmenu veľkosti"};var F2={};F2={colorSwatchPicker:"Barvne palete",dropzoneLabel:"DropZone",selectPlaceholder:"Izberite element",tableResizer:"Spreminjanje velikosti"};var U2={};U2={colorSwatchPicker:"Uzorci boje",dropzoneLabel:"DropZone",selectPlaceholder:"Izaberite stavku",tableResizer:"Promena veličine"};var V2={};V2={colorSwatchPicker:"Färgrutor",dropzoneLabel:"DropZone",selectPlaceholder:"Välj en artikel",tableResizer:"Storleksändrare"};var K2={};K2={colorSwatchPicker:"Renk örnekleri",dropzoneLabel:"Bırakma Bölgesi",selectPlaceholder:"Bir öğe seçin",tableResizer:"Yeniden boyutlandırıcı"};var j2={};j2={colorSwatchPicker:"Зразки кольорів",dropzoneLabel:"DropZone",selectPlaceholder:"Виберіть елемент",tableResizer:"Засіб змінення розміру"};var G2={};G2={colorSwatchPicker:"颜色色板",dropzoneLabel:"放置区域",selectPlaceholder:"选择一个项目",tableResizer:"尺寸调整器"};var q2={};q2={colorSwatchPicker:"色票",dropzoneLabel:"放置區",selectPlaceholder:"選取項目",tableResizer:"大小調整器"};var Y2={};Y2={"ar-AE":m2,"bg-BG":b2,"cs-CZ":g2,"da-DK":h2,"de-DE":$2,"el-GR":y2,"en-US":v2,"es-ES":x2,"et-EE":S2,"fi-FI":C2,"fr-FR":E2,"he-IL":T2,"hr-HR":R2,"hu-HU":w2,"it-IT":D2,"ja-JP":A2,"ko-KR":P2,"lt-LT":M2,"lv-LV":O2,"nb-NO":N2,"nl-NL":L2,"pl-PL":k2,"pt-BR":_2,"pt-PT":z2,"ro-RO":B2,"ru-RU":I2,"sk-SK":H2,"sl-SI":F2,"sr-SP":U2,"sv-SE":V2,"tr-TR":K2,"uk-UA":j2,"zh-CN":G2,"zh-TW":q2};var EE=F(J(),1);function X2(o,r,i){let{overlayProps:c,underlayProps:u}=C0({...o,isOpen:r.isOpen,onClose:r.close},i);return R0({isDisabled:!r.isOpen}),w0(),EE.useEffect(()=>{if(r.isOpen&&i.current)return $0([i.current],{shouldUseInert:!0})},[r.isOpen,i]),{modalProps:be(c),underlayProps:u}}var Bt=F(J(),1);var N0=F(J(),1),po=typeof document<"u"&&window.visualViewport;function Z2(){let o=Xa(),[r,i]=N0.useState(()=>o?{width:0,height:0}:Q2());return N0.useEffect(()=>{let c=(m)=>{i((g)=>{if(m.width===g.width&&m.height===g.height)return g;return m})},u=()=>{if(po&&po.scale>1)return;c(Q2())},f,b=(m)=>{if(po&&po.scale>1)return;if(vs(ce(m)))f=requestAnimationFrame(()=>{let g=tt();if(!g||!vs(g))c({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight})})};if(c(Q2()),Cn())window.addEventListener("blur",b,!0);if(!po)window.addEventListener("resize",u);else po.addEventListener("resize",u);return()=>{if(cancelAnimationFrame(f),Cn())window.removeEventListener("blur",b,!0);if(!po)window.removeEventListener("resize",u);else po.removeEventListener("resize",u)}},[]),r}function Q2(){return{width:po?Math.min(po.width*po.scale,document.documentElement.clientWidth):document.documentElement.clientWidth,height:po?po.height*po.scale:document.documentElement.clientHeight}}var RE=Bt.createContext(null),W2=Bt.createContext(null),If=Bt.forwardRef(function(r,i){if(Bt.useContext(W2)){if(r.onOpenChange||r.defaultOpen!==void 0||r.isOpen!==void 0){let L=new Set(["isDismissable","isKeyboardDismissDisabled","isOpen","defaultOpen","onOpenChange","isEntering","isExiting","UNSTABLE_portalContainer","shouldCloseOnInteractOutside"]),M=Object.keys(r).filter((H)=>L.has(H));console.warn(`This modal is already wrapped in a ModalOverlay, props [${M.join(", ")}] should be placed on the ModalOverlay instead.`)}return Bt.default.createElement(TE,{...r,modalRef:i},r.children)}let{isDismissable:u,isKeyboardDismissDisabled:f,isOpen:b,defaultOpen:m,onOpenChange:g,children:x,isEntering:v,isExiting:h,UNSTABLE_portalContainer:T,shouldCloseOnInteractOutside:R,...w}=r;return Bt.default.createElement(xu,{isDismissable:u,isKeyboardDismissDisabled:f,isOpen:b,defaultOpen:m,onOpenChange:g,isEntering:v,isExiting:h,UNSTABLE_portalContainer:T,shouldCloseOnInteractOutside:R},Bt.default.createElement(TE,{...w,modalRef:i},x))});function lO(o,r){[o,r]=bt(o,r,RE);let i=Bt.useContext(vr),c=_s(o),u=o.isOpen!=null||o.defaultOpen!=null||!i?c:i;if(u===i){if(o.onOpenChange||o.defaultOpen!==void 0||o.isOpen!==void 0)console.warn("This modals state is controlled by a trigger, place onOpenChange on the trigger instead.")}let f=Qa(r),b=Bt.useRef(null),m=$i(f,u.isOpen),g=$i(b,u.isOpen),x=m||g||o.isExiting||!1,v=Xa();if(!u.isOpen&&!x||v)return null;return Bt.default.createElement(iO,{...o,state:u,isExiting:x,overlayRef:f,modalRef:b})}var xu=Bt.forwardRef(lO);function iO({UNSTABLE_portalContainer:o,...r}){let i=r.modalRef,{state:c}=r,{modalProps:u,underlayProps:f}=X2(r,c,i),b=hi(r.overlayRef)||r.isEntering||!1,m=dt({...r,defaultClassName:"react-aria-ModalOverlay",values:{isEntering:b,isExiting:r.isExiting,state:c}}),g=Z2(),x=void 0,v=void 0;if(typeof document<"u"){let T=zo(document.body)?document.body:document.scrollingElement||document.documentElement,R=T.getBoundingClientRect().width%1,w=T.getBoundingClientRect().height%1;x=T.scrollWidth-R,v=T.scrollHeight-w}let h={...m.style,"--visual-viewport-width":g.width+"px","--visual-viewport-height":g.height+"px","--page-width":x!==void 0?x+"px":void 0,"--page-height":v!==void 0?v+"px":void 0};return Bt.default.createElement($u,{isExiting:r.isExiting,portalContainer:o},Bt.default.createElement(qe.div,{...be(_e(r,{global:!0}),f),...m,style:h,ref:r.overlayRef,"data-entering":b||void 0,"data-exiting":r.isExiting||void 0},Bt.default.createElement(xa,{values:[[W2,{modalProps:u,modalRef:i,isExiting:r.isExiting,isDismissable:r.isDismissable}],[vr,c]]},m.children)))}function TE(o){let{modalProps:r,modalRef:i,isExiting:c,isDismissable:u}=Bt.useContext(W2),f=Bt.useContext(vr),b=Bt.useMemo(()=>ur(o.modalRef,i),[o.modalRef,i]),m=Qa(b),g=hi(m),x=dt({...o,defaultClassName:"react-aria-Modal",values:{isEntering:g,isExiting:c,state:f}});return Bt.default.createElement(qe.div,{...be(_e(o,{global:!0}),r),...x,ref:m,"data-entering":g||void 0,"data-exiting":c||void 0},u&&Bt.default.createElement(hu,{onDismiss:f.close}),x.children)}var wE=F(J(),1),L0=new WeakMap;function J2(o,r,i){let{keyboardDelegate:c,isDisabled:u,isRequired:f,name:b,form:m,validationBehavior:g="aria"}=o,x=Os({usage:"search",sensitivity:"base"}),v=wE.useMemo(()=>c||new mi(r.collection,r.disabledKeys,i,x),[c,r.collection,r.disabledKeys,x,i]),{menuTriggerProps:h,menuProps:T}=n2({isDisabled:u,type:"listbox"},r,i),R=(te)=>{if(r.selectionManager.selectionMode==="multiple")return;switch(te.key){case"ArrowLeft":{te.preventDefault();let j=r.selectedKey!=null?v.getKeyAbove?.(r.selectedKey):v.getFirstKey?.();if(j!=null)r.setSelectedKey(j);break}case"ArrowRight":{te.preventDefault();let j=r.selectedKey!=null?v.getKeyBelow?.(r.selectedKey):v.getFirstKey?.();if(j!=null)r.setSelectedKey(j);break}}},{typeSelectProps:w}=c0({keyboardDelegate:v,selectionManager:r.selectionManager,onTypeSelect(te){r.setSelectedKey(te)}}),{isInvalid:L,validationErrors:M,validationDetails:H}=r.displayValidation,{labelProps:I,fieldProps:X,descriptionProps:Z,errorMessageProps:ge}=jb({...o,labelElementType:"span",isInvalid:L,errorMessage:o.errorMessage||M});if(w.onKeyDown=w.onKeyDownCapture,delete w.onKeyDownCapture,r.selectionManager.selectionMode==="multiple")w={};let he=_e(o,{labelable:!0}),ae=be(w,h,X),U=vt();return L0.set(r,{isDisabled:u,isRequired:f,name:b,form:m,validationBehavior:g}),{labelProps:{...I,onClick:()=>{if(!o.isDisabled)i.current?.focus(),ai("keyboard")}},triggerProps:be(he,{...ae,isDisabled:u,onKeyDown:Lo(ae.onKeyDown,R,o.onKeyDown),onKeyUp:o.onKeyUp,"aria-labelledby":[U,ae["aria-labelledby"],ae["aria-label"]&&!ae["aria-labelledby"]?ae.id:null].filter(Boolean).join(" "),onFocus(te){if(r.isFocused)return;if(o.onFocus)o.onFocus(te);if(o.onFocusChange)o.onFocusChange(!0);r.setFocused(!0)},onBlur(te){if(r.isOpen)return;if(o.onBlur)o.onBlur(te);if(o.onFocusChange)o.onFocusChange(!1);r.setFocused(!1)}}),valueProps:{id:U},menuProps:{...T,autoFocus:r.focusStrategy||!0,shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,disallowEmptySelection:!0,linkBehavior:"selection",onBlur:(te)=>{if(Ve(te.currentTarget,te.relatedTarget))return;if(o.onBlur)o.onBlur(te);if(o.onFocusChange)o.onFocusChange(!1);r.setFocused(!1)},"aria-labelledby":[X["aria-labelledby"],ae["aria-label"]&&!X["aria-labelledby"]?ae.id:null].filter(Boolean).join(" ")},descriptionProps:Z,errorMessageProps:ge,isInvalid:L,validationErrors:M,validationDetails:H,hiddenSelectProps:{isDisabled:u,name:b,label:o.label,state:r,triggerRef:i,form:m}}}var Ba=F(J(),1);function DE(o,r,i){let c=L0.get(r)||{},{autoComplete:u,name:f=c.name,form:b=c.form,isDisabled:m=c.isDisabled}=o,{validationBehavior:g,isRequired:x}=c,{visuallyHiddenProps:v}=n1({style:{position:"fixed",top:0,left:0}});Gb(o.selectRef,r.defaultValue,r.setValue),Yb({validationBehavior:g,focus:()=>i.current?.focus()},r,o.selectRef);let h=r.setValue,T=Ba.useCallback((R)=>{let w=ce(R);if(w.multiple)h(Array.from(w.selectedOptions,(L)=>L.value));else h(R.currentTarget.value)},[h]);return{containerProps:{...v,"aria-hidden":!0,["data-react-aria-prevent-focus"]:!0,["data-a11y-ignore"]:"aria-hidden-focus"},inputProps:{style:{display:"none"}},selectProps:{tabIndex:-1,autoComplete:u,disabled:m,multiple:r.selectionManager.selectionMode==="multiple",required:g==="native"&&x,name:f,form:b,value:r.value??"",onChange:T,onInput:T}}}function ex(o){let{state:r,triggerRef:i,label:c,name:u,form:f,isDisabled:b}=o,m=Ba.useRef(null),g=Ba.useRef(null),{containerProps:x,selectProps:v}=DE({...o,selectRef:r.collection.size<=300?m:g},r,i),h=Array.isArray(r.value)?r.value:[r.value];if(r.collection.size<=300)return Ba.default.createElement("div",{...x,"data-testid":"hidden-select-container"},Ba.default.createElement("label",null,c,Ba.default.createElement("select",{...v,ref:m},Ba.default.createElement("option",{value:"",label:" "}," "),[...r.collection.getKeys()].map((T)=>{let R=r.collection.getItem(T);if(R&&R.type==="item")return Ba.default.createElement("option",{key:R.key,value:R.key},R.textValue)}),r.collection.size===0&&u&&h.map((T,R)=>Ba.default.createElement("option",{key:R,value:T??""})))));else if(u){let T=L0.get(r)||{},{validationBehavior:R}=T;if(h.length===0)h=[null];let w=h.map((L,M)=>{let H={type:"hidden",autoComplete:v.autoComplete,name:u,form:f,disabled:b,value:L??""};if(R==="native")return Ba.default.createElement("input",{key:M,...H,ref:M===0?g:null,style:{display:"none"},type:"text",required:M===0?v.required:!1,onChange:()=>{}});return Ba.default.createElement("input",{key:M,...H,ref:M===0?g:null})});return Ba.default.createElement(Ba.default.Fragment,null,w)}return null}var Mt=F(J(),1);var il=F(J(),1);function tx(o){let{selectionMode:r="single",shouldCloseOnSelect:i=r==="single"}=o,c=_s(o),[u,f]=il.useState(null),b=il.useMemo(()=>o.defaultValue!==void 0?o.defaultValue:r==="single"?o.defaultSelectedKey??null:[],[o.defaultValue,o.defaultSelectedKey,r]),m=il.useMemo(()=>o.value!==void 0?o.value:r==="single"?o.selectedKey:void 0,[o.value,o.selectedKey,r]),[g,x]=Tn(m,b,o.onChange),v=r==="single"&&Array.isArray(g)?g[0]:g,h=(X)=>{if(r==="single"){let Z=Array.isArray(X)?X[0]??null:X;if(x(Z),Z!==v)o.onSelectionChange?.(Z)}else{let Z=[];if(Array.isArray(X))Z=X;else if(X!=null)Z=[X];x(Z)}},T=Mf({...o,selectionMode:r,disallowEmptySelection:r==="single",allowDuplicateSelectionEvents:!0,selectedKeys:il.useMemo(()=>sO(v),[v]),onSelectionChange:(X)=>{if(X==="all")return;if(r==="single"){let Z=X.values().next().value??null;h(Z)}else h([...X]);if(i)c.close();L.commitValidation()}}),R=T.selectionManager.firstSelectedKey,w=il.useMemo(()=>[...T.selectionManager.selectedKeys].map((X)=>T.collection.getItem(X)).filter((X)=>X!=null),[T.selectionManager.selectedKeys,T.collection]),L=xf({...o,value:Array.isArray(v)&&v.length===0?null:v}),[M,H]=il.useState(!1),[I]=il.useState(v);return{...L,...T,...c,value:v,defaultValue:b??I,setValue:h,selectedKey:R,setSelectedKey:h,selectedItem:w[0]??null,selectedItems:w,defaultSelectedKey:o.defaultSelectedKey??(o.selectionMode==="single"?I:null),focusStrategy:u,open(X=null){if(T.collection.size!==0||o.allowsEmptyCollection)f(X),c.open()},toggle(X=null){if(T.collection.size!==0||o.allowsEmptyCollection)f(X),c.toggle()},isFocused:M,setFocused:H}}function sO(o){if(o===void 0)return;if(o===null)return[];return Array.isArray(o)?o:[o]}function cO(o){return o&&o.__esModule?o.default:o}var k0=Mt.createContext(null),ax=Mt.createContext(null),ox=co(function(r,i){[r,i]=bt(r,i,k0);let{children:c,isDisabled:u=!1,isInvalid:f=!1,isRequired:b=!1}=r,m=Mt.useMemo(()=>typeof c==="function"?c({isOpen:!1,isDisabled:u,isInvalid:f,isRequired:b,isFocused:!1,isFocusVisible:!1,defaultChildren:null}):c,[c,u,f,b]);return Mt.default.createElement(Ps,{content:m},(g)=>Mt.default.createElement(dO,{props:r,collection:g,selectRef:i}))}),uO=[Cs,br,rn];function dO({props:o,selectRef:r,collection:i}){let{validationBehavior:c}=fr(Kb)||{},u=o.validationBehavior??c??"native",f=tx({...o,collection:i,children:void 0,validationBehavior:u}),{isFocusVisible:b,focusProps:m}=Ma({within:!0}),g=Mt.useRef(null),[x,v]=gs(!o["aria-label"]&&!o["aria-labelledby"]),{labelProps:h,triggerProps:T,valueProps:R,menuProps:w,descriptionProps:L,errorMessageProps:M,hiddenSelectProps:H,...I}=J2({...fb(o),label:v,validationBehavior:u},f,g),X=Mt.useMemo(()=>({isOpen:f.isOpen,isFocused:f.isFocused,isFocusVisible:b,isDisabled:o.isDisabled||!1,isInvalid:I.isInvalid||!1,isRequired:o.isRequired||!1}),[f.isOpen,f.isFocused,b,o.isDisabled,I.isInvalid,o.isRequired]),Z=dt({...o,values:X,defaultClassName:"react-aria-Select"}),ge=_e(o,{global:!0});delete ge.id;let he=Mt.useRef(null);return Mt.default.createElement(xa,{values:[[k0,o],[ax,f],[nx,R],[Cs,{...h,ref:x,elementType:"span"}],[br,{...T,ref:g,isPressed:f.isOpen,autoFocus:o.autoFocus}],[vr,f],[A0,{trigger:"Select",triggerRef:g,scrollRef:he,placement:"bottom start","aria-labelledby":w["aria-labelledby"],clearContexts:uO}],[Of,{...w,ref:he}],[gi,f],[rn,{slots:{description:L,errorMessage:M}}],[ws,I]]},Mt.default.createElement(qe.div,{...be(ge,Z,m),ref:r,slot:o.slot||void 0,"data-focused":f.isFocused||void 0,"data-focus-visible":b||void 0,"data-open":f.isOpen||void 0,"data-disabled":o.isDisabled||void 0,"data-invalid":I.isInvalid||void 0,"data-required":o.isRequired||void 0},Z.children,Mt.default.createElement(ex,{...H,autoComplete:o.autoComplete})))}var nx=Mt.createContext(null),rx=co(function(r,i){[r,i]=bt(r,i,nx);let c=Mt.useContext(ax),{placeholder:u}=fr(k0),f=c.selectedItems.map((w)=>{let L=w.props?.children;if(typeof L==="function")L=L({isHovered:!1,isPressed:!1,isSelected:!1,isFocused:!1,isFocusVisible:!1,isDisabled:!1,selectionMode:"single",selectionBehavior:"toggle"});return L}),b=c2(),m=Mt.useMemo(()=>c.selectedItems.map((w)=>w?.textValue),[c.selectedItems]),g=c.selectionManager.selectionMode,x=Mt.useMemo(()=>g==="single"?m[0]??"":b.format(m),[g,b,m]),v=Mt.useMemo(()=>{if(g==="single")return f[0];let w=b.formatToParts(m);if(w.length===0)return null;let L=0;return w.map((M)=>{if(M.type==="element")return Mt.default.createElement(Mt.Fragment,{key:L},f[L++]);else return M.value})},[g,b,m,f]),h=Ss(cO(Y2),"react-aria-components"),T=dt({...r,defaultChildren:v??u??h.format("selectPlaceholder"),defaultClassName:"react-aria-SelectValue",values:{selectedItem:c.selectedItems[0]?.value??null,selectedItems:Mt.useMemo(()=>c.selectedItems.map((w)=>w.value??null),[c.selectedItems]),selectedText:x,isPlaceholder:c.selectedItems.length===0,state:c}}),R=_e(r,{global:!0});return Mt.default.createElement(qe.span,{ref:i,...R,...T,"data-placeholder":c.selectedItems.length===0||void 0},Mt.default.createElement(rn.Provider,{value:void 0},T.children))});var lx=new WeakMap;function Su(o,r,i){if(!o)return"";if(typeof r==="string")r=r.replace(/\s+/g,"");let c=lx.get(o);if(!c)console.error("There is no tab id, please check if you have rendered the tab panel before the tab list.");return`${c}-${i}-${r}`}function ix(o,r,i){let{key:c,isDisabled:u,shouldSelectOnPressUp:f}=o,{selectionManager:b,selectedKey:m}=r,g=c===m,x=u||r.isDisabled||r.selectionManager.isDisabled(c),v=r.collection.getItem(c),{itemProps:h,isPressed:T}=pu({selectionManager:b,key:c,ref:i,isDisabled:x,shouldSelectOnPressUp:f??v?.props.href!=null,linkBehavior:"selection"}),R=Su(r,c,"tab"),w=Su(r,c,"tabpanel"),{tabIndex:L}=h,M=_e(v?.props,{labelable:!0});delete M.id;let H=Wc(v?.props),{focusableProps:I}=ii({...v?.props,isDisabled:x},i);return{tabProps:be(M,I,H,h,{id:R,"aria-selected":g,"aria-disabled":x||void 0,"aria-controls":g?w:void 0,tabIndex:x?void 0:L,role:"tab"}),isSelected:g,isDisabled:x,isPressed:T}}var AE=F(J(),1);function PE(o,r){let i=r?.isDisabled,[c,u]=AE.useState(!1);return Le(()=>{if(o?.current&&!i){let f=()=>{if(o.current){let m=ln(o.current,{tabbable:!0});u(!!m.nextNode())}};f();let b=new MutationObserver(f);return b.observe(o.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{b.disconnect()}}}),i?!1:c}function sx(o,r,i){let c=PE(i)?void 0:0,u=Su(r,o.id??r?.selectedKey,"tabpanel"),f=ni({...o,id:u,"aria-labelledby":Su(r,r?.selectedKey,"tab")});return{tabPanelProps:be(f,{tabIndex:c,role:"tabpanel","aria-describedby":o["aria-describedby"],"aria-details":o["aria-details"]})}}class cx{constructor(o,r,i,c=new Set){this.collection=o,this.flipDirection=r==="rtl"&&i==="horizontal",this.disabledKeys=c,this.tabDirection=i==="horizontal"}getKeyLeftOf(o){if(this.flipDirection)return this.getNextKey(o);return this.getPreviousKey(o)}getKeyRightOf(o){if(this.flipDirection)return this.getPreviousKey(o);return this.getNextKey(o)}isDisabled(o){return this.disabledKeys.has(o)||!!this.collection.getItem(o)?.props?.isDisabled}getFirstKey(){let o=this.collection.getFirstKey();if(o!=null&&this.isDisabled(o))o=this.getNextKey(o);return o}getLastKey(){let o=this.collection.getLastKey();if(o!=null&&this.isDisabled(o))o=this.getPreviousKey(o);return o}getKeyAbove(o){if(this.tabDirection)return null;return this.getPreviousKey(o)}getKeyBelow(o){if(this.tabDirection)return null;return this.getNextKey(o)}getNextKey(o){let r=o;do if(r=this.collection.getKeyAfter(r),r==null)r=this.collection.getFirstKey();while(r!=null&&this.isDisabled(r));return r}getPreviousKey(o){let r=o;do if(r=this.collection.getKeyBefore(r),r==null)r=this.collection.getLastKey();while(r!=null&&this.isDisabled(r));return r}}var ME=F(J(),1);function ux(o,r,i){let{orientation:c="horizontal",keyboardActivation:u="automatic"}=o,{collection:f,selectionManager:b,disabledKeys:m}=r,{direction:g}=Pa(),x=ME.useMemo(()=>new cx(f,g,c,m),[f,m,c,g]),{collectionProps:v}=u0({ref:i,selectionManager:b,keyboardDelegate:x,selectOnFocus:u==="automatic",disallowEmptySelection:!0,scrollRef:i,linkBehavior:"selection"}),h=vt();lx.set(r,h);let T=ni({...o,id:h});return{tabListProps:{...be(v,T),role:"tablist","aria-orientation":c,tabIndex:void 0}}}var Ct=F(J(),1);var dx=Ct.createContext(null),Is=Ct.createContext(null);var fx=Ct.forwardRef(function(r,i){return Ct.useContext(Is)?Ct.default.createElement(fO,{props:r,forwardedRef:i}):Ct.default.createElement(Ef,r)});function fO({props:o,forwardedRef:r}){let i=Ct.useContext(Is),{CollectionRoot:c}=Ct.useContext(ol),{orientation:u="horizontal",keyboardActivation:f="automatic"}=fr(dx),b=Qa(r),{tabListProps:m}=ux({...o,orientation:u,keyboardActivation:f},i,b),g=dt({...o,children:null,defaultClassName:"react-aria-TabList",values:{orientation:u,state:i}}),x=_e(o,{global:!0});return delete x.id,Ct.default.createElement(qe.div,{...be(x,g,m),ref:b,"data-orientation":u||void 0},Ct.default.createElement(a0,null,Ct.default.createElement(c,{collection:i.collection,persistedKeys:b1(i.selectionManager.focusedKey)})))}class OE extends Bo{static{this.type="item"}}var px=hr(OE,(o,r,i)=>{let c=Ct.useContext(Is),u=Qa(r),{tabProps:f,isSelected:b,isDisabled:m,isPressed:g}=ix({key:i.key,...o},c,u),{focusProps:x,isFocused:v,isFocusVisible:h}=Ma(),{hoverProps:T,isHovered:R}=Oa({isDisabled:m,onHoverStart:o.onHoverStart,onHoverEnd:o.onHoverEnd,onHoverChange:o.onHoverChange}),w=dt({...o,id:void 0,children:i.rendered,defaultClassName:"react-aria-Tab",values:{isSelected:b,isDisabled:m,isFocused:v,isFocusVisible:h,isPressed:g,isHovered:R}}),L=i.props.href?qe.a:qe.div,M=_e(o,{global:!0});return delete M.id,delete M.onClick,Ct.default.createElement(L,{...be(M,w,f,x,T),ref:u,"data-selected":b||void 0,"data-disabled":m||void 0,"data-focused":v||void 0,"data-focus-visible":h||void 0,"data-pressed":g||void 0,"data-hovered":R||void 0},Ct.default.createElement(du.Provider,{value:{isSelected:b}},w.children))});var mx=co(function(r,i){let c=Ct.useContext(Is),u=Qa(i),f=c.selectedKey===r.id,[b,m]=Ct.useState(c.selectedKey!=null?f:null);if(b==null&&c.selectedKey!=null)m(f);else if(!f&&b)m(!1);let g=$i(u,f);if(!f&&!r.shouldForceMount&&!g)return null;return Ct.default.createElement(pO,{...r,tabPanelRef:u,isInitiallySelected:b||!1,isExiting:g})});function pO(o){let r=Ct.useContext(Is),{id:i,tabPanelRef:c,isInitiallySelected:u,isExiting:f,...b}=o,{tabPanelProps:m}=sx(o,r,c),{focusProps:g,isFocused:x,isFocusVisible:v}=Ma(),h=r.selectedKey===o.id,T=hi(c)&&!u,R=dt({...o,defaultClassName:"react-aria-TabPanel",values:{isFocused:x,isFocusVisible:v,isInert:mu(!h),isEntering:T,isExiting:f,state:r}}),w=_e(b,{global:!0});delete w.id;let L=h?be(w,m,g,R):be(w,R);return Ct.default.createElement(qe.div,{...L,ref:c,"data-focused":x||void 0,"data-focus-visible":v||void 0,inert:mu(!h||o.inert),"data-inert":!h?"true":void 0,"data-entering":T||void 0,"data-exiting":f||void 0},Ct.default.createElement(xa,{values:[[dx,null],[Is,null]]},Ct.default.createElement(ol.Provider,{value:m1},R.children)))}var Cu=F(J(),1);var _0=Cu.createContext({}),mO=(o)=>{let{onHoverStart:r,onHoverChange:i,onHoverEnd:c,...u}=o;return u},bx=Cu.forwardRef(function(r,i){[r,i]=bt(r,i,_0);let{hoverProps:c,isHovered:u}=Oa(r),{isFocused:f,isFocusVisible:b,focusProps:m}=Ma({isTextInput:!0,autoFocus:r.autoFocus}),g=!!r["aria-invalid"]&&r["aria-invalid"]!=="false",x=dt({...r,values:{isHovered:u,isFocused:f,isFocusVisible:b,isDisabled:r.disabled||!1,isInvalid:g},defaultClassName:"react-aria-TextArea"});return Cu.default.createElement(qe.textarea,{...be(mO(r),m,c),...x,ref:i,"data-focused":f||void 0,"data-disabled":r.disabled||void 0,"data-hovered":u||void 0,"data-focus-visible":b||void 0,"data-invalid":g||void 0})});var On=F(J(),1),NE=On.createContext(null),z0=co(function(r,i){[r,i]=bt(r,i,NE);let{validationBehavior:c}=fr(Kb)||{},u=r.validationBehavior??c??"native",f=On.useRef(null);[r,f]=bt(r,f,D9);let[b,m]=gs(!r["aria-label"]&&!r["aria-labelledby"]),[g,x]=On.useState("input"),{labelProps:v,inputProps:h,descriptionProps:T,errorMessageProps:R,...w}=s2({...fb(r),inputElementType:g,label:m,validationBehavior:u},f),L=On.useCallback((I)=>{if(f.current=I,I)x(I instanceof HTMLTextAreaElement?"textarea":"input")},[f]),M=dt({...r,values:{isDisabled:r.isDisabled||!1,isInvalid:w.isInvalid,isReadOnly:r.isReadOnly||!1,isRequired:r.isRequired||!1},defaultClassName:"react-aria-TextField"}),H=_e(r,{global:!0});return delete H.id,On.default.createElement(qe.div,{...H,...M,ref:i,slot:r.slot||void 0,"data-disabled":r.isDisabled||void 0,"data-invalid":w.isInvalid||void 0,"data-readonly":r.isReadOnly||void 0,"data-required":r.isRequired||void 0},On.default.createElement(xa,{values:[[Cs,{...v,ref:b}],[Zb,{...h,ref:L}],[_0,{...h,ref:L}],[Z9,{role:"presentation",isInvalid:w.isInvalid,isDisabled:r.isDisabled||!1}],[rn,{slots:{description:T,errorMessage:R}}],[ws,w]]},M.children))});var LE=F(J(),1),bO=F(d1(),1);class Hf{constructor(o){this.queue=[],this.subscriptions=new Set,this.visibleToasts=[],this.maxVisibleToasts=o?.maxVisibleToasts??1/0,this.wrapUpdate=o?.wrapUpdate}runWithWrapUpdate(o,r){if(this.wrapUpdate)this.wrapUpdate(o,r);else o()}subscribe(o){return this.subscriptions.add(o),()=>this.subscriptions.delete(o)}add(o,r={}){let i="_"+Math.random().toString(36).slice(2),c={...r,content:o,key:i,timer:r.timeout?new kE(()=>this.close(i),r.timeout):void 0};return this.queue.unshift(c),this.updateVisibleToasts("add"),i}close(o){let r=this.queue.findIndex((i)=>i.key===o);if(r>=0)this.queue[r].onClose?.(),this.queue.splice(r,1);this.updateVisibleToasts("remove")}updateVisibleToasts(o){this.visibleToasts=this.queue.slice(0,this.maxVisibleToasts),this.runWithWrapUpdate(()=>{for(let r of this.subscriptions)r()},o)}pauseAll(){for(let o of this.visibleToasts)if(o.timer)o.timer.pause()}resumeAll(){for(let o of this.visibleToasts)if(o.timer)o.timer.resume()}clear(){this.queue=[],this.updateVisibleToasts("clear")}}class kE{constructor(o,r){this.startTime=null,this.remaining=r,this.callback=o}reset(o){this.remaining=o,this.resume()}pause(){if(this.timerId==null)return;clearTimeout(this.timerId),this.timerId=null,this.remaining-=Date.now()-this.startTime}resume(){if(this.remaining<=0)return;this.startTime=Date.now(),this.timerId=setTimeout(()=>{this.timerId=null,this.remaining=0,this.callback()},this.remaining)}}var ia=De(Rn,{displayName:"Button",baseClass:"inline-flex items-center justify-center gap-2 rounded-full text-compact leading-4 transition-all duration-200 ease-in-out outline-none data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring data-[focus-visible]:ring-offset-2 data-[disabled]:opacity-50 data-[disabled]:pointer-events-none data-[pending]:opacity-70 data-[pending]:cursor-progress",variants:{variant:{primary:"bg-brand-primary text-fg-inverted hover:bg-neutral-600 hover:shadow-[0_0_5px_0_rgba(0,0,0,0.5)] data-[pressed]:bg-brand-primary data-[pressed]:shadow-none",secondary:"bg-surface-card text-fg border border-border hover:bg-surface-muted hover:border-fg-subtle data-[pressed]:bg-surface-muted",ghost:"bg-transparent text-fg hover:bg-surface-muted data-[pressed]:bg-surface-muted",destructive:"bg-danger text-danger-fg hover:opacity-90 data-[pressed]:opacity-80"},size:{sm:"py-2 px-4",md:"py-3 px-6",lg:"py-4 px-8",prominent:"h-11 px-6 py-0 text-panel-heading font-medium"}},defaultVariants:{variant:"primary",size:"md"}});var Eu=F(Qt(),1),yO=De(As,{displayName:"InputControl",baseClass:"w-full rounded-lg border border-border bg-surface px-4 text-small text-fg outline-none transition-colors duration-200 placeholder:text-fg-muted data-[hovered]:border-fg-subtle data-[focused]:border-brand-green data-[focused]:ring-2 data-[focused]:ring-ring data-[invalid]:border-danger data-[invalid]:ring-2 data-[invalid]:ring-danger data-[disabled]:bg-surface-muted data-[disabled]:opacity-60 data-[disabled]:pointer-events-none",variants:{fieldSize:{sm:"h-8",md:"h-10",lg:"h-12",tall:"h-control-tall"}},defaultVariants:{fieldSize:"md"}}),Tu=({label:o,description:r,errorMessage:i,placeholder:c,size:u,rootClassName:f,inputClassName:b,...m})=>Eu.jsxDEV(z0,{...m,className:`flex w-full flex-col gap-3 ${f??""}`,children:[Eu.jsxDEV(ri,{className:"text-panel-heading font-medium text-fg",children:o},void 0,!1,void 0,this),Eu.jsxDEV(yO,{className:b,placeholder:c,fieldSize:u},void 0,!1,void 0,this),r?Eu.jsxDEV(gr,{slot:"description",className:"text-label text-fg-muted",children:r},void 0,!1,void 0,this):null,Eu.jsxDEV(Ds,{className:"text-label text-danger",children:i},void 0,!1,void 0,this)]},void 0,!0,void 0,this);var doe=De(bx,{displayName:"TextAreaControl",baseClass:"min-h-[120px] w-full resize-y rounded-lg border border-border bg-surface px-4 py-3 text-small text-fg outline-none transition-colors duration-200 placeholder:text-fg-muted data-[hovered]:border-fg-subtle data-[focused]:border-brand-green data-[focused]:ring-2 data-[focused]:ring-ring data-[invalid]:border-danger data-[invalid]:ring-danger data-[disabled]:bg-surface-muted data-[disabled]:opacity-60 data-[disabled]:pointer-events-none"});var IE=F(J(),1);var B0=F(J(),1),BE=B0.createContext(!1),Fs=()=>B0.useContext(BE);var sl=F(J(),1),vO=F(sr(),1);var Coe=sl.createContext(null);var Ia=F(Qt(),1),xO=De(Rn,{displayName:"SelectTrigger",baseClass:"flex h-control-tall w-full items-center justify-between gap-2.5 rounded-lg border border-border bg-surface px-5 text-small text-fg outline-none transition-colors data-[hovered]:border-fg-subtle data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring group-data-[invalid]:border-danger group-data-[invalid]:ring-2 group-data-[invalid]:ring-danger data-[disabled]:bg-surface-muted data-[disabled]:opacity-60 data-[disabled]:pointer-events-none"}),hx=De(ll,{displayName:"SelectItem",baseClass:"flex cursor-pointer select-none items-center rounded-md px-3 py-2 text-small text-fg outline-none data-[hovered]:bg-surface-muted data-[focused]:bg-surface-muted data-[selected]:font-medium data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"}),$x=({label:o,description:r,errorMessage:i,placeholder:c,children:u,rootClassName:f,triggerClassName:b,...m})=>{let g=Fs(),x=Ia.jsxDEV(bu,{className:"flex max-h-72 flex-col gap-0.5 overflow-auto overscroll-contain p-1 outline-none",children:u},void 0,!1,void 0,this),v=r?Ia.jsxDEV(gr,{slot:"description",className:"text-label text-fg-muted",children:r},void 0,!1,void 0,this):null,h=Ia.jsxDEV(Ds,{className:"text-label text-danger",children:i},void 0,!1,void 0,this);return Ia.jsxDEV(ox,{...m,placeholder:c,className:`group flex flex-col gap-3 ${f??""}`,children:[Ia.jsxDEV(ri,{className:"text-panel-heading font-medium text-fg",children:o},void 0,!1,void 0,this),g?Ia.jsxDEV(Ia.Fragment,{children:[x,v,h]},void 0,!0,void 0,this):Ia.jsxDEV(Ia.Fragment,{children:[Ia.jsxDEV(xO,{className:b,children:[Ia.jsxDEV(rx,{className:"data-[placeholder]:text-fg-muted"},void 0,!1,void 0,this),Ia.jsxDEV("svg",{width:"9.5",height:"9.5",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",className:"pointer-events-none shrink-0 text-fg",children:Ia.jsxDEV("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),v,h,Ia.jsxDEV(yi,{className:"min-w-[var(--trigger-width)] overflow-hidden rounded-lg bg-surface-card shadow-lg",children:x},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};var koe=De(As,{displayName:"ComboBoxInput",baseClass:"h-12 w-full rounded-lg border border-border bg-surface pl-4 pr-11 text-small text-fg outline-none transition-colors placeholder:text-fg-muted data-[hovered]:border-fg-subtle data-[focused]:border-brand-green data-[focused]:ring-2 data-[focused]:ring-ring group-data-[invalid]:border-danger group-data-[invalid]:ring-2 group-data-[invalid]:ring-danger data-[disabled]:bg-surface-muted data-[disabled]:opacity-60"}),_oe=De(ll,{displayName:"ComboBoxItem",baseClass:"flex cursor-pointer select-none items-center rounded-md px-3 py-2 text-small text-fg outline-none data-[hovered]:bg-surface-muted data-[focused]:bg-surface-muted data-[selected]:font-medium data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"});var yx=F(J(),1);var Uoe=De(ll,{displayName:"MultiSelectItem",baseClass:"group flex cursor-pointer select-none items-center gap-2 rounded-md px-3 py-2 text-small text-fg outline-none data-[hovered]:bg-surface-muted data-[focused]:bg-surface-muted data-[selected]:font-medium data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"});var RO=F(J(),1);var Ea=F(Qt(),1);var wO=De(xu,{displayName:"DialogOverlay",baseClass:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-modal-backdrop backdrop-blur-modal-backdrop data-[entering]:animate-modal-overlay-in data-[exiting]:animate-modal-overlay-out"}),DO=De(If,{displayName:"DialogModal",baseClass:"rounded-lg bg-surface p-5 outline-none shadow-modal-surface data-[entering]:animate-modal-surface-in data-[exiting]:animate-modal-surface-out"}),AO=Bf,PO={sm:"w-[90vw] max-w-[420px] max-h-[85vh] overflow-y-auto",md:"w-[90vw] max-w-[586px] max-h-[85vh] overflow-y-auto",lg:"w-[90vw] max-w-[720px] max-h-[85vh] overflow-y-auto",xl:"w-[90vw] max-w-[900px] max-h-[85vh] overflow-y-auto",full:"w-[95vw] max-w-[95vw] h-[92vh] flex flex-col"},MO={sm:"text-heading1 font-medium tracking-tight",md:"text-heading1 font-medium tracking-tight",lg:"text-heading2 font-medium tracking-tight",xl:"text-heading2 font-medium tracking-tight",full:"text-heading1 font-medium tracking-tight"},Us=({title:o,description:r,badge:i,size:c="md",children:u,isOpen:f,defaultOpen:b,onOpenChange:m,isDismissable:g=!0,closeLabel:x="Close",...v})=>{let h=c==="full";return Ea.jsxDEV(wO,{className:h?"bg-black/25 backdrop-blur-lg":void 0,isOpen:f,defaultOpen:b,onOpenChange:m,isDismissable:g,children:Ea.jsxDEV(DO,{className:PO[c],children:Ea.jsxDEV(AO,{...v,className:h?"flex min-h-0 flex-1 flex-col outline-none":"outline-none",children:(T)=>Ea.jsxDEV(Ea.Fragment,{children:[Ea.jsxDEV("div",{className:"mb-4 flex shrink-0 items-start justify-between gap-4",children:[o||r?Ea.jsxDEV("div",{className:"min-w-0",children:[o?Ea.jsxDEV("div",{className:"flex items-center gap-2",children:[Ea.jsxDEV(t1,{slot:"title",className:`${MO[c]} text-fg`,children:o},void 0,!1,void 0,this),i?Ea.jsxDEV("span",{className:"inline-flex shrink-0 items-center rounded-full bg-surface-muted px-2 py-0.5 text-label font-medium text-fg-muted",children:i},void 0,!1,void 0,this):null]},void 0,!0,void 0,this):null,r?Ea.jsxDEV("p",{className:"mt-1 text-body text-fg",children:r},void 0,!1,void 0,this):null]},void 0,!0,void 0,this):Ea.jsxDEV("span",{"aria-hidden":"true"},void 0,!1,void 0,this),Ea.jsxDEV("button",{type:"button",onClick:T.close,"aria-label":x,className:"-mr-1 -mt-1 inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-fg-subtle outline-none transition-colors hover:bg-surface-muted hover:text-fg focus-visible:ring-2 focus-visible:ring-ring",children:Ea.jsxDEV("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:Ea.jsxDEV("path",{d:"M6 6l12 12M18 6 6 18"},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h?Ea.jsxDEV("div",{className:"flex min-h-0 flex-1 flex-col",children:typeof u==="function"?u(T):u},void 0,!1,void 0,this):typeof u==="function"?u(T):u]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)};var cne=De(zs,{displayName:"DropdownMenuItem",baseClass:"flex cursor-pointer select-none items-center gap-2.5 rounded-md px-4 py-3 text-small text-fg outline-none data-[focused]:bg-surface-card data-[hovered]:bg-surface-card data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",variants:{destructive:{true:"text-danger data-[focused]:text-danger data-[hovered]:text-danger"}}}),une=De(v1,{displayName:"DropdownMenuSeparator",baseClass:"my-2 h-px border-0 bg-border"});var I0=F(J(),1);var mne=De(zs,{displayName:"ContextMenuItem",baseClass:"flex min-h-[34px] cursor-pointer select-none items-center gap-2.5 rounded-[10px] px-3 py-1.5 text-compact text-white outline-none data-[focused]:bg-[#2f2f2f] data-[focused]:font-medium data-[hovered]:bg-[#2f2f2f] data-[hovered]:font-medium data-[disabled]:cursor-not-allowed data-[disabled]:opacity-45",variants:{destructive:{true:"text-[#ffb5b5] data-[focused]:text-[#ffb5b5]"}}});var xne=new Hf({maxVisibleToasts:5});var Tne=De(f2,{displayName:"Disclosure"}),Rne=De(p2,{displayName:"DisclosurePanel"});var Mne=De(fx,{displayName:"TabList",baseClass:"flex gap-2 border-b border-border"}),One=De(px,{displayName:"Tab",baseClass:"cursor-pointer select-none border-b-2 border-transparent px-4 py-3 text-small font-medium text-fg-muted outline-none transition-colors data-[hovered]:text-fg data-[selected]:border-brand-primary data-[selected]:text-fg data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"}),Nne=De(mx,{displayName:"TabPanel",baseClass:"py-4 text-small text-fg outline-none data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring"});var NO=De("h2",{displayName:"DisplayHeading",baseClass:"text-display-large font-medium text-fg"}),Ine=De("h3",{displayName:"PanelHeading",baseClass:"text-panel-heading font-medium text-fg"}),mo=De("span",{displayName:"Text",baseClass:"text-fg",variants:{size:{micro:"text-micro",caption:"text-caption",label:"text-label",compact:"text-compact",small:"text-small",callout:"text-callout",body:"text-body",subtitle:"text-subtitle",title:"text-title",headline:"text-headline",display:"text-display"},weight:{regular:"font-normal",medium:"font-medium",semibold:"font-medium",bold:"font-medium"},tone:{default:"text-fg",muted:"text-fg-muted",subtle:"text-fg-subtle",inverted:"text-fg-inverted"}},defaultVariants:{size:"body",weight:"regular",tone:"default"}}),vx=De("h2",{displayName:"Heading",baseClass:"font-medium tracking-tight text-fg",variants:{level:{"1":"text-heading1","2":"text-heading2","3":"text-heading3","4":"text-heading4","5":"text-heading5"}},defaultVariants:{level:"2"}});var Ff=De("div",{displayName:"Card",baseClass:"relative rounded-lg bg-surface-card",variants:{variant:{plain:"",outlined:"border border-border",elevated:"shadow-md"},padding:{none:"p-0",sm:"p-4",md:"p-6",lg:"p-8"}},defaultVariants:{variant:"plain",padding:"md"}});var Yne=De("section",{displayName:"Section",baseClass:"w-full",variants:{padding:{none:"py-0",sm:"py-4",md:"py-6 sm:py-8",lg:"py-8 sm:py-12",xl:"py-12 sm:py-16"}},defaultVariants:{padding:"md"}});var Zne=De("div",{displayName:"PageContainer",baseClass:"w-full",variants:{size:{sm:"max-w-screen-sm mx-auto",md:"max-w-screen-md mx-auto",lg:"max-w-screen-lg mx-auto",xl:"max-w-screen-xl ml-0 mr-0 min-[1200px]:max-w-full","2xl":"max-w-screen-2xl mx-auto min-[1600px]:max-w-full min-[1600px]:mx-0",full:"max-w-full"}}});var H0=F(J(),1);var bo=F(Qt(),1),LO=De("div",{displayName:"AppShell",baseClass:"grid h-screen w-full overflow-hidden bg-surface grid-rows-[100%] grid-cols-[1fr] md:grid-cols-[auto_1fr]"}),HE=De("aside",{displayName:"AppShell.Sidebar",baseClass:"h-full w-64 shrink-0 overflow-y-auto border-r border-border bg-surface"}),kO=De("main",{displayName:"AppShell.Main",baseClass:"min-w-0 flex-1 bg-surface px-6 pb-6 pt-6"}),FE=({banner:o,topbar:r,sidebar:i,sidebarLabel:c,drawerToggleLabel:u,children:f,className:b})=>{let[m,g]=H0.useState(!1),x=H0.useId(),v=Boolean(i);return bo.jsxDEV(LO,{className:b,children:[v?bo.jsxDEV(HE,{"aria-label":c,className:"hidden md:block",children:i},void 0,!1,void 0,this):null,v?bo.jsxDEV(xu,{isOpen:m,onOpenChange:g,isDismissable:!0,className:"fixed inset-0 z-40 bg-black/40 md:hidden",children:bo.jsxDEV(If,{className:"absolute inset-y-0 left-0 z-50 h-full outline-none",children:bo.jsxDEV(Bf,{id:x,"aria-label":c,className:"h-full outline-none",children:bo.jsxDEV(HE,{"aria-label":c,className:"shadow-lg",children:i},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this):null,bo.jsxDEV("div",{className:"flex min-h-0 min-w-0 flex-col overflow-y-auto overflow-x-hidden bg-surface"+(v?"":" col-span-full"),children:[o?bo.jsxDEV("div",{className:"shrink-0",children:o},void 0,!1,void 0,this):null,bo.jsxDEV("div",{className:"sticky top-0 z-20 flex shrink-0 items-center bg-surface px-6",children:[v?bo.jsxDEV(Rn,{"aria-label":u,"aria-expanded":m,"aria-controls":m?x:void 0,onPress:()=>g((h)=>!h),className:"ml-2 flex h-9 w-9 shrink-0 items-center justify-center rounded-md text-fg outline-none transition-colors hover:bg-surface-muted md:hidden data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring",children:bo.jsxDEV("span",{"aria-hidden":"true",children:"☰"},void 0,!1,void 0,this)},void 0,!1,void 0,this):null,bo.jsxDEV("div",{className:"min-w-0 flex-1",children:r},void 0,!1,void 0,this)]},void 0,!0,void 0,this),bo.jsxDEV(kO,{children:f},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};var UE=F(Qt(),1),_O=De("header",{displayName:"Topbar",baseClass:"flex h-14 w-full items-center gap-5 border-b border-border"}),zO=De("div",{displayName:"Topbar.Brand",baseClass:"flex min-w-0 items-center gap-3 text-compact leading-4 font-medium tracking-tight text-fg"}),BO=De("nav",{displayName:"Topbar.Nav",baseClass:"ml-auto flex min-w-0 items-center gap-2 overflow-x-auto"}),IO=(o)=>UE.jsxDEV(BO,{...o},void 0,!1,void 0,this),HO=De("div",{displayName:"Topbar.Actions",baseClass:"ml-auto flex items-center gap-4"}),FO=De("a",{displayName:"Topbar.NavLink",baseClass:"inline-flex items-center rounded-sm px-[13px] py-[6px] text-compact leading-4 whitespace-nowrap text-fg no-underline transition-colors hover:bg-surface-muted hover:text-fg outline-none focus-visible:ring-2 focus-visible:ring-ring data-[active]:bg-surface-muted data-[active]:text-fg",variants:{active:{true:"",false:""}},variantsAsDataAttrs:["active"]});var nre=De(ll,{displayName:"WorkspaceSwitcher.Item",baseClass:"flex cursor-pointer select-none items-center rounded-sm px-3 py-2 text-small text-fg outline-none data-[focused]:bg-surface-muted data-[selected]:font-medium"});var rre=De(zs,{displayName:"UserMenu.Item",baseClass:"flex cursor-pointer select-none items-center rounded-sm px-3 py-2 text-small text-fg outline-none data-[focused]:bg-surface-muted data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"}),F0=Object.assign(_O,{Brand:zO,Nav:IO,NavLink:FO,Actions:HO});var UO=F(J(),1);var sre=De("header",{displayName:"PersistentPageShell.Header",baseClass:"flex w-full flex-col gap-6 bg-surface",variants:{sticky:{true:"sticky top-0 z-[1]",false:""}},defaultVariants:{sticky:!1}});var VO=F(J(),1);var xx=F(J(),1);var xr=F(Qt(),1),U0={width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0};var VE=(o)=>xr.jsxDEV("svg",{...U0,...o,children:xr.jsxDEV("path",{d:"M6 9l6 6 6-6"},void 0,!1,void 0,this)},void 0,!1,void 0,this),KE=(o)=>xr.jsxDEV("svg",{...U0,...o,children:xr.jsxDEV("path",{d:"M18 15l-6-6-6 6"},void 0,!1,void 0,this)},void 0,!1,void 0,this);var jE=(o)=>xr.jsxDEV("svg",{...U0,...o,children:[xr.jsxDEV("circle",{cx:"12",cy:"12",r:"4"},void 0,!1,void 0,this),xr.jsxDEV("path",{d:"M12 2v2M12 20v2M2 12h2M20 12h2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M19.1 4.9l-1.4 1.4M6.3 17.7l-1.4 1.4"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),GE=(o)=>xr.jsxDEV("svg",{...U0,...o,children:xr.jsxDEV("path",{d:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z"},void 0,!1,void 0,this)},void 0,!1,void 0,this);var jO=F(J(),1);var Sx=F(J(),1);var Cx=F(Qt(),1);var KO={green:"bg-brand-green text-fg-on-brand",yellow:"bg-accent-yellow text-fg-on-brand",grey:"bg-surface-muted text-fg",dark:"bg-surface-inverted text-fg-inverted"};function qE({label:o,color:r="grey"}){return Cx.jsxDEV("span",{className:`inline-flex items-center rounded-full px-3 py-1 text-caption font-medium leading-none ${KO[r]}`,children:o},void 0,!1,void 0,this)}var V0=F(J(),1);var go=F(Qt(),1),YE={left:"text-left",right:"text-right",center:"text-center"};function Ex(o,r){if(o.sortValue)return o.sortValue(r);if(r&&typeof r==="object"&&o.key in r){let i=r[o.key];if(typeof i==="number"||typeof i==="string")return i}return""}function XE({columns:o,data:r,getRowKey:i,enableSorting:c=!1,onRowClick:u,emptyMessage:f="No rows.",className:b,...m}){let[g,x]=V0.useState(null),v=(w)=>{x((L)=>{if(L?.key!==w)return{key:w,dir:"asc"};return{key:w,dir:L.dir==="asc"?"desc":"asc"}})},h=V0.useMemo(()=>{if(!c||!g)return r;let w=o.find((M)=>M.key===g.key);if(!w)return r;let L=g.dir==="asc"?1:-1;return[...r].sort((M,H)=>{let I=Ex(w,M),X=Ex(w,H);if(typeof I==="number"&&typeof X==="number")return(I-X)*L;return String(I).localeCompare(String(X),void 0,{numeric:!0})*L})},[r,o,c,g]),T=i??((w,L)=>String(L)),R=Boolean(u);return go.jsxDEV("div",{className:["w-full overflow-x-auto",b].filter(Boolean).join(" "),children:go.jsxDEV("table",{className:"w-full border-collapse text-small",...m,children:[go.jsxDEV("thead",{children:go.jsxDEV("tr",{className:"border-b border-border",children:o.map((w)=>{let L=w.align??"left",M=c&&w.sortable,H=g?.key===w.key;return go.jsxDEV("th",{scope:"col",style:w.width?{width:w.width}:void 0,"aria-sort":M?H?g?.dir==="asc"?"ascending":"descending":"none":void 0,className:`${YE[L]} px-4 py-3 text-label font-medium tracking-wide text-fg-muted uppercase`,children:M?go.jsxDEV("button",{type:"button",onClick:()=>v(w.key),className:`inline-flex items-center gap-1 outline-none transition-colors hover:text-fg focus-visible:text-fg ${L==="right"?"flex-row-reverse":""} ${H?"text-fg":""}`,children:[w.header,H?g?.dir==="asc"?go.jsxDEV(KE,{className:"h-3.5 w-3.5"},void 0,!1,void 0,this):go.jsxDEV(VE,{className:"h-3.5 w-3.5"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this):w.header},w.key,!1,void 0,this)})},void 0,!1,void 0,this)},void 0,!1,void 0,this),go.jsxDEV("tbody",{children:h.length===0?go.jsxDEV("tr",{children:go.jsxDEV("td",{colSpan:o.length,className:"px-4 py-10 text-center text-small text-fg-muted",children:f},void 0,!1,void 0,this)},void 0,!1,void 0,this):h.map((w,L)=>go.jsxDEV("tr",{...R?{tabIndex:0,role:"button",onClick:()=>u?.(w),onKeyDown:(M)=>{if(M.key==="Enter"||M.key===" ")M.preventDefault(),u?.(w)}}:{},className:`border-b border-border/60 outline-none ${R?"cursor-pointer transition-colors hover:bg-surface-muted focus-visible:bg-surface-muted focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring":""}`,children:o.map((M)=>{let H=M.align??"left";return go.jsxDEV("td",{className:`${YE[H]} px-4 py-3 align-middle text-fg`,children:M.render?M.render(w):String(Ex(M,w))},M.key,!1,void 0,this)})},T(w,L),!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var QE=F(J(),1);var ZE=F(J(),1);var GO=F(J(),1);var WE=F(J(),1);var qO=F(J(),1);var Xre=De("div",{displayName:"DeliveryStatusModule",baseClass:"grid gap-3 rounded-md bg-surface-inverted p-4 text-fg-inverted"});var Qre=De("span",{displayName:"DeliveryStatusPill",baseClass:"inline-flex min-h-5 items-center rounded-full border border-white/30 px-3"});var Et=F(J(),1);class Vs extends Error{code;status;constructor(o,r,i){super(o);this.code=r;this.status=i;this.name="ApiError"}}async function vi(o,r,i){let c=o.baseUrl.replace(/\/+$/,""),u;try{u=await fetch(`${c}${r}`,{...i,headers:{...i?.body?{"content-type":"application/json"}:{},authorization:`Bearer ${o.token}`,...i?.headers??{}}})}catch(b){throw new Vs(`network error reaching ${c} — is pramen running and is CORS_ORIGINS set?`,"network",0)}let f=null;try{f=await u.json()}catch{}if(!u.ok||!f||f.ok===!1){let b=f?.code??String(u.status),m=f?.error??`request failed (${u.status})`;if(u.status===403)m=`not an admin token — ${m}`;throw new Vs(m,b,u.status)}return f.result}function YO(o){if(!Array.isArray(o))return[];let r=o.map((i)=>typeof i==="string"?i:i?.tenant).filter((i)=>typeof i==="string"&&i.length>0);return[...new Set(r)].sort()}var cl={tenants:async(o)=>YO(await vi(o,"/tenants")),schema:(o,r)=>vi(o,`/admin/schema?tenant=${encodeURIComponent(r)}`),list:(o,r,i,c,u)=>vi(o,"/admin/data",{method:"POST",body:JSON.stringify({tenant:r,table:i,op:"list",limit:c,offset:u})}),count:(o,r,i)=>vi(o,"/admin/data",{method:"POST",body:JSON.stringify({tenant:r,table:i,op:"count"})}),get:(o,r,i,c)=>vi(o,"/admin/data",{method:"POST",body:JSON.stringify({tenant:r,table:i,op:"get",id:c})}),create:(o,r,i,c)=>vi(o,"/admin/data",{method:"POST",body:JSON.stringify({tenant:r,table:i,op:"create",values:c})}),update:(o,r,i,c,u)=>vi(o,"/admin/data",{method:"POST",body:JSON.stringify({tenant:r,table:i,op:"update",id:c,patch:u})}),remove:(o,r,i,c)=>vi(o,"/admin/data",{method:"POST",body:JSON.stringify({tenant:r,table:i,op:"delete",id:c})})};var ue=F(Qt(),1),K0={base:"pramen.admin.baseUrl",token:"pramen.admin.token",tenant:"pramen.admin.tenant",theme:"pramen.admin.theme"},Ru=25,j0=(o,r)=>{let[i,c]=Et.useState(()=>localStorage.getItem(o)??r),u=Et.useCallback((f)=>{c(f),localStorage.setItem(o,f)},[o]);return[i,u]};function XO(o){if(o===null||o===void 0)return ue.jsxDEV("span",{className:"italic text-fg-subtle",children:"null"},void 0,!1,void 0,this);if(typeof o==="boolean")return ue.jsxDEV("span",{className:"text-accent-strong",children:String(o)},void 0,!1,void 0,this);if(typeof o==="object"){let i=JSON.stringify(o);return ue.jsxDEV("span",{className:"block max-w-[280px] truncate font-mono text-caption text-fg-muted",title:i,children:i},void 0,!1,void 0,this)}let r=String(o);return ue.jsxDEV("span",{className:"block max-w-[280px] truncate",title:r,children:r},void 0,!1,void 0,this)}function JE(){let[o,r]=j0(K0.base,"http://localhost:8787"),[i,c]=j0(K0.token,""),[u,f]=j0(K0.tenant,"main"),[b,m]=j0(K0.theme,"light");Et.useEffect(()=>{document.documentElement.dataset.theme=b==="dark"?"dark":"light"},[b]);let g=Et.useMemo(()=>({baseUrl:o,token:i}),[o,i]),[x,v]=Et.useState([]),[h,T]=Et.useState(null),[R,w]=Et.useState(null),[L,M]=Et.useState(null),[H,I]=Et.useState(null),[X,Z]=Et.useState(0),[ge,he]=Et.useState(!1),[ae,U]=Et.useState(null),[te,j]=Et.useState(null),[ye,de]=Et.useState(null),[re,O]=Et.useState(!1),z=Et.useCallback((se)=>{if(se instanceof Vs)U({message:se.message,code:se.code});else U({message:se instanceof Error?se.message:String(se),code:"unknown"})},[]),K=Et.useCallback(async()=>{if(!i)return;try{v(await cl.tenants(g))}catch(se){if(se instanceof Vs&&se.status===403)z(se)}},[g,i,z]),V=Et.useCallback(async()=>{if(!i)return;U(null);try{let se=await cl.schema(g,u);T(se),w((Ge)=>Ge&&(Ge in se.tables)?Ge:Object.keys(se.tables)[0]??null)}catch(se){T(null),w(null),z(se)}},[g,u,i,z]),le=Et.useCallback(async()=>{if(!i||!R)return;he(!0),U(null);try{let[se,Ge]=await Promise.all([cl.list(g,u,R,Ru,X),cl.count(g,u,R)]);M(se),I(Ge)}catch(se){M(null),I(null),z(se)}finally{he(!1)}},[g,u,R,X,i,z]),Q=Et.useRef(void 0);Et.useEffect(()=>(clearTimeout(Q.current),Q.current=setTimeout(()=>{K(),V()},250),()=>clearTimeout(Q.current)),[o,i,u]),Et.useEffect(()=>{Z(0)},[R,u]),Et.useEffect(()=>{le()},[R,u,X,o,i]);let C=Et.useMemo(()=>(R&&h?h.tables[R]:null)??[],[R,h]),W=()=>{de(null);let se={};for(let Ge of C)if(Ge!=="id")se[Ge]=null;j({mode:"create",original:null,text:JSON.stringify(se,null,2)})},ve=async(se)=>{de(null);try{let Ge=await cl.get(g,u,R,se.id)??se;j({mode:"edit",original:Ge,text:JSON.stringify(Ge,null,2)})}catch(Ge){z(Ge)}},Ce=async()=>{if(!te||!R)return;let se;try{if(se=JSON.parse(te.text),typeof se!=="object"||se===null||Array.isArray(se))throw Error("must be a JSON object")}catch(Ge){de(Ge instanceof Error?Ge.message:"invalid JSON");return}O(!0),de(null);try{if(te.mode==="create")await cl.create(g,u,R,se);else{let Ge=te.original??{},pa=Ge.id,It={};for(let[Te,Fo]of Object.entries(se)){if(Te==="id")continue;if(JSON.stringify(Fo)!==JSON.stringify(Ge[Te]))It[Te]=Fo}if(Object.keys(It).length===0){de("no changes to save"),O(!1);return}await cl.update(g,u,R,pa,It)}j(null),await le()}catch(Ge){de(Ge instanceof Vs?`${Ge.message} (${Ge.code})`:String(Ge))}finally{O(!1)}},Ne=async(se)=>{if(!R)return;if(!confirm(`Delete row id=${JSON.stringify(se.id)} from "${R}"? This cannot be undone.`))return;O(!0);try{await cl.remove(g,u,R,se.id),await le()}catch(Ge){z(Ge)}finally{O(!1)}},He=h?Object.keys(h.tables):[],xe=Math.floor(X/Ru)+1,Xe=H!=null?Math.max(1,Math.ceil(H/Ru)):null,ht=x.includes(u)||!u?x:[u,...x],ft=[...C.map((se)=>({key:se,header:se,render:(Ge)=>XO(Ge[se])})),{key:"__actions",header:"actions",align:"right",render:(se)=>ue.jsxDEV("div",{className:"flex justify-end gap-1",children:[ue.jsxDEV(ia,{variant:"ghost",size:"sm",onPress:()=>void ve(se),children:"edit"},void 0,!1,void 0,this),ue.jsxDEV(ia,{variant:"destructive",size:"sm",isDisabled:re,onPress:()=>void Ne(se),children:"del"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}],un=ue.jsxDEV("div",{className:"flex flex-col gap-6 p-5",children:[ue.jsxDEV("div",{className:"flex flex-col gap-3",children:[ue.jsxDEV(Tu,{label:"base url",size:"sm",value:o,onChange:r,placeholder:"http://localhost:8787"},void 0,!1,void 0,this),ue.jsxDEV(Tu,{label:"admin token",size:"sm",type:"password",value:i,onChange:c,placeholder:"paste an admin JWT"},void 0,!1,void 0,this),ue.jsxDEV(mo,{size:"caption",tone:"subtle",children:'Every endpoint checks roles for "admin".'},void 0,!1,void 0,this)]},void 0,!0,void 0,this),ht.length>0?ue.jsxDEV("div",{className:"flex items-end gap-1.5",children:[ue.jsxDEV("div",{className:"min-w-0 flex-1",children:ue.jsxDEV($x,{label:"Tenant",placeholder:"select a tenant",selectedKey:u||null,onSelectionChange:(se)=>f(String(se)),children:ht.map((se)=>ue.jsxDEV(hx,{id:se,children:se===u&&!x.includes(se)?`${se} (manual)`:se},se,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this),ue.jsxDEV(ia,{variant:"ghost",size:"sm",className:"shrink-0",onPress:()=>{let se=prompt("Tenant name",u);if(se!=null&&se.trim())f(se.trim())},children:"edit"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):ue.jsxDEV(Tu,{label:"Tenant",size:"sm",value:u,onChange:f,placeholder:"main"},void 0,!1,void 0,this),ue.jsxDEV("div",{className:"flex flex-col gap-2",children:[ue.jsxDEV(mo,{size:"caption",tone:"muted",className:"font-medium uppercase tracking-wide",children:"Schema"},void 0,!1,void 0,this),h?ue.jsxDEV("div",{className:"flex items-center gap-2 rounded-full border border-border px-3 py-1 font-mono text-caption",title:"applied schema hash",children:[ue.jsxDEV("span",{className:`h-2 w-2 rounded-full ${h.hash?"bg-brand-green":"bg-fg-subtle"}`},void 0,!1,void 0,this),ue.jsxDEV("span",{className:h.hash?"text-fg-muted":"text-fg-subtle",children:h.hash?h.hash.slice(0,12):"no schema hash"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):ue.jsxDEV(mo,{size:"small",tone:"subtle",children:i?"—":"enter a token"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),ue.jsxDEV("div",{className:"flex flex-col gap-2",children:[ue.jsxDEV(mo,{size:"caption",tone:"muted",className:"font-medium uppercase tracking-wide",children:["Tables",He.length?` · ${He.length}`:""]},void 0,!0,void 0,this),He.length>0?ue.jsxDEV("ul",{className:"flex flex-col gap-1",children:He.map((se)=>ue.jsxDEV("li",{children:ue.jsxDEV("button",{className:`flex w-full items-center justify-between rounded-lg px-3 py-2 text-left text-small transition-colors ${se===R?"bg-surface-card font-medium text-fg":"text-fg-muted hover:bg-surface-card"}`,onClick:()=>w(se),children:[ue.jsxDEV("span",{children:se},void 0,!1,void 0,this),ue.jsxDEV(mo,{size:"caption",tone:"subtle",children:h.tables[se].length},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},se,!1,void 0,this))},void 0,!1,void 0,this):ue.jsxDEV(mo,{size:"small",tone:"subtle",children:i?"no tables":""},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),me=ue.jsxDEV(F0,{className:"px-6",children:[ue.jsxDEV(F0.Brand,{children:[ue.jsxDEV("span",{className:"text-callout font-bold text-fg",children:"pramen"},void 0,!1,void 0,this),ue.jsxDEV("span",{className:"text-fg-subtle",children:"admin"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),ue.jsxDEV(F0.Actions,{children:ue.jsxDEV(ia,{variant:"ghost",size:"sm","aria-label":b==="dark"?"Switch to light theme":"Switch to dark theme",onPress:()=>m(b==="dark"?"light":"dark"),children:b==="dark"?ue.jsxDEV(jE,{className:"h-4 w-4"},void 0,!1,void 0,this):ue.jsxDEV(GE,{className:"h-4 w-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return ue.jsxDEV(ue.Fragment,{children:[ue.jsxDEV(FE,{topbar:me,sidebar:un,sidebarLabel:"Admin navigation",drawerToggleLabel:"Toggle navigation",children:[ae&&ue.jsxDEV(Ff,{variant:"outlined",padding:"none",className:"mb-4 flex items-center justify-between gap-3 border-danger px-4 py-2.5",children:[ue.jsxDEV(mo,{size:"small",className:"text-danger",children:[ae.message," ",ue.jsxDEV("code",{className:"font-mono",children:ae.code},void 0,!1,void 0,this)]},void 0,!0,void 0,this),ue.jsxDEV(ia,{variant:"ghost",size:"sm",onPress:()=>U(null),children:"dismiss"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),!R?ue.jsxDEV(Ff,{variant:"outlined",padding:"lg",className:"text-center",children:[ue.jsxDEV(vx,{level:"3",className:"mb-2",children:i?"select a table":"paste an admin token to begin"},void 0,!1,void 0,this),ue.jsxDEV(mo,{tone:"muted",children:["The dashboard talks to the pramen Worker over HTTP. Tenant defaults to ",ue.jsxDEV("code",{className:"font-mono text-accent-strong",children:"main"},void 0,!1,void 0,this),"."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):ue.jsxDEV(ue.Fragment,{children:[ue.jsxDEV("div",{className:"mb-4 flex items-center gap-3",children:[ue.jsxDEV(vx,{level:"2",children:R},void 0,!1,void 0,this),ue.jsxDEV(qE,{color:"grey",label:H==null?"…":`${H} row${H===1?"":"s"}`},void 0,!1,void 0,this),ue.jsxDEV("span",{className:"flex-1"},void 0,!1,void 0,this),ue.jsxDEV(ia,{variant:"ghost",size:"sm",isDisabled:ge,onPress:()=>void le(),children:"refresh"},void 0,!1,void 0,this),ue.jsxDEV(ia,{size:"sm",onPress:W,children:"+ new row"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),ue.jsxDEV("div",{className:"mb-3 flex items-center gap-2",children:[ue.jsxDEV(ia,{variant:"secondary",size:"sm",isDisabled:X===0||ge,onPress:()=>Z(Math.max(0,X-Ru)),children:"‹ prev"},void 0,!1,void 0,this),ue.jsxDEV(mo,{size:"small",tone:"muted",children:["page ",xe,Xe!=null?` / ${Xe}`:""]},void 0,!0,void 0,this),ue.jsxDEV(ia,{variant:"secondary",size:"sm",isDisabled:ge||H!=null&&X+Ru>=H,onPress:()=>Z(X+Ru),children:"next ›"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),ge&&!L?ue.jsxDEV(mo,{tone:"subtle",className:"block py-12 text-center",children:"loading…"},void 0,!1,void 0,this):L?ue.jsxDEV(Ff,{variant:"outlined",padding:"none",className:"overflow-hidden",children:ue.jsxDEV(XE,{columns:ft,data:L,getRowKey:(se,Ge)=>String(se.id??Ge),emptyMessage:"no rows on this page","aria-label":`${R} rows`},void 0,!1,void 0,this)},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),ue.jsxDEV(Us,{isOpen:te!=null,onOpenChange:(se)=>{if(!se)j(null)},size:"lg",title:te?te.mode==="create"?`new ${R} row`:`edit ${R} · id=${JSON.stringify(te.original?.id)}`:void 0,description:te?.mode==="edit"?"Only changed fields are sent as the patch.":te?"Sent as the row's values.":void 0,children:()=>te&&ue.jsxDEV("div",{className:"flex flex-col gap-4",children:[ue.jsxDEV("label",{className:"flex flex-col gap-2",children:[ue.jsxDEV(mo,{size:"small",weight:"medium",children:"row json"},void 0,!1,void 0,this),ue.jsxDEV("textarea",{className:"min-h-[300px] w-full resize-y rounded-lg border border-border bg-surface px-4 py-3 font-mono text-caption text-fg outline-none transition-colors focus:border-brand-green focus:ring-2 focus:ring-ring",value:te.text,spellCheck:!1,onChange:(se)=>j({...te,text:se.target.value})},void 0,!1,void 0,this)]},void 0,!0,void 0,this),ye&&ue.jsxDEV(Ff,{variant:"outlined",padding:"none",className:"border-danger px-3.5 py-2.5",children:ue.jsxDEV(mo,{size:"small",className:"text-danger",children:ye},void 0,!1,void 0,this)},void 0,!1,void 0,this),ue.jsxDEV("div",{className:"flex items-center gap-2",children:[ue.jsxDEV(mo,{size:"small",tone:"subtle",children:te.mode==="edit"?"id is never modified":"id is assigned by the server unless provided"},void 0,!1,void 0,this),ue.jsxDEV("span",{className:"flex-1"},void 0,!1,void 0,this),ue.jsxDEV(ia,{variant:"ghost",onPress:()=>j(null),children:"cancel"},void 0,!1,void 0,this),ue.jsxDEV(ia,{isDisabled:re,onPress:()=>void Ce(),children:re?"saving…":te.mode==="create"?"create":"save changes"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var Tx=F(Qt(),1);tT.createRoot(document.getElementById("app")).render(Tx.jsxDEV(eT.StrictMode,{children:Tx.jsxDEV(JE,{},void 0,!1,void 0,this)},void 0,!1,void 0,this));
|
|
251
|
+
}`.trim(),document.head.prepend(u);let b=(v)=>{if(v.touches.length===2||i)return;if(!r||r===document.documentElement||r===document.body){v.preventDefault();return}if(r.scrollHeight===r.clientHeight&&r.scrollWidth===r.clientWidth)v.preventDefault()},m=(v)=>{let h=ce(v),T=v.relatedTarget;if(T&&vs(T))T.focus({preventScroll:!0}),tE(T,vs(h));else if(!T)h.parentElement?.closest("[tabindex]")?.focus({preventScroll:!0})},g=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(v){let h=tt(),T=h!=null&&vs(h);if(g.call(this,{...v,preventScroll:!0}),!v||!v.preventScroll)tE(this,T)};let x=Lo(I1(document,"touchstart",c,{passive:!1,capture:!0}),I1(document,"touchmove",b,{passive:!1,capture:!0}),I1(document,"blur",m,!0));return()=>{o(),x(),u.remove(),HTMLElement.prototype.focus=g}}function T0(o,r,i){let c=o.style[r];return o.style[r]=i,()=>{o.style[r]=c}}function I1(o,r,i,c){return o.addEventListener(r,i,c),()=>{o.removeEventListener(r,i,c)}}function tE(o,r){if(r||!_f)aE(o);else _f.addEventListener("resize",()=>aE(o),{once:!0})}function aE(o){let r=document.scrollingElement||document.documentElement,i=o;while(i&&i!==r){let c=yf(i);if(c!==document.documentElement&&c!==document.body&&c!==i){let u=c.getBoundingClientRect(),f=i.getBoundingClientRect();if(f.top<u.top||f.bottom>u.top+i.clientHeight){let b=u.bottom;if(_f)b=Math.min(b,_f.offsetTop+_f.height);let m=f.top-u.top-((b-u.top)/2-f.height/2);c.scrollTo({top:Math.max(0,Math.min(c.scrollHeight-c.clientHeight,c.scrollTop+m)),behavior:"smooth"})}}i=c.parentElement}}var oE=F(J(),1);function H1(o,r){let{triggerRef:i,popoverRef:c,groupRef:u,isNonModal:f,isKeyboardDismissDisabled:b,shouldCloseOnInteractOutside:m,...g}=o,x=g.trigger==="SubmenuTrigger",{overlayProps:v,underlayProps:h}=C0({isOpen:r.isOpen,onClose:r.close,shouldCloseOnBlur:!0,isDismissable:!f||x,isKeyboardDismissDisabled:b,shouldCloseOnInteractOutside:m},u??c),{overlayProps:T,arrowProps:R,placement:w,triggerAnchorPoint:L}=WC({...g,targetRef:i,overlayRef:c,isOpen:r.isOpen,onClose:f&&!x?r.close:null});return R0({isDisabled:f||!r.isOpen}),oE.useEffect(()=>{if(r.isOpen&&c.current)if(f)return HC(u?.current??c.current);else return $0([u?.current??c.current],{shouldUseInert:!0})},[f,r.isOpen,c,u]),{popoverProps:be(v,T),arrowProps:R,underlayProps:h,placement:w,triggerAnchorPoint:L}}var F1={};F1={dismiss:"تجاهل"};var U1={};U1={dismiss:"Отхвърляне"};var V1={};V1={dismiss:"Odstranit"};var K1={};K1={dismiss:"Luk"};var j1={};j1={dismiss:"Schließen"};var G1={};G1={dismiss:"Απόρριψη"};var q1={};q1={dismiss:"Dismiss"};var Y1={};Y1={dismiss:"Descartar"};var X1={};X1={dismiss:"Lõpeta"};var Q1={};Q1={dismiss:"Hylkää"};var Z1={};Z1={dismiss:"Rejeter"};var W1={};W1={dismiss:"התעלם"};var J1={};J1={dismiss:"Odbaci"};var ev={};ev={dismiss:"Elutasítás"};var tv={};tv={dismiss:"Ignora"};var av={};av={dismiss:"閉じる"};var ov={};ov={dismiss:"무시"};var nv={};nv={dismiss:"Atmesti"};var rv={};rv={dismiss:"Nerādīt"};var lv={};lv={dismiss:"Lukk"};var iv={};iv={dismiss:"Negeren"};var sv={};sv={dismiss:"Zignoruj"};var cv={};cv={dismiss:"Descartar"};var uv={};uv={dismiss:"Dispensar"};var dv={};dv={dismiss:"Revocare"};var fv={};fv={dismiss:"Пропустить"};var pv={};pv={dismiss:"Zrušiť"};var mv={};mv={dismiss:"Opusti"};var bv={};bv={dismiss:"Odbaci"};var gv={};gv={dismiss:"Avvisa"};var hv={};hv={dismiss:"Kapat"};var $v={};$v={dismiss:"Скасувати"};var yv={};yv={dismiss:"取消"};var vv={};vv={dismiss:"關閉"};var xv={};xv={"ar-AE":F1,"bg-BG":U1,"cs-CZ":V1,"da-DK":K1,"de-DE":j1,"el-GR":G1,"en-US":q1,"es-ES":Y1,"et-EE":X1,"fi-FI":Q1,"fr-FR":Z1,"he-IL":W1,"hr-HR":J1,"hu-HU":ev,"it-IT":tv,"ja-JP":av,"ko-KR":ov,"lt-LT":nv,"lv-LV":rv,"nb-NO":lv,"nl-NL":iv,"pl-PL":sv,"pt-BR":cv,"pt-PT":uv,"ro-RO":dv,"ru-RU":fv,"sk-SK":pv,"sl-SI":mv,"sr-SP":bv,"sv-SE":gv,"tr-TR":hv,"uk-UA":$v,"zh-CN":yv,"zh-TW":vv};var Sv=F(J(),1);function eO(o){return o&&o.__esModule?o.default:o}function hu(o){let{onDismiss:r,...i}=o,c=Ss(eO(xv),"@react-aria/overlays"),u=ni(i,c.format("dismiss")),f=()=>{if(r)r()};return Sv.default.createElement(G9,null,Sv.default.createElement("button",{...u,tabIndex:-1,onClick:f,style:{width:1,height:1}}))}var ks=F(J(),1);function nE({children:o}){let r=ks.useMemo(()=>({register:()=>{}}),[]);return ks.default.createElement(gf.Provider,{value:r},o)}var zf=F(J(),1),tO=zf.createContext({});function rE(){return zf.useContext(tO)??{}}var Pn=F(J(),1),lE=F(sr(),1),iE=Pn.default.createContext(null);function $u(o){let r=Xa(),{portalContainer:i=r?null:document.body,isExiting:c}=o,[u,f]=Pn.useState(!1),b=Pn.useMemo(()=>({contain:u,setContain:f}),[u,f]),{getContainer:m}=rE();if(!o.portalContainer&&m)i=m();if(!i)return null;let g=o.children;if(!o.disableFocusManagement)g=Pn.default.createElement(Df,{restoreFocus:!0,contain:(o.shouldContainFocus||u)&&!c},g);return g=Pn.default.createElement(iE.Provider,{value:b},Pn.default.createElement(nE,null,g)),lE.default.createPortal(g,i)}function w0(){let r=Pn.useContext(iE)?.setContain;Le(()=>{r?.(!0)},[r])}var D0=F(J(),1);function _s(o){let[r,i]=Tn(o.isOpen,o.defaultOpen||!1,o.onOpenChange),c=D0.useCallback(()=>{i(!0)},[i]),u=D0.useCallback(()=>{i(!1)},[i]),f=D0.useCallback(()=>{i(!r)},[i,r]);return{isOpen:r,setOpen:i,open:c,close:u,toggle:f}}var gt=F(J(),1);var sE=F(sr(),1),yu=F(J(),1);function hi(o,r=!0){let[i,c]=yu.useState(!0),u=i&&r;return Le(()=>{if(u&&o.current&&"getAnimations"in o.current){for(let f of o.current.getAnimations())if(f instanceof CSSTransition)f.cancel()}},[o,u]),cE(o,u,yu.useCallback(()=>c(!1),[])),u}function $i(o,r){let[i,c]=yu.useState(r?"open":"closed");switch(i){case"open":if(!r)c("exiting");break;case"closed":case"exiting":if(r)c("open");break}let u=i==="exiting";return cE(o,u,yu.useCallback(()=>{c((f)=>f==="exiting"?"closed":f)},[])),u}function cE(o,r,i){Le(()=>{if(r&&o.current){if(!("getAnimations"in o.current)){i();return}let c=o.current.getAnimations();if(c.length===0){i();return}let u=!1;return Promise.allSettled(c.map((f)=>f.finished)).then(()=>{if(!u)sE.flushSync(()=>{i()})}),()=>{u=!0}}},[o,r,i])}var A0=gt.createContext(null),uE=gt.createContext(null),yi=gt.forwardRef(function(r,i){[r,i]=bt(r,i,A0);let c=gt.useContext(vr),u=_s(r),f=r.isOpen!=null||r.defaultOpen!=null||!c?u:c,b=$i(i,f.isOpen)||r.isExiting||!1,m=Ky(),{direction:g}=Pa();if(m){let x=r.children;if(typeof x==="function")x=x({trigger:r.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null});return gt.default.createElement(gt.default.Fragment,null,x)}if(f&&!f.isOpen&&!b)return null;return gt.default.createElement(aO,{...r,triggerRef:r.triggerRef,state:f,popoverRef:i,isExiting:b,dir:g})});function aO({state:o,isExiting:r,UNSTABLE_portalContainer:i,clearContexts:c,...u}){let f=gt.useRef(null),b=gt.useRef(null),m=gt.useContext(uE),g=m&&u.trigger==="SubmenuTrigger",{popoverProps:x,underlayProps:v,arrowProps:h,placement:T,triggerAnchorPoint:R}=H1({...u,offset:u.offset??8,arrowRef:f,groupRef:g?m:b},o),w=u.popoverRef,L=hi(w,!!T)||u.isEntering||!1,M=dt({...u,defaultClassName:"react-aria-Popover",values:{trigger:u.trigger||null,placement:T,isEntering:L,isExiting:r}}),H=!u.isNonModal||u.trigger==="SubmenuTrigger",[I,X]=gt.useState(!1);Le(()=>{if(w.current)X(H&&!w.current.querySelector("[role=dialog]"))},[w,H]),gt.useEffect(()=>{if(I&&(u.trigger!=="SubmenuTrigger"||mr()!=="pointer")&&w.current&&!pr(w.current))Za(w.current)},[I,w,u.trigger]);let Z=gt.useMemo(()=>{let j=M.children;if(c)for(let ye of c)j=gt.default.createElement(ye.Provider,{value:null},j);return j},[M.children,c]),[ge,he]=gt.useState(null),ae=gt.useCallback(()=>{if(u.triggerRef.current)he(u.triggerRef.current.getBoundingClientRect().width+"px")},[u.triggerRef]);Le(ae,[ae]),gu({ref:M.style?.["--trigger-width"]?void 0:u.triggerRef,onResize:ae});let U={...x.style,"--trigger-anchor-point":R?`${R.x}px ${R.y}px`:void 0,...M.style,"--trigger-width":M.style?.["--trigger-width"]||ge},te=gt.default.createElement(qe.div,{...be(_e(u,{global:!0}),x),...M,role:I?"dialog":void 0,tabIndex:I?-1:void 0,"aria-label":u["aria-label"],"aria-labelledby":u["aria-labelledby"],ref:w,slot:u.slot||void 0,style:U,dir:u.dir,"data-trigger":u.trigger,"data-placement":T,"data-entering":L||void 0,"data-exiting":r||void 0},!u.isNonModal&>.default.createElement(hu,{onDismiss:o.close}),gt.default.createElement(BC.Provider,{value:{...h,placement:T,ref:f}},Z),gt.default.createElement(hu,{onDismiss:o.close}));if(!g)return gt.default.createElement($u,{...u,shouldContainFocus:I,isExiting:r,portalContainer:i},!u.isNonModal&&o.isOpen&>.default.createElement("div",{"data-testid":"underlay",...v,style:{position:"fixed",inset:0}}),gt.default.createElement("div",{ref:b,style:{display:"contents"}},gt.default.createElement(uE.Provider,{value:b},te)));return gt.default.createElement($u,{...u,shouldContainFocus:I,isExiting:r,portalContainer:i??m?.current??void 0},te)}var P0=F(J(),1),dE=P0.createContext({});var Cv={};Cv={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var Ev={};Ev={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var Tv={};Tv={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var Rv={};Rv={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var wv={};wv={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var Dv={};Dv={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var Av={};Av={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var Pv={};Pv={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var Mv={};Mv={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var Ov={};Ov={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var Nv={};Nv={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var Lv={};Lv={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var kv={};kv={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var _v={};_v={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var zv={};zv={longPressMessage:"Premi a lungo o premi Alt + Freccia giù per aprire il menu"};var Bv={};Bv={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var Iv={};Iv={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var Hv={};Hv={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var Fv={};Fv={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var Uv={};Uv={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var Vv={};Vv={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var Kv={};Kv={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var jv={};jv={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var Gv={};Gv={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var qv={};qv={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var Yv={};Yv={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var Xv={};Xv={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var Qv={};Qv={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var Zv={};Zv={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var Wv={};Wv={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var Jv={};Jv={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var e2={};e2={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var t2={};t2={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var a2={};a2={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var o2={};o2={"ar-AE":Cv,"bg-BG":Ev,"cs-CZ":Tv,"da-DK":Rv,"de-DE":wv,"el-GR":Dv,"en-US":Av,"es-ES":Pv,"et-EE":Mv,"fi-FI":Ov,"fr-FR":Nv,"he-IL":Lv,"hr-HR":kv,"hu-HU":_v,"it-IT":zv,"ja-JP":Bv,"ko-KR":Iv,"lt-LT":Hv,"lv-LV":Fv,"nb-NO":Uv,"nl-NL":Vv,"pl-PL":Kv,"pt-BR":jv,"pt-PT":Gv,"ro-RO":qv,"ru-RU":Yv,"sk-SK":Xv,"sl-SI":Qv,"sr-SP":Zv,"sv-SE":Wv,"tr-TR":Jv,"uk-UA":e2,"zh-CN":t2,"zh-TW":a2};var fE=F(J(),1);function pE(o,r,i){let{type:c}=o,{isOpen:u}=r;fE.useEffect(()=>{if(i&&i.current)z1.set(i.current,r.close)});let f=void 0;if(c==="menu")f=!0;else if(c==="listbox")f="listbox";let b=vt();return{triggerProps:{"aria-haspopup":f,"aria-expanded":u,"aria-controls":u?b:void 0,onPress:r.toggle},overlayProps:{id:b}}}function oO(o){return o&&o.__esModule?o.default:o}function n2(o,r,i){let{type:c="menu",isDisabled:u,trigger:f="press"}=o,b=vt(),{triggerProps:m,overlayProps:g}=pE({type:c},r,i),x=(R)=>{if(u)return;if(f==="longPress"&&!R.altKey)return;if(i&&i.current)switch(R.key){case"Enter":case" ":if(f==="longPress"||R.isDefaultPrevented())return;case"ArrowDown":if(!("continuePropagation"in R))R.stopPropagation();R.preventDefault(),r.toggle("first");break;case"ArrowUp":if(!("continuePropagation"in R))R.stopPropagation();R.preventDefault(),r.toggle("last");break;default:if("continuePropagation"in R)R.continuePropagation()}},v=Ss(oO(o2),"@react-aria/menu"),{longPressProps:h}=f0({isDisabled:u||f!=="longPress",accessibilityDescription:v.format("longPressMessage"),onLongPressStart(){r.close()},onLongPress(){r.open("first")}}),T={preventFocusOnPress:!0,onPressStart(R){if(R.pointerType!=="touch"&&R.pointerType!=="keyboard"&&!u)Sa(R.target),r.open(R.pointerType==="virtual"?"first":null)},onPress(R){if(R.pointerType==="touch"&&!u)Sa(R.target),r.toggle()}};return delete m.onPress,{menuTriggerProps:{...m,...f==="press"?T:h,id:b,onKeyDown:x},menuProps:{...g,"aria-labelledby":b,autoFocus:r.focusStrategy||!0,onClose:r.close}}}var mE=new WeakMap;var r2=F(J(),1);function l2(o,r,i){let{id:c,key:u,closeOnSelect:f,shouldCloseOnSelect:b,isVirtualized:m,"aria-haspopup":g,onPressStart:x,onPressUp:v,onPress:h,onPressChange:T,onPressEnd:R,onClick:w,onHoverStart:L,onHoverChange:M,onHoverEnd:H,onKeyDown:I,onKeyUp:X,onFocus:Z,onFocusChange:ge,onBlur:he,selectionManager:ae=r.selectionManager}=o,U=!!g,te=U&&o["aria-expanded"]==="true",j=o.isDisabled??ae.isDisabled(u),ye=o.isSelected??ae.isSelected(u),de=mE.get(r),re=r.collection.getItem(u),O=o.onClose||de.onClose,z=hs(),K=()=>{if(U)return;if(re?.props?.onAction)re.props.onAction();else if(o.onAction)o.onAction(u);if(de.onAction){let Te=de.onAction;Te(u)}},V="menuitem";if(!U){if(ae.selectionMode==="single")V="menuitemradio";else if(ae.selectionMode==="multiple")V="menuitemcheckbox"}let le=on(),Q=on(),C=on(),W={id:c,"aria-disabled":j||void 0,role:V,"aria-label":o["aria-label"],"aria-labelledby":le,"aria-describedby":[o["aria-describedby"],Q,C].filter(Boolean).join(" ")||void 0,"aria-controls":o["aria-controls"],"aria-haspopup":g,"aria-expanded":o["aria-expanded"]};if(ae.selectionMode!=="none"&&!U)W["aria-checked"]=ye;if(m){let Te=Number(re?.index);W["aria-posinset"]=Number.isNaN(Te)?void 0:Te+1,W["aria-setsize"]=Pf(r.collection)}let ve=r2.useRef(!1),Ce=(Te)=>{T?.(Te),ve.current=Te},Ne=r2.useRef(null),He=(Te)=>{if(Te.pointerType!=="keyboard")Ne.current={pointerType:Te.pointerType};if(Te.pointerType==="mouse"){if(!ve.current)Te.target.click()}v?.(Te)},xe=(Te)=>{w?.(Te),K(),u9(Te,z,re.props.href,re?.props.routerOptions);let Fo=Ne.current?.pointerType==="keyboard"?Ne.current?.key==="Enter"||ae.selectionMode==="none"||ae.isLink(u):ae.selectionMode!=="multiple"||ae.isLink(u);if(Fo=b??f??Fo,O&&!U&&Fo)O();Ne.current=null},{itemProps:Xe,isFocused:ht}=pu({id:c,selectionManager:ae,key:u,ref:i,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:de.shouldUseVirtualFocus}),{pressProps:ft,isPressed:un}=ui({onPressStart:x,onPress:h,onPressUp:He,onPressChange:Ce,onPressEnd:R,isDisabled:j}),{hoverProps:me}=Oa({isDisabled:j,onHoverStart(Te){if(!En()&&!(te&&g))ae.setFocused(!0),ae.setFocusedKey(u);L?.(Te)},onHoverChange:M,onHoverEnd:H}),{keyboardProps:se}=Ts({onKeyDown:(Te)=>{if(Te.repeat){Te.continuePropagation();return}switch(Te.key){case" ":Ne.current={pointerType:"keyboard",key:" "},ce(Te).click(),ai("keyboard");break;case"Enter":if(Ne.current={pointerType:"keyboard",key:"Enter"},ce(Te).tagName!=="A")ce(Te).click();ai("keyboard");break;default:if(!U)Te.continuePropagation();I?.(Te);break}},onKeyUp:X}),{focusableProps:Ge}=ii({onBlur:he,onFocus:Z,onFocusChange:ge},i),pa=_e(re?.props);delete pa.id;let It=Wc(re?.props);return{menuItemProps:{...W,...be(pa,It,U?{onFocus:Xe.onFocus,"data-collection":Xe["data-collection"],"data-key":Xe["data-key"]}:Xe,ft,me,se,Ge,de.shouldUseVirtualFocus||U?{onMouseDown:(Te)=>Te.preventDefault()}:void 0,j?void 0:{onClick:xe}),tabIndex:Xe.tabIndex!=null&&te&&!de.shouldUseVirtualFocus?-1:Xe.tabIndex},labelProps:{id:le},descriptionProps:{id:Q},keyboardShortcutProps:{id:C},isFocused:ht,isFocusVisible:ht&&ae.isFocused&&En()&&!te,isSelected:ye,isPressed:un,isDisabled:j}}var fo=F(J(),1);var gE=fo.createContext(null);var nO=fo.createContext(null);class rO extends Bo{static{this.type="submenutrigger"}filter(o,r,i){let c=o.getItem(this.firstChildKey);if(c&&i(c.textValue,this)){let u=this.clone();return r.addDescendants(u,o),u}return null}}var bE=fo.createContext(null),zs=hr(su,function(r,i,c){[r,i]=bt(r,i,bE);let u=fr(bE)?.id,f=fo.useContext(gE),b=Qa(i),m=fo.useContext(nO),{isVirtualized:g}=fo.useContext(ol),{menuItemProps:x,labelProps:v,descriptionProps:h,keyboardShortcutProps:T,...R}=l2({...r,id:u,key:c.key,selectionManager:m,isVirtualized:g},f,b),{hoverProps:w,isHovered:L}=Oa({isDisabled:R.isDisabled}),M=dt({...r,id:void 0,children:c.rendered,defaultClassName:"react-aria-MenuItem",values:{...R,isHovered:L,isFocusVisible:R.isFocusVisible,selectionMode:m.selectionMode,selectionBehavior:m.selectionBehavior,hasSubmenu:!!r["aria-haspopup"],isOpen:r["aria-expanded"]==="true"}}),H=r.href?qe.a:qe.div,I=_e(r,{global:!0});return delete I.id,delete I.onClick,fo.default.createElement(H,{...be(I,M,x,w),ref:b,"data-disabled":R.isDisabled||void 0,"data-hovered":L||void 0,"data-focused":R.isFocused||void 0,"data-focus-visible":R.isFocusVisible||void 0,"data-pressed":R.isPressed||void 0,"data-selected":R.isSelected||void 0,"data-selection-mode":m.selectionMode==="none"?void 0:m.selectionMode,"data-has-submenu":!!r["aria-haspopup"]||void 0,"data-open":r["aria-expanded"]==="true"||void 0},fo.default.createElement(xa,{values:[[rn,{slots:{[dr]:v,label:v,description:h}}],[dE,T],[du,{isSelected:R.isSelected}]]},M.children))});var vu=F(J(),1);function i2(o,r){let{role:i="dialog"}=o,c=on();c=o["aria-label"]?void 0:c;let u=vu.useRef(!1);vu.useEffect(()=>{if(r.current&&!pr(r.current)){Za(r.current);let b=setTimeout(()=>{if(tt()===r.current||tt()===document.body){if(u.current=!0,r.current)r.current.blur(),Za(r.current);u.current=!1}},500);return()=>{clearTimeout(b)}}},[r]),w0();let f=vu.useRef(!1);return vu.useEffect(()=>{if(!f.current&&r.current){let b=r.current,m=b.hasAttribute("aria-label"),g=b.hasAttribute("aria-labelledby");if(!m&&!g)console.warn("A dialog must have a title for accessibility. Either provide an aria-label or aria-labelledby prop, or render a heading element inside the dialog."),f.current=!0}}),{dialogProps:{..._e(o,{labelable:!0}),role:i,tabIndex:-1,"aria-labelledby":o["aria-labelledby"]||c,onBlur:(b)=>{if(u.current)b.stopPropagation()}},titleProps:{id:c}}}var Mn=F(J(),1);var hE=Mn.createContext(null),vr=Mn.createContext(null);var Bf=Mn.forwardRef(function(r,i){let c=r["aria-labelledby"];[r,i]=bt(r,i,hE);let{dialogProps:u,titleProps:f}=i2({...r,"aria-labelledby":c},i),b=Mn.useContext(vr);if(!u["aria-label"]&&!u["aria-labelledby"])if(r["aria-labelledby"])u["aria-labelledby"]=r["aria-labelledby"];else console.warn('If a Dialog does not contain a <Heading slot="title">, it must have an aria-label or aria-labelledby attribute for accessibility.');let m=dt({defaultClassName:"react-aria-Dialog",className:r.className,style:r.style,children:r.children,values:{close:b?.close||(()=>{})}}),g=_e(r,{global:!0});return Mn.default.createElement(qe.section,{...be(g,m,u),render:r.render,ref:i,slot:r.slot||void 0},Mn.default.createElement(xa,{values:[[Fb,{slots:{[dr]:{},title:{...f,level:2}}}],[br,{slots:{[dr]:{},close:{onPress:()=>b?.close()}}}]]},m.children))});var M0=F(J(),1);function s2(o,r){let{inputElementType:i="input",isDisabled:c=!1,isRequired:u=!1,isReadOnly:f=!1,type:b="text",validationBehavior:m="aria"}=o,[g,x]=Tn(o.value,o.defaultValue||"",o.onChange),{focusableProps:v}=ii(o,r),h=xf({...o,value:g}),{isInvalid:T,validationErrors:R,validationDetails:w}=h.displayValidation,{labelProps:L,fieldProps:M,descriptionProps:H,errorMessageProps:I}=jb({...o,isInvalid:T,errorMessage:o.errorMessage||R}),X=_e(o,{labelable:!0}),Z={type:b,pattern:o.pattern},[ge]=M0.useState(g);return Gb(r,o.defaultValue??ge,x),Yb(o,h,r),{labelProps:L,inputProps:be(X,i==="input"?Z:void 0,{disabled:c,readOnly:f,required:u&&m==="native","aria-required":u&&m==="aria"||void 0,"aria-invalid":T||void 0,"aria-errormessage":o["aria-errormessage"],"aria-activedescendant":o["aria-activedescendant"],"aria-autocomplete":o["aria-autocomplete"],"aria-haspopup":o["aria-haspopup"],"aria-controls":o["aria-controls"],value:g,onChange:(he)=>x(ce(he).value),autoComplete:o.autoComplete,autoCapitalize:o.autoCapitalize,maxLength:o.maxLength,minLength:o.minLength,name:o.name,form:o.form,placeholder:o.placeholder,inputMode:o.inputMode,autoCorrect:o.autoCorrect,spellCheck:o.spellCheck,[parseInt(M0.default.version,10)>=17?"enterKeyHint":"enterkeyhint"]:o.enterKeyHint,onCopy:o.onCopy,onCut:o.onCut,onPaste:o.onPaste,onCompositionEnd:o.onCompositionEnd,onCompositionStart:o.onCompositionStart,onCompositionUpdate:o.onCompositionUpdate,onSelect:o.onSelect,onBeforeInput:o.onBeforeInput,onInput:o.onInput,...v,...M}),descriptionProps:H,errorMessageProps:I,isInvalid:T,validationErrors:R,validationDetails:w}}var $E=F(J(),1);function c2(o={}){let{locale:r}=Pa();return $E.useMemo(()=>new Intl.ListFormat(r,o),[r,o])}var yE=F(sr(),1),Bs=F(J(),1);function u2(o,r,i){let{isDisabled:c}=o,u=vt(),f=vt(),b=Xa(),m=Bs.useRef(null),g=Bs.useCallback(()=>{m.current=requestAnimationFrame(()=>{if(i.current)i.current.setAttribute("hidden","until-found")}),yE.flushSync(()=>{r.toggle()})},[i,r]);xs(i,"beforematch",g);let x=Bs.useRef(null);return Le(()=>{if(m.current)cancelAnimationFrame(m.current);if(i.current&&!b){let v=i.current;if(x.current==null||typeof v.getAnimations!=="function")if(r.isExpanded)v.removeAttribute("hidden"),v.style.setProperty("--disclosure-panel-width","auto"),v.style.setProperty("--disclosure-panel-height","auto");else v.setAttribute("hidden","until-found"),v.style.setProperty("--disclosure-panel-width","0px"),v.style.setProperty("--disclosure-panel-height","0px");else if(r.isExpanded!==x.current)if(r.isExpanded)v.removeAttribute("hidden"),v.style.setProperty("--disclosure-panel-width",v.scrollWidth+"px"),v.style.setProperty("--disclosure-panel-height",v.scrollHeight+"px"),Promise.all(v.getAnimations().map((h)=>h.finished)).then(()=>{v.style.setProperty("--disclosure-panel-width","auto"),v.style.setProperty("--disclosure-panel-height","auto")}).catch(()=>{});else v.style.setProperty("--disclosure-panel-width",v.scrollWidth+"px"),v.style.setProperty("--disclosure-panel-height",v.scrollHeight+"px"),window.getComputedStyle(v).height,v.style.setProperty("--disclosure-panel-width","0px"),v.style.setProperty("--disclosure-panel-height","0px"),Promise.all(v.getAnimations().map((h)=>h.finished)).then(()=>v.setAttribute("hidden","until-found")).catch(()=>{});x.current=r.isExpanded}},[c,i,r.isExpanded,b]),Bs.useEffect(()=>()=>{if(m.current)cancelAnimationFrame(m.current)},[]),{buttonProps:{id:u,"aria-expanded":r.isExpanded,"aria-controls":f,onPress:(v)=>{if(!c&&v.pointerType!=="keyboard")r.toggle()},isDisabled:c,onPressStart(v){if(v.pointerType==="keyboard"&&!c)r.toggle()}},panelProps:{id:f,role:"group","aria-labelledby":u,"aria-hidden":!r.isExpanded,hidden:b?!r.isExpanded:void 0}}}var O0=F(J(),1);function d2(o){let[r,i]=Tn(o.isExpanded,o.defaultExpanded||!1,o.onExpandedChange),c=O0.useCallback(()=>{i(!0)},[i]),u=O0.useCallback(()=>{i(!1)},[i]),f=O0.useCallback(()=>{i(!r)},[i,r]);return{isExpanded:r,setExpanded:i,expand:c,collapse:u,toggle:f}}var Na=F(J(),1);var vE=Na.createContext(null);var xE=Na.createContext(null),SE=Na.createContext(null),CE=Na.createContext(null),f2=Na.forwardRef(function(r,i){[r,i]=bt(r,i,xE);let c=Na.useContext(vE),{id:u,...f}=r,b=vt();u||=b;let m=c?c.expandedKeys.has(u):r.isExpanded,g=d2({...r,isExpanded:m,onExpandedChange(H){if(c)c.toggleKey(u);r.onExpandedChange?.(H)}}),x=Na.default.useRef(null),v=r.isDisabled||c?.isDisabled||!1,{buttonProps:h,panelProps:T}=u2({...r,isExpanded:m,isDisabled:v},g,x),{isFocusVisible:R,focusProps:w}=Ma({within:!0}),L=dt({...r,id:void 0,defaultClassName:"react-aria-Disclosure",values:{isExpanded:g.isExpanded,isDisabled:v,isFocusVisibleWithin:R,state:g}}),M=_e(f,{global:!0});return Na.default.createElement(xa,{values:[[br,{slots:{[dr]:{},trigger:h}}],[CE,{panelProps:T,panelRef:x}],[SE,g]]},Na.default.createElement(qe.div,{...be(M,L,w),ref:i,"data-expanded":g.isExpanded||void 0,"data-disabled":v||void 0,"data-focus-visible-within":R||void 0},L.children))}),p2=Na.forwardRef(function(r,i){let{role:c="group"}=r,{panelProps:u,panelRef:f}=Na.useContext(CE),{isFocusVisible:b,focusProps:m}=Ma({within:!0}),g=dt({...r,defaultClassName:"react-aria-DisclosurePanel",values:{isFocusVisibleWithin:b}}),x=_e(r,{global:!0,labelable:!0});return Na.default.createElement(qe.div,{...be(x,g,u,m),ref:ur(i,f),role:c,"data-focus-visible-within":b||void 0},Na.default.createElement(xa,{values:[[br,null]]},r.children))});var m2={};m2={colorSwatchPicker:"تغييرات الألوان",dropzoneLabel:"DropZone",selectPlaceholder:"حدد عنصرًا",tableResizer:"أداة تغيير الحجم"};var b2={};b2={colorSwatchPicker:"Цветови мостри",dropzoneLabel:"DropZone",selectPlaceholder:"Изберете предмет",tableResizer:"Преоразмерител"};var g2={};g2={colorSwatchPicker:"Vzorky barev",dropzoneLabel:"Místo pro přetažení",selectPlaceholder:"Vyberte položku",tableResizer:"Změna velikosti"};var h2={};h2={colorSwatchPicker:"Farveprøver",dropzoneLabel:"DropZone",selectPlaceholder:"Vælg et element",tableResizer:"Størrelsesændring"};var $2={};$2={colorSwatchPicker:"Farbfelder",dropzoneLabel:"Ablegebereich",selectPlaceholder:"Element wählen",tableResizer:"Größenanpassung"};var y2={};y2={colorSwatchPicker:"Χρωματικά δείγματα",dropzoneLabel:"DropZone",selectPlaceholder:"Επιλέξτε ένα αντικείμενο",tableResizer:"Αλλαγή μεγέθους"};var v2={};v2={selectPlaceholder:"Select an item",tableResizer:"Resizer",dropzoneLabel:"DropZone",colorSwatchPicker:"Color swatches"};var x2={};x2={colorSwatchPicker:"Muestras de colores",dropzoneLabel:"DropZone",selectPlaceholder:"Seleccionar un artículo",tableResizer:"Cambiador de tamaño"};var S2={};S2={colorSwatchPicker:"Värvinäidised",dropzoneLabel:"DropZone",selectPlaceholder:"Valige üksus",tableResizer:"Suuruse muutja"};var C2={};C2={colorSwatchPicker:"Värimallit",dropzoneLabel:"DropZone",selectPlaceholder:"Valitse kohde",tableResizer:"Koon muuttaja"};var E2={};E2={colorSwatchPicker:"Échantillons de couleurs",dropzoneLabel:"DropZone",selectPlaceholder:"Sélectionner un élément",tableResizer:"Redimensionneur"};var T2={};T2={colorSwatchPicker:"דוגמיות צבע",dropzoneLabel:"DropZone",selectPlaceholder:"בחר פריט",tableResizer:"שינוי גודל"};var R2={};R2={colorSwatchPicker:"Uzorci boja",dropzoneLabel:"Zona spuštanja",selectPlaceholder:"Odaberite stavku",tableResizer:"Promjena veličine"};var w2={};w2={colorSwatchPicker:"Színtárak",dropzoneLabel:"DropZone",selectPlaceholder:"Válasszon ki egy elemet",tableResizer:"Átméretező"};var D2={};D2={colorSwatchPicker:"Campioni di colore",dropzoneLabel:"Zona di rilascio",selectPlaceholder:"Seleziona un elemento",tableResizer:"Ridimensionamento"};var A2={};A2={colorSwatchPicker:"カラースウォッチ",dropzoneLabel:"ドロップゾーン",selectPlaceholder:"項目を選択",tableResizer:"サイズ変更ツール"};var P2={};P2={colorSwatchPicker:"색상 견본",dropzoneLabel:"드롭 영역",selectPlaceholder:"항목 선택",tableResizer:"크기 조정기"};var M2={};M2={colorSwatchPicker:"Spalvų pavyzdžiai",dropzoneLabel:"„DropZone“",selectPlaceholder:"Pasirinkite elementą",tableResizer:"Dydžio keitiklis"};var O2={};O2={colorSwatchPicker:"Krāsu paraugi",dropzoneLabel:"DropZone",selectPlaceholder:"Izvēlēties vienumu",tableResizer:"Izmēra mainītājs"};var N2={};N2={colorSwatchPicker:"Fargekart",dropzoneLabel:"Droppsone",selectPlaceholder:"Velg et element",tableResizer:"Størrelsesendrer"};var L2={};L2={colorSwatchPicker:"kleurstalen",dropzoneLabel:"DropZone",selectPlaceholder:"Selecteer een item",tableResizer:"Resizer"};var k2={};k2={colorSwatchPicker:"Próbki kolorów",dropzoneLabel:"Strefa upuszczania",selectPlaceholder:"Wybierz element",tableResizer:"Zmiana rozmiaru"};var _2={};_2={colorSwatchPicker:"Amostras de cores",dropzoneLabel:"DropZone",selectPlaceholder:"Selecione um item",tableResizer:"Redimensionador"};var z2={};z2={colorSwatchPicker:"Amostras de cores",dropzoneLabel:"DropZone",selectPlaceholder:"Selecione um item",tableResizer:"Redimensionador"};var B2={};B2={colorSwatchPicker:"Specimene de culoare",dropzoneLabel:"Zonă de plasare",selectPlaceholder:"Selectați un element",tableResizer:"Instrument de redimensionare"};var I2={};I2={colorSwatchPicker:"Цветовые образцы",dropzoneLabel:"DropZone",selectPlaceholder:"Выберите элемент",tableResizer:"Средство изменения размера"};var H2={};H2={colorSwatchPicker:"Vzorkovníky farieb",dropzoneLabel:"DropZone",selectPlaceholder:"Vyberte položku",tableResizer:"Nástroj na zmenu veľkosti"};var F2={};F2={colorSwatchPicker:"Barvne palete",dropzoneLabel:"DropZone",selectPlaceholder:"Izberite element",tableResizer:"Spreminjanje velikosti"};var U2={};U2={colorSwatchPicker:"Uzorci boje",dropzoneLabel:"DropZone",selectPlaceholder:"Izaberite stavku",tableResizer:"Promena veličine"};var V2={};V2={colorSwatchPicker:"Färgrutor",dropzoneLabel:"DropZone",selectPlaceholder:"Välj en artikel",tableResizer:"Storleksändrare"};var K2={};K2={colorSwatchPicker:"Renk örnekleri",dropzoneLabel:"Bırakma Bölgesi",selectPlaceholder:"Bir öğe seçin",tableResizer:"Yeniden boyutlandırıcı"};var j2={};j2={colorSwatchPicker:"Зразки кольорів",dropzoneLabel:"DropZone",selectPlaceholder:"Виберіть елемент",tableResizer:"Засіб змінення розміру"};var G2={};G2={colorSwatchPicker:"颜色色板",dropzoneLabel:"放置区域",selectPlaceholder:"选择一个项目",tableResizer:"尺寸调整器"};var q2={};q2={colorSwatchPicker:"色票",dropzoneLabel:"放置區",selectPlaceholder:"選取項目",tableResizer:"大小調整器"};var Y2={};Y2={"ar-AE":m2,"bg-BG":b2,"cs-CZ":g2,"da-DK":h2,"de-DE":$2,"el-GR":y2,"en-US":v2,"es-ES":x2,"et-EE":S2,"fi-FI":C2,"fr-FR":E2,"he-IL":T2,"hr-HR":R2,"hu-HU":w2,"it-IT":D2,"ja-JP":A2,"ko-KR":P2,"lt-LT":M2,"lv-LV":O2,"nb-NO":N2,"nl-NL":L2,"pl-PL":k2,"pt-BR":_2,"pt-PT":z2,"ro-RO":B2,"ru-RU":I2,"sk-SK":H2,"sl-SI":F2,"sr-SP":U2,"sv-SE":V2,"tr-TR":K2,"uk-UA":j2,"zh-CN":G2,"zh-TW":q2};var EE=F(J(),1);function X2(o,r,i){let{overlayProps:c,underlayProps:u}=C0({...o,isOpen:r.isOpen,onClose:r.close},i);return R0({isDisabled:!r.isOpen}),w0(),EE.useEffect(()=>{if(r.isOpen&&i.current)return $0([i.current],{shouldUseInert:!0})},[r.isOpen,i]),{modalProps:be(c),underlayProps:u}}var Bt=F(J(),1);var N0=F(J(),1),po=typeof document<"u"&&window.visualViewport;function Z2(){let o=Xa(),[r,i]=N0.useState(()=>o?{width:0,height:0}:Q2());return N0.useEffect(()=>{let c=(m)=>{i((g)=>{if(m.width===g.width&&m.height===g.height)return g;return m})},u=()=>{if(po&&po.scale>1)return;c(Q2())},f,b=(m)=>{if(po&&po.scale>1)return;if(vs(ce(m)))f=requestAnimationFrame(()=>{let g=tt();if(!g||!vs(g))c({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight})})};if(c(Q2()),Cn())window.addEventListener("blur",b,!0);if(!po)window.addEventListener("resize",u);else po.addEventListener("resize",u);return()=>{if(cancelAnimationFrame(f),Cn())window.removeEventListener("blur",b,!0);if(!po)window.removeEventListener("resize",u);else po.removeEventListener("resize",u)}},[]),r}function Q2(){return{width:po?Math.min(po.width*po.scale,document.documentElement.clientWidth):document.documentElement.clientWidth,height:po?po.height*po.scale:document.documentElement.clientHeight}}var RE=Bt.createContext(null),W2=Bt.createContext(null),If=Bt.forwardRef(function(r,i){if(Bt.useContext(W2)){if(r.onOpenChange||r.defaultOpen!==void 0||r.isOpen!==void 0){let L=new Set(["isDismissable","isKeyboardDismissDisabled","isOpen","defaultOpen","onOpenChange","isEntering","isExiting","UNSTABLE_portalContainer","shouldCloseOnInteractOutside"]),M=Object.keys(r).filter((H)=>L.has(H));console.warn(`This modal is already wrapped in a ModalOverlay, props [${M.join(", ")}] should be placed on the ModalOverlay instead.`)}return Bt.default.createElement(TE,{...r,modalRef:i},r.children)}let{isDismissable:u,isKeyboardDismissDisabled:f,isOpen:b,defaultOpen:m,onOpenChange:g,children:x,isEntering:v,isExiting:h,UNSTABLE_portalContainer:T,shouldCloseOnInteractOutside:R,...w}=r;return Bt.default.createElement(xu,{isDismissable:u,isKeyboardDismissDisabled:f,isOpen:b,defaultOpen:m,onOpenChange:g,isEntering:v,isExiting:h,UNSTABLE_portalContainer:T,shouldCloseOnInteractOutside:R},Bt.default.createElement(TE,{...w,modalRef:i},x))});function lO(o,r){[o,r]=bt(o,r,RE);let i=Bt.useContext(vr),c=_s(o),u=o.isOpen!=null||o.defaultOpen!=null||!i?c:i;if(u===i){if(o.onOpenChange||o.defaultOpen!==void 0||o.isOpen!==void 0)console.warn("This modals state is controlled by a trigger, place onOpenChange on the trigger instead.")}let f=Qa(r),b=Bt.useRef(null),m=$i(f,u.isOpen),g=$i(b,u.isOpen),x=m||g||o.isExiting||!1,v=Xa();if(!u.isOpen&&!x||v)return null;return Bt.default.createElement(iO,{...o,state:u,isExiting:x,overlayRef:f,modalRef:b})}var xu=Bt.forwardRef(lO);function iO({UNSTABLE_portalContainer:o,...r}){let i=r.modalRef,{state:c}=r,{modalProps:u,underlayProps:f}=X2(r,c,i),b=hi(r.overlayRef)||r.isEntering||!1,m=dt({...r,defaultClassName:"react-aria-ModalOverlay",values:{isEntering:b,isExiting:r.isExiting,state:c}}),g=Z2(),x=void 0,v=void 0;if(typeof document<"u"){let T=zo(document.body)?document.body:document.scrollingElement||document.documentElement,R=T.getBoundingClientRect().width%1,w=T.getBoundingClientRect().height%1;x=T.scrollWidth-R,v=T.scrollHeight-w}let h={...m.style,"--visual-viewport-width":g.width+"px","--visual-viewport-height":g.height+"px","--page-width":x!==void 0?x+"px":void 0,"--page-height":v!==void 0?v+"px":void 0};return Bt.default.createElement($u,{isExiting:r.isExiting,portalContainer:o},Bt.default.createElement(qe.div,{...be(_e(r,{global:!0}),f),...m,style:h,ref:r.overlayRef,"data-entering":b||void 0,"data-exiting":r.isExiting||void 0},Bt.default.createElement(xa,{values:[[W2,{modalProps:u,modalRef:i,isExiting:r.isExiting,isDismissable:r.isDismissable}],[vr,c]]},m.children)))}function TE(o){let{modalProps:r,modalRef:i,isExiting:c,isDismissable:u}=Bt.useContext(W2),f=Bt.useContext(vr),b=Bt.useMemo(()=>ur(o.modalRef,i),[o.modalRef,i]),m=Qa(b),g=hi(m),x=dt({...o,defaultClassName:"react-aria-Modal",values:{isEntering:g,isExiting:c,state:f}});return Bt.default.createElement(qe.div,{...be(_e(o,{global:!0}),r),...x,ref:m,"data-entering":g||void 0,"data-exiting":c||void 0},u&&Bt.default.createElement(hu,{onDismiss:f.close}),x.children)}var wE=F(J(),1),L0=new WeakMap;function J2(o,r,i){let{keyboardDelegate:c,isDisabled:u,isRequired:f,name:b,form:m,validationBehavior:g="aria"}=o,x=Os({usage:"search",sensitivity:"base"}),v=wE.useMemo(()=>c||new mi(r.collection,r.disabledKeys,i,x),[c,r.collection,r.disabledKeys,x,i]),{menuTriggerProps:h,menuProps:T}=n2({isDisabled:u,type:"listbox"},r,i),R=(te)=>{if(r.selectionManager.selectionMode==="multiple")return;switch(te.key){case"ArrowLeft":{te.preventDefault();let j=r.selectedKey!=null?v.getKeyAbove?.(r.selectedKey):v.getFirstKey?.();if(j!=null)r.setSelectedKey(j);break}case"ArrowRight":{te.preventDefault();let j=r.selectedKey!=null?v.getKeyBelow?.(r.selectedKey):v.getFirstKey?.();if(j!=null)r.setSelectedKey(j);break}}},{typeSelectProps:w}=c0({keyboardDelegate:v,selectionManager:r.selectionManager,onTypeSelect(te){r.setSelectedKey(te)}}),{isInvalid:L,validationErrors:M,validationDetails:H}=r.displayValidation,{labelProps:I,fieldProps:X,descriptionProps:Z,errorMessageProps:ge}=jb({...o,labelElementType:"span",isInvalid:L,errorMessage:o.errorMessage||M});if(w.onKeyDown=w.onKeyDownCapture,delete w.onKeyDownCapture,r.selectionManager.selectionMode==="multiple")w={};let he=_e(o,{labelable:!0}),ae=be(w,h,X),U=vt();return L0.set(r,{isDisabled:u,isRequired:f,name:b,form:m,validationBehavior:g}),{labelProps:{...I,onClick:()=>{if(!o.isDisabled)i.current?.focus(),ai("keyboard")}},triggerProps:be(he,{...ae,isDisabled:u,onKeyDown:Lo(ae.onKeyDown,R,o.onKeyDown),onKeyUp:o.onKeyUp,"aria-labelledby":[U,ae["aria-labelledby"],ae["aria-label"]&&!ae["aria-labelledby"]?ae.id:null].filter(Boolean).join(" "),onFocus(te){if(r.isFocused)return;if(o.onFocus)o.onFocus(te);if(o.onFocusChange)o.onFocusChange(!0);r.setFocused(!0)},onBlur(te){if(r.isOpen)return;if(o.onBlur)o.onBlur(te);if(o.onFocusChange)o.onFocusChange(!1);r.setFocused(!1)}}),valueProps:{id:U},menuProps:{...T,autoFocus:r.focusStrategy||!0,shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,disallowEmptySelection:!0,linkBehavior:"selection",onBlur:(te)=>{if(Ve(te.currentTarget,te.relatedTarget))return;if(o.onBlur)o.onBlur(te);if(o.onFocusChange)o.onFocusChange(!1);r.setFocused(!1)},"aria-labelledby":[X["aria-labelledby"],ae["aria-label"]&&!X["aria-labelledby"]?ae.id:null].filter(Boolean).join(" ")},descriptionProps:Z,errorMessageProps:ge,isInvalid:L,validationErrors:M,validationDetails:H,hiddenSelectProps:{isDisabled:u,name:b,label:o.label,state:r,triggerRef:i,form:m}}}var Ba=F(J(),1);function DE(o,r,i){let c=L0.get(r)||{},{autoComplete:u,name:f=c.name,form:b=c.form,isDisabled:m=c.isDisabled}=o,{validationBehavior:g,isRequired:x}=c,{visuallyHiddenProps:v}=n1({style:{position:"fixed",top:0,left:0}});Gb(o.selectRef,r.defaultValue,r.setValue),Yb({validationBehavior:g,focus:()=>i.current?.focus()},r,o.selectRef);let h=r.setValue,T=Ba.useCallback((R)=>{let w=ce(R);if(w.multiple)h(Array.from(w.selectedOptions,(L)=>L.value));else h(R.currentTarget.value)},[h]);return{containerProps:{...v,"aria-hidden":!0,["data-react-aria-prevent-focus"]:!0,["data-a11y-ignore"]:"aria-hidden-focus"},inputProps:{style:{display:"none"}},selectProps:{tabIndex:-1,autoComplete:u,disabled:m,multiple:r.selectionManager.selectionMode==="multiple",required:g==="native"&&x,name:f,form:b,value:r.value??"",onChange:T,onInput:T}}}function ex(o){let{state:r,triggerRef:i,label:c,name:u,form:f,isDisabled:b}=o,m=Ba.useRef(null),g=Ba.useRef(null),{containerProps:x,selectProps:v}=DE({...o,selectRef:r.collection.size<=300?m:g},r,i),h=Array.isArray(r.value)?r.value:[r.value];if(r.collection.size<=300)return Ba.default.createElement("div",{...x,"data-testid":"hidden-select-container"},Ba.default.createElement("label",null,c,Ba.default.createElement("select",{...v,ref:m},Ba.default.createElement("option",{value:"",label:" "}," "),[...r.collection.getKeys()].map((T)=>{let R=r.collection.getItem(T);if(R&&R.type==="item")return Ba.default.createElement("option",{key:R.key,value:R.key},R.textValue)}),r.collection.size===0&&u&&h.map((T,R)=>Ba.default.createElement("option",{key:R,value:T??""})))));else if(u){let T=L0.get(r)||{},{validationBehavior:R}=T;if(h.length===0)h=[null];let w=h.map((L,M)=>{let H={type:"hidden",autoComplete:v.autoComplete,name:u,form:f,disabled:b,value:L??""};if(R==="native")return Ba.default.createElement("input",{key:M,...H,ref:M===0?g:null,style:{display:"none"},type:"text",required:M===0?v.required:!1,onChange:()=>{}});return Ba.default.createElement("input",{key:M,...H,ref:M===0?g:null})});return Ba.default.createElement(Ba.default.Fragment,null,w)}return null}var Mt=F(J(),1);var il=F(J(),1);function tx(o){let{selectionMode:r="single",shouldCloseOnSelect:i=r==="single"}=o,c=_s(o),[u,f]=il.useState(null),b=il.useMemo(()=>o.defaultValue!==void 0?o.defaultValue:r==="single"?o.defaultSelectedKey??null:[],[o.defaultValue,o.defaultSelectedKey,r]),m=il.useMemo(()=>o.value!==void 0?o.value:r==="single"?o.selectedKey:void 0,[o.value,o.selectedKey,r]),[g,x]=Tn(m,b,o.onChange),v=r==="single"&&Array.isArray(g)?g[0]:g,h=(X)=>{if(r==="single"){let Z=Array.isArray(X)?X[0]??null:X;if(x(Z),Z!==v)o.onSelectionChange?.(Z)}else{let Z=[];if(Array.isArray(X))Z=X;else if(X!=null)Z=[X];x(Z)}},T=Mf({...o,selectionMode:r,disallowEmptySelection:r==="single",allowDuplicateSelectionEvents:!0,selectedKeys:il.useMemo(()=>sO(v),[v]),onSelectionChange:(X)=>{if(X==="all")return;if(r==="single"){let Z=X.values().next().value??null;h(Z)}else h([...X]);if(i)c.close();L.commitValidation()}}),R=T.selectionManager.firstSelectedKey,w=il.useMemo(()=>[...T.selectionManager.selectedKeys].map((X)=>T.collection.getItem(X)).filter((X)=>X!=null),[T.selectionManager.selectedKeys,T.collection]),L=xf({...o,value:Array.isArray(v)&&v.length===0?null:v}),[M,H]=il.useState(!1),[I]=il.useState(v);return{...L,...T,...c,value:v,defaultValue:b??I,setValue:h,selectedKey:R,setSelectedKey:h,selectedItem:w[0]??null,selectedItems:w,defaultSelectedKey:o.defaultSelectedKey??(o.selectionMode==="single"?I:null),focusStrategy:u,open(X=null){if(T.collection.size!==0||o.allowsEmptyCollection)f(X),c.open()},toggle(X=null){if(T.collection.size!==0||o.allowsEmptyCollection)f(X),c.toggle()},isFocused:M,setFocused:H}}function sO(o){if(o===void 0)return;if(o===null)return[];return Array.isArray(o)?o:[o]}function cO(o){return o&&o.__esModule?o.default:o}var k0=Mt.createContext(null),ax=Mt.createContext(null),ox=co(function(r,i){[r,i]=bt(r,i,k0);let{children:c,isDisabled:u=!1,isInvalid:f=!1,isRequired:b=!1}=r,m=Mt.useMemo(()=>typeof c==="function"?c({isOpen:!1,isDisabled:u,isInvalid:f,isRequired:b,isFocused:!1,isFocusVisible:!1,defaultChildren:null}):c,[c,u,f,b]);return Mt.default.createElement(Ps,{content:m},(g)=>Mt.default.createElement(dO,{props:r,collection:g,selectRef:i}))}),uO=[Cs,br,rn];function dO({props:o,selectRef:r,collection:i}){let{validationBehavior:c}=fr(Kb)||{},u=o.validationBehavior??c??"native",f=tx({...o,collection:i,children:void 0,validationBehavior:u}),{isFocusVisible:b,focusProps:m}=Ma({within:!0}),g=Mt.useRef(null),[x,v]=gs(!o["aria-label"]&&!o["aria-labelledby"]),{labelProps:h,triggerProps:T,valueProps:R,menuProps:w,descriptionProps:L,errorMessageProps:M,hiddenSelectProps:H,...I}=J2({...fb(o),label:v,validationBehavior:u},f,g),X=Mt.useMemo(()=>({isOpen:f.isOpen,isFocused:f.isFocused,isFocusVisible:b,isDisabled:o.isDisabled||!1,isInvalid:I.isInvalid||!1,isRequired:o.isRequired||!1}),[f.isOpen,f.isFocused,b,o.isDisabled,I.isInvalid,o.isRequired]),Z=dt({...o,values:X,defaultClassName:"react-aria-Select"}),ge=_e(o,{global:!0});delete ge.id;let he=Mt.useRef(null);return Mt.default.createElement(xa,{values:[[k0,o],[ax,f],[nx,R],[Cs,{...h,ref:x,elementType:"span"}],[br,{...T,ref:g,isPressed:f.isOpen,autoFocus:o.autoFocus}],[vr,f],[A0,{trigger:"Select",triggerRef:g,scrollRef:he,placement:"bottom start","aria-labelledby":w["aria-labelledby"],clearContexts:uO}],[Of,{...w,ref:he}],[gi,f],[rn,{slots:{description:L,errorMessage:M}}],[ws,I]]},Mt.default.createElement(qe.div,{...be(ge,Z,m),ref:r,slot:o.slot||void 0,"data-focused":f.isFocused||void 0,"data-focus-visible":b||void 0,"data-open":f.isOpen||void 0,"data-disabled":o.isDisabled||void 0,"data-invalid":I.isInvalid||void 0,"data-required":o.isRequired||void 0},Z.children,Mt.default.createElement(ex,{...H,autoComplete:o.autoComplete})))}var nx=Mt.createContext(null),rx=co(function(r,i){[r,i]=bt(r,i,nx);let c=Mt.useContext(ax),{placeholder:u}=fr(k0),f=c.selectedItems.map((w)=>{let L=w.props?.children;if(typeof L==="function")L=L({isHovered:!1,isPressed:!1,isSelected:!1,isFocused:!1,isFocusVisible:!1,isDisabled:!1,selectionMode:"single",selectionBehavior:"toggle"});return L}),b=c2(),m=Mt.useMemo(()=>c.selectedItems.map((w)=>w?.textValue),[c.selectedItems]),g=c.selectionManager.selectionMode,x=Mt.useMemo(()=>g==="single"?m[0]??"":b.format(m),[g,b,m]),v=Mt.useMemo(()=>{if(g==="single")return f[0];let w=b.formatToParts(m);if(w.length===0)return null;let L=0;return w.map((M)=>{if(M.type==="element")return Mt.default.createElement(Mt.Fragment,{key:L},f[L++]);else return M.value})},[g,b,m,f]),h=Ss(cO(Y2),"react-aria-components"),T=dt({...r,defaultChildren:v??u??h.format("selectPlaceholder"),defaultClassName:"react-aria-SelectValue",values:{selectedItem:c.selectedItems[0]?.value??null,selectedItems:Mt.useMemo(()=>c.selectedItems.map((w)=>w.value??null),[c.selectedItems]),selectedText:x,isPlaceholder:c.selectedItems.length===0,state:c}}),R=_e(r,{global:!0});return Mt.default.createElement(qe.span,{ref:i,...R,...T,"data-placeholder":c.selectedItems.length===0||void 0},Mt.default.createElement(rn.Provider,{value:void 0},T.children))});var lx=new WeakMap;function Su(o,r,i){if(!o)return"";if(typeof r==="string")r=r.replace(/\s+/g,"");let c=lx.get(o);if(!c)console.error("There is no tab id, please check if you have rendered the tab panel before the tab list.");return`${c}-${i}-${r}`}function ix(o,r,i){let{key:c,isDisabled:u,shouldSelectOnPressUp:f}=o,{selectionManager:b,selectedKey:m}=r,g=c===m,x=u||r.isDisabled||r.selectionManager.isDisabled(c),v=r.collection.getItem(c),{itemProps:h,isPressed:T}=pu({selectionManager:b,key:c,ref:i,isDisabled:x,shouldSelectOnPressUp:f??v?.props.href!=null,linkBehavior:"selection"}),R=Su(r,c,"tab"),w=Su(r,c,"tabpanel"),{tabIndex:L}=h,M=_e(v?.props,{labelable:!0});delete M.id;let H=Wc(v?.props),{focusableProps:I}=ii({...v?.props,isDisabled:x},i);return{tabProps:be(M,I,H,h,{id:R,"aria-selected":g,"aria-disabled":x||void 0,"aria-controls":g?w:void 0,tabIndex:x?void 0:L,role:"tab"}),isSelected:g,isDisabled:x,isPressed:T}}var AE=F(J(),1);function PE(o,r){let i=r?.isDisabled,[c,u]=AE.useState(!1);return Le(()=>{if(o?.current&&!i){let f=()=>{if(o.current){let m=ln(o.current,{tabbable:!0});u(!!m.nextNode())}};f();let b=new MutationObserver(f);return b.observe(o.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{b.disconnect()}}}),i?!1:c}function sx(o,r,i){let c=PE(i)?void 0:0,u=Su(r,o.id??r?.selectedKey,"tabpanel"),f=ni({...o,id:u,"aria-labelledby":Su(r,r?.selectedKey,"tab")});return{tabPanelProps:be(f,{tabIndex:c,role:"tabpanel","aria-describedby":o["aria-describedby"],"aria-details":o["aria-details"]})}}class cx{constructor(o,r,i,c=new Set){this.collection=o,this.flipDirection=r==="rtl"&&i==="horizontal",this.disabledKeys=c,this.tabDirection=i==="horizontal"}getKeyLeftOf(o){if(this.flipDirection)return this.getNextKey(o);return this.getPreviousKey(o)}getKeyRightOf(o){if(this.flipDirection)return this.getPreviousKey(o);return this.getNextKey(o)}isDisabled(o){return this.disabledKeys.has(o)||!!this.collection.getItem(o)?.props?.isDisabled}getFirstKey(){let o=this.collection.getFirstKey();if(o!=null&&this.isDisabled(o))o=this.getNextKey(o);return o}getLastKey(){let o=this.collection.getLastKey();if(o!=null&&this.isDisabled(o))o=this.getPreviousKey(o);return o}getKeyAbove(o){if(this.tabDirection)return null;return this.getPreviousKey(o)}getKeyBelow(o){if(this.tabDirection)return null;return this.getNextKey(o)}getNextKey(o){let r=o;do if(r=this.collection.getKeyAfter(r),r==null)r=this.collection.getFirstKey();while(r!=null&&this.isDisabled(r));return r}getPreviousKey(o){let r=o;do if(r=this.collection.getKeyBefore(r),r==null)r=this.collection.getLastKey();while(r!=null&&this.isDisabled(r));return r}}var ME=F(J(),1);function ux(o,r,i){let{orientation:c="horizontal",keyboardActivation:u="automatic"}=o,{collection:f,selectionManager:b,disabledKeys:m}=r,{direction:g}=Pa(),x=ME.useMemo(()=>new cx(f,g,c,m),[f,m,c,g]),{collectionProps:v}=u0({ref:i,selectionManager:b,keyboardDelegate:x,selectOnFocus:u==="automatic",disallowEmptySelection:!0,scrollRef:i,linkBehavior:"selection"}),h=vt();lx.set(r,h);let T=ni({...o,id:h});return{tabListProps:{...be(v,T),role:"tablist","aria-orientation":c,tabIndex:void 0}}}var Ct=F(J(),1);var dx=Ct.createContext(null),Is=Ct.createContext(null);var fx=Ct.forwardRef(function(r,i){return Ct.useContext(Is)?Ct.default.createElement(fO,{props:r,forwardedRef:i}):Ct.default.createElement(Ef,r)});function fO({props:o,forwardedRef:r}){let i=Ct.useContext(Is),{CollectionRoot:c}=Ct.useContext(ol),{orientation:u="horizontal",keyboardActivation:f="automatic"}=fr(dx),b=Qa(r),{tabListProps:m}=ux({...o,orientation:u,keyboardActivation:f},i,b),g=dt({...o,children:null,defaultClassName:"react-aria-TabList",values:{orientation:u,state:i}}),x=_e(o,{global:!0});return delete x.id,Ct.default.createElement(qe.div,{...be(x,g,m),ref:b,"data-orientation":u||void 0},Ct.default.createElement(a0,null,Ct.default.createElement(c,{collection:i.collection,persistedKeys:b1(i.selectionManager.focusedKey)})))}class OE extends Bo{static{this.type="item"}}var px=hr(OE,(o,r,i)=>{let c=Ct.useContext(Is),u=Qa(r),{tabProps:f,isSelected:b,isDisabled:m,isPressed:g}=ix({key:i.key,...o},c,u),{focusProps:x,isFocused:v,isFocusVisible:h}=Ma(),{hoverProps:T,isHovered:R}=Oa({isDisabled:m,onHoverStart:o.onHoverStart,onHoverEnd:o.onHoverEnd,onHoverChange:o.onHoverChange}),w=dt({...o,id:void 0,children:i.rendered,defaultClassName:"react-aria-Tab",values:{isSelected:b,isDisabled:m,isFocused:v,isFocusVisible:h,isPressed:g,isHovered:R}}),L=i.props.href?qe.a:qe.div,M=_e(o,{global:!0});return delete M.id,delete M.onClick,Ct.default.createElement(L,{...be(M,w,f,x,T),ref:u,"data-selected":b||void 0,"data-disabled":m||void 0,"data-focused":v||void 0,"data-focus-visible":h||void 0,"data-pressed":g||void 0,"data-hovered":R||void 0},Ct.default.createElement(du.Provider,{value:{isSelected:b}},w.children))});var mx=co(function(r,i){let c=Ct.useContext(Is),u=Qa(i),f=c.selectedKey===r.id,[b,m]=Ct.useState(c.selectedKey!=null?f:null);if(b==null&&c.selectedKey!=null)m(f);else if(!f&&b)m(!1);let g=$i(u,f);if(!f&&!r.shouldForceMount&&!g)return null;return Ct.default.createElement(pO,{...r,tabPanelRef:u,isInitiallySelected:b||!1,isExiting:g})});function pO(o){let r=Ct.useContext(Is),{id:i,tabPanelRef:c,isInitiallySelected:u,isExiting:f,...b}=o,{tabPanelProps:m}=sx(o,r,c),{focusProps:g,isFocused:x,isFocusVisible:v}=Ma(),h=r.selectedKey===o.id,T=hi(c)&&!u,R=dt({...o,defaultClassName:"react-aria-TabPanel",values:{isFocused:x,isFocusVisible:v,isInert:mu(!h),isEntering:T,isExiting:f,state:r}}),w=_e(b,{global:!0});delete w.id;let L=h?be(w,m,g,R):be(w,R);return Ct.default.createElement(qe.div,{...L,ref:c,"data-focused":x||void 0,"data-focus-visible":v||void 0,inert:mu(!h||o.inert),"data-inert":!h?"true":void 0,"data-entering":T||void 0,"data-exiting":f||void 0},Ct.default.createElement(xa,{values:[[dx,null],[Is,null]]},Ct.default.createElement(ol.Provider,{value:m1},R.children)))}var Cu=F(J(),1);var _0=Cu.createContext({}),mO=(o)=>{let{onHoverStart:r,onHoverChange:i,onHoverEnd:c,...u}=o;return u},bx=Cu.forwardRef(function(r,i){[r,i]=bt(r,i,_0);let{hoverProps:c,isHovered:u}=Oa(r),{isFocused:f,isFocusVisible:b,focusProps:m}=Ma({isTextInput:!0,autoFocus:r.autoFocus}),g=!!r["aria-invalid"]&&r["aria-invalid"]!=="false",x=dt({...r,values:{isHovered:u,isFocused:f,isFocusVisible:b,isDisabled:r.disabled||!1,isInvalid:g},defaultClassName:"react-aria-TextArea"});return Cu.default.createElement(qe.textarea,{...be(mO(r),m,c),...x,ref:i,"data-focused":f||void 0,"data-disabled":r.disabled||void 0,"data-hovered":u||void 0,"data-focus-visible":b||void 0,"data-invalid":g||void 0})});var On=F(J(),1),NE=On.createContext(null),z0=co(function(r,i){[r,i]=bt(r,i,NE);let{validationBehavior:c}=fr(Kb)||{},u=r.validationBehavior??c??"native",f=On.useRef(null);[r,f]=bt(r,f,D9);let[b,m]=gs(!r["aria-label"]&&!r["aria-labelledby"]),[g,x]=On.useState("input"),{labelProps:v,inputProps:h,descriptionProps:T,errorMessageProps:R,...w}=s2({...fb(r),inputElementType:g,label:m,validationBehavior:u},f),L=On.useCallback((I)=>{if(f.current=I,I)x(I instanceof HTMLTextAreaElement?"textarea":"input")},[f]),M=dt({...r,values:{isDisabled:r.isDisabled||!1,isInvalid:w.isInvalid,isReadOnly:r.isReadOnly||!1,isRequired:r.isRequired||!1},defaultClassName:"react-aria-TextField"}),H=_e(r,{global:!0});return delete H.id,On.default.createElement(qe.div,{...H,...M,ref:i,slot:r.slot||void 0,"data-disabled":r.isDisabled||void 0,"data-invalid":w.isInvalid||void 0,"data-readonly":r.isReadOnly||void 0,"data-required":r.isRequired||void 0},On.default.createElement(xa,{values:[[Cs,{...v,ref:b}],[Zb,{...h,ref:L}],[_0,{...h,ref:L}],[Z9,{role:"presentation",isInvalid:w.isInvalid,isDisabled:r.isDisabled||!1}],[rn,{slots:{description:T,errorMessage:R}}],[ws,w]]},M.children))});var LE=F(J(),1),bO=F(d1(),1);class Hf{constructor(o){this.queue=[],this.subscriptions=new Set,this.visibleToasts=[],this.maxVisibleToasts=o?.maxVisibleToasts??1/0,this.wrapUpdate=o?.wrapUpdate}runWithWrapUpdate(o,r){if(this.wrapUpdate)this.wrapUpdate(o,r);else o()}subscribe(o){return this.subscriptions.add(o),()=>this.subscriptions.delete(o)}add(o,r={}){let i="_"+Math.random().toString(36).slice(2),c={...r,content:o,key:i,timer:r.timeout?new kE(()=>this.close(i),r.timeout):void 0};return this.queue.unshift(c),this.updateVisibleToasts("add"),i}close(o){let r=this.queue.findIndex((i)=>i.key===o);if(r>=0)this.queue[r].onClose?.(),this.queue.splice(r,1);this.updateVisibleToasts("remove")}updateVisibleToasts(o){this.visibleToasts=this.queue.slice(0,this.maxVisibleToasts),this.runWithWrapUpdate(()=>{for(let r of this.subscriptions)r()},o)}pauseAll(){for(let o of this.visibleToasts)if(o.timer)o.timer.pause()}resumeAll(){for(let o of this.visibleToasts)if(o.timer)o.timer.resume()}clear(){this.queue=[],this.updateVisibleToasts("clear")}}class kE{constructor(o,r){this.startTime=null,this.remaining=r,this.callback=o}reset(o){this.remaining=o,this.resume()}pause(){if(this.timerId==null)return;clearTimeout(this.timerId),this.timerId=null,this.remaining-=Date.now()-this.startTime}resume(){if(this.remaining<=0)return;this.startTime=Date.now(),this.timerId=setTimeout(()=>{this.timerId=null,this.remaining=0,this.callback()},this.remaining)}}var ia=De(Rn,{displayName:"Button",baseClass:"inline-flex items-center justify-center gap-2 rounded-full text-compact leading-4 transition-all duration-200 ease-in-out outline-none data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring data-[focus-visible]:ring-offset-2 data-[disabled]:opacity-50 data-[disabled]:pointer-events-none data-[pending]:opacity-70 data-[pending]:cursor-progress",variants:{variant:{primary:"bg-brand-primary text-fg-inverted hover:bg-neutral-600 hover:shadow-[0_0_5px_0_rgba(0,0,0,0.5)] data-[pressed]:bg-brand-primary data-[pressed]:shadow-none",secondary:"bg-surface-card text-fg border border-border hover:bg-surface-muted hover:border-fg-subtle data-[pressed]:bg-surface-muted",ghost:"bg-transparent text-fg hover:bg-surface-muted data-[pressed]:bg-surface-muted",destructive:"bg-danger text-danger-fg hover:opacity-90 data-[pressed]:opacity-80"},size:{sm:"py-2 px-4",md:"py-3 px-6",lg:"py-4 px-8",prominent:"h-11 px-6 py-0 text-panel-heading font-medium"}},defaultVariants:{variant:"primary",size:"md"}});var Eu=F(Qt(),1),yO=De(As,{displayName:"InputControl",baseClass:"w-full rounded-lg border border-border bg-surface px-4 text-small text-fg outline-none transition-colors duration-200 placeholder:text-fg-muted data-[hovered]:border-fg-subtle data-[focused]:border-brand-green data-[focused]:ring-2 data-[focused]:ring-ring data-[invalid]:border-danger data-[invalid]:ring-2 data-[invalid]:ring-danger data-[disabled]:bg-surface-muted data-[disabled]:opacity-60 data-[disabled]:pointer-events-none",variants:{fieldSize:{sm:"h-8",md:"h-10",lg:"h-12",tall:"h-control-tall"}},defaultVariants:{fieldSize:"md"}}),Tu=({label:o,description:r,errorMessage:i,placeholder:c,size:u,rootClassName:f,inputClassName:b,...m})=>Eu.jsxDEV(z0,{...m,className:`flex w-full flex-col gap-3 ${f??""}`,children:[Eu.jsxDEV(ri,{className:"text-panel-heading font-medium text-fg",children:o},void 0,!1,void 0,this),Eu.jsxDEV(yO,{className:b,placeholder:c,fieldSize:u},void 0,!1,void 0,this),r?Eu.jsxDEV(gr,{slot:"description",className:"text-label text-fg-muted",children:r},void 0,!1,void 0,this):null,Eu.jsxDEV(Ds,{className:"text-label text-danger",children:i},void 0,!1,void 0,this)]},void 0,!0,void 0,this);var doe=De(bx,{displayName:"TextAreaControl",baseClass:"min-h-[120px] w-full resize-y rounded-lg border border-border bg-surface px-4 py-3 text-small text-fg outline-none transition-colors duration-200 placeholder:text-fg-muted data-[hovered]:border-fg-subtle data-[focused]:border-brand-green data-[focused]:ring-2 data-[focused]:ring-ring data-[invalid]:border-danger data-[invalid]:ring-danger data-[disabled]:bg-surface-muted data-[disabled]:opacity-60 data-[disabled]:pointer-events-none"});var IE=F(J(),1);var B0=F(J(),1),BE=B0.createContext(!1),Fs=()=>B0.useContext(BE);var sl=F(J(),1),vO=F(sr(),1);var Coe=sl.createContext(null);var Ia=F(Qt(),1),xO=De(Rn,{displayName:"SelectTrigger",baseClass:"flex h-control-tall w-full items-center justify-between gap-2.5 rounded-lg border border-border bg-surface px-5 text-small text-fg outline-none transition-colors data-[hovered]:border-fg-subtle data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring group-data-[invalid]:border-danger group-data-[invalid]:ring-2 group-data-[invalid]:ring-danger data-[disabled]:bg-surface-muted data-[disabled]:opacity-60 data-[disabled]:pointer-events-none"}),hx=De(ll,{displayName:"SelectItem",baseClass:"flex cursor-pointer select-none items-center rounded-md px-3 py-2 text-small text-fg outline-none data-[hovered]:bg-surface-muted data-[focused]:bg-surface-muted data-[selected]:font-medium data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"}),$x=({label:o,description:r,errorMessage:i,placeholder:c,children:u,rootClassName:f,triggerClassName:b,...m})=>{let g=Fs(),x=Ia.jsxDEV(bu,{className:"flex max-h-72 flex-col gap-0.5 overflow-auto overscroll-contain p-1 outline-none",children:u},void 0,!1,void 0,this),v=r?Ia.jsxDEV(gr,{slot:"description",className:"text-label text-fg-muted",children:r},void 0,!1,void 0,this):null,h=Ia.jsxDEV(Ds,{className:"text-label text-danger",children:i},void 0,!1,void 0,this);return Ia.jsxDEV(ox,{...m,placeholder:c,className:`group flex flex-col gap-3 ${f??""}`,children:[Ia.jsxDEV(ri,{className:"text-panel-heading font-medium text-fg",children:o},void 0,!1,void 0,this),g?Ia.jsxDEV(Ia.Fragment,{children:[x,v,h]},void 0,!0,void 0,this):Ia.jsxDEV(Ia.Fragment,{children:[Ia.jsxDEV(xO,{className:b,children:[Ia.jsxDEV(rx,{className:"data-[placeholder]:text-fg-muted"},void 0,!1,void 0,this),Ia.jsxDEV("svg",{width:"9.5",height:"9.5",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",className:"pointer-events-none shrink-0 text-fg",children:Ia.jsxDEV("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),v,h,Ia.jsxDEV(yi,{className:"min-w-[var(--trigger-width)] overflow-hidden rounded-lg bg-surface-card shadow-lg",children:x},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};var koe=De(As,{displayName:"ComboBoxInput",baseClass:"h-12 w-full rounded-lg border border-border bg-surface pl-4 pr-11 text-small text-fg outline-none transition-colors placeholder:text-fg-muted data-[hovered]:border-fg-subtle data-[focused]:border-brand-green data-[focused]:ring-2 data-[focused]:ring-ring group-data-[invalid]:border-danger group-data-[invalid]:ring-2 group-data-[invalid]:ring-danger data-[disabled]:bg-surface-muted data-[disabled]:opacity-60"}),_oe=De(ll,{displayName:"ComboBoxItem",baseClass:"flex cursor-pointer select-none items-center rounded-md px-3 py-2 text-small text-fg outline-none data-[hovered]:bg-surface-muted data-[focused]:bg-surface-muted data-[selected]:font-medium data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"});var yx=F(J(),1);var Uoe=De(ll,{displayName:"MultiSelectItem",baseClass:"group flex cursor-pointer select-none items-center gap-2 rounded-md px-3 py-2 text-small text-fg outline-none data-[hovered]:bg-surface-muted data-[focused]:bg-surface-muted data-[selected]:font-medium data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"});var RO=F(J(),1);var Ea=F(Qt(),1);var wO=De(xu,{displayName:"DialogOverlay",baseClass:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-modal-backdrop backdrop-blur-modal-backdrop data-[entering]:animate-modal-overlay-in data-[exiting]:animate-modal-overlay-out"}),DO=De(If,{displayName:"DialogModal",baseClass:"rounded-lg bg-surface p-5 outline-none shadow-modal-surface data-[entering]:animate-modal-surface-in data-[exiting]:animate-modal-surface-out"}),AO=Bf,PO={sm:"w-[90vw] max-w-[420px] max-h-[85vh] overflow-y-auto",md:"w-[90vw] max-w-[586px] max-h-[85vh] overflow-y-auto",lg:"w-[90vw] max-w-[720px] max-h-[85vh] overflow-y-auto",xl:"w-[90vw] max-w-[900px] max-h-[85vh] overflow-y-auto",full:"w-[95vw] max-w-[95vw] h-[92vh] flex flex-col"},MO={sm:"text-heading1 font-medium tracking-tight",md:"text-heading1 font-medium tracking-tight",lg:"text-heading2 font-medium tracking-tight",xl:"text-heading2 font-medium tracking-tight",full:"text-heading1 font-medium tracking-tight"},Us=({title:o,description:r,badge:i,size:c="md",children:u,isOpen:f,defaultOpen:b,onOpenChange:m,isDismissable:g=!0,closeLabel:x="Close",...v})=>{let h=c==="full";return Ea.jsxDEV(wO,{className:h?"bg-black/25 backdrop-blur-lg":void 0,isOpen:f,defaultOpen:b,onOpenChange:m,isDismissable:g,children:Ea.jsxDEV(DO,{className:PO[c],children:Ea.jsxDEV(AO,{...v,className:h?"flex min-h-0 flex-1 flex-col outline-none":"outline-none",children:(T)=>Ea.jsxDEV(Ea.Fragment,{children:[Ea.jsxDEV("div",{className:"mb-4 flex shrink-0 items-start justify-between gap-4",children:[o||r?Ea.jsxDEV("div",{className:"min-w-0",children:[o?Ea.jsxDEV("div",{className:"flex items-center gap-2",children:[Ea.jsxDEV(t1,{slot:"title",className:`${MO[c]} text-fg`,children:o},void 0,!1,void 0,this),i?Ea.jsxDEV("span",{className:"inline-flex shrink-0 items-center rounded-full bg-surface-muted px-2 py-0.5 text-label font-medium text-fg-muted",children:i},void 0,!1,void 0,this):null]},void 0,!0,void 0,this):null,r?Ea.jsxDEV("p",{className:"mt-1 text-body text-fg",children:r},void 0,!1,void 0,this):null]},void 0,!0,void 0,this):Ea.jsxDEV("span",{"aria-hidden":"true"},void 0,!1,void 0,this),Ea.jsxDEV("button",{type:"button",onClick:T.close,"aria-label":x,className:"-mr-1 -mt-1 inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-fg-subtle outline-none transition-colors hover:bg-surface-muted hover:text-fg focus-visible:ring-2 focus-visible:ring-ring",children:Ea.jsxDEV("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:Ea.jsxDEV("path",{d:"M6 6l12 12M18 6 6 18"},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h?Ea.jsxDEV("div",{className:"flex min-h-0 flex-1 flex-col",children:typeof u==="function"?u(T):u},void 0,!1,void 0,this):typeof u==="function"?u(T):u]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)};var cne=De(zs,{displayName:"DropdownMenuItem",baseClass:"flex cursor-pointer select-none items-center gap-2.5 rounded-md px-4 py-3 text-small text-fg outline-none data-[focused]:bg-surface-card data-[hovered]:bg-surface-card data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",variants:{destructive:{true:"text-danger data-[focused]:text-danger data-[hovered]:text-danger"}}}),une=De(v1,{displayName:"DropdownMenuSeparator",baseClass:"my-2 h-px border-0 bg-border"});var I0=F(J(),1);var mne=De(zs,{displayName:"ContextMenuItem",baseClass:"flex min-h-[34px] cursor-pointer select-none items-center gap-2.5 rounded-[10px] px-3 py-1.5 text-compact text-white outline-none data-[focused]:bg-[#2f2f2f] data-[focused]:font-medium data-[hovered]:bg-[#2f2f2f] data-[hovered]:font-medium data-[disabled]:cursor-not-allowed data-[disabled]:opacity-45",variants:{destructive:{true:"text-[#ffb5b5] data-[focused]:text-[#ffb5b5]"}}});var xne=new Hf({maxVisibleToasts:5});var Tne=De(f2,{displayName:"Disclosure"}),Rne=De(p2,{displayName:"DisclosurePanel"});var Mne=De(fx,{displayName:"TabList",baseClass:"flex gap-2 border-b border-border"}),One=De(px,{displayName:"Tab",baseClass:"cursor-pointer select-none border-b-2 border-transparent px-4 py-3 text-small font-medium text-fg-muted outline-none transition-colors data-[hovered]:text-fg data-[selected]:border-brand-primary data-[selected]:text-fg data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"}),Nne=De(mx,{displayName:"TabPanel",baseClass:"py-4 text-small text-fg outline-none data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring"});var NO=De("h2",{displayName:"DisplayHeading",baseClass:"text-display-large font-medium text-fg"}),Ine=De("h3",{displayName:"PanelHeading",baseClass:"text-panel-heading font-medium text-fg"}),mo=De("span",{displayName:"Text",baseClass:"text-fg",variants:{size:{micro:"text-micro",caption:"text-caption",label:"text-label",compact:"text-compact",small:"text-small",callout:"text-callout",body:"text-body",subtitle:"text-subtitle",title:"text-title",headline:"text-headline",display:"text-display"},weight:{regular:"font-normal",medium:"font-medium",semibold:"font-medium",bold:"font-medium"},tone:{default:"text-fg",muted:"text-fg-muted",subtle:"text-fg-subtle",inverted:"text-fg-inverted"}},defaultVariants:{size:"body",weight:"regular",tone:"default"}}),vx=De("h2",{displayName:"Heading",baseClass:"font-medium tracking-tight text-fg",variants:{level:{"1":"text-heading1","2":"text-heading2","3":"text-heading3","4":"text-heading4","5":"text-heading5"}},defaultVariants:{level:"2"}});var Ff=De("div",{displayName:"Card",baseClass:"relative rounded-lg bg-surface-card",variants:{variant:{plain:"",outlined:"border border-border",elevated:"shadow-md"},padding:{none:"p-0",sm:"p-4",md:"p-6",lg:"p-8"}},defaultVariants:{variant:"plain",padding:"md"}});var Yne=De("section",{displayName:"Section",baseClass:"w-full",variants:{padding:{none:"py-0",sm:"py-4",md:"py-6 sm:py-8",lg:"py-8 sm:py-12",xl:"py-12 sm:py-16"}},defaultVariants:{padding:"md"}});var Zne=De("div",{displayName:"PageContainer",baseClass:"w-full",variants:{size:{sm:"max-w-screen-sm mx-auto",md:"max-w-screen-md mx-auto",lg:"max-w-screen-lg mx-auto",xl:"max-w-screen-xl ml-0 mr-0 min-[1200px]:max-w-full","2xl":"max-w-screen-2xl mx-auto min-[1600px]:max-w-full min-[1600px]:mx-0",full:"max-w-full"}}});var H0=F(J(),1);var bo=F(Qt(),1),LO=De("div",{displayName:"AppShell",baseClass:"grid h-screen w-full overflow-hidden bg-surface grid-rows-[100%] grid-cols-[1fr] md:grid-cols-[auto_1fr]"}),HE=De("aside",{displayName:"AppShell.Sidebar",baseClass:"h-full w-64 shrink-0 overflow-y-auto border-r border-border bg-surface"}),kO=De("main",{displayName:"AppShell.Main",baseClass:"min-w-0 flex-1 bg-surface px-6 pb-6 pt-6"}),FE=({banner:o,topbar:r,sidebar:i,sidebarLabel:c,drawerToggleLabel:u,children:f,className:b})=>{let[m,g]=H0.useState(!1),x=H0.useId(),v=Boolean(i);return bo.jsxDEV(LO,{className:b,children:[v?bo.jsxDEV(HE,{"aria-label":c,className:"hidden md:block",children:i},void 0,!1,void 0,this):null,v?bo.jsxDEV(xu,{isOpen:m,onOpenChange:g,isDismissable:!0,className:"fixed inset-0 z-40 bg-black/40 md:hidden",children:bo.jsxDEV(If,{className:"absolute inset-y-0 left-0 z-50 h-full outline-none",children:bo.jsxDEV(Bf,{id:x,"aria-label":c,className:"h-full outline-none",children:bo.jsxDEV(HE,{"aria-label":c,className:"shadow-lg",children:i},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this):null,bo.jsxDEV("div",{className:"flex min-h-0 min-w-0 flex-col overflow-y-auto overflow-x-hidden bg-surface"+(v?"":" col-span-full"),children:[o?bo.jsxDEV("div",{className:"shrink-0",children:o},void 0,!1,void 0,this):null,bo.jsxDEV("div",{className:"sticky top-0 z-20 flex shrink-0 items-center bg-surface px-6",children:[v?bo.jsxDEV(Rn,{"aria-label":u,"aria-expanded":m,"aria-controls":m?x:void 0,onPress:()=>g((h)=>!h),className:"ml-2 flex h-9 w-9 shrink-0 items-center justify-center rounded-md text-fg outline-none transition-colors hover:bg-surface-muted md:hidden data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring",children:bo.jsxDEV("span",{"aria-hidden":"true",children:"☰"},void 0,!1,void 0,this)},void 0,!1,void 0,this):null,bo.jsxDEV("div",{className:"min-w-0 flex-1",children:r},void 0,!1,void 0,this)]},void 0,!0,void 0,this),bo.jsxDEV(kO,{children:f},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};var UE=F(Qt(),1),_O=De("header",{displayName:"Topbar",baseClass:"flex h-14 w-full items-center gap-5 border-b border-border"}),zO=De("div",{displayName:"Topbar.Brand",baseClass:"flex min-w-0 items-center gap-3 text-compact leading-4 font-medium tracking-tight text-fg"}),BO=De("nav",{displayName:"Topbar.Nav",baseClass:"ml-auto flex min-w-0 items-center gap-2 overflow-x-auto"}),IO=(o)=>UE.jsxDEV(BO,{...o},void 0,!1,void 0,this),HO=De("div",{displayName:"Topbar.Actions",baseClass:"ml-auto flex items-center gap-4"}),FO=De("a",{displayName:"Topbar.NavLink",baseClass:"inline-flex items-center rounded-sm px-[13px] py-[6px] text-compact leading-4 whitespace-nowrap text-fg no-underline transition-colors hover:bg-surface-muted hover:text-fg outline-none focus-visible:ring-2 focus-visible:ring-ring data-[active]:bg-surface-muted data-[active]:text-fg",variants:{active:{true:"",false:""}},variantsAsDataAttrs:["active"]});var nre=De(ll,{displayName:"WorkspaceSwitcher.Item",baseClass:"flex cursor-pointer select-none items-center rounded-sm px-3 py-2 text-small text-fg outline-none data-[focused]:bg-surface-muted data-[selected]:font-medium"});var rre=De(zs,{displayName:"UserMenu.Item",baseClass:"flex cursor-pointer select-none items-center rounded-sm px-3 py-2 text-small text-fg outline-none data-[focused]:bg-surface-muted data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"}),F0=Object.assign(_O,{Brand:zO,Nav:IO,NavLink:FO,Actions:HO});var UO=F(J(),1);var sre=De("header",{displayName:"PersistentPageShell.Header",baseClass:"flex w-full flex-col gap-6 bg-surface",variants:{sticky:{true:"sticky top-0 z-[1]",false:""}},defaultVariants:{sticky:!1}});var VO=F(J(),1);var xx=F(J(),1);var xr=F(Qt(),1),U0={width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0};var VE=(o)=>xr.jsxDEV("svg",{...U0,...o,children:xr.jsxDEV("path",{d:"M6 9l6 6 6-6"},void 0,!1,void 0,this)},void 0,!1,void 0,this),KE=(o)=>xr.jsxDEV("svg",{...U0,...o,children:xr.jsxDEV("path",{d:"M18 15l-6-6-6 6"},void 0,!1,void 0,this)},void 0,!1,void 0,this);var jE=(o)=>xr.jsxDEV("svg",{...U0,...o,children:[xr.jsxDEV("circle",{cx:"12",cy:"12",r:"4"},void 0,!1,void 0,this),xr.jsxDEV("path",{d:"M12 2v2M12 20v2M2 12h2M20 12h2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M19.1 4.9l-1.4 1.4M6.3 17.7l-1.4 1.4"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),GE=(o)=>xr.jsxDEV("svg",{...U0,...o,children:xr.jsxDEV("path",{d:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z"},void 0,!1,void 0,this)},void 0,!1,void 0,this);var jO=F(J(),1);var Sx=F(J(),1);var Cx=F(Qt(),1);var KO={green:"bg-brand-green text-fg-on-brand",yellow:"bg-accent-yellow text-fg-on-brand",grey:"bg-surface-muted text-fg",dark:"bg-surface-inverted text-fg-inverted"};function qE({label:o,color:r="grey"}){return Cx.jsxDEV("span",{className:`inline-flex items-center rounded-full px-3 py-1 text-caption font-medium leading-none ${KO[r]}`,children:o},void 0,!1,void 0,this)}var V0=F(J(),1);var go=F(Qt(),1),YE={left:"text-left",right:"text-right",center:"text-center"};function Ex(o,r){if(o.sortValue)return o.sortValue(r);if(r&&typeof r==="object"&&o.key in r){let i=r[o.key];if(typeof i==="number"||typeof i==="string")return i}return""}function XE({columns:o,data:r,getRowKey:i,enableSorting:c=!1,onRowClick:u,emptyMessage:f="No rows.",className:b,...m}){let[g,x]=V0.useState(null),v=(w)=>{x((L)=>{if(L?.key!==w)return{key:w,dir:"asc"};return{key:w,dir:L.dir==="asc"?"desc":"asc"}})},h=V0.useMemo(()=>{if(!c||!g)return r;let w=o.find((M)=>M.key===g.key);if(!w)return r;let L=g.dir==="asc"?1:-1;return[...r].sort((M,H)=>{let I=Ex(w,M),X=Ex(w,H);if(typeof I==="number"&&typeof X==="number")return(I-X)*L;return String(I).localeCompare(String(X),void 0,{numeric:!0})*L})},[r,o,c,g]),T=i??((w,L)=>String(L)),R=Boolean(u);return go.jsxDEV("div",{className:["w-full overflow-x-auto",b].filter(Boolean).join(" "),children:go.jsxDEV("table",{className:"w-full border-collapse text-small",...m,children:[go.jsxDEV("thead",{children:go.jsxDEV("tr",{className:"border-b border-border",children:o.map((w)=>{let L=w.align??"left",M=c&&w.sortable,H=g?.key===w.key;return go.jsxDEV("th",{scope:"col",style:w.width?{width:w.width}:void 0,"aria-sort":M?H?g?.dir==="asc"?"ascending":"descending":"none":void 0,className:`${YE[L]} px-4 py-3 text-label font-medium tracking-wide text-fg-muted uppercase`,children:M?go.jsxDEV("button",{type:"button",onClick:()=>v(w.key),className:`inline-flex items-center gap-1 outline-none transition-colors hover:text-fg focus-visible:text-fg ${L==="right"?"flex-row-reverse":""} ${H?"text-fg":""}`,children:[w.header,H?g?.dir==="asc"?go.jsxDEV(KE,{className:"h-3.5 w-3.5"},void 0,!1,void 0,this):go.jsxDEV(VE,{className:"h-3.5 w-3.5"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this):w.header},w.key,!1,void 0,this)})},void 0,!1,void 0,this)},void 0,!1,void 0,this),go.jsxDEV("tbody",{children:h.length===0?go.jsxDEV("tr",{children:go.jsxDEV("td",{colSpan:o.length,className:"px-4 py-10 text-center text-small text-fg-muted",children:f},void 0,!1,void 0,this)},void 0,!1,void 0,this):h.map((w,L)=>go.jsxDEV("tr",{...R?{tabIndex:0,role:"button",onClick:()=>u?.(w),onKeyDown:(M)=>{if(M.key==="Enter"||M.key===" ")M.preventDefault(),u?.(w)}}:{},className:`border-b border-border/60 outline-none ${R?"cursor-pointer transition-colors hover:bg-surface-muted focus-visible:bg-surface-muted focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring":""}`,children:o.map((M)=>{let H=M.align??"left";return go.jsxDEV("td",{className:`${YE[H]} px-4 py-3 align-middle text-fg`,children:M.render?M.render(w):String(Ex(M,w))},M.key,!1,void 0,this)})},T(w,L),!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var QE=F(J(),1);var ZE=F(J(),1);var GO=F(J(),1);var WE=F(J(),1);var qO=F(J(),1);var Xre=De("div",{displayName:"DeliveryStatusModule",baseClass:"grid gap-3 rounded-md bg-surface-inverted p-4 text-fg-inverted"});var Qre=De("span",{displayName:"DeliveryStatusPill",baseClass:"inline-flex min-h-5 items-center rounded-full border border-white/30 px-3"});var Et=F(J(),1);class Vs extends Error{code;status;constructor(o,r,i){super(o);this.code=r;this.status=i;this.name="ApiError"}}async function vi(o,r,i){let c=o.baseUrl.replace(/\/+$/,""),u=new Headers;if(i?.body)u.set("content-type","application/json");u.set("authorization",`Bearer ${o.token}`);for(let[m,g]of new Headers(i?.headers))u.set(m,g);let f;try{f=await fetch(`${c}${r}`,{...i,headers:u})}catch(m){throw new Vs(`network error reaching ${c} — is pramen running and is CORS_ORIGINS set?`,"network",0)}let b=null;try{b=await f.json()}catch{}if(!f.ok||!b||b.ok===!1){let m=b?.code??String(f.status),g=b?.error??`request failed (${f.status})`;if(f.status===403)g=`not an admin token — ${g}`;throw new Vs(g,m,f.status)}return b.result}function YO(o){if(!Array.isArray(o))return[];let r=o.map((i)=>typeof i==="string"?i:i?.tenant).filter((i)=>typeof i==="string"&&i.length>0);return[...new Set(r)].sort()}var cl={tenants:async(o)=>YO(await vi(o,"/tenants")),schema:(o,r)=>vi(o,`/admin/schema?tenant=${encodeURIComponent(r)}`),list:(o,r,i,c,u)=>vi(o,"/admin/data",{method:"POST",body:JSON.stringify({tenant:r,table:i,op:"list",limit:c,offset:u})}),count:(o,r,i)=>vi(o,"/admin/data",{method:"POST",body:JSON.stringify({tenant:r,table:i,op:"count"})}),get:(o,r,i,c)=>vi(o,"/admin/data",{method:"POST",body:JSON.stringify({tenant:r,table:i,op:"get",id:c})}),create:(o,r,i,c)=>vi(o,"/admin/data",{method:"POST",body:JSON.stringify({tenant:r,table:i,op:"create",values:c})}),update:(o,r,i,c,u)=>vi(o,"/admin/data",{method:"POST",body:JSON.stringify({tenant:r,table:i,op:"update",id:c,patch:u})}),remove:(o,r,i,c)=>vi(o,"/admin/data",{method:"POST",body:JSON.stringify({tenant:r,table:i,op:"delete",id:c})})};var ue=F(Qt(),1),K0={base:"pramen.admin.baseUrl",token:"pramen.admin.token",tenant:"pramen.admin.tenant",theme:"pramen.admin.theme"},Ru=25,j0=(o,r)=>{let[i,c]=Et.useState(()=>localStorage.getItem(o)??r),u=Et.useCallback((f)=>{c(f),localStorage.setItem(o,f)},[o]);return[i,u]};function XO(o){if(o===null||o===void 0)return ue.jsxDEV("span",{className:"italic text-fg-subtle",children:"null"},void 0,!1,void 0,this);if(typeof o==="boolean")return ue.jsxDEV("span",{className:"text-accent-strong",children:String(o)},void 0,!1,void 0,this);if(typeof o==="object"){let i=JSON.stringify(o);return ue.jsxDEV("span",{className:"block max-w-[280px] truncate font-mono text-caption text-fg-muted",title:i,children:i},void 0,!1,void 0,this)}let r=String(o);return ue.jsxDEV("span",{className:"block max-w-[280px] truncate",title:r,children:r},void 0,!1,void 0,this)}function JE(){let[o,r]=j0(K0.base,"http://localhost:8787"),[i,c]=j0(K0.token,""),[u,f]=j0(K0.tenant,"main"),[b,m]=j0(K0.theme,"light");Et.useEffect(()=>{document.documentElement.dataset.theme=b==="dark"?"dark":"light"},[b]);let g=Et.useMemo(()=>({baseUrl:o,token:i}),[o,i]),[x,v]=Et.useState([]),[h,T]=Et.useState(null),[R,w]=Et.useState(null),[L,M]=Et.useState(null),[H,I]=Et.useState(null),[X,Z]=Et.useState(0),[ge,he]=Et.useState(!1),[ae,U]=Et.useState(null),[te,j]=Et.useState(null),[ye,de]=Et.useState(null),[re,O]=Et.useState(!1),z=Et.useCallback((se)=>{if(se instanceof Vs)U({message:se.message,code:se.code});else U({message:se instanceof Error?se.message:String(se),code:"unknown"})},[]),K=Et.useCallback(async()=>{if(!i)return;try{v(await cl.tenants(g))}catch(se){if(se instanceof Vs&&se.status===403)z(se)}},[g,i,z]),V=Et.useCallback(async()=>{if(!i)return;U(null);try{let se=await cl.schema(g,u);T(se),w((Ge)=>Ge&&(Ge in se.tables)?Ge:Object.keys(se.tables)[0]??null)}catch(se){T(null),w(null),z(se)}},[g,u,i,z]),le=Et.useCallback(async()=>{if(!i||!R)return;he(!0),U(null);try{let[se,Ge]=await Promise.all([cl.list(g,u,R,Ru,X),cl.count(g,u,R)]);M(se),I(Ge)}catch(se){M(null),I(null),z(se)}finally{he(!1)}},[g,u,R,X,i,z]),Q=Et.useRef(void 0);Et.useEffect(()=>(clearTimeout(Q.current),Q.current=setTimeout(()=>{K(),V()},250),()=>clearTimeout(Q.current)),[o,i,u]),Et.useEffect(()=>{Z(0)},[R,u]),Et.useEffect(()=>{le()},[R,u,X,o,i]);let C=Et.useMemo(()=>(R&&h?h.tables[R]:null)??[],[R,h]),W=()=>{de(null);let se={};for(let Ge of C)if(Ge!=="id")se[Ge]=null;j({mode:"create",original:null,text:JSON.stringify(se,null,2)})},ve=async(se)=>{de(null);try{let Ge=await cl.get(g,u,R,se.id)??se;j({mode:"edit",original:Ge,text:JSON.stringify(Ge,null,2)})}catch(Ge){z(Ge)}},Ce=async()=>{if(!te||!R)return;let se;try{if(se=JSON.parse(te.text),typeof se!=="object"||se===null||Array.isArray(se))throw Error("must be a JSON object")}catch(Ge){de(Ge instanceof Error?Ge.message:"invalid JSON");return}O(!0),de(null);try{if(te.mode==="create")await cl.create(g,u,R,se);else{let Ge=te.original??{},pa=Ge.id,It={};for(let[Te,Fo]of Object.entries(se)){if(Te==="id")continue;if(JSON.stringify(Fo)!==JSON.stringify(Ge[Te]))It[Te]=Fo}if(Object.keys(It).length===0){de("no changes to save"),O(!1);return}await cl.update(g,u,R,pa,It)}j(null),await le()}catch(Ge){de(Ge instanceof Vs?`${Ge.message} (${Ge.code})`:String(Ge))}finally{O(!1)}},Ne=async(se)=>{if(!R)return;if(!confirm(`Delete row id=${JSON.stringify(se.id)} from "${R}"? This cannot be undone.`))return;O(!0);try{await cl.remove(g,u,R,se.id),await le()}catch(Ge){z(Ge)}finally{O(!1)}},He=h?Object.keys(h.tables):[],xe=Math.floor(X/Ru)+1,Xe=H!=null?Math.max(1,Math.ceil(H/Ru)):null,ht=x.includes(u)||!u?x:[u,...x],ft=[...C.map((se)=>({key:se,header:se,render:(Ge)=>XO(Ge[se])})),{key:"__actions",header:"actions",align:"right",render:(se)=>ue.jsxDEV("div",{className:"flex justify-end gap-1",children:[ue.jsxDEV(ia,{variant:"ghost",size:"sm",onPress:()=>void ve(se),children:"edit"},void 0,!1,void 0,this),ue.jsxDEV(ia,{variant:"destructive",size:"sm",isDisabled:re,onPress:()=>void Ne(se),children:"del"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}],un=ue.jsxDEV("div",{className:"flex flex-col gap-6 p-5",children:[ue.jsxDEV("div",{className:"flex flex-col gap-3",children:[ue.jsxDEV(Tu,{label:"base url",size:"sm",value:o,onChange:r,placeholder:"http://localhost:8787"},void 0,!1,void 0,this),ue.jsxDEV(Tu,{label:"admin token",size:"sm",type:"password",value:i,onChange:c,placeholder:"paste an admin JWT"},void 0,!1,void 0,this),ue.jsxDEV(mo,{size:"caption",tone:"subtle",children:'Every endpoint checks roles for "admin".'},void 0,!1,void 0,this)]},void 0,!0,void 0,this),ht.length>0?ue.jsxDEV("div",{className:"flex items-end gap-1.5",children:[ue.jsxDEV("div",{className:"min-w-0 flex-1",children:ue.jsxDEV($x,{label:"Tenant",placeholder:"select a tenant",selectedKey:u||null,onSelectionChange:(se)=>f(String(se)),children:ht.map((se)=>ue.jsxDEV(hx,{id:se,children:se===u&&!x.includes(se)?`${se} (manual)`:se},se,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this),ue.jsxDEV(ia,{variant:"ghost",size:"sm",className:"shrink-0",onPress:()=>{let se=prompt("Tenant name",u);if(se!=null&&se.trim())f(se.trim())},children:"edit"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):ue.jsxDEV(Tu,{label:"Tenant",size:"sm",value:u,onChange:f,placeholder:"main"},void 0,!1,void 0,this),ue.jsxDEV("div",{className:"flex flex-col gap-2",children:[ue.jsxDEV(mo,{size:"caption",tone:"muted",className:"font-medium uppercase tracking-wide",children:"Schema"},void 0,!1,void 0,this),h?ue.jsxDEV("div",{className:"flex items-center gap-2 rounded-full border border-border px-3 py-1 font-mono text-caption",title:"applied schema hash",children:[ue.jsxDEV("span",{className:`h-2 w-2 rounded-full ${h.hash?"bg-brand-green":"bg-fg-subtle"}`},void 0,!1,void 0,this),ue.jsxDEV("span",{className:h.hash?"text-fg-muted":"text-fg-subtle",children:h.hash?h.hash.slice(0,12):"no schema hash"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):ue.jsxDEV(mo,{size:"small",tone:"subtle",children:i?"—":"enter a token"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),ue.jsxDEV("div",{className:"flex flex-col gap-2",children:[ue.jsxDEV(mo,{size:"caption",tone:"muted",className:"font-medium uppercase tracking-wide",children:["Tables",He.length?` · ${He.length}`:""]},void 0,!0,void 0,this),He.length>0?ue.jsxDEV("ul",{className:"flex flex-col gap-1",children:He.map((se)=>ue.jsxDEV("li",{children:ue.jsxDEV("button",{className:`flex w-full items-center justify-between rounded-lg px-3 py-2 text-left text-small transition-colors ${se===R?"bg-surface-card font-medium text-fg":"text-fg-muted hover:bg-surface-card"}`,onClick:()=>w(se),children:[ue.jsxDEV("span",{children:se},void 0,!1,void 0,this),ue.jsxDEV(mo,{size:"caption",tone:"subtle",children:h.tables[se].length},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},se,!1,void 0,this))},void 0,!1,void 0,this):ue.jsxDEV(mo,{size:"small",tone:"subtle",children:i?"no tables":""},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),me=ue.jsxDEV(F0,{className:"px-6",children:[ue.jsxDEV(F0.Brand,{children:[ue.jsxDEV("span",{className:"text-callout font-bold text-fg",children:"pramen"},void 0,!1,void 0,this),ue.jsxDEV("span",{className:"text-fg-subtle",children:"admin"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),ue.jsxDEV(F0.Actions,{children:ue.jsxDEV(ia,{variant:"ghost",size:"sm","aria-label":b==="dark"?"Switch to light theme":"Switch to dark theme",onPress:()=>m(b==="dark"?"light":"dark"),children:b==="dark"?ue.jsxDEV(jE,{className:"h-4 w-4"},void 0,!1,void 0,this):ue.jsxDEV(GE,{className:"h-4 w-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return ue.jsxDEV(ue.Fragment,{children:[ue.jsxDEV(FE,{topbar:me,sidebar:un,sidebarLabel:"Admin navigation",drawerToggleLabel:"Toggle navigation",children:[ae&&ue.jsxDEV(Ff,{variant:"outlined",padding:"none",className:"mb-4 flex items-center justify-between gap-3 border-danger px-4 py-2.5",children:[ue.jsxDEV(mo,{size:"small",className:"text-danger",children:[ae.message," ",ue.jsxDEV("code",{className:"font-mono",children:ae.code},void 0,!1,void 0,this)]},void 0,!0,void 0,this),ue.jsxDEV(ia,{variant:"ghost",size:"sm",onPress:()=>U(null),children:"dismiss"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),!R?ue.jsxDEV(Ff,{variant:"outlined",padding:"lg",className:"text-center",children:[ue.jsxDEV(vx,{level:"3",className:"mb-2",children:i?"select a table":"paste an admin token to begin"},void 0,!1,void 0,this),ue.jsxDEV(mo,{tone:"muted",children:["The dashboard talks to the pramen Worker over HTTP. Tenant defaults to ",ue.jsxDEV("code",{className:"font-mono text-accent-strong",children:"main"},void 0,!1,void 0,this),"."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):ue.jsxDEV(ue.Fragment,{children:[ue.jsxDEV("div",{className:"mb-4 flex items-center gap-3",children:[ue.jsxDEV(vx,{level:"2",children:R},void 0,!1,void 0,this),ue.jsxDEV(qE,{color:"grey",label:H==null?"…":`${H} row${H===1?"":"s"}`},void 0,!1,void 0,this),ue.jsxDEV("span",{className:"flex-1"},void 0,!1,void 0,this),ue.jsxDEV(ia,{variant:"ghost",size:"sm",isDisabled:ge,onPress:()=>void le(),children:"refresh"},void 0,!1,void 0,this),ue.jsxDEV(ia,{size:"sm",onPress:W,children:"+ new row"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),ue.jsxDEV("div",{className:"mb-3 flex items-center gap-2",children:[ue.jsxDEV(ia,{variant:"secondary",size:"sm",isDisabled:X===0||ge,onPress:()=>Z(Math.max(0,X-Ru)),children:"‹ prev"},void 0,!1,void 0,this),ue.jsxDEV(mo,{size:"small",tone:"muted",children:["page ",xe,Xe!=null?` / ${Xe}`:""]},void 0,!0,void 0,this),ue.jsxDEV(ia,{variant:"secondary",size:"sm",isDisabled:ge||H!=null&&X+Ru>=H,onPress:()=>Z(X+Ru),children:"next ›"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),ge&&!L?ue.jsxDEV(mo,{tone:"subtle",className:"block py-12 text-center",children:"loading…"},void 0,!1,void 0,this):L?ue.jsxDEV(Ff,{variant:"outlined",padding:"none",className:"overflow-hidden",children:ue.jsxDEV(XE,{columns:ft,data:L,getRowKey:(se,Ge)=>String(se.id??Ge),emptyMessage:"no rows on this page","aria-label":`${R} rows`},void 0,!1,void 0,this)},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),ue.jsxDEV(Us,{isOpen:te!=null,onOpenChange:(se)=>{if(!se)j(null)},size:"lg",title:te?te.mode==="create"?`new ${R} row`:`edit ${R} · id=${JSON.stringify(te.original?.id)}`:void 0,description:te?.mode==="edit"?"Only changed fields are sent as the patch.":te?"Sent as the row's values.":void 0,children:()=>te&&ue.jsxDEV("div",{className:"flex flex-col gap-4",children:[ue.jsxDEV("label",{className:"flex flex-col gap-2",children:[ue.jsxDEV(mo,{size:"small",weight:"medium",children:"row json"},void 0,!1,void 0,this),ue.jsxDEV("textarea",{className:"min-h-[300px] w-full resize-y rounded-lg border border-border bg-surface px-4 py-3 font-mono text-caption text-fg outline-none transition-colors focus:border-brand-green focus:ring-2 focus:ring-ring",value:te.text,spellCheck:!1,onChange:(se)=>j({...te,text:se.target.value})},void 0,!1,void 0,this)]},void 0,!0,void 0,this),ye&&ue.jsxDEV(Ff,{variant:"outlined",padding:"none",className:"border-danger px-3.5 py-2.5",children:ue.jsxDEV(mo,{size:"small",className:"text-danger",children:ye},void 0,!1,void 0,this)},void 0,!1,void 0,this),ue.jsxDEV("div",{className:"flex items-center gap-2",children:[ue.jsxDEV(mo,{size:"small",tone:"subtle",children:te.mode==="edit"?"id is never modified":"id is assigned by the server unless provided"},void 0,!1,void 0,this),ue.jsxDEV("span",{className:"flex-1"},void 0,!1,void 0,this),ue.jsxDEV(ia,{variant:"ghost",onPress:()=>j(null),children:"cancel"},void 0,!1,void 0,this),ue.jsxDEV(ia,{isDisabled:re,onPress:()=>void Ce(),children:re?"saving…":te.mode==="create"?"create":"save changes"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var Tx=F(Qt(),1);tT.createRoot(document.getElementById("app")).render(Tx.jsxDEV(eT.StrictMode,{children:Tx.jsxDEV(JE,{},void 0,!1,void 0,this)},void 0,!1,void 0,this));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pramen/admin",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.49",
|
|
4
4
|
"description": "pramen admin dashboard — a Preact single-page browser client for the pramen admin HTTP API (tenants, schema, and generic row browse/edit).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
package/src/api.ts
CHANGED
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
// bearer token; failures surface as an ApiError that the UI renders verbatim
|
|
3
3
|
// (error + code), with a friendlier hint for a 403 (not an admin token).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
/** Any JSON value. Declared locally (not imported from @pramen/server) so the admin
|
|
6
|
+
* stays a standalone browser bundle with no server-package dependency. */
|
|
7
|
+
export type JsonValue = string | number | boolean | null | JsonValue[] | { [key: string]: JsonValue };
|
|
8
|
+
|
|
9
|
+
/** One row of admin data, as the `/admin/data` endpoint returns it. */
|
|
10
|
+
export type Row = Record<string, JsonValue>;
|
|
6
11
|
|
|
7
12
|
export interface SchemaResult {
|
|
8
13
|
hash: string | null;
|
|
@@ -34,16 +39,14 @@ interface Envelope<T> {
|
|
|
34
39
|
|
|
35
40
|
async function call<T>(cfg: Config, path: string, init?: RequestInit): Promise<T> {
|
|
36
41
|
const base = cfg.baseUrl.replace(/\/+$/, "");
|
|
42
|
+
const headers = new Headers();
|
|
43
|
+
if (init?.body) headers.set("content-type", "application/json");
|
|
44
|
+
headers.set("authorization", `Bearer ${cfg.token}`);
|
|
45
|
+
// caller-supplied headers win, matching the previous spread order
|
|
46
|
+
for (const [key, value] of new Headers(init?.headers)) headers.set(key, value);
|
|
37
47
|
let res: Response;
|
|
38
48
|
try {
|
|
39
|
-
res = await fetch(`${base}${path}`, {
|
|
40
|
-
...init,
|
|
41
|
-
headers: {
|
|
42
|
-
...(init?.body ? { "content-type": "application/json" } : {}),
|
|
43
|
-
authorization: `Bearer ${cfg.token}`,
|
|
44
|
-
...(init?.headers ?? {}),
|
|
45
|
-
},
|
|
46
|
-
});
|
|
49
|
+
res = await fetch(`${base}${path}`, { ...init, headers });
|
|
47
50
|
} catch (e) {
|
|
48
51
|
throw new ApiError(
|
|
49
52
|
`network error reaching ${base} — is pramen running and is CORS_ORIGINS set?`,
|