tokentracker-cli 0.23.0 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dashboard/dist/assets/{Card-BgXt23Ak.js → Card-CQ4ezOtn.js} +1 -1
- package/dashboard/dist/assets/DashboardPage-DCixFQNF.js +42 -0
- package/dashboard/dist/assets/{DevicePage-CWTFzGYj.js → DevicePage-C-d4jlSG.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-r11-zwBU.js → FadeIn-DEPo9u33.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-ZDYMF__6.js → HeaderGithubStar-CRKWJSGQ.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-cCSBXnv2.js → IpCheckPage-BscvPch9.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-DDUROVcN.js → LandingPage-Bv5OIhRJ.js} +1 -1
- package/dashboard/dist/assets/LeaderboardPage-ea_pS5m7.js +5 -0
- package/dashboard/dist/assets/{LeaderboardProfilePage-BthYFghU.js → LeaderboardProfilePage-DMzZmwP4.js} +1 -1
- package/dashboard/dist/assets/{LimitsPage-BQpint0k.js → LimitsPage-CWaDaTZ9.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-EUjSrjOv.js → LoginPage-BhmcrPVS.js} +1 -1
- package/dashboard/dist/assets/PopoverPopup-bhZXkxTE.js +12 -0
- package/dashboard/dist/assets/{ProviderIcon-D7GhGvvD.js → ProviderIcon-BFsXZu44.js} +1 -1
- package/dashboard/dist/assets/SettingsPage-Dw5iy_IJ.js +1 -0
- package/dashboard/dist/assets/SkillsPage-Dz1X6g_o.js +1 -0
- package/dashboard/dist/assets/{WidgetsPage-QfPgS0dO.js → WidgetsPage-D8RbtXHy.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-0iiBrhBo.js → WrappedPage-Chw83YEb.js} +1 -1
- package/dashboard/dist/assets/check-Bs81cB4C.js +1 -0
- package/dashboard/dist/assets/{chevron-down-Br4ZSPLP.js → chevron-down-DK-3H5UY.js} +1 -1
- package/dashboard/dist/assets/{download-CnQNKpma.js → download-lOWPegbv.js} +1 -1
- package/dashboard/dist/assets/info-DOAPbTJ3.js +1 -0
- package/dashboard/dist/assets/{leaderboard-columns-Bdgb7vS7.js → leaderboard-columns-qXgnSz3Y.js} +1 -1
- package/dashboard/dist/assets/main-uV9_FTHb.js +688 -0
- package/dashboard/dist/assets/{use-limits-display-prefs-B5TQdyrf.js → use-limits-display-prefs-DtRFIKBE.js} +1 -1
- package/dashboard/dist/assets/{use-native-settings-CSxKG_Na.js → use-native-settings-BRDZatug.js} +1 -1
- package/dashboard/dist/assets/{use-reduced-motion-C9rLBEnX.js → use-reduced-motion-CYXeA5H_.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-Bmok4oKO.js → use-usage-limits-RfcCMHky.js} +1 -1
- package/dashboard/dist/assets/useCurrency-B0LcQvSj.js +1 -0
- package/dashboard/dist/index.html +1 -1
- package/dashboard/dist/share.html +1 -1
- package/package.json +1 -1
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/dashboard/dist/assets/DashboardPage-NVAsY99I.js +0 -64
- package/dashboard/dist/assets/LeaderboardPage-BaETRtBF.js +0 -5
- package/dashboard/dist/assets/PopoverPopup-DyjmUoRY.js +0 -12
- package/dashboard/dist/assets/SettingsPage-9lfQ1c28.js +0 -1
- package/dashboard/dist/assets/SkillsPage-Bt7d1kd0.js +0 -1
- package/dashboard/dist/assets/check-CtXuxG1H.js +0 -1
- package/dashboard/dist/assets/main-D7f_DoMp.js +0 -676
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{c as qo,r as d,aD as zo,aE as Ko,C as ee,a9 as Ke}from"./main-uV9_FTHb.js";const ks=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Dl=qo("chevron-right",ks);const Ms=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Nl=qo("loader-circle",Ms),Go={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Xo={...Go,position:"fixed",top:0,left:0},Bl={...Go,position:"absolute"},ao={};function ke(e,t){const n=d.useRef(ao);return n.current===ao&&(n.current=e(t)),n}function Ut(e,t,n,o){const r=ke(Zo).current;return Ls(r,e,t,n,o)&&Jo(r,[e,t,n,o]),r.callback}function As(e){const t=ke(Zo).current;return Fs(t,e)&&Jo(t,e),t.callback}function Zo(){return{callback:null,cleanup:null,refs:[]}}function Ls(e,t,n,o,r){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==o||e.refs[3]!==r}function Fs(e,t){return e.refs.length!==t.length||e.refs.some((n,o)=>n!==t[o])}function Jo(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const o=Array(t.length).fill(null);for(let r=0;r<t.length;r+=1){const s=t[r];if(s!=null)switch(typeof s){case"function":{const i=s(n);typeof i=="function"&&(o[r]=i);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let r=0;r<t.length;r+=1){const s=t[r];if(s!=null)switch(typeof s){case"function":{const i=o[r];typeof i=="function"?i():s(null);break}case"object":{s.current=null;break}}}}}}}const Ds=()=>{},se=typeof document<"u"?d.useLayoutEffect:Ds,fn=zo[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Ns=fn&&fn!==d.useLayoutEffect?fn:e=>e();function Y(e){const t=ke(Bs).current;return t.next=e,Ns(t.effect),t.trampoline}function Bs(){const e={next:void 0,callback:$s,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function $s(){}function De(e){const t=ke(Ws,e).current;return t.next=e,se(t.effect),t}function Ws(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function Ye(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(o=>n.searchParams.append("args[]",o)),`Base UI error #${e}; visit ${n} for the full message.`}var qt=Symbol("NOT_FOUND");function Vs(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function js(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Hs(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(o=>typeof o=="function"?`function ${o.name||"unnamed"}()`:typeof o).join(", ");throw new TypeError(`${t}[${n}]`)}}var lo=e=>Array.isArray(e)?e:[e];function _s(e){const t=Array.isArray(e[0])?e[0]:e;return Hs(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Ys(e,t){const n=[],{length:o}=e;for(let r=0;r<o;r++)n.push(e[r].apply(null,t));return n}function Us(e){let t;return{get(n){return t&&e(t.key,n)?t.value:qt},put(n,o){t={key:n,value:o}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function qs(e,t){let n=[];function o(a){const c=n.findIndex(l=>t(a,l.key));if(c>-1){const l=n[c];return c>0&&(n.splice(c,1),n.unshift(l)),l.value}return qt}function r(a,c){o(a)===qt&&(n.unshift({key:a,value:c}),n.length>e&&n.pop())}function s(){return n}function i(){n=[]}return{get:o,put:r,getEntries:s,clear:i}}var zs=(e,t)=>e===t;function Ks(e){return function(n,o){if(n===null||o===null||n.length!==o.length)return!1;const{length:r}=n;for(let s=0;s<r;s++)if(!e(n[s],o[s]))return!1;return!0}}function Gs(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:o=zs,maxSize:r=1,resultEqualityCheck:s}=n,i=Ks(o);let a=0;const c=r<=1?Us(i):qs(r,i);function l(){let u=c.get(arguments);if(u===qt){if(u=e.apply(null,arguments),a++,s){const p=c.getEntries().find(g=>s(g.value,u));p&&(u=p.value,a!==0&&a--)}c.put(arguments,u)}return u}return l.clearCache=()=>{c.clear(),l.resetResultsCount()},l.resultsCount=()=>a,l.resetResultsCount=()=>{a=0},l}var Xs=class{constructor(e){this.value=e}deref(){return this.value}},Zs=typeof WeakRef<"u"?WeakRef:Xs,Js=0,uo=1;function Nt(){return{s:Js,v:void 0,o:null,p:null}}function Qo(e,t={}){let n=Nt();const{resultEqualityCheck:o}=t;let r,s=0;function i(){let a=n;const{length:c}=arguments;for(let f=0,p=c;f<p;f++){const g=arguments[f];if(typeof g=="function"||typeof g=="object"&&g!==null){let m=a.o;m===null&&(a.o=m=new WeakMap);const h=m.get(g);h===void 0?(a=Nt(),m.set(g,a)):a=h}else{let m=a.p;m===null&&(a.p=m=new Map);const h=m.get(g);h===void 0?(a=Nt(),m.set(g,a)):a=h}}const l=a;let u;if(a.s===uo)u=a.v;else if(u=e.apply(null,arguments),s++,o){const f=r?.deref?.()??r;f!=null&&o(f,u)&&(u=f,s!==0&&s--),r=typeof u=="object"&&u!==null||typeof u=="function"?new Zs(u):u}return l.s=uo,l.v=u,u}return i.clearCache=()=>{n=Nt(),i.resetResultsCount()},i.resultsCount=()=>s,i.resetResultsCount=()=>{s=0},i}function er(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,o=(...r)=>{let s=0,i=0,a,c={},l=r.pop();typeof l=="object"&&(c=l,l=r.pop()),Vs(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const u={...n,...c},{memoize:f,memoizeOptions:p=[],argsMemoize:g=Qo,argsMemoizeOptions:m=[]}=u,h=lo(p),v=lo(m),E=_s(r),b=f(function(){return s++,l.apply(null,arguments)},...h),R=g(function(){i++;const S=Ys(E,arguments);return a=b.apply(null,S),a},...v);return Object.assign(R,{resultFunc:l,memoizedResultFunc:b,dependencies:E,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>a,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:f,argsMemoize:g})};return Object.assign(o,{withTypes:()=>o}),o}var Qs=er(Qo),ei=Object.assign((e,t=Qs)=>{js(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),o=n.map(s=>e[s]);return t(o,(...s)=>s.reduce((i,a,c)=>(i[n[c]]=a,i),{}))},{withTypes:()=>ei});er({memoize:Gs,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const K=(e,t,n,o,r,s,...i)=>{if(i.length>0)throw new Error(Ye(1));let a;if(e)a=e;else throw new Error("Missing arguments");return a};var dn={exports:{}},pn={};var fo;function ti(){if(fo)return pn;fo=1;var e=Ko();function t(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:t,o=e.useState,r=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(f,p){var g=p(),m=o({inst:{value:g,getSnapshot:p}}),h=m[0].inst,v=m[1];return s(function(){h.value=g,h.getSnapshot=p,c(h)&&v({inst:h})},[f,g,p]),r(function(){return c(h)&&v({inst:h}),f(function(){c(h)&&v({inst:h})})},[f]),i(g),g}function c(f){var p=f.getSnapshot;f=f.value;try{var g=p();return!n(f,g)}catch{return!0}}function l(f,p){return p()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:a;return pn.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,pn}var po;function tr(){return po||(po=1,dn.exports=ti()),dn.exports}var ni=tr(),gn={exports:{}},mn={};var go;function oi(){if(go)return mn;go=1;var e=Ko(),t=tr();function n(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var o=typeof Object.is=="function"?Object.is:n,r=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,c=e.useDebugValue;return mn.useSyncExternalStoreWithSelector=function(l,u,f,p,g){var m=s(null);if(m.current===null){var h={hasValue:!1,value:null};m.current=h}else h=m.current;m=a(function(){function E(C){if(!b){if(b=!0,R=C,C=p(C),g!==void 0&&h.hasValue){var T=h.value;if(g(T,C))return y=T}return y=C}if(T=y,o(R,C))return T;var I=p(C);return g!==void 0&&g(T,I)?(R=C,T):(R=C,y=I)}var b=!1,R,y,S=f===void 0?null:f;return[function(){return E(u())},S===null?void 0:function(){return E(S())}]},[u,f,p,g]);var v=r(l,m[0],m[1]);return i(function(){h.hasValue=!0,h.value=v},[v]),c(v),v},mn}var mo;function ri(){return mo||(mo=1,gn.exports=oi()),gn.exports}var si=ri();const ii=parseInt(d.version,10);function Wn(e){return ii>=e}const ci=Wn(19),ai=ci?ui:fi;function li(e,t,n,o,r){return ai(e,t,n,o,r)}function ui(e,t,n,o,r){const s=d.useCallback(()=>t(e.getSnapshot(),n,o,r),[e,t,n,o,r]);return ni.useSyncExternalStore(e.subscribe,s,s)}function fi(e,t,n,o,r){return si.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,n,o,r))}class Ot{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const o of this.listeners){if(n!==this.updateTick)return;o(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){Ot.prototype.setState.call(this,{...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||Ot.prototype.setState.call(this,{...this.state,[t]:n})}notifyAll(){const t={...this.state};Ot.prototype.setState.call(this,t)}}function nr(){}const $l=Object.freeze([]),Ee=Object.freeze({});class Vn extends Ot{constructor(t,n={},o){super(t),this.context=n,this.selectors=o}controlledValues=new Map;useSyncedValue(t,n){d.useDebugValue(t),se(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const o=this;se(()=>(o.state[t]!==n&&o.set(t,n),()=>{o.set(t,void 0)}),[o,t,n])}useSyncedValues(t){const n=this,o=Object.values(t);se(()=>{n.update(t)},[n,...o])}useControlledProp(t,n,o){d.useDebugValue(t);const r=this,s=n!==void 0;this.controlledValues.has(t)||(this.controlledValues.set(t,s),!s&&!Object.is(this.state[t],o)&&super.setState({...this.state,[t]:o})),se(()=>{s&&!Object.is(r.state[t],n)&&super.setState({...r.state,[t]:n})},[r,t,n,o,s])}set(t,n){this.controlledValues.get(t)!==!0&&super.set(t,n)}update(t){const n={...t};for(const o in n)if(Object.hasOwn(n,o)&&this.controlledValues.get(o)===!0){delete n[o];continue}super.update(n)}setState(t){const n={...t};for(const o in n)if(Object.hasOwn(n,o)&&this.controlledValues.get(o)===!0){delete n[o];continue}super.setState({...this.state,...n})}select=(t,n,o,r)=>{const s=this.selectors[t];return s(this.state,n,o,r)};useState=(t,n,o,r)=>{d.useDebugValue(t);const s=this.selectors[t];return li(this,s,n,o,r)};useContextCallback(t,n){d.useDebugValue(t);const o=Y(n??nr);this.context[t]=o}useStateSetter(t){const n=d.useRef(void 0);return n.current===void 0&&(n.current=o=>{this.set(t,o)}),n.current}observe(t,n){let o;typeof t=="function"?o=t:o=this.selectors[t];let r=o(this.state);return n(r,r,this),this.subscribe(s=>{const i=o(s);if(!Object.is(r,i)){const a=r;r=i,n(i,a,this)}})}}const di=[];function jn(e){d.useEffect(e,di)}const Bt=null;class pi{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,o=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,o>0)for(let r=0;r<n.length;r+=1)n[r]?.(t)};request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const $t=new pi;class Fe{static create(){return new Fe}static request(t){return $t.request(t)}static cancel(t){return $t.cancel(t)}currentId=Bt;request(t){this.cancel(),this.currentId=$t.request(()=>{this.currentId=Bt,t()})}cancel=()=>{this.currentId!==Bt&&($t.cancel(this.currentId),this.currentId=Bt)};disposeEffect=()=>this.cancel}function Hn(){const e=ke(Fe.create).current;return jn(e.disposeEffect),e}const Ct=0;class Ge{static create(){return new Ge}currentId=Ct;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Ct,n()},t)}isStarted(){return this.currentId!==Ct}clear=()=>{this.currentId!==Ct&&(clearTimeout(this.currentId),this.currentId=Ct)};disposeEffect=()=>this.clear}function ot(){const e=ke(Ge.create).current;return jn(e.disposeEffect),e}function tn(){return typeof window<"u"}function Xe(e){return _n(e)?(e.nodeName||"").toLowerCase():"#document"}function he(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Be(e){var t;return(t=(_n(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _n(e){return tn()?e instanceof Node||e instanceof he(e).Node:!1}function ie(e){return tn()?e instanceof Element||e instanceof he(e).Element:!1}function me(e){return tn()?e instanceof HTMLElement||e instanceof he(e).HTMLElement:!1}function Cn(e){return!tn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof he(e).ShadowRoot}function st(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Ce(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&r!=="inline"&&r!=="contents"}function gi(e){return/^(table|td|th)$/.test(Xe(e))}function nn(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const mi=/transform|translate|scale|rotate|perspective|filter/,hi=/paint|layout|strict|content/,tt=e=>!!e&&e!=="none";let hn;function Yn(e){const t=ie(e)?Ce(e):e;return tt(t.transform)||tt(t.translate)||tt(t.scale)||tt(t.rotate)||tt(t.perspective)||!on()&&(tt(t.backdropFilter)||tt(t.filter))||mi.test(t.willChange||"")||hi.test(t.contain||"")}function bi(e){let t=He(e);for(;me(t)&&!je(t);){if(Yn(t))return t;if(nn(t))return null;t=He(t)}return null}function on(){return hn==null&&(hn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),hn}function je(e){return/^(html|body|#document)$/.test(Xe(e))}function Ce(e){return he(e).getComputedStyle(e)}function rn(e){return ie(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function He(e){if(Xe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Cn(e)&&e.host||Be(e);return Cn(t)?t.host:t}function or(e){const t=He(e);return je(t)?e.ownerDocument?e.ownerDocument.body:e.body:me(t)&&st(t)?t:or(t)}function qe(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=or(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),i=he(r);if(s){const a=Tn(i);return t.concat(i,i.visualViewport||[],st(r)?r:[],a&&n?qe(a):[])}else return t.concat(r,qe(r,[],n))}function Tn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const yt=typeof navigator<"u",bn=Ri(),rr=wi(),sr=xi(),vi=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),ir=bn.platform==="MacIntel"&&bn.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(bn.platform),yi=yt&&/apple/i.test(navigator.vendor),On=yt&&/android/i.test(rr)||/android/i.test(sr);yt&&rr.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const Ei=sr.includes("jsdom/");function Ri(){if(!yt)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function xi(){if(!yt)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function wi(){if(!yt)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const Pn="data-base-ui-focusable",cr="active",ar="selected",lr="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Wl="ArrowLeft",Vl="ArrowRight",jl="ArrowUp",Hl="ArrowDown";function ft(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function re(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Cn(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function xe(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Pe(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Si(e){return e.matches("html,body")}function fe(e){return e?.ownerDocument||document}function ur(e){return me(e)&&e.matches(lr)}function ho(e){return e?e.getAttribute("role")==="combobox"&&ur(e):!1}function In(e){return e?e.hasAttribute(Pn)?e:e.querySelector(`[${Pn}]`)||e:null}function nt(e,t,n=!0){return e.filter(r=>r.parentId===t&&(!n||r.context?.open)).flatMap(r=>[r,...nt(e,r.id,n)])}function bo(e,t){let n=[],o=e.find(r=>r.id===t)?.parentId;for(;o;){const r=e.find(s=>s.id===o);o=r?.parentId,r&&(n=n.concat(r))}return n}function Ci(e){e.preventDefault(),e.stopPropagation()}function Ti(e){return"nativeEvent"in e}function Oi(e){return e.mozInputSource===0&&e.isTrusted?!0:On&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Pi(e){return Ei?!1:!On&&e.width===0&&e.height===0||On&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function mt(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function fr(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const Ii=["top","right","bottom","left"],ht=Math.min,we=Math.max,zt=Math.round,Wt=Math.floor,Ne=e=>({x:e,y:e}),ki={left:"right",right:"left",bottom:"top",top:"bottom"};function kn(e,t,n){return we(e,ht(t,n))}function _e(e,t){return typeof e=="function"?e(t):e}function Re(e){return e.split("-")[0]}function Ze(e){return e.split("-")[1]}function Un(e){return e==="x"?"y":"x"}function qn(e){return e==="y"?"height":"width"}function Oe(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function zn(e){return Un(Oe(e))}function Mi(e,t,n){n===void 0&&(n=!1);const o=Ze(e),r=zn(e),s=qn(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Kt(i)),[i,Kt(i)]}function Ai(e){const t=Kt(e);return[Mn(e),t,Mn(t)]}function Mn(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const vo=["left","right"],yo=["right","left"],Li=["top","bottom"],Fi=["bottom","top"];function Di(e,t,n){switch(e){case"top":case"bottom":return n?t?yo:vo:t?vo:yo;case"left":case"right":return t?Li:Fi;default:return[]}}function Ni(e,t,n,o){const r=Ze(e);let s=Di(Re(e),n==="start",o);return r&&(s=s.map(i=>i+"-"+r),t&&(s=s.concat(s.map(Mn)))),s}function Kt(e){const t=Re(e);return ki[t]+e.slice(t.length)}function Bi(e){return{top:0,right:0,bottom:0,left:0,...e}}function dr(e){return typeof e!="number"?Bi(e):{top:e,right:e,bottom:e,left:e}}function Gt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}var $i=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Xt=$i.join(","),pr=typeof Element>"u",bt=pr?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Zt=!pr&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Jt=function(t,n){var o;n===void 0&&(n=!0);var r=t==null||(o=t.getAttribute)===null||o===void 0?void 0:o.call(t,"inert"),s=r===""||r==="true",i=s||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Jt(t.parentNode));return i},Wi=function(t){var n,o=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return o===""||o==="true"},gr=function(t,n,o){if(Jt(t))return[];var r=Array.prototype.slice.apply(t.querySelectorAll(Xt));return n&&bt.call(t,Xt)&&r.unshift(t),r=r.filter(o),r},Qt=function(t,n,o){for(var r=[],s=Array.from(t);s.length;){var i=s.shift();if(!Jt(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),c=a.length?a:i.children,l=Qt(c,!0,o);o.flatten?r.push.apply(r,l):r.push({scopeParent:i,candidates:l})}else{var u=bt.call(i,Xt);u&&o.filter(i)&&(n||!t.includes(i))&&r.push(i);var f=i.shadowRoot||typeof o.getShadowRoot=="function"&&o.getShadowRoot(i),p=!Jt(f,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(i));if(f&&p){var g=Qt(f===!0?i.children:f.children,!0,o);o.flatten?r.push.apply(r,g):r.push({scopeParent:i,candidates:g})}else s.unshift.apply(s,i.children)}}return r},mr=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},hr=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Wi(t))&&!mr(t)?0:t.tabIndex},Vi=function(t,n){var o=hr(t);return o<0&&n&&!mr(t)?0:o},ji=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},br=function(t){return t.tagName==="INPUT"},Hi=function(t){return br(t)&&t.type==="hidden"},_i=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(o){return o.tagName==="SUMMARY"});return n},Yi=function(t,n){for(var o=0;o<t.length;o++)if(t[o].checked&&t[o].form===n)return t[o]},Ui=function(t){if(!t.name)return!0;var n=t.form||Zt(t),o=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=o(window.CSS.escape(t.name));else try{r=o(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=Yi(r,t.form);return!s||s===t},qi=function(t){return br(t)&&t.type==="radio"},zi=function(t){return qi(t)&&!Ui(t)},Ki=function(t){var n,o=t&&Zt(t),r=(n=o)===null||n===void 0?void 0:n.host,s=!1;if(o&&o!==t){var i,a,c;for(s=!!((i=r)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(r)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!s&&r;){var l,u,f;o=Zt(r),r=(l=o)===null||l===void 0?void 0:l.host,s=!!((u=r)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(r))}}return s},Eo=function(t){var n=t.getBoundingClientRect(),o=n.width,r=n.height;return o===0&&r===0},Gi=function(t,n){var o=n.displayCheck,r=n.getShadowRoot;if(o==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(t).visibility==="hidden")return!0;var i=bt.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(bt.call(a,"details:not([open]) *"))return!0;if(!o||o==="full"||o==="full-native"||o==="legacy-full"){if(typeof r=="function"){for(var c=t;t;){var l=t.parentElement,u=Zt(t);if(l&&!l.shadowRoot&&r(l)===!0)return Eo(t);t.assignedSlot?t=t.assignedSlot:!l&&u!==t.ownerDocument?t=u.host:t=l}t=c}if(Ki(t))return!t.getClientRects().length;if(o!=="legacy-full")return!0}else if(o==="non-zero-area")return Eo(t);return!1},Xi=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var o=0;o<n.children.length;o++){var r=n.children.item(o);if(r.tagName==="LEGEND")return bt.call(n,"fieldset[disabled] *")?!0:!r.contains(t)}return!0}n=n.parentElement}return!1},An=function(t,n){return!(n.disabled||Hi(n)||Gi(n,t)||_i(n)||Xi(n))},Ln=function(t,n){return!(zi(n)||hr(n)<0||!An(t,n))},Zi=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},vr=function(t){var n=[],o=[];return t.forEach(function(r,s){var i=!!r.scopeParent,a=i?r.scopeParent:r,c=Vi(a,i),l=i?vr(r.candidates):a;c===0?i?n.push.apply(n,l):n.push(a):o.push({documentOrder:s,tabIndex:c,item:r,isScope:i,content:l})}),o.sort(ji).reduce(function(r,s){return s.isScope?r.push.apply(r,s.content):r.push(s.content),r},[]).concat(n)},At=function(t,n){n=n||{};var o;return n.getShadowRoot?o=Qt([t],n.includeContainer,{filter:Ln.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Zi}):o=gr(t,n.includeContainer,Ln.bind(null,n)),vr(o)},Ji=function(t,n){n=n||{};var o;return n.getShadowRoot?o=Qt([t],n.includeContainer,{filter:An.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):o=gr(t,n.includeContainer,An.bind(null,n)),o},yr=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return bt.call(t,Xt)===!1?!1:Ln(n,t)};const Et=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Er(e,t){const n=At(e,Et()),o=n.length;if(o===0)return;const r=ft(fe(e)),s=n.indexOf(r),i=s===-1?t===1?0:o-1:s+t;return n[i]}function Kn(e){return Er(fe(e).body,1)||e}function Rr(e){return Er(fe(e).body,-1)||e}function xr(e,t){if(!e)return null;const n=At(fe(e).body,Et()),o=n.length;if(o===0)return null;const r=n.indexOf(e);if(r===-1)return null;const s=(r+t+o)%o;return n[s]}function Qi(e){return xr(e,1)}function ec(e){return xr(e,-1)}function dt(e,t){const n=t||e.currentTarget,o=e.relatedTarget;return!o||!re(n,o)}function tc(e){At(e,Et()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Ro(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const o=n.dataset.tabindex;delete n.dataset.tabindex,o?n.setAttribute("tabindex",o):n.removeAttribute("tabindex")})}const nc={...zo};let xo=0;function oc(e,t="mui"){const[n,o]=d.useState(e),r=e||n;return d.useEffect(()=>{n==null&&(xo+=1,o(`${t}-${xo}`))},[n,t]),r}const wo=nc.useId;function Rt(e,t){if(wo!==void 0){const n=wo();return e??(t?`${t}-${n}`:n)}return oc(e,t)}function wr(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}class rc{nodesRef={current:[]};events=wr();addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(o=>o===t);n!==-1&&this.nodesRef.current.splice(n,1)}}const Sr=d.createContext(null),Cr=d.createContext(null),it=()=>d.useContext(Sr)?.id||null,xt=e=>{const t=d.useContext(Cr);return e??t};function sc(e){const t=Rt(),n=xt(e),o=it();return se(()=>{if(!t)return;const r={id:t,parentId:o};return n?.addNode(r),()=>{n?.removeNode(r)}},[n,t,o]),t}function ic(e){const{children:t,id:n}=e,o=it();return ee.jsx(Sr.Provider,{value:d.useMemo(()=>({id:n,parentId:o}),[n,o]),children:t})}function cc(e){const{children:t,externalTree:n}=e,o=ke(()=>n??new rc).current;return ee.jsx(Cr.Provider,{value:o,children:t})}const ac=500,lc={style:{transition:"none"}},Tr="data-base-ui-click-trigger",_l={fallbackAxisSide:"none"},uc={fallbackAxisSide:"end"},fc={clipPath:"inset(50%)",position:"fixed",top:0,left:0},dc="none",ze="trigger-press",Se="trigger-hover",Or="outside-press",Yl="item-press",Ul="close-press",It="focus-out",Pr="escape-key",ql="list-navigation",zl="cancel-open",Ir="imperative-action",Kl="window-resize";function ce(e,t,n,o){let r=!1,s=!1;const i=Ee;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){s=!0},get isCanceled(){return r},get isPropagationAllowed(){return s},trigger:n,...i}}function kt(e){return`data-base-ui-${e}`}function vn(e,t,n){if(n&&!mt(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const o=e();return typeof o=="number"?o:o?.[t]}return e?.[t]}function ct(e){return e?.ownerDocument||document}const vt=d.forwardRef(function(t,n){const[o,r]=d.useState();se(()=>{yi&&r("button")},[]);const s={tabIndex:0,role:o};return ee.jsx("span",{...t,ref:n,style:Xo,"aria-hidden":o?void 0:!0,...s,"data-base-ui-focus-guard":""})});let So=0;function yn(e,t={}){const{preventScroll:n=!1,cancelPrevious:o=!0,sync:r=!1}=t;o&&cancelAnimationFrame(So);const s=()=>e?.focus({preventScroll:n});r?s():So=requestAnimationFrame(s)}const pt={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Co(e){return e==="inert"?pt.inert:e==="aria-hidden"?pt["aria-hidden"]:pt.none}let Vt=new WeakSet,jt={},En=0;const kr=e=>e&&(e.host||kr(e.parentNode)),pc=(e,t)=>t.map(n=>{if(e.contains(n))return n;const o=kr(n);return e.contains(o)?o:null}).filter(n=>n!=null);function gc(e,t,n,o){const r="data-base-ui-inert",s=o?"inert":n?"aria-hidden":null,i=pc(t,e),a=new Set,c=new Set(i),l=[];jt[r]||(jt[r]=new WeakMap);const u=jt[r];i.forEach(f),p(t),a.clear();function f(g){!g||a.has(g)||(a.add(g),g.parentNode&&f(g.parentNode))}function p(g){!g||c.has(g)||[].forEach.call(g.children,m=>{if(Xe(m)!=="script")if(a.has(m))p(m);else{const h=s?m.getAttribute(s):null,v=h!==null&&h!=="false",E=Co(s),b=(E.get(m)||0)+1,R=(u.get(m)||0)+1;E.set(m,b),u.set(m,R),l.push(m),b===1&&v&&Vt.add(m),R===1&&m.setAttribute(r,""),!v&&s&&m.setAttribute(s,s==="inert"?"":"true")}})}return En+=1,()=>{l.forEach(g=>{const m=Co(s),v=(m.get(g)||0)-1,E=(u.get(g)||0)-1;m.set(g,v),u.set(g,E),v||(!Vt.has(g)&&s&&g.removeAttribute(s),Vt.delete(g)),E||g.removeAttribute(r)}),En-=1,En||(pt.inert=new WeakMap,pt["aria-hidden"]=new WeakMap,pt.none=new WeakMap,Vt=new WeakSet,jt={})}}function mc(e,t=!1,n=!1){const o=fe(e[0]).body;return gc(e.concat(Array.from(o.querySelectorAll("[aria-live]"))),o,t,n)}function To(e){if(!d.isValidElement(e))return null;const t=e,n=t.props;return(Wn(19)?n?.ref:t.ref)??null}function Fn(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function hc(e,t){const n={};for(const o in e){const r=e[o];if(t?.hasOwnProperty(o)){const s=t[o](r);s!=null&&Object.assign(n,s);continue}r===!0?n[`data-${o.toLowerCase()}`]="":r&&(n[`data-${o.toLowerCase()}`]=r.toString())}return n}function bc(e,t){return typeof e=="function"?e(t):e}function vc(e,t){return typeof e=="function"?e(t):e}const Pt={};function Mr(e,t,n,o,r){let s={...Dn(e,Pt)};return t&&(s=Tt(s,t)),n&&(s=Tt(s,n)),o&&(s=Tt(s,o)),r&&(s=Tt(s,r)),s}function yc(e){if(e.length===0)return Pt;if(e.length===1)return Dn(e[0],Pt);let t={...Dn(e[0],Pt)};for(let n=1;n<e.length;n+=1)t=Tt(t,e[n]);return t}function Tt(e,t){return Ar(t)?t(e):Ec(e,t)}function Ec(e,t){if(!t)return e;for(const n in t){const o=t[n];switch(n){case"style":{e[n]=Fn(e.style,o);break}case"className":{e[n]=Lr(e.className,o);break}default:Rc(n,o)?e[n]=xc(e[n],o):e[n]=o}}return e}function Rc(e,t){const n=e.charCodeAt(0),o=e.charCodeAt(1),r=e.charCodeAt(2);return n===111&&o===110&&r>=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function Ar(e){return typeof e=="function"}function Dn(e,t){return Ar(e)?e(t):e??Pt}function xc(e,t){return t?e?n=>{if(wc(n)){const r=n;Nn(r);const s=t(r);return r.baseUIHandlerPrevented||e?.(r),s}const o=t(n);return e?.(n),o}:t:e}function Nn(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Lr(e,t){return t?e?t+" "+e:t:e}function wc(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Je(e,t,n={}){const o=t.render,r=Sc(t,n);if(n.enabled===!1)return null;const s=n.state??Ee;return Cc(e,o,r,s)}function Sc(e,t={}){const{className:n,style:o,render:r}=e,{state:s=Ee,ref:i,props:a,stateAttributesMapping:c,enabled:l=!0}=t,u=l?bc(n,s):void 0,f=l?vc(o,s):void 0,p=l?hc(s,c):Ee,g=l?Fn(p,Array.isArray(a)?yc(a):a)??Ee:Ee;return typeof document<"u"&&(l?Array.isArray(i)?g.ref=As([g.ref,To(r),...i]):g.ref=Ut(g.ref,To(r),i):Ut(null,null)),l?(u!==void 0&&(g.className=Lr(g.className,u)),f!==void 0&&(g.style=Fn(g.style,f)),g):Ee}function Cc(e,t,n,o){if(t){if(typeof t=="function")return t(n,o);const r=Mr(n,t.props);return r.ref=n.ref,d.cloneElement(t,r)}if(e&&typeof e=="string")return Tc(e,n);throw new Error(Ye(8))}function Tc(e,t){return e==="button"?d.createElement("button",{type:"button",...t,key:t.key}):e==="img"?d.createElement("img",{alt:"",...t,key:t.key}):d.createElement(e,t)}const Fr=d.createContext(null),Dr=()=>d.useContext(Fr),Oc=kt("portal");function Pc(e={}){const{ref:t,container:n,componentProps:o=Ee,elementProps:r,elementState:s}=e,i=Rt(),c=Dr()?.portalNode,[l,u]=d.useState(null),[f,p]=d.useState(null),g=Y(E=>{E!==null&&p(E)}),m=d.useRef(null);se(()=>{if(n===null){m.current&&(m.current=null,p(null),u(null));return}if(i==null)return;const E=(n&&(_n(n)?n:n.current))??c??document.body;if(E==null){m.current&&(m.current=null,p(null),u(null));return}m.current!==E&&(m.current=E,p(null),u(E))},[n,c,i]);const h=Je("div",o,{ref:[t,g],state:s,props:[{id:i,[Oc]:""},r]});return{portalNode:f,portalSubtree:l&&h?Ke.createPortal(h,l):null}}const Nr=d.forwardRef(function(t,n){const{children:o,container:r,className:s,render:i,renderGuards:a,...c}=t,{portalNode:l,portalSubtree:u}=Pc({container:r,ref:n,componentProps:t,elementProps:c}),f=d.useRef(null),p=d.useRef(null),g=d.useRef(null),m=d.useRef(null),[h,v]=d.useState(null),E=h?.modal,b=h?.open,R=typeof a=="boolean"?a:!!h&&!h.modal&&h.open&&!!l;d.useEffect(()=>{if(!l||E)return;function S(C){l&&C.relatedTarget&&dt(C)&&(C.type==="focusin"?Ro:tc)(l)}return l.addEventListener("focusin",S,!0),l.addEventListener("focusout",S,!0),()=>{l.removeEventListener("focusin",S,!0),l.removeEventListener("focusout",S,!0)}},[l,E]),d.useEffect(()=>{!l||b||Ro(l)},[b,l]);const y=d.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:g,afterInsideRef:m,portalNode:l,setFocusManagerState:v}),[l]);return ee.jsxs(d.Fragment,{children:[u,ee.jsxs(Fr.Provider,{value:y,children:[R&&l&&ee.jsx(vt,{"data-type":"outside",ref:f,onFocus:S=>{if(dt(S,l))g.current?.focus();else{const C=h?h.domReference:null;Rr(C)?.focus()}}}),R&&l&&ee.jsx("span",{"aria-owns":l.id,style:fc}),l&&Ke.createPortal(o,l),R&&l&&ee.jsx(vt,{"data-type":"outside",ref:p,onFocus:S=>{if(dt(S,l))m.current?.focus();else{const C=h?h.domReference:null;Kn(C)?.focus(),h?.closeOnFocusOut&&h?.onOpenChange(!1,ce(It,S.nativeEvent))}}})]})]})});function Ve(e){return e==null?e:"current"in e?e.current:e}function Ic(e,t){const n=he(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const Oo=20;let Ue=[];function Gn(){Ue=Ue.filter(e=>e.isConnected)}function kc(e){Gn(),e&&Xe(e)!=="body"&&(Ue.push(e),Ue.length>Oo&&(Ue=Ue.slice(-Oo)))}function Rn(){return Gn(),Ue[Ue.length-1]}function Mc(e){if(!e)return null;const t=Et();return yr(e,t)?e:At(e,t)[0]||e}function Ac(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Ce(e).display!=="none"}function Po(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=Et(),r=Ji(e,n).filter(i=>{const a=i.getAttribute("data-tabindex")||"";return yr(i,n)||i.hasAttribute("data-tabindex")&&!a.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||r.length===0?s!=="0"&&e.setAttribute("tabindex","0"):(s!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function Br(e){const{context:t,children:n,disabled:o=!1,order:r=["content"],initialFocus:s=!0,returnFocus:i=!0,restoreFocus:a=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u="",getInsideElements:f=()=>[],nextFocusableElement:p,previousFocusableElement:g,beforeContentFocusGuardRef:m,externalTree:h}=e,v="rootStore"in t?t.rootStore:t,E=v.useState("open"),b=v.useState("domReferenceElement"),R=v.useState("floatingElement"),{events:y,dataRef:S}=v.context,C=Y(()=>S.current.floatingContext?.nodeId),T=Y(f),I=s===!1,N=ho(b)&&I,k=De(r),F=De(s),A=De(i),O=De(u),D=xt(h),P=Dr(),V=d.useRef(null),B=d.useRef(null),w=d.useRef(!1),L=d.useRef(!1),Q=d.useRef(!1),G=d.useRef(-1),X=d.useRef(""),Z=d.useRef(""),_=d.useRef(null),ne=d.useRef(null),q=Ut(_,m,P?.beforeInsideRef),J=Ut(ne,P?.afterInsideRef),de=ot(),pe=ot(),ge=Hn(),$e=P!=null,x=In(R),U=Y((M=x)=>M?At(M,Et()):[]),$=Y(M=>{const W=U(M);return k.current.map(()=>W).filter(Boolean).flat()});d.useEffect(()=>{if(o||!c)return;function M(z){z.key==="Tab"&&re(x,ft(fe(x)))&&U().length===0&&!N&&Ci(z)}const W=fe(x);return W.addEventListener("keydown",M),()=>{W.removeEventListener("keydown",M)}},[o,b,x,c,k,N,U,$]),d.useEffect(()=>{if(o||!R)return;function M(W){const z=xe(W),oe=U().indexOf(z);oe!==-1&&(G.current=oe)}return R.addEventListener("focusin",M),()=>{R.removeEventListener("focusin",M)}},[o,R,U]),d.useEffect(()=>{if(o||!E)return;const M=fe(x);function W(){Q.current=!1}function z(oe){const H=xe(oe),j=re(R,H)||re(b,H)||re(P?.portalNode,H);Q.current=!j,Z.current=oe.pointerType||"keyboard"}function te(){Z.current="keyboard"}return M.addEventListener("pointerdown",z,!0),M.addEventListener("pointerup",W,!0),M.addEventListener("pointercancel",W,!0),M.addEventListener("keydown",te,!0),()=>{M.removeEventListener("pointerdown",z,!0),M.removeEventListener("pointerup",W,!0),M.removeEventListener("pointercancel",W,!0),M.removeEventListener("keydown",te,!0)}},[o,R,b,x,E,P]),d.useEffect(()=>{if(o||!l)return;function M(){L.current=!0,pe.start(0,()=>{L.current=!1})}function W(H){const j=H.relatedTarget,be=H.currentTarget,ae=xe(H);queueMicrotask(()=>{const We=C(),Qe=v.context.triggerElements,at=j?.hasAttribute(kt("focus-guard"))&&[_.current,ne.current,P?.beforeInsideRef.current,P?.afterInsideRef.current,P?.beforeOutsideRef.current,P?.afterOutsideRef.current,Ve(g),Ve(p)].includes(j),et=!(re(b,j)||re(R,j)||re(j,R)||re(P?.portalNode,j)||j!=null&&Qe.hasElement(j)||Qe.hasMatchingElement(ve=>re(ve,j))||at||D&&(nt(D.nodesRef.current,We).find(ve=>re(ve.context?.elements.floating,j)||re(ve.context?.elements.domReference,j))||bo(D.nodesRef.current,We).find(ve=>[ve.context?.elements.floating,In(ve.context?.elements.floating)].includes(j)||ve.context?.elements.domReference===j)));if(be===b&&x&&Po(x,k),a&&be!==b&&!Ac(ae)&&ft(fe(x))===fe(x).body){if(me(x)&&(x.focus(),a==="popup")){ge.request(()=>{x.focus()});return}const ve=G.current,Me=U(),Ae=Me[ve]||Me[Me.length-1]||x;me(Ae)&&Ae.focus()}if(S.current.insideReactTree){S.current.insideReactTree=!1;return}(N||!c)&&j&&et&&!L.current&&(N||j!==Rn())&&(w.current=!0,v.setOpen(!1,ce(It,H)))})}function z(){Q.current||(S.current.insideReactTree=!0,de.start(0,()=>{S.current.insideReactTree=!1}))}const te=me(b)?b:null,oe=[];if(!(!R&&!te))return te&&(te.addEventListener("focusout",W),te.addEventListener("pointerdown",M),oe.push(()=>{te.removeEventListener("focusout",W),te.removeEventListener("pointerdown",M)})),R&&(R.addEventListener("focusout",W),P&&(R.addEventListener("focusout",z,!0),oe.push(()=>{R.removeEventListener("focusout",z,!0)})),oe.push(()=>{R.removeEventListener("focusout",W)})),()=>{oe.forEach(H=>{H()})}},[o,b,R,x,c,D,P,v,l,a,U,N,C,k,S,de,pe,ge,p,g]),d.useEffect(()=>{if(o||!R||!E)return;const M=Array.from(P?.portalNode?.querySelectorAll(`[${kt("portal")}]`)||[]),z=(D?bo(D.nodesRef.current,C()):[]).find(H=>ho(H.context?.elements.domReference||null))?.context?.elements.domReference,te=[R,z,...M,...T(),V.current,B.current,_.current,ne.current,P?.beforeOutsideRef.current,P?.afterOutsideRef.current,Ve(g),Ve(p),N?b:null].filter(H=>H!=null),oe=mc(te,c||N);return()=>{oe()}},[E,o,b,R,c,k,P,N,D,C,T,p,g]),se(()=>{if(!E||o||!me(x))return;const M=fe(x),W=ft(M);queueMicrotask(()=>{const z=$(x),te=F.current,oe=typeof te=="function"?te(O.current||""):te;if(oe===void 0||oe===!1)return;let H;oe===!0||oe===null?H=z[0]||x:H=Ve(oe),H=H||z[0]||x,!re(x,W)&&yn(H,{preventScroll:H===x})})},[o,E,x,I,$,F,O]),se(()=>{if(o||!x)return;const M=fe(x),W=ft(M);kc(W);function z(H){if(H.open||(X.current=Ic(H.nativeEvent,Z.current)),H.reason===Se&&H.nativeEvent.type==="mouseleave"&&(w.current=!0),H.reason===Or)if(H.nested)w.current=!1;else if(Oi(H.nativeEvent)||Pi(H.nativeEvent))w.current=!1;else{let j=!1;document.createElement("div").focus({get preventScroll(){return j=!0,!1}}),j?w.current=!1:w.current=!0}}y.on("openchange",z);const te=M.createElement("span");te.setAttribute("tabindex","-1"),te.setAttribute("aria-hidden","true"),Object.assign(te.style,Xo),$e&&b&&b.insertAdjacentElement("afterend",te);function oe(){const H=A.current;let j=typeof H=="function"?H(X.current):H;if(j===void 0||j===!1)return null;if(j===null&&(j=!0),typeof j=="boolean"){const ae=b||Rn();return ae&&ae.isConnected?ae:te}const be=b||Rn()||te;return Ve(j)||be}return()=>{y.off("openchange",z);const H=ft(M),j=re(R,H)||D&&nt(D.nodesRef.current,C(),!1).some(ae=>re(ae.context?.elements.floating,H)),be=oe();queueMicrotask(()=>{const ae=Mc(be),We=typeof A.current!="boolean";A.current&&!w.current&&me(ae)&&(!(!We&&ae!==H&&H!==M.body)||j)&&ae.focus({preventScroll:!0}),te.remove()})}},[o,R,x,A,S,y,D,$e,b,C]),d.useEffect(()=>{queueMicrotask(()=>{w.current=!1})},[o]),d.useEffect(()=>{if(o||!E)return;function M(z){xe(z)?.closest(`[${Tr}]`)&&(L.current=!0)}const W=fe(x);return W.addEventListener("pointerdown",M,!0),()=>{W.removeEventListener("pointerdown",M,!0)}},[o,E,x]),se(()=>{if(!o&&P)return P.setFocusManagerState({modal:c,closeOnFocusOut:l,open:E,onOpenChange:v.setOpen,domReference:b}),()=>{P.setFocusManagerState(null)}},[o,P,c,E,v,l,b]),se(()=>{if(!(o||!x))return Po(x,k),()=>{queueMicrotask(Gn)}},[o,x,k]);const ue=!o&&(c?!N:!0)&&($e||c);return ee.jsxs(d.Fragment,{children:[ue&&ee.jsx(vt,{"data-type":"inside",ref:q,onFocus:M=>{if(c){const W=$();yn(W[W.length-1])}else P?.portalNode&&(w.current=!1,dt(M,P.portalNode)?Kn(b)?.focus():Ve(g??P.beforeOutsideRef)?.focus())}}),n,ue&&ee.jsx(vt,{"data-type":"inside",ref:J,onFocus:M=>{c?yn($()[0]):P?.portalNode&&(l&&(w.current=!0),dt(M,P.portalNode)?Rr(b)?.focus():Ve(p??P.afterOutsideRef)?.focus())}})]})}function Lc(e,t={}){const n="rootStore"in e?e.rootStore:e,o=n.context.dataRef,{enabled:r=!0,event:s="click",toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:c=!0,touchOpenDelay:l=0}=t,u=d.useRef(void 0),f=Hn(),p=ot(),g=d.useMemo(()=>({onPointerDown(m){u.current=m.pointerType},onMouseDown(m){const h=u.current,v=m.nativeEvent,E=n.select("open");if(m.button!==0||s==="click"||mt(h,!0)&&a)return;const b=o.current.openEvent,R=b?.type,y=n.select("domReferenceElement")!==m.currentTarget,S=E&&y||!(E&&i&&(!(b&&c)||R==="click"||R==="mousedown"));if(ur(v.target)){const T=ce(ze,v,v.target);S&&h==="touch"&&l>0?p.start(l,()=>{n.setOpen(!0,T)}):n.setOpen(S,T);return}const C=m.currentTarget;f.request(()=>{const T=ce(ze,v,C);S&&h==="touch"&&l>0?p.start(l,()=>{n.setOpen(!0,T)}):n.setOpen(S,T)})},onClick(m){if(s==="mousedown-only")return;const h=u.current;if(s==="mousedown"&&h){u.current=void 0;return}if(mt(h,!0)&&a)return;const v=n.select("open"),E=o.current.openEvent,b=n.select("domReferenceElement")!==m.currentTarget,R=v&&b||!(v&&i&&(!(E&&c)||fr(E))),y=ce(ze,m.nativeEvent,m.currentTarget);R&&h==="touch"&&l>0?p.start(l,()=>{n.setOpen(!0,y)}):n.setOpen(R,y)},onKeyDown(){u.current=void 0}}),[o,s,a,n,c,i,f,p,l]);return d.useMemo(()=>r?{reference:g}:Ee,[r,g])}function Io(e,t,n){let{reference:o,floating:r}=e;const s=Oe(t),i=zn(t),a=qn(i),c=Re(t),l=s==="y",u=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,p=o[a]/2-r[a]/2;let g;switch(c){case"top":g={x:u,y:o.y-r.height};break;case"bottom":g={x:u,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:f};break;case"left":g={x:o.x-r.width,y:f};break;default:g={x:o.x,y:o.y}}switch(Ze(t)){case"start":g[i]-=p*(n&&l?-1:1);break;case"end":g[i]+=p*(n&&l?-1:1);break}return g}async function Fc(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:g=0}=_e(t,e),m=dr(g),v=a[p?f==="floating"?"reference":"floating":f],E=Gt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:u,strategy:c})),b=f==="floating"?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),y=await(s.isElement==null?void 0:s.isElement(R))?await(s.getScale==null?void 0:s.getScale(R))||{x:1,y:1}:{x:1,y:1},S=Gt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:R,strategy:c}):b);return{top:(E.top-S.top+m.top)/y.y,bottom:(S.bottom-E.bottom+m.bottom)/y.y,left:(E.left-S.left+m.left)/y.x,right:(S.right-E.right+m.right)/y.x}}const Dc=50,Nc=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:i}=n,a=i.detectOverflow?i:{...i,detectOverflow:Fc},c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:f}=Io(l,o,c),p=o,g=0;const m={};for(let h=0;h<s.length;h++){const v=s[h];if(!v)continue;const{name:E,fn:b}=v,{x:R,y,data:S,reset:C}=await b({x:u,y:f,initialPlacement:o,placement:p,strategy:r,middlewareData:m,rects:l,platform:a,elements:{reference:e,floating:t}});u=R??u,f=y??f,m[E]={...m[E],...S},C&&g<Dc&&(g++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(l=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):C.rects),{x:u,y:f}=Io(l,p,c)),h=-1)}return{x:u,y:f,placement:p,strategy:r,middlewareData:m}},Bc=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...v}=_e(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const E=Re(r),b=Oe(a),R=Re(a)===a,y=await(c.isRTL==null?void 0:c.isRTL(l.floating)),S=p||(R||!h?[Kt(a)]:Ai(a)),C=m!=="none";!p&&C&&S.push(...Ni(a,h,m,y));const T=[a,...S],I=await c.detectOverflow(t,v),N=[];let k=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&N.push(I[E]),f){const D=Mi(r,i,y);N.push(I[D[0]],I[D[1]])}if(k=[...k,{placement:r,overflows:N}],!N.every(D=>D<=0)){var F,A;const D=(((F=s.flip)==null?void 0:F.index)||0)+1,P=T[D];if(P&&(!(f==="alignment"?b!==Oe(P):!1)||k.every(w=>Oe(w.placement)===b?w.overflows[0]>0:!0)))return{data:{index:D,overflows:k},reset:{placement:P}};let V=(A=k.filter(B=>B.overflows[0]<=0).sort((B,w)=>B.overflows[1]-w.overflows[1])[0])==null?void 0:A.placement;if(!V)switch(g){case"bestFit":{var O;const B=(O=k.filter(w=>{if(C){const L=Oe(w.placement);return L===b||L==="y"}return!0}).map(w=>[w.placement,w.overflows.filter(L=>L>0).reduce((L,Q)=>L+Q,0)]).sort((w,L)=>w[1]-L[1])[0])==null?void 0:O[0];B&&(V=B);break}case"initialPlacement":V=a;break}if(r!==V)return{reset:{placement:V}}}return{}}}};function ko(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Mo(e){return Ii.some(t=>e[t]>=0)}const $c=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:r="referenceHidden",...s}=_e(e,t);switch(r){case"referenceHidden":{const i=await o.detectOverflow(t,{...s,elementContext:"reference"}),a=ko(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Mo(a)}}}case"escaped":{const i=await o.detectOverflow(t,{...s,altBoundary:!0}),a=ko(i,n.floating);return{data:{escapedOffsets:a,escaped:Mo(a)}}}default:return{}}}}},$r=new Set(["left","top"]);async function Wc(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=Re(n),a=Ze(n),c=Oe(n)==="y",l=$r.has(i)?-1:1,u=s&&c?-1:1,f=_e(t,e);let{mainAxis:p,crossAxis:g,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof m=="number"&&(g=a==="end"?m*-1:m),c?{x:g*u,y:p*l}:{x:p*l,y:g*u}}const Vc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:i,middlewareData:a}=t,c=await Wc(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:r+c.x,y:s+c.y,data:{...c,placement:i}}}}},jc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:E=>{let{x:b,y:R}=E;return{x:b,y:R}}},...l}=_e(e,t),u={x:n,y:o},f=await s.detectOverflow(t,l),p=Oe(Re(r)),g=Un(p);let m=u[g],h=u[p];if(i){const E=g==="y"?"top":"left",b=g==="y"?"bottom":"right",R=m+f[E],y=m-f[b];m=kn(R,m,y)}if(a){const E=p==="y"?"top":"left",b=p==="y"?"bottom":"right",R=h+f[E],y=h-f[b];h=kn(R,h,y)}const v=c.fn({...t,[g]:m,[p]:h});return{...v,data:{x:v.x-n,y:v.y-o,enabled:{[g]:i,[p]:a}}}}}},Hc=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=_e(e,t),u={x:n,y:o},f=Oe(r),p=Un(f);let g=u[p],m=u[f];const h=_e(a,t),v=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){const R=p==="y"?"height":"width",y=s.reference[p]-s.floating[R]+v.mainAxis,S=s.reference[p]+s.reference[R]-v.mainAxis;g<y?g=y:g>S&&(g=S)}if(l){var E,b;const R=p==="y"?"width":"height",y=$r.has(Re(r)),S=s.reference[f]-s.floating[R]+(y&&((E=i.offset)==null?void 0:E[f])||0)+(y?0:v.crossAxis),C=s.reference[f]+s.reference[R]+(y?0:((b=i.offset)==null?void 0:b[f])||0)-(y?v.crossAxis:0);m<S?m=S:m>C&&(m=C)}return{[p]:g,[f]:m}}}},_c=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:i,elements:a}=t,{apply:c=()=>{},...l}=_e(e,t),u=await i.detectOverflow(t,l),f=Re(r),p=Ze(r),g=Oe(r)==="y",{width:m,height:h}=s.floating;let v,E;f==="top"||f==="bottom"?(v=f,E=p===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(E=f,v=p==="end"?"top":"bottom");const b=h-u.top-u.bottom,R=m-u.left-u.right,y=ht(h-u[v],b),S=ht(m-u[E],R),C=!t.middlewareData.shift;let T=y,I=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(I=R),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(T=b),C&&!p){const k=we(u.left,0),F=we(u.right,0),A=we(u.top,0),O=we(u.bottom,0);g?I=m-2*(k!==0||F!==0?k+F:we(u.left,u.right)):T=h-2*(A!==0||O!==0?A+O:we(u.top,u.bottom))}await c({...t,availableWidth:I,availableHeight:T});const N=await i.getDimensions(a.floating);return m!==N.width||h!==N.height?{reset:{rects:!0}}:{}}}};function Wr(e){const t=Ce(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=me(e),s=r?e.offsetWidth:n,i=r?e.offsetHeight:o,a=zt(n)!==s||zt(o)!==i;return a&&(n=s,o=i),{width:n,height:o,$:a}}function Xn(e){return ie(e)?e:e.contextElement}function gt(e){const t=Xn(e);if(!me(t))return Ne(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=Wr(t);let i=(s?zt(n.width):n.width)/o,a=(s?zt(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Yc=Ne(0);function Vr(e){const t=he(e);return!on()||!t.visualViewport?Yc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Uc(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==he(e)?!1:t}function rt(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=Xn(e);let i=Ne(1);t&&(o?ie(o)&&(i=gt(o)):i=gt(e));const a=Uc(s,n,o)?Vr(s):Ne(0);let c=(r.left+a.x)/i.x,l=(r.top+a.y)/i.y,u=r.width/i.x,f=r.height/i.y;if(s){const p=he(s),g=o&&ie(o)?he(o):o;let m=p,h=Tn(m);for(;h&&o&&g!==m;){const v=gt(h),E=h.getBoundingClientRect(),b=Ce(h),R=E.left+(h.clientLeft+parseFloat(b.paddingLeft))*v.x,y=E.top+(h.clientTop+parseFloat(b.paddingTop))*v.y;c*=v.x,l*=v.y,u*=v.x,f*=v.y,c+=R,l+=y,m=he(h),h=Tn(m)}}return Gt({width:u,height:f,x:c,y:l})}function sn(e,t){const n=rn(e).scrollLeft;return t?t.left+n:rt(Be(e)).left+n}function jr(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-sn(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function qc(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",i=Be(o),a=t?nn(t.floating):!1;if(o===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},l=Ne(1);const u=Ne(0),f=me(o);if((f||!f&&!s)&&((Xe(o)!=="body"||st(i))&&(c=rn(o)),f)){const g=rt(o);l=gt(o),u.x=g.x+o.clientLeft,u.y=g.y+o.clientTop}const p=i&&!f&&!s?jr(i,c):Ne(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+p.x,y:n.y*l.y-c.scrollTop*l.y+u.y+p.y}}function zc(e){return Array.from(e.getClientRects())}function Kc(e){const t=Be(e),n=rn(e),o=e.ownerDocument.body,r=we(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=we(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+sn(e);const a=-n.scrollTop;return Ce(o).direction==="rtl"&&(i+=we(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:i,y:a}}const Ao=25;function Gc(e,t){const n=he(e),o=Be(e),r=n.visualViewport;let s=o.clientWidth,i=o.clientHeight,a=0,c=0;if(r){s=r.width,i=r.height;const u=on();(!u||u&&t==="fixed")&&(a=r.offsetLeft,c=r.offsetTop)}const l=sn(o);if(l<=0){const u=o.ownerDocument,f=u.body,p=getComputedStyle(f),g=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(o.clientWidth-f.clientWidth-g);m<=Ao&&(s-=m)}else l<=Ao&&(s+=l);return{width:s,height:i,x:a,y:c}}function Xc(e,t){const n=rt(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=me(e)?gt(e):Ne(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=r*s.x,l=o*s.y;return{width:i,height:a,x:c,y:l}}function Lo(e,t,n){let o;if(t==="viewport")o=Gc(e,n);else if(t==="document")o=Kc(Be(e));else if(ie(t))o=Xc(t,n);else{const r=Vr(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Gt(o)}function Hr(e,t){const n=He(e);return n===t||!ie(n)||je(n)?!1:Ce(n).position==="fixed"||Hr(n,t)}function Zc(e,t){const n=t.get(e);if(n)return n;let o=qe(e,[],!1).filter(a=>ie(a)&&Xe(a)!=="body"),r=null;const s=Ce(e).position==="fixed";let i=s?He(e):e;for(;ie(i)&&!je(i);){const a=Ce(i),c=Yn(i);!c&&a.position==="fixed"&&(r=null),(s?!c&&!r:!c&&a.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||st(i)&&!c&&Hr(e,i))?o=o.filter(u=>u!==i):r=a,i=He(i)}return t.set(e,o),o}function Jc(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?nn(t)?[]:Zc(t,this._c):[].concat(n),o],a=Lo(t,i[0],r);let c=a.top,l=a.right,u=a.bottom,f=a.left;for(let p=1;p<i.length;p++){const g=Lo(t,i[p],r);c=we(g.top,c),l=ht(g.right,l),u=ht(g.bottom,u),f=we(g.left,f)}return{width:l-f,height:u-c,x:f,y:c}}function Qc(e){const{width:t,height:n}=Wr(e);return{width:t,height:n}}function ea(e,t,n){const o=me(t),r=Be(t),s=n==="fixed",i=rt(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Ne(0);function l(){c.x=sn(r)}if(o||!o&&!s)if((Xe(t)!=="body"||st(r))&&(a=rn(t)),o){const g=rt(t,!0,s,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else r&&l();s&&!o&&r&&l();const u=r&&!o&&!s?jr(r,a):Ne(0),f=i.left+a.scrollLeft-c.x-u.x,p=i.top+a.scrollTop-c.y-u.y;return{x:f,y:p,width:i.width,height:i.height}}function xn(e){return Ce(e).position==="static"}function Fo(e,t){if(!me(e)||Ce(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Be(e)===n&&(n=n.ownerDocument.body),n}function _r(e,t){const n=he(e);if(nn(e))return n;if(!me(e)){let r=He(e);for(;r&&!je(r);){if(ie(r)&&!xn(r))return r;r=He(r)}return n}let o=Fo(e,t);for(;o&&gi(o)&&xn(o);)o=Fo(o,t);return o&&je(o)&&xn(o)&&!Yn(o)?n:o||bi(e)||n}const ta=async function(e){const t=this.getOffsetParent||_r,n=this.getDimensions,o=await n(e.floating);return{reference:ea(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function na(e){return Ce(e).direction==="rtl"}const oa={convertOffsetParentRelativeRectToViewportRelativeRect:qc,getDocumentElement:Be,getClippingRect:Jc,getOffsetParent:_r,getElementRects:ta,getClientRects:zc,getDimensions:Qc,getScale:gt,isElement:ie,isRTL:na};function Yr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ra(e,t){let n=null,o;const r=Be(e);function s(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:u,top:f,width:p,height:g}=l;if(a||t(),!p||!g)return;const m=Wt(f),h=Wt(r.clientWidth-(u+p)),v=Wt(r.clientHeight-(f+g)),E=Wt(u),R={rootMargin:-m+"px "+-h+"px "+-v+"px "+-E+"px",threshold:we(0,ht(1,c))||1};let y=!0;function S(C){const T=C[0].intersectionRatio;if(T!==c){if(!y)return i();T?i(!1,T):o=setTimeout(()=>{i(!1,1e-7)},1e3)}T===1&&!Yr(l,e.getBoundingClientRect())&&i(),y=!1}try{n=new IntersectionObserver(S,{...R,root:r.ownerDocument})}catch{n=new IntersectionObserver(S,R)}n.observe(e)}return i(!0),s}function Do(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,l=Xn(e),u=r||s?[...l?qe(l):[],...t?qe(t):[]]:[];u.forEach(E=>{r&&E.addEventListener("scroll",n,{passive:!0}),s&&E.addEventListener("resize",n)});const f=l&&a?ra(l,n):null;let p=-1,g=null;i&&(g=new ResizeObserver(E=>{let[b]=E;b&&b.target===l&&g&&t&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var R;(R=g)==null||R.observe(t)})),n()}),l&&!c&&g.observe(l),t&&g.observe(t));let m,h=c?rt(e):null;c&&v();function v(){const E=rt(e);h&&!Yr(h,E)&&n(),h=E,m=requestAnimationFrame(v)}return n(),()=>{var E;u.forEach(b=>{r&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),f?.(),(E=g)==null||E.disconnect(),g=null,c&&cancelAnimationFrame(m)}}const sa=Vc,ia=jc,ca=Bc,aa=_c,la=$c,ua=Hc,fa=(e,t,n)=>{const o=new Map,r={platform:oa,...n},s={...r.platform,_c:o};return Nc(e,t,{...r,platform:s})};var da=typeof document<"u",pa=function(){},_t=da?d.useLayoutEffect:pa;function en(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!en(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!en(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Ur(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function No(e,t){const n=Ur(e);return Math.round(t*n)/n}function wn(e){const t=d.useRef(e);return _t(()=>{t.current=e}),t}function ga(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[u,f]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,g]=d.useState(o);en(p,o)||g(o);const[m,h]=d.useState(null),[v,E]=d.useState(null),b=d.useCallback(w=>{w!==C.current&&(C.current=w,h(w))},[]),R=d.useCallback(w=>{w!==T.current&&(T.current=w,E(w))},[]),y=s||m,S=i||v,C=d.useRef(null),T=d.useRef(null),I=d.useRef(u),N=c!=null,k=wn(c),F=wn(r),A=wn(l),O=d.useCallback(()=>{if(!C.current||!T.current)return;const w={placement:t,strategy:n,middleware:p};F.current&&(w.platform=F.current),fa(C.current,T.current,w).then(L=>{const Q={...L,isPositioned:A.current!==!1};D.current&&!en(I.current,Q)&&(I.current=Q,Ke.flushSync(()=>{f(Q)}))})},[p,t,n,F,A]);_t(()=>{l===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,f(w=>({...w,isPositioned:!1})))},[l]);const D=d.useRef(!1);_t(()=>(D.current=!0,()=>{D.current=!1}),[]),_t(()=>{if(y&&(C.current=y),S&&(T.current=S),y&&S){if(k.current)return k.current(y,S,O);O()}},[y,S,O,k,N]);const P=d.useMemo(()=>({reference:C,floating:T,setReference:b,setFloating:R}),[b,R]),V=d.useMemo(()=>({reference:y,floating:S}),[y,S]),B=d.useMemo(()=>{const w={position:n,left:0,top:0};if(!V.floating)return w;const L=No(V.floating,u.x),Q=No(V.floating,u.y);return a?{...w,transform:"translate("+L+"px, "+Q+"px)",...Ur(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:Q}},[n,a,V.floating,u.x,u.y]);return d.useMemo(()=>({...u,update:O,refs:P,elements:V,floatingStyles:B}),[u,O,P,V,B])}const ma=(e,t)=>{const n=sa(e);return{name:n.name,fn:n.fn,options:[e,t]}},ha=(e,t)=>{const n=ia(e);return{name:n.name,fn:n.fn,options:[e,t]}},ba=(e,t)=>({fn:ua(e).fn,options:[e,t]}),va=(e,t)=>{const n=ca(e);return{name:n.name,fn:n.fn,options:[e,t]}},ya=(e,t)=>{const n=aa(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ea=(e,t)=>{const n=la(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ra={intentional:"onClick",sloppy:"onPointerDown"};function xa(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function qr(e,t={}){const n="rootStore"in e?e.rootStore:e,o=n.useState("open"),r=n.useState("floatingElement"),s=n.useState("referenceElement"),i=n.useState("domReferenceElement"),{onOpenChange:a,dataRef:c}=n.context,{enabled:l=!0,escapeKey:u=!0,outsidePress:f=!0,outsidePressEvent:p="sloppy",referencePress:g=!1,referencePressEvent:m="sloppy",ancestorScroll:h=!1,bubbles:v,externalTree:E}=t,b=xt(E),R=Y(typeof f=="function"?f:()=>!1),y=typeof f=="function"?R:f,S=d.useRef(!1),{escapeKey:C,outsidePress:T}=xa(v),I=d.useRef(null),N=ot(),k=ot(),F=Y(()=>{k.clear(),c.current.insideReactTree=!1}),A=d.useRef(!1),O=d.useRef(""),D=Y(x=>{O.current=x.pointerType}),P=Y(()=>{const x=O.current,U=x==="pen"||!x?"mouse":x,$=typeof p=="function"?p():p;return typeof $=="string"?$:$[U]}),V=Y(x=>{if(!o||!l||!u||x.key!=="Escape"||A.current)return;const U=c.current.floatingContext?.nodeId,$=b?nt(b.nodesRef.current,U):[];if(!C&&$.length>0){let W=!0;if($.forEach(z=>{z.context?.open&&!z.context.dataRef.current.__escapeKeyBubbles&&(W=!1)}),!W)return}const ue=Ti(x)?x.nativeEvent:x,M=ce(Pr,ue);n.setOpen(!1,M),!C&&!M.isPropagationAllowed&&x.stopPropagation()}),B=Y(x=>{const U=P();return U==="intentional"&&x.type!=="click"||U==="sloppy"&&x.type==="click"}),w=Y(()=>{c.current.insideReactTree=!0,k.start(0,F)}),L=Y((x,U=!1)=>{if(B(x)){F();return}if(c.current.insideReactTree){F();return}if(P()==="intentional"&&U||typeof y=="function"&&!y(x))return;const $=xe(x),ue=`[${kt("inert")}]`,M=fe(n.select("floatingElement")).querySelectorAll(ue),W=n.context.triggerElements;if($&&(W.hasElement($)||W.hasMatchingElement(j=>re(j,$))))return;let z=ie($)?$:null;for(;z&&!je(z);){const j=He(z);if(je(j)||!ie(j))break;z=j}if(M.length&&ie($)&&!Si($)&&!re($,n.select("floatingElement"))&&Array.from(M).every(j=>!re(z,j)))return;if(me($)&&!("touches"in x)){const j=je($),be=Ce($),ae=/auto|scroll/,We=j||ae.test(be.overflowX),Qe=j||ae.test(be.overflowY),at=We&&$.clientWidth>0&&$.scrollWidth>$.clientWidth,et=Qe&&$.clientHeight>0&&$.scrollHeight>$.clientHeight,ve=be.direction==="rtl",Me=et&&(ve?x.offsetX<=$.offsetWidth-$.clientWidth:x.offsetX>$.clientWidth),Ae=at&&x.offsetY>$.clientHeight;if(Me||Ae)return}const te=c.current.floatingContext?.nodeId,oe=b&&nt(b.nodesRef.current,te).some(j=>Pe(x,j.context?.elements.floating));if(Pe(x,n.select("floatingElement"))||Pe(x,n.select("domReferenceElement"))||oe)return;const H=b?nt(b.nodesRef.current,te):[];if(H.length>0){let j=!0;if(H.forEach(be=>{be.context?.open&&!be.context.dataRef.current.__outsidePressBubbles&&(j=!1)}),!j)return}n.setOpen(!1,ce(Or,x)),F()}),Q=Y(x=>{P()!=="sloppy"||x.pointerType==="touch"||!n.select("open")||!l||Pe(x,n.select("floatingElement"))||Pe(x,n.select("domReferenceElement"))||L(x)}),G=Y(x=>{if(P()!=="sloppy"||!n.select("open")||!l||Pe(x,n.select("floatingElement"))||Pe(x,n.select("domReferenceElement")))return;const U=x.touches[0];U&&(I.current={startTime:Date.now(),startX:U.clientX,startY:U.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},N.start(1e3,()=>{I.current&&(I.current.dismissOnTouchEnd=!1,I.current.dismissOnMouseDown=!1)}))}),X=Y(x=>{const U=xe(x);function $(){G(x),U?.removeEventListener(x.type,$)}U?.addEventListener(x.type,$)}),Z=Y(x=>{const U=S.current;if(S.current=!1,N.clear(),x.type==="mousedown"&&I.current&&!I.current.dismissOnMouseDown)return;const $=xe(x);function ue(){x.type==="pointerdown"?Q(x):L(x,U),$?.removeEventListener(x.type,ue)}$?.addEventListener(x.type,ue)}),_=Y(x=>{if(P()!=="sloppy"||!I.current||Pe(x,n.select("floatingElement"))||Pe(x,n.select("domReferenceElement")))return;const U=x.touches[0];if(!U)return;const $=Math.abs(U.clientX-I.current.startX),ue=Math.abs(U.clientY-I.current.startY),M=Math.sqrt($*$+ue*ue);M>5&&(I.current.dismissOnTouchEnd=!0),M>10&&(L(x),N.clear(),I.current=null)}),ne=Y(x=>{const U=xe(x);function $(){_(x),U?.removeEventListener(x.type,$)}U?.addEventListener(x.type,$)}),q=Y(x=>{P()!=="sloppy"||!I.current||Pe(x,n.select("floatingElement"))||Pe(x,n.select("domReferenceElement"))||(I.current.dismissOnTouchEnd&&L(x),N.clear(),I.current=null)}),J=Y(x=>{const U=xe(x);function $(){q(x),U?.removeEventListener(x.type,$)}U?.addEventListener(x.type,$)});d.useEffect(()=>{if(!o||!l)return;c.current.__escapeKeyBubbles=C,c.current.__outsidePressBubbles=T;const x=new Ge;function U(z){n.setOpen(!1,ce(dc,z))}function $(){x.clear(),A.current=!0}function ue(){x.start(on()?5:0,()=>{A.current=!1})}const M=fe(r);M.addEventListener("pointerdown",D,!0),u&&(M.addEventListener("keydown",V),M.addEventListener("compositionstart",$),M.addEventListener("compositionend",ue)),y&&(M.addEventListener("click",Z,!0),M.addEventListener("pointerdown",Z,!0),M.addEventListener("touchstart",X,!0),M.addEventListener("touchmove",ne,!0),M.addEventListener("touchend",J,!0),M.addEventListener("mousedown",Z,!0));let W=[];return h&&(ie(i)&&(W=qe(i)),ie(r)&&(W=W.concat(qe(r))),!ie(s)&&s&&s.contextElement&&(W=W.concat(qe(s.contextElement)))),W=W.filter(z=>z!==M.defaultView?.visualViewport),W.forEach(z=>{z.addEventListener("scroll",U,{passive:!0})}),()=>{M.removeEventListener("pointerdown",D,!0),u&&(M.removeEventListener("keydown",V),M.removeEventListener("compositionstart",$),M.removeEventListener("compositionend",ue)),y&&(M.removeEventListener("click",Z,!0),M.removeEventListener("pointerdown",Z,!0),M.removeEventListener("touchstart",X,!0),M.removeEventListener("touchmove",ne,!0),M.removeEventListener("touchend",J,!0),M.removeEventListener("mousedown",Z,!0)),W.forEach(z=>{z.removeEventListener("scroll",U)}),x.clear(),S.current=!1}},[c,r,s,i,u,y,o,a,h,l,C,T,V,L,Z,Q,X,ne,J,D,n]),d.useEffect(F,[y,F]);const de=d.useMemo(()=>({onKeyDown:V,...g&&{[Ra[m]]:x=>{n.setOpen(!1,ce(ze,x.nativeEvent))},...m!=="intentional"&&{onClick(x){n.setOpen(!1,ce(ze,x.nativeEvent))}}}}),[V,n,g,m]),pe=Y(x=>{const U=xe(x.nativeEvent);!re(n.select("floatingElement"),U)||x.button!==0||(S.current=!0)}),ge=Y(x=>{!o||!l||x.button!==0||(S.current=!0)}),$e=d.useMemo(()=>({onKeyDown:V,onPointerDown:pe,onMouseDown:pe,onMouseUp:pe,onClickCapture:w,onMouseDownCapture(x){w(),ge(x)},onPointerDownCapture(x){w(),ge(x)},onMouseUpCapture:w,onTouchEndCapture:w,onTouchMoveCapture:w}),[V,pe,w,ge]);return d.useMemo(()=>l?{reference:de,floating:$e,trigger:de}:{},[l,de,$e])}const wa={open:K(e=>e.open),domReferenceElement:K(e=>e.domReferenceElement),referenceElement:K(e=>e.positionReference??e.referenceElement),floatingElement:K(e=>e.floatingElement),floatingId:K(e=>e.floatingId)};class Zn extends Vn{constructor(t){const{nested:n,noEmit:o,onOpenChange:r,triggerElements:s,...i}=t;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:wr(),nested:n,noEmit:o,triggerElements:s},wa)}setOpen=(t,n)=>{if((!t||!this.state.open||fr(n.event))&&(this.context.dataRef.current.openEvent=t?n.event:void 0),!this.context.noEmit){const o={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",o)}this.context.onOpenChange?.(t,n)}}function Sa(e,t=!1,n=!1){const[o,r]=d.useState(e&&t?"idle":void 0),[s,i]=d.useState(e);return e&&!s&&(i(!0),r("starting")),!e&&s&&o!=="ending"&&!n&&r("ending"),!e&&!s&&o==="ending"&&r(void 0),se(()=>{if(!e&&s&&o!=="ending"&&n){const a=Fe.request(()=>{r("ending")});return()=>{Fe.cancel(a)}}},[e,s,o,n]),se(()=>{if(!e||t)return;const a=Fe.request(()=>{r(void 0)});return()=>{Fe.cancel(a)}},[t,e]),se(()=>{if(!e||!t)return;e&&s&&o!=="idle"&&r("starting");const a=Fe.request(()=>{r("idle")});return()=>{Fe.cancel(a)}},[t,e,s,r,o]),d.useMemo(()=>({mounted:s,setMounted:i,transitionStatus:o}),[s,o])}let Mt=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Ca={[Mt.startingStyle]:""},Ta={[Mt.endingStyle]:""},cn={transitionStatus(e){return e==="starting"?Ca:e==="ending"?Ta:null}};function zr(e,t=!1,n=!0){const o=Hn();return Y((r,s=null)=>{o.cancel();function i(){Ke.flushSync(r)}const a=Ve(e);if(a==null)return;const c=a;if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)r();else{let l=function(){const f=Mt.startingStyle;if(!c.hasAttribute(f)){o.request(u);return}const p=new MutationObserver(()=>{c.hasAttribute(f)||(p.disconnect(),u())});p.observe(c,{attributes:!0,attributeFilter:[f]}),s?.addEventListener("abort",()=>p.disconnect(),{once:!0})},u=function(){Promise.all(c.getAnimations().map(f=>f.finished)).then(()=>{s?.aborted||i()}).catch(()=>{const f=c.getAnimations();if(n){if(s?.aborted)return;i()}else f.length>0&&f.some(p=>p.pending||p.playState!=="finished")&&u()})};if(t){l();return}o.request(u)}})}function Jn(e){const{enabled:t=!0,open:n,ref:o,onComplete:r}=e,s=Y(r),i=zr(o,n,!1);d.useEffect(()=>{if(!t)return;const a=new AbortController;return i(s,a.signal),()=>{a.abort()}},[t,n,s,i])}function Oa(e,t){const n=d.useRef(null),o=d.useRef(null);return d.useCallback(r=>{if(e!==void 0){if(n.current!==null){const s=n.current,i=o.current,a=t.context.triggerElements.getById(s);i&&a===i&&t.context.triggerElements.delete(s),n.current=null,o.current=null}r!==null&&(n.current=e,o.current=r,t.context.triggerElements.add(e,r))}},[t,e])}function Pa(e,t,n,o){const r=n.useState("isMountedByTrigger",e),s=Oa(e,n),i=Y(a=>{if(s(a),!a||!n.select("open"))return;const c=n.select("activeTriggerId");if(c===e){n.update({activeTriggerElement:a,...o});return}c==null&&n.update({activeTriggerId:e,activeTriggerElement:a,...o})});return se(()=>{r&&n.update({activeTriggerElement:t.current,...o})},[r,n,t,...Object.values(o)]),{registerTrigger:i,isMountedByThisTrigger:r}}function Kr(e){const t=e.useState("open");se(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[o,r]=n.value;e.update({activeTriggerId:o,activeTriggerElement:r})}}},[t,e])}function Gr(e,t,n){const{mounted:o,setMounted:r,transitionStatus:s}=Sa(e);t.useSyncedValues({mounted:o,transitionStatus:s});const i=Y(()=>{r(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}),a=t.useState("preventUnmountingOnClose");return Jn({enabled:!a,open:e,ref:t.context.popupRef,onComplete(){e||i()}}),{forceUnmount:i,transitionStatus:s}}class an{constructor(){this.elements=new Set,this.idMap=new Map}add(t,n){const o=this.idMap.get(t);o!==n&&(o!==void 0&&this.elements.delete(o),this.elements.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elements.delete(n),this.idMap.delete(t))}hasElement(t){return this.elements.has(t)}hasMatchingElement(t){for(const n of this.elements)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function Ia(){return new Zn({open:!1,floatingElement:null,referenceElement:null,triggerElements:new an,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function Xr(){return{open:!1,mounted:!1,transitionStatus:"idle",floatingRootContext:Ia(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,popupElement:null,positionerElement:null,activeTriggerProps:Ee,inactiveTriggerProps:Ee,popupProps:Ee}}const Zr={open:K(e=>e.open),mounted:K(e=>e.mounted),transitionStatus:K(e=>e.transitionStatus),floatingRootContext:K(e=>e.floatingRootContext),preventUnmountingOnClose:K(e=>e.preventUnmountingOnClose),payload:K(e=>e.payload),activeTriggerId:K(e=>e.activeTriggerId),activeTriggerElement:K(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:K((e,t)=>t!==void 0&&e.activeTriggerId===t),isOpenedByTrigger:K((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.open),isMountedByTrigger:K((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.mounted),triggerProps:K((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:K(e=>e.popupProps),popupElement:K(e=>e.popupElement),positionerElement:K(e=>e.positionerElement)};function ka(e){const{open:t=!1,onOpenChange:n,elements:o={}}=e,r=Rt(),s=it()!=null,i=ke(()=>new Zn({open:t,onOpenChange:n,referenceElement:o.reference??null,floatingElement:o.floating??null,triggerElements:o.triggers??new an,floatingId:r,nested:s,noEmit:e.noEmit||!1})).current;return se(()=>{const a={open:t,floatingId:r};o.reference!==void 0&&(a.referenceElement=o.reference,a.domReferenceElement=ie(o.reference)?o.reference:null),o.floating!==void 0&&(a.floatingElement=o.floating),i.update(a)},[t,r,o.reference,o.floating,i]),i.context.onOpenChange=n,i.context.nested=s,i.context.noEmit=e.noEmit||!1,i}function Ma(e={}){const{nodeId:t,externalTree:n}=e,o=ka(e),r=e.rootContext||o,s={reference:r.useState("referenceElement"),floating:r.useState("floatingElement"),domReference:r.useState("domReferenceElement")},[i,a]=d.useState(null),c=d.useRef(null),l=xt(n);se(()=>{s.domReference&&(c.current=s.domReference)},[s.domReference]);const u=ga({...e,elements:{...s,...i&&{reference:i}}}),f=d.useCallback(T=>{const I=ie(T)?{getBoundingClientRect:()=>T.getBoundingClientRect(),getClientRects:()=>T.getClientRects(),contextElement:T}:T;a(I),u.refs.setReference(I)},[u.refs]),[p,g]=d.useState(null),[m,h]=d.useState(null);r.useSyncedValue("referenceElement",p),r.useSyncedValue("domReferenceElement",ie(p)?p:null),r.useSyncedValue("floatingElement",m);const v=d.useCallback(T=>{(ie(T)||T===null)&&(c.current=T,g(T)),(ie(u.refs.reference.current)||u.refs.reference.current===null||T!==null&&!ie(T))&&u.refs.setReference(T)},[u.refs,g]),E=d.useCallback(T=>{h(T),u.refs.setFloating(T)},[u.refs]),b=d.useMemo(()=>({...u.refs,setReference:v,setFloating:E,setPositionReference:f,domReference:c}),[u.refs,v,E,f]),R=d.useMemo(()=>({...u.elements,domReference:s.domReference}),[u.elements,s.domReference]),y=r.useState("open"),S=r.useState("floatingId"),C=d.useMemo(()=>({...u,dataRef:r.context.dataRef,open:y,onOpenChange:r.setOpen,events:r.context.events,floatingId:S,refs:b,elements:R,nodeId:t,rootStore:r}),[u,b,R,t,r,y,S]);return se(()=>{r.context.dataRef.current.floatingContext=C;const T=l?.nodesRef.current.find(I=>I.id===t);T&&(T.context=C)}),d.useMemo(()=>({...u,context:C,refs:b,elements:R,rootStore:r}),[u,b,R,C,r])}function Jr(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:o=!1,onOpenChange:r}=e,s=Rt(),i=it()!=null,a=t.useState("open"),c=t.useState("activeTriggerElement"),l=t.useState(o?"popupElement":"positionerElement"),u=t.context.triggerElements,f=ke(()=>new Zn({open:a,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:r,floatingId:s,nested:i,noEmit:n})).current;return se(()=>{const p={open:a,floatingId:s,referenceElement:c,floatingElement:l};ie(c)&&(p.domReferenceElement=c),f.state.positionReference===f.state.referenceElement&&(p.positionReference=c),f.update(p)},[a,s,c,l,f]),f.context.onOpenChange=r,f.context.nested=i,f.context.noEmit=n,f}const Bn=kt("safe-polygon"),Aa=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${lr}`;function La(e){return e?!!e.closest(Aa):!1}function Qr(e){const t=d.useRef(void 0),n=d.useRef(!1),o=d.useRef(void 0),r=d.useRef(!0),s=d.useRef(!1),i=d.useRef(()=>{}),a=d.useRef(!1),c=ot(),l=ot(),u=d.useRef(void 0);return d.useMemo(()=>{const f=e.context.dataRef.current;return f.hoverInteractionState||(f.hoverInteractionState={pointerTypeRef:t,interactedInsideRef:n,handlerRef:o,blockMouseMoveRef:r,performedPointerEventsMutationRef:s,unbindMouseMoveRef:i,restTimeoutPendingRef:a,openChangeTimeout:c,restTimeout:l,handleCloseOptionsRef:u}),f.hoverInteractionState},[e,t,n,o,r,s,i,a,c,l,u])}const Fa=new Set(["click","mousedown"]);function Da(e,t={}){const n="rootStore"in e?e.rootStore:e,o=n.useState("open"),r=n.useState("floatingElement"),s=n.useState("domReferenceElement"),{dataRef:i}=n.context,{enabled:a=!0,closeDelay:c=0,externalTree:l}=t,{pointerTypeRef:u,interactedInsideRef:f,handlerRef:p,performedPointerEventsMutationRef:g,unbindMouseMoveRef:m,restTimeoutPendingRef:h,openChangeTimeout:v,handleCloseOptionsRef:E}=Qr(n),b=xt(l),R=it(),y=Y(()=>f.current?!0:i.current.openEvent?Fa.has(i.current.openEvent.type):!1),S=Y(()=>{const k=i.current.openEvent?.type;return k?.includes("mouse")&&k!=="mousedown"}),C=d.useCallback((k,F=!0)=>{const A=Na(c,u.current);A&&!p.current?v.start(A,()=>n.setOpen(!1,ce(Se,k))):F&&(v.clear(),n.setOpen(!1,ce(Se,k)))},[c,p,n,u,v]),T=Y(()=>{m.current(),p.current=void 0}),I=Y(()=>{if(g.current){const k=fe(r).body;k.style.pointerEvents="",k.removeAttribute(Bn),g.current=!1}}),N=Y(k=>{const F=xe(k);if(!La(F)){f.current=!1;return}f.current=!0});se(()=>{o||(u.current=void 0,h.current=!1,f.current=!1,T(),I())},[o,u,h,f,T,I]),d.useEffect(()=>()=>{T()},[T]),d.useEffect(()=>I,[I]),se(()=>{if(a&&o&&E.current?.blockPointerEvents&&S()&&ie(s)&&r){g.current=!0;const k=fe(r).body;k.setAttribute(Bn,"");const F=s,A=r,O=b?.nodesRef.current.find(D=>D.id===R)?.context?.elements.floating;return O&&(O.style.pointerEvents=""),k.style.pointerEvents="none",F.style.pointerEvents="auto",A.style.pointerEvents="auto",()=>{k.style.pointerEvents="",F.style.pointerEvents="",A.style.pointerEvents=""}}},[a,o,s,r,E,S,b,R,g]),d.useEffect(()=>{if(!a)return;function k(D){if(y()||!i.current.floatingContext||!n.select("open"))return;const P=n.context.triggerElements;D.relatedTarget&&P.hasElement(D.relatedTarget)||(I(),T(),y()||C(D))}function F(D){v.clear(),I(),p.current?.(D),T()}function A(D){y()||C(D,!1)}const O=r;return O&&(O.addEventListener("mouseleave",k),O.addEventListener("mouseenter",F),O.addEventListener("mouseleave",A),O.addEventListener("pointerdown",N,!0)),()=>{O&&(O.removeEventListener("mouseleave",k),O.removeEventListener("mouseenter",F),O.removeEventListener("mouseleave",A),O.removeEventListener("pointerdown",N,!0))}})}function Na(e,t){return t&&!mt(t)?0:typeof e=="function"?e():e}function Sn(e){return typeof e=="function"?e():e}const Ba={current:null};function $a(e,t={}){const n="rootStore"in e?e.rootStore:e,{dataRef:o,events:r}=n.context,{enabled:s=!0,delay:i=0,handleClose:a=null,mouseOnly:c=!1,restMs:l=0,move:u=!0,triggerElementRef:f=Ba,externalTree:p,isActiveTrigger:g=!0}=t,m=xt(p),{pointerTypeRef:h,interactedInsideRef:v,handlerRef:E,blockMouseMoveRef:b,performedPointerEventsMutationRef:R,unbindMouseMoveRef:y,restTimeoutPendingRef:S,openChangeTimeout:C,restTimeout:T,handleCloseOptionsRef:I}=Qr(n),N=De(a),k=De(i),F=De(l);g&&(I.current=N.current?.__options);const A=Y(()=>v.current?!0:o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1),O=d.useCallback((B,w=!0)=>{const L=vn(k.current,"close",h.current);L&&!E.current?C.start(L,()=>n.setOpen(!1,ce(Se,B))):w&&(C.clear(),n.setOpen(!1,ce(Se,B)))},[k,E,n,h,C]),D=Y(()=>{y.current(),E.current=void 0}),P=Y(()=>{if(R.current){const B=fe(n.select("domReferenceElement")).body;B.style.pointerEvents="",B.removeAttribute(Bn),R.current=!1}});d.useEffect(()=>{if(!s)return;function B(w){w.open||(C.clear(),T.clear(),b.current=!0,S.current=!1)}return r.on("openchange",B),()=>{r.off("openchange",B)}},[s,r,C,T,b,S]);const V=Y(B=>{if(A()||!o.current.floatingContext)return;const w=n.context.triggerElements;if(B.relatedTarget&&w.hasElement(B.relatedTarget))return;const L=f.current;N.current?.({...o.current.floatingContext,tree:m,x:B.clientX,y:B.clientY,onClose(){P(),D(),!A()&&L===n.select("domReferenceElement")&&O(B)}})(B)});return d.useEffect(()=>{if(!s)return;const B=f.current??(g?n.select("domReferenceElement"):null);if(!ie(B))return;function w(G){if(C.clear(),b.current=!1,c&&!mt(h.current)||Sn(F.current)>0&&!vn(k.current,"open"))return;const X=vn(k.current,"open",h.current),Z=n.select("domReferenceElement"),_=n.context.triggerElements,ne=(_.hasElement(G.target)||_.hasMatchingElement(pe=>re(pe,G.target)))&&(!Z||!re(Z,G.target)),q=G.currentTarget??null,J=n.select("open"),de=!J||ne;ne&&J?n.setOpen(!0,ce(Se,G,q)):X?C.start(X,()=>{de&&n.setOpen(!0,ce(Se,G,q))}):de&&n.setOpen(!0,ce(Se,G,q))}function L(G){if(A()){P();return}y.current();const X=n.select("domReferenceElement"),Z=fe(X);T.clear(),S.current=!1;const _=n.context.triggerElements;if(G.relatedTarget&&_.hasElement(G.relatedTarget))return;if(N.current&&o.current.floatingContext){n.select("open")||C.clear();const q=f.current;E.current=N.current({...o.current.floatingContext,tree:m,x:G.clientX,y:G.clientY,onClose(){P(),D(),!A()&&q===n.select("domReferenceElement")&&O(G,!0)}});const J=E.current;J(G),Z.addEventListener("mousemove",J),y.current=()=>{Z.removeEventListener("mousemove",J)};return}(h.current!=="touch"||!re(n.select("floatingElement"),G.relatedTarget))&&O(G)}function Q(G){V(G)}return n.select("open")&&B.addEventListener("mouseleave",Q),u&&B.addEventListener("mousemove",w,{once:!0}),B.addEventListener("mouseenter",w),B.addEventListener("mouseleave",L),()=>{B.removeEventListener("mouseleave",Q),u&&B.removeEventListener("mousemove",w),B.removeEventListener("mouseenter",w),B.removeEventListener("mouseleave",L)}},[D,P,b,o,k,O,n,s,N,V,g,A,c,u,h,F,T,S,C,f,m,y,E]),d.useMemo(()=>{function B(w){h.current=w.pointerType}return{onPointerDown:B,onPointerEnter:B,onMouseMove(w){const{nativeEvent:L}=w,Q=w.currentTarget,G=n.select("domReferenceElement"),X=n.context.triggerElements,Z=n.select("open"),_=(X.hasElement(w.target)||X.hasMatchingElement(q=>re(q,w.target)))&&(!G||!re(G,w.target));if(c&&!mt(h.current)||Z&&!_||Sn(F.current)===0||!_&&S.current&&w.movementX**2+w.movementY**2<2)return;T.clear();function ne(){if(S.current=!1,A())return;const q=n.select("open");!b.current&&(!q||_)&&n.setOpen(!0,ce(Se,L,Q))}h.current==="touch"?Ke.flushSync(()=>{ne()}):_&&Z?ne():(S.current=!0,T.start(Sn(F.current),ne))}}},[b,A,c,n,h,F,T,S])}function Qn(e=[]){const t=e.map(l=>l?.reference),n=e.map(l=>l?.floating),o=e.map(l=>l?.item),r=e.map(l=>l?.trigger),s=d.useCallback(l=>Ht(l,e,"reference"),t),i=d.useCallback(l=>Ht(l,e,"floating"),n),a=d.useCallback(l=>Ht(l,e,"item"),o),c=d.useCallback(l=>Ht(l,e,"trigger"),r);return d.useMemo(()=>({getReferenceProps:s,getFloatingProps:i,getItemProps:a,getTriggerProps:c}),[s,i,a,c])}function Ht(e,t,n){const o=new Map,r=n==="item",s={};n==="floating"&&(s.tabIndex=-1,s[Pn]="");for(const i in e)r&&e&&(i===cr||i===ar)||(s[i]=e[i]);for(let i=0;i<t.length;i+=1){let a;const c=t[i]?.[n];typeof c=="function"?a=e?c(e):null:a=c,a&&Bo(s,a,r,o)}return Bo(s,e,r,o),s}function Bo(e,t,n,o){for(const r in t){const s=t[r];n&&(r===cr||r===ar)||(r.startsWith("on")?(o.has(r)||o.set(r,[]),typeof s=="function"&&(o.get(r)?.push(s),e[r]=(...i)=>o.get(r)?.map(a=>a(...i)).find(a=>a!==void 0))):e[r]=s)}}const Wa=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function es(e,t={}){const n="rootStore"in e?e.rootStore:e,o=n.useState("open"),r=n.useState("floatingId"),s=n.useState("domReferenceElement"),i=n.useState("floatingElement"),{enabled:a=!0,role:c="dialog"}=t,l=Rt(),u=s?.id||l,f=d.useMemo(()=>In(i)?.id||r,[i,r]),p=Wa.get(c)??c,m=it()!=null,h=d.useMemo(()=>p==="tooltip"||c==="label"?Ee:{"aria-haspopup":p==="alertdialog"?"dialog":p,"aria-expanded":"false",...p==="listbox"&&{role:"combobox"},...p==="menu"&&m&&{role:"menuitem"},...c==="select"&&{"aria-autocomplete":"none"},...c==="combobox"&&{"aria-autocomplete":"list"}},[p,m,c]),v=d.useMemo(()=>p==="tooltip"||c==="label"?{[`aria-${c==="label"?"labelledby":"describedby"}`]:o?f:void 0}:{...h,"aria-expanded":o?"true":"false","aria-controls":o?f:void 0,...p==="menu"&&{id:u}},[p,f,o,u,c,h]),E=d.useMemo(()=>{const R={id:f,...p&&{role:p}};return p==="tooltip"||c==="label"?R:{...R,...p==="menu"&&{"aria-labelledby":u}}},[p,f,u,c]),b=d.useCallback(({active:R,selected:y})=>{const S={role:"option",...R&&{id:`${f}-fui-option`}};switch(c){case"select":case"combobox":return{...S,"aria-selected":y}}return{}},[f,c]);return d.useMemo(()=>a?{reference:v,floating:E,item:b,trigger:h}:{},[a,v,E,h,b])}function $o(e,t){const[n,o]=e;let r=!1;const s=t.length;for(let i=0,a=s-1;i<s;a=i++){const[c,l]=t[i]||[0,0],[u,f]=t[a]||[0,0];l>=o!=f>=o&&n<=(u-c)*(o-l)/(f-l)+c&&(r=!r)}return r}function Va(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function ja(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:o=!0}=e,r=new Ge;let s=!1,i=null,a=null,c=typeof performance<"u"?performance.now():0;function l(f,p){const g=performance.now(),m=g-c;if(i===null||a===null||m===0)return i=f,a=p,c=g,null;const h=f-i,v=p-a,b=Math.sqrt(h*h+v*v)/m;return i=f,a=p,c=g,b}const u=({x:f,y:p,placement:g,elements:m,onClose:h,nodeId:v,tree:E})=>function(R){function y(){r.clear(),h()}if(r.clear(),!m.domReference||!m.floating||g==null||f==null||p==null)return;const{clientX:S,clientY:C}=R,T=[S,C],I=xe(R),N=R.type==="mouseleave",k=re(m.floating,I),F=re(m.domReference,I),A=m.domReference.getBoundingClientRect(),O=m.floating.getBoundingClientRect(),D=g.split("-")[0],P=f>O.right-O.width/2,V=p>O.bottom-O.height/2,B=Va(T,A),w=O.width>A.width,L=O.height>A.height,Q=(w?A:O).left,G=(w?A:O).right,X=(L?A:O).top,Z=(L?A:O).bottom;if(k&&(s=!0,!N))return;if(F&&(s=!1),F&&!N){s=!0;return}if(N&&ie(R.relatedTarget)&&re(m.floating,R.relatedTarget)||E&&nt(E.nodesRef.current,v).some(({context:q})=>q?.open))return;if(D==="top"&&p>=A.bottom-1||D==="bottom"&&p<=A.top+1||D==="left"&&f>=A.right-1||D==="right"&&f<=A.left+1)return y();let _=[];switch(D){case"top":_=[[Q,A.top+1],[Q,O.bottom-1],[G,O.bottom-1],[G,A.top+1]];break;case"bottom":_=[[Q,O.top+1],[Q,A.bottom-1],[G,A.bottom-1],[G,O.top+1]];break;case"left":_=[[O.right-1,Z],[O.right-1,X],[A.left+1,X],[A.left+1,Z]];break;case"right":_=[[A.right-1,Z],[A.right-1,X],[O.left+1,X],[O.left+1,Z]];break}function ne([q,J]){switch(D){case"top":{const de=[w?q+t/2:P?q+t*4:q-t*4,J+t+1],pe=[w?q-t/2:P?q+t*4:q-t*4,J+t+1],ge=[[O.left,P||w?O.bottom-t:O.top],[O.right,P?w?O.bottom-t:O.top:O.bottom-t]];return[de,pe,...ge]}case"bottom":{const de=[w?q+t/2:P?q+t*4:q-t*4,J-t],pe=[w?q-t/2:P?q+t*4:q-t*4,J-t],ge=[[O.left,P||w?O.top+t:O.bottom],[O.right,P?w?O.top+t:O.bottom:O.top+t]];return[de,pe,...ge]}case"left":{const de=[q+t+1,L?J+t/2:V?J+t*4:J-t*4],pe=[q+t+1,L?J-t/2:V?J+t*4:J-t*4];return[...[[V||L?O.right-t:O.left,O.top],[V?L?O.right-t:O.left:O.right-t,O.bottom]],de,pe]}case"right":{const de=[q-t,L?J+t/2:V?J+t*4:J-t*4],pe=[q-t,L?J-t/2:V?J+t*4:J-t*4],ge=[[V||L?O.left+t:O.right,O.top],[V?L?O.left+t:O.right:O.left+t,O.bottom]];return[de,pe,...ge]}default:return[]}}if(!$o([S,C],_)){if(s&&!B)return y();if(!N&&o){const q=l(R.clientX,R.clientY);if(q!==null&&q<.1)return y()}$o([S,C],ne([f,p]))?!s&&o&&r.start(40,y):y()}};return u.__options={blockPointerEvents:n},u}function ts(e){return Rt(e,"base-ui")}function Ha(e){const t=d.useRef(""),n=d.useCallback(r=>{r.defaultPrevented||(t.current=r.pointerType,e(r,r.pointerType))},[e]);return{onClick:d.useCallback(r=>{if(r.detail===0){e(r,"keyboard");return}"pointerType"in r&&e(r,r.pointerType),e(r,t.current),t.current=""},[e]),onPointerDown:n}}function ns(e){const[t,n]=d.useState(null),o=Y((a,c)=>{e||n(c||(ir?"touch":""))}),r=d.useCallback(()=>{n(null)},[]),{onClick:s,onPointerDown:i}=Ha(o);return d.useMemo(()=>({openMethod:t,reset:r,triggerProps:{onClick:s,onPointerDown:i}}),[t,r,s,i])}let Ie=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Mt.startingStyle]="startingStyle",e[e.endingStyle=Mt.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e})({}),$n=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const _a={[$n.popupOpen]:""},Ya={[$n.popupOpen]:"",[$n.pressed]:""},Ua={[Ie.open]:""},qa={[Ie.closed]:""},za={[Ie.anchorHidden]:""},Ka={open(e){return e?_a:null}},Ga={open(e){return e?Ya:null}},Lt={open(e){return e?Ua:qa},anchorHidden(e){return e?za:null}},Xa=d.createContext(void 0);function Za(e=!1){const t=d.useContext(Xa);if(t===void 0&&!e)throw new Error(Ye(16));return t}function Ja(e){const{focusableWhenDisabled:t,disabled:n,composite:o=!1,tabIndex:r=0,isNativeButton:s}=e,i=o&&t!==!1,a=o&&t===!1;return{props:d.useMemo(()=>{const l={onKeyDown(u){n&&t&&u.key!=="Tab"&&u.preventDefault()}};return o||(l.tabIndex=r,!s&&n&&(l.tabIndex=t?r:-1)),(s&&(t||i)||!s&&n)&&(l["aria-disabled"]=n),s&&(!t||a)&&(l.disabled=n),l},[o,n,t,i,a,s,r])}}function Qa(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:o=0,native:r=!0}=e,s=d.useRef(null),i=Za(!0)!==void 0,a=Y(()=>{const p=s.current;return!!(p?.tagName==="A"&&p?.href)}),{props:c}=Ja({focusableWhenDisabled:n,disabled:t,composite:i,tabIndex:o,isNativeButton:r}),l=d.useCallback(()=>{const p=s.current;el(p)&&i&&t&&c.disabled===void 0&&p.disabled&&(p.disabled=!1)},[t,c.disabled,i]);se(l,[l]);const u=d.useCallback((p={})=>{const{onClick:g,onMouseDown:m,onKeyUp:h,onKeyDown:v,onPointerDown:E,...b}=p;return Mr({type:r?"button":void 0,onClick(y){if(t){y.preventDefault();return}g?.(y)},onMouseDown(y){t||m?.(y)},onKeyDown(y){if(t||(Nn(y),v?.(y)),y.baseUIHandlerPrevented)return;const S=y.target===y.currentTarget&&!r&&!a()&&!t,C=y.key==="Enter",T=y.key===" ";S&&((T||C)&&y.preventDefault(),C&&g?.(y))},onKeyUp(y){t||(Nn(y),h?.(y)),!y.baseUIHandlerPrevented&&y.target===y.currentTarget&&!r&&!t&&y.key===" "&&g?.(y)},onPointerDown(y){if(t){y.preventDefault();return}E?.(y)}},r?void 0:{role:"button"},c,b)},[t,c,r,a]),f=Y(p=>{s.current=p,l()});return{getButtonProps:u,buttonRef:f}}function el(e){return me(e)&&e.tagName==="BUTTON"}function os(e){return Wn(19)?e:e?"true":void 0}let Wo={},Vo={},jo="";function tl(e){if(typeof document>"u")return!1;const t=ct(e);return he(t).innerWidth-t.documentElement.clientWidth>0}function nl(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const o=ct(e).documentElement,r={scrollbarGutter:o.style.scrollbarGutter,overflowY:o.style.overflowY};o.style.scrollbarGutter="stable",o.style.overflowY="scroll";const s=o.offsetWidth;o.style.overflowY="hidden";const i=o.offsetWidth;return Object.assign(o.style,r),s===i}function ol(e){const t=ct(e),n=t.documentElement,o=t.body,r=st(n)?n:o,s=r.style.overflow;return r.style.overflow="hidden",()=>{r.style.overflow=s}}function rl(e){const t=ct(e),n=t.documentElement,o=t.body,r=he(n);let s=0,i=0,a=!1;const c=Fe.create();if(vi&&(r.visualViewport?.scale??1)!==1)return()=>{};function l(){const p=r.getComputedStyle(n),g=r.getComputedStyle(o),v=(p.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";s=n.scrollTop,i=n.scrollLeft,Wo={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},jo=n.style.scrollBehavior,Vo={position:o.style.position,height:o.style.height,width:o.style.width,boxSizing:o.style.boxSizing,overflowY:o.style.overflowY,overflowX:o.style.overflowX,scrollBehavior:o.style.scrollBehavior};const E=n.scrollHeight>n.clientHeight,b=n.scrollWidth>n.clientWidth,R=p.overflowY==="scroll"||g.overflowY==="scroll",y=p.overflowX==="scroll"||g.overflowX==="scroll",S=Math.max(0,r.innerWidth-o.clientWidth),C=Math.max(0,r.innerHeight-o.clientHeight),T=parseFloat(g.marginTop)+parseFloat(g.marginBottom),I=parseFloat(g.marginLeft)+parseFloat(g.marginRight),N=st(n)?n:o;if(a=nl(e),a){n.style.scrollbarGutter=v,N.style.overflowY="hidden",N.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:v,overflowY:"hidden",overflowX:"hidden"}),(E||R)&&(n.style.overflowY="scroll"),(b||y)&&(n.style.overflowX="scroll"),Object.assign(o.style,{position:"relative",height:T||C?`calc(100dvh - ${T+C}px)`:"100dvh",width:I||S?`calc(100vw - ${I+S}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),o.scrollTop=s,o.scrollLeft=i,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function u(){Object.assign(n.style,Wo),Object.assign(o.style,Vo),a||(n.scrollTop=s,n.scrollLeft=i,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=jo)}function f(){u(),c.request(l)}return l(),r.addEventListener("resize",f),()=>{c.cancel(),u(),typeof r.removeEventListener=="function"&&r.removeEventListener("resize",f)}}class sl{lockCount=0;restore=null;timeoutLock=Ge.create();timeoutUnlock=Ge.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const o=ct(t).documentElement,r=he(o).getComputedStyle(o).overflowY;if(r==="hidden"||r==="clip"){this.restore=nr;return}const s=ir||!tl(t);this.restore=s?ol(t):rl(t)}}const il=new sl;function rs(e=!0,t=null){se(()=>{if(e)return il.acquire(t)},[e,t])}const cl=d.createContext(void 0);function al(){return d.useContext(cl)?.direction??"ltr"}const ll=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:f="real"}=_e(e,t)||{};if(l==null)return{};const p=dr(u),g={x:n,y:o},m=zn(r),h=qn(m),v=await i.getDimensions(l),E=m==="y",b=E?"top":"left",R=E?"bottom":"right",y=E?"clientHeight":"clientWidth",S=s.reference[h]+s.reference[m]-g[m]-s.floating[h],C=g[m]-s.reference[m],T=f==="real"?await i.getOffsetParent?.(l):a.floating;let I=a.floating[y]||s.floating[h];(!I||!await i.isElement?.(T))&&(I=a.floating[y]||s.floating[h]);const N=S/2-C/2,k=I/2-v[h]/2-1,F=Math.min(p[b],k),A=Math.min(p[R],k),O=F,D=I-v[h]-A,P=I/2-v[h]/2+N,V=kn(O,P,D),B=!c.arrow&&Ze(r)!=null&&P!==V&&s.reference[h]/2-(P<O?F:A)-v[h]/2<0,w=B?P<O?P-O:P-D:0;return{[m]:g[m]+w,data:{[m]:V,centerOffset:P-V-w,...B&&{alignmentOffset:w}},reset:B}}}),ul=(e,t)=>({...ll(e),options:[e,t]}),fl={name:"hide",async fn(e){const{width:t,height:n,x:o,y:r}=e.rects.reference,s=t===0&&n===0&&o===0&&r===0;return{data:{referenceHidden:(await Ea().fn(e)).data?.referenceHidden||s}}}},Yt={sideX:"left",sideY:"top"},dl={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:o},elements:{floating:r},platform:s,strategy:i,placement:a}=e,c=he(r),l=c.getComputedStyle(r);if(!(l.transitionDuration!=="0s"&&l.transitionDuration!==""))return{x:t,y:n,data:Yt};const f=await s.getOffsetParent?.(r);let p={width:0,height:0};if(i==="fixed"&&c?.visualViewport)p={width:c.visualViewport.width,height:c.visualViewport.height};else if(f===c){const b=ct(r);p={width:b.documentElement.clientWidth,height:b.documentElement.clientHeight}}else await s.isElement?.(f)&&(p=await s.getDimensions(f));const g=Re(a);let m=t,h=n;g==="left"&&(m=p.width-(t+o.width)),g==="top"&&(h=p.height-(n+o.height));const v=g==="left"?"right":Yt.sideX,E=g==="top"?"bottom":Yt.sideY;return{x:m,y:h,data:{sideX:v,sideY:E}}}};function ss(e,t,n){const o=e==="inline-start"||e==="inline-end";return{top:"top",right:o?n?"inline-start":"inline-end":"right",bottom:"bottom",left:o?n?"inline-end":"inline-start":"left"}[t]}function Ho(e,t,n){const{rects:o,placement:r}=e;return{side:ss(t,Re(r),n),align:Ze(r)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function pl(e){const{anchor:t,positionMethod:n="absolute",side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:i=0,collisionBoundary:a,collisionPadding:c=5,sticky:l=!1,arrowPadding:u=5,disableAnchorTracking:f=!1,keepMounted:p=!1,floatingRootContext:g,mounted:m,collisionAvoidance:h,shiftCrossAxis:v=!1,nodeId:E,adaptiveOrigin:b,lazyFlip:R=!1,externalTree:y}=e,[S,C]=d.useState(null);!m&&S!==null&&C(null);const T=h.side||"flip",I=h.align||"flip",N=h.fallbackAxisSide||"end",k=typeof t=="function"?t:void 0,F=Y(k),A=k?F:t,O=De(t),P=al()==="rtl",V=S||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":P?"left":"right","inline-start":P?"right":"left"}[o],B=s==="center"?V:`${V}-${s}`;let w=c;const L=1,Q=o==="bottom"?L:0,G=o==="top"?L:0,X=o==="right"?L:0,Z=o==="left"?L:0;typeof w=="number"?w={top:w+Q,right:w+Z,bottom:w+G,left:w+X}:w&&(w={top:(w.top||0)+Q,right:(w.right||0)+Z,bottom:(w.bottom||0)+G,left:(w.left||0)+X});const _={boundary:a==="clipping-ancestors"?"clippingAncestors":a,padding:w},ne=d.useRef(null),q=De(r),J=De(i),ge=[ma(le=>{const ye=Ho(le,o,P),Le=typeof q.current=="function"?q.current(ye):q.current,Te=typeof J.current=="function"?J.current(ye):J.current;return{mainAxis:Le,crossAxis:Te,alignmentAxis:Te}},[typeof r!="function"?r:0,typeof i!="function"?i:0,P,o])],$e=I==="none"&&T!=="shift",x=!$e&&(l||v||T==="shift"),U=T==="none"?null:va({..._,padding:{top:w.top+L,right:w.right+L,bottom:w.bottom+L,left:w.left+L},mainAxis:!v&&T==="flip",crossAxis:I==="flip"?"alignment":!1,fallbackAxisSideDirection:N}),$=$e?null:ha(le=>{const ye=ct(le.elements.floating).documentElement;return{..._,rootBoundary:v?{x:0,y:0,width:ye.clientWidth,height:ye.clientHeight}:void 0,mainAxis:I!=="none",crossAxis:x,limiter:l||v?void 0:ba(Le=>{if(!ne.current)return{};const{width:Te,height:lt}=ne.current.getBoundingClientRect(),ut=Oe(Re(Le.placement)),Dt=ut==="y"?Te:lt,ln=ut==="y"?w.left+w.right:w.top+w.bottom;return{offset:Dt/2+ln/2}})}},[_,l,v,w,I]);T==="shift"||I==="shift"||s==="center"?ge.push($,U):ge.push(U,$),ge.push(ya({..._,apply({elements:{floating:le},rects:{reference:ye},availableWidth:Le,availableHeight:Te}){Object.entries({"--available-width":`${Le}px`,"--available-height":`${Te}px`,"--anchor-width":`${ye.width}px`,"--anchor-height":`${ye.height}px`}).forEach(([lt,ut])=>{le.style.setProperty(lt,ut)})}}),ul(()=>({element:ne.current||document.createElement("div"),padding:u,offsetParent:"floating"}),[u]),{name:"transformOrigin",fn(le){const{elements:ye,middlewareData:Le,placement:Te,rects:lt,y:ut}=le,Dt=Re(Te),ln=Oe(Dt),io=ne.current,Rs=Le.arrow?.x||0,xs=Le.arrow?.y||0,ws=io?.clientWidth||0,Ss=io?.clientHeight||0,un=Rs+ws/2,co=xs+Ss/2,Cs=Math.abs(Le.shift?.y||0),Ts=lt.reference.height/2,St=typeof r=="function"?r(Ho(le,o,P)):r,Os=Cs>St,Ps={top:`${un}px calc(100% + ${St}px)`,bottom:`${un}px ${-St}px`,left:`calc(100% + ${St}px) ${co}px`,right:`${-St}px ${co}px`}[Dt],Is=`${un}px ${lt.reference.y+Ts-ut}px`;return ye.floating.style.setProperty("--transform-origin",x&&ln==="y"&&Os?Is:Ps),{}}},fl,b),se(()=>{!m&&g&&g.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[m,g]);const ue=d.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:M,elements:W,x:z,y:te,middlewareData:oe,update:H,placement:j,context:be,isPositioned:ae,floatingStyles:We}=Ma({rootContext:g,placement:B,middleware:ge,strategy:n,whileElementsMounted:p?void 0:(...le)=>Do(...le,ue),nodeId:E,externalTree:y}),{sideX:Qe,sideY:at}=oe.adaptiveOrigin||Yt,et=ae?n:"fixed",ve=d.useMemo(()=>b?{position:et,[Qe]:z,[at]:te}:{position:et,...We},[b,et,Qe,z,at,te,We]),Me=d.useRef(null);se(()=>{if(!m)return;const le=O.current,ye=typeof le=="function"?le():le,Te=(_o(ye)?ye.current:ye)||null||null;Te!==Me.current&&(M.setPositionReference(Te),Me.current=Te)},[m,M,A,O]),d.useEffect(()=>{if(!m)return;const le=O.current;typeof le!="function"&&_o(le)&&le.current!==Me.current&&(M.setPositionReference(le.current),Me.current=le.current)},[m,M,A,O]),d.useEffect(()=>{if(p&&m&&W.domReference&&W.floating)return Do(W.domReference,W.floating,H,ue)},[p,m,W,H,ue]);const Ae=Re(j),to=ss(o,Ae,P),no=Ze(j)||"center",oo=!!oe.hide?.referenceHidden;se(()=>{R&&m&&ae&&C(Ae)},[R,m,ae,Ae]);const ro=d.useMemo(()=>({position:"absolute",top:oe.arrow?.y,left:oe.arrow?.x}),[oe.arrow]),so=oe.arrow?.centerOffset!==0;return d.useMemo(()=>({positionerStyles:ve,arrowStyles:ro,arrowRef:ne,arrowUncentered:so,side:to,align:no,physicalSide:Ae,anchorHidden:oo,refs:M,context:be,isPositioned:ae,update:H}),[ve,ro,ne,so,to,no,Ae,oo,M,be,ae,H])}function _o(e){return e!=null&&"current"in e}const is=d.forwardRef(function(t,n){const{cutout:o,...r}=t;let s;if(o){const i=o?.getBoundingClientRect();s=`polygon(
|
|
2
|
+
0% 0%,
|
|
3
|
+
100% 0%,
|
|
4
|
+
100% 100%,
|
|
5
|
+
0% 100%,
|
|
6
|
+
0% 0%,
|
|
7
|
+
${i.left}px ${i.top}px,
|
|
8
|
+
${i.left}px ${i.bottom}px,
|
|
9
|
+
${i.right}px ${i.bottom}px,
|
|
10
|
+
${i.right}px ${i.top}px,
|
|
11
|
+
${i.left}px ${i.top}px
|
|
12
|
+
)`}return ee.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:s}})}),gl=d.createContext(void 0);function ml(e){return d.useContext(gl)}const cs="ArrowUp",as="ArrowDown",ls="ArrowLeft",us="ArrowRight",fs="Home",ds="End",hl=new Set([ls,us]),bl=new Set([cs,as]),vl=new Set([...hl,...bl]);[...vl];const ps=new Set([cs,as,ls,us,fs,ds]);function gs(e){return e==="starting"?lc:Ee}const ms=d.createContext(void 0);function wt(e){const t=d.useContext(ms);if(e===!1&&t===void 0)throw new Error(Ye(27));return t}const yl={...Lt,...cn},Gl=d.forwardRef(function(t,n){const{render:o,className:r,forceRender:s=!1,...i}=t,{store:a}=wt(),c=a.useState("open"),l=a.useState("nested"),u=a.useState("mounted"),f=a.useState("transitionStatus"),p=d.useMemo(()=>({open:c,transitionStatus:f}),[c,f]);return Je("div",t,{state:p,ref:[a.context.backdropRef,n],stateAttributesMapping:yl,props:[{role:"presentation",hidden:!u,style:{userSelect:"none",WebkitUserSelect:"none"}},i],enabled:s||!l})});let El=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),Rl=(function(e){return e[e.open=Ie.open]="open",e[e.closed=Ie.closed]="closed",e[e.startingStyle=Ie.startingStyle]="startingStyle",e[e.endingStyle=Ie.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const hs=d.createContext(void 0);function bs(){const e=d.useContext(hs);if(e===void 0)throw new Error(Ye(26));return e}const xl={...Lt,...cn,nestedDialogOpen(e){return e?{[Rl.nestedDialogOpen]:""}:null}},Xl=d.forwardRef(function(t,n){const{className:o,finalFocus:r,initialFocus:s,render:i,...a}=t,{store:c}=wt(),l=c.useState("descriptionElementId"),u=c.useState("disablePointerDismissal"),f=c.useState("floatingRootContext"),p=c.useState("popupProps"),g=c.useState("modal"),m=c.useState("mounted"),h=c.useState("nested"),v=c.useState("nestedOpenDialogCount"),E=c.useState("open"),b=c.useState("openMethod"),R=c.useState("titleElementId"),y=c.useState("transitionStatus"),S=c.useState("role");bs(),Jn({open:E,ref:c.context.popupRef,onComplete(){E&&c.context.onOpenChangeComplete?.(!0)}});function C(F){return F==="touch"?c.context.popupRef.current:!0}const T=s===void 0?C:s,I=v>0,N=d.useMemo(()=>({open:E,nested:h,transitionStatus:y,nestedDialogOpen:I}),[E,h,y,I]),k=Je("div",t,{state:N,props:[p,{"aria-labelledby":R??void 0,"aria-describedby":l??void 0,role:S,tabIndex:-1,hidden:!m,onKeyDown(F){ps.has(F.key)&&F.stopPropagation()},style:{[El.nestedDialogs]:v}},a],ref:[n,c.context.popupRef,c.useStateSetter("popupElement")],stateAttributesMapping:xl});return ee.jsx(Br,{context:f,openInteractionType:b,disabled:!m,closeOnFocusOut:!u,initialFocus:T,returnFocus:r,modal:g!==!1,restoreFocus:"popup",children:k})}),Zl=d.forwardRef(function(t,n){const{keepMounted:o=!1,...r}=t,{store:s}=wt(),i=s.useState("mounted"),a=s.useState("modal"),c=s.useState("open");return i||o?ee.jsx(hs.Provider,{value:o,children:ee.jsxs(Nr,{ref:n,...r,children:[i&&a===!0&&ee.jsx(is,{ref:s.context.internalBackdropRef,inert:os(!c)}),t.children]})}):null});function wl(e){const{store:t,parentContext:n,actionsRef:o}=e,r=t.useState("open"),s=t.useState("disablePointerDismissal"),i=t.useState("modal"),a=t.useState("popupElement"),{openMethod:c,triggerProps:l,reset:u}=ns(r);Kr(t);const{forceUnmount:f}=Gr(r,t,()=>{u()}),p=Y(k=>{const F=ce(k);return F.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},F}),g=d.useCallback(()=>{t.setOpen(!1,p(Ir))},[t,p]);d.useImperativeHandle(o,()=>({unmount:f,close:g}),[f,g]);const m=Jr({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[h,v]=d.useState(0),E=h===0,b=es(m),R=qr(m,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:i==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(k){if("button"in k&&k.button!==0||"touches"in k&&k.touches.length!==1)return!1;const F=xe(k);if(E&&!s){const A=F;return i&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===A||t.context.backdropRef.current===A||re(A,a)&&!A?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:E});rs(r&&i===!0,a);const{getReferenceProps:y,getFloatingProps:S,getTriggerProps:C}=Qn([b,R]);t.useContextCallback("onNestedDialogOpen",k=>{v(k+1)}),t.useContextCallback("onNestedDialogClose",()=>{v(0)}),d.useEffect(()=>(n?.onNestedDialogOpen&&r&&n.onNestedDialogOpen(h),n?.onNestedDialogClose&&!r&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&r&&n.onNestedDialogClose()}),[r,n,h]);const T=d.useMemo(()=>y(l),[y,l]),I=d.useMemo(()=>C(l),[C,l]),N=d.useMemo(()=>S(),[S]);t.useSyncedValues({openMethod:c,activeTriggerProps:T,inactiveTriggerProps:I,popupProps:N,floatingRootContext:m,nestedOpenDialogCount:h})}const Sl={...Zr,modal:K(e=>e.modal),nested:K(e=>e.nested),nestedOpenDialogCount:K(e=>e.nestedOpenDialogCount),disablePointerDismissal:K(e=>e.disablePointerDismissal),openMethod:K(e=>e.openMethod),descriptionElementId:K(e=>e.descriptionElementId),titleElementId:K(e=>e.titleElementId),viewportElement:K(e=>e.viewportElement),role:K(e=>e.role)};class Cl extends Vn{constructor(t){super(Tl(t),{popupRef:d.createRef(),backdropRef:d.createRef(),internalBackdropRef:d.createRef(),triggerElements:new an,onOpenChange:void 0,onOpenChangeComplete:void 0},Sl)}setOpen=(t,n)=>{if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&n.trigger==null&&this.state.activeTriggerId!=null&&(n.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,n),n.isCanceled)return;const o={open:t,nativeEvent:n.event,reason:n.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",o);const r={open:t},s=n.trigger?.id??null;(s||t)&&(r.activeTriggerId=s,r.activeTriggerElement=n.trigger??null),this.update(r)}}function Tl(e={}){return{...Xr(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function Jl(e){const{children:t,open:n,defaultOpen:o=!1,onOpenChange:r,onOpenChangeComplete:s,disablePointerDismissal:i=!1,modal:a=!0,actionsRef:c,handle:l,triggerId:u,defaultTriggerId:f=null}=e,p=wt(!0),g=!!p,m=ke(()=>l?.store??new Cl({open:n??o,activeTriggerId:u!==void 0?u:f,modal:a,disablePointerDismissal:i,nested:g})).current;m.useControlledProp("open",n,o),m.useControlledProp("activeTriggerId",u,f),m.useSyncedValues({disablePointerDismissal:i,nested:g,modal:a}),m.useContextCallback("onOpenChange",r),m.useContextCallback("onOpenChangeComplete",s);const h=m.useState("payload");wl({store:m,actionsRef:c,parentContext:p?.store.context});const v=d.useMemo(()=>({store:m}),[m]);return ee.jsx(ms.Provider,{value:v,children:typeof t=="function"?t({payload:h}):t})}let Yo=(function(e){return e[e.open=Ie.open]="open",e[e.closed=Ie.closed]="closed",e[e.startingStyle=Ie.startingStyle]="startingStyle",e[e.endingStyle=Ie.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const Ol={...Lt,...cn,nested(e){return e?{[Yo.nested]:""}:null},nestedDialogOpen(e){return e?{[Yo.nestedDialogOpen]:""}:null}},Ql=d.forwardRef(function(t,n){const{className:o,render:r,children:s,...i}=t,a=bs(),{store:c}=wt(),l=c.useState("open"),u=c.useState("nested"),f=c.useState("transitionStatus"),p=c.useState("nestedOpenDialogCount"),g=c.useState("mounted"),m=p>0,h=d.useMemo(()=>({open:l,nested:u,transitionStatus:f,nestedDialogOpen:m}),[l,u,f,m]);return Je("div",t,{enabled:a||g,state:h,ref:[n,c.useStateSetter("viewportElement")],stateAttributesMapping:Ol,props:[{role:"presentation",hidden:!g,children:s},i]})}),eu=d.forwardRef(function(t,n){const{render:o,className:r,id:s,...i}=t,{store:a}=wt(),c=ts(s);return a.useSyncedValueWithCleanup("titleElementId",c),Je("h2",t,{ref:n,props:[{id:c},i]})}),vs=d.createContext(void 0);function Ft(e){const t=d.useContext(vs);if(t===void 0&&!e)throw new Error(Ye(47));return t}function Pl(){return{...Xr(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}const Il={...Zr,disabled:K(e=>e.disabled),instantType:K(e=>e.instantType),openMethod:K(e=>e.openMethod),openChangeReason:K(e=>e.openChangeReason),modal:K(e=>e.modal),stickIfOpen:K(e=>e.stickIfOpen),titleElementId:K(e=>e.titleElementId),descriptionElementId:K(e=>e.descriptionElementId),openOnHover:K(e=>e.openOnHover),closeDelay:K(e=>e.closeDelay),hasViewport:K(e=>e.hasViewport)};class eo extends Vn{constructor(t){const n={...Pl(),...t};n.open&&t?.mounted===void 0&&(n.mounted=!0),super(n,{popupRef:d.createRef(),backdropRef:d.createRef(),internalBackdropRef:d.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:d.createRef(),beforeContentFocusGuardRef:d.createRef(),stickIfOpenTimeout:new Ge,triggerElements:new an},Il)}setOpen=(t,n)=>{const o=n.reason===Se,r=n.reason===ze&&n.event.detail===0,s=!t&&(n.reason===Pr||n.reason==null);if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,n),n.isCanceled)return;const i={open:t,nativeEvent:n.event,reason:n.reason,nested:this.state.nested,triggerElement:n.trigger};this.state.floatingRootContext.context.events?.emit("openchange",i);const c=()=>{const l={open:t,openChangeReason:n.reason},u=n.trigger?.id??null;(u||t)&&(l.activeTriggerId=u,l.activeTriggerElement=n.trigger??null),this.update(l)};o?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(ac,()=>{this.set("stickIfOpen",!1)}),Ke.flushSync(c)):c(),r||s?this.set("instantType",r?"click":"dismiss"):n.reason===It?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(t,n){const o=ke(()=>new eo(n)).current,r=t??o;return jn(o.disposeEffect),r}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}function Uo({props:e}){const{children:t,open:n,defaultOpen:o=!1,onOpenChange:r,onOpenChangeComplete:s,modal:i=!1,handle:a,triggerId:c,defaultTriggerId:l=null}=e,u=eo.useStore(a?.store,{open:n??o,modal:i,activeTriggerId:c!==void 0?c:l});u.useControlledProp("open",n,o),u.useControlledProp("activeTriggerId",c,l);const f=u.useState("open"),p=u.useState("positionerElement"),g=u.useState("payload"),m=u.useState("openChangeReason");u.useContextCallback("onOpenChange",r),u.useContextCallback("onOpenChangeComplete",s);const{openMethod:h,triggerProps:v,reset:E}=ns(f);Kr(u);const{forceUnmount:b}=Gr(f,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null}),E()});rs(f&&i===!0&&m!==Se&&h!=="touch",p),d.useEffect(()=>{f||u.context.stickIfOpenTimeout.clear()},[u,f]);const R=d.useCallback(P=>{const V=ce(P);return V.preventUnmountOnClose=()=>{u.set("preventUnmountingOnClose",!0)},V},[u]),y=d.useCallback(()=>{u.setOpen(!1,R(Ir))},[u,R]);d.useImperativeHandle(e.actionsRef,()=>({unmount:b,close:y}),[b,y]);const S=Jr({popupStore:u,onOpenChange:u.setOpen}),C=qr(S,{outsidePressEvent:{mouse:i==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),T=es(S),{getReferenceProps:I,getFloatingProps:N,getTriggerProps:k}=Qn([C,T]),F=d.useMemo(()=>I(v),[I,v]),A=d.useMemo(()=>k(v),[k,v]),O=d.useMemo(()=>N(),[N]);u.useSyncedValues({modal:i,openMethod:h,activeTriggerProps:F,inactiveTriggerProps:A,popupProps:O,floatingRootContext:S,nested:it()!=null});const D=d.useMemo(()=>({store:u}),[u]);return ee.jsx(vs.Provider,{value:D,children:typeof t=="function"?t({payload:g}):t})}function tu(e){return Ft(!0)?ee.jsx(Uo,{props:e}):ee.jsx(cc,{children:ee.jsx(Uo,{props:e})})}const kl=300,nu=d.forwardRef(function(t,n){const{render:o,className:r,disabled:s=!1,nativeButton:i=!0,handle:a,payload:c,openOnHover:l=!1,delay:u=kl,closeDelay:f=0,id:p,...g}=t,m=Ft(!0),h=a?.store??m?.store;if(!h)throw new Error(Ye(74));const v=ts(p),E=h.useState("isTriggerActive",v),b=h.useState("floatingRootContext"),R=h.useState("isOpenedByTrigger",v),y=d.useRef(null),{registerTrigger:S,isMountedByThisTrigger:C}=Pa(v,y,h,{payload:c,disabled:s,openOnHover:l,closeDelay:f}),T=h.useState("openChangeReason"),I=h.useState("stickIfOpen"),N=h.useState("openMethod"),k=$a(b,{enabled:b!=null&&l&&(N!=="touch"||T!==ze),mouseOnly:!0,move:!1,handleClose:ja(),restMs:u,delay:{close:f},triggerElementRef:y,isActiveTrigger:E}),F=Lc(b,{enabled:b!=null,stickIfOpen:I}),A=Qn([F]),O=h.useState("triggerProps",C),D=d.useMemo(()=>({disabled:s,open:R}),[s,R]),{getButtonProps:P,buttonRef:V}=Qa({disabled:s,native:i}),B=d.useMemo(()=>({open(X){return X&&T===ze?Ga.open(X):Ka.open(X)}}),[T]),w=Je("button",t,{state:D,ref:[V,n,S,y],props:[A.getReferenceProps(),k,O,{[Tr]:"",id:v},g,P],stateAttributesMapping:B}),L=d.useRef(null),Q=Y(X=>{Ke.flushSync(()=>{h.setOpen(!1,ce(It,X.nativeEvent,X.currentTarget))}),ec(L.current)?.focus()}),G=Y(X=>{const Z=h.select("positionerElement");if(Z&&dt(X,Z))h.context.beforeContentFocusGuardRef.current?.focus();else{Ke.flushSync(()=>{h.setOpen(!1,ce(It,X.nativeEvent,X.currentTarget))});let _=Qi(h.context.triggerFocusTargetRef.current||y.current);for(;_!==null&&re(Z,_);){const ne=_;if(_=Kn(_),_===ne)break}_?.focus()}});return E?ee.jsxs(d.Fragment,{children:[ee.jsx(vt,{ref:L,onFocus:Q}),ee.jsx(d.Fragment,{children:w},v),ee.jsx(vt,{ref:h.context.triggerFocusTargetRef,onFocus:G})]}):ee.jsx(d.Fragment,{children:w},v)}),ys=d.createContext(void 0);function Ml(){const e=d.useContext(ys);if(e===void 0)throw new Error(Ye(45));return e}const ou=d.forwardRef(function(t,n){const{keepMounted:o=!1,...r}=t,{store:s}=Ft();return s.useState("mounted")||o?ee.jsx(ys.Provider,{value:o,children:ee.jsx(Nr,{ref:n,...r,renderGuards:!1})}):null}),Es=d.createContext(void 0);function Al(){const e=d.useContext(Es);if(!e)throw new Error(Ye(46));return e}const ru=d.forwardRef(function(t,n){const{render:o,className:r,anchor:s,positionMethod:i="absolute",side:a="bottom",align:c="center",sideOffset:l=0,alignOffset:u=0,collisionBoundary:f="clipping-ancestors",collisionPadding:p=5,arrowPadding:g=5,sticky:m=!1,disableAnchorTracking:h=!1,collisionAvoidance:v=uc,...E}=t,{store:b}=Ft(),R=Ml(),y=sc(),S=b.useState("floatingRootContext"),C=b.useState("mounted"),T=b.useState("open"),I=b.useState("openChangeReason"),N=b.useState("activeTriggerElement"),k=b.useState("modal"),F=b.useState("positionerElement"),A=b.useState("instantType"),O=b.useState("transitionStatus"),D=b.useState("hasViewport"),P=d.useRef(null),V=zr(F,!1,!1),B=pl({anchor:s,floatingRootContext:S,positionMethod:i,mounted:C,side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:g,collisionBoundary:f,collisionPadding:p,sticky:m,disableAnchorTracking:h,keepMounted:R,nodeId:y,collisionAvoidance:v,adaptiveOrigin:D?dl:void 0}),w=d.useMemo(()=>{const _={};return T||(_.pointerEvents="none"),{role:"presentation",hidden:!C,style:{...B.positionerStyles,..._}}},[T,C,B.positionerStyles]),L=d.useMemo(()=>({props:w,...B}),[w,B]),Q=S?.select("domReferenceElement");se(()=>{const _=Q,ne=P.current;if(_&&(P.current=_),ne&&_&&_!==ne){b.set("instantType",void 0);const q=new AbortController;return V(()=>{b.set("instantType","trigger-change")},q.signal),()=>{q.abort()}}},[Q,V,b]);const G=d.useMemo(()=>({open:T,side:L.side,align:L.align,anchorHidden:L.anchorHidden,instant:A}),[T,L.side,L.align,L.anchorHidden,A]),X=d.useCallback(_=>{b.set("positionerElement",_)},[b]),Z=Je("div",t,{state:G,props:[L.props,gs(O),E],ref:[n,X],stateAttributesMapping:Lt});return ee.jsxs(Es.Provider,{value:L,children:[C&&k===!0&&I!==Se&&ee.jsx(is,{ref:b.context.internalBackdropRef,inert:os(!T),cutout:N}),ee.jsx(ic,{id:y,children:Z})]})}),Ll={...Lt,...cn},su=d.forwardRef(function(t,n){const{className:o,render:r,initialFocus:s,finalFocus:i,...a}=t,{store:c}=Ft(),l=Al(),u=ml()!=null,f=c.useState("open"),p=c.useState("openMethod"),g=c.useState("instantType"),m=c.useState("transitionStatus"),h=c.useState("popupProps"),v=c.useState("titleElementId"),E=c.useState("descriptionElementId"),b=c.useState("modal"),R=c.useState("mounted"),y=c.useState("openChangeReason"),S=c.useState("activeTriggerElement"),C=c.useState("floatingRootContext");Jn({open:f,ref:c.context.popupRef,onComplete(){f&&c.context.onOpenChangeComplete?.(!0)}});const T=c.useState("disabled"),I=c.useState("openOnHover"),N=c.useState("closeDelay");Da(C,{enabled:I&&!T,closeDelay:N});function k(P){return P==="touch"?c.context.popupRef.current:!0}const F=s===void 0?k:s,A=d.useMemo(()=>({open:f,side:l.side,align:l.align,instant:g,transitionStatus:m}),[f,l.side,l.align,g,m]),O=d.useCallback(P=>{c.set("popupElement",P)},[c]),D=Je("div",t,{state:A,ref:[n,c.context.popupRef,O],props:[h,{"aria-labelledby":v,"aria-describedby":E,onKeyDown(P){u&&ps.has(P.key)&&P.stopPropagation()}},gs(m),a],stateAttributesMapping:Ll});return ee.jsx(Br,{context:C,openInteractionType:p,modal:b==="trap-focus",disabled:!R||y===Se,initialFocus:F,returnFocus:i,restoreFocus:"popup",previousFocusableElement:me(S)?S:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:D})});export{Jn as $,jl as A,yn as B,Dl as C,Jl as D,ft as E,fe as F,re as G,ql as H,me as I,xe as J,It as K,Nl as L,Oi as M,Pi as N,ot as O,tu as P,$l as Q,Ye as R,nr as S,Ee as T,ts as U,ie as V,K as W,Sa as X,ns as Y,ke as Z,li as _,Qa as a,ka as a0,Lc as a1,qr as a2,Qn as a3,Mr as a4,Ut as a5,Bl as a6,Xo as a7,dc as a8,Ot as a9,Or as aa,Ga as ab,ct as ac,zl as ad,Ka as ae,Nr as af,_l as ag,rs as ah,pl as ai,is as aj,os as ak,Lt as al,ml as am,Hn as an,he as ao,vi as ap,Br as aq,Kl as ar,cn as as,gs as at,ps as au,Yl as av,Je as b,ce as c,Ul as d,Zl as e,Gl as f,Ql as g,Xl as h,eu as i,nu as j,ou as k,ru as l,su as m,Hl as n,Wl as o,Vl as p,Wt as q,In as r,Ci as s,De as t,wt as u,it as v,xt as w,se as x,ho as y,Y as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as l}from"./main-D7f_DoMp.js";function i({size:r=16,className:t=""}){return l.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:l.jsx("path",{d:"M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"})})}function d({size:r=16,className:t=""}){return l.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:t,children:l.jsx("path",{d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"})})}function a({size:r=16,className:t=""}){return l.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:l.jsx("path",{d:"M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z"})})}function x({size:r=16,className:t=""}){return l.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:l.jsx("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z"})})}function s({size:r=16,className:t=""}){return l.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:l.jsx("path",{d:"M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815"})})}function C({size:r=16,className:t=""}){return l.jsx("svg",{width:r,height:r,viewBox:"0 -1 22 28",fill:"currentColor",fillRule:"evenodd",className:t,children:l.jsx("path",{d:"M4.125 20.149c-2.69 5.959 3.036 7.453 7.26 3.966 1.24 3.91 5.898.993 7.569-2.036 3.682-6.678 2.195-13.49 1.813-14.895-2.617-9.582-15.699-9.592-17.95.049-.526 1.687-.535 3.606-.833 5.598-.15 1.005-.256 1.646-.645 2.703-.223.607-.53 1.147-1.014 2.056-.75 1.412-.434 4.138 3.434 2.724v.001ZM11.895 11.332c-1.073 0-1.234-1.283-1.234-2.048 0-.69.124-1.239.358-1.586a1 1 0 0 1 .876-.462c.375 0 .697.158.924.47.259.354.395.9.395 1.578 0 1.283-.493 2.048-1.319 2.048Zm4.416 0c-1.073 0-1.234-1.283-1.234-2.048 0-.69.124-1.239.358-1.586a1 1 0 0 1 .876-.462c.375 0 .697.158.924.47.259.354.396.9.396 1.578 0 1.283-.494 2.048-1.32 2.048Z"})})}function u({size:r=16,className:t=""}){return l.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:l.jsx("path",{d:"M16 6H8v12h8V6zm4 16H4V2h16v20z"})})}function v({size:r=16,className:t=""}){return l.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:[l.jsx("path",{d:"M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z"}),l.jsx("path",{d:"M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z"})]})}function g({size:r=16,className:t=""}){return l.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:l.jsx("path",{d:"M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z"})})}function f({size:r=16,className:t=""}){return l.jsxs("svg",{width:r,height:r,viewBox:"0 0 64 60",fill:"none",className:t,"aria-hidden":"true",children:[l.jsx("path",{fill:"currentColor",d:"M37.2114 3.75318C37.6821 3.33106 37.7106 3.31457 38.0558 3.29385C38.6149 3.2531 39.1272 3.52199 39.9989 4.31564C42.0356 6.16652 44.8714 9.97183 46.6346 13.2212L47.3163 14.4819L48.2782 14.9605C49.2072 15.4299 50.7308 16.3923 51.3672 16.9085C51.655 17.1464 51.6956 17.1508 51.9947 17.0344C53.3454 16.5084 55.2803 17.206 56.9869 18.8432C58.5231 20.3155 59.9943 22.8312 60.558 24.9308C60.6403 25.2687 60.7493 25.9952 60.7891 26.5362C60.9177 28.4358 60.3092 29.9532 59.1362 30.64C58.8965 30.7784 58.8801 30.8158 58.8868 31.4132C58.9409 34.2583 58.1741 37.0985 56.6335 39.8679C54.8946 42.9773 51.7981 46.1938 47.6074 49.2243C45.357 50.8619 40.0323 53.964 37.6248 55.0532C31.8578 57.6496 27.2346 58.646 23.2188 58.154C20.8236 57.8638 18.1124 56.9287 16.5082 55.8433C16.086 55.5515 16.0191 55.5329 15.6966 55.6251C13.9793 56.1185 11.73 55.1053 9.81931 52.9844C9.05725 52.1366 7.82714 50.0548 7.42839 48.9409C6.50606 46.3339 6.68976 43.9816 7.91836 42.5767C8.23573 42.2149 8.2453 42.1995 8.17598 41.5912C8.06148 40.5951 8.00971 39.1206 8.06202 38.1692L8.10361 37.2803L6.76977 34.9212C4.70378 31.2451 3.3912 28.1582 2.88489 25.7998C2.61762 24.5066 2.63385 23.9324 2.96214 23.5078C3.16198 23.2515 3.81796 22.9866 4.60785 22.8407C6.59665 22.4917 10.9334 22.8076 15.7581 23.6595L16.259 23.7458L17.3608 22.7713C19.1891 21.1519 20.4038 20.244 22.6429 18.8478C24.9768 17.3876 27.6108 16.1858 30.577 15.2346L31.5295 14.9294L32.0526 13.5561C33.9257 8.61146 35.8437 4.96584 37.2114 3.75318ZM21.5208 29.0919C19.404 30.314 18.3453 30.9251 17.5676 31.6099C14.4179 34.3835 13.2414 38.777 14.5823 42.7537C14.9135 43.7357 15.5247 44.7942 16.7469 46.9111C17.9691 49.0279 18.5801 50.0865 19.2649 50.8643C22.0385 54.014 26.4316 55.1918 30.4084 53.8509C31.3904 53.5198 32.4489 52.9085 34.5657 51.6863L46.7442 44.6551C48.8613 43.4328 49.9205 42.8214 50.6983 42.1365C53.8479 39.363 55.0245 34.9695 53.6835 30.9927C53.3524 30.0107 52.7412 28.9522 51.519 26.8354C50.2968 24.7185 49.6858 23.66 49.0009 22.8822C46.2274 19.7325 41.8342 18.5547 37.8575 19.8956C36.8754 20.2267 35.8163 20.8383 33.6993 22.0606L21.5208 29.0919Z"}),l.jsx("g",{transform:"rotate(-30 22.6953 37.6011)",children:l.jsx("rect",{x:"22.6953",y:"37.6011",width:"4.81084",height:"9.99175",rx:"2.40542",fill:"currentColor"})}),l.jsx("g",{transform:"rotate(-30 35.6748 30.1074)",children:l.jsx("rect",{x:"35.6748",y:"30.1074",width:"4.81084",height:"9.99175",rx:"2.40542",fill:"currentColor"})})]})}function w({size:r=16,className:t=""}){return l.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:t,children:l.jsx("path",{d:"M7 2h10a5 5 0 015 5v10a5 5 0 01-5 5H7a5 5 0 01-5-5V7a5 5 0 015-5zm0 4.5v11h2.35v-4.55h5.3V17.5H17v-11h-2.35v4.1h-5.3V6.5H7z"})})}function j({size:r=16,className:t=""}){return l.jsx("svg",{width:r,height:r,viewBox:"0 0 16 16",fill:"currentColor",className:t,children:l.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z"})})}function L({size:r=16,className:t=""}){return l.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":"true",children:l.jsx("g",{transform:"translate(3.4502, 3)",fill:"#9570BE",children:l.jsx("path",{d:"M3.17890888,3.6 L3.17890888,0 L16,0 L16,3.6 L3.17890888,3.6 Z M9.642,7.2 L9.64218223,10.8 L0,10.8 L0,3.6 L16,3.6 L16,7.2 L9.642,7.2 Z M3.17890888,18 L3.178,14.4 L0,14.4 L0,10.8 L16,10.8 L16,18 L3.17890888,18 Z",fillRule:"nonzero"})})})}function I({size:r=16,className:t=""}){return l.jsxs("svg",{width:r,height:r,viewBox:"0 0 120 90",fill:"currentColor",className:t,children:[l.jsx("rect",{x:"10",y:"8",width:"100",height:"12",rx:"2"}),l.jsx("rect",{x:"25",y:"20",width:"12",height:"62",rx:"2"}),l.jsx("rect",{x:"75",y:"20",width:"12",height:"45",rx:"2"}),l.jsx("rect",{x:"71",y:"55",width:"20",height:"16",rx:"3"}),l.jsx("rect",{x:"76",y:"71",width:"3",height:"8",rx:"1"}),l.jsx("rect",{x:"82",y:"71",width:"3",height:"8",rx:"1"})]})}function M({size:r=16,className:t=""}){return l.jsxs("svg",{width:r,height:r,viewBox:"0 0 120 90",fill:"currentColor",className:t,children:[l.jsx("rect",{x:"10",y:"8",width:"100",height:"12",rx:"2"}),l.jsx("rect",{x:"25",y:"20",width:"12",height:"62",rx:"2"}),l.jsx("rect",{x:"83",y:"20",width:"12",height:"62",rx:"2"})]})}const p={CLAUDE:i,CODEBUDDY:f,CODEX:d,COPILOT:g,CRAFT:L,CURSOR:a,GEMINI:x,GITHUB:j,GROK:s,HERMES:w,KIMI:v,KIRO:C,OPENCODE:u,OMP:I,PI:M},m={ANTIGRAVITY:"/brand-logos/antigravity.svg",CLAUDE:"/brand-logos/claude-code.svg",CODEX:"/brand-logos/codex.svg",GEMINI:"/brand-logos/gemini.svg",HERMES:"/brand-logos/hermes.svg","KILO-CLI":"/brand-logos/kilo.svg","KILO-CODE":"/brand-logos/kilo.svg",OPENCLAW:"/brand-logos/openclaw.svg",OPENCODE:"/brand-logos/opencode.svg"};function O({provider:r,size:t=16,color:h,className:e=""}){const o=r?.toUpperCase?.()||"",c=m[o];if(c)return l.jsx("img",{src:c,alt:"",width:t,height:t,className:e,style:{width:t,height:t,objectFit:"contain"},"aria-hidden":!0});const n=p[o];return n?l.jsx(n,{size:t,className:e}):l.jsx("div",{className:"rounded-full shrink-0",style:{width:t*.5,height:t*.5,backgroundColor:h}})}export{O as P};
|
|
1
|
+
import{C as l}from"./main-uV9_FTHb.js";function i({size:r=16,className:t=""}){return l.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:l.jsx("path",{d:"M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"})})}function d({size:r=16,className:t=""}){return l.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:t,children:l.jsx("path",{d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"})})}function a({size:r=16,className:t=""}){return l.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:l.jsx("path",{d:"M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z"})})}function x({size:r=16,className:t=""}){return l.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:l.jsx("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z"})})}function s({size:r=16,className:t=""}){return l.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:l.jsx("path",{d:"M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815"})})}function C({size:r=16,className:t=""}){return l.jsx("svg",{width:r,height:r,viewBox:"0 -1 22 28",fill:"currentColor",fillRule:"evenodd",className:t,children:l.jsx("path",{d:"M4.125 20.149c-2.69 5.959 3.036 7.453 7.26 3.966 1.24 3.91 5.898.993 7.569-2.036 3.682-6.678 2.195-13.49 1.813-14.895-2.617-9.582-15.699-9.592-17.95.049-.526 1.687-.535 3.606-.833 5.598-.15 1.005-.256 1.646-.645 2.703-.223.607-.53 1.147-1.014 2.056-.75 1.412-.434 4.138 3.434 2.724v.001ZM11.895 11.332c-1.073 0-1.234-1.283-1.234-2.048 0-.69.124-1.239.358-1.586a1 1 0 0 1 .876-.462c.375 0 .697.158.924.47.259.354.395.9.395 1.578 0 1.283-.493 2.048-1.319 2.048Zm4.416 0c-1.073 0-1.234-1.283-1.234-2.048 0-.69.124-1.239.358-1.586a1 1 0 0 1 .876-.462c.375 0 .697.158.924.47.259.354.396.9.396 1.578 0 1.283-.494 2.048-1.32 2.048Z"})})}function u({size:r=16,className:t=""}){return l.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:l.jsx("path",{d:"M16 6H8v12h8V6zm4 16H4V2h16v20z"})})}function v({size:r=16,className:t=""}){return l.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:[l.jsx("path",{d:"M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z"}),l.jsx("path",{d:"M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z"})]})}function g({size:r=16,className:t=""}){return l.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:l.jsx("path",{d:"M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z"})})}function f({size:r=16,className:t=""}){return l.jsxs("svg",{width:r,height:r,viewBox:"0 0 64 60",fill:"none",className:t,"aria-hidden":"true",children:[l.jsx("path",{fill:"currentColor",d:"M37.2114 3.75318C37.6821 3.33106 37.7106 3.31457 38.0558 3.29385C38.6149 3.2531 39.1272 3.52199 39.9989 4.31564C42.0356 6.16652 44.8714 9.97183 46.6346 13.2212L47.3163 14.4819L48.2782 14.9605C49.2072 15.4299 50.7308 16.3923 51.3672 16.9085C51.655 17.1464 51.6956 17.1508 51.9947 17.0344C53.3454 16.5084 55.2803 17.206 56.9869 18.8432C58.5231 20.3155 59.9943 22.8312 60.558 24.9308C60.6403 25.2687 60.7493 25.9952 60.7891 26.5362C60.9177 28.4358 60.3092 29.9532 59.1362 30.64C58.8965 30.7784 58.8801 30.8158 58.8868 31.4132C58.9409 34.2583 58.1741 37.0985 56.6335 39.8679C54.8946 42.9773 51.7981 46.1938 47.6074 49.2243C45.357 50.8619 40.0323 53.964 37.6248 55.0532C31.8578 57.6496 27.2346 58.646 23.2188 58.154C20.8236 57.8638 18.1124 56.9287 16.5082 55.8433C16.086 55.5515 16.0191 55.5329 15.6966 55.6251C13.9793 56.1185 11.73 55.1053 9.81931 52.9844C9.05725 52.1366 7.82714 50.0548 7.42839 48.9409C6.50606 46.3339 6.68976 43.9816 7.91836 42.5767C8.23573 42.2149 8.2453 42.1995 8.17598 41.5912C8.06148 40.5951 8.00971 39.1206 8.06202 38.1692L8.10361 37.2803L6.76977 34.9212C4.70378 31.2451 3.3912 28.1582 2.88489 25.7998C2.61762 24.5066 2.63385 23.9324 2.96214 23.5078C3.16198 23.2515 3.81796 22.9866 4.60785 22.8407C6.59665 22.4917 10.9334 22.8076 15.7581 23.6595L16.259 23.7458L17.3608 22.7713C19.1891 21.1519 20.4038 20.244 22.6429 18.8478C24.9768 17.3876 27.6108 16.1858 30.577 15.2346L31.5295 14.9294L32.0526 13.5561C33.9257 8.61146 35.8437 4.96584 37.2114 3.75318ZM21.5208 29.0919C19.404 30.314 18.3453 30.9251 17.5676 31.6099C14.4179 34.3835 13.2414 38.777 14.5823 42.7537C14.9135 43.7357 15.5247 44.7942 16.7469 46.9111C17.9691 49.0279 18.5801 50.0865 19.2649 50.8643C22.0385 54.014 26.4316 55.1918 30.4084 53.8509C31.3904 53.5198 32.4489 52.9085 34.5657 51.6863L46.7442 44.6551C48.8613 43.4328 49.9205 42.8214 50.6983 42.1365C53.8479 39.363 55.0245 34.9695 53.6835 30.9927C53.3524 30.0107 52.7412 28.9522 51.519 26.8354C50.2968 24.7185 49.6858 23.66 49.0009 22.8822C46.2274 19.7325 41.8342 18.5547 37.8575 19.8956C36.8754 20.2267 35.8163 20.8383 33.6993 22.0606L21.5208 29.0919Z"}),l.jsx("g",{transform:"rotate(-30 22.6953 37.6011)",children:l.jsx("rect",{x:"22.6953",y:"37.6011",width:"4.81084",height:"9.99175",rx:"2.40542",fill:"currentColor"})}),l.jsx("g",{transform:"rotate(-30 35.6748 30.1074)",children:l.jsx("rect",{x:"35.6748",y:"30.1074",width:"4.81084",height:"9.99175",rx:"2.40542",fill:"currentColor"})})]})}function w({size:r=16,className:t=""}){return l.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:t,children:l.jsx("path",{d:"M7 2h10a5 5 0 015 5v10a5 5 0 01-5 5H7a5 5 0 01-5-5V7a5 5 0 015-5zm0 4.5v11h2.35v-4.55h5.3V17.5H17v-11h-2.35v4.1h-5.3V6.5H7z"})})}function j({size:r=16,className:t=""}){return l.jsx("svg",{width:r,height:r,viewBox:"0 0 16 16",fill:"currentColor",className:t,children:l.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z"})})}function L({size:r=16,className:t=""}){return l.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":"true",children:l.jsx("g",{transform:"translate(3.4502, 3)",fill:"#9570BE",children:l.jsx("path",{d:"M3.17890888,3.6 L3.17890888,0 L16,0 L16,3.6 L3.17890888,3.6 Z M9.642,7.2 L9.64218223,10.8 L0,10.8 L0,3.6 L16,3.6 L16,7.2 L9.642,7.2 Z M3.17890888,18 L3.178,14.4 L0,14.4 L0,10.8 L16,10.8 L16,18 L3.17890888,18 Z",fillRule:"nonzero"})})})}function I({size:r=16,className:t=""}){return l.jsxs("svg",{width:r,height:r,viewBox:"0 0 120 90",fill:"currentColor",className:t,children:[l.jsx("rect",{x:"10",y:"8",width:"100",height:"12",rx:"2"}),l.jsx("rect",{x:"25",y:"20",width:"12",height:"62",rx:"2"}),l.jsx("rect",{x:"75",y:"20",width:"12",height:"45",rx:"2"}),l.jsx("rect",{x:"71",y:"55",width:"20",height:"16",rx:"3"}),l.jsx("rect",{x:"76",y:"71",width:"3",height:"8",rx:"1"}),l.jsx("rect",{x:"82",y:"71",width:"3",height:"8",rx:"1"})]})}function M({size:r=16,className:t=""}){return l.jsxs("svg",{width:r,height:r,viewBox:"0 0 120 90",fill:"currentColor",className:t,children:[l.jsx("rect",{x:"10",y:"8",width:"100",height:"12",rx:"2"}),l.jsx("rect",{x:"25",y:"20",width:"12",height:"62",rx:"2"}),l.jsx("rect",{x:"83",y:"20",width:"12",height:"62",rx:"2"})]})}const p={CLAUDE:i,CODEBUDDY:f,CODEX:d,COPILOT:g,CRAFT:L,CURSOR:a,GEMINI:x,GITHUB:j,GROK:s,HERMES:w,KIMI:v,KIRO:C,OPENCODE:u,OMP:I,PI:M},m={ANTIGRAVITY:"/brand-logos/antigravity.svg",CLAUDE:"/brand-logos/claude-code.svg",CODEX:"/brand-logos/codex.svg",GEMINI:"/brand-logos/gemini.svg",HERMES:"/brand-logos/hermes.svg","KILO-CLI":"/brand-logos/kilo.svg","KILO-CODE":"/brand-logos/kilo.svg",OPENCLAW:"/brand-logos/openclaw.svg",OPENCODE:"/brand-logos/opencode.svg"};function O({provider:r,size:t=16,color:h,className:e=""}){const o=r?.toUpperCase?.()||"",c=m[o];if(c)return l.jsx("img",{src:c,alt:"",width:t,height:t,className:e,style:{width:t,height:t,objectFit:"contain"},"aria-hidden":!0});const n=p[o];return n?l.jsx(n,{size:t,className:e}):l.jsx("div",{className:"rounded-full shrink-0",style:{width:t*.5,height:t*.5,backgroundColor:h}})}export{O as P};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as v,r as l,b as Q,f as J,ao as G,C as n,G as A,a7 as x,B as s,T as X,ad as ee,ap as te,ae as ne,af as ae,ag as P,aq as ie,ar as se,S as oe,R as re,Q as le,D as ce,W as ue,as as de,at as ge,au as D,av as he,aw as pe,ax as me,ay as be,I as fe,az as ye}from"./main-uV9_FTHb.js";import{L as xe,a as L,u as ve}from"./use-limits-display-prefs-DtRFIKBE.js";import{S as k,T as j,a as b,b as I,u as _}from"./use-native-settings-BRDZatug.js";import{C as ke}from"./check-Bs81cB4C.js";import{u as je}from"./useCurrency-B0LcQvSj.js";import{C as Ne}from"./chevron-down-DK-3H5UY.js";import{I as Se}from"./info-DOAPbTJ3.js";import{D as we}from"./download-lOWPegbv.js";import"./Card-CQ4ezOtn.js";const Ce=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Ge=v("copy",Ce);const Le=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],Ie=v("grip-vertical",Le);const Ee=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],E=v("languages",Ee);const Oe=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Ae=v("log-out",Oe);const Pe=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],De=v("pencil",Pe),_e=e=>!e.isLayoutDirty&&e.willUpdate(!1);function O(){const e=new Set,t=new WeakMap,i=()=>e.forEach(_e);return{add:a=>{e.add(a),t.set(a,a.addEventListener("willUpdate",i))},remove:a=>{e.delete(a);const o=t.get(a);o&&(o(),t.delete(a)),i()},dirty:i}}const Te=l.createContext(null);function Me(){const e=l.useRef(!1);return Q(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Ue(){const e=Me(),[t,i]=l.useState(0),a=l.useCallback(()=>{e.current&&i(t+1)},[t]);return[l.useCallback(()=>J.postRender(a),[a]),t]}const T=e=>e===!0,Re=e=>T(e===!0)||e==="id",Fe=({children:e,id:t,inherit:i=!0})=>{const a=l.useContext(G),o=l.useContext(Te),[r,c]=Ue(),u=l.useRef(null),g=a.id||o;u.current===null&&(Re(i)&&g&&(t=t?g+"-"+t:g),u.current={id:t,group:T(i)&&a.group||O()});const h=l.useMemo(()=>({...u.current,forceRender:r}),[c]);return n.jsx(G.Provider,{value:h,children:e})},$e=new Set(["cursor","kiro","copilot","kimi"]);function Be({checked:e,onChange:t,ariaLabel:i}){return n.jsx("button",{type:"button",role:"switch","aria-checked":e,"aria-label":i,onClick:t,className:x("relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",e?"bg-oai-brand-500":"bg-oai-gray-300 dark:bg-oai-gray-700"),children:n.jsx("span",{className:x("inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",e?"translate-x-[18px]":"translate-x-[3px]")})})}function He({prefs:e}){const{order:t,visibility:i,toggle:a,moveToward:o}=e,[r,c]=l.useState(null),[u,g]=l.useState(null),h=d=>p=>{c(d),p.dataTransfer.effectAllowed="move",p.dataTransfer.setData("text/plain",d)},m=d=>p=>{p.preventDefault(),p.dataTransfer.dropEffect="move",r&&r!==d&&u!==d&&(g(d),o(r,d))},f=()=>{c(null),g(null)},y=d=>{d.preventDefault(),c(null),g(null)};return n.jsx(Fe,{children:n.jsx("div",{className:"flex flex-col",children:t.map(d=>{const p=i[d]!==!1,N=r===d;return n.jsxs(A.div,{layout:!0,transition:{duration:.28,ease:[.22,1,.36,1]},draggable:!0,onDragStart:h(d),onDragOver:m(d),onDragEnd:f,onDrop:y,className:x("flex items-center gap-3 py-2 rounded-md","hover:bg-oai-gray-100/60 dark:hover:bg-oai-gray-800/60",N&&"opacity-40"),style:{cursor:N?"grabbing":"grab"},children:[n.jsx(Ie,{className:"h-4 w-4 shrink-0 text-oai-gray-400 dark:text-oai-gray-500",strokeWidth:1.75,"aria-hidden":!0}),n.jsx("img",{src:xe[d],alt:"",width:18,height:18,className:x("h-[18px] w-[18px] shrink-0 pointer-events-none",$e.has(d)&&"dark:invert"),draggable:!1}),n.jsx("span",{className:"flex-1 text-sm text-oai-gray-900 dark:text-oai-gray-200 select-none",children:L[d]}),n.jsx("div",{onMouseDown:S=>S.stopPropagation(),draggable:!1,children:n.jsx(Be,{checked:p,onChange:()=>a(d),ariaLabel:`${s("limits.settings.toggle_visible")}: ${L[d]}`})})]},d)})})})}function ze(e){if(!e||typeof e!="object")return"";const t=e.user_metadata&&typeof e.user_metadata=="object"?e.user_metadata:{},i=e.profile&&typeof e.profile=="object"?e.profile:{},a=t.full_name||t.name||i.name||t.user_name||t.preferred_username;return typeof a=="string"&&a.trim()?a.trim():typeof e.email=="string"&&e.email.includes("@")?e.email.split("@")[0].trim()||e.email.trim():typeof e.email=="string"?e.email.trim():""}function Ve(e){return!e||typeof e!="object"?"":typeof e.email=="string"?e.email.trim():""}function We(e){const t=typeof e=="string"?e.trim():"";if(!t)return null;const i=t.match(/^@?([A-Za-z0-9][A-Za-z0-9-]{0,38})$/),a=t.match(/^https:\/\/github\.com\/([A-Za-z0-9][A-Za-z0-9-]{0,38})\/?$/i),o=i?.[1]||a?.[1];return o?`https://github.com/${o}`:null}function w(e,t){console.warn(`[tokentracker] settings ${e}:`,t)}function Ze(e,t,i){const[a,o]=l.useState(()=>ee()),r=t&&i&&te(),c=l.useCallback(async()=>{const u=!a;if(ne(u),o(u),!!u)try{await ae(()=>e())}catch(g){w("cloud sync",g)}},[a,e]);return{cloudSyncOn:a,handleCloudSyncToggle:c,showLocalCloudSync:r}}function Ke(e){const[t,i]=l.useState(!1),[a,o]=l.useState(!1),[r,c]=l.useState(!1),[u,g]=l.useState(!1),[h,m]=l.useState(null),[f,y]=l.useState(!1),[d,p]=l.useState(""),[N,S]=l.useState(!1),[F,C]=l.useState(""),[$,B]=l.useState(""),[H,z]=l.useState(!1),[V,W]=l.useState(null),Z=l.useMemo(()=>ze(e),[e]),K=l.useMemo(()=>Ve(e),[e]),Y=l.useMemo(()=>typeof e?.id=="string"?e.id.trim():"",[e]),q=l.useMemo(()=>({setAnonymousOn:o,setCustomDisplayName:m,setGithubUrl:C,setProfileLoading:c,setPublicProfileOn:i,setShowGithubOn:S}),[]);return{anonymousOn:a,customDisplayName:h,displayName:Z,editingGithub:H,editingName:f,email:K,githubError:V,githubInput:$,githubUrl:F,loadSetters:q,nameInput:d,profileLoading:r,profileSaving:u,publicProfileOn:t,setAnonymousOn:o,setCustomDisplayName:m,setEditingGithub:z,setEditingName:y,setGithubError:W,setGithubInput:B,setGithubUrl:C,setNameInput:p,setProfileLoading:c,setProfileSaving:g,setPublicProfileOn:i,setShowGithubOn:S,showGithubOn:N,userId:Y}}function Ye(e,t,i){l.useEffect(()=>{if(!t)return;let a=!0;return i.setProfileLoading(!0),(async()=>{try{const o=await P({getAccessToken:e});if(!a||!o)return;const r=await ie({accessToken:o});if(!a)return;i.setPublicProfileOn(!!r?.enabled),i.setAnonymousOn(!!r?.anonymous),r?.display_name&&i.setCustomDisplayName(r.display_name),i.setShowGithubOn(!!r?.show_github_url),i.setGithubUrl(r?.github_url||"")}catch(o){w("load public profile",o)}finally{a&&i.setProfileLoading(!1)}})(),()=>{a=!1}},[e,t,i])}function qe(e,t){return l.useCallback(async(i,{label:a,onError:o,onSuccess:r}={})=>{if(t.profileSaving)return!1;t.setProfileSaving(!0);try{const c=await P({getAccessToken:e});if(!c)return!1;const u=await se({accessToken:c,...i});return r?.(u),!0}catch(c){return o?o(c):w(a||"mutate profile",c),!1}finally{t.setProfileSaving(!1)}},[e,t])}function Qe(e,t){return{anonymousOn:e.anonymousOn,customDisplayName:e.customDisplayName,displayName:e.displayName,editingName:e.editingName,handleAnonymousToggle:t.handleAnonymousToggle,handleSaveName:t.handleSaveName,nameInput:e.nameInput,profileLoading:e.profileLoading,profileSaving:e.profileSaving,setEditingName:e.setEditingName,setNameInput:e.setNameInput,startEditingName:t.startEditingName}}function Je(e,t){return{editingGithub:e.editingGithub,githubError:e.githubError,githubInput:e.githubInput,githubUrl:e.githubUrl,handleSaveGithub:t.handleSaveGithub,handleShowGithubToggle:t.handleShowGithubToggle,profileLoading:e.profileLoading,profileSaving:e.profileSaving,setEditingGithub:e.setEditingGithub,setGithubError:e.setGithubError,setGithubInput:e.setGithubInput,showGithubOn:e.showGithubOn,startEditingGithub:t.startEditingGithub}}function Xe(e,t){const i=l.useCallback(async()=>{const o=!e.publicProfileOn;await t({enabled:o},{label:"toggle public profile",onSuccess:()=>e.setPublicProfileOn(o)})},[t,e]);return{handleAnonymousToggle:l.useCallback(async()=>{const o=!e.anonymousOn;await t({anonymous:o},{label:"toggle anonymous",onSuccess:()=>e.setAnonymousOn(o)})},[t,e]),handlePublicProfileToggle:i}}function et(e,t){const i=l.useCallback(async()=>{const o=e.nameInput.trim().slice(0,50);o&&await t({display_name:o},{label:"save display name",onSuccess:()=>{e.setCustomDisplayName(o),e.setEditingName(!1)}})},[t,e]),a=l.useCallback(()=>{e.setNameInput(e.customDisplayName||e.displayName),e.setEditingName(!0)},[e]);return{handleSaveName:i,startEditingName:a}}function tt(e,t){const i=l.useCallback(async()=>{if(!e.showGithubOn&&!e.githubUrl){e.setEditingGithub(!0),e.setGithubInput(""),e.setGithubError(null);return}const r=!e.showGithubOn;await t({show_github_url:r},{label:"toggle GitHub profile",onSuccess:()=>e.setShowGithubOn(r)})},[t,e]),a=l.useCallback(async()=>{const r=We(e.githubInput);if(e.githubInput.trim()&&!r){e.setGithubError(s("settings.account.githubUrlInvalid"));return}e.setGithubError(null),await t({github_url:r,show_github_url:!!r},{label:"save GitHub profile",onError:c=>e.setGithubError(c?.message||s("settings.account.githubUrlInvalid")),onSuccess:c=>{e.setGithubUrl(c?.github_url||r||""),e.setShowGithubOn(!!r),e.setEditingGithub(!1)}})},[t,e]),o=l.useCallback(()=>{e.setGithubInput(e.githubUrl),e.setGithubError(null),e.setEditingGithub(!0)},[e]);return{handleSaveGithub:a,handleShowGithubToggle:i,startEditingGithub:o}}function nt(){const e=X(),t=Ke(e.user),i=Ze(e.getAccessToken,e.enabled,e.signedIn);Ye(e.getAccessToken,e.signedIn,t.loadSetters);const a=qe(e.getAccessToken,t),o=Xe(t,a),r=et(t,a),c=tt(t,a);return{...e,...i,email:t.email,handlePublicProfileToggle:o.handlePublicProfileToggle,userId:t.userId,name:Qe(t,{...o,...r}),github:Je(t,c),profileLoading:t.profileLoading,profileSaving:t.profileSaving,publicProfileOn:t.publicProfileOn}}function M({disabled:e,onCancel:t,onSave:i,saveLabel:a=s("settings.account.save")}){return n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",onClick:i,disabled:e,className:"rounded-md bg-oai-brand-500 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-oai-brand-600 disabled:opacity-50",children:a}),n.jsx("button",{type:"button",onClick:t,className:"rounded-md px-2 py-1.5 text-xs text-oai-gray-500 transition-colors hover:text-oai-gray-700 dark:hover:text-oai-gray-300",children:s("settings.account.cancel")})]})}function at({nameInput:e,setEditingName:t,setNameInput:i,profileSaving:a,handleSaveName:o}){return n.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[n.jsx("input",{type:"text",value:e,onChange:r=>i(r.target.value),onKeyDown:r=>{r.key==="Enter"&&o(),r.key==="Escape"&&t(!1)},maxLength:50,autoFocus:!0,className:"flex-1 rounded-md border border-oai-gray-300 bg-transparent px-2.5 py-1.5 text-sm text-oai-black outline-none focus:border-oai-brand-500 focus:ring-1 focus:ring-inset focus:ring-oai-brand-500 dark:border-oai-gray-700 dark:text-white",placeholder:s("settings.account.displayName")}),n.jsx(M,{disabled:a||!e.trim(),onCancel:()=>t(!1),onSave:o,saveLabel:a?s("settings.account.saving"):void 0})]})}function it({githubError:e,githubInput:t,handleSaveGithub:i,profileSaving:a,setEditingGithub:o,setGithubError:r,setGithubInput:c}){return n.jsxs("div",{className:"mt-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{type:"text",value:t,onChange:u=>{c(u.target.value),e&&r(null)},onKeyDown:u=>{u.key==="Enter"&&i(),u.key==="Escape"&&(o(!1),r(null))},maxLength:100,autoFocus:!0,className:"flex-1 rounded-md border border-oai-gray-300 bg-transparent px-2.5 py-1.5 text-sm text-oai-black outline-none focus:border-oai-brand-500 focus:ring-1 focus:ring-inset focus:ring-oai-brand-500 dark:border-oai-gray-700 dark:text-white",placeholder:s("settings.account.githubUrlPlaceholder")}),n.jsx(M,{disabled:a,onCancel:()=>{o(!1),r(null)},onSave:i,saveLabel:a?s("settings.account.saving"):void 0})]}),e?n.jsx("div",{className:"mt-1.5 text-xs text-red-600 dark:text-red-400",children:e}):null]})}function U({disabled:e=!1,label:t,onClick:i,title:a}){return n.jsxs("button",{type:"button",onClick:i,disabled:e,title:a,className:"inline-flex h-8 shrink-0 items-center gap-1.5 rounded-md border border-oai-gray-200 px-3 text-xs font-medium text-oai-gray-700 transition-colors hover:bg-oai-gray-100 disabled:cursor-not-allowed disabled:opacity-40 dark:border-oai-gray-800 dark:text-oai-gray-300 dark:hover:bg-oai-gray-800",children:[n.jsx(De,{className:"h-3.5 w-3.5","aria-hidden":!0}),t]})}function R({actions:e,editing:t,editor:i,hint:a,label:o}){return n.jsx("div",{className:"py-3",children:n.jsxs("div",{className:"flex items-start justify-between gap-4",children:[n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsx("div",{className:"text-sm text-oai-gray-900 dark:text-oai-gray-200",children:o}),t?i:n.jsx("div",{className:"mt-0.5 truncate text-xs text-oai-gray-500 dark:text-oai-gray-400",children:a})]}),t?null:e]})})}function st({name:e}){const t=e.anonymousOn?s("settings.account.displayNameDisabledWhileAnon"):void 0;return n.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[n.jsx(U,{disabled:e.anonymousOn,label:s("settings.account.edit"),onClick:e.startEditingName,title:t}),n.jsx(j,{checked:!e.anonymousOn,onChange:e.handleAnonymousToggle,disabled:e.profileLoading||e.profileSaving,ariaLabel:s("settings.account.displayName")})]})}function ot({name:e}){const{anonymousOn:t,customDisplayName:i,displayName:a,editingName:o,handleAnonymousToggle:r,handleSaveName:c,nameInput:u,profileLoading:g,profileSaving:h,setEditingName:m,setNameInput:f,startEditingName:y}=e,d=t?s("settings.account.displayNameAnonymousHint"):i||a;return n.jsx(R,{label:s("settings.account.displayName"),editing:o,hint:d,editor:n.jsx(at,{nameInput:u,setEditingName:m,setNameInput:f,profileSaving:h,handleSaveName:c}),actions:n.jsx(st,{name:e})})}function rt({github:e}){const{editingGithub:t,githubError:i,githubInput:a,githubUrl:o,handleSaveGithub:r,handleShowGithubToggle:c,profileLoading:u,profileSaving:g,setEditingGithub:h,setGithubError:m,setGithubInput:f,showGithubOn:y,startEditingGithub:d}=e;return n.jsx(R,{label:s("settings.account.githubUrl"),editing:t,hint:o||s("settings.account.githubUrlHint"),editor:n.jsx(it,{githubError:i,githubInput:a,handleSaveGithub:r,profileSaving:g,setEditingGithub:h,setGithubError:m,setGithubInput:f}),actions:n.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[n.jsx(U,{label:s("settings.account.edit"),onClick:d}),n.jsx(j,{checked:y,onChange:c,disabled:u||g,ariaLabel:s("settings.account.githubUrl")})]})})}function lt(){const{openLoginModal:e}=oe();return n.jsx(k,{title:s("settings.section.account"),children:n.jsxs("div",{className:"flex items-center justify-between gap-4 py-3",children:[n.jsx("p",{className:"text-sm text-oai-gray-500 dark:text-oai-gray-400",children:s("settings.account.signedOutHint")}),n.jsx("button",{type:"button",onClick:e,className:"inline-flex h-8 shrink-0 items-center justify-center rounded-md bg-oai-gray-900 px-4 text-xs font-medium text-white transition-colors hover:bg-oai-gray-800 dark:bg-white dark:text-oai-gray-900 dark:hover:bg-oai-gray-100",children:s("settings.account.signIn")})]})})}function ct({name:e,github:t}){return n.jsxs(n.Fragment,{children:[n.jsx(ot,{name:e}),n.jsx(rt,{github:t})]})}function ut(){const e=nt();return e.enabled?e.signedIn?n.jsxs(k,{title:s("settings.section.account"),subtitle:e.email||e.name.customDisplayName||e.name.displayName,action:n.jsx(gt,{onSignOut:e.signOut}),children:[n.jsx(dt,{userId:e.userId}),n.jsx(ht,{settings:e}),n.jsx(pt,{checked:e.publicProfileOn,disabled:e.profileLoading||e.profileSaving,onChange:e.handlePublicProfileToggle}),n.jsx(mt,{visible:e.publicProfileOn,name:e.name,github:e.github})]}):n.jsx(lt,{}):null}function dt({userId:e}){const[t,i]=re.useState(!1);if(!e)return null;const a=async()=>{try{if(typeof navigator>"u"||!navigator.clipboard?.writeText)return;await navigator.clipboard.writeText(e),i(!0),globalThis.setTimeout(()=>i(!1),1200)}catch{i(!1)}};return n.jsxs("div",{className:"flex items-center justify-between gap-4 py-3",children:[n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsx("div",{className:"text-sm text-oai-gray-900 dark:text-oai-gray-200",children:s("settings.account.userId")}),n.jsx("div",{className:"mt-0.5 truncate font-mono text-xs text-oai-gray-500 dark:text-oai-gray-400",children:e})]}),n.jsxs("button",{type:"button",onClick:a,className:"inline-flex h-8 shrink-0 items-center gap-1.5 rounded-md border border-oai-gray-200 px-3 text-xs font-medium text-oai-gray-700 transition-colors hover:bg-oai-gray-100 dark:border-oai-gray-800 dark:text-oai-gray-300 dark:hover:bg-oai-gray-800","aria-label":s("settings.account.copyUserId"),children:[t?n.jsx(ke,{className:"h-3.5 w-3.5","aria-hidden":!0}):n.jsx(Ge,{className:"h-3.5 w-3.5","aria-hidden":!0}),t?s("settings.account.copied"):s("settings.account.copy")]})]})}function gt({onSignOut:e}){return n.jsxs("button",{type:"button",onClick:()=>e(),className:"inline-flex h-7 items-center gap-1.5 text-xs font-medium text-oai-gray-500 transition-colors hover:text-oai-gray-700 dark:hover:text-oai-gray-300",children:[n.jsx(Ae,{className:"h-3.5 w-3.5","aria-hidden":!0}),s("settings.account.signOut")]})}function ht({settings:e}){return e.showLocalCloudSync?n.jsx(b,{label:s("settings.account.cloudSync"),hint:s("settings.account.cloudSyncHint"),control:n.jsx(j,{checked:e.cloudSyncOn,onChange:e.handleCloudSyncToggle,ariaLabel:s("settings.account.cloudSync")})}):null}function pt({checked:e,disabled:t,onChange:i}){return n.jsx(b,{label:s("settings.account.publicProfile"),hint:s("settings.account.publicProfileHint"),control:n.jsx(j,{checked:e,onChange:i,disabled:t,ariaLabel:s("settings.account.publicProfile")})})}function mt({visible:e,name:t,github:i}){return n.jsx(le,{initial:!1,children:e?n.jsx(A.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{height:{duration:.28,ease:[.22,1,.36,1]},opacity:{duration:.2,ease:[.22,1,.36,1]}},style:{overflow:"hidden"},className:"divide-y divide-oai-gray-200/60 dark:divide-oai-gray-800/60",children:n.jsx(ct,{name:t,github:i})},"public-profile-fields"):null})}function bt(){return[{value:"light",label:s("settings.appearance.theme.light"),Icon:de},{value:"dark",label:s("settings.appearance.theme.dark"),Icon:ge},{value:"system",label:s("settings.appearance.theme.system"),Icon:D}]}function ft(){return[{value:he,label:s("settings.appearance.language.system"),Icon:D},{value:pe,label:s("settings.appearance.language.english"),Icon:E},{value:me,label:s("settings.appearance.language.chinese"),Icon:E}]}function yt(e){if(!e)return null;try{const t=new Date(e);return Number.isNaN(t.getTime())?null:t.toLocaleString()}catch{return null}}function xt(e,t){const i=s(`settings.appearance.currency.rate_source.${e}`),a=yt(t),o=a?s("settings.appearance.currency.rate_updated",{when:a}):s("settings.appearance.currency.rate_never");return`${i} · ${o}`}function vt({currency:e,setCurrency:t}){const i=be();return n.jsxs("div",{className:"relative inline-flex",children:[n.jsx("select",{value:e,onChange:a=>t(a.target.value),"aria-label":s("settings.appearance.currency.label"),className:x("appearance-none rounded-lg border border-oai-gray-200 bg-white py-1.5 pl-3 pr-8 text-xs font-medium text-oai-black","transition-colors hover:bg-oai-gray-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500","dark:border-oai-gray-800 dark:bg-oai-gray-900 dark:text-white dark:hover:bg-oai-gray-800"),children:i.map(a=>n.jsx("option",{value:a.code,children:s(a.labelKey)},a.code))}),n.jsx(Ne,{className:"pointer-events-none absolute right-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-oai-gray-500 dark:text-oai-gray-400","aria-hidden":!0})]})}function kt({currency:e,rate:t,rateSource:i,rateFetchedAt:a}){if(e===fe)return n.jsx(n.Fragment,{children:s("settings.appearance.currency.hint")});const o=xt(i,a);return n.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[n.jsx("span",{children:`1 USD = ${t.toFixed(4)} ${e}`}),n.jsx("span",{role:"img","aria-label":o,title:o,className:"inline-flex h-4 w-4 cursor-help items-center justify-center text-oai-gray-400 hover:text-oai-gray-600 dark:text-oai-gray-500 dark:hover:text-oai-gray-300",children:n.jsx(Se,{className:"h-3.5 w-3.5","aria-hidden":!0})})]})}function jt(){const{theme:e,setTheme:t}=ce(),{locale:i,setLocale:a}=ue(),{currency:o,rate:r,rateSource:c,rateFetchedAt:u,setCurrency:g}=je();return n.jsxs(k,{title:s("settings.section.appearance"),children:[n.jsx(b,{label:s("settings.appearance.theme.label"),hint:s("settings.appearance.theme.hint"),control:n.jsx(I,{options:bt(),value:e,onChange:t})}),n.jsx(b,{label:s("settings.appearance.language.label"),hint:s("settings.appearance.language.hint"),control:n.jsx(I,{options:ft(),value:i,onChange:a})}),n.jsx(b,{label:s("settings.appearance.currency.label"),hint:n.jsx(kt,{currency:o,rate:r,rateSource:c,rateFetchedAt:u}),control:n.jsx(vt,{currency:o,setCurrency:g})})]})}function Nt(){const{available:e,settings:t,setSetting:i,runAction:a}=_();if(!e)return null;const o=!!t?.launchAtLogin,r=t?.launchAtLoginSupported!==!1,c=t?.updateStatus||null,u=!!t?.updateBusy,g=!!t?.isSyncing;return n.jsxs(k,{title:s("settings.section.menubar"),children:[r?n.jsx(b,{label:s("settings.menubar.launchAtLogin"),hint:s("settings.menubar.launchAtLoginHint"),control:n.jsx(j,{checked:o,onChange:()=>i("launchAtLogin",!o),ariaLabel:s("settings.menubar.launchAtLogin")})}):null,n.jsx(b,{label:s("settings.menubar.syncNow"),hint:s("settings.menubar.syncNowHint"),control:n.jsxs("button",{type:"button",onClick:()=>a("syncNow"),disabled:g,className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-oai-gray-200 px-3 text-xs font-medium text-oai-gray-700 transition-colors hover:bg-oai-gray-100 disabled:cursor-not-allowed disabled:opacity-50 dark:border-oai-gray-800 dark:text-oai-gray-300 dark:hover:bg-oai-gray-800",children:[n.jsx(ye,{className:x("h-3.5 w-3.5",g&&"animate-spin"),"aria-hidden":!0}),g?s("settings.menubar.syncing"):s("settings.menubar.syncNow")]})}),n.jsx(b,{label:s("settings.menubar.updates"),hint:c||void 0,control:n.jsxs("button",{type:"button",onClick:()=>a("checkForUpdates"),disabled:u,className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-oai-gray-200 px-3 text-xs font-medium text-oai-gray-700 transition-colors hover:bg-oai-gray-100 disabled:cursor-not-allowed disabled:opacity-50 dark:border-oai-gray-800 dark:text-oai-gray-300 dark:hover:bg-oai-gray-800",children:[n.jsx(we,{className:"h-3.5 w-3.5","aria-hidden":!0}),s("settings.menubar.checkUpdates")]})})]})}function St(){const{available:e,settings:t,runAction:i}=_();return!e||!t?.version?null:n.jsxs("div",{className:"mt-6 flex items-center justify-center gap-2 text-[11px] text-oai-gray-500 dark:text-oai-gray-500",children:[n.jsxs("span",{children:["TokenTrackerBar v",t.version]}),n.jsx("span",{"aria-hidden":!0,children:"·"}),n.jsx("button",{type:"button",onClick:()=>i("openAbout"),className:"underline-offset-2 transition-colors hover:text-oai-gray-700 hover:underline dark:hover:text-oai-gray-300",children:"GitHub"})]})}function Dt(){const e=ve();return n.jsx("div",{className:"flex flex-1 flex-col font-oai text-oai-black antialiased dark:text-oai-white",children:n.jsx("main",{className:"flex-1 pb-12 pt-8 sm:pb-16 sm:pt-10",children:n.jsxs("div",{className:"mx-auto max-w-3xl px-4 sm:px-6",children:[n.jsxs("div",{className:"mb-8",children:[n.jsx("h1",{className:"text-3xl font-semibold tracking-tight text-oai-black dark:text-white sm:text-4xl",children:s("settings.page.title")}),n.jsx("p",{className:"mt-2 text-sm text-oai-gray-500 dark:text-oai-gray-400",children:s("settings.page.subtitle")})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsx(jt,{}),n.jsx(Nt,{}),n.jsx(ut,{}),n.jsx(k,{title:s("settings.section.limits"),children:n.jsx(He,{prefs:e})})]}),n.jsx(St,{})]})})})}export{Dt as SettingsPage};
|