autoforge-ai 0.1.16 → 0.1.18
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/autonomous_agent_demo.py +2 -2
- package/package.json +1 -1
- package/parallel_orchestrator.py +4 -4
- package/requirements-prod.txt +4 -0
- package/server/routers/agent.py +11 -4
- package/server/routers/expand_project.py +3 -3
- package/server/routers/settings.py +5 -0
- package/server/routers/spec_creation.py +3 -3
- package/server/schemas.py +55 -21
- package/server/services/chat_constants.py +36 -0
- package/server/services/expand_chat_session.py +14 -13
- package/server/services/process_manager.py +4 -0
- package/server/services/spec_chat_session.py +12 -14
- package/server/utils/document_extraction.py +221 -0
- package/ui/dist/assets/index-DXm5cuJA.js +96 -0
- package/ui/dist/assets/index-DlYws_VI.css +1 -0
- package/ui/dist/assets/vendor-flow-CSXy01ye.js +7 -0
- package/ui/dist/assets/{vendor-markdown-lmnOnLXp.js → vendor-markdown-BxiGvyag.js} +3 -3
- package/ui/dist/assets/vendor-query-CcgjkJlA.js +1 -0
- package/ui/dist/assets/vendor-radix-DIVIznMB.js +45 -0
- package/ui/dist/assets/vendor-react-l0sNRNKZ.js +1 -0
- package/ui/dist/assets/{vendor-utils-CdMnkzGY.js → vendor-utils-CJmVD20L.js} +1 -1
- package/ui/dist/index.html +7 -8
- package/ui/dist/assets/index-CX9TqxHJ.css +0 -1
- package/ui/dist/assets/index-DtBG9zqQ.js +0 -96
- package/ui/dist/assets/vendor-flow-CVNK-_lx.js +0 -7
- package/ui/dist/assets/vendor-query-BUABzP5o.js +0 -1
- package/ui/dist/assets/vendor-radix-DjWauVBs.js +0 -45
- package/ui/dist/assets/vendor-react-qkC6yhPU.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as wt,g as Pt}from"./vendor-react-qkC6yhPU.js";function Ft(t,e){for(var s=0;s<e.length;s++){const i=e[s];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in t)){const n=Object.getOwnPropertyDescriptor(i,r);n&&Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>i[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var H={exports:{}},A={};var X;function Et(){if(X)return A;X=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function s(i,r,n){var o=null;if(n!==void 0&&(o=""+n),r.key!==void 0&&(o=""+r.key),"key"in r){n={};for(var a in r)a!=="key"&&(n[a]=r[a])}else n=r;return r=n.ref,{$$typeof:t,type:i,key:o,ref:r!==void 0?r:null,props:n}}return A.Fragment=e,A.jsx=s,A.jsxs=s,A}var tt;function Mt(){return tt||(tt=1,H.exports=Et()),H.exports}var Qt=Mt(),p=wt();const Tt=Pt(p),fe=Ft({__proto__:null,default:Tt},[p]);var D=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},xt={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},It=class{#t=xt;#e=!1;setTimeoutProvider(t){this.#t=t}setTimeout(t,e){return this.#t.setTimeout(t,e)}clearTimeout(t){this.#t.clearTimeout(t)}setInterval(t,e){return this.#t.setInterval(t,e)}clearInterval(t){this.#t.clearInterval(t)}},Q=new It;function Dt(t){setTimeout(t,0)}var T=typeof window>"u"||"Deno"in globalThis;function g(){}function At(t,e){return typeof t=="function"?t(e):t}function N(t){return typeof t=="number"&&t>=0&&t!==1/0}function ft(t,e){return Math.max(t+(e||0)-Date.now(),0)}function F(t,e){return typeof t=="function"?t(e):t}function S(t,e){return typeof t=="function"?t(e):t}function et(t,e){const{type:s="all",exact:i,fetchStatus:r,predicate:n,queryKey:o,stale:a}=t;if(o){if(i){if(e.queryHash!==$(o,e.options))return!1}else if(!j(e.queryKey,o))return!1}if(s!=="all"){const u=e.isActive();if(s==="active"&&!u||s==="inactive"&&u)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||r&&r!==e.state.fetchStatus||n&&!n(e))}function st(t,e){const{exact:s,status:i,predicate:r,mutationKey:n}=t;if(n){if(!e.options.mutationKey)return!1;if(s){if(x(e.options.mutationKey)!==x(n))return!1}else if(!j(e.options.mutationKey,n))return!1}return!(i&&e.state.status!==i||r&&!r(e))}function $(t,e){return(e?.queryKeyHashFn||x)(t)}function x(t){return JSON.stringify(t,(e,s)=>G(s)?Object.keys(s).sort().reduce((i,r)=>(i[r]=s[r],i),{}):s)}function j(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(s=>j(t[s],e[s])):!1}var jt=Object.prototype.hasOwnProperty;function dt(t,e){if(t===e)return t;const s=it(t)&&it(e);if(!s&&!(G(t)&&G(e)))return e;const r=(s?t:Object.keys(t)).length,n=s?e:Object.keys(e),o=n.length,a=s?new Array(o):{};let u=0;for(let f=0;f<o;f++){const h=s?f:n[f],v=t[h],c=e[h];if(v===c){a[h]=v,(s?f<r:jt.call(t,h))&&u++;continue}if(v===null||c===null||typeof v!="object"||typeof c!="object"){a[h]=c;continue}const R=dt(v,c);a[h]=R,R===v&&u++}return r===o&&u===r?t:a}function _(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const s in t)if(t[s]!==e[s])return!1;return!0}function it(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function G(t){if(!rt(t))return!1;const e=t.constructor;if(e===void 0)return!0;const s=e.prototype;return!(!rt(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function rt(t){return Object.prototype.toString.call(t)==="[object Object]"}function qt(t){return new Promise(e=>{Q.setTimeout(e,t)})}function B(t,e,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,e):s.structuralSharing!==!1?dt(t,e):e}function Ut(t,e,s=0){const i=[...t,e];return s&&i.length>s?i.slice(1):i}function kt(t,e,s=0){const i=[e,...t];return s&&i.length>s?i.slice(0,-1):i}var V=Symbol();function pt(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===V?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function yt(t,e){return typeof t=="function"?t(...e):!!t}function _t(t,e,s){let i=!1,r;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(r??=e(),i||(i=!0,r.aborted?s():r.addEventListener("abort",s,{once:!0})),r)}),t}var Lt=class extends D{#t;#e;#s;constructor(){super(),this.#s=t=>{if(!T&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#e||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#s=t,this.#e?.(),this.#e=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#t!==t&&(this.#t=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},Y=new Lt;function z(){let t,e;const s=new Promise((r,n)=>{t=r,e=n});s.status="pending",s.catch(()=>{});function i(r){Object.assign(s,r),delete s.resolve,delete s.reject}return s.resolve=r=>{i({status:"fulfilled",value:r}),t(r)},s.reject=r=>{i({status:"rejected",reason:r}),e(r)},s}var Kt=Dt;function Ht(){let t=[],e=0,s=a=>{a()},i=a=>{a()},r=Kt;const n=a=>{e?t.push(a):r(()=>{s(a)})},o=()=>{const a=t;t=[],a.length&&r(()=>{i(()=>{a.forEach(u=>{s(u)})})})};return{batch:a=>{let u;e++;try{u=a()}finally{e--,e||o()}return u},batchCalls:a=>(...u)=>{n(()=>{a(...u)})},schedule:n,setNotifyFunction:a=>{s=a},setBatchNotifyFunction:a=>{i=a},setScheduler:a=>{r=a}}}var d=Ht(),Nt=class extends D{#t=!0;#e;#s;constructor(){super(),this.#s=t=>{if(!T&&window.addEventListener){const e=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#e||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#s=t,this.#e?.(),this.#e=t(this.setOnline.bind(this))}setOnline(t){this.#t!==t&&(this.#t=t,this.listeners.forEach(s=>{s(t)}))}isOnline(){return this.#t}},L=new Nt;function Gt(t){return Math.min(1e3*2**t,3e4)}function vt(t){return(t??"online")==="online"?L.isOnline():!0}var J=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function mt(t){let e=!1,s=0,i;const r=z(),n=()=>r.status!=="pending",o=l=>{if(!n()){const m=new J(l);c(m),t.onCancel?.(m)}},a=()=>{e=!0},u=()=>{e=!1},f=()=>Y.isFocused()&&(t.networkMode==="always"||L.isOnline())&&t.canRun(),h=()=>vt(t.networkMode)&&t.canRun(),v=l=>{n()||(i?.(),r.resolve(l))},c=l=>{n()||(i?.(),r.reject(l))},R=()=>new Promise(l=>{i=m=>{(n()||f())&&l(m)},t.onPause?.()}).then(()=>{i=void 0,n()||t.onContinue?.()}),y=()=>{if(n())return;let l;const m=s===0?t.initialPromise:void 0;try{l=m??t.fn()}catch(b){l=Promise.reject(b)}Promise.resolve(l).then(v).catch(b=>{if(n())return;const C=t.retry??(T?0:3),P=t.retryDelay??Gt,E=typeof P=="function"?P(s,b):P,M=C===!0||typeof C=="number"&&s<C||typeof C=="function"&&C(s,b);if(e||!M){c(b);return}s++,t.onFail?.(s,b),qt(E).then(()=>f()?void 0:R()).then(()=>{e?c(b):y()})})};return{promise:r,status:()=>r.status,cancel:o,continue:()=>(i?.(),r),cancelRetry:a,continueRetry:u,canStart:h,start:()=>(h()?y():R().then(y),r)}}var gt=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),N(this.gcTime)&&(this.#t=Q.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(T?1/0:300*1e3))}clearGcTimeout(){this.#t&&(Q.clearTimeout(this.#t),this.#t=void 0)}},Bt=class extends gt{#t;#e;#s;#r;#i;#a;#o;constructor(t){super(),this.#o=!1,this.#a=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#r=t.client,this.#s=this.#r.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=at(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(t){if(this.options={...this.#a,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=at(this.options);e.data!==void 0&&(this.setState(nt(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#s.remove(this)}setData(t,e){const s=B(this.state.data,t,this.options);return this.#n({data:s,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),s}setState(t,e){this.#n({type:"setState",state:t,setStateOptions:e})}cancel(t){const e=this.#i?.promise;return this.#i?.cancel(t),e?e.then(g).catch(g):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(t=>S(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===V||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>F(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!ft(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#i&&(this.#o?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#s.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#n({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#i?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(t&&this.setOptions(t),!this.options.queryFn){const a=this.observers.find(u=>u.options.queryFn);a&&this.setOptions(a.options)}const s=new AbortController,i=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#o=!0,s.signal)})},r=()=>{const a=pt(this.options,e),f=(()=>{const h={client:this.#r,queryKey:this.queryKey,meta:this.meta};return i(h),h})();return this.#o=!1,this.options.persister?this.options.persister(a,f,this):a(f)},o=(()=>{const a={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:r};return i(a),a})();this.options.behavior?.onFetch(o,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#n({type:"fetch",meta:o.fetchOptions?.meta}),this.#i=mt({initialPromise:e?.initialPromise,fn:o.fetchFn,onCancel:a=>{a instanceof J&&a.revert&&this.setState({...this.#e,fetchStatus:"idle"}),s.abort()},onFail:(a,u)=>{this.#n({type:"failed",failureCount:a,error:u})},onPause:()=>{this.#n({type:"pause"})},onContinue:()=>{this.#n({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const a=await this.#i.start();if(a===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(a),this.#s.config.onSuccess?.(a,this),this.#s.config.onSettled?.(a,this.state.error,this),a}catch(a){if(a instanceof J){if(a.silent)return this.#i.promise;if(a.revert){if(this.state.data===void 0)throw a;return this.state.data}}throw this.#n({type:"error",error:a}),this.#s.config.onError?.(a,this),this.#s.config.onSettled?.(this.state.data,a,this),a}finally{this.scheduleGc()}}#n(t){const e=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...bt(s.data,this.options),fetchMeta:t.meta??null};case"success":const i={...s,...nt(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=t.manual?i:void 0,i;case"error":const r=t.error;return{...s,error:r,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=e(this.state),d.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#s.notify({query:this,type:"updated",action:t})})}};function bt(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:vt(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function nt(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function at(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,s=e!==void 0,i=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var zt=class extends D{constructor(t,e){super(),this.options=e,this.#t=t,this.#n=null,this.#o=z(),this.bindMethods(),this.setOptions(e)}#t;#e=void 0;#s=void 0;#r=void 0;#i;#a;#o;#n;#y;#f;#d;#h;#c;#u;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),ot(this.#e,this.options)?this.#l():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return W(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return W(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#O(),this.#S(),this.#e.removeObserver(this)}setOptions(t){const e=this.options,s=this.#e;if(this.options=this.#t.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof S(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#R(),this.#e.setOptions(this.options),e._defaulted&&!_(this.options,e)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const i=this.hasListeners();i&&ut(this.#e,s,this.options,e)&&this.#l(),this.updateResult(),i&&(this.#e!==s||S(this.options.enabled,this.#e)!==S(e.enabled,this.#e)||F(this.options.staleTime,this.#e)!==F(e.staleTime,this.#e))&&this.#v();const r=this.#m();i&&(this.#e!==s||S(this.options.enabled,this.#e)!==S(e.enabled,this.#e)||r!==this.#u)&&this.#g(r)}getOptimisticResult(t){const e=this.#t.getQueryCache().build(this.#t,t),s=this.createResult(e,t);return Wt(this,s)&&(this.#r=s,this.#a=this.options,this.#i=this.#e.state),s}getCurrentResult(){return this.#r}trackResult(t,e){return new Proxy(t,{get:(s,i)=>(this.trackProp(i),e?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,i))})}trackProp(t){this.#p.add(t)}getCurrentQuery(){return this.#e}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#t.defaultQueryOptions(t),s=this.#t.getQueryCache().build(this.#t,e);return s.fetch().then(()=>this.createResult(s,e))}fetch(t){return this.#l({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#l(t){this.#R();let e=this.#e.fetch(this.options,t);return t?.throwOnError||(e=e.catch(g)),e}#v(){this.#O();const t=F(this.options.staleTime,this.#e);if(T||this.#r.isStale||!N(t))return;const s=ft(this.#r.dataUpdatedAt,t)+1;this.#h=Q.setTimeout(()=>{this.#r.isStale||this.updateResult()},s)}#m(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#g(t){this.#S(),this.#u=t,!(T||S(this.options.enabled,this.#e)===!1||!N(this.#u)||this.#u===0)&&(this.#c=Q.setInterval(()=>{(this.options.refetchIntervalInBackground||Y.isFocused())&&this.#l()},this.#u))}#b(){this.#v(),this.#g(this.#m())}#O(){this.#h&&(Q.clearTimeout(this.#h),this.#h=void 0)}#S(){this.#c&&(Q.clearInterval(this.#c),this.#c=void 0)}createResult(t,e){const s=this.#e,i=this.options,r=this.#r,n=this.#i,o=this.#a,u=t!==s?t.state:this.#s,{state:f}=t;let h={...f},v=!1,c;if(e._optimisticResults){const O=this.hasListeners(),q=!O&&ot(t,e),I=O&&ut(t,s,e,i);(q||I)&&(h={...h,...bt(f.data,t.options)}),e._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:R,errorUpdatedAt:y,status:l}=h;c=h.data;let m=!1;if(e.placeholderData!==void 0&&c===void 0&&l==="pending"){let O;r?.isPlaceholderData&&e.placeholderData===o?.placeholderData?(O=r.data,m=!0):O=typeof e.placeholderData=="function"?e.placeholderData(this.#d?.state.data,this.#d):e.placeholderData,O!==void 0&&(l="success",c=B(r?.data,O,e),v=!0)}if(e.select&&c!==void 0&&!m)if(r&&c===n?.data&&e.select===this.#y)c=this.#f;else try{this.#y=e.select,c=e.select(c),c=B(r?.data,c,e),this.#f=c,this.#n=null}catch(O){this.#n=O}this.#n&&(R=this.#n,c=this.#f,y=Date.now(),l="error");const b=h.fetchStatus==="fetching",C=l==="pending",P=l==="error",E=C&&b,M=c!==void 0,w={status:l,fetchStatus:h.fetchStatus,isPending:C,isSuccess:l==="success",isError:P,isInitialLoading:E,isLoading:E,data:c,dataUpdatedAt:h.dataUpdatedAt,error:R,errorUpdatedAt:y,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!C,isLoadingError:P&&!M,isPaused:h.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:P&&M,isStale:Z(t,e),refetch:this.refetch,promise:this.#o,isEnabled:S(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const O=U=>{w.status==="error"?U.reject(w.error):w.data!==void 0&&U.resolve(w.data)},q=()=>{const U=this.#o=w.promise=z();O(U)},I=this.#o;switch(I.status){case"pending":t.queryHash===s.queryHash&&O(I);break;case"fulfilled":(w.status==="error"||w.data!==I.value)&&q();break;case"rejected":(w.status!=="error"||w.error!==I.reason)&&q();break}}return w}updateResult(){const t=this.#r,e=this.createResult(this.#e,this.options);if(this.#i=this.#e.state,this.#a=this.options,this.#i.data!==void 0&&(this.#d=this.#e),_(e,t))return;this.#r=e;const s=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,r=typeof i=="function"?i():i;if(r==="all"||!r&&!this.#p.size)return!0;const n=new Set(r??this.#p);return this.options.throwOnError&&n.add("error"),Object.keys(this.#r).some(o=>{const a=o;return this.#r[a]!==t[a]&&n.has(a)})};this.#C({listeners:s()})}#R(){const t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#e)return;const e=this.#e;this.#e=t,this.#s=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#C(t){d.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function Jt(t,e){return S(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function ot(t,e){return Jt(t,e)||t.state.data!==void 0&&W(t,e,e.refetchOnMount)}function W(t,e,s){if(S(e.enabled,t)!==!1&&F(e.staleTime,t)!=="static"){const i=typeof s=="function"?s(t):s;return i==="always"||i!==!1&&Z(t,e)}return!1}function ut(t,e,s,i){return(t!==e||S(i.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&Z(t,s)}function Z(t,e){return S(e.enabled,t)!==!1&&t.isStaleByTime(F(e.staleTime,t))}function Wt(t,e){return!_(t.getCurrentResult(),e)}function ht(t){return{onFetch:(e,s)=>{const i=e.options,r=e.fetchOptions?.meta?.fetchMore?.direction,n=e.state.data?.pages||[],o=e.state.data?.pageParams||[];let a={pages:[],pageParams:[]},u=0;const f=async()=>{let h=!1;const v=y=>{_t(y,()=>e.signal,()=>h=!0)},c=pt(e.options,e.fetchOptions),R=async(y,l,m)=>{if(h)return Promise.reject();if(l==null&&y.pages.length)return Promise.resolve(y);const C=(()=>{const K={client:e.client,queryKey:e.queryKey,pageParam:l,direction:m?"backward":"forward",meta:e.options.meta};return v(K),K})(),P=await c(C),{maxPages:E}=e.options,M=m?kt:Ut;return{pages:M(y.pages,P,E),pageParams:M(y.pageParams,l,E)}};if(r&&n.length){const y=r==="backward",l=y?$t:ct,m={pages:n,pageParams:o},b=l(i,m);a=await R(m,b,y)}else{const y=t??n.length;do{const l=u===0?o[0]??i.initialPageParam:ct(i,a);if(u>0&&l==null)break;a=await R(a,l),u++}while(u<y)}return a};e.options.persister?e.fetchFn=()=>e.options.persister?.(f,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s):e.fetchFn=f}}}function ct(t,{pages:e,pageParams:s}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,s[i],s):void 0}function $t(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}var Vt=class extends gt{#t;#e;#s;#r;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||Ot(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#s.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#i({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=mt({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(n,o)=>{this.#i({type:"failed",failureCount:n,error:o})},onPause:()=>{this.#i({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const i=this.state.status==="pending",r=!this.#r.canStart();try{if(i)e();else{this.#i({type:"pending",variables:t,isPaused:r}),await this.#s.config.onMutate?.(t,this,s);const o=await this.options.onMutate?.(t,s);o!==this.state.context&&this.#i({type:"pending",context:o,variables:t,isPaused:r})}const n=await this.#r.start();return await this.#s.config.onSuccess?.(n,t,this.state.context,this,s),await this.options.onSuccess?.(n,t,this.state.context,s),await this.#s.config.onSettled?.(n,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(n,null,t,this.state.context,s),this.#i({type:"success",data:n}),n}catch(n){try{await this.#s.config.onError?.(n,t,this.state.context,this,s)}catch(o){Promise.reject(o)}try{await this.options.onError?.(n,t,this.state.context,s)}catch(o){Promise.reject(o)}try{await this.#s.config.onSettled?.(void 0,n,this.state.variables,this.state.context,this,s)}catch(o){Promise.reject(o)}try{await this.options.onSettled?.(void 0,n,t,this.state.context,s)}catch(o){Promise.reject(o)}throw this.#i({type:"error",error:n}),n}finally{this.#s.runNext(this)}}#i(t){const e=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),d.batch(()=>{this.#e.forEach(s=>{s.onMutationUpdate(t)}),this.#s.notify({mutation:this,type:"updated",action:t})})}};function Ot(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Yt=class extends D{constructor(t={}){super(),this.config=t,this.#t=new Set,this.#e=new Map,this.#s=0}#t;#e;#s;build(t,e,s){const i=new Vt({client:t,mutationCache:this,mutationId:++this.#s,options:t.defaultMutationOptions(e),state:s});return this.add(i),i}add(t){this.#t.add(t);const e=k(t);if(typeof e=="string"){const s=this.#e.get(e);s?s.push(t):this.#e.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#t.delete(t)){const e=k(t);if(typeof e=="string"){const s=this.#e.get(e);if(s)if(s.length>1){const i=s.indexOf(t);i!==-1&&s.splice(i,1)}else s[0]===t&&this.#e.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=k(t);if(typeof e=="string"){const i=this.#e.get(e)?.find(r=>r.state.status==="pending");return!i||i===t}else return!0}runNext(t){const e=k(t);return typeof e=="string"?this.#e.get(e)?.find(i=>i!==t&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){d.batch(()=>{this.#t.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(t){const e={exact:!0,...t};return this.getAll().find(s=>st(e,s))}findAll(t={}){return this.getAll().filter(e=>st(t,e))}notify(t){d.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return d.batch(()=>Promise.all(t.map(e=>e.continue().catch(g))))}};function k(t){return t.options.scope?.id}var Zt=class extends D{#t;#e=void 0;#s;#r;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const e=this.options;this.options=this.#t.defaultMutationOptions(t),_(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),e?.mutationKey&&this.options.mutationKey&&x(e.mutationKey)!==x(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(t){this.#i(),this.#a(t)}getCurrentResult(){return this.#e}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#i(),this.#a()}mutate(t,e){return this.#r=e,this.#s?.removeObserver(this),this.#s=this.#t.getMutationCache().build(this.#t,this.options),this.#s.addObserver(this),this.#s.execute(t)}#i(){const t=this.#s?.state??Ot();this.#e={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#a(t){d.batch(()=>{if(this.#r&&this.hasListeners()){const e=this.#e.variables,s=this.#e.context,i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#r.onSuccess?.(t.data,e,s,i)}catch(r){Promise.reject(r)}try{this.#r.onSettled?.(t.data,null,e,s,i)}catch(r){Promise.reject(r)}}else if(t?.type==="error"){try{this.#r.onError?.(t.error,e,s,i)}catch(r){Promise.reject(r)}try{this.#r.onSettled?.(void 0,t.error,e,s,i)}catch(r){Promise.reject(r)}}}this.listeners.forEach(e=>{e(this.#e)})})}},Xt=class extends D{constructor(t={}){super(),this.config=t,this.#t=new Map}#t;build(t,e,s){const i=e.queryKey,r=e.queryHash??$(i,e);let n=this.get(r);return n||(n=new Bt({client:t,queryKey:i,queryHash:r,options:t.defaultQueryOptions(e),state:s,defaultOptions:t.getQueryDefaults(i)}),this.add(n)),n}add(t){this.#t.has(t.queryHash)||(this.#t.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#t.get(t.queryHash);e&&(t.destroy(),e===t&&this.#t.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){d.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#t.get(t)}getAll(){return[...this.#t.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(s=>et(e,s))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(s=>et(t,s)):e}notify(t){d.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){d.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){d.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},de=class{#t;#e;#s;#r;#i;#a;#o;#n;constructor(t={}){this.#t=t.queryCache||new Xt,this.#e=t.mutationCache||new Yt,this.#s=t.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Y.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#n=L.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#n?.(),this.#n=void 0)}isFetching(t){return this.#t.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#e.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#t.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),s=this.#t.build(this,e),i=s.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(F(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(t){return this.#t.findAll(t).map(({queryKey:e,state:s})=>{const i=s.data;return[e,i]})}setQueryData(t,e,s){const i=this.defaultQueryOptions({queryKey:t}),n=this.#t.get(i.queryHash)?.state.data,o=At(e,n);if(o!==void 0)return this.#t.build(this,i).setData(o,{...s,manual:!0})}setQueriesData(t,e,s){return d.batch(()=>this.#t.findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,e,s)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#t.get(e.queryHash)?.state}removeQueries(t){const e=this.#t;d.batch(()=>{e.findAll(t).forEach(s=>{e.remove(s)})})}resetQueries(t,e){const s=this.#t;return d.batch(()=>(s.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const s={revert:!0,...e},i=d.batch(()=>this.#t.findAll(t).map(r=>r.cancel(s)));return Promise.all(i).then(g).catch(g)}invalidateQueries(t,e={}){return d.batch(()=>(this.#t.findAll(t).forEach(s=>{s.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const s={...e,cancelRefetch:e.cancelRefetch??!0},i=d.batch(()=>this.#t.findAll(t).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let n=r.fetch(void 0,s);return s.throwOnError||(n=n.catch(g)),r.state.fetchStatus==="paused"?Promise.resolve():n}));return Promise.all(i).then(g)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const s=this.#t.build(this,e);return s.isStaleByTime(F(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(g).catch(g)}fetchInfiniteQuery(t){return t.behavior=ht(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(g).catch(g)}ensureInfiniteQueryData(t){return t.behavior=ht(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return L.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#s}setDefaultOptions(t){this.#s=t}setQueryDefaults(t,e){this.#r.set(x(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#r.values()],s={};return e.forEach(i=>{j(t,i.queryKey)&&Object.assign(s,i.defaultOptions)}),s}setMutationDefaults(t,e){this.#i.set(x(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#i.values()],s={};return e.forEach(i=>{j(t,i.mutationKey)&&Object.assign(s,i.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#s.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=$(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===V&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#s.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},St=p.createContext(void 0),Rt=t=>{const e=p.useContext(St);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},pe=({client:t,children:e})=>(p.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),Qt.jsx(St.Provider,{value:t,children:e})),Ct=p.createContext(!1),te=()=>p.useContext(Ct);Ct.Provider;function ee(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var se=p.createContext(ee()),ie=()=>p.useContext(se),re=(t,e)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(e.isReset()||(t.retryOnMount=!1))},ne=t=>{p.useEffect(()=>{t.clearReset()},[t])},ae=({result:t,errorResetBoundary:e,throwOnError:s,query:i,suspense:r})=>t.isError&&!e.isReset()&&!t.isFetching&&i&&(r&&t.data===void 0||yt(s,[t.error,i])),oe=t=>{if(t.suspense){const s=r=>r==="static"?r:Math.max(r??1e3,1e3),i=t.staleTime;t.staleTime=typeof i=="function"?(...r)=>s(i(...r)):s(i),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},ue=(t,e)=>t.isLoading&&t.isFetching&&!e,he=(t,e)=>t?.suspense&&e.isPending,lt=(t,e,s)=>e.fetchOptimistic(t).catch(()=>{s.clearReset()});function ce(t,e,s){const i=te(),r=ie(),n=Rt(),o=n.defaultQueryOptions(t);n.getDefaultOptions().queries?._experimental_beforeQuery?.(o),o._optimisticResults=i?"isRestoring":"optimistic",oe(o),re(o,r),ne(r);const a=!n.getQueryCache().get(o.queryHash),[u]=p.useState(()=>new e(n,o)),f=u.getOptimisticResult(o),h=!i&&t.subscribed!==!1;if(p.useSyncExternalStore(p.useCallback(v=>{const c=h?u.subscribe(d.batchCalls(v)):g;return u.updateResult(),c},[u,h]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),p.useEffect(()=>{u.setOptions(o)},[o,u]),he(o,f))throw lt(o,u,r);if(ae({result:f,errorResetBoundary:r,throwOnError:o.throwOnError,query:n.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw f.error;return n.getDefaultOptions().queries?._experimental_afterQuery?.(o,f),o.experimental_prefetchInRender&&!T&&ue(f,i)&&(a?lt(o,u,r):n.getQueryCache().get(o.queryHash)?.promise)?.catch(g).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?f:u.trackResult(f)}function ye(t,e){return ce(t,zt)}function ve(t,e){const s=Rt(),[i]=p.useState(()=>new Zt(s,t));p.useEffect(()=>{i.setOptions(t)},[i,t]);const r=p.useSyncExternalStore(p.useCallback(o=>i.subscribe(d.batchCalls(o)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),n=p.useCallback((o,a)=>{i.mutate(o,a).catch(g)},[i]);if(r.error&&yt(i.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:n,mutateAsync:r.mutate}}export{de as Q,Tt as R,fe as a,Rt as b,ve as c,pe as d,Qt as j,p as r,ye as u};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import{r as s,a as kt,j as v,R as he}from"./vendor-query-BUABzP5o.js";import{r as kn,R as $o}from"./vendor-flow-CVNK-_lx.js";function an(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function fe(...e){return t=>{let n=!1;const r=e.map(o=>{const i=an(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():an(e[o],null)}}}}function $(...e){return s.useCallback(fe(...e),e)}var Wo=Symbol.for("react.lazy"),Je=kt[" use ".trim().toString()];function Bo(e){return typeof e=="object"&&e!==null&&"then"in e}function Ln(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Wo&&"_payload"in e&&Bo(e._payload)}function Lt(e){const t=Vo(e),n=s.forwardRef((r,o)=>{let{children:i,...a}=r;Ln(i)&&typeof Je=="function"&&(i=Je(i._payload));const c=s.Children.toArray(i),u=c.find(Ho);if(u){const l=u.props.children,d=c.map(f=>f===u?s.Children.count(l)>1?s.Children.only(null):s.isValidElement(l)?l.props.children:null:f);return v.jsx(t,{...a,ref:o,children:s.isValidElement(l)?s.cloneElement(l,void 0,d):null})}return v.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var Zl=Lt("Slot");function Vo(e){const t=s.forwardRef((n,r)=>{let{children:o,...i}=n;if(Ln(o)&&typeof Je=="function"&&(o=Je(o._payload)),s.isValidElement(o)){const a=Ko(o),c=Go(i,o.props);return o.type!==s.Fragment&&(c.ref=r?fe(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Uo=Symbol("radix.slottable");function Ho(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Uo}function Go(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const u=i(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Ko(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function A(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function zo(e,t){const n=s.createContext(t),r=i=>{const{children:a,...c}=i,u=s.useMemo(()=>c,Object.values(c));return v.jsx(n.Provider,{value:u,children:a})};r.displayName=e+"Provider";function o(i){const a=s.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function de(e,t=[]){let n=[];function r(i,a){const c=s.createContext(a),u=n.length;n=[...n,a];const l=f=>{const{scope:p,children:h,...g}=f,m=p?.[e]?.[u]||c,y=s.useMemo(()=>g,Object.values(g));return v.jsx(m.Provider,{value:y,children:h})};l.displayName=i+"Provider";function d(f,p){const h=p?.[e]?.[u]||c,g=s.useContext(h);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[l,d]}const o=()=>{const i=n.map(a=>s.createContext(a));return function(c){const u=c?.[e]||i;return s.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return o.scopeName=e,[r,Yo(o,...t)]}function Yo(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((c,{useScope:u,scopeName:l})=>{const f=u(i)[`__scope${l}`];return{...c,...f}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var ae=globalThis?.document?s.useLayoutEffect:()=>{},Xo=kt[" useId ".trim().toString()]||(()=>{}),qo=0;function Ee(e){const[t,n]=s.useState(Xo());return ae(()=>{n(r=>r??String(qo++))},[e]),t?`radix-${t}`:""}var Zo=kt[" useInsertionEffect ".trim().toString()]||ae;function Fe({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,a]=Qo({defaultProp:t,onChange:n}),c=e!==void 0,u=c?e:o;{const d=s.useRef(e!==void 0);s.useEffect(()=>{const f=d.current;f!==c&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=c},[c,r])}const l=s.useCallback(d=>{if(c){const f=Jo(d)?d(e):d;f!==e&&a.current?.(f)}else i(d)},[c,e,i,a]);return[u,l]}function Qo({defaultProp:e,onChange:t}){const[n,r]=s.useState(e),o=s.useRef(n),i=s.useRef(t);return Zo(()=>{i.current=t},[t]),s.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function Jo(e){return typeof e=="function"}function ei(e){const t=ti(e),n=s.forwardRef((r,o)=>{const{children:i,...a}=r,c=s.Children.toArray(i),u=c.find(ri);if(u){const l=u.props.children,d=c.map(f=>f===u?s.Children.count(l)>1?s.Children.only(null):s.isValidElement(l)?l.props.children:null:f);return v.jsx(t,{...a,ref:o,children:s.isValidElement(l)?s.cloneElement(l,void 0,d):null})}return v.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function ti(e){const t=s.forwardRef((n,r)=>{const{children:o,...i}=n;if(s.isValidElement(o)){const a=ii(o),c=oi(i,o.props);return o.type!==s.Fragment&&(c.ref=r?fe(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ni=Symbol("radix.slottable");function ri(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ni}function oi(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const u=i(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function ii(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var si=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],k=si.reduce((e,t)=>{const n=ei(`Primitive.${t}`),r=s.forwardRef((o,i)=>{const{asChild:a,...c}=o,u=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(u,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Fn(e,t){e&&kn.flushSync(()=>e.dispatchEvent(t))}function ne(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...n)=>t.current?.(...n),[])}function ci(e,t=globalThis?.document){const n=ne(e);s.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var ai="DismissableLayer",Mt="dismissableLayer.update",li="dismissableLayer.pointerDownOutside",ui="dismissableLayer.focusOutside",ln,jn=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ft=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:c,...u}=e,l=s.useContext(jn),[d,f]=s.useState(null),p=d?.ownerDocument??globalThis?.document,[,h]=s.useState({}),g=$(t,S=>f(S)),m=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),w=m.indexOf(y),x=d?m.indexOf(d):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,C=x>=w,E=pi(S=>{const M=S.target,I=[...l.branches].some(_=>_.contains(M));!C||I||(o?.(S),a?.(S),S.defaultPrevented||c?.())},p),P=mi(S=>{const M=S.target;[...l.branches].some(_=>_.contains(M))||(i?.(S),a?.(S),S.defaultPrevented||c?.())},p);return ci(S=>{x===l.layers.size-1&&(r?.(S),!S.defaultPrevented&&c&&(S.preventDefault(),c()))},p),s.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(ln=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),un(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=ln)}},[d,p,n,l]),s.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),un())},[d,l]),s.useEffect(()=>{const S=()=>h({});return document.addEventListener(Mt,S),()=>document.removeEventListener(Mt,S)},[]),v.jsx(k.div,{...u,ref:g,style:{pointerEvents:b?C?"auto":"none":void 0,...e.style},onFocusCapture:A(e.onFocusCapture,P.onFocusCapture),onBlurCapture:A(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:A(e.onPointerDownCapture,E.onPointerDownCapture)})});Ft.displayName=ai;var fi="DismissableLayerBranch",di=s.forwardRef((e,t)=>{const n=s.useContext(jn),r=s.useRef(null),o=$(t,r);return s.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),v.jsx(k.div,{...e,ref:o})});di.displayName=fi;function pi(e,t=globalThis?.document){const n=ne(e),r=s.useRef(!1),o=s.useRef(()=>{});return s.useEffect(()=>{const i=c=>{if(c.target&&!r.current){let u=function(){$n(li,n,l,{discrete:!0})};const l={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function mi(e,t=globalThis?.document){const n=ne(e),r=s.useRef(!1);return s.useEffect(()=>{const o=i=>{i.target&&!r.current&&$n(ui,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function un(){const e=new CustomEvent(Mt);document.dispatchEvent(e)}function $n(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Fn(o,i):o.dispatchEvent(i)}var yt="focusScope.autoFocusOnMount",wt="focusScope.autoFocusOnUnmount",fn={bubbles:!1,cancelable:!0},hi="FocusScope",jt=s.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[c,u]=s.useState(null),l=ne(o),d=ne(i),f=s.useRef(null),p=$(t,m=>u(m)),h=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(r){let m=function(b){if(h.paused||!c)return;const C=b.target;c.contains(C)?f.current=C:se(f.current,{select:!0})},y=function(b){if(h.paused||!c)return;const C=b.relatedTarget;C!==null&&(c.contains(C)||se(f.current,{select:!0}))},w=function(b){if(document.activeElement===document.body)for(const E of b)E.removedNodes.length>0&&se(c)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const x=new MutationObserver(w);return c&&x.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),x.disconnect()}}},[r,c,h.paused]),s.useEffect(()=>{if(c){pn.add(h);const m=document.activeElement;if(!c.contains(m)){const w=new CustomEvent(yt,fn);c.addEventListener(yt,l),c.dispatchEvent(w),w.defaultPrevented||(vi(bi(Wn(c)),{select:!0}),document.activeElement===m&&se(c))}return()=>{c.removeEventListener(yt,l),setTimeout(()=>{const w=new CustomEvent(wt,fn);c.addEventListener(wt,d),c.dispatchEvent(w),w.defaultPrevented||se(m??document.body,{select:!0}),c.removeEventListener(wt,d),pn.remove(h)},0)}}},[c,l,d,h]);const g=s.useCallback(m=>{if(!n&&!r||h.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(y&&w){const x=m.currentTarget,[b,C]=gi(x);b&&C?!m.shiftKey&&w===C?(m.preventDefault(),n&&se(b,{select:!0})):m.shiftKey&&w===b&&(m.preventDefault(),n&&se(C,{select:!0})):w===x&&m.preventDefault()}},[n,r,h.paused]);return v.jsx(k.div,{tabIndex:-1,...a,ref:p,onKeyDown:g})});jt.displayName=hi;function vi(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(se(r,{select:t}),document.activeElement!==n)return}function gi(e){const t=Wn(e),n=dn(t,e),r=dn(t.reverse(),e);return[n,r]}function Wn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function dn(e,t){for(const n of e)if(!yi(n,{upTo:t}))return n}function yi(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function wi(e){return e instanceof HTMLInputElement&&"select"in e}function se(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&wi(e)&&t&&e.select()}}var pn=xi();function xi(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=mn(e,t),e.unshift(t)},remove(t){e=mn(e,t),e[0]?.resume()}}}function mn(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function bi(e){return e.filter(t=>t.tagName!=="A")}var Ci="Portal",$t=s.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=s.useState(!1);ae(()=>i(!0),[]);const a=n||o&&globalThis?.document?.body;return a?$o.createPortal(v.jsx(k.div,{...r,ref:t}),a):null});$t.displayName=Ci;function Ei(e,t){return s.useReducer((n,r)=>t[n][r]??n,e)}var ie=e=>{const{present:t,children:n}=e,r=Si(t),o=typeof n=="function"?n({present:r.isPresent}):s.Children.only(n),i=$(r.ref,Ri(o));return typeof n=="function"||r.isPresent?s.cloneElement(o,{ref:i}):null};ie.displayName="Presence";function Si(e){const[t,n]=s.useState(),r=s.useRef(null),o=s.useRef(e),i=s.useRef("none"),a=e?"mounted":"unmounted",[c,u]=Ei(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const l=He(r.current);i.current=c==="mounted"?l:"none"},[c]),ae(()=>{const l=r.current,d=o.current;if(d!==e){const p=i.current,h=He(l);e?u("MOUNT"):h==="none"||l?.display==="none"?u("UNMOUNT"):u(d&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),ae(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,f=h=>{const m=He(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&m&&(u("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},p=h=>{h.target===t&&(i.current=He(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:s.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function He(e){return e?.animationName||"none"}function Ri(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var xt=0;function Bn(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??hn()),document.body.insertAdjacentElement("beforeend",e[1]??hn()),xt++,()=>{xt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),xt--}},[])}function hn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Z=function(){return Z=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Z.apply(this,arguments)};function Vn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Pi(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var qe="right-scroll-bar-position",Ze="width-before-scroll-bar",Ai="with-scroll-bars-hidden",Mi="--removed-body-scroll-bar-size";function bt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Oi(e,t){var n=s.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var _i=typeof window<"u"?s.useLayoutEffect:s.useEffect,vn=new WeakMap;function Di(e,t){var n=Oi(null,function(r){return e.forEach(function(o){return bt(o,r)})});return _i(function(){var r=vn.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(c){i.has(c)||bt(c,null)}),i.forEach(function(c){o.has(c)||bt(c,a)})}vn.set(n,e)},[e]),n}function Ii(e){return e}function Ni(e,t){t===void 0&&(t=Ii);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(c){return i(c)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(i),a=n}var u=function(){var d=a;a=[],d.forEach(i)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(d){a.push(d),l()},filter:function(d){return a=a.filter(d),n}}}};return o}function Ti(e){e===void 0&&(e={});var t=Ni(null);return t.options=Z({async:!0,ssr:!1},e),t}var Un=function(e){var t=e.sideCar,n=Vn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return s.createElement(r,Z({},n))};Un.isSideCarExport=!0;function ki(e,t){return e.useMedium(t),Un}var Hn=Ti(),Ct=function(){},ct=s.forwardRef(function(e,t){var n=s.useRef(null),r=s.useState({onScrollCapture:Ct,onWheelCapture:Ct,onTouchMoveCapture:Ct}),o=r[0],i=r[1],a=e.forwardProps,c=e.children,u=e.className,l=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,h=e.noRelative,g=e.noIsolation,m=e.inert,y=e.allowPinchZoom,w=e.as,x=w===void 0?"div":w,b=e.gapMode,C=Vn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=p,P=Di([n,t]),S=Z(Z({},C),o);return s.createElement(s.Fragment,null,d&&s.createElement(E,{sideCar:Hn,removeScrollBar:l,shards:f,noRelative:h,noIsolation:g,inert:m,setCallbacks:i,allowPinchZoom:!!y,lockRef:n,gapMode:b}),a?s.cloneElement(s.Children.only(c),Z(Z({},S),{ref:P})):s.createElement(x,Z({},S,{className:u,ref:P}),c))});ct.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ct.classNames={fullWidth:Ze,zeroRight:qe};var Li=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Fi(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Li();return t&&e.setAttribute("nonce",t),e}function ji(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function $i(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Wi=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Fi())&&(ji(t,n),$i(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Bi=function(){var e=Wi();return function(t,n){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Gn=function(){var e=Bi(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Vi={left:0,top:0,right:0,gap:0},Et=function(e){return parseInt(e||"",10)||0},Ui=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Et(n),Et(r),Et(o)]},Hi=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Vi;var t=Ui(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Gi=Gn(),Se="data-scroll-locked",Ki=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
-
.`.concat(Ai,` {
|
|
3
|
-
overflow: hidden `).concat(r,`;
|
|
4
|
-
padding-right: `).concat(c,"px ").concat(r,`;
|
|
5
|
-
}
|
|
6
|
-
body[`).concat(Se,`] {
|
|
7
|
-
overflow: hidden `).concat(r,`;
|
|
8
|
-
overscroll-behavior: contain;
|
|
9
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
10
|
-
padding-left: `.concat(o,`px;
|
|
11
|
-
padding-top: `).concat(i,`px;
|
|
12
|
-
padding-right: `).concat(a,`px;
|
|
13
|
-
margin-left:0;
|
|
14
|
-
margin-top:0;
|
|
15
|
-
margin-right: `).concat(c,"px ").concat(r,`;
|
|
16
|
-
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.`).concat(qe,` {
|
|
20
|
-
right: `).concat(c,"px ").concat(r,`;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.`).concat(Ze,` {
|
|
24
|
-
margin-right: `).concat(c,"px ").concat(r,`;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.`).concat(qe," .").concat(qe,` {
|
|
28
|
-
right: 0 `).concat(r,`;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.`).concat(Ze," .").concat(Ze,` {
|
|
32
|
-
margin-right: 0 `).concat(r,`;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
body[`).concat(Se,`] {
|
|
36
|
-
`).concat(Mi,": ").concat(c,`px;
|
|
37
|
-
}
|
|
38
|
-
`)},gn=function(){var e=parseInt(document.body.getAttribute(Se)||"0",10);return isFinite(e)?e:0},zi=function(){s.useEffect(function(){return document.body.setAttribute(Se,(gn()+1).toString()),function(){var e=gn()-1;e<=0?document.body.removeAttribute(Se):document.body.setAttribute(Se,e.toString())}},[])},Yi=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;zi();var i=s.useMemo(function(){return Hi(o)},[o]);return s.createElement(Gi,{styles:Ki(i,!t,o,n?"":"!important")})},Ot=!1;if(typeof window<"u")try{var Ge=Object.defineProperty({},"passive",{get:function(){return Ot=!0,!0}});window.addEventListener("test",Ge,Ge),window.removeEventListener("test",Ge,Ge)}catch{Ot=!1}var xe=Ot?{passive:!1}:!1,Xi=function(e){return e.tagName==="TEXTAREA"},Kn=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Xi(e)&&n[t]==="visible")},qi=function(e){return Kn(e,"overflowY")},Zi=function(e){return Kn(e,"overflowX")},yn=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=zn(e,r);if(o){var i=Yn(e,r),a=i[1],c=i[2];if(a>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Qi=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Ji=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},zn=function(e,t){return e==="v"?qi(t):Zi(t)},Yn=function(e,t){return e==="v"?Qi(t):Ji(t)},es=function(e,t){return e==="h"&&t==="rtl"?-1:1},ts=function(e,t,n,r,o){var i=es(e,window.getComputedStyle(t).direction),a=i*r,c=n.target,u=t.contains(c),l=!1,d=a>0,f=0,p=0;do{if(!c)break;var h=Yn(e,c),g=h[0],m=h[1],y=h[2],w=m-y-i*g;(g||w)&&zn(e,c)&&(f+=w,p+=g);var x=c.parentNode;c=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!u&&c!==document.body||u&&(t.contains(c)||t===c));return(d&&Math.abs(f)<1||!d&&Math.abs(p)<1)&&(l=!0),l},Ke=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},wn=function(e){return[e.deltaX,e.deltaY]},xn=function(e){return e&&"current"in e?e.current:e},ns=function(e,t){return e[0]===t[0]&&e[1]===t[1]},rs=function(e){return`
|
|
39
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},os=0,be=[];function is(e){var t=s.useRef([]),n=s.useRef([0,0]),r=s.useRef(),o=s.useState(os++)[0],i=s.useState(Gn)[0],a=s.useRef(e);s.useEffect(function(){a.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=Pi([e.lockRef.current],(e.shards||[]).map(xn),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=s.useCallback(function(m,y){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!a.current.allowPinchZoom;var w=Ke(m),x=n.current,b="deltaX"in m?m.deltaX:x[0]-w[0],C="deltaY"in m?m.deltaY:x[1]-w[1],E,P=m.target,S=Math.abs(b)>Math.abs(C)?"h":"v";if("touches"in m&&S==="h"&&P.type==="range")return!1;var M=window.getSelection(),I=M&&M.anchorNode,_=I?I===P||I.contains(P):!1;if(_)return!1;var N=yn(S,P);if(!N)return!0;if(N?E=S:(E=S==="v"?"h":"v",N=yn(S,P)),!N)return!1;if(!r.current&&"changedTouches"in m&&(b||C)&&(r.current=E),!E)return!0;var L=r.current||E;return ts(L,y,m,L==="h"?b:C)},[]),u=s.useCallback(function(m){var y=m;if(!(!be.length||be[be.length-1]!==i)){var w="deltaY"in y?wn(y):Ke(y),x=t.current.filter(function(E){return E.name===y.type&&(E.target===y.target||y.target===E.shadowParent)&&ns(E.delta,w)})[0];if(x&&x.should){y.cancelable&&y.preventDefault();return}if(!x){var b=(a.current.shards||[]).map(xn).filter(Boolean).filter(function(E){return E.contains(y.target)}),C=b.length>0?c(y,b[0]):!a.current.noIsolation;C&&y.cancelable&&y.preventDefault()}}},[]),l=s.useCallback(function(m,y,w,x){var b={name:m,delta:y,target:w,should:x,shadowParent:ss(w)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(C){return C!==b})},1)},[]),d=s.useCallback(function(m){n.current=Ke(m),r.current=void 0},[]),f=s.useCallback(function(m){l(m.type,wn(m),m.target,c(m,e.lockRef.current))},[]),p=s.useCallback(function(m){l(m.type,Ke(m),m.target,c(m,e.lockRef.current))},[]);s.useEffect(function(){return be.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",u,xe),document.addEventListener("touchmove",u,xe),document.addEventListener("touchstart",d,xe),function(){be=be.filter(function(m){return m!==i}),document.removeEventListener("wheel",u,xe),document.removeEventListener("touchmove",u,xe),document.removeEventListener("touchstart",d,xe)}},[]);var h=e.removeScrollBar,g=e.inert;return s.createElement(s.Fragment,null,g?s.createElement(i,{styles:rs(o)}):null,h?s.createElement(Yi,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ss(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const cs=ki(Hn,is);var Wt=s.forwardRef(function(e,t){return s.createElement(ct,Z({},e,{ref:t,sideCar:cs}))});Wt.classNames=ct.classNames;var as=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ce=new WeakMap,ze=new WeakMap,Ye={},St=0,Xn=function(e){return e&&(e.host||Xn(e.parentNode))},ls=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Xn(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},us=function(e,t,n,r){var o=ls(t,Array.isArray(e)?e:[e]);Ye[n]||(Ye[n]=new WeakMap);var i=Ye[n],a=[],c=new Set,u=new Set(o),l=function(f){!f||c.has(f)||(c.add(f),l(f.parentNode))};o.forEach(l);var d=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(p){if(c.has(p))d(p);else try{var h=p.getAttribute(r),g=h!==null&&h!=="false",m=(Ce.get(p)||0)+1,y=(i.get(p)||0)+1;Ce.set(p,m),i.set(p,y),a.push(p),m===1&&g&&ze.set(p,!0),y===1&&p.setAttribute(n,"true"),g||p.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",p,w)}})};return d(t),c.clear(),St++,function(){a.forEach(function(f){var p=Ce.get(f)-1,h=i.get(f)-1;Ce.set(f,p),i.set(f,h),p||(ze.has(f)||f.removeAttribute(r),ze.delete(f)),h||f.removeAttribute(n)}),St--,St||(Ce=new WeakMap,Ce=new WeakMap,ze=new WeakMap,Ye={})}},qn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=as(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),us(r,o,n,"aria-hidden")):function(){return null}};function fs(e){const t=ds(e),n=s.forwardRef((r,o)=>{const{children:i,...a}=r,c=s.Children.toArray(i),u=c.find(ms);if(u){const l=u.props.children,d=c.map(f=>f===u?s.Children.count(l)>1?s.Children.only(null):s.isValidElement(l)?l.props.children:null:f);return v.jsx(t,{...a,ref:o,children:s.isValidElement(l)?s.cloneElement(l,void 0,d):null})}return v.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function ds(e){const t=s.forwardRef((n,r)=>{const{children:o,...i}=n;if(s.isValidElement(o)){const a=vs(o),c=hs(i,o.props);return o.type!==s.Fragment&&(c.ref=r?fe(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ps=Symbol("radix.slottable");function ms(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ps}function hs(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const u=i(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function vs(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var at="Dialog",[Zn]=de(at),[gs,X]=Zn(at),Qn=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,c=s.useRef(null),u=s.useRef(null),[l,d]=Fe({prop:r,defaultProp:o??!1,onChange:i,caller:at});return v.jsx(gs,{scope:t,triggerRef:c,contentRef:u,contentId:Ee(),titleId:Ee(),descriptionId:Ee(),open:l,onOpenChange:d,onOpenToggle:s.useCallback(()=>d(f=>!f),[d]),modal:a,children:n})};Qn.displayName=at;var Jn="DialogTrigger",ys=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=X(Jn,n),i=$(t,o.triggerRef);return v.jsx(k.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ut(o.open),...r,ref:i,onClick:A(e.onClick,o.onOpenToggle)})});ys.displayName=Jn;var Bt="DialogPortal",[ws,er]=Zn(Bt,{forceMount:void 0}),tr=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=X(Bt,t);return v.jsx(ws,{scope:t,forceMount:n,children:s.Children.map(r,a=>v.jsx(ie,{present:n||i.open,children:v.jsx($t,{asChild:!0,container:o,children:a})}))})};tr.displayName=Bt;var et="DialogOverlay",nr=s.forwardRef((e,t)=>{const n=er(et,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=X(et,e.__scopeDialog);return i.modal?v.jsx(ie,{present:r||i.open,children:v.jsx(bs,{...o,ref:t})}):null});nr.displayName=et;var xs=fs("DialogOverlay.RemoveScroll"),bs=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=X(et,n);return v.jsx(Wt,{as:xs,allowPinchZoom:!0,shards:[o.contentRef],children:v.jsx(k.div,{"data-state":Ut(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ve="DialogContent",rr=s.forwardRef((e,t)=>{const n=er(ve,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=X(ve,e.__scopeDialog);return v.jsx(ie,{present:r||i.open,children:i.modal?v.jsx(Cs,{...o,ref:t}):v.jsx(Es,{...o,ref:t})})});rr.displayName=ve;var Cs=s.forwardRef((e,t)=>{const n=X(ve,e.__scopeDialog),r=s.useRef(null),o=$(t,n.contentRef,r);return s.useEffect(()=>{const i=r.current;if(i)return qn(i)},[]),v.jsx(or,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:A(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:A(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0;(a.button===2||c)&&i.preventDefault()}),onFocusOutside:A(e.onFocusOutside,i=>i.preventDefault())})}),Es=s.forwardRef((e,t)=>{const n=X(ve,e.__scopeDialog),r=s.useRef(!1),o=s.useRef(!1);return v.jsx(or,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;n.triggerRef.current?.contains(a)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),or=s.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,c=X(ve,n),u=s.useRef(null),l=$(t,u);return Bn(),v.jsxs(v.Fragment,{children:[v.jsx(jt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:v.jsx(Ft,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Ut(c.open),...a,ref:l,onDismiss:()=>c.onOpenChange(!1)})}),v.jsxs(v.Fragment,{children:[v.jsx(Ss,{titleId:c.titleId}),v.jsx(Ps,{contentRef:u,descriptionId:c.descriptionId})]})]})}),Vt="DialogTitle",ir=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=X(Vt,n);return v.jsx(k.h2,{id:o.titleId,...r,ref:t})});ir.displayName=Vt;var sr="DialogDescription",cr=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=X(sr,n);return v.jsx(k.p,{id:o.descriptionId,...r,ref:t})});cr.displayName=sr;var ar="DialogClose",lr=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=X(ar,n);return v.jsx(k.button,{type:"button",...r,ref:t,onClick:A(e.onClick,()=>o.onOpenChange(!1))})});lr.displayName=ar;function Ut(e){return e?"open":"closed"}var ur="DialogTitleWarning",[Ql,fr]=zo(ur,{contentName:ve,titleName:Vt,docsSlug:"dialog"}),Ss=({titleId:e})=>{const t=fr(ur),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
42
|
-
|
|
43
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
|
-
|
|
45
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Rs="DialogDescriptionWarning",Ps=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${fr(Rs).contentName}}.`;return s.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Jl=Qn,eu=tr,tu=nr,nu=rr,ru=ir,ou=cr,iu=lr,As=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ms=As.reduce((e,t)=>{const n=Lt(`Primitive.${t}`),r=s.forwardRef((o,i)=>{const{asChild:a,...c}=o,u=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(u,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Os="Label",dr=s.forwardRef((e,t)=>v.jsx(Ms.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));dr.displayName=Os;var su=dr;function bn(e){const t=_s(e),n=s.forwardRef((r,o)=>{const{children:i,...a}=r,c=s.Children.toArray(i),u=c.find(Is);if(u){const l=u.props.children,d=c.map(f=>f===u?s.Children.count(l)>1?s.Children.only(null):s.isValidElement(l)?l.props.children:null:f);return v.jsx(t,{...a,ref:o,children:s.isValidElement(l)?s.cloneElement(l,void 0,d):null})}return v.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function _s(e){const t=s.forwardRef((n,r)=>{const{children:o,...i}=n;if(s.isValidElement(o)){const a=Ts(o),c=Ns(i,o.props);return o.type!==s.Fragment&&(c.ref=r?fe(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ds=Symbol("radix.slottable");function Is(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ds}function Ns(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const u=i(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Ts(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function pr(e){const t=e+"CollectionProvider",[n,r]=de(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:y,children:w}=m,x=he.useRef(null),b=he.useRef(new Map).current;return v.jsx(o,{scope:y,itemMap:b,collectionRef:x,children:w})};a.displayName=t;const c=e+"CollectionSlot",u=bn(c),l=he.forwardRef((m,y)=>{const{scope:w,children:x}=m,b=i(c,w),C=$(y,b.collectionRef);return v.jsx(u,{ref:C,children:x})});l.displayName=c;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=bn(d),h=he.forwardRef((m,y)=>{const{scope:w,children:x,...b}=m,C=he.useRef(null),E=$(y,C),P=i(d,w);return he.useEffect(()=>(P.itemMap.set(C,{ref:C,...b}),()=>{P.itemMap.delete(C)})),v.jsx(p,{[f]:"",ref:E,children:x})});h.displayName=d;function g(m){const y=i(e+"CollectionConsumer",m);return he.useCallback(()=>{const x=y.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(y.itemMap.values()).sort((P,S)=>b.indexOf(P.ref.current)-b.indexOf(S.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:a,Slot:l,ItemSlot:h},g,r]}var ks=s.createContext(void 0);function mr(e){const t=s.useContext(ks);return e||t||"ltr"}const Ls=["top","right","bottom","left"],le=Math.min,H=Math.max,tt=Math.round,Xe=Math.floor,J=e=>({x:e,y:e}),Fs={left:"right",right:"left",bottom:"top",top:"bottom"},js={start:"end",end:"start"};function _t(e,t,n){return H(e,le(t,n))}function re(e,t){return typeof e=="function"?e(t):e}function oe(e){return e.split("-")[0]}function Ae(e){return e.split("-")[1]}function Ht(e){return e==="x"?"y":"x"}function Gt(e){return e==="y"?"height":"width"}const $s=new Set(["top","bottom"]);function Q(e){return $s.has(oe(e))?"y":"x"}function Kt(e){return Ht(Q(e))}function Ws(e,t,n){n===void 0&&(n=!1);const r=Ae(e),o=Kt(e),i=Gt(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=nt(a)),[a,nt(a)]}function Bs(e){const t=nt(e);return[Dt(e),t,Dt(t)]}function Dt(e){return e.replace(/start|end/g,t=>js[t])}const Cn=["left","right"],En=["right","left"],Vs=["top","bottom"],Us=["bottom","top"];function Hs(e,t,n){switch(e){case"top":case"bottom":return n?t?En:Cn:t?Cn:En;case"left":case"right":return t?Vs:Us;default:return[]}}function Gs(e,t,n,r){const o=Ae(e);let i=Hs(oe(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Dt)))),i}function nt(e){return e.replace(/left|right|bottom|top/g,t=>Fs[t])}function Ks(e){return{top:0,right:0,bottom:0,left:0,...e}}function hr(e){return typeof e!="number"?Ks(e):{top:e,right:e,bottom:e,left:e}}function rt(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Sn(e,t,n){let{reference:r,floating:o}=e;const i=Q(t),a=Kt(t),c=Gt(a),u=oe(t),l=i==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[c]/2-o[c]/2;let h;switch(u){case"top":h={x:d,y:r.y-o.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(Ae(t)){case"start":h[a]-=p*(n&&l?-1:1);break;case"end":h[a]+=p*(n&&l?-1:1);break}return h}const zs=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,c=i.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=Sn(l,r,u),p=r,h={},g=0;for(let m=0;m<c.length;m++){const{name:y,fn:w}=c[m],{x,y:b,data:C,reset:E}=await w({x:d,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:l,platform:a,elements:{reference:e,floating:t}});d=x??d,f=b??f,h={...h,[y]:{...h[y],...C}},E&&g<=50&&(g++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(l=E.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:d,y:f}=Sn(l,p,u)),m=-1)}return{x:d,y:f,placement:p,strategy:o,middlewareData:h}};async function Ne(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:c,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:h=0}=re(t,e),g=hr(h),y=c[p?f==="floating"?"reference":"floating":f],w=rt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:l,rootBoundary:d,strategy:u})),x=f==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),C=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},E=rt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:b,strategy:u}):x);return{top:(w.top-E.top+g.top)/C.y,bottom:(E.bottom-w.bottom+g.bottom)/C.y,left:(w.left-E.left+g.left)/C.x,right:(E.right-w.right+g.right)/C.x}}const Ys=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:c,middlewareData:u}=t,{element:l,padding:d=0}=re(e,t)||{};if(l==null)return{};const f=hr(d),p={x:n,y:r},h=Kt(o),g=Gt(h),m=await a.getDimensions(l),y=h==="y",w=y?"top":"left",x=y?"bottom":"right",b=y?"clientHeight":"clientWidth",C=i.reference[g]+i.reference[h]-p[h]-i.floating[g],E=p[h]-i.reference[h],P=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let S=P?P[b]:0;(!S||!await(a.isElement==null?void 0:a.isElement(P)))&&(S=c.floating[b]||i.floating[g]);const M=C/2-E/2,I=S/2-m[g]/2-1,_=le(f[w],I),N=le(f[x],I),L=_,F=S-m[g]-N,T=S/2-m[g]/2+M,B=_t(L,T,F),D=!u.arrow&&Ae(o)!=null&&T!==B&&i.reference[g]/2-(T<L?_:N)-m[g]/2<0,j=D?T<L?T-L:T-F:0;return{[h]:p[h]+j,data:{[h]:B,centerOffset:T-B-j,...D&&{alignmentOffset:j}},reset:D}}}),Xs=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:c,platform:u,elements:l}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...y}=re(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const w=oe(o),x=Q(c),b=oe(c)===c,C=await(u.isRTL==null?void 0:u.isRTL(l.floating)),E=p||(b||!m?[nt(c)]:Bs(c)),P=g!=="none";!p&&P&&E.push(...Gs(c,m,g,C));const S=[c,...E],M=await Ne(t,y),I=[];let _=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&I.push(M[w]),f){const T=Ws(o,a,C);I.push(M[T[0]],M[T[1]])}if(_=[..._,{placement:o,overflows:I}],!I.every(T=>T<=0)){var N,L;const T=(((N=i.flip)==null?void 0:N.index)||0)+1,B=S[T];if(B&&(!(f==="alignment"?x!==Q(B):!1)||_.every(O=>Q(O.placement)===x?O.overflows[0]>0:!0)))return{data:{index:T,overflows:_},reset:{placement:B}};let D=(L=_.filter(j=>j.overflows[0]<=0).sort((j,O)=>j.overflows[1]-O.overflows[1])[0])==null?void 0:L.placement;if(!D)switch(h){case"bestFit":{var F;const j=(F=_.filter(O=>{if(P){const R=Q(O.placement);return R===x||R==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(R=>R>0).reduce((R,V)=>R+V,0)]).sort((O,R)=>O[1]-R[1])[0])==null?void 0:F[0];j&&(D=j);break}case"initialPlacement":D=c;break}if(o!==D)return{reset:{placement:D}}}return{}}}};function Rn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Pn(e){return Ls.some(t=>e[t]>=0)}const qs=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=re(e,t);switch(r){case"referenceHidden":{const i=await Ne(t,{...o,elementContext:"reference"}),a=Rn(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Pn(a)}}}case"escaped":{const i=await Ne(t,{...o,altBoundary:!0}),a=Rn(i,n.floating);return{data:{escapedOffsets:a,escaped:Pn(a)}}}default:return{}}}}},vr=new Set(["left","top"]);async function Zs(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=oe(n),c=Ae(n),u=Q(n)==="y",l=vr.has(a)?-1:1,d=i&&u?-1:1,f=re(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof g=="number"&&(h=c==="end"?g*-1:g),u?{x:h*d,y:p*l}:{x:p*l,y:h*d}}const Qs=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:c}=t,u=await Zs(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:a}}}}},Js=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:y=>{let{x:w,y:x}=y;return{x:w,y:x}}},...u}=re(e,t),l={x:n,y:r},d=await Ne(t,u),f=Q(oe(o)),p=Ht(f);let h=l[p],g=l[f];if(i){const y=p==="y"?"top":"left",w=p==="y"?"bottom":"right",x=h+d[y],b=h-d[w];h=_t(x,h,b)}if(a){const y=f==="y"?"top":"left",w=f==="y"?"bottom":"right",x=g+d[y],b=g-d[w];g=_t(x,g,b)}const m=c.fn({...t,[p]:h,[f]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:i,[f]:a}}}}}},ec=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:c=0,mainAxis:u=!0,crossAxis:l=!0}=re(e,t),d={x:n,y:r},f=Q(o),p=Ht(f);let h=d[p],g=d[f];const m=re(c,t),y=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(u){const b=p==="y"?"height":"width",C=i.reference[p]-i.floating[b]+y.mainAxis,E=i.reference[p]+i.reference[b]-y.mainAxis;h<C?h=C:h>E&&(h=E)}if(l){var w,x;const b=p==="y"?"width":"height",C=vr.has(oe(o)),E=i.reference[f]-i.floating[b]+(C&&((w=a.offset)==null?void 0:w[f])||0)+(C?0:y.crossAxis),P=i.reference[f]+i.reference[b]+(C?0:((x=a.offset)==null?void 0:x[f])||0)-(C?y.crossAxis:0);g<E?g=E:g>P&&(g=P)}return{[p]:h,[f]:g}}}},tc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:c}=t,{apply:u=()=>{},...l}=re(e,t),d=await Ne(t,l),f=oe(o),p=Ae(o),h=Q(o)==="y",{width:g,height:m}=i.floating;let y,w;f==="top"||f==="bottom"?(y=f,w=p===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(w=f,y=p==="end"?"top":"bottom");const x=m-d.top-d.bottom,b=g-d.left-d.right,C=le(m-d[y],x),E=le(g-d[w],b),P=!t.middlewareData.shift;let S=C,M=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(S=x),P&&!p){const _=H(d.left,0),N=H(d.right,0),L=H(d.top,0),F=H(d.bottom,0);h?M=g-2*(_!==0||N!==0?_+N:H(d.left,d.right)):S=m-2*(L!==0||F!==0?L+F:H(d.top,d.bottom))}await u({...t,availableWidth:M,availableHeight:S});const I=await a.getDimensions(c.floating);return g!==I.width||m!==I.height?{reset:{rects:!0}}:{}}}};function lt(){return typeof window<"u"}function Me(e){return gr(e)?(e.nodeName||"").toLowerCase():"#document"}function G(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function te(e){var t;return(t=(gr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gr(e){return lt()?e instanceof Node||e instanceof G(e).Node:!1}function z(e){return lt()?e instanceof Element||e instanceof G(e).Element:!1}function ee(e){return lt()?e instanceof HTMLElement||e instanceof G(e).HTMLElement:!1}function An(e){return!lt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof G(e).ShadowRoot}const nc=new Set(["inline","contents"]);function je(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Y(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!nc.has(o)}const rc=new Set(["table","td","th"]);function oc(e){return rc.has(Me(e))}const ic=[":popover-open",":modal"];function ut(e){return ic.some(t=>{try{return e.matches(t)}catch{return!1}})}const sc=["transform","translate","scale","rotate","perspective"],cc=["transform","translate","scale","rotate","perspective","filter"],ac=["paint","layout","strict","content"];function zt(e){const t=Yt(),n=z(e)?Y(e):e;return sc.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||cc.some(r=>(n.willChange||"").includes(r))||ac.some(r=>(n.contain||"").includes(r))}function lc(e){let t=ue(e);for(;ee(t)&&!Pe(t);){if(zt(t))return t;if(ut(t))return null;t=ue(t)}return null}function Yt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const uc=new Set(["html","body","#document"]);function Pe(e){return uc.has(Me(e))}function Y(e){return G(e).getComputedStyle(e)}function ft(e){return z(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ue(e){if(Me(e)==="html")return e;const t=e.assignedSlot||e.parentNode||An(e)&&e.host||te(e);return An(t)?t.host:t}function yr(e){const t=ue(e);return Pe(t)?e.ownerDocument?e.ownerDocument.body:e.body:ee(t)&&je(t)?t:yr(t)}function Te(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=yr(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=G(o);if(i){const c=It(a);return t.concat(a,a.visualViewport||[],je(o)?o:[],c&&n?Te(c):[])}return t.concat(o,Te(o,[],n))}function It(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function wr(e){const t=Y(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ee(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,c=tt(n)!==i||tt(r)!==a;return c&&(n=i,r=a),{width:n,height:r,$:c}}function Xt(e){return z(e)?e:e.contextElement}function Re(e){const t=Xt(e);if(!ee(t))return J(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=wr(t);let a=(i?tt(n.width):n.width)/r,c=(i?tt(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const fc=J(0);function xr(e){const t=G(e);return!Yt()||!t.visualViewport?fc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dc(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==G(e)?!1:t}function ge(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Xt(e);let a=J(1);t&&(r?z(r)&&(a=Re(r)):a=Re(e));const c=dc(i,n,r)?xr(i):J(0);let u=(o.left+c.x)/a.x,l=(o.top+c.y)/a.y,d=o.width/a.x,f=o.height/a.y;if(i){const p=G(i),h=r&&z(r)?G(r):r;let g=p,m=It(g);for(;m&&r&&h!==g;){const y=Re(m),w=m.getBoundingClientRect(),x=Y(m),b=w.left+(m.clientLeft+parseFloat(x.paddingLeft))*y.x,C=w.top+(m.clientTop+parseFloat(x.paddingTop))*y.y;u*=y.x,l*=y.y,d*=y.x,f*=y.y,u+=b,l+=C,g=G(m),m=It(g)}}return rt({width:d,height:f,x:u,y:l})}function dt(e,t){const n=ft(e).scrollLeft;return t?t.left+n:ge(te(e)).left+n}function br(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-dt(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function pc(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=te(r),c=t?ut(t.floating):!1;if(r===a||c&&i)return n;let u={scrollLeft:0,scrollTop:0},l=J(1);const d=J(0),f=ee(r);if((f||!f&&!i)&&((Me(r)!=="body"||je(a))&&(u=ft(r)),ee(r))){const h=ge(r);l=Re(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}const p=a&&!f&&!i?br(a,u):J(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+d.x+p.x,y:n.y*l.y-u.scrollTop*l.y+d.y+p.y}}function mc(e){return Array.from(e.getClientRects())}function hc(e){const t=te(e),n=ft(e),r=e.ownerDocument.body,o=H(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=H(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+dt(e);const c=-n.scrollTop;return Y(r).direction==="rtl"&&(a+=H(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:c}}const Mn=25;function vc(e,t){const n=G(e),r=te(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,c=0,u=0;if(o){i=o.width,a=o.height;const d=Yt();(!d||d&&t==="fixed")&&(c=o.offsetLeft,u=o.offsetTop)}const l=dt(r);if(l<=0){const d=r.ownerDocument,f=d.body,p=getComputedStyle(f),h=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(r.clientWidth-f.clientWidth-h);g<=Mn&&(i-=g)}else l<=Mn&&(i+=l);return{width:i,height:a,x:c,y:u}}const gc=new Set(["absolute","fixed"]);function yc(e,t){const n=ge(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ee(e)?Re(e):J(1),a=e.clientWidth*i.x,c=e.clientHeight*i.y,u=o*i.x,l=r*i.y;return{width:a,height:c,x:u,y:l}}function On(e,t,n){let r;if(t==="viewport")r=vc(e,n);else if(t==="document")r=hc(te(e));else if(z(t))r=yc(t,n);else{const o=xr(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return rt(r)}function Cr(e,t){const n=ue(e);return n===t||!z(n)||Pe(n)?!1:Y(n).position==="fixed"||Cr(n,t)}function wc(e,t){const n=t.get(e);if(n)return n;let r=Te(e,[],!1).filter(c=>z(c)&&Me(c)!=="body"),o=null;const i=Y(e).position==="fixed";let a=i?ue(e):e;for(;z(a)&&!Pe(a);){const c=Y(a),u=zt(a);!u&&c.position==="fixed"&&(o=null),(i?!u&&!o:!u&&c.position==="static"&&!!o&&gc.has(o.position)||je(a)&&!u&&Cr(e,a))?r=r.filter(d=>d!==a):o=c,a=ue(a)}return t.set(e,r),r}function xc(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?ut(t)?[]:wc(t,this._c):[].concat(n),r],c=a[0],u=a.reduce((l,d)=>{const f=On(t,d,o);return l.top=H(f.top,l.top),l.right=le(f.right,l.right),l.bottom=le(f.bottom,l.bottom),l.left=H(f.left,l.left),l},On(t,c,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function bc(e){const{width:t,height:n}=wr(e);return{width:t,height:n}}function Cc(e,t,n){const r=ee(t),o=te(t),i=n==="fixed",a=ge(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const u=J(0);function l(){u.x=dt(o)}if(r||!r&&!i)if((Me(t)!=="body"||je(o))&&(c=ft(t)),r){const h=ge(t,!0,i,t);u.x=h.x+t.clientLeft,u.y=h.y+t.clientTop}else o&&l();i&&!r&&o&&l();const d=o&&!r&&!i?br(o,c):J(0),f=a.left+c.scrollLeft-u.x-d.x,p=a.top+c.scrollTop-u.y-d.y;return{x:f,y:p,width:a.width,height:a.height}}function Rt(e){return Y(e).position==="static"}function _n(e,t){if(!ee(e)||Y(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return te(e)===n&&(n=n.ownerDocument.body),n}function Er(e,t){const n=G(e);if(ut(e))return n;if(!ee(e)){let o=ue(e);for(;o&&!Pe(o);){if(z(o)&&!Rt(o))return o;o=ue(o)}return n}let r=_n(e,t);for(;r&&oc(r)&&Rt(r);)r=_n(r,t);return r&&Pe(r)&&Rt(r)&&!zt(r)?n:r||lc(e)||n}const Ec=async function(e){const t=this.getOffsetParent||Er,n=this.getDimensions,r=await n(e.floating);return{reference:Cc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Sc(e){return Y(e).direction==="rtl"}const Rc={convertOffsetParentRelativeRectToViewportRelativeRect:pc,getDocumentElement:te,getClippingRect:xc,getOffsetParent:Er,getElementRects:Ec,getClientRects:mc,getDimensions:bc,getScale:Re,isElement:z,isRTL:Sc};function Sr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Pc(e,t){let n=null,r;const o=te(e);function i(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function a(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),i();const l=e.getBoundingClientRect(),{left:d,top:f,width:p,height:h}=l;if(c||t(),!p||!h)return;const g=Xe(f),m=Xe(o.clientWidth-(d+p)),y=Xe(o.clientHeight-(f+h)),w=Xe(d),b={rootMargin:-g+"px "+-m+"px "+-y+"px "+-w+"px",threshold:H(0,le(1,u))||1};let C=!0;function E(P){const S=P[0].intersectionRatio;if(S!==u){if(!C)return a();S?a(!1,S):r=setTimeout(()=>{a(!1,1e-7)},1e3)}S===1&&!Sr(l,e.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(E,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,b)}n.observe(e)}return a(!0),i}function Ac(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=Xt(e),d=o||i?[...l?Te(l):[],...Te(t)]:[];d.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const f=l&&c?Pc(l,n):null;let p=-1,h=null;a&&(h=new ResizeObserver(w=>{let[x]=w;x&&x.target===l&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=h)==null||b.observe(t)})),n()}),l&&!u&&h.observe(l),h.observe(t));let g,m=u?ge(e):null;u&&y();function y(){const w=ge(e);m&&!Sr(m,w)&&n(),m=w,g=requestAnimationFrame(y)}return n(),()=>{var w;d.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),f?.(),(w=h)==null||w.disconnect(),h=null,u&&cancelAnimationFrame(g)}}const Mc=Qs,Oc=Js,_c=Xs,Dc=tc,Ic=qs,Dn=Ys,Nc=ec,Tc=(e,t,n)=>{const r=new Map,o={platform:Rc,...n},i={...o.platform,_c:r};return zs(e,t,{...o,platform:i})};var kc=typeof document<"u",Lc=function(){},Qe=kc?s.useLayoutEffect:Lc;function ot(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,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ot(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!ot(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Rr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function In(e,t){const n=Rr(e);return Math.round(t*n)/n}function Pt(e){const t=s.useRef(e);return Qe(()=>{t.current=e}),t}function Fc(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:c=!0,whileElementsMounted:u,open:l}=e,[d,f]=s.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=s.useState(r);ot(p,r)||h(r);const[g,m]=s.useState(null),[y,w]=s.useState(null),x=s.useCallback(O=>{O!==P.current&&(P.current=O,m(O))},[]),b=s.useCallback(O=>{O!==S.current&&(S.current=O,w(O))},[]),C=i||g,E=a||y,P=s.useRef(null),S=s.useRef(null),M=s.useRef(d),I=u!=null,_=Pt(u),N=Pt(o),L=Pt(l),F=s.useCallback(()=>{if(!P.current||!S.current)return;const O={placement:t,strategy:n,middleware:p};N.current&&(O.platform=N.current),Tc(P.current,S.current,O).then(R=>{const V={...R,isPositioned:L.current!==!1};T.current&&!ot(M.current,V)&&(M.current=V,kn.flushSync(()=>{f(V)}))})},[p,t,n,N,L]);Qe(()=>{l===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,f(O=>({...O,isPositioned:!1})))},[l]);const T=s.useRef(!1);Qe(()=>(T.current=!0,()=>{T.current=!1}),[]),Qe(()=>{if(C&&(P.current=C),E&&(S.current=E),C&&E){if(_.current)return _.current(C,E,F);F()}},[C,E,F,_,I]);const B=s.useMemo(()=>({reference:P,floating:S,setReference:x,setFloating:b}),[x,b]),D=s.useMemo(()=>({reference:C,floating:E}),[C,E]),j=s.useMemo(()=>{const O={position:n,left:0,top:0};if(!D.floating)return O;const R=In(D.floating,d.x),V=In(D.floating,d.y);return c?{...O,transform:"translate("+R+"px, "+V+"px)",...Rr(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:V}},[n,c,D.floating,d.x,d.y]);return s.useMemo(()=>({...d,update:F,refs:B,elements:D,floatingStyles:j}),[d,F,B,D,j])}const jc=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Dn({element:r.current,padding:o}).fn(n):{}:r?Dn({element:r,padding:o}).fn(n):{}}}},$c=(e,t)=>({...Mc(e),options:[e,t]}),Wc=(e,t)=>({...Oc(e),options:[e,t]}),Bc=(e,t)=>({...Nc(e),options:[e,t]}),Vc=(e,t)=>({..._c(e),options:[e,t]}),Uc=(e,t)=>({...Dc(e),options:[e,t]}),Hc=(e,t)=>({...Ic(e),options:[e,t]}),Gc=(e,t)=>({...jc(e),options:[e,t]});var Kc="Arrow",Pr=s.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return v.jsx(k.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});Pr.displayName=Kc;var zc=Pr;function qt(e){const[t,n]=s.useState(void 0);return ae(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,c;if("borderBoxSize"in i){const u=i.borderBoxSize,l=Array.isArray(u)?u[0]:u;a=l.inlineSize,c=l.blockSize}else a=e.offsetWidth,c=e.offsetHeight;n({width:a,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Zt="Popper",[Ar,Mr]=de(Zt),[Yc,Or]=Ar(Zt),_r=e=>{const{__scopePopper:t,children:n}=e,[r,o]=s.useState(null);return v.jsx(Yc,{scope:t,anchor:r,onAnchorChange:o,children:n})};_r.displayName=Zt;var Dr="PopperAnchor",Ir=s.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Or(Dr,n),a=s.useRef(null),c=$(t,a),u=s.useRef(null);return s.useEffect(()=>{const l=u.current;u.current=r?.current||a.current,l!==u.current&&i.onAnchorChange(u.current)}),r?null:v.jsx(k.div,{...o,ref:c})});Ir.displayName=Dr;var Qt="PopperContent",[Xc,qc]=Ar(Qt),Nr=s.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:g,...m}=e,y=Or(Qt,n),[w,x]=s.useState(null),b=$(t,W=>x(W)),[C,E]=s.useState(null),P=qt(C),S=P?.width??0,M=P?.height??0,I=r+(i!=="center"?"-"+i:""),_=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},N=Array.isArray(l)?l:[l],L=N.length>0,F={padding:_,boundary:N.filter(Qc),altBoundary:L},{refs:T,floatingStyles:B,placement:D,isPositioned:j,middlewareData:O}=Fc({strategy:"fixed",placement:I,whileElementsMounted:(...W)=>Ac(...W,{animationFrame:h==="always"}),elements:{reference:y.anchor},middleware:[$c({mainAxis:o+M,alignmentAxis:a}),u&&Wc({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Bc():void 0,...F}),u&&Vc({...F}),Uc({...F,apply:({elements:W,rects:De,availableWidth:ko,availableHeight:Lo})=>{const{width:Fo,height:jo}=De.reference,Ue=W.floating.style;Ue.setProperty("--radix-popper-available-width",`${ko}px`),Ue.setProperty("--radix-popper-available-height",`${Lo}px`),Ue.setProperty("--radix-popper-anchor-width",`${Fo}px`),Ue.setProperty("--radix-popper-anchor-height",`${jo}px`)}}),C&&Gc({element:C,padding:c}),Jc({arrowWidth:S,arrowHeight:M}),p&&Hc({strategy:"referenceHidden",...F})]}),[R,V]=Lr(D),q=ne(g);ae(()=>{j&&q?.()},[j,q]);const pe=O.arrow?.x,Oe=O.arrow?.y,_e=O.arrow?.centerOffset!==0,[Ve,me]=s.useState();return ae(()=>{w&&me(window.getComputedStyle(w).zIndex)},[w]),v.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:j?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ve,"--radix-popper-transform-origin":[O.transformOrigin?.x,O.transformOrigin?.y].join(" "),...O.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(Xc,{scope:n,placedSide:R,onArrowChange:E,arrowX:pe,arrowY:Oe,shouldHideArrow:_e,children:v.jsx(k.div,{"data-side":R,"data-align":V,...m,ref:b,style:{...m.style,animation:j?void 0:"none"}})})})});Nr.displayName=Qt;var Tr="PopperArrow",Zc={top:"bottom",right:"left",bottom:"top",left:"right"},kr=s.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=qc(Tr,r),a=Zc[i.placedSide];return v.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:v.jsx(zc,{...o,ref:n,style:{...o.style,display:"block"}})})});kr.displayName=Tr;function Qc(e){return e!==null}var Jc=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,c=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[l,d]=Lr(n),f={start:"0%",center:"50%",end:"100%"}[d],p=(o.arrow?.x??0)+c/2,h=(o.arrow?.y??0)+u/2;let g="",m="";return l==="bottom"?(g=a?f:`${p}px`,m=`${-u}px`):l==="top"?(g=a?f:`${p}px`,m=`${r.floating.height+u}px`):l==="right"?(g=`${-u}px`,m=a?f:`${h}px`):l==="left"&&(g=`${r.floating.width+u}px`,m=a?f:`${h}px`),{data:{x:g,y:m}}}});function Lr(e){const[t,n="center"]=e.split("-");return[t,n]}var ea=_r,ta=Ir,na=Nr,ra=kr,At="rovingFocusGroup.onEntryFocus",oa={bubbles:!1,cancelable:!0},$e="RovingFocusGroup",[Nt,Fr,ia]=pr($e),[sa,jr]=de($e,[ia]),[ca,aa]=sa($e),$r=s.forwardRef((e,t)=>v.jsx(Nt.Provider,{scope:e.__scopeRovingFocusGroup,children:v.jsx(Nt.Slot,{scope:e.__scopeRovingFocusGroup,children:v.jsx(la,{...e,ref:t})})}));$r.displayName=$e;var la=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:l,preventScrollOnEntryFocus:d=!1,...f}=e,p=s.useRef(null),h=$(t,p),g=mr(i),[m,y]=Fe({prop:a,defaultProp:c??null,onChange:u,caller:$e}),[w,x]=s.useState(!1),b=ne(l),C=Fr(n),E=s.useRef(!1),[P,S]=s.useState(0);return s.useEffect(()=>{const M=p.current;if(M)return M.addEventListener(At,b),()=>M.removeEventListener(At,b)},[b]),v.jsx(ca,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:m,onItemFocus:s.useCallback(M=>y(M),[y]),onItemShiftTab:s.useCallback(()=>x(!0),[]),onFocusableItemAdd:s.useCallback(()=>S(M=>M+1),[]),onFocusableItemRemove:s.useCallback(()=>S(M=>M-1),[]),children:v.jsx(k.div,{tabIndex:w||P===0?-1:0,"data-orientation":r,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:A(e.onMouseDown,()=>{E.current=!0}),onFocus:A(e.onFocus,M=>{const I=!E.current;if(M.target===M.currentTarget&&I&&!w){const _=new CustomEvent(At,oa);if(M.currentTarget.dispatchEvent(_),!_.defaultPrevented){const N=C().filter(D=>D.focusable),L=N.find(D=>D.active),F=N.find(D=>D.id===m),B=[L,F,...N].filter(Boolean).map(D=>D.ref.current);Vr(B,d)}}E.current=!1}),onBlur:A(e.onBlur,()=>x(!1))})})}),Wr="RovingFocusGroupItem",Br=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:a,...c}=e,u=Ee(),l=i||u,d=aa(Wr,n),f=d.currentTabStopId===l,p=Fr(n),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:m}=d;return s.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),v.jsx(Nt.ItemSlot,{scope:n,id:l,focusable:r,active:o,children:v.jsx(k.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...c,ref:t,onMouseDown:A(e.onMouseDown,y=>{r?d.onItemFocus(l):y.preventDefault()}),onFocus:A(e.onFocus,()=>d.onItemFocus(l)),onKeyDown:A(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){d.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const w=da(y,d.orientation,d.dir);if(w!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let b=p().filter(C=>C.focusable).map(C=>C.ref.current);if(w==="last")b.reverse();else if(w==="prev"||w==="next"){w==="prev"&&b.reverse();const C=b.indexOf(y.currentTarget);b=d.loop?pa(b,C+1):b.slice(C+1)}setTimeout(()=>Vr(b))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:m!=null}):a})})});Br.displayName=Wr;var ua={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function fa(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function da(e,t,n){const r=fa(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return ua[r]}function Vr(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function pa(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ma=$r,ha=Br;function va(e){const t=ga(e),n=s.forwardRef((r,o)=>{const{children:i,...a}=r,c=s.Children.toArray(i),u=c.find(wa);if(u){const l=u.props.children,d=c.map(f=>f===u?s.Children.count(l)>1?s.Children.only(null):s.isValidElement(l)?l.props.children:null:f);return v.jsx(t,{...a,ref:o,children:s.isValidElement(l)?s.cloneElement(l,void 0,d):null})}return v.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function ga(e){const t=s.forwardRef((n,r)=>{const{children:o,...i}=n;if(s.isValidElement(o)){const a=ba(o),c=xa(i,o.props);return o.type!==s.Fragment&&(c.ref=r?fe(r,a):a),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ya=Symbol("radix.slottable");function wa(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ya}function xa(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const u=i(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function ba(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Tt=["Enter"," "],Ca=["ArrowDown","PageUp","Home"],Ur=["ArrowUp","PageDown","End"],Ea=[...Ca,...Ur],Sa={ltr:[...Tt,"ArrowRight"],rtl:[...Tt,"ArrowLeft"]},Ra={ltr:["ArrowLeft"],rtl:["ArrowRight"]},We="Menu",[ke,Pa,Aa]=pr(We),[ye,Hr]=de(We,[Aa,Mr,jr]),pt=Mr(),Gr=jr(),[Ma,we]=ye(We),[Oa,Be]=ye(We),Kr=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:a=!0}=e,c=pt(t),[u,l]=s.useState(null),d=s.useRef(!1),f=ne(i),p=mr(o);return s.useEffect(()=>{const h=()=>{d.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>d.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),v.jsx(ea,{...c,children:v.jsx(Ma,{scope:t,open:n,onOpenChange:f,content:u,onContentChange:l,children:v.jsx(Oa,{scope:t,onClose:s.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:a,children:r})})})};Kr.displayName=We;var _a="MenuAnchor",Jt=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=pt(n);return v.jsx(ta,{...o,...r,ref:t})});Jt.displayName=_a;var en="MenuPortal",[Da,zr]=ye(en,{forceMount:void 0}),Yr=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=we(en,t);return v.jsx(Da,{scope:t,forceMount:n,children:v.jsx(ie,{present:n||i.open,children:v.jsx($t,{asChild:!0,container:o,children:r})})})};Yr.displayName=en;var K="MenuContent",[Ia,tn]=ye(K),Xr=s.forwardRef((e,t)=>{const n=zr(K,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=we(K,e.__scopeMenu),a=Be(K,e.__scopeMenu);return v.jsx(ke.Provider,{scope:e.__scopeMenu,children:v.jsx(ie,{present:r||i.open,children:v.jsx(ke.Slot,{scope:e.__scopeMenu,children:a.modal?v.jsx(Na,{...o,ref:t}):v.jsx(Ta,{...o,ref:t})})})})}),Na=s.forwardRef((e,t)=>{const n=we(K,e.__scopeMenu),r=s.useRef(null),o=$(t,r);return s.useEffect(()=>{const i=r.current;if(i)return qn(i)},[]),v.jsx(nn,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:A(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Ta=s.forwardRef((e,t)=>{const n=we(K,e.__scopeMenu);return v.jsx(nn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ka=va("MenuContent.ScrollLock"),nn=s.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:h,disableOutsideScroll:g,...m}=e,y=we(K,n),w=Be(K,n),x=pt(n),b=Gr(n),C=Pa(n),[E,P]=s.useState(null),S=s.useRef(null),M=$(t,S,y.onContentChange),I=s.useRef(0),_=s.useRef(""),N=s.useRef(0),L=s.useRef(null),F=s.useRef("right"),T=s.useRef(0),B=g?Wt:s.Fragment,D=g?{as:ka,allowPinchZoom:!0}:void 0,j=R=>{const V=_.current+R,q=C().filter(W=>!W.disabled),pe=document.activeElement,Oe=q.find(W=>W.ref.current===pe)?.textValue,_e=q.map(W=>W.textValue),Ve=za(_e,V,Oe),me=q.find(W=>W.textValue===Ve)?.ref.current;(function W(De){_.current=De,window.clearTimeout(I.current),De!==""&&(I.current=window.setTimeout(()=>W(""),1e3))})(V),me&&setTimeout(()=>me.focus())};s.useEffect(()=>()=>window.clearTimeout(I.current),[]),Bn();const O=s.useCallback(R=>F.current===L.current?.side&&Xa(R,L.current?.area),[]);return v.jsx(Ia,{scope:n,searchRef:_,onItemEnter:s.useCallback(R=>{O(R)&&R.preventDefault()},[O]),onItemLeave:s.useCallback(R=>{O(R)||(S.current?.focus(),P(null))},[O]),onTriggerLeave:s.useCallback(R=>{O(R)&&R.preventDefault()},[O]),pointerGraceTimerRef:N,onPointerGraceIntentChange:s.useCallback(R=>{L.current=R},[]),children:v.jsx(B,{...D,children:v.jsx(jt,{asChild:!0,trapped:o,onMountAutoFocus:A(i,R=>{R.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:v.jsx(Ft,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:h,children:v.jsx(ma,{asChild:!0,...b,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:P,onEntryFocus:A(u,R=>{w.isUsingKeyboardRef.current||R.preventDefault()}),preventScrollOnEntryFocus:!0,children:v.jsx(na,{role:"menu","aria-orientation":"vertical","data-state":fo(y.open),"data-radix-menu-content":"",dir:w.dir,...x,...m,ref:M,style:{outline:"none",...m.style},onKeyDown:A(m.onKeyDown,R=>{const q=R.target.closest("[data-radix-menu-content]")===R.currentTarget,pe=R.ctrlKey||R.altKey||R.metaKey,Oe=R.key.length===1;q&&(R.key==="Tab"&&R.preventDefault(),!pe&&Oe&&j(R.key));const _e=S.current;if(R.target!==_e||!Ea.includes(R.key))return;R.preventDefault();const me=C().filter(W=>!W.disabled).map(W=>W.ref.current);Ur.includes(R.key)&&me.reverse(),Ga(me)}),onBlur:A(e.onBlur,R=>{R.currentTarget.contains(R.target)||(window.clearTimeout(I.current),_.current="")}),onPointerMove:A(e.onPointerMove,Le(R=>{const V=R.target,q=T.current!==R.clientX;if(R.currentTarget.contains(V)&&q){const pe=R.clientX>T.current?"right":"left";F.current=pe,T.current=R.clientX}}))})})})})})})});Xr.displayName=K;var La="MenuGroup",rn=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(k.div,{role:"group",...r,ref:t})});rn.displayName=La;var Fa="MenuLabel",qr=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(k.div,{...r,ref:t})});qr.displayName=Fa;var it="MenuItem",Nn="menu.itemSelect",mt=s.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=s.useRef(null),a=Be(it,e.__scopeMenu),c=tn(it,e.__scopeMenu),u=$(t,i),l=s.useRef(!1),d=()=>{const f=i.current;if(!n&&f){const p=new CustomEvent(Nn,{bubbles:!0,cancelable:!0});f.addEventListener(Nn,h=>r?.(h),{once:!0}),Fn(f,p),p.defaultPrevented?l.current=!1:a.onClose()}};return v.jsx(Zr,{...o,ref:u,disabled:n,onClick:A(e.onClick,d),onPointerDown:f=>{e.onPointerDown?.(f),l.current=!0},onPointerUp:A(e.onPointerUp,f=>{l.current||f.currentTarget?.click()}),onKeyDown:A(e.onKeyDown,f=>{const p=c.searchRef.current!=="";n||p&&f.key===" "||Tt.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});mt.displayName=it;var Zr=s.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,a=tn(it,n),c=Gr(n),u=s.useRef(null),l=$(t,u),[d,f]=s.useState(!1),[p,h]=s.useState("");return s.useEffect(()=>{const g=u.current;g&&h((g.textContent??"").trim())},[i.children]),v.jsx(ke.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:v.jsx(ha,{asChild:!0,...c,focusable:!r,children:v.jsx(k.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:l,onPointerMove:A(e.onPointerMove,Le(g=>{r?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:A(e.onPointerLeave,Le(g=>a.onItemLeave(g))),onFocus:A(e.onFocus,()=>f(!0)),onBlur:A(e.onBlur,()=>f(!1))})})})}),ja="MenuCheckboxItem",Qr=s.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return v.jsx(ro,{scope:e.__scopeMenu,checked:n,children:v.jsx(mt,{role:"menuitemcheckbox","aria-checked":st(n)?"mixed":n,...o,ref:t,"data-state":sn(n),onSelect:A(o.onSelect,()=>r?.(st(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Qr.displayName=ja;var Jr="MenuRadioGroup",[$a,Wa]=ye(Jr,{value:void 0,onValueChange:()=>{}}),eo=s.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=ne(r);return v.jsx($a,{scope:e.__scopeMenu,value:n,onValueChange:i,children:v.jsx(rn,{...o,ref:t})})});eo.displayName=Jr;var to="MenuRadioItem",no=s.forwardRef((e,t)=>{const{value:n,...r}=e,o=Wa(to,e.__scopeMenu),i=n===o.value;return v.jsx(ro,{scope:e.__scopeMenu,checked:i,children:v.jsx(mt,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":sn(i),onSelect:A(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});no.displayName=to;var on="MenuItemIndicator",[ro,Ba]=ye(on,{checked:!1}),oo=s.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=Ba(on,n);return v.jsx(ie,{present:r||st(i.checked)||i.checked===!0,children:v.jsx(k.span,{...o,ref:t,"data-state":sn(i.checked)})})});oo.displayName=on;var Va="MenuSeparator",io=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(k.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});io.displayName=Va;var Ua="MenuArrow",so=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=pt(n);return v.jsx(ra,{...o,...r,ref:t})});so.displayName=Ua;var Ha="MenuSub",[cu,co]=ye(Ha),Ie="MenuSubTrigger",ao=s.forwardRef((e,t)=>{const n=we(Ie,e.__scopeMenu),r=Be(Ie,e.__scopeMenu),o=co(Ie,e.__scopeMenu),i=tn(Ie,e.__scopeMenu),a=s.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=i,l={__scopeMenu:e.__scopeMenu},d=s.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return s.useEffect(()=>d,[d]),s.useEffect(()=>{const f=c.current;return()=>{window.clearTimeout(f),u(null)}},[c,u]),v.jsx(Jt,{asChild:!0,...l,children:v.jsx(Zr,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":fo(n.open),...e,ref:fe(t,o.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:A(e.onPointerMove,Le(f=>{i.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:A(e.onPointerLeave,Le(f=>{d();const p=n.content?.getBoundingClientRect();if(p){const h=n.content?.dataset.side,g=h==="right",m=g?-5:5,y=p[g?"left":"right"],w=p[g?"right":"left"];i.onPointerGraceIntentChange({area:[{x:f.clientX+m,y:f.clientY},{x:y,y:p.top},{x:w,y:p.top},{x:w,y:p.bottom},{x:y,y:p.bottom}],side:h}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(f),f.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:A(e.onKeyDown,f=>{const p=i.searchRef.current!=="";e.disabled||p&&f.key===" "||Sa[r.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});ao.displayName=Ie;var lo="MenuSubContent",uo=s.forwardRef((e,t)=>{const n=zr(K,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=we(K,e.__scopeMenu),a=Be(K,e.__scopeMenu),c=co(lo,e.__scopeMenu),u=s.useRef(null),l=$(t,u);return v.jsx(ke.Provider,{scope:e.__scopeMenu,children:v.jsx(ie,{present:r||i.open,children:v.jsx(ke.Slot,{scope:e.__scopeMenu,children:v.jsx(nn,{id:c.contentId,"aria-labelledby":c.triggerId,...o,ref:l,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{a.isUsingKeyboardRef.current&&u.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:A(e.onFocusOutside,d=>{d.target!==c.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:A(e.onEscapeKeyDown,d=>{a.onClose(),d.preventDefault()}),onKeyDown:A(e.onKeyDown,d=>{const f=d.currentTarget.contains(d.target),p=Ra[a.dir].includes(d.key);f&&p&&(i.onOpenChange(!1),c.trigger?.focus(),d.preventDefault())})})})})})});uo.displayName=lo;function fo(e){return e?"open":"closed"}function st(e){return e==="indeterminate"}function sn(e){return st(e)?"indeterminate":e?"checked":"unchecked"}function Ga(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Ka(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function za(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=Ka(e,Math.max(i,0));o.length===1&&(a=a.filter(l=>l!==n));const u=a.find(l=>l.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function Ya(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const c=t[i],u=t[a],l=c.x,d=c.y,f=u.x,p=u.y;d>r!=p>r&&n<(f-l)*(r-d)/(p-d)+l&&(o=!o)}return o}function Xa(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Ya(n,t)}function Le(e){return t=>t.pointerType==="mouse"?e(t):void 0}var qa=Kr,Za=Jt,Qa=Yr,Ja=Xr,el=rn,tl=qr,nl=mt,rl=Qr,ol=eo,il=no,sl=oo,cl=io,al=so,ll=ao,ul=uo,ht="DropdownMenu",[fl]=de(ht,[Hr]),U=Hr(),[dl,po]=fl(ht),mo=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:a,modal:c=!0}=e,u=U(t),l=s.useRef(null),[d,f]=Fe({prop:o,defaultProp:i??!1,onChange:a,caller:ht});return v.jsx(dl,{scope:t,triggerId:Ee(),triggerRef:l,contentId:Ee(),open:d,onOpenChange:f,onOpenToggle:s.useCallback(()=>f(p=>!p),[f]),modal:c,children:v.jsx(qa,{...u,open:d,onOpenChange:f,dir:r,modal:c,children:n})})};mo.displayName=ht;var ho="DropdownMenuTrigger",vo=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=po(ho,n),a=U(n);return v.jsx(Za,{asChild:!0,...a,children:v.jsx(k.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:fe(t,i.triggerRef),onPointerDown:A(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(i.onOpenToggle(),i.open||c.preventDefault())}),onKeyDown:A(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&i.onOpenToggle(),c.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});vo.displayName=ho;var pl="DropdownMenuPortal",go=e=>{const{__scopeDropdownMenu:t,...n}=e,r=U(t);return v.jsx(Qa,{...r,...n})};go.displayName=pl;var yo="DropdownMenuContent",wo=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=po(yo,n),i=U(n),a=s.useRef(!1);return v.jsx(Ja,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...r,ref:t,onCloseAutoFocus:A(e.onCloseAutoFocus,c=>{a.current||o.triggerRef.current?.focus(),a.current=!1,c.preventDefault()}),onInteractOutside:A(e.onInteractOutside,c=>{const u=c.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0,d=u.button===2||l;(!o.modal||d)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});wo.displayName=yo;var ml="DropdownMenuGroup",hl=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=U(n);return v.jsx(el,{...o,...r,ref:t})});hl.displayName=ml;var vl="DropdownMenuLabel",gl=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=U(n);return v.jsx(tl,{...o,...r,ref:t})});gl.displayName=vl;var yl="DropdownMenuItem",xo=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=U(n);return v.jsx(nl,{...o,...r,ref:t})});xo.displayName=yl;var wl="DropdownMenuCheckboxItem",xl=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=U(n);return v.jsx(rl,{...o,...r,ref:t})});xl.displayName=wl;var bl="DropdownMenuRadioGroup",Cl=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=U(n);return v.jsx(ol,{...o,...r,ref:t})});Cl.displayName=bl;var El="DropdownMenuRadioItem",Sl=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=U(n);return v.jsx(il,{...o,...r,ref:t})});Sl.displayName=El;var Rl="DropdownMenuItemIndicator",Pl=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=U(n);return v.jsx(sl,{...o,...r,ref:t})});Pl.displayName=Rl;var Al="DropdownMenuSeparator",bo=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=U(n);return v.jsx(cl,{...o,...r,ref:t})});bo.displayName=Al;var Ml="DropdownMenuArrow",Ol=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=U(n);return v.jsx(al,{...o,...r,ref:t})});Ol.displayName=Ml;var _l="DropdownMenuSubTrigger",Dl=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=U(n);return v.jsx(ll,{...o,...r,ref:t})});Dl.displayName=_l;var Il="DropdownMenuSubContent",Nl=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=U(n);return v.jsx(ul,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Nl.displayName=Il;var au=mo,lu=vo,uu=go,fu=wo,du=xo,pu=bo;function Co(e){const t=s.useRef({value:e,previous:e});return s.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var vt="Checkbox",[Tl]=de(vt),[kl,cn]=Tl(vt);function Ll(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:i,form:a,name:c,onCheckedChange:u,required:l,value:d="on",internal_do_not_use_render:f}=e,[p,h]=Fe({prop:n,defaultProp:o??!1,onChange:u,caller:vt}),[g,m]=s.useState(null),[y,w]=s.useState(null),x=s.useRef(!1),b=g?!!a||!!g.closest("form"):!0,C={checked:p,disabled:i,setChecked:h,control:g,setControl:m,name:c,form:a,value:d,hasConsumerStoppedPropagationRef:x,required:l,defaultChecked:ce(o)?!1:o,isFormControl:b,bubbleInput:y,setBubbleInput:w};return v.jsx(kl,{scope:t,...C,children:$l(f)?f(C):r})}var Eo="CheckboxTrigger",So=s.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:i,value:a,disabled:c,checked:u,required:l,setControl:d,setChecked:f,hasConsumerStoppedPropagationRef:p,isFormControl:h,bubbleInput:g}=cn(Eo,e),m=$(o,d),y=s.useRef(u);return s.useEffect(()=>{const w=i?.form;if(w){const x=()=>f(y.current);return w.addEventListener("reset",x),()=>w.removeEventListener("reset",x)}},[i,f]),v.jsx(k.button,{type:"button",role:"checkbox","aria-checked":ce(u)?"mixed":u,"aria-required":l,"data-state":Mo(u),"data-disabled":c?"":void 0,disabled:c,value:a,...r,ref:m,onKeyDown:A(t,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:A(n,w=>{f(x=>ce(x)?!0:!x),g&&h&&(p.current=w.isPropagationStopped(),p.current||w.stopPropagation())})})});So.displayName=Eo;var Fl=s.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:c,value:u,onCheckedChange:l,form:d,...f}=e;return v.jsx(Ll,{__scopeCheckbox:n,checked:o,defaultChecked:i,disabled:c,required:a,onCheckedChange:l,name:r,form:d,value:u,internal_do_not_use_render:({isFormControl:p})=>v.jsxs(v.Fragment,{children:[v.jsx(So,{...f,ref:t,__scopeCheckbox:n}),p&&v.jsx(Ao,{__scopeCheckbox:n})]})})});Fl.displayName=vt;var Ro="CheckboxIndicator",jl=s.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=cn(Ro,n);return v.jsx(ie,{present:r||ce(i.checked)||i.checked===!0,children:v.jsx(k.span,{"data-state":Mo(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});jl.displayName=Ro;var Po="CheckboxBubbleInput",Ao=s.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:i,defaultChecked:a,required:c,disabled:u,name:l,value:d,form:f,bubbleInput:p,setBubbleInput:h}=cn(Po,e),g=$(n,h),m=Co(i),y=qt(r);s.useEffect(()=>{const x=p;if(!x)return;const b=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(b,"checked").set,P=!o.current;if(m!==i&&E){const S=new Event("click",{bubbles:P});x.indeterminate=ce(i),E.call(x,ce(i)?!1:i),x.dispatchEvent(S)}},[p,m,i,o]);const w=s.useRef(ce(i)?!1:i);return v.jsx(k.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??w.current,required:c,disabled:u,name:l,value:d,form:f,...t,tabIndex:-1,ref:g,style:{...t.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Ao.displayName=Po;function $l(e){return typeof e=="function"}function ce(e){return e==="indeterminate"}function Mo(e){return ce(e)?"indeterminate":e?"checked":"unchecked"}var Wl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Bl=Wl.reduce((e,t)=>{const n=Lt(`Primitive.${t}`),r=s.forwardRef((o,i)=>{const{asChild:a,...c}=o,u=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(u,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Vl="Separator",Tn="horizontal",Ul=["horizontal","vertical"],Oo=s.forwardRef((e,t)=>{const{decorative:n,orientation:r=Tn,...o}=e,i=Hl(r)?r:Tn,c=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return v.jsx(Bl.div,{"data-orientation":i,...c,...o,ref:t})});Oo.displayName=Vl;function Hl(e){return Ul.includes(e)}var mu=Oo,gt="Switch",[Gl]=de(gt),[Kl,zl]=Gl(gt),_o=s.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:a,disabled:c,value:u="on",onCheckedChange:l,form:d,...f}=e,[p,h]=s.useState(null),g=$(t,b=>h(b)),m=s.useRef(!1),y=p?d||!!p.closest("form"):!0,[w,x]=Fe({prop:o,defaultProp:i??!1,onChange:l,caller:gt});return v.jsxs(Kl,{scope:n,checked:w,disabled:c,children:[v.jsx(k.button,{type:"button",role:"switch","aria-checked":w,"aria-required":a,"data-state":To(w),"data-disabled":c?"":void 0,disabled:c,value:u,...f,ref:g,onClick:A(e.onClick,b=>{x(C=>!C),y&&(m.current=b.isPropagationStopped(),m.current||b.stopPropagation())})}),y&&v.jsx(No,{control:p,bubbles:!m.current,name:r,value:u,checked:w,required:a,disabled:c,form:d,style:{transform:"translateX(-100%)"}})]})});_o.displayName=gt;var Do="SwitchThumb",Io=s.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=zl(Do,n);return v.jsx(k.span,{"data-state":To(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Io.displayName=Do;var Yl="SwitchBubbleInput",No=s.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const a=s.useRef(null),c=$(a,i),u=Co(n),l=qt(t);return s.useEffect(()=>{const d=a.current;if(!d)return;const f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(u!==n&&h){const g=new Event("click",{bubbles:r});h.call(d,n),d.dispatchEvent(g)}},[u,n,r]),v.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:c,style:{...o.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});No.displayName=Yl;function To(e){return e?"checked":"unchecked"}var hu=_o,vu=Io;export{ta as A,nu as C,ou as D,du as I,tu as O,eu as P,Jl as R,Zl as S,ru as T,iu as a,su as b,au as c,lu as d,uu as e,fu as f,pu as g,Fl as h,jl as i,mu as j,hu as k,vu as l,k as m,de as n,Mr as o,Fe as p,ea as q,$ as r,A as s,ie as t,Ee as u,$t as v,ra as w,Ft as x,na as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var ue=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function oe(p){return p&&p.__esModule&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p}var I={exports:{}},n={};var K;function te(){if(K)return n;K=1;var p=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),m=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),t=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),C=Symbol.iterator;function A(e){return e===null||typeof e!="object"?null:(e=C&&e[C]||e["@@iterator"],typeof e=="function"?e:null)}var U={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Y=Object.assign,b={};function O(e,r,o){this.props=e,this.context=r,this.refs=b,this.updater=o||U}O.prototype.isReactComponent={},O.prototype.setState=function(e,r){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,r,"setState")},O.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function k(){}k.prototype=O.prototype;function H(e,r,o){this.props=e,this.context=r,this.refs=b,this.updater=o||U}var N=H.prototype=new k;N.constructor=H,Y(N,O.prototype),N.isPureReactComponent=!0;var q=Array.isArray;function D(){}var a={H:null,A:null,T:null,S:null},x=Object.prototype.hasOwnProperty;function j(e,r,o){var u=o.ref;return{$$typeof:p,type:e,key:r,ref:u!==void 0?u:null,props:o}}function Q(e,r){return j(e.type,r,e.props)}function L(e){return typeof e=="object"&&e!==null&&e.$$typeof===p}function Z(e){var r={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(o){return r[o]})}var G=/\/+/g;function M(e,r){return typeof e=="object"&&e!==null&&e.key!=null?Z(""+e.key):r.toString(36)}function J(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(D,D):(e.status="pending",e.then(function(r){e.status==="pending"&&(e.status="fulfilled",e.value=r)},function(r){e.status==="pending"&&(e.status="rejected",e.reason=r)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function S(e,r,o,u,s){var f=typeof e;(f==="undefined"||f==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(f){case"bigint":case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case p:case R:l=!0;break;case c:return l=e._init,S(l(e._payload),r,o,u,s)}}if(l)return s=s(e),l=u===""?"."+M(e,0):u,q(s)?(o="",l!=null&&(o=l.replace(G,"$&/")+"/"),S(s,r,o,"",function(ee){return ee})):s!=null&&(L(s)&&(s=Q(s,o+(s.key==null||e&&e.key===s.key?"":(""+s.key).replace(G,"$&/")+"/")+l)),r.push(s)),1;l=0;var E=u===""?".":u+":";if(q(e))for(var d=0;d<e.length;d++)u=e[d],f=E+M(u,d),l+=S(u,r,o,f,s);else if(d=A(e),typeof d=="function")for(e=d.call(e),d=0;!(u=e.next()).done;)u=u.value,f=E+M(u,d++),l+=S(u,r,o,f,s);else if(f==="object"){if(typeof e.then=="function")return S(J(e),r,o,u,s);throw r=String(e),Error("Objects are not valid as a React child (found: "+(r==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}return l}function h(e,r,o){if(e==null)return e;var u=[],s=0;return S(e,u,"","",function(f){return r.call(o,f,s++)}),u}function V(e){if(e._status===-1){var r=e._result;r=r(),r.then(function(o){(e._status===0||e._status===-1)&&(e._status=1,e._result=o)},function(o){(e._status===0||e._status===-1)&&(e._status=2,e._result=o)}),e._status===-1&&(e._status=0,e._result=r)}if(e._status===1)return e._result.default;throw e._result}var z=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},F={map:h,forEach:function(e,r,o){h(e,function(){r.apply(this,arguments)},o)},count:function(e){var r=0;return h(e,function(){r++}),r},toArray:function(e){return h(e,function(r){return r})||[]},only:function(e){if(!L(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};return n.Activity=v,n.Children=F,n.Component=O,n.Fragment=g,n.Profiler=P,n.PureComponent=H,n.StrictMode=y,n.Suspense=i,n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,n.__COMPILER_RUNTIME={__proto__:null,c:function(e){return a.H.useMemoCache(e)}},n.cache=function(e){return function(){return e.apply(null,arguments)}},n.cacheSignal=function(){return null},n.cloneElement=function(e,r,o){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var u=Y({},e.props),s=e.key;if(r!=null)for(f in r.key!==void 0&&(s=""+r.key),r)!x.call(r,f)||f==="key"||f==="__self"||f==="__source"||f==="ref"&&r.ref===void 0||(u[f]=r[f]);var f=arguments.length-2;if(f===1)u.children=o;else if(1<f){for(var l=Array(f),E=0;E<f;E++)l[E]=arguments[E+2];u.children=l}return j(e.type,s,u)},n.createContext=function(e){return e={$$typeof:m,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:w,_context:e},e},n.createElement=function(e,r,o){var u,s={},f=null;if(r!=null)for(u in r.key!==void 0&&(f=""+r.key),r)x.call(r,u)&&u!=="key"&&u!=="__self"&&u!=="__source"&&(s[u]=r[u]);var l=arguments.length-2;if(l===1)s.children=o;else if(1<l){for(var E=Array(l),d=0;d<l;d++)E[d]=arguments[d+2];s.children=E}if(e&&e.defaultProps)for(u in l=e.defaultProps,l)s[u]===void 0&&(s[u]=l[u]);return j(e,f,s)},n.createRef=function(){return{current:null}},n.forwardRef=function(e){return{$$typeof:T,render:e}},n.isValidElement=L,n.lazy=function(e){return{$$typeof:c,_payload:{_status:-1,_result:e},_init:V}},n.memo=function(e,r){return{$$typeof:t,type:e,compare:r===void 0?null:r}},n.startTransition=function(e){var r=a.T,o={};a.T=o;try{var u=e(),s=a.S;s!==null&&s(o,u),typeof u=="object"&&u!==null&&typeof u.then=="function"&&u.then(D,z)}catch(f){z(f)}finally{r!==null&&o.types!==null&&(r.types=o.types),a.T=r}},n.unstable_useCacheRefresh=function(){return a.H.useCacheRefresh()},n.use=function(e){return a.H.use(e)},n.useActionState=function(e,r,o){return a.H.useActionState(e,r,o)},n.useCallback=function(e,r){return a.H.useCallback(e,r)},n.useContext=function(e){return a.H.useContext(e)},n.useDebugValue=function(){},n.useDeferredValue=function(e,r){return a.H.useDeferredValue(e,r)},n.useEffect=function(e,r){return a.H.useEffect(e,r)},n.useEffectEvent=function(e){return a.H.useEffectEvent(e)},n.useId=function(){return a.H.useId()},n.useImperativeHandle=function(e,r,o){return a.H.useImperativeHandle(e,r,o)},n.useInsertionEffect=function(e,r){return a.H.useInsertionEffect(e,r)},n.useLayoutEffect=function(e,r){return a.H.useLayoutEffect(e,r)},n.useMemo=function(e,r){return a.H.useMemo(e,r)},n.useOptimistic=function(e,r){return a.H.useOptimistic(e,r)},n.useReducer=function(e,r,o){return a.H.useReducer(e,r,o)},n.useRef=function(e){return a.H.useRef(e)},n.useState=function(e){return a.H.useState(e)},n.useSyncExternalStore=function(e,r,o){return a.H.useSyncExternalStore(e,r,o)},n.useTransition=function(){return a.H.useTransition()},n.version="19.2.3",n}var B;function re(){return B||(B=1,I.exports=te()),I.exports}var $={exports:{}},_={};var W;function ne(){if(W)return _;W=1;var p=re();function R(i){var t="https://react.dev/errors/"+i;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)t+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+i+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function g(){}var y={d:{f:g,r:function(){throw Error(R(522))},D:g,C:g,L:g,m:g,X:g,S:g,M:g},p:0,findDOMNode:null},P=Symbol.for("react.portal");function w(i,t,c){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:P,key:v==null?null:""+v,children:i,containerInfo:t,implementation:c}}var m=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function T(i,t){if(i==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}return _.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=y,_.createPortal=function(i,t){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(R(299));return w(i,t,null,c)},_.flushSync=function(i){var t=m.T,c=y.p;try{if(m.T=null,y.p=2,i)return i()}finally{m.T=t,y.p=c,y.d.f()}},_.preconnect=function(i,t){typeof i=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,y.d.C(i,t))},_.prefetchDNS=function(i){typeof i=="string"&&y.d.D(i)},_.preinit=function(i,t){if(typeof i=="string"&&t&&typeof t.as=="string"){var c=t.as,v=T(c,t.crossOrigin),C=typeof t.integrity=="string"?t.integrity:void 0,A=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;c==="style"?y.d.S(i,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:v,integrity:C,fetchPriority:A}):c==="script"&&y.d.X(i,{crossOrigin:v,integrity:C,fetchPriority:A,nonce:typeof t.nonce=="string"?t.nonce:void 0})}},_.preinitModule=function(i,t){if(typeof i=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var c=T(t.as,t.crossOrigin);y.d.M(i,{crossOrigin:c,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&y.d.M(i)},_.preload=function(i,t){if(typeof i=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var c=t.as,v=T(c,t.crossOrigin);y.d.L(i,c,{crossOrigin:v,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}},_.preloadModule=function(i,t){if(typeof i=="string")if(t){var c=T(t.as,t.crossOrigin);y.d.m(i,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:c,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else y.d.m(i)},_.requestFormReset=function(i){y.d.r(i)},_.unstable_batchedUpdates=function(i,t){return i(t)},_.useFormState=function(i,t,c){return m.H.useFormState(i,t,c)},_.useFormStatus=function(){return m.H.useHostTransitionStatus()},_.version="19.2.3",_}var X;function ie(){if(X)return $.exports;X=1;function p(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(p)}catch(R){console.error(R)}}return p(),$.exports=ne(),$.exports}export{ie as a,ue as c,oe as g,re as r};
|