import{w as z,l as E,x as q,m as W,A as m,aV as J,a as A,u as Q,O as K,v as $,e as p,ae as y,c as Z,S as tt,ag as et}from"./provider-C0m4Dvti.js";function Ot(t){return t!==null&&(typeof t=="object"||typeof t=="function")}function G(t){return(...e)=>{for(const n of t)n&&n(...e)}}function nt(t){return(...e)=>{for(let n=t.length-1;n>=0;n--){const r=t[n];r&&r(...e)}}}var L=t=>typeof t=="function"&&!t.length?t():t,Mt=t=>Array.isArray(t)?t:t?[t]:[];function rt(t,...e){return typeof t=="function"?t(...e):t}var Ft=Object.entries,Rt=W;function jt(t,e,n){if(z.context){const[r,o]=E(t,n);return q(()=>o(()=>e())),[r,o]}return E(e(),n)}function Ht(t,e,n,r){const o=t.length,c=e.length;let s=0;if(!c){for(;s<o;s++)n(t[s]);return}if(!o){for(;s<c;s++)r(e[s]);return}for(;s<c&&e[s]===t[s];s++);let i,a;e=e.slice(s),t=t.slice(s);for(i of e)t.includes(i)||r(i);for(a of t)e.includes(a)||n(a)}function h(){return!0}var ot={get(t,e,n){return e===J?n:t.get(e)},has(t,e){return t.has(e)},set:h,deleteProperty:h,getOwnPropertyDescriptor(t,e){return{configurable:!0,enumerable:!0,get(){return t.get(e)},set:h,deleteProperty:h}},ownKeys(t){return t.keys()}},st=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function D(t){const e={};let n;for(;n=st.exec(t);)e[n[1]]=n[2];return e}function it(t,e){if(typeof t=="string"){if(typeof e=="string")return`${t};${e}`;t=D(t)}else typeof e=="string"&&(e=D(e));return{...t,...e}}var S=(t,e,n)=>{let r;for(const o of t){const c=L(o)[e];r?c&&(r=n(r,c)):r=c}return r};function ct(...t){const e=Array.isArray(t[0]),n=e?t[0]:t;if(n.length===1)return n[0];const r=e&&t[1]?.reverseEventHandlers?nt:G,o={};for(const s of n){const i=L(s);for(const a in i)if(a[0]==="o"&&a[1]==="n"&&a[2]){const l=i[a],f=a.toLowerCase(),u=typeof l=="function"?l:Array.isArray(l)?l.length===1?l[0]:l[0].bind(void 0,l[1]):void 0;u?o[f]?o[f].push(u):o[f]=[u]:delete o[f]}}const c=m(...n);return new Proxy({get(s){if(typeof s!="string")return Reflect.get(c,s);if(s==="style")return S(n,"style",it);if(s==="ref"){const i=[];for(const a of n){const l=L(a)[s];typeof l=="function"&&i.push(l)}return r(i)}if(s[0]==="o"&&s[1]==="n"&&s[2]){const i=o[s.toLowerCase()];return i?r(i):Reflect.get(c,s)}return s==="class"||s==="className"?S(n,s,(i,a)=>`${i} ${a}`):s==="classList"?S(n,s,(i,a)=>({...i,...a})):Reflect.get(c,s)},has(s){return Reflect.has(c,s)},keys(){return Object.keys(c)}},ot)}function Vt(...t){return G(t)}var O=t=>t instanceof Element;function v(t,e){if(e(t))return t;if(typeof t=="function"&&!t.length)return v(t(),e);if(Array.isArray(t))for(const n of t){const r=v(n,e);if(r)return r}return null}function _t(t,e=O,n=O){const r=A(t);return A(()=>v(r(),e))}function Bt(t,e,n=-1){return n in t?[...t.slice(0,n),e,...t.slice(n)]:[...t,e]}function Wt(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function $t(t){return typeof t=="number"}function at(t){return Array.isArray(t)}function lt(t){return Object.prototype.toString.call(t)==="[object String]"}function ft(t){return typeof t=="function"}function Gt(t){return e=>`${t()}-${e}`}function Ut(){const t=new Map,e=(o,c,s,i)=>{const a=i?.once?(...l)=>{t.delete(s),s(...l)}:s;t.set(s,{type:c,eventTarget:o,fn:a,options:i}),o.addEventListener(c,s,i)},n=(o,c,s,i)=>{const a=t.get(s)?.fn||s;o.removeEventListener(c,a,i),t.delete(s)},r=()=>{t.forEach((o,c)=>{n(o.eventTarget,o.type,c,o.options)})};return W(()=>{r()}),{addGlobalListener:e,removeGlobalListener:n,removeAllGlobalListeners:r}}function Yt(t,e){return t?t===e||t.contains(e):!1}function ut(t,e=!1){const{activeElement:n}=P(t);if(!n?.nodeName)return null;if(U(n)&&n.contentDocument)return ut(n.contentDocument.body,e);if(e){const r=n.getAttribute("aria-activedescendant");if(r){const o=P(n).getElementById(r);if(o)return o}}return n}function kt(t){return P(t).defaultView||window}function P(t){return t?t.ownerDocument||t:document}function U(t){return t.tagName==="IFRAME"}var dt=(t=>(t.Escape="Escape",t.Enter="Enter",t.Tab="Tab",t.Space=" ",t.ArrowDown="ArrowDown",t.ArrowLeft="ArrowLeft",t.ArrowRight="ArrowRight",t.ArrowUp="ArrowUp",t.End="End",t.Home="Home",t.PageDown="PageDown",t.PageUp="PageUp",t))(dt||{});function Y(t){return typeof window>"u"||window.navigator==null?!1:window.navigator.userAgentData?.brands.some(e=>t.test(e.brand))||t.test(window.navigator.userAgent)}function T(t){return typeof window<"u"&&window.navigator!=null?t.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function C(){return T(/^Mac/i)}function pt(){return T(/^iPhone/i)}function bt(){return T(/^iPad/i)||C()&&navigator.maxTouchPoints>1}function mt(){return pt()||bt()}function Xt(){return C()||mt()}function zt(){return Y(/AppleWebKit/i)&&!gt()}function gt(){return Y(/Chrome/i)}function ht(t,e){return e&&(ft(e)?e(t):e[0](e[1],t)),t?.defaultPrevented}function qt(t){return e=>{for(const n of t)ht(e,n)}}function Jt(t){return C()?t.metaKey&&!t.ctrlKey:t.ctrlKey&&!t.metaKey}function Qt(t){if(t)if(wt())t.focus({preventScroll:!0});else{const e=yt(t);t.focus(),Et(e)}}var w=null;function wt(){if(w==null){w=!1;try{document.createElement("div").focus({get preventScroll(){return w=!0,!0}})}catch{}}return w}function yt(t){let e=t.parentNode;const n=[],r=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==r;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function Et(t){for(const{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}var k=["input:not([type='hidden']):not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","[tabindex]","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"],At=[...k,'[tabindex]:not([tabindex="-1"]):not([disabled])'],x=k.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])",St=At.join(':not([hidden]):not([tabindex="-1"]),');function Lt(t,e){const r=Array.from(t.querySelectorAll(x)).filter(M);return e&&M(t)&&r.unshift(t),r.forEach((o,c)=>{if(U(o)&&o.contentDocument){const s=o.contentDocument.body,i=Lt(s,!1);r.splice(c,1,...i)}}),r}function M(t){return vt(t)&&!Pt(t)}function vt(t){return t.matches(x)&&N(t)}function Pt(t){return parseInt(t.getAttribute("tabindex")||"0",10)<0}function N(t,e){return t.nodeName!=="#comment"&&Tt(t)&&Ct(t,e)&&(!t.parentElement||N(t.parentElement,t))}function Tt(t){if(!(t instanceof HTMLElement)&&!(t instanceof SVGElement))return!1;const{display:e,visibility:n}=t.style;let r=e!=="none"&&n!=="hidden"&&n!=="collapse";if(r){if(!t.ownerDocument.defaultView)return r;const{getComputedStyle:o}=t.ownerDocument.defaultView,{display:c,visibility:s}=o(t);r=c!=="none"&&s!=="hidden"&&s!=="collapse"}return r}function Ct(t,e){return!t.hasAttribute("hidden")&&(t.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?t.hasAttribute("open"):!0)}function Kt(t,e,n){const r=e?.tabbable?St:x,o=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode(c){return e?.from?.contains(c)?NodeFilter.FILTER_REJECT:c.matches(r)&&N(c)&&!n&&(!e?.accept||e.accept(c))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e?.from&&(o.currentNode=e.from),o}function F(t){for(;t&&!xt(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function xt(t){const e=window.getComputedStyle(t);return/(auto|scroll)/.test(e.overflow+e.overflowX+e.overflowY)}function Zt(){}function te(t){return[t.clientX,t.clientY]}function ee(t,e){const[n,r]=t;let o=!1;const c=e.length;for(let s=c,i=0,a=s-1;i<s;a=i++){const[l,f]=e[i],[u,d]=e[a],[,I]=e[a===0?s-1:a-1]||[0,0],g=(f-d)*(n-l)-(l-u)*(r-f);if(d<f){if(r>=d&&r<f){if(g===0)return!0;g>0&&(r===d?r>I&&(o=!o):o=!o)}}else if(f<d){if(r>f&&r<=d){if(g===0)return!0;g<0&&(r===d?r<I&&(o=!o):o=!o)}}else if(r==f&&(n>=u&&n<=l||n>=l&&n<=u))return!0}return o}function ne(t,e){return m(t,e)}var b=new Map,R=new Set;function j(){if(typeof window>"u")return;const t=n=>{if(!n.target)return;let r=b.get(n.target);r||(r=new Set,b.set(n.target,r),n.target.addEventListener("transitioncancel",e)),r.add(n.propertyName)},e=n=>{if(!n.target)return;const r=b.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",e),b.delete(n.target)),b.size===0)){for(const o of R)o();R.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",e)}typeof document<"u"&&(document.readyState!=="loading"?j():document.addEventListener("DOMContentLoaded",j));function Nt(t,e){const n=H(t,e,"left"),r=H(t,e,"top"),o=e.offsetWidth,c=e.offsetHeight;let s=t.scrollLeft,i=t.scrollTop;const a=s+t.offsetWidth,l=i+t.offsetHeight;n<=s?s=n:n+o>a&&(s+=n+o-a),r<=i?i=r:r+c>l&&(i+=r+c-l),t.scrollLeft=s,t.scrollTop=i}function H(t,e,n){const r=n==="left"?"offsetLeft":"offsetTop";let o=0;for(;e.offsetParent&&(o+=e[r],e.offsetParent!==t);){if(e.offsetParent.contains(t)){o-=t[r];break}e=e.offsetParent}return o}function re(t,e){if(document.contains(t)){const n=document.scrollingElement||document.documentElement;if(window.getComputedStyle(n).overflow==="hidden"){let o=F(t);for(;t&&o&&t!==n&&o!==n;)Nt(o,t),t=o,o=F(t)}else{const{left:o,top:c}=t.getBoundingClientRect();t?.scrollIntoView?.({block:"nearest"});const{left:s,top:i}=t.getBoundingClientRect();(Math.abs(o-s)>1||Math.abs(c-i)>1)&&t.scrollIntoView?.({block:"nearest"})}}}var oe={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"};function X(t){const[e,n]=E(t.defaultValue?.()),r=A(()=>t.value?.()!==void 0),o=A(()=>r()?t.value?.():e());return[o,s=>{Q(()=>{const i=rt(s,o());return Object.is(i,o())||(r()||n(i),t.onChange?.(i)),i})}]}function se(t){const[e,n]=X(t);return[()=>e()??!1,n]}function ie(t){const[e,n]=X(t);return[()=>e()??[],n]}function ce(t){return e=>(t(e),()=>t(void 0))}/*!
 * Portions of this file are based on code from ariakit.
 * MIT Licensed, Copyright (c) Diego Haz.
 *
 * Credits to the ariakit team:
 * https://github.com/ariakit/ariakit/blob/8a13899ff807bbf39f3d89d2d5964042ba4d5287/packages/ariakit-react-utils/src/hooks.ts
 */function ae(t,e){const[n,r]=E(V(e?.()));return K(()=>{r(t()?.tagName.toLowerCase()||V(e?.()))}),n}function V(t){return lt(t)?t:void 0}function le(t){const[e,n]=$(t,["asChild","as","children"]);if(!e.asChild)return p(y,m({get component(){return e.as}},n,{get children(){return e.children}}));const r=Z(()=>e.children);if(_(r())){const o=B(n,r()?.props??{});return p(y,o)}if(at(r())){const o=r().find(_);if(o){const c=()=>p(et,{get each(){return r()},children:i=>p(tt,{when:i===o,fallback:i,get children(){return o.props.children}})}),s=B(n,o?.props??{});return p(y,m(s,{children:c}))}}throw new Error("[kobalte]: Component is expected to render `asChild` but no children `As` component was found.")}const It=Symbol("$$KobalteAsComponent");function _(t){return t?.[It]===!0}function B(t,e){return ct([t,e],{reverseEventHandlers:!0})}const fe=t=>{const[e,n]=$(t,["icon"]);return p(y,m({get component(){return e.icon}},n,{get classList(){return n.classList}}))};export{lt as A,$t as B,se as C,ut as D,dt as E,Wt as F,oe as G,vt as H,Lt as I,Zt as J,Jt as K,Xt as L,C as M,Nt as N,Kt as O,le as P,ie as Q,Bt as R,fe as S,re as T,Vt as a,L as b,ae as c,Gt as d,Ft as e,ce as f,qt as g,X as h,Ot as i,rt as j,jt as k,ht as l,ne as m,Yt as n,Qt as o,Ut as p,ee as q,te as r,zt as s,P as t,kt as u,it as v,_t as w,Ht as x,Rt as y,Mt as z};
//# sourceMappingURL=StIcon-oRVBCUw8.js.map
