import{R as S,r as a,j as M,a as ee}from"./app-EQC55BcE.js";const V=typeof document<"u"?S.useLayoutEffect:()=>{};function te(e){const n=a.useRef(null);return V(()=>{n.current=e},[e]),a.useCallback((...t)=>{const r=n.current;return r==null?void 0:r(...t)},[])}const w=e=>{var n;return(n=e==null?void 0:e.ownerDocument)!==null&&n!==void 0?n:document},m=e=>e&&"window"in e&&e.window===e?e:w(e).defaultView||window;function ne(e){var n;return typeof window>"u"||window.navigator==null?!1:((n=window.navigator.userAgentData)===null||n===void 0?void 0:n.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent)}function re(e){var n;return typeof window<"u"&&window.navigator!=null?e.test(((n=window.navigator.userAgentData)===null||n===void 0?void 0:n.platform)||window.navigator.platform):!1}function K(e){let n=null;return()=>(n==null&&(n=e()),n)}const oe=K(function(){return re(/^Mac/i)}),ie=K(function(){return ne(/Android/i)});function se(e){return e.mozInputSource===0&&e.isTrusted?!0:ie()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}class ue{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(n,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=n}}function U(e){let n=a.useRef({isFocused:!1,observer:null});V(()=>{const r=n.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let t=te(r=>{e==null||e(r)});return a.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){n.current.isFocused=!0;let o=r.target,s=l=>{n.current.isFocused=!1,o.disabled&&t(new ue("blur",l)),n.current.observer&&(n.current.observer.disconnect(),n.current.observer=null)};o.addEventListener("focusout",s,{once:!0}),n.current.observer=new MutationObserver(()=>{if(n.current.isFocused&&o.disabled){var l;(l=n.current.observer)===null||l===void 0||l.disconnect();let u=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:u})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:u}))}}),n.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[t])}function ae(e){let{isDisabled:n,onFocus:t,onBlur:r,onFocusChange:o}=e;const s=a.useCallback(i=>{if(i.target===i.currentTarget)return r&&r(i),o&&o(!1),!0},[r,o]),l=U(s),u=a.useCallback(i=>{const d=w(i.target);i.target===i.currentTarget&&d.activeElement===i.target&&(t&&t(i),o&&o(!0),l(i))},[o,t,l]);return{focusProps:{onFocus:!n&&(t||o||r)?u:void 0,onBlur:!n&&(r||o)?s:void 0}}}let T=null,O=new Set,y=new Map,$=!1,D=!1;const le={Tab:!0,Escape:!0};function W(e,n){for(let t of O)t(e,n)}function ce(e){return!(e.metaKey||!oe()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function H(e){$=!0,ce(e)&&(T="keyboard",W("keyboard",e))}function g(e){T="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&($=!0,W("pointer",e))}function _(e){se(e)&&($=!0,T="virtual")}function q(e){e.target===window||e.target===document||(!$&&!D&&(T="virtual",W("virtual",e)),$=!1,D=!1)}function G(){$=!1,D=!0}function A(e){if(typeof window>"u"||y.get(m(e)))return;const n=m(e),t=w(e);let r=n.HTMLElement.prototype.focus;n.HTMLElement.prototype.focus=function(){$=!0,r.apply(this,arguments)},t.addEventListener("keydown",H,!0),t.addEventListener("keyup",H,!0),t.addEventListener("click",_,!0),n.addEventListener("focus",q,!0),n.addEventListener("blur",G,!1),typeof PointerEvent<"u"?(t.addEventListener("pointerdown",g,!0),t.addEventListener("pointermove",g,!0),t.addEventListener("pointerup",g,!0)):(t.addEventListener("mousedown",g,!0),t.addEventListener("mousemove",g,!0),t.addEventListener("mouseup",g,!0)),n.addEventListener("beforeunload",()=>{Y(e)},{once:!0}),y.set(n,{focus:r})}const Y=(e,n)=>{const t=m(e),r=w(e);n&&r.removeEventListener("DOMContentLoaded",n),y.has(t)&&(t.HTMLElement.prototype.focus=y.get(t).focus,r.removeEventListener("keydown",H,!0),r.removeEventListener("keyup",H,!0),r.removeEventListener("click",_,!0),t.removeEventListener("focus",q,!0),t.removeEventListener("blur",G,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",g,!0),r.removeEventListener("pointermove",g,!0),r.removeEventListener("pointerup",g,!0)):(r.removeEventListener("mousedown",g,!0),r.removeEventListener("mousemove",g,!0),r.removeEventListener("mouseup",g,!0)),y.delete(t))};function de(e){const n=w(e);let t;return n.readyState!=="loading"?A(e):(t=()=>{A(e)},n.addEventListener("DOMContentLoaded",t)),()=>Y(e,t)}typeof document<"u"&&de();function X(){return T!=="pointer"}const fe=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function ve(e,n,t){var r;const o=typeof window<"u"?m(t==null?void 0:t.target).HTMLInputElement:HTMLInputElement,s=typeof window<"u"?m(t==null?void 0:t.target).HTMLTextAreaElement:HTMLTextAreaElement,l=typeof window<"u"?m(t==null?void 0:t.target).HTMLElement:HTMLElement,u=typeof window<"u"?m(t==null?void 0:t.target).KeyboardEvent:KeyboardEvent;return e=e||(t==null?void 0:t.target)instanceof o&&!fe.has(t==null||(r=t.target)===null||r===void 0?void 0:r.type)||(t==null?void 0:t.target)instanceof s||(t==null?void 0:t.target)instanceof l&&(t==null?void 0:t.target.isContentEditable),!(e&&n==="keyboard"&&t instanceof u&&!le[t.key])}function pe(e,n,t){A(),a.useEffect(()=>{let r=(o,s)=>{ve(!!(t!=null&&t.isTextInput),o,s)&&e(X())};return O.add(r),()=>{O.delete(r)}},n)}function be(e){let{isDisabled:n,onBlurWithin:t,onFocusWithin:r,onFocusWithinChange:o}=e,s=a.useRef({isFocusWithin:!1}),l=a.useCallback(d=>{s.current.isFocusWithin&&!d.currentTarget.contains(d.relatedTarget)&&(s.current.isFocusWithin=!1,t&&t(d),o&&o(!1))},[t,o,s]),u=U(l),i=a.useCallback(d=>{!s.current.isFocusWithin&&document.activeElement===d.target&&(r&&r(d),o&&o(!0),s.current.isFocusWithin=!0,u(d))},[r,o,u]);return n?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:i,onBlur:l}}}let k=!1,x=0;function I(){k=!0,setTimeout(()=>{k=!1},50)}function R(e){e.pointerType==="touch"&&I()}function ge(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",R):document.addEventListener("touchend",I),x++,()=>{x--,!(x>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",R):document.removeEventListener("touchend",I))}}function he(e){let{onHoverStart:n,onHoverChange:t,onHoverEnd:r,isDisabled:o}=e,[s,l]=a.useState(!1),u=a.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;a.useEffect(ge,[]);let{hoverProps:i,triggerHoverEnd:d}=a.useMemo(()=>{let f=(c,b)=>{if(u.pointerType=b,o||b==="touch"||u.isHovered||!c.currentTarget.contains(c.target))return;u.isHovered=!0;let h=c.currentTarget;u.target=h,n&&n({type:"hoverstart",target:h,pointerType:b}),t&&t(!0),l(!0)},v=(c,b)=>{if(u.pointerType="",u.target=null,b==="touch"||!u.isHovered)return;u.isHovered=!1;let h=c.currentTarget;r&&r({type:"hoverend",target:h,pointerType:b}),t&&t(!1),l(!1)},p={};return typeof PointerEvent<"u"?(p.onPointerEnter=c=>{k&&c.pointerType==="mouse"||f(c,c.pointerType)},p.onPointerLeave=c=>{!o&&c.currentTarget.contains(c.target)&&v(c,c.pointerType)}):(p.onTouchStart=()=>{u.ignoreEmulatedMouseEvents=!0},p.onMouseEnter=c=>{!u.ignoreEmulatedMouseEvents&&!k&&f(c,"mouse"),u.ignoreEmulatedMouseEvents=!1},p.onMouseLeave=c=>{!o&&c.currentTarget.contains(c.target)&&v(c,"mouse")}),{hoverProps:p,triggerHoverEnd:v}},[n,t,r,o,u]);return a.useEffect(()=>{o&&d({currentTarget:u.target},u.pointerType)},[o]),{hoverProps:i,isHovered:s}}function me(e={}){let{autoFocus:n=!1,isTextInput:t,within:r}=e,o=a.useRef({isFocused:!1,isFocusVisible:n||X()}),[s,l]=a.useState(!1),[u,i]=a.useState(()=>o.current.isFocused&&o.current.isFocusVisible),d=a.useCallback(()=>i(o.current.isFocused&&o.current.isFocusVisible),[]),f=a.useCallback(c=>{o.current.isFocused=c,l(c),d()},[d]);pe(c=>{o.current.isFocusVisible=c,d()},[],{isTextInput:t});let{focusProps:v}=ae({isDisabled:r,onFocusChange:f}),{focusWithinProps:p}=be({isDisabled:!r,onFocusWithinChange:f});return{isFocused:s,isFocusVisible:u,focusProps:r?p:v}}var $e=Object.defineProperty,Ee=(e,n,t)=>n in e?$e(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,C=(e,n,t)=>(Ee(e,typeof n!="symbol"?n+"":n,t),t);let ye=class{constructor(){C(this,"current",this.detect()),C(this,"handoffState","pending"),C(this,"currentId",0)}set(n){this.current!==n&&(this.handoffState="pending",this.currentId=0,this.current=n)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},z=new ye;function we(e){return z.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function Te(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(n=>setTimeout(()=>{throw n}))}function Z(){let e=[],n={addEventListener(t,r,o,s){return t.addEventListener(r,o,s),n.add(()=>t.removeEventListener(r,o,s))},requestAnimationFrame(...t){let r=requestAnimationFrame(...t);return n.add(()=>cancelAnimationFrame(r))},nextFrame(...t){return n.requestAnimationFrame(()=>n.requestAnimationFrame(...t))},setTimeout(...t){let r=setTimeout(...t);return n.add(()=>clearTimeout(r))},microTask(...t){let r={current:!0};return Te(()=>{r.current&&t[0]()}),n.add(()=>{r.current=!1})},style(t,r,o){let s=t.style.getPropertyValue(r);return Object.assign(t.style,{[r]:o}),this.add(()=>{Object.assign(t.style,{[r]:s})})},group(t){let r=Z();return t(r),this.add(()=>r.dispose())},add(t){return e.includes(t)||e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let t of e.splice(0))t()}};return n}function Fe(){let[e]=a.useState(Z);return a.useEffect(()=>()=>e.dispose(),[e]),e}let Le=(e,n)=>{z.isServer?a.useEffect(e,n):a.useLayoutEffect(e,n)};function Pe(e){let n=a.useRef(e);return Le(()=>{n.current=e},[e]),n}let N=function(e){let n=Pe(e);return S.useCallback((...t)=>n.current(...t),[n])};function He(e){let n=e.width/2,t=e.height/2;return{top:e.clientY-t,right:e.clientX+n,bottom:e.clientY+t,left:e.clientX-n}}function ke(e,n){return!(!e||!n||e.right<n.left||e.left>n.right||e.bottom<n.top||e.top>n.bottom)}function Se({disabled:e=!1}={}){let n=a.useRef(null),[t,r]=a.useState(!1),o=Fe(),s=N(()=>{n.current=null,r(!1),o.dispose()}),l=N(u=>{if(o.dispose(),n.current===null){n.current=u.currentTarget,r(!0);{let i=we(u.currentTarget);o.addEventListener(i,"pointerup",s,!1),o.addEventListener(i,"pointermove",d=>{if(n.current){let f=He(d);r(ke(f,n.current.getBoundingClientRect()))}},!1),o.addEventListener(i,"pointercancel",s,!1)}}});return{pressed:t,pressProps:e?{}:{onPointerDown:l,onPointerUp:s,onClick:s}}}function B(...e){return Array.from(new Set(e.flatMap(n=>typeof n=="string"?n.split(" "):[]))).filter(Boolean).join(" ")}function J(e,n,...t){if(e in n){let o=n[e];return typeof o=="function"?o(...t):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(n).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,J),r}var Me=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Me||{}),xe=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(xe||{});function Ce(){let e=Oe();return a.useCallback(n=>je({mergeRefs:e,...n}),[e])}function je({ourProps:e,theirProps:n,slot:t,defaultTag:r,features:o,visible:s=!0,name:l,mergeRefs:u}){u=u??De;let i=Q(n,e);if(s)return P(i,t,r,l,u);let d=o??0;if(d&2){let{static:f=!1,...v}=i;if(f)return P(v,t,r,l,u)}if(d&1){let{unmount:f=!0,...v}=i;return J(f?0:1,{0(){return null},1(){return P({...v,hidden:!0,style:{display:"none"}},t,r,l,u)}})}return P(i,t,r,l,u)}function P(e,n={},t,r,o){let{as:s=t,children:l,refName:u="ref",...i}=j(e,["unmount","static"]),d=e.ref!==void 0?{[u]:e.ref}:{},f=typeof l=="function"?l(n):l;"className"in i&&i.className&&typeof i.className=="function"&&(i.className=i.className(n)),i["aria-labelledby"]&&i["aria-labelledby"]===i.id&&(i["aria-labelledby"]=void 0);let v={};if(n){let p=!1,c=[];for(let[b,h]of Object.entries(n))typeof h=="boolean"&&(p=!0),h===!0&&c.push(b.replace(/([A-Z])/g,F=>`-${F.toLowerCase()}`));if(p){v["data-headlessui-state"]=c.join(" ");for(let b of c)v[`data-${b}`]=""}}if(s===a.Fragment&&(Object.keys(E(i)).length>0||Object.keys(E(v)).length>0))if(!a.isValidElement(f)||Array.isArray(f)&&f.length>1){if(Object.keys(E(i)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(E(i)).concat(Object.keys(E(v))).map(p=>`  - ${p}`).join(`
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(p=>`  - ${p}`).join(`
`)].join(`
`))}else{let p=f.props,c=p==null?void 0:p.className,b=typeof c=="function"?(...L)=>B(c(...L),i.className):B(c,i.className),h=b?{className:b}:{},F=Q(f.props,E(j(i,["ref"])));for(let L in v)L in F&&delete v[L];return a.cloneElement(f,Object.assign({},F,v,d,{ref:o(We(f),d.ref)},h))}return a.createElement(s,Object.assign({},j(i,["ref"]),s!==a.Fragment&&d,s!==a.Fragment&&v),f)}function Oe(){let e=a.useRef([]),n=a.useCallback(t=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(t):r.current=t)},[]);return(...t)=>{if(!t.every(r=>r==null))return e.current=t,n}}function De(...e){return e.every(n=>n==null)?void 0:n=>{for(let t of e)t!=null&&(typeof t=="function"?t(n):t.current=n)}}function Q(...e){if(e.length===0)return{};if(e.length===1)return e[0];let n={},t={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(t[o]!=null||(t[o]=[]),t[o].push(r[o])):n[o]=r[o];if(n.disabled||n["aria-disabled"])for(let r in t)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(t[r]=[o=>{var s;return(s=o==null?void 0:o.preventDefault)==null?void 0:s.call(o)}]);for(let r in t)Object.assign(n,{[r](o,...s){let l=t[r];for(let u of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;u(o,...s)}}});return n}function Ae(...e){if(e.length===0)return{};if(e.length===1)return e[0];let n={},t={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(t[o]!=null||(t[o]=[]),t[o].push(r[o])):n[o]=r[o];for(let r in t)Object.assign(n,{[r](...o){let s=t[r];for(let l of s)l==null||l(...o)}});return n}function Ie(e){var n;return Object.assign(a.forwardRef(e),{displayName:(n=e.displayName)!=null?n:e.name})}function E(e){let n=Object.assign({},e);for(let t in n)n[t]===void 0&&delete n[t];return n}function j(e,n=[]){let t=Object.assign({},e);for(let r of n)r in t&&delete t[r];return t}function We(e){return S.version.split(".")[0]>="19"?e.props.ref:e.ref}let Re=a.Fragment;function Ne(e,n){let{...t}=e,r=!1,{isFocusVisible:o,focusProps:s}=me(),{isHovered:l,hoverProps:u}=he({isDisabled:r}),{pressed:i,pressProps:d}=Se({disabled:r}),f=Ae({ref:n},s,u,d),v=a.useMemo(()=>({hover:l,focus:o,active:i}),[l,o,i]);return Ce()({ourProps:f,theirProps:t,slot:v,defaultTag:Re,name:"DataInteractive"})}let Be=Ie(Ne);const Ue=S.forwardRef(function({external:n=!1,...t},r){return M.jsx(Be,{children:n?M.jsx("a",{...t,ref:r}):M.jsx(ee,{...t,ref:r})})});export{me as $,xe as A,Ie as K,Ue as L,Me as O,Ae as _,Ce as a,he as b,we as c,Z as d,z as e,B as f,E as m,Le as n,N as o,Fe as p,Pe as s,Te as t,J as u,Se as w};
