vendor: 5,524 bytes, line 1
1import{r as a,j as C}from"./chunk-NISHYRIK-DrNEhCuG.js";import{u as P}from"./index-B6bUHlef.js";import{u as S,c as W}from"./index-CeVcxeT6.js";import{u as q,a as H}from"./index-DCCXduEr.js";import{u as z}from"./index-Da7KXvMC.js";import{P as I}from"./index-Br5NvDFR.js";function _(t,e,{checkForDefaultPrevented:n=!0}={}){return function(o){if(t?.(o),n===!1||!o.defaultPrevented)return e?.(o)}}function G(t,e){return a.useReducer((n,s)=>e[n][s]??n,t)}var O=t=>{const{present:e,children:n}=t,s=K(e),o=typeof n=="function"?n({present:s.isPresent}):a.Children.only(n),r=P(s.ref,X(o));return typeof n=="function"||s.isPresent?a.cloneElement(o,{ref:r}):null};O.displayName="Presence";function K(t){const[e,n]=a.useState(),s=a.useRef(null),o=a.useRef(t),r=a.useRef("none"),b=t?"mounted":"unmounted",[p,c]=G(b,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const i=E(s.current);r.current=p==="mounted"?i:"none"},[p]),S(()=>{const i=s.current,l=o.current;if(l!==t){const d=r.current,f=E(i);t?c("MOUNT"):f==="none"||i?.display==="none"?c("UNMOUNT"):c(l&&d!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,c]),S(()=>{if(e){let i;const l=e.ownerDocument.defaultView??window,u=f=>{const N=E(s.current).includes(CSS.escape(f.animationName));if(f.target===e&&N&&(c("ANIMATION_END"),!o.current)){const v=e.style.animationFillMode;e.style.animationFillMode="forwards",i=l.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=v)})}},d=f=>{f.target===e&&(r.current=E(s.current))};return e.addEventListener("animationstart",d),e.addEventListener("animationcancel",u),e.addEventListener("animationend",u),()=>{l.clearTimeout(i),e.removeEventListener("animationstart",d),e.removeEventListener("animationcancel",u),e.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(p),ref:a.useCallback(i=>{s.current=i?getComputedStyle(i):null,n(i)},[])}}function E(t){return t?.animationName||"none"}function X(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var g="Checkbox",[V,ae]=W(g),[J,A]=V(g);function Q(t){const{__scopeCheckbox:e,checked:n,children:s,defaultChecked:o,disabled:r,form:b,name:p,onCheckedChange:c,required:i,value:l="on",internal_do_not_use_render:u}=t,[d,f]=q({prop:n,defaultProp:o??!1,onChange:c,caller:g}),[k,N]=a.useState(null),[v,m]=a.useState(null),h=a.useRef(!1),y=k?!!b||!!k.closest("form"):!0,R={checked:d,disabled:r,setChecked:f,control:k,setControl:N,name:p,form:b,value:l,hasConsumerStoppedPropagationRef:h,required:i,defaultChecked:x(o)?!1:o,isFormControl:y,bubbleInput:v,setBubbleInput:m};return C.jsx(J,{scope:e,...R,children:$(u)?u(R):s})}var T="CheckboxTrigger",w=a.forwardRef(({__scopeCheckbox:t,onKeyDown:e,onClick:n,...s},o)=>{const{control:r,value:b,disabled:p,checked:c,required:i,setControl:l,setChecked:u,hasConsumerStoppedPropagationRef:d,isFormControl:f,bubbleInput:k}=A(T,t),N=P(o,l),v=a.useRef(c);return a.useEffect(()=>{const m=r?.form;if(m){const h=()=>u(v.current);return m.addEventListener("reset",h),()=>m.removeEventListener("reset",h)}},[r,u]),C.jsx(I.button,{type:"button",role:"checkbox","aria-checked":x(c)?"mixed":c,"aria-required":i,"data-state":D(c),"data-disabled":p?"":void 0,disabled:p,value:b,...s,ref:N,onKeyDown:_(e,m=>{m.key==="Enter"&&m.preventDefault()}),onClick:_(n,m=>{u(h=>x(h)?!0:!h),k&&f&&(d.current=m.isPropagationStopped(),d.current||m.stopPropagation())})})});w.displayName=T;var Y=a.forwardRef((t,e)=>{const{__scopeCheckbox:n,name:s,checked:o,defaultChecked:r,required:b,disabled:p,value:c,onCheckedChange:i,form:l,...u}=t;return C.jsx(Q,{__scopeCheckbox:n,checked:o,defaultChecked:r,disabled:p,required:b,onCheckedChange:i,name:s,form:l,value:c,internal_do_not_use_render:({isFormControl:d})=>C.jsxs(C.Fragment,{children:[C.jsx(w,{...u,ref:e,__scopeCheckbox:n}),d&&C.jsx(L,{__scopeCheckbox:n})]})})});Y.displayName=g;var j="CheckboxIndicator",Z=a.forwardRef((t,e)=>{const{__scopeCheckbox:n,forceMount:s,...o}=t,r=A(j,n);return C.jsx(O,{present:s||x(r.checked)||r.checked===!0,children:C.jsx(I.span,{"data-state":D(r.checked),"data-disabled":r.disabled?"":void 0,...o,ref:e,style:{pointerEvents:"none",...t.style}})})});Z.displayName=j;var U="CheckboxBubbleInput",L=a.forwardRef(({__scopeCheckbox:t,...e},n)=>{const{control:s,hasConsumerStoppedPropagationRef:o,checked:r,defaultChecked:b,required:p,disabled:c,name:i,value:l,form:u,bubbleInput:d,setBubbleInput:f}=A(U,t),k=P(n,f),N=z(r),v=H(s);a.useEffect(()=>{const h=d;if(!h)return;const y=window.HTMLInputElement.prototype,M=Object.getOwnPropertyDescriptor(y,"checked").set,F=!o.current;if(N!==r&&M){const B=new Event("click",{bubbles:F});h.indeterminate=x(r),M.call(h,x(r)?!1:r),h.dispatchEvent(B)}},[d,N,r,o]);const m=a.useRef(x(r)?!1:r);return C.jsx(I.input,{type:"checkbox","aria-hidden":!0,defaultChecked:b??m.current,required:p,disabled:c,name:i,value:l,form:u,...e,tabIndex:-1,ref:k,style:{...e.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});L.displayName=U;function $(t){return typeof t=="function"}function x(t){return t==="indeterminate"}function D(t){return x(t)?"indeterminate":t?"checked":"unchecked"}export{Y as C,Z as a};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.