@prefecthq/prefab-ui 0.18.3 → 0.18.4
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.
|
@@ -9658,6 +9658,7 @@ _OP_PREC: dict[str, int] = {
|
|
|
9658
9658
|
"-": _PREC_ADD,
|
|
9659
9659
|
"*": _PREC_MUL,
|
|
9660
9660
|
"/": _PREC_MUL,
|
|
9661
|
+
"%": _PREC_MUL,
|
|
9661
9662
|
"==": _PREC_COMP,
|
|
9662
9663
|
"!=": _PREC_COMP,
|
|
9663
9664
|
">": _PREC_COMP,
|
|
@@ -9821,6 +9822,12 @@ class Rx:
|
|
|
9821
9822
|
def __rtruediv__(self, other: object) -> Rx:
|
|
9822
9823
|
return Rx(_BinOp("/", other, self), _PREC_MUL)
|
|
9823
9824
|
|
|
9825
|
+
def __mod__(self, other: object) -> Rx:
|
|
9826
|
+
return Rx(_BinOp("%", self, other), _PREC_MUL)
|
|
9827
|
+
|
|
9828
|
+
def __rmod__(self, other: object) -> Rx:
|
|
9829
|
+
return Rx(_BinOp("%", other, self), _PREC_MUL)
|
|
9830
|
+
|
|
9824
9831
|
def __neg__(self) -> Rx:
|
|
9825
9832
|
return Rx(_UnaryOp("-", self), _PREC_UNARY)
|
|
9826
9833
|
|
package/dist/app/renderer.js
CHANGED
|
@@ -1164,7 +1164,7 @@ Supports **bold**, *italic*, \`inline code\`, and:
|
|
|
1164
1164
|
${s.right}px ${s.bottom}px,
|
|
1165
1165
|
${s.right}px ${s.top}px,
|
|
1166
1166
|
${s.left}px ${s.top}px
|
|
1167
|
-
)`}return j.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:a}})}),s8=_.forwardRef(function(t,n){const{render:i,className:r,anchor:a,positionMethod:s="absolute",side:c="bottom",align:f="center",sideOffset:p=0,alignOffset:h=0,collisionBoundary:g="clipping-ancestors",collisionPadding:w=5,arrowPadding:k=5,sticky:$=!1,disableAnchorTracking:R=!1,collisionAvoidance:E=qR,...O}=t,z=td(),{filteredItems:P}=Yf(),N=kw(),B=XU(),Z=at(z,jt.modal),q=at(z,jt.open),K=at(z,jt.mounted),fe=at(z,jt.openMethod),be=at(z,jt.triggerElement),ie=at(z,jt.inputElement),V=at(z,jt.inputInsidePopup),re=at(z,jt.transitionStatus),se=P.length===0,F=Qf({anchor:a??(V?be:ie),floatingRootContext:N,positionMethod:s,mounted:K,side:c,sideOffset:p,align:f,alignOffset:h,arrowPadding:k,collisionBoundary:g,collisionPadding:w,sticky:$,disableAnchorTracking:R,keepMounted:B,collisionAvoidance:E,lazyFlip:!0});Og(q&&Z&&fe!=="touch",be);const X=_.useMemo(()=>{const de={...F.positionerStyles};return q||(de.pointerEvents="none"),{role:"presentation",hidden:!K,style:de}},[q,K,F.positionerStyles]),Q={open:q,side:F.side,align:F.align,anchorHidden:F.anchorHidden,empty:se};dt(()=>{z.set("popupSide",F.side)},[z,F.side]);const ue=_.useMemo(()=>({side:F.side,align:F.align,arrowRef:F.arrowRef,arrowUncentered:F.arrowUncentered,arrowStyles:F.arrowStyles,anchorHidden:F.anchorHidden,isPositioned:F.isPositioned}),[F.side,F.align,F.arrowRef,F.arrowUncentered,F.arrowStyles,F.anchorHidden,F.isPositioned]),he=it(de=>{z.set("positionerElement",de)}),Y=Xt("div",t,{state:Q,ref:[n,he],props:[X,Ua(re),O],stateAttributesMapping:Bo});return j.jsxs($E.Provider,{value:ue,children:[K&&Z&&j.jsx(Ag,{inert:Wf(!q),cutout:ie??be}),Y]})}),u8={...Bo,...Ho},c8=_.forwardRef(function(t,n){const{render:i,className:r,initialFocus:a,finalFocus:s,...c}=t,f=td(),p=CE(),h=kw(),{filteredItems:g}=Yf(),w=at(f,jt.mounted),k=at(f,jt.open),$=at(f,jt.openMethod),R=at(f,jt.transitionStatus),E=at(f,jt.inputInsidePopup),O=at(f,jt.inputElement),z=g.length===0;Pi({open:k,ref:f.state.popupRef,onComplete(){k&&f.state.onOpenChangeComplete(!0)}});const P={open:k,side:p.side,align:p.align,anchorHidden:p.anchorHidden,transitionStatus:R,empty:z},N=Xt("div",t,{state:P,ref:[n,f.state.popupRef],props:[{role:E?"dialog":"presentation",tabIndex:-1,onFocus(K){var be;const fe=ri(K.nativeEvent);$!=="touch"&&(rn(f.state.listElement,fe)||fe===K.currentTarget)&&((be=f.state.inputRef.current)==null||be.focus())}},Ua(R),c],stateAttributesMapping:u8}),Z=a===void 0?E?K=>K==="touch"?f.state.popupRef.current:O:!1:a;let q;return s!=null?q=s:q=E?void 0:!1,j.jsx(kg,{context:h,disabled:!w,modal:!E,openInteractionType:$,initialFocus:Z,returnFocus:q,children:N})});let Cw=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function rd(e={}){const{label:t,metadata:n,textRef:i,indexGuessBehavior:r,index:a}=e,{register:s,unregister:c,subscribeMapChange:f,elementsRef:p,labelsRef:h,nextIndexRef:g}=GU(),w=_.useRef(-1),[k,$]=_.useState(a??(r===Cw.GuessFromOrder?()=>{if(w.current===-1){const O=g.current;g.current+=1,w.current=O}return w.current}:-1)),R=_.useRef(null),E=_.useCallback(O=>{var z;if(R.current=O,k!==-1&&O!==null&&(p.current[k]=O,h)){const P=t!==void 0;h.current[k]=P?t:((z=i==null?void 0:i.current)==null?void 0:z.textContent)??O.textContent}},[k,p,h,t,i]);return dt(()=>{if(a!=null)return;const O=R.current;if(O)return s(O,n),()=>{c(O)}},[a,s,c,n]),dt(()=>{if(a==null)return f(O=>{var P;const z=R.current?(P=O.get(R.current))==null?void 0:P.index:null;z!=null&&$(z)})},[a,f,$]),_.useMemo(()=>({ref:E,index:k}),[k,E])}const d8=_.createContext(void 0),f8=_.createContext(!1);function p8(){return _.useContext(f8)}const m8=_.memo(_.forwardRef(function(t,n){const{render:i,className:r,value:a=null,index:s,disabled:c=!1,nativeButton:f=!1,...p}=t,h=_.useRef(!1),g=_.useRef(null),w=rd({index:s,textRef:g,indexGuessBehavior:Cw.GuessFromOrder}),k=td(),$=p8(),{flatFilteredItems:R,hasItems:E}=Yf(),O=at(k,jt.open),z=at(k,jt.selectionMode),P=at(k,jt.readOnly),N=at(k,jt.virtualized),B=at(k,jt.isItemEqualToValue),Z=z!=="none",q=s??(N?vs(R,a,B):w.index),K=w.index!==-1,fe=at(k,jt.id),be=at(k,jt.isActive,q),ie=at(k,jt.isSelected,a),V=at(k,jt.getItemProps),re=_.useRef(null),se=fe!=null&&K?`${fe}-${q}`:void 0,ae=ie&&Z;dt(()=>{if(!(K&&(N||s!=null)))return;const ze=k.state.listRef.current;return ze[q]=re.current,()=>{delete ze[q]}},[K,N,q,s,k]),dt(()=>{if(!K||E)return;const ce=k.state.valuesRef.current;return ce[q]=a,z!=="none"&&k.state.allValuesRef.current.push(a),()=>{delete ce[q]}},[K,E,q,a,k,z]),dt(()=>{if(!O){h.current=!1;return}if(!K||E)return;const ce=k.state.selectedValue,ze=Array.isArray(ce)?ce[ce.length-1]:ce;Pa(a,ze,B)&&k.set("selectedIndex",q)},[K,E,O,k,q,a,B]);const F={disabled:c,selected:ae,highlighted:be},X=V({active:be,selected:ae});X.id=void 0,X.onFocus=void 0;const{getButtonProps:Q,buttonRef:ue}=qo({disabled:c,focusableWhenDisabled:!0,native:f});function he(ce){function ze(){k.state.handleSelection(ce,a)}k.state.submitOnItemClick?(Mi.flushSync(ze),k.state.requestSubmit()):ze()}const Y={id:se,role:$?"gridcell":"option","aria-selected":Z?ae:void 0,tabIndex:void 0,onPointerDownCapture(ce){h.current=!0,ce.preventDefault()},onClick(ce){c||P||he(ce.nativeEvent)},onMouseUp(ce){const ze=h.current;h.current=!1,!(c||P||ce.button!==0||ze||!be)&&he(ce.nativeEvent)}},de=Xt("div",t,{ref:[ue,n,w.ref,re],state:F,props:[X,Y,p,Q]}),ge=_.useMemo(()=>({selected:ae,textRef:g}),[ae,g]);return j.jsx(d8.Provider,{value:ge,children:de})})),Ry=_.forwardRef(function(t,n){const{className:i,render:r,orientation:a="horizontal",...s}=t;return Xt("div",t,{state:{orientation:a},ref:n,props:[{role:"separator","aria-orientation":a},s]})}),h8=_.createContext(void 0);function id(){return _.useContext(h8)}function g2({item:e}){return j.jsx(m8,{value:e.value,disabled:e.disabled,className:st("pf-combobox-item relative flex cursor-pointer select-none items-center",e.disabled&&"pointer-events-none opacity-50"),children:e.label})}function v2(e,t){return t?e.toLowerCase().includes(t.toLowerCase()):!0}function g8({placeholder:e="Select...",searchPlaceholder:t="Search...",disabled:n,value:i,side:r="bottom",align:a="start",invalid:s=!1,onValueChange:c,className:f,_items:p=[],_groups:h=[],_separatorIndices:g=[]}){var be;const w=id(),k=h.length>0,[$,R]=_.useState(!1),[E,O]=_.useState(""),z=new Set(["outside-press","focus-out"]),P=(ie,V)=>{!ie&&z.has(V.reason)||(R(ie),ie||O(""))},B=(be=_.useMemo(()=>k?h.flatMap(ie=>ie.items):p,[p,h,k]).find(ie=>ie.value===i))==null?void 0:be.label,Z=_.useMemo(()=>p.filter(ie=>v2(ie.label,E)),[p,E]),q=_.useMemo(()=>h.map(ie=>({...ie,items:ie.items.filter(V=>v2(V.label,E))})).filter(ie=>ie.items.length>0),[h,E]),K=k?q.length>0:Z.length>0,fe=_.useMemo(()=>new Set(g),[g]);return j.jsxs(NU,{open:$,onOpenChange:P,value:i??null,onValueChange:ie=>{c==null||c(ie??"")},onInputValueChange:ie=>{O(ie)},disabled:n,children:[j.jsxs(qU,{"aria-invalid":s||void 0,disabled:n,className:st("pf-button pf-button-variant-outline pf-button-size-default pf-combobox-trigger w-full justify-between font-normal",!i&&"text-muted-foreground",s&&"border-destructive focus-visible:border-destructive focus-visible:ring-destructive/20",f),children:[B??e,j.jsx(rR,{className:"pf-combobox-trigger-icon"})]}),j.jsxs(WU,{container:w,children:[$&&j.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>R(!1)}),j.jsx(s8,{side:r,sideOffset:4,align:a,className:"isolate z-50",children:j.jsxs(c8,{className:"pf-combobox-content group/combobox-content min-w-(--anchor-width) p-0",children:[j.jsx(ZU,{placeholder:t,className:"pf-input h-8 m-1 mb-0 w-[calc(100%-0.5rem)] border border-border bg-transparent shadow-none focus-visible:ring-0 focus-visible:ring-offset-0"}),j.jsxs("div",{className:"pf-combobox-list",children:[k?q.map((ie,V)=>j.jsxs(_.Fragment,{children:[V>0&&j.jsx(Ry,{className:"pf-combobox-separator"}),j.jsxs("div",{children:[ie.label&&j.jsx("div",{className:"pf-combobox-label",children:ie.label}),ie.items.map(re=>j.jsx(g2,{item:re},re.value))]})]},V)):Z.map(ie=>{const V=p.indexOf(ie);return j.jsxs(_.Fragment,{children:[fe.has(V)&&j.jsx(Ry,{className:"pf-combobox-separator"}),j.jsx(g2,{item:ie})]},ie.value)}),!K&&j.jsx("div",{className:"w-full py-2 text-center text-sm text-muted-foreground",children:"No results found."})]})]})})]})]})}function v8({invalid:e,disabled:t,className:n,children:i}){return j.jsx("div",{"data-slot":"field","data-invalid":e||void 0,"data-disabled":t||void 0,className:st("pf-field group/field flex flex-col gap-1.5",n),children:i})}function b8({invalid:e,disabled:t,className:n,children:i}){return j.jsx("label",{className:"pf-field-label",children:j.jsx("div",{"data-slot":"field","data-invalid":e||void 0,"data-disabled":t||void 0,className:st("pf-field group/field flex items-center justify-between gap-2",n),children:i})})}function y8({className:e,children:t}){return j.jsx("span",{className:st("pf-field-title",e),children:t})}function w8({className:e,children:t}){return j.jsx("span",{className:st("pf-field-description",e),children:t})}function x8({className:e,children:t}){return j.jsx("div",{className:st("pf-field-content grid",e),children:t})}function k8({className:e,children:t}){return j.jsx("p",{className:st("pf-field-error",e),children:t})}const S8={sm:"size-3.5",default:"size-4",lg:"size-6"};function _8({name:e,size:t="default",className:n}){const i=pg(e);return i?j.jsx(i,{className:st(S8[t],n)}):null}function AE({className:e,type:t,...n}){return j.jsx("input",{type:t,"data-slot":"input",className:st("pf-input file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",e),...n})}function $8({className:e,...t}){return j.jsx("textarea",{"data-slot":"textarea",className:st("pf-textarea placeholder:text-muted-foreground flex field-sizing-content min-h-16 w-full outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...t})}function C8({className:e,orientation:t="horizontal",...n}){return j.jsx(Ry,{"data-slot":"separator",orientation:t,className:st("pf-separator",t==="horizontal"?"pf-separator-horizontal":"pf-separator-vertical",e),...n})}const ep={sm:"size-4",default:"size-6",lg:"size-8"};function R8({size:e="default",className:t}){const n=e==="sm"?2:e==="lg"?4:3,i=24,r=i/2,a=r-(e==="sm"?4:e==="lg"?6:5);return j.jsx("svg",{viewBox:`0 0 24 ${i}`,className:st("text-muted-foreground",ep[e],t),role:"status","aria-label":"Loading",children:[4,12,20].map((s,c)=>j.jsx("circle",{cx:s,cy:r,r:n,fill:"currentColor",children:j.jsx("animate",{attributeName:"cy",values:`${r};${a};${r};${r}`,keyTimes:"0;0.15;0.3;1",dur:"2s",begin:`${c*.1}s`,repeatCount:"indefinite",calcMode:"spline",keySplines:"0.33 0 0.67 1; 0.33 0 0.67 1; 0 0 1 1"})},s))})}function E8({size:e="default",className:t}){const n=e==="sm"?3:e==="lg"?6:4;return j.jsxs("svg",{viewBox:"0 0 24 24",className:st("text-muted-foreground",ep[e],t),role:"status","aria-label":"Loading",children:[j.jsxs("circle",{cx:"12",cy:"12",r:n,fill:"currentColor",opacity:"0.3",children:[j.jsx("animate",{attributeName:"r",values:`${n};${n+4};${n}`,dur:"1.2s",repeatCount:"indefinite",calcMode:"spline",keySplines:"0.33 0 0.67 1; 0.33 0 0.67 1"}),j.jsx("animate",{attributeName:"opacity",values:"0.3;0.08;0.3",dur:"1.2s",repeatCount:"indefinite",calcMode:"spline",keySplines:"0.33 0 0.67 1; 0.33 0 0.67 1"})]}),j.jsx("circle",{cx:"12",cy:"12",r:n,fill:"currentColor"})]})}function T8({size:e="default",className:t}){const n=e==="sm"?2.5:e==="lg"?4:3,i=e==="sm"?2:e==="lg"?3.5:2.5,a=(24-(n*3+i*2))/2,s=4,c=16;return j.jsx("svg",{viewBox:"0 0 24 24",className:st("text-muted-foreground",ep[e],t),role:"status","aria-label":"Loading",children:[0,1,2].map(f=>{const p=a+f*(n+i);return j.jsxs("rect",{x:p,width:n,rx:n/2,fill:"currentColor",children:[j.jsx("animate",{attributeName:"height",values:`${s};${c};${s}`,dur:"1s",begin:`${f*.15}s`,repeatCount:"indefinite",calcMode:"spline",keySplines:"0.33 0 0.67 1; 0.33 0 0.67 1"}),j.jsx("animate",{attributeName:"y",values:`${(24-s)/2};${(24-c)/2};${(24-s)/2}`,dur:"1s",begin:`${f*.15}s`,repeatCount:"indefinite",calcMode:"spline",keySplines:"0.33 0 0.67 1; 0.33 0 0.67 1"})]},f)})})}function I8({size:e="default",className:t}){const a=e==="sm"?1.5:e==="lg"?2.5:2,s=Array.from({length:8},(c,f)=>{const p=(f*360/8-90)*(Math.PI/180);return{x1:12+Math.cos(p)*5,y1:12+Math.sin(p)*5,x2:12+Math.cos(p)*10,y2:12+Math.sin(p)*10,opacity:1-f/8*.75}});return j.jsx("svg",{viewBox:"0 0 24 24",className:st("text-muted-foreground",ep[e],t),style:{animation:"spin 0.8s steps(8, end) infinite"},role:"status","aria-label":"Loading",children:s.map((c,f)=>j.jsx("line",{x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,stroke:"currentColor",strokeWidth:a,strokeLinecap:"round",opacity:c.opacity},f))})}function z8({variant:e="spin",size:t="default",className:n}){return e==="dots"?j.jsx(R8,{size:t,className:n}):e==="pulse"?j.jsx(E8,{size:t,className:n}):e==="bars"?j.jsx(T8,{size:t,className:n}):e==="ios"?j.jsx(I8,{size:t,className:n}):j.jsx(oR,{className:st("animate-spin text-muted-foreground",ep[t],n),role:"status","aria-label":"Loading"})}function ao(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function NE(e,t,n=(i,r)=>i===r){return e.length===t.length&&e.every((i,r)=>n(i,t[r]))}function ME(e,t){return e-t}function O8(e,t,n){const i=e.slice();return i[t]=n,i.sort(ME)}function DE(e,t,n,i,r,a){let s=e;return s=ao(s,n,i),r&&(s=O8(a,t,ao(s,a[t-1]||-1/0,a[t+1]||1/0))),s}function PE(e,t,n){if(!Array.isArray(e))return!0;const i=e.reduce((r,a,s,c)=>(s===c.length-1||r.push(Math.abs(a-c[s+1])),r),[]);return Math.min(...i)>=t*n}const tp={activeThumbIndex:()=>null,max:()=>null,min:()=>null,minStepsBetweenValues:()=>null,step:()=>null,values:()=>null,...Is},jE=_.createContext(void 0);function Ng(){const e=_.useContext(jE);if(e===void 0)throw new Error(En(62));return e}function A8(e){return"key"in e?Fj:fu}function N8(e,t){return typeof e=="number"&&typeof t=="number"?e===t:Array.isArray(e)&&Array.isArray(t)?NE(e,t):!1}const M8=_.forwardRef(function(t,n){const{"aria-labelledby":i,className:r,defaultValue:a,disabled:s=!1,id:c,format:f,largeStep:p=10,locale:h,render:g,max:w=100,min:k=0,minStepsBetweenValues:$=0,name:R,onValueChange:E,onValueCommitted:O,orientation:z="horizontal",step:P=1,thumbCollisionBehavior:N="push",thumbAlignment:B="center",value:Z,...q}=t,K=Fr(c),fe=it(E),be=it(O),{clearErrors:ie}=Eu(),{state:V,disabled:re,name:se,setTouched:ae,setDirty:F,validityData:X,shouldValidateOnChange:Q,validation:ue}=xo(),{labelId:he}=Sl(),Y=i??he,de=re||s,ge=se??R,[ce,ze]=Vo({controlled:Z,default:a??k,name:"Slider"}),$e=_.useRef(null),De=_.useRef(null),et=_.useRef([]),qe=_.useRef(null),ft=_.useRef(null),ht=_.useRef(-1),ke=_.useRef(null),Ae=_.useRef(null),Fe=_.useRef("none"),Me=jr(f),[xe,ye]=_.useState(-1),[_e,Te]=_.useState(-1),[Ne,Le]=_.useState(!1),[Ye,Je]=_.useState(()=>new Map),[Ze,C]=_.useState([void 0,void 0]),en=it(Rt=>{ye(Rt),Rt!==-1&&Te(Rt)});nd({id:K,commit:ue.commit,value:ce,controlRef:De,name:ge,getValue:()=>ce}),ml(ce,()=>{ie(ge),Q()?ue.commit(ce):ue.commit(ce,!0);const Rt=X.initialValue;let Vt;Array.isArray(ce)&&Array.isArray(Rt)?Vt=!NE(ce,Rt):Vt=ce!==Rt,F(Vt)});const It=it(Rt=>{Rt&&(De.current=Rt)}),mt=Array.isArray(ce),$t=_.useMemo(()=>mt?ce.slice().sort(ME):[ao(ce,k,w)],[w,k,mt,ce]),Nt=it((Rt,Vt)=>{if(Number.isNaN(Rt)||N8(Rt,ce))return;const dn=Vt??Et(Er,void 0,void 0,{activeThumbIndex:-1});Fe.current=dn.reason;const kn=dn.event,pt=kn.constructor??Event,vn=new pt(kn.type,kn);Object.defineProperty(vn,"target",{writable:!0,value:{value:Rt,name:ge}}),dn.event=vn,Ae.current=Rt,fe(Rt,dn),!dn.isCanceled&&ze(Rt)}),Wt=it((Rt,Vt,dn)=>{const kn=DE(Rt,Vt,k,w,mt,$t);if(PE(kn,P,$)){const pt=A8(dn);Nt(kn,Et(pt,dn.nativeEvent,void 0,{activeThumbIndex:Vt})),ae(!0);const vn=Ae.current??kn;be(vn,cu(pt,dn.nativeEvent))}});dt(()=>{var Vt;const Rt=no(Pn($e.current));de&&Rt&&((Vt=$e.current)!=null&&Vt.contains(Rt))&&Rt.blur()},[de]),de&&xe!==-1&&en(-1);const qt=_.useMemo(()=>({...V,activeThumbIndex:xe,disabled:de,dragging:Ne,orientation:z,max:w,min:k,minStepsBetweenValues:$,step:P,values:$t}),[V,xe,de,Ne,w,k,$,z,P,$t]),Tn=_.useMemo(()=>({active:xe,controlRef:De,disabled:de,dragging:Ne,validation:ue,formatOptionsRef:Me,handleInputChange:Wt,indicatorPosition:Ze,inset:B!=="center",labelId:Y,largeStep:p,lastUsedThumbIndex:_e,lastChangedValueRef:Ae,lastChangeReasonRef:Fe,locale:h,max:w,min:k,minStepsBetweenValues:$,name:ge,onValueCommitted:be,orientation:z,pressedInputRef:qe,pressedThumbCenterOffsetRef:ft,pressedThumbIndexRef:ht,pressedValuesRef:ke,registerFieldControlRef:It,renderBeforeHydration:B==="edge",setActive:en,setDragging:Le,setIndicatorPosition:C,setValue:Nt,state:qt,step:P,thumbCollisionBehavior:N,thumbMap:Ye,thumbRefs:et,values:$t}),[xe,De,Y,de,Ne,ue,Me,Wt,Ze,p,_e,Ae,Fe,h,w,k,$,ge,be,z,qe,ft,ht,ke,It,en,Le,C,Nt,qt,P,N,B,Ye,et,$t]),bn=Xt("div",t,{state:qt,ref:[n,$e],props:[{"aria-labelledby":Y,id:K,role:"group"},ue.getValidationProps,q],stateAttributesMapping:tp});return j.jsx(jE.Provider,{value:Tn,children:j.jsx(Xf,{elementsRef:et,onMapChange:Je,children:bn})})}),b2=new Map;function D8(e,t){const n=JSON.stringify({locale:e,options:t}),i=b2.get(n);if(i)return i;const r=new Intl.NumberFormat(e,t);return b2.set(n,r),r}function Ec(e,t,n){return e==null?"":D8(t,n).format(e)}function P8(e,t,n){return e==null?"":n?Ec(e,t,n):Ec(e/100,t,{style:"percent"})}function UE(e){const t=e.getBoundingClientRect();return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function j8(e){if(Math.abs(e)<1){const n=e.toExponential().split("e-"),i=n[0].split(".")[1];return(i?i.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function LE(e,t,n){const i=Math.round((e-n)/t)*t+n;return Number(i.toFixed(j8(t)))}function y2({values:e,index:t,nextValue:n,min:i,max:r,step:a,minStepsBetweenValues:s,initialValues:c}){if(e.length===0)return[];const f=e.slice(),p=a*s,h=f.length-1,g=c??e,w=i+t*p,k=r-(h-t)*p;f[t]=ao(n,w,k);for(let $=t+1;$<=h;$+=1){const R=f[$-1]+p,E=r-(h-$)*p,O=g[$]??f[$];let z=Math.max(f[$],R);O<z&&(z=Math.max(O,R)),f[$]=ao(z,R,E)}for(let $=t-1;$>=0;$-=1){const R=f[$+1]-p,E=i+$*p,O=g[$]??f[$];let z=Math.min(f[$],R);O>z&&(z=Math.min(O,R)),f[$]=ao(z,E,R)}for(let $=0;$<=h;$+=1)f[$]=Number(f[$].toFixed(12));return f}function U8({behavior:e,values:t,currentValues:n,initialValues:i,pressedIndex:r,nextValue:a,min:s,max:c,step:f,minStepsBetweenValues:p}){const h=n??t,g=i??t;if(!(h.length>1))return{value:a,thumbIndex:0,didSwap:!1};const k=f*p;switch(e){case"swap":{const $=h[r],R=1e-7,E=h.slice(),O=E[r-1],z=E[r+1],P=O!=null?O+k:s,N=z!=null?z-k:c,B=ao(a,P,N),Z=Number(B.toFixed(12));E[r]=Z;const q=a>$,K=a<$,fe=q&&z!=null&&a>=z-R,be=K&&O!=null&&a<=O+R;if(!fe&&!be)return{value:E,thumbIndex:r,didSwap:!1};const ie=fe?r+1:r-1,V=E.map((F,X)=>{if(X===r)return Z;const Q=g[X];return Q??h[X]});let re=a;fe?re=Math.max(a,E[ie]):re=Math.min(a,E[ie]);const se=y2({values:E,index:ie,nextValue:re,min:s,max:c,step:f,minStepsBetweenValues:p,initialValues:V}),ae=fe?ie-1:ie+1;if(ae>=0&&ae<se.length){const F=se[ae-1],X=se[ae+1];let Q=F!=null?F+k:s;Q=Math.max(Q,s+ae*k);let ue=X!=null?X-k:c;ue=Math.min(ue,c-(se.length-1-ae)*k);const he=ao(Z,Q,ue);se[ae]=Number(he.toFixed(12))}return{value:se,thumbIndex:ie,didSwap:!0}}case"push":return{value:y2({values:h,index:r,nextValue:a,min:s,max:c,step:f,minStepsBetweenValues:p}),thumbIndex:r,didSwap:!1};case"none":default:{const $=h.slice(),R=$[r-1],E=$[r+1],O=R!=null?R+k:s,z=E!=null?E-k:c,P=ao(a,O,z);return $[r]=Number(P.toFixed(12)),{value:$,thumbIndex:r,didSwap:!1}}}}const L8=2;function V8(e,t){if(!e)return{start:0,end:0};function n(a){const s=a!=null?parseFloat(a):0;return Number.isNaN(s)?0:s}const i=t?"Top":"InlineStart",r=t?"Bottom":"InlineEnd";return{start:n(e[`border${i}Width`])+n(e[`padding${i}`]),end:n(e[`border${r}Width`])+n(e[`padding${r}`])}}function fh(e,t){if(t.current!=null&&e.changedTouches){const n=e;for(let i=0;i<n.changedTouches.length;i+=1){const r=n.changedTouches[i];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return null}return{x:e.clientX,y:e.clientY}}const F8=_.forwardRef(function(t,n){const{render:i,className:r,...a}=t,{disabled:s,dragging:c,validation:f,inset:p,lastChangedValueRef:h,lastChangeReasonRef:g,max:w,min:k,minStepsBetweenValues:$,onValueCommitted:R,orientation:E,pressedInputRef:O,pressedThumbCenterOffsetRef:z,pressedThumbIndexRef:P,pressedValuesRef:N,registerFieldControlRef:B,renderBeforeHydration:Z,setActive:q,setDragging:K,setValue:fe,state:be,step:ie,thumbCollisionBehavior:V,thumbRefs:re,values:se}=Ng(),ae=Iu(),F=se.length>1,X=E==="vertical",Q=_.useRef(null),ue=_.useRef(null),he=it(Me=>{Me&&ue.current==null&&ue.current==null&&(ue.current=getComputedStyle(Me))}),Y=_.useRef(null),de=_.useRef(0),ge=_.useRef(0),ce=jr(se),ze=it(Me=>{P.current!==Me&&(P.current=Me);const xe=re.current[Me];if(!xe){z.current=null,O.current=null;return}O.current=xe.querySelector('input[type="range"]')}),$e=it(Me=>{const xe=Q.current;if(!xe)return null;const{width:ye,height:_e,bottom:Te,left:Ne,right:Le}=xe.getBoundingClientRect(),Ye=V8(ue.current,X),Je=ge.current,Ze=(X?_e:ye)-Ye.start-Ye.end-Je*2,C=z.current??0,en=Me.x-C,It=Me.y-C,mt=X?Te-It-Ye.end:(ae==="rtl"?Le-en:en-Ne)-Ye.start,$t=ao((mt-Je)/Ze,0,1);let Nt=(w-k)*$t+k;if(Nt=LE(Nt,ie,k),Nt=ao(Nt,k,w),!F)return{value:Nt,thumbIndex:0,didSwap:!1};const Wt=P.current;if(Wt<0)return null;const qt=U8({behavior:V,values:se,currentValues:ce.current??se,initialValues:N.current,pressedIndex:Wt,nextValue:Nt,min:k,max:w,step:ie,minStepsBetweenValues:$});return V==="swap"&&qt.didSwap?ze(qt.thumbIndex):P.current=qt.thumbIndex,qt}),De=it(Me=>{N.current=F?se.slice():null,ce.current=se;const xe=P.current;let ye=xe;if(xe>-1&&xe<se.length){if(se[xe]===w){let _e=xe;for(;_e>0&&se[_e-1]===w;)_e-=1;ye=_e}}else{const _e=X?"y":"x";let Te;ye=-1;for(let Ne=0;Ne<re.current.length;Ne+=1){const Le=re.current[Ne];if(qn(Le)){const Ye=UE(Le),Je=Math.abs(Me[_e]-Ye[_e]);(Te===void 0||Je<=Te)&&(ye=Ne,Te=Je)}}}if(ye>-1&&ye!==xe&&ze(ye),p){const _e=re.current[ye];if(qn(_e)){const Te=_e.getBoundingClientRect(),Ne=X?"height":"width";ge.current=Te[Ne]/2}}}),et=it(Me=>{var xe,ye,_e;(_e=(ye=(xe=re.current)==null?void 0:xe[Me])==null?void 0:ye.querySelector('input[type="range"]'))==null||_e.focus({preventScroll:!0})}),qe=it(Me=>{const xe=fh(Me,Y);if(xe==null)return;if(de.current+=1,Me.type==="pointermove"&&Me.buttons===0){ft(Me);return}const ye=$e(xe);ye!=null&&PE(ye.value,ie,$)&&(!c&&de.current>L8&&K(!0),fe(ye.value,Et(Zj,Me,void 0,{activeThumbIndex:ye.thumbIndex})),ce.current=Array.isArray(ye.value)?ye.value:[ye.value],ye.didSwap&&et(ye.thumbIndex))});function ft(Me){var _e,Te;q(-1),K(!1),O.current=null,z.current=null;const xe=fh(Me,Y),ye=xe!=null?$e(xe):null;if(ye!=null){const Ne=g.current;f.commit(h.current??ye.value),R(h.current??ye.value,cu(Ne,Me))}"pointerType"in Me&&((_e=Q.current)!=null&&_e.hasPointerCapture(Me.pointerId))&&((Te=Q.current)==null||Te.releasePointerCapture(Me.pointerId)),P.current=-1,Y.current=null,N.current=null,ke()}const ht=it(Me=>{if(s)return;const xe=Me.changedTouches[0];xe!=null&&(Y.current=xe.identifier);const ye=fh(Me,Y);if(ye!=null){De(ye);const Te=$e(ye);if(Te==null)return;et(Te.thumbIndex),fe(Te.value,Et(q$,Me,void 0,{activeThumbIndex:Te.thumbIndex})),ce.current=Array.isArray(Te.value)?Te.value:[Te.value],Te.didSwap&&et(Te.thumbIndex)}de.current=0;const _e=Pn(Q.current);_e.addEventListener("touchmove",qe,{passive:!0}),_e.addEventListener("touchend",ft,{passive:!0})}),ke=it(()=>{const Me=Pn(Q.current);Me.removeEventListener("pointermove",qe),Me.removeEventListener("pointerup",ft),Me.removeEventListener("touchmove",qe),Me.removeEventListener("touchend",ft),N.current=null}),Ae=Yc();return _.useEffect(()=>{const Me=Q.current;return Me?(Me.addEventListener("touchstart",ht,{passive:!0}),()=>{Me.removeEventListener("touchstart",ht),Ae.cancel(),ke()}):()=>ke()},[ke,ht,Q,Ae]),_.useEffect(()=>{s&&ke()},[s,ke]),Xt("div",t,{state:be,ref:[n,B,Q,he],props:[{"data-base-ui-slider-control":Z?"":void 0,onPointerDown(Me){const xe=Q.current;if(!xe||s||Me.defaultPrevented||!qn(Me.target)||Me.button!==0)return;const ye=fh(Me,Y);if(ye!=null){De(ye);const Te=$e(ye);if(Te==null)return;rn(re.current[Te.thumbIndex],no(Pn(xe)))?Me.preventDefault():Ae.request(()=>{et(Te.thumbIndex)}),K(!0),z.current!=null||(fe(Te.value,Et(q$,Me.nativeEvent,void 0,{activeThumbIndex:Te.thumbIndex})),ce.current=Array.isArray(Te.value)?Te.value:[Te.value],Te.didSwap&&et(Te.thumbIndex))}Me.nativeEvent.pointerId&&xe.setPointerCapture(Me.nativeEvent.pointerId),de.current=0;const _e=Pn(Q.current);_e.addEventListener("pointermove",qe,{passive:!0}),_e.addEventListener("pointerup",ft,{once:!0})},tabIndex:-1},a],stateAttributesMapping:tp})}),Z8=_.forwardRef(function(t,n){const{render:i,className:r,...a}=t,{state:s}=Ng();return Xt("div",t,{state:s,ref:n,props:[{style:{position:"relative"}},a],stateAttributesMapping:tp})});function Jh(e,t,n){return(e-t)*100/(n-t)}const Na="ArrowUp",ua="ArrowDown",yl="ArrowLeft",Ma="ArrowRight",zs="Home",Os="End",VE=new Set([yl,Ma]),H8=new Set([yl,Ma,zs,Os]),FE=new Set([Na,ua]),B8=new Set([Na,ua,zs,Os]),ZE=new Set([...VE,...FE]),q8=new Set([...ZE,zs,Os]),Mg=new Set([Na,ua,yl,Ma,zs,Os]),HE="Shift",G8="Control",K8="Alt",Y8="Meta",J8=new Set([HE,G8,K8,Y8]);function X8(e){return _r(e)&&e.tagName==="INPUT"}function w2(e){return!!(X8(e)&&e.selectionStart!=null||_r(e)&&e.tagName==="TEXTAREA")}function x2(e,t,n,i){if(!e||!t||!t.scrollTo)return;let r=e.scrollLeft,a=e.scrollTop;const s=e.clientWidth<e.scrollWidth,c=e.clientHeight<e.scrollHeight;if(s&&i!=="vertical"){const f=k2(e,t,"left"),p=ph(e),h=ph(t);n==="ltr"&&(f+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-p.scrollPaddingRight?r=f+t.offsetWidth+h.scrollMarginRight-e.clientWidth+p.scrollPaddingRight:f-h.scrollMarginLeft<e.scrollLeft+p.scrollPaddingLeft&&(r=f-h.scrollMarginLeft-p.scrollPaddingLeft)),n==="rtl"&&(f-h.scrollMarginRight<e.scrollLeft+p.scrollPaddingLeft?r=f-h.scrollMarginLeft-p.scrollPaddingLeft:f+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-p.scrollPaddingRight&&(r=f+t.offsetWidth+h.scrollMarginRight-e.clientWidth+p.scrollPaddingRight))}if(c&&i!=="horizontal"){const f=k2(e,t,"top"),p=ph(e),h=ph(t);f-h.scrollMarginTop<e.scrollTop+p.scrollPaddingTop?a=f-h.scrollMarginTop-p.scrollPaddingTop:f+t.offsetHeight+h.scrollMarginBottom>e.scrollTop+e.clientHeight-p.scrollPaddingBottom&&(a=f+t.offsetHeight+h.scrollMarginBottom-e.clientHeight+p.scrollPaddingBottom)}e.scrollTo({left:r,top:a,behavior:"auto"})}function k2(e,t,n){const i=n==="left"?"offsetLeft":"offsetTop";let r=0;for(;t.offsetParent&&(r+=t[i],t.offsetParent!==e);)t=t.offsetParent;return r}function ph(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}const W8=_.createContext(void 0),Q8={disableStyleElements:!1};function BE(){return _.useContext(W8)??Q8}let e7=(function(e){return e.index="data-index",e.dragging="data-dragging",e.orientation="data-orientation",e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.focused="data-focused",e})({});const t7='!function(){const t=document.currentScript?.parentElement;if(!t)return;const e=t.closest("[data-base-ui-slider-control]");if(!e)return;const r=e.querySelector("[data-base-ui-slider-indicator]"),i=e.getBoundingClientRect(),n="vertical"===e.getAttribute("data-orientation")?"height":"width",o=e.querySelectorAll(\'input[type="range"]\'),l=o.length>1,s=o.length-1;let a=null,u=null;for(let t=0;t<o.length;t+=1){const e=o[t],y=parseFloat(e.getAttribute("value")??"");if(Number.isNaN(y))return;const c=e.parentElement;if(!c)return;const p=parseFloat(e.getAttribute("max")??"100"),g=parseFloat(e.getAttribute("min")??"0"),b=c?.getBoundingClientRect(),d=i[n]-b[n],m=100*(y-g)/(p-g),v=(b[n]/2+d*m/100)/i[n]*100;c.style.setProperty("--position",`${v}%`),Number.isFinite(v)&&(c.style.removeProperty("visibility"),r&&(0===t?(a=v,r.style.setProperty("--start-position",`${v}%`),l||r.style.removeProperty("visibility")):t===s&&(u=v-(a??0),r.style.setProperty("--end-position",`${v}%`),r.style.setProperty("--relative-size",`${u}%`),r.style.removeProperty("visibility"))))}}();',qE="PageUp",GE="PageDown",n7=new Set([Na,ua,yl,Ma,zs,Os,qE,GE]);function r7(e,t,n,i){if(!(t<0))return e.length===2?t===0?`${Ec(e[t],i,n)} start range`:`${Ec(e[t],i,n)} end range`:n?Ec(e[t],i,n):void 0}function gc(e,t,n,i,r){return n===1?Math.min(e+t,r):Math.max(e-t,i)}const i7=_.forwardRef(function(t,n){const{render:i,children:r,className:a,"aria-describedby":s,"aria-label":c,"aria-labelledby":f,disabled:p=!1,getAriaLabel:h,getAriaValueText:g,id:w,index:k,inputRef:$,onBlur:R,onFocus:E,onKeyDown:O,tabIndex:z,...P}=t,{nonce:N}=BE(),B=Fr(w),{active:Z,lastUsedThumbIndex:q,controlRef:K,disabled:fe,validation:be,formatOptionsRef:ie,handleInputChange:V,inset:re,labelId:se,largeStep:ae,locale:F,max:X,min:Q,minStepsBetweenValues:ue,name:he,orientation:Y,pressedInputRef:de,pressedThumbCenterOffsetRef:ge,pressedThumbIndexRef:ce,renderBeforeHydration:ze,setActive:$e,setIndicatorPosition:De,state:et,step:qe,values:ft}=Ng(),ht=Iu(),ke=p||fe,Ae=ft.length>1,Fe=Y==="vertical",Me=ht==="rtl",{setTouched:xe,setFocused:ye,validationMode:_e}=xo(),Te=_.useRef(null),Ne=_.useRef(null),Le=Fr(),Ye=Tu(),Je=Ae?Le:Ye,Ze=_.useMemo(()=>({inputId:Je}),[Je]),{ref:C,index:en}=rd({metadata:Ze}),It=Ae?k??en:0,mt=It===ft.length-1,$t=ft[It],Nt=Jh($t,Q,X),[Wt,qt]=_.useState(!1),[Tn,bn]=_.useState();_u(()=>qt(!0));const Rt=q>=0&&q<ft.length?q:-1,Vt=it(()=>{const nn=K.current,Mt=Te.current;if(!nn||!Mt)return;const kt=Mt.getBoundingClientRect(),Dt=nn.getBoundingClientRect(),Tt=Fe?"height":"width",Sn=Dt[Tt]-kt[Tt],In=(kt[Tt]/2+Sn*Nt/100)/Dt[Tt]*100;bn(In),It===0?De(Zt=>[In,Zt[1]]):mt&&De(Zt=>[Zt[0],In])});dt(()=>{re&&queueMicrotask(Vt)},[Vt,re]),dt(()=>{re&&Vt()},[Vt,re,Nt]);const dn=_.useCallback(()=>{const nn=Fe?"bottom":"insetInlineStart",Mt=Fe?"left":"top";let kt;return Ae?Z===It?kt=2:Rt===It&&(kt=1):Z===It&&(kt=1),re?{"--position":`${Tn}%`,visibility:ze&&!Wt||Tn===void 0?"hidden":void 0,position:"absolute",[nn]:"var(--position)",[Mt]:"50%",translate:`${(Fe||!Me?-1:1)*50}% ${(Fe?1:-1)*50}%`,zIndex:kt}:Number.isFinite(Nt)?{position:"absolute",[nn]:`${Nt}%`,[Mt]:"50%",translate:`${(Fe||!Me?-1:1)*50}% ${(Fe?1:-1)*50}%`,zIndex:kt}:gl},[Z,It,re,Wt,Tn,Ae,ze,Me,Rt,Nt,Fe]);let kn;Y==="vertical"&&(kn=Me?"vertical-rl":"vertical-lr");const pt=Ru({"aria-label":typeof h=="function"?h(It):c,"aria-labelledby":f??se,"aria-describedby":s,"aria-orientation":Y,"aria-valuenow":$t,"aria-valuetext":typeof g=="function"?g(Ec($t,F,ie.current??void 0),$t,It):r7(ft,It,ie.current??void 0,F),disabled:ke,id:Je,max:X,min:Q,name:he,onChange(nn){V(nn.target.valueAsNumber,It,nn)},onFocus(){$e(It),ye(!0)},onBlur(){Te.current&&($e(-1),xe(!0),ye(!1),_e==="onBlur"&&be.commit(DE($t,It,Q,X,Ae,ft)))},onKeyDown(nn){if(!n7.has(nn.key))return;Mg.has(nn.key)&&nn.stopPropagation();let Mt=null;const kt=LE($t,qe,Q);switch(nn.key){case Na:Mt=gc(kt,nn.shiftKey?ae:qe,1,Q,X);break;case Ma:Mt=gc(kt,nn.shiftKey?ae:qe,Me?-1:1,Q,X);break;case ua:Mt=gc(kt,nn.shiftKey?ae:qe,-1,Q,X);break;case yl:Mt=gc(kt,nn.shiftKey?ae:qe,Me?1:-1,Q,X);break;case qE:Mt=gc(kt,ae,1,Q,X);break;case GE:Mt=gc(kt,ae,-1,Q,X);break;case Os:Mt=X,Ae&&(Mt=Number.isFinite(ft[It+1])?ft[It+1]-qe*ue:X);break;case zs:Mt=Q,Ae&&(Mt=Number.isFinite(ft[It-1])?ft[It-1]+qe*ue:Q);break}Mt!==null&&(V(Mt,It,nn),nn.preventDefault())},step:qe,style:{...gl,width:"100%",height:"100%",writingMode:kn},tabIndex:z??void 0,type:"range",value:$t??""},be.getInputValidationProps),vn=Di(Ne,be.inputRef,$);return Xt("div",t,{state:et,ref:[n,C,Te],props:[{[e7.index]:It,children:j.jsxs(_.Fragment,{children:[r,j.jsx("input",{ref:vn,...pt}),re&&!Wt&&ze&&mt&&j.jsx("script",{nonce:N,dangerouslySetInnerHTML:{__html:t7},suppressHydrationWarning:!0})]}),id:B,onBlur:R,onFocus:E,onPointerDown(nn){if(ce.current=It,Te.current!=null){const Mt=Y==="horizontal"?"x":"y",kt=UE(Te.current),Dt=(Y==="horizontal"?nn.clientX:nn.clientY)-kt[Mt];ge.current=Dt}Ne.current!=null&&de.current!==Ne.current&&(de.current=Ne.current)},style:dn(),suppressHydrationWarning:ze||void 0,tabIndex:-1},P],stateAttributesMapping:tp})});function o7(e,t,n,i,r,a){const s=n===void 0||t&&i===void 0?"hidden":void 0,c=e?"bottom":"insetInlineStart",f=e?"height":"width",h={visibility:r&&!a?"hidden":s,position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};return h["--start-position"]=`${n??0}%`,t?(h["--relative-size"]=`${(i??0)-(n??0)}%`,h[c]="var(--start-position)",h[f]="var(--relative-size)",h):(h[c]=0,h[f]="var(--start-position)",h)}function a7(e,t,n,i){const r=e?"bottom":"insetInlineStart",a=e?"height":"width",c={position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};if(!t)return c[r]=0,c[a]=`${n}%`,c;const f=i-n;return c[r]=`${n}%`,c[a]=`${f}%`,c}const l7=_.forwardRef(function(t,n){const{render:i,className:r,...a}=t,{indicatorPosition:s,inset:c,max:f,min:p,orientation:h,renderBeforeHydration:g,state:w,values:k}=Ng(),[$,R]=_.useState(!1);_u(()=>R(!0));const E=h==="vertical",O=k.length>1,z=c?o7(E,O,s[0],s[1],g,$):a7(E,O,Jh(k[0],p,f),Jh(k[k.length-1],p,f));return Xt("div",t,{state:w,ref:n,props:[{"data-base-ui-slider-indicator":g?"":void 0,style:z,suppressHydrationWarning:g||void 0},a],stateAttributesMapping:tp})}),s7=Bc("pf-slider-range select-none data-horizontal:h-full data-vertical:w-full",{variants:{variant:{default:"pf-slider-variant-default",success:"pf-slider-variant-success",warning:"pf-slider-variant-warning",destructive:"pf-slider-variant-destructive",info:"pf-slider-variant-info",muted:"pf-slider-variant-muted"}},defaultVariants:{variant:"default"}});function u7({className:e,defaultValue:t,value:n,min:i=0,max:r=100,step:a,variant:s,size:c="default",indicatorClassName:f,handleStyle:p,handleClassName:h,...g}){const w=a??(r-i)/100,k=_.useMemo(()=>Array.isArray(n)?n:n!==void 0?[n]:Array.isArray(t)?t:t!==void 0?[t]:[i],[n,t,i]);return j.jsx(M8,{"data-slot":"slider",defaultValue:t,value:n,min:i,max:r,step:w,className:st("data-horizontal:w-full data-vertical:h-full",e),thumbAlignment:"edge",...g,children:j.jsxs(F8,{className:st("pf-slider relative flex w-full cursor-pointer touch-none items-center select-none data-disabled:cursor-not-allowed data-disabled:opacity-50 data-vertical:h-full data-vertical:w-auto data-vertical:flex-col",`pf-slider-size-${c}`),children:[j.jsx(Z8,{"data-slot":"slider-track",className:"pf-slider-track bg-muted relative grow overflow-hidden data-horizontal:w-full data-vertical:h-full",children:j.jsx(l7,{"data-slot":"slider-range",className:st(s7({variant:s}),f)})}),Array.from({length:k.length},($,R)=>j.jsx(i7,{"data-slot":"slider-thumb",className:st("pf-slider-thumb block shrink-0 select-none disabled:pointer-events-none disabled:opacity-50",p==="bar"&&"pf-slider-thumb-bar",`pf-slider-thumb-variant-${s??"default"}`,h)},R))]})})}const c7=Bc("pf-dot inline-block shrink-0",{variants:{variant:{default:"pf-dot-variant-default",secondary:"pf-dot-variant-secondary",success:"pf-dot-variant-success",warning:"pf-dot-variant-warning",destructive:"pf-dot-variant-destructive",info:"pf-dot-variant-info",muted:"pf-dot-variant-muted"},size:{sm:"pf-dot-sm",default:"pf-dot-default",lg:"pf-dot-lg"},shape:{circle:"rounded-full",square:"rounded-none",rounded:"pf-dot-rounded"}},defaultVariants:{variant:"default",size:"default",shape:"circle"}});function d7({className:e,variant:t,size:n,shape:i,...r}){return j.jsx("span",{className:st(c7({variant:t,size:n,shape:i}),e),...r})}const KE=_.createContext(void 0);function YE(){const e=_.useContext(KE);if(e===void 0)throw new Error(En(51));return e}let Jb=(function(e){return e.complete="data-complete",e.indeterminate="data-indeterminate",e.progressing="data-progressing",e})({});const Rw={status(e){return e==="progressing"?{[Jb.progressing]:""}:e==="complete"?{[Jb.complete]:""}:e==="indeterminate"?{[Jb.indeterminate]:""}:null}};function f7(e,t){return t==null?"indeterminate progress":e||`${t}%`}const p7=_.forwardRef(function(t,n){const{format:i,getAriaValueText:r=f7,locale:a,max:s=100,min:c=0,value:f,render:p,className:h,...g}=t,[w,k]=_.useState(),$=jr(i);let R="indeterminate";Number.isFinite(f)&&(R=f===s?"complete":"progressing");const E=P8(f,a,$.current),O=_.useMemo(()=>({status:R}),[R]),z={"aria-labelledby":w,"aria-valuemax":s,"aria-valuemin":c,"aria-valuenow":f??void 0,"aria-valuetext":r(E,f),role:"progressbar"},P=_.useMemo(()=>({formattedValue:E,max:s,min:c,setLabelId:k,state:O,status:R,value:f}),[E,s,c,k,O,R,f]),N=Xt("div",t,{state:O,ref:n,props:[z,g],stateAttributesMapping:Rw});return j.jsx(KE.Provider,{value:P,children:N})}),m7=_.forwardRef(function(t,n){const{render:i,className:r,...a}=t,{state:s}=YE();return Xt("div",t,{state:s,ref:n,props:a,stateAttributesMapping:Rw})}),h7=_.forwardRef(function(t,n){const{render:i,className:r,...a}=t,{max:s,min:c,value:f,state:p}=YE(),h=Number.isFinite(f)&&f!==null?Jh(f,c,s):null,g=_.useCallback(()=>h==null?{}:{insetInlineStart:0,height:"inherit",width:`${h}%`},[h]);return Xt("div",t,{state:p,ref:n,props:[{style:g()},a],stateAttributesMapping:Rw})}),g7=Bc("pf-progress-indicator h-full w-full flex-1 transition-all",{variants:{variant:{default:"pf-progress-variant-default",success:"pf-progress-variant-success",warning:"pf-progress-variant-warning",destructive:"pf-progress-variant-destructive",info:"pf-progress-variant-info",muted:"pf-progress-variant-muted"}},defaultVariants:{variant:"default"}});function v7({className:e,indicatorClassName:t,target:n,targetClassName:i,variant:r,size:a="default",value:s,orientation:c="horizontal",...f}){const p=c==="vertical",h=n!=null?Math.max(0,Math.min(100,n)):void 0,g=`pf-progress-size-${a}`;return j.jsxs(p7,{value:s,className:st("pf-progress relative overflow-visible rounded-full",g,p?"pf-progress-vertical flex flex-col-reverse":"w-full",e),...f,children:[j.jsx(m7,{className:st("pf-progress relative flex items-center overflow-hidden rounded-full",g,p?"h-full w-full":"w-full"),children:j.jsx(h7,{className:st(g7({variant:r}),t),style:p?{transform:`translateY(${100-(s||0)}%)`}:{transform:`translateX(-${100-(s||0)}%)`}})}),h!=null&&j.jsx("span",{className:st("pf-progress-target",i),style:p?{bottom:`${h}%`}:{left:`${h}%`}})]})}const Ew=_.forwardRef(({className:e,...t},n)=>j.jsx("div",{className:"pf-table-container",children:j.jsx("table",{ref:n,className:st("pf-table",e),...t})}));Ew.displayName="Table";const Tw=_.forwardRef(({className:e,...t},n)=>j.jsx("thead",{ref:n,className:st("pf-table-header",e),...t}));Tw.displayName="TableHeader";const Iw=_.forwardRef(({className:e,...t},n)=>j.jsx("tbody",{ref:n,className:st("pf-table-body",e),...t}));Iw.displayName="TableBody";const JE=_.forwardRef(({className:e,...t},n)=>j.jsx("tfoot",{ref:n,className:st("pf-table-footer",e),...t}));JE.displayName="TableFooter";const du=_.forwardRef(({className:e,...t},n)=>j.jsx("tr",{ref:n,className:st("pf-table-row",e),...t}));du.displayName="TableRow";const zw=_.forwardRef(({className:e,...t},n)=>j.jsx("th",{ref:n,className:st("pf-table-head",e),...t}));zw.displayName="TableHead";const wc=_.forwardRef(({className:e,...t},n)=>j.jsx("td",{ref:n,className:st("pf-table-cell",e),...t}));wc.displayName="TableCell";const XE=_.forwardRef(({className:e,...t},n)=>j.jsx("caption",{ref:n,className:st("pf-table-caption",e),...t}));XE.displayName="TableCaption";const WE=_.createContext(null),QE=_.createContext(null);function La(){const e=_.useContext(WE);if(e===null)throw new Error(En(60));return e}function eT(){const e=_.useContext(QE);if(e===null)throw new Error(En(61));return e}const sn={id:Ke(e=>e.id),modal:Ke(e=>e.modal),multiple:Ke(e=>e.multiple),items:Ke(e=>e.items),itemToStringLabel:Ke(e=>e.itemToStringLabel),itemToStringValue:Ke(e=>e.itemToStringValue),isItemEqualToValue:Ke(e=>e.isItemEqualToValue),value:Ke(e=>e.value),hasSelectedValue:Ke(e=>{const{value:t,multiple:n,itemToStringValue:i}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:aa(t,i)!==""}),hasNullItemLabel:Ke((e,t)=>t?wE(e.items):!1),open:Ke(e=>e.open),mounted:Ke(e=>e.mounted),forceMount:Ke(e=>e.forceMount),transitionStatus:Ke(e=>e.transitionStatus),openMethod:Ke(e=>e.openMethod),activeIndex:Ke(e=>e.activeIndex),selectedIndex:Ke(e=>e.selectedIndex),isActive:Ke((e,t)=>e.activeIndex===t),isSelected:Ke((e,t,n)=>{const i=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(a=>Pa(n,a,i)):e.selectedIndex===t&&e.selectedIndex!==null?!0:Pa(n,r,i)}),isSelectedByFocus:Ke((e,t)=>e.selectedIndex===t),popupProps:Ke(e=>e.popupProps),triggerProps:Ke(e=>e.triggerProps),triggerElement:Ke(e=>e.triggerElement),positionerElement:Ke(e=>e.positionerElement),listElement:Ke(e=>e.listElement),scrollUpArrowVisible:Ke(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:Ke(e=>e.scrollDownArrowVisible),hasScrollArrows:Ke(e=>e.hasScrollArrows)};function b7(e){const{id:t,value:n,defaultValue:i=null,onValueChange:r,open:a,defaultOpen:s=!1,onOpenChange:c,name:f,autoComplete:p,disabled:h=!1,readOnly:g=!1,required:w=!1,modal:k=!0,actionsRef:$,inputRef:R,onOpenChangeComplete:E,items:O,multiple:z=!1,itemToStringLabel:P,itemToStringValue:N,isItemEqualToValue:B=vE,highlightItemOnHover:Z=!0,children:q}=e,{clearErrors:K}=Eu(),{setDirty:fe,setTouched:be,setFocused:ie,shouldValidateOnChange:V,validityData:re,setFilled:se,name:ae,disabled:F,validation:X,validationMode:Q}=xo(),ue=Tu({id:t}),he=F||h,Y=ae??f,[de,ge]=Vo({controlled:n,default:z?i??sa:i,name:"Select",state:"value"}),[ce,ze]=Vo({controlled:a,default:s,name:"Select",state:"open"}),$e=_.useRef([]),De=_.useRef([]),et=_.useRef(null),qe=_.useRef(null),ft=_.useRef(0),ht=_.useRef(null),ke=_.useRef([]),Ae=_.useRef(!1),Fe=_.useRef(!1),Me=_.useRef(null),xe=_.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),ye=_.useRef(!1),{mounted:_e,setMounted:Te,transitionStatus:Ne}=kl(ce),{openMethod:Le,triggerProps:Ye,reset:Je}=zg(ce),Ze=Vr(()=>new tw({id:ue,modal:k,multiple:z,itemToStringLabel:P,itemToStringValue:N,isItemEqualToValue:B,value:de,open:ce,mounted:_e,transitionStatus:Ne,items:O,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,C=at(Ze,sn.activeIndex),en=at(Ze,sn.selectedIndex),It=at(Ze,sn.triggerElement),mt=at(Ze,sn.positionerElement),$t=_.useMemo(()=>z&&Array.isArray(de)&&de.length===0?"":aa(de,N),[z,de,N]),Nt=_.useMemo(()=>z&&Array.isArray(de)?de.map(Zt=>aa(Zt,N)):aa(de,N),[z,de,N]),Wt=jr(Ze.state.triggerElement);nd({id:ue,commit:X.commit,value:de,controlRef:Wt,name:Y,getValue:()=>Nt});const qt=_.useRef(de);dt(()=>{de!==qt.current&&Ze.set("forceMount",!0)},[Ze,de]),dt(()=>{se(z?Array.isArray(de)&&de.length>0:de!=null)},[z,de,se]),dt(function(){if(ce)return;const yn=ke.current;if(z){const Cn=Array.isArray(de)?de:[];if(Cn.length===0){Ze.set("selectedIndex",null);return}const Qn=Cn[Cn.length-1],jn=vs(yn,Qn,B);Ze.set("selectedIndex",jn===-1?null:jn);return}const An=vs(yn,de,B);Ze.set("selectedIndex",An===-1?null:An)},[z,ce,de,ke,B,Ze]),ml(de,()=>{K(Y),fe(de!==re.initialValue),V()?X.commit(de):X.commit(de,!0)});const Tn=it((Zt,yn)=>{if(c==null||c(Zt,yn),!yn.isCanceled&&(ze(Zt),!Zt&&(yn.reason===bs||yn.reason===yg)&&(be(!0),ie(!1),Q==="onBlur"&&X.commit(de)),!Zt&&Ze.state.activeIndex!==null)){const An=$e.current[Ze.state.activeIndex];queueMicrotask(()=>{An==null||An.setAttribute("tabindex","-1")})}}),bn=it(()=>{Te(!1),Ze.set("activeIndex",null),Je(),E==null||E(!1)});Pi({enabled:!$,open:ce,ref:et,onComplete(){ce||bn()}}),_.useImperativeHandle($,()=>({unmount:bn}),[bn]);const Rt=it((Zt,yn)=>{r==null||r(Zt,yn),!yn.isCanceled&&ge(Zt)}),Vt=it(()=>{const Zt=Ze.state.listElement||et.current;if(!Zt)return;const yn=Zt.scrollTop,An=Zt.scrollTop+Zt.clientHeight,Cn=yn>1,Qn=An<Zt.scrollHeight-1;Ze.state.scrollUpArrowVisible!==Cn&&Ze.set("scrollUpArrowVisible",Cn),Ze.state.scrollDownArrowVisible!==Qn&&Ze.set("scrollDownArrowVisible",Qn)}),dn=vw({open:ce,onOpenChange:Tn,elements:{reference:It,floating:mt}}),kn=Kf(dn,{enabled:!g&&!he,event:"mousedown"}),pt=Qc(dn,{bubbles:!1}),vn=uE(dn,{enabled:!g&&!he,listRef:$e,activeIndex:C,selectedIndex:en,disabledIndices:sa,onNavigate(Zt){Zt===null&&!ce||Ze.set("activeIndex",Zt)},focusItemOnHover:!1}),Dn=dE(dn,{enabled:!g&&!he&&(ce||!z),listRef:De,activeIndex:C,selectedIndex:en,onMatch(Zt){ce?Ze.set("activeIndex",Zt):Rt(ke.current[Zt],Et("none"))},onTypingChange(Zt){Ae.current=Zt}}),{getReferenceProps:nn,getFloatingProps:Mt,getItemProps:kt}=Ts([kn,pt,vn,Dn]),Dt=_.useMemo(()=>Ru(nn(),Ye,ue?{id:ue}:$r),[nn,Ye,ue]);Kc(()=>{Ze.update({popupProps:Mt(),triggerProps:Dt})}),dt(()=>{Ze.update({id:ue,modal:k,multiple:z,value:de,open:ce,mounted:_e,transitionStatus:Ne,popupProps:Mt(),triggerProps:Dt,items:O,itemToStringLabel:P,itemToStringValue:N,isItemEqualToValue:B,openMethod:Le})},[Ze,ue,k,z,de,ce,_e,Ne,Mt,Dt,O,P,N,B,Le]);const Tt=_.useMemo(()=>({store:Ze,name:Y,required:w,disabled:he,readOnly:g,multiple:z,itemToStringLabel:P,itemToStringValue:N,highlightItemOnHover:Z,setValue:Rt,setOpen:Tn,listRef:$e,popupRef:et,scrollHandlerRef:qe,handleScrollArrowVisibility:Vt,scrollArrowsMountedCountRef:ft,getItemProps:kt,events:dn.context.events,valueRef:ht,valuesRef:ke,labelsRef:De,typingRef:Ae,selectionRef:xe,selectedItemTextRef:Me,validation:X,onOpenChangeComplete:E,keyboardActiveRef:Fe,alignItemWithTriggerActiveRef:ye,initialValueRef:qt}),[Ze,Y,w,he,g,z,P,N,Z,Rt,Tn,kt,dn.context.events,X,E,Vt]),Sn=Di(R,X.inputRef),Kn=z&&Array.isArray(de)&&de.length>0,In=_.useMemo(()=>!z||!Array.isArray(de)||!Y?null:de.map(Zt=>{const yn=aa(Zt,N);return j.jsx("input",{type:"hidden",name:Y,value:yn},yn)}),[z,de,Y,N]);return j.jsx(WE.Provider,{value:Tt,children:j.jsxs(QE.Provider,{value:dn,children:[q,j.jsx("input",{...X.getInputValidationProps({onFocus(){var Zt;(Zt=Ze.state.triggerElement)==null||Zt.focus({focusVisible:!0})},onChange(Zt){if(Zt.nativeEvent.defaultPrevented)return;const yn=Zt.target.value,An=Et(Er,Zt.nativeEvent);function Cn(){if(z)return;const Qn=ke.current.find(jn=>aa(jn,N).toLowerCase()===yn.toLowerCase());Qn!=null&&(fe(Qn!==re.initialValue),Rt(Qn,An),V()&&X.commit(Qn))}Ze.set("forceMount",!0),queueMicrotask(Cn)}}),name:z?void 0:Y,autoComplete:p,value:$t,disabled:he,required:w&&!Kn,readOnly:g,ref:Sn,style:Y?Hf:gl,tabIndex:-1,"aria-hidden":!0}),In]})})}const mh=2,y7=400,S2=200,w7={..._w,...Is,value:()=>null},x7=_.forwardRef(function(t,n){const{render:i,className:r,id:a,disabled:s=!1,nativeButton:c=!0,...f}=t,{setTouched:p,setFocused:h,validationMode:g,state:w,disabled:k}=xo(),{labelId:$}=Sl(),{store:R,setOpen:E,selectionRef:O,validation:z,readOnly:P,required:N,alignItemWithTriggerActiveRef:B,disabled:Z,keyboardActiveRef:q}=La(),K=k||Z||s,fe=at(R,sn.open),be=at(R,sn.value),ie=at(R,sn.triggerProps),V=at(R,sn.positionerElement),re=at(R,sn.listElement),se=at(R,sn.id),ae=at(R,sn.hasSelectedValue),F=!ae&&fe,X=at(R,sn.hasNullItemLabel,F),Q=a??se;Tu({id:Q});const ue=jr(V),he=_.useRef(null),{getButtonProps:Y,buttonRef:de}=qo({disabled:K,native:c}),ge=it(ke=>{R.set("triggerElement",ke)}),ce=Di(n,he,de,ge),ze=Ni(),$e=Ni(),De=Ni(),et=Ni();_.useEffect(()=>{if(fe)return!(ae||X)?De.start(y7,()=>{O.current.allowUnselectedMouseUp=!0,O.current.allowSelectedMouseUp=!0}):et.start(S2,()=>{O.current.allowUnselectedMouseUp=!0,De.start(S2,()=>{O.current.allowSelectedMouseUp=!0})}),()=>{De.clear(),et.clear()};O.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},$e.clear()},[fe,ae,X,O,$e,De,et]);const qe=_.useMemo(()=>{var ke;return(re==null?void 0:re.id)??((ke=Nf(V))==null?void 0:ke.id)},[re,V]),ft=Ru(ie,{id:Q,role:"combobox","aria-expanded":fe?"true":"false","aria-haspopup":"listbox","aria-controls":fe?qe:void 0,"aria-labelledby":$,"aria-readonly":P||void 0,"aria-required":N||void 0,tabIndex:K?-1:0,ref:ce,onFocus(ke){h(!0),fe&&B.current&&E(!1,Et(Er,ke.nativeEvent)),ze.start(0,()=>{R.set("forceMount",!0)})},onBlur(ke){rn(V,ke.relatedTarget)||(p(!0),h(!1),g==="onBlur"&&z.commit(be))},onPointerMove(){q.current=!1},onKeyDown(){q.current=!0},onMouseDown(ke){if(fe)return;const Ae=Pn(ke.currentTarget);function Fe(Me){if(!he.current)return;const xe=Me.target;if(rn(he.current,xe)||rn(ue.current,xe)||xe===he.current)return;const ye=TE(he.current);Me.clientX>=ye.left-mh&&Me.clientX<=ye.right+mh&&Me.clientY>=ye.top-mh&&Me.clientY<=ye.bottom+mh||E(!1,Et(Hj,Me))}$e.start(0,()=>{Ae.addEventListener("mouseup",Fe,{once:!0})})}},z.getValidationProps,f,Y);ft.role="combobox";const ht={...w,open:fe,disabled:K,value:be,readOnly:P,placeholder:!ae};return Xt("button",t,{ref:[n,he],state:ht,stateAttributesMapping:w7,props:ft})}),k7={value:()=>null},S7=_.forwardRef(function(t,n){const{className:i,render:r,children:a,placeholder:s,...c}=t,{store:f,valueRef:p}=La(),h=at(f,sn.value),g=at(f,sn.items),w=at(f,sn.itemToStringLabel),k=at(f,sn.hasSelectedValue),$=!k&&s!=null&&a==null,R=at(f,sn.hasNullItemLabel,$),E={value:h,placeholder:!k};let O=null;return typeof a=="function"?O=a(h):a!=null?O=a:!k&&s!=null&&!R?O=s:Array.isArray(h)?O=kU(h,g,w):O=xE(h,g,w),Xt("span",t,{state:E,ref:[n,p],props:[{children:O},c],stateAttributesMapping:k7})}),_7=_.forwardRef(function(t,n){const{className:i,render:r,...a}=t,{store:s}=La(),f={open:at(s,sn.open)};return Xt("span",t,{state:f,ref:n,props:[{"aria-hidden":!0,children:"▼"},a],stateAttributesMapping:Jf})}),$7=_.createContext(void 0),C7=_.forwardRef(function(t,n){const{store:i}=La(),r=at(i,sn.mounted),a=at(i,sn.forceMount);return r||a?j.jsx($7.Provider,{value:!0,children:j.jsx(xg,{ref:n,...t})}):null}),tT=_.createContext(void 0);function Ow(){const e=_.useContext(tT);if(!e)throw new Error(En(59));return e}function Xh(e,t){e&&Object.assign(e.style,t)}const nT={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},R7={position:"fixed"},E7=_.forwardRef(function(t,n){const{anchor:i,positionMethod:r="absolute",className:a,render:s,side:c="bottom",align:f="center",sideOffset:p=0,alignOffset:h=0,collisionBoundary:g="clipping-ancestors",collisionPadding:w,arrowPadding:k=5,sticky:$=!1,disableAnchorTracking:R,alignItemWithTrigger:E=!0,collisionAvoidance:O=qR,...z}=t,{store:P,listRef:N,labelsRef:B,alignItemWithTriggerActiveRef:Z,selectedItemTextRef:q,valuesRef:K,initialValueRef:fe,popupRef:be,setValue:ie}=La(),V=eT(),re=at(P,sn.open),se=at(P,sn.mounted),ae=at(P,sn.modal),F=at(P,sn.value),X=at(P,sn.openMethod),Q=at(P,sn.positionerElement),ue=at(P,sn.triggerElement),he=at(P,sn.isItemEqualToValue),Y=at(P,sn.transitionStatus),de=_.useRef(null),ge=_.useRef(null),[ce,ze]=_.useState(E),$e=se&&ce&&X!=="touch";!se&&ce!==E&&ze(E),dt(()=>{se||(sn.scrollUpArrowVisible(P.state)&&P.set("scrollUpArrowVisible",!1),sn.scrollDownArrowVisible(P.state)&&P.set("scrollDownArrowVisible",!1))},[P,se]),_.useImperativeHandle(Z,()=>$e),Og(($e||ae)&&re&&X!=="touch",ue);const De=Qf({anchor:i,floatingRootContext:V,positionMethod:r,mounted:se,side:c,sideOffset:p,align:f,alignOffset:h,arrowPadding:k,collisionBoundary:g,collisionPadding:w,sticky:$,disableAnchorTracking:R??$e,collisionAvoidance:O,keepMounted:!0}),et=$e?"none":De.side,qe=$e?R7:De.positionerStyles,ft=_.useMemo(()=>{const ye={};return re||(ye.pointerEvents="none"),{role:"presentation",hidden:!se,style:{...qe,...ye}}},[re,se,qe]),ht={open:re,side:et,align:De.align,anchorHidden:De.anchorHidden},ke=it(ye=>{P.set("positionerElement",ye)}),Ae=Xt("div",t,{ref:[n,ke],state:ht,stateAttributesMapping:Bo,props:[ft,Ua(Y),z]}),Fe=_.useRef(0),Me=it(ye=>{if(ye.size===0&&Fe.current===0||K.current.length===0)return;const _e=Fe.current;if(Fe.current=ye.size,ye.size===_e)return;const Te=Et(Er);if(_e!==0&&!P.state.multiple&&F!==null&&vs(K.current,F,he)===-1){const Le=fe.current,Je=Le!=null&&vs(K.current,Le,he)!==-1?Le:null;ie(Je,Te),Je===null&&(P.set("selectedIndex",null),q.current=null)}if(_e!==0&&P.state.multiple&&Array.isArray(F)){const Ne=Ye=>vs(K.current,Ye,he)!==-1,Le=F.filter(Ye=>Ne(Ye));(Le.length!==F.length||Le.some(Ye=>!bE(F,Ye,he)))&&(ie(Le,Te),Le.length===0&&(P.set("selectedIndex",null),q.current=null))}if(re&&$e){P.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const Ne={height:""};Xh(Q,Ne),Xh(be.current,Ne)}}),xe=_.useMemo(()=>({...De,side:et,alignItemWithTriggerActive:$e,setControlledAlignItemWithTrigger:ze,scrollUpArrowRef:de,scrollDownArrowRef:ge}),[De,et,$e,ze]);return j.jsx(Xf,{elementsRef:N,labelsRef:B,onMapChange:Me,children:j.jsxs(tT.Provider,{value:xe,children:[se&&ae&&j.jsx(Ag,{inert:Wf(!re),cutout:ue}),Ae]})})});function rT(e){const t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}const hh="base-ui-disable-scrollbar",Ey={className:hh,getElement(e){return j.jsx("style",{nonce:e,href:hh,precedence:"base-ui:low",children:`.${hh}{scrollbar-width:none}.${hh}::-webkit-scrollbar{display:none}`})}},T7=_.createContext(void 0);function iT(e){return _.useContext(T7)}const au=1,I7={...Bo,...Ho},z7=_.forwardRef(function(t,n){const{render:i,className:r,finalFocus:a,...s}=t,{store:c,popupRef:f,onOpenChangeComplete:p,setOpen:h,valueRef:g,selectedItemTextRef:w,keyboardActiveRef:k,multiple:$,handleScrollArrowVisibility:R,scrollHandlerRef:E,highlightItemOnHover:O}=La(),{side:z,align:P,alignItemWithTriggerActive:N,setControlledAlignItemWithTrigger:B,scrollDownArrowRef:Z,scrollUpArrowRef:q}=Ow(),K=iT()!=null,fe=eT(),{nonce:be,disableStyleElements:ie}=BE(),V=Ni(),re=at(c,sn.id),se=at(c,sn.open),ae=at(c,sn.mounted),F=at(c,sn.popupProps),X=at(c,sn.transitionStatus),Q=at(c,sn.triggerElement),ue=at(c,sn.positionerElement),he=at(c,sn.listElement),Y=_.useRef(0),de=_.useRef(!1),ge=_.useRef(0),ce=_.useRef(!1),ze=_.useRef({}),$e=Yc(),De=it(ht=>{if(!ue||!f.current||!ce.current)return;if(de.current||!N){R();return}const ke=ue.style.top==="0px",Ae=ue.style.bottom==="0px",Fe=ue.getBoundingClientRect().height,Me=Pn(ue),xe=getComputedStyle(ue),ye=parseFloat(xe.marginTop),_e=parseFloat(xe.marginBottom),Te=_2(getComputedStyle(f.current)),Ne=Math.min(Me.documentElement.clientHeight-ye-_e,Te),Le=ht.scrollTop,Ye=$2(ht);let Je=0,Ze=null,C=!1,en=!1;const It=$t=>{ue.style.height=`${$t}px`},mt=($t,Nt)=>{const Wt=ao($t,0,Ne-Fe);Wt>0&&It(Fe+Wt),ht.scrollTop=Nt,Ne-(Fe+Wt)<=au&&(de.current=!0),R()};if(ke){const $t=Ye-Le,Nt=Fe+$t,Wt=Math.min(Nt,Ne);if(Je=Wt,$t<=au){mt($t,Ye);return}Ne-Wt>au?en=!0:C=!0}else if(Ae){const $t=Le,Nt=Fe+$t,Wt=Math.min(Nt,Ne),qt=Nt-Ne;if(Je=Wt,$t<=au){mt($t,0);return}Ne-Wt>au?Ze=0:(C=!0,Le<Ye&&(Ze=Le-($t-qt)))}if(Je=Math.ceil(Je),Je!==0&&It(Je),en||Ze!=null){const $t=$2(ht),Nt=en?$t:ao(Ze,0,$t);Math.abs(ht.scrollTop-Nt)>au&&(ht.scrollTop=Nt)}(C||Je>=Ne-au)&&(de.current=!0),R()});_.useImperativeHandle(E,()=>De,[De]),Pi({open:se,ref:f,onComplete(){se&&(p==null||p(!0))}});const et={open:se,transitionStatus:X,side:z,align:P};dt(()=>{!ue||!f.current||Object.keys(ze.current).length||(ze.current={top:ue.style.top||"0",left:ue.style.left||"0",right:ue.style.right,height:ue.style.height,bottom:ue.style.bottom,minHeight:ue.style.minHeight,maxHeight:ue.style.maxHeight,marginTop:ue.style.marginTop,marginBottom:ue.style.marginBottom})},[f,ue]),dt(()=>{se||N||(ce.current=!1,de.current=!1,Y.current=0,ge.current=0,Xh(ue,ze.current))},[se,N,ue,f]),dt(()=>{const ht=f.current;if(!(!se||!Q||!ue||!ht||c.state.transitionStatus==="ending")){if(!N){ce.current=!0,$e.request(R),ht.style.removeProperty("--transform-origin");return}queueMicrotask(()=>{var Ae;const ke=O7(ht);ht.style.removeProperty("--transform-origin");try{const Fe=getComputedStyle(ue),Me=getComputedStyle(ht),xe=Pn(Q),ye=Ur(ue),_e=Q.getBoundingClientRect(),Te=ue.getBoundingClientRect(),Ne=_e.left,Le=_e.height,Ye=he||ht,Je=Ye.scrollHeight,Ze=parseFloat(Me.borderBottomWidth),C=parseFloat(Fe.marginTop)||10,en=parseFloat(Fe.marginBottom)||10,It=parseFloat(Fe.minHeight)||100,mt=_2(Me),$t=5,Nt=5,Wt=20,qt=xe.documentElement.clientHeight-C-en,Tn=xe.documentElement.clientWidth,bn=qt-_e.bottom+Le,Rt=w.current,Vt=g.current;let dn,kn=0,pt=0;if(Rt&&Vt){const yn=Vt.getBoundingClientRect();dn=Rt.getBoundingClientRect();const An=yn.left-Ne,Cn=dn.left-Te.left,Qn=yn.top-_e.top+yn.height/2,jn=dn.top-Te.top+dn.height/2;kn=An-Cn,pt=jn-Qn}const vn=bn+pt+en+Ze;let Dn=Math.min(qt,vn);const nn=qt-C-en,Mt=vn-Dn,kt=Math.max($t,Ne+kn),Dt=Tn-Nt,Tt=Math.max(0,kt+Te.width-Dt);ue.style.left=`${kt-Tt}px`,ue.style.height=`${Dn}px`,ue.style.maxHeight="auto",ue.style.marginTop=`${C}px`,ue.style.marginBottom=`${en}px`,ht.style.height="100%";const Sn=Ye.scrollHeight-Ye.clientHeight,Kn=Mt>=Sn;Kn&&(Dn=Math.min(qt,Te.height)-(Mt-Sn));const In=_e.top<Wt||_e.bottom>qt-Wt||Dn<Math.min(Je,It),Zt=(((Ae=ye.visualViewport)==null?void 0:Ae.scale)??1)!==1&&ow;if(In||Zt){ce.current=!0,Xh(ue,ze.current),Mi.flushSync(()=>B(!1));return}if(Kn){const yn=Math.max(0,qt-vn);ue.style.top=Te.height>=nn?"0":`${yn}px`,ue.style.height=`${Dn}px`,Ye.scrollTop=Ye.scrollHeight-Ye.clientHeight,Y.current=Math.max(It,Dn)}else ue.style.bottom="0",Y.current=Math.max(It,Dn),Ye.scrollTop=Mt;if(dn){const yn=Te.top,An=Te.height,Cn=dn.top+dn.height/2,Qn=An>0?(Cn-yn)/An*100:50,jn=ao(Qn,0,100);ht.style.setProperty("--transform-origin",`50% ${jn}%`)}(Y.current===qt||Dn>=mt)&&(de.current=!0),R(),setTimeout(()=>{ce.current=!0})}finally{ke()}})}},[c,se,ue,Q,g,w,f,R,N,B,$e,Z,q,he]),_.useEffect(()=>{if(!N||!ue||!se)return;const ht=Ur(ue);function ke(Ae){h(!1,Et(qj,Ae))}return ht.addEventListener("resize",ke),()=>{ht.removeEventListener("resize",ke)}},[h,N,ue,se]);const qe={...he?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":$||void 0,id:`${re}-list`},onKeyDown(ht){k.current=!0,K&&Mg.has(ht.key)&&ht.stopPropagation()},onMouseMove(){k.current=!1},onPointerLeave(ht){if(!O||rT(ht)||ht.pointerType==="touch")return;const ke=ht.currentTarget;V.start(0,()=>{c.set("activeIndex",null),ke.focus({preventScroll:!0})})},onScroll(ht){he||De(ht.currentTarget)},...N&&{style:he?{height:"100%"}:nT}},ft=Xt("div",t,{ref:[n,f],state:et,stateAttributesMapping:I7,props:[F,qe,Ua(X),{className:!he&&N?Ey.className:void 0},s]});return j.jsxs(_.Fragment,{children:[!ie&&Ey.getElement(be),j.jsx(kg,{context:fe,modal:!1,disabled:!ae,returnFocus:a,restoreFocus:!0,children:ft})]})});function _2(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function $2(e){return Math.max(0,e.scrollHeight-e.clientHeight)}const C2=[["transform","none"],["scale","1"],["translate","0 0"]];function O7(e){const{style:t}=e,n={};for(const[i,r]of C2)n[i]=t.getPropertyValue(i),t.setProperty(i,r,"important");return()=>{for(const[i]of C2){const r=n[i];r?t.setProperty(i,r):t.removeProperty(i)}}}const A7=_.forwardRef(function(t,n){const{className:i,render:r,...a}=t,{store:s,scrollHandlerRef:c}=La(),{alignItemWithTriggerActive:f}=Ow(),p=at(s,sn.hasScrollArrows),h=at(s,sn.openMethod),g=at(s,sn.multiple),k={id:`${at(s,sn.id)}-list`,role:"listbox","aria-multiselectable":g||void 0,onScroll(R){var E;(E=c.current)==null||E.call(c,R.currentTarget)},...f&&{style:nT},className:p&&h!=="touch"?Ey.className:void 0},$=it(R=>{s.set("listElement",R)});return Xt("div",t,{ref:[n,$],props:[k,a]})}),oT=_.createContext(void 0);function Aw(){const e=_.useContext(oT);if(!e)throw new Error(En(57));return e}const N7=_.memo(_.forwardRef(function(t,n){const{render:i,className:r,value:a=null,label:s,disabled:c=!1,nativeButton:f=!1,...p}=t,h=_.useRef(null),g=rd({label:s,textRef:h,indexGuessBehavior:Cw.GuessFromOrder}),{store:w,getItemProps:k,setOpen:$,setValue:R,selectionRef:E,typingRef:O,valuesRef:z,keyboardActiveRef:P,multiple:N,highlightItemOnHover:B}=La(),Z=Ni(),q=at(w,sn.isActive,g.index),K=at(w,sn.isSelected,g.index,a),fe=at(w,sn.isSelectedByFocus,g.index),be=at(w,sn.isItemEqualToValue),ie=g.index,V=ie!==-1,re=_.useRef(null),se=jr(ie);dt(()=>{if(!V)return;const $e=z.current;return $e[ie]=a,()=>{delete $e[ie]}},[V,ie,a,z]),dt(()=>{if(!V)return;const $e=w.state.value;let De=$e;N&&Array.isArray($e)&&$e.length>0&&(De=$e[$e.length-1]),De!==void 0&&Pa(a,De,be)&&w.set("selectedIndex",ie)},[V,ie,N,be,w,a]);const ae={disabled:c,selected:K,highlighted:q},F=k({active:q,selected:K});F.onFocus=void 0,F.id=void 0;const X=_.useRef(null),Q=_.useRef("mouse"),ue=_.useRef(!1),{getButtonProps:he,buttonRef:Y}=qo({disabled:c,focusableWhenDisabled:!0,native:f});function de($e){const De=w.state.value;if(N){const et=Array.isArray(De)?De:[],qe=K?yE(et,a,be):[...et,a];R(qe,Et(Ih,$e))}else R(a,Et(Ih,$e)),$(!1,Et(Ih,$e))}const ge={role:"option","aria-selected":K,tabIndex:q?0:-1,onFocus(){w.set("activeIndex",ie)},onMouseEnter(){!P.current&&w.state.selectedIndex===null&&B&&w.set("activeIndex",ie)},onMouseMove(){B&&w.set("activeIndex",ie)},onMouseLeave($e){!B||P.current||rT($e)||Z.start(0,()=>{w.state.activeIndex===ie&&w.set("activeIndex",null)})},onTouchStart(){E.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown($e){X.current=$e.key,w.set("activeIndex",ie)},onClick($e){ue.current=!1,!($e.type==="keydown"&&X.current===null)&&(c||X.current===" "&&O.current||Q.current!=="touch"&&!q||(X.current=null,de($e.nativeEvent)))},onPointerEnter($e){Q.current=$e.pointerType},onPointerDown($e){Q.current=$e.pointerType,ue.current=!0},onMouseUp($e){if(c)return;if(ue.current){ue.current=!1;return}const De=!E.current.allowSelectedMouseUp&&K,et=!E.current.allowUnselectedMouseUp&&!K;De||et||Q.current!=="touch"&&!q||de($e.nativeEvent)}},ce=Xt("div",t,{ref:[Y,n,g.ref,re],state:ae,props:[F,ge,p,he]}),ze=_.useMemo(()=>({selected:K,indexRef:se,textRef:h,selectedByFocus:fe,hasRegistered:V}),[K,se,h,fe,V]);return j.jsx(oT.Provider,{value:ze,children:ce})})),M7=_.forwardRef(function(t,n){const i=t.keepMounted??!1,{selected:r}=Aw();return i||r?j.jsx(D7,{...t,ref:n}):null}),D7=_.memo(_.forwardRef((e,t)=>{const{render:n,className:i,keepMounted:r,...a}=e,{selected:s}=Aw(),c=_.useRef(null),{transitionStatus:f,setMounted:p}=kl(s),g=Xt("span",e,{ref:[t,c],state:{selected:s,transitionStatus:f},props:[{"aria-hidden":!0,children:"✔️"},a],stateAttributesMapping:Ho});return Pi({open:s,ref:c,onComplete(){s||p(!1)}}),g})),P7=_.memo(_.forwardRef(function(t,n){const{indexRef:i,textRef:r,selectedByFocus:a,hasRegistered:s}=Aw(),{selectedItemTextRef:c}=La(),{className:f,render:p,...h}=t,g=_.useCallback(k=>{if(!k||!s)return;const $=c.current===null||!c.current.isConnected;(a||$&&i.current===0)&&(c.current=k)},[c,i,a,s]);return Xt("div",t,{ref:[g,n,r],props:h})})),aT=_.forwardRef(function(t,n){const{render:i,className:r,direction:a,keepMounted:s=!1,...c}=t,{store:f,popupRef:p,listRef:h,handleScrollArrowVisibility:g,scrollArrowsMountedCountRef:w}=La(),{side:k,scrollDownArrowRef:$,scrollUpArrowRef:R}=Ow(),E=a==="up"?sn.scrollUpArrowVisible:sn.scrollDownArrowVisible,O=at(f,E),z=at(f,sn.openMethod),P=O&&z!=="touch",N=Ni(),B=a==="up"?R:$,{transitionStatus:Z,setMounted:q}=kl(P);dt(()=>(w.current+=1,f.state.hasScrollArrows||f.set("hasScrollArrows",!0),()=>{w.current=Math.max(0,w.current-1),w.current===0&&f.state.hasScrollArrows&&f.set("hasScrollArrows",!1)}),[f,w]),Pi({open:P,ref:B,onComplete(){P||q(!1)}});const be=Xt("div",t,{ref:[n,B],state:{direction:a,visible:P,side:k,transitionStatus:Z},props:[{"aria-hidden":!0,children:a==="up"?"▲":"▼",style:{position:"absolute"},onMouseMove(V){if(V.movementX===0&&V.movementY===0||N.isStarted())return;f.set("activeIndex",null);function re(){var Q;const se=f.state.listElement??p.current;if(!se)return;f.set("activeIndex",null),g();const ae=se.scrollTop===0,F=Math.round(se.scrollTop+se.clientHeight)>=se.scrollHeight;if(h.current.length===0&&(a==="up"?f.set("scrollUpArrowVisible",!ae):f.set("scrollDownArrowVisible",!F)),a==="up"&&ae||a==="down"&&F){N.clear();return}if((f.state.listElement||p.current)&&h.current&&h.current.length>0){const ue=h.current,he=((Q=B.current)==null?void 0:Q.offsetHeight)||0;if(a==="up"){let Y=0;const de=se.scrollTop+he;for(let ce=0;ce<ue.length;ce+=1){const ze=ue[ce];if(ze&&ze.offsetTop>=de){Y=ce;break}}const ge=Math.max(0,Y-1);if(ge<Y){const ce=ue[ge];ce&&(se.scrollTop=Math.max(0,ce.offsetTop-he))}else se.scrollTop=0}else{let Y=ue.length-1;const de=se.scrollTop+se.clientHeight-he;for(let ce=0;ce<ue.length;ce+=1){const ze=ue[ce];if(ze&&ze.offsetTop+ze.offsetHeight>de){Y=Math.max(0,ce-1);break}}const ge=Math.min(ue.length-1,Y+1);if(ge>Y){const ce=ue[ge];ce&&(se.scrollTop=ce.offsetTop+ce.offsetHeight-se.clientHeight+he)}else se.scrollTop=se.scrollHeight-se.clientHeight}}N.start(40,re)}N.start(40,re)},onMouseLeave(){N.clear()}},c]});return P||s?be:null}),j7=_.forwardRef(function(t,n){return j.jsx(aT,{...t,ref:n,direction:"down"})}),U7=_.forwardRef(function(t,n){return j.jsx(aT,{...t,ref:n,direction:"up"})}),lT=_.createContext(void 0);function L7(){const e=_.useContext(lT);if(e===void 0)throw new Error(En(56));return e}const V7=_.forwardRef(function(t,n){const{className:i,render:r,...a}=t,[s,c]=_.useState(),f=_.useMemo(()=>({labelId:s,setLabelId:c}),[s,c]),p=Xt("div",t,{ref:n,props:[{role:"group","aria-labelledby":s},a]});return j.jsx(lT.Provider,{value:f,children:p})}),F7=_.forwardRef(function(t,n){const{className:i,render:r,id:a,...s}=t,{setLabelId:c}=L7(),f=Fr(a);return dt(()=>{c(f)},[f,c]),Xt("div",t,{ref:n,props:[{id:f},s]})}),sT=_.createContext(null);function Z7({onValueChange:e,onOpenChange:t,open:n,...i}){const[r,a]=_.useState(!1),s=n??r,c=(f,p)=>{a(f),t==null||t(f,p)};return j.jsx(sT.Provider,{value:_.useMemo(()=>({close:()=>a(!1),open:s}),[s]),children:j.jsx(b7,{"data-slot":"select",open:s,onOpenChange:c,onValueChange:e?f=>{f!==null&&e(f)}:void 0,...i})})}function H7({...e}){return j.jsx(S7,{"data-slot":"select-value",...e})}function B7({className:e,size:t="default",children:n,...i}){return j.jsxs(x7,{"data-slot":"select-trigger","data-size":t,className:st("pf-select-trigger flex w-full cursor-pointer items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...i,children:[n,j.jsx(_7,{render:j.jsx(fg,{className:"pf-select-trigger-icon pointer-events-none"})})]})}function q7({className:e,children:t,side:n="bottom",sideOffset:i=4,align:r="center",alignOffset:a=0,alignItemWithTrigger:s=!1,...c}){const f=id(),p=_.useContext(sT);return j.jsxs(C7,{container:f,children:[(p==null?void 0:p.open)&&j.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>p.close()}),j.jsx(E7,{side:n,sideOffset:i,align:r,alignOffset:a,alignItemWithTrigger:s,className:"isolate z-50",children:j.jsxs(z7,{"data-slot":"select-content","data-align-trigger":s,className:st("pf-select-content relative isolate z-50 max-h-(--available-height) origin-(--transform-origin) overflow-x-hidden overflow-y-auto",e),...c,children:[j.jsx(J7,{}),j.jsx(A7,{children:t}),j.jsx(X7,{})]})})]})}function G7({className:e,children:t,...n}){return j.jsx(V7,{"data-slot":"select-group",className:st("pf-select-group scroll-my-1 p-1",e),...n,children:t})}function R2({className:e,children:t,...n}){return j.jsx(F7,{"data-slot":"select-group-label",className:st("pf-select-group-label px-1.5 py-1.5 text-xs text-muted-foreground/70 pointer-events-none select-none",e),...n,children:t})}function K7({className:e,children:t,...n}){return j.jsxs(N7,{"data-slot":"select-item",className:st("pf-select-item relative flex w-full cursor-pointer items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...n,children:[j.jsx(P7,{children:t}),j.jsx(M7,{render:j.jsx("span",{className:"pf-select-item-indicator"}),children:j.jsx(Qy,{className:"pf-select-item-indicator-icon pointer-events-none"})})]})}function Y7({className:e,...t}){return j.jsx("div",{"data-slot":"select-separator",className:st("pf-select-separator -mx-1 my-1 h-px bg-border",e),...t})}function J7({className:e,...t}){return j.jsx(U7,{"data-slot":"select-scroll-up-button",className:st("pf-select-scroll-up-button",e),...t,children:j.jsx(nR,{})})}function X7({className:e,...t}){return j.jsx(j7,{"data-slot":"select-scroll-down-button",className:st("pf-select-scroll-down-button",e),...t,children:j.jsx(fg,{})})}let E2=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const Ty={checked(e){return e?{[E2.checked]:""}:{[E2.unchecked]:""}},...Ho,...Is},Nw="data-composite-item-active";function uT(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:i}=EE(),{ref:r,index:a}=rd(e),s=n===a,c=_.useRef(null),f=Di(r,c);return{compositeProps:_.useMemo(()=>({tabIndex:s?0:-1,onFocus(){i(a)},onMouseMove(){const h=c.current;if(!t||!h)return;const g=h.hasAttribute("disabled")||h.ariaDisabled==="true";!s&&!g&&h.focus()}}),[s,i,a,t]),compositeRef:f,index:a}}function W7(e){const{render:t,className:n,state:i=$r,props:r=sa,refs:a=sa,metadata:s,stateAttributesMapping:c,tag:f="div",...p}=e,{compositeProps:h,compositeRef:g}=uT({metadata:s});return Xt(f,e,{state:i,ref:[...a,g],props:[h,...r,p],stateAttributesMapping:c})}const Q7=_.createContext({disabled:!1});function cT(){return _.useContext(Q7)}const dT=_.createContext(void 0);function eL(){return _.useContext(dT)}const fT=_.createContext(void 0);function tL(){const e=_.useContext(fT);if(e===void 0)throw new Error(En(52));return e}const nL=_.forwardRef(function(t,n){const{render:i,className:r,disabled:a=!1,readOnly:s=!1,required:c=!1,value:f,inputRef:p,nativeButton:h=!1,id:g,...w}=t,k=eL(),{disabled:$,readOnly:R,required:E,checkedValue:O,touched:z=!1,validation:P,name:N}=k??{},B=(k==null?void 0:k.setCheckedValue)??or,Z=(k==null?void 0:k.setTouched)??or,q=(k==null?void 0:k.registerControlRef)??or,K=(k==null?void 0:k.registerInputRef)??or,{setDirty:fe,validityData:be,setTouched:ie,setFilled:V,state:re,disabled:se}=xo(),ae=cT(),{labelId:F,getDescriptionProps:X}=Sl(),Q=se||ae.disabled||$||a,ue=R||s,he=E||c,Y=k?O===f:f==="",de=_.useMemo(()=>Kh(f),[f]),ge=_.useRef(null),ce=_.useRef(null),ze=it(Ne=>{Ne&&q(Ne,Q)}),$e=Di(p,ce,K);dt(()=>{var Ne;(Ne=ce.current)!=null&&Ne.checked&&V(!0)},[V]),dt(()=>{if(ce.current){if(Q&&Y){K(null);return}ge.current&&q(ge.current,Q),K(ce.current)}},[Y,Q,q,K]);const De=Fr(),et=Tu({id:g,implicit:!1,controlRef:ge}),qe=h?void 0:et,ft={role:"radio","aria-checked":Y,"aria-required":he||void 0,"aria-readonly":ue||void 0,"aria-labelledby":F,[Nw]:Y?"":void 0,id:h?et:De,onKeyDown(Ne){Ne.key==="Enter"&&Ne.preventDefault()},onClick(Ne){var Le;Ne.defaultPrevented||Q||ue||(Ne.preventDefault(),(Le=ce.current)==null||Le.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:Ne.shiftKey,ctrlKey:Ne.ctrlKey,altKey:Ne.altKey,metaKey:Ne.metaKey})))},onFocus(Ne){var Le;Ne.defaultPrevented||Q||ue||!z||((Le=ce.current)==null||Le.click(),Z(!1))}},{getButtonProps:ht,buttonRef:ke}=qo({disabled:Q,native:h}),Ae={type:"radio",ref:$e,id:qe,name:N,tabIndex:-1,style:N?Hf:gl,"aria-hidden":!0,...f!==void 0?{value:de}:$r,disabled:Q,checked:Y,required:he,readOnly:ue,onChange(Ne){if(Ne.nativeEvent.defaultPrevented||Q||ue||f===void 0)return;const Le=Et(Er,Ne.nativeEvent);Le.isCanceled||(ie(!0),fe(f!==be.initialValue),V(!0),B(f,Le))},onFocus(){var Ne;(Ne=ge.current)==null||Ne.focus()}},Fe=_.useMemo(()=>({...re,required:he,disabled:Q,readOnly:ue,checked:Y}),[re,Q,ue,Y,he]),Me=Fe,xe=k!==void 0,ye=[n,ge,ke,ze],_e=[ft,X,(P==null?void 0:P.getValidationProps)??$r,w,ht],Te=Xt("span",t,{enabled:!xe,state:Fe,ref:ye,props:_e,stateAttributesMapping:Ty});return j.jsxs(fT.Provider,{value:Me,children:[xe?j.jsx(W7,{tag:"span",render:i,className:r,state:Fe,refs:ye,props:_e,stateAttributesMapping:Ty}):Te,j.jsx("input",{...Ae})]})}),rL=_.forwardRef(function(t,n){const{render:i,className:r,keepMounted:a=!1,...s}=t,c=tL(),f=c.checked,{mounted:p,transitionStatus:h,setMounted:g}=kl(f),w={...c,transitionStatus:h},k=_.useRef(null),$=a||p,R=Xt("span",t,{ref:[n,k],state:w,props:s,stateAttributesMapping:Ty});return Pi({open:f,ref:k,onComplete(){f||g(!1)}}),$?R:null});function Iy(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const iL=[];function oL(e){const{itemSizes:t,cols:n=1,loopFocus:i=!0,dense:r=!1,orientation:a="both",direction:s,highlightedIndex:c,onHighlightedIndexChange:f,rootRef:p,enableHomeAndEndKeys:h=!1,stopEventPropagation:g=!1,disabledIndices:w,modifierKeys:k=iL}=e,[$,R]=_.useState(0),E=n>1,O=_.useRef(null),z=Di(O,p),P=_.useRef([]),N=_.useRef(!1),B=c??$,Z=it((fe,be=!1)=>{if((f??R)(fe),be){const ie=P.current[fe];x2(O.current,ie,s,a)}}),q=it(fe=>{if(fe.size===0||N.current)return;N.current=!0;const be=Array.from(fe.keys()),ie=be.find(re=>re==null?void 0:re.hasAttribute(Nw))??null,V=ie?be.indexOf(ie):-1;V!==-1&&Z(V),x2(O.current,ie,s,a)}),K=_.useMemo(()=>({"aria-orientation":a==="both"?void 0:a,ref:z,onFocus(fe){!O.current||!w2(fe.target)||fe.target.setSelectionRange(0,fe.target.value.length??0)},onKeyDown(fe){const be=h?q8:ZE;if(!be.has(fe.key)||aL(fe,k)||!O.current)return;const V=s==="rtl",re=V?yl:Ma,se={horizontal:re,vertical:ua,both:re}[a],ae=V?Ma:yl,F={horizontal:ae,vertical:Na,both:ae}[a];if(w2(fe.target)&&!Iy(fe.target)){const ge=fe.target.selectionStart,ce=fe.target.selectionEnd,ze=fe.target.value??"";if(ge==null||fe.shiftKey||ge!==ce||fe.key!==F&&ge<ze.length||fe.key!==se&&ge>0)return}let X=B;const Q=Th(P,w),ue=wy(P,w);if(E){const ge=t||Array.from({length:P.current.length},()=>({width:1,height:1})),ce=IR(ge,n,r),ze=ce.findIndex(De=>De!=null&&!gs(P,De,w)),$e=ce.reduce((De,et,qe)=>et!=null&&!gs(P,et,w)?qe:De,-1);X=ce[TR({current:ce.map(De=>De?P.current[De]:null)},{event:fe,orientation:a,loopFocus:i,cols:n,disabledIndices:OR([...w||P.current.map((De,et)=>gs(P,et)?et:void 0),void 0],ce),minIndex:ze,maxIndex:$e,prevIndex:zR(B>ue?Q:B,ge,ce,n,fe.key===ua?"bl":fe.key===Ma?"tr":"tl"),rtl:V})]}const he={horizontal:[re],vertical:[ua],both:[re,ua]}[a],Y={horizontal:[ae],vertical:[Na],both:[ae,Na]}[a],de=E?be:{horizontal:h?H8:VE,vertical:h?B8:FE,both:be}[a];h&&(fe.key===zs?X=Q:fe.key===Os&&(X=ue)),X===B&&(he.includes(fe.key)||Y.includes(fe.key))&&(i&&X===ue&&he.includes(fe.key)?X=Q:i&&X===Q&&Y.includes(fe.key)?X=ue:X=si(P,{startingIndex:X,decrement:Y.includes(fe.key),disabledIndices:w})),X!==B&&!_c(P,X)&&(g&&fe.stopPropagation(),de.has(fe.key)&&fe.preventDefault(),Z(X,!0),queueMicrotask(()=>{var ge;(ge=P.current[X])==null||ge.focus()}))}}),[n,r,s,w,P,h,B,E,t,i,z,k,Z,a,g]);return _.useMemo(()=>({props:K,highlightedIndex:B,onHighlightedIndexChange:Z,elementsRef:P,disabledIndices:w,onMapChange:q,relayKeyboardEvent:K.onKeyDown}),[K,B,Z,P,w,q])}function aL(e,t){for(const n of J8.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function pT(e){const{render:t,className:n,refs:i=sa,props:r=sa,state:a=$r,stateAttributesMapping:s,highlightedIndex:c,onHighlightedIndexChange:f,orientation:p,dense:h,itemSizes:g,loopFocus:w,cols:k,enableHomeAndEndKeys:$,onMapChange:R,stopEventPropagation:E=!0,rootRef:O,disabledIndices:z,modifierKeys:P,highlightItemOnHover:N=!1,tag:B="div",...Z}=e,q=Iu(),{props:K,highlightedIndex:fe,onHighlightedIndexChange:be,elementsRef:ie,onMapChange:V,relayKeyboardEvent:re}=oL({itemSizes:g,cols:k,loopFocus:w,dense:h,orientation:p,highlightedIndex:c,onHighlightedIndexChange:f,rootRef:O,stopEventPropagation:E,enableHomeAndEndKeys:$,direction:q,disabledIndices:z,modifierKeys:P}),se=Xt(B,e,{state:a,ref:i,props:[K,...r,Z],stateAttributesMapping:s}),ae=_.useMemo(()=>({highlightedIndex:fe,onHighlightedIndexChange:be,highlightItemOnHover:N,relayKeyboardEvent:re}),[fe,be,N,re]);return j.jsx(RE.Provider,{value:ae,children:j.jsx(Xf,{elementsRef:ie,onMapChange:F=>{R==null||R(F),V(F)},children:se})})}const lL=_.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0});function sL(e=!1){const t=_.useContext(lL);if(!t&&!e)throw new Error(En(86));return t}const uL=[HE],cL=_.forwardRef(function(t,n){const{render:i,className:r,disabled:a,readOnly:s,required:c,onValueChange:f,value:p,defaultValue:h,name:g,inputRef:w,id:k,...$}=t,{setTouched:R,setFocused:E,shouldValidateOnChange:O,validationMode:z,name:P,disabled:N,state:B,validation:Z,setDirty:q,setFilled:K,validityData:fe}=xo(),{labelId:be}=Sl(),{clearErrors:ie}=Eu(),V=sL(!0),re=N||a,se=P??g,ae=Fr(k),[F,X]=Vo({controlled:p,default:h,name:"RadioGroup",state:"value"}),Q=it(f),ue=it((ke,Ae)=>{Q(ke,Ae),!Ae.isCanceled&&X(ke)}),he=_.useRef(null),Y=_.useRef(null),de=_.useRef(null);function ge(ke){let Ae;return w&&(typeof w=="function"?Ae=w(ke):w.current=ke),Y.current=ke,Z.inputRef.current=ke,Ae}const ce=it((ke,Ae=!1)=>{if(ke){if(Ae){he.current===ke&&(he.current=null);return}he.current==null&&(he.current=ke)}}),ze=it(ke=>{if(!ke||ke.disabled)return;de.current||(de.current=ke);const Ae=Y.current;if(ke.checked||Ae==null||Ae.disabled)return ge(ke)});nd({id:ae,commit:Z.commit,value:F,controlRef:he,name:se,getValue:()=>F??null}),ml(F,()=>{ie(se),q(F!==fe.initialValue),K(F!=null),O()?Z.commit(F):Z.commit(F,!0);const ke=de.current;F==null&&ke&&!ke.disabled&&ge(ke)});const[$e,De]=_.useState(!1),et=$["aria-labelledby"]??be??(V==null?void 0:V.legendId),qe={...B,disabled:re??!1,required:c??!1,readOnly:s??!1},ft=_.useMemo(()=>({...B,checkedValue:F,disabled:re,validation:Z,name:se,onValueChange:Q,readOnly:s,registerControlRef:ce,registerInputRef:ze,required:c,setCheckedValue:ue,setTouched:De,touched:$e}),[F,re,Z,B,se,Q,s,ce,ze,c,ue,De,$e]),ht={role:"radiogroup","aria-required":c||void 0,"aria-disabled":re||void 0,"aria-readonly":s||void 0,"aria-labelledby":et,onFocus(){E(!0)},onBlur(ke){rn(ke.currentTarget,ke.relatedTarget)||(R(!0),E(!1),z==="onBlur"&&Z.commit(F))},onKeyDownCapture(ke){ke.key.startsWith("Arrow")&&(R(!0),De(!0),E(!0))}};return j.jsx(dT.Provider,{value:ft,children:j.jsx(pT,{render:i,className:r,state:qe,props:[ht,Z.getValidationProps,$],refs:[n],stateAttributesMapping:Is,enableHomeAndEndKeys:!1,modifierKeys:uL})})});function dL({className:e,...t}){return j.jsx(cL,{"data-slot":"radio-group",className:st("pf-radio-group w-full",e),...t})}function fL({className:e,...t}){return j.jsx(nL,{"data-slot":"radio-group-item",className:st("pf-radio-group-item group/radio-group-item peer relative aspect-square shrink-0 cursor-pointer border border-border outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:j.jsx(rL,{"data-slot":"radio-group-indicator",className:"pf-radio-group-indicator",children:j.jsx(iR,{className:"pf-radio-group-indicator-icon"})})})}let T2=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.indeterminate="data-indeterminate",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});function mT(e){return _.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[T2.checked]:""}:{[T2.unchecked]:""}},...Is}),[e.indeterminate])}const pL=_.createContext(void 0);function mL(e=!0){const t=_.useContext(pL);if(t===void 0&&!e)throw new Error(En(3));return t}const hT=_.createContext(void 0);function hL(){const e=_.useContext(hT);if(e===void 0)throw new Error(En(14));return e}const gL="data-parent",vL=_.forwardRef(function(t,n){const{checked:i,className:r,defaultChecked:a=!1,disabled:s=!1,id:c,indeterminate:f=!1,inputRef:p,name:h,onCheckedChange:g,parent:w=!1,readOnly:k=!1,render:$,required:R=!1,uncheckedValue:E,value:O,nativeButton:z=!1,...P}=t,{clearErrors:N}=Eu(),{disabled:B,name:Z,setDirty:q,setFilled:K,setFocused:fe,setTouched:be,state:ie,validationMode:V,validityData:re,shouldValidateOnChange:se,validation:ae}=xo(),F=cT(),{labelId:X,controlId:Q,registerControlId:ue,getDescriptionProps:he}=Sl(),Y=mL(),de=Y==null?void 0:Y.parent,ge=de&&Y.allValues,ce=B||F.disabled||(Y==null?void 0:Y.disabled)||s,ze=Z??h,$e=O??ze,De=Fr(),et=Fr();let qe=Q;ge?qe=w?et:`${de.id}-${$e}`:c&&(qe=c);let ft={};ge&&(w?ft=Y.parent.getParentProps():$e&&(ft=Y.parent.getChildProps($e)));const ht=it(g),{checked:ke=i,indeterminate:Ae=f,onCheckedChange:Fe,...Me}=ft,xe=Y==null?void 0:Y.value,ye=Y==null?void 0:Y.setValue,_e=Y==null?void 0:Y.defaultValue,Te=_.useRef(null),Ne=Vr(()=>Symbol("checkbox-control")),Le=_.useRef(!1),{getButtonProps:Ye,buttonRef:Je}=qo({disabled:ce,native:z}),Ze=(Y==null?void 0:Y.validation)??ae,[C,en]=Vo({controlled:$e&&xe&&!w?xe.includes($e):ke,default:$e&&_e&&!w?_e.includes($e):a,name:"Checkbox",state:"checked"});dt(()=>{ue!==or&&(Le.current=!0,ue(Ne.current,qe))},[qe,Y,ue,w,Ne]),_.useEffect(()=>{const Rt=Ne.current;return()=>{!Le.current||ue===or||(Le.current=!1,ue(Rt,void 0))}},[ue,Ne]),nd({enabled:!Y,id:De,commit:Ze.commit,value:C,controlRef:Te,name:ze,getValue:()=>C});const It=_.useRef(null),mt=Di(p,It,Ze.inputRef);dt(()=>{It.current&&(It.current.indeterminate=Ae,C&&K(!0))},[C,Ae,K]),ml(C,()=>{Y&&!w||(N(ze),K(C),q(C!==re.initialValue),se()?Ze.commit(C):Ze.commit(C,!0))});const $t=Ru({checked:C,disabled:ce,name:w?void 0:ze,id:z?void 0:qe??void 0,required:R,ref:mt,style:ze?Hf:gl,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(Rt){if(Rt.nativeEvent.defaultPrevented)return;const Vt=Rt.target.checked,dn=Et(Er,Rt.nativeEvent);if(Fe==null||Fe(Vt,dn),ht(Vt,dn),!dn.isCanceled&&(en(Vt),$e&&xe&&ye&&!w)){const kn=Vt?[...xe,$e]:xe.filter(pt=>pt!==$e);ye(kn,dn)}},onFocus(){var Rt;(Rt=Te.current)==null||Rt.focus()}},O!==void 0?{value:(Y?C&&O:O)||""}:$r,he,Y?Ze.getValidationProps:Ze.getInputValidationProps),Nt=ge?!!ke:C,Wt=ge&&Ae||f;_.useEffect(()=>{if(!de||!$e)return;const Rt=de.disabledStatesRef.current;return Rt.set($e,ce),()=>{Rt.delete($e)}},[de,ce,$e]);const qt=_.useMemo(()=>({...ie,checked:Nt,disabled:ce,readOnly:k,required:R,indeterminate:Wt}),[ie,Nt,ce,k,R,Wt]),Tn=mT(qt),bn=Xt("span",t,{state:qt,ref:[Je,Te,n,Y==null?void 0:Y.registerControlRef],props:[{id:z?qe??void 0:De,role:"checkbox","aria-checked":Ae?"mixed":C,"aria-readonly":k||void 0,"aria-required":R||void 0,"aria-labelledby":X,[gL]:w?"":void 0,onFocus(){fe(!0)},onBlur(){const Rt=It.current;Rt&&(be(!0),fe(!1),V==="onBlur"&&Ze.commit(Y?xe:Rt.checked))},onClick(Rt){var Vt;k||ce||(Rt.preventDefault(),(Vt=It.current)==null||Vt.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:Rt.shiftKey,ctrlKey:Rt.ctrlKey,altKey:Rt.altKey,metaKey:Rt.metaKey})))}},he,Ze.getValidationProps,P,Me,Ye],stateAttributesMapping:Tn});return j.jsxs(hT.Provider,{value:qt,children:[bn,!C&&!Y&&ze&&!w&&E!==void 0&&j.jsx("input",{type:"hidden",name:ze,value:E}),j.jsx("input",{...$t})]})}),bL=_.forwardRef(function(t,n){const{render:i,className:r,keepMounted:a=!1,...s}=t,c=hL(),f=c.checked||c.indeterminate,{mounted:p,transitionStatus:h,setMounted:g}=kl(f),w=_.useRef(null),k={...c,transitionStatus:h};Pi({open:f,ref:w,onComplete(){f||g(!1)}});const $=mT(c),R=_.useMemo(()=>({...$,...Ho,...Is}),[$]),E=a||p,O=Xt("span",t,{ref:[n,w],state:k,stateAttributesMapping:R,props:s});return E?O:null});function yL({className:e,...t}){return j.jsx(vL,{"data-slot":"checkbox",className:st("pf-checkbox peer relative shrink-0 cursor-pointer outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:j.jsx(bL,{"data-slot":"checkbox-indicator",className:"pf-checkbox-indicator grid place-content-center text-current transition-none",children:j.jsx(Qy,{className:"size-3.5"})})})}const gT=_.createContext(void 0);function wL(){const e=_.useContext(gT);if(e===void 0)throw new Error(En(63));return e}let I2=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const vT={...Is,checked(e){return e?{[I2.checked]:""}:{[I2.unchecked]:""}}},xL=_.forwardRef(function(t,n){const{checked:i,className:r,defaultChecked:a,id:s,inputRef:c,name:f,nativeButton:p=!1,onCheckedChange:h,readOnly:g=!1,required:w=!1,disabled:k=!1,render:$,uncheckedValue:R,value:E,...O}=t,{clearErrors:z}=Eu(),{state:P,setTouched:N,setDirty:B,validityData:Z,setFilled:q,setFocused:K,shouldValidateOnChange:fe,validationMode:be,disabled:ie,name:V,validation:re}=xo(),{labelId:se}=Sl(),ae=ie||k,F=V??f,X=it(h),Q=_.useRef(null),ue=Di(Q,c,re.inputRef),he=_.useRef(null),Y=Fr(),de=Tu({id:s,implicit:!1,controlRef:he}),ge=p?void 0:de,[ce,ze]=Vo({controlled:i,default:!!a,name:"Switch",state:"checked"});nd({id:Y,commit:re.commit,value:ce,controlRef:he,name:F,getValue:()=>ce}),dt(()=>{Q.current&&q(Q.current.checked)},[Q,q]),ml(ce,()=>{z(F),B(ce!==Z.initialValue),q(ce),fe()?re.commit(ce):re.commit(ce,!0)});const{getButtonProps:$e,buttonRef:De}=qo({disabled:ae,native:p}),et={id:p?de:Y,role:"switch","aria-checked":ce,"aria-readonly":g||void 0,"aria-required":w||void 0,"aria-labelledby":se,onFocus(){ae||K(!0)},onBlur(){const ke=Q.current;!ke||ae||(N(!0),K(!1),be==="onBlur"&&re.commit(ke.checked))},onClick(ke){var Ae;g||ae||(ke.preventDefault(),(Ae=Q.current)==null||Ae.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:ke.shiftKey,ctrlKey:ke.ctrlKey,altKey:ke.altKey,metaKey:ke.metaKey})))}},qe=_.useMemo(()=>Ru({checked:ce,disabled:ae,id:ge,name:F,required:w,style:F?Hf:gl,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:ue,onChange(ke){if(ke.nativeEvent.defaultPrevented)return;const Ae=ke.target.checked,Fe=Et(Er,ke.nativeEvent);X==null||X(Ae,Fe),!Fe.isCanceled&&ze(Ae)},onFocus(){var ke;(ke=he.current)==null||ke.focus()}},re.getInputValidationProps,E!==void 0?{value:E}:$r),[ce,ae,ue,ge,F,X,w,ze,re,E]),ft=_.useMemo(()=>({...P,checked:ce,disabled:ae,readOnly:g,required:w}),[P,ce,ae,g,w]),ht=Xt("span",t,{state:ft,ref:[n,he,De],props:[et,re.getValidationProps,O,$e],stateAttributesMapping:vT});return j.jsxs(gT.Provider,{value:ft,children:[ht,!ce&&F&&R!==void 0&&j.jsx("input",{type:"hidden",name:F,value:R}),j.jsx("input",{...qe})]})}),kL=_.forwardRef(function(t,n){const{render:i,className:r,...a}=t,{state:s}=xo(),c=wL(),f={...s,...c};return Xt("span",t,{state:f,ref:n,stateAttributesMapping:vT,props:a})});function SL({className:e,size:t="default",...n}){return j.jsx(xL,{"data-slot":"switch","data-size":t,className:st("pf-switch peer group/switch relative inline-flex cursor-pointer items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...n,children:j.jsx(kL,{"data-slot":"switch-thumb",className:"pf-switch-thumb pointer-events-none block ring-0 transition-transform"})})}function np({className:e,...t}){return j.jsx("label",{"data-slot":"label",className:st("pf-label flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed",e),...t})}function _L({optional:e,children:t,...n}){return j.jsxs(np,{...n,children:[t,e&&j.jsx("span",{className:"pf-label-optional",children:"optional"})]})}function $L({option:e,label:t,value:n,name:i,disabled:r,className:a}){const s=`radio-${i??"standalone"}-${e}`;return j.jsxs("div",{className:st("flex items-center space-x-2",a),children:[j.jsx("input",{type:"radio",id:s,name:i,value:e,defaultChecked:n,disabled:r,className:"h-4 w-4 border-border text-primary accent-primary"}),t&&j.jsx(np,{htmlFor:s,className:"cursor-pointer",children:t})]})}function CL({placeholder:e,name:t,size:n,side:i,align:r,disabled:a,invalid:s,className:c,value:f,onValueChange:p,_items:h=[],_selectChildren:g}){var N,B;const w=_.useMemo(()=>{if(g){const Z=[];for(const q of g)q._type==="item"&&Z.push(q),q._type==="group"&&Z.push(...q.items);return Z}return h},[g,h]),k=(N=w.find(Z=>Z.selected))==null?void 0:N.value,[$,R]=_.useState(f??k??"");_.useEffect(()=>{f!==void 0&&R(f)},[f]);const E=Z=>{R(Z),p==null||p(Z)},O=(B=w.find(Z=>Z.value===$))==null?void 0:B.label,z=f!==void 0?{value:$,onValueChange:E}:{defaultValue:k,onValueChange:E},P=Z=>j.jsx(K7,{value:Z.value,disabled:Z.disabled,children:Z.label},Z.value);return j.jsxs(Z7,{...z,disabled:a,name:t,children:[j.jsx(B7,{className:c,size:n,"aria-invalid":s||void 0,children:j.jsx(H7,{placeholder:e,children:O||null})}),j.jsx(q7,{side:i,align:r,children:g?g.map((Z,q)=>Z._type==="group"?j.jsxs(G7,{children:[Z.label&&j.jsx(R2,{children:Z.label}),Z.items.map(P)]},q):Z._type==="separator"?j.jsx(Y7,{},q):Z._type==="label"?j.jsx(R2,{children:Z.label},q):P(Z)):h.map(P)})]})}function RL({name:e,className:t,value:n,onValueChange:i,_items:r=[]}){var c;const a=(c=r.find(f=>f.value))==null?void 0:c.option,s=n!==void 0?{value:n,onValueChange:i}:{defaultValue:a,onValueChange:i};return j.jsx(dL,{...s,className:t,name:e,children:r.map(f=>{const p=`radio-${e??""}-${f.option}`;return j.jsxs("div",{className:"flex items-center space-x-2",children:[j.jsx(fL,{value:f.option,disabled:f.disabled,id:p}),f.label&&j.jsx(np,{htmlFor:p,className:"cursor-pointer",children:f.label})]},f.option)})})}function EL({label:e,value:t,name:n,disabled:i,className:r,onCheckedChange:a}){const s=n?`checkbox-${n}`:void 0,[c,f]=_.useState(t??!1);_.useEffect(()=>{t!==void 0&&f(t)},[t]);const p=g=>{f(g),a==null||a(g)},h=j.jsx(yL,{id:s,checked:c,onCheckedChange:p,disabled:i,name:n,className:r});return e?j.jsxs("div",{className:"flex items-center space-x-2",children:[h,j.jsx(np,{htmlFor:s,className:"cursor-pointer",children:e})]}):h}function TL({label:e,value:t,size:n,name:i,disabled:r,className:a,onCheckedChange:s}){const c=i?`switch-${i}`:void 0,[f,p]=_.useState(t??!1);_.useEffect(()=>{t!==void 0&&p(t)},[t]);const h=w=>{p(w),s==null||s(w)},g=j.jsx(SL,{id:c,checked:f,onCheckedChange:h,disabled:r,name:i,size:n});return e?j.jsxs("div",{className:st("flex items-center space-x-2",a),children:[g,j.jsx(np,{htmlFor:c,className:"cursor-pointer",children:e})]}):g}function IL({orientation:e="horizontal",className:t,children:n}){return j.jsx("div",{role:"group","data-slot":"button-group","data-orientation":e,className:st("pf-button-group flex w-fit items-stretch",e==="horizontal"?"pf-button-group-orientation-horizontal":"pf-button-group-orientation-vertical flex-col",t),children:n})}function zL(e){return new Promise((t,n)=>{const i=new FileReader;i.onload=()=>{const a=i.result.split(",",2)[1]??"";t(a)},i.onerror=()=>n(i.error),i.readAsDataURL(e)})}async function bT(e,t={}){const n=Array.from(e),i=[];for(const r of n){if(t.maxSize&&r.size>t.maxSize){const s=(t.maxSize/1048576).toFixed(1);uu.error(`File "${r.name}" exceeds ${s}MB limit`);continue}const a=await zL(r);i.push({name:r.name,size:r.size,type:r.type,data:a})}return i}function yT(e,t){if(!t)return e;const n=t.split(",").map(r=>r.trim().toLowerCase()).filter(Boolean);if(n.includes("*/*"))return e;const i=[];for(const r of e){const a=r.type.toLowerCase(),s=r.name.toLowerCase();n.some(f=>f.startsWith(".")?s.endsWith(f):f.endsWith("/*")?a.startsWith(f.slice(0,-1)):a===f)?i.push(r):uu.error(`File "${r.name}" doesn't match accepted types (${t})`)}return i}function OL({icon:e,label:t,description:n,accept:i,multiple:r=!1,maxSize:a,disabled:s=!1,className:c,onChange:f}){const[p,h]=_.useState(!1),g=_.useRef(null),w=_.useCallback(async N=>{const B=yT(N,i),Z=await bT(B,{maxSize:a});Z.length>0&&(f==null||f(Z))},[i,a,f]),k=_.useCallback(N=>{N.preventDefault(),N.stopPropagation(),s||h(!0)},[s]),$=_.useCallback(N=>{N.preventDefault(),N.stopPropagation(),h(!1)},[]),R=_.useCallback(N=>{if(N.preventDefault(),N.stopPropagation(),h(!1),s)return;const B=Array.from(N.dataTransfer.files);B.length>0&&w(B)},[s,w]),E=_.useCallback(N=>{const B=Array.from(N.target.files??[]);B.length>0&&w(B),N.target.value=""},[w]),O=_.useCallback(()=>{var N;s||(N=g.current)==null||N.click()},[s]),z=_.useCallback(N=>{var B;(N.key==="Enter"||N.key===" ")&&!s&&(N.preventDefault(),(B=g.current)==null||B.click())},[s]),P=pg(e??"upload");return j.jsxs("div",{role:"button",tabIndex:s?-1:0,onClick:O,onKeyDown:z,onDragOver:k,onDragLeave:$,onDrop:R,className:st("w-full flex flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed px-6 py-8 text-center transition-colors cursor-pointer",p?"border-primary bg-primary/5":"border-muted-foreground/25 hover:border-muted-foreground/50",s&&"pointer-events-none opacity-50",c),children:[P&&j.jsx(P,{className:"size-6 text-muted-foreground"}),j.jsxs("div",{className:"flex flex-col gap-1",children:[j.jsx("p",{className:"text-sm font-medium text-foreground",children:t??"Drop files here or click to browse"}),n&&j.jsx("p",{className:"text-xs text-muted-foreground",children:n})]}),j.jsx("input",{ref:g,type:"file",accept:i,multiple:r,disabled:s,onChange:E,className:"hidden"})]})}function AL({className:e,cssClass:t,children:n}){return j.jsx("div",{className:st("flex flex-row",e,t),children:n})}function NL({className:e,cssClass:t,children:n}){return j.jsx("div",{className:st("flex w-full min-w-0 flex-col",e,t),children:n})}function ML({className:e,cssClass:t,children:n,minColumnWidth:i,columnTemplate:r}){const a=r?{gridTemplateColumns:r}:i?{gridTemplateColumns:`repeat(auto-fit, minmax(${i}, 1fr))`}:void 0;return j.jsx("div",{className:st("grid w-full",e,t),style:a,children:n})}function DL({className:e,cssClass:t,children:n,colSpan:i=1,rowSpan:r=1}){const a={...i!==1?{gridColumnEnd:`span ${i}`}:{},...r!==1?{gridRowEnd:`span ${r}`}:{}};return j.jsx("div",{className:st("min-w-0 min-h-0",e,t),style:Object.keys(a).length>0?a:void 0,children:n})}function PL({className:e,cssClass:t,children:n,onSubmit:i}){return j.jsx("form",{className:st("flex w-full flex-col",e,t),onSubmit:r=>{r.preventDefault(),i==null||i(r)},children:n})}function jL({className:e,cssClass:t,children:n}){return j.jsx("div",{className:st("container mx-auto px-4 sm:px-6 lg:px-8",e,t),children:n})}function UL({className:e,cssClass:t,style:n,children:i}){return j.jsx("div",{className:st(e,t),style:n,children:i})}function LL({className:e,cssClass:t,children:n,columns:i=12,rowHeight:r=120,rows:a}){const s={gridTemplateColumns:`repeat(${i}, 1fr)`,...a?{gridTemplateRows:`repeat(${a}, 1fr)`}:{gridAutoRows:typeof r=="number"?`${r}px`:r}};return j.jsx("div",{className:st("grid w-full",e,t),style:s,children:n})}function VL({className:e,cssClass:t,children:n,col:i=1,row:r=1,colSpan:a=1,rowSpan:s=1,zIndex:c}){const f={gridColumn:`${i} / span ${a}`,gridRow:`${r} / span ${s}`,...c!=null?{zIndex:c}:{}};return j.jsx("div",{className:st("min-w-0 min-h-0",e,t),style:f,children:n})}function FL({className:e,cssClass:t,style:n,children:i,content:r,text:a,code:s,bold:c,italic:f}){const p=s?"code":"span";return j.jsx(p,{className:st(s&&"pf-code relative rounded px-[0.3rem] py-[0.2rem] font-mono text-sm font-medium",c&&"font-bold",f&&"italic",e,t),style:n,children:i??r??a})}function ZL({className:e,cssClass:t,style:n,children:i,content:r,text:a,href:s,target:c,code:f,bold:p,italic:h}){const g=c==="_blank"?"noopener noreferrer":void 0;return j.jsx("a",{href:s,target:c??void 0,rel:g,className:st("font-medium text-primary underline underline-offset-4",f&&"pf-code relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm",p&&"font-bold",h&&"italic",e,t),style:n,children:i??r??a})}function HL({text:e,content:t,className:n,cssClass:i,bold:r,italic:a,children:s}){return j.jsx("span",{className:st(r&&"font-bold",a&&"italic",n,i),children:s??e??t})}const BL={1:"scroll-m-20 text-4xl font-bold tracking-tight m-0",2:"scroll-m-20 text-3xl font-semibold tracking-tight m-0",3:"scroll-m-20 text-2xl font-semibold tracking-tight m-0",4:"scroll-m-20 text-xl font-semibold tracking-tight m-0"};function rp({level:e=1,text:t,content:n,className:i,cssClass:r,bold:a,italic:s,children:c}){const f=`h${e}`;return j.jsx(f,{className:st(BL[e],a&&"font-bold",s&&"italic",i,r),children:c??t??n})}function qL(e){return j.jsx(rp,{level:1,...e})}function GL(e){return j.jsx(rp,{level:2,...e})}function KL(e){return j.jsx(rp,{level:3,...e})}function YL(e){return j.jsx(rp,{level:4,...e})}function JL({className:e,cssClass:t,bold:n,italic:i,children:r,...a}){return j.jsx("p",{className:st("leading-7 m-0",n&&"font-bold",i&&"italic",e,t),children:r??a.text??a.content})}function XL({className:e,cssClass:t,bold:n,italic:i,children:r,...a}){return j.jsx("p",{className:st("text-xl text-muted-foreground m-0",n&&"font-bold",i&&"italic",e,t),children:r??a.text??a.content})}function WL({className:e,cssClass:t,bold:n,italic:i,children:r,...a}){return j.jsx("div",{className:st("text-lg font-semibold",n&&"font-bold",i&&"italic",e,t),children:r??a.text??a.content})}function QL({className:e,cssClass:t,bold:n,italic:i,children:r,...a}){return j.jsx("small",{className:st("text-sm font-medium leading-none",n&&"font-bold",i&&"italic",e,t),children:r??a.text??a.content})}function eV({className:e,cssClass:t,bold:n,italic:i,children:r,...a}){return j.jsx("p",{className:st("text-sm text-muted-foreground m-0",n&&"font-bold",i&&"italic",e,t),children:r??a.text??a.content})}function tV({className:e,cssClass:t,bold:n,italic:i,children:r,...a}){return j.jsx("blockquote",{className:st("border-l-2 border-border pl-6 italic m-0",n&&"font-bold",i&&"italic",e,t),children:r??a.text??a.content})}function nV({url:e,html:t,width:n,height:i,sandbox:r,allow:a,className:s,cssClass:c}){const f={border:"none"};return n&&(f.width=n),i&&(f.height=i),j.jsx("iframe",{src:e,srcDoc:t,sandbox:r,allow:a,style:f,className:st(s,c)})}function rV({src:e,alt:t="",width:n,height:i,className:r,cssClass:a}){const s={};return n&&(s.width=n),i&&(s.height=i),j.jsx("img",{src:e,alt:t,style:Object.keys(s).length>0?s:void 0,className:st(r,a)})}function iV({src:e,poster:t,controls:n=!0,autoplay:i=!1,loop:r=!1,muted:a=!1,width:s,height:c,className:f,cssClass:p}){const h={};return s&&(h.width=s),c&&(h.height=c),j.jsx("video",{src:e,poster:t,controls:n,autoPlay:i,loop:r,muted:a,style:Object.keys(h).length>0?h:void 0,className:st(f,p)})}function oV({src:e,controls:t=!0,autoplay:n=!1,loop:i=!1,muted:r=!1,className:a,cssClass:s}){return j.jsx("audio",{src:e,controls:t,autoPlay:n,loop:i,muted:r,className:st(a,s)})}function aV(e){if(typeof e=="number")return e>0?"up":e<0?"down":"neutral";const t=e.trim();if(t.startsWith("-")||t.startsWith("−"))return"down";if(t.startsWith("+"))return"up";const n=parseFloat(t.replace(/[^0-9.\-]/g,""));if(!isNaN(n)){if(n>0)return"up";if(n<0)return"down"}return"neutral"}function lV(e){return e==="up"?"positive":e==="down"?"negative":"neutral"}const sV={positive:"success",negative:"destructive",neutral:"secondary"},uV={up:AD,down:zD,neutral:TD};function cV({label:e,value:t,description:n,delta:i,trend:r,trendSentiment:a,className:s,cssClass:c}){const f=r??(i!=null?aV(i):void 0),p=a??(f!=null?lV(f):void 0),h=f!=null?uV[f]:null,g=p!=null?sV[p]:"secondary";return j.jsxs("div",{className:st("flex flex-col gap-1",s,c),children:[j.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:e}),j.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[j.jsx("span",{className:"text-3xl font-bold tracking-tight leading-none",children:String(t)}),i!=null&&j.jsxs(sR,{variant:g,className:"gap-1 text-xs font-medium translate-y-px",children:[h&&j.jsx(h,{className:"size-3"}),String(i)]})]}),n&&j.jsx("p",{className:"text-sm text-muted-foreground",children:n})]})}const z2={sm:64,default:96,lg:128},O2={sm:"pf-ring-label pf-ring-label-sm",default:"pf-ring-label pf-ring-label-default",lg:"pf-ring-label pf-ring-label-lg"},A2={default:"pf-ring-variant-default",success:"pf-ring-variant-success",warning:"pf-ring-variant-warning",destructive:"pf-ring-variant-destructive",info:"pf-ring-variant-info",muted:"pf-ring-variant-muted"};function dV({value:e=0,target:t,label:n,variant:i="default",size:r="default",thickness:a=6,indicatorClassName:s,targetClassName:c,className:f,cssClass:p,children:h}){const g=z2[r]??z2.default,w=g/2,k=w-a/2,$=2*Math.PI*k,R=Math.max(0,Math.min(100,e)),E=$*(1-R/100),O=t!=null?Math.max(0,Math.min(100,t)):void 0;let z=null;if(O!=null){const N=O/100*360*Math.PI/180,B=a+4,Z=k-B/2,q=k+B/2;z=j.jsx("line",{className:st("pf-ring-target",c),x1:w+Z*Math.cos(N),y1:w+Z*Math.sin(N),x2:w+q*Math.cos(N),y2:w+q*Math.sin(N),strokeWidth:2,strokeLinecap:"round"})}return j.jsxs("div",{className:st("pf-ring group inline-flex items-center justify-center overflow-visible",f,p),role:"meter","aria-valuenow":R,"aria-valuemin":0,"aria-valuemax":100,"aria-label":n??`${Math.round(R)}%`,style:{width:g,height:g},children:[j.jsxs("svg",{width:g,height:g,viewBox:`0 0 ${g} ${g}`,className:"pf-ring-svg",overflow:"visible",style:{transform:"rotate(-90deg)"},children:[j.jsxs("defs",{children:[j.jsxs("linearGradient",{id:"ring-gradient-default",x1:"0",y1:"0",x2:"1",y2:"1",children:[j.jsx("stop",{offset:"0%",style:{stopColor:"var(--primary)"}}),j.jsx("stop",{offset:"100%",style:{stopColor:"oklch(from var(--primary) calc(l - 0.12) c h)"}})]}),j.jsxs("linearGradient",{id:"ring-gradient-success",x1:"0",y1:"0",x2:"1",y2:"1",children:[j.jsx("stop",{offset:"0%",style:{stopColor:"var(--success)"}}),j.jsx("stop",{offset:"100%",style:{stopColor:"oklch(from var(--success) calc(l - 0.12) c h)"}})]}),j.jsxs("linearGradient",{id:"ring-gradient-warning",x1:"0",y1:"0",x2:"1",y2:"1",children:[j.jsx("stop",{offset:"0%",style:{stopColor:"var(--warning)"}}),j.jsx("stop",{offset:"100%",style:{stopColor:"oklch(from var(--warning) calc(l - 0.12) c h)"}})]}),j.jsxs("linearGradient",{id:"ring-gradient-destructive",x1:"0",y1:"0",x2:"1",y2:"1",children:[j.jsx("stop",{offset:"0%",style:{stopColor:"var(--destructive)"}}),j.jsx("stop",{offset:"100%",style:{stopColor:"oklch(from var(--destructive) calc(l - 0.12) c h)"}})]}),j.jsxs("linearGradient",{id:"ring-gradient-info",x1:"0",y1:"0",x2:"1",y2:"1",children:[j.jsx("stop",{offset:"0%",style:{stopColor:"var(--info)"}}),j.jsx("stop",{offset:"100%",style:{stopColor:"oklch(from var(--info) calc(l - 0.12) c h)"}})]})]}),j.jsx("circle",{className:"pf-ring-track",cx:w,cy:w,r:k,strokeWidth:a}),j.jsx("circle",{className:st("pf-ring-fill",A2[i]??A2.default,s),cx:w,cy:w,r:k,strokeWidth:a,strokeDasharray:$,strokeDashoffset:E,strokeLinecap:"round"}),z]}),h?j.jsx("div",{className:"pf-ring-label-overlay absolute inset-0 flex items-center justify-center",children:h}):n&&j.jsx("span",{className:st("pf-ring-label-overlay absolute",O2[r]??O2.default),children:n})]})}function fV({children:e}){return j.jsx(j.Fragment,{children:e})}function pV({children:e}){return j.jsx(j.Fragment,{children:e})}function mV({children:e}){return j.jsx(j.Fragment,{children:e})}function wT(){return globalThis.__prefab_handlers??{}}function hV(e){var t;return(t=wT().pipes)==null?void 0:t[e]}function gV(e){var t;return(t=wT().actions)==null?void 0:t[e]}const vV={percent(e,t){const n=Number(e);if(isNaN(n))return String(e);const i=t!=null?parseInt(String(t)):0;return`${(n*100).toFixed(i)}%`},number(e,t){const n=Number(e);if(isNaN(n))return String(e);const i=t!=null?parseInt(String(t)):void 0;return n.toLocaleString("en-US",{minimumFractionDigits:i,maximumFractionDigits:i})},compact(e,t){const n=Number(e);if(isNaN(n))return String(e);const i=t!=null?parseInt(String(t)):void 0;return n.toLocaleString("en-US",{notation:"compact",maximumFractionDigits:i})},currency(e,t){const n=Number(e);if(isNaN(n))return String(e);const i=String(t??"USD");return n.toLocaleString("en-US",{style:"currency",currency:i})},date(e,t){const n=new Date(String(e));if(isNaN(n.getTime()))return String(e);const i=String(t??"medium");return i==="short"?n.toLocaleDateString("en-US"):i==="long"?n.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}):n.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})},time(e){const t=new Date(String(e));if(isNaN(t.getTime())){const n=new Date(`1970-01-01T${e}`);return isNaN(n.getTime())?String(e):n.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"})}return t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"})},datetime(e){const t=new Date(String(e));return isNaN(t.getTime())?String(e):t.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})},upper(e){return String(e).toUpperCase()},lower(e){return String(e).toLowerCase()},length(e){return Array.isArray(e)||typeof e=="string"?e.length:0},join(e,t){return Array.isArray(e)?e.join(String(t??", ")):String(e)},truncate(e,t){const n=String(e),i=t!=null?parseInt(String(t)):0;return i>0&&n.length>i?n.slice(0,i)+"...":n},default(e,t){return e??(t===void 0?"":t)},first(e){return Array.isArray(e)?e[0]:e},last(e){return Array.isArray(e)?e[e.length-1]:e},abs(e){const t=Number(e);return isNaN(t)?e:Math.abs(t)},round(e,t){const n=Number(e);if(isNaN(n))return e;const i=t!=null?parseInt(String(t)):0,r=Math.pow(10,i);return Math.round(n*r)/r},selectattr(e,t){if(!Array.isArray(e)||!t)return e;const n=String(t);return e.filter(i=>i!=null&&typeof i=="object"&&!!i[n])},rejectattr(e,t){if(!Array.isArray(e)||!t)return e;const n=String(t);return e.filter(i=>i!=null&&typeof i=="object"&&!i[n])},pluralize(e,t){const n=Number(e),i=String(t??"item");return n===1?i:i+"s"}};function bV(e){const t=[];let n=0;for(;n<e.length;){if(/\s/.test(e[n])){n++;continue}const i=e.slice(n,n+2);if(["==","!=",">=","<=","||","&&"].includes(i)){t.push({type:"op",value:i}),n+=2;continue}const r=e[n];if(r===">"||r==="<"){t.push({type:"op",value:r}),n++;continue}if(r==="+"||r==="-"||r==="*"||r==="/"){t.push({type:"op",value:r}),n++;continue}if(r==="!"){t.push({type:"not",value:"!"}),n++;continue}if(r==="("||r===")"){t.push({type:"paren",value:r}),n++;continue}if(r==="|"){t.push({type:"pipe",value:"|"}),n++;continue}if(r==="?"){t.push({type:"question",value:"?"}),n++;continue}if(r===":"){t.push({type:"colon",value:":"}),n++;continue}if(r==="'"){let a="";for(n++;n<e.length&&e[n]!=="'";)a+=e[n],n++;n++,t.push({type:"string",value:a});continue}if(/\d/.test(r)||r==="."&&n+1<e.length&&/\d/.test(e[n+1])){let a="";for(;n<e.length&&/[\d.]/.test(e[n]);)a+=e[n],n++;t.push({type:"number",value:a});continue}if(/[a-zA-Z_$]/.test(r)){let a="";for(;n<e.length&&/[a-zA-Z0-9_.$]/.test(e[n]);)a+=e[n],n++;a==="true"||a==="false"?t.push({type:"bool",value:a}):a==="null"?t.push({type:"null",value:a}):a==="not"?t.push({type:"not",value:"!"}):a==="and"?t.push({type:"op",value:"&&"}):a==="or"?t.push({type:"op",value:"||"}):t.push({type:"ident",value:a});continue}throw new Error(`Unexpected character: ${r}`)}return t.push({type:"end",value:""}),t}class yV{constructor(t,n){Jt(this,"tokens");Jt(this,"pos",0);Jt(this,"ctx");this.tokens=t,this.ctx=n}peek(){return this.tokens[this.pos]}advance(){return this.tokens[this.pos++]}expect(t,n){const i=this.advance();if(i.type!==t||n!==void 0&&i.value!==n)throw new Error(`Expected ${t}${n?` '${n}'`:""}, got ${i.type} '${i.value}'`);return i}expectEnd(){if(this.peek().type!=="end")throw new Error(`Unexpected token: ${this.peek().value}`)}parseExpr(){return this.parsePipe()}parsePipe(){let t=this.parseTernary();for(;this.peek().type==="pipe";){this.advance();const n=this.peek();if(n.type==="ident"){const i=this.advance().value;let r;if(this.peek().type==="colon"){this.advance();const s=this.advance();s.type==="bool"?r=s.value==="true":s.type==="number"?r=parseFloat(s.value):s.type==="null"?r=null:r=s.value}const a=vV[i]??hV(i);a&&(t=a(t,r))}else if(n.type==="string"||n.type==="number"||n.type==="bool"||n.type==="null"){const i=this.advance();t==null&&(i.type==="number"?t=parseFloat(i.value):i.type==="bool"?t=i.value==="true":i.type==="null"?t=null:t=i.value)}else throw new Error(`Expected pipe name or default value, got ${n.type}`)}return t}parseTernary(){const t=this.parseOr();if(this.peek().type==="question"){this.advance();const n=this.parseExpr();this.expect("colon");const i=this.parseExpr();return t?n:i}return t}parseOr(){let t=this.parseAnd();for(;this.peek().type==="op"&&this.peek().value==="||";){this.advance();const n=this.parseAnd();t=t||n}return t}parseAnd(){let t=this.parseNot();for(;this.peek().type==="op"&&this.peek().value==="&&";){this.advance();const n=this.parseNot();t=t&&n}return t}parseNot(){return this.peek().type==="not"?(this.advance(),!this.parseNot()):this.parseComp()}parseComp(){const t=this.parseAdd(),n=this.peek();if(n.type==="op"&&["==","!=",">",">=","<","<="].includes(n.value)){this.advance();const i=this.parseAdd();switch(n.value){case"==":return t==i;case"!=":return t!=i;case">":return t>i;case">=":return t>=i;case"<":return t<i;case"<=":return t<=i}}return t}parseAdd(){let t=this.parseMul();for(;this.peek().type==="op"&&(this.peek().value==="+"||this.peek().value==="-");){const n=this.advance().value,i=this.parseMul();n==="+"?typeof t=="string"||typeof i=="string"?t=String(t)+String(i):t=Number(t)+Number(i):t=Number(t)-Number(i)}return t}parseMul(){let t=this.parseUnary();for(;this.peek().type==="op"&&(this.peek().value==="*"||this.peek().value==="/");){const n=this.advance().value,i=this.parseUnary();n==="*"?t=Number(t)*Number(i):t=Number(t)/Number(i)}return t}parseUnary(){const t=this.peek();if(t.type==="op"&&(t.value==="-"||t.value==="+")){this.advance();const n=this.parseUnary();return t.value==="-"?-Number(n):+Number(n)}return this.parsePrimary()}parsePrimary(){const t=this.peek();if(t.type==="paren"&&t.value==="("){this.advance();const n=this.parseExpr();return this.expect("paren",")"),n}if(t.type==="number")return this.advance(),parseFloat(t.value);if(t.type==="string")return this.advance(),t.value;if(t.type==="bool")return this.advance(),t.value==="true";if(t.type==="null")return this.advance(),null;if(t.type==="ident")return this.advance(),this.resolve(t.value);throw new Error(`Unexpected token: ${t.type} '${t.value}'`)}resolve(t){const n=t.split(".");let i=this.ctx;for(const r of n){if(i==null)return;if(r==="length"&&(Array.isArray(i)||typeof i=="string"))return i.length;if(typeof i!="object")return;i=i[r]}return i}}function zy(e,t){const n=bV(e),i=new yV(n,t),r=i.parseExpr();return i.expectEnd(),r}function wV(e){const t=e.trim();if(!t.startsWith("{{")||!t.endsWith("}}"))return null;const n=t.slice(2,-2);return n.includes("{{")||n.includes("}}")?null:n.trim()}function jo(e,t){if(!e.includes("{{"))return e;const n=wV(e);if(n!==null)try{const a=zy(n,t);return a===void 0?e:a}catch{return e}let i="",r=0;for(;r<e.length;){const a=e.indexOf("{{",r);if(a===-1){i+=e.slice(r);break}i+=e.slice(r,a);const s=e.indexOf("}}",a+2);if(s===-1){i+=e.slice(a);break}const c=e.slice(a+2,s).trim();try{const f=zy(c,t);f!==void 0&&(i+=String(f))}catch{}r=s+2}return i}function mu(e,t){const n={};for(const[i,r]of Object.entries(e))typeof r=="string"?n[i]=jo(r,t):Array.isArray(r)?n[i]=r.map(a=>typeof a=="object"&&a!==null?mu(a,t):typeof a=="string"?jo(a,t):a):typeof r=="object"&&r!==null?n[i]=mu(r,t):n[i]=r;return n}/**
|
|
1167
|
+
)`}return j.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:a}})}),s8=_.forwardRef(function(t,n){const{render:i,className:r,anchor:a,positionMethod:s="absolute",side:c="bottom",align:f="center",sideOffset:p=0,alignOffset:h=0,collisionBoundary:g="clipping-ancestors",collisionPadding:w=5,arrowPadding:k=5,sticky:$=!1,disableAnchorTracking:R=!1,collisionAvoidance:E=qR,...O}=t,z=td(),{filteredItems:P}=Yf(),N=kw(),B=XU(),Z=at(z,jt.modal),q=at(z,jt.open),K=at(z,jt.mounted),fe=at(z,jt.openMethod),be=at(z,jt.triggerElement),ie=at(z,jt.inputElement),V=at(z,jt.inputInsidePopup),re=at(z,jt.transitionStatus),se=P.length===0,F=Qf({anchor:a??(V?be:ie),floatingRootContext:N,positionMethod:s,mounted:K,side:c,sideOffset:p,align:f,alignOffset:h,arrowPadding:k,collisionBoundary:g,collisionPadding:w,sticky:$,disableAnchorTracking:R,keepMounted:B,collisionAvoidance:E,lazyFlip:!0});Og(q&&Z&&fe!=="touch",be);const X=_.useMemo(()=>{const de={...F.positionerStyles};return q||(de.pointerEvents="none"),{role:"presentation",hidden:!K,style:de}},[q,K,F.positionerStyles]),Q={open:q,side:F.side,align:F.align,anchorHidden:F.anchorHidden,empty:se};dt(()=>{z.set("popupSide",F.side)},[z,F.side]);const ue=_.useMemo(()=>({side:F.side,align:F.align,arrowRef:F.arrowRef,arrowUncentered:F.arrowUncentered,arrowStyles:F.arrowStyles,anchorHidden:F.anchorHidden,isPositioned:F.isPositioned}),[F.side,F.align,F.arrowRef,F.arrowUncentered,F.arrowStyles,F.anchorHidden,F.isPositioned]),he=it(de=>{z.set("positionerElement",de)}),Y=Xt("div",t,{state:Q,ref:[n,he],props:[X,Ua(re),O],stateAttributesMapping:Bo});return j.jsxs($E.Provider,{value:ue,children:[K&&Z&&j.jsx(Ag,{inert:Wf(!q),cutout:ie??be}),Y]})}),u8={...Bo,...Ho},c8=_.forwardRef(function(t,n){const{render:i,className:r,initialFocus:a,finalFocus:s,...c}=t,f=td(),p=CE(),h=kw(),{filteredItems:g}=Yf(),w=at(f,jt.mounted),k=at(f,jt.open),$=at(f,jt.openMethod),R=at(f,jt.transitionStatus),E=at(f,jt.inputInsidePopup),O=at(f,jt.inputElement),z=g.length===0;Pi({open:k,ref:f.state.popupRef,onComplete(){k&&f.state.onOpenChangeComplete(!0)}});const P={open:k,side:p.side,align:p.align,anchorHidden:p.anchorHidden,transitionStatus:R,empty:z},N=Xt("div",t,{state:P,ref:[n,f.state.popupRef],props:[{role:E?"dialog":"presentation",tabIndex:-1,onFocus(K){var be;const fe=ri(K.nativeEvent);$!=="touch"&&(rn(f.state.listElement,fe)||fe===K.currentTarget)&&((be=f.state.inputRef.current)==null||be.focus())}},Ua(R),c],stateAttributesMapping:u8}),Z=a===void 0?E?K=>K==="touch"?f.state.popupRef.current:O:!1:a;let q;return s!=null?q=s:q=E?void 0:!1,j.jsx(kg,{context:h,disabled:!w,modal:!E,openInteractionType:$,initialFocus:Z,returnFocus:q,children:N})});let Cw=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function rd(e={}){const{label:t,metadata:n,textRef:i,indexGuessBehavior:r,index:a}=e,{register:s,unregister:c,subscribeMapChange:f,elementsRef:p,labelsRef:h,nextIndexRef:g}=GU(),w=_.useRef(-1),[k,$]=_.useState(a??(r===Cw.GuessFromOrder?()=>{if(w.current===-1){const O=g.current;g.current+=1,w.current=O}return w.current}:-1)),R=_.useRef(null),E=_.useCallback(O=>{var z;if(R.current=O,k!==-1&&O!==null&&(p.current[k]=O,h)){const P=t!==void 0;h.current[k]=P?t:((z=i==null?void 0:i.current)==null?void 0:z.textContent)??O.textContent}},[k,p,h,t,i]);return dt(()=>{if(a!=null)return;const O=R.current;if(O)return s(O,n),()=>{c(O)}},[a,s,c,n]),dt(()=>{if(a==null)return f(O=>{var P;const z=R.current?(P=O.get(R.current))==null?void 0:P.index:null;z!=null&&$(z)})},[a,f,$]),_.useMemo(()=>({ref:E,index:k}),[k,E])}const d8=_.createContext(void 0),f8=_.createContext(!1);function p8(){return _.useContext(f8)}const m8=_.memo(_.forwardRef(function(t,n){const{render:i,className:r,value:a=null,index:s,disabled:c=!1,nativeButton:f=!1,...p}=t,h=_.useRef(!1),g=_.useRef(null),w=rd({index:s,textRef:g,indexGuessBehavior:Cw.GuessFromOrder}),k=td(),$=p8(),{flatFilteredItems:R,hasItems:E}=Yf(),O=at(k,jt.open),z=at(k,jt.selectionMode),P=at(k,jt.readOnly),N=at(k,jt.virtualized),B=at(k,jt.isItemEqualToValue),Z=z!=="none",q=s??(N?vs(R,a,B):w.index),K=w.index!==-1,fe=at(k,jt.id),be=at(k,jt.isActive,q),ie=at(k,jt.isSelected,a),V=at(k,jt.getItemProps),re=_.useRef(null),se=fe!=null&&K?`${fe}-${q}`:void 0,ae=ie&&Z;dt(()=>{if(!(K&&(N||s!=null)))return;const ze=k.state.listRef.current;return ze[q]=re.current,()=>{delete ze[q]}},[K,N,q,s,k]),dt(()=>{if(!K||E)return;const ce=k.state.valuesRef.current;return ce[q]=a,z!=="none"&&k.state.allValuesRef.current.push(a),()=>{delete ce[q]}},[K,E,q,a,k,z]),dt(()=>{if(!O){h.current=!1;return}if(!K||E)return;const ce=k.state.selectedValue,ze=Array.isArray(ce)?ce[ce.length-1]:ce;Pa(a,ze,B)&&k.set("selectedIndex",q)},[K,E,O,k,q,a,B]);const F={disabled:c,selected:ae,highlighted:be},X=V({active:be,selected:ae});X.id=void 0,X.onFocus=void 0;const{getButtonProps:Q,buttonRef:ue}=qo({disabled:c,focusableWhenDisabled:!0,native:f});function he(ce){function ze(){k.state.handleSelection(ce,a)}k.state.submitOnItemClick?(Mi.flushSync(ze),k.state.requestSubmit()):ze()}const Y={id:se,role:$?"gridcell":"option","aria-selected":Z?ae:void 0,tabIndex:void 0,onPointerDownCapture(ce){h.current=!0,ce.preventDefault()},onClick(ce){c||P||he(ce.nativeEvent)},onMouseUp(ce){const ze=h.current;h.current=!1,!(c||P||ce.button!==0||ze||!be)&&he(ce.nativeEvent)}},de=Xt("div",t,{ref:[ue,n,w.ref,re],state:F,props:[X,Y,p,Q]}),ge=_.useMemo(()=>({selected:ae,textRef:g}),[ae,g]);return j.jsx(d8.Provider,{value:ge,children:de})})),Ry=_.forwardRef(function(t,n){const{className:i,render:r,orientation:a="horizontal",...s}=t;return Xt("div",t,{state:{orientation:a},ref:n,props:[{role:"separator","aria-orientation":a},s]})}),h8=_.createContext(void 0);function id(){return _.useContext(h8)}function g2({item:e}){return j.jsx(m8,{value:e.value,disabled:e.disabled,className:st("pf-combobox-item relative flex cursor-pointer select-none items-center",e.disabled&&"pointer-events-none opacity-50"),children:e.label})}function v2(e,t){return t?e.toLowerCase().includes(t.toLowerCase()):!0}function g8({placeholder:e="Select...",searchPlaceholder:t="Search...",disabled:n,value:i,side:r="bottom",align:a="start",invalid:s=!1,onValueChange:c,className:f,_items:p=[],_groups:h=[],_separatorIndices:g=[]}){var be;const w=id(),k=h.length>0,[$,R]=_.useState(!1),[E,O]=_.useState(""),z=new Set(["outside-press","focus-out"]),P=(ie,V)=>{!ie&&z.has(V.reason)||(R(ie),ie||O(""))},B=(be=_.useMemo(()=>k?h.flatMap(ie=>ie.items):p,[p,h,k]).find(ie=>ie.value===i))==null?void 0:be.label,Z=_.useMemo(()=>p.filter(ie=>v2(ie.label,E)),[p,E]),q=_.useMemo(()=>h.map(ie=>({...ie,items:ie.items.filter(V=>v2(V.label,E))})).filter(ie=>ie.items.length>0),[h,E]),K=k?q.length>0:Z.length>0,fe=_.useMemo(()=>new Set(g),[g]);return j.jsxs(NU,{open:$,onOpenChange:P,value:i??null,onValueChange:ie=>{c==null||c(ie??"")},onInputValueChange:ie=>{O(ie)},disabled:n,children:[j.jsxs(qU,{"aria-invalid":s||void 0,disabled:n,className:st("pf-button pf-button-variant-outline pf-button-size-default pf-combobox-trigger w-full justify-between font-normal",!i&&"text-muted-foreground",s&&"border-destructive focus-visible:border-destructive focus-visible:ring-destructive/20",f),children:[B??e,j.jsx(rR,{className:"pf-combobox-trigger-icon"})]}),j.jsxs(WU,{container:w,children:[$&&j.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>R(!1)}),j.jsx(s8,{side:r,sideOffset:4,align:a,className:"isolate z-50",children:j.jsxs(c8,{className:"pf-combobox-content group/combobox-content min-w-(--anchor-width) p-0",children:[j.jsx(ZU,{placeholder:t,className:"pf-input h-8 m-1 mb-0 w-[calc(100%-0.5rem)] border border-border bg-transparent shadow-none focus-visible:ring-0 focus-visible:ring-offset-0"}),j.jsxs("div",{className:"pf-combobox-list",children:[k?q.map((ie,V)=>j.jsxs(_.Fragment,{children:[V>0&&j.jsx(Ry,{className:"pf-combobox-separator"}),j.jsxs("div",{children:[ie.label&&j.jsx("div",{className:"pf-combobox-label",children:ie.label}),ie.items.map(re=>j.jsx(g2,{item:re},re.value))]})]},V)):Z.map(ie=>{const V=p.indexOf(ie);return j.jsxs(_.Fragment,{children:[fe.has(V)&&j.jsx(Ry,{className:"pf-combobox-separator"}),j.jsx(g2,{item:ie})]},ie.value)}),!K&&j.jsx("div",{className:"w-full py-2 text-center text-sm text-muted-foreground",children:"No results found."})]})]})})]})]})}function v8({invalid:e,disabled:t,className:n,children:i}){return j.jsx("div",{"data-slot":"field","data-invalid":e||void 0,"data-disabled":t||void 0,className:st("pf-field group/field flex flex-col gap-1.5",n),children:i})}function b8({invalid:e,disabled:t,className:n,children:i}){return j.jsx("label",{className:"pf-field-label",children:j.jsx("div",{"data-slot":"field","data-invalid":e||void 0,"data-disabled":t||void 0,className:st("pf-field group/field flex items-center justify-between gap-2",n),children:i})})}function y8({className:e,children:t}){return j.jsx("span",{className:st("pf-field-title",e),children:t})}function w8({className:e,children:t}){return j.jsx("span",{className:st("pf-field-description",e),children:t})}function x8({className:e,children:t}){return j.jsx("div",{className:st("pf-field-content grid",e),children:t})}function k8({className:e,children:t}){return j.jsx("p",{className:st("pf-field-error",e),children:t})}const S8={sm:"size-3.5",default:"size-4",lg:"size-6"};function _8({name:e,size:t="default",className:n}){const i=pg(e);return i?j.jsx(i,{className:st(S8[t],n)}):null}function AE({className:e,type:t,...n}){return j.jsx("input",{type:t,"data-slot":"input",className:st("pf-input file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",e),...n})}function $8({className:e,...t}){return j.jsx("textarea",{"data-slot":"textarea",className:st("pf-textarea placeholder:text-muted-foreground flex field-sizing-content min-h-16 w-full outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...t})}function C8({className:e,orientation:t="horizontal",...n}){return j.jsx(Ry,{"data-slot":"separator",orientation:t,className:st("pf-separator",t==="horizontal"?"pf-separator-horizontal":"pf-separator-vertical",e),...n})}const ep={sm:"size-4",default:"size-6",lg:"size-8"};function R8({size:e="default",className:t}){const n=e==="sm"?2:e==="lg"?4:3,i=24,r=i/2,a=r-(e==="sm"?4:e==="lg"?6:5);return j.jsx("svg",{viewBox:`0 0 24 ${i}`,className:st("text-muted-foreground",ep[e],t),role:"status","aria-label":"Loading",children:[4,12,20].map((s,c)=>j.jsx("circle",{cx:s,cy:r,r:n,fill:"currentColor",children:j.jsx("animate",{attributeName:"cy",values:`${r};${a};${r};${r}`,keyTimes:"0;0.15;0.3;1",dur:"2s",begin:`${c*.1}s`,repeatCount:"indefinite",calcMode:"spline",keySplines:"0.33 0 0.67 1; 0.33 0 0.67 1; 0 0 1 1"})},s))})}function E8({size:e="default",className:t}){const n=e==="sm"?3:e==="lg"?6:4;return j.jsxs("svg",{viewBox:"0 0 24 24",className:st("text-muted-foreground",ep[e],t),role:"status","aria-label":"Loading",children:[j.jsxs("circle",{cx:"12",cy:"12",r:n,fill:"currentColor",opacity:"0.3",children:[j.jsx("animate",{attributeName:"r",values:`${n};${n+4};${n}`,dur:"1.2s",repeatCount:"indefinite",calcMode:"spline",keySplines:"0.33 0 0.67 1; 0.33 0 0.67 1"}),j.jsx("animate",{attributeName:"opacity",values:"0.3;0.08;0.3",dur:"1.2s",repeatCount:"indefinite",calcMode:"spline",keySplines:"0.33 0 0.67 1; 0.33 0 0.67 1"})]}),j.jsx("circle",{cx:"12",cy:"12",r:n,fill:"currentColor"})]})}function T8({size:e="default",className:t}){const n=e==="sm"?2.5:e==="lg"?4:3,i=e==="sm"?2:e==="lg"?3.5:2.5,a=(24-(n*3+i*2))/2,s=4,c=16;return j.jsx("svg",{viewBox:"0 0 24 24",className:st("text-muted-foreground",ep[e],t),role:"status","aria-label":"Loading",children:[0,1,2].map(f=>{const p=a+f*(n+i);return j.jsxs("rect",{x:p,width:n,rx:n/2,fill:"currentColor",children:[j.jsx("animate",{attributeName:"height",values:`${s};${c};${s}`,dur:"1s",begin:`${f*.15}s`,repeatCount:"indefinite",calcMode:"spline",keySplines:"0.33 0 0.67 1; 0.33 0 0.67 1"}),j.jsx("animate",{attributeName:"y",values:`${(24-s)/2};${(24-c)/2};${(24-s)/2}`,dur:"1s",begin:`${f*.15}s`,repeatCount:"indefinite",calcMode:"spline",keySplines:"0.33 0 0.67 1; 0.33 0 0.67 1"})]},f)})})}function I8({size:e="default",className:t}){const a=e==="sm"?1.5:e==="lg"?2.5:2,s=Array.from({length:8},(c,f)=>{const p=(f*360/8-90)*(Math.PI/180);return{x1:12+Math.cos(p)*5,y1:12+Math.sin(p)*5,x2:12+Math.cos(p)*10,y2:12+Math.sin(p)*10,opacity:1-f/8*.75}});return j.jsx("svg",{viewBox:"0 0 24 24",className:st("text-muted-foreground",ep[e],t),style:{animation:"spin 0.8s steps(8, end) infinite"},role:"status","aria-label":"Loading",children:s.map((c,f)=>j.jsx("line",{x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,stroke:"currentColor",strokeWidth:a,strokeLinecap:"round",opacity:c.opacity},f))})}function z8({variant:e="spin",size:t="default",className:n}){return e==="dots"?j.jsx(R8,{size:t,className:n}):e==="pulse"?j.jsx(E8,{size:t,className:n}):e==="bars"?j.jsx(T8,{size:t,className:n}):e==="ios"?j.jsx(I8,{size:t,className:n}):j.jsx(oR,{className:st("animate-spin text-muted-foreground",ep[t],n),role:"status","aria-label":"Loading"})}function ao(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function NE(e,t,n=(i,r)=>i===r){return e.length===t.length&&e.every((i,r)=>n(i,t[r]))}function ME(e,t){return e-t}function O8(e,t,n){const i=e.slice();return i[t]=n,i.sort(ME)}function DE(e,t,n,i,r,a){let s=e;return s=ao(s,n,i),r&&(s=O8(a,t,ao(s,a[t-1]||-1/0,a[t+1]||1/0))),s}function PE(e,t,n){if(!Array.isArray(e))return!0;const i=e.reduce((r,a,s,c)=>(s===c.length-1||r.push(Math.abs(a-c[s+1])),r),[]);return Math.min(...i)>=t*n}const tp={activeThumbIndex:()=>null,max:()=>null,min:()=>null,minStepsBetweenValues:()=>null,step:()=>null,values:()=>null,...Is},jE=_.createContext(void 0);function Ng(){const e=_.useContext(jE);if(e===void 0)throw new Error(En(62));return e}function A8(e){return"key"in e?Fj:fu}function N8(e,t){return typeof e=="number"&&typeof t=="number"?e===t:Array.isArray(e)&&Array.isArray(t)?NE(e,t):!1}const M8=_.forwardRef(function(t,n){const{"aria-labelledby":i,className:r,defaultValue:a,disabled:s=!1,id:c,format:f,largeStep:p=10,locale:h,render:g,max:w=100,min:k=0,minStepsBetweenValues:$=0,name:R,onValueChange:E,onValueCommitted:O,orientation:z="horizontal",step:P=1,thumbCollisionBehavior:N="push",thumbAlignment:B="center",value:Z,...q}=t,K=Fr(c),fe=it(E),be=it(O),{clearErrors:ie}=Eu(),{state:V,disabled:re,name:se,setTouched:ae,setDirty:F,validityData:X,shouldValidateOnChange:Q,validation:ue}=xo(),{labelId:he}=Sl(),Y=i??he,de=re||s,ge=se??R,[ce,ze]=Vo({controlled:Z,default:a??k,name:"Slider"}),$e=_.useRef(null),De=_.useRef(null),et=_.useRef([]),qe=_.useRef(null),ft=_.useRef(null),ht=_.useRef(-1),ke=_.useRef(null),Ae=_.useRef(null),Fe=_.useRef("none"),Me=jr(f),[xe,ye]=_.useState(-1),[_e,Te]=_.useState(-1),[Ne,Le]=_.useState(!1),[Ye,Je]=_.useState(()=>new Map),[Ze,C]=_.useState([void 0,void 0]),en=it(Rt=>{ye(Rt),Rt!==-1&&Te(Rt)});nd({id:K,commit:ue.commit,value:ce,controlRef:De,name:ge,getValue:()=>ce}),ml(ce,()=>{ie(ge),Q()?ue.commit(ce):ue.commit(ce,!0);const Rt=X.initialValue;let Vt;Array.isArray(ce)&&Array.isArray(Rt)?Vt=!NE(ce,Rt):Vt=ce!==Rt,F(Vt)});const It=it(Rt=>{Rt&&(De.current=Rt)}),mt=Array.isArray(ce),$t=_.useMemo(()=>mt?ce.slice().sort(ME):[ao(ce,k,w)],[w,k,mt,ce]),Nt=it((Rt,Vt)=>{if(Number.isNaN(Rt)||N8(Rt,ce))return;const dn=Vt??Et(Er,void 0,void 0,{activeThumbIndex:-1});Fe.current=dn.reason;const kn=dn.event,pt=kn.constructor??Event,vn=new pt(kn.type,kn);Object.defineProperty(vn,"target",{writable:!0,value:{value:Rt,name:ge}}),dn.event=vn,Ae.current=Rt,fe(Rt,dn),!dn.isCanceled&&ze(Rt)}),Wt=it((Rt,Vt,dn)=>{const kn=DE(Rt,Vt,k,w,mt,$t);if(PE(kn,P,$)){const pt=A8(dn);Nt(kn,Et(pt,dn.nativeEvent,void 0,{activeThumbIndex:Vt})),ae(!0);const vn=Ae.current??kn;be(vn,cu(pt,dn.nativeEvent))}});dt(()=>{var Vt;const Rt=no(Pn($e.current));de&&Rt&&((Vt=$e.current)!=null&&Vt.contains(Rt))&&Rt.blur()},[de]),de&&xe!==-1&&en(-1);const qt=_.useMemo(()=>({...V,activeThumbIndex:xe,disabled:de,dragging:Ne,orientation:z,max:w,min:k,minStepsBetweenValues:$,step:P,values:$t}),[V,xe,de,Ne,w,k,$,z,P,$t]),Tn=_.useMemo(()=>({active:xe,controlRef:De,disabled:de,dragging:Ne,validation:ue,formatOptionsRef:Me,handleInputChange:Wt,indicatorPosition:Ze,inset:B!=="center",labelId:Y,largeStep:p,lastUsedThumbIndex:_e,lastChangedValueRef:Ae,lastChangeReasonRef:Fe,locale:h,max:w,min:k,minStepsBetweenValues:$,name:ge,onValueCommitted:be,orientation:z,pressedInputRef:qe,pressedThumbCenterOffsetRef:ft,pressedThumbIndexRef:ht,pressedValuesRef:ke,registerFieldControlRef:It,renderBeforeHydration:B==="edge",setActive:en,setDragging:Le,setIndicatorPosition:C,setValue:Nt,state:qt,step:P,thumbCollisionBehavior:N,thumbMap:Ye,thumbRefs:et,values:$t}),[xe,De,Y,de,Ne,ue,Me,Wt,Ze,p,_e,Ae,Fe,h,w,k,$,ge,be,z,qe,ft,ht,ke,It,en,Le,C,Nt,qt,P,N,B,Ye,et,$t]),bn=Xt("div",t,{state:qt,ref:[n,$e],props:[{"aria-labelledby":Y,id:K,role:"group"},ue.getValidationProps,q],stateAttributesMapping:tp});return j.jsx(jE.Provider,{value:Tn,children:j.jsx(Xf,{elementsRef:et,onMapChange:Je,children:bn})})}),b2=new Map;function D8(e,t){const n=JSON.stringify({locale:e,options:t}),i=b2.get(n);if(i)return i;const r=new Intl.NumberFormat(e,t);return b2.set(n,r),r}function Ec(e,t,n){return e==null?"":D8(t,n).format(e)}function P8(e,t,n){return e==null?"":n?Ec(e,t,n):Ec(e/100,t,{style:"percent"})}function UE(e){const t=e.getBoundingClientRect();return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function j8(e){if(Math.abs(e)<1){const n=e.toExponential().split("e-"),i=n[0].split(".")[1];return(i?i.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function LE(e,t,n){const i=Math.round((e-n)/t)*t+n;return Number(i.toFixed(j8(t)))}function y2({values:e,index:t,nextValue:n,min:i,max:r,step:a,minStepsBetweenValues:s,initialValues:c}){if(e.length===0)return[];const f=e.slice(),p=a*s,h=f.length-1,g=c??e,w=i+t*p,k=r-(h-t)*p;f[t]=ao(n,w,k);for(let $=t+1;$<=h;$+=1){const R=f[$-1]+p,E=r-(h-$)*p,O=g[$]??f[$];let z=Math.max(f[$],R);O<z&&(z=Math.max(O,R)),f[$]=ao(z,R,E)}for(let $=t-1;$>=0;$-=1){const R=f[$+1]-p,E=i+$*p,O=g[$]??f[$];let z=Math.min(f[$],R);O>z&&(z=Math.min(O,R)),f[$]=ao(z,E,R)}for(let $=0;$<=h;$+=1)f[$]=Number(f[$].toFixed(12));return f}function U8({behavior:e,values:t,currentValues:n,initialValues:i,pressedIndex:r,nextValue:a,min:s,max:c,step:f,minStepsBetweenValues:p}){const h=n??t,g=i??t;if(!(h.length>1))return{value:a,thumbIndex:0,didSwap:!1};const k=f*p;switch(e){case"swap":{const $=h[r],R=1e-7,E=h.slice(),O=E[r-1],z=E[r+1],P=O!=null?O+k:s,N=z!=null?z-k:c,B=ao(a,P,N),Z=Number(B.toFixed(12));E[r]=Z;const q=a>$,K=a<$,fe=q&&z!=null&&a>=z-R,be=K&&O!=null&&a<=O+R;if(!fe&&!be)return{value:E,thumbIndex:r,didSwap:!1};const ie=fe?r+1:r-1,V=E.map((F,X)=>{if(X===r)return Z;const Q=g[X];return Q??h[X]});let re=a;fe?re=Math.max(a,E[ie]):re=Math.min(a,E[ie]);const se=y2({values:E,index:ie,nextValue:re,min:s,max:c,step:f,minStepsBetweenValues:p,initialValues:V}),ae=fe?ie-1:ie+1;if(ae>=0&&ae<se.length){const F=se[ae-1],X=se[ae+1];let Q=F!=null?F+k:s;Q=Math.max(Q,s+ae*k);let ue=X!=null?X-k:c;ue=Math.min(ue,c-(se.length-1-ae)*k);const he=ao(Z,Q,ue);se[ae]=Number(he.toFixed(12))}return{value:se,thumbIndex:ie,didSwap:!0}}case"push":return{value:y2({values:h,index:r,nextValue:a,min:s,max:c,step:f,minStepsBetweenValues:p}),thumbIndex:r,didSwap:!1};case"none":default:{const $=h.slice(),R=$[r-1],E=$[r+1],O=R!=null?R+k:s,z=E!=null?E-k:c,P=ao(a,O,z);return $[r]=Number(P.toFixed(12)),{value:$,thumbIndex:r,didSwap:!1}}}}const L8=2;function V8(e,t){if(!e)return{start:0,end:0};function n(a){const s=a!=null?parseFloat(a):0;return Number.isNaN(s)?0:s}const i=t?"Top":"InlineStart",r=t?"Bottom":"InlineEnd";return{start:n(e[`border${i}Width`])+n(e[`padding${i}`]),end:n(e[`border${r}Width`])+n(e[`padding${r}`])}}function fh(e,t){if(t.current!=null&&e.changedTouches){const n=e;for(let i=0;i<n.changedTouches.length;i+=1){const r=n.changedTouches[i];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return null}return{x:e.clientX,y:e.clientY}}const F8=_.forwardRef(function(t,n){const{render:i,className:r,...a}=t,{disabled:s,dragging:c,validation:f,inset:p,lastChangedValueRef:h,lastChangeReasonRef:g,max:w,min:k,minStepsBetweenValues:$,onValueCommitted:R,orientation:E,pressedInputRef:O,pressedThumbCenterOffsetRef:z,pressedThumbIndexRef:P,pressedValuesRef:N,registerFieldControlRef:B,renderBeforeHydration:Z,setActive:q,setDragging:K,setValue:fe,state:be,step:ie,thumbCollisionBehavior:V,thumbRefs:re,values:se}=Ng(),ae=Iu(),F=se.length>1,X=E==="vertical",Q=_.useRef(null),ue=_.useRef(null),he=it(Me=>{Me&&ue.current==null&&ue.current==null&&(ue.current=getComputedStyle(Me))}),Y=_.useRef(null),de=_.useRef(0),ge=_.useRef(0),ce=jr(se),ze=it(Me=>{P.current!==Me&&(P.current=Me);const xe=re.current[Me];if(!xe){z.current=null,O.current=null;return}O.current=xe.querySelector('input[type="range"]')}),$e=it(Me=>{const xe=Q.current;if(!xe)return null;const{width:ye,height:_e,bottom:Te,left:Ne,right:Le}=xe.getBoundingClientRect(),Ye=V8(ue.current,X),Je=ge.current,Ze=(X?_e:ye)-Ye.start-Ye.end-Je*2,C=z.current??0,en=Me.x-C,It=Me.y-C,mt=X?Te-It-Ye.end:(ae==="rtl"?Le-en:en-Ne)-Ye.start,$t=ao((mt-Je)/Ze,0,1);let Nt=(w-k)*$t+k;if(Nt=LE(Nt,ie,k),Nt=ao(Nt,k,w),!F)return{value:Nt,thumbIndex:0,didSwap:!1};const Wt=P.current;if(Wt<0)return null;const qt=U8({behavior:V,values:se,currentValues:ce.current??se,initialValues:N.current,pressedIndex:Wt,nextValue:Nt,min:k,max:w,step:ie,minStepsBetweenValues:$});return V==="swap"&&qt.didSwap?ze(qt.thumbIndex):P.current=qt.thumbIndex,qt}),De=it(Me=>{N.current=F?se.slice():null,ce.current=se;const xe=P.current;let ye=xe;if(xe>-1&&xe<se.length){if(se[xe]===w){let _e=xe;for(;_e>0&&se[_e-1]===w;)_e-=1;ye=_e}}else{const _e=X?"y":"x";let Te;ye=-1;for(let Ne=0;Ne<re.current.length;Ne+=1){const Le=re.current[Ne];if(qn(Le)){const Ye=UE(Le),Je=Math.abs(Me[_e]-Ye[_e]);(Te===void 0||Je<=Te)&&(ye=Ne,Te=Je)}}}if(ye>-1&&ye!==xe&&ze(ye),p){const _e=re.current[ye];if(qn(_e)){const Te=_e.getBoundingClientRect(),Ne=X?"height":"width";ge.current=Te[Ne]/2}}}),et=it(Me=>{var xe,ye,_e;(_e=(ye=(xe=re.current)==null?void 0:xe[Me])==null?void 0:ye.querySelector('input[type="range"]'))==null||_e.focus({preventScroll:!0})}),qe=it(Me=>{const xe=fh(Me,Y);if(xe==null)return;if(de.current+=1,Me.type==="pointermove"&&Me.buttons===0){ft(Me);return}const ye=$e(xe);ye!=null&&PE(ye.value,ie,$)&&(!c&&de.current>L8&&K(!0),fe(ye.value,Et(Zj,Me,void 0,{activeThumbIndex:ye.thumbIndex})),ce.current=Array.isArray(ye.value)?ye.value:[ye.value],ye.didSwap&&et(ye.thumbIndex))});function ft(Me){var _e,Te;q(-1),K(!1),O.current=null,z.current=null;const xe=fh(Me,Y),ye=xe!=null?$e(xe):null;if(ye!=null){const Ne=g.current;f.commit(h.current??ye.value),R(h.current??ye.value,cu(Ne,Me))}"pointerType"in Me&&((_e=Q.current)!=null&&_e.hasPointerCapture(Me.pointerId))&&((Te=Q.current)==null||Te.releasePointerCapture(Me.pointerId)),P.current=-1,Y.current=null,N.current=null,ke()}const ht=it(Me=>{if(s)return;const xe=Me.changedTouches[0];xe!=null&&(Y.current=xe.identifier);const ye=fh(Me,Y);if(ye!=null){De(ye);const Te=$e(ye);if(Te==null)return;et(Te.thumbIndex),fe(Te.value,Et(q$,Me,void 0,{activeThumbIndex:Te.thumbIndex})),ce.current=Array.isArray(Te.value)?Te.value:[Te.value],Te.didSwap&&et(Te.thumbIndex)}de.current=0;const _e=Pn(Q.current);_e.addEventListener("touchmove",qe,{passive:!0}),_e.addEventListener("touchend",ft,{passive:!0})}),ke=it(()=>{const Me=Pn(Q.current);Me.removeEventListener("pointermove",qe),Me.removeEventListener("pointerup",ft),Me.removeEventListener("touchmove",qe),Me.removeEventListener("touchend",ft),N.current=null}),Ae=Yc();return _.useEffect(()=>{const Me=Q.current;return Me?(Me.addEventListener("touchstart",ht,{passive:!0}),()=>{Me.removeEventListener("touchstart",ht),Ae.cancel(),ke()}):()=>ke()},[ke,ht,Q,Ae]),_.useEffect(()=>{s&&ke()},[s,ke]),Xt("div",t,{state:be,ref:[n,B,Q,he],props:[{"data-base-ui-slider-control":Z?"":void 0,onPointerDown(Me){const xe=Q.current;if(!xe||s||Me.defaultPrevented||!qn(Me.target)||Me.button!==0)return;const ye=fh(Me,Y);if(ye!=null){De(ye);const Te=$e(ye);if(Te==null)return;rn(re.current[Te.thumbIndex],no(Pn(xe)))?Me.preventDefault():Ae.request(()=>{et(Te.thumbIndex)}),K(!0),z.current!=null||(fe(Te.value,Et(q$,Me.nativeEvent,void 0,{activeThumbIndex:Te.thumbIndex})),ce.current=Array.isArray(Te.value)?Te.value:[Te.value],Te.didSwap&&et(Te.thumbIndex))}Me.nativeEvent.pointerId&&xe.setPointerCapture(Me.nativeEvent.pointerId),de.current=0;const _e=Pn(Q.current);_e.addEventListener("pointermove",qe,{passive:!0}),_e.addEventListener("pointerup",ft,{once:!0})},tabIndex:-1},a],stateAttributesMapping:tp})}),Z8=_.forwardRef(function(t,n){const{render:i,className:r,...a}=t,{state:s}=Ng();return Xt("div",t,{state:s,ref:n,props:[{style:{position:"relative"}},a],stateAttributesMapping:tp})});function Jh(e,t,n){return(e-t)*100/(n-t)}const Na="ArrowUp",ua="ArrowDown",yl="ArrowLeft",Ma="ArrowRight",zs="Home",Os="End",VE=new Set([yl,Ma]),H8=new Set([yl,Ma,zs,Os]),FE=new Set([Na,ua]),B8=new Set([Na,ua,zs,Os]),ZE=new Set([...VE,...FE]),q8=new Set([...ZE,zs,Os]),Mg=new Set([Na,ua,yl,Ma,zs,Os]),HE="Shift",G8="Control",K8="Alt",Y8="Meta",J8=new Set([HE,G8,K8,Y8]);function X8(e){return _r(e)&&e.tagName==="INPUT"}function w2(e){return!!(X8(e)&&e.selectionStart!=null||_r(e)&&e.tagName==="TEXTAREA")}function x2(e,t,n,i){if(!e||!t||!t.scrollTo)return;let r=e.scrollLeft,a=e.scrollTop;const s=e.clientWidth<e.scrollWidth,c=e.clientHeight<e.scrollHeight;if(s&&i!=="vertical"){const f=k2(e,t,"left"),p=ph(e),h=ph(t);n==="ltr"&&(f+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-p.scrollPaddingRight?r=f+t.offsetWidth+h.scrollMarginRight-e.clientWidth+p.scrollPaddingRight:f-h.scrollMarginLeft<e.scrollLeft+p.scrollPaddingLeft&&(r=f-h.scrollMarginLeft-p.scrollPaddingLeft)),n==="rtl"&&(f-h.scrollMarginRight<e.scrollLeft+p.scrollPaddingLeft?r=f-h.scrollMarginLeft-p.scrollPaddingLeft:f+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-p.scrollPaddingRight&&(r=f+t.offsetWidth+h.scrollMarginRight-e.clientWidth+p.scrollPaddingRight))}if(c&&i!=="horizontal"){const f=k2(e,t,"top"),p=ph(e),h=ph(t);f-h.scrollMarginTop<e.scrollTop+p.scrollPaddingTop?a=f-h.scrollMarginTop-p.scrollPaddingTop:f+t.offsetHeight+h.scrollMarginBottom>e.scrollTop+e.clientHeight-p.scrollPaddingBottom&&(a=f+t.offsetHeight+h.scrollMarginBottom-e.clientHeight+p.scrollPaddingBottom)}e.scrollTo({left:r,top:a,behavior:"auto"})}function k2(e,t,n){const i=n==="left"?"offsetLeft":"offsetTop";let r=0;for(;t.offsetParent&&(r+=t[i],t.offsetParent!==e);)t=t.offsetParent;return r}function ph(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}const W8=_.createContext(void 0),Q8={disableStyleElements:!1};function BE(){return _.useContext(W8)??Q8}let e7=(function(e){return e.index="data-index",e.dragging="data-dragging",e.orientation="data-orientation",e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.focused="data-focused",e})({});const t7='!function(){const t=document.currentScript?.parentElement;if(!t)return;const e=t.closest("[data-base-ui-slider-control]");if(!e)return;const r=e.querySelector("[data-base-ui-slider-indicator]"),i=e.getBoundingClientRect(),n="vertical"===e.getAttribute("data-orientation")?"height":"width",o=e.querySelectorAll(\'input[type="range"]\'),l=o.length>1,s=o.length-1;let a=null,u=null;for(let t=0;t<o.length;t+=1){const e=o[t],y=parseFloat(e.getAttribute("value")??"");if(Number.isNaN(y))return;const c=e.parentElement;if(!c)return;const p=parseFloat(e.getAttribute("max")??"100"),g=parseFloat(e.getAttribute("min")??"0"),b=c?.getBoundingClientRect(),d=i[n]-b[n],m=100*(y-g)/(p-g),v=(b[n]/2+d*m/100)/i[n]*100;c.style.setProperty("--position",`${v}%`),Number.isFinite(v)&&(c.style.removeProperty("visibility"),r&&(0===t?(a=v,r.style.setProperty("--start-position",`${v}%`),l||r.style.removeProperty("visibility")):t===s&&(u=v-(a??0),r.style.setProperty("--end-position",`${v}%`),r.style.setProperty("--relative-size",`${u}%`),r.style.removeProperty("visibility"))))}}();',qE="PageUp",GE="PageDown",n7=new Set([Na,ua,yl,Ma,zs,Os,qE,GE]);function r7(e,t,n,i){if(!(t<0))return e.length===2?t===0?`${Ec(e[t],i,n)} start range`:`${Ec(e[t],i,n)} end range`:n?Ec(e[t],i,n):void 0}function gc(e,t,n,i,r){return n===1?Math.min(e+t,r):Math.max(e-t,i)}const i7=_.forwardRef(function(t,n){const{render:i,children:r,className:a,"aria-describedby":s,"aria-label":c,"aria-labelledby":f,disabled:p=!1,getAriaLabel:h,getAriaValueText:g,id:w,index:k,inputRef:$,onBlur:R,onFocus:E,onKeyDown:O,tabIndex:z,...P}=t,{nonce:N}=BE(),B=Fr(w),{active:Z,lastUsedThumbIndex:q,controlRef:K,disabled:fe,validation:be,formatOptionsRef:ie,handleInputChange:V,inset:re,labelId:se,largeStep:ae,locale:F,max:X,min:Q,minStepsBetweenValues:ue,name:he,orientation:Y,pressedInputRef:de,pressedThumbCenterOffsetRef:ge,pressedThumbIndexRef:ce,renderBeforeHydration:ze,setActive:$e,setIndicatorPosition:De,state:et,step:qe,values:ft}=Ng(),ht=Iu(),ke=p||fe,Ae=ft.length>1,Fe=Y==="vertical",Me=ht==="rtl",{setTouched:xe,setFocused:ye,validationMode:_e}=xo(),Te=_.useRef(null),Ne=_.useRef(null),Le=Fr(),Ye=Tu(),Je=Ae?Le:Ye,Ze=_.useMemo(()=>({inputId:Je}),[Je]),{ref:C,index:en}=rd({metadata:Ze}),It=Ae?k??en:0,mt=It===ft.length-1,$t=ft[It],Nt=Jh($t,Q,X),[Wt,qt]=_.useState(!1),[Tn,bn]=_.useState();_u(()=>qt(!0));const Rt=q>=0&&q<ft.length?q:-1,Vt=it(()=>{const nn=K.current,Mt=Te.current;if(!nn||!Mt)return;const kt=Mt.getBoundingClientRect(),Dt=nn.getBoundingClientRect(),Tt=Fe?"height":"width",Sn=Dt[Tt]-kt[Tt],In=(kt[Tt]/2+Sn*Nt/100)/Dt[Tt]*100;bn(In),It===0?De(Zt=>[In,Zt[1]]):mt&&De(Zt=>[Zt[0],In])});dt(()=>{re&&queueMicrotask(Vt)},[Vt,re]),dt(()=>{re&&Vt()},[Vt,re,Nt]);const dn=_.useCallback(()=>{const nn=Fe?"bottom":"insetInlineStart",Mt=Fe?"left":"top";let kt;return Ae?Z===It?kt=2:Rt===It&&(kt=1):Z===It&&(kt=1),re?{"--position":`${Tn}%`,visibility:ze&&!Wt||Tn===void 0?"hidden":void 0,position:"absolute",[nn]:"var(--position)",[Mt]:"50%",translate:`${(Fe||!Me?-1:1)*50}% ${(Fe?1:-1)*50}%`,zIndex:kt}:Number.isFinite(Nt)?{position:"absolute",[nn]:`${Nt}%`,[Mt]:"50%",translate:`${(Fe||!Me?-1:1)*50}% ${(Fe?1:-1)*50}%`,zIndex:kt}:gl},[Z,It,re,Wt,Tn,Ae,ze,Me,Rt,Nt,Fe]);let kn;Y==="vertical"&&(kn=Me?"vertical-rl":"vertical-lr");const pt=Ru({"aria-label":typeof h=="function"?h(It):c,"aria-labelledby":f??se,"aria-describedby":s,"aria-orientation":Y,"aria-valuenow":$t,"aria-valuetext":typeof g=="function"?g(Ec($t,F,ie.current??void 0),$t,It):r7(ft,It,ie.current??void 0,F),disabled:ke,id:Je,max:X,min:Q,name:he,onChange(nn){V(nn.target.valueAsNumber,It,nn)},onFocus(){$e(It),ye(!0)},onBlur(){Te.current&&($e(-1),xe(!0),ye(!1),_e==="onBlur"&&be.commit(DE($t,It,Q,X,Ae,ft)))},onKeyDown(nn){if(!n7.has(nn.key))return;Mg.has(nn.key)&&nn.stopPropagation();let Mt=null;const kt=LE($t,qe,Q);switch(nn.key){case Na:Mt=gc(kt,nn.shiftKey?ae:qe,1,Q,X);break;case Ma:Mt=gc(kt,nn.shiftKey?ae:qe,Me?-1:1,Q,X);break;case ua:Mt=gc(kt,nn.shiftKey?ae:qe,-1,Q,X);break;case yl:Mt=gc(kt,nn.shiftKey?ae:qe,Me?1:-1,Q,X);break;case qE:Mt=gc(kt,ae,1,Q,X);break;case GE:Mt=gc(kt,ae,-1,Q,X);break;case Os:Mt=X,Ae&&(Mt=Number.isFinite(ft[It+1])?ft[It+1]-qe*ue:X);break;case zs:Mt=Q,Ae&&(Mt=Number.isFinite(ft[It-1])?ft[It-1]+qe*ue:Q);break}Mt!==null&&(V(Mt,It,nn),nn.preventDefault())},step:qe,style:{...gl,width:"100%",height:"100%",writingMode:kn},tabIndex:z??void 0,type:"range",value:$t??""},be.getInputValidationProps),vn=Di(Ne,be.inputRef,$);return Xt("div",t,{state:et,ref:[n,C,Te],props:[{[e7.index]:It,children:j.jsxs(_.Fragment,{children:[r,j.jsx("input",{ref:vn,...pt}),re&&!Wt&&ze&&mt&&j.jsx("script",{nonce:N,dangerouslySetInnerHTML:{__html:t7},suppressHydrationWarning:!0})]}),id:B,onBlur:R,onFocus:E,onPointerDown(nn){if(ce.current=It,Te.current!=null){const Mt=Y==="horizontal"?"x":"y",kt=UE(Te.current),Dt=(Y==="horizontal"?nn.clientX:nn.clientY)-kt[Mt];ge.current=Dt}Ne.current!=null&&de.current!==Ne.current&&(de.current=Ne.current)},style:dn(),suppressHydrationWarning:ze||void 0,tabIndex:-1},P],stateAttributesMapping:tp})});function o7(e,t,n,i,r,a){const s=n===void 0||t&&i===void 0?"hidden":void 0,c=e?"bottom":"insetInlineStart",f=e?"height":"width",h={visibility:r&&!a?"hidden":s,position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};return h["--start-position"]=`${n??0}%`,t?(h["--relative-size"]=`${(i??0)-(n??0)}%`,h[c]="var(--start-position)",h[f]="var(--relative-size)",h):(h[c]=0,h[f]="var(--start-position)",h)}function a7(e,t,n,i){const r=e?"bottom":"insetInlineStart",a=e?"height":"width",c={position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};if(!t)return c[r]=0,c[a]=`${n}%`,c;const f=i-n;return c[r]=`${n}%`,c[a]=`${f}%`,c}const l7=_.forwardRef(function(t,n){const{render:i,className:r,...a}=t,{indicatorPosition:s,inset:c,max:f,min:p,orientation:h,renderBeforeHydration:g,state:w,values:k}=Ng(),[$,R]=_.useState(!1);_u(()=>R(!0));const E=h==="vertical",O=k.length>1,z=c?o7(E,O,s[0],s[1],g,$):a7(E,O,Jh(k[0],p,f),Jh(k[k.length-1],p,f));return Xt("div",t,{state:w,ref:n,props:[{"data-base-ui-slider-indicator":g?"":void 0,style:z,suppressHydrationWarning:g||void 0},a],stateAttributesMapping:tp})}),s7=Bc("pf-slider-range select-none data-horizontal:h-full data-vertical:w-full",{variants:{variant:{default:"pf-slider-variant-default",success:"pf-slider-variant-success",warning:"pf-slider-variant-warning",destructive:"pf-slider-variant-destructive",info:"pf-slider-variant-info",muted:"pf-slider-variant-muted"}},defaultVariants:{variant:"default"}});function u7({className:e,defaultValue:t,value:n,min:i=0,max:r=100,step:a,variant:s,size:c="default",indicatorClassName:f,handleStyle:p,handleClassName:h,...g}){const w=a??(r-i)/100,k=_.useMemo(()=>Array.isArray(n)?n:n!==void 0?[n]:Array.isArray(t)?t:t!==void 0?[t]:[i],[n,t,i]);return j.jsx(M8,{"data-slot":"slider",defaultValue:t,value:n,min:i,max:r,step:w,className:st("data-horizontal:w-full data-vertical:h-full",e),thumbAlignment:"edge",...g,children:j.jsxs(F8,{className:st("pf-slider relative flex w-full cursor-pointer touch-none items-center select-none data-disabled:cursor-not-allowed data-disabled:opacity-50 data-vertical:h-full data-vertical:w-auto data-vertical:flex-col",`pf-slider-size-${c}`),children:[j.jsx(Z8,{"data-slot":"slider-track",className:"pf-slider-track bg-muted relative grow overflow-hidden data-horizontal:w-full data-vertical:h-full",children:j.jsx(l7,{"data-slot":"slider-range",className:st(s7({variant:s}),f)})}),Array.from({length:k.length},($,R)=>j.jsx(i7,{"data-slot":"slider-thumb",className:st("pf-slider-thumb block shrink-0 select-none disabled:pointer-events-none disabled:opacity-50",p==="bar"&&"pf-slider-thumb-bar",`pf-slider-thumb-variant-${s??"default"}`,h)},R))]})})}const c7=Bc("pf-dot inline-block shrink-0",{variants:{variant:{default:"pf-dot-variant-default",secondary:"pf-dot-variant-secondary",success:"pf-dot-variant-success",warning:"pf-dot-variant-warning",destructive:"pf-dot-variant-destructive",info:"pf-dot-variant-info",muted:"pf-dot-variant-muted"},size:{sm:"pf-dot-sm",default:"pf-dot-default",lg:"pf-dot-lg"},shape:{circle:"rounded-full",square:"rounded-none",rounded:"pf-dot-rounded"}},defaultVariants:{variant:"default",size:"default",shape:"circle"}});function d7({className:e,variant:t,size:n,shape:i,...r}){return j.jsx("span",{className:st(c7({variant:t,size:n,shape:i}),e),...r})}const KE=_.createContext(void 0);function YE(){const e=_.useContext(KE);if(e===void 0)throw new Error(En(51));return e}let Jb=(function(e){return e.complete="data-complete",e.indeterminate="data-indeterminate",e.progressing="data-progressing",e})({});const Rw={status(e){return e==="progressing"?{[Jb.progressing]:""}:e==="complete"?{[Jb.complete]:""}:e==="indeterminate"?{[Jb.indeterminate]:""}:null}};function f7(e,t){return t==null?"indeterminate progress":e||`${t}%`}const p7=_.forwardRef(function(t,n){const{format:i,getAriaValueText:r=f7,locale:a,max:s=100,min:c=0,value:f,render:p,className:h,...g}=t,[w,k]=_.useState(),$=jr(i);let R="indeterminate";Number.isFinite(f)&&(R=f===s?"complete":"progressing");const E=P8(f,a,$.current),O=_.useMemo(()=>({status:R}),[R]),z={"aria-labelledby":w,"aria-valuemax":s,"aria-valuemin":c,"aria-valuenow":f??void 0,"aria-valuetext":r(E,f),role:"progressbar"},P=_.useMemo(()=>({formattedValue:E,max:s,min:c,setLabelId:k,state:O,status:R,value:f}),[E,s,c,k,O,R,f]),N=Xt("div",t,{state:O,ref:n,props:[z,g],stateAttributesMapping:Rw});return j.jsx(KE.Provider,{value:P,children:N})}),m7=_.forwardRef(function(t,n){const{render:i,className:r,...a}=t,{state:s}=YE();return Xt("div",t,{state:s,ref:n,props:a,stateAttributesMapping:Rw})}),h7=_.forwardRef(function(t,n){const{render:i,className:r,...a}=t,{max:s,min:c,value:f,state:p}=YE(),h=Number.isFinite(f)&&f!==null?Jh(f,c,s):null,g=_.useCallback(()=>h==null?{}:{insetInlineStart:0,height:"inherit",width:`${h}%`},[h]);return Xt("div",t,{state:p,ref:n,props:[{style:g()},a],stateAttributesMapping:Rw})}),g7=Bc("pf-progress-indicator h-full w-full flex-1 transition-all",{variants:{variant:{default:"pf-progress-variant-default",success:"pf-progress-variant-success",warning:"pf-progress-variant-warning",destructive:"pf-progress-variant-destructive",info:"pf-progress-variant-info",muted:"pf-progress-variant-muted"}},defaultVariants:{variant:"default"}});function v7({className:e,indicatorClassName:t,target:n,targetClassName:i,variant:r,size:a="default",value:s,orientation:c="horizontal",...f}){const p=c==="vertical",h=n!=null?Math.max(0,Math.min(100,n)):void 0,g=`pf-progress-size-${a}`;return j.jsxs(p7,{value:s,className:st("pf-progress relative overflow-visible rounded-full",g,p?"pf-progress-vertical flex flex-col-reverse":"w-full",e),...f,children:[j.jsx(m7,{className:st("pf-progress relative flex items-center overflow-hidden rounded-full",g,p?"h-full w-full":"w-full"),children:j.jsx(h7,{className:st(g7({variant:r}),t),style:p?{transform:`translateY(${100-(s||0)}%)`}:{transform:`translateX(-${100-(s||0)}%)`}})}),h!=null&&j.jsx("span",{className:st("pf-progress-target",i),style:p?{bottom:`${h}%`}:{left:`${h}%`}})]})}const Ew=_.forwardRef(({className:e,...t},n)=>j.jsx("div",{className:"pf-table-container",children:j.jsx("table",{ref:n,className:st("pf-table",e),...t})}));Ew.displayName="Table";const Tw=_.forwardRef(({className:e,...t},n)=>j.jsx("thead",{ref:n,className:st("pf-table-header",e),...t}));Tw.displayName="TableHeader";const Iw=_.forwardRef(({className:e,...t},n)=>j.jsx("tbody",{ref:n,className:st("pf-table-body",e),...t}));Iw.displayName="TableBody";const JE=_.forwardRef(({className:e,...t},n)=>j.jsx("tfoot",{ref:n,className:st("pf-table-footer",e),...t}));JE.displayName="TableFooter";const du=_.forwardRef(({className:e,...t},n)=>j.jsx("tr",{ref:n,className:st("pf-table-row",e),...t}));du.displayName="TableRow";const zw=_.forwardRef(({className:e,...t},n)=>j.jsx("th",{ref:n,className:st("pf-table-head",e),...t}));zw.displayName="TableHead";const wc=_.forwardRef(({className:e,...t},n)=>j.jsx("td",{ref:n,className:st("pf-table-cell",e),...t}));wc.displayName="TableCell";const XE=_.forwardRef(({className:e,...t},n)=>j.jsx("caption",{ref:n,className:st("pf-table-caption",e),...t}));XE.displayName="TableCaption";const WE=_.createContext(null),QE=_.createContext(null);function La(){const e=_.useContext(WE);if(e===null)throw new Error(En(60));return e}function eT(){const e=_.useContext(QE);if(e===null)throw new Error(En(61));return e}const sn={id:Ke(e=>e.id),modal:Ke(e=>e.modal),multiple:Ke(e=>e.multiple),items:Ke(e=>e.items),itemToStringLabel:Ke(e=>e.itemToStringLabel),itemToStringValue:Ke(e=>e.itemToStringValue),isItemEqualToValue:Ke(e=>e.isItemEqualToValue),value:Ke(e=>e.value),hasSelectedValue:Ke(e=>{const{value:t,multiple:n,itemToStringValue:i}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:aa(t,i)!==""}),hasNullItemLabel:Ke((e,t)=>t?wE(e.items):!1),open:Ke(e=>e.open),mounted:Ke(e=>e.mounted),forceMount:Ke(e=>e.forceMount),transitionStatus:Ke(e=>e.transitionStatus),openMethod:Ke(e=>e.openMethod),activeIndex:Ke(e=>e.activeIndex),selectedIndex:Ke(e=>e.selectedIndex),isActive:Ke((e,t)=>e.activeIndex===t),isSelected:Ke((e,t,n)=>{const i=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(a=>Pa(n,a,i)):e.selectedIndex===t&&e.selectedIndex!==null?!0:Pa(n,r,i)}),isSelectedByFocus:Ke((e,t)=>e.selectedIndex===t),popupProps:Ke(e=>e.popupProps),triggerProps:Ke(e=>e.triggerProps),triggerElement:Ke(e=>e.triggerElement),positionerElement:Ke(e=>e.positionerElement),listElement:Ke(e=>e.listElement),scrollUpArrowVisible:Ke(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:Ke(e=>e.scrollDownArrowVisible),hasScrollArrows:Ke(e=>e.hasScrollArrows)};function b7(e){const{id:t,value:n,defaultValue:i=null,onValueChange:r,open:a,defaultOpen:s=!1,onOpenChange:c,name:f,autoComplete:p,disabled:h=!1,readOnly:g=!1,required:w=!1,modal:k=!0,actionsRef:$,inputRef:R,onOpenChangeComplete:E,items:O,multiple:z=!1,itemToStringLabel:P,itemToStringValue:N,isItemEqualToValue:B=vE,highlightItemOnHover:Z=!0,children:q}=e,{clearErrors:K}=Eu(),{setDirty:fe,setTouched:be,setFocused:ie,shouldValidateOnChange:V,validityData:re,setFilled:se,name:ae,disabled:F,validation:X,validationMode:Q}=xo(),ue=Tu({id:t}),he=F||h,Y=ae??f,[de,ge]=Vo({controlled:n,default:z?i??sa:i,name:"Select",state:"value"}),[ce,ze]=Vo({controlled:a,default:s,name:"Select",state:"open"}),$e=_.useRef([]),De=_.useRef([]),et=_.useRef(null),qe=_.useRef(null),ft=_.useRef(0),ht=_.useRef(null),ke=_.useRef([]),Ae=_.useRef(!1),Fe=_.useRef(!1),Me=_.useRef(null),xe=_.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),ye=_.useRef(!1),{mounted:_e,setMounted:Te,transitionStatus:Ne}=kl(ce),{openMethod:Le,triggerProps:Ye,reset:Je}=zg(ce),Ze=Vr(()=>new tw({id:ue,modal:k,multiple:z,itemToStringLabel:P,itemToStringValue:N,isItemEqualToValue:B,value:de,open:ce,mounted:_e,transitionStatus:Ne,items:O,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,C=at(Ze,sn.activeIndex),en=at(Ze,sn.selectedIndex),It=at(Ze,sn.triggerElement),mt=at(Ze,sn.positionerElement),$t=_.useMemo(()=>z&&Array.isArray(de)&&de.length===0?"":aa(de,N),[z,de,N]),Nt=_.useMemo(()=>z&&Array.isArray(de)?de.map(Zt=>aa(Zt,N)):aa(de,N),[z,de,N]),Wt=jr(Ze.state.triggerElement);nd({id:ue,commit:X.commit,value:de,controlRef:Wt,name:Y,getValue:()=>Nt});const qt=_.useRef(de);dt(()=>{de!==qt.current&&Ze.set("forceMount",!0)},[Ze,de]),dt(()=>{se(z?Array.isArray(de)&&de.length>0:de!=null)},[z,de,se]),dt(function(){if(ce)return;const yn=ke.current;if(z){const Cn=Array.isArray(de)?de:[];if(Cn.length===0){Ze.set("selectedIndex",null);return}const Qn=Cn[Cn.length-1],jn=vs(yn,Qn,B);Ze.set("selectedIndex",jn===-1?null:jn);return}const An=vs(yn,de,B);Ze.set("selectedIndex",An===-1?null:An)},[z,ce,de,ke,B,Ze]),ml(de,()=>{K(Y),fe(de!==re.initialValue),V()?X.commit(de):X.commit(de,!0)});const Tn=it((Zt,yn)=>{if(c==null||c(Zt,yn),!yn.isCanceled&&(ze(Zt),!Zt&&(yn.reason===bs||yn.reason===yg)&&(be(!0),ie(!1),Q==="onBlur"&&X.commit(de)),!Zt&&Ze.state.activeIndex!==null)){const An=$e.current[Ze.state.activeIndex];queueMicrotask(()=>{An==null||An.setAttribute("tabindex","-1")})}}),bn=it(()=>{Te(!1),Ze.set("activeIndex",null),Je(),E==null||E(!1)});Pi({enabled:!$,open:ce,ref:et,onComplete(){ce||bn()}}),_.useImperativeHandle($,()=>({unmount:bn}),[bn]);const Rt=it((Zt,yn)=>{r==null||r(Zt,yn),!yn.isCanceled&&ge(Zt)}),Vt=it(()=>{const Zt=Ze.state.listElement||et.current;if(!Zt)return;const yn=Zt.scrollTop,An=Zt.scrollTop+Zt.clientHeight,Cn=yn>1,Qn=An<Zt.scrollHeight-1;Ze.state.scrollUpArrowVisible!==Cn&&Ze.set("scrollUpArrowVisible",Cn),Ze.state.scrollDownArrowVisible!==Qn&&Ze.set("scrollDownArrowVisible",Qn)}),dn=vw({open:ce,onOpenChange:Tn,elements:{reference:It,floating:mt}}),kn=Kf(dn,{enabled:!g&&!he,event:"mousedown"}),pt=Qc(dn,{bubbles:!1}),vn=uE(dn,{enabled:!g&&!he,listRef:$e,activeIndex:C,selectedIndex:en,disabledIndices:sa,onNavigate(Zt){Zt===null&&!ce||Ze.set("activeIndex",Zt)},focusItemOnHover:!1}),Dn=dE(dn,{enabled:!g&&!he&&(ce||!z),listRef:De,activeIndex:C,selectedIndex:en,onMatch(Zt){ce?Ze.set("activeIndex",Zt):Rt(ke.current[Zt],Et("none"))},onTypingChange(Zt){Ae.current=Zt}}),{getReferenceProps:nn,getFloatingProps:Mt,getItemProps:kt}=Ts([kn,pt,vn,Dn]),Dt=_.useMemo(()=>Ru(nn(),Ye,ue?{id:ue}:$r),[nn,Ye,ue]);Kc(()=>{Ze.update({popupProps:Mt(),triggerProps:Dt})}),dt(()=>{Ze.update({id:ue,modal:k,multiple:z,value:de,open:ce,mounted:_e,transitionStatus:Ne,popupProps:Mt(),triggerProps:Dt,items:O,itemToStringLabel:P,itemToStringValue:N,isItemEqualToValue:B,openMethod:Le})},[Ze,ue,k,z,de,ce,_e,Ne,Mt,Dt,O,P,N,B,Le]);const Tt=_.useMemo(()=>({store:Ze,name:Y,required:w,disabled:he,readOnly:g,multiple:z,itemToStringLabel:P,itemToStringValue:N,highlightItemOnHover:Z,setValue:Rt,setOpen:Tn,listRef:$e,popupRef:et,scrollHandlerRef:qe,handleScrollArrowVisibility:Vt,scrollArrowsMountedCountRef:ft,getItemProps:kt,events:dn.context.events,valueRef:ht,valuesRef:ke,labelsRef:De,typingRef:Ae,selectionRef:xe,selectedItemTextRef:Me,validation:X,onOpenChangeComplete:E,keyboardActiveRef:Fe,alignItemWithTriggerActiveRef:ye,initialValueRef:qt}),[Ze,Y,w,he,g,z,P,N,Z,Rt,Tn,kt,dn.context.events,X,E,Vt]),Sn=Di(R,X.inputRef),Kn=z&&Array.isArray(de)&&de.length>0,In=_.useMemo(()=>!z||!Array.isArray(de)||!Y?null:de.map(Zt=>{const yn=aa(Zt,N);return j.jsx("input",{type:"hidden",name:Y,value:yn},yn)}),[z,de,Y,N]);return j.jsx(WE.Provider,{value:Tt,children:j.jsxs(QE.Provider,{value:dn,children:[q,j.jsx("input",{...X.getInputValidationProps({onFocus(){var Zt;(Zt=Ze.state.triggerElement)==null||Zt.focus({focusVisible:!0})},onChange(Zt){if(Zt.nativeEvent.defaultPrevented)return;const yn=Zt.target.value,An=Et(Er,Zt.nativeEvent);function Cn(){if(z)return;const Qn=ke.current.find(jn=>aa(jn,N).toLowerCase()===yn.toLowerCase());Qn!=null&&(fe(Qn!==re.initialValue),Rt(Qn,An),V()&&X.commit(Qn))}Ze.set("forceMount",!0),queueMicrotask(Cn)}}),name:z?void 0:Y,autoComplete:p,value:$t,disabled:he,required:w&&!Kn,readOnly:g,ref:Sn,style:Y?Hf:gl,tabIndex:-1,"aria-hidden":!0}),In]})})}const mh=2,y7=400,S2=200,w7={..._w,...Is,value:()=>null},x7=_.forwardRef(function(t,n){const{render:i,className:r,id:a,disabled:s=!1,nativeButton:c=!0,...f}=t,{setTouched:p,setFocused:h,validationMode:g,state:w,disabled:k}=xo(),{labelId:$}=Sl(),{store:R,setOpen:E,selectionRef:O,validation:z,readOnly:P,required:N,alignItemWithTriggerActiveRef:B,disabled:Z,keyboardActiveRef:q}=La(),K=k||Z||s,fe=at(R,sn.open),be=at(R,sn.value),ie=at(R,sn.triggerProps),V=at(R,sn.positionerElement),re=at(R,sn.listElement),se=at(R,sn.id),ae=at(R,sn.hasSelectedValue),F=!ae&&fe,X=at(R,sn.hasNullItemLabel,F),Q=a??se;Tu({id:Q});const ue=jr(V),he=_.useRef(null),{getButtonProps:Y,buttonRef:de}=qo({disabled:K,native:c}),ge=it(ke=>{R.set("triggerElement",ke)}),ce=Di(n,he,de,ge),ze=Ni(),$e=Ni(),De=Ni(),et=Ni();_.useEffect(()=>{if(fe)return!(ae||X)?De.start(y7,()=>{O.current.allowUnselectedMouseUp=!0,O.current.allowSelectedMouseUp=!0}):et.start(S2,()=>{O.current.allowUnselectedMouseUp=!0,De.start(S2,()=>{O.current.allowSelectedMouseUp=!0})}),()=>{De.clear(),et.clear()};O.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},$e.clear()},[fe,ae,X,O,$e,De,et]);const qe=_.useMemo(()=>{var ke;return(re==null?void 0:re.id)??((ke=Nf(V))==null?void 0:ke.id)},[re,V]),ft=Ru(ie,{id:Q,role:"combobox","aria-expanded":fe?"true":"false","aria-haspopup":"listbox","aria-controls":fe?qe:void 0,"aria-labelledby":$,"aria-readonly":P||void 0,"aria-required":N||void 0,tabIndex:K?-1:0,ref:ce,onFocus(ke){h(!0),fe&&B.current&&E(!1,Et(Er,ke.nativeEvent)),ze.start(0,()=>{R.set("forceMount",!0)})},onBlur(ke){rn(V,ke.relatedTarget)||(p(!0),h(!1),g==="onBlur"&&z.commit(be))},onPointerMove(){q.current=!1},onKeyDown(){q.current=!0},onMouseDown(ke){if(fe)return;const Ae=Pn(ke.currentTarget);function Fe(Me){if(!he.current)return;const xe=Me.target;if(rn(he.current,xe)||rn(ue.current,xe)||xe===he.current)return;const ye=TE(he.current);Me.clientX>=ye.left-mh&&Me.clientX<=ye.right+mh&&Me.clientY>=ye.top-mh&&Me.clientY<=ye.bottom+mh||E(!1,Et(Hj,Me))}$e.start(0,()=>{Ae.addEventListener("mouseup",Fe,{once:!0})})}},z.getValidationProps,f,Y);ft.role="combobox";const ht={...w,open:fe,disabled:K,value:be,readOnly:P,placeholder:!ae};return Xt("button",t,{ref:[n,he],state:ht,stateAttributesMapping:w7,props:ft})}),k7={value:()=>null},S7=_.forwardRef(function(t,n){const{className:i,render:r,children:a,placeholder:s,...c}=t,{store:f,valueRef:p}=La(),h=at(f,sn.value),g=at(f,sn.items),w=at(f,sn.itemToStringLabel),k=at(f,sn.hasSelectedValue),$=!k&&s!=null&&a==null,R=at(f,sn.hasNullItemLabel,$),E={value:h,placeholder:!k};let O=null;return typeof a=="function"?O=a(h):a!=null?O=a:!k&&s!=null&&!R?O=s:Array.isArray(h)?O=kU(h,g,w):O=xE(h,g,w),Xt("span",t,{state:E,ref:[n,p],props:[{children:O},c],stateAttributesMapping:k7})}),_7=_.forwardRef(function(t,n){const{className:i,render:r,...a}=t,{store:s}=La(),f={open:at(s,sn.open)};return Xt("span",t,{state:f,ref:n,props:[{"aria-hidden":!0,children:"▼"},a],stateAttributesMapping:Jf})}),$7=_.createContext(void 0),C7=_.forwardRef(function(t,n){const{store:i}=La(),r=at(i,sn.mounted),a=at(i,sn.forceMount);return r||a?j.jsx($7.Provider,{value:!0,children:j.jsx(xg,{ref:n,...t})}):null}),tT=_.createContext(void 0);function Ow(){const e=_.useContext(tT);if(!e)throw new Error(En(59));return e}function Xh(e,t){e&&Object.assign(e.style,t)}const nT={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},R7={position:"fixed"},E7=_.forwardRef(function(t,n){const{anchor:i,positionMethod:r="absolute",className:a,render:s,side:c="bottom",align:f="center",sideOffset:p=0,alignOffset:h=0,collisionBoundary:g="clipping-ancestors",collisionPadding:w,arrowPadding:k=5,sticky:$=!1,disableAnchorTracking:R,alignItemWithTrigger:E=!0,collisionAvoidance:O=qR,...z}=t,{store:P,listRef:N,labelsRef:B,alignItemWithTriggerActiveRef:Z,selectedItemTextRef:q,valuesRef:K,initialValueRef:fe,popupRef:be,setValue:ie}=La(),V=eT(),re=at(P,sn.open),se=at(P,sn.mounted),ae=at(P,sn.modal),F=at(P,sn.value),X=at(P,sn.openMethod),Q=at(P,sn.positionerElement),ue=at(P,sn.triggerElement),he=at(P,sn.isItemEqualToValue),Y=at(P,sn.transitionStatus),de=_.useRef(null),ge=_.useRef(null),[ce,ze]=_.useState(E),$e=se&&ce&&X!=="touch";!se&&ce!==E&&ze(E),dt(()=>{se||(sn.scrollUpArrowVisible(P.state)&&P.set("scrollUpArrowVisible",!1),sn.scrollDownArrowVisible(P.state)&&P.set("scrollDownArrowVisible",!1))},[P,se]),_.useImperativeHandle(Z,()=>$e),Og(($e||ae)&&re&&X!=="touch",ue);const De=Qf({anchor:i,floatingRootContext:V,positionMethod:r,mounted:se,side:c,sideOffset:p,align:f,alignOffset:h,arrowPadding:k,collisionBoundary:g,collisionPadding:w,sticky:$,disableAnchorTracking:R??$e,collisionAvoidance:O,keepMounted:!0}),et=$e?"none":De.side,qe=$e?R7:De.positionerStyles,ft=_.useMemo(()=>{const ye={};return re||(ye.pointerEvents="none"),{role:"presentation",hidden:!se,style:{...qe,...ye}}},[re,se,qe]),ht={open:re,side:et,align:De.align,anchorHidden:De.anchorHidden},ke=it(ye=>{P.set("positionerElement",ye)}),Ae=Xt("div",t,{ref:[n,ke],state:ht,stateAttributesMapping:Bo,props:[ft,Ua(Y),z]}),Fe=_.useRef(0),Me=it(ye=>{if(ye.size===0&&Fe.current===0||K.current.length===0)return;const _e=Fe.current;if(Fe.current=ye.size,ye.size===_e)return;const Te=Et(Er);if(_e!==0&&!P.state.multiple&&F!==null&&vs(K.current,F,he)===-1){const Le=fe.current,Je=Le!=null&&vs(K.current,Le,he)!==-1?Le:null;ie(Je,Te),Je===null&&(P.set("selectedIndex",null),q.current=null)}if(_e!==0&&P.state.multiple&&Array.isArray(F)){const Ne=Ye=>vs(K.current,Ye,he)!==-1,Le=F.filter(Ye=>Ne(Ye));(Le.length!==F.length||Le.some(Ye=>!bE(F,Ye,he)))&&(ie(Le,Te),Le.length===0&&(P.set("selectedIndex",null),q.current=null))}if(re&&$e){P.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const Ne={height:""};Xh(Q,Ne),Xh(be.current,Ne)}}),xe=_.useMemo(()=>({...De,side:et,alignItemWithTriggerActive:$e,setControlledAlignItemWithTrigger:ze,scrollUpArrowRef:de,scrollDownArrowRef:ge}),[De,et,$e,ze]);return j.jsx(Xf,{elementsRef:N,labelsRef:B,onMapChange:Me,children:j.jsxs(tT.Provider,{value:xe,children:[se&&ae&&j.jsx(Ag,{inert:Wf(!re),cutout:ue}),Ae]})})});function rT(e){const t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}const hh="base-ui-disable-scrollbar",Ey={className:hh,getElement(e){return j.jsx("style",{nonce:e,href:hh,precedence:"base-ui:low",children:`.${hh}{scrollbar-width:none}.${hh}::-webkit-scrollbar{display:none}`})}},T7=_.createContext(void 0);function iT(e){return _.useContext(T7)}const au=1,I7={...Bo,...Ho},z7=_.forwardRef(function(t,n){const{render:i,className:r,finalFocus:a,...s}=t,{store:c,popupRef:f,onOpenChangeComplete:p,setOpen:h,valueRef:g,selectedItemTextRef:w,keyboardActiveRef:k,multiple:$,handleScrollArrowVisibility:R,scrollHandlerRef:E,highlightItemOnHover:O}=La(),{side:z,align:P,alignItemWithTriggerActive:N,setControlledAlignItemWithTrigger:B,scrollDownArrowRef:Z,scrollUpArrowRef:q}=Ow(),K=iT()!=null,fe=eT(),{nonce:be,disableStyleElements:ie}=BE(),V=Ni(),re=at(c,sn.id),se=at(c,sn.open),ae=at(c,sn.mounted),F=at(c,sn.popupProps),X=at(c,sn.transitionStatus),Q=at(c,sn.triggerElement),ue=at(c,sn.positionerElement),he=at(c,sn.listElement),Y=_.useRef(0),de=_.useRef(!1),ge=_.useRef(0),ce=_.useRef(!1),ze=_.useRef({}),$e=Yc(),De=it(ht=>{if(!ue||!f.current||!ce.current)return;if(de.current||!N){R();return}const ke=ue.style.top==="0px",Ae=ue.style.bottom==="0px",Fe=ue.getBoundingClientRect().height,Me=Pn(ue),xe=getComputedStyle(ue),ye=parseFloat(xe.marginTop),_e=parseFloat(xe.marginBottom),Te=_2(getComputedStyle(f.current)),Ne=Math.min(Me.documentElement.clientHeight-ye-_e,Te),Le=ht.scrollTop,Ye=$2(ht);let Je=0,Ze=null,C=!1,en=!1;const It=$t=>{ue.style.height=`${$t}px`},mt=($t,Nt)=>{const Wt=ao($t,0,Ne-Fe);Wt>0&&It(Fe+Wt),ht.scrollTop=Nt,Ne-(Fe+Wt)<=au&&(de.current=!0),R()};if(ke){const $t=Ye-Le,Nt=Fe+$t,Wt=Math.min(Nt,Ne);if(Je=Wt,$t<=au){mt($t,Ye);return}Ne-Wt>au?en=!0:C=!0}else if(Ae){const $t=Le,Nt=Fe+$t,Wt=Math.min(Nt,Ne),qt=Nt-Ne;if(Je=Wt,$t<=au){mt($t,0);return}Ne-Wt>au?Ze=0:(C=!0,Le<Ye&&(Ze=Le-($t-qt)))}if(Je=Math.ceil(Je),Je!==0&&It(Je),en||Ze!=null){const $t=$2(ht),Nt=en?$t:ao(Ze,0,$t);Math.abs(ht.scrollTop-Nt)>au&&(ht.scrollTop=Nt)}(C||Je>=Ne-au)&&(de.current=!0),R()});_.useImperativeHandle(E,()=>De,[De]),Pi({open:se,ref:f,onComplete(){se&&(p==null||p(!0))}});const et={open:se,transitionStatus:X,side:z,align:P};dt(()=>{!ue||!f.current||Object.keys(ze.current).length||(ze.current={top:ue.style.top||"0",left:ue.style.left||"0",right:ue.style.right,height:ue.style.height,bottom:ue.style.bottom,minHeight:ue.style.minHeight,maxHeight:ue.style.maxHeight,marginTop:ue.style.marginTop,marginBottom:ue.style.marginBottom})},[f,ue]),dt(()=>{se||N||(ce.current=!1,de.current=!1,Y.current=0,ge.current=0,Xh(ue,ze.current))},[se,N,ue,f]),dt(()=>{const ht=f.current;if(!(!se||!Q||!ue||!ht||c.state.transitionStatus==="ending")){if(!N){ce.current=!0,$e.request(R),ht.style.removeProperty("--transform-origin");return}queueMicrotask(()=>{var Ae;const ke=O7(ht);ht.style.removeProperty("--transform-origin");try{const Fe=getComputedStyle(ue),Me=getComputedStyle(ht),xe=Pn(Q),ye=Ur(ue),_e=Q.getBoundingClientRect(),Te=ue.getBoundingClientRect(),Ne=_e.left,Le=_e.height,Ye=he||ht,Je=Ye.scrollHeight,Ze=parseFloat(Me.borderBottomWidth),C=parseFloat(Fe.marginTop)||10,en=parseFloat(Fe.marginBottom)||10,It=parseFloat(Fe.minHeight)||100,mt=_2(Me),$t=5,Nt=5,Wt=20,qt=xe.documentElement.clientHeight-C-en,Tn=xe.documentElement.clientWidth,bn=qt-_e.bottom+Le,Rt=w.current,Vt=g.current;let dn,kn=0,pt=0;if(Rt&&Vt){const yn=Vt.getBoundingClientRect();dn=Rt.getBoundingClientRect();const An=yn.left-Ne,Cn=dn.left-Te.left,Qn=yn.top-_e.top+yn.height/2,jn=dn.top-Te.top+dn.height/2;kn=An-Cn,pt=jn-Qn}const vn=bn+pt+en+Ze;let Dn=Math.min(qt,vn);const nn=qt-C-en,Mt=vn-Dn,kt=Math.max($t,Ne+kn),Dt=Tn-Nt,Tt=Math.max(0,kt+Te.width-Dt);ue.style.left=`${kt-Tt}px`,ue.style.height=`${Dn}px`,ue.style.maxHeight="auto",ue.style.marginTop=`${C}px`,ue.style.marginBottom=`${en}px`,ht.style.height="100%";const Sn=Ye.scrollHeight-Ye.clientHeight,Kn=Mt>=Sn;Kn&&(Dn=Math.min(qt,Te.height)-(Mt-Sn));const In=_e.top<Wt||_e.bottom>qt-Wt||Dn<Math.min(Je,It),Zt=(((Ae=ye.visualViewport)==null?void 0:Ae.scale)??1)!==1&&ow;if(In||Zt){ce.current=!0,Xh(ue,ze.current),Mi.flushSync(()=>B(!1));return}if(Kn){const yn=Math.max(0,qt-vn);ue.style.top=Te.height>=nn?"0":`${yn}px`,ue.style.height=`${Dn}px`,Ye.scrollTop=Ye.scrollHeight-Ye.clientHeight,Y.current=Math.max(It,Dn)}else ue.style.bottom="0",Y.current=Math.max(It,Dn),Ye.scrollTop=Mt;if(dn){const yn=Te.top,An=Te.height,Cn=dn.top+dn.height/2,Qn=An>0?(Cn-yn)/An*100:50,jn=ao(Qn,0,100);ht.style.setProperty("--transform-origin",`50% ${jn}%`)}(Y.current===qt||Dn>=mt)&&(de.current=!0),R(),setTimeout(()=>{ce.current=!0})}finally{ke()}})}},[c,se,ue,Q,g,w,f,R,N,B,$e,Z,q,he]),_.useEffect(()=>{if(!N||!ue||!se)return;const ht=Ur(ue);function ke(Ae){h(!1,Et(qj,Ae))}return ht.addEventListener("resize",ke),()=>{ht.removeEventListener("resize",ke)}},[h,N,ue,se]);const qe={...he?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":$||void 0,id:`${re}-list`},onKeyDown(ht){k.current=!0,K&&Mg.has(ht.key)&&ht.stopPropagation()},onMouseMove(){k.current=!1},onPointerLeave(ht){if(!O||rT(ht)||ht.pointerType==="touch")return;const ke=ht.currentTarget;V.start(0,()=>{c.set("activeIndex",null),ke.focus({preventScroll:!0})})},onScroll(ht){he||De(ht.currentTarget)},...N&&{style:he?{height:"100%"}:nT}},ft=Xt("div",t,{ref:[n,f],state:et,stateAttributesMapping:I7,props:[F,qe,Ua(X),{className:!he&&N?Ey.className:void 0},s]});return j.jsxs(_.Fragment,{children:[!ie&&Ey.getElement(be),j.jsx(kg,{context:fe,modal:!1,disabled:!ae,returnFocus:a,restoreFocus:!0,children:ft})]})});function _2(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function $2(e){return Math.max(0,e.scrollHeight-e.clientHeight)}const C2=[["transform","none"],["scale","1"],["translate","0 0"]];function O7(e){const{style:t}=e,n={};for(const[i,r]of C2)n[i]=t.getPropertyValue(i),t.setProperty(i,r,"important");return()=>{for(const[i]of C2){const r=n[i];r?t.setProperty(i,r):t.removeProperty(i)}}}const A7=_.forwardRef(function(t,n){const{className:i,render:r,...a}=t,{store:s,scrollHandlerRef:c}=La(),{alignItemWithTriggerActive:f}=Ow(),p=at(s,sn.hasScrollArrows),h=at(s,sn.openMethod),g=at(s,sn.multiple),k={id:`${at(s,sn.id)}-list`,role:"listbox","aria-multiselectable":g||void 0,onScroll(R){var E;(E=c.current)==null||E.call(c,R.currentTarget)},...f&&{style:nT},className:p&&h!=="touch"?Ey.className:void 0},$=it(R=>{s.set("listElement",R)});return Xt("div",t,{ref:[n,$],props:[k,a]})}),oT=_.createContext(void 0);function Aw(){const e=_.useContext(oT);if(!e)throw new Error(En(57));return e}const N7=_.memo(_.forwardRef(function(t,n){const{render:i,className:r,value:a=null,label:s,disabled:c=!1,nativeButton:f=!1,...p}=t,h=_.useRef(null),g=rd({label:s,textRef:h,indexGuessBehavior:Cw.GuessFromOrder}),{store:w,getItemProps:k,setOpen:$,setValue:R,selectionRef:E,typingRef:O,valuesRef:z,keyboardActiveRef:P,multiple:N,highlightItemOnHover:B}=La(),Z=Ni(),q=at(w,sn.isActive,g.index),K=at(w,sn.isSelected,g.index,a),fe=at(w,sn.isSelectedByFocus,g.index),be=at(w,sn.isItemEqualToValue),ie=g.index,V=ie!==-1,re=_.useRef(null),se=jr(ie);dt(()=>{if(!V)return;const $e=z.current;return $e[ie]=a,()=>{delete $e[ie]}},[V,ie,a,z]),dt(()=>{if(!V)return;const $e=w.state.value;let De=$e;N&&Array.isArray($e)&&$e.length>0&&(De=$e[$e.length-1]),De!==void 0&&Pa(a,De,be)&&w.set("selectedIndex",ie)},[V,ie,N,be,w,a]);const ae={disabled:c,selected:K,highlighted:q},F=k({active:q,selected:K});F.onFocus=void 0,F.id=void 0;const X=_.useRef(null),Q=_.useRef("mouse"),ue=_.useRef(!1),{getButtonProps:he,buttonRef:Y}=qo({disabled:c,focusableWhenDisabled:!0,native:f});function de($e){const De=w.state.value;if(N){const et=Array.isArray(De)?De:[],qe=K?yE(et,a,be):[...et,a];R(qe,Et(Ih,$e))}else R(a,Et(Ih,$e)),$(!1,Et(Ih,$e))}const ge={role:"option","aria-selected":K,tabIndex:q?0:-1,onFocus(){w.set("activeIndex",ie)},onMouseEnter(){!P.current&&w.state.selectedIndex===null&&B&&w.set("activeIndex",ie)},onMouseMove(){B&&w.set("activeIndex",ie)},onMouseLeave($e){!B||P.current||rT($e)||Z.start(0,()=>{w.state.activeIndex===ie&&w.set("activeIndex",null)})},onTouchStart(){E.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown($e){X.current=$e.key,w.set("activeIndex",ie)},onClick($e){ue.current=!1,!($e.type==="keydown"&&X.current===null)&&(c||X.current===" "&&O.current||Q.current!=="touch"&&!q||(X.current=null,de($e.nativeEvent)))},onPointerEnter($e){Q.current=$e.pointerType},onPointerDown($e){Q.current=$e.pointerType,ue.current=!0},onMouseUp($e){if(c)return;if(ue.current){ue.current=!1;return}const De=!E.current.allowSelectedMouseUp&&K,et=!E.current.allowUnselectedMouseUp&&!K;De||et||Q.current!=="touch"&&!q||de($e.nativeEvent)}},ce=Xt("div",t,{ref:[Y,n,g.ref,re],state:ae,props:[F,ge,p,he]}),ze=_.useMemo(()=>({selected:K,indexRef:se,textRef:h,selectedByFocus:fe,hasRegistered:V}),[K,se,h,fe,V]);return j.jsx(oT.Provider,{value:ze,children:ce})})),M7=_.forwardRef(function(t,n){const i=t.keepMounted??!1,{selected:r}=Aw();return i||r?j.jsx(D7,{...t,ref:n}):null}),D7=_.memo(_.forwardRef((e,t)=>{const{render:n,className:i,keepMounted:r,...a}=e,{selected:s}=Aw(),c=_.useRef(null),{transitionStatus:f,setMounted:p}=kl(s),g=Xt("span",e,{ref:[t,c],state:{selected:s,transitionStatus:f},props:[{"aria-hidden":!0,children:"✔️"},a],stateAttributesMapping:Ho});return Pi({open:s,ref:c,onComplete(){s||p(!1)}}),g})),P7=_.memo(_.forwardRef(function(t,n){const{indexRef:i,textRef:r,selectedByFocus:a,hasRegistered:s}=Aw(),{selectedItemTextRef:c}=La(),{className:f,render:p,...h}=t,g=_.useCallback(k=>{if(!k||!s)return;const $=c.current===null||!c.current.isConnected;(a||$&&i.current===0)&&(c.current=k)},[c,i,a,s]);return Xt("div",t,{ref:[g,n,r],props:h})})),aT=_.forwardRef(function(t,n){const{render:i,className:r,direction:a,keepMounted:s=!1,...c}=t,{store:f,popupRef:p,listRef:h,handleScrollArrowVisibility:g,scrollArrowsMountedCountRef:w}=La(),{side:k,scrollDownArrowRef:$,scrollUpArrowRef:R}=Ow(),E=a==="up"?sn.scrollUpArrowVisible:sn.scrollDownArrowVisible,O=at(f,E),z=at(f,sn.openMethod),P=O&&z!=="touch",N=Ni(),B=a==="up"?R:$,{transitionStatus:Z,setMounted:q}=kl(P);dt(()=>(w.current+=1,f.state.hasScrollArrows||f.set("hasScrollArrows",!0),()=>{w.current=Math.max(0,w.current-1),w.current===0&&f.state.hasScrollArrows&&f.set("hasScrollArrows",!1)}),[f,w]),Pi({open:P,ref:B,onComplete(){P||q(!1)}});const be=Xt("div",t,{ref:[n,B],state:{direction:a,visible:P,side:k,transitionStatus:Z},props:[{"aria-hidden":!0,children:a==="up"?"▲":"▼",style:{position:"absolute"},onMouseMove(V){if(V.movementX===0&&V.movementY===0||N.isStarted())return;f.set("activeIndex",null);function re(){var Q;const se=f.state.listElement??p.current;if(!se)return;f.set("activeIndex",null),g();const ae=se.scrollTop===0,F=Math.round(se.scrollTop+se.clientHeight)>=se.scrollHeight;if(h.current.length===0&&(a==="up"?f.set("scrollUpArrowVisible",!ae):f.set("scrollDownArrowVisible",!F)),a==="up"&&ae||a==="down"&&F){N.clear();return}if((f.state.listElement||p.current)&&h.current&&h.current.length>0){const ue=h.current,he=((Q=B.current)==null?void 0:Q.offsetHeight)||0;if(a==="up"){let Y=0;const de=se.scrollTop+he;for(let ce=0;ce<ue.length;ce+=1){const ze=ue[ce];if(ze&&ze.offsetTop>=de){Y=ce;break}}const ge=Math.max(0,Y-1);if(ge<Y){const ce=ue[ge];ce&&(se.scrollTop=Math.max(0,ce.offsetTop-he))}else se.scrollTop=0}else{let Y=ue.length-1;const de=se.scrollTop+se.clientHeight-he;for(let ce=0;ce<ue.length;ce+=1){const ze=ue[ce];if(ze&&ze.offsetTop+ze.offsetHeight>de){Y=Math.max(0,ce-1);break}}const ge=Math.min(ue.length-1,Y+1);if(ge>Y){const ce=ue[ge];ce&&(se.scrollTop=ce.offsetTop+ce.offsetHeight-se.clientHeight+he)}else se.scrollTop=se.scrollHeight-se.clientHeight}}N.start(40,re)}N.start(40,re)},onMouseLeave(){N.clear()}},c]});return P||s?be:null}),j7=_.forwardRef(function(t,n){return j.jsx(aT,{...t,ref:n,direction:"down"})}),U7=_.forwardRef(function(t,n){return j.jsx(aT,{...t,ref:n,direction:"up"})}),lT=_.createContext(void 0);function L7(){const e=_.useContext(lT);if(e===void 0)throw new Error(En(56));return e}const V7=_.forwardRef(function(t,n){const{className:i,render:r,...a}=t,[s,c]=_.useState(),f=_.useMemo(()=>({labelId:s,setLabelId:c}),[s,c]),p=Xt("div",t,{ref:n,props:[{role:"group","aria-labelledby":s},a]});return j.jsx(lT.Provider,{value:f,children:p})}),F7=_.forwardRef(function(t,n){const{className:i,render:r,id:a,...s}=t,{setLabelId:c}=L7(),f=Fr(a);return dt(()=>{c(f)},[f,c]),Xt("div",t,{ref:n,props:[{id:f},s]})}),sT=_.createContext(null);function Z7({onValueChange:e,onOpenChange:t,open:n,...i}){const[r,a]=_.useState(!1),s=n??r,c=(f,p)=>{a(f),t==null||t(f,p)};return j.jsx(sT.Provider,{value:_.useMemo(()=>({close:()=>a(!1),open:s}),[s]),children:j.jsx(b7,{"data-slot":"select",open:s,onOpenChange:c,onValueChange:e?f=>{f!==null&&e(f)}:void 0,...i})})}function H7({...e}){return j.jsx(S7,{"data-slot":"select-value",...e})}function B7({className:e,size:t="default",children:n,...i}){return j.jsxs(x7,{"data-slot":"select-trigger","data-size":t,className:st("pf-select-trigger flex w-full cursor-pointer items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...i,children:[n,j.jsx(_7,{render:j.jsx(fg,{className:"pf-select-trigger-icon pointer-events-none"})})]})}function q7({className:e,children:t,side:n="bottom",sideOffset:i=4,align:r="center",alignOffset:a=0,alignItemWithTrigger:s=!1,...c}){const f=id(),p=_.useContext(sT);return j.jsxs(C7,{container:f,children:[(p==null?void 0:p.open)&&j.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>p.close()}),j.jsx(E7,{side:n,sideOffset:i,align:r,alignOffset:a,alignItemWithTrigger:s,className:"isolate z-50",children:j.jsxs(z7,{"data-slot":"select-content","data-align-trigger":s,className:st("pf-select-content relative isolate z-50 max-h-(--available-height) origin-(--transform-origin) overflow-x-hidden overflow-y-auto",e),...c,children:[j.jsx(J7,{}),j.jsx(A7,{children:t}),j.jsx(X7,{})]})})]})}function G7({className:e,children:t,...n}){return j.jsx(V7,{"data-slot":"select-group",className:st("pf-select-group scroll-my-1 p-1",e),...n,children:t})}function R2({className:e,children:t,...n}){return j.jsx(F7,{"data-slot":"select-group-label",className:st("pf-select-group-label px-1.5 py-1.5 text-xs text-muted-foreground/70 pointer-events-none select-none",e),...n,children:t})}function K7({className:e,children:t,...n}){return j.jsxs(N7,{"data-slot":"select-item",className:st("pf-select-item relative flex w-full cursor-pointer items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...n,children:[j.jsx(P7,{children:t}),j.jsx(M7,{render:j.jsx("span",{className:"pf-select-item-indicator"}),children:j.jsx(Qy,{className:"pf-select-item-indicator-icon pointer-events-none"})})]})}function Y7({className:e,...t}){return j.jsx("div",{"data-slot":"select-separator",className:st("pf-select-separator -mx-1 my-1 h-px bg-border",e),...t})}function J7({className:e,...t}){return j.jsx(U7,{"data-slot":"select-scroll-up-button",className:st("pf-select-scroll-up-button",e),...t,children:j.jsx(nR,{})})}function X7({className:e,...t}){return j.jsx(j7,{"data-slot":"select-scroll-down-button",className:st("pf-select-scroll-down-button",e),...t,children:j.jsx(fg,{})})}let E2=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const Ty={checked(e){return e?{[E2.checked]:""}:{[E2.unchecked]:""}},...Ho,...Is},Nw="data-composite-item-active";function uT(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:i}=EE(),{ref:r,index:a}=rd(e),s=n===a,c=_.useRef(null),f=Di(r,c);return{compositeProps:_.useMemo(()=>({tabIndex:s?0:-1,onFocus(){i(a)},onMouseMove(){const h=c.current;if(!t||!h)return;const g=h.hasAttribute("disabled")||h.ariaDisabled==="true";!s&&!g&&h.focus()}}),[s,i,a,t]),compositeRef:f,index:a}}function W7(e){const{render:t,className:n,state:i=$r,props:r=sa,refs:a=sa,metadata:s,stateAttributesMapping:c,tag:f="div",...p}=e,{compositeProps:h,compositeRef:g}=uT({metadata:s});return Xt(f,e,{state:i,ref:[...a,g],props:[h,...r,p],stateAttributesMapping:c})}const Q7=_.createContext({disabled:!1});function cT(){return _.useContext(Q7)}const dT=_.createContext(void 0);function eL(){return _.useContext(dT)}const fT=_.createContext(void 0);function tL(){const e=_.useContext(fT);if(e===void 0)throw new Error(En(52));return e}const nL=_.forwardRef(function(t,n){const{render:i,className:r,disabled:a=!1,readOnly:s=!1,required:c=!1,value:f,inputRef:p,nativeButton:h=!1,id:g,...w}=t,k=eL(),{disabled:$,readOnly:R,required:E,checkedValue:O,touched:z=!1,validation:P,name:N}=k??{},B=(k==null?void 0:k.setCheckedValue)??or,Z=(k==null?void 0:k.setTouched)??or,q=(k==null?void 0:k.registerControlRef)??or,K=(k==null?void 0:k.registerInputRef)??or,{setDirty:fe,validityData:be,setTouched:ie,setFilled:V,state:re,disabled:se}=xo(),ae=cT(),{labelId:F,getDescriptionProps:X}=Sl(),Q=se||ae.disabled||$||a,ue=R||s,he=E||c,Y=k?O===f:f==="",de=_.useMemo(()=>Kh(f),[f]),ge=_.useRef(null),ce=_.useRef(null),ze=it(Ne=>{Ne&&q(Ne,Q)}),$e=Di(p,ce,K);dt(()=>{var Ne;(Ne=ce.current)!=null&&Ne.checked&&V(!0)},[V]),dt(()=>{if(ce.current){if(Q&&Y){K(null);return}ge.current&&q(ge.current,Q),K(ce.current)}},[Y,Q,q,K]);const De=Fr(),et=Tu({id:g,implicit:!1,controlRef:ge}),qe=h?void 0:et,ft={role:"radio","aria-checked":Y,"aria-required":he||void 0,"aria-readonly":ue||void 0,"aria-labelledby":F,[Nw]:Y?"":void 0,id:h?et:De,onKeyDown(Ne){Ne.key==="Enter"&&Ne.preventDefault()},onClick(Ne){var Le;Ne.defaultPrevented||Q||ue||(Ne.preventDefault(),(Le=ce.current)==null||Le.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:Ne.shiftKey,ctrlKey:Ne.ctrlKey,altKey:Ne.altKey,metaKey:Ne.metaKey})))},onFocus(Ne){var Le;Ne.defaultPrevented||Q||ue||!z||((Le=ce.current)==null||Le.click(),Z(!1))}},{getButtonProps:ht,buttonRef:ke}=qo({disabled:Q,native:h}),Ae={type:"radio",ref:$e,id:qe,name:N,tabIndex:-1,style:N?Hf:gl,"aria-hidden":!0,...f!==void 0?{value:de}:$r,disabled:Q,checked:Y,required:he,readOnly:ue,onChange(Ne){if(Ne.nativeEvent.defaultPrevented||Q||ue||f===void 0)return;const Le=Et(Er,Ne.nativeEvent);Le.isCanceled||(ie(!0),fe(f!==be.initialValue),V(!0),B(f,Le))},onFocus(){var Ne;(Ne=ge.current)==null||Ne.focus()}},Fe=_.useMemo(()=>({...re,required:he,disabled:Q,readOnly:ue,checked:Y}),[re,Q,ue,Y,he]),Me=Fe,xe=k!==void 0,ye=[n,ge,ke,ze],_e=[ft,X,(P==null?void 0:P.getValidationProps)??$r,w,ht],Te=Xt("span",t,{enabled:!xe,state:Fe,ref:ye,props:_e,stateAttributesMapping:Ty});return j.jsxs(fT.Provider,{value:Me,children:[xe?j.jsx(W7,{tag:"span",render:i,className:r,state:Fe,refs:ye,props:_e,stateAttributesMapping:Ty}):Te,j.jsx("input",{...Ae})]})}),rL=_.forwardRef(function(t,n){const{render:i,className:r,keepMounted:a=!1,...s}=t,c=tL(),f=c.checked,{mounted:p,transitionStatus:h,setMounted:g}=kl(f),w={...c,transitionStatus:h},k=_.useRef(null),$=a||p,R=Xt("span",t,{ref:[n,k],state:w,props:s,stateAttributesMapping:Ty});return Pi({open:f,ref:k,onComplete(){f||g(!1)}}),$?R:null});function Iy(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const iL=[];function oL(e){const{itemSizes:t,cols:n=1,loopFocus:i=!0,dense:r=!1,orientation:a="both",direction:s,highlightedIndex:c,onHighlightedIndexChange:f,rootRef:p,enableHomeAndEndKeys:h=!1,stopEventPropagation:g=!1,disabledIndices:w,modifierKeys:k=iL}=e,[$,R]=_.useState(0),E=n>1,O=_.useRef(null),z=Di(O,p),P=_.useRef([]),N=_.useRef(!1),B=c??$,Z=it((fe,be=!1)=>{if((f??R)(fe),be){const ie=P.current[fe];x2(O.current,ie,s,a)}}),q=it(fe=>{if(fe.size===0||N.current)return;N.current=!0;const be=Array.from(fe.keys()),ie=be.find(re=>re==null?void 0:re.hasAttribute(Nw))??null,V=ie?be.indexOf(ie):-1;V!==-1&&Z(V),x2(O.current,ie,s,a)}),K=_.useMemo(()=>({"aria-orientation":a==="both"?void 0:a,ref:z,onFocus(fe){!O.current||!w2(fe.target)||fe.target.setSelectionRange(0,fe.target.value.length??0)},onKeyDown(fe){const be=h?q8:ZE;if(!be.has(fe.key)||aL(fe,k)||!O.current)return;const V=s==="rtl",re=V?yl:Ma,se={horizontal:re,vertical:ua,both:re}[a],ae=V?Ma:yl,F={horizontal:ae,vertical:Na,both:ae}[a];if(w2(fe.target)&&!Iy(fe.target)){const ge=fe.target.selectionStart,ce=fe.target.selectionEnd,ze=fe.target.value??"";if(ge==null||fe.shiftKey||ge!==ce||fe.key!==F&&ge<ze.length||fe.key!==se&&ge>0)return}let X=B;const Q=Th(P,w),ue=wy(P,w);if(E){const ge=t||Array.from({length:P.current.length},()=>({width:1,height:1})),ce=IR(ge,n,r),ze=ce.findIndex(De=>De!=null&&!gs(P,De,w)),$e=ce.reduce((De,et,qe)=>et!=null&&!gs(P,et,w)?qe:De,-1);X=ce[TR({current:ce.map(De=>De?P.current[De]:null)},{event:fe,orientation:a,loopFocus:i,cols:n,disabledIndices:OR([...w||P.current.map((De,et)=>gs(P,et)?et:void 0),void 0],ce),minIndex:ze,maxIndex:$e,prevIndex:zR(B>ue?Q:B,ge,ce,n,fe.key===ua?"bl":fe.key===Ma?"tr":"tl"),rtl:V})]}const he={horizontal:[re],vertical:[ua],both:[re,ua]}[a],Y={horizontal:[ae],vertical:[Na],both:[ae,Na]}[a],de=E?be:{horizontal:h?H8:VE,vertical:h?B8:FE,both:be}[a];h&&(fe.key===zs?X=Q:fe.key===Os&&(X=ue)),X===B&&(he.includes(fe.key)||Y.includes(fe.key))&&(i&&X===ue&&he.includes(fe.key)?X=Q:i&&X===Q&&Y.includes(fe.key)?X=ue:X=si(P,{startingIndex:X,decrement:Y.includes(fe.key),disabledIndices:w})),X!==B&&!_c(P,X)&&(g&&fe.stopPropagation(),de.has(fe.key)&&fe.preventDefault(),Z(X,!0),queueMicrotask(()=>{var ge;(ge=P.current[X])==null||ge.focus()}))}}),[n,r,s,w,P,h,B,E,t,i,z,k,Z,a,g]);return _.useMemo(()=>({props:K,highlightedIndex:B,onHighlightedIndexChange:Z,elementsRef:P,disabledIndices:w,onMapChange:q,relayKeyboardEvent:K.onKeyDown}),[K,B,Z,P,w,q])}function aL(e,t){for(const n of J8.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function pT(e){const{render:t,className:n,refs:i=sa,props:r=sa,state:a=$r,stateAttributesMapping:s,highlightedIndex:c,onHighlightedIndexChange:f,orientation:p,dense:h,itemSizes:g,loopFocus:w,cols:k,enableHomeAndEndKeys:$,onMapChange:R,stopEventPropagation:E=!0,rootRef:O,disabledIndices:z,modifierKeys:P,highlightItemOnHover:N=!1,tag:B="div",...Z}=e,q=Iu(),{props:K,highlightedIndex:fe,onHighlightedIndexChange:be,elementsRef:ie,onMapChange:V,relayKeyboardEvent:re}=oL({itemSizes:g,cols:k,loopFocus:w,dense:h,orientation:p,highlightedIndex:c,onHighlightedIndexChange:f,rootRef:O,stopEventPropagation:E,enableHomeAndEndKeys:$,direction:q,disabledIndices:z,modifierKeys:P}),se=Xt(B,e,{state:a,ref:i,props:[K,...r,Z],stateAttributesMapping:s}),ae=_.useMemo(()=>({highlightedIndex:fe,onHighlightedIndexChange:be,highlightItemOnHover:N,relayKeyboardEvent:re}),[fe,be,N,re]);return j.jsx(RE.Provider,{value:ae,children:j.jsx(Xf,{elementsRef:ie,onMapChange:F=>{R==null||R(F),V(F)},children:se})})}const lL=_.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0});function sL(e=!1){const t=_.useContext(lL);if(!t&&!e)throw new Error(En(86));return t}const uL=[HE],cL=_.forwardRef(function(t,n){const{render:i,className:r,disabled:a,readOnly:s,required:c,onValueChange:f,value:p,defaultValue:h,name:g,inputRef:w,id:k,...$}=t,{setTouched:R,setFocused:E,shouldValidateOnChange:O,validationMode:z,name:P,disabled:N,state:B,validation:Z,setDirty:q,setFilled:K,validityData:fe}=xo(),{labelId:be}=Sl(),{clearErrors:ie}=Eu(),V=sL(!0),re=N||a,se=P??g,ae=Fr(k),[F,X]=Vo({controlled:p,default:h,name:"RadioGroup",state:"value"}),Q=it(f),ue=it((ke,Ae)=>{Q(ke,Ae),!Ae.isCanceled&&X(ke)}),he=_.useRef(null),Y=_.useRef(null),de=_.useRef(null);function ge(ke){let Ae;return w&&(typeof w=="function"?Ae=w(ke):w.current=ke),Y.current=ke,Z.inputRef.current=ke,Ae}const ce=it((ke,Ae=!1)=>{if(ke){if(Ae){he.current===ke&&(he.current=null);return}he.current==null&&(he.current=ke)}}),ze=it(ke=>{if(!ke||ke.disabled)return;de.current||(de.current=ke);const Ae=Y.current;if(ke.checked||Ae==null||Ae.disabled)return ge(ke)});nd({id:ae,commit:Z.commit,value:F,controlRef:he,name:se,getValue:()=>F??null}),ml(F,()=>{ie(se),q(F!==fe.initialValue),K(F!=null),O()?Z.commit(F):Z.commit(F,!0);const ke=de.current;F==null&&ke&&!ke.disabled&&ge(ke)});const[$e,De]=_.useState(!1),et=$["aria-labelledby"]??be??(V==null?void 0:V.legendId),qe={...B,disabled:re??!1,required:c??!1,readOnly:s??!1},ft=_.useMemo(()=>({...B,checkedValue:F,disabled:re,validation:Z,name:se,onValueChange:Q,readOnly:s,registerControlRef:ce,registerInputRef:ze,required:c,setCheckedValue:ue,setTouched:De,touched:$e}),[F,re,Z,B,se,Q,s,ce,ze,c,ue,De,$e]),ht={role:"radiogroup","aria-required":c||void 0,"aria-disabled":re||void 0,"aria-readonly":s||void 0,"aria-labelledby":et,onFocus(){E(!0)},onBlur(ke){rn(ke.currentTarget,ke.relatedTarget)||(R(!0),E(!1),z==="onBlur"&&Z.commit(F))},onKeyDownCapture(ke){ke.key.startsWith("Arrow")&&(R(!0),De(!0),E(!0))}};return j.jsx(dT.Provider,{value:ft,children:j.jsx(pT,{render:i,className:r,state:qe,props:[ht,Z.getValidationProps,$],refs:[n],stateAttributesMapping:Is,enableHomeAndEndKeys:!1,modifierKeys:uL})})});function dL({className:e,...t}){return j.jsx(cL,{"data-slot":"radio-group",className:st("pf-radio-group w-full",e),...t})}function fL({className:e,...t}){return j.jsx(nL,{"data-slot":"radio-group-item",className:st("pf-radio-group-item group/radio-group-item peer relative aspect-square shrink-0 cursor-pointer border border-border outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:j.jsx(rL,{"data-slot":"radio-group-indicator",className:"pf-radio-group-indicator",children:j.jsx(iR,{className:"pf-radio-group-indicator-icon"})})})}let T2=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.indeterminate="data-indeterminate",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});function mT(e){return _.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[T2.checked]:""}:{[T2.unchecked]:""}},...Is}),[e.indeterminate])}const pL=_.createContext(void 0);function mL(e=!0){const t=_.useContext(pL);if(t===void 0&&!e)throw new Error(En(3));return t}const hT=_.createContext(void 0);function hL(){const e=_.useContext(hT);if(e===void 0)throw new Error(En(14));return e}const gL="data-parent",vL=_.forwardRef(function(t,n){const{checked:i,className:r,defaultChecked:a=!1,disabled:s=!1,id:c,indeterminate:f=!1,inputRef:p,name:h,onCheckedChange:g,parent:w=!1,readOnly:k=!1,render:$,required:R=!1,uncheckedValue:E,value:O,nativeButton:z=!1,...P}=t,{clearErrors:N}=Eu(),{disabled:B,name:Z,setDirty:q,setFilled:K,setFocused:fe,setTouched:be,state:ie,validationMode:V,validityData:re,shouldValidateOnChange:se,validation:ae}=xo(),F=cT(),{labelId:X,controlId:Q,registerControlId:ue,getDescriptionProps:he}=Sl(),Y=mL(),de=Y==null?void 0:Y.parent,ge=de&&Y.allValues,ce=B||F.disabled||(Y==null?void 0:Y.disabled)||s,ze=Z??h,$e=O??ze,De=Fr(),et=Fr();let qe=Q;ge?qe=w?et:`${de.id}-${$e}`:c&&(qe=c);let ft={};ge&&(w?ft=Y.parent.getParentProps():$e&&(ft=Y.parent.getChildProps($e)));const ht=it(g),{checked:ke=i,indeterminate:Ae=f,onCheckedChange:Fe,...Me}=ft,xe=Y==null?void 0:Y.value,ye=Y==null?void 0:Y.setValue,_e=Y==null?void 0:Y.defaultValue,Te=_.useRef(null),Ne=Vr(()=>Symbol("checkbox-control")),Le=_.useRef(!1),{getButtonProps:Ye,buttonRef:Je}=qo({disabled:ce,native:z}),Ze=(Y==null?void 0:Y.validation)??ae,[C,en]=Vo({controlled:$e&&xe&&!w?xe.includes($e):ke,default:$e&&_e&&!w?_e.includes($e):a,name:"Checkbox",state:"checked"});dt(()=>{ue!==or&&(Le.current=!0,ue(Ne.current,qe))},[qe,Y,ue,w,Ne]),_.useEffect(()=>{const Rt=Ne.current;return()=>{!Le.current||ue===or||(Le.current=!1,ue(Rt,void 0))}},[ue,Ne]),nd({enabled:!Y,id:De,commit:Ze.commit,value:C,controlRef:Te,name:ze,getValue:()=>C});const It=_.useRef(null),mt=Di(p,It,Ze.inputRef);dt(()=>{It.current&&(It.current.indeterminate=Ae,C&&K(!0))},[C,Ae,K]),ml(C,()=>{Y&&!w||(N(ze),K(C),q(C!==re.initialValue),se()?Ze.commit(C):Ze.commit(C,!0))});const $t=Ru({checked:C,disabled:ce,name:w?void 0:ze,id:z?void 0:qe??void 0,required:R,ref:mt,style:ze?Hf:gl,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(Rt){if(Rt.nativeEvent.defaultPrevented)return;const Vt=Rt.target.checked,dn=Et(Er,Rt.nativeEvent);if(Fe==null||Fe(Vt,dn),ht(Vt,dn),!dn.isCanceled&&(en(Vt),$e&&xe&&ye&&!w)){const kn=Vt?[...xe,$e]:xe.filter(pt=>pt!==$e);ye(kn,dn)}},onFocus(){var Rt;(Rt=Te.current)==null||Rt.focus()}},O!==void 0?{value:(Y?C&&O:O)||""}:$r,he,Y?Ze.getValidationProps:Ze.getInputValidationProps),Nt=ge?!!ke:C,Wt=ge&&Ae||f;_.useEffect(()=>{if(!de||!$e)return;const Rt=de.disabledStatesRef.current;return Rt.set($e,ce),()=>{Rt.delete($e)}},[de,ce,$e]);const qt=_.useMemo(()=>({...ie,checked:Nt,disabled:ce,readOnly:k,required:R,indeterminate:Wt}),[ie,Nt,ce,k,R,Wt]),Tn=mT(qt),bn=Xt("span",t,{state:qt,ref:[Je,Te,n,Y==null?void 0:Y.registerControlRef],props:[{id:z?qe??void 0:De,role:"checkbox","aria-checked":Ae?"mixed":C,"aria-readonly":k||void 0,"aria-required":R||void 0,"aria-labelledby":X,[gL]:w?"":void 0,onFocus(){fe(!0)},onBlur(){const Rt=It.current;Rt&&(be(!0),fe(!1),V==="onBlur"&&Ze.commit(Y?xe:Rt.checked))},onClick(Rt){var Vt;k||ce||(Rt.preventDefault(),(Vt=It.current)==null||Vt.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:Rt.shiftKey,ctrlKey:Rt.ctrlKey,altKey:Rt.altKey,metaKey:Rt.metaKey})))}},he,Ze.getValidationProps,P,Me,Ye],stateAttributesMapping:Tn});return j.jsxs(hT.Provider,{value:qt,children:[bn,!C&&!Y&&ze&&!w&&E!==void 0&&j.jsx("input",{type:"hidden",name:ze,value:E}),j.jsx("input",{...$t})]})}),bL=_.forwardRef(function(t,n){const{render:i,className:r,keepMounted:a=!1,...s}=t,c=hL(),f=c.checked||c.indeterminate,{mounted:p,transitionStatus:h,setMounted:g}=kl(f),w=_.useRef(null),k={...c,transitionStatus:h};Pi({open:f,ref:w,onComplete(){f||g(!1)}});const $=mT(c),R=_.useMemo(()=>({...$,...Ho,...Is}),[$]),E=a||p,O=Xt("span",t,{ref:[n,w],state:k,stateAttributesMapping:R,props:s});return E?O:null});function yL({className:e,...t}){return j.jsx(vL,{"data-slot":"checkbox",className:st("pf-checkbox peer relative shrink-0 cursor-pointer outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:j.jsx(bL,{"data-slot":"checkbox-indicator",className:"pf-checkbox-indicator grid place-content-center text-current transition-none",children:j.jsx(Qy,{className:"size-3.5"})})})}const gT=_.createContext(void 0);function wL(){const e=_.useContext(gT);if(e===void 0)throw new Error(En(63));return e}let I2=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const vT={...Is,checked(e){return e?{[I2.checked]:""}:{[I2.unchecked]:""}}},xL=_.forwardRef(function(t,n){const{checked:i,className:r,defaultChecked:a,id:s,inputRef:c,name:f,nativeButton:p=!1,onCheckedChange:h,readOnly:g=!1,required:w=!1,disabled:k=!1,render:$,uncheckedValue:R,value:E,...O}=t,{clearErrors:z}=Eu(),{state:P,setTouched:N,setDirty:B,validityData:Z,setFilled:q,setFocused:K,shouldValidateOnChange:fe,validationMode:be,disabled:ie,name:V,validation:re}=xo(),{labelId:se}=Sl(),ae=ie||k,F=V??f,X=it(h),Q=_.useRef(null),ue=Di(Q,c,re.inputRef),he=_.useRef(null),Y=Fr(),de=Tu({id:s,implicit:!1,controlRef:he}),ge=p?void 0:de,[ce,ze]=Vo({controlled:i,default:!!a,name:"Switch",state:"checked"});nd({id:Y,commit:re.commit,value:ce,controlRef:he,name:F,getValue:()=>ce}),dt(()=>{Q.current&&q(Q.current.checked)},[Q,q]),ml(ce,()=>{z(F),B(ce!==Z.initialValue),q(ce),fe()?re.commit(ce):re.commit(ce,!0)});const{getButtonProps:$e,buttonRef:De}=qo({disabled:ae,native:p}),et={id:p?de:Y,role:"switch","aria-checked":ce,"aria-readonly":g||void 0,"aria-required":w||void 0,"aria-labelledby":se,onFocus(){ae||K(!0)},onBlur(){const ke=Q.current;!ke||ae||(N(!0),K(!1),be==="onBlur"&&re.commit(ke.checked))},onClick(ke){var Ae;g||ae||(ke.preventDefault(),(Ae=Q.current)==null||Ae.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:ke.shiftKey,ctrlKey:ke.ctrlKey,altKey:ke.altKey,metaKey:ke.metaKey})))}},qe=_.useMemo(()=>Ru({checked:ce,disabled:ae,id:ge,name:F,required:w,style:F?Hf:gl,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:ue,onChange(ke){if(ke.nativeEvent.defaultPrevented)return;const Ae=ke.target.checked,Fe=Et(Er,ke.nativeEvent);X==null||X(Ae,Fe),!Fe.isCanceled&&ze(Ae)},onFocus(){var ke;(ke=he.current)==null||ke.focus()}},re.getInputValidationProps,E!==void 0?{value:E}:$r),[ce,ae,ue,ge,F,X,w,ze,re,E]),ft=_.useMemo(()=>({...P,checked:ce,disabled:ae,readOnly:g,required:w}),[P,ce,ae,g,w]),ht=Xt("span",t,{state:ft,ref:[n,he,De],props:[et,re.getValidationProps,O,$e],stateAttributesMapping:vT});return j.jsxs(gT.Provider,{value:ft,children:[ht,!ce&&F&&R!==void 0&&j.jsx("input",{type:"hidden",name:F,value:R}),j.jsx("input",{...qe})]})}),kL=_.forwardRef(function(t,n){const{render:i,className:r,...a}=t,{state:s}=xo(),c=wL(),f={...s,...c};return Xt("span",t,{state:f,ref:n,stateAttributesMapping:vT,props:a})});function SL({className:e,size:t="default",...n}){return j.jsx(xL,{"data-slot":"switch","data-size":t,className:st("pf-switch peer group/switch relative inline-flex cursor-pointer items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...n,children:j.jsx(kL,{"data-slot":"switch-thumb",className:"pf-switch-thumb pointer-events-none block ring-0 transition-transform"})})}function np({className:e,...t}){return j.jsx("label",{"data-slot":"label",className:st("pf-label flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed",e),...t})}function _L({optional:e,children:t,...n}){return j.jsxs(np,{...n,children:[t,e&&j.jsx("span",{className:"pf-label-optional",children:"optional"})]})}function $L({option:e,label:t,value:n,name:i,disabled:r,className:a}){const s=`radio-${i??"standalone"}-${e}`;return j.jsxs("div",{className:st("flex items-center space-x-2",a),children:[j.jsx("input",{type:"radio",id:s,name:i,value:e,defaultChecked:n,disabled:r,className:"h-4 w-4 border-border text-primary accent-primary"}),t&&j.jsx(np,{htmlFor:s,className:"cursor-pointer",children:t})]})}function CL({placeholder:e,name:t,size:n,side:i,align:r,disabled:a,invalid:s,className:c,value:f,onValueChange:p,_items:h=[],_selectChildren:g}){var N,B;const w=_.useMemo(()=>{if(g){const Z=[];for(const q of g)q._type==="item"&&Z.push(q),q._type==="group"&&Z.push(...q.items);return Z}return h},[g,h]),k=(N=w.find(Z=>Z.selected))==null?void 0:N.value,[$,R]=_.useState(f??k??"");_.useEffect(()=>{f!==void 0&&R(f)},[f]);const E=Z=>{R(Z),p==null||p(Z)},O=(B=w.find(Z=>Z.value===$))==null?void 0:B.label,z=f!==void 0?{value:$,onValueChange:E}:{defaultValue:k,onValueChange:E},P=Z=>j.jsx(K7,{value:Z.value,disabled:Z.disabled,children:Z.label},Z.value);return j.jsxs(Z7,{...z,disabled:a,name:t,children:[j.jsx(B7,{className:c,size:n,"aria-invalid":s||void 0,children:j.jsx(H7,{placeholder:e,children:O||null})}),j.jsx(q7,{side:i,align:r,children:g?g.map((Z,q)=>Z._type==="group"?j.jsxs(G7,{children:[Z.label&&j.jsx(R2,{children:Z.label}),Z.items.map(P)]},q):Z._type==="separator"?j.jsx(Y7,{},q):Z._type==="label"?j.jsx(R2,{children:Z.label},q):P(Z)):h.map(P)})]})}function RL({name:e,className:t,value:n,onValueChange:i,_items:r=[]}){var c;const a=(c=r.find(f=>f.value))==null?void 0:c.option,s=n!==void 0?{value:n,onValueChange:i}:{defaultValue:a,onValueChange:i};return j.jsx(dL,{...s,className:t,name:e,children:r.map(f=>{const p=`radio-${e??""}-${f.option}`;return j.jsxs("div",{className:"flex items-center space-x-2",children:[j.jsx(fL,{value:f.option,disabled:f.disabled,id:p}),f.label&&j.jsx(np,{htmlFor:p,className:"cursor-pointer",children:f.label})]},f.option)})})}function EL({label:e,value:t,name:n,disabled:i,className:r,onCheckedChange:a}){const s=n?`checkbox-${n}`:void 0,[c,f]=_.useState(t??!1);_.useEffect(()=>{t!==void 0&&f(t)},[t]);const p=g=>{f(g),a==null||a(g)},h=j.jsx(yL,{id:s,checked:c,onCheckedChange:p,disabled:i,name:n,className:r});return e?j.jsxs("div",{className:"flex items-center space-x-2",children:[h,j.jsx(np,{htmlFor:s,className:"cursor-pointer",children:e})]}):h}function TL({label:e,value:t,size:n,name:i,disabled:r,className:a,onCheckedChange:s}){const c=i?`switch-${i}`:void 0,[f,p]=_.useState(t??!1);_.useEffect(()=>{t!==void 0&&p(t)},[t]);const h=w=>{p(w),s==null||s(w)},g=j.jsx(SL,{id:c,checked:f,onCheckedChange:h,disabled:r,name:i,size:n});return e?j.jsxs("div",{className:st("flex items-center space-x-2",a),children:[g,j.jsx(np,{htmlFor:c,className:"cursor-pointer",children:e})]}):g}function IL({orientation:e="horizontal",className:t,children:n}){return j.jsx("div",{role:"group","data-slot":"button-group","data-orientation":e,className:st("pf-button-group flex w-fit items-stretch",e==="horizontal"?"pf-button-group-orientation-horizontal":"pf-button-group-orientation-vertical flex-col",t),children:n})}function zL(e){return new Promise((t,n)=>{const i=new FileReader;i.onload=()=>{const a=i.result.split(",",2)[1]??"";t(a)},i.onerror=()=>n(i.error),i.readAsDataURL(e)})}async function bT(e,t={}){const n=Array.from(e),i=[];for(const r of n){if(t.maxSize&&r.size>t.maxSize){const s=(t.maxSize/1048576).toFixed(1);uu.error(`File "${r.name}" exceeds ${s}MB limit`);continue}const a=await zL(r);i.push({name:r.name,size:r.size,type:r.type,data:a})}return i}function yT(e,t){if(!t)return e;const n=t.split(",").map(r=>r.trim().toLowerCase()).filter(Boolean);if(n.includes("*/*"))return e;const i=[];for(const r of e){const a=r.type.toLowerCase(),s=r.name.toLowerCase();n.some(f=>f.startsWith(".")?s.endsWith(f):f.endsWith("/*")?a.startsWith(f.slice(0,-1)):a===f)?i.push(r):uu.error(`File "${r.name}" doesn't match accepted types (${t})`)}return i}function OL({icon:e,label:t,description:n,accept:i,multiple:r=!1,maxSize:a,disabled:s=!1,className:c,onChange:f}){const[p,h]=_.useState(!1),g=_.useRef(null),w=_.useCallback(async N=>{const B=yT(N,i),Z=await bT(B,{maxSize:a});Z.length>0&&(f==null||f(Z))},[i,a,f]),k=_.useCallback(N=>{N.preventDefault(),N.stopPropagation(),s||h(!0)},[s]),$=_.useCallback(N=>{N.preventDefault(),N.stopPropagation(),h(!1)},[]),R=_.useCallback(N=>{if(N.preventDefault(),N.stopPropagation(),h(!1),s)return;const B=Array.from(N.dataTransfer.files);B.length>0&&w(B)},[s,w]),E=_.useCallback(N=>{const B=Array.from(N.target.files??[]);B.length>0&&w(B),N.target.value=""},[w]),O=_.useCallback(()=>{var N;s||(N=g.current)==null||N.click()},[s]),z=_.useCallback(N=>{var B;(N.key==="Enter"||N.key===" ")&&!s&&(N.preventDefault(),(B=g.current)==null||B.click())},[s]),P=pg(e??"upload");return j.jsxs("div",{role:"button",tabIndex:s?-1:0,onClick:O,onKeyDown:z,onDragOver:k,onDragLeave:$,onDrop:R,className:st("w-full flex flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed px-6 py-8 text-center transition-colors cursor-pointer",p?"border-primary bg-primary/5":"border-muted-foreground/25 hover:border-muted-foreground/50",s&&"pointer-events-none opacity-50",c),children:[P&&j.jsx(P,{className:"size-6 text-muted-foreground"}),j.jsxs("div",{className:"flex flex-col gap-1",children:[j.jsx("p",{className:"text-sm font-medium text-foreground",children:t??"Drop files here or click to browse"}),n&&j.jsx("p",{className:"text-xs text-muted-foreground",children:n})]}),j.jsx("input",{ref:g,type:"file",accept:i,multiple:r,disabled:s,onChange:E,className:"hidden"})]})}function AL({className:e,cssClass:t,children:n}){return j.jsx("div",{className:st("flex flex-row",e,t),children:n})}function NL({className:e,cssClass:t,children:n}){return j.jsx("div",{className:st("flex w-full min-w-0 flex-col",e,t),children:n})}function ML({className:e,cssClass:t,children:n,minColumnWidth:i,columnTemplate:r}){const a=r?{gridTemplateColumns:r}:i?{gridTemplateColumns:`repeat(auto-fit, minmax(${i}, 1fr))`}:void 0;return j.jsx("div",{className:st("grid w-full",e,t),style:a,children:n})}function DL({className:e,cssClass:t,children:n,colSpan:i=1,rowSpan:r=1}){const a={...i!==1?{gridColumnEnd:`span ${i}`}:{},...r!==1?{gridRowEnd:`span ${r}`}:{}};return j.jsx("div",{className:st("min-w-0 min-h-0",e,t),style:Object.keys(a).length>0?a:void 0,children:n})}function PL({className:e,cssClass:t,children:n,onSubmit:i}){return j.jsx("form",{className:st("flex w-full flex-col",e,t),onSubmit:r=>{r.preventDefault(),i==null||i(r)},children:n})}function jL({className:e,cssClass:t,children:n}){return j.jsx("div",{className:st("container mx-auto px-4 sm:px-6 lg:px-8",e,t),children:n})}function UL({className:e,cssClass:t,style:n,children:i}){return j.jsx("div",{className:st(e,t),style:n,children:i})}function LL({className:e,cssClass:t,children:n,columns:i=12,rowHeight:r=120,rows:a}){const s={gridTemplateColumns:`repeat(${i}, 1fr)`,...a?{gridTemplateRows:`repeat(${a}, 1fr)`}:{gridAutoRows:typeof r=="number"?`${r}px`:r}};return j.jsx("div",{className:st("grid w-full",e,t),style:s,children:n})}function VL({className:e,cssClass:t,children:n,col:i=1,row:r=1,colSpan:a=1,rowSpan:s=1,zIndex:c}){const f={gridColumn:`${i} / span ${a}`,gridRow:`${r} / span ${s}`,...c!=null?{zIndex:c}:{}};return j.jsx("div",{className:st("min-w-0 min-h-0",e,t),style:f,children:n})}function FL({className:e,cssClass:t,style:n,children:i,content:r,text:a,code:s,bold:c,italic:f}){const p=s?"code":"span";return j.jsx(p,{className:st(s&&"pf-code relative rounded px-[0.3rem] py-[0.2rem] font-mono text-sm font-medium",c&&"font-bold",f&&"italic",e,t),style:n,children:i??r??a})}function ZL({className:e,cssClass:t,style:n,children:i,content:r,text:a,href:s,target:c,code:f,bold:p,italic:h}){const g=c==="_blank"?"noopener noreferrer":void 0;return j.jsx("a",{href:s,target:c??void 0,rel:g,className:st("font-medium text-primary underline underline-offset-4",f&&"pf-code relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm",p&&"font-bold",h&&"italic",e,t),style:n,children:i??r??a})}function HL({text:e,content:t,className:n,cssClass:i,bold:r,italic:a,children:s}){return j.jsx("span",{className:st(r&&"font-bold",a&&"italic",n,i),children:s??e??t})}const BL={1:"scroll-m-20 text-4xl font-bold tracking-tight m-0",2:"scroll-m-20 text-3xl font-semibold tracking-tight m-0",3:"scroll-m-20 text-2xl font-semibold tracking-tight m-0",4:"scroll-m-20 text-xl font-semibold tracking-tight m-0"};function rp({level:e=1,text:t,content:n,className:i,cssClass:r,bold:a,italic:s,children:c}){const f=`h${e}`;return j.jsx(f,{className:st(BL[e],a&&"font-bold",s&&"italic",i,r),children:c??t??n})}function qL(e){return j.jsx(rp,{level:1,...e})}function GL(e){return j.jsx(rp,{level:2,...e})}function KL(e){return j.jsx(rp,{level:3,...e})}function YL(e){return j.jsx(rp,{level:4,...e})}function JL({className:e,cssClass:t,bold:n,italic:i,children:r,...a}){return j.jsx("p",{className:st("leading-7 m-0",n&&"font-bold",i&&"italic",e,t),children:r??a.text??a.content})}function XL({className:e,cssClass:t,bold:n,italic:i,children:r,...a}){return j.jsx("p",{className:st("text-xl text-muted-foreground m-0",n&&"font-bold",i&&"italic",e,t),children:r??a.text??a.content})}function WL({className:e,cssClass:t,bold:n,italic:i,children:r,...a}){return j.jsx("div",{className:st("text-lg font-semibold",n&&"font-bold",i&&"italic",e,t),children:r??a.text??a.content})}function QL({className:e,cssClass:t,bold:n,italic:i,children:r,...a}){return j.jsx("small",{className:st("text-sm font-medium leading-none",n&&"font-bold",i&&"italic",e,t),children:r??a.text??a.content})}function eV({className:e,cssClass:t,bold:n,italic:i,children:r,...a}){return j.jsx("p",{className:st("text-sm text-muted-foreground m-0",n&&"font-bold",i&&"italic",e,t),children:r??a.text??a.content})}function tV({className:e,cssClass:t,bold:n,italic:i,children:r,...a}){return j.jsx("blockquote",{className:st("border-l-2 border-border pl-6 italic m-0",n&&"font-bold",i&&"italic",e,t),children:r??a.text??a.content})}function nV({url:e,html:t,width:n,height:i,sandbox:r,allow:a,className:s,cssClass:c}){const f={border:"none"};return n&&(f.width=n),i&&(f.height=i),j.jsx("iframe",{src:e,srcDoc:t,sandbox:r,allow:a,style:f,className:st(s,c)})}function rV({src:e,alt:t="",width:n,height:i,className:r,cssClass:a}){const s={};return n&&(s.width=n),i&&(s.height=i),j.jsx("img",{src:e,alt:t,style:Object.keys(s).length>0?s:void 0,className:st(r,a)})}function iV({src:e,poster:t,controls:n=!0,autoplay:i=!1,loop:r=!1,muted:a=!1,width:s,height:c,className:f,cssClass:p}){const h={};return s&&(h.width=s),c&&(h.height=c),j.jsx("video",{src:e,poster:t,controls:n,autoPlay:i,loop:r,muted:a,style:Object.keys(h).length>0?h:void 0,className:st(f,p)})}function oV({src:e,controls:t=!0,autoplay:n=!1,loop:i=!1,muted:r=!1,className:a,cssClass:s}){return j.jsx("audio",{src:e,controls:t,autoPlay:n,loop:i,muted:r,className:st(a,s)})}function aV(e){if(typeof e=="number")return e>0?"up":e<0?"down":"neutral";const t=e.trim();if(t.startsWith("-")||t.startsWith("−"))return"down";if(t.startsWith("+"))return"up";const n=parseFloat(t.replace(/[^0-9.\-]/g,""));if(!isNaN(n)){if(n>0)return"up";if(n<0)return"down"}return"neutral"}function lV(e){return e==="up"?"positive":e==="down"?"negative":"neutral"}const sV={positive:"success",negative:"destructive",neutral:"secondary"},uV={up:AD,down:zD,neutral:TD};function cV({label:e,value:t,description:n,delta:i,trend:r,trendSentiment:a,className:s,cssClass:c}){const f=r??(i!=null?aV(i):void 0),p=a??(f!=null?lV(f):void 0),h=f!=null?uV[f]:null,g=p!=null?sV[p]:"secondary";return j.jsxs("div",{className:st("flex flex-col gap-1",s,c),children:[j.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:e}),j.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[j.jsx("span",{className:"text-3xl font-bold tracking-tight leading-none",children:String(t)}),i!=null&&j.jsxs(sR,{variant:g,className:"gap-1 text-xs font-medium translate-y-px",children:[h&&j.jsx(h,{className:"size-3"}),String(i)]})]}),n&&j.jsx("p",{className:"text-sm text-muted-foreground",children:n})]})}const z2={sm:64,default:96,lg:128},O2={sm:"pf-ring-label pf-ring-label-sm",default:"pf-ring-label pf-ring-label-default",lg:"pf-ring-label pf-ring-label-lg"},A2={default:"pf-ring-variant-default",success:"pf-ring-variant-success",warning:"pf-ring-variant-warning",destructive:"pf-ring-variant-destructive",info:"pf-ring-variant-info",muted:"pf-ring-variant-muted"};function dV({value:e=0,target:t,label:n,variant:i="default",size:r="default",thickness:a=6,indicatorClassName:s,targetClassName:c,className:f,cssClass:p,children:h}){const g=z2[r]??z2.default,w=g/2,k=w-a/2,$=2*Math.PI*k,R=Math.max(0,Math.min(100,e)),E=$*(1-R/100),O=t!=null?Math.max(0,Math.min(100,t)):void 0;let z=null;if(O!=null){const N=O/100*360*Math.PI/180,B=a+4,Z=k-B/2,q=k+B/2;z=j.jsx("line",{className:st("pf-ring-target",c),x1:w+Z*Math.cos(N),y1:w+Z*Math.sin(N),x2:w+q*Math.cos(N),y2:w+q*Math.sin(N),strokeWidth:2,strokeLinecap:"round"})}return j.jsxs("div",{className:st("pf-ring group inline-flex items-center justify-center overflow-visible",f,p),role:"meter","aria-valuenow":R,"aria-valuemin":0,"aria-valuemax":100,"aria-label":n??`${Math.round(R)}%`,style:{width:g,height:g},children:[j.jsxs("svg",{width:g,height:g,viewBox:`0 0 ${g} ${g}`,className:"pf-ring-svg",overflow:"visible",style:{transform:"rotate(-90deg)"},children:[j.jsxs("defs",{children:[j.jsxs("linearGradient",{id:"ring-gradient-default",x1:"0",y1:"0",x2:"1",y2:"1",children:[j.jsx("stop",{offset:"0%",style:{stopColor:"var(--primary)"}}),j.jsx("stop",{offset:"100%",style:{stopColor:"oklch(from var(--primary) calc(l - 0.12) c h)"}})]}),j.jsxs("linearGradient",{id:"ring-gradient-success",x1:"0",y1:"0",x2:"1",y2:"1",children:[j.jsx("stop",{offset:"0%",style:{stopColor:"var(--success)"}}),j.jsx("stop",{offset:"100%",style:{stopColor:"oklch(from var(--success) calc(l - 0.12) c h)"}})]}),j.jsxs("linearGradient",{id:"ring-gradient-warning",x1:"0",y1:"0",x2:"1",y2:"1",children:[j.jsx("stop",{offset:"0%",style:{stopColor:"var(--warning)"}}),j.jsx("stop",{offset:"100%",style:{stopColor:"oklch(from var(--warning) calc(l - 0.12) c h)"}})]}),j.jsxs("linearGradient",{id:"ring-gradient-destructive",x1:"0",y1:"0",x2:"1",y2:"1",children:[j.jsx("stop",{offset:"0%",style:{stopColor:"var(--destructive)"}}),j.jsx("stop",{offset:"100%",style:{stopColor:"oklch(from var(--destructive) calc(l - 0.12) c h)"}})]}),j.jsxs("linearGradient",{id:"ring-gradient-info",x1:"0",y1:"0",x2:"1",y2:"1",children:[j.jsx("stop",{offset:"0%",style:{stopColor:"var(--info)"}}),j.jsx("stop",{offset:"100%",style:{stopColor:"oklch(from var(--info) calc(l - 0.12) c h)"}})]})]}),j.jsx("circle",{className:"pf-ring-track",cx:w,cy:w,r:k,strokeWidth:a}),j.jsx("circle",{className:st("pf-ring-fill",A2[i]??A2.default,s),cx:w,cy:w,r:k,strokeWidth:a,strokeDasharray:$,strokeDashoffset:E,strokeLinecap:"round"}),z]}),h?j.jsx("div",{className:"pf-ring-label-overlay absolute inset-0 flex items-center justify-center",children:h}):n&&j.jsx("span",{className:st("pf-ring-label-overlay absolute",O2[r]??O2.default),children:n})]})}function fV({children:e}){return j.jsx(j.Fragment,{children:e})}function pV({children:e}){return j.jsx(j.Fragment,{children:e})}function mV({children:e}){return j.jsx(j.Fragment,{children:e})}function wT(){return globalThis.__prefab_handlers??{}}function hV(e){var t;return(t=wT().pipes)==null?void 0:t[e]}function gV(e){var t;return(t=wT().actions)==null?void 0:t[e]}const vV={percent(e,t){const n=Number(e);if(isNaN(n))return String(e);const i=t!=null?parseInt(String(t)):0;return`${(n*100).toFixed(i)}%`},number(e,t){const n=Number(e);if(isNaN(n))return String(e);const i=t!=null?parseInt(String(t)):void 0;return n.toLocaleString("en-US",{minimumFractionDigits:i,maximumFractionDigits:i})},compact(e,t){const n=Number(e);if(isNaN(n))return String(e);const i=t!=null?parseInt(String(t)):void 0;return n.toLocaleString("en-US",{notation:"compact",maximumFractionDigits:i})},currency(e,t){const n=Number(e);if(isNaN(n))return String(e);const i=String(t??"USD");return n.toLocaleString("en-US",{style:"currency",currency:i})},date(e,t){const n=new Date(String(e));if(isNaN(n.getTime()))return String(e);const i=String(t??"medium");return i==="short"?n.toLocaleDateString("en-US"):i==="long"?n.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}):n.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})},time(e){const t=new Date(String(e));if(isNaN(t.getTime())){const n=new Date(`1970-01-01T${e}`);return isNaN(n.getTime())?String(e):n.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"})}return t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"})},datetime(e){const t=new Date(String(e));return isNaN(t.getTime())?String(e):t.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})},upper(e){return String(e).toUpperCase()},lower(e){return String(e).toLowerCase()},length(e){return Array.isArray(e)||typeof e=="string"?e.length:0},join(e,t){return Array.isArray(e)?e.join(String(t??", ")):String(e)},truncate(e,t){const n=String(e),i=t!=null?parseInt(String(t)):0;return i>0&&n.length>i?n.slice(0,i)+"...":n},default(e,t){return e??(t===void 0?"":t)},first(e){return Array.isArray(e)?e[0]:e},last(e){return Array.isArray(e)?e[e.length-1]:e},abs(e){const t=Number(e);return isNaN(t)?e:Math.abs(t)},round(e,t){const n=Number(e);if(isNaN(n))return e;const i=t!=null?parseInt(String(t)):0,r=Math.pow(10,i);return Math.round(n*r)/r},selectattr(e,t){if(!Array.isArray(e)||!t)return e;const n=String(t);return e.filter(i=>i!=null&&typeof i=="object"&&!!i[n])},rejectattr(e,t){if(!Array.isArray(e)||!t)return e;const n=String(t);return e.filter(i=>i!=null&&typeof i=="object"&&!i[n])},pluralize(e,t){const n=Number(e),i=String(t??"item");return n===1?i:i+"s"}};function bV(e){const t=[];let n=0;for(;n<e.length;){if(/\s/.test(e[n])){n++;continue}const i=e.slice(n,n+2);if(["==","!=",">=","<=","||","&&"].includes(i)){t.push({type:"op",value:i}),n+=2;continue}const r=e[n];if(r===">"||r==="<"){t.push({type:"op",value:r}),n++;continue}if(r==="+"||r==="-"||r==="*"||r==="/"||r==="%"){t.push({type:"op",value:r}),n++;continue}if(r==="!"){t.push({type:"not",value:"!"}),n++;continue}if(r==="("||r===")"){t.push({type:"paren",value:r}),n++;continue}if(r==="|"){t.push({type:"pipe",value:"|"}),n++;continue}if(r==="?"){t.push({type:"question",value:"?"}),n++;continue}if(r===":"){t.push({type:"colon",value:":"}),n++;continue}if(r==="'"){let a="";for(n++;n<e.length&&e[n]!=="'";)a+=e[n],n++;n++,t.push({type:"string",value:a});continue}if(/\d/.test(r)||r==="."&&n+1<e.length&&/\d/.test(e[n+1])){let a="";for(;n<e.length&&/[\d.]/.test(e[n]);)a+=e[n],n++;t.push({type:"number",value:a});continue}if(/[a-zA-Z_$]/.test(r)){let a="";for(;n<e.length&&/[a-zA-Z0-9_.$]/.test(e[n]);)a+=e[n],n++;a==="true"||a==="false"?t.push({type:"bool",value:a}):a==="null"?t.push({type:"null",value:a}):a==="not"?t.push({type:"not",value:"!"}):a==="and"?t.push({type:"op",value:"&&"}):a==="or"?t.push({type:"op",value:"||"}):t.push({type:"ident",value:a});continue}throw new Error(`Unexpected character: ${r}`)}return t.push({type:"end",value:""}),t}class yV{constructor(t,n){Jt(this,"tokens");Jt(this,"pos",0);Jt(this,"ctx");this.tokens=t,this.ctx=n}peek(){return this.tokens[this.pos]}advance(){return this.tokens[this.pos++]}expect(t,n){const i=this.advance();if(i.type!==t||n!==void 0&&i.value!==n)throw new Error(`Expected ${t}${n?` '${n}'`:""}, got ${i.type} '${i.value}'`);return i}expectEnd(){if(this.peek().type!=="end")throw new Error(`Unexpected token: ${this.peek().value}`)}parseExpr(){return this.parsePipe()}parsePipe(){let t=this.parseTernary();for(;this.peek().type==="pipe";){this.advance();const n=this.peek();if(n.type==="ident"){const i=this.advance().value;let r;if(this.peek().type==="colon"){this.advance();const s=this.advance();s.type==="bool"?r=s.value==="true":s.type==="number"?r=parseFloat(s.value):s.type==="null"?r=null:r=s.value}const a=vV[i]??hV(i);a&&(t=a(t,r))}else if(n.type==="string"||n.type==="number"||n.type==="bool"||n.type==="null"){const i=this.advance();t==null&&(i.type==="number"?t=parseFloat(i.value):i.type==="bool"?t=i.value==="true":i.type==="null"?t=null:t=i.value)}else throw new Error(`Expected pipe name or default value, got ${n.type}`)}return t}parseTernary(){const t=this.parseOr();if(this.peek().type==="question"){this.advance();const n=this.parseExpr();this.expect("colon");const i=this.parseExpr();return t?n:i}return t}parseOr(){let t=this.parseAnd();for(;this.peek().type==="op"&&this.peek().value==="||";){this.advance();const n=this.parseAnd();t=t||n}return t}parseAnd(){let t=this.parseNot();for(;this.peek().type==="op"&&this.peek().value==="&&";){this.advance();const n=this.parseNot();t=t&&n}return t}parseNot(){return this.peek().type==="not"?(this.advance(),!this.parseNot()):this.parseComp()}parseComp(){const t=this.parseAdd(),n=this.peek();if(n.type==="op"&&["==","!=",">",">=","<","<="].includes(n.value)){this.advance();const i=this.parseAdd();switch(n.value){case"==":return t==i;case"!=":return t!=i;case">":return t>i;case">=":return t>=i;case"<":return t<i;case"<=":return t<=i}}return t}parseAdd(){let t=this.parseMul();for(;this.peek().type==="op"&&(this.peek().value==="+"||this.peek().value==="-");){const n=this.advance().value,i=this.parseMul();n==="+"?typeof t=="string"||typeof i=="string"?t=String(t)+String(i):t=Number(t)+Number(i):t=Number(t)-Number(i)}return t}parseMul(){let t=this.parseUnary();for(;this.peek().type==="op"&&(this.peek().value==="*"||this.peek().value==="/"||this.peek().value==="%");){const n=this.advance().value,i=this.parseUnary();n==="*"?t=Number(t)*Number(i):n==="/"?t=Number(t)/Number(i):t=Number(t)%Number(i)}return t}parseUnary(){const t=this.peek();if(t.type==="op"&&(t.value==="-"||t.value==="+")){this.advance();const n=this.parseUnary();return t.value==="-"?-Number(n):+Number(n)}return this.parsePrimary()}parsePrimary(){const t=this.peek();if(t.type==="paren"&&t.value==="("){this.advance();const n=this.parseExpr();return this.expect("paren",")"),n}if(t.type==="number")return this.advance(),parseFloat(t.value);if(t.type==="string")return this.advance(),t.value;if(t.type==="bool")return this.advance(),t.value==="true";if(t.type==="null")return this.advance(),null;if(t.type==="ident")return this.advance(),this.resolve(t.value);throw new Error(`Unexpected token: ${t.type} '${t.value}'`)}resolve(t){const n=t.split(".");let i=this.ctx;for(const r of n){if(i==null)return;if(r==="length"&&(Array.isArray(i)||typeof i=="string"))return i.length;if(typeof i!="object")return;i=i[r]}return i}}function zy(e,t){const n=bV(e),i=new yV(n,t),r=i.parseExpr();return i.expectEnd(),r}function wV(e){const t=e.trim();if(!t.startsWith("{{")||!t.endsWith("}}"))return null;const n=t.slice(2,-2);return n.includes("{{")||n.includes("}}")?null:n.trim()}function jo(e,t){if(!e.includes("{{"))return e;const n=wV(e);if(n!==null)try{const a=zy(n,t);return a===void 0?e:a}catch{return e}let i="",r=0;for(;r<e.length;){const a=e.indexOf("{{",r);if(a===-1){i+=e.slice(r);break}i+=e.slice(r,a);const s=e.indexOf("}}",a+2);if(s===-1){i+=e.slice(a);break}const c=e.slice(a+2,s).trim();try{const f=zy(c,t);f!==void 0&&(i+=String(f))}catch{}r=s+2}return i}function mu(e,t){const n={};for(const[i,r]of Object.entries(e))typeof r=="string"?n[i]=jo(r,t):Array.isArray(r)?n[i]=r.map(a=>typeof a=="object"&&a!==null?mu(a,t):typeof a=="string"?jo(a,t):a):typeof r=="object"&&r!==null?n[i]=mu(r,t):n[i]=r;return n}/**
|
|
1168
1168
|
* table-core
|
|
1169
1169
|
*
|
|
1170
1170
|
* Copyright (c) TanStack
|
|
@@ -1284,7 +1284,7 @@ Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Rec
|
|
|
1284
1284
|
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);pe.object({method:pe.literal("ui/open-link"),params:pe.object({url:pe.string().describe("URL to open in the host's browser")})});var Nre=pe.object({isError:pe.boolean().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),Mre=pe.object({isError:pe.boolean().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough();pe.object({method:pe.literal("ui/notifications/sandbox-proxy-ready"),params:pe.object({})});var y1=pe.object({connectDomains:pe.array(pe.string()).optional().describe("Origins for network requests (fetch/XHR/WebSocket)."),resourceDomains:pe.array(pe.string()).optional().describe("Origins for static resources (scripts, images, styles, fonts)."),frameDomains:pe.array(pe.string()).optional().describe("Origins for nested iframes (frame-src directive)."),baseUriDomains:pe.array(pe.string()).optional().describe("Allowed base URIs for the document (base-uri directive).")}),w1=pe.object({camera:pe.object({}).optional().describe("Request camera access (Permission Policy `camera` feature)."),microphone:pe.object({}).optional().describe("Request microphone access (Permission Policy `microphone` feature)."),geolocation:pe.object({}).optional().describe("Request geolocation access (Permission Policy `geolocation` feature)."),clipboardWrite:pe.object({}).optional().describe("Request clipboard write access (Permission Policy `clipboard-write` feature).")});pe.object({method:pe.literal("ui/notifications/size-changed"),params:pe.object({width:pe.number().optional().describe("New width in pixels."),height:pe.number().optional().describe("New height in pixels.")})});var Dre=pe.object({method:pe.literal("ui/notifications/tool-input"),params:pe.object({arguments:pe.record(pe.string(),pe.unknown().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),Pre=pe.object({method:pe.literal("ui/notifications/tool-input-partial"),params:pe.object({arguments:pe.record(pe.string(),pe.unknown().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),jre=pe.object({method:pe.literal("ui/notifications/tool-cancelled"),params:pe.object({reason:pe.string().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),Ure=pe.object({fonts:pe.string().optional()}),Lre=pe.object({variables:Are.optional().describe("CSS variables for theming the app."),css:Ure.optional().describe("CSS blocks that apps can inject.")}),Vre=pe.object({method:pe.literal("ui/resource-teardown"),params:pe.object({})});pe.record(pe.string(),pe.unknown());var zC=pe.object({text:pe.object({}).optional().describe("Host supports text content blocks."),image:pe.object({}).optional().describe("Host supports image content blocks."),audio:pe.object({}).optional().describe("Host supports audio content blocks."),resource:pe.object({}).optional().describe("Host supports resource content blocks."),resourceLink:pe.object({}).optional().describe("Host supports resource link content blocks."),structuredContent:pe.object({}).optional().describe("Host supports structured content.")}),Fre=pe.object({experimental:pe.object({}).optional().describe("Experimental features (structure TBD)."),openLinks:pe.object({}).optional().describe("Host supports opening external URLs."),serverTools:pe.object({listChanged:pe.boolean().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:pe.object({listChanged:pe.boolean().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:pe.object({}).optional().describe("Host accepts log messages."),sandbox:pe.object({permissions:w1.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:y1.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:zC.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:zC.optional().describe("Host supports receiving content messages (ui/message) from the view.")}),Zre=pe.object({experimental:pe.object({}).optional().describe("Experimental features (structure TBD)."),tools:pe.object({listChanged:pe.boolean().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:pe.array(Ff).optional().describe("Display modes the app supports.")});pe.object({method:pe.literal("ui/notifications/initialized"),params:pe.object({}).optional()});pe.object({csp:y1.optional().describe("Content Security Policy configuration."),permissions:w1.optional().describe("Sandbox permissions requested by the UI."),domain:pe.string().optional().describe("Dedicated origin for view sandbox."),prefersBorder:pe.boolean().optional().describe("Visual boundary preference - true if UI prefers a visible border.")});pe.object({method:pe.literal("ui/request-display-mode"),params:pe.object({mode:Ff.describe("The display mode being requested.")})});var Hre=pe.object({mode:Ff.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),Bre=pe.union([pe.literal("model"),pe.literal("app")]).describe("Tool visibility scope - who can access the tool.");pe.object({resourceUri:pe.string().optional(),visibility:pe.array(Bre).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
1285
1285
|
- "model": Tool visible to and callable by the agent
|
|
1286
1286
|
- "app": Tool callable by the app from this server only`)});pe.object({mimeTypes:pe.array(pe.string()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')});pe.object({method:pe.literal("ui/message"),params:pe.object({role:pe.literal("user").describe('Message role, currently only "user" is supported.'),content:pe.array(fp).describe("Message content blocks (text, image, etc.).")})});pe.object({method:pe.literal("ui/notifications/sandbox-resource-ready"),params:pe.object({html:pe.string().describe("HTML content to load into the inner iframe."),sandbox:pe.string().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:y1.optional().describe("CSP configuration from resource metadata."),permissions:w1.optional().describe("Sandbox permissions from resource metadata.")})});var qre=pe.object({method:pe.literal("ui/notifications/tool-result"),params:qg.describe("Standard MCP tool execution result.")}),s3=pe.object({toolInfo:pe.object({id:ap.optional().describe("JSON-RPC id of the tools/call request."),tool:Sx.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:zre.optional().describe("Current color theme preference."),styles:Lre.optional().describe("Style configuration for theming the app."),displayMode:Ff.optional().describe("How the UI is currently displayed."),availableDisplayModes:pe.array(Ff).optional().describe("Display modes the host supports."),containerDimensions:pe.union([pe.object({height:pe.number().describe("Fixed container height in pixels.")}),pe.object({maxHeight:pe.union([pe.number(),pe.undefined()]).optional().describe("Maximum container height in pixels.")})]).and(pe.union([pe.object({width:pe.number().describe("Fixed container width in pixels.")}),pe.object({maxWidth:pe.union([pe.number(),pe.undefined()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
|
|
1287
|
-
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:pe.string().optional().describe("User's language and region preference in BCP 47 format."),timeZone:pe.string().optional().describe("User's timezone in IANA format."),userAgent:pe.string().optional().describe("Host application identifier."),platform:pe.union([pe.literal("web"),pe.literal("desktop"),pe.literal("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:pe.object({touch:pe.boolean().optional().describe("Whether the device supports touch input."),hover:pe.boolean().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:pe.object({top:pe.number().describe("Top safe area inset in pixels."),right:pe.number().describe("Right safe area inset in pixels."),bottom:pe.number().describe("Bottom safe area inset in pixels."),left:pe.number().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),Gre=pe.object({method:pe.literal("ui/notifications/host-context-changed"),params:s3.describe("Partial context update containing only changed fields.")});pe.object({method:pe.literal("ui/update-model-context"),params:pe.object({content:pe.array(fp).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:pe.record(pe.string(),pe.unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})});pe.object({method:pe.literal("ui/initialize"),params:pe.object({appInfo:Hg.describe("App identification (name and version)."),appCapabilities:Zre.describe("Features and capabilities this app provides."),protocolVersion:pe.string().describe("Protocol version this app supports.")})});var Kre=pe.object({protocolVersion:pe.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:Hg.describe("Host application identification and version."),hostCapabilities:Fre.describe("Features and capabilities provided by the host."),hostContext:s3.describe("Rich context about the host environment.")}).passthrough();class Yre extends JQ{constructor(n,i={},r={autoResize:!0}){super(r);Jt(this,"_appInfo");Jt(this,"_capabilities");Jt(this,"options");Jt(this,"_hostCapabilities");Jt(this,"_hostInfo");Jt(this,"_hostContext");Jt(this,"sendOpenLink",this.openLink);this._appInfo=n,this._capabilities=i,this.options=r,this.setRequestHandler(Bg,a=>(console.log("Received ping:",a.params),{})),this.onhostcontextchanged=()=>{}}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}set ontoolinput(n){this.setNotificationHandler(Dre,i=>n(i.params))}set ontoolinputpartial(n){this.setNotificationHandler(Pre,i=>n(i.params))}set ontoolresult(n){this.setNotificationHandler(qre,i=>n(i.params))}set ontoolcancelled(n){this.setNotificationHandler(jre,i=>n(i.params))}set onhostcontextchanged(n){this.setNotificationHandler(Gre,i=>{this._hostContext={...this._hostContext,...i.params},n(i.params)})}set onteardown(n){this.setRequestHandler(Vre,(i,r)=>n(i.params,r))}set oncalltool(n){this.setRequestHandler(yI,(i,r)=>n(i.params,r))}set onlisttools(n){this.setRequestHandler(bI,(i,r)=>n(i.params,r))}assertCapabilityForMethod(n){}assertRequestHandlerCapability(n){switch(n){case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${n})`);return;case"ping":case"ui/resource-teardown":return;default:throw Error(`No handler for method ${n} registered`)}}assertNotificationCapability(n){}assertTaskCapability(n){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(n){throw Error("Task handlers are not supported in MCP Apps")}async callServerTool(n,i){return await this.request({method:"tools/call",params:n},qg,i)}sendMessage(n,i){return this.request({method:"ui/message",params:n},Mre,i)}sendLog(n){return this.notification({method:"notifications/message",params:n})}updateModelContext(n,i){return this.request({method:"ui/update-model-context",params:n},sx,i)}openLink(n,i){return this.request({method:"ui/open-link",params:n},Nre,i)}requestDisplayMode(n,i){return this.request({method:"ui/request-display-mode",params:n},Hre,i)}sendSizeChanged(n){return this.notification({method:"ui/notifications/size-changed",params:n})}setupSizeChangedNotifications(){let n=!1,i=0,r=0,a=()=>{n||(n=!0,requestAnimationFrame(()=>{n=!1;let c=document.documentElement,f=c.style.width,p=c.style.height;c.style.width="fit-content",c.style.height="fit-content";let h=c.getBoundingClientRect();c.style.width=f,c.style.height=p;let g=window.innerWidth-c.clientWidth,w=Math.ceil(h.width+g),k=Math.ceil(h.height);(w!==i||k!==r)&&(i=w,r=k,this.sendSizeChanged({width:w,height:k}))}))};a();let s=new ResizeObserver(a);return s.observe(document.documentElement),s.observe(document.body),()=>s.disconnect()}async connect(n=new WQ(window.parent,window.parent),i){var r;await super.connect(n);try{let a=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:QQ}},Kre,i);if(a===void 0)throw Error(`Server sent invalid initialize result: ${a}`);this._hostCapabilities=a.hostCapabilities,this._hostInfo=a.hostInfo,this._hostContext=a.hostContext,await this.notification({method:"ui/notifications/initialized"}),(r=this.options)!=null&&r.autoResize&&this.setupSizeChangedNotifications()}catch(a){throw this.close(),a}}}let Yy=null;function Jre(e){Yy=e}function xf(e){Yy&&Yy(e),console.log(`[Pyodide] ${e}`)}let Af=null,kf=null;const Xre="https://cdn.jsdelivr.net/pyodide/v0.27.4/full/pyodide.js";function Wre(e){return new Promise((t,n)=>{if(document.querySelector(`script[src="${e}"]`)){t();return}const i=document.createElement("script");i.src=e,i.onload=()=>t(),i.onerror=n,document.head.appendChild(i)})}function Qre(e){return Af?Promise.resolve(Af):kf||(kf=(async()=>{e("loading"),xf("Loading script from CDN..."),await Wre(Xre),xf("Script loaded, initializing...");const t=await window.loadPyodide();xf("Initialized, loading pydantic..."),await t.loadPackage(["pydantic"]),xf("Pydantic loaded, installing prefab...");{const{default:n}=await xl(async()=>{const{default:a}=await import("./bundle-
|
|
1287
|
+
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:pe.string().optional().describe("User's language and region preference in BCP 47 format."),timeZone:pe.string().optional().describe("User's timezone in IANA format."),userAgent:pe.string().optional().describe("Host application identifier."),platform:pe.union([pe.literal("web"),pe.literal("desktop"),pe.literal("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:pe.object({touch:pe.boolean().optional().describe("Whether the device supports touch input."),hover:pe.boolean().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:pe.object({top:pe.number().describe("Top safe area inset in pixels."),right:pe.number().describe("Right safe area inset in pixels."),bottom:pe.number().describe("Bottom safe area inset in pixels."),left:pe.number().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),Gre=pe.object({method:pe.literal("ui/notifications/host-context-changed"),params:s3.describe("Partial context update containing only changed fields.")});pe.object({method:pe.literal("ui/update-model-context"),params:pe.object({content:pe.array(fp).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:pe.record(pe.string(),pe.unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})});pe.object({method:pe.literal("ui/initialize"),params:pe.object({appInfo:Hg.describe("App identification (name and version)."),appCapabilities:Zre.describe("Features and capabilities this app provides."),protocolVersion:pe.string().describe("Protocol version this app supports.")})});var Kre=pe.object({protocolVersion:pe.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:Hg.describe("Host application identification and version."),hostCapabilities:Fre.describe("Features and capabilities provided by the host."),hostContext:s3.describe("Rich context about the host environment.")}).passthrough();class Yre extends JQ{constructor(n,i={},r={autoResize:!0}){super(r);Jt(this,"_appInfo");Jt(this,"_capabilities");Jt(this,"options");Jt(this,"_hostCapabilities");Jt(this,"_hostInfo");Jt(this,"_hostContext");Jt(this,"sendOpenLink",this.openLink);this._appInfo=n,this._capabilities=i,this.options=r,this.setRequestHandler(Bg,a=>(console.log("Received ping:",a.params),{})),this.onhostcontextchanged=()=>{}}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}set ontoolinput(n){this.setNotificationHandler(Dre,i=>n(i.params))}set ontoolinputpartial(n){this.setNotificationHandler(Pre,i=>n(i.params))}set ontoolresult(n){this.setNotificationHandler(qre,i=>n(i.params))}set ontoolcancelled(n){this.setNotificationHandler(jre,i=>n(i.params))}set onhostcontextchanged(n){this.setNotificationHandler(Gre,i=>{this._hostContext={...this._hostContext,...i.params},n(i.params)})}set onteardown(n){this.setRequestHandler(Vre,(i,r)=>n(i.params,r))}set oncalltool(n){this.setRequestHandler(yI,(i,r)=>n(i.params,r))}set onlisttools(n){this.setRequestHandler(bI,(i,r)=>n(i.params,r))}assertCapabilityForMethod(n){}assertRequestHandlerCapability(n){switch(n){case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${n})`);return;case"ping":case"ui/resource-teardown":return;default:throw Error(`No handler for method ${n} registered`)}}assertNotificationCapability(n){}assertTaskCapability(n){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(n){throw Error("Task handlers are not supported in MCP Apps")}async callServerTool(n,i){return await this.request({method:"tools/call",params:n},qg,i)}sendMessage(n,i){return this.request({method:"ui/message",params:n},Mre,i)}sendLog(n){return this.notification({method:"notifications/message",params:n})}updateModelContext(n,i){return this.request({method:"ui/update-model-context",params:n},sx,i)}openLink(n,i){return this.request({method:"ui/open-link",params:n},Nre,i)}requestDisplayMode(n,i){return this.request({method:"ui/request-display-mode",params:n},Hre,i)}sendSizeChanged(n){return this.notification({method:"ui/notifications/size-changed",params:n})}setupSizeChangedNotifications(){let n=!1,i=0,r=0,a=()=>{n||(n=!0,requestAnimationFrame(()=>{n=!1;let c=document.documentElement,f=c.style.width,p=c.style.height;c.style.width="fit-content",c.style.height="fit-content";let h=c.getBoundingClientRect();c.style.width=f,c.style.height=p;let g=window.innerWidth-c.clientWidth,w=Math.ceil(h.width+g),k=Math.ceil(h.height);(w!==i||k!==r)&&(i=w,r=k,this.sendSizeChanged({width:w,height:k}))}))};a();let s=new ResizeObserver(a);return s.observe(document.documentElement),s.observe(document.body),()=>s.disconnect()}async connect(n=new WQ(window.parent,window.parent),i){var r;await super.connect(n);try{let a=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:QQ}},Kre,i);if(a===void 0)throw Error(`Server sent invalid initialize result: ${a}`);this._hostCapabilities=a.hostCapabilities,this._hostInfo=a.hostInfo,this._hostContext=a.hostContext,await this.notification({method:"ui/notifications/initialized"}),(r=this.options)!=null&&r.autoResize&&this.setupSizeChangedNotifications()}catch(a){throw this.close(),a}}}let Yy=null;function Jre(e){Yy=e}function xf(e){Yy&&Yy(e),console.log(`[Pyodide] ${e}`)}let Af=null,kf=null;const Xre="https://cdn.jsdelivr.net/pyodide/v0.27.4/full/pyodide.js";function Wre(e){return new Promise((t,n)=>{if(document.querySelector(`script[src="${e}"]`)){t();return}const i=document.createElement("script");i.src=e,i.onload=()=>t(),i.onerror=n,document.head.appendChild(i)})}function Qre(e){return Af?Promise.resolve(Af):kf||(kf=(async()=>{e("loading"),xf("Loading script from CDN..."),await Wre(Xre),xf("Script loaded, initializing...");const t=await window.loadPyodide();xf("Initialized, loading pydantic..."),await t.loadPackage(["pydantic"]),xf("Pydantic loaded, installing prefab...");{const{default:n}=await xl(async()=>{const{default:a}=await import("./bundle-B1IKgexG.js");return{default:a}},[],import.meta.url),i=n,r=new Set;for(const a of Object.keys(i)){const s=a.substring(0,a.lastIndexOf("/"));s&&!r.has(s)&&(t.FS.mkdirTree(`/lib/python3.12/site-packages/${s}`),r.add(s))}for(const[a,s]of Object.entries(i))t.FS.writeFile(`/lib/python3.12/site-packages/${a}`,s);xf("Prefab mounted from bundle")}return Af=t,e("ready"),t})().catch(t=>{throw kf=null,e("error"),t}),kf)}async function eie(e){var n;if(!Af)return{error:"Pyodide not loaded"};const t=`
|
|
1288
1288
|
import json as _json
|
|
1289
1289
|
from prefab_ui.components.base import _component_stack, Component as _C, ContainerComponent as _CC
|
|
1290
1290
|
from prefab_ui.app import PrefabApp as _PA
|